@ixfx/components 0.15.5 → 0.16.1

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 (80) hide show
  1. package/bundle/index.d.ts +986 -49
  2. package/bundle/index.js +765 -729
  3. package/dist/ac-token.js +1 -1
  4. package/dist/crumb-navigation-BbqfmkYs.d.ts +147 -0
  5. package/dist/crumb-navigation-YnFVFqrx.js +1290 -0
  6. package/dist/crumbs.d.ts +2 -115
  7. package/dist/crumbs.js +1 -1179
  8. package/dist/{data-grid-C1sZX6n9.js → data-grid-Cqxuwgbb.js} +615 -210
  9. package/dist/{data-grid-D7qzmMMp.d.ts → data-grid-Csh5EJW9.d.ts} +55 -4
  10. package/dist/data-grid.d.ts +3 -3
  11. package/dist/data-grid.js +1 -1
  12. package/dist/{detail-list-q8bs67BM.js → detail-list-Bo5ze3SN.js} +234 -9
  13. package/dist/{detail-list-CKIKlszv.d.ts → detail-list-DSZ1DDor.d.ts} +48 -4
  14. package/dist/detail-list.d.ts +4 -4
  15. package/dist/detail-list.js +1 -1
  16. package/dist/{flat-list-DXMyDiSH.d.ts → flat-list-CT9kX3TQ.d.ts} +27 -4
  17. package/dist/flat-list.d.ts +2 -2
  18. package/dist/flat-list.js +123 -4
  19. package/dist/{grid-list-y6dWJYu3.js → grid-list-D0dJNVEF.js} +278 -76
  20. package/dist/{grid-list-0e7snW6t.d.ts → grid-list-DDLrWRxm.d.ts} +128 -22
  21. package/dist/grid-list.d.ts +3 -3
  22. package/dist/grid-list.js +1 -1
  23. package/dist/{incr-search-JIhwB49y.js → incr-search-CgbL-OlS.js} +140 -10
  24. package/dist/incr-search.d.ts +1 -1
  25. package/dist/incr-search.js +1 -1
  26. package/dist/index-9ttcdwlL.d.ts +71 -0
  27. package/dist/index-Bnm-kKGC.d.ts +475 -0
  28. package/dist/{index-KN2MW_xD.d.ts → index-CUErGhCg.d.ts} +31 -4
  29. package/dist/{index-DEVyVIn8.d.ts → index-D-lZNlHa.d.ts} +52 -6
  30. package/dist/index.d.ts +341 -21
  31. package/dist/index.js +2286 -884
  32. package/dist/{list-native-drag-controller-O2Nruqpi.d.ts → list-native-drag-controller-D_UrXipS.d.ts} +1 -1
  33. package/dist/{list-selection-controller-BeE70lbB.js → list-selection-controller-5L0Nj9tR.js} +87 -2
  34. package/dist/miller-DUqiUAWQ.js +2230 -0
  35. package/dist/miller.d.ts +4 -437
  36. package/dist/miller.js +1 -1815
  37. package/dist/narrowed-text.js +1 -1
  38. package/dist/pending-BGidHppL.js +91 -0
  39. package/dist/scroll-hover-guard-Cjw6179Q.js +35 -0
  40. package/dist/{split-layout-JK3xWVX2.d.ts → split-layout-CophkNeU.d.ts} +41 -3
  41. package/dist/{split-layout-Deoxy47d.js → split-layout-DTY4PJRp.js} +251 -19
  42. package/dist/split-layout.d.ts +1 -1
  43. package/dist/split-layout.js +1 -1
  44. package/dist/sunburst-tree.d.ts +2 -2
  45. package/dist/sunburst-tree.js +1 -1
  46. package/dist/{sunbursttree-list-yXwS-uEI.js → sunbursttree-list-B_M0YTEA.js} +299 -80
  47. package/dist/{sunbursttree-list--Z0uyh8O.d.ts → sunbursttree-list-DePuFYlU.d.ts} +40 -3
  48. package/dist/tree-CftHwtEb.js +146 -0
  49. package/dist/{tree-D8VxvR9u.js → tree-DAlgvaHB.js} +276 -48
  50. package/dist/{tree-component-C6UHO-w9.d.ts → tree-component-DgfkxmVY.d.ts} +19 -8
  51. package/dist/tree.d.ts +3 -3
  52. package/dist/tree.js +1 -1
  53. package/dist/types-LU1u0CB8.d.ts +87 -0
  54. package/dist/vertical-list-DyKPKGxK.js +1993 -0
  55. package/dist/{vertical-list-D8MksoTp.d.ts → vertical-list-SAx56U-l.d.ts} +31 -3
  56. package/dist/vertical-list.d.ts +3 -3
  57. package/dist/vertical-list.js +1 -1789
  58. package/dist/view-state-controller-BdyXWUUM.js +305 -0
  59. package/docs-user/README.md +2 -0
  60. package/docs-user/crumbs.md +27 -0
  61. package/docs-user/data-grid.md +79 -5
  62. package/docs-user/detail-list.md +69 -0
  63. package/docs-user/dock.md +63 -12
  64. package/docs-user/flat-list.md +27 -0
  65. package/docs-user/grid-list.md +69 -13
  66. package/docs-user/hyperbolic-tree.md +31 -4
  67. package/docs-user/icicle-tree.md +36 -0
  68. package/docs-user/index.json +12 -2
  69. package/docs-user/llms.txt +2 -0
  70. package/docs-user/miller.md +52 -21
  71. package/docs-user/multicol-list.md +50 -8
  72. package/docs-user/split-layout.md +45 -17
  73. package/docs-user/sunburst-tree.md +32 -2
  74. package/docs-user/tree.md +45 -6
  75. package/docs-user/treemap.md +32 -0
  76. package/docs-user/twosplit-layout.md +22 -0
  77. package/docs-user/user-catalog.md +1 -1
  78. package/docs-user/vertical-list.md +55 -7
  79. package/llms.txt +2 -0
  80. package/package.json +2 -2
