@fusion.dev/helix-headless 0.143.0 → 0.145.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 (314) hide show
  1. package/custom-elements.json +16990 -1383
  2. package/dist/accordion/item/accordion-item.d.ts +48 -12
  3. package/dist/accordion/item/accordion-item.js +26 -5
  4. package/dist/accordion/root/accordion-root.d.ts +6 -0
  5. package/dist/accordion/root/accordion-root.js +7 -1
  6. package/dist/announcement/root/announcement-root.d.ts +21 -1
  7. package/dist/announcement/root/announcement-root.js +36 -1
  8. package/dist/app-header/root/app-header-root.d.ts +7 -0
  9. package/dist/app-header/root/app-header-root.js +5 -1
  10. package/dist/app-header/sectioning.d.ts +7 -0
  11. package/dist/app-header/sectioning.js +26 -0
  12. package/dist/area-chart/root/area-chart-root.d.ts +12 -4
  13. package/dist/area-chart/root/area-chart-root.js +24 -7
  14. package/dist/avatar/root/avatar-root.d.ts +14 -0
  15. package/dist/avatar/root/avatar-root.js +23 -9
  16. package/dist/badge/root/badge-root.d.ts +11 -7
  17. package/dist/badge/root/badge-root.js +1 -1
  18. package/dist/bar-chart/root/bar-chart-root.d.ts +12 -3
  19. package/dist/bar-chart/root/bar-chart-root.js +17 -10
  20. package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +32 -1
  21. package/dist/breadcrumbs/root/breadcrumbs-root.js +25 -2
  22. package/dist/button/root/button-root.d.ts +47 -1
  23. package/dist/button/root/button-root.js +38 -4
  24. package/dist/callout/root/callout-root.d.ts +18 -1
  25. package/dist/callout/root/callout-root.js +15 -4
  26. package/dist/canvas/root/canvas-root.d.ts +38 -3
  27. package/dist/canvas/root/canvas-root.js +121 -40
  28. package/dist/card/root/card-root.d.ts +30 -1
  29. package/dist/card/root/card-root.js +38 -5
  30. package/dist/carousel/root/carousel-root.d.ts +90 -0
  31. package/dist/carousel/root/carousel-root.js +134 -12
  32. package/dist/chat/composer/chat-composer.d.ts +38 -6
  33. package/dist/chat/composer/chat-composer.js +42 -9
  34. package/dist/chat/message/chat-message.d.ts +32 -1
  35. package/dist/chat/message/chat-message.js +25 -9
  36. package/dist/chat/naming.d.ts +22 -0
  37. package/dist/chat/naming.js +12 -0
  38. package/dist/chat/relative-clock.d.ts +39 -0
  39. package/dist/chat/relative-clock.js +31 -0
  40. package/dist/chat/root/chat-root.d.ts +36 -0
  41. package/dist/chat/root/chat-root.js +24 -1
  42. package/dist/checkbox/root/checkbox-root.js +2 -0
  43. package/dist/checkbox-group/root/checkbox-group-root.d.ts +53 -3
  44. package/dist/checkbox-group/root/checkbox-group-root.js +71 -22
  45. package/dist/code-block/lines.d.ts +13 -0
  46. package/dist/code-block/lines.js +2 -0
  47. package/dist/code-block/root/code-block-root.d.ts +38 -1
  48. package/dist/code-block/root/code-block-root.js +28 -7
  49. package/dist/color-input/root/color-input-root.d.ts +34 -1
  50. package/dist/color-input/root/color-input-root.js +23 -4
  51. package/dist/color-picker/channels.d.ts +26 -0
  52. package/dist/color-picker/channels.js +84 -0
  53. package/dist/color-picker/root/color-picker-root.d.ts +81 -5
  54. package/dist/color-picker/root/color-picker-root.js +103 -10
  55. package/dist/combobox/root/combobox-root.d.ts +38 -3
  56. package/dist/combobox/root/combobox-root.js +64 -2
  57. package/dist/command/root/command-root.d.ts +30 -4
  58. package/dist/command/root/command-root.js +33 -3
  59. package/dist/copy-button/from.d.ts +22 -0
  60. package/dist/copy-button/from.js +28 -0
  61. package/dist/copy-button/root/copy-button-root.d.ts +47 -1
  62. package/dist/copy-button/root/copy-button-root.js +44 -8
  63. package/dist/data-table/root/data-table-root.d.ts +150 -2
  64. package/dist/data-table/root/data-table-root.js +303 -29
  65. package/dist/data-table/tree.d.ts +40 -0
  66. package/dist/data-table/tree.js +55 -0
  67. package/dist/date-input/root/date-input-root.d.ts +73 -4
  68. package/dist/date-input/root/date-input-root.js +93 -43
  69. package/dist/date-picker/root/date-picker-root.d.ts +145 -1
  70. package/dist/date-picker/root/date-picker-root.js +239 -48
  71. package/dist/description-list/item/description-list-item.d.ts +17 -2
  72. package/dist/description-list/item/description-list-item.js +15 -2
  73. package/dist/description-list/root/description-list-root.d.ts +27 -1
  74. package/dist/description-list/root/description-list-root.js +26 -1
  75. package/dist/dialog/description.d.ts +9 -0
  76. package/dist/dialog/description.js +14 -0
  77. package/dist/dialog/root/dialog-root.d.ts +64 -1
  78. package/dist/dialog/root/dialog-root.js +49 -23
  79. package/dist/donut-chart/root/donut-chart-root.d.ts +25 -4
  80. package/dist/donut-chart/root/donut-chart-root.js +21 -6
  81. package/dist/drawer/root/drawer-root.d.ts +63 -2
  82. package/dist/drawer/root/drawer-root.js +95 -19
  83. package/dist/drawer/swipe-start.d.ts +9 -0
  84. package/dist/drawer/swipe-start.js +12 -0
  85. package/dist/drilldown/item/drilldown-item.d.ts +11 -6
  86. package/dist/drilldown/item/drilldown-item.js +8 -5
  87. package/dist/drilldown/root/drilldown-root.d.ts +11 -0
  88. package/dist/drilldown/root/drilldown-root.js +8 -3
  89. package/dist/element-events.generated.js +61 -13
  90. package/dist/empty/root/empty-root.d.ts +1 -1
  91. package/dist/file-input/root/file-input-root.d.ts +47 -0
  92. package/dist/file-input/root/file-input-root.js +60 -22
  93. package/dist/file-input/screen.d.ts +35 -0
  94. package/dist/file-input/screen.js +49 -0
  95. package/dist/filter-input/menu/filter-menu.d.ts +3 -0
  96. package/dist/filter-input/menu/filter-menu.js +8 -4
  97. package/dist/filter-input/root/filter-input-root.d.ts +38 -4
  98. package/dist/filter-input/root/filter-input-root.js +67 -3
  99. package/dist/filter-input/suggest.d.ts +17 -0
  100. package/dist/filter-input/suggest.js +23 -0
  101. package/dist/format-date/options.d.ts +33 -0
  102. package/dist/format-date/options.js +42 -0
  103. package/dist/format-date/root/format-date-root.d.ts +51 -0
  104. package/dist/format-date/root/format-date-root.js +58 -38
  105. package/dist/heatmap/root/heatmap-root.d.ts +23 -6
  106. package/dist/heatmap/root/heatmap-root.js +24 -13
  107. package/dist/icon/index.d.ts +2 -0
  108. package/dist/icon/index.js +2 -0
  109. package/dist/icon/registry.d.ts +37 -0
  110. package/dist/icon/registry.js +83 -0
  111. package/dist/icon/root/icon-root.d.ts +30 -4
  112. package/dist/icon/root/icon-root.js +41 -6
  113. package/dist/icon/root/index.d.ts +2 -0
  114. package/dist/icon/root/index.js +2 -0
  115. package/dist/icon/set.d.ts +1 -0
  116. package/dist/icon/set.js +3 -0
  117. package/dist/image/root/image-root.d.ts +14 -0
  118. package/dist/image/root/image-root.js +23 -2
  119. package/dist/input/root/input-root.d.ts +11 -0
  120. package/dist/input/root/input-root.js +16 -1
  121. package/dist/kbd/root/kbd-root.d.ts +20 -13
  122. package/dist/kbd/root/kbd-root.js +35 -37
  123. package/dist/kbd/shortcut.d.ts +18 -0
  124. package/dist/kbd/shortcut.js +35 -0
  125. package/dist/legend/hidden-series.d.ts +8 -0
  126. package/dist/legend/hidden-series.js +13 -0
  127. package/dist/legend/root/legend-root.d.ts +56 -0
  128. package/dist/legend/root/legend-root.js +54 -5
  129. package/dist/lightbox/item/lightbox-item.d.ts +15 -0
  130. package/dist/lightbox/item/lightbox-item.js +10 -1
  131. package/dist/lightbox/root/lightbox-root.d.ts +61 -1
  132. package/dist/lightbox/root/lightbox-root.js +94 -4
  133. package/dist/line-chart/root/line-chart-root.d.ts +11 -3
  134. package/dist/line-chart/root/line-chart-root.js +19 -5
  135. package/dist/list/item/list-item.d.ts +68 -1
  136. package/dist/list/item/list-item.js +66 -4
  137. package/dist/list/numbering.d.ts +14 -0
  138. package/dist/list/numbering.js +8 -0
  139. package/dist/list/root/list-root.d.ts +106 -9
  140. package/dist/list/root/list-root.js +189 -4
  141. package/dist/list/selection.d.ts +19 -0
  142. package/dist/list/selection.js +21 -0
  143. package/dist/listbox/root/listbox-root.d.ts +74 -3
  144. package/dist/listbox/root/listbox-root.js +86 -9
  145. package/dist/loader/busy.d.ts +17 -0
  146. package/dist/loader/busy.js +24 -0
  147. package/dist/loader/root/loader-root.d.ts +37 -0
  148. package/dist/loader/root/loader-root.js +52 -3
  149. package/dist/map/root/map-root.d.ts +6 -2
  150. package/dist/map/root/map-root.js +5 -2
  151. package/dist/megamenu/root/megamenu-root.d.ts +21 -0
  152. package/dist/megamenu/root/megamenu-root.js +16 -2
  153. package/dist/menu/index.d.ts +1 -0
  154. package/dist/menu/index.js +1 -0
  155. package/dist/menu/item/menu-item.d.ts +38 -11
  156. package/dist/menu/item/menu-item.js +33 -1
  157. package/dist/menu/root/menu-root.d.ts +25 -1
  158. package/dist/menu/root/menu-root.js +63 -6
  159. package/dist/menu/section/menu-section.d.ts +55 -0
  160. package/dist/menu/section/menu-section.js +60 -0
  161. package/dist/meter/root/meter-root.d.ts +7 -0
  162. package/dist/meter/root/meter-root.js +6 -3
  163. package/dist/navigation/root/navigation-root.d.ts +16 -1
  164. package/dist/navigation/root/navigation-root.js +27 -1
  165. package/dist/notifications/feed-keys.d.ts +10 -0
  166. package/dist/notifications/feed-keys.js +14 -0
  167. package/dist/notifications/notification/notification.d.ts +17 -0
  168. package/dist/notifications/notification/notification.js +21 -2
  169. package/dist/notifications/root/notifications-root.d.ts +60 -0
  170. package/dist/notifications/root/notifications-root.js +76 -1
  171. package/dist/number-input/root/number-input-root.d.ts +47 -0
  172. package/dist/number-input/root/number-input-root.js +58 -22
  173. package/dist/object-inspector/root/object-inspector-root.d.ts +98 -16
  174. package/dist/object-inspector/root/object-inspector-root.js +180 -80
  175. package/dist/object-inspector/rows.d.ts +57 -0
  176. package/dist/object-inspector/rows.js +86 -0
  177. package/dist/option/root/option-root.d.ts +54 -5
  178. package/dist/option/root/option-root.js +34 -5
  179. package/dist/outline/levels.d.ts +31 -0
  180. package/dist/outline/levels.js +23 -0
  181. package/dist/outline/root/outline-root.d.ts +68 -3
  182. package/dist/outline/root/outline-root.js +73 -8
  183. package/dist/pagination/size/pagination-size.d.ts +11 -2
  184. package/dist/pagination/size/pagination-size.js +19 -4
  185. package/dist/pin-input/format.d.ts +7 -0
  186. package/dist/pin-input/format.js +16 -0
  187. package/dist/pin-input/root/pin-input-root.d.ts +21 -0
  188. package/dist/pin-input/root/pin-input-root.js +29 -2
  189. package/dist/popover/root/popover-root.d.ts +62 -4
  190. package/dist/popover/root/popover-root.js +53 -5
  191. package/dist/progress/root/progress-root.d.ts +7 -0
  192. package/dist/progress/root/progress-root.js +9 -3
  193. package/dist/qr-code/export.d.ts +31 -0
  194. package/dist/qr-code/export.js +10 -0
  195. package/dist/qr-code/root/qr-code-root.d.ts +26 -0
  196. package/dist/qr-code/root/qr-code-root.js +49 -2
  197. package/dist/radio/group/radio-group.d.ts +17 -0
  198. package/dist/radio/group/radio-group.js +14 -1
  199. package/dist/rating/root/rating-root.d.ts +25 -0
  200. package/dist/rating/root/rating-root.js +46 -4
  201. package/dist/scatter-chart/root/scatter-chart-root.d.ts +17 -3
  202. package/dist/scatter-chart/root/scatter-chart-root.js +25 -7
  203. package/dist/scroll-area/root/scroll-area-root.d.ts +113 -0
  204. package/dist/scroll-area/root/scroll-area-root.js +218 -3
  205. package/dist/scroll-area/scrollbar.d.ts +65 -0
  206. package/dist/scroll-area/scrollbar.js +24 -0
  207. package/dist/select/root/select-root.d.ts +24 -0
  208. package/dist/select/root/select-root.js +21 -7
  209. package/dist/skeleton/root/skeleton-root.d.ts +25 -0
  210. package/dist/skeleton/root/skeleton-root.js +17 -2
  211. package/dist/slider/root/slider-root.d.ts +39 -0
  212. package/dist/slider/root/slider-root.js +45 -9
  213. package/dist/splitter/root/splitter-root.d.ts +13 -0
  214. package/dist/splitter/root/splitter-root.js +20 -2
  215. package/dist/splitter/snap.d.ts +9 -0
  216. package/dist/splitter/snap.js +12 -0
  217. package/dist/stat/root/stat-root.d.ts +2 -0
  218. package/dist/stat/root/stat-root.js +1 -1
  219. package/dist/steps/reach.d.ts +15 -0
  220. package/dist/steps/reach.js +12 -0
  221. package/dist/steps/root/steps-root.d.ts +30 -0
  222. package/dist/steps/root/steps-root.js +53 -0
  223. package/dist/steps/step/step.d.ts +39 -2
  224. package/dist/steps/step/step.js +29 -7
  225. package/dist/switch/root/switch-root.d.ts +12 -2
  226. package/dist/switch/root/switch-root.js +6 -1
  227. package/dist/table/column/table-column.d.ts +11 -0
  228. package/dist/table/column/table-column.js +6 -1
  229. package/dist/table/root/table-root.d.ts +101 -0
  230. package/dist/table/root/table-root.js +166 -5
  231. package/dist/table/row/table-row.d.ts +47 -1
  232. package/dist/table/row/table-row.js +39 -2
  233. package/dist/tabs/panel/tab-panel.d.ts +9 -5
  234. package/dist/tabs/panel/tab-panel.js +3 -4
  235. package/dist/tabs/root/tabs-root.d.ts +25 -1
  236. package/dist/tabs/root/tabs-root.js +21 -3
  237. package/dist/tabs/tab/tab.d.ts +36 -4
  238. package/dist/tabs/tab/tab.js +46 -3
  239. package/dist/tag/group/tag-group.d.ts +107 -0
  240. package/dist/tag/group/tag-group.js +157 -0
  241. package/dist/tag/index.d.ts +1 -0
  242. package/dist/tag/index.js +1 -0
  243. package/dist/tag/root/tag-root.d.ts +60 -0
  244. package/dist/tag/root/tag-root.js +74 -18
  245. package/dist/tag/selection.d.ts +10 -0
  246. package/dist/tag/selection.js +12 -0
  247. package/dist/textarea/grow.d.ts +22 -0
  248. package/dist/textarea/grow.js +20 -0
  249. package/dist/textarea/root/textarea-root.d.ts +9 -0
  250. package/dist/textarea/root/textarea-root.js +9 -1
  251. package/dist/time-input/root/time-input-root.d.ts +44 -5
  252. package/dist/time-input/root/time-input-root.js +69 -39
  253. package/dist/time-picker/root/time-picker-root.d.ts +54 -8
  254. package/dist/time-picker/root/time-picker-root.js +121 -91
  255. package/dist/timeline/group/timeline-group.d.ts +46 -0
  256. package/dist/timeline/group/timeline-group.js +37 -0
  257. package/dist/timeline/index.d.ts +1 -0
  258. package/dist/timeline/index.js +1 -0
  259. package/dist/timeline/root/timeline-root.d.ts +10 -3
  260. package/dist/toast/hotkey.d.ts +22 -0
  261. package/dist/toast/hotkey.js +23 -0
  262. package/dist/toast/item/toast-item.d.ts +26 -18
  263. package/dist/toast/item/toast-item.js +55 -48
  264. package/dist/toast/root/toast-root.d.ts +42 -8
  265. package/dist/toast/root/toast-root.js +64 -4
  266. package/dist/toggle/group/toggle-group.d.ts +57 -15
  267. package/dist/toggle/group/toggle-group.js +69 -9
  268. package/dist/toggle/root/toggle-root.d.ts +12 -1
  269. package/dist/toggle/root/toggle-root.js +11 -3
  270. package/dist/toolbar/root/toolbar-root.d.ts +13 -0
  271. package/dist/toolbar/root/toolbar-root.js +15 -5
  272. package/dist/tooltip/focus-target.d.ts +6 -0
  273. package/dist/tooltip/focus-target.js +9 -0
  274. package/dist/tooltip/root/tooltip-root.d.ts +42 -17
  275. package/dist/tooltip/root/tooltip-root.js +50 -9
  276. package/dist/tour/naming.d.ts +30 -0
  277. package/dist/tour/naming.js +10 -0
  278. package/dist/tour/root/tour-root.d.ts +35 -0
  279. package/dist/tour/root/tour-root.js +56 -5
  280. package/dist/tour/stop/tour-stop.d.ts +53 -8
  281. package/dist/tour/stop/tour-stop.js +45 -15
  282. package/dist/tour/wait.d.ts +11 -0
  283. package/dist/tour/wait.js +19 -0
  284. package/dist/tree/item/tree-item.d.ts +54 -1
  285. package/dist/tree/item/tree-item.js +89 -20
  286. package/dist/tree/root/tree-root.d.ts +37 -0
  287. package/dist/tree/root/tree-root.js +51 -6
  288. package/dist/tree/selection.d.ts +24 -0
  289. package/dist/tree/selection.js +26 -0
  290. package/dist/trend/root/trend-root.d.ts +13 -0
  291. package/dist/trend/root/trend-root.js +14 -9
  292. package/dist/video/media-events.d.ts +49 -0
  293. package/dist/video/media-events.js +39 -0
  294. package/dist/video/root/video-root.d.ts +99 -13
  295. package/dist/video/root/video-root.js +84 -47
  296. package/dist/video-playlist/menu/video-playlist-menu.d.ts +3 -0
  297. package/dist/video-playlist/menu/video-playlist-menu.js +2 -1
  298. package/dist/video-playlist/order.d.ts +41 -0
  299. package/dist/video-playlist/order.js +34 -0
  300. package/dist/video-playlist/root/video-playlist-root.d.ts +70 -2
  301. package/dist/video-playlist/root/video-playlist-root.js +60 -16
  302. package/dist/virtual-list/controls.d.ts +4 -0
  303. package/dist/virtual-list/controls.js +30 -0
  304. package/dist/virtual-list/fill.d.ts +30 -0
  305. package/dist/virtual-list/fill.js +39 -0
  306. package/dist/virtual-list/keys.d.ts +15 -0
  307. package/dist/virtual-list/keys.js +24 -0
  308. package/dist/virtual-list/root/virtual-list-root.d.ts +155 -23
  309. package/dist/virtual-list/root/virtual-list-root.js +175 -34
  310. package/lint.json +1 -1
  311. package/package.json +5 -5
  312. package/types/jsx.d.ts +8871 -1286
  313. package/types/svelte.d.ts +3 -0
  314. package/types/vue.d.ts +1918 -269
