@ixfx/components 0.17.1 → 0.18.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 (76) hide show
  1. package/bundle/index.d.ts +351 -11
  2. package/bundle/index.js +402 -361
  3. package/dist/ac-text.js +1 -1
  4. package/dist/ac-token.js +2 -2
  5. package/dist/{checked-select-BmwqpgGr.js → checked-select-CC-qSO1P.js} +2 -2
  6. package/dist/checked-select.js +1 -1
  7. package/dist/{crumb-navigation-D7dAC0H-.js → crumb-navigation-C78edQGt.js} +3 -3
  8. package/dist/{crumb-navigation-Tm4fnsvN.d.ts → crumb-navigation-DOfOS7li.d.ts} +1 -1
  9. package/dist/crumbs.d.ts +1 -1
  10. package/dist/crumbs.js +1 -1
  11. package/dist/{data-grid-vasJtjFP.d.ts → data-grid-BYMZZbNc.d.ts} +32 -3
  12. package/dist/{data-grid-BcO3SMac.js → data-grid-CJrbLzLr.js} +80 -18
  13. package/dist/data-grid.d.ts +2 -2
  14. package/dist/data-grid.js +1 -1
  15. package/dist/{detail-list-E9WdMVbE.d.ts → detail-list-CBgnKkEm.d.ts} +35 -3
  16. package/dist/{detail-list-vPVwE1CP.js → detail-list-Dk9oSvAZ.js} +75 -10
  17. package/dist/detail-list.d.ts +3 -3
  18. package/dist/detail-list.js +1 -1
  19. package/dist/{flat-list-CfutGqKY.d.ts → flat-list-D5glF_vD.d.ts} +5 -3
  20. package/dist/flat-list.d.ts +1 -1
  21. package/dist/flat-list.js +5 -3
  22. package/dist/{grid-list-D2hinM64.js → grid-list-0wC2xGBS.js} +104 -14
  23. package/dist/{grid-list-OCdjuhng.d.ts → grid-list-B3T_2N0N.d.ts} +34 -4
  24. package/dist/grid-list.d.ts +2 -2
  25. package/dist/grid-list.js +1 -1
  26. package/dist/{incr-search-C5114RxZ.js → incr-search-Bk4acsCM.js} +14 -6
  27. package/dist/incr-search.d.ts +1 -1
  28. package/dist/incr-search.js +1 -1
  29. package/dist/{index-88ra6YHP.d.ts → index-BIv_Hu7C.d.ts} +4 -4
  30. package/dist/{index-CRLTVAyt.d.ts → index-BuvySJEc.d.ts} +5 -1
  31. package/dist/{index-CzhYJJsx.d.ts → index-fhZCKSY6.d.ts} +3 -3
  32. package/dist/index.d.ts +134 -26
  33. package/dist/index.js +479 -130
  34. package/dist/interaction-DNuFnTm0.js +3 -0
  35. package/dist/item-tags-Dz-jQq-4.d.ts +65 -0
  36. package/dist/{list-native-drag-controller-ByftBooJ.js → list-native-drag-controller-B_INa6_G.js} +109 -1
  37. package/dist/{list-native-drag-controller-CgXKdmjr.d.ts → list-native-drag-controller-Cs-Tmtaa.d.ts} +1 -1
  38. package/dist/{menu-C3DhTjHx.js → menu-CgT60B3-.js} +3 -3
  39. package/dist/{menu-item-BSxhlWnW.js → menu-item-CbywH4Xo.js} +3 -3
  40. package/dist/menu.js +2 -2
  41. package/dist/{miller-DqDEaXqT.js → miller-Dyv4UM7k.js} +3 -3
  42. package/dist/miller.d.ts +2 -2
  43. package/dist/miller.js +1 -1
  44. package/dist/narrowed-text.js +3 -3
  45. package/dist/{node-graph-DqEGv5QR.js → node-graph-yrbOLbYo.js} +1 -1
  46. package/dist/node-graph.js +1 -1
  47. package/dist/{notification-pill-BiHEJk-o.d.ts → notification-pill-BJonE_wo.d.ts} +14 -1
  48. package/dist/notifier.d.ts +1 -1
  49. package/dist/select-horiz.js +2 -2
  50. package/dist/sunburst-tree.d.ts +1 -1
  51. package/dist/sunburst-tree.js +1 -1
  52. package/dist/{sunbursttree-list-C-FuZB5z.js → sunbursttree-list-CJdznPzN.js} +2 -2
  53. package/dist/{sunbursttree-list-CsrmVSB8.d.ts → sunbursttree-list-CmydFG66.d.ts} +2 -2
  54. package/dist/{tickled-controller-BVhGKzjZ.js → tickled-controller-BsFFr_1N.js} +1 -1
  55. package/dist/{tickled-controller-DSPoG551.d.ts → tickled-controller-Dz0UqwlQ.d.ts} +5 -0
  56. package/dist/{tree-BP5fxvEX.js → tree-C3rgEEmm.js} +4 -4
  57. package/dist/{tree-component-DNuzfo6R.d.ts → tree-component-BE7OEIiH.d.ts} +7 -1
  58. package/dist/tree.d.ts +2 -2
  59. package/dist/tree.js +1 -1
  60. package/dist/{vertical-list-B9z1lbjM.js → vertical-list-By-yuhkw.js} +61 -6
  61. package/dist/{vertical-list-BzeXehBt.d.ts → vertical-list-C4z3La0C.d.ts} +26 -2
  62. package/dist/vertical-list.d.ts +2 -2
  63. package/dist/vertical-list.js +1 -1
  64. package/docs-user/README.md +1 -0
  65. package/docs-user/button.md +31 -1
  66. package/docs-user/data-grid.md +3 -0
  67. package/docs-user/detail-list.md +3 -0
  68. package/docs-user/grid-list.md +8 -0
  69. package/docs-user/index.json +6 -2
  70. package/docs-user/llms.txt +1 -0
  71. package/docs-user/multicol-list.md +3 -0
  72. package/docs-user/notifier.md +28 -0
  73. package/docs-user/user-item-tags.md +68 -0
  74. package/llms.txt +1 -0
  75. package/package.json +3 -3
  76. package/dist/interaction-8Kbbf6xN.js +0 -3
