@djangocfg/ui-tools 2.1.315 → 2.1.317
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/TreeRoot-R6XVHYQK.mjs +4 -0
- package/dist/{TreeRoot-DO33TIS5.mjs.map → TreeRoot-R6XVHYQK.mjs.map} +1 -1
- package/dist/TreeRoot-RAMQSBMO.cjs +19 -0
- package/dist/{TreeRoot-NJOZ2DMV.cjs.map → TreeRoot-RAMQSBMO.cjs.map} +1 -1
- package/dist/{chunk-MA552EWC.cjs → chunk-44ZTWYAF.cjs} +139 -111
- package/dist/chunk-44ZTWYAF.cjs.map +1 -0
- package/dist/chunk-KR6B3LVY.mjs +59 -0
- package/dist/chunk-KR6B3LVY.mjs.map +1 -0
- package/dist/{chunk-E5BP4IXF.mjs → chunk-NTJL2SXK.mjs} +139 -111
- package/dist/chunk-NTJL2SXK.mjs.map +1 -0
- package/dist/chunk-YXBOAGIM.cjs +63 -0
- package/dist/chunk-YXBOAGIM.cjs.map +1 -0
- package/dist/file-icon/index.cjs +117 -0
- package/dist/file-icon/index.cjs.map +1 -0
- package/dist/file-icon/index.d.cts +69 -0
- package/dist/file-icon/index.d.ts +69 -0
- package/dist/file-icon/index.mjs +112 -0
- package/dist/file-icon/index.mjs.map +1 -0
- package/dist/index.cjs +140 -180
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -433
- package/dist/index.d.ts +5 -433
- package/dist/index.mjs +7 -56
- package/dist/index.mjs.map +1 -1
- package/dist/tree/index.cjs +152 -0
- package/dist/tree/index.cjs.map +1 -0
- package/dist/tree/index.d.cts +278 -0
- package/dist/tree/index.d.ts +278 -0
- package/dist/tree/index.mjs +5 -0
- package/dist/tree/index.mjs.map +1 -0
- package/dist/types-Cclwv4Hl.d.cts +198 -0
- package/dist/types-Cclwv4Hl.d.ts +198 -0
- package/package.json +16 -10
- package/src/tools/FileIcon/FileIcon.tsx +91 -0
- package/src/tools/FileIcon/index.ts +9 -0
- package/src/tools/FileIcon/loader.ts +47 -0
- package/src/tools/FileIcon/treeAdapter.tsx +41 -0
- package/src/tools/Tree/README.md +56 -0
- package/src/tools/Tree/Tree.story.tsx +48 -0
- package/src/tools/Tree/TreeRoot.tsx +15 -5
- package/src/tools/Tree/components/TreeRow.tsx +17 -18
- package/src/tools/Tree/context/TreeContext.tsx +10 -2
- package/src/tools/Tree/hooks/useTreeKeyboard.ts +133 -99
- package/src/tools/Tree/index.tsx +2 -0
- package/src/tools/Tree/types.ts +36 -2
- package/dist/TreeRoot-DO33TIS5.mjs +0 -4
- package/dist/TreeRoot-NJOZ2DMV.cjs +0 -19
- package/dist/chunk-E5BP4IXF.mjs.map +0 -1
- package/dist/chunk-MA552EWC.cjs.map +0 -1
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { b as TreeRootProps, f as TreeItemId, T as TreeNode, F as FlatRow, o as TreeActivateOptions, g as TreeLabels, R as ResolvedAppearance, h as TreeSelectionMode, p as TreeActivationMode, a as TreeRowSlot, e as TreeContextMenuSlot } from '../types-Cclwv4Hl.js';
|
|
3
|
+
export { c as DEFAULT_TREE_APPEARANCE, D as DEFAULT_TREE_LABELS, m as TreeAccentIntensity, k as TreeAppearance, l as TreeDensity, j as TreeLoadChildren, n as TreeRadius, i as TreeRowRenderProps, d as appearanceToStyle, r as resolveAppearance } from '../types-Cclwv4Hl.js';
|
|
4
|
+
import * as React$1 from 'react';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* High-level entry point. Wraps Provider + (optional) search bar + content.
|
|
8
|
+
*
|
|
9
|
+
* For full control, compose with <TreeProvider>, <TreeContent>,
|
|
10
|
+
* <TreeSearchInput>, <TreeRow>, etc. directly from `@djangocfg/ui-tools/tree`.
|
|
11
|
+
*/
|
|
12
|
+
declare function TreeRoot<T>(props: TreeRootProps<T>): react_jsx_runtime.JSX.Element;
|
|
13
|
+
|
|
14
|
+
type ChildEntryStatus = 'idle' | 'loading' | 'loaded' | 'error';
|
|
15
|
+
interface ChildEntry<T> {
|
|
16
|
+
status: ChildEntryStatus;
|
|
17
|
+
children: TreeNode<T>[];
|
|
18
|
+
error?: string;
|
|
19
|
+
}
|
|
20
|
+
type ChildCache<T> = Map<TreeItemId, ChildEntry<T>>;
|
|
21
|
+
declare const createChildCache: <T>() => ChildCache<T>;
|
|
22
|
+
/**
|
|
23
|
+
* Resolve a node's children for the current render.
|
|
24
|
+
*
|
|
25
|
+
* - If the node carries inline `children`, those win (no async fetch).
|
|
26
|
+
* - Otherwise we look in the cache.
|
|
27
|
+
*
|
|
28
|
+
* Returns `null` when nothing is loaded yet (caller may show a skeleton).
|
|
29
|
+
*/
|
|
30
|
+
declare const resolveChildren: <T>(cache: ChildCache<T>, node: TreeNode<T>) => {
|
|
31
|
+
children: TreeNode<T>[] | null;
|
|
32
|
+
status: ChildEntryStatus;
|
|
33
|
+
error?: string;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
interface TreeContextValue<T> {
|
|
37
|
+
expanded: ReadonlySet<TreeItemId>;
|
|
38
|
+
selected: ReadonlySet<TreeItemId>;
|
|
39
|
+
focused: TreeItemId | null;
|
|
40
|
+
query: string;
|
|
41
|
+
flatRows: FlatRow<T>[];
|
|
42
|
+
/** Search-matching node ids (subset of all flatRows). */
|
|
43
|
+
matchingIds: ReadonlySet<TreeItemId>;
|
|
44
|
+
expand: (id: TreeItemId) => void;
|
|
45
|
+
collapse: (id: TreeItemId) => void;
|
|
46
|
+
toggle: (id: TreeItemId) => void;
|
|
47
|
+
expandAll: () => void;
|
|
48
|
+
collapseAll: () => void;
|
|
49
|
+
select: (id: TreeItemId) => void;
|
|
50
|
+
setSelectedIds: (ids: TreeItemId[]) => void;
|
|
51
|
+
clearSelection: () => void;
|
|
52
|
+
setFocus: (id: TreeItemId | null) => void;
|
|
53
|
+
setQuery: (q: string) => void;
|
|
54
|
+
refresh: (id: TreeItemId) => Promise<void>;
|
|
55
|
+
refreshAll: () => Promise<void>;
|
|
56
|
+
activate: (node: TreeNode<T>, opts?: TreeActivateOptions) => void;
|
|
57
|
+
labels: TreeLabels;
|
|
58
|
+
/** Resolved cosmetic config — never null. */
|
|
59
|
+
appearance: ResolvedAppearance;
|
|
60
|
+
/** Convenience alias for `appearance.indent`. */
|
|
61
|
+
indent: number;
|
|
62
|
+
selectionMode: TreeSelectionMode;
|
|
63
|
+
activationMode: TreeActivationMode;
|
|
64
|
+
enableSearch: boolean;
|
|
65
|
+
showIndentGuides: boolean;
|
|
66
|
+
getItemName: (node: TreeNode<T>) => string;
|
|
67
|
+
renderIcon?: TreeRowSlot<T>;
|
|
68
|
+
renderLabel?: TreeRowSlot<T>;
|
|
69
|
+
renderActions?: TreeRowSlot<T>;
|
|
70
|
+
renderContextMenu?: TreeContextMenuSlot<T>;
|
|
71
|
+
}
|
|
72
|
+
declare function useTreeContext<T>(): TreeContextValue<T>;
|
|
73
|
+
interface TreeProviderProps<T> extends Pick<TreeRootProps<T>, 'data' | 'getItemName' | 'loadChildren' | 'selectionMode' | 'activationMode' | 'initialExpandedIds' | 'initialSelectedIds' | 'indent' | 'appearance' | 'onSelectionChange' | 'onExpansionChange' | 'onActivate' | 'enableSearch' | 'showIndentGuides' | 'renderIcon' | 'renderLabel' | 'renderActions' | 'renderContextMenu' | 'labels' | 'persistKey' | 'persistSelection'> {
|
|
74
|
+
children: React$1.ReactNode;
|
|
75
|
+
}
|
|
76
|
+
declare function TreeProvider<T>(props: TreeProviderProps<T>): react_jsx_runtime.JSX.Element;
|
|
77
|
+
|
|
78
|
+
declare function useTreeLabels(): TreeLabels;
|
|
79
|
+
declare function useTreeRows<T>(): FlatRow<T>[];
|
|
80
|
+
declare function useTreeSelection<T>(): {
|
|
81
|
+
selectedIds: string[];
|
|
82
|
+
select: (id: TreeItemId) => void;
|
|
83
|
+
setSelectedIds: (ids: TreeItemId[]) => void;
|
|
84
|
+
clear: () => void;
|
|
85
|
+
isSelected: (id: TreeItemId) => boolean;
|
|
86
|
+
};
|
|
87
|
+
declare function useTreeExpansion<T>(): {
|
|
88
|
+
expandedIds: string[];
|
|
89
|
+
expand: (id: TreeItemId) => void;
|
|
90
|
+
collapse: (id: TreeItemId) => void;
|
|
91
|
+
toggle: (id: TreeItemId) => void;
|
|
92
|
+
expandAll: () => void;
|
|
93
|
+
collapseAll: () => void;
|
|
94
|
+
isExpanded: (id: TreeItemId) => boolean;
|
|
95
|
+
};
|
|
96
|
+
declare function useTreeFocus<T>(): {
|
|
97
|
+
focusedId: string;
|
|
98
|
+
setFocus: (id: TreeItemId | null) => void;
|
|
99
|
+
};
|
|
100
|
+
declare function useTreeSearch<T>(): {
|
|
101
|
+
isOpen: boolean;
|
|
102
|
+
query: string;
|
|
103
|
+
setQuery: (q: string) => void;
|
|
104
|
+
matchingIds: ReadonlySet<string>;
|
|
105
|
+
matchCount: number;
|
|
106
|
+
};
|
|
107
|
+
declare function useTreeActions<T>(): {
|
|
108
|
+
expand: (id: TreeItemId) => void;
|
|
109
|
+
collapse: (id: TreeItemId) => void;
|
|
110
|
+
toggle: (id: TreeItemId) => void;
|
|
111
|
+
expandAll: () => void;
|
|
112
|
+
collapseAll: () => void;
|
|
113
|
+
refresh: (id: TreeItemId) => Promise<void>;
|
|
114
|
+
refreshAll: () => Promise<void>;
|
|
115
|
+
activate: (node: TreeNode<T>, opts?: TreeActivateOptions) => void;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
interface UseTreeTypeAheadOptions<T> {
|
|
119
|
+
/** Visible flat rows in render order. */
|
|
120
|
+
rows: FlatRow<T>[];
|
|
121
|
+
/** How to read the displayed name of a node (matched case-insensitively). */
|
|
122
|
+
getItemName: (node: TreeNode<T>) => string;
|
|
123
|
+
/** Element receiving keydown events. */
|
|
124
|
+
containerRef: React.RefObject<HTMLElement | null>;
|
|
125
|
+
/** Called with the matched node id so the consumer can focus / scroll. */
|
|
126
|
+
onMatch: (id: string) => void;
|
|
127
|
+
/** Disable without removing the call site. */
|
|
128
|
+
enabled?: boolean;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Type-ahead jump (Finder / VSCode style).
|
|
132
|
+
*
|
|
133
|
+
* Builds a rolling buffer of printable keys (within ~600 ms of each other)
|
|
134
|
+
* and notifies the consumer of the first row whose name starts with that
|
|
135
|
+
* prefix. Resets on Esc / Enter / navigation keys / timeout.
|
|
136
|
+
*/
|
|
137
|
+
declare function useTreeTypeAhead<T>({ rows, getItemName, containerRef, onMatch, enabled, }: UseTreeTypeAheadOptions<T>): void;
|
|
138
|
+
|
|
139
|
+
interface UseTreeKeyboardOptions<T> {
|
|
140
|
+
rows: FlatRow<T>[];
|
|
141
|
+
focusedId: TreeItemId | null;
|
|
142
|
+
enabled?: boolean;
|
|
143
|
+
onFocus: (id: TreeItemId) => void;
|
|
144
|
+
onSelect: (id: TreeItemId) => void;
|
|
145
|
+
onActivate: (id: TreeItemId) => void;
|
|
146
|
+
onExpand: (id: TreeItemId) => void;
|
|
147
|
+
onCollapse: (id: TreeItemId) => void;
|
|
148
|
+
onClearSelection: () => void;
|
|
149
|
+
}
|
|
150
|
+
interface UseTreeKeyboardReturn {
|
|
151
|
+
/** Attach to the tree container. Hotkeys only fire when focus is inside. */
|
|
152
|
+
ref: (instance: HTMLElement | null) => void;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Standard tree keyboard navigation, scoped to the container ref.
|
|
156
|
+
*
|
|
157
|
+
* - ↑ / ↓ : prev / next visible row
|
|
158
|
+
* - Home / End : first / last visible row
|
|
159
|
+
* - → : expand folder; if already expanded, jump to first child
|
|
160
|
+
* - ← : collapse folder; if already collapsed (or leaf), jump to parent
|
|
161
|
+
* - Enter / Space : activate (folder => toggle, leaf => onActivate)
|
|
162
|
+
* - Esc : clear selection
|
|
163
|
+
*
|
|
164
|
+
* Built on `useHotkey` (react-hotkeys-hook) — focus gating is automatic; no
|
|
165
|
+
* manual `addEventListener` or `data-scope` juggling.
|
|
166
|
+
*/
|
|
167
|
+
declare function useTreeKeyboard<T>({ rows, focusedId, enabled, onFocus, onSelect, onActivate, onExpand, onCollapse, onClearSelection, }: UseTreeKeyboardOptions<T>): UseTreeKeyboardReturn;
|
|
168
|
+
|
|
169
|
+
interface TreeChevronProps {
|
|
170
|
+
isExpanded: boolean;
|
|
171
|
+
isFolder: boolean;
|
|
172
|
+
className?: string;
|
|
173
|
+
}
|
|
174
|
+
declare function TreeChevron({ isExpanded, isFolder, className }: TreeChevronProps): react_jsx_runtime.JSX.Element;
|
|
175
|
+
|
|
176
|
+
interface TreeIconProps {
|
|
177
|
+
isFolder: boolean;
|
|
178
|
+
isExpanded: boolean;
|
|
179
|
+
className?: string;
|
|
180
|
+
}
|
|
181
|
+
declare function TreeIcon({ isFolder, isExpanded, className }: TreeIconProps): react_jsx_runtime.JSX.Element;
|
|
182
|
+
|
|
183
|
+
interface TreeLabelProps {
|
|
184
|
+
children: React.ReactNode;
|
|
185
|
+
isMatchingSearch?: boolean;
|
|
186
|
+
className?: string;
|
|
187
|
+
}
|
|
188
|
+
declare function TreeLabel({ children, isMatchingSearch, className }: TreeLabelProps): react_jsx_runtime.JSX.Element;
|
|
189
|
+
|
|
190
|
+
interface TreeRowProps<T> {
|
|
191
|
+
row: FlatRow<T>;
|
|
192
|
+
className?: string;
|
|
193
|
+
}
|
|
194
|
+
declare function TreeRow<T>({ row, className }: TreeRowProps<T>): react_jsx_runtime.JSX.Element;
|
|
195
|
+
|
|
196
|
+
interface TreeContentProps<T> {
|
|
197
|
+
/** Custom row renderer; falls back to <TreeRow />. */
|
|
198
|
+
children?: TreeRowSlot<T>;
|
|
199
|
+
className?: string;
|
|
200
|
+
/** Override aria-label for the container. */
|
|
201
|
+
ariaLabel?: string;
|
|
202
|
+
}
|
|
203
|
+
declare function TreeContent<T>({ children, className, ariaLabel }: TreeContentProps<T>): react_jsx_runtime.JSX.Element;
|
|
204
|
+
|
|
205
|
+
interface TreeSearchInputProps {
|
|
206
|
+
className?: string;
|
|
207
|
+
showMatches?: boolean;
|
|
208
|
+
}
|
|
209
|
+
declare function TreeSearchInput({ className, showMatches }: TreeSearchInputProps): react_jsx_runtime.JSX.Element;
|
|
210
|
+
|
|
211
|
+
interface TreeEmptyProps {
|
|
212
|
+
children: React.ReactNode;
|
|
213
|
+
className?: string;
|
|
214
|
+
}
|
|
215
|
+
declare function TreeEmpty({ children, className }: TreeEmptyProps): react_jsx_runtime.JSX.Element;
|
|
216
|
+
|
|
217
|
+
interface TreeSkeletonProps {
|
|
218
|
+
rows?: number;
|
|
219
|
+
className?: string;
|
|
220
|
+
}
|
|
221
|
+
declare function TreeSkeleton({ rows, className }: TreeSkeletonProps): react_jsx_runtime.JSX.Element;
|
|
222
|
+
|
|
223
|
+
interface TreeErrorProps {
|
|
224
|
+
children: React.ReactNode;
|
|
225
|
+
className?: string;
|
|
226
|
+
}
|
|
227
|
+
declare function TreeError({ children, className }: TreeErrorProps): react_jsx_runtime.JSX.Element;
|
|
228
|
+
|
|
229
|
+
interface TreeIndentGuidesProps {
|
|
230
|
+
level: number;
|
|
231
|
+
indent: number;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Vertical guide lines under nested rows. Renders one absolute-positioned
|
|
235
|
+
* 1px column per ancestor level. Decorative — `aria-hidden` and
|
|
236
|
+
* pointer-events disabled. Opacity comes from the tree appearance.
|
|
237
|
+
*/
|
|
238
|
+
declare function TreeIndentGuides({ level, indent }: TreeIndentGuidesProps): react_jsx_runtime.JSX.Element;
|
|
239
|
+
|
|
240
|
+
interface FlattenInput<T> {
|
|
241
|
+
roots: TreeNode<T>[];
|
|
242
|
+
expandedIds: ReadonlySet<TreeItemId>;
|
|
243
|
+
cache: ChildCache<T>;
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Walk the tree top-to-bottom and produce a flat list of visible rows.
|
|
247
|
+
*
|
|
248
|
+
* Visibility rule: a child row appears only when every ancestor is in
|
|
249
|
+
* `expandedIds`. The output is ordered exactly as it should render,
|
|
250
|
+
* which keeps keyboard navigation (next/prev row) trivial.
|
|
251
|
+
*/
|
|
252
|
+
declare function flattenTree<T>({ roots, expandedIds, cache }: FlattenInput<T>): FlatRow<T>[];
|
|
253
|
+
|
|
254
|
+
interface PersistedTreeState {
|
|
255
|
+
expandedItems: TreeItemId[];
|
|
256
|
+
selectedItems: TreeItemId[];
|
|
257
|
+
}
|
|
258
|
+
declare function loadTreeState(key: string): PersistedTreeState | null;
|
|
259
|
+
declare function saveTreeState(key: string, state: PersistedTreeState): void;
|
|
260
|
+
declare function clearTreeState(key: string): void;
|
|
261
|
+
|
|
262
|
+
interface DemoNode {
|
|
263
|
+
name: string;
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Build a deterministic synthetic tree for stories and tests.
|
|
267
|
+
*
|
|
268
|
+
* @example
|
|
269
|
+
* const data = createDemoTree({ depth: 4, breadth: 3 });
|
|
270
|
+
* <TreeRoot data={data} getItemName={(n) => n.data.name} />
|
|
271
|
+
*/
|
|
272
|
+
declare function createDemoTree({ depth, breadth, rootPrefix, }?: {
|
|
273
|
+
depth?: number;
|
|
274
|
+
breadth?: number;
|
|
275
|
+
rootPrefix?: string;
|
|
276
|
+
}): TreeNode<DemoNode>[];
|
|
277
|
+
|
|
278
|
+
export { type ChildCache, type ChildEntry, type ChildEntryStatus, type DemoNode, FlatRow, type FlattenInput, type PersistedTreeState, ResolvedAppearance, TreeRoot as Tree, TreeActivateOptions, TreeActivationMode, TreeChevron, type TreeChevronProps, TreeContent, type TreeContentProps, TreeContextMenuSlot, type TreeContextValue, TreeEmpty, type TreeEmptyProps, TreeError, type TreeErrorProps, TreeIcon, type TreeIconProps, TreeIndentGuides, type TreeIndentGuidesProps, TreeItemId, TreeLabel, type TreeLabelProps, TreeLabels, TreeNode, TreeProvider, type TreeProviderProps, TreeRoot, TreeRootProps, TreeRow, type TreeRowProps, TreeRowSlot, TreeSearchInput, type TreeSearchInputProps, TreeSelectionMode, TreeSkeleton, type TreeSkeletonProps, type UseTreeKeyboardOptions, type UseTreeTypeAheadOptions, clearTreeState, createChildCache, createDemoTree, TreeRoot as default, flattenTree, loadTreeState, resolveChildren, saveTreeState, useTreeActions, useTreeContext, useTreeExpansion, useTreeFocus, useTreeKeyboard, useTreeLabels, useTreeRows, useTreeSearch, useTreeSelection, useTreeTypeAhead };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { TreeError, TreeSkeleton, createDemoTree } from '../chunk-KR6B3LVY.mjs';
|
|
2
|
+
export { DEFAULT_TREE_APPEARANCE, DEFAULT_TREE_LABELS, TreeRoot as Tree, TreeChevron, TreeContent, TreeEmpty, TreeIcon, TreeIndentGuides, TreeLabel, TreeProvider, TreeRoot, TreeRow, TreeSearchInput, appearanceToStyle, clearTreeState, createChildCache, TreeRoot_default as default, flattenTree, loadTreeState, resolveAppearance, resolveChildren, saveTreeState, useTreeActions, useTreeContext, useTreeExpansion, useTreeFocus, useTreeKeyboard, useTreeLabels, useTreeRows, useTreeSearch, useTreeSelection, useTreeTypeAhead } from '../chunk-NTJL2SXK.mjs';
|
|
3
|
+
import '../chunk-CGILA3WO.mjs';
|
|
4
|
+
//# sourceMappingURL=index.mjs.map
|
|
5
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.mjs"}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
type TreeDensity = 'compact' | 'cozy' | 'comfortable';
|
|
4
|
+
type TreeAccentIntensity = 'subtle' | 'default' | 'strong';
|
|
5
|
+
type TreeRadius = 'none' | 'sm' | 'md';
|
|
6
|
+
/**
|
|
7
|
+
* Cosmetic configuration. Every field is optional; missing values fall
|
|
8
|
+
* back to the `cozy` preset (a comfortable VSCode-Explorer-like density).
|
|
9
|
+
*
|
|
10
|
+
* Customize the look without re-implementing slots.
|
|
11
|
+
*/
|
|
12
|
+
interface TreeAppearance {
|
|
13
|
+
/** Built-in size preset. Default: `'cozy'`. */
|
|
14
|
+
density?: TreeDensity;
|
|
15
|
+
/** Override row height in px (wins over density). */
|
|
16
|
+
rowHeight?: number;
|
|
17
|
+
/** Override icon + chevron size in px (wins over density). */
|
|
18
|
+
iconSize?: number;
|
|
19
|
+
/** Lucide stroke width for icon + chevron. Default: 1.5. */
|
|
20
|
+
iconStrokeWidth?: number;
|
|
21
|
+
/** Override label font size in px (wins over density). */
|
|
22
|
+
fontSize?: number;
|
|
23
|
+
/** Pixels between chevron / icon / label. Default depends on density. */
|
|
24
|
+
gap?: number;
|
|
25
|
+
/** Pixels between nesting levels. Default: 16. */
|
|
26
|
+
indent?: number;
|
|
27
|
+
/** Hover / selected highlight intensity. Default: `'default'`. */
|
|
28
|
+
accent?: TreeAccentIntensity;
|
|
29
|
+
/** Row corner radius. Default: `'sm'`. */
|
|
30
|
+
radius?: TreeRadius;
|
|
31
|
+
/** Indent-guide line opacity (0..1). Default: 0.4. */
|
|
32
|
+
indentGuideOpacity?: number;
|
|
33
|
+
/**
|
|
34
|
+
* Show a 2px primary-tinted bar on the left of the selected row.
|
|
35
|
+
* Mimics the VSCode active-tab indicator. Default: `true`.
|
|
36
|
+
*/
|
|
37
|
+
showActiveIndicator?: boolean;
|
|
38
|
+
}
|
|
39
|
+
interface ResolvedAppearance {
|
|
40
|
+
density: TreeDensity;
|
|
41
|
+
rowHeight: number;
|
|
42
|
+
iconSize: number;
|
|
43
|
+
iconStrokeWidth: number;
|
|
44
|
+
fontSize: number;
|
|
45
|
+
gap: number;
|
|
46
|
+
indent: number;
|
|
47
|
+
accent: TreeAccentIntensity;
|
|
48
|
+
radius: TreeRadius;
|
|
49
|
+
indentGuideOpacity: number;
|
|
50
|
+
showActiveIndicator: boolean;
|
|
51
|
+
}
|
|
52
|
+
declare const DEFAULT_TREE_APPEARANCE: ResolvedAppearance;
|
|
53
|
+
/**
|
|
54
|
+
* Merge a partial appearance with the default + density preset.
|
|
55
|
+
*
|
|
56
|
+
* Explicit numeric overrides (e.g. `rowHeight`) win over the density preset.
|
|
57
|
+
*/
|
|
58
|
+
declare function resolveAppearance(input?: TreeAppearance,
|
|
59
|
+
/** Outer `indent` prop (kept on TreeRoot for back-compat). */
|
|
60
|
+
outerIndent?: number): ResolvedAppearance;
|
|
61
|
+
/**
|
|
62
|
+
* Build the `style` object that exposes the resolved appearance to any
|
|
63
|
+
* descendant via CSS variables. Set on `<TreeRoot>`'s outer div.
|
|
64
|
+
*/
|
|
65
|
+
declare function appearanceToStyle(a: ResolvedAppearance): CSSProperties;
|
|
66
|
+
|
|
67
|
+
type TreeItemId = string;
|
|
68
|
+
/** A single node in the consumer's tree data. Generic over your payload. */
|
|
69
|
+
interface TreeNode<T = unknown> {
|
|
70
|
+
id: TreeItemId;
|
|
71
|
+
data: T;
|
|
72
|
+
/** Inline children. Omit (and provide a `loadChildren`) for async loading. */
|
|
73
|
+
children?: TreeNode<T>[];
|
|
74
|
+
/**
|
|
75
|
+
* Set to `true` to mark a node as a folder even when its `children` array
|
|
76
|
+
* is empty (e.g. an unloaded async folder). Default: derived from
|
|
77
|
+
* `Array.isArray(children)`.
|
|
78
|
+
*/
|
|
79
|
+
isFolder?: boolean;
|
|
80
|
+
/** Disable interaction. */
|
|
81
|
+
disabled?: boolean;
|
|
82
|
+
}
|
|
83
|
+
interface TreeLabels {
|
|
84
|
+
loading: string;
|
|
85
|
+
empty: string;
|
|
86
|
+
error: string;
|
|
87
|
+
searchPlaceholder: string;
|
|
88
|
+
searchMatches: (count: number) => string;
|
|
89
|
+
ariaLabel: string;
|
|
90
|
+
}
|
|
91
|
+
declare const DEFAULT_TREE_LABELS: TreeLabels;
|
|
92
|
+
type TreeSelectionMode = 'none' | 'single' | 'multiple';
|
|
93
|
+
/**
|
|
94
|
+
* How a node becomes "activated" (i.e. opened) on pointer interaction.
|
|
95
|
+
*
|
|
96
|
+
* - `'single-click'` (default): single click activates a leaf immediately;
|
|
97
|
+
* double-click also activates. Folders always toggle on single click.
|
|
98
|
+
* - `'double-click'`: single click only selects + focuses; double-click is
|
|
99
|
+
* required to activate. Mirrors classic file-manager behaviour.
|
|
100
|
+
* - `'single-click-preview'`: VSCode Explorer / Cursor behaviour. Single
|
|
101
|
+
* click activates with `{ preview: true }` (consumer renders a preview
|
|
102
|
+
* tab); double-click activates with `{ preview: false }` (pinned tab).
|
|
103
|
+
*
|
|
104
|
+
* Folders ignore this setting — they always toggle on single click and
|
|
105
|
+
* never call `onActivate`.
|
|
106
|
+
*/
|
|
107
|
+
type TreeActivationMode = 'single-click' | 'double-click' | 'single-click-preview';
|
|
108
|
+
interface TreeActivateOptions {
|
|
109
|
+
/**
|
|
110
|
+
* `true` when the activation came from a single click in
|
|
111
|
+
* `'single-click-preview'` mode. `false` for double-click and for
|
|
112
|
+
* non-preview modes. Consumers typically map this to a
|
|
113
|
+
* preview-tab vs pinned-tab distinction.
|
|
114
|
+
*/
|
|
115
|
+
preview: boolean;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Async loader: called the first time a folder is expanded with no inline
|
|
119
|
+
* `children`. Result is cached; concurrent expansions are de-duplicated.
|
|
120
|
+
*/
|
|
121
|
+
type TreeLoadChildren<T> = (node: TreeNode<T>) => Promise<TreeNode<T>[]>;
|
|
122
|
+
interface TreeRowRenderProps<T> {
|
|
123
|
+
node: TreeNode<T>;
|
|
124
|
+
level: number;
|
|
125
|
+
isSelected: boolean;
|
|
126
|
+
isExpanded: boolean;
|
|
127
|
+
isFocused: boolean;
|
|
128
|
+
isFolder: boolean;
|
|
129
|
+
isLoading: boolean;
|
|
130
|
+
isMatchingSearch: boolean;
|
|
131
|
+
}
|
|
132
|
+
type TreeRowSlot<T> = (props: TreeRowRenderProps<T>) => ReactNode;
|
|
133
|
+
type TreeContextMenuSlot<T> = (props: TreeRowRenderProps<T>, trigger: ReactNode) => ReactNode;
|
|
134
|
+
interface TreeRootProps<T> {
|
|
135
|
+
/** Root nodes. Top-level items are rendered directly (no synthetic root). */
|
|
136
|
+
data: TreeNode<T>[];
|
|
137
|
+
/** Returns the human-readable name for a node (used by search/type-ahead). */
|
|
138
|
+
getItemName: (node: TreeNode<T>) => string;
|
|
139
|
+
/** Async loader for folders without inline `children`. */
|
|
140
|
+
loadChildren?: TreeLoadChildren<T>;
|
|
141
|
+
/** Selection behaviour. Default: `'single'`. */
|
|
142
|
+
selectionMode?: TreeSelectionMode;
|
|
143
|
+
/** Pointer activation behaviour. Default: `'single-click'`. */
|
|
144
|
+
activationMode?: TreeActivationMode;
|
|
145
|
+
/** Initially expanded ids. */
|
|
146
|
+
initialExpandedIds?: TreeItemId[];
|
|
147
|
+
/** Initially selected ids. */
|
|
148
|
+
initialSelectedIds?: TreeItemId[];
|
|
149
|
+
/** Pixels of indent per nesting level. Default: 16. (Shortcut for `appearance.indent`.) */
|
|
150
|
+
indent?: number;
|
|
151
|
+
/** Cosmetic configuration: density, sizes, accent intensity, radius. */
|
|
152
|
+
appearance?: TreeAppearance;
|
|
153
|
+
/** Triggered when selection changes. */
|
|
154
|
+
onSelectionChange?: (selectedIds: TreeItemId[]) => void;
|
|
155
|
+
/** Triggered when expanded set changes. */
|
|
156
|
+
onExpansionChange?: (expandedIds: TreeItemId[]) => void;
|
|
157
|
+
/**
|
|
158
|
+
* Triggered when a leaf is activated (Enter / dblclick / click depending
|
|
159
|
+
* on `activationMode`). Folders never call this — they toggle instead.
|
|
160
|
+
*/
|
|
161
|
+
onActivate?: (node: TreeNode<T>, opts: TreeActivateOptions) => void;
|
|
162
|
+
/** Show built-in search input. Default: false. */
|
|
163
|
+
enableSearch?: boolean;
|
|
164
|
+
/** Type printable letters to jump to a matching name. Default: true. */
|
|
165
|
+
enableTypeAhead?: boolean;
|
|
166
|
+
/** Render vertical indent guides under expanded folders. Default: false. */
|
|
167
|
+
showIndentGuides?: boolean;
|
|
168
|
+
/** Custom row renderer. Falls back to the default <TreeRow />. */
|
|
169
|
+
renderRow?: TreeRowSlot<T>;
|
|
170
|
+
/** Replace default folder/file icon. */
|
|
171
|
+
renderIcon?: TreeRowSlot<T>;
|
|
172
|
+
/** Replace default label rendering. */
|
|
173
|
+
renderLabel?: TreeRowSlot<T>;
|
|
174
|
+
/** Right-side actions slot (per row). */
|
|
175
|
+
renderActions?: TreeRowSlot<T>;
|
|
176
|
+
/** Wrap each row in a context menu (right-click). Receives the row meta + trigger element. */
|
|
177
|
+
renderContextMenu?: TreeContextMenuSlot<T>;
|
|
178
|
+
/** Override built-in copy in your locale. */
|
|
179
|
+
labels?: Partial<TreeLabels>;
|
|
180
|
+
/** Persist expanded + (optional) selected ids in localStorage under this key. */
|
|
181
|
+
persistKey?: string;
|
|
182
|
+
/** Persist selection alongside expansion. Default: false. */
|
|
183
|
+
persistSelection?: boolean;
|
|
184
|
+
className?: string;
|
|
185
|
+
style?: React.CSSProperties;
|
|
186
|
+
}
|
|
187
|
+
/** Internal flat-row representation used by the renderer + keyboard nav. */
|
|
188
|
+
interface FlatRow<T> {
|
|
189
|
+
node: TreeNode<T>;
|
|
190
|
+
level: number;
|
|
191
|
+
parentId: TreeItemId | null;
|
|
192
|
+
isFolder: boolean;
|
|
193
|
+
isExpanded: boolean;
|
|
194
|
+
isLoading: boolean;
|
|
195
|
+
hasError: boolean;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export { DEFAULT_TREE_LABELS as D, type FlatRow as F, type ResolvedAppearance as R, type TreeNode as T, type TreeRowSlot as a, type TreeRootProps as b, DEFAULT_TREE_APPEARANCE as c, appearanceToStyle as d, type TreeContextMenuSlot as e, type TreeItemId as f, type TreeLabels as g, type TreeSelectionMode as h, type TreeRowRenderProps as i, type TreeLoadChildren as j, type TreeAppearance as k, type TreeDensity as l, type TreeAccentIntensity as m, type TreeRadius as n, type TreeActivateOptions as o, type TreeActivationMode as p, resolveAppearance as r };
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
type TreeDensity = 'compact' | 'cozy' | 'comfortable';
|
|
4
|
+
type TreeAccentIntensity = 'subtle' | 'default' | 'strong';
|
|
5
|
+
type TreeRadius = 'none' | 'sm' | 'md';
|
|
6
|
+
/**
|
|
7
|
+
* Cosmetic configuration. Every field is optional; missing values fall
|
|
8
|
+
* back to the `cozy` preset (a comfortable VSCode-Explorer-like density).
|
|
9
|
+
*
|
|
10
|
+
* Customize the look without re-implementing slots.
|
|
11
|
+
*/
|
|
12
|
+
interface TreeAppearance {
|
|
13
|
+
/** Built-in size preset. Default: `'cozy'`. */
|
|
14
|
+
density?: TreeDensity;
|
|
15
|
+
/** Override row height in px (wins over density). */
|
|
16
|
+
rowHeight?: number;
|
|
17
|
+
/** Override icon + chevron size in px (wins over density). */
|
|
18
|
+
iconSize?: number;
|
|
19
|
+
/** Lucide stroke width for icon + chevron. Default: 1.5. */
|
|
20
|
+
iconStrokeWidth?: number;
|
|
21
|
+
/** Override label font size in px (wins over density). */
|
|
22
|
+
fontSize?: number;
|
|
23
|
+
/** Pixels between chevron / icon / label. Default depends on density. */
|
|
24
|
+
gap?: number;
|
|
25
|
+
/** Pixels between nesting levels. Default: 16. */
|
|
26
|
+
indent?: number;
|
|
27
|
+
/** Hover / selected highlight intensity. Default: `'default'`. */
|
|
28
|
+
accent?: TreeAccentIntensity;
|
|
29
|
+
/** Row corner radius. Default: `'sm'`. */
|
|
30
|
+
radius?: TreeRadius;
|
|
31
|
+
/** Indent-guide line opacity (0..1). Default: 0.4. */
|
|
32
|
+
indentGuideOpacity?: number;
|
|
33
|
+
/**
|
|
34
|
+
* Show a 2px primary-tinted bar on the left of the selected row.
|
|
35
|
+
* Mimics the VSCode active-tab indicator. Default: `true`.
|
|
36
|
+
*/
|
|
37
|
+
showActiveIndicator?: boolean;
|
|
38
|
+
}
|
|
39
|
+
interface ResolvedAppearance {
|
|
40
|
+
density: TreeDensity;
|
|
41
|
+
rowHeight: number;
|
|
42
|
+
iconSize: number;
|
|
43
|
+
iconStrokeWidth: number;
|
|
44
|
+
fontSize: number;
|
|
45
|
+
gap: number;
|
|
46
|
+
indent: number;
|
|
47
|
+
accent: TreeAccentIntensity;
|
|
48
|
+
radius: TreeRadius;
|
|
49
|
+
indentGuideOpacity: number;
|
|
50
|
+
showActiveIndicator: boolean;
|
|
51
|
+
}
|
|
52
|
+
declare const DEFAULT_TREE_APPEARANCE: ResolvedAppearance;
|
|
53
|
+
/**
|
|
54
|
+
* Merge a partial appearance with the default + density preset.
|
|
55
|
+
*
|
|
56
|
+
* Explicit numeric overrides (e.g. `rowHeight`) win over the density preset.
|
|
57
|
+
*/
|
|
58
|
+
declare function resolveAppearance(input?: TreeAppearance,
|
|
59
|
+
/** Outer `indent` prop (kept on TreeRoot for back-compat). */
|
|
60
|
+
outerIndent?: number): ResolvedAppearance;
|
|
61
|
+
/**
|
|
62
|
+
* Build the `style` object that exposes the resolved appearance to any
|
|
63
|
+
* descendant via CSS variables. Set on `<TreeRoot>`'s outer div.
|
|
64
|
+
*/
|
|
65
|
+
declare function appearanceToStyle(a: ResolvedAppearance): CSSProperties;
|
|
66
|
+
|
|
67
|
+
type TreeItemId = string;
|
|
68
|
+
/** A single node in the consumer's tree data. Generic over your payload. */
|
|
69
|
+
interface TreeNode<T = unknown> {
|
|
70
|
+
id: TreeItemId;
|
|
71
|
+
data: T;
|
|
72
|
+
/** Inline children. Omit (and provide a `loadChildren`) for async loading. */
|
|
73
|
+
children?: TreeNode<T>[];
|
|
74
|
+
/**
|
|
75
|
+
* Set to `true` to mark a node as a folder even when its `children` array
|
|
76
|
+
* is empty (e.g. an unloaded async folder). Default: derived from
|
|
77
|
+
* `Array.isArray(children)`.
|
|
78
|
+
*/
|
|
79
|
+
isFolder?: boolean;
|
|
80
|
+
/** Disable interaction. */
|
|
81
|
+
disabled?: boolean;
|
|
82
|
+
}
|
|
83
|
+
interface TreeLabels {
|
|
84
|
+
loading: string;
|
|
85
|
+
empty: string;
|
|
86
|
+
error: string;
|
|
87
|
+
searchPlaceholder: string;
|
|
88
|
+
searchMatches: (count: number) => string;
|
|
89
|
+
ariaLabel: string;
|
|
90
|
+
}
|
|
91
|
+
declare const DEFAULT_TREE_LABELS: TreeLabels;
|
|
92
|
+
type TreeSelectionMode = 'none' | 'single' | 'multiple';
|
|
93
|
+
/**
|
|
94
|
+
* How a node becomes "activated" (i.e. opened) on pointer interaction.
|
|
95
|
+
*
|
|
96
|
+
* - `'single-click'` (default): single click activates a leaf immediately;
|
|
97
|
+
* double-click also activates. Folders always toggle on single click.
|
|
98
|
+
* - `'double-click'`: single click only selects + focuses; double-click is
|
|
99
|
+
* required to activate. Mirrors classic file-manager behaviour.
|
|
100
|
+
* - `'single-click-preview'`: VSCode Explorer / Cursor behaviour. Single
|
|
101
|
+
* click activates with `{ preview: true }` (consumer renders a preview
|
|
102
|
+
* tab); double-click activates with `{ preview: false }` (pinned tab).
|
|
103
|
+
*
|
|
104
|
+
* Folders ignore this setting — they always toggle on single click and
|
|
105
|
+
* never call `onActivate`.
|
|
106
|
+
*/
|
|
107
|
+
type TreeActivationMode = 'single-click' | 'double-click' | 'single-click-preview';
|
|
108
|
+
interface TreeActivateOptions {
|
|
109
|
+
/**
|
|
110
|
+
* `true` when the activation came from a single click in
|
|
111
|
+
* `'single-click-preview'` mode. `false` for double-click and for
|
|
112
|
+
* non-preview modes. Consumers typically map this to a
|
|
113
|
+
* preview-tab vs pinned-tab distinction.
|
|
114
|
+
*/
|
|
115
|
+
preview: boolean;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Async loader: called the first time a folder is expanded with no inline
|
|
119
|
+
* `children`. Result is cached; concurrent expansions are de-duplicated.
|
|
120
|
+
*/
|
|
121
|
+
type TreeLoadChildren<T> = (node: TreeNode<T>) => Promise<TreeNode<T>[]>;
|
|
122
|
+
interface TreeRowRenderProps<T> {
|
|
123
|
+
node: TreeNode<T>;
|
|
124
|
+
level: number;
|
|
125
|
+
isSelected: boolean;
|
|
126
|
+
isExpanded: boolean;
|
|
127
|
+
isFocused: boolean;
|
|
128
|
+
isFolder: boolean;
|
|
129
|
+
isLoading: boolean;
|
|
130
|
+
isMatchingSearch: boolean;
|
|
131
|
+
}
|
|
132
|
+
type TreeRowSlot<T> = (props: TreeRowRenderProps<T>) => ReactNode;
|
|
133
|
+
type TreeContextMenuSlot<T> = (props: TreeRowRenderProps<T>, trigger: ReactNode) => ReactNode;
|
|
134
|
+
interface TreeRootProps<T> {
|
|
135
|
+
/** Root nodes. Top-level items are rendered directly (no synthetic root). */
|
|
136
|
+
data: TreeNode<T>[];
|
|
137
|
+
/** Returns the human-readable name for a node (used by search/type-ahead). */
|
|
138
|
+
getItemName: (node: TreeNode<T>) => string;
|
|
139
|
+
/** Async loader for folders without inline `children`. */
|
|
140
|
+
loadChildren?: TreeLoadChildren<T>;
|
|
141
|
+
/** Selection behaviour. Default: `'single'`. */
|
|
142
|
+
selectionMode?: TreeSelectionMode;
|
|
143
|
+
/** Pointer activation behaviour. Default: `'single-click'`. */
|
|
144
|
+
activationMode?: TreeActivationMode;
|
|
145
|
+
/** Initially expanded ids. */
|
|
146
|
+
initialExpandedIds?: TreeItemId[];
|
|
147
|
+
/** Initially selected ids. */
|
|
148
|
+
initialSelectedIds?: TreeItemId[];
|
|
149
|
+
/** Pixels of indent per nesting level. Default: 16. (Shortcut for `appearance.indent`.) */
|
|
150
|
+
indent?: number;
|
|
151
|
+
/** Cosmetic configuration: density, sizes, accent intensity, radius. */
|
|
152
|
+
appearance?: TreeAppearance;
|
|
153
|
+
/** Triggered when selection changes. */
|
|
154
|
+
onSelectionChange?: (selectedIds: TreeItemId[]) => void;
|
|
155
|
+
/** Triggered when expanded set changes. */
|
|
156
|
+
onExpansionChange?: (expandedIds: TreeItemId[]) => void;
|
|
157
|
+
/**
|
|
158
|
+
* Triggered when a leaf is activated (Enter / dblclick / click depending
|
|
159
|
+
* on `activationMode`). Folders never call this — they toggle instead.
|
|
160
|
+
*/
|
|
161
|
+
onActivate?: (node: TreeNode<T>, opts: TreeActivateOptions) => void;
|
|
162
|
+
/** Show built-in search input. Default: false. */
|
|
163
|
+
enableSearch?: boolean;
|
|
164
|
+
/** Type printable letters to jump to a matching name. Default: true. */
|
|
165
|
+
enableTypeAhead?: boolean;
|
|
166
|
+
/** Render vertical indent guides under expanded folders. Default: false. */
|
|
167
|
+
showIndentGuides?: boolean;
|
|
168
|
+
/** Custom row renderer. Falls back to the default <TreeRow />. */
|
|
169
|
+
renderRow?: TreeRowSlot<T>;
|
|
170
|
+
/** Replace default folder/file icon. */
|
|
171
|
+
renderIcon?: TreeRowSlot<T>;
|
|
172
|
+
/** Replace default label rendering. */
|
|
173
|
+
renderLabel?: TreeRowSlot<T>;
|
|
174
|
+
/** Right-side actions slot (per row). */
|
|
175
|
+
renderActions?: TreeRowSlot<T>;
|
|
176
|
+
/** Wrap each row in a context menu (right-click). Receives the row meta + trigger element. */
|
|
177
|
+
renderContextMenu?: TreeContextMenuSlot<T>;
|
|
178
|
+
/** Override built-in copy in your locale. */
|
|
179
|
+
labels?: Partial<TreeLabels>;
|
|
180
|
+
/** Persist expanded + (optional) selected ids in localStorage under this key. */
|
|
181
|
+
persistKey?: string;
|
|
182
|
+
/** Persist selection alongside expansion. Default: false. */
|
|
183
|
+
persistSelection?: boolean;
|
|
184
|
+
className?: string;
|
|
185
|
+
style?: React.CSSProperties;
|
|
186
|
+
}
|
|
187
|
+
/** Internal flat-row representation used by the renderer + keyboard nav. */
|
|
188
|
+
interface FlatRow<T> {
|
|
189
|
+
node: TreeNode<T>;
|
|
190
|
+
level: number;
|
|
191
|
+
parentId: TreeItemId | null;
|
|
192
|
+
isFolder: boolean;
|
|
193
|
+
isExpanded: boolean;
|
|
194
|
+
isLoading: boolean;
|
|
195
|
+
hasError: boolean;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export { DEFAULT_TREE_LABELS as D, type FlatRow as F, type ResolvedAppearance as R, type TreeNode as T, type TreeRowSlot as a, type TreeRootProps as b, DEFAULT_TREE_APPEARANCE as c, appearanceToStyle as d, type TreeContextMenuSlot as e, type TreeItemId as f, type TreeLabels as g, type TreeSelectionMode as h, type TreeRowRenderProps as i, type TreeLoadChildren as j, type TreeAppearance as k, type TreeDensity as l, type TreeAccentIntensity as m, type TreeRadius as n, type TreeActivateOptions as o, type TreeActivationMode as p, resolveAppearance as r };
|