@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
@@ -42,37 +42,39 @@ import { type PropertyValues, type TemplateResult } from 'lit';
42
42
  */
43
43
  export declare class HelixHeadlessOption extends HelixElement {
44
44
  /**
45
- * Whether this choice can be made.
45
+ * Whether this is the option the keyboard is on.
46
+ *
47
+ * Written by the listbox.
46
48
  */
47
- disabled: boolean;
49
+ active: boolean;
48
50
  /**
49
- * A second line under the words, for what the choice actually is.
51
+ * A second destination for this row, taken with the modifier held.
50
52
  *
51
- * A palette row reads better as a name and a caption than as one sentence
52
- * carrying both: "Helix" and "the design system" are two facts, and a comma
53
- * between them makes a reader parse the punctuation to find where the name
54
- * ends. Matching still reads the label, so what somebody types is matched
55
- * against the name rather than against prose about it.
53
+ * **An attribute rather than a second row, which is the whole point.** A
54
+ * palette of eighty-eight components that offered each of them a reference
55
+ * page and a sandbox as separate entries would be a palette of a hundred and
56
+ * seventy-six, and one earns its keep by getting a reader to one thing in
57
+ * three keystrokes. The row already carries the first destination, so the
58
+ * second belongs beside it.
56
59
  *
57
- * **A property and not a slot, which is the departure worth explaining.** The
58
- * area rules say a content property is its slot's fallback, and that holds for
59
- * a region always drawn: `Avatar`'s initials, `Tooltip`'s text. This one is
60
- * usually absent, and a wrapped slot generates a box whether or not it is
61
- * filled, so every option without a caption would carry an empty line. The
62
- * detection that would avoid it does not exist, `:host(:has())` being invalid
63
- * and the server having no children to inspect. A property is known at render
64
- * time, so the component can decline to draw the box at all.
60
+ * Declared here and acted on by whatever owns the list, the same division
61
+ * selection already uses: an option says what it is and the listbox decides
62
+ * what happens. `Command` is the only owner that reads it today, because a
63
+ * select has one destination by definition.
65
64
  *
66
- * It does not reflect, per the rule that payload state stays off the host: a
67
- * string is not a fact a selector needs.
65
+ * Absent is a row with one destination, which is nearly every row.
68
66
  */
69
- description?: string;
67
+ alternate: string;
70
68
  /**
71
- * Whether this is the option the keyboard is on.
69
+ * What the second destination is, for a reader who cannot see the footer.
72
70
  *
73
- * Written by the listbox.
71
+ * A row with two destinations needs both said, or a screen reader is told
72
+ * about one of them and the other is a key nobody mentioned. It goes to
73
+ * `aria-description` rather than into the name: the name is the row's own
74
+ * words and stays what a reader searched for, and the second destination is a
75
+ * fact about what pressing a key would do, which is what a description is.
74
76
  */
75
- active: boolean;
77
+ alternateLabel: string;
76
78
  /**
77
79
  * Whether the markup declared this one chosen, which is what a reset returns to.
78
80
  *
@@ -93,11 +95,31 @@ export declare class HelixHeadlessOption extends HelixElement {
93
95
  /** What the markup said, read once at construction for the reason above. */
94
96
  private seeded;
95
97
  /**
96
- * Whether this choice is currently chosen.
98
+ * A second line under the words, for what the choice actually is.
97
99
  *
98
- * Written by the listbox.
100
+ * A palette row reads better as a name and a caption than as one sentence
101
+ * carrying both: "Helix" and "the design system" are two facts, and a comma
102
+ * between them makes a reader parse the punctuation to find where the name
103
+ * ends. Matching still reads the label, so what somebody types is matched
104
+ * against the name rather than against prose about it.
105
+ *
106
+ * **A property and not a slot, which is the departure worth explaining.** The
107
+ * area rules say a content property is its slot's fallback, and that holds for
108
+ * a region always drawn: `Avatar`'s initials, `Tooltip`'s text. This one is
109
+ * usually absent, and a wrapped slot generates a box whether or not it is
110
+ * filled, so every option without a caption would carry an empty line. The
111
+ * detection that would avoid it does not exist, `:host(:has())` being invalid
112
+ * and the server having no children to inspect. A property is known at render
113
+ * time, so the component can decline to draw the box at all.
114
+ *
115
+ * It does not reflect, per the rule that payload state stays off the host: a
116
+ * string is not a fact a selector needs.
99
117
  */
100
- selected: boolean;
118
+ description?: string;
119
+ /**
120
+ * Whether this choice can be made.
121
+ */
122
+ disabled: boolean;
101
123
  /**
102
124
  * A shorter name for this choice, for where the row does not fit.
103
125
  *
@@ -108,37 +130,15 @@ export declare class HelixHeadlessOption extends HelixElement {
108
130
  */
109
131
  label: string;
110
132
  /**
111
- * Identifies this choice, and is what a form submits.
112
- */
113
- value: string;
114
- /**
115
- * A second destination for this row, taken with the modifier held.
116
- *
117
- * **An attribute rather than a second row, which is the whole point.** A
118
- * palette of eighty-eight components that offered each of them a reference
119
- * page and a sandbox as separate entries would be a palette of a hundred and
120
- * seventy-six, and one earns its keep by getting a reader to one thing in
121
- * three keystrokes. The row already carries the first destination, so the
122
- * second belongs beside it.
123
- *
124
- * Declared here and acted on by whatever owns the list, the same division
125
- * selection already uses: an option says what it is and the listbox decides
126
- * what happens. `Command` is the only owner that reads it today, because a
127
- * select has one destination by definition.
133
+ * Whether this choice is currently chosen.
128
134
  *
129
- * Absent is a row with one destination, which is nearly every row.
135
+ * Written by the listbox.
130
136
  */
131
- alternate: string;
137
+ selected: boolean;
132
138
  /**
133
- * What the second destination is, for a reader who cannot see the footer.
134
- *
135
- * A row with two destinations needs both said, or a screen reader is told
136
- * about one of them and the other is a key nobody mentioned. It goes to
137
- * `aria-description` rather than into the name: the name is the row's own
138
- * words and stays what a reader searched for, and the second destination is a
139
- * fact about what pressing a key would do, which is what a description is.
139
+ * Identifies this choice, and is what a form submits.
140
140
  */
141
- alternateLabel: string;
141
+ value: string;
142
142
  /**
143
143
  * The words, for a listbox that has to match text against them.
144
144
  *
@@ -146,20 +146,19 @@ export declare class HelixHeadlessOption extends HelixElement {
146
146
  * the content is where a consumer naturally puts it and asking for both is
147
147
  * asking for two things to disagree.
148
148
  *
149
- * **The default slot's content, not the element's.** This was
150
- * `this.textContent`, which is every descendant text node an option holds,
151
- * and an option holds three slots: the words, plus `start` for an icon and
152
- * `end` for a shortcut or a count. Neither of those is what a reader
153
- * searched for, and both were being run onto the end of it.
154
- *
155
- * **Six things read this and all six were wrong.** The collapsed field of
156
- * Select and of Combobox show it, the listbox filters on it, Combobox
157
- * matches typed text against it, completes inline from it, and labels a
158
- * chosen tag with it. Measured on a font picker whose options carry a
159
- * two-letter specimen in `end`: the field read `Noto Sans Linear BAg`, and
160
- * typing `ag` matched 1,892 of 1,893 options, every row containing the
161
- * sample. An option with a keyboard shortcut in its end slot has the same
162
- * fault and a worse one, every row carrying one matching every letter of it.
149
+ * **The default slot's content, never `this.textContent`.** An option holds
150
+ * three slots: the words, plus `start` for an icon and `end` for a shortcut
151
+ * or a count. Neither of the latter two is what a reader searched for, and
152
+ * `textContent` runs both onto the end of it. Measured on a font picker whose
153
+ * options carry a two-letter specimen in `end`: the field read
154
+ * `Noto Sans Linear BAg`, and typing `ag` matched 1,892 of 1,893 options,
155
+ * every row containing the sample. An option with a keyboard shortcut in its
156
+ * end slot has the same fault and a worse one, every row carrying one matching
157
+ * every letter of it.
158
+ *
159
+ * Six things read this: the collapsed field of Select and of Combobox, the
160
+ * listbox's filter, Combobox's match against typed text, its inline
161
+ * completion, and the label on a chosen tag.
163
162
  *
164
163
  * A node goes to the default slot when it names no other, which is the rule
165
164
  * the platform applies at assignment. Asking the same question here rather
@@ -172,17 +171,17 @@ export declare class HelixHeadlessOption extends HelixElement {
172
171
  /**
173
172
  * Mirrors the chosen state where a stylesheet can select on it.
174
173
  *
175
- * **A custom state and not the `selected` attribute it used to reflect.** The
176
- * parent writes this: a listbox choosing a row, a tab strip moving the tab, a
177
- * radio group answering for its set. Reflected, that put the element's own
178
- * bookkeeping onto markup a consumer wrote and a consumer's server never sent,
179
- * which React reconciles and reports as a mismatch, and which a serialized
180
- * element pasted back declares as a choice nobody made. `ElementInternals`
181
- * holds it instead, where it is not in the DOM at all.
174
+ * **A custom state, and never the `selected` attribute.** The parent writes
175
+ * this: a listbox choosing a row, a tab strip moving the tab, a radio group
176
+ * answering for its set. Reflected, that puts the element's own bookkeeping
177
+ * onto markup a consumer wrote and a consumer's server never sent, which React
178
+ * reconciles and reports as a mismatch, and which a serialized element pasted
179
+ * back declares as a choice nobody made. `ElementInternals` holds it instead,
180
+ * where it is not in the DOM at all.
182
181
  *
183
182
  * Reading `selected` is unaffected and so is writing it: the attribute still
184
183
  * seeds the property, which is what `<helix-option selected>` in a consumer's
185
- * markup means. What stops is the write back. See 302 and 304.
184
+ * markup means. What stops is the write back.
186
185
  */
187
186
  protected willUpdate(changed: PropertyValues): void;
188
187
  protected render(): TemplateResult;
@@ -50,37 +50,12 @@ import { property } from 'lit/decorators.js';
50
50
  let HelixHeadlessOption = class HelixHeadlessOption extends HelixElement {
51
51
  constructor() {
52
52
  super(...arguments);
53
- /**
54
- * Whether this choice can be made.
55
- */
56
- this.disabled = false;
57
53
  /**
58
54
  * Whether this is the option the keyboard is on.
59
55
  *
60
56
  * Written by the listbox.
61
57
  */
62
58
  this.active = false;
63
- /** What the markup said, read once at construction for the reason above. */
64
- this.seeded = this.hasAttribute('selected');
65
- /**
66
- * Whether this choice is currently chosen.
67
- *
68
- * Written by the listbox.
69
- */
70
- this.selected = false;
71
- /**
72
- * A shorter name for this choice, for where the row does not fit.
73
- *
74
- * `<option label>`'s own meaning: the text a chooser shows when it has less
75
- * room than the row does, which is what a select's closed trigger has. Empty
76
- * means the row's own content, which is the common case and is why this is not
77
- * simply the accessible name.
78
- */
79
- this.label = '';
80
- /**
81
- * Identifies this choice, and is what a form submits.
82
- */
83
- this.value = '';
84
59
  /**
85
60
  * A second destination for this row, taken with the modifier held.
86
61
  *
@@ -109,6 +84,31 @@ let HelixHeadlessOption = class HelixHeadlessOption extends HelixElement {
109
84
  * fact about what pressing a key would do, which is what a description is.
110
85
  */
111
86
  this.alternateLabel = '';
87
+ /** What the markup said, read once at construction for the reason above. */
88
+ this.seeded = this.hasAttribute('selected');
89
+ /**
90
+ * Whether this choice can be made.
91
+ */
92
+ this.disabled = false;
93
+ /**
94
+ * A shorter name for this choice, for where the row does not fit.
95
+ *
96
+ * `<option label>`'s own meaning: the text a chooser shows when it has less
97
+ * room than the row does, which is what a select's closed trigger has. Empty
98
+ * means the row's own content, which is the common case and is why this is not
99
+ * simply the accessible name.
100
+ */
101
+ this.label = '';
102
+ /**
103
+ * Whether this choice is currently chosen.
104
+ *
105
+ * Written by the listbox.
106
+ */
107
+ this.selected = false;
108
+ /**
109
+ * Identifies this choice, and is what a form submits.
110
+ */
111
+ this.value = '';
112
112
  }
113
113
  /**
114
114
  * Whether the markup declared this one chosen, which is what a reset returns to.
@@ -138,20 +138,19 @@ let HelixHeadlessOption = class HelixHeadlessOption extends HelixElement {
138
138
  * the content is where a consumer naturally puts it and asking for both is
139
139
  * asking for two things to disagree.
140
140
  *
141
- * **The default slot's content, not the element's.** This was
142
- * `this.textContent`, which is every descendant text node an option holds,
143
- * and an option holds three slots: the words, plus `start` for an icon and
144
- * `end` for a shortcut or a count. Neither of those is what a reader
145
- * searched for, and both were being run onto the end of it.
141
+ * **The default slot's content, never `this.textContent`.** An option holds
142
+ * three slots: the words, plus `start` for an icon and `end` for a shortcut
143
+ * or a count. Neither of the latter two is what a reader searched for, and
144
+ * `textContent` runs both onto the end of it. Measured on a font picker whose
145
+ * options carry a two-letter specimen in `end`: the field read
146
+ * `Noto Sans Linear BAg`, and typing `ag` matched 1,892 of 1,893 options,
147
+ * every row containing the sample. An option with a keyboard shortcut in its
148
+ * end slot has the same fault and a worse one, every row carrying one matching
149
+ * every letter of it.
146
150
  *
147
- * **Six things read this and all six were wrong.** The collapsed field of
148
- * Select and of Combobox show it, the listbox filters on it, Combobox
149
- * matches typed text against it, completes inline from it, and labels a
150
- * chosen tag with it. Measured on a font picker whose options carry a
151
- * two-letter specimen in `end`: the field read `Noto Sans Linear BAg`, and
152
- * typing `ag` matched 1,892 of 1,893 options, every row containing the
153
- * sample. An option with a keyboard shortcut in its end slot has the same
154
- * fault and a worse one, every row carrying one matching every letter of it.
151
+ * Six things read this: the collapsed field of Select and of Combobox, the
152
+ * listbox's filter, Combobox's match against typed text, its inline
153
+ * completion, and the label on a chosen tag.
155
154
  *
156
155
  * A node goes to the default slot when it names no other, which is the rule
157
156
  * the platform applies at assignment. Asking the same question here rather
@@ -175,17 +174,17 @@ let HelixHeadlessOption = class HelixHeadlessOption extends HelixElement {
175
174
  /**
176
175
  * Mirrors the chosen state where a stylesheet can select on it.
177
176
  *
178
- * **A custom state and not the `selected` attribute it used to reflect.** The
179
- * parent writes this: a listbox choosing a row, a tab strip moving the tab, a
180
- * radio group answering for its set. Reflected, that put the element's own
181
- * bookkeeping onto markup a consumer wrote and a consumer's server never sent,
182
- * which React reconciles and reports as a mismatch, and which a serialized
183
- * element pasted back declares as a choice nobody made. `ElementInternals`
184
- * holds it instead, where it is not in the DOM at all.
177
+ * **A custom state, and never the `selected` attribute.** The parent writes
178
+ * this: a listbox choosing a row, a tab strip moving the tab, a radio group
179
+ * answering for its set. Reflected, that puts the element's own bookkeeping
180
+ * onto markup a consumer wrote and a consumer's server never sent, which React
181
+ * reconciles and reports as a mismatch, and which a serialized element pasted
182
+ * back declares as a choice nobody made. `ElementInternals` holds it instead,
183
+ * where it is not in the DOM at all.
185
184
  *
186
185
  * Reading `selected` is unaffected and so is writing it: the attribute still
187
186
  * seeds the property, which is what `<helix-option selected>` in a consumer's
188
- * markup means. What stops is the write back. See 302 and 304.
187
+ * markup means. What stops is the write back.
189
188
  */
190
189
  willUpdate(changed) {
191
190
  super.willUpdate(changed);
@@ -202,11 +201,10 @@ let HelixHeadlessOption = class HelixHeadlessOption extends HelixElement {
202
201
  this.alternate !== '' && this.alternateLabel !== '' ? this.alternateLabel : null;
203
202
  /* A pointer reaches `select()` the way every other choosable row in this
204
203
  library does, from a `@click` in its own template: `Tabs.Tab`,
205
- `Tree.Item` and `Menu.Item` all bind one. This had none, and nothing else
206
- listened for a click either, so an option could be chosen with the
207
- keyboard and not with a mouse. A select was unusable with a pointer for
208
- as long as it has existed, which nothing caught because every spec for it
209
- chooses by calling `select()` or by pressing a key. */
204
+ `Tree.Item` and `Menu.Item` all bind one. Nothing else listens for a click
205
+ on an option, so removing this leaves a select the keyboard can use and a
206
+ pointer cannot. A spec that chooses by calling `select()` or by pressing a
207
+ key cannot tell the difference. */
210
208
  return html `<div part="item" @click=${() => this.select()}>
211
209
  <slot name="start"></slot>
212
210
  <span part="text">
@@ -218,29 +216,29 @@ let HelixHeadlessOption = class HelixHeadlessOption extends HelixElement {
218
216
  }
219
217
  };
220
218
  __decorate([
221
- property({ reflect: true, type: Boolean })
222
- ], HelixHeadlessOption.prototype, "disabled", void 0);
219
+ property({ attribute: 'data-active', reflect: true, type: Boolean })
220
+ ], HelixHeadlessOption.prototype, "active", void 0);
223
221
  __decorate([
224
222
  property()
225
- ], HelixHeadlessOption.prototype, "description", void 0);
223
+ ], HelixHeadlessOption.prototype, "alternate", void 0);
226
224
  __decorate([
227
- property({ attribute: 'data-active', reflect: true, type: Boolean })
228
- ], HelixHeadlessOption.prototype, "active", void 0);
225
+ property({ attribute: 'alternate-label' })
226
+ ], HelixHeadlessOption.prototype, "alternateLabel", void 0);
229
227
  __decorate([
230
- property({ type: Boolean })
231
- ], HelixHeadlessOption.prototype, "selected", void 0);
228
+ property()
229
+ ], HelixHeadlessOption.prototype, "description", void 0);
230
+ __decorate([
231
+ property({ reflect: true, type: Boolean })
232
+ ], HelixHeadlessOption.prototype, "disabled", void 0);
232
233
  __decorate([
233
234
  property()
234
235
  ], HelixHeadlessOption.prototype, "label", void 0);
235
236
  __decorate([
236
- property()
237
- ], HelixHeadlessOption.prototype, "value", void 0);
237
+ property({ type: Boolean })
238
+ ], HelixHeadlessOption.prototype, "selected", void 0);
238
239
  __decorate([
239
240
  property()
240
- ], HelixHeadlessOption.prototype, "alternate", void 0);
241
- __decorate([
242
- property({ attribute: 'alternate-label' })
243
- ], HelixHeadlessOption.prototype, "alternateLabel", void 0);
241
+ ], HelixHeadlessOption.prototype, "value", void 0);
244
242
  HelixHeadlessOption = __decorate([
245
243
  customElement('helix-headless-option')
246
244
  ], HelixHeadlessOption);
@@ -4,13 +4,11 @@ import { type PropertyValues, type TemplateResult } from 'lit';
4
4
  * @summary Links to the headings on this page, marking the one being read.
5
5
  *
6
6
  * @description
7
- * A table of contents, named for the job. Three of the obvious names are taken
8
- * by things that are not this: `Outline` is a CSS property and the focus ring's
9
- * whole vocabulary, `Contents` is `display: contents` and the `content` part
10
- * half this library renders, and `TableOfContents` would sit beside `Table` and
11
- * `TableColumn` and read as a third part of that family. `Outline` sits beside
12
- * `Navigation`, which is the same job at the other scale: one navigates a site, the
13
- * other navigates a document.
7
+ * A table of contents, named for the job. It sits beside `Navigation`, which is
8
+ * the same job at the other scale: one navigates a site, the other navigates a
9
+ * document. `Contents` and `TableOfContents` are both taken by something else,
10
+ * `display: contents` and the `content` part in one case and the `Table` family
11
+ * in the other.
14
12
  *
15
13
  * **The links are the consumer's own anchors**, the same as `Navigation`. A router
16
14
  * renders its own `<a>` and cannot render one inside this shadow root, and the
@@ -52,18 +50,6 @@ import { type PropertyValues, type TemplateResult } from 'lit';
52
50
  */
53
51
  export declare class HelixHeadlessOutline extends HelixElement {
54
52
  private readonly indicator;
55
- /**
56
- * Accessible name for the navigation.
57
- */
58
- label: string;
59
- /**
60
- * How far below the top of the window a heading counts as reached, in pixels.
61
- *
62
- * The reading line. A page with a sticky masthead sets this to its height, or
63
- * a little more: without it the current section changes as a heading slides
64
- * under the chrome rather than as it reaches the top of what can be seen.
65
- */
66
- offset: number;
67
53
  /**
68
54
  * How a click on one of these links travels to its section.
69
55
  *
@@ -86,6 +72,18 @@ export declare class HelixHeadlessOutline extends HelixElement {
86
72
  * JavaScript rather than CSS decides.
87
73
  */
88
74
  behavior: ScrollBehavior;
75
+ /**
76
+ * Accessible name for the navigation.
77
+ */
78
+ label: string;
79
+ /**
80
+ * How far below the top of the window a heading counts as reached, in pixels.
81
+ *
82
+ * The reading line. A page with a sticky masthead sets this to its height, or
83
+ * a little more: without it the current section changes as a heading slides
84
+ * under the chrome rather than as it reaches the top of what can be seen.
85
+ */
86
+ offset: number;
89
87
  /**
90
88
  * The id of the section being read, or empty before anything is measured.
91
89
  *
@@ -124,16 +122,16 @@ export declare class HelixHeadlessOutline extends HelixElement {
124
122
  * leaves the position a hair under the height at the very bottom and an exact
125
123
  * comparison never fires.
126
124
  *
127
- * **All three numbers off the same element**, which this did not do: it added
128
- * `scrollY` and `innerHeight`, both of the window, and compared them against
129
- * `documentElement.scrollHeight`. Those are one coordinate system only while
130
- * the viewport is what scrolls, and the body takes that job the moment it
131
- * becomes a scroll container. Measured on a page whose body is
125
+ * **All three numbers off the same element.** Adding the window's `scrollY`
126
+ * and `innerHeight` and comparing them against
127
+ * `documentElement.scrollHeight` mixes two coordinate systems, which agree
128
+ * only while the viewport is what scrolls, and the body takes that job the
129
+ * moment it becomes a scroll container. Measured on a page whose body is
132
130
  * `overflow: clip visible`, which is a pair CSS resolves by making the
133
131
  * `visible` axis `auto`: `documentElement.scrollTop` read 1126 at the bottom
134
132
  * of the page and `window.scrollY` read 240, so a contents rail never learned
135
- * it had reached the end and its last item stayed unreachable. That page is
136
- * this library's own base layer.
133
+ * it had reached the end and its last item stayed unreachable. This library's
134
+ * own base layer produces exactly that page.
137
135
  *
138
136
  * `clientHeight` rather than `innerHeight` for the same reason, and because it
139
137
  * is the one that excludes a scrollbar, which is what `scrollHeight` is
@@ -150,9 +148,6 @@ export declare class HelixHeadlessOutline extends HelixElement {
150
148
  * The two things an `IntersectionObserver` cannot see, and one listener for
151
149
  * both.
152
150
  *
153
- * This component's own note said the observer keeps the marker honest without
154
- * a scroll listener. It was wrong twice.
155
- *
156
151
  * *At the bottom*, arriving at the end of a page changes no intersection: a
157
152
  * short last section is fully visible long before the final pixel, so its
158
153
  * ratio reached 1 and stopped moving. Nothing fires for the scroll that ends
@@ -167,27 +162,25 @@ export declare class HelixHeadlessOutline extends HelixElement {
167
162
  * heading has not crossed yet, and no callback follows for the rest of the
168
163
  * way.
169
164
  *
170
- * There was a listener already, added for the first of those, and it compared
171
- * two numbers and marked only when the answer *changed*. That was too clever
172
- * by half: it fixed the bottom and could not fix the settle. Marking once per
173
- * animation frame while a scroll is happening covers both and every other case
174
- * of the same shape, and the cost is what `mark()` costs, a `getBoundingClientRect`
175
- * per section on frames a reader is already scrolling through. Passive, and
176
- * coalesced to one call per frame however many events arrive.
165
+ * Marking once per animation frame while a scroll is happening covers both,
166
+ * where a listener that marks only when its own comparison changes fixes the
167
+ * bottom and cannot fix the settle. The cost is what `mark()` costs, a
168
+ * `getBoundingClientRect` per section on frames a reader is already scrolling
169
+ * through. Passive, and coalesced to one call per frame however many events
170
+ * arrive.
177
171
  */
178
172
  private readonly handleScroll;
179
173
  /**
180
174
  * Gives every section the same reading line the marker uses.
181
175
  *
182
- * `offset` described where the top of the readable area is and was read by
183
- * exactly one thing, the marker. Click a link and the browser put the heading
184
- * against the very top of the window, underneath the sticky masthead whose
185
- * height the consumer had just finished measuring for us. So the component
186
- * knew about the chrome when deciding what you were reading and forgot about
187
- * it when taking you somewhere, which is the same number meaning two things.
176
+ * `offset` says where the top of the readable area is, so it has to govern
177
+ * where a click lands as much as what the marker calls current. Read by the
178
+ * marker alone, a click puts the heading against the very top of the window
179
+ * and underneath the sticky masthead the consumer measured the offset from,
180
+ * which is the same number meaning two things.
188
181
  *
189
182
  * `scroll-margin-block-start` rather than an interception, because it is the
190
- * property the platform provides for exactly this and the UA honours it on
183
+ * property the platform provides for exactly this and the UA honors it on
191
184
  * ordinary fragment navigation, on `scrollIntoView`, and on a browser
192
185
  * restoring a position. Nothing has to be taken over to get it.
193
186
  *
@@ -212,7 +205,8 @@ export declare class HelixHeadlessOutline extends HelixElement {
212
205
  * The thresholds are what make the trigger frequent enough: an observer fires
213
206
  * on entering and leaving, and a long section scrolled slowly crosses neither
214
207
  * for a long time. Asking for a callback at each quarter of visibility is
215
- * cheap and keeps the marker honest without a scroll listener.
208
+ * cheap. It is still only a trigger: see `handleScroll` for the two cases no
209
+ * intersection can see.
216
210
  */
217
211
  private watch;
218
212
  /**