@@ -36,7 +36,7 @@ let HelixHeadlessBadge = class HelixHeadlessBadge extends HelixElement {
36
36
  data-blank=${blank ? '' : nothing}
37
37
  data-single=${text.length <= 1 ? '' : nothing}
38
38
  role="status"
39
- aria-label=${this.label !== '' && announced ? this.label : nothing}
39
+ aria-label=${announced ? this.label || text : nothing}
40
40
  >${blank ? html `<span aria-hidden="true">${text}</span>` : text}</span
41
41
  >`;
42
42
  }
@@ -15,11 +15,18 @@ declare const HelixHeadlessBarChart_base: typeof HelixElement & (new (...args: a
15
15
  * and 43px in a wide one, and SVG has no setting that keeps text at one size
16
16
  * the way `vector-effect` does for strokes.
17
17
  *
18
- * The table is the accessible representation, and the drawing is `aria-hidden`,
19
- * so screen reader users get the numbers themselves. The `summary` part names
18
+ * The table is the accessible representation, and the drawing is hidden from
19
+ * screen readers, so they get the numbers themselves. The `summary` part names
20
20
  * the chart, from `label` or the table's caption, and gives each series' highest
21
21
  * reading.
22
22
  *
23
+ * **The plot is read by key.** It takes focus, named by `label` or the caption.
24
+ * The arrows along the categories move from one to the next, which is left and
25
+ * right for columns and up and down for `orientation="horizontal"`. Home and
26
+ * End go to the first and the last, and the other pair of arrows moves among
27
+ * the series of a category. The tooltip follows, the `live` part says the
28
+ * reading in words, and Escape puts the tooltip away.
29
+ *
23
30
  * The component writes the custom properties below with numbers it computes,
24
31
  * and the stylesheet that draws the chart reads them. Do not set them yourself.
25
32
  *
@@ -41,8 +48,9 @@ declare const HelixHeadlessBarChart_base: typeof HelixElement & (new (...args: a
41
48
  * @csspart label - One category's name.
42
49
  * @csspart labels - The row of category names.
43
50
  * @csspart line - A series drawn as a line, named in `lines`.
51
+ * @csspart live - The readout: a polite live region that says the reading the keys moved to. Hide it visually.
44
52
  * @csspart mark - The invisible point the tooltip is anchored to.
45
- * @csspart plot - The drawing.
53
+ * @csspart plot - The drawing, which takes focus to be read by key.
46
54
  * @csspart summary - The chart's name and each series' highest reading, written as a sentence for screen readers. Hide it visually.
47
55
  * @csspart svg - The drawing surface the bars and lines sit on.
48
56
  * @csspart tick - One number on an axis.
@@ -55,6 +63,7 @@ declare const HelixHeadlessBarChart_base: typeof HelixElement & (new (...args: a
55
63
  * @csspart tooltip-arrow-top - The arrow while the bubble is above the reading, on the bubble's bottom edge. Set together with `tooltip-arrow`.
56
64
  * @csspart tooltip-bottom - The bubble while it is below the reading. Set together with `tooltip`.
57
65
  * @csspart tooltip-cell - One column's name and value inside the tooltip.
66
+ * @csspart tooltip-cell-current - The cell the series keys rest on, while they rest there. Set alongside `tooltip-cell`.
58
67
  * @csspart tooltip-label - The reading's category name inside the tooltip.
59
68
  * @csspart tooltip-left - The bubble while it is left of the reading. Set together with `tooltip`.
60
69
  * @csspart tooltip-name - A column's name inside the tooltip.
@@ -37,9 +37,10 @@ let HelixHeadlessBarChart = class HelixHeadlessBarChart extends MixinChartSource
37
37
  }
38
38
  const scaled = this.scaled;
39
39
  const own = (one) => scaled.has(one.name.trim().toLowerCase());
40
- const values = series.flatMap((one) => one.points.map((point) => point.value));
40
+ const shown = series.filter((one) => this.showsSeries(one.name));
41
+ const values = shown.flatMap((one) => one.points.map((point) => point.value));
41
42
  const on = (which) => {
42
- const found = series.filter(which).flatMap((one) => one.points.map((point) => point.value));
43
+ const found = shown.filter(which).flatMap((one) => one.points.map((point) => point.value));
43
44
  return found.length > 0 ? found : values.length > 0 ? values : [0];
44
45
  };
45
46
  const [low, high] = extent(scaled.size === 0 ? on(() => true) : on((one) => !own(one)));
@@ -72,7 +73,7 @@ let HelixHeadlessBarChart = class HelixHeadlessBarChart extends MixinChartSource
72
73
  return [`${one.name} ${top.label} ${text}`];
73
74
  });
74
75
  const named = this.named ? `${this.named}. ` : '';
75
- return html `<p part="summary">${named}${this.highestLabel}: ${highest.join('; ')}.</p>`;
76
+ return html `<p id="helix-chart-summary" part="summary">${named}${this.highestLabel}: ${highest.join('; ')}.</p>`;
76
77
  }
77
78
  renderPlot(series, categories, y, domain, floor, z) {
78
79
  const sideways = this.orientation === 'horizontal';
@@ -83,7 +84,7 @@ let HelixHeadlessBarChart = class HelixHeadlessBarChart extends MixinChartSource
83
84
  const against = (one) => z !== undefined && own(one) ? z : y;
84
85
  const columns = series
85
86
  .map((one, index) => ({ one, slots: byRow(one, categories.length), tone: index }))
86
- .filter(({ one }) => !lined.has(one.name.trim().toLowerCase()));
87
+ .filter(({ one }) => !lined.has(one.name.trim().toLowerCase()) && this.showsSeries(one.name));
87
88
  const stride = (slot * 0.72) / Math.max(columns.length, 1);
88
89
  const gap = columns.length > 1 ? stride * 0.08 : 0;
89
90
  const thickness = stride - gap;
@@ -113,11 +114,16 @@ let HelixHeadlessBarChart = class HelixHeadlessBarChart extends MixinChartSource
113
114
  />`;
114
115
  };