@@ -1,4 +1,5 @@
1
1
  import { a as TreeItem, n as TreeExclusivity, o as TreeNode, r as TreeFilterPredicate, s as TreeSelectionFilter, t as LoadChildrenCallback } from "./types-Jky6oNAp.js";
2
+ import { l as ViewStateful } from "./types-LU1u0CB8.js";
2
3
  //#region src/interaction/list-drag-types.d.ts
3
4
  interface ListDragEntry<T> {
4
5
  readonly key: string;
@@ -311,6 +312,11 @@ interface TreeComponentEventMap {
311
312
  'tree-drop': TreeDropEvent;
312
313
  'tree-drag-end': TreeDragEndEvent;
313
314
  }
315
+ /** Options for `selectAll()` / `deselectAll()`. */
316
+ type TreeSelectAllOptions = {
317
+ /** Only act on rows that are showing (e.g. Ctrl+A), not those in collapsed branches. */
318
+ readonly visibleOnly?: boolean;
319
+ };
314
320
  /**
315
321
  * The common interface all tree-like components must implement.
316
322
  *
@@ -324,7 +330,12 @@ interface TreeComponentEventMap {
324
330
  * }
325
331
  * ```
326
332
  */
327
- interface TreeComponent extends EventTarget {
333
+ /**
334
+ * Every tree component supports view-state snapshot / restore
335
+ * (`getViewState` / `setViewState` / `clearPendingViewState`, see
336
+ * `docs/infra-view-state.md`). Each narrows the state type with its own fields.
337
+ */
338
+ interface TreeComponent extends EventTarget, ViewStateful {
328
339
  /**
329
340
  * Root node of the tree.
330
341
  * Set this directly for static/fully-known trees.
@@ -379,13 +390,13 @@ interface TreeComponent extends EventTarget {
379
390
  /** Clear the entire selection. */
380
391
  clearSelection: () => void;
381
392
  /**
382
- * Select all visible items.
383
- * In `checked` mode, checks the checkbox of each visible node (recursively toggling descendants).
384
- * In all other modes, adds every visible selectable node to the selection.
393
+ * Select every selectable item — in tree components, including those inside
394
+ * collapsed branches (only filter matches while a filter is active). Pass
395
+ * `{ visibleOnly: true }` to limit it to the items showing.
385
396
  */
386
- selectAll: () => void;
387
- /** Deselect all items. In `checked` mode, unchecks each visible node. */
388
- deselectAll: () => void;
397
+ selectAll: (options?: TreeSelectAllOptions) => void;
398
+ /** Mirror of `selectAll`: deselect the items it would select. */
399
+ deselectAll: (options?: TreeSelectAllOptions) => void;
389
400
  /**
390
401
  * Expand ancestors and select the node reached by following `keys` from the root's children.
391
402
  * Returns `true` if the path was found and applied.
@@ -430,4 +441,4 @@ interface TreeSearchHost extends TreeComponent {
430
441
  readonly updateComplete: Promise<boolean>;
431
442
  }
432
443
  //#endregion
433
- export { TreeTickleEvent as A, ListNativeDragStartEvent as B, TreeItemDblClickEvent as C, TreeSelectDetail as D, TreeSearchHost as E, ListDragPreviewContext as F, ListDragPreviewRenderer as I, ListDragPreviewSourceResolver as L, TreeDataModelOptions as M, ListDragEntry as N, TreeSelectEvent as O, ListDragPreview as P, ListDragSource as R, TreeItemDblClickDetail as S, TreeRevealMode as T, TreeDropTarget as _, TreeComponent as a, TreeItemClickDetail as b, TreeDragContext as c, TreeDragStartEvent as d, TreeDropApplyContext as f, TreeDropPosition as g, TreeDropEvent as h, TreeCollapseEvent as i, TreeDataModel as j, TreeTickleDetail as k, TreeDragEndEvent as l, TreeDropDetail as m, TreeActivateEvent as n, TreeComponentEventMap as o, TreeDropContext as p, TreeCollapseDetail as r, TreeDndMode as s, TreeActivateDetail as t, TreeDragOverEvent as u, TreeExpandDetail as v, TreeNavigateOptions as w, TreeItemClickEvent as x, TreeExpandEvent as y, ListNativeDragStartDetail as z };
444
+ export { TreeTickleDetail as A, ListNativeDragStartDetail as B, TreeItemDblClickEvent as C, TreeSelectAllOptions as D, TreeSearchHost as E, ListDragPreview as F, ListDragPreviewContext as I, ListDragPreviewRenderer as L, TreeDataModel as M, TreeDataModelOptions as N, TreeSelectDetail as O, ListDragEntry as P, ListDragPreviewSourceResolver as R, TreeItemDblClickDetail as S, TreeRevealMode as T, ListNativeDragStartEvent as V, TreeDropTarget as _, TreeComponent as a, TreeItemClickDetail as b, TreeDragContext as c, TreeDragStartEvent as d, TreeDropApplyContext as f, TreeDropPosition as g, TreeDropEvent as h, TreeCollapseEvent as i, TreeTickleEvent as j, TreeSelectEvent as k, TreeDragEndEvent as l, TreeDropDetail as m, TreeActivateEvent as n, TreeComponentEventMap as o, TreeDropContext as p, TreeCollapseDetail as r, TreeDndMode as s, TreeActivateDetail as t, TreeDragOverEvent as u, TreeExpandDetail as v, TreeNavigateOptions as w, TreeItemClickEvent as x, TreeExpandEvent as y, ListDragSource as z };
package/dist/tree.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as TreeTickleEvent, D as TreeSelectDetail, M as TreeDataModelOptions, O as TreeSelectEvent, T as TreeRevealMode, _ as TreeDropTarget, b as TreeItemClickDetail, c as TreeDragContext, d as TreeDragStartEvent, g as TreeDropPosition, h as TreeDropEvent, i as TreeCollapseEvent, j as TreeDataModel, k as TreeTickleDetail, l as TreeDragEndEvent, m as TreeDropDetail, n as TreeActivateEvent, o as TreeComponentEventMap, p as TreeDropContext, r as TreeCollapseDetail, s as TreeDndMode, t as TreeActivateDetail, u as TreeDragOverEvent, v as TreeExpandDetail, w as TreeNavigateOptions, x as TreeItemClickEvent, y as TreeExpandEvent } from "./tree-component-C6UHO-w9.js";
1
+ import { A as TreeTickleDetail, M as TreeDataModel, N as TreeDataModelOptions, O as TreeSelectDetail, T as TreeRevealMode, _ as TreeDropTarget, b as TreeItemClickDetail, c as TreeDragContext, d as TreeDragStartEvent, g as TreeDropPosition, h as TreeDropEvent, i as TreeCollapseEvent, j as TreeTickleEvent, k as TreeSelectEvent, l as TreeDragEndEvent, m as TreeDropDetail, n as TreeActivateEvent, o as TreeComponentEventMap, p as TreeDropContext, r as TreeCollapseDetail, s as TreeDndMode, t as TreeActivateDetail, u as TreeDragOverEvent, v as TreeExpandDetail, w as TreeNavigateOptions, x as TreeItemClickEvent, y as TreeExpandEvent } from "./tree-component-DgfkxmVY.js";
2
2
  import { a as TreeItem, n as TreeExclusivity, o as TreeNode, r as TreeFilterPredicate, s as TreeSelectionFilter, t as LoadChildrenCallback } from "./types-Jky6oNAp.js";
3
- import { a as TreeDropVisibleRow, c as TreeListElement, d as TreeBaseElement, f as TreeBaseElementEventMap, i as TreeDropRowInfo, l as TreeCheckboxState, m as TreeConfig, n as TreeDropControllerConfig, o as TreeController, p as TreeVirtualize, r as TreeDropResolvedDrag, s as TreeControllerOptions, t as TreeDropController, u as TreeAnimation } from "./index-DEVyVIn8.js";
4
- export { type LoadChildrenCallback, type TreeActivateDetail, type TreeActivateEvent, TreeAnimation, TreeBaseElement, TreeBaseElementEventMap, type TreeCheckboxState, type TreeCollapseDetail, type TreeCollapseEvent, type TreeComponentEventMap, TreeConfig, TreeController, TreeControllerOptions, TreeDataModel, type TreeDataModelOptions, type TreeDndMode, type TreeDragContext, type TreeDragEndEvent, type TreeDragOverEvent, type TreeDragStartEvent, type TreeDropContext, TreeDropController, TreeDropControllerConfig, type TreeDropDetail, type TreeDropEvent, type TreeDropPosition, TreeDropResolvedDrag, TreeDropRowInfo, type TreeDropTarget, TreeDropVisibleRow, type TreeExclusivity, type TreeExpandDetail, type TreeExpandEvent, type TreeFilterPredicate, type TreeItem, type TreeItemClickDetail, type TreeItemClickEvent, TreeListElement, type TreeNavigateOptions, type TreeNode, type TreeRevealMode, type TreeSelectDetail, type TreeSelectEvent, type TreeSelectionFilter, type TreeTickleDetail, type TreeTickleEvent, TreeVirtualize };
3
+ import { a as TreeDropVisibleRow, c as TreeListElement, d as TreeBaseElement, f as TreeBaseElementEventMap, h as TreeConfig, i as TreeDropRowInfo, l as TreeCheckboxState, m as TreeListViewState, n as TreeDropControllerConfig, o as TreeController, p as TreeVirtualize, r as TreeDropResolvedDrag, s as TreeControllerOptions, t as TreeDropController, u as TreeAnimation } from "./index-D-lZNlHa.js";
4
+ export { type LoadChildrenCallback, type TreeActivateDetail, type TreeActivateEvent, TreeAnimation, TreeBaseElement, TreeBaseElementEventMap, type TreeCheckboxState, type TreeCollapseDetail, type TreeCollapseEvent, type TreeComponentEventMap, TreeConfig, TreeController, TreeControllerOptions, TreeDataModel, type TreeDataModelOptions, type TreeDndMode, type TreeDragContext, type TreeDragEndEvent, type TreeDragOverEvent, type TreeDragStartEvent, type TreeDropContext, TreeDropController, TreeDropControllerConfig, type TreeDropDetail, type TreeDropEvent, type TreeDropPosition, TreeDropResolvedDrag, TreeDropRowInfo, type TreeDropTarget, TreeDropVisibleRow, type TreeExclusivity, type TreeExpandDetail, type TreeExpandEvent, type TreeFilterPredicate, type TreeItem, type TreeItemClickDetail, type TreeItemClickEvent, TreeListElement, type TreeListViewState, type TreeNavigateOptions, type TreeNode, type TreeRevealMode, type TreeSelectDetail, type TreeSelectEvent, type TreeSelectionFilter, type TreeTickleDetail, type TreeTickleEvent, TreeVirtualize };
package/dist/tree.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as TreeDataModel, i as TreeDropController, n as TreeListElement, r as TreeBaseElement, t as TreeController } from "./tree-D8VxvR9u.js";
1
+ import { a as TreeDataModel, i as TreeDropController, n as TreeListElement, r as TreeBaseElement, t as TreeController } from "./tree-DAlgvaHB.js";
2
2
  export { TreeBaseElement, TreeController, TreeDataModel, TreeDropController, TreeListElement };
@@ -0,0 +1,87 @@
1
+ //#region src/common/view-state/types.d.ts
2
+ /**
3
+ * Shared view-state contract for list-like components.
4
+ *
5
+ * View state is everything about *how* a component is showing its data —
6
+ * selection, expansion, scroll, column sizes — kept separate from the data
7
+ * itself. It is plain JSON (arrays and records, never Sets or Maps) so a host
8
+ * can `JSON.stringify` it straight into whatever storage it likes. Components
9
+ * never persist it themselves; see `bindViewState()`.
10
+ *
11
+ * Every field is keyed by the stable item / column / group key, never by
12
+ * index, so state can be re-applied to data that has been rebuilt, re-sorted
13
+ * or streamed in over time. Keys the current data doesn't contain are kept
14
+ * as pending and applied once a matching item appears.
15
+ */
16
+ /** Current schema version. Bump on breaking shape changes. */
17
+ declare const VIEW_STATE_VERSION = 1;
18
+ /** Name of the debounced change event every view-stateful component fires. */
19
+ declare const VIEW_STATE_CHANGE = "view-state-change";
20
+ /**
21
+ * Where the viewport is scrolled to. `anchor` is the preferred form: the key
22
+ * of the first visible item plus how far (px) the viewport top sits below
23
+ * that item's start. It survives items being inserted above. `top` / `left`
24
+ * are raw pixel offsets, used when there is no keyed item to anchor to.
25
+ */
26
+ type ScrollState = {
27
+ readonly top: number;
28
+ readonly left?: number;
29
+ readonly anchor?: {
30
+ readonly key: string;
31
+ readonly offset: number;
32
+ };
33
+ };
34
+ /** Fields shared by all view states. Components extend this with their own. */
35
+ type ViewStateBase = {
36
+ readonly v: typeof VIEW_STATE_VERSION;
37
+ /** Component kind, e.g. `tree-list`. Mismatched states are ignored. */
38
+ readonly kind: string;
39
+ /** Selected item keys. In `checked` interaction modes this is the checked set. */
40
+ readonly selected?: readonly string[];
41
+ /** Keyboard cursor (tickled / focused item) key. */
42
+ readonly focus?: string;
43
+ readonly scroll?: ScrollState;
44
+ /**
45
+ * Explicit open/closed choices for expandable things (tree branches, groups),
46
+ * keyed by item or group key. A missing key means "use the default".
47
+ */
48
+ readonly expanded?: Readonly<Record<string, boolean>>;
49
+ };
50
+ /**
51
+ * What triggered a `view-state-change`:
52
+ * - `user` — a direct interaction (click, key, drag, scroll)
53
+ * - `data` — the data changed and the component adjusted (e.g. pruned focus)
54
+ * - `restore` — pending state was applied to newly-arrived items, or `setViewState()` ran
55
+ */
56
+ type ViewStateChangeReason = `user` | `data` | `restore`;
57
+ type ViewStateChangeDetail<S extends ViewStateBase = ViewStateBase> = {
58
+ readonly state: S;
59
+ readonly reason: ViewStateChangeReason;
60
+ };
61
+ type ViewStateChangeEvent<S extends ViewStateBase = ViewStateBase> = CustomEvent<ViewStateChangeDetail<S>>;
62
+ type GetViewStateOptions<S extends ViewStateBase> = {
63
+ /** Only include these fields (plus `v` and `kind`). Default: all. */
64
+ readonly include?: ReadonlyArray<Exclude<keyof S, `v` | `kind`>>;
65
+ /**
66
+ * Include pending state for keys not (yet) present in the data. Default
67
+ * `true` — leaving it out means a save made mid-rebuild overwrites the
68
+ * stored state with a partial one.
69
+ */
70
+ readonly includePending?: boolean;
71
+ };
72
+ /** Implemented by every component that supports view-state snapshot / restore. */
73
+ type ViewStateful<S extends ViewStateBase = ViewStateBase> = {
74
+ /** Snapshot the current view state as plain JSON. */
75
+ getViewState: (options?: GetViewStateOptions<S>) => S;
76
+ /**
77
+ * Apply a (possibly partial) view state. Only fields present are applied;
78
+ * absent fields are left as they are. Keys not in the current data are kept
79
+ * pending and applied when matching items appear. A state whose `kind` or
80
+ * `v` doesn't match is ignored with a console warning.
81
+ */
82
+ setViewState: (state: Partial<S>) => void;
83
+ /** Drop all pending (not-yet-matched) state. */
84
+ clearPendingViewState: () => void;
85
+ };
86
+ //#endregion
87
+ export { ViewStateBase as a, ViewStateChangeReason as c, VIEW_STATE_VERSION as i, ViewStateful as l, ScrollState as n, ViewStateChangeDetail as o, VIEW_STATE_CHANGE as r, ViewStateChangeEvent as s, GetViewStateOptions as t };