@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
@@ -3,29 +3,28 @@ import { nothing, type PropertyValues, type TemplateResult } from 'lit';
3
3
  import '../../tooltip/index.js';
4
4
  declare const HelixHeadlessHeatmap_base: typeof HelixElement & (new (...args: any[]) => import("@fusion.dev/helix-core").MixinChartSourceInterface);
5
5
  /**
6
- * @summary A strip of cells colored by how each one went: uptime, contributions, activity.
6
+ * @summary A strip of cells, each colored by its reading, for uptime, contributions, or activity.
7
7
  *
8
8
  * @description
9
- * **One family covers both readings.** `rows="1"` is a status strip, `rows="7"`
10
- * is a contribution graph, and a cell that takes a tone covers both: GitHub's
11
- * contribution graph is five discrete levels rather than a gradient.
9
+ * A grid of cells, each colored by a tone. `rows="1"` makes a status strip, and
10
+ * `rows="7"` makes a contribution graph. GitHub's contribution graph uses five
11
+ * discrete levels, which a set of tones covers.
12
12
  *
13
- * **What it cannot be is a bar chart with flat values**, and the data model is
14
- * what closes that: chart color is per *series* everywhere else here, so ninety
15
- * differently colored cells would be ninety series.
13
+ * Color in a heatmap is per cell. In every other Helix chart, color is per
14
+ * series, so ninety differently colored cells would need ninety series.
16
15
  *
17
- * **The data is a real `<table>` named by `for`**, the convention every chart
18
- * in this library uses, and it is the accessible representation. Hide it with
19
- * `data-hidden-visually` and the reading is still there.
16
+ * **The data is a real `<table>` named by `for`**, as in every Helix chart, and
17
+ * the table is the accessible representation. Hide it with
18
+ * `data-hidden-visually`, and screen readers still read it.
20
19
  *
21
20
  * A cell takes its tone from its own `data-tone`, or from `thresholds` and
22
- * `tones` bucketing its value. The cell's own wins, so a page that already
23
- * knows a day was degraded does not encode that as a number to be decoded.
21
+ * `tones` applied to its value. `data-tone` wins, so when you already know a
22
+ * day was degraded, you can set the tone directly.
24
23
  *
25
- * **A tone is a name this tier never resolves.** `tone="success"` writes
26
- * `--heatmap-tone: var(--heatmap-tone-success)` and stops, so what a name is
27
- * worth is the answering tier's to say. Reaching for `var(--helix-color-*)`
28
- * here is the dependency the tiers exist to prevent.
24
+ * **The headless tier does not resolve tone names.** A tone named `success`
25
+ * writes `--heatmap-tone: var(--heatmap-tone-success)`, and the styled tier or
26
+ * your own stylesheet defines that property. The headless tier does not use
27
+ * `var(--helix-color-*)`.
29
28
  *
30
29
  * @since 0.1.0
31
30
  * @status stable
@@ -35,12 +34,12 @@ declare const HelixHeadlessHeatmap_base: typeof HelixElement & (new (...args: an
35
34
  *
36
35
  * @slot end - Below the strip, at the trailing edge: usually the newest date.
37
36
  * @slot start - Below the strip, at the leading edge: usually the oldest date.
38
- * @slot summary - Below the strip, in the middle: the reading over the range drawn.
37
+ * @slot summary - Below the strip, in the middle: a summary of the range shown.
39
38
  *
40
- * @event {HelixResizeEvent} helix-resize - Fired when the number of cells drawn changes, carrying that number.
39
+ * @event {HelixResizeEvent} helix-resize - Fired when the number of cells drawn changes, with the new number.
41
40
  *
42
41
  * @csspart cell - One reading.
43
- * @csspart empty - Shown when the table has no readings in it, and not before the table can be read at all: on a server, and while hydrating what one sent, there is no document to resolve `for` in and nothing is known yet.
42
+ * @csspart empty - Shown when the table has no readings. It stays hidden until the table can be read: on the server and during hydration, there is no document to resolve `for` in.
44
43
  * @csspart end - The trailing slot's box.
45
44
  * @csspart footer - The three-slot row under the strip.
46
45
  * @csspart mark - The invisible point the tooltip is anchored to.
@@ -50,33 +49,33 @@ declare const HelixHeadlessHeatmap_base: typeof HelixElement & (new (...args: an
50
49
  * @csspart tooltip - The bubble, forwarded from `Tooltip`.
51
50
  * @csspart tooltip-anchor - The `Tooltip` element itself.
52
51
  * @csspart tooltip-arrow - The bubble's point, forwarded from `Tooltip`.
53
- * @csspart tooltip-arrow-bottom - The point while the bubble is below the reading, so on its top edge, beside `tooltip-arrow`.
54
- * @csspart tooltip-arrow-left - The point while the bubble is left of the reading, so on its right edge, beside `tooltip-arrow`.
55
- * @csspart tooltip-arrow-right - The point while the bubble is right of the reading, so on its left edge, beside `tooltip-arrow`.
56
- * @csspart tooltip-arrow-top - The point while the bubble is above the reading, so on its bottom edge, beside `tooltip-arrow`.
57
- * @csspart tooltip-bottom - The bubble while it is below the reading, beside `tooltip`.
52
+ * @csspart tooltip-arrow-bottom - The point while the bubble is below the reading, on its top edge. Set alongside `tooltip-arrow`.
53
+ * @csspart tooltip-arrow-left - The point while the bubble is left of the reading, on its right edge. Set alongside `tooltip-arrow`.
54
+ * @csspart tooltip-arrow-right - The point while the bubble is right of the reading, on its left edge. Set alongside `tooltip-arrow`.
55
+ * @csspart tooltip-arrow-top - The point while the bubble is above the reading, on its bottom edge. Set alongside `tooltip-arrow`.
56
+ * @csspart tooltip-bottom - The bubble while it is below the reading. Set alongside `tooltip`.
58
57
  * @csspart tooltip-cell - One column's name and value inside the tooltip.
59
58
  * @csspart tooltip-label - The reading's own name inside the tooltip.
60
- * @csspart tooltip-left - The bubble while it is left of the reading, beside `tooltip`.
59
+ * @csspart tooltip-left - The bubble while it is left of the reading. Set alongside `tooltip`.
61
60
  * @csspart tooltip-name - A column's name inside the tooltip.
62
- * @csspart tooltip-right - The bubble while it is right of the reading, beside `tooltip`.
63
- * @csspart tooltip-top - The bubble while it is above the reading, beside `tooltip`.
61
+ * @csspart tooltip-right - The bubble while it is right of the reading. Set alongside `tooltip`.
62
+ * @csspart tooltip-top - The bubble while it is above the reading. Set alongside `tooltip`.
64
63
  * @csspart tooltip-value - A column's value inside the tooltip.
65
64
  *
66
- * @cssproperty --heatmap-rows - How many rows the strip lays out. Written by the component from the data, read by the tier that draws it.
67
- * @cssproperty --heatmap-tone - The tone of the cell this is set on. Written by the component, read by the sheet that paints.
68
- * @cssproperty --heatmap-tone-1 - The quietest step of the magnitude ramp, reached by `tones="1 …"`.
65
+ * @cssproperty --heatmap-rows - How many rows the strip lays out. The component writes it from the data, and the stylesheet that draws the strip reads it.
66
+ * @cssproperty --heatmap-tone - The tone of the cell it is set on. The component writes it, and the stylesheet that paints the cell reads it.
67
+ * @cssproperty --heatmap-tone-1 - The weakest step of the magnitude ramp, used by `tones="1 …"`.
69
68
  * @cssproperty --heatmap-tone-2 - The second step of the magnitude ramp.
70
69
  * @cssproperty --heatmap-tone-3 - The third step of the magnitude ramp.
71
70
  * @cssproperty --heatmap-tone-4 - The fourth step of the magnitude ramp.
72
- * @cssproperty --heatmap-tone-5 - The loudest step of the magnitude ramp.
73
- * @cssproperty --heatmap-tone-accent - What `accent` is worth.
74
- * @cssproperty --heatmap-tone-danger - What `danger` is worth.
75
- * @cssproperty --heatmap-tone-info - What `info` is worth.
76
- * @cssproperty --heatmap-tone-muted - What `muted` is worth: the quiet ground, for a bucket that means nothing happened.
77
- * @cssproperty --heatmap-tone-primary - What `primary` is worth.
78
- * @cssproperty --heatmap-tone-success - What `success` is worth, as a name or a `data-tone`.
79
- * @cssproperty --heatmap-tone-warning - What `warning` is worth.
71
+ * @cssproperty --heatmap-tone-5 - The strongest step of the magnitude ramp.
72
+ * @cssproperty --heatmap-tone-accent - The color of the `accent` tone.
73
+ * @cssproperty --heatmap-tone-danger - The color of the `danger` tone.
74
+ * @cssproperty --heatmap-tone-info - The color of the `info` tone.
75
+ * @cssproperty --heatmap-tone-muted - The color of the `muted` tone: a quiet background, for a bucket that means nothing happened.
76
+ * @cssproperty --heatmap-tone-primary - The color of the `primary` tone.
77
+ * @cssproperty --heatmap-tone-success - The color of the `success` tone, named in `tones` or in `data-tone`.
78
+ * @cssproperty --heatmap-tone-warning - The color of the `warning` tone.
80
79
  */
