@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.
Files changed (49) hide show
  1. package/dist/TreeRoot-R6XVHYQK.mjs +4 -0
  2. package/dist/{TreeRoot-DO33TIS5.mjs.map → TreeRoot-R6XVHYQK.mjs.map} +1 -1
  3. package/dist/TreeRoot-RAMQSBMO.cjs +19 -0
  4. package/dist/{TreeRoot-NJOZ2DMV.cjs.map → TreeRoot-RAMQSBMO.cjs.map} +1 -1
  5. package/dist/{chunk-MA552EWC.cjs → chunk-44ZTWYAF.cjs} +139 -111
  6. package/dist/chunk-44ZTWYAF.cjs.map +1 -0
  7. package/dist/chunk-KR6B3LVY.mjs +59 -0
  8. package/dist/chunk-KR6B3LVY.mjs.map +1 -0
  9. package/dist/{chunk-E5BP4IXF.mjs → chunk-NTJL2SXK.mjs} +139 -111
  10. package/dist/chunk-NTJL2SXK.mjs.map +1 -0
  11. package/dist/chunk-YXBOAGIM.cjs +63 -0
  12. package/dist/chunk-YXBOAGIM.cjs.map +1 -0
  13. package/dist/file-icon/index.cjs +117 -0
  14. package/dist/file-icon/index.cjs.map +1 -0
  15. package/dist/file-icon/index.d.cts +69 -0
  16. package/dist/file-icon/index.d.ts +69 -0
  17. package/dist/file-icon/index.mjs +112 -0
  18. package/dist/file-icon/index.mjs.map +1 -0
  19. package/dist/index.cjs +140 -180
  20. package/dist/index.cjs.map +1 -1
  21. package/dist/index.d.cts +5 -433
  22. package/dist/index.d.ts +5 -433
  23. package/dist/index.mjs +7 -56
  24. package/dist/index.mjs.map +1 -1
  25. package/dist/tree/index.cjs +152 -0
  26. package/dist/tree/index.cjs.map +1 -0
  27. package/dist/tree/index.d.cts +278 -0
  28. package/dist/tree/index.d.ts +278 -0
  29. package/dist/tree/index.mjs +5 -0
  30. package/dist/tree/index.mjs.map +1 -0
  31. package/dist/types-Cclwv4Hl.d.cts +198 -0
  32. package/dist/types-Cclwv4Hl.d.ts +198 -0
  33. package/package.json +16 -10
  34. package/src/tools/FileIcon/FileIcon.tsx +91 -0
  35. package/src/tools/FileIcon/index.ts +9 -0
  36. package/src/tools/FileIcon/loader.ts +47 -0
  37. package/src/tools/FileIcon/treeAdapter.tsx +41 -0
  38. package/src/tools/Tree/README.md +56 -0
  39. package/src/tools/Tree/Tree.story.tsx +48 -0
  40. package/src/tools/Tree/TreeRoot.tsx +15 -5
  41. package/src/tools/Tree/components/TreeRow.tsx +17 -18
  42. package/src/tools/Tree/context/TreeContext.tsx +10 -2
  43. package/src/tools/Tree/hooks/useTreeKeyboard.ts +133 -99
  44. package/src/tools/Tree/index.tsx +2 -0
  45. package/src/tools/Tree/types.ts +36 -2
  46. package/dist/TreeRoot-DO33TIS5.mjs +0 -4
  47. package/dist/TreeRoot-NJOZ2DMV.cjs +0 -19
  48. package/dist/chunk-E5BP4IXF.mjs.map +0 -1
  49. package/dist/chunk-MA552EWC.cjs.map +0 -1
package/dist/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as React$1 from 'react';
3
- import React__default, { ReactNode, ComponentType, CSSProperties } from 'react';
3
+ import React__default, { ReactNode, ComponentType } from 'react';
4
4
  import { Components } from 'react-markdown';
5
5
  import { ViewState } from 'react-map-gl/maplibre';
6
6
  import { Language } from 'prism-react-renderer';
@@ -8,8 +8,11 @@ export { Language } from 'prism-react-renderer';
8
8
  import { RJSFSchema, UiSchema, WidgetProps, FieldTemplateProps, ObjectFieldTemplateProps, ArrayFieldTemplateProps, ArrayFieldItemTemplateProps, ErrorListProps } from '@rjsf/utils';
9
9
  import { FormProps, IChangeEvent } from '@rjsf/core';
10
10
  import { CommonExternalProps } from 'react-json-tree';