115
116
  return html `<div
116
- aria-hidden="true"
117
+ aria-describedby=${this.named ? 'helix-chart-summary' : nothing}
118
+ aria-label=${this.named || nothing}
119
+ aria-labelledby=${this.named ? nothing : 'helix-chart-summary'}
117
120
  id=${CHART_PLOT}
118
121
  part="plot"
122
+ role="application"
123
+ tabindex="0"
119
124
  >
120
125
  <svg part="svg"
126
+ aria-hidden="true"
121
127
  data-mirror
122
128
  preserveAspectRatio="none"
123
129
  viewBox="0 0 ${PLOT_WIDTH} ${PLOT_HEIGHT}"
@@ -152,7 +158,7 @@ let HelixHeadlessBarChart = class HelixHeadlessBarChart extends MixinChartSource
152
158
  : bar(point.value, index, depth, tone, against(one));
153
159
  })}
154
160
  </g>`)}
155
- ${series.map((one) => lined.has(one.name.trim().toLowerCase())
161
+ ${series.map((one) => lined.has(one.name.trim().toLowerCase()) && this.showsSeries(one.name)
156
162
  ? this.renderLine(one, series.indexOf(one), slot, against(one), sideways)
157
163
  : nothing)}
158
164
  </svg>
@@ -225,12 +231,13 @@ let HelixHeadlessBarChart = class HelixHeadlessBarChart extends MixinChartSource
225
231
  const at = this.pointer.at;
226
232
  const series = this.series;
227
233
  if (at < 0 || series.length === 0) {
228
- return drawTooltip(this.sourceRows, at, this.tag('tooltip'));
234
+ return drawTooltip(this.sourceRows, at, this.tag('tooltip'), undefined, undefined, this.pointer);
229
235
  }
230
- const values = series
236
+ const shown = series.filter((one) => this.showsSeries(one.name));
237
+ const values = shown
231
238
  .map((one) => byRow(one, this.readings)[at]?.value)
232
239
  .filter((one) => one !== undefined);
233
- const all = series.flatMap((one) => one.points.map((point) => point.value));
240
+ const all = shown.flatMap((one) => one.points.map((point) => point.value));
234
241
  const [low, high] = extent(all.length > 0 ? all : [0]);
235
242
  const domain = [Math.min(0, low), Math.max(0, high)];
236
243
  const sideways = this.orientation === 'horizontal';
@@ -243,7 +250,7 @@ let HelixHeadlessBarChart = class HelixHeadlessBarChart extends MixinChartSource
243
250
  placement: sideways ? (this.pointer.mirrored ? 'left' : 'right') : 'top',
244
251
  x: sideways ? `${far}%` : `${across}%`,
245
252
  y: sideways ? `${across}%` : `${far}%`,
246
- }, (cell) => this.seriesOf(cell));
253
+ }, (cell) => this.seriesOf(cell), this.pointer);
247
254
  }
