@fusion.dev/helix-headless 0.105.0 → 0.107.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 (162) hide show
  1. package/custom-elements.json +7324 -3890
  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 +52 -56
  30. package/dist/color-picker/root/color-picker-root.d.ts +49 -49
  31. package/dist/combobox/root/combobox-root.d.ts +52 -53
  32. package/dist/command/root/command-root.d.ts +35 -40
  33. package/dist/copy-button/root/copy-button-root.d.ts +24 -26
  34. package/dist/data-table/root/data-table-root.d.ts +106 -107
  35. package/dist/date-input/root/date-input-root.d.ts +54 -53
  36. package/dist/date-picker/root/date-picker-root.d.ts +25 -21
  37. package/dist/description-list/item/description-list-item.d.ts +7 -7
  38. package/dist/description-list/root/description-list-root.d.ts +10 -15
  39. package/dist/dialog/root/dialog-root.d.ts +22 -19
  40. package/dist/divider/root/divider-root.d.ts +12 -13
  41. package/dist/donut-chart/root/donut-chart-root.d.ts +19 -20
  42. package/dist/drawer/root/drawer-root.d.ts +19 -18
  43. package/dist/drilldown/item/drilldown-item.d.ts +28 -28
  44. package/dist/drilldown/root/drilldown-root.d.ts +22 -28
  45. package/dist/element-events.generated.js +7 -0
  46. package/dist/empty/root/empty-root.d.ts +16 -19
  47. package/dist/file-input/root/file-input-root.d.ts +32 -32
  48. package/dist/filter-input/chip/filter-chip.d.ts +36 -39
  49. package/dist/filter-input/field/filter-field.d.ts +25 -31
  50. package/dist/filter-input/menu/filter-menu.d.ts +50 -47
  51. package/dist/filter-input/operator/filter-operator.d.ts +15 -20
  52. package/dist/filter-input/root/filter-input-root.d.ts +80 -98
  53. package/dist/format-date/root/format-date-root.d.ts +19 -27
  54. package/dist/heatmap/root/heatmap-root.d.ts +40 -41
  55. package/dist/icon/root/icon-root.d.ts +21 -23
  56. package/dist/icon-button/root/icon-button-root.d.ts +12 -14
  57. package/dist/image/root/image-root.d.ts +30 -30
  58. package/dist/input/root/input-root.d.ts +36 -35
  59. package/dist/kbd/root/kbd-root.d.ts +13 -15
  60. package/dist/legend/root/legend-root.d.ts +18 -16
  61. package/dist/lightbox/item/lightbox-item.d.ts +13 -15
  62. package/dist/lightbox/root/lightbox-root.d.ts +40 -41
  63. package/dist/line-chart/root/line-chart-root.d.ts +20 -29
  64. package/dist/list/item/list-item.d.ts +17 -22
  65. package/dist/list/root/list-root.d.ts +6 -7
  66. package/dist/listbox/root/listbox-root.d.ts +42 -41
  67. package/dist/loader/root/loader-root.d.ts +16 -20
  68. package/dist/map/area/map-area.d.ts +6 -0
  69. package/dist/map/area/map-area.js +3 -0
  70. package/dist/map/buildings/map-buildings.d.ts +45 -0
  71. package/dist/map/buildings/map-buildings.js +37 -0
  72. package/dist/map/contours/map-contours.d.ts +61 -0
  73. package/dist/map/contours/map-contours.js +54 -0
  74. package/dist/map/index.d.ts +7 -0
  75. package/dist/map/index.js +5 -0
  76. package/dist/map/landcover/map-landcover.d.ts +47 -0
  77. package/dist/map/landcover/map-landcover.js +37 -0
  78. package/dist/map/marker/map-marker.d.ts +11 -4
  79. package/dist/map/marker/map-marker.js +13 -1
  80. package/dist/map/points/map-points.d.ts +7 -1
  81. package/dist/map/points/map-points.js +3 -0
  82. package/dist/map/raster/map-raster.d.ts +84 -0
  83. package/dist/map/raster/map-raster.js +96 -0
  84. package/dist/map/root/map-root.d.ts +169 -7
  85. package/dist/map/root/map-root.js +352 -4
  86. package/dist/map/route/map-route.d.ts +6 -0
  87. package/dist/map/route/map-route.js +3 -0
  88. package/dist/map/terrain/map-terrain.d.ts +68 -0
  89. package/dist/map/terrain/map-terrain.js +58 -0
  90. package/dist/megamenu/root/megamenu-root.d.ts +27 -25
  91. package/dist/menu/item/menu-item.d.ts +30 -31
  92. package/dist/menu/root/menu-root.d.ts +25 -29
  93. package/dist/meter/root/meter-root.d.ts +22 -21
  94. package/dist/navigation/root/navigation-root.d.ts +13 -16
  95. package/dist/notifications/group/notification-group.d.ts +27 -28
  96. package/dist/notifications/notification/notification.d.ts +35 -42
  97. package/dist/notifications/root/notifications-root.d.ts +22 -24
  98. package/dist/number-input/root/number-input-root.d.ts +46 -50
  99. package/dist/object-inspector/root/object-inspector-root.d.ts +46 -58
  100. package/dist/option/group/option-group.d.ts +11 -11
  101. package/dist/option/root/option-root.d.ts +28 -33
  102. package/dist/outline/root/outline-root.d.ts +18 -17
  103. package/dist/pagination/root/pagination-root.d.ts +37 -39
  104. package/dist/pagination/size/pagination-size.d.ts +37 -43
  105. package/dist/pagination/summary/pagination-summary.d.ts +12 -14
  106. package/dist/pin-input/root/pin-input-root.d.ts +32 -38
  107. package/dist/popover/root/popover-root.d.ts +16 -21
  108. package/dist/progress/root/progress-root.d.ts +16 -14
  109. package/dist/qr-code/root/qr-code-root.d.ts +22 -25
  110. package/dist/quote/root/quote-root.d.ts +5 -6
  111. package/dist/radio/group/radio-group.d.ts +26 -28
  112. package/dist/radio/root/radio-root.d.ts +24 -28
  113. package/dist/rating/root/rating-root.d.ts +27 -30
  114. package/dist/scatter-chart/root/scatter-chart-root.d.ts +43 -55
  115. package/dist/scroll-area/root/scroll-area-root.d.ts +15 -21
  116. package/dist/select/root/select-root.d.ts +41 -44
  117. package/dist/skeleton/root/skeleton-root.d.ts +7 -8
  118. package/dist/skip-link/root/skip-link-root.d.ts +21 -28
  119. package/dist/slider/root/slider-root.d.ts +36 -39
  120. package/dist/sparkline/root/sparkline-root.d.ts +22 -28
  121. package/dist/speed-dial/item/speed-dial-item.d.ts +21 -21
  122. package/dist/speed-dial/root/speed-dial-root.d.ts +25 -27
  123. package/dist/splitter/root/splitter-root.d.ts +37 -41
  124. package/dist/stat/group/stat-group.d.ts +4 -4
  125. package/dist/stat/root/stat-root.d.ts +8 -9
  126. package/dist/steps/root/steps-root.d.ts +11 -14
  127. package/dist/steps/step/step.d.ts +22 -29
  128. package/dist/switch/root/switch-root.d.ts +20 -24
  129. package/dist/table/cell/table-cell.d.ts +18 -8
  130. package/dist/table/cell/table-cell.js +5 -1
  131. package/dist/table/column/table-column.d.ts +62 -55
  132. package/dist/table/root/table-root.d.ts +16 -17
  133. package/dist/table/row/table-row.d.ts +3 -3
  134. package/dist/tabs/panel/tab-panel.d.ts +3 -3
  135. package/dist/tabs/root/tabs-root.d.ts +19 -17
  136. package/dist/tabs/tab/tab.d.ts +6 -6
  137. package/dist/tag/root/tag-root.d.ts +11 -12
  138. package/dist/textarea/root/textarea-root.d.ts +29 -32
  139. package/dist/time-input/root/time-input-root.d.ts +70 -69
  140. package/dist/time-picker/root/time-picker-root.d.ts +58 -66
  141. package/dist/timeline/item/timeline-item.d.ts +18 -24
  142. package/dist/timeline/root/timeline-root.d.ts +13 -21
  143. package/dist/toast/item/toast-item.d.ts +21 -22
  144. package/dist/toast/root/toast-root.d.ts +18 -23
  145. package/dist/toggle/group/toggle-group.d.ts +23 -25
  146. package/dist/toggle/root/toggle-root.d.ts +8 -8
  147. package/dist/toolbar/root/toolbar-root.d.ts +7 -10
  148. package/dist/tooltip/root/tooltip-root.d.ts +41 -47
  149. package/dist/tour/root/tour-root.d.ts +24 -26
  150. package/dist/tour/stop/tour-stop.d.ts +39 -48
  151. package/dist/tree/item/tree-item.d.ts +23 -25
  152. package/dist/tree/root/tree-root.d.ts +13 -12
  153. package/dist/trend/root/trend-root.d.ts +18 -19
  154. package/dist/video/root/video-root.d.ts +108 -101
  155. package/dist/video-playlist/item/video-playlist-item.d.ts +23 -28
  156. package/dist/video-playlist/menu/video-playlist-menu.d.ts +17 -21
  157. package/dist/video-playlist/root/video-playlist-root.d.ts +21 -25
  158. package/dist/virtual-list/root/virtual-list-root.d.ts +27 -26
  159. package/package.json +5 -5
  160. package/types/jsx.d.ts +10363 -9520
  161. package/types/svelte.d.ts +5 -0
  162. package/types/vue.d.ts +1440 -1032
