export type { TreeNode } from './createTree.svelte'; import { type EditorDir } from './editor-contract'; import { type TreeNode, type TreeDropPosition } from './createTree.svelte'; type Props = { nodes: ReadonlyArray; /** Selected node id (single-select highlight). */ selected?: string | null; onSelect?: (id: string) => void; /** Initially/controlled expanded ids. */ expandedIds?: string[]; onToggle?: (id: string, expanded: boolean) => void; /** Show cascading checkboxes; `checked` is the set of checked ids. */ checkable?: boolean; checked?: string[]; onCheck?: (ids: string[]) => void; ariaLabel?: string; /** Text direction (rtl mirrors indentation + flips Left/Right keys). */ dir?: EditorDir; /** Window rows (render only visible) - for large trees. Needs `height`. */ virtual?: boolean; /** Row height in px - a number, or a per-node function for variable * heights. Must match the rendered row height. Default 30. */ rowHeight?: number | ((node: TreeNode, index: number) => number); /** Scroll-viewport height in px. Enables scrolling (required for `virtual`). */ height?: number; /** Load a lazy node's children on first expand (node has `lazy: true`). */ loadChildren?: (node: TreeNode) => Promise; /** Filter query - show only matching nodes + ancestors, auto-expanded. */ filter?: string; /** Render a built-in search box that drives the filter. */ searchable?: boolean; searchPlaceholder?: string; /** Placeholder row shown under a lazy node while its children load * (localization). */ loadingText?: string; /** Accessible name for the search box's clear button (localization). */ clearSearchLabel?: string; /** Sort siblings by label ('asc'/'desc') or a custom comparator. */ sort?: 'asc' | 'desc' | ((a: TreeNode, b: TreeNode) => number); /** Allow inline rename (double-click or F2). Fires onRename. */ editable?: boolean; onRename?: (id: string, label: string) => void; /** Allow drag-drop reordering; fires onMove(dragId, targetId, position). * Apply it with the exported `moveTreeNode(nodes, ...)` helper. */ reorderable?: boolean; onMove?: (dragId: string, targetId: string, position: TreeDropPosition) => void; }; declare const SvTree: import("svelte").Component; type SvTree = ReturnType; export default SvTree;