@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
@@ -1,33 +1,24 @@
1
1
  import { HelixElement } from '@fusion.dev/helix-core';
2
2
  import { nothing, type PropertyValues, type TemplateResult } from 'lit';
3
3
  /**
4
- * @summary A timestamp, written the way the reader's locale writes one.
4
+ * @summary A timestamp, formatted for the user's locale.
5
5
  *
6
6
  * @description
7
- * A date in a page is almost never wanted as an ISO string, and formatting one
8
- * in the consumer's own code means every consumer ships a copy of the same
9
- * `Intl` call and a different set of options. This is that call, as an element,
10
- * so a date is written where it is shown.
7
+ * Formats a date with `Intl` where it is shown, so you do not write the same
8
+ * `Intl` call and options in your own code.
11
9
  *
12
- * **`elapsed` is the mode a feed wants, and it stops being relative on
13
- * purpose.** "42m", "3h", "1d" is what a row of activity reads as, and past a
14
- * week the compact form is a lie: `Intl.NumberFormat` narrow renders both
15
- * `minute` and `month` as `m` in en-US, so "3m" is three minutes at the top of a
16
- * feed and three months further down it. Past six days this shows a date, which
17
- * is shorter to read and impossible to misread. `elapsedTime` in `helix/core`
18
- * carries the measurement.
10
+ * **`elapsed` shows compact relative time for a feed**, such as "42m", "3h", or
11
+ * "1d". After six days it shows a date. In en-US, `Intl.NumberFormat` narrow
12
+ * renders both `minute` and `month` as `m`, so a compact "3m" could mean three
13
+ * minutes or three months. `elapsedTime` in `helix/core` does the measurement.
19
14
  *
20
- * **The reading refreshes itself, from one timer the page shares.** A relative
21
- * timestamp is correct for as long as its unit lasts and wrong afterwards, and a
22
- * page left open is exactly where that shows. Each element asks to be woken when
23
- * its own reading expires rather than polling, and an element showing a date
24
- * asks for nothing at all: fifty rows and fifty intervals is fifty wakeups a
25
- * second where one will do, and a feed of last month's notifications should cost
26
- * nothing to leave open.
15
+ * **The text refreshes on one timer shared by the page.** Each element
16
+ * schedules an update for when its current reading expires, and an element
17
+ * showing a date schedules none, so a long feed left open costs almost nothing.
27
18
  *
28
- * **`<time datetime>` whatever the text says**, so a screen reader, a copy and
29
- * paste, and anything parsing the page all get the real instant rather than
30
- * "yesterday".
19
+ * **The output is always `<time datetime>`**, so screen readers, copy and
20
+ * paste, and scripts parsing the page get the exact instant, whatever the
21
+ * visible text says.
31
22
  *
32
23
  * @since 0.1.0
33
24
  * @status stable
@@ -35,11 +26,11 @@ import { nothing, type PropertyValues, type TemplateResult } from 'lit';
35
26
  * @aliases RelativeTime, Timestamp, TimeAgo
36
27
  * @documentation https://fusion.dev/helix/components/format-date
37
28
  *
38
- * @csspart time - The `<time>` element carrying the reading.
29
+ * @csspart time - The `<time>` element that holds the formatted text.
39
30
  */
40
31
  export declare class HelixHeadlessFormatDate extends HelixElement {
41
32
  /**
42
- * The timestamp, as anything `Date` parses.
33
+ * The timestamp, in any format `Date` can parse.
43
34
  *
44
35
  * An ISO string is what an API sends and what `<time datetime>` takes, so it
45
36
  * is the shape that needs no translation at either end. Left unset this
@@ -61,7 +52,8 @@ export declare class HelixHeadlessFormatDate extends HelixElement {
61
52
  */
62
53
  day?: 'numeric' | '2-digit';
63
54
  /**
64
- * Show how long ago it was, compactly, instead of the date.
55
+ * Shows how long ago the timestamp was, in a compact form such as "3h", in
56
+ * place of the date.
65
57
  *
66
58
  * Reflected, because it is the one property that decides which of two readings
67
59
  * this is and a stylesheet has a reason to know: a compact reading is a fixed
@@ -73,7 +65,7 @@ export declare class HelixHeadlessFormatDate extends HelixElement {
73
65
  */
74
66
  hour?: 'numeric' | '2-digit';
75
67
  /**
76
- * Locale for the reading.
68
+ * The locale to format the timestamp in.
77
69
  *
78
70
  * Empty is the runtime's own.
79
71
  */
@@ -97,7 +89,7 @@ export declare class HelixHeadlessFormatDate extends HelixElement {
97
89
  */
98
90
  timeZone?: string;
99
91
  /**
100
- * Whether to name the time zone, and how.
92
+ * Shows the name of the time zone, in its `long` or `short` form.
101
93
  */
102
94
  timeZoneName?: 'long' | 'short';
103
95
  /**
@@ -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
  }