@fusion.dev/helix-headless 0.0.0-dev → 0.0.2

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 (210) hide show
  1. package/custom-elements.json +4513 -4483
  2. package/dist/accordion/item/accordion-item.d.ts +13 -15
  3. package/dist/accordion/item/accordion-item.js +15 -17
  4. package/dist/announcement/root/announcement-root.d.ts +7 -25
  5. package/dist/announcement/root/announcement-root.js +7 -20
  6. package/dist/app-header/root/app-header-root.d.ts +10 -17
  7. package/dist/app-header/root/app-header-root.js +9 -18
  8. package/dist/avatar/group/avatar-group.d.ts +10 -19
  9. package/dist/avatar/group/avatar-group.js +12 -17
  10. package/dist/avatar/root/avatar-root.d.ts +8 -8
  11. package/dist/avatar/root/avatar-root.js +19 -20
  12. package/dist/badge/root/badge-root.d.ts +6 -6
  13. package/dist/badge/root/badge-root.js +13 -13
  14. package/dist/bar-chart/root/bar-chart-root.d.ts +21 -29
  15. package/dist/bar-chart/root/bar-chart-root.js +42 -57
  16. package/dist/breadcrumbs/breadcrumb/breadcrumb.d.ts +12 -18
  17. package/dist/breadcrumbs/breadcrumb/breadcrumb.js +13 -16
  18. package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +9 -28
  19. package/dist/breadcrumbs/root/breadcrumbs-root.js +9 -28
  20. package/dist/button/root/button-root.d.ts +84 -94
  21. package/dist/button/root/button-root.js +82 -92
  22. package/dist/callout/root/callout-root.d.ts +4 -5
  23. package/dist/carousel/root/carousel-root.d.ts +59 -71
  24. package/dist/carousel/root/carousel-root.js +73 -101
  25. package/dist/chat/composer/chat-composer.d.ts +29 -33
  26. package/dist/chat/composer/chat-composer.js +40 -44
  27. package/dist/chat/message/chat-message.d.ts +25 -25
  28. package/dist/chat/message/chat-message.js +26 -26
  29. package/dist/chat/root/chat-root.d.ts +28 -41
  30. package/dist/chat/root/chat-root.js +27 -40
  31. package/dist/checkbox/root/checkbox-root.d.ts +10 -12
  32. package/dist/checkbox/root/checkbox-root.js +29 -35
  33. package/dist/checkbox-group/root/checkbox-group-root.d.ts +32 -45
  34. package/dist/checkbox-group/root/checkbox-group-root.js +53 -79
  35. package/dist/code-block/root/code-block-root.d.ts +3 -4
  36. package/dist/code-block/root/code-block-root.js +8 -12
  37. package/dist/color-input/root/color-input-root.d.ts +36 -37
  38. package/dist/color-input/root/color-input-root.js +29 -34
  39. package/dist/color-picker/color.d.ts +7 -8
  40. package/dist/color-picker/color.js +7 -8
  41. package/dist/color-picker/root/color-picker-root.d.ts +55 -57
  42. package/dist/color-picker/root/color-picker-root.js +60 -64
  43. package/dist/combobox/root/combobox-root.d.ts +53 -58
  44. package/dist/combobox/root/combobox-root.js +85 -94
  45. package/dist/command/root/command-root.d.ts +8 -8
  46. package/dist/command/root/command-root.js +29 -33
  47. package/dist/copy-button/root/copy-button-root.d.ts +21 -24
  48. package/dist/copy-button/root/copy-button-root.js +25 -35
  49. package/dist/data-table/root/data-table-root.d.ts +77 -76
  50. package/dist/data-table/root/data-table-root.js +95 -84
  51. package/dist/data-table/root/order.d.ts +2 -2
  52. package/dist/data-table/root/order.js +1 -3
  53. package/dist/date-input/root/date-input-root.d.ts +88 -93
  54. package/dist/date-input/root/date-input-root.js +147 -158
  55. package/dist/date-picker/root/date-picker-root.d.ts +75 -83
  56. package/dist/date-picker/root/date-picker-root.js +120 -143
  57. package/dist/dialog/root/dialog-root.d.ts +41 -24
  58. package/dist/dialog/root/dialog-root.js +47 -24
  59. package/dist/divider/root/divider-root.d.ts +5 -6
  60. package/dist/divider/root/divider-root.js +4 -5
  61. package/dist/donut-chart/root/donut-chart-root.d.ts +22 -25
  62. package/dist/donut-chart/root/donut-chart-root.js +37 -51
  63. package/dist/drawer/root/drawer-root.d.ts +24 -29
  64. package/dist/drawer/root/drawer-root.js +15 -22
  65. package/dist/drilldown/item/drilldown-item.d.ts +14 -14
  66. package/dist/drilldown/item/drilldown-item.js +24 -26
  67. package/dist/drilldown/root/drilldown-root.d.ts +8 -10
  68. package/dist/drilldown/root/drilldown-root.js +6 -7
  69. package/dist/element-events.generated.js +1 -1
  70. package/dist/file-input/root/file-input-root.d.ts +20 -24
  71. package/dist/file-input/root/file-input-root.js +42 -57
  72. package/dist/format-date/root/format-date-root.js +1 -1
  73. package/dist/heatmap/root/buckets.d.ts +8 -8
  74. package/dist/heatmap/root/buckets.js +8 -8
  75. package/dist/heatmap/root/heatmap-root.d.ts +57 -63
  76. package/dist/heatmap/root/heatmap-root.js +72 -83
  77. package/dist/icon/root/icon-root.d.ts +4 -4
  78. package/dist/icon/root/icon-root.js +9 -9
  79. package/dist/icon-button/root/icon-button-root.d.ts +4 -6
  80. package/dist/icon-button/root/icon-button-root.js +4 -6
  81. package/dist/image/root/image-root.d.ts +49 -59
  82. package/dist/image/root/image-root.js +55 -65
  83. package/dist/index.d.ts +5 -5
  84. package/dist/index.js +5 -5
  85. package/dist/input/root/input-root.d.ts +61 -85
  86. package/dist/input/root/input-root.js +79 -106
  87. package/dist/kbd/root/kbd-root.d.ts +8 -7
  88. package/dist/kbd/root/kbd-root.js +71 -11
  89. package/dist/legend/root/legend-root.d.ts +1 -1
  90. package/dist/legend/root/legend-root.js +4 -5
  91. package/dist/line-chart/root/line-chart-root.d.ts +26 -30
  92. package/dist/line-chart/root/line-chart-root.js +10 -10
  93. package/dist/list/item/list-item.d.ts +14 -18
  94. package/dist/list/item/list-item.js +18 -22
  95. package/dist/list/root/list-root.d.ts +4 -4
  96. package/dist/list/root/list-root.js +3 -3
  97. package/dist/listbox/root/listbox-root.d.ts +31 -58
  98. package/dist/listbox/root/listbox-root.js +66 -109
  99. package/dist/megamenu/root/megamenu-root.d.ts +34 -35
  100. package/dist/megamenu/root/megamenu-root.js +53 -58
  101. package/dist/menu/item/menu-item.d.ts +39 -53
  102. package/dist/menu/item/menu-item.js +50 -64
  103. package/dist/menu/root/menu-root.d.ts +30 -40
  104. package/dist/menu/root/menu-root.js +49 -82
  105. package/dist/meter/root/meter-root.d.ts +49 -53
  106. package/dist/meter/root/meter-root.js +22 -27
  107. package/dist/navigation/root/navigation-root.js +11 -19
  108. package/dist/notifications/notification/notification.d.ts +16 -22
  109. package/dist/notifications/notification/notification.js +21 -27
  110. package/dist/notifications/root/notifications-root.d.ts +31 -39
  111. package/dist/notifications/root/notifications-root.js +41 -52
  112. package/dist/number-input/root/number-input-root.d.ts +31 -33
  113. package/dist/number-input/root/number-input-root.js +37 -39
  114. package/dist/option/root/option-root.d.ts +73 -74
  115. package/dist/option/root/option-root.js +62 -64
  116. package/dist/outline/root/outline-root.d.ts +38 -44
  117. package/dist/outline/root/outline-root.js +66 -82
  118. package/dist/pagination/root/pagination-root.d.ts +87 -92
  119. package/dist/pagination/root/pagination-root.js +116 -123
  120. package/dist/pagination/size/pagination-size.d.ts +31 -50
  121. package/dist/pagination/size/pagination-size.js +35 -55
  122. package/dist/pagination/summary/pagination-summary.d.ts +12 -12
  123. package/dist/pagination/summary/pagination-summary.js +18 -18
  124. package/dist/pin-input/root/pin-input-root.d.ts +53 -70
  125. package/dist/pin-input/root/pin-input-root.js +74 -94
  126. package/dist/popover/root/popover-root.d.ts +15 -20
  127. package/dist/popover/root/popover-root.js +19 -36
  128. package/dist/progress/root/progress-root.d.ts +12 -14
  129. package/dist/progress/root/progress-root.js +22 -25
  130. package/dist/qr-code/root/qr-code-root.d.ts +11 -11
  131. package/dist/qr-code/root/qr-code-root.js +12 -14
  132. package/dist/radio/group/radio-group.js +19 -26
  133. package/dist/radio/root/radio-root.d.ts +12 -13
  134. package/dist/radio/root/radio-root.js +12 -13
  135. package/dist/rating/root/rating-root.d.ts +25 -30
  136. package/dist/rating/root/rating-root.js +43 -50
  137. package/dist/scroll-area/root/scroll-area-root.d.ts +11 -14
  138. package/dist/scroll-area/root/scroll-area-root.js +39 -33
  139. package/dist/select/root/select-root.d.ts +7 -12
  140. package/dist/select/root/select-root.js +40 -55
  141. package/dist/slider/root/slider-root.d.ts +53 -60
  142. package/dist/slider/root/slider-root.js +74 -85
  143. package/dist/sparkline/root/sparkline-root.d.ts +43 -47
  144. package/dist/sparkline/root/sparkline-root.js +23 -32
  145. package/dist/speed-dial/item/speed-dial-item.d.ts +6 -6
  146. package/dist/speed-dial/item/speed-dial-item.js +9 -9
  147. package/dist/speed-dial/root/speed-dial-root.d.ts +21 -25
  148. package/dist/speed-dial/root/speed-dial-root.js +32 -40
  149. package/dist/splitter/root/splitter-root.d.ts +98 -111
  150. package/dist/splitter/root/splitter-root.js +96 -123
  151. package/dist/stat/root/stat-root.d.ts +2 -7
  152. package/dist/stat/root/stat-root.js +0 -5
  153. package/dist/steps/step/step.d.ts +19 -24
  154. package/dist/steps/step/step.js +27 -32
  155. package/dist/switch/root/switch-root.js +2 -2
  156. package/dist/table/column/table-column.d.ts +54 -60
  157. package/dist/table/column/table-column.js +95 -68
  158. package/dist/table/root/table-root.d.ts +5 -6
  159. package/dist/table/root/table-root.js +7 -10
  160. package/dist/tabs/panel/tab-panel.d.ts +21 -25
  161. package/dist/tabs/panel/tab-panel.js +25 -29
  162. package/dist/tabs/root/tabs-root.d.ts +25 -34
  163. package/dist/tabs/root/tabs-root.js +22 -28
  164. package/dist/tabs/tab/tab.d.ts +12 -12
  165. package/dist/tabs/tab/tab.js +19 -20
  166. package/dist/textarea/root/textarea-root.d.ts +36 -36
  167. package/dist/textarea/root/textarea-root.js +43 -47
  168. package/dist/time-input/root/time-input-root.d.ts +58 -68
  169. package/dist/time-input/root/time-input-root.js +62 -77
  170. package/dist/time-picker/root/time-picker-root.d.ts +73 -79
  171. package/dist/time-picker/root/time-picker-root.js +72 -84
  172. package/dist/timeline/item/timeline-item.d.ts +8 -11
  173. package/dist/timeline/item/timeline-item.js +8 -11
  174. package/dist/timeline/root/timeline-root.d.ts +5 -7
  175. package/dist/timeline/root/timeline-root.js +5 -7
  176. package/dist/toast/item/toast-item.d.ts +9 -27
  177. package/dist/toast/item/toast-item.js +19 -41
  178. package/dist/toast/root/toast-root.d.ts +10 -14
  179. package/dist/toast/root/toast-root.js +4 -5
  180. package/dist/toggle/group/toggle-group.d.ts +6 -15
  181. package/dist/toggle/group/toggle-group.js +21 -36
  182. package/dist/toggle/root/toggle-root.d.ts +26 -27
  183. package/dist/toggle/root/toggle-root.js +30 -31
  184. package/dist/toolbar/root/toolbar-root.d.ts +7 -10
  185. package/dist/toolbar/root/toolbar-root.js +10 -14
  186. package/dist/tooltip/root/tooltip-root.d.ts +52 -59
  187. package/dist/tooltip/root/tooltip-root.js +98 -93
  188. package/dist/tour/root/tour-root.d.ts +19 -23
  189. package/dist/tour/root/tour-root.js +31 -41
  190. package/dist/tour/stop/tour-stop.d.ts +14 -15
  191. package/dist/tour/stop/tour-stop.js +31 -34
  192. package/dist/tree/item/tree-item.d.ts +30 -35
  193. package/dist/tree/item/tree-item.js +43 -55
  194. package/dist/tree/root/tree-root.d.ts +7 -10
  195. package/dist/tree/root/tree-root.js +33 -42
  196. package/dist/trend/root/trend-root.d.ts +3 -5
  197. package/dist/trend/root/trend-root.js +5 -9
  198. package/dist/video/root/video-root.d.ts +100 -124
  199. package/dist/video/root/video-root.js +142 -176
  200. package/dist/video-playlist/item/video-playlist-item.d.ts +16 -16
  201. package/dist/video-playlist/item/video-playlist-item.js +24 -24
  202. package/dist/video-playlist/menu/video-playlist-menu.d.ts +5 -8
  203. package/dist/video-playlist/menu/video-playlist-menu.js +20 -29
  204. package/dist/video-playlist/root/video-playlist-root.d.ts +16 -11
  205. package/dist/video-playlist/root/video-playlist-root.js +21 -25
  206. package/dist/virtual-list/root/virtual-list-root.d.ts +8 -12
  207. package/dist/virtual-list/root/virtual-list-root.js +11 -16
  208. package/jsx.d.ts +9797 -12561
  209. package/package.json +6 -6
  210. package/vue.d.ts +2684 -3228
