UID refactor 2/n Split types into client and desktop types
Summary: This file was getting overwelhming, and this seemed like a reasonable way to split it Reviewed By: elboman Differential Revision: D47547532 fbshipit-source-id: ab2bfa22daabbed13ec1445da0cf8ba88bda12d7
This commit is contained in:
committed by
Facebook GitHub Bot
parent
2cc0ca0167
commit
f181551ce6
@@ -7,67 +7,6 @@
|
|||||||
* @format
|
* @format
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {Atom} from 'flipper-plugin';
|
|
||||||
|
|
||||||
export type UIState = {
|
|
||||||
viewMode: Atom<ViewMode>;
|
|
||||||
isConnected: Atom<boolean>;
|
|
||||||
isPaused: Atom<boolean>;
|
|
||||||
streamState: Atom<StreamState>;
|
|
||||||
searchTerm: Atom<string>;
|
|
||||||
isContextMenuOpen: Atom<boolean>;
|
|
||||||
hoveredNodes: Atom<Id[]>;
|
|
||||||
selectedNode: Atom<NodeSelection | undefined>;
|
|
||||||
highlightedNodes: Atom<Set<Id>>;
|
|
||||||
focusedNode: Atom<Id | undefined>;
|
|
||||||
expandedNodes: Atom<Set<Id>>;
|
|
||||||
visualiserWidth: Atom<number>;
|
|
||||||
frameworkEventMonitoring: Atom<Map<FrameworkEventType, boolean>>;
|
|
||||||
filterMainThreadMonitoring: Atom<boolean>;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type ViewMode =
|
|
||||||
| {mode: 'default'}
|
|
||||||
| {mode: 'frameworkEventsTable'; treeRootId: Id};
|
|
||||||
|
|
||||||
export type NodeSelection = {
|
|
||||||
id: Id;
|
|
||||||
source: SelectionSource;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type OnSelectNode = (
|
|
||||||
node: Id | undefined,
|
|
||||||
source: SelectionSource,
|
|
||||||
) => void;
|
|
||||||
|
|
||||||
export type UIActions = {
|
|
||||||
onHoverNode: (node?: Id) => void;
|
|
||||||
onFocusNode: (focused?: Id) => void;
|
|
||||||
onContextMenuOpen: (open: boolean) => void;
|
|
||||||
onSelectNode: OnSelectNode;
|
|
||||||
onExpandNode: (node: Id) => void;
|
|
||||||
onCollapseNode: (node: Id) => void;
|
|
||||||
setVisualiserWidth: (width: number) => void;
|
|
||||||
onSetFilterMainThreadMonitoring: (toggled: boolean) => void;
|
|
||||||
onSetViewMode: (viewMode: ViewMode) => void;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type SelectionSource = 'visualiser' | 'tree' | 'keyboard';
|
|
||||||
|
|
||||||
export type StreamState =
|
|
||||||
| {state: 'Ok'}
|
|
||||||
| {state: 'RetryingAfterError'}
|
|
||||||
| {
|
|
||||||
state: 'StreamInterceptorRetryableError';
|
|
||||||
error: StreamInterceptorError;
|
|
||||||
retryCallback: () => Promise<void>;
|
|
||||||
}
|
|
||||||
| {
|
|
||||||
state: 'FatalError';
|
|
||||||
error: Error;
|
|
||||||
clearCallBack: () => Promise<void>;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type Events = {
|
export type Events = {
|
||||||
init: InitEvent;
|
init: InitEvent;
|
||||||
subtreeUpdate: SubtreeUpdateEvent;
|
subtreeUpdate: SubtreeUpdateEvent;
|
||||||
@@ -77,8 +16,6 @@ export type Events = {
|
|||||||
metadataUpdate: UpdateMetadataEvent;
|
metadataUpdate: UpdateMetadataEvent;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type StreamFlowState = {paused: boolean};
|
|
||||||
|
|
||||||
export type FrameScanEvent = {
|
export type FrameScanEvent = {
|
||||||
frameTime: number;
|
frameTime: number;
|
||||||
nodes: UINode[];
|
nodes: UINode[];
|
||||||
@@ -170,16 +107,6 @@ export type UpdateMetadataEvent = {
|
|||||||
attributeMetadata: Record<MetadataId, Metadata>;
|
attributeMetadata: Record<MetadataId, Metadata>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type NestedNode = {
|
|
||||||
id: Id;
|
|
||||||
name: string;
|
|
||||||
attributes: Record<string, Inspectable>;
|
|
||||||
children: NestedNode[];
|
|
||||||
bounds: Bounds;
|
|
||||||
tags: Tag[];
|
|
||||||
activeChildIdx?: number;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type UINode = {
|
export type UINode = {
|
||||||
id: Id;
|
id: Id;
|
||||||
parent?: Id;
|
parent?: Id;
|
||||||
@@ -246,7 +173,6 @@ export type SnapshotInfo = {nodeId: Id; data: Snapshot};
|
|||||||
export type Id = number | string;
|
export type Id = number | string;
|
||||||
|
|
||||||
export type MetadataId = number;
|
export type MetadataId = number;
|
||||||
export type TreeState = {expandedNodes: Id[]};
|
|
||||||
|
|
||||||
export type Tag =
|
export type Tag =
|
||||||
| 'Native'
|
| 'Native'
|
||||||
@@ -338,20 +264,3 @@ export type InspectableUnknown = {
|
|||||||
type: 'unknown';
|
type: 'unknown';
|
||||||
value: string;
|
value: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export interface StreamInterceptor {
|
|
||||||
transformNodes(
|
|
||||||
nodes: Map<Id, UINode>,
|
|
||||||
): Promise<[Map<Id, UINode>, Metadata[]]>;
|
|
||||||
|
|
||||||
transformMetadata(metadata: Metadata): Promise<Metadata>;
|
|
||||||
}
|
|
||||||
|
|
||||||
export class StreamInterceptorError extends Error {
|
|
||||||
title: string;
|
|
||||||
|
|
||||||
constructor(title: string, message: string) {
|
|
||||||
super(message);
|
|
||||||
this.title = title;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
107
desktop/plugins/public/ui-debugger/DesktopTypes.tsx
Normal file
107
desktop/plugins/public/ui-debugger/DesktopTypes.tsx
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*
|
||||||
|
* @format
|
||||||
|
*/
|
||||||
|
|
||||||
|
import {Atom} from 'flipper-plugin';
|
||||||
|
import {
|
||||||
|
Id,
|
||||||
|
FrameworkEventType,
|
||||||
|
Inspectable,
|
||||||
|
Bounds,
|
||||||
|
Tag,
|
||||||
|
UINode,
|
||||||
|
Metadata,
|
||||||
|
} from './ClientTypes';
|
||||||
|
|
||||||
|
export type UIState = {
|
||||||
|
viewMode: Atom<ViewMode>;
|
||||||
|
isConnected: Atom<boolean>;
|
||||||
|
isPaused: Atom<boolean>;
|
||||||
|
streamState: Atom<StreamState>;
|
||||||
|
searchTerm: Atom<string>;
|
||||||
|
isContextMenuOpen: Atom<boolean>;
|
||||||
|
hoveredNodes: Atom<Id[]>;
|
||||||
|
selectedNode: Atom<NodeSelection | undefined>;
|
||||||
|
highlightedNodes: Atom<Set<Id>>;
|
||||||
|
focusedNode: Atom<Id | undefined>;
|
||||||
|
expandedNodes: Atom<Set<Id>>;
|
||||||
|
visualiserWidth: Atom<number>;
|
||||||
|
frameworkEventMonitoring: Atom<Map<FrameworkEventType, boolean>>;
|
||||||
|
filterMainThreadMonitoring: Atom<boolean>;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type StreamFlowState = {paused: boolean};
|
||||||
|
|
||||||
|
export type NestedNode = {
|
||||||
|
id: Id;
|
||||||
|
name: string;
|
||||||
|
attributes: Record<string, Inspectable>;
|
||||||
|
children: NestedNode[];
|
||||||
|
bounds: Bounds;
|
||||||
|
tags: Tag[];
|
||||||
|
activeChildIdx?: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type ViewMode =
|
||||||
|
| {mode: 'default'}
|
||||||
|
| {mode: 'frameworkEventsTable'; treeRootId: Id};
|
||||||
|
|
||||||
|
export type NodeSelection = {
|
||||||
|
id: Id;
|
||||||
|
source: SelectionSource;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type OnSelectNode = (
|
||||||
|
node: Id | undefined,
|
||||||
|
source: SelectionSource,
|
||||||
|
) => void;
|
||||||
|
|
||||||
|
export type UIActions = {
|
||||||
|
onHoverNode: (node?: Id) => void;
|
||||||
|
onFocusNode: (focused?: Id) => void;
|
||||||
|
onContextMenuOpen: (open: boolean) => void;
|
||||||
|
onSelectNode: OnSelectNode;
|
||||||
|
onExpandNode: (node: Id) => void;
|
||||||
|
onCollapseNode: (node: Id) => void;
|
||||||
|
setVisualiserWidth: (width: number) => void;
|
||||||
|
onSetFilterMainThreadMonitoring: (toggled: boolean) => void;
|
||||||
|
onSetViewMode: (viewMode: ViewMode) => void;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type SelectionSource = 'visualiser' | 'tree' | 'keyboard';
|
||||||
|
|
||||||
|
export type StreamState =
|
||||||
|
| {state: 'Ok'}
|
||||||
|
| {state: 'RetryingAfterError'}
|
||||||
|
| {
|
||||||
|
state: 'StreamInterceptorRetryableError';
|
||||||
|
error: StreamInterceptorError;
|
||||||
|
retryCallback: () => Promise<void>;
|
||||||
|
}
|
||||||
|
| {
|
||||||
|
state: 'FatalError';
|
||||||
|
error: Error;
|
||||||
|
clearCallBack: () => Promise<void>;
|
||||||
|
};
|
||||||
|
|
||||||
|
export interface StreamInterceptor {
|
||||||
|
transformNodes(
|
||||||
|
nodes: Map<Id, UINode>,
|
||||||
|
): Promise<[Map<Id, UINode>, Metadata[]]>;
|
||||||
|
|
||||||
|
transformMetadata(metadata: Metadata): Promise<Metadata>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class StreamInterceptorError extends Error {
|
||||||
|
title: string;
|
||||||
|
|
||||||
|
constructor(title: string, message: string) {
|
||||||
|
super(message);
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -26,7 +26,7 @@ import {
|
|||||||
SearchOutlined,
|
SearchOutlined,
|
||||||
} from '@ant-design/icons';
|
} from '@ant-design/icons';
|
||||||
import {usePlugin, useValue, Layout} from 'flipper-plugin';
|
import {usePlugin, useValue, Layout} from 'flipper-plugin';
|
||||||
import {FrameworkEventType} from '../types';
|
import {FrameworkEventType} from '../ClientTypes';
|
||||||
import {tracker} from '../utils/tracker';
|
import {tracker} from '../utils/tracker';
|
||||||
import {debounce} from 'lodash';
|
import {debounce} from 'lodash';
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import {
|
|||||||
usePlugin,
|
usePlugin,
|
||||||
} from 'flipper-plugin';
|
} from 'flipper-plugin';
|
||||||
import React, {useEffect, useRef} from 'react';
|
import React, {useEffect, useRef} from 'react';
|
||||||
import {FrameworkEvent, Id} from '../types';
|
import {FrameworkEvent, Id} from '../ClientTypes';
|
||||||
import {plugin} from '../index';
|
import {plugin} from '../index';
|
||||||
import {Button, Tooltip} from 'antd';
|
import {Button, Tooltip} from 'antd';
|
||||||
|
|
||||||
|
|||||||
@@ -10,11 +10,11 @@
|
|||||||
import {
|
import {
|
||||||
PerformanceStatsEvent,
|
PerformanceStatsEvent,
|
||||||
DynamicPerformanceStatsEvent,
|
DynamicPerformanceStatsEvent,
|
||||||
UIState,
|
|
||||||
Id,
|
Id,
|
||||||
UINode,
|
UINode,
|
||||||
FrameworkEvent,
|
FrameworkEvent,
|
||||||
} from '../types';
|
} from '../ClientTypes';
|
||||||
|
import {UIState} from '../DesktopTypes';
|
||||||
import React, {useMemo} from 'react';
|
import React, {useMemo} from 'react';
|
||||||
import {
|
import {
|
||||||
DataInspector,
|
DataInspector,
|
||||||
|
|||||||
@@ -7,14 +7,8 @@
|
|||||||
* @format
|
* @format
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {
|
import {FrameworkEvent, FrameworkEventType, Id, UINode} from '../ClientTypes';
|
||||||
FrameworkEvent,
|
import {OnSelectNode, ViewMode} from '../DesktopTypes';
|
||||||
FrameworkEventType,
|
|
||||||
Id,
|
|
||||||
OnSelectNode,
|
|
||||||
UINode,
|
|
||||||
ViewMode,
|
|
||||||
} from '../types';
|
|
||||||
import React, {
|
import React, {
|
||||||
ReactNode,
|
ReactNode,
|
||||||
Ref,
|
Ref,
|
||||||
|
|||||||
@@ -8,14 +8,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import React, {useEffect, useMemo, useRef} from 'react';
|
import React, {useEffect, useMemo, useRef} from 'react';
|
||||||
import {
|
import {Bounds, Coordinate, Id, UINode} from '../ClientTypes';
|
||||||
Bounds,
|
import {NestedNode, OnSelectNode} from '../DesktopTypes';
|
||||||
Coordinate,
|
|
||||||
Id,
|
|
||||||
NestedNode,
|
|
||||||
OnSelectNode,
|
|
||||||
UINode,
|
|
||||||
} from '../types';
|
|
||||||
|
|
||||||
import {produce, styled, theme, usePlugin, useValue} from 'flipper-plugin';
|
import {produce, styled, theme, usePlugin, useValue} from 'flipper-plugin';
|
||||||
import {plugin} from '../index';
|
import {plugin} from '../index';
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
import {UINode} from '../../types';
|
import {UINode} from '../../ClientTypes';
|
||||||
|
|
||||||
export async function prefetchSourceFileLocation(_: UINode) {}
|
export async function prefetchSourceFileLocation(_: UINode) {}
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import {
|
|||||||
theme,
|
theme,
|
||||||
} from 'flipper-plugin';
|
} from 'flipper-plugin';
|
||||||
import {useHotkeys} from 'react-hotkeys-hook';
|
import {useHotkeys} from 'react-hotkeys-hook';
|
||||||
import {Id, Metadata, MetadataId, UINode} from '../types';
|
import {Id, Metadata, MetadataId, UINode} from '../ClientTypes';
|
||||||
import {PerfStats} from './PerfStats';
|
import {PerfStats} from './PerfStats';
|
||||||
import {Visualization2D} from './Visualization2D';
|
import {Visualization2D} from './Visualization2D';
|
||||||
import {Inspector} from './sidebar/Inspector';
|
import {Inspector} from './sidebar/Inspector';
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import {
|
|||||||
usePlugin,
|
usePlugin,
|
||||||
useValue,
|
useValue,
|
||||||
} from 'flipper-plugin';
|
} from 'flipper-plugin';
|
||||||
import {Id, Metadata, MetadataId, UINode} from '../../types';
|
import {Id, Metadata, MetadataId, UINode} from '../../ClientTypes';
|
||||||
import {IdentityInspector} from './inspector/IdentityInspector';
|
import {IdentityInspector} from './inspector/IdentityInspector';
|
||||||
import {AttributesInspector} from './inspector/AttributesInspector';
|
import {AttributesInspector} from './inspector/AttributesInspector';
|
||||||
import {Tooltip} from 'antd';
|
import {Tooltip} from 'antd';
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import {
|
|||||||
Metadata,
|
Metadata,
|
||||||
MetadataId,
|
MetadataId,
|
||||||
UINode,
|
UINode,
|
||||||
} from '../../../types';
|
} from '../../../ClientTypes';
|
||||||
import {DataInspector, Panel, styled} from 'flipper-plugin';
|
import {DataInspector, Panel, styled} from 'flipper-plugin';
|
||||||
import {Col, Row} from 'antd';
|
import {Col, Row} from 'antd';
|
||||||
import {displayableName} from '../utilities/displayableName';
|
import {displayableName} from '../utilities/displayableName';
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {Bounds} from '../../../types';
|
import {Bounds} from '../../../ClientTypes';
|
||||||
import {InspectorStyle} from './Styles';
|
import {InspectorStyle} from './Styles';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {Col, Popover, Row} from 'antd';
|
import {Col, Popover, Row} from 'antd';
|
||||||
import {Color} from '../../../types';
|
import {Color} from '../../../ClientTypes';
|
||||||
import {SketchPicker, ColorResult} from 'react-color';
|
import {SketchPicker, ColorResult} from 'react-color';
|
||||||
import {styled} from 'flipper-plugin';
|
import {styled} from 'flipper-plugin';
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {Coordinate3D} from '../../../types';
|
import {Coordinate3D} from '../../../ClientTypes';
|
||||||
import {Col, Row} from 'antd';
|
import {Col, Row} from 'antd';
|
||||||
import {
|
import {
|
||||||
CenteredContentStyle,
|
CenteredContentStyle,
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {Coordinate} from '../../../types';
|
import {Coordinate} from '../../../ClientTypes';
|
||||||
import {Col, Row} from 'antd';
|
import {Col, Row} from 'antd';
|
||||||
import {
|
import {
|
||||||
CenteredContentStyle,
|
CenteredContentStyle,
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {UINode} from '../../../types';
|
import {UINode} from '../../../ClientTypes';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
node: UINode;
|
node: UINode;
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
import {Button} from 'antd';
|
import {Button} from 'antd';
|
||||||
import {theme, TimelineDataDescription} from 'flipper-plugin';
|
import {theme, TimelineDataDescription} from 'flipper-plugin';
|
||||||
import {FrameworkEvent, UINode} from '../../../types';
|
import {FrameworkEvent, UINode} from '../../../ClientTypes';
|
||||||
import React, {ReactNode, useState} from 'react';
|
import React, {ReactNode, useState} from 'react';
|
||||||
import {StackTraceInspector} from './StackTraceInspector';
|
import {StackTraceInspector} from './StackTraceInspector';
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {Col, Row} from 'antd';
|
import {Col, Row} from 'antd';
|
||||||
import {UINode} from '../../../types';
|
import {UINode} from '../../../ClientTypes';
|
||||||
import {styled, theme} from 'flipper-plugin';
|
import {styled, theme} from 'flipper-plugin';
|
||||||
import {CodeInspector} from './fb-stubs/CodeInspector';
|
import {CodeInspector} from './fb-stubs/CodeInspector';
|
||||||
import {TopSpacedContainerStyle} from './Styles';
|
import {TopSpacedContainerStyle} from './Styles';
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {Size} from '../../../types';
|
import {Size} from '../../../ClientTypes';
|
||||||
import {Col, Row} from 'antd';
|
import {Col, Row} from 'antd';
|
||||||
import {
|
import {
|
||||||
CenteredContentStyle,
|
CenteredContentStyle,
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {SpaceBox} from '../../../types';
|
import {SpaceBox} from '../../../ClientTypes';
|
||||||
import {InspectorStyle} from './Styles';
|
import {InspectorStyle} from './Styles';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
// eslint-disable-next-line rulesdir/no-restricted-imports-clone
|
// eslint-disable-next-line rulesdir/no-restricted-imports-clone
|
||||||
import {StackTrace} from 'flipper';
|
import {StackTrace} from 'flipper';
|
||||||
import {Tag} from '../../../types';
|
import {Tag} from '../../../ClientTypes';
|
||||||
|
|
||||||
const FacebookLibraries = ['Facebook'];
|
const FacebookLibraries = ['Facebook'];
|
||||||
const CKFilter = ['UIDCKAnalyticsListener'];
|
const CKFilter = ['UIDCKAnalyticsListener'];
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {Tag} from '../../../../types';
|
import {Tag} from '../../../../ClientTypes';
|
||||||
|
|
||||||
type CodeInspectorProps = {
|
type CodeInspectorProps = {
|
||||||
name: string;
|
name: string;
|
||||||
|
|||||||
@@ -8,7 +8,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import {DeviceOS} from 'flipper-plugin';
|
import {DeviceOS} from 'flipper-plugin';
|
||||||
import {Id, Metadata, StreamInterceptor, UINode} from '../types';
|
import {Id, Metadata, UINode} from '../ClientTypes';
|
||||||
|
import {StreamInterceptor} from '../DesktopTypes';
|
||||||
|
|
||||||
export function getStreamInterceptor(_: DeviceOS): StreamInterceptor {
|
export function getStreamInterceptor(_: DeviceOS): StreamInterceptor {
|
||||||
return new NoOpStreamInterceptor();
|
return new NoOpStreamInterceptor();
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
* @format
|
* @format
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {Atom} from 'flipper-plugin';
|
|
||||||
import {useEffect, useRef, useState} from 'react';
|
import {useEffect, useRef, useState} from 'react';
|
||||||
|
|
||||||
export function useDelay(delayTimeMs: number) {
|
export function useDelay(delayTimeMs: number) {
|
||||||
|
|||||||
@@ -22,17 +22,19 @@ import {
|
|||||||
Id,
|
Id,
|
||||||
Metadata,
|
Metadata,
|
||||||
MetadataId,
|
MetadataId,
|
||||||
NodeSelection,
|
|
||||||
PerformanceStatsEvent,
|
PerformanceStatsEvent,
|
||||||
SelectionSource,
|
|
||||||
SnapshotInfo,
|
SnapshotInfo,
|
||||||
|
UINode,
|
||||||
|
} from './ClientTypes';
|
||||||
|
import {
|
||||||
|
UIState,
|
||||||
|
NodeSelection,
|
||||||
|
SelectionSource,
|
||||||
StreamInterceptorError,
|
StreamInterceptorError,
|
||||||
StreamState,
|
StreamState,
|
||||||
UIActions,
|
UIActions,
|
||||||
UINode,
|
|
||||||
UIState,
|
|
||||||
ViewMode,
|
ViewMode,
|
||||||
} from './types';
|
} from './DesktopTypes';
|
||||||
import {Draft} from 'immer';
|
import {Draft} from 'immer';
|
||||||
import {tracker} from './utils/tracker';
|
import {tracker} from './utils/tracker';
|
||||||
import {getStreamInterceptor} from './fb-stubs/StreamInterceptor';
|
import {getStreamInterceptor} from './fb-stubs/StreamInterceptor';
|
||||||
@@ -531,4 +533,4 @@ function collapseinActiveChildren(node: UINode, expandedNodes: Draft<Set<Id>>) {
|
|||||||
const HighlightTime = 300;
|
const HighlightTime = 300;
|
||||||
|
|
||||||
export {Component} from './components/main';
|
export {Component} from './components/main';
|
||||||
export * from './types';
|
export * from './ClientTypes';
|
||||||
|
|||||||
@@ -7,7 +7,12 @@
|
|||||||
* @format
|
* @format
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {Inspectable, InspectableObject, Metadata, MetadataId} from '../types';
|
import {
|
||||||
|
Inspectable,
|
||||||
|
InspectableObject,
|
||||||
|
Metadata,
|
||||||
|
MetadataId,
|
||||||
|
} from '../ClientTypes';
|
||||||
|
|
||||||
function transformAny(
|
function transformAny(
|
||||||
metadata: Map<MetadataId, Metadata>,
|
metadata: Map<MetadataId, Metadata>,
|
||||||
|
|||||||
@@ -8,8 +8,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import {getFlipperLib} from 'flipper-plugin';
|
import {getFlipperLib} from 'flipper-plugin';
|
||||||
import {SelectionSource} from '..';
|
|
||||||
import {FrameworkEventType, Tag} from '../types';
|
import {FrameworkEventType, Tag} from '../ClientTypes';
|
||||||
|
import {SelectionSource} from '../DesktopTypes';
|
||||||
|
|
||||||
const UI_DEBUGGER_IDENTIFIER = 'ui-debugger';
|
const UI_DEBUGGER_IDENTIFIER = 'ui-debugger';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user