@fusion.dev/helix-headless 0.104.1 → 0.106.0

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 (167) hide show
  1. package/custom-elements.json +10386 -3813
  2. package/dist/accordion/item/accordion-item.d.ts +17 -16
  3. package/dist/accordion/root/accordion-root.d.ts +13 -17
  4. package/dist/announcement/root/announcement-root.d.ts +24 -31
  5. package/dist/app-header/root/app-header-root.d.ts +14 -14
  6. package/dist/area-chart/root/area-chart-root.d.ts +29 -48
  7. package/dist/avatar/group/avatar-group.d.ts +6 -8
  8. package/dist/avatar/root/avatar-root.d.ts +11 -11
  9. package/dist/badge/root/badge-root.d.ts +14 -15
  10. package/dist/bar-chart/root/bar-chart-root.d.ts +40 -44
  11. package/dist/blockquote/root/blockquote-root.d.ts +5 -7
  12. package/dist/breadcrumbs/breadcrumb/breadcrumb.d.ts +25 -33
  13. package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +12 -11
  14. package/dist/button/root/button-root.d.ts +16 -17
  15. package/dist/button-group/root/button-group-root.d.ts +9 -10
  16. package/dist/callout/root/callout-root.d.ts +10 -15
  17. package/dist/canvas/edge/canvas-edge.d.ts +21 -21
  18. package/dist/canvas/node/canvas-node.d.ts +43 -45
  19. package/dist/canvas/root/canvas-root.d.ts +100 -99
  20. package/dist/card/root/card-root.d.ts +10 -12
  21. package/dist/carousel/root/carousel-root.d.ts +32 -33
  22. package/dist/chat/composer/chat-composer.d.ts +24 -26
  23. package/dist/chat/message/chat-message.d.ts +30 -33
  24. package/dist/chat/root/chat-root.d.ts +63 -80
  25. package/dist/checkbox/root/checkbox-root.d.ts +30 -32
  26. package/dist/checkbox-group/root/checkbox-group-root.d.ts +25 -25
  27. package/dist/code/root/code-root.d.ts +6 -10
  28. package/dist/code-block/root/code-block-root.d.ts +35 -48
  29. package/dist/color-input/root/color-input-root.d.ts +62 -56
  30. package/dist/color-input/root/color-input-root.js +3 -0
  31. package/dist/color-picker/root/color-picker-root.d.ts +61 -49
  32. package/dist/color-picker/root/color-picker-root.js +4 -0
  33. package/dist/combobox/root/combobox-root.d.ts +52 -53
  34. package/dist/command/root/command-root.d.ts +40 -40
  35. package/dist/command/root/command-root.js +1 -0
  36. package/dist/copy-button/root/copy-button-root.d.ts +24 -26
  37. package/dist/data-table/root/data-table-root.d.ts +106 -107
  38. package/dist/date-input/root/date-input-root.d.ts +54 -53
  39. package/dist/date-picker/root/date-picker-root.d.ts +25 -21
  40. package/dist/description-list/item/description-list-item.d.ts +7 -7
  41. package/dist/description-list/root/description-list-root.d.ts +10 -15
  42. package/dist/dialog/root/dialog-root.d.ts +22 -19
  43. package/dist/divider/root/divider-root.d.ts +12 -13
  44. package/dist/donut-chart/root/donut-chart-root.d.ts +19 -20
  45. package/dist/drawer/root/drawer-root.d.ts +19 -18
  46. package/dist/drilldown/item/drilldown-item.d.ts +28 -28
  47. package/dist/drilldown/root/drilldown-root.d.ts +22 -28
  48. package/dist/element-events.generated.js +19 -1
  49. package/dist/empty/root/empty-root.d.ts +16 -19
  50. package/dist/file-input/root/file-input-root.d.ts +32 -32
  51. package/dist/filter-input/chip/filter-chip.d.ts +36 -39
  52. package/dist/filter-input/field/filter-field.d.ts +25 -31
  53. package/dist/filter-input/menu/filter-menu.d.ts +50 -47
  54. package/dist/filter-input/operator/filter-operator.d.ts +15 -20
  55. package/dist/filter-input/root/filter-input-root.d.ts +80 -98
  56. package/dist/format-date/root/format-date-root.d.ts +19 -27
  57. package/dist/heatmap/root/heatmap-root.d.ts +40 -41
  58. package/dist/icon/root/icon-root.d.ts +21 -23
  59. package/dist/icon-button/root/icon-button-root.d.ts +12 -14
  60. package/dist/image/root/image-root.d.ts +30 -30
  61. package/dist/input/root/input-root.d.ts +36 -35
  62. package/dist/kbd/root/kbd-root.d.ts +13 -15
  63. package/dist/legend/root/legend-root.d.ts +18 -16
  64. package/dist/lightbox/item/lightbox-item.d.ts +13 -15
  65. package/dist/lightbox/root/lightbox-root.d.ts +40 -41
  66. package/dist/line-chart/root/line-chart-root.d.ts +20 -29
  67. package/dist/list/item/list-item.d.ts +17 -22
  68. package/dist/list/root/list-root.d.ts +6 -7
  69. package/dist/listbox/root/listbox-root.d.ts +42 -41
  70. package/dist/loader/root/loader-root.d.ts +16 -20
  71. package/dist/map/area/map-area.d.ts +48 -0
  72. package/dist/map/area/map-area.js +40 -0
  73. package/dist/map/buildings/map-buildings.d.ts +45 -0
  74. package/dist/map/buildings/map-buildings.js +37 -0
  75. package/dist/map/contours/map-contours.d.ts +61 -0
  76. package/dist/map/contours/map-contours.js +54 -0
  77. package/dist/map/index.d.ts +14 -0
  78. package/dist/map/index.js +10 -0
  79. package/dist/map/landcover/map-landcover.d.ts +47 -0
  80. package/dist/map/landcover/map-landcover.js +37 -0
  81. package/dist/map/marker/map-marker.d.ts +120 -0
  82. package/dist/map/marker/map-marker.js +109 -0
  83. package/dist/map/points/map-points.d.ts +139 -0
  84. package/dist/map/points/map-points.js +161 -0
  85. package/dist/map/position/map-position.d.ts +70 -0
  86. package/dist/map/position/map-position.js +89 -0
  87. package/dist/map/raster/map-raster.d.ts +84 -0
  88. package/dist/map/raster/map-raster.js +96 -0
  89. package/dist/map/root/map-root.d.ts +269 -52
  90. package/dist/map/root/map-root.js +473 -5
  91. package/dist/map/route/map-route.d.ts +73 -0
  92. package/dist/map/route/map-route.js +52 -0
  93. package/dist/map/terrain/map-terrain.d.ts +68 -0
  94. package/dist/map/terrain/map-terrain.js +58 -0
  95. package/dist/megamenu/root/megamenu-root.d.ts +27 -25
  96. package/dist/menu/item/menu-item.d.ts +30 -31
  97. package/dist/menu/root/menu-root.d.ts +25 -29
  98. package/dist/meter/root/meter-root.d.ts +22 -21
  99. package/dist/navigation/root/navigation-root.d.ts +13 -16
  100. package/dist/notifications/group/notification-group.d.ts +27 -28
  101. package/dist/notifications/notification/notification.d.ts +35 -42
  102. package/dist/notifications/root/notifications-root.d.ts +22 -24
  103. package/dist/number-input/root/number-input-root.d.ts +46 -50
  104. package/dist/object-inspector/root/object-inspector-root.d.ts +46 -58
  105. package/dist/option/group/option-group.d.ts +11 -11
  106. package/dist/option/root/option-root.d.ts +28 -33
  107. package/dist/outline/root/outline-root.d.ts +18 -17
  108. package/dist/pagination/root/pagination-root.d.ts +37 -39
  109. package/dist/pagination/size/pagination-size.d.ts +37 -43
  110. package/dist/pagination/summary/pagination-summary.d.ts +12 -14
  111. package/dist/pin-input/root/pin-input-root.d.ts +32 -38
  112. package/dist/popover/root/popover-root.d.ts +16 -21
  113. package/dist/progress/root/progress-root.d.ts +16 -14
  114. package/dist/qr-code/root/qr-code-root.d.ts +22 -25
  115. package/dist/quote/root/quote-root.d.ts +5 -6
  116. package/dist/radio/group/radio-group.d.ts +26 -28
  117. package/dist/radio/root/radio-root.d.ts +24 -28
  118. package/dist/rating/root/rating-root.d.ts +27 -30
  119. package/dist/scatter-chart/root/scatter-chart-root.d.ts +43 -55
  120. package/dist/scroll-area/root/scroll-area-root.d.ts +15 -21
  121. package/dist/select/root/select-root.d.ts +41 -44
  122. package/dist/skeleton/root/skeleton-root.d.ts +7 -8
  123. package/dist/skip-link/root/skip-link-root.d.ts +21 -28
  124. package/dist/slider/root/slider-root.d.ts +36 -39
  125. package/dist/sparkline/root/sparkline-root.d.ts +22 -28
  126. package/dist/speed-dial/item/speed-dial-item.d.ts +21 -21
  127. package/dist/speed-dial/root/speed-dial-root.d.ts +25 -27
  128. package/dist/splitter/root/splitter-root.d.ts +37 -41
  129. package/dist/stat/group/stat-group.d.ts +4 -4
  130. package/dist/stat/root/stat-root.d.ts +8 -9
  131. package/dist/steps/root/steps-root.d.ts +11 -14
  132. package/dist/steps/step/step.d.ts +22 -29
  133. package/dist/switch/root/switch-root.d.ts +20 -24
  134. package/dist/table/cell/table-cell.d.ts +18 -8
  135. package/dist/table/cell/table-cell.js +5 -1
  136. package/dist/table/column/table-column.d.ts +62 -55
  137. package/dist/table/root/table-root.d.ts +16 -17
  138. package/dist/table/row/table-row.d.ts +3 -3
  139. package/dist/tabs/panel/tab-panel.d.ts +3 -3
  140. package/dist/tabs/root/tabs-root.d.ts +19 -17
  141. package/dist/tabs/tab/tab.d.ts +6 -6
  142. package/dist/tag/root/tag-root.d.ts +11 -12
  143. package/dist/textarea/root/textarea-root.d.ts +29 -32
  144. package/dist/time-input/root/time-input-root.d.ts +70 -69
  145. package/dist/time-picker/root/time-picker-root.d.ts +58 -66
  146. package/dist/timeline/item/timeline-item.d.ts +18 -24
  147. package/dist/timeline/root/timeline-root.d.ts +13 -21
  148. package/dist/toast/item/toast-item.d.ts +21 -22
  149. package/dist/toast/root/toast-root.d.ts +18 -23
  150. package/dist/toggle/group/toggle-group.d.ts +23 -25
  151. package/dist/toggle/root/toggle-root.d.ts +8 -8
  152. package/dist/toolbar/root/toolbar-root.d.ts +7 -10
  153. package/dist/tooltip/root/tooltip-root.d.ts +41 -47
  154. package/dist/tour/root/tour-root.d.ts +24 -26
  155. package/dist/tour/stop/tour-stop.d.ts +39 -48
  156. package/dist/tree/item/tree-item.d.ts +23 -25
  157. package/dist/tree/root/tree-root.d.ts +13 -12
  158. package/dist/trend/root/trend-root.d.ts +18 -19
  159. package/dist/video/root/video-root.d.ts +108 -101
  160. package/dist/video-playlist/item/video-playlist-item.d.ts +23 -28
  161. package/dist/video-playlist/menu/video-playlist-menu.d.ts +17 -21
  162. package/dist/video-playlist/root/video-playlist-root.d.ts +21 -25
  163. package/dist/virtual-list/root/virtual-list-root.d.ts +27 -26
  164. package/package.json +5 -5
  165. package/types/jsx.d.ts +14011 -11983
  166. package/types/svelte.d.ts +10 -0
  167. package/types/vue.d.ts +2143 -1497
