@ixfx/components 0.15.5 → 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 (76) hide show
  1. package/bundle/index.d.ts +917 -44
  2. package/bundle/index.js +702 -696
  3. package/dist/crumb-navigation-BbqfmkYs.d.ts +147 -0
  4. package/dist/crumb-navigation-YnFVFqrx.js +1290 -0
  5. package/dist/crumbs.d.ts +2 -115
  6. package/dist/crumbs.js +1 -1179
  7. package/dist/{data-grid-D7qzmMMp.d.ts → data-grid-CIG2DVip.d.ts} +45 -3
  8. package/dist/{data-grid-C1sZX6n9.js → data-grid-rMkLX2qo.js} +593 -206
  9. package/dist/data-grid.d.ts +3 -3
  10. package/dist/data-grid.js +1 -1
  11. package/dist/{detail-list-CKIKlszv.d.ts → detail-list-6iMTNP4N.d.ts} +34 -4
  12. package/dist/{detail-list-q8bs67BM.js → detail-list-C4pDSoI8.js} +218 -7
  13. package/dist/detail-list.d.ts +4 -4
  14. package/dist/detail-list.js +1 -1
  15. package/dist/{flat-list-DXMyDiSH.d.ts → flat-list-JPgQSmLW.d.ts} +27 -4
  16. package/dist/flat-list.d.ts +2 -2
  17. package/dist/flat-list.js +123 -4
  18. package/dist/{grid-list-y6dWJYu3.js → grid-list-CdEkScn-.js} +276 -75
  19. package/dist/{grid-list-0e7snW6t.d.ts → grid-list-D6n7WH8l.d.ts} +128 -22
  20. package/dist/grid-list.d.ts +3 -3
  21. package/dist/grid-list.js +1 -1
  22. package/dist/incr-search.d.ts +1 -1
  23. package/dist/index-9ttcdwlL.d.ts +71 -0
  24. package/dist/{index-DEVyVIn8.d.ts → index-Bx0BXPxI.d.ts} +52 -6
  25. package/dist/index-CYRc6Dah.d.ts +475 -0
  26. package/dist/{index-KN2MW_xD.d.ts → index-Dr80Zdl6.d.ts} +1 -1
  27. package/dist/index.d.ts +334 -23
  28. package/dist/index.js +2247 -867
  29. package/dist/{list-native-drag-controller-O2Nruqpi.d.ts → list-native-drag-controller-D_UrXipS.d.ts} +1 -1
  30. package/dist/{list-selection-controller-BeE70lbB.js → list-selection-controller-5L0Nj9tR.js} +87 -2
  31. package/dist/miller-BFRfn0ve.js +2237 -0
  32. package/dist/miller.d.ts +4 -437
  33. package/dist/miller.js +1 -1815
  34. package/dist/pending-BGidHppL.js +91 -0
  35. package/dist/scroll-hover-guard-Cjw6179Q.js +35 -0
  36. package/dist/{split-layout-JK3xWVX2.d.ts → split-layout-CophkNeU.d.ts} +41 -3
  37. package/dist/{split-layout-Deoxy47d.js → split-layout-DTY4PJRp.js} +251 -19
  38. package/dist/split-layout.d.ts +1 -1
  39. package/dist/split-layout.js +1 -1
  40. package/dist/sunburst-tree.d.ts +2 -2
  41. package/dist/sunburst-tree.js +1 -1
  42. package/dist/{sunbursttree-list-yXwS-uEI.js → sunbursttree-list-B_VxOHlo.js} +298 -79
  43. package/dist/{sunbursttree-list--Z0uyh8O.d.ts → sunbursttree-list-D6j5BxVQ.d.ts} +40 -3
  44. package/dist/tree-CftHwtEb.js +146 -0
  45. package/dist/{tree-D8VxvR9u.js → tree-Crdpl4nc.js} +275 -47
  46. package/dist/{tree-component-C6UHO-w9.d.ts → tree-component-DgfkxmVY.d.ts} +19 -8
  47. package/dist/tree.d.ts +3 -3
  48. package/dist/tree.js +1 -1
  49. package/dist/types-LU1u0CB8.d.ts +87 -0
  50. package/dist/vertical-list-1V1Vg2O5.js +1993 -0
  51. package/dist/{vertical-list-D8MksoTp.d.ts → vertical-list-BPDmZx6T.d.ts} +31 -3
  52. package/dist/vertical-list.d.ts +3 -3
  53. package/dist/vertical-list.js +1 -1789
  54. package/dist/view-state-controller-BdyXWUUM.js +305 -0
  55. package/docs-user/README.md +2 -0
  56. package/docs-user/crumbs.md +27 -0
  57. package/docs-user/data-grid.md +66 -1
  58. package/docs-user/detail-list.md +54 -0
  59. package/docs-user/dock.md +54 -12
  60. package/docs-user/flat-list.md +27 -0
  61. package/docs-user/grid-list.md +64 -11
  62. package/docs-user/hyperbolic-tree.md +31 -4
  63. package/docs-user/icicle-tree.md +36 -0
  64. package/docs-user/index.json +12 -2
  65. package/docs-user/llms.txt +2 -0
  66. package/docs-user/miller.md +52 -21
  67. package/docs-user/multicol-list.md +50 -8
  68. package/docs-user/split-layout.md +45 -17
  69. package/docs-user/sunburst-tree.md +32 -2
  70. package/docs-user/tree.md +45 -6
  71. package/docs-user/treemap.md +32 -0
  72. package/docs-user/twosplit-layout.md +22 -0
  73. package/docs-user/user-catalog.md +1 -1
  74. package/docs-user/vertical-list.md +55 -7
  75. package/llms.txt +2 -0
  76. package/package.json +1 -1