248
255
  };
249
256
  __decorate([
@@ -1,5 +1,17 @@
1
1
  import { HelixElement } from '@fusion.dev/helix-core';
2
- import { type PropertyValues, type TemplateResult } from 'lit';
2
+ import { nothing, type PropertyValues, type TemplateResult } from 'lit';
3
+ import '../breadcrumb/breadcrumb.js';
4
+ /** One step of a trail written as data, for `items`. */
5
+ export interface BreadcrumbItem {
6
+ /** The URL the step links to. The last step is the current page and takes none. */
7
+ href?: string;
8
+ /** The step's words. */
9
+ label: string;
10
+ /** The link's `rel`. */
11
+ rel?: string;
12
+ /** Where the link opens. */
13
+ target?: string;
14
+ }
3
15
  /**
4
16
  * @summary Shows the path to the current page.
5
17
  *
@@ -19,6 +31,10 @@ import { type PropertyValues, type TemplateResult } from 'lit';
19
31
  * The trail does not measure itself, and you write its overflow in markup: put
20
32
  * the crumb that holds the folded items where the gap should appear.
21
33
  *
34
+ * A trail built from data, such as a router's matched routes, takes `items`: an
35
+ * array of `{ label, href }`, drawn as crumbs in order, the last one as the
36
+ * current page. Slotted crumbs follow them. Use one way or the other in a trail.
37
+ *
22
38
  * @since 0.1.0
23
39
  * @status stable
24
40
  * @category navigation
@@ -28,15 +44,30 @@ import { type PropertyValues, type TemplateResult } from 'lit';
28
44
  * @slot - The trail's items, in order from the root to the current page. Put
29
45
  * the crumb that holds the folded items where the gap should appear.
30
46
  *
47
+ * @csspart crumb - Each crumb drawn from `items`.
48
+ * @csspart crumb-current - The crumb drawn from `items` for the current page.
49
+ * @csspart crumb-link - The link, or the current page's words, of a crumb drawn from `items`.
50
+ * @csspart crumb-separator - The separator before a crumb drawn from `items`.
51
+ * @csspart crumb-separator-mark - The chevron before a crumb drawn from `items`.
31
52
  * @csspart list - The ordered list.
32
53
  */
33
54
  export declare class HelixHeadlessBreadcrumbs extends HelixElement {
55
+ /**
56
+ * The trail as data, drawn as crumbs before any you slot. The last item is the
57
+ * current page.
58
+ *
59
+ * React Aria's `items`. A property only: a trail is built by script, and an
60
+ * attribute would put the whole path into the markup twice.
61
+ */
62
+ items: BreadcrumbItem[];
34
63
  /**
35
64
  * The landmark's name, read by screen readers. An `aria-label` on the host
36
65
  * wins over it.
37
66
  */
38
67
  label: string;
39
68
  protected willUpdate(changed: PropertyValues): void;
69
+ /** The crumbs `items` describes, each a crumb of this tier. */
70
+ protected renderItems(): TemplateResult | typeof nothing;
40
71
  protected render(): TemplateResult;
41
72
  }
42
73
  declare global {
@@ -5,23 +5,46 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
7
  import { customElement, HelixElement, hostAria } from '@fusion.dev/helix-core';
8
- import { html } from 'lit';
8
+ import { nothing } from 'lit';
9
9
  import { property } from 'lit/decorators.js';
10
+ import { repeat } from 'lit/directives/repeat.js';
11
+ import { html } from 'lit/static-html.js';
12
+ import '../breadcrumb/breadcrumb.js';
10
13
  let HelixHeadlessBreadcrumbs = class HelixHeadlessBreadcrumbs extends HelixElement {
11
14
  constructor() {
12
15
  super(...arguments);
16
+ this.items = [];
13
17
  this.label = 'Breadcrumb';
14
18
  }
15
19
  willUpdate(changed) {
16
20
  super.willUpdate(changed);
17
21
  hostAria(this.internals, { label: this.label, role: 'navigation' });
18
22
  }
23
+ renderItems() {
24
+ if (this.items.length === 0) {
25
+ return nothing;
26
+ }
27
+ const crumb = this.tag('breadcrumb');
28
+ const last = this.items.length - 1;
29
+ return html `${repeat(this.items, (item, index) => html `<${crumb}
30
+ part="crumb${index === last ? ' crumb-current' : ''}"
31
+ exportparts="link: crumb-link, separator: crumb-separator, separator-mark: crumb-separator-mark"
32
+ href=${index === last ? nothing : (item.href ?? nothing)}
33
+ rel=${item.rel ?? nothing}
34
+ target=${item.target ?? nothing}
35
+ ?current=${index === last}
36
+ >${item.label}</${crumb}
37
+ >`)}`;
38
+ }
19
39
  render() {
20
40
  return html `<ol part="list" role="list">
21
- <slot></slot>
41
+ ${this.renderItems()}<slot></slot>
22
42
  </ol>`;
23
43
  }
24
44
  };
45
+ __decorate([
46
+ property({ attribute: false })
47
+ ], HelixHeadlessBreadcrumbs.prototype, "items", void 0);
25
48
  __decorate([
26
49
  property()
27
50
  ], HelixHeadlessBreadcrumbs.prototype, "label", void 0);
@@ -1,5 +1,5 @@
1
1
  import { AriaForwardController, HelixFormElement } from '@fusion.dev/helix-core';
2
- import { type PropertyValues, type TemplateResult } from 'lit';
2
+ import { nothing, type PropertyValues, type TemplateResult } from 'lit';
3
3
  /**
4
4
  * @summary Triggers an action, submits a form, or navigates.
5
5
  *
@@ -29,6 +29,9 @@ import { type PropertyValues, type TemplateResult } from 'lit';
29
29
  * As the first submit button in its form, it is the form's default button:
30
30
  * Enter in a text field of the form presses it, as it presses a native one.
31
31
  *
32
+ * Set `pending` while the action a press started is still running. The button
33
+ * keeps focus and refuses presses, and a reader on it hears `pending-label`.
34
+ *
32
35
  * @since 0.1.0
33
36
  * @status stable
34
37
  * @category actions
@@ -39,7 +42,10 @@ import { type PropertyValues, type TemplateResult } from 'lit';
39
42
  * @slot start - Content before the label, usually an icon.
40
43
  *
41
44
  * @csspart button - The inner control.
45
+ * @csspart live - The live region that says `pending-label` when the button becomes pending under focus. It is rendered from the first time the button is pending, and the styled button clips it out of view.
42
46
  * @csspart text - The button's words, which the styled button trims to their capitals and baseline so the letters sit at the middle in any font.
47
+ *
48
+ * @cssstate pending - The button is pending: `pending` is set.
43
49
  */
44
50
  export declare class HelixHeadlessButton extends HelixFormElement {
45
51
  protected readonly aria: AriaForwardController;
@@ -157,6 +163,24 @@ export declare class HelixHeadlessButton extends HelixFormElement {
157
163
  * "button" and nothing else.
158
164
  */
159
165
  label: string;
166
+ /**
167
+ * Whether the action the button started is still running.
168
+ *
169
+ * A pending button keeps focus and stays in the tab order, and refuses every
170
+ * press: a click, Enter and Space, and Enter in a field of its form. The
171
+ * click does not reach your listeners. The inner control carries
172
+ * `aria-busy` and `aria-disabled`, and when the button becomes pending while
173
+ * it has focus, a reader hears `pending-label`. The styled button draws a
174
+ * turning ring over its words.
175
+ *
176
+ * `disabled` takes the button out of reach. Use `pending` for the wait after
177
+ * a press, so focus stays where the reader left it.
178
+ */
179
+ pending: boolean;
180
+ /**
181
+ * What a reader hears when the button becomes pending while it has focus.
182
+ */
183
+ pendingLabel: string;
160
184
  /**
161
185
  * What kind of panel this button opens, where it opens one: `menu` for a
162
186
  * `Menu`.
@@ -167,6 +191,27 @@ export declare class HelixHeadlessButton extends HelixFormElement {
167
191
  * reported collapsed and expanded and no popup.
168
192
  */
169
193
  popup?: 'dialog' | 'grid' | 'listbox' | 'menu' | 'tree';
194
+ /**
195
+ * The status region, rendered from the first time the button is pending, so
196
+ * a button that never waits carries no live region.
197
+ */
198
+ private readonly status;
199
+ /**
200
+ * Says `pendingLabel` when the button becomes pending under focus, and
201
+ * clears it when the wait ends.
202
+ *
203
+ * **Only under focus**, as React Aria announces it: the reader who pressed
204
+ * the button is the one waiting, and a button elsewhere on the page that
205
+ * starts waiting is not news to them. The region arrives empty and takes its
206
+ * words a frame later, since a region that arrives with its words is read
207
+ * inconsistently.
208
+ */
209
+ private sayPending;
210
+ /**
211
+ * @internal The live region a pending button speaks in, for a subclass that
212
+ * replaces the template, as `CopyButton` does.
213
+ */
214
+ protected renderLive(): TemplateResult | typeof nothing;
170
215
  /** Moves focus to the inner control, so the host is never the focus target. */
171
216
  static shadowRootOptions: ShadowRootInit;
172
217
  private readonly handleClick;
@@ -249,6 +294,7 @@ export declare class HelixHeadlessButton extends HelixFormElement {
249
294
  * fixes and would only appear on the browsers that work.
250
295
  */
251
296
  private sendCommand;
297
+ protected willUpdate(changed: PropertyValues): void;
252
298
  protected updated(changed: PropertyValues): void;
253
299
  /** @internal A submit button is what its form's implicit submission presses. */
254
300
  protected get submitsForm(): boolean;
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
- import { AriaForwardController, customElement, elementById, HelixFallbackCommandEvent, HelixFormElement, supportsInvokers, } from '@fusion.dev/helix-core';
7
+ import { AriaForwardController, customElement, drawStatus, elementById, HelixFallbackCommandEvent, HelixFormElement, StatusController, supportsInvokers, } from '@fusion.dev/helix-core';
8
8
  import { html, nothing } from 'lit';
9
9
  import { property } from 'lit/decorators.js';
10
10
  let HelixHeadlessButton = class HelixHeadlessButton extends HelixFormElement {
@@ -13,6 +13,7 @@ let HelixHeadlessButton = class HelixHeadlessButton extends HelixFormElement {
13
13
  this.aria = new AriaForwardController(this, {
14
14
  label: () => this.forwardsLabel,
15
15
  target: () => this.partNamed('button'),
16
+ unnamed: 'Give it words, a `label`, or an `aria-label`.',
16
17
  });
17
18
  this.command = '';
18
19
  this.commandFor = '';
@@ -23,7 +24,15 @@ let HelixHeadlessButton = class HelixHeadlessButton extends HelixFormElement {
23
24
  this.formNoValidate = false;
24
25
  this.formTarget = '';
25
26
  this.label = '';
26
- this.handleClick = () => {
27
+ this.pending = false;
28
+ this.pendingLabel = 'Loading';
29
+ this.status = new StatusController(this);
30
+ this.handleClick = (event) => {
31
+ if (this.pending) {
32
+ event.preventDefault();
33
+ event.stopImmediatePropagation();
34
+ return;
35
+ }
27
36
  this.linkCommand();
28
37
  this.sendCommand();
29
38
  if (this.type === 'button') {
@@ -53,7 +62,7 @@ let HelixHeadlessButton = class HelixHeadlessButton extends HelixFormElement {
53
62
  return;
54
63
  }
55
64
  event.preventDefault();
56
- if (!this.isDisabled) {
65
+ if (!this.isDisabled && !this.pending) {
57
66
  this.activate();
58
67
  }
59
68
  };
@@ -61,6 +70,16 @@ let HelixHeadlessButton = class HelixHeadlessButton extends HelixFormElement {
61
70
  get forwardsLabel() {
62
71
  return true;
63
72
  }
73
+ sayPending() {
74
+ const focused = this.renderRoot?.activeElement != null;
75
+ if (!focused && this.status.said === '') {
76
+ return;
77
+ }
78
+ this.status.say(this.pending && focused ? this.pendingLabel : '', { clear: false });
79
+ }
80
+ renderLive() {
81
+ return drawStatus(this.status);
82
+ }
64
83
  static { this.shadowRootOptions = {
65
84
  ...HelixFormElement.shadowRootOptions,
66
85
  delegatesFocus: true,
@@ -131,9 +150,16 @@ let HelixHeadlessButton = class HelixHeadlessButton extends HelixFormElement {
131
150
  }
132
151
  this.commandTarget()?.dispatchEvent(new HelixFallbackCommandEvent(this.command, this));
133
152
  }
153
+ willUpdate(changed) {
154
+ super.willUpdate(changed);
155
+ this.toggleState('pending', this.pending);
156
+ }
134
157
  updated(changed) {
135
158
  super.updated(changed);
136
159
  this.linkCommand();
160
+ if (changed.has('pending') && changed.get('pending') !== undefined) {
161
+ this.sayPending();
162
+ }
137
163
  }
138
164
  get submitsForm() {
139
165
  return this.type === 'submit';
@@ -168,6 +194,8 @@ let HelixHeadlessButton = class HelixHeadlessButton extends HelixFormElement {
168
194
  type="button"
169
195
  aria-expanded=${this.expanded === undefined ? nothing : String(this.expanded)}
170
196
  aria-haspopup=${this.popup ?? nothing}
197
+ aria-busy=${this.pending ? 'true' : nothing}
198
+ aria-disabled=${this.pending ? 'true' : nothing}
171
199
  aria-label=${this.label || nothing}
172
200
  command=${this.command || nothing}
173
201
  tabindex=${stop}
@@ -175,7 +203,7 @@ let HelixHeadlessButton = class HelixHeadlessButton extends HelixFormElement {
175
203
  @click=${this.handleClick}
176
204
  >
177
205
  ${label}
178
- </button>`;
206
+ </button>${this.renderLive()}`;
179
207
  }
180
208
  };
181
209
  __decorate([
@@ -208,6 +236,12 @@ __decorate([
208
236
  __decorate([
209
237
  property()
210
238
  ], HelixHeadlessButton.prototype, "label", void 0);
239
+ __decorate([
240
+ property({ type: Boolean })
241
+ ], HelixHeadlessButton.prototype, "pending", void 0);
242
+ __decorate([
243
+ property({ attribute: 'pending-label' })
244
+ ], HelixHeadlessButton.prototype, "pendingLabel", void 0);
211
245
  __decorate([
212
246
  property({ attribute: false })
213
247
  ], HelixHeadlessButton.prototype, "popup", void 0);
@@ -1,5 +1,6 @@
1
1
  import { HelixElement } from '@fusion.dev/helix-core';
2
2
  import { type PropertyValues, type TemplateResult } from 'lit';
3
+ declare const HelixHeadlessCallout_base: (new (...args: any[]) => import("@fusion.dev/helix-core").DismissibleElement) & typeof HelixElement;
3
4
  /**
4
5
  * @summary A passage set apart as a note, information, a warning, or an error.
5
6
  *
@@ -13,6 +14,10 @@ import { type PropertyValues, type TemplateResult } from 'lit';
13
14
  * and the default disappears with no extra check. The tone's name stays on the
14
15
  * region around it.
15
16
  *
17
+ * Set `dismissible` for a note a reader may put away, as Shoelace's `closable`
18
+ * alert does. The button fires `helix-dismiss` and the callout stays until a
19
+ * listener removes it, so the page decides whether it comes back.
20
+ *
16
21
  * A callout sets a passage apart inside a document and is read where it sits.
17
22
  * For page-level chrome above the masthead that is a live region and can be
18
23
  * dismissed, use `Announcement`.
@@ -24,14 +29,19 @@ import { type PropertyValues, type TemplateResult } from 'lit';
24
29
  * @documentation https://fusion.dev/helix/components/callout
25
30
  *
26
31
  * @slot - The callout's content.
32
+ * @slot dismiss-icon - Replaces the cross inside the dismiss button.
27
33
  * @slot heading - A heading above the content.
28
34
  * @slot icon - Replaces the icon chosen by `tone`.
29
35
  *
36
+ * @event {HelixDismissEvent} helix-dismiss - The dismiss button was pressed. The callout does not remove itself, so remove it in response. Cancelable.
37
+ *
30
38
  * @csspart content - The content region.
39
+ * @csspart dismiss - The button that dismisses the callout, shown when `dismissible` is set.
40
+ * @csspart dismiss-mark - The cross on the dismiss button, shown when the `dismiss-icon` slot is empty.
31
41
  * @csspart icon - The icon region, an image named for the tone.
32
42
  * @csspart icon-mark - The icon for the tone, shown when no icon is slotted.
33
43
  */
34
- export declare class HelixHeadlessCallout extends HelixElement {
44
+ export declare class HelixHeadlessCallout extends HelixHeadlessCallout_base {
35
45
  protected willUpdate(changed: PropertyValues): void;
36
46
  /**
37
47
  * What kind of attention the passage needs.
@@ -66,6 +76,12 @@ export declare class HelixHeadlessCallout extends HelixElement {
66
76
  content: string;
67
77
  viewBox: string;
68
78
  }, _label: string): TemplateResult;
79
+ /**
80
+ * The cross inside the dismiss button, behind a seam, for the reason
81
+ * `renderIcon` gives: the slot answers the page and the method the tier
82
+ * above.
83
+ */
84
+ protected renderDismissIcon(): TemplateResult;
69
85
  protected render(): TemplateResult;
70
86
  }
71
87
  declare global {
@@ -73,3 +89,4 @@ declare global {
73
89
  'helix-headless-callout': HelixHeadlessCallout;
74
90
  }
75
91
  }
92
+ export {};
@@ -4,12 +4,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
- import { customElement, HelixElement, hostAria, TONE_MARKS, toneMark } from '@fusion.dev/helix-core';
8
- import { html } from 'lit';
7
+ import { customElement, drawDismiss, drawDismissGlyph, HelixElement, hostAria, MixinDismissible, TONE_MARKS, toneMark, } from '@fusion.dev/helix-core';
8
+ import { html, nothing } from 'lit';
9
9
  import { property } from 'lit/decorators.js';
10
10
  import { unsafeSVG } from 'lit/directives/unsafe-svg.js';
11
11
  const NOTE = { icon: TONE_MARKS.info.icon, label: 'Note' };
12
- let HelixHeadlessCallout = class HelixHeadlessCallout extends HelixElement {
12
+ let HelixHeadlessCallout = class HelixHeadlessCallout extends MixinDismissible(HelixElement) {
13
13
  constructor() {
14
14
  super(...arguments);
15
15
  this.toneLabel = '';
@@ -25,6 +25,11 @@ let HelixHeadlessCallout = class HelixHeadlessCallout extends HelixElement {
25
25
  </svg>
26
26
  </slot>`;
27
27
  }
28
+ renderDismissIcon() {
29
+ return html `<slot name="dismiss-icon">
30
+ ${drawDismissGlyph()}
31
+ </slot>`;
32
+ }
28
33
  render() {
29
34
  const { icon, label } = this.tone === 'neutral' ? NOTE : (toneMark(this.tone) ?? TONE_MARKS.info);
30
35
  const named = this.toneLabel || label;
@@ -32,7 +37,13 @@ let HelixHeadlessCallout = class HelixHeadlessCallout extends HelixElement {
32
37
  <div part="content">
33
38
  <slot name="heading"></slot>
34
39
  <slot></slot>
35
- </div>`;
40
+ </div>${this.dismissible
41
+ ? drawDismiss({
42
+ label: this.dismissLabel,
43
+ mark: this.renderDismissIcon(),
44
+ onDismiss: () => this.dismiss(),
45
+ })
46
+ : nothing}`;
36
47
  }
37
48
  };
38
49
  __decorate([
@@ -98,7 +98,7 @@ declare const HelixHeadlessCanvas_base: (new (...args: any[]) => import("@fusion
98
98
  * @csspart edge - One connector between two cards.
99
99
  * @csspart edge-end - An end of a selected connection. Drag it, or click it to pick it up.
100
100
  * @csspart edge-target - A wider, invisible line over a connection, which receives focus and presses.
101
- * @csspart edges - The layer the connectors are drawn in.
101
+ * @csspart edges - A layer the connectors are drawn in: one holding the arrowhead, and one after each card holding the connections leaving it, so they are read in the order the arrows walk them. Give it `z-index: -1` to draw it under the cards.
102
102
  * @csspart footer - The strip below the board.
103
103
  * @csspart fullscreen - The button that makes the board fill the screen.
104
104
  * @csspart gesture-hint - Words over the board for a moment when it lets a gesture pass to the page, such as how to zoom it.
@@ -128,6 +128,10 @@ declare const HelixHeadlessCanvas_base: (new (...args: any[]) => import("@fusion
128
128
  * @cssstate using - A board with `gestures="activate"` has been pressed and has the gestures.
129
129
  */
130
130
  export declare class HelixHeadlessCanvas extends HelixHeadlessCanvas_base {
131
+ /** The connection whose target had focus as an update began, and that target. */
132
+ private focusedEdge;
133
+ /** Each card is assigned to its own slot, in the order the arrows walk them. */
134
+ static shadowRootOptions: ShadowRootInit;
131
135
  /** The text read with a card to say where its connections come from, with `{cards}`. */
132
136
  comesFromLabel: string;
133
137
  /** The text announced when a connection is requested, with `{from}` and `{to}`. */
@@ -951,16 +955,47 @@ export declare class HelixHeadlessCanvas extends HelixHeadlessCanvas_base {
951
955
  */
952
956
  private renderEnds;
953
957
  /**
954
- * The connectors, in one layer under the cards.
958
+ * The layer that holds the arrowhead and the connection being drawn.
955
959
  *
956
960
  * **The arrowhead is measured in the board's own units, not in multiples of
957
961
  * the line's width.** `markerUnits="strokeWidth"` multiplies by the stroke, so
958
962
  * an eight-unit head on a two-pixel line drew a sixteen-pixel triangle that
959
963
  * read as a shape of its own rather than as a direction. In user space it is
960
964
  * eight units of the document, which is what the cards are measured in, and it
961
- * grows with the zoom like everything else.
965
+ * grows with the zoom like everything else. Each card's connections reach it
966
+ * by its id, which every layer in this shadow root shares.
962
967
  */
963
968
  private renderEdges;
969
+ /**
970
+ * Each card, and then the connections leaving it, in the order the arrows
971
+ * walk them.
972
+ *
973
+ * **The order is the accessibility tree's.** The connections were one layer
974
+ * drawn before every card, so a screen reader's reading went through every
975
+ * connection and then every card, while the arrow keys went card by card
976
+ * with each card's connections after it. Each card now has a slot of its
977
+ * own, assigned by hand, with its connections' layer straight after it, so
978
+ * both orders are the walk. The cards are read before hydration, which
979
+ * knows none, from the default slot after these, as they always were.
980
+ *
981
+ * **Every layer sits under the cards by its stacking.** A layer after a card
982
+ * in the tree would otherwise paint over it, so the styled sheet sets
983
+ * `--helix-layer-beneath` on `edges`, and a headless page sets `z-index: -1`.
984
+ */
985
+ private renderStops;
986
+ /** One connector: the target that takes focus and presses, and the line it paints. */
987
+ private renderEdge;
988
+ /**
989
+ * Sends each card to its slot, and everything else to the slot it names.
990
+ *
991
+ * A root that assigns by hand routes nothing by itself, the named slots
992
+ * included, so the header, the footer and the empty state are assigned here
993
+ * too. Paired with the walk by position, as the template was built, and a
994
+ * card the walk does not reach, a second one of the same name, goes to the
995
+ * default slot with everything else. On a root a server sent, which routes
996
+ * by name, each card is sent to its slot by name instead.
997
+ */
998
+ private assign;
964
999
  /**
965
1000
  * The connections' labels, as text on the plane over the lines.
966
1001
  *