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

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
@@ -39,11 +39,11 @@ const STACK_BELOW = 512;
39
39
  * positions at once.
40
40
  *
41
41
  * **The outer splitter draws it and the nested one announces itself upward.**
42
- * Built the other way round first, because a splitter already knows where its
43
- * own divider begins and needs no measurement of the other, and that version was
44
- * clipped: the crossing lies on the boundary between a pane and the divider
42
+ * The nested one drawing its own is the tempting version, since it already
43
+ * knows where its divider begins and needs no measurement of the other, and it
44
+ * is clipped: the crossing lies on the boundary between a pane and the divider
45
45
  * beside it, a handle centered there reaches back over the boundary, and a pane
46
- * is `overflow: auto`. Exactly half the corner was cut off. The outer separator
46
+ * is `overflow: auto`. Exactly half the corner is cut off. The outer separator
47
47
  * is the one element that already straddles the seam, so the corner belongs in
48
48
  * it.
49
49
  *
@@ -144,10 +144,6 @@ const STACK_BELOW = 512;
144
144
  let HelixHeadlessSplitter = HelixHeadlessSplitter_1 = class HelixHeadlessSplitter extends HelixElement {
145
145
  constructor() {
146
146
  super(...arguments);
147
- /**
148
- * Where the divider starts, where nothing declared it.
149
- */
150
- this.defaultPosition = 50;
151
147
  /**
152
148
  * How much of a shut pane is still shown, as a percentage.
153
149
  *
@@ -157,6 +153,22 @@ let HelixHeadlessSplitter = HelixHeadlessSplitter_1 = class HelixHeadlessSplitte
157
153
  * consumer's to set.
158
154
  */
159
155
  this.collapsedSize = 0;
156
+ /**
157
+ * Accessible name for the handle where two dividers cross.
158
+ */
159
+ this.cornerLabel = 'Resize both';
160
+ /**
161
+ * Where the divider starts, where nothing declared it.
162
+ */
163
+ this.defaultPosition = 50;
164
+ /**
165
+ * Accessible name for the divider.
166
+ */
167
+ this.label = 'Resize panes';
168
+ /**
169
+ * Nearest it may come to the end, on the same terms as `min`.
170
+ */
171
+ this.max = 100;
160
172
  /**
161
173
  * Nearest the divider may come to the start.
162
174
  *
@@ -177,22 +189,10 @@ let HelixHeadlessSplitter = HelixHeadlessSplitter_1 = class HelixHeadlessSplitte
177
189
  * passes through.
178
190
  */
179
191
  this.min = 0;
180
- /**
181
- * Nearest it may come to the end, on the same terms as `min`.
182
- */
183
- this.max = 100;
184
192
  /**
185
193
  * How far one arrow press moves it, as a percentage.
186
194
  */
187
195
  this.step = 2;
188
- /**
189
- * Accessible name for the divider.
190
- */
191
- this.label = 'Resize panes';
192
- /**
193
- * Accessible name for the handle where two dividers cross.
194
- */
195
- this.cornerLabel = 'Resize both';
196
196
  /** The position, whoever set it, and `undefined` until somebody has. */
197
197
  this.positionState = undefined;
198
198
  /** The collapse, whoever set it, and `undefined` until somebody has. */
@@ -294,12 +294,11 @@ let HelixHeadlessSplitter = HelixHeadlessSplitter_1 = class HelixHeadlessSplitte
294
294
  }
295
295
  this.origin = null;
296
296
  this.dragging = false;
297
- /* Nothing moved, so nothing is announced.
298
- Every press on the divider used to settle, which dispatched a change
299
- carrying the position it already had: a plain click rewrote a consumer's
300
- stored value from a gesture that moved nothing. Harmless where the value
301
- round-trips exactly, and not where it does not, which is any consumer
302
- storing pixels and dividing by a box. */
297
+ /* Nothing moved, so nothing is announced. Settling on every press would
298
+ dispatch a change carrying the position it already had, so a plain click
299
+ rewrites a consumer's stored value from a gesture that moved nothing:
300
+ harmless where the value round-trips exactly, and not where it does not,
301
+ which is any consumer storing pixels and dividing by a box. */
303
302
  if (this.reached === undefined) {
304
303
  return;
305
304
  }
@@ -314,19 +313,12 @@ let HelixHeadlessSplitter = HelixHeadlessSplitter_1 = class HelixHeadlessSplitte
314
313
  * for its bounds. The other two arrows are left alone and the page scrolls
315
314
  * under them as it would anywhere else.
316
315
  *
317
- * *Corrected 18 Aug 2026. This said "both axes, always", on the reasoning
318
- * `KeyboardNavigationController` uses for a set of items: a reader who guesses
319
- * the wrong arrow gets nothing. The code has never done it, and measuring the
320
- * three tab stops of a nested pair is what turned that up, so the prose was
321
- * describing a decision nobody implemented.*
322
- *
323
- * *Leaving it as one axis, because nesting is what settles it. Taking all four
324
- * would mean `ArrowLeft` moving a horizontal divider up and down, which is not
325
- * a reader being helped past a guess, it is an arrow that does not go the way
326
- * it points. And the guess it was protecting against is answered better by the
327
- * corner: there, all four arrows are live and each moves the divider it points
328
- * along, which is the only place in a splitter where a second axis means
329
- * anything.*
316
+ * **Not all four, which is the tempting version.** Taking every arrow would
317
+ * mean `ArrowLeft` moving a horizontal divider up and down: not a reader
318
+ * being helped past a wrong guess, an arrow that does not go the way it
319
+ * points. A reader who guesses wrong is answered better by the corner, where
320
+ * all four are live and each moves the divider it points along, which is the
321
+ * only place in a splitter where a second axis means anything.
330
322
  */
331
323
  this.handleKeydown = (event) => {
332
324
  const back = this.vertical ? 'ArrowUp' : 'ArrowLeft';
@@ -358,10 +350,9 @@ let HelixHeadlessSplitter = HelixHeadlessSplitter_1 = class HelixHeadlessSplitte
358
350
  /**
359
351
  * Both of them, because the corner moves both.
360
352
  *
361
- * It needs its own handler now. Inside the separator this came free by
362
- * bubbling, and moving the corner out to sit against the host for the stacking
363
- * reason took the double click with it: the divider reset and the crossing
364
- * did not. Reported.
353
+ * Its own handler, because the corner is a sibling of the separator rather
354
+ * than a child of it, for the stacking reason in the stylesheet, so nothing
355
+ * reaches the separator's own double click by bubbling.
365
356
  */
366
357
  this.handleCornerDoubleClick = (event) => {
367
358
  const crossing = this.crossings[Number(event.currentTarget.dataset.cross)];
@@ -472,8 +463,6 @@ let HelixHeadlessSplitter = HelixHeadlessSplitter_1 = class HelixHeadlessSplitte
472
463
  * Reading gives where it is; writing declares it the consumer's, and
473
464
  * `default-position` seeds one this element owns. The same accessor pair
474
465
  * `Pagination.page` and the calendar's `month` carry.
475
- *
476
- *
477
466
  */
478
467
  get position() {
479
468
  const shut = this.collapsed;
@@ -485,12 +474,11 @@ let HelixHeadlessSplitter = HelixHeadlessSplitter_1 = class HelixHeadlessSplitte
485
474
  set position(next) {
486
475
  const previous = this.position;
487
476
  this.positionState = next;
488
- /* The consumer has spoken, so the drag stops standing in for them.
489
- Without this the divider flashed back: `dragging` goes false on
490
- `pointerup`, `showing` fell straight back to the position they had set
491
- before the gesture, and it was drawn there for the frame it took them to
492
- answer the announcement. Snapping to where it started and then jumping to
493
- where it was dropped, on every drag. */
477
+ /* The consumer has spoken, so the drag stops standing in for them. Without
478
+ this the divider flashes back: `showing` falls to the position set before
479
+ the gesture and is drawn there for the frame it takes them to answer the
480
+ announcement, snapping to where the drag started and then jumping to
481
+ where it was dropped. */
494
482
  this.reached = undefined;
495
483
  this.requestUpdate('position', previous);
496
484
  }
@@ -506,8 +494,6 @@ let HelixHeadlessSplitter = HelixHeadlessSplitter_1 = class HelixHeadlessSplitte
506
494
  *
507
495
  * It overrides `min` and `max`, which is the point of it. Those keep a sliver
508
496
  * of a pane during a drag; this is the thing that says the sliver can go.
509
- *
510
- *
511
497
  */
512
498
  get collapsed() {
513
499
  const held = this.collapsedState;
@@ -569,14 +555,12 @@ let HelixHeadlessSplitter = HelixHeadlessSplitter_1 = class HelixHeadlessSplitte
569
555
  * The position to draw, which is not always the position to report.
570
556
  *
571
557
  * A controlled splitter applies nothing, so `position` holds still for the
572
- * whole gesture and the divider stayed where it was until the pointer came up
573
- * and the consumer answered: it jumped to the end rather than following the
574
- * hand. Reported as resizing that was not seamless and did not work as it had.
558
+ * whole gesture: drawn from it, the divider stays where it was until the
559
+ * pointer comes up and the consumer answers, jumping to the end rather than
560
+ * following the hand.
575
561
  *
576
- * So a drag draws itself. The number is not announced until it settles, which
577
- * is the rule that has not changed, and the consumer's answer takes over the
578
- * moment they give one. It is what the sandbox did for itself before it used
579
- * this component: write the size on every pointer move, tell anyone once.
562
+ * So a drag draws itself. The number is still not announced until it settles,
563
+ * and the consumer's answer takes over the moment they give one.
580
564
  */
581
565
  get showing() {
582
566
  return this.reached === undefined ? this.position : this.clamp(this.reached);
@@ -602,17 +586,6 @@ let HelixHeadlessSplitter = HelixHeadlessSplitter_1 = class HelixHeadlessSplitte
602
586
  this.move(next);
603
587
  }
604
588
  }
605
- /*
606
- * The collapse a settled position amounts to, if any.
607
- *
608
- * So that a pane dragged shut and a pane shut by a consumer's button are the
609
- * same state. Left apart, a reader could drag the panel closed and the button
610
- * offering to reopen it would read as already open.
611
- *
612
- * No separate threshold. Landing on the collapsed size *is* the gesture, and
613
- * `clamp` puts every overshoot exactly on the bound, so the default of zero
614
- * latches on any drag that runs off the end.
615
- */
616
589
  /** The collapsed size, held inside the range a percentage can be. */
617
590
  get sliver() {
618
591
  return Math.min(100, Math.max(0, this.collapsedSize));
@@ -620,11 +593,11 @@ let HelixHeadlessSplitter = HelixHeadlessSplitter_1 = class HelixHeadlessSplitte
620
593
  /**
621
594
  * Whether the divider is against an edge with nothing beside it.
622
595
  *
623
- * Geometry, not state, which is the second answer here: it asked whether the
624
- * pane was `collapsed`, and a divider driven to the edge by a consumer setting
625
- * `position` is just as flush and drew a line anyway. What the stylesheet
626
- * needs to know is whether there is a pane on both sides, and that is a fact
627
- * about where the divider is however it got there.
596
+ * Geometry, not state. Asking whether the pane is `collapsed` is the wrong
597
+ * question: a divider driven to the edge by a consumer setting `position` is
598
+ * just as flush and would still get a line drawn. What the stylesheet needs
599
+ * to know is whether there is a pane on both sides, which is a fact about
600
+ * where the divider is however it got there.
628
601
  *
629
602
  * Still not the same question as `collapsed`: a pane shut to a sliver has a
630
603
  * boundary worth drawing, and one shut to nothing has the container's own edge
@@ -633,6 +606,14 @@ let HelixHeadlessSplitter = HelixHeadlessSplitter_1 = class HelixHeadlessSplitte
633
606
  get flush() {
634
607
  return this.sliver === 0 && this.shutAt(this.position) !== undefined;
635
608
  }
609
+ /**
610
+ * The collapse a settled position amounts to, if any, so a pane dragged shut
611
+ * and a pane shut by a consumer's button are the same state.
612
+ *
613
+ * No separate threshold. Landing on the collapsed size *is* the gesture, and
614
+ * `clamp` puts every overshoot exactly on the bound, so the default of zero
615
+ * latches on any drag that runs off the end.
616
+ */
636
617
  shutAt(position) {
637
618
  const size = this.sliver;
638
619
  if (position <= size) {
@@ -695,11 +676,10 @@ let HelixHeadlessSplitter = HelixHeadlessSplitter_1 = class HelixHeadlessSplitte
695
676
  const wanted = this.clamp(next);
696
677
  /* Where the gesture has reached, recorded before anything decides whether to
697
678
  apply it. A controlled splitter applies nothing, so its `position` is
698
- whatever the consumer last said, and settling at *that* announces the
699
- number it already had: the drag ended where it began and the divider never
700
- moved. Reported as a splitter that could not be dragged at all, and it was
701
- every controlled one. The keyboard was fine because it computes its next
702
- position rather than reading it back. */
679
+ whatever the consumer last said, and settling at *that* would announce
680
+ the number it already had: the drag ends where it began and the divider
681
+ never moves. Only the pointer is exposed to it, the keyboard computing
682
+ its next position rather than reading it back. */
703
683
  this.reached = wanted;
704
684
  if (wanted === this.position) {
705
685
  return;
@@ -754,16 +734,16 @@ let HelixHeadlessSplitter = HelixHeadlessSplitter_1 = class HelixHeadlessSplitte
754
734
  }
755
735
  /** Puts the divider back where the markup put it. */
756
736
  reset() {
757
- /* `default-position`, not the position at first render, which is what this
758
- read and which is only the same thing when nobody owns the position. A
759
- consumer who does owns what it was on that first frame too, and theirs can
760
- be a number they cannot compute yet: the sandbox sizes its panel in pixels
761
- and has no box to divide by until it has rendered once, so the divider
762
- recorded "panel closed" as home and a double click on the crossing shut
763
- the panel instead of restoring it. Reported.
737
+ /* `default-position`, never the position captured at first render. Those
738
+ are the same only when nobody owns the position: a consumer who does owns
739
+ what it was on that first frame too, and theirs can be a number they
740
+ cannot compute yet, as the sandbox's is, sizing its panel in pixels with
741
+ no box to divide by until it has rendered once. Home would then be
742
+ "panel closed" and a double click would shut the panel rather than
743
+ restore it.
764
744
 
765
- Declared rather than remembered, so it is a value a consumer can state and
766
- change, and it needs no capture at all. */
745
+ Declared rather than remembered, so it is a value a consumer can state
746
+ and change, and it needs no capture at all. */
767
747
  const home = this.clamp(this.defaultPosition);
768
748
  this.move(home);
769
749
  this.settle(home);
@@ -809,13 +789,11 @@ let HelixHeadlessSplitter = HelixHeadlessSplitter_1 = class HelixHeadlessSplitte
809
789
  *
810
790
  * `parentElement` first, so a splitter does not find itself.
811
791
  *
812
- * **By identity rather than by tag, which `closestInstance` exists for and
813
- * counts this file in its own documentation.** It matched
814
- * `'helix-splitter, helix-headless-splitter'`, and only `@fusion.dev/helix` registers
815
- * the first of those: a headless package naming a styled one by string. Under
816
- * any third tag, which is exactly what subclassing a headless element is for and
817
- * what `helix/styled` itself does, the lookup returned null and a nested
818
- * splitter had no corner, with no error anywhere.
792
+ * **By identity rather than by tag, which is what `closestInstance` exists
793
+ * for.** A selector like `'helix-splitter, helix-headless-splitter'` names a
794
+ * styled tag from a headless package and misses any third tag, which is
795
+ * exactly what subclassing a headless element produces: the lookup returns
796
+ * null, the nested splitter gets no corner, and nothing reports an error.
819
797
  *
820
798
  * It also crosses shadow boundaries, which `closest` does not: a splitter
821
799
  * slotted into another component's shadow root has a `parentNode` chain
@@ -835,18 +813,14 @@ let HelixHeadlessSplitter = HelixHeadlessSplitter_1 = class HelixHeadlessSplitte
835
813
  /**
836
814
  * Keeps a gesture on the corner to itself.
837
815
  *
838
- * The corner was a child of the separator first, and every one of its events
839
- * bubbled there, so the separator started its own drag from the same press.
840
- * That is worse than moving twice: the separator calls `setPointerCapture`,
841
- * which retargets every later pointer event to *it*, so the corner's
842
- * `pointerup` never arrived, its origin was never cleared, and it went on
843
- * resizing with no button held. Reported as resizing without a press.
816
+ * The stop is not redundant with the corner being a sibling of the separator.
817
+ * Should a press on the corner ever reach the separator, the separator calls
818
+ * `setPointerCapture`, which retargets every later pointer event to *it*: the
819
+ * corner's `pointerup` never arrives, its origin is never cleared, and it
820
+ * goes on resizing with no button held. Worse than moving twice.
844
821
  *
845
- * The corner is a sibling now, for the stacking reason in the stylesheet, so
846
- * nothing reaches the separator by bubbling. This stays because the fix should
847
- * not depend on where the element happens to sit, and `preventDefault` is
848
- * still needed either way: a drag across a pane would otherwise select the
849
- * text under it.
822
+ * `preventDefault` is needed either way: a drag across a pane would otherwise
823
+ * select the text under it.
850
824
  */
851
825
  leaveSeparator(event) {
852
826
  event.stopPropagation();
@@ -860,8 +834,7 @@ let HelixHeadlessSplitter = HelixHeadlessSplitter_1 = class HelixHeadlessSplitte
860
834
  /* The width watch too, and it belongs here for a plainer reason than the
861
835
  one above: `disconnectedCallback` drops the observer on every move, so
862
836
  a splitter reordered in the DOM would stop watching its own width and
863
- `auto` would freeze on whatever it last saw. `check:observers` is what
864
- said so. */
837
+ `auto` would freeze on whatever it last saw. */
865
838
  this.watchWidth();
866
839
  this.findOuter();
867
840
  }
@@ -983,14 +956,14 @@ let HelixHeadlessSplitter = HelixHeadlessSplitter_1 = class HelixHeadlessSplitte
983
956
  }
984
957
  };
985
958
  __decorate([
986
- property({ reflect: true })
987
- ], HelixHeadlessSplitter.prototype, "orientation", void 0);
959
+ property({ attribute: 'collapsed-size', type: Number })
960
+ ], HelixHeadlessSplitter.prototype, "collapsedSize", void 0);
988
961
  __decorate([
989
962
  property({ type: Number })
990
963
  ], HelixHeadlessSplitter.prototype, "position", null);
991
964
  __decorate([
992
- property({ attribute: 'default-position', type: Number })
993
- ], HelixHeadlessSplitter.prototype, "defaultPosition", void 0);
965
+ property({ attribute: 'corner-label' })
966
+ ], HelixHeadlessSplitter.prototype, "cornerLabel", void 0);
994
967
  __decorate([
995
968
  property()
996
969
  ], HelixHeadlessSplitter.prototype, "collapsed", null);
@@ -998,23 +971,23 @@ __decorate([
998
971
  property({ attribute: 'default-collapsed' })
999
972
  ], HelixHeadlessSplitter.prototype, "defaultCollapsed", void 0);
1000
973
  __decorate([
1001
- property({ attribute: 'collapsed-size', type: Number })
1002
- ], HelixHeadlessSplitter.prototype, "collapsedSize", void 0);
974
+ property({ attribute: 'default-position', type: Number })
975
+ ], HelixHeadlessSplitter.prototype, "defaultPosition", void 0);
1003
976
  __decorate([
1004
977
  property()
1005
- ], HelixHeadlessSplitter.prototype, "min", void 0);
978
+ ], HelixHeadlessSplitter.prototype, "label", void 0);
1006
979
  __decorate([
1007
980
  property()
1008
981
  ], HelixHeadlessSplitter.prototype, "max", void 0);