@@ -4,15 +4,12 @@ import { type PropertyValues, type TemplateResult } from 'lit';
4
4
  * @summary A group of controls that share one tab stop.
5
5
  *
6
6
  * @description
7
- * Separate from a button group, and the difference is what it holds: a group is
8
- * homogeneous, a toolbar is not. A toolbar mixes buttons, toggles, and menus,
9
- * which is why it is its own component rather than a variant of something.
7
+ * A toolbar holds a mix of controls, such as buttons, toggles, and menus. A
8
+ * button group holds one kind, so the two are separate components.
10
9
  *
11
- * The whole toolbar is one tab stop and the arrows move between controls, so a
12
- * page with three toolbars costs three presses of Tab to get past rather than
13
- * thirty. Controls are found by asking the browser what is focusable rather
14
- * than by matching tag names, so a toolbar works with anything put in it,
15
- * including a consumer's own elements.
10
+ * The toolbar is one tab stop, and the arrow keys move between its controls, so
11
+ * three toolbars take three presses of Tab to pass. Any element the browser can
12
+ * focus counts as a control, including your own elements.
16
13
  *
17
14
  * @since 0.1.0
18
15
  * @status stable
@@ -26,11 +23,11 @@ import { type PropertyValues, type TemplateResult } from 'lit';
26
23
  */
