UNPKG

flipper-plugin

Version:

Flipper Desktop plugin SDK and components

73 lines 2.12 kB
/** * 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 { Component } from 'react'; import { DecorateRow, ContextMenuExtension } from './elements'; export type ElementID = string; export type ElementSearchResultSet = { query: string; matches: Set<ElementID>; }; export type ElementData = { [name: string]: { [key: string]: string | number | boolean | { __type__: string; value: any; }; }; }; export type ElementAttribute = { name: string; value: string; }; export type ElementExtraInfo = { linkedNode?: string; expandWithParent?: boolean; linkedTree?: string; metaData?: { [key: string]: any; }; }; export type Element = { id: ElementID; name: string; expanded: boolean; children: Array<ElementID>; attributes: Array<ElementAttribute>; data: ElementData; decoration: string; extraInfo: ElementExtraInfo; }; export type ElementsInspectorProps = { onElementExpanded: (key: ElementID, deep: boolean) => void; onElementSelected: (key: ElementID) => void; onElementHovered: ((key: ElementID | undefined | null) => any) | undefined | null; selected: ElementID | undefined | null; focused?: ElementID | undefined | null; searchResults?: ElementSearchResultSet | undefined | null; root: ElementID | undefined | null; elements: { [key: string]: Element; }; useAppSidebar?: boolean; alternateRowColor?: boolean; contextMenuExtensions?: () => Array<ContextMenuExtension>; decorateRow?: DecorateRow; /** * By default the ElementsInspector takes all available space and is scrollab.e */ scrollable?: boolean; }; export declare class ElementsInspector extends Component<ElementsInspectorProps> { static defaultProps: { alternateRowColor: boolean; scrollable: boolean; }; render(): JSX.Element; } //# sourceMappingURL=ElementsInspector.d.ts.map