import * as React from "react"; import type { FileTree, FileTreeNode } from "./file-tree"; import type { NodePlugin } from "./use-node-plugins"; /** * A React component that renders a node in a file tree with plugins. The * `` component uses this under the hood. * * @param props - Node props */ export declare function Node(props: NodeProps): React.ReactElement, string | React.JSXElementConstructor>; /** * A plugin that creates and memoizes node-specific props. * * @param fileTree - A file tree * @param config - Props to generate exploration node-specific props from */ export declare function useNode(fileTree: FileTree, config: UseNodeConfig): { didChange: import("./tree/subject").Subject; getProps(): React.HTMLAttributes; }; export interface NodeProps { /** * Render the node as this component * * @default "div" */ as?: React.ComponentType>; /** * A file tree node */ node: FileTreeNode; /** * The index of the node within the file tree list of visible nodes */ index: number; /** * The file tree that contains the node */ tree: FileTree; /** * A list of plugins to apply to the node. For example `useTraits()`. */ plugins?: NodePlugin[]; /** * Styles to apply to the `
` element */ style: React.CSSProperties; /** * Children to render within the node */ children: React.ReactNode; } export declare type UseNodeConfig = Pick, "node" | "index" | "style">;