@ixfx/components 0.16.5 → 0.17.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 (218) hide show
  1. package/bundle/index.d.ts +4093 -1746
  2. package/bundle/index.js +1083 -226
  3. package/bundle/rolldown-runtime-CAoDHAWh.js +1 -0
  4. package/dist/ac-text.d.ts +11 -14
  5. package/dist/ac-text.js +8 -9
  6. package/dist/{ac-token-qEs3FsQv.d.ts → ac-token-CTBa93hF.d.ts} +2 -6
  7. package/dist/ac-token.d.ts +1 -1
  8. package/dist/ac-token.js +8 -9
  9. package/dist/{button-ikByJJPN.js → button-BOX1dfyd.js} +5 -7
  10. package/dist/{button-N92DKoWb.d.ts → button-DyJyyCsb.d.ts} +0 -4
  11. package/dist/button.d.ts +1 -1
  12. package/dist/button.js +1 -2
  13. package/dist/checkbox.d.ts +42 -9
  14. package/dist/checkbox.js +4 -5
  15. package/dist/{checked-select-CBUidG7n.js → checked-select-BmwqpgGr.js} +8 -10
  16. package/dist/{checked-select-CglRukbP.d.ts → checked-select-CNv5zNvR.d.ts} +0 -4
  17. package/dist/checked-select.d.ts +33 -1
  18. package/dist/checked-select.js +1 -2
  19. package/dist/{colour-picker-DwAa6RDh.js → colour-picker-D8g-bTSF.js} +6 -9
  20. package/dist/colour-picker.d.ts +1 -1
  21. package/dist/colour-picker.js +1 -2
  22. package/dist/{crumb-navigation-D3ndPgFg.js → crumb-navigation-D7dAC0H-.js} +11 -13
  23. package/dist/{crumb-navigation-BbqfmkYs.d.ts → crumb-navigation-Tm4fnsvN.d.ts} +6 -10
  24. package/dist/crumbs.d.ts +1 -1
  25. package/dist/crumbs.js +1 -2
  26. package/dist/{data-controller-DOlmqNKb.js → data-controller-q-rXRMzJ.js} +1 -2
  27. package/dist/data-display.d.ts +5 -8
  28. package/dist/data-display.js +3 -4
  29. package/dist/{data-grid-8TsiF2ES.js → data-grid-BcO3SMac.js} +20 -23
  30. package/dist/{data-grid-CslzF16R.d.ts → data-grid-vasJtjFP.d.ts} +9 -15
  31. package/dist/data-grid.d.ts +2 -2
  32. package/dist/data-grid.js +1 -2
  33. package/dist/{data-provider-35TyWclX.js → data-provider-C6ZNAcaT.js} +1 -2
  34. package/dist/{data-provider-BAn_-oR1.d.ts → data-provider-Cq_ylpET.d.ts} +0 -2
  35. package/dist/date-input.d.ts +9 -12
  36. package/dist/date-input.js +3 -4
  37. package/dist/{decorate-VRK8rslU.js → decorate-Dxs8sFX8.js} +2 -4
  38. package/dist/{defaults-B4ePs4LB.js → defaults-_6ELsqLb.js} +2 -3
  39. package/dist/{detail-list-n1MbNbhF.d.ts → detail-list-E9WdMVbE.d.ts} +10 -16
  40. package/dist/{detail-list-w3GXKO2k.js → detail-list-vPVwE1CP.js} +17 -20
  41. package/dist/detail-list.d.ts +5 -5
  42. package/dist/detail-list.js +1 -2
  43. package/dist/{drag-ghost-DtSDvjri.js → drag-ghost-DNWu_RyN.js} +1 -2
  44. package/dist/{editable-label-rzXkjf1H.d.ts → editable-label-CiHCDlhC.d.ts} +0 -2
  45. package/dist/editable-label.d.ts +31 -1
  46. package/dist/editable-label.js +3 -4
  47. package/dist/{fallbacks-DQ_5OsmR.js → fallbacks-BPjjBoED.js} +1 -2
  48. package/dist/{flat-list-D_4y3wgn.d.ts → flat-list-CfutGqKY.d.ts} +8 -12
  49. package/dist/flat-list.d.ts +1 -1
  50. package/dist/flat-list.js +10 -11
  51. package/dist/{form-CY0nibZ5.js → form-Cxx2sO8_.js} +5 -9
  52. package/dist/{form-BGZK3jZd.d.ts → form-raTQNAWF.d.ts} +0 -4
  53. package/dist/form.d.ts +1 -1
  54. package/dist/form.js +1 -2
  55. package/dist/{grid-list-Cz2tKcNZ.js → grid-list-D2hinM64.js} +275 -41
  56. package/dist/{grid-list-CqYS28NY.d.ts → grid-list-OCdjuhng.d.ts} +60 -24
  57. package/dist/grid-list.d.ts +5 -5
  58. package/dist/grid-list.js +1 -2
  59. package/dist/{grouped-item-lister-CS4yInuw.d.ts → grouped-item-lister-1MlvJORP.d.ts} +2 -6
  60. package/dist/grouped-item-lister.d.ts +1 -1
  61. package/dist/grouped-item-lister.js +3 -4
  62. package/dist/{grouping-CUKgmkMm.d.ts → grouping-OoQ8WaKc.d.ts} +0 -2
  63. package/dist/{grouping-RYPnHkrS.js → grouping-kENdqzSV.js} +1 -2
  64. package/dist/{handle-DAXs7kbJ.js → handle-BVUWv97X.js} +1 -2
  65. package/dist/{hex-editor-Caq8vNQk.d.ts → hex-editor-BCBKRU9D.d.ts} +0 -4
  66. package/dist/{hex-editor-DiYpgIKs.js → hex-editor-DephDhuu.js} +12 -13
  67. package/dist/hex.d.ts +1 -1
  68. package/dist/hex.js +1 -2
  69. package/dist/{highlight-B-eQrhhb.js → highlight-noLHFSKZ.js} +1 -2
  70. package/dist/{icon-CDGprSdE.d.ts → icon-Bhz0c6Yf.d.ts} +0 -2
  71. package/dist/{icon-1gpwtPx8.js → icon-DvTQuylG.js} +4 -5
  72. package/dist/icons.d.ts +2 -2
  73. package/dist/icons.js +4 -5
  74. package/dist/{incr-search-Dc6gYpJG.js → incr-search-C5114RxZ.js} +14 -26
  75. package/dist/incr-search.d.ts +1 -1
  76. package/dist/incr-search.js +2 -2
  77. package/dist/{index-ZaA90u09.d.ts → index-0smh4WCH.d.ts} +3 -21
  78. package/dist/{index-VAs9akt4.d.ts → index-88ra6YHP.d.ts} +8 -22
  79. package/dist/{index-UvnoZUAo.d.ts → index-B7odjrlg.d.ts} +4 -8
  80. package/dist/{index-Bm9a9S3_.d.ts → index-CRLTVAyt.d.ts} +4 -30
  81. package/dist/{index-9ttcdwlL.d.ts → index-Cdcek1Oj.d.ts} +1 -3
  82. package/dist/index-Cn0qsz9a.d.ts +1632 -0
  83. package/dist/{index-YCDugjdu.d.ts → index-CzhYJJsx.d.ts} +7 -17
  84. package/dist/{index-CYndvTWH.d.ts → index-D6N4Lzek.d.ts} +1 -5
  85. package/dist/{index-CoqtMSd9.d.ts → index-DN6kC6an.d.ts} +1 -3
  86. package/dist/{index-DV3iaUBW2.d.ts → index-DrYQBts2.d.ts} +0 -14
  87. package/dist/{index-o-CWDt11.d.ts → index-DzocgUef.d.ts} +0 -4
  88. package/dist/{index-DN2BWctP.d.ts → index-PIrgX1bP.d.ts} +1 -7
  89. package/dist/index.d.ts +364 -491
  90. package/dist/index.js +139 -207
  91. package/dist/interaction-8Kbbf6xN.js +3 -0
  92. package/dist/{item-appearance-BjcMyauw.js → item-appearance-FRO3TRFI.js} +1 -2
  93. package/dist/{keyboard-B5xD7Fz-.js → keyboard-DMwjIYh7.js} +0 -1
  94. package/dist/{labelled-input-base-BFa4xlYV.js → labelled-input-base-KUhD02dh.js} +3 -5
  95. package/dist/{labelled-input-base-DiTme1JO.d.ts → labelled-input-base-jyr_SR6t.d.ts} +0 -2
  96. package/dist/labelled-radial-input.d.ts +4 -7
  97. package/dist/labelled-radial-input.js +5 -6
  98. package/dist/labelled-range-input.d.ts +1 -1
  99. package/dist/labelled-range-input.js +3 -4
  100. package/dist/{labelled-slider-input-FdCRi6st.js → labelled-slider-input-CfRKd5kC.js} +9 -11
  101. package/dist/labelled-slider-input.d.ts +1 -1
  102. package/dist/labelled-slider-input.js +1 -2
  103. package/dist/led.d.ts +3 -6
  104. package/dist/led.js +2 -3
  105. package/dist/list-group-header.d.ts +3 -6
  106. package/dist/list-group-header.js +3 -4
  107. package/dist/{list-native-drag-controller-CcXoS0YX.js → list-native-drag-controller-ByftBooJ.js} +5 -9
  108. package/dist/{list-native-drag-controller-D_UrXipS.d.ts → list-native-drag-controller-CgXKdmjr.d.ts} +1 -3
  109. package/dist/{list-selection-controller-D4iIrvJH.js → list-selection-controller-Dkh3m3hX.js} +3 -5
  110. package/dist/{list-selection-types-Dnamh2Lu.d.ts → list-selection-types-CKTt7Rrw.d.ts} +0 -2
  111. package/dist/{list-viewport-types-BRZsLcvp.d.ts → list-viewport-types-BJ8c6qur.d.ts} +0 -2
  112. package/dist/{menu-BX1FHxY8.js → menu-C3DhTjHx.js} +17 -27
  113. package/dist/{menu-item-oxU1VKiJ.js → menu-item-BSxhlWnW.js} +30 -15
  114. package/dist/{menu-item-bF6narIz.d.ts → menu-item-DJhaWy9z.d.ts} +10 -7
  115. package/dist/menu.d.ts +2 -2
  116. package/dist/menu.js +2 -2
  117. package/dist/{miller-BrmBywNZ.js → miller-DqDEaXqT.js} +15 -19
  118. package/dist/miller.d.ts +3 -3
  119. package/dist/miller.js +1 -2
  120. package/dist/narrowed-text.d.ts +1 -1
  121. package/dist/narrowed-text.js +8 -9
  122. package/dist/node-graph-DqEGv5QR.js +5369 -0
  123. package/dist/node-graph.d.ts +2 -0
  124. package/dist/node-graph.js +1 -0
  125. package/dist/{notification-pill-DyZydXoZ.d.ts → notification-pill-BiHEJk-o.d.ts} +0 -4
  126. package/dist/notifier.d.ts +1 -1
  127. package/dist/notifier.js +4 -5
  128. package/dist/{pan-text-CoYmt2qd.d.ts → pan-text-DKe2zinH.d.ts} +0 -2
  129. package/dist/{pan-text-CqtvjPyK.js → pan-text-DrJYKQKN.js} +3 -4
  130. package/dist/panel.d.ts +11 -14
  131. package/dist/panel.js +3 -4
  132. package/dist/{partial-keys-Ck6CiprB.js → partial-keys-D4l_ede_.js} +2 -3
  133. package/dist/{pending-BGidHppL.js → pending-Afl4LT64.js} +1 -2
  134. package/dist/plots.d.ts +1 -1
  135. package/dist/plots.js +1 -2
  136. package/dist/polar-pad.d.ts +5 -7
  137. package/dist/polar-pad.js +6 -7
  138. package/dist/{popup-D80sj2QC.js → popup-D8IxN1Eq.js} +1 -2
  139. package/dist/{prominence-DlFShic3.js → prominence-BOOQVWF-.js} +1 -2
  140. package/dist/{radial-input-KMVltQfe.js → radial-input-Cxys4TOG.js} +7 -9
  141. package/dist/{radial-input-DU6t2hYO.d.ts → radial-input-DNCSwRGF.d.ts} +1 -5
  142. package/dist/radial-input.d.ts +10 -1
  143. package/dist/radial-input.js +1 -2
  144. package/dist/range-input.d.ts +4 -6
  145. package/dist/range-input.js +5 -6
  146. package/dist/range.d.ts +4 -6
  147. package/dist/range.js +6 -7
  148. package/dist/{registry-BEtb8_wB.js → registry-DcF0fO7l.js} +1 -2
  149. package/dist/rolldown-runtime-D3KUYPsf.js +12 -0
  150. package/dist/{scroll-fade-Xx28D7mH.js → scroll-fade-DH8OXSqL.js} +1 -2
  151. package/dist/{scroll-hover-guard-Cjw6179Q.js → scroll-hover-guard-BGAjtyXT.js} +1 -2
  152. package/dist/select-horiz.d.ts +7 -9
  153. package/dist/select-horiz.js +8 -9
  154. package/dist/{slider-input-ByHdotzp.js → slider-input-C3mbUBZi.js} +6 -8
  155. package/dist/{slider-input-BxURAAmD.d.ts → slider-input-DHLGJKWF.d.ts} +1 -5
  156. package/dist/slider-input.d.ts +34 -1
  157. package/dist/slider-input.js +1 -2
  158. package/dist/snackbar.d.ts +5 -8
  159. package/dist/snackbar.js +4 -5
  160. package/dist/snap-container.d.ts +8 -11
  161. package/dist/snap-container.js +2 -3
  162. package/dist/{split-layout-DTY4PJRp.js → split-layout-BMN_s6d7.js} +10 -15
  163. package/dist/{split-layout-CophkNeU.d.ts → split-layout-HytcG1Bn.d.ts} +2 -8
  164. package/dist/split-layout.d.ts +1 -1
  165. package/dist/split-layout.js +1 -2
  166. package/dist/sunburst-tree.d.ts +1 -1
  167. package/dist/sunburst-tree.js +1 -2
  168. package/dist/{sunbursttree-list-DQF6DcsS.js → sunbursttree-list-C-FuZB5z.js} +23 -32
  169. package/dist/{sunbursttree-list-Bk20giTF.d.ts → sunbursttree-list-CsrmVSB8.d.ts} +5 -11
  170. package/dist/swipe.d.ts +7 -9
  171. package/dist/swipe.js +5 -6
  172. package/dist/{tab-list-Df371rqw.d.ts → tab-list-BXMRYJeR.d.ts} +1 -5
  173. package/dist/{tab-list-R_bGbDvO.js → tab-list-CFJy3hVm.js} +6 -15
  174. package/dist/tabs.d.ts +1 -1
  175. package/dist/tabs.js +1 -2
  176. package/dist/{tickled-controller-D-HZymaZ.js → tickled-controller-BVhGKzjZ.js} +1 -2
  177. package/dist/{tickled-controller-DodxD3eQ.d.ts → tickled-controller-DSPoG551.d.ts} +0 -2
  178. package/dist/{tickled-styles-BrAHEj1q.js → tickled-styles-pnieYweS.js} +1 -2
  179. package/dist/{timeline-BP1Ux2EV.js → timeline-Br5JIeLI.js} +9 -15
  180. package/dist/timeline.d.ts +1 -1
  181. package/dist/timeline.js +1 -2
  182. package/dist/{titlebar-Tqu-VvMU.d.ts → titlebar-BtLAF2ws.d.ts} +1 -3
  183. package/dist/titlebar.d.ts +1 -1
  184. package/dist/titlebar.js +4 -5
  185. package/dist/{tooltip-CJt3WLmN.js → tooltip-B7t_u6EY.js} +1 -2
  186. package/dist/{tooltip-BlvBUQxx.d.ts → tooltip-Bl4HpBue.d.ts} +0 -2
  187. package/dist/transitory-label.d.ts +3 -6
  188. package/dist/transitory-label.js +2 -3
  189. package/dist/{tree-BaXYyt5U.js → tree-BP5fxvEX.js} +24 -34
  190. package/dist/{tree-CftHwtEb.js → tree-DUc-iQcg.js} +2 -3
  191. package/dist/{tree-component-DgfkxmVY.d.ts → tree-component-DNuzfo6R.d.ts} +2 -8
  192. package/dist/tree.d.ts +3 -3
  193. package/dist/tree.js +1 -2
  194. package/dist/{types-LU1u0CB8.d.ts → types-16GC5k1z.d.ts} +0 -2
  195. package/dist/{types-Jky6oNAp.d.ts → types-6hpXRKt7.d.ts} +1 -3
  196. package/dist/unit-input.d.ts +11 -14
  197. package/dist/unit-input.js +3 -4
  198. package/dist/{vertical-list-o5hfqH87.js → vertical-list-B9z1lbjM.js} +13 -15
  199. package/dist/{vertical-list-DtHX26JO.d.ts → vertical-list-BzeXehBt.d.ts} +7 -13
  200. package/dist/vertical-list.d.ts +4 -4
  201. package/dist/vertical-list.js +1 -2
  202. package/dist/{view-state-controller-BdyXWUUM.js → view-state-controller-DiPAPiA7.js} +3 -6
  203. package/dist/{wheel-nudge-D5rmht3v.js → wheel-nudge-DgJzrL28.js} +2 -3
  204. package/dist/{wheel-nudge-By5s_ioH.d.ts → wheel-nudge-oMFKat9P.d.ts} +1 -3
  205. package/dist/{xy-axis-DQqd2yXJ.d.ts → xy-axis-Bf6WfOS2.d.ts} +0 -12
  206. package/dist/{xy-axis-CyMd_Bn1.js → xy-axis-CBpml-3S.js} +11 -20
  207. package/dist/xy-pad.d.ts +7 -9
  208. package/dist/xy-pad.js +6 -7
  209. package/docs-user/README.md +1 -0
  210. package/docs-user/grid-list.md +65 -0
  211. package/docs-user/index.json +7 -2
  212. package/docs-user/llms.txt +1 -0
  213. package/docs-user/node-graph.md +376 -0
  214. package/llms.txt +1 -0
  215. package/package.json +39 -24
  216. package/bundle/rolldown-runtime-CEoa-xHZ.js +0 -1
  217. package/dist/interaction-E-uMGHkJ.js +0 -3
  218. package/dist/rolldown-runtime-D7D4PA-g.js +0 -13