@@ -1,13 +1,61 @@
1
- import { B as ListNativeDragStartEvent, I as ListDragPreviewRenderer, L as ListDragPreviewSourceResolver } from "./tree-component-C6UHO-w9.js";
2
- import { S as ListSearchController } from "./index-KN2MW_xD.js";
1
+ import { L as ListDragPreviewRenderer, R as ListDragPreviewSourceResolver, V as ListNativeDragStartEvent } from "./tree-component-DgfkxmVY.js";
2
+ import { a as ViewStateBase, t as GetViewStateOptions } from "./types-LU1u0CB8.js";
3
+ import "./index-9ttcdwlL.js";
4
+ import { S as ListSearchController } from "./index-Dr80Zdl6.js";
3
5
  import "./pan-text-CoYmt2qd.js";
4
6
  import { i as ListGroupChangeEvent, n as ListGroupBy, o as ListGroupInfo, s as ListGroupLabel, u as ListGroupToggleEvent } from "./grouping-CUKgmkMm.js";
5
7
  import { i as ListInteractionMode, l as ListSelectionMode } from "./list-selection-types-PjKdhF-a.js";
6
8
  import "./list-group-header.js";
7
- import "./list-native-drag-controller-O2Nruqpi.js";
9
+ import "./list-native-drag-controller-D_UrXipS.js";
8
10
  import { i as TickledItem, n as TickledController } from "./tickled-controller-DodxD3eQ.js";
9
11
  import { LitElement, PropertyValues, ReactiveController, ReactiveControllerHost, html } from "lit";
10
12
  import { CommandRegistry } from "@clinth/ui-commands";
13
+ //#region src/common/view-state/pending.d.ts
14
+ /**
15
+ * Pure helpers for *pending* view state: keyed intent that is waiting for a
16
+ * matching item to appear in the data.
17
+ *
18
+ * Pending sets / maps are insertion-ordered (oldest first) and capped so a
19
+ * long-running app with churning data can't grow them without bound.
20
+ */
21
+ /** Default cap on pending keys per facet. Oldest entries are dropped first. */
22
+ declare const MAX_PENDING_KEYS = 2000;
23
+ type PendingKeys = ReadonlySet<string>;
24
+ type PendingFlags = ReadonlyMap<string, boolean>;
25
+ declare const EMPTY_KEYS: PendingKeys;
26
+ declare const EMPTY_FLAGS: PendingFlags;
27
+ /**
28
+ * Split `keys` into those `has` reports present (to apply now) and those
29
+ * still missing (to keep pending). Returns the input set untouched as
30
+ * `missing` when nothing matched, so callers can cheaply detect "no change".
31
+ */
32
+ declare function partitionKeys(keys: PendingKeys, has: (key: string) => boolean): {
33
+ readonly present: readonly string[];
34
+ readonly missing: PendingKeys;
35
+ };
36
+ /** As {@link partitionKeys}, for keyed boolean flags (e.g. expanded / collapsed). */
37
+ declare function partitionFlags(flags: PendingFlags, has: (key: string) => boolean): {
38
+ readonly present: ReadonlyArray<readonly [string, boolean]>;
39
+ readonly missing: PendingFlags;
40
+ };
41
+ /** Keep at most `max` keys, dropping the oldest. */
42
+ declare function capKeys(keys: PendingKeys, max?: number): PendingKeys;
43
+ /** Keep at most `max` flags, dropping the oldest. */
44
+ declare function capFlags(flags: PendingFlags, max?: number): PendingFlags;
45
+ /** `flags` without `key` (same instance when absent). */
46
+ declare function withoutFlag(flags: PendingFlags, key: string): PendingFlags;
47
+ /** JSON record → flags map. Non-boolean values are ignored. */
48
+ declare function flagsFromRecord(record: Readonly<Record<string, boolean>> | undefined): PendingFlags;
49
+ /**
50
+ * Combine pending and live flags into one JSON record. Live entries win when
51
+ * a key is in both (it shouldn't be — matched keys leave pending).
52
+ */
53
+ declare function flagsToRecord(...sources: Array<Iterable<readonly [string, boolean]>>): Record<string, boolean>;
54
+ /** Pending keys followed by live keys, de-duplicated, as a JSON array. */
55
+ declare function keysToArray(...sources: Array<Iterable<string>>): string[];
56
+ /** Map `keys` to `true` flags — for components that record a plain key set. */
57
+ declare function keysAsFlags(keys: Iterable<string>, value?: boolean): Iterable<readonly [string, boolean]>;
58
+ //#endregion
11
59
  //#region src/interaction/list-drag-select-controller.d.ts
12
60
  /** Surface-relative rectangle: origin at the scroll container's top-left. */
