@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,4 @@
1
- import { F as ListDragPreviewContext, I as ListDragPreviewRenderer, L as ListDragPreviewSourceResolver, N as ListDragEntry, R as ListDragSource, z as ListNativeDragStartDetail } from "./tree-component-C6UHO-w9.js";
1
+ import { B as ListNativeDragStartDetail, I as ListDragPreviewContext, L as ListDragPreviewRenderer, P as ListDragEntry, R as ListDragPreviewSourceResolver, z as ListDragSource } from "./tree-component-DgfkxmVY.js";
2
2
  import { ReactiveController, ReactiveControllerHost } from "lit";
3
3
  //#region src/interaction/list-native-drag-controller.d.ts
4
4
  type ListNativeDragControllerConfig<T> = {
@@ -1,3 +1,4 @@
1
+ import { a as capKeys, d as partitionKeys, n as EMPTY_KEYS } from "./pending-BGidHppL.js";
1
2
  //#region src/interaction/list-drag-select-controller.ts
2
3
  const DEFAULT_POINTER_TYPES = [`mouse`, `pen`];
3
4
  const DEFAULT_THRESHOLD = 4;
@@ -331,6 +332,12 @@ var ListSelectionController = class {
331
332
  #config;
332
333
  #selected = /* @__PURE__ */ new Set();
333
334
  #anchor;
335
+ /**
336
+ * Selected keys whose items are not currently present (restored view state,
337
+ * or items removed by a data reset). Re-selected by `resolvePending()` when
338
+ * a matching item appears; dropped by any explicit selection change.
339
+ */
340
+ #pending = EMPTY_KEYS;
334
341
  constructor(config) {
335
342
  this.#config = config;
336
343
  }
@@ -425,6 +432,7 @@ var ListSelectionController = class {
425
432
  }
426
433
  /** Clear the selection. No change event when the selection is already empty. */
427
434
  clear() {
435
+ this.#pending = EMPTY_KEYS;
428
436
  if (this.#selected.size === 0) return;
429
437
  this.#apply(/* @__PURE__ */ new Set());
430
438
  }
@@ -544,6 +552,79 @@ var ListSelectionController = class {
544
552
  }
545
553
  if (changed) this.#apply(next);
546
554
  }
555
+ /** Selected keys waiting for their items to appear. */
556
+ get pendingKeys() {
557
+ return this.#pending;
558
+ }
559
+ /**
560
+ * Restore a selection by key: keys that resolve are selected now (one
561
+ * `onChange`), the rest are kept pending for `resolvePending()`. Replaces
562
+ * any previous selection and pending keys. Unlike `selectKeys`, this works
563
+ * in `selectionMode="none"` only to the extent of holding keys pending.
564
+ */
565
+ restoreKeys(keys, resolve) {
566
+ const wanted = new Set(keys);
567
+ const { present, missing } = partitionKeys(wanted, (key) => this.#resolveSelectable(key, resolve) !== void 0);
568
+ let next = /* @__PURE__ */ new Set();
569
+ if (this.#config.getModes().selectionMode !== `none`) for (const key of present) next.add(this.#resolveSelectable(key, resolve));
570
+ if (!this.#effectiveMulti() && next.size > 1) next = new Set([...next].slice(-1));
571
+ this.#anchor = [...next].at(-1);
572
+ this.#pending = capKeys(missing);
573
+ if (next.size === 0 && this.#selected.size === 0) return;
574
+ this.#apply(next, true);
575
+ }
576
+ /**
577
+ * Select pending keys whose items now resolve (call after items are added
578
+ * or rebuilt). Fires `onChange` once when anything was selected; returns
579
+ * whether it did.
580
+ */
581
+ resolvePending(resolve) {
582
+ if (this.#pending.size === 0 || this.#config.getModes().selectionMode === `none`) return false;
583
+ const { present, missing } = partitionKeys(this.#pending, (key) => this.#resolveSelectable(key, resolve) !== void 0);
584
+ if (present.length === 0) return false;
585
+ const found = present.map((key) => this.#resolveSelectable(key, resolve));
586
+ let next;
587
+ if (this.#effectiveMulti()) {
588
+ next = /* @__PURE__ */ new Set([...this.#selected, ...found]);
589
+ this.#pending = missing;
590
+ } else {
591
+ next = /* @__PURE__ */ new Set([found.at(-1)]);
592
+ this.#pending = EMPTY_KEYS;
593
+ }
594
+ this.#anchor ??= found.at(-1);
595
+ this.#apply(next, true);
596
+ return true;
597
+ }
598
+ /**
599
+ * Silently deselect `items` that left the data, keeping their keys pending
600
+ * so they are re-selected if the same keys come back (data reset, re-fetch).
601
+ * No `onChange`; returns whether the selection changed.
602
+ */
603
+ demote(items) {
604
+ const getKey = this.#config.getKey;
605
+ const next = new Set(this.#selected);
606
+ const pending = new Set(this.#pending);
607
+ let changed = false;
608
+ for (const item of items) {
609
+ if (!next.delete(item)) continue;
610
+ changed = true;
611
+ const key = getKey?.(item);
612
+ if (key !== void 0) pending.add(key);
613
+ if (this.#anchor === item) this.#anchor = void 0;
614
+ }
615
+ if (!changed) return false;
616
+ this.#selected = next;
617
+ this.#pending = capKeys(pending);
618
+ return true;
619
+ }
620
+ /** Drop pending keys without touching the live selection. */
621
+ clearPending() {
622
+ this.#pending = EMPTY_KEYS;
623
+ }
624
+ #resolveSelectable(key, resolve) {
625
+ const item = resolve(key);
626
+ return item !== void 0 && this.#config.isSelectable(item) ? item : void 0;
627
+ }
547
628
  /** Route a click on `item` according to the current interaction mode. */
548
629
  handleClick(item, gesture) {
549
630
  const { selectionMode, interactionMode: mode } = this.#config.getModes();
@@ -586,9 +667,11 @@ var ListSelectionController = class {
586
667
  }
587
668
  /**
588
669
  * Hard reset: empty the selection and clear the anchor without firing
589
- * `onChange` (e.g. when all items are removed).
670
+ * `onChange` (e.g. when all items are removed). Keyed selected items become
671
+ * pending, so a rebuilt item set re-selects them via `resolvePending()`.
590
672
  */
591
673
  reset() {
674
+ this.demote([...this.#selected]);
592
675
  this.#selected = /* @__PURE__ */ new Set();
593
676
  this.#anchor = void 0;
594
677
  }
@@ -615,7 +698,9 @@ var ListSelectionController = class {
615
698
  const group = this.#groupOf(first);
616
699
  return new Set([...items].filter((t) => this.#groupOf(t) === group));
617
700
  }
618
- #apply(next) {
701
+ /** Commit `next`. An explicit selection change supersedes pending keys unless `keepPending`. */
702
+ #apply(next, keepPending = false) {
703
+ if (!keepPending) this.#pending = EMPTY_KEYS;
619
704
  const previous = this.#selected;
620
705
  this.#selected = next;
621
706
  this.#config.onChange(next, previous);