@@ -0,0 +1,3 @@
1
+ import "./list-native-drag-controller-B_INa6_G.js";
2
+ import "./tickled-controller-BsFFr_1N.js";
3
+ import "./tickled-styles-pnieYweS.js";
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Caller-assigned item tags, shared by every list-like component
3
+ * (`ixfx-grid-list`, `ixfx-detail-list`, `ixfx-data-grid`, `ixfx-multicol-list`).
4
+ *
5
+ * What a tag *means* belongs to the caller. The component only
6
+ *
7
+ * 1. exposes it for styling: a `tag-<name>` token in the item's `part`, and
8
+ * `data-tags` (space-separated, so `[data-tags~="foo"]` matches);
9
+ * 2. applies the generic interaction flags declared for it in `tagBehaviour`.
10
+ *
11
+ * Tokens are prefixed so a caller tag called `selected` cannot collide with
12
+ * the built-in state token.
13
+ */
14
+ /** Generic interaction flags a tag can switch off. Omitted flags keep the default (`true`). */
15
+ type ItemTagBehaviourFlags = {
16
+ /** `false`: no selection or tickle, no `list-select-intent`; range and select-all skip the item. */
17
+ selectable?: boolean;
18
+ /** `false`: keyboard cursor movement skips the item. */
19
+ focusable?: boolean;
20
+ /** `false`: no drag starts from the item. */
21
+ draggable?: boolean;
22
+ /** `false`: the item is left out of incremental search. */
23
+ searchable?: boolean;
24
+ };
25
+ /** Behaviour declarations keyed by tag name. */
26
+ type ItemTagBehaviour = Readonly<Record<string, ItemTagBehaviourFlags>>;
27
+ /** Tag assignment by key set: tag name → keys that carry it. Like `partialKeys`, for tags kept apart from the data. */
28
+ type ItemTagKeys = ReadonlyMap<string, ReadonlySet<string>>;
29
+ /** The effective flags for an item: every flag is explicit. */
30
+ type ResolvedItemTagFlags = Required<ItemTagBehaviourFlags>;
31
+ declare const DEFAULT_ITEM_TAG_FLAGS: ResolvedItemTagFlags;
32
+ /** Prefix of a tag's `part` token. */
33
+ declare const TAG_PART_PREFIX = "tag-";
34
+ /**
35
+ * Merge the tags from the per-item hook and from `tagKeys`, de-duplicated,
36
+ * in first-seen order. Empty and whitespace-containing names are dropped
37
+ * (they could not be a single `part` token).
38
+ */
39
+ declare function collectTags(key: string | undefined, fromHook: readonly string[] | undefined, tagKeys: ItemTagKeys | undefined): readonly string[];
40
+ /** Most restrictive wins: any `false` among the item's tags beats the default and any `true`. */
41
+ declare function resolveTagFlags(tags: readonly string[], behaviour: ItemTagBehaviour | undefined): ResolvedItemTagFlags;
42
+ /** ` tag-foo tag-bar` — append to a `part` value. Empty string when there are no tags. */
43
+ declare function tagPartTokens(tags: readonly string[]): string;
44
+ /** Value for `data-tags` (`"foo bar"`), or `undefined` when there are no tags. */
45
+ declare function tagsAttribute(tags: readonly string[]): string | undefined;
46
+ /** Reflect tags onto an element (element mode / light DOM): `data-tags`, and `tag-*` tokens in `part` it didn't set. */
47
+ declare function applyTagAttributes(el: Element, tags: readonly string[], basePart?: string): void;
48
+ /** Whether two tag lists are identical (order matters; lists are tiny). */
49
+ declare function sameTags(a: readonly string[], b: readonly string[]): boolean;
50
+ /** Whether two `tagKeys` maps hold the same tags with the same keys. */
51
+ declare function sameTagKeys(a: ItemTagKeys | undefined, b: ItemTagKeys | undefined): boolean;
52
+ /**
53
+ * Per-component holder for the two assignment forms and `tagBehaviour`.
54
+ * Resolves an item's tags and flags; caches nothing (callers re-render on change).
55
+ */
56
+ declare class ItemTagResolver {
57
+ tagKeys: ItemTagKeys | undefined;
58
+ behaviour: ItemTagBehaviour | undefined;
59
+ /** Tags for an item, merging the hook's result with `tagKeys`. */
60
+ tagsFor(key: string | undefined, fromHook?: readonly string[]): readonly string[];
61
+ flagsFor(tags: readonly string[]): ResolvedItemTagFlags;
62
+ /** Convenience: flags for an item straight from its key and hook result. */
63
+ flagsForItem(key: string | undefined, fromHook?: readonly string[]): ResolvedItemTagFlags;
64
+ }
65
+ export { ItemTagResolver as a, applyTagAttributes as c, sameTagKeys as d, sameTags as f, ItemTagKeys as i, collectTags as l, tagsAttribute as m, ItemTagBehaviour as n, ResolvedItemTagFlags as o, tagPartTokens as p, ItemTagBehaviourFlags as r, TAG_PART_PREFIX as s, DEFAULT_ITEM_TAG_FLAGS as t, resolveTagFlags as u };
@@ -1,5 +1,110 @@
1
1
  import { n as getIconEntry, r as getIconFont } from "./registry-DcF0fO7l.js";
2
2
  import { css } from "lit";
3
+ // src/interaction/item-tags.ts
4
+ const DEFAULT_ITEM_TAG_FLAGS = Object.freeze({
5
+ selectable: true,
6
+ focusable: true,
7
+ draggable: true,
8
+ searchable: true
9
+ });
10
+ const NO_TAGS = Object.freeze([]);
11
+ /** Prefix of a tag's `part` token. */
12
+ const TAG_PART_PREFIX = `tag-`;
13
+ /**
14
+ * Merge the tags from the per-item hook and from `tagKeys`, de-duplicated,
15
+ * in first-seen order. Empty and whitespace-containing names are dropped
16
+ * (they could not be a single `part` token).
17
+ */
18
+ function collectTags(key, fromHook, tagKeys) {
19
+ let out;
20
+ const add = (tag) => {
21
+ if (tag === `` || /\s/.test(tag)) return;
22
+ out ??= [];
23
+ if (!out.includes(tag)) out.push(tag);
24
+ };
25
+ if (fromHook) for (const tag of fromHook) add(tag);
26
+ if (tagKeys && key !== void 0) {
27
+ for (const [tag, keys] of tagKeys) if (keys.has(key)) add(tag);
28
+ }
29
+ return out ?? NO_TAGS;
30
+ }
31
+ /** Most restrictive wins: any `false` among the item's tags beats the default and any `true`. */
32
+ function resolveTagFlags(tags, behaviour) {
33
+ if (tags.length === 0 || !behaviour) return DEFAULT_ITEM_TAG_FLAGS;
34
+ let selectable = true;
35
+ let focusable = true;
36
+ let draggable = true;
37
+ let searchable = true;
38
+ for (const tag of tags) {
39
+ const flags = Object.hasOwn(behaviour, tag) ? behaviour[tag] : void 0;
40
+ if (!flags) continue;
41
+ if (flags.selectable === false) selectable = false;
42
+ if (flags.focusable === false) focusable = false;
43
+ if (flags.draggable === false) draggable = false;
44
+ if (flags.searchable === false) searchable = false;
45
+ }
46
+ return selectable && focusable && draggable && searchable ? DEFAULT_ITEM_TAG_FLAGS : {
47
+ selectable,
48
+ focusable,
49
+ draggable,
50
+ searchable
51
+ };
52
+ }
53
+ /** ` tag-foo tag-bar` — append to a `part` value. Empty string when there are no tags. */
54
+ function tagPartTokens(tags) {
55
+ let out = ``;
56
+ for (const tag of tags) out += ` ${TAG_PART_PREFIX}${tag}`;
57
+ return out;
58
+ }
59
+ /** Value for `data-tags` (`"foo bar"`), or `undefined` when there are no tags. */
60
+ function tagsAttribute(tags) {
61
+ return tags.length === 0 ? void 0 : tags.join(` `);
62
+ }
63
+ /** Reflect tags onto an element (element mode / light DOM): `data-tags`, and `tag-*` tokens in `part` it didn't set. */
64
+ function applyTagAttributes(el, tags, basePart) {
65
+ const value = tagsAttribute(tags);
66
+ if (value === void 0) el.removeAttribute(`data-tags`);
67
+ else el.setAttribute(`data-tags`, value);
68
+ if (basePart !== void 0) {
69
+ const part = basePart + tagPartTokens(tags);
70
+ if (part === ``) el.removeAttribute(`part`);
71
+ else el.setAttribute(`part`, part);
72
+ }
73
+ }
74
+ /** Whether two tag lists are identical (order matters; lists are tiny). */
75
+ function sameTags(a, b) {
76
+ if (a === b) return true;
77
+ if (a.length !== b.length) return false;
78
+ return a.every((tag, i) => tag === b[i]);
79
+ }
80
+ /** Whether two `tagKeys` maps hold the same tags with the same keys. */
81
+ function sameTagKeys(a, b) {
82
+ if (a === b) return true;
83
+ if (!a || !b || a.size !== b.size) return false;
84
+ for (const [tag, keys] of a) {
85
+ const other = b.get(tag);
86
+ if (!other || other.size !== keys.size) return false;
87
+ for (const key of keys) if (!other.has(key)) return false;
88
+ }
89
+ return true;
90
+ }
91
+ /**
92
+ * Per-component holder for the two assignment forms and `tagBehaviour`.
93
+ * Resolves an item's tags and flags; caches nothing (callers re-render on change).
94
+ */
95
+ var ItemTagResolver = class {
96
+ /** Tags for an item, merging the hook's result with `tagKeys`. */
97
+ tagsFor(key, fromHook) {
98
+ return collectTags(key, fromHook, this.tagKeys);
99
+ }
100
+ flagsFor(tags) {
101
+ return resolveTagFlags(tags, this.behaviour);
102
+ }
103
+ /** Convenience: flags for an item straight from its key and hook result. */
104
+ flagsForItem(key, fromHook) {
105
+ return resolveTagFlags(collectTags(key, fromHook, this.tagKeys), this.behaviour);
106
+ }
107
+ };
3
108
  // src/interaction/list-drag-preview-row.ts