27
24
  export declare class HelixHeadlessToolbar extends HelixElement {
28
25
  /**
29
- * Accessible name for the toolbar.
26
+ * The toolbar's name, read by screen readers.
30
27
  */
31
28
  label: string;
32
29
  /**
33
- * Which way the arrow keys move.
30
+ * The direction the arrow keys move focus in.
34
31
  */
35
32
  orientation?: 'horizontal' | 'vertical';
36
33
  private watcher;
@@ -2,40 +2,32 @@ import { HelixElement, type Placement } from '@fusion.dev/helix-core';
2
2
  import { type PropertyValues, type TemplateResult } from 'lit';
3
3
  declare const HelixHeadlessTooltip_base: (new (...args: any[]) => import("@fusion.dev/helix-core").MixinControllerOpenInterface) & typeof HelixElement;
4
4
  /**
5
- * @summary A short description that appears beside what it describes.
5
+ * @summary A short text that appears next to an element on hover and focus.
6
6
  *
7
7
  * @description
8
- * The trigger is slotted and stays the consumer's own element. The bubble is
9
- * rendered here, in the top layer through the popover API, so it clears any
10
- * ancestor with `overflow: hidden` without a `z-index` anywhere. Position comes
11
- * from `FloatingController`, which flips to another side when the preferred one
12
- * does not fit.
8
+ * The trigger is slotted and stays your own element. The bubble renders in the
9
+ * top layer through the popover API, so an ancestor with `overflow: hidden`
10
+ * does not clip it and no `z-index` is needed. `FloatingController` positions
11
+ * it and flips it to another side when the preferred side does not fit.
13
12
  *
14
- * **Two forms, and they are not equivalent for a screen reader.** Wrapping is
15
- * the convenience form and is right where the bubble decorates a control that
16
- * already says what it is: nothing here can describe a slotted trigger, an
17
- * IDREF being unable to cross a shadow boundary.
13
+ * Wrapping the trigger is the convenient form. Use it where the trigger already
14
+ * has an accessible name, because the tooltip cannot describe a slotted
15
+ * trigger: an IDREF cannot cross a shadow boundary.
18
16
  *
19
- * `for` is the form that works. The tooltip sits *beside* the trigger in the
20
- * consumer's own tree and names it by id, so an IDREF between them is legal in
21
- * the ordinary way:
17
+ * To add a description, place the tooltip beside the trigger and name the
18
+ * trigger with `for`:
22
19
  *
23
20
  * ```html
24
21
  * <helix-headless-button id="save" aria-describedby="save-tip">Save</helix-headless-button>
25
22
  * <helix-headless-tooltip id="save-tip" for="save" content="Save your work"></helix-headless-tooltip>
26
23
  * ```
27
24
  *
28
- * The reference points at *this host*, not at the bubble in its shadow root:
29
- * the description is computed from the flat tree, which descends into shadow
30
- * content on its own.
25
+ * Write the `aria-describedby` yourself, pointing at the tooltip host. Setting
26
+ * it at runtime causes a hydration mismatch that React does not fix. With
27
+ * `for`, the tooltip warns once on first open if the attribute is missing.
31
28
  *
32
- * **The consumer writes that `aria-describedby`, and nothing here writes it for
33
- * them.** Setting it at runtime is a hydration mismatch React will not patch
34
- * up. `for` audits itself on first open and warns once where it is missing.
35
- *
36
- * It shows on hover and on focus, and hides on leave, on blur, on Escape, and
37
- * once the trigger has been activated: the hint is spent when the control has
38
- * been used.
29
+ * The tooltip shows on hover and on focus. It hides on pointer leave, on blur,
30
+ * on Escape, and when the trigger is activated.
39
31
  *
40
32
  * @since 0.1.0
41
33
  * @status stable
@@ -43,24 +35,24 @@ declare const HelixHeadlessTooltip_base: (new (...args: any[]) => import("@fusio
43
35
  * @aliases Hint, Popup label
44
36
  * @documentation https://fusion.dev/helix/components/tooltip
45
37
  *
46
- * @slot - The trigger.
47
- * @slot content - The bubble's content, when `content` is not enough. Anything
48
- * slotted here replaces the property, which is this slot's fallback.
38
+ * @slot - The trigger: the element the tooltip describes.
39
+ * @slot content - Rich content for the bubble. It replaces the `content`
40
+ * property.
49
41
  *
50
- * @event {HelixBeforeCloseEvent} helix-before-close - Fired before it hides, and cancelable.
51
- * @event {HelixBeforeOpenEvent} helix-before-open - Fired before the bubble shows, and cancelable.
52
- * @event {Event} toggle - Says the state moved, carrying `newState` and `oldState`.
42
+ * @event {HelixBeforeCloseEvent} helix-before-close - The bubble is about to hide. Cancelable: cancel it to keep it shown.
43
+ * @event {HelixBeforeOpenEvent} helix-before-open - The bubble is about to show. Cancelable: cancel it to keep it hidden.
44
+ * @event {Event} toggle - The bubble opened or closed. The event carries `newState` and `oldState`.
53
45
  *
54
- * @csspart arrow - The point, resting against the trigger.
55
- * @csspart arrow-bottom - The point while the bubble is below its trigger, so on the bubble's top edge, beside `arrow`.
56
- * @csspart arrow-left - The point while the bubble is left of its trigger, so on the bubble's right edge, beside `arrow`.
57
- * @csspart arrow-right - The point while the bubble is right of its trigger, so on the bubble's left edge, beside `arrow`.
58
- * @csspart arrow-top - The point while the bubble is above its trigger, so on the bubble's bottom edge, beside `arrow`.
46
+ * @csspart arrow - The arrow that points at the trigger.
47
+ * @csspart arrow-bottom - Added to `arrow` while the bubble is below its trigger, with the arrow on the bubble's top edge.
48
+ * @csspart arrow-left - Added to `arrow` while the bubble is left of its trigger, with the arrow on the bubble's right edge.
49
+ * @csspart arrow-right - Added to `arrow` while the bubble is right of its trigger, with the arrow on the bubble's left edge.
50
+ * @csspart arrow-top - Added to `arrow` while the bubble is above its trigger, with the arrow on the bubble's bottom edge.
59
51
  * @csspart tooltip - The bubble.
60
- * @csspart tooltip-bottom - The bubble while it is below its trigger, beside `tooltip`.
61
- * @csspart tooltip-left - The bubble while it is left of its trigger, beside `tooltip`.
62
- * @csspart tooltip-right - The bubble while it is right of its trigger, beside `tooltip`.
63
- * @csspart tooltip-top - The bubble while it is above its trigger, beside `tooltip`.
52
+ * @csspart tooltip-bottom - Added to `tooltip` while the bubble is below its trigger.
53
+ * @csspart tooltip-left - Added to `tooltip` while the bubble is left of its trigger.
54
+ * @csspart tooltip-right - Added to `tooltip` while the bubble is right of its trigger.
55
+ * @csspart tooltip-top - Added to `tooltip` while the bubble is above its trigger.
64
56
  *
65
57
  * @cssstate open - While the tooltip shows.
66
58
  * @cssstate placed-bottom - While the bubble sits below its trigger.
@@ -90,11 +82,12 @@ export declare class HelixHeadlessTooltip extends HelixHeadlessTooltip_base {
90
82
  */
91
83
  delayOut: number;
92
84
  /**
93
- * Whether the tooltip never shows.
85
+ * Stops the tooltip from showing.
94
86
  */
95
87
  disabled: boolean;
96
88
  /**
97
- * The id of the element this describes, in this tooltip's own tree.
89
+ * The id of the element the tooltip describes, in the same document or shadow
90
+ * root as the tooltip.
98
91
  *
99
92
  * Set it and the tooltip stops wrapping: it renders no trigger, listens on
100
93
  * the element it names, and points its bubble there. Leave it unset and the
@@ -114,7 +107,7 @@ export declare class HelixHeadlessTooltip extends HelixHeadlessTooltip_base {
114
107
  */
115
108
  for: string;
116
109
  /**
117
- * Space between the trigger and the point of the bubble, in pixels.
110
+ * The space between the trigger and the tip of the bubble, in pixels.
118
111
  *
119
112
  * **Measured from the point, which is what the arrow being back changed.**
120
113
  * The arrow is drawn half outside the bubble, so a gap measured to the
@@ -126,7 +119,8 @@ export declare class HelixHeadlessTooltip extends HelixHeadlessTooltip_base {
126
119
  */
127
120
  offset: number;
128
121
  /**
129
- * Whether the bubble survives the trigger being used.
122
+ * Keeps the bubble open when the trigger is used, such as a copy button whose
123
+ * tooltip changes to "Copied".
130
124
  *
131
125
  * **Activation takes a tooltip down, because a hint about what a control will
132
126
  * do is spent once the control has done it.** That is right for a gear that
@@ -143,13 +137,13 @@ export declare class HelixHeadlessTooltip extends HelixHeadlessTooltip_base {
143
137
  */
144
138
  persist: boolean;
145
139
  /**
146
- * Preferred side.
140
+ * The side to show the bubble on.
147
141
  *
148
142
  * It moves if that side does not fit.
149
143
  */
150
144
  placement: Placement;
151
145
  /**
152
- * The id of a box to keep the bubble inside, instead of the viewport.
146
+ * The id of a box to keep the bubble inside. Defaults to the viewport.
153
147
  *
154
148
  * Resolved the way `for` is, so an id in the same tree, which is what lets a
155
149
  * component name a box in its own shadow root. A chart does: its bubble is
@@ -190,7 +184,7 @@ export declare class HelixHeadlessTooltip extends HelixHeadlessTooltip_base {
190
184
  */
191
185
  private get trigger();
192
186
  /**
193
- * Places the bubble again, for an anchor that moved without the page moving.
187
+ * Positions the bubble again, for a trigger that moved while the page did not.
194
188
  *
195
189
  * Public because a chart needs it. Its mark walks from reading to reading
196
190
  * while the page holds still, and `autoUpdate` watches scrolling, resizing
@@ -245,10 +239,10 @@ export declare class HelixHeadlessTooltip extends HelixHeadlessTooltip_base {
245
239
  * a framework does, would leave the trigger describing nothing.
246
240
  */
247
241
  private readonly handleContentChange;
248
- /** Shows the bubble, unless there is nothing to show. */
242
+ /** Shows the bubble, if it has content. */
249
243
  show(): void;
250
244
  /**
251
- * Closes the bubble, and cancels a show that had not happened yet.
245
+ * Hides the bubble, and cancels a pending show.
252
246
  *
253
247
  * The timer matters as much as the state: a pointer that arrives and leaves
254
248
  * inside the delay left one queued, and the tooltip appeared over whatever
@@ -2,22 +2,20 @@ import { HelixElement } from '@fusion.dev/helix-core';
2
2
  import { type PropertyValues, type TemplateResult } from 'lit';
3
3
  import type { HelixHeadlessTourStop } from '../stop/tour-stop.js';
4
4
  /**
5
- * @summary A guided run through an interface, one stop at a time.
5
+ * @summary A guided tour of an interface, one stop at a time.
6
6
  *
7
7
  * @description
8
- * The root owns the order and nothing else. Which stop is current, what Next
9
- * and Back mean, when the run is finished; the stops own where they point, and
10
- * the consumer owns every word.
8
+ * The root holds the order of the stops: which stop is current, what Next and
9
+ * Back do, and when the tour is finished. Each stop holds its target, and you
10
+ * write all the text.
11
11
  *
12
- * **The spotlight is a shadow, not a hole.** The scrim is a box the size of the
13
- * current target with an enormous spread on its `box-shadow`, so the darkness
14
- * is what the shadow paints. A `clip-path` on a full-screen scrim needs the
15
- * viewport in the same coordinate space as the cut, which stops being true the
16
- * moment anything between them is transformed.
12
+ * **The spotlight is a shadow.** The scrim is a box the size of the current
13
+ * target with a very large `box-shadow` spread, and the shadow paints the
14
+ * darkness. A `clip-path` on a full-screen scrim breaks as soon as an element
15
+ * between the scrim and the viewport is transformed.
17
16
  *
18
- * **It measures, and the target is an element elsewhere on the page whose
19
- * position nothing can know statically.** Nothing is measured on the server and
20
- * nothing needs to be: a tour starts when a reader asks for it.
17
+ * The root measures the target's position in the browser. Nothing is measured
18
+ * on the server, because a tour starts only on request.
21
19
  *
22
20
  * @since 0.1.0
23
21
  * @status stable
@@ -25,23 +23,23 @@ import type { HelixHeadlessTourStop } from '../stop/tour-stop.js';
25
23
  * @aliases Coachmark, Product tour, Walkthrough, Onboarding
26
24
  * @documentation https://fusion.dev/helix/components/tour
27
25
  *
28
- * @slot - The stops, in the order they should be visited.
26
+ * @slot - The stops, in the order they are shown.
29
27
  *
30
- * @event {HelixBeforeActivateEvent} helix-before-activate - Fired before the current stop moves, carrying the new index. Cancelable: refusing it takes the decision and nothing moves.
31
- * @event {HelixBeforeCloseEvent} helix-before-close - Fired before the reader leaves early. Cancelable: refusing it takes the decision and nothing moves.
28
+ * @event {HelixBeforeActivateEvent} helix-before-activate - Fired before the current stop changes, with the new index. Cancelable: call `preventDefault()` to stay on the current stop.
29
+ * @event {HelixBeforeCloseEvent} helix-before-close - Fired before the user ends the tour early. Cancelable: call `preventDefault()` to keep the tour open.
32
30
  * @event {HelixCompleteEvent} helix-complete - Fired when the last stop is
33
31
  * finished.
34
- * @event {HelixTourAskEvent} helix-tour-ask - A stop's own controls asking the tour to move, dispatched by the stop and heard here because the tour is what moves.
32
+ * @event {HelixTourAskEvent} helix-tour-ask - Fired when a stop's control is pressed to move the tour. The stop sends it, and the tour handles it.
35
33
  *
36
- * @csspart spotlight - The box over the current target, which paints the scrim.
34
+ * @csspart spotlight - The box over the current target. It also draws the dimmed area around the target.
37
35
  */
38
36
  export declare class HelixHeadlessTour extends HelixElement {
39
37
  /**
40
- * Label for the control that goes back, handed to every stop.
38
+ * Label for the control that goes back, passed to every stop.
41
39
  */
42
40
  backLabel: string;
43
41
  /**
44
- * Stop to start on, where nothing declared one.
42
+ * The stop to start on, when nothing else sets one.
45
43
  */
46
44
  defaultIndex: number;
47
45
  /**
@@ -51,7 +49,7 @@ export declare class HelixHeadlessTour extends HelixElement {
51
49
  /** The stop being shown, whoever set it, and `undefined` until somebody has. */
52
50
  private indexState;
53
51
  /**
54
- * Which stop the reader is on.
52
+ * The index of the stop being shown.
55
53
  *
56
54
  * **Moved through `requestChange`, never by assignment from `move`.** That
57
55
  * announces first and applies only if nobody refused, and refusing is how a
@@ -65,7 +63,7 @@ export declare class HelixHeadlessTour extends HelixElement {
65
63
  get index(): number;
66
64
  set index(next: number);
67
65
  /**
68
- * Accessible name for the run, such as "Getting started".
66
+ * The tour's name, read by screen readers, such as "Getting started".
69
67
  */
70
68
  label: string;
71
69
  /**
@@ -81,7 +79,7 @@ export declare class HelixHeadlessTour extends HelixElement {
81
79
  */
82
80
  skipLabel: string;
83
81
  /**
84
- * Space left around the target when it is lit, in pixels.
82
+ * The space around the target inside the spotlight, in pixels.
85
83
  */
86
84
  spotlightPadding: number;
87
85
  private assigned;
@@ -98,16 +96,16 @@ export declare class HelixHeadlessTour extends HelixElement {
98
96
  private sizer;
99
97
  /** What `sizer` is watching, so a render that changed nothing re-observes nothing. */
100
98
  private sized;
101
- /** The stops, in the order they were written. */
99
+ /** The stops, in source order. */
102
100
  get stops(): HelixHeadlessTourStop[];
103
101
  /** How many stops there are. */
104
102
  get length(): number;
105
- /** Goes on, and finishes the run on the last stop. */
103
+ /** Goes to the next stop, and finishes the tour on the last stop. */
106
104
  next(): void;
107
- /** Goes back, and does nothing on the first stop. */
105
+ /** Goes to the previous stop. It does nothing on the first stop. */
108
106
  back(): void;
109
107
  /**
110
- * Leaves the run early, which is a close rather than a completion.
108
+ * Ends the tour early, as a close. `helix-complete` is not fired.
111
109
  *
112
110
  * Announced before it is applied, and cancelable because of it: writing
113
111
  * `open` first and dispatching after leaves a consumer calling
@@ -2,67 +2,58 @@ import { HelixElement, type Placement } from '@fusion.dev/helix-core';
2
2
  import type { PropertyValues, TemplateResult } from 'lit';
3
3
  import '../../button/index.js';
4
4
  /**
5
- * @summary One stop on a tour: what it points at, and a panel to say it in.
5
+ * @summary One stop on a tour: the element it points at, and a panel of content about it.
6
6
  *
7
7
  * @description
8
- * A stop names a target with `for` and holds whatever the consumer puts in it.
9
- * It owns no content of its own, which is the whole shape of this family: the
10
- * tour abstracts the three things that are genuinely hard, and the words are
11
- * the consumer's.
8
+ * A stop names its target with `for` and holds the content you put in it. The
9
+ * stop handles three things:
12
10
  *
13
- * What it does own:
11
+ * - **Placement.** The panel is anchored to the target by the same floating
12
+ * positioning as the other Helix overlays.
13
+ * - **Stacking.** The panel is a popover, so it is in the top layer and shows
14
+ * above dialogs, scrolling regions, and other stacking contexts.
15
+ * - **Visibility.** The stop shows when it is `current`, which the root sets.
14
16
  *
15
- * - **Where the panel goes.** Anchored to the target through the same floating
16
- * pass every other overlay here uses.
17
- * - **That it is on top.** A popover, so it is in the top layer. A tour points
18
- * at things inside dialogs, inside scrollers, inside anything with a stacking
19
- * context, and a panel in the ordinary flow loses to all three.
20
- * - **When it shows.** Which is `current`, and which the root decides.
17
+ * Put any content in the stop, such as a `Card`, or a heading and a line of
18
+ * text. There are no fixed title or body parts.
21
19
  *
22
- * What it does not own is the heading, the paragraph, the picture and the
23
- * layout. Slot a `Card`, or a heading and a line of prose, or anything else.
24
- * Fixed `title` and `body` parts would be a component deciding what a tour is
25
- * allowed to say.
20
+ * **The buttons are slot fallback.** With nothing in the `actions` slot, you
21
+ * get Back, Next, and Skip, already wired. Slot your own `actions` and drive
22
+ * them with `next()`, `back()`, and `skip()` on the root.
26
23
  *
27
- * **The buttons are slot fallback, so the common case costs nothing and the
28
- * uncommon one is possible.** Write nothing and get Back, Next and Skip already
29
- * wired. Slot `actions` and they are yours, driven by `next()`, `back()` and
30
- * `skip()` on the root, which are public for exactly that.
31
- *
32
- * **`for` is an id, the same as `Tooltip`'s.** The target is elsewhere on the
33
- * page, and an id is the one reference a consumer can write in markup without
34
- * holding an element. Resolved against the root node, so a stop inside a shadow
35
- * tree points at a target in that tree.
24
+ * **`for` is an id, as with `Tooltip`**, so you can point at a target elsewhere
25
+ * on the page from markup. It resolves against the stop's root node, so a stop
26
+ * inside a shadow tree points at a target in that tree.
36
27
  *
37
28
  * @since 0.1.0
38
29
  * @status stable
39
30
  * @category overlays
40
31
  * @documentation https://fusion.dev/helix/components/tour
41
32
  *
42
- * @slot - What this stop says. A card, a heading and a line, anything.
43
- * @slot actions - Replaces the controls, which are Back, Next and Skip.
33
+ * @slot - The stop's content. Any content works, such as a card, or a heading and a line.
34
+ * @slot actions - Replaces the controls, which are Back, Next, and Skip.
44
35
  *
45
- * @event {HelixTourAskEvent} helix-tour-ask - A stop asking the tour to move, from its own controls.
36
+ * @event {HelixTourAskEvent} helix-tour-ask - Fired when one of the stop's controls is pressed, to move the tour.
46
37
  *
47
38
  * @csspart actions - The row the controls sit in.
48
- * @csspart arrow - The point, which the floating pass places against the target.
49
- * @csspart arrow-bottom - The point while the panel is below its target, so on the panel's top edge, beside `arrow`.
50
- * @csspart arrow-left - The point while the panel is left of its target, so on the panel's right edge, beside `arrow`.
51
- * @csspart arrow-right - The point while the panel is right of its target, so on the panel's left edge, beside `arrow`.
52
- * @csspart arrow-top - The point while the panel is above its target, so on the panel's bottom edge, beside `arrow`.
39
+ * @csspart arrow - The arrow that points at the target.
40
+ * @csspart arrow-bottom - The arrow while the panel is below its target, on the panel's top edge. Applied with `arrow`.
41
+ * @csspart arrow-left - The arrow while the panel is left of its target, on the panel's right edge. Applied with `arrow`.
42
+ * @csspart arrow-right - The arrow while the panel is right of its target, on the panel's left edge. Applied with `arrow`.
43
+ * @csspart arrow-top - The arrow while the panel is above its target, on the panel's bottom edge. Applied with `arrow`.
53
44
  * @csspart back - The control that goes to the previous stop.
54
- * @csspart back-button - The inner control.
45
+ * @csspart back-button - The button inside `back`.
55
46
  * @csspart bubble - The panel that points at the target.
56
47
  * @csspart content - The region holding the slotted content.
57
- * @csspart next - The control that goes on, and finishes on the last stop.
58
- * @csspart next-button - The inner control.
59
- * @csspart skip - The control that leaves the tour.
60
- * @csspart skip-button - The inner control.
48
+ * @csspart next - The control that goes to the next stop, and finishes the tour on the last stop.
49
+ * @csspart next-button - The button inside `next`.
50
+ * @csspart skip - The control that ends the tour early.
51
+ * @csspart skip-button - The button inside `skip`.
61
52
  *
62
- * @cssstate placed-bottom - While the panel sits below its target.
63
- * @cssstate placed-left - While the panel sits to the left of its target.
64
- * @cssstate placed-right - While the panel sits to the right of its target.
65
- * @cssstate placed-top - While the panel sits above its target.
53
+ * @cssstate placed-bottom - The panel sits below its target.
54
+ * @cssstate placed-left - The panel sits to the left of its target.
55
+ * @cssstate placed-right - The panel sits to the right of its target.
56
+ * @cssstate placed-top - The panel sits above its target.
66
57
  */
67
58
  export declare class HelixHeadlessTourStop extends HelixElement {
68
59
  /**
@@ -70,7 +61,7 @@ export declare class HelixHeadlessTourStop extends HelixElement {
70
61
  */
71
62
  backLabel: string;
72
63
  /**
73
- * Whether this is the stop the reader is on.
64
+ * Whether the stop is the one being shown.
74
65
  *
75
66
  * Written by the root rather than by a consumer, which is the one place this
76
67
  * family writes onto markup it does not own. It is acceptable here for a
@@ -84,15 +75,15 @@ export declare class HelixHeadlessTourStop extends HelixElement {
84
75
  */
85
76
  doneLabel: string;
86
77
  /**
87
- * Whether this is the first stop, so there is nowhere back to.
78
+ * Whether the stop is the first one, with no stop before it.
88
79
  */
89
80
  first: boolean;
90
81
  /**
91
- * The id of the element this stop is about.
82
+ * The id of the element the stop points at.
92
83
  */
93
84
  for: string;
94
85
  /**
95
- * Whether this is the last stop, so the control says Done.
86
+ * Whether the stop is the last one. Its next control then shows `doneLabel`.
96
87
  */
97
88
  last: boolean;
98
89
  /**
@@ -100,7 +91,7 @@ export declare class HelixHeadlessTourStop extends HelixElement {
100
91
  */
101
92
  nextLabel: string;
102
93
  /**
103
- * Which side of the target the panel prefers.
94
+ * The side of the target the panel is placed on when there is room.
104
95
  */
105
96
  placement: Placement;
106
97
  /**
@@ -113,7 +104,7 @@ export declare class HelixHeadlessTourStop extends HelixElement {
113
104
  * makes.
114
105
  */
115
106
  private side?;
116
- /** The element this stop is about, or null where the id resolves to nothing. */
107
+ /** The element the stop points at, or `null` when no element has the `for` id. */
117
108
  get target(): HTMLElement | null;
118
109
  private readonly floating;
119
110
  protected willUpdate(changed: PropertyValues): void;
@@ -5,23 +5,19 @@ declare const HelixHeadlessTreeItem_base: (new (...args: any[]) => import("@fusi
5
5
  * @summary One node in a tree.
6
6
  *
7
7
  * @description
8
- * **`open`, on `MixinControllerOpen`, rather than a bare boolean of its own.**
9
- * A branch showing its children is the same state a disclosure holds. A
10
- * hand-written toggle announces nothing, so a consumer could neither know a
11
- * branch opened nor own the state. `aria-expanded` is still what the row
12
- * renders: the property differs, not the semantics.
8
+ * `open` comes from `MixinControllerOpen`, the same state a disclosure holds,
9
+ * so you can respond to a branch opening and control the state yourself. The
10
+ * row renders `aria-expanded`.
13
11
  *
14
- * An element rather than a slot, because it owns state: whether it is open,
15
- * selected, and whether it holds focus.
12
+ * Each item is an element because it holds state: whether it is open, selected,
13
+ * and focused.
16
14
  *
17
- * A branch is any item with something slotted into `children`, detected on the
18
- * client because the server cannot inspect children. The server renders the
19
- * node as a leaf and the twisty appears on hydration, which is the harmless
20
- * direction.
15
+ * An item is a branch when something is slotted into `children`. This is
16
+ * detected on the client, so server-rendered markup shows a leaf and the twisty
17
+ * appears on hydration.
21
18
  *
22
- * **`href` makes the row itself the link.** With the anchor slotted into the
23
- * name instead, everything outside the words is dead: no Enter, no middle
24
- * click, no status bar. Given an `href` the row *is* an `<a>`.
19
+ * **`href` makes the whole row a link**, rendered as an `<a>`. Enter, middle
20
+ * click, and the status bar then work anywhere on the row.
25
21
  *
26
22
  * @since 0.1.0
27
23
  * @status stable
@@ -30,13 +26,13 @@ declare const HelixHeadlessTreeItem_base: (new (...args: any[]) => import("@fusi
30
26
  *
31
27
  * @slot - The item's label.
32
28
  * @slot children - Nested items, which make this a branch.
33
- * @slot end - After the label, at the row's far side. A count, or a state.
34
- * @slot start - Before the label, after the chevron. A mark about the item.
29
+ * @slot end - Content after the label, at the far side of the row, such as a count or a state.
30
+ * @slot start - Content before the label and after the chevron, such as a mark for the item.
35
31
  *
36
32
  * @event {HelixBeforeCloseEvent} helix-before-close - Fired before a branch closes, and cancelable.
37
33
  * @event {HelixBeforeOpenEvent} helix-before-open - Fired before a branch opens, and cancelable.
38
- * @event {HelixSelectEvent} helix-select - Fired when the item is chosen. Cancelable: refusing it takes the decision and nothing moves.
39
- * @event {Event} toggle - Says the state moved, carrying `newState` and `oldState`.
34
+ * @event {HelixSelectEvent} helix-select - Fired when the item is chosen, and cancelable. Canceling it changes nothing.
35
+ * @event {Event} toggle - Sent when the branch opens or closes, with `newState` and `oldState`.
40
36
  *
41
37
  * @csspart group - The container for nested items.
42
38
  * @csspart item - The node, and the focus target unless `href` moves it to the row.
@@ -51,7 +47,7 @@ declare const HelixHeadlessTreeItem_base: (new (...args: any[]) => import("@fusi
51
47
  */
52
48
  export declare class HelixHeadlessTreeItem extends HelixHeadlessTreeItem_base {
53
49
  /**
54
- * Where this node goes, which makes its row a real link.
50
+ * The URL this node links to. Setting it makes the row a link.
55
51
  *
56
52
  * Unset by default, and unreflected: a tree of choosable nodes is not a tree
57
53
  * of links, and an empty `href` written onto every row would be a link to the
@@ -59,7 +55,8 @@ export declare class HelixHeadlessTreeItem extends HelixHeadlessTreeItem_base {
59
55
  */
60
56
  href: string;
61
57
  /**
62
- * Depth from the root, counted by the tree so indentation needs no CSS nesting.
58
+ * The node's depth from the root. The tree counts it, so indentation needs no
59
+ * nested CSS.
63
60
  *
64
61
  * **Read rather than written, and no attribute at all.** The tree counts the
65
62
  * items a row sits inside and assigns this on every sync, so a value declared
@@ -79,7 +76,8 @@ export declare class HelixHeadlessTreeItem extends HelixHeadlessTreeItem_base {
79
76
  */
80
77
  level?: number;
81
78
  /**
82
- * What the link declares about where it goes.
79
+ * The link's `rel` value, which describes how the linked page relates to this
80
+ * one.
83
81
  *
84
82
  * Set by the consumer rather than derived from `target`: `noreferrer` is a
85
83
  * decision about their own analytics and a component should not make it for
@@ -100,11 +98,11 @@ export declare class HelixHeadlessTreeItem extends HelixHeadlessTreeItem_base {
100
98
  */
101
99
  selected: boolean;
102
100
  /**
103
- * Where the link opens, for the rare row that leaves the site.
101
+ * Where the link opens. Use it for a row that leaves the site.
104
102
  */
105
103
  target: string;
106
104
  /**
107
- * Identifies the item to the consumer, carried in `helix-select`.
105
+ * Identifies the item to your code. It is sent in `helix-select`.
108
106
  */
109
107
  value: string;
110
108
  /**
@@ -137,10 +135,10 @@ export declare class HelixHeadlessTreeItem extends HelixHeadlessTreeItem_base {
137
135
  * row rather than the wrapper around it.
138
136
  */
139
137
  focusItem(): void;
140
- /** Selects this node and announces it. */
138
+ /** Selects this node and sends `helix-select`. */
141
139
  select(): void;
142
140
  /**
143
- * Chooses this node the way a reader does, from a press or from Enter.
141
+ * Chooses this node, as a press or Enter does.
144
142
  *
145
143
  * Selecting and following are two things and this is where they meet, so the
146
144
  * pointer and the keyboard take one path to the same end. The tree calls this