@@ -1,7 +1,7 @@
1
- import { n as safeCustomElement, t as __decorate } from "./decorate-VRK8rslU.js";
1
+ import { n as safeCustomElement, t as __decorate } from "./decorate-Dxs8sFX8.js";
2
2
  import { LitElement, css } from "lit";
3
3
  import { property } from "lit/decorators.js";
4
- //#region src/util/light-dom-styles.ts
4
+ // src/util/light-dom-styles.ts
5
5
  const adoptedRoots = /* @__PURE__ */ new WeakMap();
6
6
  /**
7
7
  * Makes styles available to a light-DOM component, wherever it is rendered.
@@ -32,8 +32,7 @@ function adoptLightDomStyles(host, styles) {
32
32
  root.prepend(style);
33
33
  }
34
34
  }
35
- //#endregion
36
- //#region src/form/form-styles.ts
35
+ // src/form/form-styles.ts
37
36
  /**
38
37
  * Layout rules for the light-DOM form components. Light DOM means Lit's
39
38
  * `static styles` can't apply them, so each component calls
@@ -271,8 +270,7 @@ ixfx-form-options[orientation="vertical"] ixfx-form-part > label {
271
270
  }
272
271
  }
273
272
  `;
274
- //#endregion
275
- //#region src/form/form-values.ts
273
+ // src/form/form-values.ts
276
274
  function collectFormValues(root, options = {}) {
277
275
  const values = {};
278
276
  root.querySelectorAll(`[name]`).forEach((el) => {
@@ -317,8 +315,7 @@ function applyFormValues(root, data) {
317
315
  } else if (`value` in el) el.value = value;
318
316
  });
319
317
  }
320
- //#endregion
321
- //#region src/form/form.ts
318
+ // src/form/form.ts
322
319
  /** Input types where Enter does not mean "submit". */