1009
- __decorate([
1010
- property({ type: Number })
1011
- ], HelixHeadlessSplitter.prototype, "step", void 0);
1012
982
  __decorate([
1013
983
  property()
1014
- ], HelixHeadlessSplitter.prototype, "label", void 0);
984
+ ], HelixHeadlessSplitter.prototype, "min", void 0);
1015
985
  __decorate([
1016
- property({ attribute: 'corner-label' })
1017
- ], HelixHeadlessSplitter.prototype, "cornerLabel", void 0);
986
+ property({ reflect: true })
987
+ ], HelixHeadlessSplitter.prototype, "orientation", void 0);
988
+ __decorate([
989
+ property({ type: Number })
990
+ ], HelixHeadlessSplitter.prototype, "step", void 0);
1018
991
  __decorate([
1019
992
  state()
1020
993
  ], HelixHeadlessSplitter.prototype, "reached", void 0);
@@ -9,11 +9,6 @@ import { type TemplateResult } from 'lit';
9
9
  * lands on the number either way, because the number is the loud thing; a
10
10
  * reader hearing it needs to know what it counts before hearing how many.
11
11
  *
12
- * This paragraph said the opposite, value first and label after, on a render
13
- * that has always emitted the label slot first: the description was published
14
- * to two tiers and shipped into the generated types, and the component was
15
- * right and the sentence was wrong.
16
- *
17
12
  * Both are bare slots. An element whose only job is to assign itself a slot on