13
61
  type DragSelectRect = {
@@ -220,6 +268,29 @@ declare class ListSelectionController<T> {
220
268
  * fires once if anything changed.
221
269
  */
222
270
  removeKeys(keys: Iterable<string>, resolve: (key: string) => T | undefined): void;
271
+ /** Selected keys waiting for their items to appear. */
272
+ get pendingKeys(): PendingKeys;
273
+ /**
274
+ * Restore a selection by key: keys that resolve are selected now (one
275
+ * `onChange`), the rest are kept pending for `resolvePending()`. Replaces
276
+ * any previous selection and pending keys. Unlike `selectKeys`, this works
277
+ * in `selectionMode="none"` only to the extent of holding keys pending.
278
+ */
279
+ restoreKeys(keys: Iterable<string>, resolve: (key: string) => T | undefined): void;
280
+ /**
281
+ * Select pending keys whose items now resolve (call after items are added
282
+ * or rebuilt). Fires `onChange` once when anything was selected; returns
283
+ * whether it did.
284
+ */
285
+ resolvePending(resolve: (key: string) => T | undefined): boolean;
286
+ /**
287
+ * Silently deselect `items` that left the data, keeping their keys pending
288
+ * so they are re-selected if the same keys come back (data reset, re-fetch).
289
+ * No `onChange`; returns whether the selection changed.
290
+ */
291
+ demote(items: Iterable<T>): boolean;
292
+ /** Drop pending keys without touching the live selection. */
293
+ clearPending(): void;
223
294
  /** Route a click on `item` according to the current interaction mode. */
224
295
  handleClick(item: T, gesture: ListSelectionGesture): void;
225
296
  /** Route a Space keypress on `item` according to the current interaction mode. */
@@ -234,7 +305,8 @@ declare class ListSelectionController<T> {
234
305
  remap(fn: (item: T) => T): void;
235
306
  /**
236
307
  * Hard reset: empty the selection and clear the anchor without firing
237
- * `onChange` (e.g. when all items are removed).
308
+ * `onChange` (e.g. when all items are removed). Keyed selected items become
309
+ * pending, so a rebuilt item set re-selects them via `resolvePending()`.
238
310
  */
239
311
  reset(): void;
240
312
  /**
@@ -404,6 +476,23 @@ interface GridListFullElementEventMap extends GridListElementEventMap {
404
476
  'list-native-drag-start': ListNativeDragStartEvent;
405
477
  }
406
478
  //#endregion
479
+ //#region src/grid-list/grid-list-view-state.d.ts
480
+ /**
481
+ * Pure view-state helpers for `ixfx-grid-list`. The component runs
482
+ * {@link reconcileGroups} whenever its item set or grouping changes, so a
483
+ * group's collapsed state survives the group disappearing (data reset,
484
+ * filter, streaming) and comes back when the group does. Scroll is captured
485
+ * and restored arithmetically from the virtual layout, along the main axis
486
+ * (`scrollLeft` in `row` orientation, `scrollTop` otherwise).
487
+ */
488
+ /**
489
+ * `ixfx-grid-list` view state. All fields are the shared base fields:
490
+ * `selected` (item keys), `focus` (keyboard cursor key), `scroll`, and
491
+ * `expanded` (group key → open; groups default open, so only `false` entries
492
+ * are ever recorded).
493
+ */
494
+ type GridListViewState = ViewStateBase;
495
+ //#endregion
407
496
  //#region src/grid-list/grid-list.d.ts
408
497
  declare class GridListElement<T = unknown> extends LitElement {
409
498
  #private;
@@ -417,18 +506,17 @@ declare class GridListElement<T = unknown> extends LitElement {
417
506
  */
418
507
  disableHoverTickle: boolean;
419
508
  /**
420
- * Ignore hover-target changes caused by scrolling. With virtualisation, a
421
- * wheel / trackpad gesture replaces the cell beneath a stationary pointer,
422
- * and the freshly rendered cell's `pointerenter` would move the cursor and
423
- * emit `list-tickle` even though the pointer never moved. With this set,
424
- * `pointerenter`-driven tickling is suppressed while a scroll gesture is
425
- * active — the host also carries a `data-scroll-hover-suppress` attribute
426
- * that gates the CSS `:hover` highlight, so the visual cursor holds still
427
- * too. Hover resumes on the next real pointer movement, or after the pointer
428
- * leaves and re-enters the list. Click selection, keyboard navigation, and
429
- * `focusKey()` are unaffected.
430
- */
431
- disableScrollHoverTickle: boolean;
509
+ * Let hover follow cells that scroll beneath a stationary pointer. Off by
510
+ * default: with virtualisation, a wheel / trackpad gesture replaces the cell
511
+ * beneath the pointer, and following its `pointerenter` would move the
512
+ * cursor and emit `list-tickle` even though the pointer never moved. While a
513
+ * scroll gesture is active those enters are ignored and the host carries a
514
+ * `data-scroll-hover-suppress` attribute that gates the CSS `:hover`
515
+ * highlight, so the visual cursor holds still too. Hover resumes on the next
516
+ * real pointer movement, or after the pointer leaves the list. Click
517
+ * selection, keyboard navigation, and `focusKey()` are unaffected.
518
+ */
519
+ scrollHoverTickle: boolean;
432
520
  itemSize: number;
433
521
  gap: number;
434
522
  /**
@@ -618,8 +706,9 @@ declare class GridListElement<T = unknown> extends LitElement {
618
706
  removeSelectedKeys(keys: Iterable<string>): void;
619
707
  /**
620
708
  * Data mode: replace the whole item array. Selection and cursor keep any key
621
- * that is still present; keys that vanish are dropped (one `list-select`).
622
- * A no-op in element mode.
709
+ * that is still present; keys that vanish are deselected silently and held
710
+ * as pending view state, so they come back if the key reappears. A no-op in
711
+ * element mode.
623
712
  */
624
713
  setItems(items: readonly T[]): void;
625
714
  /**
@@ -636,19 +725,36 @@ declare class GridListElement<T = unknown> extends LitElement {
636
725
  */
637
726
  updateItem(key: string, item: T): void;
638
727
  /**
639
- * Data mode: remove the items carrying these keys. Removed keys are dropped
640
- * from selection and cursor (via the `items` change). A no-op in element mode.
728
+ * Data mode: remove the items carrying these keys. Removed keys leave the
729
+ * selection and cursor silently (via the `items` change) and are held as
730
+ * pending view state. A no-op in element mode.
641
731
  */
642
732
  removeItems(keys: Iterable<string>): void;
643
733
  /**
644
734
  * Data mode: drop every item. Selection and cursor are reset and one
645
- * `list-select` with empty sets is emitted. A no-op in element mode.
735
+ * `list-select` with empty sets is emitted; their keys are held as pending
736
+ * view state, so re-adding the same keys restores them. A no-op in element
737
+ * mode.
646
738
  */
647
739
  clearItems(): void;
648
740
  /** Move the cursor to the item with this key and scroll it into view. */
649
741
  focusKey(key: string): void;
650
742
  /** The key of the item under the cursor, or `undefined`. */
651
743
  get tickledKey(): string | undefined;
744
+ /**
745
+ * Snapshot selection, collapsed groups, keyboard cursor and scroll as plain
746
+ * JSON, keyed by item / group key. Includes pending state for keys not
747
+ * currently present unless `includePending: false`.
748
+ */
749
+ getViewState(options?: GetViewStateOptions<GridListViewState>): GridListViewState;
750
+ /**
751
+ * Apply saved view state. Fields present replace the current ones; keys
752
+ * (items or groups) that aren't present yet are applied as they appear.
753
+ * Restored selection fires `list-select`.
754
+ */
755
+ setViewState(state: Partial<GridListViewState>): void;
756
+ /** Drop view state still waiting for its keys to appear. */
757
+ clearPendingViewState(): void;
652
758
  /** Element mode: the light-DOM element carrying `key`, or `undefined`. */
653
759
  getItem(key: string): Element | undefined;
654
760
  /** Element mode: the light-DOM element at effective index `index`. */
@@ -689,4 +795,4 @@ interface GridListElement {
689
795
  addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
690
796
  }
691
797
  //#endregion
692
- export { DragSelectRect as A, TreeKeyboardNavControllerConfig as C, ListSelectionGesture as D, ListSelectionControllerConfig as E, ListDragSelectControllerConfig as M, ListSelectionModes as O, TreeKeyboardNavController as S, ListSelectionController as T, GridListTickleDetail as _, GridListCaptionBackdrop as a, GridListViewportChangeEvent as b, GridListDataAdapter as c, GridListItemClickDetail as d, GridListItemClickEvent as f, GridListSelectEvent as g, GridListSelectDetail as h, GridListCaptionAlign as i, ListDragSelectController as j, isMultiMode as k, GridListElementEventMap as l, GridListOrientation as m, GridListActivateDetail as n, GridListCaptionPosition as o, GridListItemEventDetail as p, GridListActivateEvent as r, GridListCaptionStyle as s, GridListElement as t, GridListFullElementEventMap as u, GridListTickleEvent as v, TreeKeyboardNavItemId as w, TreeKeyboardNavCallbacks as x, GridListViewportChangeDetail as y };
798
+ export { isMultiMode as A, capKeys as B, TreeKeyboardNavController as C, ListSelectionControllerConfig as D, ListSelectionController as E, EMPTY_KEYS as F, partitionFlags as G, flagsToRecord as H, MAX_PENDING_KEYS as I, partitionKeys as K, PendingFlags as L, ListDragSelectController as M, ListDragSelectControllerConfig as N, ListSelectionGesture as O, EMPTY_FLAGS as P, PendingKeys as R, TreeKeyboardNavCallbacks as S, TreeKeyboardNavItemId as T, keysAsFlags as U, flagsFromRecord as V, keysToArray as W, GridListSelectEvent as _, GridListCaptionAlign as a, GridListViewportChangeDetail as b, GridListCaptionStyle as c, GridListFullElementEventMap as d, GridListItemClickDetail as f, GridListSelectDetail as g, GridListOrientation as h, GridListActivateEvent as i, DragSelectRect as j, ListSelectionModes as k, GridListDataAdapter as l, GridListItemEventDetail as m, GridListViewState as n, GridListCaptionBackdrop as o, GridListItemClickEvent as p, withoutFlag as q, GridListActivateDetail as r, GridListCaptionPosition as s, GridListElement as t, GridListElementEventMap as u, GridListTickleDetail as v, TreeKeyboardNavControllerConfig as w, GridListViewportChangeEvent as x, GridListTickleEvent as y, capFlags as z };
@@ -1,5 +1,5 @@
1
- import { B as ListNativeDragStartEvent, F as ListDragPreviewContext, I as ListDragPreviewRenderer, N as ListDragEntry, P as ListDragPreview, R as ListDragSource, z as ListNativeDragStartDetail } from "./tree-component-C6UHO-w9.js";
1
+ import { B as ListNativeDragStartDetail, F as ListDragPreview, I as ListDragPreviewContext, L as ListDragPreviewRenderer, P as ListDragEntry, V as ListNativeDragStartEvent, z as ListDragSource } from "./tree-component-DgfkxmVY.js";
2
+ import { _ as GridListSelectEvent, a as GridListCaptionAlign, b as GridListViewportChangeDetail, c as GridListCaptionStyle, d as GridListFullElementEventMap, f as GridListItemClickDetail, g as GridListSelectDetail, h as GridListOrientation, i as GridListActivateEvent, l as GridListDataAdapter, m as GridListItemEventDetail, n as GridListViewState, o as GridListCaptionBackdrop, p as GridListItemClickEvent, r as GridListActivateDetail, s as GridListCaptionPosition, t as GridListElement, u as GridListElementEventMap, v as GridListTickleDetail, x as GridListViewportChangeEvent, y as GridListTickleEvent } from "./grid-list-D6n7WH8l.js";
2
3
  import { i as ListGroupChangeEvent, l as ListGroupToggleDetail, n as ListGroupBy, o as ListGroupInfo, r as ListGroupChangeDetail, s as ListGroupLabel, u as ListGroupToggleEvent } from "./grouping-CUKgmkMm.js";
3
4
  import { i as ListInteractionMode, l as ListSelectionMode } from "./list-selection-types-PjKdhF-a.js";
4
- import { _ as GridListTickleDetail, a as GridListCaptionBackdrop, b as GridListViewportChangeEvent, c as GridListDataAdapter, d as GridListItemClickDetail, f as GridListItemClickEvent, g as GridListSelectEvent, h as GridListSelectDetail, i as GridListCaptionAlign, l as GridListElementEventMap, m as GridListOrientation, n as GridListActivateDetail, o as GridListCaptionPosition, p as GridListItemEventDetail, r as GridListActivateEvent, s as GridListCaptionStyle, t as GridListElement, u as GridListFullElementEventMap, v as GridListTickleEvent, y as GridListViewportChangeDetail } from "./grid-list-0e7snW6t.js";
5
- export { type GridListActivateDetail, type GridListActivateEvent, type GridListCaptionAlign, type GridListCaptionBackdrop, type GridListCaptionPosition, type GridListCaptionStyle, type GridListDataAdapter, GridListElement, type GridListElementEventMap, type GridListFullElementEventMap, type GridListItemClickDetail, type GridListItemClickEvent, type GridListItemEventDetail, type GridListOrientation, type GridListSelectDetail, type GridListSelectEvent, type GridListTickleDetail, type GridListTickleEvent, type GridListViewportChangeDetail, type GridListViewportChangeEvent, type ListDragEntry, type ListDragPreview, type ListDragPreviewContext, type ListDragPreviewRenderer, type ListDragSource, type ListGroupBy, type ListGroupChangeDetail, type ListGroupChangeEvent, type ListGroupInfo, type ListGroupLabel, type ListGroupToggleDetail, type ListGroupToggleEvent, type ListInteractionMode, type ListNativeDragStartDetail, type ListNativeDragStartEvent, type ListSelectionMode };
5
+ export { type GridListActivateDetail, type GridListActivateEvent, type GridListCaptionAlign, type GridListCaptionBackdrop, type GridListCaptionPosition, type GridListCaptionStyle, type GridListDataAdapter, GridListElement, type GridListElementEventMap, type GridListFullElementEventMap, type GridListItemClickDetail, type GridListItemClickEvent, type GridListItemEventDetail, type GridListOrientation, type GridListSelectDetail, type GridListSelectEvent, type GridListTickleDetail, type GridListTickleEvent, type GridListViewState, type GridListViewportChangeDetail, type GridListViewportChangeEvent, type ListDragEntry, type ListDragPreview, type ListDragPreviewContext, type ListDragPreviewRenderer, type ListDragSource, type ListGroupBy, type ListGroupChangeDetail, type ListGroupChangeEvent, type ListGroupInfo, type ListGroupLabel, type ListGroupToggleDetail, type ListGroupToggleEvent, type ListInteractionMode, type ListNativeDragStartDetail, type ListNativeDragStartEvent, type ListSelectionMode };
package/dist/grid-list.js CHANGED
@@ -1,3 +1,3 @@
1
1
  import "./list-group-header.js";
2
- import { t as GridListElement } from "./grid-list-y6dWJYu3.js";
2
+ import { t as GridListElement } from "./grid-list-CdEkScn-.js";
3
3
  export { GridListElement };
@@ -1,2 +1,2 @@
1
- import { A as FuzzySearch, C as ListSearchControllerOptions, D as IncrSearchTreeOptions, E as IncrSearchTreeController, F as IncrSearchChangeCallback, I as IncrSearchOptions, L as IncrSearchResult, M as HighlightOptions, N as HighlightTarget, O as createAcCompletionProvider, P as IncrSearch, R as IncrSearchState, S as ListSearchController, T as ListSearchMode, _ as DataListSearchAdapterOptions, a as RegisterListSearchCommandsOptions, b as LIST_SEARCH_MODES, c as applyHighlights, d as createFuzzySearch, f as ElementIncrSearch, g as createElementListSearchAdapter, h as ElementListSearchHost, i as LIST_SEARCH_COMMAND_IDS, j as FuzzySearchOptions, k as ElementIncrSearchOptions, l as buildHighlightTargets, m as ElementListSearchAdapterOptions, n as createTreeListSearchAdapter, o as registerListSearchCommands, p as createElementIncrSearch, r as listSearchStyles, s as createIncrSearch, t as TreeListSearchAdapterOptions, u as clearHighlights, v as DataListSearchItem, w as ListSearchHost, x as ListSearchAdapter, y as createDataListSearchAdapter } from "./index-KN2MW_xD.js";
1
+ import { A as FuzzySearch, C as ListSearchControllerOptions, D as IncrSearchTreeOptions, E as IncrSearchTreeController, F as IncrSearchChangeCallback, I as IncrSearchOptions, L as IncrSearchResult, M as HighlightOptions, N as HighlightTarget, O as createAcCompletionProvider, P as IncrSearch, R as IncrSearchState, S as ListSearchController, T as ListSearchMode, _ as DataListSearchAdapterOptions, a as RegisterListSearchCommandsOptions, b as LIST_SEARCH_MODES, c as applyHighlights, d as createFuzzySearch, f as ElementIncrSearch, g as createElementListSearchAdapter, h as ElementListSearchHost, i as LIST_SEARCH_COMMAND_IDS, j as FuzzySearchOptions, k as ElementIncrSearchOptions, l as buildHighlightTargets, m as ElementListSearchAdapterOptions, n as createTreeListSearchAdapter, o as registerListSearchCommands, p as createElementIncrSearch, r as listSearchStyles, s as createIncrSearch, t as TreeListSearchAdapterOptions, u as clearHighlights, v as DataListSearchItem, w as ListSearchHost, x as ListSearchAdapter, y as createDataListSearchAdapter } from "./index-Dr80Zdl6.js";
2
2
  export { type DataListSearchAdapterOptions, type DataListSearchItem, type ElementIncrSearch, type ElementIncrSearchOptions, type ElementListSearchAdapterOptions, type ElementListSearchHost, type FuzzySearch, type FuzzySearchOptions, type HighlightOptions, type HighlightTarget, type IncrSearch, type IncrSearchChangeCallback, IncrSearchTreeController as IncrSearchMillerController, IncrSearchTreeController, type IncrSearchTreeOptions as IncrSearchMillerOptions, type IncrSearchTreeOptions, type IncrSearchOptions, type IncrSearchResult, type IncrSearchState, LIST_SEARCH_COMMAND_IDS, LIST_SEARCH_MODES, type ListSearchAdapter, ListSearchController, type ListSearchControllerOptions, type ListSearchHost, type ListSearchMode, type RegisterListSearchCommandsOptions, type TreeListSearchAdapterOptions, applyHighlights, buildHighlightTargets, clearHighlights, createAcCompletionProvider, createDataListSearchAdapter, createElementIncrSearch, createElementListSearchAdapter, createFuzzySearch, createIncrSearch, createTreeListSearchAdapter, listSearchStyles, registerListSearchCommands };
@@ -0,0 +1,71 @@
1
+ import { a as ViewStateBase, c as ViewStateChangeReason, n as ScrollState, t as GetViewStateOptions } from "./types-LU1u0CB8.js";
2
+ import { ReactiveController, ReactiveControllerHost } from "lit";
3
+ //#region src/common/view-state/view-state-controller.d.ts
4
+ type ViewStateControllerOptions<S extends ViewStateBase> = {
5
+ /** Component kind written into every state, e.g. `tree-list`. */
6
+ readonly kind: string;
7
+ /** Build the full current state (pending included). Called when the change event fires. */
8
+ readonly capture: () => S;
9
+ /** Trailing debounce for `view-state-change`, ms. Default 150. */
10
+ readonly debounceMs?: number;
11
+ };
12
+ /**
13
+ * Plumbing shared by every view-stateful component:
14
+ *
15
+ * - **change events** — `notify(reason)` coalesces changes into one debounced
16
+ * `view-state-change` event (strongest reason wins: user > data > restore),
17
+ * flushed immediately on disconnect so the last change is never lost.
18
+ * - **restore marking** — changes made inside `restoring(fn)` are reported as
19
+ * `restore`, so persistence code can skip writing back what it just loaded.
20
+ * - **validation** — `accepts(state)` rejects a state for another kind / version.
21
+ * - **pending scroll** — a scroll position waiting for its anchor item (or for
22
+ * enough content). Cancelled by the user's own scroll intent on the target
23
+ * given to `observeScrollTarget()`.
24
+ *
25
+ * The component owns its facets (selection, expansion, columns) and decides
26
+ * what's pending; this controller only carries the cross-cutting parts.
27
+ */
28
+ declare class ViewStateController<S extends ViewStateBase> implements ReactiveController {
29
+ #private;
30
+ constructor(host: ReactiveControllerHost & EventTarget, options: ViewStateControllerOptions<S>);
31
+ get kind(): string;
32
+ hostConnected(): void;
33
+ hostDisconnected(): void;
34
+ /** Record a change. Inside `restoring()` the reason is forced to `restore`. */
35
+ notify(reason?: ViewStateChangeReason): void;
36
+ /** Fire any pending change event now. */
37
+ flush(): void;
38
+ /** Run `fn` with every `notify()` inside it reported as `restore`. */
39
+ restoring<T>(fn: () => T): T;
40
+ /** True while inside `restoring()`. */
41
+ get isRestoring(): boolean;
42
+ /** Whether `state` is for this component kind and schema version. Warns when not. */
43
+ accepts(state: Partial<S> | null | undefined): state is Partial<S>;
44
+ /**
45
+ * Stamp `v` / `kind` onto `fields` and apply `include`. Components build
46
+ * their full field set and pass it through here from `getViewState()`.
47
+ */
48
+ shape(fields: Omit<S, `v` | `kind`>, options?: GetViewStateOptions<S>): S;
49
+ /**
50
+ * Watch `target` for user scroll intent (wheel / touch / pointer / nav key);
51
+ * any intent drops the pending scroll. Call again if the scroll container
52
+ * is replaced.
53
+ */
54
+ observeScrollTarget(target: EventTarget): void;
55
+ get pendingScroll(): ScrollState | undefined;
56
+ set pendingScroll(scroll: ScrollState | undefined);
57
+ /**
58
+ * Try the pending scroll with `apply`; it returns `true` once the position
59
+ * was fully reached (anchor present, content long enough), which clears it.
60
+ * Call after each render that may have added items.
61
+ */
62
+ applyPendingScroll(apply: (scroll: ScrollState) => boolean): void;
63
+ /**
64
+ * Call from the viewport's `scroll` listener. Ignored while a scroll restore
65
+ * is still pending; the event caused by a restore's own write is reported
66
+ * as `restore`, anything else as `user`.
67
+ */
68
+ notifyScroll(): void;
69
+ }
70
+ //#endregion
71
+ export { ViewStateControllerOptions as n, ViewStateController as t };
@@ -1,7 +1,9 @@
1
- import { A as TreeTickleEvent, C as TreeItemDblClickEvent, E as TreeSearchHost, I as ListDragPreviewRenderer, L as ListDragPreviewSourceResolver, O as TreeSelectEvent, _ as TreeDropTarget, a as TreeComponent, c as TreeDragContext, d as TreeDragStartEvent, h as TreeDropEvent, i as TreeCollapseEvent, j as TreeDataModel, l as TreeDragEndEvent, m as TreeDropDetail, n as TreeActivateEvent, o as TreeComponentEventMap, p as TreeDropContext, s as TreeDndMode, u as TreeDragOverEvent, w as TreeNavigateOptions, x as TreeItemClickEvent, y as TreeExpandEvent, z as ListNativeDragStartDetail } from "./tree-component-C6UHO-w9.js";
1
+ import { B as ListNativeDragStartDetail, C as TreeItemDblClickEvent, D as TreeSelectAllOptions, E as TreeSearchHost, L as ListDragPreviewRenderer, M as TreeDataModel, R as ListDragPreviewSourceResolver, _ as TreeDropTarget, a as TreeComponent, c as TreeDragContext, d as TreeDragStartEvent, 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, s as TreeDndMode, u as TreeDragOverEvent, w as TreeNavigateOptions, x as TreeItemClickEvent, y as TreeExpandEvent } from "./tree-component-DgfkxmVY.js";
2
2
  import { a as TreeItem, i as TreeInteractionMode, n as TreeExclusivity, o as TreeNode, r as TreeFilterPredicate, s as TreeSelectionFilter, t as LoadChildrenCallback } from "./types-Jky6oNAp.js";
3
- import { S as ListSearchController } from "./index-KN2MW_xD.js";
4
- import { t as ListNativeDragController } from "./list-native-drag-controller-O2Nruqpi.js";
3
+ import { a as ViewStateBase, t as GetViewStateOptions } from "./types-LU1u0CB8.js";
4
+ import "./index-9ttcdwlL.js";
5
+ import { S as ListSearchController } from "./index-Dr80Zdl6.js";
6
+ import { t as ListNativeDragController } from "./list-native-drag-controller-D_UrXipS.js";
5
7
  import { n as TickledController } from "./tickled-controller-DodxD3eQ.js";
6
8
  import { LitElement, PropertyValues, ReactiveController, ReactiveControllerHost, TemplateResult, nothing } from "lit";
7
9
  import { CommandRegistry } from "@clinth/ui-commands";
@@ -12,6 +14,10 @@ type TreeConfig = {
12
14
  indent: number;
13
15
  };
14
16
  //#endregion
17
+ //#region src/tree/tree-view-state.d.ts
18
+ /** `ixfx-tree-list` view state. All fields are the shared base fields. */
19
+ type TreeListViewState = ViewStateBase;
20
+ //#endregion
15
21
  //#region src/tree/tree-base.d.ts
16
22
  /**
17
23
  * `auto` windows the list once it has more than `virtualizeThreshold` visible
@@ -40,6 +46,13 @@ declare class TreeBaseElement extends LitElement implements TreeComponent, TreeS
40
46
  get selectedNodes(): ReadonlySet<TreeNode>;
41
47
  filterPredicate: TreeFilterPredicate | undefined;
42
48
  disableKeyboardNavigation: boolean;
49
+ /**
50
+ * Let hover follow rows that scroll beneath a stationary pointer. Off by
51
+ * default: while a scroll gesture is active, row `pointerenter` is ignored so
52
+ * the hover cursor holds still instead of trailing the content. Hover resumes
53
+ * on the next real pointer movement, or when the pointer leaves the tree.
54
+ */
55
+ scrollHoverTickle: boolean;
43
56
  registry: CommandRegistry<unknown> | undefined;
44
57
  /**
45
58
  * Space-separated subset of `navigate select filter` — limits which
@@ -89,6 +102,12 @@ declare class TreeBaseElement extends LitElement implements TreeComponent, TreeS
89
102
  applyInternalDrop: boolean;
90
103
  /** Immutable: replace via `#setExpanded` so the flat-row cache is invalidated. */
91
104
  protected _expandedKeys: ReadonlySet<string>;
105
+ /**
106
+ * Whether restoring view state may call `loadChildren` / `model` to open
107
+ * saved branches that aren't loaded yet (one at a time, cascading down the
108
+ * saved path). Default `true`.
109
+ */
110
+ restoreLoads: boolean;
92
111
  /** Bumped whenever `_selectedNodes` content may have changed. */
93
112
  protected _selectionVersion: number;
94
113
  /**
@@ -103,6 +122,13 @@ declare class TreeBaseElement extends LitElement implements TreeComponent, TreeS
103
122
  /** Depths at which any loaded node carries an icon (stable across expansion). */
104
123
  protected get _depthsWithIcons(): ReadonlySet<number>;
105
124
  protected tickled: TickledController<string>;
125
+ /**
126
+ * Row `pointerenter` funnel: moves the hover cursor unless a scroll gesture
127
+ * is sliding rows beneath a stationary pointer (see `scrollHoverTickle`).
128
+ * Subclasses rendering their own rows should call this rather than the
129
+ * tickled controller directly.
130
+ */
131
+ protected _handleRowPointerEnter(node: TreeNode, depth: number): void;
106
132
  protected _focusedDepth: number;
107
133
  /** Incremental search (navigate / select / filter). See `docs/infra-incremental.md`. */
108
134
  readonly search: ListSearchController<{
@@ -132,11 +158,31 @@ declare class TreeBaseElement extends LitElement implements TreeComponent, TreeS
132
158
  disconnectedCallback(): void;
133
159
  getConfig(): TreeConfig;
134
160
  setConfig(config: Partial<TreeConfig>): void;
161
+ /**
162
+ * Snapshot selection, expansion, cursor and scroll as plain JSON, keyed by
163
+ * `item.key`. Includes pending state for keys not currently loaded.
164
+ */
165
+ getViewState(options?: GetViewStateOptions<TreeListViewState>): TreeListViewState;
166
+ /**
167
+ * Apply saved view state. Fields present replace the current ones; keys
168
+ * that aren't loaded yet are applied as they appear — including via
169
+ * `loadChildren` / `model` for saved-open branches when `restoreLoads`.
170
+ */
171
+ setViewState(state: Partial<TreeListViewState>): void;
172
+ clearPendingViewState(): void;
135
173
  select(node: TreeNode): void;
136
174
  deselect(node: TreeNode): void;
137
175
  clearSelection(): void;
138
- selectAll(): void;
139
- deselectAll(): void;
176
+ /**
177
+ * Select every selectable node in the tree, or only the matches while a
178
+ * `filterPredicate` is active. Nodes inside collapsed branches are included;
179
+ * unloaded (lazy) children are not. With `visibleOnly`, only rows that are
180
+ * showing are selected (Ctrl+A). In `checked` mode checking a row checks its
181
+ * descendants, so `visibleOnly` makes no difference there.
182
+ */
183
+ selectAll(options?: TreeSelectAllOptions): void;
184
+ /** Mirror of {@link selectAll}: deselect the same set of nodes it would select. */
185
+ deselectAll(options?: TreeSelectAllOptions): void;
140
186
  /**
141
187
  * Expand every already-loaded branch in a single update. With `maxDepth`,
142
188
  * only branches at depth < `maxDepth` are expanded (the root's children are
@@ -378,4 +424,4 @@ declare class TreeDropController implements ReactiveController {
378
424
  hostDisconnected(): void;
379
425
  }
380
426
  //#endregion
381
- export { TreeDropVisibleRow as a, TreeListElement as c, TreeBaseElement as d, TreeBaseElementEventMap as f, TreeDropRowInfo as i, TreeCheckboxState as l, TreeConfig as m, TreeDropControllerConfig as n, TreeController as o, TreeVirtualize as p, TreeDropResolvedDrag as r, TreeControllerOptions as s, TreeDropController as t, TreeAnimation as u };
427
+ export { TreeDropVisibleRow as a, TreeListElement as c, TreeBaseElement as d, TreeBaseElementEventMap as f, TreeConfig as h, TreeDropRowInfo as i, TreeCheckboxState as l, TreeListViewState as m, TreeDropControllerConfig as n, TreeController as o, TreeVirtualize as p, TreeDropResolvedDrag as r, TreeControllerOptions as s, TreeDropController as t, TreeAnimation as u };