11
+ import { b as TreeRootProps } from './types-Cclwv4Hl.cjs';
12
+ export { c as DEFAULT_TREE_APPEARANCE, D as DEFAULT_TREE_LABELS, F as FlatRow, R as ResolvedAppearance, m as TreeAccentIntensity, k as TreeAppearance, e as TreeContextMenuSlot, l as TreeDensity, f as TreeItemId, g as TreeLabels, j as TreeLoadChildren, T as TreeNode, n as TreeRadius, i as TreeRowRenderProps, a as TreeRowSlot, h as TreeSelectionMode, d as appearanceToStyle, r as resolveAppearance } from './types-Cclwv4Hl.cjs';
11
13
  import { MediaPlayerInstance } from '@vidstack/react';
12
14
  import * as monaco from 'monaco-editor';
15
+ export { ChildCache, ChildEntry, ChildEntryStatus, DemoNode, FlattenInput, PersistedTreeState, TreeRoot as Tree, TreeChevron, TreeChevronProps, TreeContent, TreeContentProps, TreeContextValue, TreeEmpty, TreeEmptyProps, TreeError, TreeErrorProps, TreeIcon, TreeIconProps, TreeIndentGuides, TreeIndentGuidesProps, TreeLabel, TreeLabelProps, TreeProvider, TreeProviderProps, TreeRoot, TreeRow, TreeRowProps, TreeSearchInput, TreeSearchInputProps, TreeSkeleton, TreeSkeletonProps, UseTreeKeyboardOptions, UseTreeTypeAheadOptions, clearTreeState, createChildCache, createDemoTree, flattenTree, loadTreeState, resolveChildren, saveTreeState, useTreeActions, useTreeContext, useTreeExpansion, useTreeFocus, useTreeKeyboard, useTreeLabels, useTreeRows, useTreeSearch, useTreeSelection, useTreeTypeAhead } from './tree/index.cjs';
13
16
  import * as zustand_middleware from 'zustand/middleware';
14
17
  import * as zustand from 'zustand';
15
18
 