4
109
  const ROW_MIN = 24;
5
110
  const ROW_MAX = 36;
@@ -780,6 +885,9 @@ var ListNativeDragController = class {
780
885
  try {
781
886
  this.#config.writeDataTransfer?.(event.dataTransfer, detail);
782
887
  } catch {}
888
+ try {
889
+ this.#host.writeDataTransfer?.(event.dataTransfer, detail);
890
+ } catch {}
783
891
  }
784
892
  const hotspot = preview.hotspot ?? {
785
893
  x: 16,
@@ -815,4 +923,4 @@ var ListNativeDragController = class {
815
923
  } catch {}
816
924
  };
817
925
  };
818
- export { listItemFadeKeyframes as a, captionForEntry as c, animateListItemOut as i, createDefaultListDragPreview as l, LIST_ITEM_MOTION_MS as n, prefersReducedMotion as o, animateListItemIn as r, startListItemOutAnimation as s, ListNativeDragController as t };
926
+ export { sameTags as _, listItemFadeKeyframes as a, captionForEntry as c, ItemTagResolver as d, TAG_PART_PREFIX as f, sameTagKeys as g, resolveTagFlags as h, animateListItemOut as i, createDefaultListDragPreview as l, collectTags as m, LIST_ITEM_MOTION_MS as n, prefersReducedMotion as o, applyTagAttributes as p, animateListItemIn as r, startListItemOutAnimation as s, ListNativeDragController as t, DEFAULT_ITEM_TAG_FLAGS as u, tagPartTokens as v, tagsAttribute as y };
@@ -1,4 +1,4 @@
1
- import { B as ListNativeDragStartDetail, I as ListDragPreviewContext, L as ListDragPreviewRenderer, P as ListDragEntry, R as ListDragPreviewSourceResolver, z as ListDragSource } from "./tree-component-DNuzfo6R.js";
1
+ import { B as ListDragSource, F as ListDragEntry, L as ListDragPreviewContext, R as ListDragPreviewRenderer, V as ListNativeDragStartDetail, z as ListDragPreviewSourceResolver } from "./tree-component-BE7OEIiH.js";
2
2
  import { ReactiveController, ReactiveControllerHost } from "lit";