@@ -14,44 +14,32 @@ interface Row {
14
14
  value: unknown;
15
15
  }
16
16
  /**
17
- * @summary A value read as a tree: collapse what you do not need, count what
18
- * you collapsed, copy the part you do.
17
+ * @summary A structured value shown as a tree, where you can close branches,
18
+ * see how many entries each holds, and copy any part.
19
19
  *
20
20
  * @description
21
- * What a developer-facing product shows constantly is a structured value: an
22
- * API response, a config, a row's raw record. As text in a code block, a reader
23
- * scrolls a wall of JSON and cannot put away the branch they do not care about;
24
- * as a Tree, every node is a label and a string reads the same as a number. This
25
- * reads the value and draws each entry with its type visible.
21
+ * Object Inspector shows a structured value, such as an API response, a config,
22
+ * or a raw record, as a read-only tree with each entry's type visible.
26
23
  *
27
- * **It reads and never edits.** An inspector that edits is a different
28
- * component, with validation, undo and a model of what changed, and the reading
29
- * one is what is wanted.
24
+ * Pass the object to `value`, or name a `<script type="application/json">` by
25
+ * id with `for`, the same source `VirtualList` and the charts read. JSON text
26
+ * works with server rendering and with React hydration, which skips object
27
+ * properties. `value` wins when both are set.
30
28
  *
31
- * **The data is text in the page or a property.** `for` names a
32
- * `<script type="application/json">` by id, the channel `VirtualList` and the
33
- * charts already read: it survives a server, which has attributes and no
34
- * children, and React's hydration, which skips object properties. `value` is
35
- * there for a page that already holds the object, and wins when both are set.
29
+ * The tree is one tab stop. Up and Down move between rows, Right opens a branch
30
+ * or moves into it, Left closes it or moves to its parent, and Home and End
31
+ * move to the first and last rows. Focus stays on the tree, and
32
+ * `aria-activedescendant` marks the active row. Each row carries its real
33
+ * level, position, and set size, including in a windowed tree.
36
34
  *
37
- * **One tab stop, and the rows are reached with the arrow keys**, the tree
38
- * pattern: Up and Down move, Right opens a branch or enters it, Left closes it or
39
- * goes to its parent, Home and End go to the ends. The tree keeps focus and
40
- * points at the active row with `aria-activedescendant`, which is what lets a
41
- * windowed tree drop rows from the page without dropping focus with them. Each
42
- * row carries its real level, position and set size, so a reader on a windowed
43
- * row hears where it is in the value rather than in the slice drawn.
35
+ * The copy button copies the active row, a branch as JSON and a string as its
36
+ * text. So do Command+C and Control+C while the tree has focus and no text is
37
+ * selected. The button sits beside the tree, because assistive technology
38
+ * cannot reliably reach a button inside a tree item.
44
39
  *
45
- * **Copying takes the active row**, as JSON for a branch and as itself for a
46
- * string, from the copy button or from Command or Control with C while the tree
47
- * has focus and nothing is selected. The button sits beside the tree rather than in each row, where a
48
- * button would be an interactive control inside a tree item, which assistive
49
- * technology cannot reach reliably.
50
- *
51
- * **`windowed` draws only the rows in view**, for a value of thousands of
52
- * entries, through the same controller `VirtualList` and `DataTable` use. The
53
- * box has to have a height for that to mean anything, which the styled tier
54
- * gives it and a headless consumer has to.
40
+ * `windowed` draws only the rows in view, for values with thousands of entries.
41
+ * The box needs a height for windowing to work. The styled tier sets one, and
42
+ * in the headless tier you set it yourself.
55
43
  *
56
44
  * @since 0.1.0
57
45
  * @status stable
@@ -61,48 +49,48 @@ interface Row {
61
49
  *
62
50
  * @event {HelixCopyEvent} helix-copy - A value was put on the clipboard, from the copy button or the keyboard.
63
51
  *
64
- * @csspart after - The room the rows after the window would take, when windowed.
65
- * @csspart before - The room the rows before the window would take, when windowed.
52
+ * @csspart after - The space the rows below the drawn rows would take, when `windowed` is set.
53
+ * @csspart before - The space the rows above the drawn rows would take, when `windowed` is set.
66
54
  * @csspart boolean - A `true` or `false`.
67
55
  * @csspart copy - The copy button, which copies the active row.
68
- * @csspart copy-button - The inner button.
69
- * @csspart copy-mark - The clipboard glyph, and the confirmation that replaces it.
70
- * @csspart copy-tooltip - The bubble, forwarded from the tooltip inside.
71
- * @csspart copy-tooltip-arrow - The point, resting against the trigger.
72
- * @csspart copy-tooltip-arrow-bottom - The point while the bubble is below the copy button, so on its top edge, beside `copy-tooltip-arrow`.
73
- * @csspart copy-tooltip-arrow-left - The point while the bubble is left of the copy button, so on its right edge, beside `copy-tooltip-arrow`.
74
- * @csspart copy-tooltip-arrow-right - The point while the bubble is right of the copy button, so on its left edge, beside `copy-tooltip-arrow`.
75
- * @csspart copy-tooltip-arrow-top - The point while the bubble is above the copy button, so on its bottom edge, beside `copy-tooltip-arrow`.
76
- * @csspart copy-tooltip-bottom - The bubble while it is below the copy button, beside `copy-tooltip`.
77
- * @csspart copy-tooltip-left - The bubble while it is left of the copy button, beside `copy-tooltip`.
78
- * @csspart copy-tooltip-right - The bubble while it is right of the copy button, beside `copy-tooltip`.
79
- * @csspart copy-tooltip-top - The bubble while it is above the copy button, beside `copy-tooltip`.
80
- * @csspart count - How many entries a branch holds.
56
+ * @csspart copy-button - The button inside the copy control.
57
+ * @csspart copy-mark - The clipboard icon, and the confirmation icon that replaces it.
58
+ * @csspart copy-tooltip - The tooltip, forwarded from the copy button's tooltip.
59
+ * @csspart copy-tooltip-arrow - The tooltip's arrow, pointing at the copy button.
60
+ * @csspart copy-tooltip-arrow-bottom - The arrow while the tooltip is below the copy button, on the tooltip's top edge. Set alongside `copy-tooltip-arrow`.
61
+ * @csspart copy-tooltip-arrow-left - The arrow while the tooltip is left of the copy button, on the tooltip's right edge. Set alongside `copy-tooltip-arrow`.
62
+ * @csspart copy-tooltip-arrow-right - The arrow while the tooltip is right of the copy button, on the tooltip's left edge. Set alongside `copy-tooltip-arrow`.
63
+ * @csspart copy-tooltip-arrow-top - The arrow while the tooltip is above the copy button, on the tooltip's bottom edge. Set alongside `copy-tooltip-arrow`.
64
+ * @csspart copy-tooltip-bottom - The tooltip while it is below the copy button. Set alongside `copy-tooltip`.
65
+ * @csspart copy-tooltip-left - The tooltip while it is left of the copy button. Set alongside `copy-tooltip`.
66
+ * @csspart copy-tooltip-right - The tooltip while it is right of the copy button. Set alongside `copy-tooltip`.
67
+ * @csspart copy-tooltip-top - The tooltip while it is above the copy button. Set alongside `copy-tooltip`.
68
+ * @csspart count - The number of entries a branch holds.
81
69
  * @csspart frame - The tree and the copy button beside it.
82
- * @csspart header - The bar carrying the label, where there is one.
70
+ * @csspart header - The bar that holds the label, when there is one.
83
71
  * @csspart key - A property name or an array index.
84
72
  * @csspart label - The label.
85
73
  * @csspart null - A `null`.
86
74
  * @csspart number - A number.
87
- * @csspart row - One entry, a tree item.
88
- * @csspart row-active - The entry the keyboard is on, beside `row`.
75
+ * @csspart row - One entry, as a tree item.
76
+ * @csspart row-active - The entry the keyboard is on. Set alongside `row`.
89
77
  * @csspart string - A string, in quotes.
90
- * @csspart summary - The brackets standing for a branch's contents.
91
- * @csspart toggle - The caret on a branch: down when open, across when closed.
92
- * @csspart tree - The tree, the one thing focus lands on.
78
+ * @csspart summary - The brackets that stand for a branch's contents.
79
+ * @csspart toggle - The caret on a branch. It points down when the branch is open and sideways when it is closed.
80
+ * @csspart tree - The tree, which is the element that receives focus.
93
81
  *
94
82
  * @cssproperty --object-inspector-level - How deep a row is, from 0 at the root, for indenting it.
95
83
  */
