@fusion.dev/helix-headless 0.105.0 → 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 (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,38 +4,33 @@ import { type PropertyValues, type TemplateResult } from 'lit';
4
4
  * @summary One card or group on a canvas.
5
5
  *
6
6
  * @description
7
- * **Markup rather than an entry in an array**, which is the rule
8
- * `VideoPlaylist` writes out: an array handed to a custom element is missing
9
- * from the first paint of every server-rendered React page, because React skips
10
- * the properties it would have to apply imperatively while hydrating. A card
11
- * written as an element is in the served HTML whichever renderer wrote it, and
12
- * what is inside it is the consumer's own DOM rather than a string this
13
- * component parses.
7
+ * A card is an element in the markup, the rule `VideoPlaylist` also follows. An
8
+ * array passed to a custom element is missing from the first paint of every
9
+ * server-rendered React page, because React skips the properties it would have
10
+ * to set imperatively during hydration. A card element is in the served HTML
11
+ * whichever renderer wrote it, and its contents are your own DOM.
14
12
  *
15
- * **Where it sits is data**, which is what makes a canvas a canvas: somebody
16
- * placed this card and the placement carries meaning, so `x` and `y` are given
17
- * rather than computed. The board reads them and places the card; a page with
18
- * no JavaScript has the cards and their text and not the arrangement, which is
19
- * the honest half of what a board can promise before it hydrates.
13
+ * Set `x` and `y` to place the card. On a canvas the placement carries meaning,
14
+ * so positions are given and never computed. The board reads them and places
15
+ * the card. Without JavaScript, the page shows the cards and their text without
16
+ * the arrangement.
20
17
  *
21
- * **Named by `name`, which only has to be unique on its board**, the way a
22
- * form control's is in its form. An `id` has to be unique on the whole page,
23
- * and two boards written from one template, or one board shown twice, would
24
- * each have a card called `write` with no way to say which one a connection
25
- * meant. `id` is left for the page, which can still use it.
18
+ * `name` identifies the card and only has to be unique on its board, like a
19
+ * form control's name in its form. An `id` must be unique on the whole page,
20
+ * which fails when two boards come from one template or one board is shown
21
+ * twice. `id` stays free for your own use.
26
22
  *
27
- * **What it holds is the consumer's**, which is why there is no card type any
28
- * more: a card of text is text, a link is a link they put inside it, a file is
29
- * whatever they show for one. The one kind the board treats differently is a
30
- * group, a box drawn behind the cards inside it, and `group` says so. JSON
31
- * Canvas's four types are mapped by `fromJsonCanvas` on the way in.
23
+ * The card holds your content, and there is no card type. Text is text, a link
24
+ * is a link you put inside the card, and a file is whatever you show for one.
25
+ * The board treats one kind differently: a group, drawn as a box behind the
26
+ * cards inside it. Set `group` for a group. `fromJsonCanvas` maps the four JSON
27
+ * Canvas node types on the way in.
32
28
  *
33
- * **The card is the way around the board, for a reader who cannot see it.** The
34
- * board keeps one tab stop among its cards, arrow keys walk them in reading
35
- * order, and the one a reader lands on is brought into view. What it connects
36
- * to is read out with it, so the arrows between cards are heard as well as
37
- * seen. That replaced a list of every card under the board, which said the same
38
- * thing twice to a sighted reader and took a row from the board to do it.
29
+ * The cards are how you move around the board with a keyboard or a screen
30
+ * reader. The board keeps one tab stop among its cards, the arrow keys move
31
+ * through them in reading order, and the card you land on scrolls into view.
32
+ * Its connections are announced with it, so a screen reader reads the arrows
33
+ * between cards.
39
34
  *
40
35
  * @since 0.100.0
41
36
  * @status experimental
@@ -43,31 +38,31 @@ import { type PropertyValues, type TemplateResult } from 'lit';
43
38
  * @aliases CanvasCard, BoardNode
44
39
  * @documentation https://fusion.dev/helix/components/canvas
45
40
  *
46
- * @slot - What the card holds, which is anything: text, a picture, a chart.
47
- * @slot description - A quieter line under it.
41
+ * @slot - The card's content, such as text, a picture, or a chart.
42
+ * @slot description - A line of secondary text under the content.
48
43
  *
49
- * @csspart grip - A corner a selected card is resized from, on every one of the four.
44
+ * @csspart grip - A corner handle that resizes a selected card, on each of the four corners.
50
45
  * @csspart grip-bottom-left - The bottom left corner.
51
46
  * @csspart grip-bottom-right - The bottom right corner.
52
47
  * @csspart grip-top-left - The top left corner.
53
48
  * @csspart grip-top-right - The top right corner.
54
- * @csspart handle - A point on a side a connection is drawn from, on every one of the four.
49
+ * @csspart handle - A point that you draw a connection from, on each of the four sides.
55
50
  * @csspart handle-bottom - The point on the bottom side.
56
51
  * @csspart handle-left - The point on the left side.
57
52
  * @csspart handle-right - The point on the right side.
58
53
  * @csspart handle-top - The point on the top side.
59
- * @csspart move - The handle a selected card is moved by, a click to pick it up and another to put it down, as well as a drag.
54
+ * @csspart move - The handle that moves a selected card. Drag it, or click once to pick the card up and again to put it down.
60
55
  * @csspart node - The box the content sits in.
61
- * @csspart outline - The drawn outline of a card whose shape a box cannot draw, a diamond.
56
+ * @csspart outline - The drawn outline of a `diamond` card, a shape a box cannot draw.
62
57
  *
63
58
  * @cssstate candidate - While a connection is being drawn and this card is somewhere it could arrive.
64
- * @cssstate current - While this is the card a reader lands on when they tab into the board.
65
- * @cssstate selected - While this is the card the reader selected, until they select something else or nothing.
66
- * @cssstate target - While a connection being drawn would arrive here if it were let go.
59
+ * @cssstate current - The card that receives focus when you tab into the board.
60
+ * @cssstate selected - The card is selected.
61
+ * @cssstate target - A connection being drawn would end here if you released it.
67
62
  */
68
63
  export declare class HelixHeadlessCanvasNode extends HelixElement {
69
64
  /**
70
- * A box drawn behind the cards inside it rather than a card.
65
+ * Makes this a group: a box drawn behind the cards inside it.
71
66
  *
72
67
  * The board works out what is inside it from the geometry, which is what the
73
68
  * format does too, and moves them with it. Its `label` is drawn above it.
@@ -94,7 +89,8 @@ export declare class HelixHeadlessCanvasNode extends HelixElement {
94
89
  /** How tall the card is, in the document's own units. */
95
90
  height: number;
96
91
  /**
97
- * What the card is called, for a group and wherever another card names it.
92
+ * The card's name as text. A group shows it, and another card's connections
93
+ * read it out.
98
94
  *
99
95
  * A group needs one because it has no text of its own; a card that has text
100
96
  * is named by it, and one holding a picture or a figure is named by nothing
@@ -102,7 +98,8 @@ export declare class HelixHeadlessCanvasNode extends HelixElement {
102
98
  */
103
99
  label: string;
104
100
  /**
105
- * What connections and requests call this card, unique on its board.
101
+ * The name that connections and events use for this card, unique on its
102
+ * board.
106
103
  *
107
104
  * Required: a card with no name is drawn but nothing can connect to it, and
108
105
  * the board has nothing to say when a reader asks for it to go.
@@ -115,7 +112,7 @@ export declare class HelixHeadlessCanvasNode extends HelixElement {
115
112
  */
116
113
  links: string;
117
114
  /**
118
- * Keeps this card where it is: not moved, not connected, not removed.
115
+ * Prevents the card from being moved, connected, or removed.
119
116
  *
120
117
  * **The board's own word, meaning the same thing one card at a time.** A
121
118
  * board of cards a reader rearranges often has one that anchors it, a start
@@ -124,8 +121,8 @@ export declare class HelixHeadlessCanvasNode extends HelixElement {
124
121
  */
125
122
  readOnly: boolean;
126
123
  /**
127
- * The card's outline: `circle`, `diamond`, `pill` or `square`, and a rounded
128
- * box where it says none.
124
+ * The card's outline: `circle`, `diamond`, `pill`, or `square`. Unset is a
125
+ * rounded box.
129
126
  *
130
127
  * **A flowchart's vocabulary, and the reason it is on this tier**: a diamond
131
128
  * is drawn as an outline the card renders, because a border follows a box
@@ -152,7 +149,8 @@ export declare class HelixHeadlessCanvasNode extends HelixElement {
152
149
  */
153
150
  resizable: boolean;
154
151
  /**
155
- * What the card means, in the words every Helix component uses for it.
152
+ * The meaning of the card, shown by its color, in the same tones as other
153
+ * Helix components.
156
154
  *
157
155
  * **`tone` rather than the format's `color`**, which was a second word for
158
156
  * the same thing on this family alone: JSON Canvas writes `1` to `6` and
@@ -188,7 +186,7 @@ export declare class HelixHeadlessCanvasNode extends HelixElement {
188
186
  */
189
187
  protected updated(changed: PropertyValues): void;
190
188
  /**
191
- * Focuses the card rather than the host, which draws no box of its own.
189
+ * Focuses the card's `node` part. The host draws no box of its own.
192
190
  *
193
191
  * The board calls this to walk the cards, and a consumer can too: the part is
194
192
  * what holds the tab stop and what a focus ring is drawn around.
@@ -5,66 +5,66 @@ export type { CanvasDocument, CanvasEdge, CanvasEdgeProps, CanvasEnd, CanvasNode
5
5
  export { fromJsonCanvas } from './canvas-document.js';
6
6
  declare const HelixHeadlessCanvas_base: (new (...args: any[]) => import("@fusion.dev/helix-core").ViewportElement) & typeof HelixElement;
7
7
  /**
8
- * @summary A board of cards and the connections between them, which a reader can walk, rearrange and connect.
8
+ * @summary A board of cards and the connections between them, which can be navigated, rearranged, and connected.
9
9
  *
10
10
  * @description
11
- * **The first of these surfaces Helix draws itself**, and the reason is where
12
- * the positions come from. On a canvas **position is data**: somebody placed
13
- * every card and the placement carries the meaning, so there is no layout to
14
- * compute and drawing is arithmetic over rectangles. A map is somebody else's
15
- * tiles and a graph view's positions are computed, which is why `Map` takes a
16
- * slotted map and this takes a document.
11
+ * A board of cards and connectors, drawn by Helix. On a canvas every position
12
+ * is data that someone placed, so drawing is arithmetic over rectangles with no
13
+ * layout to compute. `Map` takes a slotted map, because another renderer draws
14
+ * its tiles.
17
15
  *
18
- * **The format is open.** [JSON Canvas](https://jsoncanvas.org) gives each node
19
- * an `x`, `y`, `width`, `height` and a type, and each edge the two nodes it
20
- * joins and the sides it leaves and arrives on. A card belongs to a group when
21
- * it sits inside the group's bounds, which the format leaves to the geometry.
16
+ * The format is [JSON Canvas](https://jsoncanvas.org), an open format. Each
17
+ * node has an `x`, `y`, `width`, `height`, and a type. Each edge names the two
18
+ * nodes it joins and the sides it leaves and arrives on. A card belongs to a
19
+ * group when it sits inside the group's bounds.
22
20
  *
23
- * **Accessibility is the design work, not the drawing.** The cards are text in
24
- * the DOM, so they are readable already; what space does not supply is an order
25
- * and the connections. So the family chooses an order, walks the cards in it,
26
- * and says every card's links as text. `order` takes `spatial`, which bands the
27
- * cards into rows, and `edges`, which follows the arrows from the cards nothing
28
- * points to.
21
+ * The cards are text in the DOM, so a screen reader can read them. The family
22
+ * adds a reading order and states each card's connections as text. `order` sets
23
+ * the reading order:
24
+ * - `spatial` bands the cards into rows.
25
+ * - `edges` follows the arrows, starting from the cards that nothing points to.
29
26
  *
30
- * **Cards move by default, the way a form control takes input by default.**
31
- * The board writes the new `x` and `y` onto the card itself, as an input writes
32
- * its own value, and says so twice: `helix-before-move` for every step, which a
33
- * consumer holding the positions in their own state refuses and applies
34
- * themselves, and `helix-move` once the move is finished. A resize is the same
35
- * pair with a size in it. `readonly` keeps every card where it is, for a board
36
- * that is published rather than worked on, and `readonly` on one card or
37
- * connection keeps that one.
27
+ * **Cards move by default.** The board writes the new `x` and `y` onto the
28
+ * card, the way an input writes its own value, and dispatches two events:
29
+ * - `helix-before-move` for every step. Cancel it to hold the positions in your
30
+ * own state and apply them yourself.
31
+ * - `helix-move` once the move is finished.
38
32
  *
39
- * **The cards are the way around it.** One of them holds the board's tab stop,
40
- * arrow keys walk them in reading order, and the one a reader lands on is
41
- * brought into view with what it connects to read out beside it. Shift with an
42
- * arrow moves it, which is the keyboard's way to do what a drag does. The
43
- * connections leaving a card are stops of their own, straight after it, and
44
- * Enter on one goes to the card it arrives at.
33
+ * A resize dispatches the same pair with a size. Set `readonly` on the board to
34
+ * keep every card in place, such as on a published board. Set `readonly` on one
35
+ * card or connection to keep only that one in place.
45
36
  *
46
- * **Every drag can be done with clicks instead**, which WCAG 2.5.7 asks of a
47
- * pointer that cannot hold a button down. A click on a selected card's move
48
- * handle, a corner, a card's connection point or the end of a selected
49
- * connection picks the thing up; it follows the pointer with no button held,
50
- * and the next click puts it down wherever a drag let go there would have. On
51
- * touch, the next tap is where it lands. Escape, or a press off the board,
52
- * puts it back.
37
+ * Keyboard behavior:
38
+ * - One card holds the board's tab stop.
39
+ * - The arrow keys move through the cards in reading order. The card you land
40
+ * on scrolls into view, and its connections are announced with it.
41
+ * - Shift with an arrow key moves the card.
42
+ * - The connections leaving a card are stops of their own, straight after it.
43
+ * Enter on one moves to the card it arrives at.
53
44
  *
54
- * **Connecting and removing are requests, and the page acts on them.** Drawing
55
- * from a card's handle to another card, or pressing C on one and Enter on
56
- * another, sends `helix-connect`; Delete on a card or a connection sends
57
- * `helix-remove`, naming every connection a removed card would strand. A move
58
- * can be applied by the board because the card is already there. A connection
59
- * is a new element, and one a board added to markup React renders would be
60
- * thrown away on the next render, so the board asks and the page writes it.
45
+ * Every drag also works with clicks, as WCAG 2.5.7 requires for a pointer that
46
+ * cannot hold a button down. Click a selected card's move handle, a corner, a
47
+ * card's connection point, or the end of a selected connection to pick it up.
48
+ * It follows the pointer with no button held, and the next click puts it down
49
+ * where a drag would have. On touch, the next tap sets where it lands. Escape,
50
+ * or a press outside the board, puts it back.
61
51
  *
62
- * **Markup rather than a `src` or a document property.** Nothing in this
63
- * library fetches, and an array handed to an element is missing from the first
64
- * paint of every server-rendered React page. The cards and connections are
65
- * `helix-canvas-node` and `helix-canvas-edge` elements, in the served markup
66
- * whichever renderer wrote them; `fromJsonCanvas` turns a JSON Canvas document
67
- * into their props and `toJsonCanvas()` writes a board back out.
52
+ * Connecting and removing dispatch requests, and your code applies them:
53
+ * - Drawing from a card's handle to another card, or pressing C on one card and
54
+ * Enter on another, dispatches `helix-connect`.
55
+ * - Delete on a card or a connection dispatches `helix-remove`. The event names
56
+ * every connection that removing the card would leave without an end.
57
+ *
58
+ * The board applies a move itself, because the card already exists. A
59
+ * connection is a new element, and React discards an element the board adds to
60
+ * its markup on the next render, so you write the connection.
61
+ *
62
+ * Cards and connections are `helix-canvas-node` and `helix-canvas-edge`
63
+ * elements, so they are in the served markup whichever renderer wrote them. The
64
+ * library fetches nothing, and an array passed to an element is missing from
65
+ * the first paint of a server-rendered React page. `fromJsonCanvas` turns a
66
+ * JSON Canvas document into their props, and `toJsonCanvas()` writes a board
67
+ * back out.
68
68
  *
69
69
  * @since 0.100.0
70
70
  * @status experimental
@@ -72,64 +72,63 @@ declare const HelixHeadlessCanvas_base: (new (...args: any[]) => import("@fusion
72
72
  * @aliases Board, JSON Canvas, Whiteboard
73
73
  * @documentation https://fusion.dev/helix/components/canvas
74
74
  *
75
- * @slot empty - What to show where the document has no nodes.
76
- * @slot footer - Chrome below the board.
77
- * @slot header - Chrome above the board.
75
+ * @slot empty - Content shown when the document has no nodes.
76
+ * @slot footer - Content below the board.
77
+ * @slot header - Content above the board.
78
78
  *
79
- * @event {HelixBeforeMoveEvent} helix-before-move - Cards are about to move. Refuse it to keep the positions in your own state.
80
- * @event {HelixBeforeReconnectEvent} helix-before-reconnect - A connection's end is about to move to another card or side. Refuse it to keep connections in your own state.
81
- * @event {HelixBeforeRelabelEvent} helix-before-relabel - A connection's label or a group's name is about to change. Refuse it to keep labels in your own state.
82
- * @event {HelixCanvasEditEvent} helix-canvas-edit - The reader asked to edit a card: a double-click, or Enter or F2. Open your own editor for it.
83
- * @event {HelixCanvasPanEvent} helix-canvas-pan - The board was moved a step, by its controls or the arrow keys: a fact rather than a request. A drag says so through `helix-canvas-view`.
84
- * @event {HelixCanvasViewEvent} helix-canvas-view - Where the board is looking changed, however it changed. The detail is the new view.
85
- * @event {HelixCanvasZoomEvent} helix-canvas-zoom - The board zoomed a step, by its controls or the keys. A wheel or a pinch says so through `helix-canvas-view`.
86
- * @event {HelixConnectEvent} helix-connect - A reader asked for two cards to be joined. Add the `helix-canvas-edge` to do it.
87
- * @event {HelixMoveEvent} helix-move - Cards moved and the move is finished: a drag let go, a click that put a card down, or a key pressed.
79
+ * @event {HelixBeforeMoveEvent} helix-before-move - Cards are about to move. Cancelable: cancel it to keep the positions in your own state.
80
+ * @event {HelixBeforeReconnectEvent} helix-before-reconnect - A connection's end is about to move to another card or side. Cancelable: cancel it to keep connections in your own state.
81
+ * @event {HelixBeforeRelabelEvent} helix-before-relabel - A connection's label or a group's name is about to change. Cancelable: cancel it to keep labels in your own state.
82
+ * @event {HelixCanvasEditEvent} helix-canvas-edit - A card was double-clicked, or Enter or F2 was pressed on it. Open your own editor for the card.
83
+ * @event {HelixCanvasPanEvent} helix-canvas-pan - The board moved one step, from its controls or the arrow keys. A drag sends `helix-canvas-view`.
84
+ * @event {HelixCanvasViewEvent} helix-canvas-view - The board's view changed, by any means. The detail is the new view.
85
+ * @event {HelixCanvasZoomEvent} helix-canvas-zoom - The board zoomed one step, from its controls or the keys. A wheel or a pinch sends `helix-canvas-view`.
86
+ * @event {HelixConnectEvent} helix-connect - Two cards were chosen to be joined. Add a `helix-canvas-edge` to join them.
87
+ * @event {HelixMoveEvent} helix-move - Cards moved and the move is finished: a drag was released, a click put a card down, or a key was pressed.
88
88
  * @event {HelixReconnectEvent} helix-reconnect - A connection's end moved, and the move is finished.
89
89
  * @event {HelixRelabelEvent} helix-relabel - A connection's label or a group's name changed.
90
- * @event {HelixRemoveEvent} helix-remove - A reader asked for cards or connections to go. Remove the elements it names.
91
- * @event {HelixSelectEvent} helix-select - The selection changed. The detail's `value` is the names, comma separated, empty for none. Cancelable: refusing it keeps the selection where it was.
90
+ * @event {HelixRemoveEvent} helix-remove - Cards or connections were chosen for removal. Remove the elements it names.
91
+ * @event {HelixSelectEvent} helix-select - The selection changed. The detail's `value` is the names, comma separated, empty for none. Cancelable: canceling it keeps the selection as it was.
92
92
  *
93
- * @csspart arrow - The head an edge carries at an end that has one.
94
- * @csspart board - The plane the cards are placed on, which is what pans and zooms.
93
+ * @csspart arrow - The arrowhead at an end of a connection that has one.
94
+ * @csspart board - The plane the cards are placed on, which pans and zooms.
95
95
  * @csspart controls - The group the pan and zoom buttons sit in.
96
- * @csspart draft - The connection being drawn, before it is asked for.
96
+ * @csspart draft - The connection being drawn, before `helix-connect` is sent.
97
97
  * @csspart edge - One connector between two cards.
98
- * @csspart edge-end - An end of a selected connection, which a press picks up, a click as well as a drag.
99
- * @csspart edge-target - The wider, unpainted line over a connector that a reader focuses and presses.
98
+ * @csspart edge-end - An end of a selected connection. Drag it, or click it to pick it up.
99
+ * @csspart edge-target - A wider, invisible line over a connection, which receives focus and presses.
100
100
  * @csspart edges - The layer the connectors are drawn in.
101
101
  * @csspart footer - The strip below the board.
102
- * @csspart fullscreen - The button that fills the screen.
102
+ * @csspart fullscreen - The button that makes the board fill the screen.
103
103
  * @csspart header - The strip above the board.
104
104
  * @csspart label - The label on a connector.
105
- * @csspart label-editor - The field a connection's label or a group's name is edited in, where it sits.
106
- * @csspart live - What the board says while a connection is being made, for a screen reader.
105
+ * @csspart label-editor - The field for editing a connection's label or a group's name, placed over that text.
106
+ * @csspart live - A live region that screen readers announce while a connection is being made.
107
107
  * @csspart marquee - The box a Shift-drag across the empty board draws, which selects the cards it touches.
108
108
  * @csspart pan-down - The button that moves the board down.
109
- * @csspart pan-end - The button that moves the board the way the text ends.
110
- * @csspart pan-start - The button that moves the board the way the text starts.
109
+ * @csspart pan-end - The button that moves the board toward the end of a line of text: right in English.
110
+ * @csspart pan-start - The button that moves the board toward the start of a line of text: left in English.
111
111
  * @csspart pan-up - The button that moves the board up.
112
112
  * @csspart region - The named region the board is drawn in.
113
113
  * @csspart viewport - The box the board is drawn inside.
114
114
  * @csspart zoom-in - The button that zooms in.
115
115
  * @csspart zoom-out - The button that zooms out.
116
116
  *
117
- * @cssstate connecting - While a reader is drawing a connection.
118
- * @cssstate direct - While the board moves without easing: under the reader's hand, or settling into its box.
117
+ * @cssstate connecting - While you draw a connection.
118
+ * @cssstate direct - The board moves without easing, while you drag it or while it settles into its box.
119
119
  * @cssstate empty - While the document has no nodes.
120
120
  * @cssstate fullscreen - While the board fills the screen.
121
- * @cssstate holding - While something a click picked up follows the pointer, until the next press puts it down.
122
- * @cssstate idle - While the reader has been still long enough to hide the chrome.
121
+ * @cssstate holding - An item picked up with a click follows the pointer until the next press puts it down.
122
+ * @cssstate idle - The user has been still long enough for the controls to hide.
123
123
  * @cssstate pressing - While a press on the board, its cards or its connections is under way.
124
124
  */
125
125
  export declare class HelixHeadlessCanvas extends HelixHeadlessCanvas_base {
126
- /** How a card says where its connections come from, with `{cards}`. */
126
+ /** The text read with a card to say where its connections come from, with `{cards}`. */
127
127
  comesFromLabel: string;
128
- /** What it says when a connection is asked for, with `{from}` and `{to}`. */
128
+ /** The text announced when a connection is requested, with `{from}` and `{to}`. */
129
129
  connectedLabel: string;
130
130
  /**
131
- * What the live region says when a reader starts a connection, with `{from}`
132
- * filled in.
131
+ * The text announced when a connection is started, with `{from}` filled in.
133
132
  *
134
133
  * **Every sentence this board speaks is a property**, the rule the pan
135
134
  * controls already kept with `pan-up-label` and its three: a board on a page in another
@@ -137,33 +136,35 @@ export declare class HelixHeadlessCanvas extends HelixHeadlessCanvas_base {
137
136
  */
138
137
  connectingLabel: string;
139
138
  /**
140
- * What a connection is called, with `{from}` and `{to}`.
139
+ * The accessible name of a connection, with `{from}` and `{to}`.
141
140
  *
142
141
  * Its own label, where it has one, is its description rather than part of
143
142
  * this, so a reader hears the ends first and what the line says after.
144
143
  */
145
144
  connectionLabel: string;
146
145
  /**
147
- * Accessible name for the board, which is the one thing a consumer must write.
146
+ * The accessible name for the board. Required.
148
147
  *
149
148
  * A document has no name of its own in the format, and "Canvas" names the
150
149
  * widget rather than the thinking on it.
151
150
  */
152
151
  label: string;
153
152
  /**
154
- * What the field a label is edited in is called, with `{name}` for what it
155
- * labels.
153
+ * The accessible name of the field for editing a label, with `{name}` for what
154
+ * the label belongs to.
156
155
  */
157
156
  labelEditorLabel: string;
158
157
  /**
159
- * How a card says where its connections go, with `{cards}` as the list.
158
+ * The text read with a card to say where its connections go, with `{cards}`
159
+ * as the list.
160
160
  *
161
161
  * The list is joined the way the page's language joins one, "Second and
162
162
  * Third", rather than with a comma this component chose.
163
163
  */
164
164
  leadsToLabel: string;
165
165
  /**
166
- * The order a reader meets the cards in.
166
+ * The order the arrow keys and screen readers move through the cards:
167
+ * `spatial` or `edges`.
167
168
  *
168
169
  * `spatial` bands them into rows and reads each row across, which is how a
169
170
  * person reads a board laid out on a grid and is a heuristic a loose board
@@ -175,8 +176,8 @@ export declare class HelixHeadlessCanvas extends HelixHeadlessCanvas_base {
175
176
  */
176
177
  order?: 'spatial' | 'edges';
177
178
  /**
178
- * How every connection travels, where it does not say: `straight`, or `step`
179
- * for right angles.
179
+ * The route every connection takes when it sets no `path` of its own:
180
+ * `straight`, or `step` for right angles.
180
181
  *
181
182
  * Absent is a curve. A flowchart wants `step` on all of its edges, and
182
183
  * writing it once here rather than on each is the reason this exists; an
@@ -184,7 +185,7 @@ export declare class HelixHeadlessCanvas extends HelixHeadlessCanvas_base {
184
185
  */
185
186
  path?: 'straight' | 'step';
186
187
  /**
187
- * Keeps every card where its author put it.
188
+ * Prevents every card from being moved, connected, or removed.
188
189
  *
189
190
  * **The attribute is `readonly`, which is the platform's spelling**, and the
190
191
  * reverse of an `editable` switch on purpose: a form control takes input
@@ -194,13 +195,13 @@ export declare class HelixHeadlessCanvas extends HelixHeadlessCanvas_base {
194
195
  */
195
196
  readOnly: boolean;
196
197
  /**
197
- * What the live region says when a reader picks up a connection's end, with
198
- * `{from}` and `{to}`.
198
+ * The text announced when a connection's end is picked up, with `{from}` and
199
+ * `{to}`.
199
200
  */
200
201
  reconnectingLabel: string;
201
202
  /**
202
- * The cards and connections the reader selected, by name, comma separated,
203
- * and empty for none.
203
+ * The names of the selected cards and connections, comma separated. Empty
204
+ * when nothing is selected.
204
205
  *
205
206
  * **Comma separated, the way `Listbox` writes a multiple value**, so a page
206
207
  * reads one selection the same way wherever it comes from. A click, or a key
@@ -224,7 +225,7 @@ export declare class HelixHeadlessCanvas extends HelixHeadlessCanvas_base {
224
225
  * A label being edited in place: whose, and what it said before.
225
226
  */
226
227
  private editing;
227
- /** What it says when a reader stops connecting without asking. */
228
+ /** The text announced when a connection is stopped before it is requested. */
228
229
  stoppedLabel: string;
229
230
  /** The card or connection that holds the board's one tab stop, by its key. */
230
231
  private stop;
@@ -770,7 +771,7 @@ export declare class HelixHeadlessCanvas extends HelixHeadlessCanvas_base {
770
771
  */
771
772
  private get free();
772
773
  /**
773
- * Where the board is looking: the document's point at the middle of the view,
774
+ * The board's current view: the document's point at the middle of the view,
774
775
  * and the zoom.
775
776
  *
776
777
  * **Read to save a view and written to restore one**, which a consumer keeping
@@ -794,7 +795,7 @@ export declare class HelixHeadlessCanvas extends HelixHeadlessCanvas_base {
794
795
  */
795
796
  toJsonCanvas(): CanvasDocument;
796
797
  /**
797
- * Fits the whole board into the box, centered, and never magnified past its
798
+ * Fits the whole board into its box, centered, and never zoomed in past its
798
799
  * own size.
799
800
  *
800
801
  * **Automatic while nobody has touched the board, and public for when they
@@ -4,19 +4,17 @@ import { type PropertyValues, type TemplateResult } from 'lit';
4
4
  * @summary Groups related content and actions into a single surface.
5
5
  *
6
6
  * @description
7
- * Regions are slots rather than separate elements, because a header, body, and
8
- * footer carry no state, no behavior, and no API of their own. Slotting them
9
- * costs one custom element instead of five and lets the consumer bring their
10
- * own markup, so a title can be a real `<h2>` rather than an emulated one.
7
+ * The header, body, and footer regions are slots, because they have no state,
8
+ * behavior, or API of their own. You bring your own markup, so a title can be a
9
+ * real `<h2>`.
11
10
  *
12
- * The host is the surface. A wrapper `<div part="container">` would be a second
13
- * box doing nothing the host cannot: the element itself takes the border, the
14
- * radius, and the grid, and a consumer styles `Card` rather than reaching
15
- * through `::part`. One node instead of two, on every card on the page.
11
+ * The host is the surface. The element itself takes the border, the radius, and
12
+ * the grid, so you style `Card` directly and there is no wrapper part to reach
13
+ * through with `::part`.
16
14
  *
17
- * Name the card with `aria-label` or `aria-labelledby`. That is the only
18
- * naming that survives server rendering: reading a title out of the light DOM
19
- * needs a DOM, and the server has none.
15
+ * Name the card with `aria-label` or `aria-labelledby`. These are the only
16
+ * names that work with server rendering, because reading a title from the light
17
+ * DOM needs a DOM, and the server has none.
20
18
  *
21
19
  * @since 0.1.0
22
20
  * @status stable
@@ -31,7 +29,7 @@ import { type PropertyValues, type TemplateResult } from 'lit';
31
29
  */
32
30
  export declare class HelixHeadlessCard extends HelixElement {
33
31
  /**
34
- * Puts the media after the content instead of before it.
32
+ * Places the media after the content. By default it comes before.
35
33
  *
36
34
  * **A figure that concludes a card is the same region as one that opens it**,
37
35
  * and the only thing that differs is which edge it is flush against. Media is