@@ -13,14 +13,12 @@ import { unsafeSVG } from 'lit/directives/unsafe-svg.js';
13
13
  * @summary One node in a tree.
14
14
  *
15
15
  * @description
16
- * **`open`, on `MixinControllerOpen`, where it was a bare `expanded` boolean.**
17
- * A branch showing its children is the same state a disclosure holds, and
18
- * `AccordionItem` has been on that mixin all along. Written here by hand it had
19
- * neither half of what the mixin gives: `this.expanded = !this.expanded`
20
- * announced nothing, so a consumer could not know a branch had opened, and
21
- * could not own the state either. `aria-expanded` is still what the row
22
- * renders, because that is the attribute a tree uses; the property is what
23
- * changed, not the semantics.
16
+ * **`open`, on `MixinControllerOpen`, rather than a bare boolean of its own.** A
17
+ * branch showing its children is the same state a disclosure holds, and
18
+ * `AccordionItem` is on that mixin too. A hand-written toggle announces nothing,
19
+ * so a consumer can neither know a branch opened nor own the state.
20
+ * `aria-expanded` is still what the row renders, because that is the attribute a
21
+ * tree uses; the property is what differs, not the semantics.
24
22
  *
25
23
  * An element rather than a slot because it owns state: whether it is open,
26
24
  * whether it is selected, and whether it is the one holding focus.