81
80
  export declare class HelixHeadlessHeatmap extends HelixHeadlessHeatmap_base {
82
81
  /**
@@ -87,8 +86,8 @@ export declare class HelixHeadlessHeatmap extends HelixHeadlessHeatmap_base {
87
86
  */
88
87
  emptyText: string;
89
88
  /**
90
- * Space between cells, in CSS pixels, for the same reason `min-cell` is a
91
- * number.
89
+ * Space between cells, in CSS pixels. It is a number for the same reason
90
+ * `min-cell` is.
92
91
  */
93
92
  gap: number;
94
93
  /**
@@ -132,7 +131,7 @@ export declare class HelixHeadlessHeatmap extends HelixHeadlessHeatmap_base {
132
131
  */
133
132
  thresholds: string;
134
133
  /**
135
- * Tone per bucket, in the same order as `thresholds`.
134
+ * The tone for each bucket, in the same order as `thresholds`.
136
135
  *
137
136
  * A name, resolved as `--heatmap-tone-<name>` by whichever tier answers.
138
137
  * **`"1"` through `"5"` are a ramp and everything else is a category**, which
@@ -2,31 +2,27 @@ import { HelixElement } from '@fusion.dev/helix-core';
2
2
  import { type HelixIcon } from '@fusion.dev/helix-icons';
3
3
  import { nothing, type TemplateResult } from 'lit';
4
4
  /**
5
- * @summary Renders a named icon from the Helix set.
5
+ * @summary A named icon from the Helix set.
6
6
  *
7
7
  * @description
8
- * The set is Phosphor, drawn on a 256 box at stroke-width 16, and each glyph is
9
- * rendered as its own inner markup rather than as a single path. Most icons are
10
- * several elements at once, each with its own stroke and fill, so a one-path
11
- * model would draw a fraction of the set and quietly drop the rest.
8
+ * The icons are Phosphor, drawn on a 256 box at stroke-width 16. Each glyph
9
+ * renders its full inner markup, because most icons are several elements, each
10
+ * with its own stroke and fill.
12
11
  *
13
- * **The markup is trusted by construction.** It is generated at build time from
14
- * SVG files in this repository, never from anything a user supplies, which is
15
- * what makes `unsafeSVG` the right tool rather than a risk.
12
+ * The markup is generated at build time from SVG files in this repository and
13
+ * never comes from user input, so rendering it with `unsafeSVG` is safe.
16
14
  *
17
- * The `<svg>` carries `fill="currentColor"` because the generator keeps only
18
- * the inner markup and discards the source's own root tag, and that tag is
19
- * where Phosphor puts its fill. Without it, every solid glyph in the set, 65 of
20
- * them, falls back to the SVG default of black and disappears on a dark page.
21
- * Shapes that set their own `fill` or `stroke` are unaffected, which is why the
22
- * outline icons looked fine and hid this.
15
+ * The `<svg>` carries `fill="currentColor"`. The generator keeps only the inner
16
+ * markup, and Phosphor sets its fill on the root tag that the generator
17
+ * discards. Without it, the 65 solid glyphs fall back to black and disappear on
18
+ * a dark background. Shapes that set their own `fill` or `stroke` are
19
+ * unaffected.
23
20
  *
24
- * A name with no match renders nothing at all instead of an empty box, so a
25
- * typo cannot leave a hole in a layout that looks deliberate.
21
+ * A name with no match renders nothing.
26
22
  *
27
- * An icon is decorative by default and hidden from assistive technology. Give
28
- * it a `label` only when the icon is the sole carrier of meaning, such as
29
- * inside a button with no text.
23
+ * An icon is decorative by default and hidden from assistive technology. Set
24
+ * `label` only when the icon is the only carrier of meaning, such as in a
25
+ * button with no text.
30
26
  *
31
27
  * @since 0.1.0
32
28
  * @status stable
@@ -38,7 +34,7 @@ import { nothing, type TemplateResult } from 'lit';
38
34
  */
39
35
  export declare class HelixHeadlessIcon extends HelixElement {
40
36
  /**
41
- * The icon itself, for a consumer who imported one.
37
+ * The icon to draw, as an object you import.
42
38
  *
43
39
  * **The scalable door, and the one this library uses internally.** An icon is
44
40
  * data, `{ content, name, viewBox }`, so a value imported by name ships one
@@ -53,11 +49,13 @@ export declare class HelixHeadlessIcon extends HelixElement {
53
49
  */
54
50
  icon?: HelixIcon;
55
51
  /**
56
- * Accessible name, for an icon that is not decorative.
52
+ * The icon's name, read by screen readers. Set it for an icon that is not
53
+ * decorative.
57
54
  */
58
55
  label: string;
59
56
  /**
60
- * Turns the glyph round on a right-to-left page, for an arrow meaning forward or back.
57
+ * Flips the glyph on a right-to-left page. Use it for an arrow that means
58
+ * forward or back.
61
59
  *
62
60
  * Asked for rather than inferred from the name. The names are physical, and
63
61
  * `arrow-left` drawn pointing right on an Arabic page would be the icon
@@ -65,7 +63,7 @@ export declare class HelixHeadlessIcon extends HelixElement {
65
63
  */
66
64
  mirror: boolean;
67
65
  /**
68
- * Name of the icon in the Helix set.
66
+ * The name of the icon in the Helix set.
69
67
  *
70
68
  * **A lookup, and the reason both this and `icon` exist.** A name is a string,
71
69
  * so it is what markup can carry, and resolving one means an index of the
@@ -1,23 +1,21 @@
1
1
  import { HelixHeadlessButton } from '../../button/root/button-root.js';
2
2
  /**
3
- * @summary A button whose content is an icon, and which must be named.
3
+ * @summary A button whose content is an icon, named by its `label`.
4
4
  *
5
5
  * @description
6
- * Everything a button does, with one thing added and it is the reason this is
7
- * an element rather than a note on `Button`: **an icon-only control has no
8
- * accessible name unless it is given one.** A button whose content is a glyph
9
- * announces as "button" and nothing else, which is the single most common way a
10
- * toolbar becomes unusable without sight. `label` is not optional in practice,
11
- * and having a component that says so is what makes it reviewable.
6
+ * A button with an icon for its content. Always set `label`: an icon-only
7
+ * control has no accessible name unless you give it one, and a button whose
8
+ * content is a glyph is announced as "button" and nothing else. A separate
9
+ * component with a `label` makes the name something a review can check.
12
10
  *
13
- * **Registered, so it can be rendered and not only subclassed.** Anything in
14
- * this tier needing an icon button, such as an announcement's dismiss control,
15
- * renders `helix-headless-icon-button` rather than reaching into the styled tier
16
- * for a tag that would never upgrade.
11
+ * The element is registered, so other headless components can render
12
+ * `helix-headless-icon-button`, for example as an announcement's dismiss
13
+ * control. They do not depend on a styled tag, which would never upgrade in
14
+ * this tier.
17
15
  *
18
- * Top-level rather than `Button.Icon`, because a namespace means composition
19
- * and an icon-only button is not part of a button. It is a button with
20
- * different content and a different shape, which makes it its own component.
16
+ * Icon Button is a top-level component. A namespace such as `Button.Icon` would
17
+ * mean a part of a button, and an icon-only button is a complete button with
18
+ * different content and a different shape.
21
19
  *
22
20
  * @since 0.1.0
23
21
  * @status stable
@@ -1,18 +1,16 @@
1
1
  import { HelixElement } from '@fusion.dev/helix-core';
2
2
  import { type PropertyValues, type TemplateResult } from 'lit';
3
3
  /**
4
- * @summary A picture that says whether it arrived.
4
+ * @summary An image that shows a placeholder while it loads and a fallback if it fails.
5
5
  *
6
6
  * @description
7
- * **An element rather than a recipe, because of the part CSS cannot do.**
8
- * Reserving the box is `aspect-ratio` and needs nothing from anybody. What
9
- * cannot be written as a rule is *when the picture arrived*: a stylesheet has
10
- * no way to know, and no way to hear that it never will. So this owns three
11
- * states and the two events that move between them, and leaves the box to the
12
- * stylesheet.
7
+ * Image handles the part CSS cannot: when the picture has loaded, or that it
8
+ * failed. `aspect-ratio` in your stylesheet reserves the box. The element
9
+ * tracks three states and relays the two events that move between them, and
10
+ * leaves the box to the stylesheet.
13
11
  *
14
- * **The placeholder is a slot with nothing in it by default.** A default of
15
- * `Skeleton` would make this tier depend on a component it does not ship.
12
+ * The `placeholder` slot is empty by default, so the headless tier does not
13
+ * depend on `Skeleton`, which it does not ship.
16
14
  *
17
15
  * @since 0.1.0
18
16
  * @status stable
@@ -20,31 +18,31 @@ import { type PropertyValues, type TemplateResult } from 'lit';
20
18
  * @aliases Picture, Img, Figure
21
19
  * @documentation https://fusion.dev/helix/components/image
22
20
  *
23
- * @slot fallback - Shown instead of it, if it never does.
24
- * @slot placeholder - Shown until the picture arrives.
21
+ * @slot fallback - Shown in place of the image if it fails to load.
22
+ * @slot placeholder - Shown until the image loads.
25
23
  *
26
- * @event {Event} error - Relayed for the same reason.
27
- * @event {Event} load - Relayed, because the platform's own does not escape.
24
+ * @event {Event} error - The image failed to load. Relayed from the inner image, whose own event stays inside the shadow root.
25
+ * @event {Event} load - The image loaded. Relayed from the inner image, whose own event stays inside the shadow root.
28
26
  *
29
- * @csspart fallback - What stands in when it fails.
30
- * @csspart image - The picture itself.
31
- * @csspart placeholder - What stands in until it arrives.
27
+ * @csspart fallback - The fallback, shown when the image fails to load.
28
+ * @csspart image - The image itself.
29
+ * @csspart placeholder - The placeholder, shown until the image loads.
32
30
  */
33
31
  export declare class HelixHeadlessImage extends HelixElement {
34
32
  /**
35
- * What it shows, for a reader who cannot see it.
33
+ * A text description of the image, read by screen readers.
36
34
  *
37
35
  * Empty is a real answer and means decoration. Omitting the attribute is not
38
36
  * the same thing: a reader with nothing to read announces the file name.
39
37
  */
40
38
  alt: string;
41
39
  /**
42
- * How the picture is fetched across origins, which decides whether a canvas
43
- * can read it.
40
+ * How the image is fetched across origins. It decides whether a canvas can
41
+ * read the image.
44
42
  */
45
43
  crossOrigin: 'anonymous' | 'use-credentials' | null;
46
44
  /**
47
- * Whether the browser may decode off the main thread.
45
+ * Whether the browser may decode the image off the main thread.
48
46
  *
49
47
  * `async` is the resting value and right for a picture in a page. `sync` is
50
48
  * what a consumer reaches for when the picture is about to be composited with
@@ -52,7 +50,8 @@ export declare class HelixHeadlessImage extends HelixElement {
52
50
  */
53
51
  decoding: 'async' | 'auto' | 'sync';
54
52
  /**
55
- * How urgently to fetch it, for the one picture that is the page.
53
+ * How urgently the browser fetches the image. Set `high` on the main image
54
+ * of a page.
56
55
  *
57
56
  * The hero of a page is usually its largest contentful paint, and the fix is
58
57
  * two attributes rather than one: `loading="eager"` stops it waiting for the
@@ -62,7 +61,8 @@ export declare class HelixHeadlessImage extends HelixElement {
62
61
  */
63
62
  fetchPriority: 'auto' | 'high' | 'low';
64
63
  /**
65
- * Whether to wait until it is nearly on screen.
64
+ * Whether the image waits to load until it is nearly on screen. Defaults to
65
+ * `lazy`.
66
66
  *
67
67
  * `lazy` by default, which is the opposite of the platform's, because a
68
68
  * picture worth putting in a component is usually below the fold and the one
@@ -74,19 +74,19 @@ export declare class HelixHeadlessImage extends HelixElement {
74
74
  */
75
75
  referrerPolicy: string;
76
76
  /**
77
- * How much of the line it will take, passed through to the picture.
77
+ * The width the image takes in the layout, passed through to the inner image.
78
78
  */
79
79
  sizes: string;
80
80
  /**
81
- * Where the picture is.
81
+ * The URL of the image.
82
82
  */
83
83
  src: string;
84
84
  /**
85
- * The candidate widths, passed through to the picture.
85
+ * The candidate files and their widths, passed through to the inner image.
86
86
  */
87
87
  srcset: string;
88
88
  /**
89
- * Whether the picture is on its way, here, or never coming.
89
+ * The loading state: `loading`, `loaded`, or `error`.
90
90
  *
91
91
  * Read-only to a consumer: it is a report rather than a setting.
92
92
  *
@@ -185,13 +185,13 @@ export declare class HelixHeadlessImage extends HelixElement {
185
185
  * nowhere else on the page.
186
186
  */
187
187
  private get image();
188
- /** Whether the picture has finished arriving, however it went. */
188
+ /** Whether the image has finished loading, successfully or not. */
189
189
  get complete(): boolean;
190
- /** Which candidate the browser actually chose out of `srcset`. */
190
+ /** The candidate the browser chose from `srcset`. */
191
191
  get currentSrc(): string;
192
- /** The picture's own height in pixels, and zero until it has arrived. */
192
+ /** The image's intrinsic height in pixels. Zero until the image loads. */
193
193
  get naturalHeight(): number;
194
- /** The picture's own width in pixels, and zero until it has arrived. */
194
+ /** The image's intrinsic width in pixels. Zero until the image loads. */
195
195
  get naturalWidth(): number;
196
196
  protected render(): TemplateResult;
197
197
  }
@@ -4,25 +4,23 @@ import { type PropertyValues, type TemplateResult } from 'lit';
4
4
  export type InputType = 'email' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'url';
5
5
  declare const HelixHeadlessInput_base: (new (...args: any[]) => import("@fusion.dev/helix-core").MixinControllerValueInterface) & (new (...args: any[]) => import("@fusion.dev/helix-core").MixinFieldInterface) & typeof HelixFormElement;
6
6
  /**
7
- * @summary A single line of text a reader types into.
7
+ * @summary A field for a single line of text.
8
8
  *
9
9
  * @description
10
- * Renders a real `<input>`, so the caret, selection, autofill, spellcheck, the
11
- * password manager and the on-screen keyboard a phone chooses are all the
12
- * platform's. It serializes into the server's markup, so the field is usable
13
- * before any script loads.
10
+ * Renders a real `<input>`, so the caret, selection, autofill, spellcheck,
11
+ * password managers, and a phone's on-screen keyboard all work natively. The
12
+ * field is in the server markup, so it works before any script loads.
14
13
  *
15
- * **The input inside a shadow root submits nothing**, the form being on the
16
- * other side of the boundary. The host is form-associated instead and reports
17
- * its own value through `ElementInternals`, which also carries validity and
18
- * answers a form reset.
14
+ * An input inside a shadow root does not submit with a form outside it, so the
15
+ * host is form-associated and reports its value through `ElementInternals`.
16
+ * That also carries validity and handles a form reset.
19
17
  *
20
- * `value` and `defaultValue` are separate the way `checked` and
21
- * `defaultChecked` are: `value` is what is in the field now, `defaultValue` is
22
- * what the markup asked for and where a reset returns to.
18
+ * `value` and `defaultValue` work like `checked` and `defaultChecked`. `value`
19
+ * is what is in the field now, and `defaultValue` is the value from the markup,
20
+ * which a reset restores.
23
21
  *
24
- * **Validity is the platform's.** `type` and `required` are set on the real
25
- * input and its `validity` is copied onto the host.
22
+ * Validity comes from the browser. `type` and `required` are set on the real
23
+ * input, and its `validity` is copied to the host.
26
24
  *
27
25
  * @since 0.1.0
28
26
  * @status stable
@@ -33,34 +31,35 @@ declare const HelixHeadlessInput_base: (new (...args: any[]) => import("@fusion.
33
31
  * @slot end - After the text, for an icon or a unit.
34
32
  * @slot start - Before the text, for an icon or a prefix.
35
33
  *
36
- * @event {Event} change - Relayed from the input once the reader has finished.
37
- * @event {HelixBeforeChangeEvent} helix-before-change - Fired as the text changes, and cancelable.
38
- * @event {Event} input - Announced once the value has moved.
34
+ * @event {Event} change - Sent when the user finishes changing the value. Relayed from the native input.
35
+ * @event {HelixBeforeChangeEvent} helix-before-change - The text is about to change. Cancelable: cancel it to keep the current text.
36
+ * @event {Event} input - Fired as the value changes.
39
37
  *
40
38
  * @csspart clear - The button that empties the field.
41
- * @csspart control - The input itself.
42
- * @csspart feedback - What is wrong with it.
43
- * @csspart field - The box holding everything.
44
- * @csspart hint - Help under the field, while nothing is wrong.
45
- * @csspart label - The question, over the field.
39
+ * @csspart control - The native input.
40
+ * @csspart feedback - The message that says what is wrong with the value.
41
+ * @csspart field - The box around the input, its slots, and its buttons.
42
+ * @csspart hint - Help text under the field, shown while there is no feedback.
43
+ * @csspart label - The label above the field.
46
44
  * @csspart reveal - The button that shows and hides a password.
47
- * @csspart reveal-pressed - The reveal button while the password shows, beside `reveal`.
45
+ * @csspart reveal-pressed - The reveal button while the password is shown, added beside `reveal`.
48
46
  *
49
- * @cssstate invalid - While there is feedback to show: the platform's verdict, or the consumer's `feedback`.
47
+ * @cssstate invalid - The control has an error to show, from the browser's validation or from your `feedback`.
50
48
  */
51
49
  export declare class HelixHeadlessInput extends HelixHeadlessInput_base {
52
50
  protected readonly aria: AriaForwardController;
53
51
  /** Typed or dragged, so every edit is announced. See `announcesInput`. */
54
52
  protected readonly announcesInput = true;
55
53
  /**
56
- * What the browser may autofill here, as one of the platform's own tokens.
54
+ * What the browser may autofill in the field, as an HTML `autocomplete`
55
+ * token.
57
56
  *
58
57
  * Empty leaves the attribute off, which is the browser's default. Set it to
59
58
  * a token like `email` or `bday` to ask for autofill, or to `off` to refuse.
60
59
  */
61
60
  autocomplete: string;
62
61
  /**
63
- * Whether the field offers a button that empties it.
62
+ * Whether the field shows a button that empties it.
64
63
  *
65
64
  * Shown only while there is something to clear, because a control that does
66
65
  * nothing is worse than no control: a reader who presses it and sees no
@@ -69,7 +68,7 @@ export declare class HelixHeadlessInput extends HelixHeadlessInput_base {
69
68
  */
70
69
  clearable: boolean;
71
70
  /**
72
- * What the clear button is called, since an icon has no name of its own.
71
+ * The accessible name of the clear button, which shows only an icon.
73
72
  */
74
73
  clearLabel: string;
75
74
  /**
@@ -89,13 +88,14 @@ export declare class HelixHeadlessInput extends HelixHeadlessInput_base {
89
88
  */
90
89
  pattern: string;
91
90
  /**
92
- * Shown while the field is empty.
91
+ * The text shown while the field is empty.
93
92
  *
94
93
  * Not a label: it goes when typing starts.
95
94
  */
96
95
  placeholder: string;
97
96
  /**
98
- * Whether the field refuses input while still submitting its value.
97
+ * Whether the field blocks editing. A read-only field still submits its
98
+ * value.
99
99
  *
100
100
  * **The attribute is `readonly`, which is the platform's spelling.** A
101
101
  * camelCase property needs an explicit `attribute`, and dash-casing a word
@@ -128,7 +128,7 @@ export declare class HelixHeadlessInput extends HelixHeadlessInput_base {
128
128
  /** Focus is delegated to the input, so the host is never the focus target. */
129
129
  static shadowRootOptions: ShadowRootInit;
130
130
  /**
131
- * The caret and the selection, under the platform's own names.
131
+ * The direction of the selection, as the native input names it.
132
132
  *
133
133
  * The `<input>` is inside this shadow root, so a consumer had no way to ask
134
134
  * where the selection is, let alone move it: `querySelector` does not cross
@@ -149,8 +149,8 @@ export declare class HelixHeadlessInput extends HelixHeadlessInput_base {
149
149
  get selectionStart(): number;
150
150
  set selectionStart(at: number);
151
151
  /**
152
- * Selects a range, which is the one operation the three accessors above
153
- * cannot express between them.
152
+ * Selects the range from `start` to `end` in one call, which setting
153
+ * `selectionStart` and `selectionEnd` one at a time cannot always do.
154
154
  *
155
155
  * Setting `selectionStart` past the current `selectionEnd` drags the end
156
156
  * along, so the two writes a consumer would make in sequence do not compose
@@ -185,7 +185,7 @@ export declare class HelixHeadlessInput extends HelixHeadlessInput_base {
185
185
  private readonly handleChange;
186
186
  /** Reports the value and the validity the host stands behind. */
187
187
  private sync;
188
- /** Puts the caret in the field, the way a label pointing at one would. */
188
+ /** Puts the caret in the field, as clicking its label does. */
189
189
  focus(options?: FocusOptions): void;
190
190
  /** Selects everything in the field. */
191
191
  select(): void;
@@ -208,13 +208,14 @@ export declare class HelixHeadlessInput extends HelixHeadlessInput_base {
208
208
  */
209
209
  reveal: boolean;
210
210
  /**
211
- * What the reveal toggle is called.
211
+ * The accessible name of the reveal toggle.
212
212
  *
213
213
  * The state is `aria-pressed`, not this.
214
214
  */
215
215
  revealLabel: string;
216
216
  /**
217
- * What the field accepts, which decides the keyboard and the validation.
217
+ * The kind of text the field accepts. It sets the on-screen keyboard and the
218
+ * validation.
218
219
  *
219
220
  * **Not reflected.** Reflection exists so a selector can reach a value, and
220
221
  * no stylesheet in this repository selects on `type`. Reflecting it writes
@@ -4,21 +4,18 @@ import { type PropertyValues, type TemplateResult } from 'lit';
4
4
  * @summary A keyboard key or chord, set inline with text.
5
5
  *
6
6
  * @description
7
- * Renders a real `<kbd>`, so the passage still means "press this" to anything
8
- * reading the markup.
7
+ * Renders a `<kbd>` element.
9
8
  *
10
- * **One key per element, with `keys` as the stated exception.** A sequence is
11
- * several of these with the separator written between them as ordinary text,
12
- * because that separator is prose: "then" in a sequence, "plus" in a chord, and
13
- * a component inserting one would have to guess which.
9
+ * Each element holds one key, except when you use `keys`. For a sequence or a
10
+ * chord, write one element per key and put the separator between them as text,
11
+ * such as "then" or "plus".
14
12
  *
15
- * **`keys` exists because the glyphs were being typed by hand and were wrong.**
16
- * A literal `⌘K` in a template tells a reader on Windows to press a key their
17
- * keyboard does not have, and nothing catches it. Given `mod` this renders
18
- * `⌘K` on Apple and `Ctrl+K` everywhere else.
13
+ * `keys` renders the right glyphs for the platform. Given `mod`, it renders
14
+ * `⌘K` on Apple devices and `Ctrl+K` everywhere else. A `⌘K` typed into a
15
+ * template is wrong for anyone on Windows.
19
16
  *
20
- * **`within` is what binds it, and it is absent by default**, so this draws a
21
- * key and listens for nothing unless asked.
17
+ * The element binds the shortcut only when `within` is set. By default it draws
18
+ * the key and listens for nothing.
22
19
  *
23
20
  * @since 0.1.0
24
21
  * @status stable
@@ -28,13 +25,13 @@ import { type PropertyValues, type TemplateResult } from 'lit';
28
25
  *
29
26
  * @slot - The key's label, where `keys` is not set.
30
27
  *
31
- * @event {HelixShortcutEvent} helix-shortcut - Fired when the chord is pressed, and cancelable.
28
+ * @event {HelixShortcutEvent} helix-shortcut - The chord was pressed. Cancelable: cancel it to let the key press keep its usual effect.
32
29
  *
33
30
  * @csspart kbd - The key.
34
31
  */
35
32
  export declare class HelixHeadlessKbd extends HelixElement {
36
33
  /**
37
- * The chord, written plainly: `mod+k`, `shift+?`, `/`.
34
+ * The key or chord to show, such as `mod+k`, `shift+?`, or `/`.
38
35
  *
39
36
  * `mod` is the platform's own command modifier, which is the reason to write
40
37
  * a chord here rather than a glyph: it is the one token whose right answer
@@ -42,7 +39,8 @@ export declare class HelixHeadlessKbd extends HelixElement {
42
39
  */
43
40
  keys: string;
44
41
  /**
45
- * Where the chord is listened for, and whether it is listened for at all.
42
+ * Where the chord is listened for. `control` listens inside the control the
43
+ * key sits in, and `document` listens on the whole page.
46
44
  *
47
45
  * Unset draws a key and binds nothing.
48
46
  *