3
3
  type ListNativeDragControllerConfig<T> = {
4
4
  readonly source: ListDragSource;
@@ -1,8 +1,8 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D3KUYPsf.js";
2
2
  import { t as tickledItemStyles } from "./tickled-styles-pnieYweS.js";
3
3
  import { n as safeCustomElement, t as __decorate } from "./decorate-Dxs8sFX8.js";
4
- import { n as MenuTrigger, r as MenuContainer, t as MenuItem } from "./menu-item-BSxhlWnW.js";
5
- import "./interaction-8Kbbf6xN.js";
4
+ import { n as MenuTrigger, r as MenuContainer, t as MenuItem } from "./menu-item-CbywH4Xo.js";
5
+ import "./interaction-DNuFnTm0.js";
6
6
  import { t as themeFallbacks } from "./fallbacks-BPjjBoED.js";
7
7
  import "./icon-DvTQuylG.js";
8
8
  import { LitElement, css, html, nothing } from "lit";
@@ -128,7 +128,7 @@ let MenuCheckItem = class MenuCheckItem extends LitElement {
128
128
  }
129
129
  _resolvedLabel() {
130
130
  if (this.label) return this.label;
131
- if (this.registry && this.command) return this.registry.get(this.command)?.label ?? ``;
131
+ if (this.registry && this.command) return this.registry.getLabel(this.command, void 0) ?? ``;
132
132
  return ``;
133
133
  }
134
134
  _resolvedIcon() {
@@ -1,10 +1,10 @@
1
- import { t as TickledController } from "./tickled-controller-BVhGKzjZ.js";
1
+ import { t as TickledController } from "./tickled-controller-BsFFr_1N.js";
2
2
  import { n as tickledStyles, t as tickledItemStyles } from "./tickled-styles-pnieYweS.js";
3
3
  import { t as themeFallbacks } from "./fallbacks-BPjjBoED.js";
4
4
  import { t as popupSurfaceStyles } from "./popup-D8IxN1Eq.js";
5
5
  import { n as safeCustomElement, t as __decorate } from "./decorate-Dxs8sFX8.js";
6
6
  import "./icon-DvTQuylG.js";
7
- import "./interaction-8Kbbf6xN.js";
7
+ import "./interaction-DNuFnTm0.js";
8
8
  import { t as scrollFadeStyles } from "./scroll-fade-DH8OXSqL.js";
9
9
  import { LitElement, css, html } from "lit";
10
10
  import { property, query, state } from "lit/decorators.js";
@@ -793,7 +793,7 @@ let MenuItem = class MenuItem extends LitElement {
793
793
  }
794
794
  _resolvedLabel() {
795
795
  if (this.label) return this.label;
796
- if (this.registry && this.command) return this.registry.get(this.command)?.label ?? ``;
796
+ if (this.registry && this.command) return this.registry.getLabel(this.command, void 0) ?? ``;
797
797
  return ``;
798
798
  }
799
799
  _resolvedIcon() {
package/dist/menu.js CHANGED
@@ -1,3 +1,3 @@
1
- import { n as MenuTrigger, r as MenuContainer, t as MenuItem } from "./menu-item-BSxhlWnW.js";
2
- import { a as menuFromTreeToElements, c as MenuSubTrigger, d as MenuBar, i as menuFromTree, l as MenuCommandController, n as MenuRadioGroup, o as MenuHeader, r as MenuRadioItem, s as MenuSeparator, u as MenuCheckItem } from "./menu-C3DhTjHx.js";
1
+ import { n as MenuTrigger, r as MenuContainer, t as MenuItem } from "./menu-item-CbywH4Xo.js";
2
+ import { a as menuFromTreeToElements, c as MenuSubTrigger, d as MenuBar, i as menuFromTree, l as MenuCommandController, n as MenuRadioGroup, o as MenuHeader, r as MenuRadioItem, s as MenuSeparator, u as MenuCheckItem } from "./menu-CgT60B3-.js";
3
3
  export { MenuBar, MenuCheckItem, MenuCommandController, MenuContainer, MenuHeader, MenuItem, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuSubTrigger, MenuTrigger, menuFromTree, menuFromTreeToElements };
@@ -1,14 +1,14 @@
1
1
  import { t as collectDataResult } from "./data-provider-C6ZNAcaT.js";
2
- import { i as ListSearchController, n as listSearchStyles, o as registerListSearchCommands, r as LIST_SEARCH_MODES, t as createTreeListSearchAdapter } from "./incr-search-C5114RxZ.js";
2
+ import { i as ListSearchController, n as listSearchStyles, o as registerListSearchCommands, r as LIST_SEARCH_MODES, t as createTreeListSearchAdapter } from "./incr-search-Bk4acsCM.js";
3
3
  import { i as sameKeySet, r as isPartialKey, t as PARTIAL_DESCRIPTION } from "./partial-keys-D4l_ede_.js";
4
- import { t as TickledController } from "./tickled-controller-BVhGKzjZ.js";
4
+ import { t as TickledController } from "./tickled-controller-BsFFr_1N.js";
5
5
  import { n as tickledStyles, t as tickledItemStyles } from "./tickled-styles-pnieYweS.js";
6
6
  import { a as capKeys, d as partitionKeys, l as keysToArray, n as EMPTY_KEYS } from "./pending-Afl4LT64.js";
7
7
  import { t as themeFallbacks } from "./fallbacks-BPjjBoED.js";
8
8
  import { n as safeCustomElement, t as __decorate } from "./decorate-Dxs8sFX8.js";
9
9
  import { n as appearanceColor, t as appearanceAbsent } from "./item-appearance-FRO3TRFI.js";
10
10
  import { a as restoreElementScroll, i as onUserScrollIntent, o as scrollToOffset, r as captureElementScroll, t as ViewStateController } from "./view-state-controller-DiPAPiA7.js";
11
- import "./interaction-8Kbbf6xN.js";
11
+ import "./interaction-DNuFnTm0.js";
12
12
  import { LitElement, css, html, nothing } from "lit";
13
13
  import { property, state } from "lit/decorators.js";
14
14
  import { createCommandRegistry } from "@clinth/ui-commands";
package/dist/miller.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as TreeTickleDetail, O as TreeSelectDetail, b as TreeItemClickDetail, i as TreeCollapseEvent, j as TreeTickleEvent, k as TreeSelectEvent, n as TreeActivateEvent, r as TreeCollapseDetail, t as TreeActivateDetail, v as TreeExpandDetail, x as TreeItemClickEvent, y as TreeExpandEvent } from "./tree-component-DNuzfo6R.js";
1
+ import { A as TreeTickleDetail, O as TreeSelectDetail, b as TreeItemClickDetail, i as TreeCollapseEvent, j as TreeTickleEvent, k as TreeSelectEvent, n as TreeActivateEvent, r as TreeCollapseDetail, t as TreeActivateDetail, v as TreeExpandDetail, x as TreeItemClickEvent, y as TreeExpandEvent } from "./tree-component-BE7OEIiH.js";
2
2
  import { a as TreeItem, o as TreeNode } from "./types-6hpXRKt7.js";
3
- import { _ as MillerRebaseEvent, a as MillerBaseElementEventMap, c as MillerHeaderClickEvent, d as MillerItemDblClickDetail, f as MillerItemDblClickEvent, g as MillerRebaseDetail, h as MillerItemState, i as MillerBaseElement, l as MillerHeaderRightClickDetail, m as MillerItemRightClickEvent, n as MillerTreeControllerOptions, o as MillerListViewState, p as MillerItemRightClickDetail, r as MillerListElement, s as MillerHeaderClickDetail, t as MillerTreeController, u as MillerHeaderRightClickEvent, v as MillerSelectionMode } from "./index-CzhYJJsx.js";
3
+ import { _ as MillerRebaseEvent, a as MillerBaseElementEventMap, c as MillerHeaderClickEvent, d as MillerItemDblClickDetail, f as MillerItemDblClickEvent, g as MillerRebaseDetail, h as MillerItemState, i as MillerBaseElement, l as MillerHeaderRightClickDetail, m as MillerItemRightClickEvent, n as MillerTreeControllerOptions, o as MillerListViewState, p as MillerItemRightClickDetail, r as MillerListElement, s as MillerHeaderClickDetail, t as MillerTreeController, u as MillerHeaderRightClickEvent, v as MillerSelectionMode } from "./index-fhZCKSY6.js";
4
4
  export { type TreeActivateDetail as MillerActivateDetail, type TreeActivateEvent as MillerActivateEvent, MillerBaseElement, MillerBaseElementEventMap, type TreeCollapseDetail as MillerCollapseDetail, type TreeCollapseEvent as MillerCollapseEvent, type TreeExpandDetail as MillerExpandDetail, type TreeExpandEvent as MillerExpandEvent, MillerHeaderClickDetail, MillerHeaderClickEvent, MillerHeaderRightClickDetail, MillerHeaderRightClickEvent, type TreeItem as MillerItem, type TreeItemClickDetail as MillerItemClickDetail, type TreeItemClickEvent as MillerItemClickEvent, MillerItemDblClickDetail, MillerItemDblClickEvent, MillerItemRightClickDetail, MillerItemRightClickEvent, MillerItemState, MillerListElement, type MillerListViewState, type TreeNode as MillerNode, MillerRebaseDetail, MillerRebaseEvent, type TreeSelectDetail as MillerSelectDetail, type TreeSelectEvent as MillerSelectEvent, MillerSelectionMode, type TreeTickleDetail as MillerTickleDetail, type TreeTickleEvent as MillerTickleEvent, MillerTreeController, MillerTreeControllerOptions };
package/dist/miller.js CHANGED
@@ -1 +1 @@
1
- export { r as MillerBaseElement, n as MillerListElement, t as MillerTreeController } from "./miller-DqDEaXqT.js";
1
+ export { r as MillerBaseElement, n as MillerListElement, t as MillerTreeController } from "./miller-Dyv4UM7k.js";
@@ -1,8 +1,8 @@
1
1
  import { n as buildHighlightTargets, r as clearHighlights, t as applyHighlights } from "./highlight-noLHFSKZ.js";
2
- import { t as TickledController } from "./tickled-controller-BVhGKzjZ.js";
2
+ import { t as TickledController } from "./tickled-controller-BsFFr_1N.js";
3
3
  import { n as tickledStyles, t as tickledItemStyles } from "./tickled-styles-pnieYweS.js";
4
- import { m as createIncrSearch } from "./incr-search-C5114RxZ.js";
5
- import "./interaction-8Kbbf6xN.js";
4
+ import { m as createIncrSearch } from "./incr-search-Bk4acsCM.js";
5
+ import "./interaction-DNuFnTm0.js";
6
6
  import { t as themeFallbacks } from "./fallbacks-BPjjBoED.js";
7
7
  import { n as safeCustomElement, t as __decorate } from "./decorate-Dxs8sFX8.js";
8
8
  import { LitElement, css, html, nothing } from "lit";
@@ -2,7 +2,7 @@ import { n as safeCustomElement, t as __decorate } from "./decorate-Dxs8sFX8.js"
2
2
  import { t as themeFallbacks } from "./fallbacks-BPjjBoED.js";
3
3
  import { t as handleStyles } from "./handle-BVUWv97X.js";
4
4
  import "./icon-DvTQuylG.js";
5
- import "./menu-item-BSxhlWnW.js";
5
+ import "./menu-item-CbywH4Xo.js";
6
6
  import { t as ViewStateController } from "./view-state-controller-DiPAPiA7.js";
7
7
  import { LitElement, css, html, nothing, svg } from "lit";
8
8
  import { property, state } from "lit/decorators.js";
@@ -1 +1 @@
1
- export { Y as DEFAULT_FORCE_OPTIONS, T as DRAG_THRESHOLD_PX, dt as EASY_CONNECT_MARGIN, tt as EDGE_CORNER_RADIUS, z as GraphNodeElement, K as GraphPortElement, D as MARQUEE_THRESHOLD_PX, q as MAX_BLINK_HZ, u as MAX_FLOW_SPEED, O as MarqueeController, B as NODE_SHAPES, E as NodeDragController, t as NodeGraphElement, m as PanZoomController, U as RESIZE_HANDLES, r as WireDragController, bt as addWire, J as blinkPeriodSeconds, g as boundsOf, ht as canConnect, _ as clampZoom, c as collapsedOffset, k as combineSelection, xt as connectContext, St as cycleBlockedNodes, nt as defaultSide, Ct as edgeId, rt as edgeMidpoint, it as edgePath, at as edgeShape, wt as ensurePort, ot as extendFromSide, o as findProximityConnection, F as findSnapTarget, gt as findValidWire, v as fitBounds, y as fitRects, b as flowToScreen, X as forceMovement, Z as forcePin, Q as forcePositions, $ as forceState, et as forceStep, Tt as fromEdges, Et as hasWire, Dt as inDegreeOf, ft as inEasyConnectZone, Ot as incomingEdge, kt as incomingEdges, h as isEditableTarget, V as isNodeShape, W as isResizeHandle, A as marqueeStyle, l as measureNode, w as nodeGraphStyles, j as nodesInRect, _t as normaliseConnection, At as outDegreeOf, x as panBy, jt as parsePortId, pt as pickStartPort, st as polylineMidpoint, ct as polylinePath, lt as polylineShape, Mt as portId, I as proximityFactor, M as rectFromPoints, s as rectGap, N as rectsIntersect, Nt as removeNode, mt as removeNodes, Pt as removeWire, n as renderWires, G as resizeRect, vt as resolveConnection, d as sanitizeFlowSpeed, S as screenToFlow, i as selectionAfterEdgeClick, a as selectionAfterNodePress, L as settled, H as shapeSpec, R as smoothStep, ut as stepPoints, Ft as toEdges, It as toNodeGraph, yt as typesCompatible, P as wantsMarquee, f as withEntry, p as withWireFlow, C as zoomAt } from "./node-graph-DqEGv5QR.js";
1
+ export { Y as DEFAULT_FORCE_OPTIONS, T as DRAG_THRESHOLD_PX, dt as EASY_CONNECT_MARGIN, tt as EDGE_CORNER_RADIUS, z as GraphNodeElement, K as GraphPortElement, D as MARQUEE_THRESHOLD_PX, q as MAX_BLINK_HZ, u as MAX_FLOW_SPEED, O as MarqueeController, B as NODE_SHAPES, E as NodeDragController, t as NodeGraphElement, m as PanZoomController, U as RESIZE_HANDLES, r as WireDragController, bt as addWire, J as blinkPeriodSeconds, g as boundsOf, ht as canConnect, _ as clampZoom, c as collapsedOffset, k as combineSelection, xt as connectContext, St as cycleBlockedNodes, nt as defaultSide, Ct as edgeId, rt as edgeMidpoint, it as edgePath, at as edgeShape, wt as ensurePort, ot as extendFromSide, o as findProximityConnection, F as findSnapTarget, gt as findValidWire, v as fitBounds, y as fitRects, b as flowToScreen, X as forceMovement, Z as forcePin, Q as forcePositions, $ as forceState, et as forceStep, Tt as fromEdges, Et as hasWire, Dt as inDegreeOf, ft as inEasyConnectZone, Ot as incomingEdge, kt as incomingEdges, h as isEditableTarget, V as isNodeShape, W as isResizeHandle, A as marqueeStyle, l as measureNode, w as nodeGraphStyles, j as nodesInRect, _t as normaliseConnection, At as outDegreeOf, x as panBy, jt as parsePortId, pt as pickStartPort, st as polylineMidpoint, ct as polylinePath, lt as polylineShape, Mt as portId, I as proximityFactor, M as rectFromPoints, s as rectGap, N as rectsIntersect, Nt as removeNode, mt as removeNodes, Pt as removeWire, n as renderWires, G as resizeRect, vt as resolveConnection, d as sanitizeFlowSpeed, S as screenToFlow, i as selectionAfterEdgeClick, a as selectionAfterNodePress, L as settled, H as shapeSpec, R as smoothStep, ut as stepPoints, Ft as toEdges, It as toNodeGraph, yt as typesCompatible, P as wantsMarquee, f as withEntry, p as withWireFlow, C as zoomAt } from "./node-graph-yrbOLbYo.js";
@@ -35,6 +35,19 @@ type NotifierOptions = {
35
35
  tapBehaviour?: `none` | `dismiss`;
36
36
  tapHandlerDefault?: (notification: Notification) => void;
37
37
  };
38
+ /** A notification as remembered by a manager's history. */
39
+ type NotificationHistoryEntry = Notification & {
40
+ /** `true` once read: via `markRead`/`markAllRead`, or when the user taps the toast. */
41
+ readonly read: boolean;
42
+ /** Set once the toast is no longer visible (timed out, evicted, tapped away or dismissed). */
43
+ readonly dismissedAt?: number;
44
+ };
45
+ type NotificationHistoryListener = (history: readonly NotificationHistoryEntry[]) => void;
46
+ /** Options for `createNotificationManager` / `NotificationManager.scope`. */
47
+ type NotificationManagerOptions = NotifierOptions & {
48
+ /** Max history entries kept per manager (oldest dropped first). Default 100. */
49
+ historyLimit?: number;
50
+ };
38
51
  type PillTapDetail = {
39
52
  readonly id: string;
40
53
  };
@@ -60,4 +73,4 @@ declare global {
60
73
  interface NotificationPillElement {
61
74
  addEventListener: (<K extends keyof NotificationPillElementEventMap>(type: K, listener: (this: NotificationPillElement, event: NotificationPillElementEventMap[K]) => void, options?: boolean | AddEventListenerOptions) => void) & ((type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions) => void);
62
75
  }
63
- export { Notification as a, NotificationRendererHooks as c, PillTapEvent as i, NotificationType as l, NotificationPillElementEventMap as n, NotificationContent as o, PillTapDetail as r, NotificationRenderer as s, NotificationPillElement as t, NotifierOptions as u };
76
+ export { Notification as a, NotificationHistoryListener as c, NotificationRendererHooks as d, NotificationType as f, PillTapEvent as i, NotificationManagerOptions as l, NotificationPillElementEventMap as n, NotificationContent as o, NotifierOptions as p, PillTapDetail as r, NotificationHistoryEntry as s, NotificationPillElement as t, NotificationRenderer as u };
@@ -1,2 +1,2 @@
1
- import { i as PillTapEvent, n as NotificationPillElementEventMap, r as PillTapDetail, t as NotificationPillElement } from "./notification-pill-BiHEJk-o.js";
1
+ import { i as PillTapEvent, n as NotificationPillElementEventMap, r as PillTapDetail, t as NotificationPillElement } from "./notification-pill-BJonE_wo.js";
2
2
  export { NotificationPillElement, NotificationPillElementEventMap, PillTapDetail, PillTapEvent };
@@ -1,6 +1,6 @@
1
- import { t as TickledController } from "./tickled-controller-BVhGKzjZ.js";
1
+ import { t as TickledController } from "./tickled-controller-BsFFr_1N.js";
2
2
  import { n as tickledStyles, t as tickledItemStyles } from "./tickled-styles-pnieYweS.js";
3
- import "./interaction-8Kbbf6xN.js";
3
+ import "./interaction-DNuFnTm0.js";
4
4
  import { t as WheelNudgeMixin } from "./wheel-nudge-DgJzrL28.js";
5
5
  import { t as themeFallbacks } from "./fallbacks-BPjjBoED.js";
6
6
  import { t as scrollFadeStyles } from "./scroll-fade-DH8OXSqL.js";
@@ -1,2 +1,2 @@
1
- import { a as SunburstViewState, i as SunburstZoomEvent, n as SunburstTreeListElementEventMap, r as SunburstZoomDetail, t as SunburstTreeListElement } from "./sunbursttree-list-CsrmVSB8.js";
1
+ import { a as SunburstViewState, i as SunburstZoomEvent, n as SunburstTreeListElementEventMap, r as SunburstZoomDetail, t as SunburstTreeListElement } from "./sunbursttree-list-CmydFG66.js";
2
2
  export { SunburstTreeListElement, SunburstTreeListElementEventMap, type SunburstViewState, SunburstZoomDetail, SunburstZoomEvent };
@@ -1 +1 @@
1
- export { t as SunburstTreeListElement } from "./sunbursttree-list-C-FuZB5z.js";
1
+ export { t as SunburstTreeListElement } from "./sunbursttree-list-CJdznPzN.js";
@@ -1,7 +1,7 @@
1
1
  import { t as collectDataResult } from "./data-provider-C6ZNAcaT.js";
2
2
  import { a as resolveKeyPath } from "./tree-DUc-iQcg.js";
3
- import { i as ListSearchController, n as listSearchStyles, o as registerListSearchCommands, r as LIST_SEARCH_MODES, t as createTreeListSearchAdapter } from "./incr-search-C5114RxZ.js";
4
- import { t as TickledController } from "./tickled-controller-BVhGKzjZ.js";
3
+ import { i as ListSearchController, n as listSearchStyles, o as registerListSearchCommands, r as LIST_SEARCH_MODES, t as createTreeListSearchAdapter } from "./incr-search-Bk4acsCM.js";
4
+ import { t as TickledController } from "./tickled-controller-BsFFr_1N.js";
5
5
  import { a as capKeys, l as keysToArray, n as EMPTY_KEYS } from "./pending-Afl4LT64.js";
6
6
  import { t as themeFallbacks } from "./fallbacks-BPjjBoED.js";
7
7
  import { t as ViewStateController } from "./view-state-controller-DiPAPiA7.js";
@@ -1,8 +1,8 @@
1
- import { C as TreeItemDblClickEvent, E as TreeSearchHost, M as TreeDataModel, a as TreeComponent, i as TreeCollapseEvent, j as TreeTickleEvent, k as TreeSelectEvent, n as TreeActivateEvent, o as TreeComponentEventMap, x as TreeItemClickEvent, y as TreeExpandEvent } from "./tree-component-DNuzfo6R.js";
1
+ import { C as TreeItemDblClickEvent, E as TreeSearchHost, M as TreeDataModel, a as TreeComponent, i as TreeCollapseEvent, j as TreeTickleEvent, k as TreeSelectEvent, n as TreeActivateEvent, o as TreeComponentEventMap, x as TreeItemClickEvent, y as TreeExpandEvent } from "./tree-component-BE7OEIiH.js";
2
2
  import { a as TreeItem, n as TreeExclusivity, o as TreeNode, r as TreeFilterPredicate, s as TreeSelectionFilter, t as LoadChildrenCallback } from "./types-6hpXRKt7.js";
3
3
  import { a as ViewStateBase, t as GetViewStateOptions } from "./types-16GC5k1z.js";
4
4
  import "./index-Cdcek1Oj.js";
5
- import { S as ListSearchController } from "./index-CRLTVAyt.js";
5
+ import { S as ListSearchController } from "./index-BuvySJEc.js";
6
6
  import { LitElement, PropertyValues } from "lit";
7
7
  import { CommandRegistry } from "@clinth/ui-commands";
8
8
  /**
@@ -185,7 +185,7 @@ var TickledController = class TickledController {
185
185
  const modeChanged = this._inputMode !== `keyboard`;
186
186
  this._inputMode = `keyboard`;
187
187
  TickledController.ignoreHoverUntilPointerMoves();
188
- const enabledItems = this.config.getItems().filter((item) => item.enabled !== false);
188
+ const enabledItems = this.config.getItems().filter((item) => item.enabled !== false && item.focusable !== false);
189
189
  if (enabledItems.length === 0) return;
190
190
  let newId;
191
191
  if (direction === `first`) newId = enabledItems[0].id;
@@ -11,6 +11,11 @@ type TickledItem<T = unknown> = {
11
11
  * Whether the item is currently enabled/interactive
12
12
  */
13
13
  readonly enabled?: boolean;
14
+ /**
15
+ * `false`: hover may still tickle the item, but keyboard cursor movement
16
+ * skips it. Independent of `enabled` (which blocks both).
17
+ */
18
+ readonly focusable?: boolean;
14
19
  };
15
20
  /**
16
21
  * Input mode determines which mechanism controls the tickled state
@@ -1,13 +1,13 @@
1
- import { t as TickledController } from "./tickled-controller-BVhGKzjZ.js";
1
+ import { t as TickledController } from "./tickled-controller-BsFFr_1N.js";
2
2
  import { n as tickledStyles, t as tickledItemStyles } from "./tickled-styles-pnieYweS.js";
3
3
  import { t as themeFallbacks } from "./fallbacks-BPjjBoED.js";
4
4
  import { n as safeCustomElement, t as __decorate } from "./decorate-Dxs8sFX8.js";
5
- import { i as ListSearchController, n as listSearchStyles, o as registerListSearchCommands, r as LIST_SEARCH_MODES, t as createTreeListSearchAdapter } from "./incr-search-C5114RxZ.js";
6
- import { i as animateListItemOut, o as prefersReducedMotion, r as animateListItemIn, t as ListNativeDragController } from "./list-native-drag-controller-ByftBooJ.js";
5
+ import { i as ListSearchController, n as listSearchStyles, o as registerListSearchCommands, r as LIST_SEARCH_MODES, t as createTreeListSearchAdapter } from "./incr-search-Bk4acsCM.js";
6
+ import { i as animateListItemOut, o as prefersReducedMotion, r as animateListItemIn, t as ListNativeDragController } from "./list-native-drag-controller-B_INa6_G.js";
7
7
  import { a as capKeys, c as keysAsFlags, f as withoutFlag, i as capFlags, l as keysToArray, n as EMPTY_KEYS, o as flagsFromRecord, s as flagsToRecord, t as EMPTY_FLAGS } from "./pending-Afl4LT64.js";
8
8
  import { i as sameKeySet, r as isPartialKey, t as PARTIAL_DESCRIPTION } from "./partial-keys-D4l_ede_.js";
9
9
  import { n as createScrollHoverGuard } from "./scroll-hover-guard-BGAjtyXT.js";
10
- import "./interaction-8Kbbf6xN.js";
10
+ import "./interaction-DNuFnTm0.js";
11
11
  import { t as collectDataResult } from "./data-provider-C6ZNAcaT.js";
12
12
  import { n as anchorFromRow, o as scrollToOffset, t as ViewStateController } from "./view-state-controller-DiPAPiA7.js";
13
13
  import { i as reconcileSelection, r as reconcileExpansion } from "./tree-DUc-iQcg.js";
@@ -42,6 +42,12 @@ interface ListDragPreview {
42
42
  readonly canvas?: HTMLCanvasElement;
43
43
  readonly dispose?: () => void;
44
44
  }
45
+ /**
46
+ * Writes an application payload onto the drag's `DataTransfer` at `dragstart`.
47
+ * Every list component exposes this as a public `writeDataTransfer` property;
48
+ * `ListNativeDragController` invokes it after any built-in payload writer.
49
+ */
50
+ type ListDragDataTransferWriter<T> = (dataTransfer: DataTransfer, detail: ListNativeDragStartDetail<T>) => void;
45
51
  type ListDragPreviewRenderer<T> = (context: ListDragPreviewContext<T>) => ListDragPreview;
46
52
  type ListDragPreviewSourceResolver<T> = (entry: ListDragEntry<T>) => CanvasImageSource | undefined;
47
53
  interface ListNativeDragStartDetail<T = unknown> {
@@ -435,4 +441,4 @@ interface TreeSearchHost extends TreeComponent {
435
441
  readonly shadowRoot: ShadowRoot | null;
436
442
  readonly updateComplete: Promise<boolean>;
437
443
  }
438
- export { TreeTickleDetail as A, ListNativeDragStartDetail as B, TreeItemDblClickEvent as C, TreeSelectAllOptions as D, TreeSearchHost as E, ListDragPreview as F, ListDragPreviewContext as I, ListDragPreviewRenderer as L, TreeDataModel as M, TreeDataModelOptions as N, TreeSelectDetail as O, ListDragEntry as P, ListDragPreviewSourceResolver as R, TreeItemDblClickDetail as S, TreeRevealMode as T, ListNativeDragStartEvent as V, TreeDropTarget as _, TreeComponent as a, TreeItemClickDetail as b, TreeDragContext as c, TreeDragStartEvent as d, TreeDropApplyContext as f, TreeDropPosition as g, TreeDropEvent as h, TreeCollapseEvent as i, TreeTickleEvent as j, TreeSelectEvent as k, TreeDragEndEvent as l, TreeDropDetail as m, TreeActivateEvent as n, TreeComponentEventMap as o, TreeDropContext as p, TreeCollapseDetail as r, TreeDndMode as s, TreeActivateDetail as t, TreeDragOverEvent as u, TreeExpandDetail as v, TreeNavigateOptions as w, TreeItemClickEvent as x, TreeExpandEvent as y, ListDragSource as z };
444
+ export { TreeTickleDetail as A, ListDragSource as B, TreeItemDblClickEvent as C, TreeSelectAllOptions as D, TreeSearchHost as E, ListDragEntry as F, ListNativeDragStartEvent as H, ListDragPreview as I, ListDragPreviewContext as L, TreeDataModel as M, TreeDataModelOptions as N, TreeSelectDetail as O, ListDragDataTransferWriter as P, ListDragPreviewRenderer as R, TreeItemDblClickDetail as S, TreeRevealMode as T, ListNativeDragStartDetail as V, TreeDropTarget as _, TreeComponent as a, TreeItemClickDetail as b, TreeDragContext as c, TreeDragStartEvent as d, TreeDropApplyContext as f, TreeDropPosition as g, TreeDropEvent as h, TreeCollapseEvent as i, TreeTickleEvent as j, TreeSelectEvent as k, TreeDragEndEvent as l, TreeDropDetail as m, TreeActivateEvent as n, TreeComponentEventMap as o, TreeDropContext as p, TreeCollapseDetail as r, TreeDndMode as s, TreeActivateDetail as t, TreeDragOverEvent as u, TreeExpandDetail as v, TreeNavigateOptions as w, TreeItemClickEvent as x, TreeExpandEvent as y, ListDragPreviewSourceResolver as z };
package/dist/tree.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as TreeTickleDetail, M as TreeDataModel, N as TreeDataModelOptions, O as TreeSelectDetail, T as TreeRevealMode, _ as TreeDropTarget, b as TreeItemClickDetail, c as TreeDragContext, d as TreeDragStartEvent, g as TreeDropPosition, h as TreeDropEvent, i as TreeCollapseEvent, j as TreeTickleEvent, k as TreeSelectEvent, l as TreeDragEndEvent, m as TreeDropDetail, n as TreeActivateEvent, o as TreeComponentEventMap, p as TreeDropContext, r as TreeCollapseDetail, s as TreeDndMode, t as TreeActivateDetail, u as TreeDragOverEvent, v as TreeExpandDetail, w as TreeNavigateOptions, x as TreeItemClickEvent, y as TreeExpandEvent } from "./tree-component-DNuzfo6R.js";
1
+ import { A as TreeTickleDetail, M as TreeDataModel, N as TreeDataModelOptions, O as TreeSelectDetail, T as TreeRevealMode, _ as TreeDropTarget, b as TreeItemClickDetail, c as TreeDragContext, d as TreeDragStartEvent, g as TreeDropPosition, h as TreeDropEvent, i as TreeCollapseEvent, j as TreeTickleEvent, k as TreeSelectEvent, l as TreeDragEndEvent, m as TreeDropDetail, n as TreeActivateEvent, o as TreeComponentEventMap, p as TreeDropContext, r as TreeCollapseDetail, s as TreeDndMode, t as TreeActivateDetail, u as TreeDragOverEvent, v as TreeExpandDetail, w as TreeNavigateOptions, x as TreeItemClickEvent, y as TreeExpandEvent } from "./tree-component-BE7OEIiH.js";
2
2
  import { a as TreeItem, n as TreeExclusivity, o as TreeNode, r as TreeFilterPredicate, s as TreeSelectionFilter, t as LoadChildrenCallback } from "./types-6hpXRKt7.js";
3
- import { a as TreeDropVisibleRow, c as TreeListElement, d as TreeBaseElement, f as TreeBaseElementEventMap, h as TreeConfig, i as TreeDropRowInfo, l as TreeCheckboxState, m as TreeListViewState, n as TreeDropControllerConfig, o as TreeController, p as TreeVirtualize, r as TreeDropResolvedDrag, s as TreeControllerOptions, t as TreeDropController, u as TreeAnimation } from "./index-88ra6YHP.js";
3
+ import { a as TreeDropVisibleRow, c as TreeListElement, d as TreeBaseElement, f as TreeBaseElementEventMap, h as TreeConfig, i as TreeDropRowInfo, l as TreeCheckboxState, m as TreeListViewState, n as TreeDropControllerConfig, o as TreeController, p as TreeVirtualize, r as TreeDropResolvedDrag, s as TreeControllerOptions, t as TreeDropController, u as TreeAnimation } from "./index-BIv_Hu7C.js";
4
4
  export { type LoadChildrenCallback, type TreeActivateDetail, type TreeActivateEvent, TreeAnimation, TreeBaseElement, TreeBaseElementEventMap, type TreeCheckboxState, type TreeCollapseDetail, type TreeCollapseEvent, type TreeComponentEventMap, TreeConfig, TreeController, TreeControllerOptions, TreeDataModel, type TreeDataModelOptions, type TreeDndMode, type TreeDragContext, type TreeDragEndEvent, type TreeDragOverEvent, type TreeDragStartEvent, type TreeDropContext, TreeDropController, TreeDropControllerConfig, type TreeDropDetail, type TreeDropEvent, type TreeDropPosition, TreeDropResolvedDrag, TreeDropRowInfo, type TreeDropTarget, TreeDropVisibleRow, type TreeExclusivity, type TreeExpandDetail, type TreeExpandEvent, type TreeFilterPredicate, type TreeItem, type TreeItemClickDetail, type TreeItemClickEvent, TreeListElement, type TreeListViewState, type TreeNavigateOptions, type TreeNode, type TreeRevealMode, type TreeSelectDetail, type TreeSelectEvent, type TreeSelectionFilter, type TreeTickleDetail, type TreeTickleEvent, TreeVirtualize };
package/dist/tree.js CHANGED
@@ -1 +1 @@
1
- export { r as TreeBaseElement, t as TreeController, a as TreeDataModel, i as TreeDropController, n as TreeListElement } from "./tree-BP5fxvEX.js";
1
+ export { r as TreeBaseElement, t as TreeController, a as TreeDataModel, i as TreeDropController, n as TreeListElement } from "./tree-C3rgEEmm.js";
@@ -1,9 +1,9 @@
1
1
  import { n as appearanceColor, t as appearanceAbsent } from "./item-appearance-FRO3TRFI.js";
2
- import { c as createElementListSearchAdapter, d as keysOfElements, i as ListSearchController, n as listSearchStyles, o as registerListSearchCommands, r as LIST_SEARCH_MODES, u as keyForElement } from "./incr-search-C5114RxZ.js";
2
+ import { c as createElementListSearchAdapter, d as keysOfElements, i as ListSearchController, n as listSearchStyles, o as registerListSearchCommands, r as LIST_SEARCH_MODES, u as keyForElement } from "./incr-search-Bk4acsCM.js";
3
+ import { d as ItemTagResolver, g as sameTagKeys, i as animateListItemOut, r as animateListItemIn, t as ListNativeDragController, u as DEFAULT_ITEM_TAG_FLAGS, y as tagsAttribute } from "./list-native-drag-controller-B_INa6_G.js";
3
4
  import { i as ListDragSelectController, n as gestureOf, t as ListSelectionController } from "./list-selection-controller-Dkh3m3hX.js";
4
- import { i as animateListItemOut, r as animateListItemIn, t as ListNativeDragController } from "./list-native-drag-controller-ByftBooJ.js";
5
5
  import { i as sameKeySet, n as applyPartialAttributes, r as isPartialKey } from "./partial-keys-D4l_ede_.js";
6
- import { t as TickledController } from "./tickled-controller-BVhGKzjZ.js";
6
+ import { t as TickledController } from "./tickled-controller-BsFFr_1N.js";
7
7
  import { l as keysToArray } from "./pending-Afl4LT64.js";
8
8
  import { t as themeFallbacks } from "./fallbacks-BPjjBoED.js";
9
9
  import { t as scrollFadeStyles } from "./scroll-fade-DH8OXSqL.js";
@@ -168,7 +168,8 @@ let VerticalListElement = class VerticalListElement extends LitElement {
168
168
  this.tickled = ((self) => new TickledController(self, {
169
169
  getItems: () => self.#selectionOrder().map((el) => ({
170
170
  id: el,
171
- enabled: !el.hasAttribute(`not-checked`)
171
+ enabled: !el.hasAttribute(`not-checked`) && self.#flagsOf(el).selectable,
172
+ focusable: self.#flagsOf(el).focusable
172
173
  })),
173
174
  onTickle: (id) => {
174
175
  if (self.tickled.inputMode === `keyboard`) {
@@ -244,10 +245,13 @@ let VerticalListElement = class VerticalListElement extends LitElement {
244
245
  itemSelector: ITEM_SELECTOR,
245
246
  getLabel: (el) => el.getAttribute(`data-search-label`) ?? el.textContent?.trim() ?? ``,
246
247
  highlightKey: `vertical-list-search`,
248
+ isSearchable: (el) => this.#flagsOf(el).searchable,
247
249
  getAllItems: () => this.#selectionOrder(),
248
250
  observeContainer: false
249
251
  }) });
250
252
  this.#partialKeys = /* @__PURE__ */ new Set();
253
+ this.#tagResolver = new ItemTagResolver();
254
+ this.#taggedEls = /* @__PURE__ */ new Set();
251
255
  this.#onScroll = () => {
252
256
  if (!this.#viewState.pendingScroll) this.#viewState.notify();
253
257
  if (this.#scrollRaf !== 0) return;
@@ -445,7 +449,7 @@ let VerticalListElement = class VerticalListElement extends LitElement {
445
449
  #nativeDrag;
446
450
  #prepareNativeDrag(originKey) {
447
451
  const originEl = this.#itemForKey(originKey);
448
- if (!originEl || !this._isCheckable(originEl)) return void 0;
452
+ if (!originEl || !this._isCheckable(originEl) || !this.#flagsOf(originEl).draggable) return void 0;
449
453
  if (!this.selection.selected.has(originEl)) this.selection.replace(originEl);
450
454
  const ordered = this.#selectionOrder();
451
455
  const selected = [];
@@ -470,7 +474,7 @@ let VerticalListElement = class VerticalListElement extends LitElement {
470
474
  if (!this.isConnected) return;
471
475
  for (const el of this.querySelectorAll(ITEM_SELECTOR)) {
472
476
  if (this.#wrappedElements.has(el)) continue;
473
- if (el instanceof HTMLElement) el.draggable = this.itemsDraggable && this._isCheckable(el);
477
+ if (el instanceof HTMLElement) el.draggable = this.itemsDraggable && this._isCheckable(el) && this.#flagsOf(el).draggable;
474
478
  }
475
479
  }
476
480
  #startPostDragSuppressTimer() {
@@ -777,6 +781,54 @@ let VerticalListElement = class VerticalListElement extends LitElement {
777
781
  return this.selection.selectedKeys;
778
782
  }
779
783
  #partialKeys;
784
+ #tagResolver;
785
+ #taggedEls;
786
+ /**
787
+ * Tags assigned by key, apart from the item data (like {@link partialKeys}):
788
+ * tag name → keys carrying it. Each tag is mirrored on the row as `data-tags`
789
+ * (`li[data-tags~="foo"]`); `tagBehaviour` can switch off selection, focus,
790
+ * drag or search per tag.
791
+ */
792
+ get tagKeys() {
793
+ return this.#tagResolver.tagKeys;
794
+ }
795
+ set tagKeys(value) {
796
+ if (sameTagKeys(value, this.#tagResolver.tagKeys)) return;
797
+ this.#tagResolver.tagKeys = value;
798
+ this.refreshTags();
799
+ }
800
+ /**
801
+ * Interaction flags per tag name: `selectable`, `focusable`, `draggable`,
802
+ * `searchable` (`false` switches one off; omitted keeps the default). With
803
+ * several tags the most restrictive wins. Rows stay rendered.
804
+ */
805
+ get tagBehaviour() {
806
+ return this.#tagResolver.behaviour;
807
+ }
808
+ set tagBehaviour(value) {
809
+ if (value === this.#tagResolver.behaviour) return;
810
+ this.#tagResolver.behaviour = value;
811
+ this.refreshTags();
812
+ }
813
+ /** Re-apply `data-tags` to the rows and refresh drag state. Called automatically on change and after each update. */
814
+ refreshTags() {
815
+ if (!this.isConnected) return;
816
+ if (this.#tagResolver.tagKeys === void 0 && this.#taggedEls.size === 0) return;
817
+ const next = /* @__PURE__ */ new Set();
818
+ for (const el of /* @__PURE__ */ new Set([...this.#allItems, ...this.querySelectorAll(ITEM_SELECTOR)])) {
819
+ const value = tagsAttribute(this.#tagResolver.tagsFor(keyForElement(el) ?? void 0));
820
+ if (value === void 0) continue;
821
+ if (el.getAttribute(`data-tags`) !== value) el.setAttribute(`data-tags`, value);
822
+ next.add(el);
823
+ }
824
+ for (const el of this.#taggedEls) if (!next.has(el)) el.removeAttribute(`data-tags`);
825
+ this.#taggedEls = next;
826
+ this._syncNativeDraggable();
827
+ }
828
+ #flagsOf(el) {
829
+ if (this.#tagResolver.tagKeys === void 0) return DEFAULT_ITEM_TAG_FLAGS;
830
+ return this.#tagResolver.flagsForItem(keyForElement(el) ?? void 0);
831
+ }
780
832
  /**
781
833
  * Rows shown as *partially* selected (a part of the resource is selected):
782
834
  * `data-partial`, an indeterminate checkbox in `checked` mode, and an
@@ -1108,6 +1160,7 @@ let VerticalListElement = class VerticalListElement extends LitElement {
1108
1160
  this.#rekeySelection(previous, anchorKey, this.querySelectorAll(ITEM_SELECTOR));
1109
1161
  if (this.interactionMode === `checked`) this._syncCheckboxes();
1110
1162
  this._syncItemStates();
1163
+ this.refreshTags();
1111
1164
  this._syncNativeDraggable();
1112
1165
  this.#nativeDrag.refreshDraggable();
1113
1166
  this.#reconcileViewState();
@@ -1479,6 +1532,7 @@ let VerticalListElement = class VerticalListElement extends LitElement {
1479
1532
  });
1480
1533
  }
1481
1534
  _isCheckable(item) {
1535
+ if (!this.#flagsOf(item).selectable) return false;
1482
1536
  if (this.interactionMode !== `checked`) return true;
1483
1537
  return !(this.#customWrappers.get(item) ?? item).hasAttribute(`not-checked`);
1484
1538
  }
@@ -1995,6 +2049,7 @@ __decorate([property({
1995
2049
  reflect: true
1996
2050
  })], VerticalListElement.prototype, "itemsDraggable", void 0);
1997
2051
  __decorate([property({ attribute: false })], VerticalListElement.prototype, "dragPreviewRenderer", void 0);
2052
+ __decorate([property({ attribute: false })], VerticalListElement.prototype, "writeDataTransfer", void 0);
1998
2053
  __decorate([property({ attribute: false })], VerticalListElement.prototype, "dragPreviewSource", void 0);
1999
2054
  __decorate([property({ attribute: false })], VerticalListElement.prototype, "items", void 0);
2000
2055
  __decorate([property({