Loading apps/demo/package.json +1 −1 Original line number Diff line number Diff line Loading @@ -44,6 +44,6 @@ "eslint": "8.8.0", "eslint-config-next": "12.1.6", "source-map-loader": "^3.0.1", "typescript": "4.7.1-rc" "typescript": "4.7.2" } } apps/demo/src/components/grid.tsx +2 −2 Original line number Diff line number Diff line import { makeStyles, mergeClasses, shorthands } from '@griffel/react'; import { ComponentType, CSSProperties, useEffect, useLayoutEffect, useMemo, useState } from "react"; import { ComponentType, CSSProperties, useEffect, useMemo, useState } from "react"; import { useStableCallback, withDisplayName } from "../utils"; import { ResizeObserver, Size } from './resize-observer'; Loading Loading @@ -184,7 +184,7 @@ export const Grid = withDisplayName('Grid')(({ } }); useLayoutEffect(() => { useEffect(() => { if (bodyRef) { setScrollLeft(bodyRef.scrollLeft); setScrollTop(bodyRef.scrollTop); Loading apps/demo/src/components/resize-observer.tsx +1 −1 Original line number Diff line number Diff line import { makeStyles } from "@griffel/react"; import { useEffect, useLayoutEffect, useState } from 'react'; import { useEffect, useState } from 'react'; import { useStableCallback, withDisplayName } from '../utils'; export interface Size { Loading apps/demo/src/pages/logcat.tsx +4 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,10 @@ const state = makeAutoObservable({ return; } // Logcat always starts from beginning, // so don't append. this.list = []; this.running = true; this.stream = this.logcat!.binary(); this.stopSignal = new AbortController(); Loading apps/demo/src/pages/packet-log.tsx +5 −1 Original line number Diff line number Diff line Loading @@ -25,11 +25,15 @@ interface Column extends GridColumn { const LINE_HEIGHT = 32; const state = new class { get empty() { return !GlobalState.logs.length; } get commandBarItems(): ICommandBarItemProps[] { return [ { key: 'clear', disabled: !GlobalState.device, disabled: this.empty, iconProps: { iconName: Icons.Delete }, text: 'Clear', onClick: () => GlobalState.clearLog(), Loading Loading
apps/demo/package.json +1 −1 Original line number Diff line number Diff line Loading @@ -44,6 +44,6 @@ "eslint": "8.8.0", "eslint-config-next": "12.1.6", "source-map-loader": "^3.0.1", "typescript": "4.7.1-rc" "typescript": "4.7.2" } }
apps/demo/src/components/grid.tsx +2 −2 Original line number Diff line number Diff line import { makeStyles, mergeClasses, shorthands } from '@griffel/react'; import { ComponentType, CSSProperties, useEffect, useLayoutEffect, useMemo, useState } from "react"; import { ComponentType, CSSProperties, useEffect, useMemo, useState } from "react"; import { useStableCallback, withDisplayName } from "../utils"; import { ResizeObserver, Size } from './resize-observer'; Loading Loading @@ -184,7 +184,7 @@ export const Grid = withDisplayName('Grid')(({ } }); useLayoutEffect(() => { useEffect(() => { if (bodyRef) { setScrollLeft(bodyRef.scrollLeft); setScrollTop(bodyRef.scrollTop); Loading
apps/demo/src/components/resize-observer.tsx +1 −1 Original line number Diff line number Diff line import { makeStyles } from "@griffel/react"; import { useEffect, useLayoutEffect, useState } from 'react'; import { useEffect, useState } from 'react'; import { useStableCallback, withDisplayName } from '../utils'; export interface Size { Loading
apps/demo/src/pages/logcat.tsx +4 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,10 @@ const state = makeAutoObservable({ return; } // Logcat always starts from beginning, // so don't append. this.list = []; this.running = true; this.stream = this.logcat!.binary(); this.stopSignal = new AbortController(); Loading
apps/demo/src/pages/packet-log.tsx +5 −1 Original line number Diff line number Diff line Loading @@ -25,11 +25,15 @@ interface Column extends GridColumn { const LINE_HEIGHT = 32; const state = new class { get empty() { return !GlobalState.logs.length; } get commandBarItems(): ICommandBarItemProps[] { return [ { key: 'clear', disabled: !GlobalState.device, disabled: this.empty, iconProps: { iconName: Icons.Delete }, text: 'Clear', onClick: () => GlobalState.clearLog(), Loading