323
320
  const NON_SUBMITTING_INPUTS = /* @__PURE__ */ new Set([
324
321
  `button`,
@@ -414,5 +411,4 @@ __decorate([property({
414
411
  reflect: true
415
412
  })], FormElement.prototype, "noValidate", void 0);
416
413
  FormElement = __decorate([safeCustomElement(`ixfx-form`)], FormElement);
417
- //#endregion
418
414
  export { formStyles as n, adoptLightDomStyles as r, FormElement as t };
@@ -1,11 +1,8 @@
1
1
  import { LitElement } from "lit";
2
- //#region src/form/form-values.d.ts
3
2
  type CollectFormValuesOptions = {
4
3
  /** Return numbers (or `null` when empty) for `number` and `range` inputs, instead of strings. */
5
4
  typed?: boolean;
6
5
  };
7
- //#endregion
8
- //#region src/form/form.d.ts
9
6
  /**
10
7
  * Wraps its content in a native `<form>`, so submit, Enter-to-submit,
11
8
  * validation, `FormData` and `form.elements` behave as they do for any form.
@@ -50,5 +47,4 @@ declare global {
50
47
  'ixfx-form': FormElement;
51
48
  }
52
49
  }
53
- //#endregion
54
50
  export { FormElement as t };
package/dist/form.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { t as FormElement } from "./form-BGZK3jZd.js";
1
+ import { t as FormElement } from "./form-raTQNAWF.js";
2
2
  export { FormElement };
package/dist/form.js CHANGED
@@ -1,2 +1 @@
1
- import { t as FormElement } from "./form-CY0nibZ5.js";
2
- export { FormElement };
1
+ export { t as FormElement } from "./form-Cxx2sO8_.js";
@@ -1,26 +1,123 @@
1
- import { t as TickledController } from "./tickled-controller-D-HZymaZ.js";
2
- import { n as tickledStyles, t as tickledItemStyles } from "./tickled-styles-BrAHEj1q.js";
3
- import { t as themeFallbacks } from "./fallbacks-DQ_5OsmR.js";
4
- import { n as safeCustomElement, t as __decorate } from "./decorate-VRK8rslU.js";
5
- import { c as createElementListSearchAdapter, f as createDataListSearchAdapter, i as ListSearchController, n as listSearchStyles, o as registerListSearchCommands, r as LIST_SEARCH_MODES, u as keyForElement } from "./incr-search-Dc6gYpJG.js";
6
- import { i as resolveGroupKey, r as partitionByGroup } from "./grouping-RYPnHkrS.js";
7
- import { a as listItemFadeKeyframes, t as ListNativeDragController } from "./list-native-drag-controller-CcXoS0YX.js";
8
- import { i as ListDragSelectController, n as gestureOf, t as ListSelectionController } from "./list-selection-controller-D4iIrvJH.js";
9
- import { c as keysAsFlags, f as withoutFlag, i as capFlags, l as keysToArray, o as flagsFromRecord, s as flagsToRecord, t as EMPTY_FLAGS } from "./pending-BGidHppL.js";
10
- import { i as sameKeySet, r as isPartialKey, t as PARTIAL_DESCRIPTION } from "./partial-keys-Ck6CiprB.js";
11
- import { n as createScrollHoverGuard } from "./scroll-hover-guard-Cjw6179Q.js";
12
- import "./interaction-E-uMGHkJ.js";
13
- import { t as scrollFadeStyles } from "./scroll-fade-Xx28D7mH.js";
14
- import { t as ViewStateController } from "./view-state-controller-BdyXWUUM.js";
15
- import { n as appearanceColor, t as appearanceAbsent } from "./item-appearance-BjcMyauw.js";
16
- import "./pan-text-CqtvjPyK.js";
1
+ import { n as appearanceColor, t as appearanceAbsent } from "./item-appearance-FRO3TRFI.js";
2
+ import { n as tickledStyles, t as tickledItemStyles } from "./tickled-styles-pnieYweS.js";
3
+ import { c as createElementListSearchAdapter, f as createDataListSearchAdapter, i as ListSearchController, n as listSearchStyles, o as registerListSearchCommands, r as LIST_SEARCH_MODES, u as keyForElement } from "./incr-search-C5114RxZ.js";
4
+ import { i as resolveGroupKey, r as partitionByGroup } from "./grouping-kENdqzSV.js";
5
+ import "./interaction-8Kbbf6xN.js";
6
+ import { i as ListDragSelectController, n as gestureOf, t as ListSelectionController } from "./list-selection-controller-Dkh3m3hX.js";
7
+ import { a as listItemFadeKeyframes, t as ListNativeDragController } from "./list-native-drag-controller-ByftBooJ.js";
8
+ import { i as sameKeySet, r as isPartialKey, t as PARTIAL_DESCRIPTION } from "./partial-keys-D4l_ede_.js";
9
+ import { c as keysAsFlags, f as withoutFlag, i as capFlags, l as keysToArray, o as flagsFromRecord, s as flagsToRecord, t as EMPTY_FLAGS } from "./pending-Afl4LT64.js";
10
+ import { n as createScrollHoverGuard } from "./scroll-hover-guard-BGAjtyXT.js";
11
+ import { t as TickledController } from "./tickled-controller-BVhGKzjZ.js";
12
+ import { t as themeFallbacks } from "./fallbacks-BPjjBoED.js";
13
+ import { t as scrollFadeStyles } from "./scroll-fade-DH8OXSqL.js";
14
+ import { t as ViewStateController } from "./view-state-controller-DiPAPiA7.js";
15
+ import { n as safeCustomElement, t as __decorate } from "./decorate-Dxs8sFX8.js";
17
16
  import "./list-group-header.js";
17
+ import "./pan-text-DrJYKQKN.js";
18
18
  import { LitElement, css, html, nothing } from "lit";
19
19
  import { property, state } from "lit/decorators.js";
20
20
  import { createCommandRegistry } from "@clinth/ui-commands";
21
21
  import { repeat } from "lit/directives/repeat.js";
22
+ import { keyed } from "lit/directives/keyed.js";
22
23
  import { createRef, ref } from "lit/directives/ref.js";
23
- //#region src/grid-list/grid-list-layout.ts
24
+ // src/grid-list/grid-list-key-index.ts
25
+ var KeyIndex = class {
26
+ /** Key → raw index. The first occurrence of a key wins. */
27
+ #map = /* @__PURE__ */ new Map();
28
+ /** The items array the map was built from. */
29
+ #source = void 0;
30
+ /** The adapter the map was built with. */
31
+ #adapter = void 0;
32
+ /**
33
+ * Rebuild the map if `items` or `adapter` changed since it was built.
34
+ *
35
+ * The map is keyed on the identity of the array / adapter it was built from,
36
+ * so it stays correct even when the items are replaced between Lit update
37
+ * cycles (a host may assign `items` and then call `updateItem` before the
38
+ * update flushes).
39
+ *
40
+ * One pass — the adapter's `key` is called once per item.
41
+ */
42
+ ensure(items, adapter) {
43
+ if (this.#source === items && this.#adapter === adapter) return;
44
+ if (!adapter) {
45
+ this.#map = /* @__PURE__ */ new Map();
46
+ this.#source = items;
47
+ this.#adapter = void 0;
48
+ return;
49
+ }
50
+ const map = /* @__PURE__ */ new Map();
51
+ for (let i = 0; i < items.length; i++) {
52
+ const key = adapter.key(items[i], i);
53
+ if (!map.has(key)) map.set(key, i);
54
+ }
55
+ this.#map = map;
56
+ this.#source = items;
57
+ this.#adapter = adapter;
58
+ }
59
+ /** Raw index of `key`, or `-1`. O(1). */
60
+ get(key) {
61
+ return this.#map.get(key) ?? -1;
62
+ }
63
+ /** Whether `key` is known. */
64
+ has(key) {
65
+ return this.#map.has(key);
66
+ }
67
+ /**
68
+ * Record that `items` is now `next`, after `patch` updated the map.
69
+ *
70
+ * `patch` receives the live map so a mutation can adjust only the entries
71
+ * it touched. The map's "built from" pointer is updated to `next`, so the
72
+ * next {@link ensure} does not rebuild it.
73
+ */
74
+ commit(next, patch) {
75
+ if (patch) patch(this.#map);
76
+ this.#source = next;
77
+ }
78
+ /**
79
+ * Update the map after the item at `idx` changed.
80
+ *
81
+ * `next` is the new array; `oldKey` is the key the item had before the
82
+ * change, and the new key is derived from the item. If the item kept its key
83
+ * the map is untouched. If it was re-keyed, the old entry is dropped and the
84
+ * new one added — but only when no *earlier* item already claims the new
85
+ * key, so "the first occurrence wins" still holds.
86
+ */
87
+ rekey(next, idx, oldKey, item, adapter) {
88
+ const newKey = adapter.key(item, idx);
89
+ if (newKey === oldKey) return;
90
+ this.#map.delete(oldKey);
91
+ if (!this.#map.has(oldKey)) {
92
+ for (let i = idx + 1; i < next.length; i++) if (adapter.key(next[i], i) === oldKey) {
93
+ this.#map.set(oldKey, i);
94
+ break;
95
+ }
96
+ }
97
+ if (!this.#map.has(newKey)) this.#map.set(newKey, idx);
98
+ }
99
+ /**
100
+ * Rebuild the map from `items` — used after a removal, which shifts every
101
+ * later item down.
102
+ */
103
+ rebuild(items, adapter) {
104
+ const map = /* @__PURE__ */ new Map();
105
+ for (let i = 0; i < items.length; i++) {
106
+ const key = adapter.key(items[i], i);
107
+ if (!map.has(key)) map.set(key, i);
108
+ }
109
+ this.#map = map;
110
+ this.#source = items;
111
+ }
112
+ /** Add the keys of `items`, which were appended at `base`. */
113
+ addAppended(items, base, adapter) {
114
+ for (let i = 0; i < items.length; i++) {
115
+ const key = adapter.key(items[i], base + i);
116
+ if (!this.#map.has(key)) this.#map.set(key, base + i);
117
+ }
118
+ }
119
+ };
120
+ // src/grid-list/grid-list-layout.ts
24
121
  /**
25
122
  * `itemWidth` is the square's width; `rowHeight` is the full cell height
26
123
  * (square, plus the caption band in `separate` / `under` styles).
@@ -361,8 +458,7 @@ function buildLayout(p) {
361
458
  snapTarget
362
459
  };
363
460
  }
364
- //#endregion
365
- //#region src/grid-list/grid-list-source.ts
461
+ // src/grid-list/grid-list-source.ts
366
462
  /** Reorder `effective` raw indices into contiguous groups, dropping collapsed ones. */
367
463
  function applyGrouping(effective, cfg, keyOfRaw) {
368
464
  const parts = partitionByGroup(effective, (raw) => cfg.groupKeyOf(raw), cfg.labelOf ? (key, raws) => cfg.labelOf(key, raws.map((r) => cfg.itemAt(r))) : void 0);
@@ -394,15 +490,25 @@ const SYNTHETIC_PREFIX = `gl-auto-`;
394
490
  function isSyntheticKey(key) {
395
491
  return key.startsWith(SYNTHETIC_PREFIX);
396
492
  }
397
- function warnDuplicateKeys(keys) {
398
- const seen = /* @__PURE__ */ new Set();
493
+ /**
494
+ * Warn about duplicate keys while building the key → raw index map, in a single
495
+ * pass. Avoids the throwaway key array `items.map(adapter.key)` used to build.
496
+ * The map keeps the **first** occurrence of each key, matching the
497
+ * "first occurrence wins" contract the warning states.
498
+ */
499
+ function rawIndexByKey(items, keyOf) {
500
+ const index = /* @__PURE__ */ new Map();
399
501
  const dupes = /* @__PURE__ */ new Set();
400
- for (const k of keys) {
401
- if (isSyntheticKey(k)) continue;
402
- if (seen.has(k)) dupes.add(k);
403
- else seen.add(k);
502
+ for (let i = 0; i < items.length; i++) {
503
+ const key = keyOf(items[i], i);
504
+ if (index.has(key)) {
505
+ if (!isSyntheticKey(key)) dupes.add(key);
506
+ continue;
507
+ }
508
+ index.set(key, i);
404
509
  }
405
510
  if (dupes.size > 0) console.warn(`ixfx-grid-list: duplicate item key(s) ${[...dupes].map((k) => `"${k}"`).join(`, `)} — the first occurrence wins for key-based operations.`);
511
+ return index;
406
512
  }
407
513
  /** Key → first effective index, built from `keys` (first occurrence wins on duplicates). */
408
514
  function indexByKey(keys) {
@@ -422,6 +528,8 @@ var ElementGridListSource = class {
422
528
  #effectiveIndices = [];
423
529
  #keysCache;
424
530
  #indexCache;
531
+ /** Key → raw index, rebuilt with the items (first occurrence wins). */
532
+ #rawIndexByKey = /* @__PURE__ */ new Map();
425
533
  #grouping;
426
534
  #groups = [];
427
535
  #groupByKey = /* @__PURE__ */ new Map();
@@ -443,6 +551,9 @@ var ElementGridListSource = class {
443
551
  this.#indexCache ??= indexByKey(this.keys());
444
552
  return this.#indexCache.get(key) ?? -1;
445
553
  }
554
+ rawIndexOfKey(key) {
555
+ return this.#rawIndexByKey.get(key) ?? -1;
556
+ }
446
557
  keys() {
447
558
  this.#keysCache ??= this.#effectiveIndices.map((i) => this.#itemKey(this.#items[i]));
448
559
  return this.#keysCache;
@@ -490,7 +601,7 @@ var ElementGridListSource = class {
490
601
  }
491
602
  refresh() {
492
603
  this.#items = Array.from(this.#host.querySelectorAll(ITEM_SELECTOR$1)).filter((el) => !el.hidden);
493
- warnDuplicateKeys(this.#items.map((el) => this.#itemKey(el)));
604
+ this.#rawIndexByKey = rawIndexByKey(this.#items, (el) => this.#itemKey(el));
494
605
  this.#recomputeEffective();
495
606
  }
496
607
  /** Effective-order elements — the array `GridListElement` renders and slices. */
@@ -555,13 +666,20 @@ var DataGridListSource = class {
555
666
  #effectiveIndices = [];
556
667
  #keysCache;
557
668
  #indexCache;
669
+ /**
670
+ * Key → **raw** index, built in one pass over the items. The first
671
+ * occurrence of a key wins (same contract as the duplicate-key warning).
672
+ * Lets `resolveKeyToData` and the host's `updateItem` find an item without
673
+ * an O(n) scan per call.
674
+ */
675
+ #rawIndexByKey;
558
676
  #grouping;
559
677
  #groups = [];
560
678
  #groupByKey = /* @__PURE__ */ new Map();
561
679
  constructor(items, adapter) {
562
680
  this.#items = items;
563
681
  this.#adapter = adapter;
564
- warnDuplicateKeys(items.map((it, i) => adapter.key(it, i)));
682
+ this.#rawIndexByKey = rawIndexByKey(items, (it, i) => adapter.key(it, i));
565
683
  this.#recomputeEffective();
566
684
  }
567
685
  get count() {
@@ -648,8 +766,16 @@ var DataGridListSource = class {
648
766
  }
649
767
  resolveKeyToElement(_key) {}
650
768
  resolveKeyToData(key) {
651
- const idx = this.#items.findIndex((item, i) => this.#adapter.key(item, i) === key);
652
- return idx >= 0 ? this.#items[idx] : void 0;
769
+ const idx = this.#rawIndexByKey.get(key);
770
+ return idx === void 0 ? void 0 : this.#items[idx];
771
+ }
772
+ /**
773
+ * Raw (unfiltered) index of `key`, or `-1`. O(1) — the key → raw index map
774
+ * is built in one pass over the items. The first occurrence of a duplicate
775
+ * key wins.
776
+ */
777
+ rawIndexOfKey(key) {
778
+ return this.#rawIndexByKey.get(key) ?? -1;
653
779
  }
654
780
  #recomputeEffective() {
655
781
  const effective = [];
@@ -672,8 +798,7 @@ var DataGridListSource = class {
672
798
  this.#indexCache = void 0;
673
799
  }
674
800
  };
675
- //#endregion
676
- //#region src/grid-list/grid-list-view-state.ts
801
+ // src/grid-list/grid-list-view-state.ts
677
802
  /**
678
803
  * - live collapsed groups that no longer exist → pending `false`
679
804
  * - pending groups that now exist → applied (`false` collapses, `true` opens)
@@ -756,8 +881,7 @@ function gridScrollTarget(scroll, layout, indexOfKey, extent) {
756
881
  reached: target <= max + 1
757
882
  };
758
883
  }
759
- //#endregion
760
- //#region src/grid-list/grid-list.ts
884
+ // src/grid-list/grid-list.ts
761
885
  const ITEM_SELECTOR = `:scope > *`;
762
886
  const MIN_ITEM_SIZE = 16;
763
887
  /** How long scrolling must be idle before `snap-to-item` settles the viewport. */
@@ -967,6 +1091,8 @@ let GridListElement = class GridListElement extends LitElement {
967
1091
  }
968
1092
  });
969
1093
  this.#groupByChanged = false;
1094
+ this.#keyIndex = new KeyIndex();
1095
+ this.#cellRevisions = /* @__PURE__ */ new Map();
970
1096
  this.#resolveKey = (key) => this.#source.indexOfKey(key) >= 0 ? key : void 0;
971
1097
  this.#markedTickled = /* @__PURE__ */ new Set();
972
1098
  this.#markedSelected = /* @__PURE__ */ new Set();
@@ -1896,13 +2022,17 @@ let GridListElement = class GridListElement extends LitElement {
1896
2022
  const dataModeChanged = changed.has(`items`) || changed.has(`itemAdapter`);
1897
2023
  if (dataModeChanged) {
1898
2024
  this.#zoomAnchor = void 0;
2025
+ this.#ensureRawIndex();
1899
2026
  const prevKeys = this.#source?.keys() ?? [];
1900
2027
  const modeFlipped = this.itemAdapter !== void 0 !== this.#source instanceof DataGridListSource;
1901
2028
  this.#rebuildSource();
1902
2029
  const nextKeys = this.#source.keys();
1903
2030
  const nextKeySet = new Set(nextKeys);
1904
2031
  const removedKeys = prevKeys.filter((k) => !nextKeySet.has(k));
1905
- if (removedKeys.length > 0) this.#demoteGone(removedKeys);
2032
+ if (removedKeys.length > 0) {
2033
+ this.#demoteGone(removedKeys);
2034
+ for (const key of removedKeys) this.#cellRevisions.delete(key);
2035
+ }
1906
2036
  const tickledId = this.tickled.tickledId;
1907
2037
  if (tickledId && !nextKeySet.has(tickledId)) this.#demoteFocus(tickledId);
1908
2038
  this._syncItemStates();
@@ -2202,11 +2332,19 @@ let GridListElement = class GridListElement extends LitElement {
2202
2332
  /**
2203
2333
  * Data mode only: raw index of `key` in `this.items`, or `-1`. Data-mode keys
2204
2334
  * come straight from the adapter, so this is exact even under a filter/search.
2335
+ *
2336
+ * O(1) — backed by {@link #keyIndex}, a key → raw index map kept in sync
2337
+ * with `items`.
2205
2338
  */
2206
2339
  #rawIndexOfKey(key) {
2207
- const adapter = this.itemAdapter;
2208
- if (!adapter) return -1;
2209
- return this.items.findIndex((it, i) => adapter.key(it, i) === key);
2340
+ this.#ensureRawIndex();
2341
+ return this.#keyIndex.get(key);
2342
+ }
2343
+ /** Key → raw index for the current `items`. See `grid-list-key-index.ts`. */
2344
+ #keyIndex;
2345
+ /** Rebuild the key → raw index map if `items` / `itemAdapter` changed. */
2346
+ #ensureRawIndex() {
2347
+ this.#keyIndex.ensure(this.items, this.itemAdapter);
2210
2348
  }
2211
2349
  /**
2212
2350
  * Data mode: replace the whole item array. Selection and cursor keep any key
@@ -2223,23 +2361,104 @@ let GridListElement = class GridListElement extends LitElement {
2223
2361
  * A no-op in element mode.
2224
2362
  */
2225
2363
  appendItems(items) {
2226
- if (this.itemAdapter && items.length > 0) this.items = [...this.items, ...items];
2364
+ if (this.itemAdapter && items.length > 0) {
2365
+ const base = this.items.length;
2366
+ const next = [...this.items, ...items];
2367
+ this.#ensureRawIndex();
2368
+ this.#keyIndex.addAppended(items, base, this.itemAdapter);
2369
+ this.#keyIndex.commit(next);
2370
+ this.items = next;
2371
+ }
2227
2372
  }
2228
2373
  /**
2229
2374
  * Data mode: replace the item carrying `key`. A visible cell re-renders in
2230
2375
  * place (the keyed subtree is kept); an offscreen item shows its new content
2231
2376
  * when scrolled into view. Scroll and selection are untouched. Unknown keys
2232
2377
  * are ignored.
2378
+ *
2379
+ * Passing the **same object** that is already at `key` is a no-op: the
2380
+ * `items` array is left untouched (same identity) and nothing is emitted.
2381
+ * Use {@link refreshItem} to re-render a cell without changing the data.
2382
+ *
2383
+ * Updating many items one by one? Use {@link updateItems} — it applies them
2384
+ * with a single array copy and a single rebuild.
2233
2385
  */
2234
2386
  updateItem(key, item) {
2235
2387
  if (!this.itemAdapter) return;
2236
2388
  const idx = this.#rawIndexOfKey(key);
2237
2389
  if (idx < 0) return;
2390
+ if (this.items[idx] === item) return;
2238
2391
  const next = [...this.items];
2239
2392
  next[idx] = item;
2393
+ this.#ensureRawIndex();
2394
+ this.#keyIndex.rekey(next, idx, key, item, this.itemAdapter);
2395
+ this.#keyIndex.commit(next);
2240
2396
  this.items = next;
2241
2397
  }
2242
2398
  /**
2399
+ * Data mode: replace several items at once — the batched form of
2400
+ * {@link updateItem}.
2401
+ *
2402
+ * `entries` is an array of `{ key, item }` pairs (a `Map<key, item>` is
2403
+ * accepted too). All the replacements are applied with **one** array copy
2404
+ * and **one** source rebuild, so a host that must refresh n rows does not
2405
+ * pay n copies and n scans.
2406
+ *
2407
+ * Semantics match n sequential {@link updateItem} calls:
2408
+ * - unknown keys are ignored;
2409
+ * - an entry whose `item` is the identical object already at that key is
2410
+ * skipped (it cannot change anything);
2411
+ * - selection, cursor and scroll are untouched;
2412
+ * - if no entry changes anything, `items` is left untouched (same identity)
2413
+ * and nothing is emitted.
2414
+ */
2415
+ updateItems(entries) {
2416
+ if (!this.itemAdapter) return;
2417
+ const pairs = [];
2418
+ for (const entry of entries) if (Array.isArray(entry)) pairs.push([entry[0], entry[1]]);
2419
+ else pairs.push([entry.key, entry.item]);
2420
+ if (pairs.length === 0) return;
2421
+ this.#ensureRawIndex();
2422
+ const next = [...this.items];
2423
+ const touched = [];
2424
+ for (const [key, item] of pairs) {
2425
+ const idx = this.#keyIndex.get(key);
2426
+ if (idx < 0) continue;
2427
+ if (next[idx] === item) continue;
2428
+ next[idx] = item;
2429
+ touched.push([
2430
+ idx,
2431
+ key,
2432
+ item
2433
+ ]);
2434
+ }
2435
+ if (touched.length === 0) return;
2436
+ for (const [idx, key, item] of touched) this.#keyIndex.rekey(next, idx, key, item, this.itemAdapter);
2437
+ this.#keyIndex.commit(next);
2438
+ this.items = next;
2439
+ }
2440
+ /**
2441
+ * Data mode: re-render the cell for `key` without touching `items`.
2442
+ *
2443
+ * Use this when the *data* is unchanged but the cell should be redrawn — for
2444
+ * example after mutating something the adapter reads from outside the item
2445
+ * (a thumbnail's load state). The `items` array keeps its identity, so the
2446
+ * collection is not copied and no source rebuild is triggered.
2447
+ *
2448
+ * The adapter's `render` is called again for that cell on the next render,
2449
+ * so the cell picks up the new state. Other cells are left alone.
2450
+ *
2451
+ * Unknown keys are ignored. A no-op in element mode.
2452
+ */
2453
+ refreshItem(key) {
2454
+ if (!this.itemAdapter) return;
2455
+ if (this.#rawIndexOfKey(key) < 0) return;
2456
+ this.#cellRevisions.set(key, (this.#cellRevisions.get(key) ?? 0) + 1);
2457
+ this.requestUpdate();
2458
+ }
2459
+ /** Per-key revision, bumped by {@link refreshItem}. */
2460
+ #cellRevisions;
2461
+ /**
2243
2462
  * Data mode: remove the items carrying these keys. Removed keys leave the
2244
2463
  * selection and cursor silently (via the `items` change) and are held as
2245
2464
  * pending view state. A no-op in element mode.
@@ -2248,7 +2467,12 @@ let GridListElement = class GridListElement extends LitElement {
2248
2467
  if (!this.itemAdapter) return;
2249
2468
  const adapter = this.itemAdapter;
2250
2469
  const keySet = new Set(keys);
2251
- this.items = this.items.filter((it, i) => !keySet.has(adapter.key(it, i)));
2470
+ const kept = this.items.filter((it, i) => !keySet.has(adapter.key(it, i)));
2471
+ if (kept.length === this.items.length) return;
2472
+ this.#ensureRawIndex();
2473
+ this.#keyIndex.rebuild(kept, adapter);
2474
+ this.#keyIndex.commit(kept);
2475
+ this.items = kept;
2252
2476
  }
2253
2477
  /**
2254
2478
  * Data mode: drop every item. Selection and cursor are reset and one
@@ -2711,13 +2935,24 @@ let GridListElement = class GridListElement extends LitElement {
2711
2935
  >
2712
2936
  <div class="content${icon === void 0 ? `` : ` has-icon`}" part="content">
2713
2937
  ${icon === void 0 ? nothing : html`<span class="cell-icon" part="icon" style=${this.#colorStyle(this.#source.iconColorAt(index))}>${icon}</span>`}
2714
- ${this.#source.renderCellContent(index)}
2938
+ ${this.#renderCellBody(index, key)}
2715
2939
  </div>
2716
2940
  ${showCaption ? this.#renderCaption(caption, captionCss, tickled, this.#source.badgeAt(index), this.#source.textColorAt(index)) : ``}
2717
2941
  </div>
2718
2942
  `;
2719
2943
  }
2720
2944
  /**
2945
+ * The cell's content, keyed by the cell's revision so {@link refreshItem}
2946
+ * can force it to be re-evaluated (and its DOM re-created) even though
2947
+ * `items` did not change. Without a revision change the content is bound
2948
+ * normally, so Lit keeps it in place.
2949
+ */
2950
+ #renderCellBody(index, key) {
2951
+ const revision = this.#cellRevisions.get(key);
2952
+ if (revision === void 0) return this.#source.renderCellContent(index);
2953
+ return keyed(revision, this.#source.renderCellContent(index));
2954
+ }
2955
+ /**
2721
2956
  * A tickled cell swaps its plain label for an `ixfx-pan-text` in loop mode
2722
2957
  * so a truncated label scrolls instead of staying an ellipsis. Unticked
2723
2958
  * cells keep the cheap plain-text caption.
@@ -3045,5 +3280,4 @@ __decorate([state()], GridListElement.prototype, "_scrollLeft", void 0);
3045
3280
  __decorate([state()], GridListElement.prototype, "_viewportHeight", void 0);
3046
3281
  __decorate([state()], GridListElement.prototype, "_viewportWidth", void 0);
3047
3282
  GridListElement = __decorate([safeCustomElement(`ixfx-grid-list`)], GridListElement);
3048
- //#endregion
3049
3283
  export { GridListElement as t };