@@ -81,10 +79,6 @@ import { unsafeSVG } from 'lit/directives/unsafe-svg.js';
81
79
  let HelixHeadlessTreeItem = class HelixHeadlessTreeItem extends MixinControllerOpen(HelixElement) {
82
80
  constructor() {
83
81
  super(...arguments);
84
- /**
85
- * Identifies the item to the consumer, carried in `helix-select`.
86
- */
87
- this.value = '';
88
82
  /**
89
83
  * Where this node goes, which makes its row a real link.
90
84
  *
@@ -93,10 +87,6 @@ let HelixHeadlessTreeItem = class HelixHeadlessTreeItem extends MixinControllerO
93
87
  * current page on every item a consumer never asked to be one.
94
88
  */
95
89
  this.href = '';
96
- /**
97
- * Where the link opens, for the rare row that leaves the site.
98
- */
99
- this.target = '';
100
90
  /**
101
91
  * What the link declares about where it goes.
102
92
  *
@@ -111,16 +101,21 @@ let HelixHeadlessTreeItem = class HelixHeadlessTreeItem extends MixinControllerO
111
101
  *
112
102
  * Not reflected, for the reason `level` below gives in full: the tree assigns
113
103
  * this after it upgrades, so the attribute would be a change to markup the
114
- * consumer rendered and hydration would report it. It reflected, one line
115
- * from the paragraph saying why it must not.
104
+ * consumer rendered and hydration would report it. Mirroring to
105
+ * `data-selected` on the host instead is the same fault under another name.
116
106
  *
117
- * The stylesheet reads it from the row inside this shadow root, which is the
118
- * answer `level` gives one paragraph down: the indent it drives is written
119
- * onto the row rather than onto the host, because the row is not part of the
120
- * tree React hydrates. Mirroring to `data-selected` on the host instead was
121
- * the same fault with a different name, and React said so.
107
+ * The stylesheet reads it from the row inside this shadow root, because the
108
+ * row is not part of the tree React hydrates.
122
109
  */
123
110
  this.selected = false;
111
+ /**
112
+ * Where the link opens, for the rare row that leaves the site.
113
+ */
114
+ this.target = '';
115
+ /**
116
+ * Identifies the item to the consumer, carried in `helix-select`.
117
+ */
118
+ this.value = '';
124
119
  /**
125
120
  * Whether this item holds the tree's single tab stop.
126
121
  */
@@ -142,14 +137,10 @@ let HelixHeadlessTreeItem = class HelixHeadlessTreeItem extends MixinControllerO
142
137
  };
143
138
  this.handleRowClick = (event) => {
144
139
  /* A press that landed on a link is that link's, whichever branch of this
145
- runs. It was asked on one side and not the other, and the missing half
146
- cost a feature: a row can hold a link in its `end` slot, which is what
147
- the documentation sidebar puts there to get back to the index, and
148
- pressing it collapsed the branch on the way out. Measured in Chrome,
149
- `open` false and the route changed from the one press.
150
-
151
- "There is nowhere else for the press to mean" was true of a row holding
152
- a label, and a slot is somewhere else. */
140
+ runs, and the test has to be made on both sides. A row can hold a link in
141
+ its `end` slot, and asked on one side only, pressing that link collapses
142
+ the branch on the way out: one press, `open` false and the route
143
+ changed. */
153
144
  const onLink = event.composedPath().some((node) => node instanceof HTMLAnchorElement);
154
145
  /* A branch that is also a link goes where it points, and its chevron is
155
146
  what opens it. A branch that is not toggles from anywhere in the row. */
@@ -195,10 +186,8 @@ let HelixHeadlessTreeItem = class HelixHeadlessTreeItem extends MixinControllerO
195
186
  every scrollable ancestor and reveal the element, which is
196
187
  `scrollIntoView` by another route and takes the page with it. The root
197
188
  calls `scrollItemIntoView` on the next line precisely to avoid that, and
198
- without this the careful call was arriving after the thing it exists to
199
- prevent had already happened. It was also hiding whether that util worked
200
- at all: measured in Chrome, a tree in a scroller scrolled either way, so
201
- the util could have been scrolling nothing and nobody would have seen. */
189
+ without this the careful call arrives after the thing it exists to
190
+ prevent has already happened. */
202
191
  this.renderRoot
203
192
  .querySelector(this.href === '' ? '[part="item"]' : '[part="row"]')
204
193
  ?.focus({ preventScroll: true });
@@ -212,9 +201,9 @@ let HelixHeadlessTreeItem = class HelixHeadlessTreeItem extends MixinControllerO
212
201
  *
213
202
  * Selecting and following are two things and this is where they meet, so the
214
203
  * pointer and the keyboard take one path to the same end. The tree calls this
215
- * rather than `select` for the keyboard, which is what fixes Enter: a nav
216
- * tree whose rows are links could be walked with the arrows and not entered,
217
- * because choosing announced a value and nothing listened for it.
204
+ * rather than `select` for the keyboard, or a nav tree whose rows are links
205
+ * could be walked with the arrows and never entered: choosing announces a
206
+ * value and nothing listens for it.
218
207
  */
219
208
  activate() {
220
209
  this.select();
@@ -281,9 +270,9 @@ let HelixHeadlessTreeItem = class HelixHeadlessTreeItem extends MixinControllerO
281
270
  /**
282
271
  * Mirrors the chosen state where a stylesheet can select on it.
283
272
  *
284
- * **A custom state and not the `selected` attribute it used to reflect.** The
285
- * parent writes this: a listbox choosing a row, a tab strip moving the tab, a
286
- * radio group answering for its set. Reflected, that put the element's own
273
+ * **A custom state, never a reflected `selected` attribute.** The parent
274
+ * writes this: a listbox choosing a row, a tab strip moving the tab, a radio
275
+ * group answering for its set. Reflected, that puts the element's own
287
276
  * bookkeeping onto markup a consumer wrote and a consumer's server never sent,
288
277
  * which React reconciles and reports as a mismatch, and which a serialized
289
278
  * element pasted back declares as a choice nobody made. `ElementInternals`
@@ -291,7 +280,7 @@ let HelixHeadlessTreeItem = class HelixHeadlessTreeItem extends MixinControllerO
291
280
  *
292
281
  * Reading `selected` is unaffected and so is writing it: the attribute still
293
282
  * seeds the property, which is what `<helix-tree-item selected>` in a consumer's
294
- * markup means. What stops is the write back. See 302 and 304.
283
+ * markup means. What stops is the write back.
295
284
  */
296
285
  willUpdate(changed) {
297
286
  super.willUpdate(changed);
@@ -307,8 +296,7 @@ let HelixHeadlessTreeItem = class HelixHeadlessTreeItem extends MixinControllerO
307
296
  * sibling, which is the navigation flavor of the pattern.
308
297
  *
309
298
  * Without one, nothing changes: the wrapper is the `treeitem` and holds the
310
- * group, which is what an `<li>` holding a `<ul>` is, and what this was
311
- * fixed to be when the group rendered outside the node it belonged to. */
299
+ * group, which is what an `<li>` holding a `<ul>` is. */
312
300
  const linked = this.href !== '';
313
301
  const level = this.level ?? 1;
314
302
  const expanded = this.branch ? (this.open ? 'true' : 'false') : nothing;
@@ -340,10 +328,10 @@ let HelixHeadlessTreeItem = class HelixHeadlessTreeItem extends MixinControllerO
340
328
  style="--tree-level: ${level}"
341
329
  @click=${this.handleRowClick}
342
330
  >${this.renderRow()}</div>`}
343
- <!-- Inside the treeitem, not beside it. It rendered as a sibling, so
344
- the row's \`aria-expanded\` described a group the row did not own and
345
- the branch reported children it had no relationship to. The pattern
346
- is \`treeitem\` containing \`group\`, which is also what an \`<li>\`
331
+ <!-- Inside the treeitem, not beside it. As a sibling, the row's
332
+ \`aria-expanded\` describes a group the row does not own and the
333
+ branch reports children it has no relationship to. The pattern is
334
+ \`treeitem\` containing \`group\`, which is also what an \`<li>\`
347
335
  holding a \`<ul>\` is. -->
348
336
  <div part="group" role="group" ?hidden=${!this.open}>
349
337
  <slot name="children"></slot>
@@ -351,15 +339,12 @@ let HelixHeadlessTreeItem = class HelixHeadlessTreeItem extends MixinControllerO
351
339
  </div>`;
352
340
  }
353
341
  };
354
- __decorate([
355
- property()
356
- ], HelixHeadlessTreeItem.prototype, "value", void 0);
357
342
  __decorate([
358
343
  property()
359
344
  ], HelixHeadlessTreeItem.prototype, "href", void 0);
360
345
  __decorate([
361
- property()
362
- ], HelixHeadlessTreeItem.prototype, "target", void 0);
346
+ property({ attribute: 'level', type: Number })
347
+ ], HelixHeadlessTreeItem.prototype, "level", void 0);
363
348
  __decorate([
364
349
  property()
365
350
  ], HelixHeadlessTreeItem.prototype, "rel", void 0);