@@ -1142,172 +1145,6 @@ interface CronSchedulerProviderProps {
1142
1145
  */
1143
1146
  declare const LazyCronScheduler: React$1.ComponentType<CronSchedulerProps>;
1144
1147
 
1145
- type TreeDensity = 'compact' | 'cozy' | 'comfortable';
1146
- type TreeAccentIntensity = 'subtle' | 'default' | 'strong';
1147
- type TreeRadius = 'none' | 'sm' | 'md';
1148
- /**
1149
- * Cosmetic configuration. Every field is optional; missing values fall
1150
- * back to the `cozy` preset (a comfortable VSCode-Explorer-like density).
1151
- *
1152
- * Customize the look without re-implementing slots.
1153
- */
1154
- interface TreeAppearance {
1155
- /** Built-in size preset. Default: `'cozy'`. */
1156
- density?: TreeDensity;
1157
- /** Override row height in px (wins over density). */
1158
- rowHeight?: number;
1159
- /** Override icon + chevron size in px (wins over density). */
1160
- iconSize?: number;
1161
- /** Lucide stroke width for icon + chevron. Default: 1.5. */
1162
- iconStrokeWidth?: number;
1163
- /** Override label font size in px (wins over density). */
1164
- fontSize?: number;
1165
- /** Pixels between chevron / icon / label. Default depends on density. */
1166
- gap?: number;
1167
- /** Pixels between nesting levels. Default: 16. */
1168
- indent?: number;
1169
- /** Hover / selected highlight intensity. Default: `'default'`. */
1170
- accent?: TreeAccentIntensity;
1171
- /** Row corner radius. Default: `'sm'`. */
1172
- radius?: TreeRadius;
1173
- /** Indent-guide line opacity (0..1). Default: 0.4. */
1174
- indentGuideOpacity?: number;
1175
- /**
1176
- * Show a 2px primary-tinted bar on the left of the selected row.
1177
- * Mimics the VSCode active-tab indicator. Default: `true`.
1178
- */
1179
- showActiveIndicator?: boolean;
1180
- }
1181
- interface ResolvedAppearance {
1182
- density: TreeDensity;
1183
- rowHeight: number;
1184
- iconSize: number;
1185
- iconStrokeWidth: number;
1186
- fontSize: number;
1187
- gap: number;
1188
- indent: number;
1189
- accent: TreeAccentIntensity;
1190
- radius: TreeRadius;
1191
- indentGuideOpacity: number;
1192
- showActiveIndicator: boolean;
1193
- }
1194
- declare const DEFAULT_TREE_APPEARANCE: ResolvedAppearance;
1195
- /**
1196
- * Merge a partial appearance with the default + density preset.
1197
- *
1198
- * Explicit numeric overrides (e.g. `rowHeight`) win over the density preset.
1199
- */
1200
- declare function resolveAppearance(input?: TreeAppearance,
1201
- /** Outer `indent` prop (kept on TreeRoot for back-compat). */
1202
- outerIndent?: number): ResolvedAppearance;
1203
- /**
1204
- * Build the `style` object that exposes the resolved appearance to any
1205
- * descendant via CSS variables. Set on `<TreeRoot>`'s outer div.
1206
- */
1207
- declare function appearanceToStyle(a: ResolvedAppearance): CSSProperties;
1208
-
1209
- type TreeItemId = string;
1210
- /** A single node in the consumer's tree data. Generic over your payload. */
1211
- interface TreeNode<T = unknown> {
1212
- id: TreeItemId;
1213
- data: T;
1214
- /** Inline children. Omit (and provide a `loadChildren`) for async loading. */
1215
- children?: TreeNode<T>[];
1216
- /**
1217
- * Set to `true` to mark a node as a folder even when its `children` array
1218
- * is empty (e.g. an unloaded async folder). Default: derived from
1219
- * `Array.isArray(children)`.
1220
- */
1221
- isFolder?: boolean;
1222
- /** Disable interaction. */
1223
- disabled?: boolean;
1224
- }
1225
- interface TreeLabels {
1226
- loading: string;
1227
- empty: string;
1228
- error: string;
1229
- searchPlaceholder: string;
1230
- searchMatches: (count: number) => string;
1231
- ariaLabel: string;
1232
- }
1233
- declare const DEFAULT_TREE_LABELS: TreeLabels;
1234
- type TreeSelectionMode = 'none' | 'single' | 'multiple';
1235
- /**
1236
- * Async loader: called the first time a folder is expanded with no inline
1237
- * `children`. Result is cached; concurrent expansions are de-duplicated.
1238
- */
1239
- type TreeLoadChildren<T> = (node: TreeNode<T>) => Promise<TreeNode<T>[]>;
1240
- interface TreeRowRenderProps<T> {
1241
- node: TreeNode<T>;
1242
- level: number;
1243
- isSelected: boolean;
1244
- isExpanded: boolean;
1245
- isFocused: boolean;
1246
- isFolder: boolean;
1247
- isLoading: boolean;
1248
- isMatchingSearch: boolean;
1249
- }
1250
- type TreeRowSlot<T> = (props: TreeRowRenderProps<T>) => ReactNode;
1251
- type TreeContextMenuSlot<T> = (props: TreeRowRenderProps<T>, trigger: ReactNode) => ReactNode;
1252
- interface TreeRootProps<T> {
1253
- /** Root nodes. Top-level items are rendered directly (no synthetic root). */
1254
- data: TreeNode<T>[];
1255
- /** Returns the human-readable name for a node (used by search/type-ahead). */
1256
- getItemName: (node: TreeNode<T>) => string;
1257
- /** Async loader for folders without inline `children`. */
1258
- loadChildren?: TreeLoadChildren<T>;
1259
- /** Selection behaviour. Default: `'single'`. */
1260
- selectionMode?: TreeSelectionMode;
1261
- /** Initially expanded ids. */
1262
- initialExpandedIds?: TreeItemId[];
1263
- /** Initially selected ids. */
1264
- initialSelectedIds?: TreeItemId[];
1265
- /** Pixels of indent per nesting level. Default: 16. (Shortcut for `appearance.indent`.) */
1266
- indent?: number;
1267
- /** Cosmetic configuration: density, sizes, accent intensity, radius. */
1268
- appearance?: TreeAppearance;
1269
- /** Triggered when selection changes. */
1270
- onSelectionChange?: (selectedIds: TreeItemId[]) => void;
1271
- /** Triggered when expanded set changes. */
1272
- onExpansionChange?: (expandedIds: TreeItemId[]) => void;
1273
- /** Enter / dblclick on a node. */
1274
- onActivate?: (node: TreeNode<T>) => void;
1275
- /** Show built-in search input. Default: false. */
1276
- enableSearch?: boolean;
1277
- /** Type printable letters to jump to a matching name. Default: true. */
1278
- enableTypeAhead?: boolean;
1279
- /** Render vertical indent guides under expanded folders. Default: false. */
1280
- showIndentGuides?: boolean;
1281
- /** Custom row renderer. Falls back to the default <TreeRow />. */
1282
- renderRow?: TreeRowSlot<T>;
1283
- /** Replace default folder/file icon. */
1284
- renderIcon?: TreeRowSlot<T>;
1285
- /** Replace default label rendering. */
1286
- renderLabel?: TreeRowSlot<T>;
1287
- /** Right-side actions slot (per row). */
1288
- renderActions?: TreeRowSlot<T>;
1289
- /** Wrap each row in a context menu (right-click). Receives the row meta + trigger element. */
1290
- renderContextMenu?: TreeContextMenuSlot<T>;
1291
- /** Override built-in copy in your locale. */
1292
- labels?: Partial<TreeLabels>;
1293
- /** Persist expanded + (optional) selected ids in localStorage under this key. */
1294
- persistKey?: string;
1295
- /** Persist selection alongside expansion. Default: false. */
1296
- persistSelection?: boolean;
1297
- className?: string;
1298
- style?: React.CSSProperties;
1299
- }
1300
- /** Internal flat-row representation used by the renderer + keyboard nav. */
1301
- interface FlatRow<T> {
1302
- node: TreeNode<T>;
1303
- level: number;
1304
- parentId: TreeItemId | null;
1305
- isFolder: boolean;
1306
- isExpanded: boolean;
1307
- isLoading: boolean;
1308
- hasError: boolean;
1309
- }
1310
-
1311
1148
  declare const LazyTree: React$1.ComponentType<TreeRootProps<unknown>>;
1312
1149
 
1313
1150
  /**
@@ -2351,271 +2188,6 @@ declare const mentionPresets: {
2351
2188
  htmlSpan: (className?: string) => MentionMarkdownRenderer;
2352
2189
  };
2353
2190
 
2354
- /**
2355
- * High-level entry point. Wraps Provider + (optional) search bar + content.
2356
- *
2357
- * For full control, compose with <TreeProvider>, <TreeContent>,
2358
- * <TreeSearchInput>, <TreeRow>, etc. directly from `@djangocfg/ui-tools/tree`.
2359
- */
2360
- declare function TreeRoot<T>(props: TreeRootProps<T>): react_jsx_runtime.JSX.Element;
2361
-
2362
- type ChildEntryStatus = 'idle' | 'loading' | 'loaded' | 'error';
2363
- interface ChildEntry<T> {
2364
- status: ChildEntryStatus;
2365
- children: TreeNode<T>[];
2366
- error?: string;
2367
- }
2368
- type ChildCache<T> = Map<TreeItemId, ChildEntry<T>>;
2369
- declare const createChildCache: <T>() => ChildCache<T>;
2370
- /**
2371
- * Resolve a node's children for the current render.
2372
- *
2373
- * - If the node carries inline `children`, those win (no async fetch).
2374
- * - Otherwise we look in the cache.
2375
- *
2376
- * Returns `null` when nothing is loaded yet (caller may show a skeleton).
2377
- */
2378
- declare const resolveChildren: <T>(cache: ChildCache<T>, node: TreeNode<T>) => {
2379
- children: TreeNode<T>[] | null;
2380
- status: ChildEntryStatus;
2381
- error?: string;
2382
- };
2383
-
2384
- interface TreeContextValue<T> {
2385
- expanded: ReadonlySet<TreeItemId>;
2386
- selected: ReadonlySet<TreeItemId>;
2387
- focused: TreeItemId | null;
2388
- query: string;
2389
- flatRows: FlatRow<T>[];
2390
- /** Search-matching node ids (subset of all flatRows). */
2391
- matchingIds: ReadonlySet<TreeItemId>;
2392
- expand: (id: TreeItemId) => void;
2393
- collapse: (id: TreeItemId) => void;
2394
- toggle: (id: TreeItemId) => void;
2395
- expandAll: () => void;
2396
- collapseAll: () => void;
2397
- select: (id: TreeItemId) => void;
2398
- setSelectedIds: (ids: TreeItemId[]) => void;
2399
- clearSelection: () => void;
2400
- setFocus: (id: TreeItemId | null) => void;
2401
- setQuery: (q: string) => void;
2402
- refresh: (id: TreeItemId) => Promise<void>;
2403
- refreshAll: () => Promise<void>;
2404
- activate: (node: TreeNode<T>) => void;
2405
- labels: TreeLabels;
2406
- /** Resolved cosmetic config — never null. */
2407
- appearance: ResolvedAppearance;
2408
- /** Convenience alias for `appearance.indent`. */
2409
- indent: number;
2410
- selectionMode: TreeSelectionMode;
2411
- enableSearch: boolean;
2412
- showIndentGuides: boolean;
2413
- getItemName: (node: TreeNode<T>) => string;
2414
- renderIcon?: TreeRowSlot<T>;
2415
- renderLabel?: TreeRowSlot<T>;
2416
- renderActions?: TreeRowSlot<T>;
2417
- renderContextMenu?: TreeContextMenuSlot<T>;
2418
- }
2419
- declare function useTreeContext<T>(): TreeContextValue<T>;
2420
- interface TreeProviderProps<T> extends Pick<TreeRootProps<T>, 'data' | 'getItemName' | 'loadChildren' | 'selectionMode' | 'initialExpandedIds' | 'initialSelectedIds' | 'indent' | 'appearance' | 'onSelectionChange' | 'onExpansionChange' | 'onActivate' | 'enableSearch' | 'showIndentGuides' | 'renderIcon' | 'renderLabel' | 'renderActions' | 'renderContextMenu' | 'labels' | 'persistKey' | 'persistSelection'> {
2421
- children: React$1.ReactNode;
2422
- }
2423
- declare function TreeProvider<T>(props: TreeProviderProps<T>): react_jsx_runtime.JSX.Element;
2424
-
2425
- declare function useTreeLabels(): TreeLabels;
2426
- declare function useTreeRows<T>(): FlatRow<T>[];
2427
- declare function useTreeSelection<T>(): {
2428
- selectedIds: string[];
2429
- select: (id: TreeItemId) => void;
2430
- setSelectedIds: (ids: TreeItemId[]) => void;
2431
- clear: () => void;
2432
- isSelected: (id: TreeItemId) => boolean;
2433
- };
2434
- declare function useTreeExpansion<T>(): {
2435
- expandedIds: string[];
2436
- expand: (id: TreeItemId) => void;
2437
- collapse: (id: TreeItemId) => void;
2438
- toggle: (id: TreeItemId) => void;
2439
- expandAll: () => void;
2440
- collapseAll: () => void;
2441
- isExpanded: (id: TreeItemId) => boolean;
2442
- };
2443
- declare function useTreeFocus<T>(): {
2444
- focusedId: string;
2445
- setFocus: (id: TreeItemId | null) => void;
2446
- };
2447
- declare function useTreeSearch<T>(): {
2448
- isOpen: boolean;
2449
- query: string;
2450
- setQuery: (q: string) => void;
2451
- matchingIds: ReadonlySet<string>;
2452
- matchCount: number;
2453
- };
2454
- declare function useTreeActions<T>(): {
2455
- expand: (id: TreeItemId) => void;
2456
- collapse: (id: TreeItemId) => void;
2457
- toggle: (id: TreeItemId) => void;
2458
- expandAll: () => void;
2459
- collapseAll: () => void;
2460
- refresh: (id: TreeItemId) => Promise<void>;
2461
- refreshAll: () => Promise<void>;
2462
- activate: (node: TreeNode<T>) => void;
2463
- };
2464
-
2465
- interface UseTreeTypeAheadOptions<T> {
2466
- /** Visible flat rows in render order. */
2467
- rows: FlatRow<T>[];
2468
- /** How to read the displayed name of a node (matched case-insensitively). */
2469
- getItemName: (node: TreeNode<T>) => string;
2470
- /** Element receiving keydown events. */
2471
- containerRef: React.RefObject<HTMLElement | null>;
2472
- /** Called with the matched node id so the consumer can focus / scroll. */
2473
- onMatch: (id: string) => void;
2474
- /** Disable without removing the call site. */
2475
- enabled?: boolean;
2476
- }
2477
- /**
2478
- * Type-ahead jump (Finder / VSCode style).
2479
- *
2480
- * Builds a rolling buffer of printable keys (within ~600 ms of each other)
2481
- * and notifies the consumer of the first row whose name starts with that
2482
- * prefix. Resets on Esc / Enter / navigation keys / timeout.
2483
- */
2484
- declare function useTreeTypeAhead<T>({ rows, getItemName, containerRef, onMatch, enabled, }: UseTreeTypeAheadOptions<T>): void;
2485
-
2486
- interface UseTreeKeyboardOptions<T> {
2487
- containerRef: React.RefObject<HTMLElement | null>;
2488
- rows: FlatRow<T>[];
2489
- focusedId: TreeItemId | null;
2490
- enabled?: boolean;
2491
- onFocus: (id: TreeItemId) => void;
2492
- onSelect: (id: TreeItemId) => void;
2493
- onActivate: (id: TreeItemId) => void;
2494
- onExpand: (id: TreeItemId) => void;
2495
- onCollapse: (id: TreeItemId) => void;
2496
- onClearSelection: () => void;
2497
- }
2498
- /**
2499
- * Standard tree keyboard navigation.
2500
- *
2501
- * - ↑ / ↓ : prev / next visible row
2502
- * - Home / End : first / last visible row
2503
- * - → : expand folder; if already expanded, jump to first child
2504
- * - ← : collapse folder; if already collapsed (or leaf), jump to parent
2505
- * - Enter / Space : activate (folder => toggle, leaf => onActivate)
2506
- * - Esc : clear selection
2507
- */
2508
- declare function useTreeKeyboard<T>({ containerRef, rows, focusedId, enabled, onFocus, onSelect, onActivate, onExpand, onCollapse, onClearSelection, }: UseTreeKeyboardOptions<T>): void;
2509
-
2510
- interface TreeChevronProps {
2511
- isExpanded: boolean;
2512
- isFolder: boolean;
2513
- className?: string;
2514
- }
2515
- declare function TreeChevron({ isExpanded, isFolder, className }: TreeChevronProps): react_jsx_runtime.JSX.Element;
2516
-
2517
- interface TreeIconProps {
2518
- isFolder: boolean;
2519
- isExpanded: boolean;
2520
- className?: string;
2521
- }
2522
- declare function TreeIcon({ isFolder, isExpanded, className }: TreeIconProps): react_jsx_runtime.JSX.Element;
2523
-
2524
- interface TreeLabelProps {
2525
- children: React.ReactNode;
2526
- isMatchingSearch?: boolean;
2527
- className?: string;
2528
- }
2529
- declare function TreeLabel({ children, isMatchingSearch, className }: TreeLabelProps): react_jsx_runtime.JSX.Element;
2530
-
2531
- interface TreeRowProps<T> {
2532
- row: FlatRow<T>;
2533
- className?: string;
2534
- }
2535
- declare function TreeRow<T>({ row, className }: TreeRowProps<T>): react_jsx_runtime.JSX.Element;
2536
-
2537
- interface TreeContentProps<T> {
2538
- /** Custom row renderer; falls back to <TreeRow />. */
2539
- children?: TreeRowSlot<T>;
2540
- className?: string;
2541
- /** Override aria-label for the container. */
2542
- ariaLabel?: string;
2543
- }
2544
- declare function TreeContent<T>({ children, className, ariaLabel }: TreeContentProps<T>): react_jsx_runtime.JSX.Element;
2545
-
2546
- interface TreeSearchInputProps {
2547
- className?: string;
2548
- showMatches?: boolean;
2549
- }
2550
- declare function TreeSearchInput({ className, showMatches }: TreeSearchInputProps): react_jsx_runtime.JSX.Element;
2551
-
2552
- interface TreeEmptyProps {
2553
- children: React.ReactNode;
2554
- className?: string;
2555
- }
2556
- declare function TreeEmpty({ children, className }: TreeEmptyProps): react_jsx_runtime.JSX.Element;
2557
-
2558
- interface TreeSkeletonProps {
2559
- rows?: number;
2560
- className?: string;
2561
- }
2562
- declare function TreeSkeleton({ rows, className }: TreeSkeletonProps): react_jsx_runtime.JSX.Element;
2563
-
2564
- interface TreeErrorProps {
2565
- children: React.ReactNode;
2566
- className?: string;
2567
- }
2568
- declare function TreeError({ children, className }: TreeErrorProps): react_jsx_runtime.JSX.Element;
2569
-
2570
- interface TreeIndentGuidesProps {
2571
- level: number;
2572
- indent: number;
2573
- }
2574
- /**
2575
- * Vertical guide lines under nested rows. Renders one absolute-positioned
2576
- * 1px column per ancestor level. Decorative — `aria-hidden` and
2577
- * pointer-events disabled. Opacity comes from the tree appearance.
2578
- */
2579
- declare function TreeIndentGuides({ level, indent }: TreeIndentGuidesProps): react_jsx_runtime.JSX.Element;
2580
-
2581
- interface FlattenInput<T> {
2582
- roots: TreeNode<T>[];
2583
- expandedIds: ReadonlySet<TreeItemId>;
2584
- cache: ChildCache<T>;
2585
- }
2586
- /**
2587
- * Walk the tree top-to-bottom and produce a flat list of visible rows.
2588
- *
2589
- * Visibility rule: a child row appears only when every ancestor is in
2590
- * `expandedIds`. The output is ordered exactly as it should render,
2591
- * which keeps keyboard navigation (next/prev row) trivial.
2592
- */
2593
- declare function flattenTree<T>({ roots, expandedIds, cache }: FlattenInput<T>): FlatRow<T>[];
2594
-
2595
- interface PersistedTreeState {
2596
- expandedItems: TreeItemId[];
2597
- selectedItems: TreeItemId[];
2598
- }
2599
- declare function loadTreeState(key: string): PersistedTreeState | null;
2600
- declare function saveTreeState(key: string, state: PersistedTreeState): void;
2601
- declare function clearTreeState(key: string): void;
2602
-
2603
- interface DemoNode {
2604
- name: string;
2605
- }
2606
- /**
2607
- * Build a deterministic synthetic tree for stories and tests.
2608
- *
2609
- * @example
2610
- * const data = createDemoTree({ depth: 4, breadth: 3 });
2611
- * <TreeRoot data={data} getItemName={(n) => n.data.name} />
2612
- */
2613
- declare function createDemoTree({ depth, breadth, rootPrefix, }?: {
2614
- depth?: number;
2615
- breadth?: number;
2616
- rootPrefix?: string;
2617
- }): TreeNode<DemoNode>[];
2618
-
2619
2191
  interface BlobUrlEntry {
2620
2192
  url: string;
2621
2193
  refCount: number;
@@ -2794,4 +2366,4 @@ declare function useBlobUrlCleanup(key: string | null): void;
2794
2366
  */
2795
2367
  declare function generateContentKey(content: ArrayBuffer): string;
2796
2368
 
2797
- export { type ApiKey, ArrayFieldItemTemplate, ArrayFieldTemplate, type AspectRatioValue, Player as AudioPlayer, type PlayerProps as AudioPlayerProps, BaseInputTemplate, type BlobSource, CardLoadingFallback, CheckboxWidget, type ChildCache, type ChildEntry, type ChildEntryStatus, ColorWidget, type CreateLazyComponentOptions, type CreateVideoErrorFallbackOptions, CronScheduler, type CronSchedulerContextValue, type CronSchedulerProps, CronSchedulerProvider, type CronSchedulerState, CustomInput, type DASHSource, DEFAULT_TREE_APPEARANCE, DEFAULT_TREE_LABELS, type DataUrlSource, DayChips, type DemoNode, DiffEditor, type DiffEditorProps, Editor, type EditorContextValue, type EditorFile, type EditorOptions, type EditorProps, EditorProvider, type EditorRef, type ErrorFallbackProps, ErrorListTemplate, FieldTemplate, type FlatRow, type FlattenInput, type HLSSource, type ImageFile, ImageViewer, type ImageViewerProps, JsonSchemaForm, type JsonSchemaFormProps, JsonTreeComponent as JsonTree, type JsonTreeConfig, type JsonTreeProps, LazyPlayer as LazyAudioPlayer, LazyCronScheduler, LazyImageViewer, LazyJsonSchemaForm, LazyJsonTree, LazyLottiePlayer, LazyMapContainer, LazyMapView, LazyMermaid, LazyOpenapiViewer, LazyPrettyCode, LazyTree, type TreeRootProps as LazyTreeProps, LazyVideoPlayer, LazyWrapper, type LazyWrapperProps, type LinkRule, LoadingFallback, type LoadingFallbackProps, type LottieDirection, LottiePlayer, type LottiePlayerProps, type LottieSize, type LottieSpeed, type MapContainerProps, MapLoadingFallback, type MapStyleKey, type MapViewport, MarkdownEditor, type MarkdownEditorProps, MarkdownMessage, type MarkdownMessageProps, type MarkerData, type MentionAttrs, type MentionConfig, type MentionItem, type MentionMarkdownRenderer, Mermaid, type MermaidProps, type MonthDay, MonthDayGrid, NativeProvider, NumberWidget, ObjectFieldTemplate, Playground as OpenapiViewer, type PersistedTreeState, type PlayerMode, type PlaygroundConfig, type PlaygroundProps$1 as PlaygroundProps, PrettyCode, type PrettyCodeProps$1 as PrettyCodeProps, type ResolveFileSourceOptions, type ResolvedAppearance, SchedulePreview, type ScheduleType, ScheduleTypeSelector, type SchemaSource, SelectWidget, type SimpleStreamSource, SliderWidget, Spinner, StreamProvider, type StreamSource, SwitchWidget, TextWidget, TimeSelector, TreeRoot as Tree, type TreeAccentIntensity, type TreeAppearance, TreeChevron, type TreeChevronProps, TreeContent, type TreeContentProps, type TreeContextMenuSlot, type TreeContextValue, type TreeDensity, TreeEmpty, type TreeEmptyProps, TreeError, type TreeErrorProps, TreeIcon, type TreeIconProps, TreeIndentGuides, type TreeIndentGuidesProps, type TreeItemId, TreeLabel, type TreeLabelProps, type TreeLabels, type TreeLoadChildren, type TreeNode, TreeProvider, type TreeProviderProps, type TreeRadius, TreeRoot, type TreeRootProps, TreeRow, type TreeRowProps, type TreeRowRenderProps, type TreeRowSlot, TreeSearchInput, type TreeSearchInputProps, type TreeSelectionMode, TreeSkeleton, type TreeSkeletonProps, type UrlSource, type UseCollapsibleContentOptions, type UseCollapsibleContentResult, type UseEditorReturn, type UseLottieOptions, type UseLottieReturn, type UseMonacoReturn, type UseTreeKeyboardOptions, type UseTreeTypeAheadOptions, VideoControls, VideoErrorFallback, type VideoErrorFallbackProps, VideoPlayer, type VideoPlayerContextValue, type VideoPlayerProps, VideoPlayerProvider, type VideoPlayerProviderProps, type VideoPlayerRef, type VideoSourceUnion, VidstackProvider, type VimeoSource, type WeekDay, type YouTubeSource, appearanceToStyle, buildCron, clearTreeState, createChildCache, createDemoTree, createLazyComponent, createVideoErrorFallback, extractTextFromChildren, flattenTree, generateContentKey, getRequiredFields, hasRequiredFields, humanizeCron, isSimpleStreamSource, isValidCron, loadTreeState, mentionPresets, mergeDefaults, normalizeFormData, parseCron, resolveAppearance, resolveChildren, resolveFileSource, resolvePlayerMode, resolveStreamSource, safeJsonParse, safeJsonStringify, saveTreeState, useAudioCache, useBlobUrlCleanup, useCollapsibleContent, useCronCustom, useCronMonthDays, useCronPreview, useCronScheduler, useCronSchedulerContext, useCronTime, useCronType, useCronWeekDays, useEditor, useEditorContext, useImageCache, useLanguage, useLottie, useMediaCacheStore, useMonaco, useTreeActions, useTreeContext, useTreeExpansion, useTreeFocus, useTreeKeyboard, useTreeLabels, useTreeRows, useTreeSearch, useTreeSelection, useTreeTypeAhead, useVideoCache, useVideoPlayerContext, useVideoPlayerSettings, validateRequiredFields, validateSchema };
2369
+ export { type ApiKey, ArrayFieldItemTemplate, ArrayFieldTemplate, type AspectRatioValue, Player as AudioPlayer, type PlayerProps as AudioPlayerProps, BaseInputTemplate, type BlobSource, CardLoadingFallback, CheckboxWidget, ColorWidget, type CreateLazyComponentOptions, type CreateVideoErrorFallbackOptions, CronScheduler, type CronSchedulerContextValue, type CronSchedulerProps, CronSchedulerProvider, type CronSchedulerState, CustomInput, type DASHSource, type DataUrlSource, DayChips, DiffEditor, type DiffEditorProps, Editor, type EditorContextValue, type EditorFile, type EditorOptions, type EditorProps, EditorProvider, type EditorRef, type ErrorFallbackProps, ErrorListTemplate, FieldTemplate, type HLSSource, type ImageFile, ImageViewer, type ImageViewerProps, JsonSchemaForm, type JsonSchemaFormProps, JsonTreeComponent as JsonTree, type JsonTreeConfig, type JsonTreeProps, LazyPlayer as LazyAudioPlayer, LazyCronScheduler, LazyImageViewer, LazyJsonSchemaForm, LazyJsonTree, LazyLottiePlayer, LazyMapContainer, LazyMapView, LazyMermaid, LazyOpenapiViewer, LazyPrettyCode, LazyTree, TreeRootProps as LazyTreeProps, LazyVideoPlayer, LazyWrapper, type LazyWrapperProps, type LinkRule, LoadingFallback, type LoadingFallbackProps, type LottieDirection, LottiePlayer, type LottiePlayerProps, type LottieSize, type LottieSpeed, type MapContainerProps, MapLoadingFallback, type MapStyleKey, type MapViewport, MarkdownEditor, type MarkdownEditorProps, MarkdownMessage, type MarkdownMessageProps, type MarkerData, type MentionAttrs, type MentionConfig, type MentionItem, type MentionMarkdownRenderer, Mermaid, type MermaidProps, type MonthDay, MonthDayGrid, NativeProvider, NumberWidget, ObjectFieldTemplate, Playground as OpenapiViewer, type PlayerMode, type PlaygroundConfig, type PlaygroundProps$1 as PlaygroundProps, PrettyCode, type PrettyCodeProps$1 as PrettyCodeProps, type ResolveFileSourceOptions, SchedulePreview, type ScheduleType, ScheduleTypeSelector, type SchemaSource, SelectWidget, type SimpleStreamSource, SliderWidget, Spinner, StreamProvider, type StreamSource, SwitchWidget, TextWidget, TimeSelector, TreeRootProps, type UrlSource, type UseCollapsibleContentOptions, type UseCollapsibleContentResult, type UseEditorReturn, type UseLottieOptions, type UseLottieReturn, type UseMonacoReturn, VideoControls, VideoErrorFallback, type VideoErrorFallbackProps, VideoPlayer, type VideoPlayerContextValue, type VideoPlayerProps, VideoPlayerProvider, type VideoPlayerProviderProps, type VideoPlayerRef, type VideoSourceUnion, VidstackProvider, type VimeoSource, type WeekDay, type YouTubeSource, buildCron, createLazyComponent, createVideoErrorFallback, extractTextFromChildren, generateContentKey, getRequiredFields, hasRequiredFields, humanizeCron, isSimpleStreamSource, isValidCron, mentionPresets, mergeDefaults, normalizeFormData, parseCron, resolveFileSource, resolvePlayerMode, resolveStreamSource, safeJsonParse, safeJsonStringify, useAudioCache, useBlobUrlCleanup, useCollapsibleContent, useCronCustom, useCronMonthDays, useCronPreview, useCronScheduler, useCronSchedulerContext, useCronTime, useCronType, useCronWeekDays, useEditor, useEditorContext, useImageCache, useLanguage, useLottie, useMediaCacheStore, useMonaco, useVideoCache, useVideoPlayerContext, useVideoPlayerSettings, validateRequiredFields, validateSchema };