@ixfx/components 0.15.4 → 0.16.0

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 (101) hide show
  1. package/bundle/index.d.ts +1223 -48
  2. package/bundle/index.js +875 -700
  3. package/dist/ac-text.d.ts +1 -1
  4. package/dist/{ac-token-Cq7lsYf-.d.ts → ac-token-qEs3FsQv.d.ts} +1 -1
  5. package/dist/ac-token.d.ts +1 -1
  6. package/dist/colour-picker.d.ts +1 -1
  7. package/dist/crumb-navigation-BbqfmkYs.d.ts +147 -0
  8. package/dist/crumb-navigation-YnFVFqrx.js +1290 -0
  9. package/dist/crumbs.d.ts +2 -115
  10. package/dist/crumbs.js +1 -1179
  11. package/dist/{data-grid-CbiubdG2.d.ts → data-grid-CIG2DVip.d.ts} +58 -9
  12. package/dist/{data-grid-Dx3l3dxw.js → data-grid-rMkLX2qo.js} +630 -215
  13. package/dist/data-grid.d.ts +3 -3
  14. package/dist/data-grid.js +1 -1
  15. package/dist/{detail-list-ClkMV0SN.d.ts → detail-list-6iMTNP4N.d.ts} +35 -5
  16. package/dist/{detail-list-q8bs67BM.js → detail-list-C4pDSoI8.js} +218 -7
  17. package/dist/detail-list.d.ts +4 -4
  18. package/dist/detail-list.js +1 -1
  19. package/dist/{flat-list-0xTZdXzh.d.ts → flat-list-JPgQSmLW.d.ts} +28 -5
  20. package/dist/flat-list.d.ts +2 -2
  21. package/dist/flat-list.js +123 -4
  22. package/dist/{grid-list-y6dWJYu3.js → grid-list-CdEkScn-.js} +276 -75
  23. package/dist/{grid-list-BnWJUIBC.d.ts → grid-list-D6n7WH8l.d.ts} +128 -22
  24. package/dist/grid-list.d.ts +3 -3
  25. package/dist/grid-list.js +1 -1
  26. package/dist/{grouped-item-lister-Bhyo-dkH.d.ts → grouped-item-lister-DETte0Dh.d.ts} +1 -1
  27. package/dist/grouped-item-lister.d.ts +1 -1
  28. package/dist/{icon-DR_3rSyZ.d.ts → icon-CDGprSdE.d.ts} +1 -1
  29. package/dist/icons.d.ts +2 -2
  30. package/dist/incr-search.d.ts +1 -1
  31. package/dist/index-9ttcdwlL.d.ts +71 -0
  32. package/dist/{index-BAuqR9El.d.ts → index-Bx0BXPxI.d.ts} +52 -6
  33. package/dist/index-CYRc6Dah.d.ts +475 -0
  34. package/dist/{index-garxxqgV.d.ts → index-CYndvTWH.d.ts} +1 -1
  35. package/dist/{index-BUB5SICW.d.ts → index-CoqtMSd9.d.ts} +1 -1
  36. package/dist/{index-Bz3loIAf.d.ts → index-DN2BWctP.d.ts} +1 -1
  37. package/dist/{index-BPTuCRGb.d.ts → index-Dr80Zdl6.d.ts} +2 -2
  38. package/dist/{index-cnaRPQPp.d.ts → index-DxyyVqzA.d.ts} +2 -2
  39. package/dist/{index-CJ5fshD3.d.ts → index-UvnoZUAo.d.ts} +1 -1
  40. package/dist/index.d.ts +380 -33
  41. package/dist/index.js +2247 -866
  42. package/dist/{labelled-input-base-Dp_9KP0G.d.ts → labelled-input-base-DiTme1JO.d.ts} +1 -1
  43. package/dist/labelled-radial-input.d.ts +2 -2
  44. package/dist/labelled-range-input.d.ts +1 -1
  45. package/dist/labelled-slider-input.d.ts +1 -1
  46. package/dist/list-group-header.d.ts +1 -1
  47. package/dist/{list-native-drag-controller-O2Nruqpi.d.ts → list-native-drag-controller-D_UrXipS.d.ts} +1 -1
  48. package/dist/{list-selection-controller-BeE70lbB.js → list-selection-controller-5L0Nj9tR.js} +87 -2
  49. package/dist/{menu-item-B0zqw2xp.d.ts → menu-item-bF6narIz.d.ts} +1 -1
  50. package/dist/menu.d.ts +2 -2
  51. package/dist/miller-BFRfn0ve.js +2237 -0
  52. package/dist/miller.d.ts +4 -437
  53. package/dist/miller.js +1 -1815
  54. package/dist/panel.d.ts +1 -1
  55. package/dist/pending-BGidHppL.js +91 -0
  56. package/dist/scroll-hover-guard-Cjw6179Q.js +35 -0
  57. package/dist/{split-layout-C5SYbDrq.d.ts → split-layout-CophkNeU.d.ts} +42 -4
  58. package/dist/{split-layout-Deoxy47d.js → split-layout-DTY4PJRp.js} +251 -19
  59. package/dist/split-layout.d.ts +1 -1
  60. package/dist/split-layout.js +1 -1
  61. package/dist/sunburst-tree.d.ts +2 -0
  62. package/dist/sunburst-tree.js +2 -0
  63. package/dist/sunbursttree-list-B_VxOHlo.js +1556 -0
  64. package/dist/sunbursttree-list-D6j5BxVQ.d.ts +303 -0
  65. package/dist/{tab-list-wC0xNz1b.d.ts → tab-list-Df371rqw.d.ts} +1 -1
  66. package/dist/tabs.d.ts +1 -1
  67. package/dist/{titlebar-B5zSTZnF.d.ts → titlebar-Tqu-VvMU.d.ts} +1 -1
  68. package/dist/titlebar.d.ts +1 -1
  69. package/dist/tree-CftHwtEb.js +146 -0
  70. package/dist/{tree-D8VxvR9u.js → tree-Crdpl4nc.js} +275 -47
  71. package/dist/{tree-component-C6UHO-w9.d.ts → tree-component-DgfkxmVY.d.ts} +19 -8
  72. package/dist/tree.d.ts +3 -3
  73. package/dist/tree.js +1 -1
  74. package/dist/types-LU1u0CB8.d.ts +87 -0
  75. package/dist/vertical-list-1V1Vg2O5.js +1993 -0
  76. package/dist/{vertical-list-B8FoU-pU.d.ts → vertical-list-BPDmZx6T.d.ts} +31 -3
  77. package/dist/vertical-list.d.ts +3 -3
  78. package/dist/vertical-list.js +1 -1789
  79. package/dist/view-state-controller-BdyXWUUM.js +305 -0
  80. package/docs-user/README.md +3 -0
  81. package/docs-user/crumbs.md +27 -0
  82. package/docs-user/data-grid.md +77 -5
  83. package/docs-user/detail-list.md +54 -0
  84. package/docs-user/dock.md +54 -12
  85. package/docs-user/flat-list.md +27 -0
  86. package/docs-user/grid-list.md +64 -11
  87. package/docs-user/hyperbolic-tree.md +31 -4
  88. package/docs-user/icicle-tree.md +36 -0
  89. package/docs-user/index.json +17 -2
  90. package/docs-user/llms.txt +3 -0
  91. package/docs-user/miller.md +52 -21
  92. package/docs-user/multicol-list.md +50 -8
  93. package/docs-user/split-layout.md +45 -17
  94. package/docs-user/sunburst-tree.md +223 -0
  95. package/docs-user/tree.md +46 -7
  96. package/docs-user/treemap.md +32 -0
  97. package/docs-user/twosplit-layout.md +22 -0
  98. package/docs-user/user-catalog.md +1 -1
  99. package/docs-user/vertical-list.md +55 -7
  100. package/llms.txt +3 -0
  101. package/package.json +5 -1
@@ -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 };