@@ -367,8 +352,11 @@ __decorate([
367
352
  property({ type: Boolean })
368
353
  ], HelixHeadlessTreeItem.prototype, "selected", void 0);
369
354
  __decorate([
370
- property({ attribute: 'level', type: Number })
371
- ], HelixHeadlessTreeItem.prototype, "level", void 0);
355
+ property()
356
+ ], HelixHeadlessTreeItem.prototype, "target", void 0);
357
+ __decorate([
358
+ property()
359
+ ], HelixHeadlessTreeItem.prototype, "value", void 0);
372
360
  __decorate([
373
361
  state()
374
362
  ], HelixHeadlessTreeItem.prototype, "focusable", void 0);
@@ -38,10 +38,9 @@ export declare class HelixHeadlessTree extends HelixHeadlessTree_base {
38
38
  /**
39
39
  * Every item, in the order a reader moving down would meet them.
40
40
  *
41
- * Selected by tag rather than by walking everything and filtering. `'*'` built
42
- * an array of every descendant element in the tree, labels and icons and
43
- * whatever a consumer slotted into a row included, and threw most of it away;
44
- * on a tree of any size that is the array a single arrow press rebuilds.
41
+ * Selected by tag, never by `'*'` and a filter: this is the array a single
42
+ * arrow press rebuilds, and `'*'` makes it every descendant element in the
43
+ * tree, labels and icons and whatever a consumer slotted into a row included.
45
44
  *
46
45
  * The two tag names rather than `instanceof` on everything: a styled
47
46
  * `helix-tree-item` extends the base, so both names are needed, and the
@@ -66,12 +65,10 @@ export declare class HelixHeadlessTree extends HelixHeadlessTree_base {
66
65
  /**
67
66
  * A branch opened or closed, whoever did it.
68
67
  *
69
- * The keyboard paths called `syncItems` by hand and the pointer path did not,
70
- * so collapsing a branch by clicking its chevron left the tab stop on a row
71
- * inside the subtree that had just been hidden: the tree kept its one stop
72
- * and the stop was on something nobody could see or reach. Listening for the
73
- * item's own open events covers every way a branch can move, including a
74
- * consumer setting `open` directly.
68
+ * Listening for the item's own open events rather than calling `syncItems`
69
+ * from each keyboard path: that misses the pointer, and collapsing a branch
70
+ * by clicking its chevron then leaves the tree's one tab stop on a row inside
71
+ * the subtree just hidden. It also covers a consumer setting `open` directly.
75
72
  */
76
73
  private readonly handleBranch;
77
74
  connectedCallback(): void;
@@ -54,25 +54,24 @@ let HelixHeadlessTree = class HelixHeadlessTree extends MixinCollection(MixinCon
54
54
  * Accessible name for the tree.
55
55
  */
56
56
  this.label = 'Tree';
57
- /* Through the mixin, so a consumer can refuse the change. It was written
58
- straight from the event, the same way Tabs did, which made `helix-before-activate`
59
- an announcement nobody could answer. */
57
+ /* Through the mixin, so a consumer can refuse the change. Writing the value
58
+ straight from the event makes `helix-before-activate` an announcement
59
+ nobody can answer. */
60
60
  this.handleSelection = (event) => {
61
61
  this.requestActive(event.detail.value);
62
62
  this.syncItems();
63
63
  };
64
64
  this.handleKeydown = (event) => {
65
- /* The innermost item the press came from, which `find` could not give.
65
+ /* The innermost item the press came from, which `find` cannot give.
66
66
  *
67
67
  * `items` is every tree item in document order and a nested one is inside
68
- * all of its ancestors, so `entry.contains(target)` matched the outermost
69
- * ancestor first: every key pressed on a nested node moved the root of its
70
- * branch instead. The deeper the node, the further the answer was wrong,
71
- * and the shallow cases it was written against all looked right.
68
+ * all of its ancestors, so `entry.contains(target)` matches the outermost
69
+ * ancestor first and every key pressed on a nested node moves the root of
70
+ * its branch instead. The shallow cases all look right.
72
71
  *
73
72
  * `closestInstance` walks up by identity and crosses shadow roots on the
74
- * way, which is the util that exists for exactly this. `closest('*')` was
75
- * also a no-op: it returns the element it was called on. */
73
+ * way, which is the util that exists for exactly this. `closest('*')` is a
74
+ * no-op: it returns the element it was called on. */
76
75
  const current = closestInstance(event.target, HelixHeadlessTreeItem);
77
76
  if (!current || !this.items.includes(current) || !KEYS.has(event.key)) {
78
77
  return;
@@ -116,10 +115,10 @@ let HelixHeadlessTree = class HelixHeadlessTree extends MixinCollection(MixinCon
116
115
  this.syncItems();
117
116
  }
118
117
  else {
119
- /* `activate`, not `select`. Enter announced the choice and stopped
120
- there, so a tree used as navigation could be walked with the arrows
121
- and never entered: the pointer had a link under it to press and the
122
- keyboard had nothing. */
118
+ /* `activate`, not `select`. Announcing the choice and stopping there
119
+ leaves a tree used as navigation walkable with the arrows and never
120
+ enterable: the pointer has a link under it and the keyboard has
121
+ nothing. */
123
122
  current.activate();
124
123
  }
125
124
  }
@@ -128,12 +127,10 @@ let HelixHeadlessTree = class HelixHeadlessTree extends MixinCollection(MixinCon
128
127
  /**
129
128
  * A branch opened or closed, whoever did it.
130
129
  *
131
- * The keyboard paths called `syncItems` by hand and the pointer path did not,
132
- * so collapsing a branch by clicking its chevron left the tab stop on a row
133
- * inside the subtree that had just been hidden: the tree kept its one stop
134
- * and the stop was on something nobody could see or reach. Listening for the
135
- * item's own open events covers every way a branch can move, including a
136
- * consumer setting `open` directly.
130
+ * Listening for the item's own open events rather than calling `syncItems`
131
+ * from each keyboard path: that misses the pointer, and collapsing a branch
132
+ * by clicking its chevron then leaves the tree's one tab stop on a row inside
133
+ * the subtree just hidden. It also covers a consumer setting `open` directly.
137
134
  */
138
135
  this.handleBranch = () => {
139
136
  this.syncItems();
@@ -142,10 +139,9 @@ let HelixHeadlessTree = class HelixHeadlessTree extends MixinCollection(MixinCon
142
139
  /**
143
140
  * Every item, in the order a reader moving down would meet them.
144
141
  *
145
- * Selected by tag rather than by walking everything and filtering. `'*'` built
146
- * an array of every descendant element in the tree, labels and icons and
147
- * whatever a consumer slotted into a row included, and threw most of it away;
148
- * on a tree of any size that is the array a single arrow press rebuilds.
142
+ * Selected by tag, never by `'*'` and a filter: this is the array a single
143
+ * arrow press rebuilds, and `'*'` makes it every descendant element in the
144
+ * tree, labels and icons and whatever a consumer slotted into a row included.
149
145
  *
150
146
  * The two tag names rather than `instanceof` on everything: a styled
151
147
  * `helix-tree-item` extends the base, so both names are needed, and the
@@ -178,16 +174,13 @@ let HelixHeadlessTree = class HelixHeadlessTree extends MixinCollection(MixinCon
178
174
  syncItems() {
179
175
  const visible = this.visibleItems;
180
176
  /* Through the mixin, which resolves an exact match and otherwise falls back
181
- to the first item. The comment here used to add "which skips a disabled
182
- one", and a tree item has no `disabled` property at all, so the claim was
183
- about a check that could not be running. `Tree.Item` is the only
184
- selectable row in the library without one, which is worth knowing and is
185
- not this line's business to fix. */
177
+ to the first item. No disabled rows are skipped, because `Tree.Item` is
178
+ the only selectable row in the library with no `disabled` property. */
186
179
  const chosen = this.resolveActive(visible);
187
- /* The keyboard keeps its place. The stop was bound to the selection on
188
- every sync, so a branch opening or a child arriving threw the reader back
189
- to the selected row from wherever they had arrowed to. It only moves when
190
- the row holding it is no longer reachable. */
180
+ /* The keyboard keeps its place: the stop moves only when the row holding it
181
+ is no longer reachable. Bound to the selection instead, a branch opening
182
+ or a child arriving throws the reader back to the selected row from
183
+ wherever they had arrowed to. */
191
184
  const held = visible.find((item) => item.focusable);
192
185
  const stop = held ?? chosen;
193
186
  for (const item of this.items) {
@@ -218,11 +211,9 @@ let HelixHeadlessTree = class HelixHeadlessTree extends MixinCollection(MixinCon
218
211
  entry.focusable = entry === item;
219
212
  }
220
213
  item.focusItem();
221
- /* And bring it into view, which arrow keys through a long tree did not do
222
- at all: focus moved to an item below the fold and the tree stayed where
223
- it was, so a reader navigating a sidebar of forty items was moving
224
- something they could not see.
225
-
214
+ /* And bring it into view, or focus lands below the fold and the tree stays
215
+ where it is.
216
+
226
217
  Not `scrollIntoView`, which scrolls every scrollable ancestor including
227
218
  the page. A reader who pressed Down in a sidebar did not ask the document
228
219
  to move. */
@@ -235,10 +226,10 @@ let HelixHeadlessTree = class HelixHeadlessTree extends MixinCollection(MixinCon
235
226
  this.addEventListener('helix-before-close', this.handleBranch);
236
227
  this.addEventListener('keydown', this.handleKeydown);
237
228
  /* Nested items arrive on a *branch's* slot, not on this element's, so the
238
- root's `slotchange` never fires for them: a subtree rendered after first
239
- paint got no `level`, no `selected` and no `focusable`, and sat at the
240
- wrong indent with no way into it. A framework filling a branch on demand,
241
- which is what a lazy tree is, hit this every time. */
229
+ root's `slotchange` never fires for them: without this, a subtree
230
+ rendered after first paint gets no `level`, no `selected` and no
231
+ `focusable`, and sits at the wrong indent with no way into it. A
232
+ framework filling a branch on demand is exactly that case. */
242
233
  this.watcher = new MutationObserver(() => this.syncItems());
243
234
  this.watcher.observe(this, { childList: true, subtree: true });
244
235
  }
@@ -12,12 +12,10 @@ import { type TemplateResult } from 'lit';
12
12
  * **`good` is absent by default, so an unjudged trend is gray.** Every
13
13
  * dashboard convention says up is green, and for churn, latency, error rate,
14
14
  * cost and bounce rate that convention is a lie told in the most legible color
15
- * on the page. A component that guesses is wrong roughly a third of the time
16
- * and silent about it; one that waits to be told is uninformative until it is,
17
- * which is the cheaper failure. State the metric's polarity once and the
18
- * component does the part that varies.
15
+ * on the page. State the metric's polarity once and the component does the part
16
+ * that varies.
19
17
  *
20
- * The direction is also written as a word, because a coloured arrow says
18
+ * The direction is also written as a word, because a colored arrow says
21
19
  * nothing to a reader who is not looking at it. `part="direction"` is what the
22
20
  * styled tier clips out of sight and leaves in the accessibility tree.
23
21
  *
@@ -35,12 +35,10 @@ const readDirection = (value) => DIRECTIONS[value] ?? DIRECTIONS.neutral;
35
35
  * **`good` is absent by default, so an unjudged trend is gray.** Every
36
36
  * dashboard convention says up is green, and for churn, latency, error rate,
37
37
  * cost and bounce rate that convention is a lie told in the most legible color
38
- * on the page. A component that guesses is wrong roughly a third of the time
39
- * and silent about it; one that waits to be told is uninformative until it is,
40
- * which is the cheaper failure. State the metric's polarity once and the
41
- * component does the part that varies.
38
+ * on the page. State the metric's polarity once and the component does the part
39
+ * that varies.
42
40
  *
43
- * The direction is also written as a word, because a coloured arrow says
41
+ * The direction is also written as a word, because a colored arrow says
44
42
  * nothing to a reader who is not looking at it. `part="direction"` is what the
45
43
  * styled tier clips out of sight and leaves in the accessibility tree.
46
44
  *
@@ -73,13 +71,11 @@ let HelixHeadlessTrend = class HelixHeadlessTrend extends HelixElement {
73
71
  /* One interpolation rather than two, so the phrase is one text node.
74
72
  Lit SSR writes a `<!--lit-part-->` marker around every binding, and two
75
73
  bindings put a pair of comments between "Up" and ", worse" in the served
76
- markup. No screen reader is confused by adjacent text nodes, but the
77
- server output should read as the thing the DOM will hold, and a test
78
- against it should be able to say so in one string. */
74
+ markup, which a spec then cannot assert in one string. */
79
75
  /* Written out rather than through `drawIcon`, because this one needs a
80
76
  `part` and a part behind an interpolation is one the manifest cannot see:
81
77
  the helper's `part=${…}` binding took `[part="icon"]` out of the
82
- stylesheet's reach and `check:selectors` said so. */
78
+ stylesheet's reach. */
83
79
  return html `<svg
84
80
  aria-hidden="true"
85
81
  data-glyph