96
84
  export declare class HelixHeadlessObjectInspector extends HelixElement {
97
85
  /**
98
- * What the copy control is called on a row with a key, with the key as
99
- * `{name}`.
86
+ * The copy button's accessible name on a row with a key, with the key filled
87
+ * in as `{name}`.
100
88
  *
101
89
  * **Every word the inspector speaks is a property**, so a page in another
102
90
  * language hears its own rather than English around its own keys.
103
91
  */
104
92
  copyLabel: string;
105
- /** What the copy control is called where there is no key, on the value itself. */
93
+ /** The copy button's accessible name on a row without a key, such as the root. */
106
94
  copyValueLabel: string;
107
95
  /**
108
96
  * How many levels start open.
@@ -126,7 +114,7 @@ export declare class HelixHeadlessObjectInspector extends HelixElement {
126
114
  */
127
115
  label: string;
128
116
  /**
129
- * Whether to leave the copy button off.
117
+ * Hides the copy button.
130
118
  *
131
119
  * Negative for the reason Code Block's is: a boolean attribute defaulting to
132
120
  * true could never be turned off from markup.
@@ -140,7 +128,7 @@ export declare class HelixHeadlessObjectInspector extends HelixElement {
140
128
  */
141
129
  noCopy: boolean;
142
130
  /**
143
- * The value itself, for a page that already holds it.
131
+ * The value to show, when your code already holds it as an object.
144
132
  *
145
133
  * Takes precedence over `for`. Anything JSON can say is drawn; anything else
146
134
  * is shown as its string.
@@ -1,31 +1,31 @@
1
1
  import { HelixElement } from '@fusion.dev/helix-core';
2
2
  import { type PropertyValues, type TemplateResult } from 'lit';
3
3
  /**
4
- * @summary A named run of options inside a listbox.
4
+ * @summary A labeled group of options inside a listbox.
5
5
  *
6
6
  * @description
7
- * A heading over a set, and nothing else: it holds no selection and no value,
8
- * because grouping is presentation over a list whose owner is the listbox. Its
9
- * options are still the listbox's options, which is what keeps the keyboard
10
- * moving through a grouped list exactly as it moves through a flat one.
7
+ * A heading over a set of options. The group holds no selection and no value,
8
+ * because the listbox owns those. Its options are still the listbox's options,
9
+ * so the keyboard moves through a grouped list the same way as a flat one.
11
10
  *
12
- * `role="group"` named by the heading, so a screen reader announces which run
13
- * an option is in without the heading becoming something to land on.
11
+ * The group has `role="group"` and takes its name from the heading, so a screen
12
+ * reader announces which group an option is in, and the heading is not a stop
13
+ * of its own.
14
14
  *
15
15
  * @since 0.1.0
16
16
  * @status stable
17
17
  * @aliases OptGroup, Section
18
18
  * @documentation https://fusion.dev/helix/components/option
19
19
  *
20
- * @slot - The options in this run.
21
- * @slot label - Richer than a string.
20
+ * @slot - The options in the group.
21
+ * @slot label - The group's heading, for a heading that needs more than plain text.
22
22
  *
23
- * @csspart items - The run itself.
23
+ * @csspart items - The element that holds the group's options.
24
24
  * @csspart label - The heading.
25
25
  */
26
26
  export declare class HelixHeadlessOptionGroup extends HelixElement {
27
27
  /**
28
- * The heading over the run.
28
+ * The heading above the group's options.
29
29
  */
30
30
  label: string;
31
31
  protected willUpdate(changed: PropertyValues): void;
@@ -21,24 +21,18 @@ export declare const optionsAmong: (elements: readonly Element[]) => HelixHeadle
21
21
  * @summary One choice in a listbox.
22
22
  *
23
23
  * @description
24
- * **Its own family rather than a part of Select, and the reason is what it
25
- * belongs to.** `role="option"` requires an owning `role="listbox"`, which is
26
- * the ARIA contract: an option cannot stand alone. But a Select is *a listbox
27
- * with a trigger*, a Combobox is *a listbox with a text input*, and a command
28
- * palette is the same listbox again. The thing an option belongs to is the
29
- * listbox, not any one control that happens to contain one.
24
+ * Options are their own family, separate from Select, because an option belongs
25
+ * to a listbox and several controls contain one. `role="option"` requires an
26
+ * owning `role="listbox"`. A Select is a listbox with a trigger, a Combobox is
27
+ * a listbox with a text input, and a command palette is a listbox in a dialog.
28
+ * `Radio` is a part of its group, because a radio has only one kind of owner.
30
29
  *
31
- * That is the difference from `Radio`, which is a part of its group: a radio
32
- * has exactly one kind of owner, and an option has several.
30
+ * Selection works the way it does for a radio. Choosing an option dispatches an
31
+ * event, the listbox decides whether the choice stands, and the listbox sets
32
+ * `selected`.
33
33
  *
34
- * Selection is announced rather than applied, the way a radio's is. The option
35
- * says it was chosen, the listbox decides whether that stands, and the listbox
36
- * writes `selected` back. An option that selected itself would be a second
37
- * answer to which one is chosen.
38
- *
39
- * **Nothing here knows about filtering.** A hidden option is hidden by whatever
40
- * owns it, through `hidden`, because what counts as a match is the listbox's
41
- * question and differs between a select and a command palette.
34
+ * Filtering belongs to the owner, which hides an option with `hidden`. What
35
+ * counts as a match differs between a select and a command palette.
42
36
  *
43
37
  * @since 0.1.0
44
38
  * @status stable
@@ -46,18 +40,18 @@ export declare const optionsAmong: (elements: readonly Element[]) => HelixHeadle
46
40
  * @aliases Item, Choice
47
41
  * @documentation https://fusion.dev/helix/components/option
48
42
  *
49
- * @slot - The words naming this choice.
50
- * @slot end - After them, for a shortcut or a count.
51
- * @slot start - Before the words, for an icon or an avatar.
43
+ * @slot - The option's label.
44
+ * @slot end - Content after the label, such as a shortcut or a count.
45
+ * @slot start - Content before the label, such as an icon or an avatar.
52
46
  *
53
- * @event {HelixSelectEvent} helix-select - Fired when this choice is made. Cancelable: refusing it takes the decision and nothing moves.
47
+ * @event {HelixSelectEvent} helix-select - The option was chosen. Cancelable: canceling it leaves the selection as it was.
54
48
  *
55
- * @csspart description - The caption under the words, when there is one.
49
+ * @csspart description - The description under the label, when there is one.
56
50
  * @csspart item - The row.
57
- * @csspart item-active - The row the keyboard is on, beside `item`.
58
- * @csspart item-selected - The row of a chosen option, beside `item`.
59
- * @csspart label - The words.
60
- * @csspart text - The words and the caption under them, as one column.
51
+ * @csspart item-active - The row the keyboard is on. Set alongside `item`.
52
+ * @csspart item-selected - The row of a selected option. Set alongside `item`.
53
+ * @csspart label - The option's label.
54
+ * @csspart text - The label and the description under it, as one column.
61
55
  *
62
56
  * @cssstate selected - While the option is chosen.
63
57
  */
@@ -69,7 +63,8 @@ export declare class HelixHeadlessOption extends HelixElement {
69
63
  */
70
64
  active: boolean;
71
65
  /**
72
- * A second destination for this row, taken with the modifier held.
66
+ * A second destination for the row, opened when you choose it with the
67
+ * modifier key held.
73
68
  *
74
69
  * **An attribute rather than a second row, which is the whole point.** A
75
70
  * palette that offered every component a reference page and a sandbox as
@@ -86,7 +81,7 @@ export declare class HelixHeadlessOption extends HelixElement {
86
81
  */
87
82
  alternate: string;
88
83
  /**
89
- * What the second destination is, for a reader who cannot see the footer.
84
+ * The name of the second destination, announced to screen reader users.
90
85
  *
91
86
  * A row with two destinations needs both said, or a screen reader is told
92
87
  * about one of them and the other is a key nobody mentioned. It goes to
@@ -96,7 +91,7 @@ export declare class HelixHeadlessOption extends HelixElement {
96
91
  */
97
92
  alternateLabel: string;
98
93
  /**
99
- * Whether the markup declared this one chosen, which is what a reset returns to.
94
+ * Whether the markup declares this option selected. A form reset returns to it.
100
95
  *
101
96
  * `<option selected>` reflects to `defaultSelected` and `option.selected` is
102
97
  * live state that does not reflect, and those are two different facts. This
@@ -125,7 +120,7 @@ export declare class HelixHeadlessOption extends HelixElement {
125
120
  get defaultSelected(): boolean;
126
121
  set defaultSelected(next: boolean);
127
122
  /**
128
- * A second line under the words, for what the choice actually is.
123
+ * A second line under the label that describes the choice.
129
124
  *
130
125
  * A palette row reads better as a name and a caption than as one sentence
131
126
  * carrying both: "Helix" and "the design system" are two facts, and a comma
@@ -147,7 +142,7 @@ export declare class HelixHeadlessOption extends HelixElement {
147
142
  */
148
143
  description?: string;
149
144
  /**
150
- * Whether this choice can be made.
145
+ * Prevents the option from being chosen.
151
146
  */
152
147
  disabled: boolean;
153
148
  /**
@@ -166,11 +161,11 @@ export declare class HelixHeadlessOption extends HelixElement {
166
161
  */
167
162
  selected: boolean;
168
163
  /**
169
- * Identifies this choice, and is what a form submits.
164
+ * The value that identifies the option, and that a form submits.
170
165
  */
171
166
  value: string;
172
167
  /**
173
- * The words, for a listbox that has to match text against them.
168
+ * The option's text, which a listbox matches typed text against.
174
169
  *
175
170
  * Read from the rendered content rather than required as a property, because
176
171
  * the content is where a consumer naturally puts it and asking for both is
@@ -208,7 +203,7 @@ export declare class HelixHeadlessOption extends HelixElement {
208
203
  * it is in every comparison too.
209
204
  */
210
205
  get text(): string;
211
- /** Makes this choice and announces it. */
206
+ /** Sends `helix-select` for this option. Does nothing when it is disabled. */
212
207
  select(): void;
213
208
  /**
214
209
  * Mirrors the chosen state where a stylesheet can select on it.
@@ -1,20 +1,20 @@
1
1
  import { HelixElement } from '@fusion.dev/helix-core';
2
2
  import { type PropertyValues, type TemplateResult } from 'lit';
3
3
  /**
4
- * @summary Links to the headings on this page, marking the one being read.
4
+ * @summary Links to the headings on the page, with the section in view marked.
5
5
  *
6
6
  * @description
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 a document.
7
+ * Outline is a table of contents for a document. `Navigation` does the same job
8
+ * for a site.
9
9
  *
10
- * **The links are the consumer's own anchors.** A router renders its own `<a>`
11
- * and cannot render one inside this shadow root, and the hrefs are fragments
12
- * the page already knows.
10
+ * The links are your own anchors. A router renders its own `<a>` and cannot
11
+ * render one inside the outline's shadow root, and the hrefs are fragments on
12
+ * the same page.
13
13
  *
14
- * **What is current is decided by position, not by intersection.** An
15
- * `IntersectionObserver` with a band near the top fails in both directions:
16
- * with headings far apart nothing is in the band and the marker goes out, and
17
- * with headings close together several are in it at once.
14
+ * The current section is decided by the headings' positions. An
15
+ * `IntersectionObserver` with a band near the top fails both ways: when
16
+ * headings are far apart, none is in the band and no section is marked, and
17
+ * when they are close together, several are in the band at once.
18
18
  *
19
19
  * @since 0.1.0
20
20
  * @status stable
@@ -24,15 +24,15 @@ import { type PropertyValues, type TemplateResult } from 'lit';
24
24
  *
25
25
  * @slot - The links, as anchors with fragment hrefs.
26
26
  *
27
- * @event {HelixActivateEvent} helix-activate - The section being read has changed, carrying its id as the value. An announcement: it is read off where the page is scrolled to, so there is no decision here to take.
27
+ * @event {HelixActivateEvent} helix-activate - Fired when the section in view changes, with its id as the value. It reports the scroll position and cannot be prevented.
28
28
  *
29
- * @csspart indicator - The mark that travels to the section being read.
29
+ * @csspart indicator - The mark that moves to the section in view.
30
30
  * @csspart nav - The navigation landmark.
31
31
  */
32
32
  export declare class HelixHeadlessOutline extends HelixElement {
33
33
  private readonly indicator;
34
34
  /**
35
- * How a click on one of these links travels to its section.
35
+ * How the page scrolls to a section when its link is clicked.
36
36
  *
37
37
  * The platform's own vocabulary, because this is the platform's own option:
38
38
  * `auto` defers to whatever `scroll-behavior` the page has set on its scroll
@@ -54,12 +54,13 @@ export declare class HelixHeadlessOutline extends HelixElement {
54
54
  */
55
55
  behavior: ScrollBehavior;
56
56
  /**
57
- * Accessible name for the navigation.
57
+ * The navigation's name, read by screen readers.
58
58
  */
59
59
  label: string;
60
60
  /**
61
- * How far below the top of what scrolls a heading counts as reached, in
62
- * pixels: the window, or the panel the sections scroll in.
61
+ * How far below the top of the scroll container a heading counts as reached,
62
+ * in pixels. The scroll container is the window or the panel the sections
63
+ * scroll in.
63
64
  *
64
65
  * The reading line. A page with a sticky masthead sets this to its height, or
65
66
  * a little more: without it the current section changes as a heading slides
@@ -67,7 +68,7 @@ export declare class HelixHeadlessOutline extends HelixElement {
67
68
  */
68
69
  offset: number;
69
70
  /**
70
- * The id of the section being read, or empty before anything is measured.
71
+ * The id of the section in view, or empty before anything is measured.
71
72
  *
72
73
  * Read-only, and a getter rather than a property for that reason: it is
73
74
  * derived from where the page is scrolled to, so a consumer setting it would
@@ -1,37 +1,32 @@
1
1
  import { HelixElement } from '@fusion.dev/helix-core';
2
2
  import { type PropertyValues, type TemplateResult } from 'lit';
3
3
  /**
4
- * @summary Moves between pages of a longer result.
4
+ * @summary Controls for moving between the pages of a long set of results.
5
5
  *
6
6
  * @description
7
- * **The component is the truncation.** Given a page and a total it works out
8
- * which numbers to show and where the runs break, so this is data-driven rather
9
- * than composed: `<helix-headless-pagination page="4" pages="12">` rather than
10
- * twelve slotted children a consumer keeps in step with their own query.
7
+ * Set a page and a total, and the component works out which page numbers to
8
+ * show and where the gaps go:
9
+ * `<helix-headless-pagination page="4" pages="12">`. You do not slot a child
10
+ * for each page.
11
11
  *
12
- * **The width does not change as you page.** The run around the current page is
13
- * `siblings` either side, and grows to absorb a gap slot at a boundary, so the
14
- * control holds the same number of slots from the first page to the last.
15
- * Anything that lets the count vary moves the buttons under the pointer between
16
- * one click and the next.
12
+ * The width stays the same as you page. The run around the current page is
13
+ * `siblings` on each side and grows to absorb a gap at either end, so the
14
+ * control shows the same number of slots from the first page to the last, and
15
+ * the buttons do not move under the pointer.
17
16
  *
18
- * **A gap is only drawn where it hides more than one page, and a gap is a
19
- * control.** It goes to the middle of the run it stands over, which is the
20
- * binary-search step: any page in a set of any size is a handful of presses.
17
+ * A gap appears only where it hides more than one page. A gap is a control: it
18
+ * goes to the middle of the pages it hides, so any page is a few presses away.
21
19
  *
22
- * **`href` is what makes these links.** Set it and every page renders an `<a>`
23
- * with `{page}` filled in, so the output is crawlable, a middle click opens a
24
- * tab, and the address bar is the state. Left unset they are buttons, which is
25
- * right for a table paging in place. Either way the click announces
26
- * `helix-navigate` first, and `preventDefault()` stops the navigation as well
27
- * as the change, which is how a router takes over.
20
+ * Set `href` to render every page as an `<a>`, with `{page}` replaced by the
21
+ * page number. The links can be crawled, a middle click opens a tab, and the
22
+ * address bar holds the state. Without `href` the pages are buttons, for a
23
+ * table that pages in place. Either way, a click dispatches `helix-navigate`
24
+ * first. Call `preventDefault()` to stop both the navigation and the page
25
+ * change, for example to hand navigation to a router. There is no
26
+ * `helix-change`, because moving to another page selects nothing.
28
27
  *
29
- * **`helix-navigate` and not `helix-change`.** Moving to page four chooses
30
- * nothing; it moves the view over a result that has not changed.
31
- *
32
- * **The count and the page-size control are their own elements.**
33
- * `Pagination.Summary` and `Pagination.Size` sit beside this one, because a
34
- * slot can only offer one place: at one end of one row, in one order.
28
+ * `Pagination.Summary` and `Pagination.Size` are separate elements that you
29
+ * place beside this one, so you choose where they go and in what order.
35
30
  *
36
31
  * @since 0.1.0
37
32
  * @status stable
@@ -44,22 +39,22 @@ import { type PropertyValues, type TemplateResult } from 'lit';
44
39
  * @slot next-icon - The glyph on the forward-one-page control, usually a caret.
45
40
  * @slot previous-icon - The glyph on the back-one-page control, usually a caret.
46
41
  *
47
- * @event {HelixNavigateEvent} helix-navigate - Fired before the page changes, and cancelable. The only way to refuse one.
42
+ * @event {HelixNavigateEvent} helix-navigate - Fired before the page changes, and cancelable. Canceling it is the only way to stop a page change.
48
43
  *
49
44
  * @csspart first - The control that jumps to the first page, under `ends`.
50
- * @csspart gap - The control standing over pages not shown, which jumps into them.
45
+ * @csspart gap - The control in place of hidden pages, which jumps into them.
51
46
  * @csspart item - One slot in the run, holding a page or a gap.
52
47
  * @csspart last - The control that jumps to the last page, under `ends`.
53
48
  * @csspart list - The run of pages.
54
- * @csspart live - The region that says the page changed. Clipped, not hidden.
55
- * @csspart mark - The glyph on a first, previous, next or last control, where none is slotted.
49
+ * @csspart live - The live region that announces a page change. It is clipped out of view and still read.
50
+ * @csspart mark - The glyph on a first, previous, next, or last control, where none is slotted.
56
51
  * @csspart next - The control that moves forward one page.
57
52
  * @csspart page - The control for one page.
58
53
  * @csspart page-current - The page you are on, beside `page`.
59
54
  * @csspart previous - The control that moves back one page.
60
- * @csspart status - The reading of where you are, in `compact`.
55
+ * @csspart status - The text that says which page you are on, in `compact`.
61
56
  *
62
- * @cssstate empty - While there is one page or none, which is nothing to page through.
57
+ * @cssstate empty - There is one page or none, so there is nothing to page through.
63
58
  */
64
59
  export declare class HelixHeadlessPagination extends HelixElement {
65
60
  /**
@@ -67,7 +62,8 @@ export declare class HelixHeadlessPagination extends HelixElement {
67
62
  */
68
63
  boundaries: number;
69
64
  /**
70
- * Where the numbers are replaced by a reading of the two.
65
+ * Replaces the page numbers with the current page and the page count, as
66
+ * written by `status-label`.
71
67
  *
72
68
  * A different structure rather than a different look, which is why it is
73
69
  * here: the run of pages is gone and a single status line stands in its
@@ -79,11 +75,11 @@ export declare class HelixHeadlessPagination extends HelixElement {
79
75
  */
80
76
  compact: boolean;
81
77
  /**
82
- * Page to open on, where nothing declared one.
78
+ * The page to open on when `page` is not set.
83
79
  */
84
80
  defaultPage: number;
85
81
  /**
86
- * Whether to offer a jump to the first and last pages.
82
+ * Shows controls that jump to the first and last pages.
87
83
  *
88
84
  * Off by default. The gaps already reach any page in a few presses and the
89
85
  * last page is one of the two the run always shows, so on a short set these
@@ -102,11 +98,11 @@ export declare class HelixHeadlessPagination extends HelixElement {
102
98
  */
103
99
  firstLabel: string;
104
100
  /**
105
- * Accessible name for a gap, with `{page}` filled in as where it goes.
101
+ * Accessible name for a gap. `{page}` is replaced with the page it jumps to.
106
102
  */
107
103
  gapLabel: string;
108
104
  /**
109
- * Address for a page, with `{page}` standing in for its number.
105
+ * The URL for each page. `{page}` is replaced with the page number.
110
106
  *
111
107
  * Absent renders buttons. Present renders links, which is what a paged result
112
108
  * with its own URL should be: a crawler follows them, a middle click opens
@@ -140,7 +136,7 @@ export declare class HelixHeadlessPagination extends HelixElement {
140
136
  */
141
137
  nextLabel: string;
142
138
  /**
143
- * The page on show, one-based.
139
+ * The current page, counting from one.
144
140
  *
145
141
  * An accessor pair, the same shape as the calendar's `month`. Reading gives
146
142
  * the page on show; writing sets it, and `default-page` seeds one the element
@@ -158,7 +154,8 @@ export declare class HelixHeadlessPagination extends HelixElement {
158
154
  get page(): number;
159
155
  set page(next: number);
160
156
  /**
161
- * Accessible name for one page, with `{page}` and `{pages}` filled in.
157
+ * Accessible name for one page. `{page}` and `{pages}` are replaced with the
158
+ * page number and the page count.
162
159
  */
163
160
  pageLabel: string;
164
161
  /**
@@ -190,7 +187,8 @@ export declare class HelixHeadlessPagination extends HelixElement {
190
187
  */
191
188
  siblings: number;
192
189
  /**
193
- * The reading shown in `compact`, with `{page}` and `{pages}` filled in.
190
+ * The text shown in `compact`. `{page}` and `{pages}` are replaced with the
191
+ * current page and the page count.
194
192
  *
195
193
  * No noun: the landmark this sits in is already named "Pagination", so
196
194
  * "Page 7 of 24" says it twice to a screen reader and takes a third of the