18
13
  * connect gives its own host an attribute after upgrade, which a React
19
14
  * consumer's server markup never had.
@@ -49,8 +44,8 @@ export declare class HelixHeadlessStat extends HelixElement {
49
44
  * the host the moment the element upgrades, and the host is markup the
50
45
  * consumer rendered: React compares what it rendered against what is there and
51
46
  * reports a hydration mismatch. The absent attribute is the column, which the
52
- * stylesheet reads as the base case. The existing server spec caught this,
53
- * being the one that asserts the host carries nothing nobody wrote.
47
+ * stylesheet reads as the base case, and the server spec asserts the host
48
+ * carries nothing nobody wrote.
54
49
  */
55
50
  direction?: 'column-reverse' | 'row' | 'row-reverse';
56
51
  protected render(): TemplateResult;
@@ -16,11 +16,6 @@ import { property } from 'lit/decorators.js';
16
16
  * lands on the number either way, because the number is the loud thing; a
17
17
  * reader hearing it needs to know what it counts before hearing how many.
18
18
  *
19
- * This paragraph said the opposite, value first and label after, on a render
20
- * that has always emitted the label slot first: the description was published
21
- * to two tiers and shipped into the generated types, and the component was
22
- * right and the sentence was wrong.
23
- *
24
19
  * Both are bare slots. An element whose only job is to assign itself a slot on
25
20
  * connect gives its own host an attribute after upgrade, which a React
26
21
  * consumer's server markup never had.
@@ -11,11 +11,10 @@ import '../../button/index.js';
11
11
  * hit area and no meaning: the accessible name would be the text either way,
12
12
  * and what is pressable would stop being the same shape as what is readable.
13
13
  *
14
- * It is `helix-button`, not a `<button>` this element resets and dresses. The
15
- * hover wash, the focus ring, the disabled treatment and the way the label sits
16
- * against an icon are all decisions the button already carries, and a second
17
- * copy of them here is a second copy to keep in step. `ghost` is the quiet
18
- * shape: transparent until it is pointed at.
14
+ * It is `helix-button`, not a `<button>` this element resets and dresses: the
15
+ * hover wash, the focus ring and the disabled treatment are decisions the
16
+ * button already carries. `ghost` is the quiet shape, transparent until it is
17
+ * pointed at.
19
18
  *
20
19
  * It says nothing about where a reader may go. Every step is pressable and
21
20
  * announces itself with `helix-select`; refusing the ones ahead is `disabled`,
@@ -33,11 +32,10 @@ import '../../button/index.js';
33
32
  * accessibility tree would carry marks that are not there, and the markup would
34
33
  * say three things about a stage that is one.
35
34
  *
36
- * Numbering is a separate question and belongs to the tier above. `numeric`
37
- * hides the mark and shows a CSS counter, which the browser resolves at layout,
38
- * so the digit costs no script and is right in the server's markup however the
39
- * steps are ordered. Nothing here knows which appearance is in use, and does
40
- * not need to.
35
+ * Numbering belongs to the tier above. `numeric` hides the mark and shows a CSS
36
+ * counter, which the browser resolves at layout, so the digit costs no script
37
+ * and is right in the server's markup however the steps are ordered. Nothing
38
+ * here knows which appearance is in use.
41
39
  *
42
40
  * **`complete` and `current` are separate, and both can be false.** A stage
43
41
  * that is neither is one the reader has not reached, which is the majority of
@@ -106,16 +104,14 @@ export declare class HelixHeadlessStep extends HelixElement {
106
104
  * center for the one they are standing on, a bare check for one that is done.
107
105
  * The first two are one shape filling in, which is the progression, and the
108
106
  * check is the only mark that leaves the family because finishing is the only
109
- * state that is not a position in the sequence.
107
+ * state that is not a position in the sequence. A coin around the check would
108
+ * put two of the three inside the same container and leave hue doing the work
109
+ * of telling them apart.
110
110
  *
111
- * What went was the coin around the check: a filled disc carrying a check
112
- * beside a filled disc carrying a ring put two of the three inside the same
113
- * container, and left hue doing most of the work of telling them apart.
114
- *
115
- * The bare check is `Timeline`'s, deliberately: the two components report the
116
- * same kind of thing, a sequence with marks down it, and a check floating on
117
- * a hairline in one beside a check inside a green coin in the other was two
118
- * answers to one question. Timeline's rings came off the same day.
111
+ * The bare check matches `Timeline`, deliberately: the two components report
112
+ * the same kind of thing, a sequence with marks down it, and a check on a
113
+ * hairline in one beside a check inside a coin in the other is two answers to
114
+ * one question.
119
115
  */
120
116
  protected renderMarker(): TemplateResult;
121
117
  protected willUpdate(changed: PropertyValues): void;
@@ -123,11 +119,10 @@ export declare class HelixHeadlessStep extends HelixElement {
123
119
  * The step's own label, which is a control because a step can be gone to, behind a seam the styled tier can move.
124
120
  *
125
121
  * A method rather than a fragment inline, so a tier above can render its own,
126
- * wrap this one, pass it a property the base does not know about, or leave it
127
- * out, without reimplementing the whole template to do any of them. The tag is
128
- * interpolated rather than written, so `tier` resolves it: this renders the
129
- * headless element, and a styled subclass that sets `tier` renders the styled one
130
- * from the same template.
122
+ * wrap this one, or leave it out, without reimplementing the whole template.
123
+ * The tag is interpolated rather than written, so `tier` resolves it: this
124
+ * renders the headless element, and a styled subclass that sets `tier`
125
+ * renders the styled one from the same template.
131
126
  */
132
127
  protected renderLabel(): TemplateResult;
133
128
  protected render(): TemplateResult;
@@ -12,7 +12,7 @@ import { html } from 'lit/static-html.js';
12
12
  /* Side-effect import, because this renders a button and a custom element
13
13
  registers on import. The path is relative, so this registers the base button
14
14
  and the styled file's identical import registers the styled one; `tier` picks
15
- which name the template asks for. `check:composed` enforces both. */
15
+ which name the template asks for. */
16
16
  import '../../button/index.js';
17
17
  /**
18
18
  * @summary One stage in a sequence.
@@ -24,11 +24,10 @@ import '../../button/index.js';
24
24
  * hit area and no meaning: the accessible name would be the text either way,
25
25
  * and what is pressable would stop being the same shape as what is readable.
26
26
  *
27
- * It is `helix-button`, not a `<button>` this element resets and dresses. The
28
- * hover wash, the focus ring, the disabled treatment and the way the label sits
29
- * against an icon are all decisions the button already carries, and a second
30
- * copy of them here is a second copy to keep in step. `ghost` is the quiet
31
- * shape: transparent until it is pointed at.
27
+ * It is `helix-button`, not a `<button>` this element resets and dresses: the
28
+ * hover wash, the focus ring and the disabled treatment are decisions the
29
+ * button already carries. `ghost` is the quiet shape, transparent until it is
30
+ * pointed at.
32
31
  *
33
32
  * It says nothing about where a reader may go. Every step is pressable and
34
33
  * announces itself with `helix-select`; refusing the ones ahead is `disabled`,
@@ -46,11 +45,10 @@ import '../../button/index.js';
46
45
  * accessibility tree would carry marks that are not there, and the markup would
47
46
  * say three things about a stage that is one.
48
47
  *
49
- * Numbering is a separate question and belongs to the tier above. `numeric`
50
- * hides the mark and shows a CSS counter, which the browser resolves at layout,
51
- * so the digit costs no script and is right in the server's markup however the
52
- * steps are ordered. Nothing here knows which appearance is in use, and does
53
- * not need to.
48
+ * Numbering belongs to the tier above. `numeric` hides the mark and shows a CSS
49
+ * counter, which the browser resolves at layout, so the digit costs no script
50
+ * and is right in the server's markup however the steps are ordered. Nothing
51
+ * here knows which appearance is in use.
54
52
  *
55
53
  * **`complete` and `current` are separate, and both can be false.** A stage
56
54
  * that is neither is one the reader has not reached, which is the majority of
@@ -127,16 +125,14 @@ let HelixHeadlessStep = class HelixHeadlessStep extends HelixElement {
127
125
  * center for the one they are standing on, a bare check for one that is done.
128
126
  * The first two are one shape filling in, which is the progression, and the
129
127
  * check is the only mark that leaves the family because finishing is the only
130
- * state that is not a position in the sequence.
128
+ * state that is not a position in the sequence. A coin around the check would
129
+ * put two of the three inside the same container and leave hue doing the work
130
+ * of telling them apart.
131
131
  *
132
- * What went was the coin around the check: a filled disc carrying a check
133
- * beside a filled disc carrying a ring put two of the three inside the same
134
- * container, and left hue doing most of the work of telling them apart.
135
- *
136
- * The bare check is `Timeline`'s, deliberately: the two components report the
137
- * same kind of thing, a sequence with marks down it, and a check floating on
138
- * a hairline in one beside a check inside a green coin in the other was two
139
- * answers to one question. Timeline's rings came off the same day.
132
+ * The bare check matches `Timeline`, deliberately: the two components report
133
+ * the same kind of thing, a sequence with marks down it, and a check on a
134
+ * hairline in one beside a check inside a coin in the other is two answers to
135
+ * one question.
140
136
  */
141
137
  renderMarker() {
142
138
  const icon = this.complete ? check : this.current ? record : circle;
@@ -155,11 +151,10 @@ let HelixHeadlessStep = class HelixHeadlessStep extends HelixElement {
155
151
  * The step's own label, which is a control because a step can be gone to, behind a seam the styled tier can move.
156
152
  *
157
153
  * A method rather than a fragment inline, so a tier above can render its own,
158
- * wrap this one, pass it a property the base does not know about, or leave it
159
- * out, without reimplementing the whole template to do any of them. The tag is
160
- * interpolated rather than written, so `tier` resolves it: this renders the
161
- * headless element, and a styled subclass that sets `tier` renders the styled one
162
- * from the same template.
154
+ * wrap this one, or leave it out, without reimplementing the whole template.
155
+ * The tag is interpolated rather than written, so `tier` resolves it: this
156
+ * renders the headless element, and a styled subclass that sets `tier`
157
+ * renders the styled one from the same template.
163
158
  */
164
159
  renderLabel() {
165
160
  return html `<${this.tag('button')}
@@ -175,13 +170,13 @@ let HelixHeadlessStep = class HelixHeadlessStep extends HelixElement {
175
170
  render() {
176
171
  /* Two half lines, one either side of the mark, rather than one line running
177
172
  the whole way to the next step.
178
- A single line was tried twice. Drawn to the next marker it has to know
179
- how far away that is, which is the next step's size, and a step knows
180
- only its own. Drawn across the gap alone it is a stub. Two halves need
181
- neither: each reaches from the mark to its own step's edge and half the
182
- gap beyond, so it meets the one coming the other way in the middle of the
183
- gap and the rule reads as continuous however wide the steps are or how
184
- differently they are filled.
173
+ A single line drawn to the next marker has to know how far away that is,
174
+ which is the next step's size, and a step knows only its own; drawn
175
+ across the gap alone it is a stub. Two halves need neither: each reaches
176
+ from the mark to its own step's edge and half the gap beyond, so it meets
177
+ the one coming the other way in the middle of the gap and the rule reads
178
+ as continuous however wide the steps are or how differently they are
179
+ filled.
185
180
  The first has nothing on its leading side and the last nothing on its
186
181
  trailing one, which `:host(:first-child)` and `:host(:last-child)` say
187
182
  with no index and no parent counting its children. */
@@ -91,8 +91,8 @@ let HelixHeadlessSwitch = class HelixHeadlessSwitch extends MixinControllerCheck
91
91
  }
92
92
  /** Returns the switch to the state its markup declared. */
93
93
  formResetCallback() {
94
- // `resetChecked` drops both halves now, the consumer's and the element's,
95
- // so there is nothing to clear before it.
94
+ // `resetChecked` drops both halves, the consumer's and the element's, so
95
+ // there is nothing to clear before it.
96
96
  this.resetChecked();
97
97
  }
98
98
  updated(changed) {