@fusion.dev/helix-headless 0.144.0 → 0.146.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 (319) hide show
  1. package/custom-elements.json +15195 -4240
  2. package/dist/accordion/item/accordion-item.d.ts +62 -12
  3. package/dist/accordion/item/accordion-item.js +41 -10
  4. package/dist/accordion/root/accordion-root.d.ts +14 -5
  5. package/dist/accordion/root/accordion-root.js +7 -1
  6. package/dist/announcement/root/announcement-root.d.ts +24 -3
  7. package/dist/announcement/root/announcement-root.js +39 -2
  8. package/dist/app-header/root/app-header-root.d.ts +12 -0
  9. package/dist/app-header/root/app-header-root.js +13 -1
  10. package/dist/app-header/sectioning.d.ts +9 -0
  11. package/dist/app-header/sectioning.js +27 -0
  12. package/dist/avatar/group/avatar-group.d.ts +20 -14
  13. package/dist/avatar/group/avatar-group.js +17 -19
  14. package/dist/badge/root/badge-root.d.ts +3 -1
  15. package/dist/badge/root/badge-root.js +2 -2
  16. package/dist/bar-chart/root/bar-chart-root.d.ts +18 -1
  17. package/dist/bar-chart/root/bar-chart-root.js +52 -15
  18. package/dist/bar-chart/stack.d.ts +15 -0
  19. package/dist/bar-chart/stack.js +19 -0
  20. package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +57 -1
  21. package/dist/breadcrumbs/root/breadcrumbs-root.js +73 -3
  22. package/dist/button/root/button-root.d.ts +26 -0
  23. package/dist/button/root/button-root.js +38 -18
  24. package/dist/button-group/root/button-group-root.d.ts +2 -1
  25. package/dist/button-group/root/button-group-root.js +5 -1
  26. package/dist/canvas/node/canvas-node.d.ts +4 -3
  27. package/dist/canvas/node/canvas-node.js +3 -2
  28. package/dist/canvas/root/canvas-root.d.ts +38 -3
  29. package/dist/canvas/root/canvas-root.js +123 -42
  30. package/dist/card/root/card-root.d.ts +24 -3
  31. package/dist/card/root/card-root.js +20 -8
  32. package/dist/carousel/root/carousel-root.d.ts +133 -4
  33. package/dist/carousel/root/carousel-root.js +174 -24
  34. package/dist/carousel/stops.d.ts +20 -0
  35. package/dist/carousel/stops.js +30 -0
  36. package/dist/chat/composer/chat-composer.d.ts +38 -6
  37. package/dist/chat/composer/chat-composer.js +42 -9
  38. package/dist/chat/message/chat-message.d.ts +32 -1
  39. package/dist/chat/message/chat-message.js +27 -10
  40. package/dist/chat/naming.d.ts +26 -0
  41. package/dist/chat/naming.js +14 -0
  42. package/dist/chat/root/chat-root.d.ts +58 -0
  43. package/dist/chat/root/chat-root.js +43 -3
  44. package/dist/checkbox/root/checkbox-root.d.ts +20 -0
  45. package/dist/checkbox/root/checkbox-root.js +14 -1
  46. package/dist/checkbox-group/root/checkbox-group-root.d.ts +8 -2
  47. package/dist/checkbox-group/root/checkbox-group-root.js +12 -10
  48. package/dist/checkbox-group/select-all.d.ts +27 -0
  49. package/dist/checkbox-group/select-all.js +12 -0
  50. package/dist/code-block/highlight.d.ts +15 -0
  51. package/dist/code-block/highlight.js +4 -0
  52. package/dist/code-block/root/code-block-root.d.ts +57 -2
  53. package/dist/code-block/root/code-block-root.js +63 -8
  54. package/dist/color-input/root/color-input-root.d.ts +3 -0
  55. package/dist/color-input/root/color-input-root.js +6 -3
  56. package/dist/color-picker/root/color-picker-root.d.ts +33 -4
  57. package/dist/color-picker/root/color-picker-root.js +80 -21
  58. package/dist/color-picker/swatches.d.ts +12 -0
  59. package/dist/color-picker/swatches.js +26 -0
  60. package/dist/combobox/root/combobox-root.d.ts +43 -0
  61. package/dist/combobox/root/combobox-root.js +79 -15
  62. package/dist/command/root/command-root.d.ts +16 -1
  63. package/dist/command/root/command-root.js +22 -4
  64. package/dist/copy-button/root/copy-button-root.d.ts +26 -1
  65. package/dist/copy-button/root/copy-button-root.js +12 -5
  66. package/dist/data-table/index.d.ts +1 -1
  67. package/dist/data-table/index.js +1 -1
  68. package/dist/data-table/keys.d.ts +24 -0
  69. package/dist/data-table/keys.js +24 -0
  70. package/dist/data-table/root/data-table-root.d.ts +170 -13
  71. package/dist/data-table/root/data-table-root.js +294 -52
  72. package/dist/data-table/tree.d.ts +55 -0
  73. package/dist/data-table/tree.js +54 -0
  74. package/dist/date-input/root/date-input-root.d.ts +3 -1
  75. package/dist/date-input/root/date-input-root.js +18 -7
  76. package/dist/date-picker/root/date-picker-root.js +12 -6
  77. package/dist/description-list/item/description-list-item.d.ts +17 -2
  78. package/dist/description-list/item/description-list-item.js +15 -2
  79. package/dist/description-list/root/description-list-root.d.ts +27 -1
  80. package/dist/description-list/root/description-list-root.js +26 -1
  81. package/dist/dialog/description.js +15 -1
  82. package/dist/dialog/root/dialog-root.d.ts +8 -2
  83. package/dist/dialog/root/dialog-root.js +16 -1
  84. package/dist/divider/root/divider-root.d.ts +3 -0
  85. package/dist/divider/root/divider-root.js +2 -1
  86. package/dist/donut-chart/root/donut-chart-root.d.ts +31 -0
  87. package/dist/donut-chart/root/donut-chart-root.js +48 -1
  88. package/dist/drawer/reveal.d.ts +8 -0
  89. package/dist/drawer/reveal.js +1 -0
  90. package/dist/drawer/root/drawer-root.d.ts +59 -0
  91. package/dist/drawer/root/drawer-root.js +63 -4
  92. package/dist/drilldown/item/drilldown-item.d.ts +11 -6
  93. package/dist/drilldown/item/drilldown-item.js +8 -5
  94. package/dist/drilldown/root/drilldown-root.d.ts +29 -0
  95. package/dist/drilldown/root/drilldown-root.js +28 -5
  96. package/dist/element-events.generated.js +83 -12
  97. package/dist/empty/root/empty-root.d.ts +3 -1
  98. package/dist/empty/root/empty-root.js +3 -2
  99. package/dist/file-input/root/file-input-root.d.ts +69 -6
  100. package/dist/file-input/root/file-input-root.js +82 -19
  101. package/dist/file-input/screen.d.ts +2 -1
  102. package/dist/filter-input/menu/filter-menu.d.ts +5 -0
  103. package/dist/filter-input/menu/filter-menu.js +16 -4
  104. package/dist/filter-input/root/filter-input-root.d.ts +30 -6
  105. package/dist/filter-input/root/filter-input-root.js +1 -1
  106. package/dist/filter-input/suggest.d.ts +28 -3
  107. package/dist/filter-input/suggest.js +18 -8
  108. package/dist/format-date/root/format-date-root.d.ts +9 -16
  109. package/dist/format-date/root/format-date-root.js +10 -27
  110. package/dist/heatmap/root/heatmap-root.d.ts +24 -13
  111. package/dist/heatmap/root/heatmap-root.js +34 -12
  112. package/dist/icon/root/icon-root.d.ts +12 -1
  113. package/dist/icon/root/icon-root.js +21 -10
  114. package/dist/icon/settle.d.ts +7 -0
  115. package/dist/icon/settle.js +10 -0
  116. package/dist/icon-button/root/icon-button-root.d.ts +2 -0
  117. package/dist/image/root/image-root.d.ts +5 -1
  118. package/dist/image/root/image-root.js +10 -2
  119. package/dist/input/root/input-root.d.ts +13 -3
  120. package/dist/input/root/input-root.js +12 -3
  121. package/dist/kbd/root/kbd-root.d.ts +35 -1
  122. package/dist/kbd/root/kbd-root.js +23 -4
  123. package/dist/legend/root/legend-root.d.ts +55 -8
  124. package/dist/legend/root/legend-root.js +55 -13
  125. package/dist/lightbox/root/lightbox-root.d.ts +49 -6
  126. package/dist/lightbox/root/lightbox-root.js +86 -19
  127. package/dist/lightbox/zoom-controller.d.ts +59 -0
  128. package/dist/lightbox/zoom-controller.js +128 -0
  129. package/dist/lightbox/zoom.d.ts +22 -0
  130. package/dist/lightbox/zoom.js +16 -0
  131. package/dist/line-chart/root/line-chart-root.d.ts +22 -1
  132. package/dist/line-chart/root/line-chart-root.js +21 -1
  133. package/dist/list/item/list-item.d.ts +70 -1
  134. package/dist/list/item/list-item.js +77 -6
  135. package/dist/list/numbering.d.ts +14 -0
  136. package/dist/list/numbering.js +8 -0
  137. package/dist/list/root/list-root.d.ts +155 -9
  138. package/dist/list/root/list-root.js +246 -4
  139. package/dist/list/selection.d.ts +49 -0
  140. package/dist/list/selection.js +30 -0
  141. package/dist/listbox/root/listbox-root.d.ts +37 -1
  142. package/dist/listbox/root/listbox-root.js +49 -4
  143. package/dist/loader/busy.d.ts +10 -0
  144. package/dist/loader/busy.js +11 -0
  145. package/dist/loader/root/loader-root.d.ts +9 -2
  146. package/dist/loader/root/loader-root.js +23 -3
  147. package/dist/map/root/map-root.d.ts +6 -2
  148. package/dist/map/root/map-root.js +5 -2
  149. package/dist/megamenu/root/megamenu-root.d.ts +62 -0
  150. package/dist/megamenu/root/megamenu-root.js +90 -5
  151. package/dist/menu/index.d.ts +1 -0
  152. package/dist/menu/index.js +1 -0
  153. package/dist/menu/item/menu-item.d.ts +87 -11
  154. package/dist/menu/item/menu-item.js +78 -22
  155. package/dist/menu/root/menu-root.d.ts +39 -1
  156. package/dist/menu/root/menu-root.js +65 -8
  157. package/dist/menu/section/menu-section.d.ts +55 -0
  158. package/dist/menu/section/menu-section.js +60 -0
  159. package/dist/meter/root/meter-root.d.ts +20 -1
  160. package/dist/meter/root/meter-root.js +11 -15
  161. package/dist/navigation/root/navigation-root.d.ts +18 -2
  162. package/dist/navigation/root/navigation-root.js +29 -3
  163. package/dist/notifications/root/notifications-root.d.ts +25 -0
  164. package/dist/notifications/root/notifications-root.js +33 -5
  165. package/dist/number-input/root/number-input-root.d.ts +17 -8
  166. package/dist/number-input/root/number-input-root.js +2 -7
  167. package/dist/object-inspector/root/object-inspector-root.d.ts +161 -32
  168. package/dist/object-inspector/root/object-inspector-root.js +264 -123
  169. package/dist/object-inspector/rows.d.ts +75 -0
  170. package/dist/object-inspector/rows.js +119 -0
  171. package/dist/option/root/option-root.d.ts +5 -3
  172. package/dist/outline/levels.d.ts +31 -0
  173. package/dist/outline/levels.js +23 -0
  174. package/dist/outline/root/outline-root.d.ts +86 -3
  175. package/dist/outline/root/outline-root.js +95 -12
  176. package/dist/pagination/size/pagination-size.d.ts +12 -2
  177. package/dist/pagination/size/pagination-size.js +20 -5
  178. package/dist/pin-input/code.d.ts +10 -0
  179. package/dist/pin-input/code.js +13 -0
  180. package/dist/pin-input/root/pin-input-root.d.ts +25 -1
  181. package/dist/pin-input/root/pin-input-root.js +10 -11
  182. package/dist/popover/hide-outside.d.ts +14 -0
  183. package/dist/popover/hide-outside.js +41 -0
  184. package/dist/popover/root/popover-root.d.ts +57 -7
  185. package/dist/popover/root/popover-root.js +58 -3
  186. package/dist/progress/root/progress-root.d.ts +20 -0
  187. package/dist/progress/root/progress-root.js +15 -15
  188. package/dist/qr-code/export.d.ts +26 -1
  189. package/dist/qr-code/export.js +14 -0
  190. package/dist/qr-code/root/qr-code-root.d.ts +19 -5
  191. package/dist/qr-code/root/qr-code-root.js +58 -9
  192. package/dist/quote/marks.d.ts +8 -0
  193. package/dist/quote/marks.js +5 -0
  194. package/dist/quote/root/quote-root.d.ts +14 -2
  195. package/dist/quote/root/quote-root.js +23 -1
  196. package/dist/radio/group/radio-group.d.ts +4 -10
  197. package/dist/radio/group/radio-group.js +5 -10
  198. package/dist/radio/root/radio-root.d.ts +6 -2
  199. package/dist/radio/root/radio-root.js +6 -1
  200. package/dist/rating/root/rating-root.d.ts +10 -5
  201. package/dist/rating/root/rating-root.js +32 -8
  202. package/dist/rating/steps.d.ts +7 -0
  203. package/dist/rating/steps.js +9 -0
  204. package/dist/scatter-chart/fit.d.ts +15 -0
  205. package/dist/scatter-chart/fit.js +35 -0
  206. package/dist/scatter-chart/root/scatter-chart-root.d.ts +21 -1
  207. package/dist/scatter-chart/root/scatter-chart-root.js +30 -17
  208. package/dist/scroll-area/root/scroll-area-root.d.ts +84 -0
  209. package/dist/scroll-area/root/scroll-area-root.js +106 -7
  210. package/dist/scroll-area/scrollbar-controller.d.ts +111 -0
  211. package/dist/scroll-area/scrollbar-controller.js +172 -0
  212. package/dist/scroll-area/scrollbar.d.ts +92 -0
  213. package/dist/scroll-area/scrollbar.js +33 -0
  214. package/dist/select/root/select-root.d.ts +15 -0
  215. package/dist/select/root/select-root.js +18 -6
  216. package/dist/skeleton/root/skeleton-root.d.ts +3 -0
  217. package/dist/skeleton/root/skeleton-root.js +4 -2
  218. package/dist/skip-link/root/skip-link-root.js +2 -2
  219. package/dist/slider/root/slider-root.d.ts +41 -4
  220. package/dist/slider/root/slider-root.js +23 -3
  221. package/dist/sparkline/readings.d.ts +18 -0
  222. package/dist/sparkline/readings.js +19 -0
  223. package/dist/sparkline/root/sparkline-root.d.ts +78 -7
  224. package/dist/sparkline/root/sparkline-root.js +118 -23
  225. package/dist/speed-dial/root/speed-dial-root.js +2 -2
  226. package/dist/splitter/root/splitter-root.d.ts +20 -12
  227. package/dist/splitter/root/splitter-root.js +226 -203
  228. package/dist/splitter/snap.d.ts +9 -0
  229. package/dist/splitter/snap.js +12 -0
  230. package/dist/stat/root/stat-root.d.ts +14 -5
  231. package/dist/stat/root/stat-root.js +21 -5
  232. package/dist/steps/reach.d.ts +20 -0
  233. package/dist/steps/reach.js +15 -0
  234. package/dist/steps/root/steps-root.d.ts +76 -0
  235. package/dist/steps/root/steps-root.js +93 -1
  236. package/dist/steps/step/step.d.ts +45 -2
  237. package/dist/steps/step/step.js +33 -6
  238. package/dist/switch/root/switch-root.d.ts +10 -0
  239. package/dist/table/column/table-column.d.ts +11 -10
  240. package/dist/table/column/table-column.js +8 -19
  241. package/dist/table/root/table-root.d.ts +126 -4
  242. package/dist/table/root/table-root.js +156 -6
  243. package/dist/table/row/table-row.d.ts +47 -1
  244. package/dist/table/row/table-row.js +39 -2
  245. package/dist/tabs/panel/tab-panel.d.ts +22 -5
  246. package/dist/tabs/panel/tab-panel.js +34 -6
  247. package/dist/tabs/root/tabs-root.d.ts +37 -1
  248. package/dist/tabs/root/tabs-root.js +22 -4
  249. package/dist/tabs/tab/tab.d.ts +41 -4
  250. package/dist/tabs/tab/tab.js +49 -3
  251. package/dist/tag/group/tag-group.d.ts +31 -4
  252. package/dist/tag/group/tag-group.js +46 -7
  253. package/dist/tag/root/tag-root.js +9 -2
  254. package/dist/textarea/root/textarea-root.d.ts +28 -1
  255. package/dist/textarea/root/textarea-root.js +40 -1
  256. package/dist/time-input/root/time-input-root.d.ts +5 -1
  257. package/dist/time-input/root/time-input-root.js +16 -8
  258. package/dist/time-picker/root/time-picker-root.d.ts +18 -4
  259. package/dist/time-picker/root/time-picker-root.js +7 -10
  260. package/dist/time-picker/wheel-name.d.ts +9 -0
  261. package/dist/time-picker/wheel-name.js +15 -0
  262. package/dist/timeline/group/timeline-group.d.ts +46 -0
  263. package/dist/timeline/group/timeline-group.js +37 -0
  264. package/dist/timeline/index.d.ts +1 -0
  265. package/dist/timeline/index.js +1 -0
  266. package/dist/timeline/root/timeline-root.d.ts +10 -3
  267. package/dist/toast/item/toast-item.d.ts +24 -18
  268. package/dist/toast/item/toast-item.js +36 -40
  269. package/dist/toast/root/toast-root.d.ts +6 -0
  270. package/dist/toast/root/toast-root.js +16 -1
  271. package/dist/toggle/group/toggle-group.d.ts +24 -3
  272. package/dist/toggle/group/toggle-group.js +34 -5
  273. package/dist/toolbar/root/toolbar-root.d.ts +13 -0
  274. package/dist/toolbar/root/toolbar-root.js +15 -5
  275. package/dist/tooltip/root/tooltip-root.d.ts +13 -2
  276. package/dist/tooltip/root/tooltip-root.js +9 -1
  277. package/dist/tour/back.d.ts +10 -0
  278. package/dist/tour/back.js +8 -0
  279. package/dist/tour/root/tour-root.d.ts +30 -2
  280. package/dist/tour/root/tour-root.js +34 -8
  281. package/dist/tree/item/tree-item.d.ts +61 -4
  282. package/dist/tree/item/tree-item.js +92 -20
  283. package/dist/tree/root/tree-root.d.ts +58 -0
  284. package/dist/tree/root/tree-root.js +80 -16
  285. package/dist/tree/selection.d.ts +24 -0
  286. package/dist/tree/selection.js +13 -0
  287. package/dist/trend/root/trend-root.d.ts +43 -18
  288. package/dist/trend/root/trend-root.js +31 -6
  289. package/dist/video/media-events.d.ts +44 -0
  290. package/dist/video/media-events.js +35 -0
  291. package/dist/video/root/video-root.d.ts +117 -18
  292. package/dist/video/root/video-root.js +93 -47
  293. package/dist/video-playlist/menu/video-playlist-menu.d.ts +5 -0
  294. package/dist/video-playlist/menu/video-playlist-menu.js +3 -1
  295. package/dist/video-playlist/order.d.ts +41 -0
  296. package/dist/video-playlist/order.js +34 -0
  297. package/dist/video-playlist/root/video-playlist-root.d.ts +77 -3
  298. package/dist/video-playlist/root/video-playlist-root.js +60 -16
  299. package/dist/virtual-list/controls.d.ts +4 -0
  300. package/dist/virtual-list/controls.js +30 -0
  301. package/dist/virtual-list/fill.d.ts +22 -0
  302. package/dist/virtual-list/fill.js +23 -0
  303. package/dist/virtual-list/keys.d.ts +15 -0
  304. package/dist/virtual-list/keys.js +24 -0
  305. package/dist/virtual-list/plan.d.ts +49 -0
  306. package/dist/virtual-list/plan.js +16 -0
  307. package/dist/virtual-list/root/virtual-list-root.d.ts +259 -26
  308. package/dist/virtual-list/root/virtual-list-root.js +333 -49
  309. package/lint.json +1 -1
  310. package/package.json +8 -8
  311. package/types/jsx.d.ts +8113 -1394
  312. package/types/svelte.d.ts +2 -0
  313. package/types/vue.d.ts +1678 -353
  314. package/dist/data-table/root/order.d.ts +0 -141
  315. package/dist/data-table/root/order.js +0 -76
  316. package/dist/listbox/range.d.ts +0 -17
  317. package/dist/listbox/range.js +0 -5
  318. package/dist/tag/selection.d.ts +0 -10
  319. package/dist/tag/selection.js +0 -12
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Rows that hold rows, arranged for a tree grid: filtered, sorted within each
3
+ * parent, and laid out flat in reading order with the open rows' children under
4
+ * them.
5
+ *
6
+ * Pure and beside the family's `index.ts`, because which rows show and at what
7
+ * depth is a fact about the data, and a spec can hold it without a page.
8
+ *
9
+ * **Filtered by descent.** A row stays when it matches the query or any row
10
+ * under it does, so a match deep in the tree is shown with the rows that lead to
11
+ * it, and while a query is on every row with a match under it is open.
12
+ *
13
+ * **Sorted among siblings.** A sort orders each parent's rows and leaves every
14
+ * row under its parent, which is the only order a tree can be read in.
15
+ */
16
+ import { type Axis, type DataRow } from '@fusion.dev/helix-core';
17
+ /** Where a row sits in the tree. */
18
+ export interface Placement {
19
+ /** Whether it has children to show. */
20
+ branch: boolean;
21
+ /** How deep the row is, from 1 for a row with no parent. */
22
+ level: number;
23
+ /** Whether its children are shown. */
24
+ open: boolean;
25
+ /** The row it sits under, if any. */
26
+ parent: DataRow | undefined;
27
+ /** Its place among its siblings, from 1. */
28
+ position: number;
29
+ /** How many siblings it has, itself included. */
30
+ siblings: number;
31
+ }
32
+ /** The rows a tree shows, and the counts around them. */
33
+ export interface Grown {
34
+ /** Every row in the tree, shown or not, for a selection of every row. */
35
+ every: DataRow[];
36
+ /** Where each shown row sits. */
37
+ placed: Map<DataRow, Placement>;
38
+ /** The rows shown, in reading order. */
39
+ rows: DataRow[];
40
+ /** How many rows the tree holds before filtering. */
41
+ total: number;
42
+ }
43
+ /** The rows under `row`, read from `field`: an array, or none. */
44
+ export declare const childrenOf: (row: DataRow, field: string) => DataRow[];
45
+ /**
46
+ * The tree laid out flat: each shown row followed by its children where it is
47
+ * open, which `isOpen` says. While `query` is set, a row with a match under it
48
+ * is open whatever `isOpen` says.
49
+ */
50
+ export declare const grow: (rows: readonly DataRow[], axes: readonly Axis[], { field, isOpen, query, spec, }: {
51
+ field: string;
52
+ isOpen: (row: DataRow) => boolean;
53
+ query: string;
54
+ spec: string;
55
+ }) => Grown;
@@ -0,0 +1,54 @@
1
+ import { filter, parse, sort, valueAt } from '@fusion.dev/helix-core';
2
+ export const childrenOf = (row, field) => {
3
+ const value = valueAt(row, field);
4
+ return Array.isArray(value) ? value : [];
5
+ };
6
+ export const grow = (rows, axes, { field, isOpen, query, spec, }) => {
7
+ const searching = query.trim() !== '';
8
+ const order = parse(spec);
9
+ const every = [];
10
+ const kept = new Set();
11
+ const seen = new Set();
12
+ const keep = (row) => {
13
+ if (seen.has(row)) {
14
+ return kept.has(row);
15
+ }
16
+ seen.add(row);
17
+ every.push(row);
18
+ let below = false;
19
+ for (const child of childrenOf(row, field)) {
20
+ below = keep(child) || below;
21
+ }
22
+ const stays = below || !searching || filter([row], query, axes).length > 0;
23
+ if (stays) {
24
+ kept.add(row);
25
+ }
26
+ return stays;
27
+ };
28
+ for (const row of rows) {
29
+ keep(row);
30
+ }
31
+ const placed = new Map();
32
+ const shown = [];
33
+ const lay = (level, depth, parent) => {
34
+ const siblings = sort(level.filter((row) => kept.has(row) && !placed.has(row)), order, axes);
35
+ for (const [index, row] of siblings.entries()) {
36
+ const children = childrenOf(row, field).filter((child) => kept.has(child));
37
+ const open = children.length > 0 && (searching || isOpen(row));
38
+ placed.set(row, {
39
+ branch: children.length > 0,
40
+ level: depth,
41
+ open,
42
+ parent,
43
+ position: index + 1,
44
+ siblings: siblings.length,
45
+ });
46
+ shown.push(row);
47
+ if (open) {
48
+ lay(children, depth + 1, row);
49
+ }
50
+ }
51
+ };
52
+ lay(rows, 1, undefined);
53
+ return { every, placed, rows: shown, total: every.length };
54
+ };
@@ -36,6 +36,8 @@ declare const HelixHeadlessDateInput_base: (new (...args: any[]) => import("@fus
36
36
  * @slot feedback - The error message under the field.
37
37
  * @slot hint - The help text under the field.
38
38
  * @slot next-icon - The icon on the calendar's next month control.
39
+ * @slot panel-footer - Content in the panel under the calendar, such as a note or an action.
40
+ * @slot panel-header - Content in the panel above the calendar, such as a heading or a shortcut.
39
41
  * @slot previous-icon - The icon on the calendar's previous month control.
40
42
  * @slot trigger - The icon on the button that opens the calendar.
41
43
  *
@@ -355,7 +357,7 @@ export declare class HelixHeadlessDateInput extends HelixHeadlessDateInput_base
355
357
  /** Each date, where `mode` holds several, sent one entry each. */
356
358
  protected get answers(): readonly string[] | undefined;
357
359
  /** What is wrong with the dates, which the text input cannot say. */
358
- protected validate(): string;
360
+ protected validate(): string | readonly [keyof ValidityStateFlags, string];
359
361
  /**
360
362
  * The message shown when `disable-dates` or `disable-days` bars a date.
361
363
  */
@@ -176,14 +176,20 @@ let HelixHeadlessDateInput = class HelixHeadlessDateInput extends MixinSegmented
176
176
  : 'Enter dates as YYYY-MM-DD, separated by commas.'));
177
177
  }
178
178
  if (this.min !== '' && held.some((one) => one < this.min)) {
179
- return fillTemplate(this.rangeUnderflowMessage || 'Choose a date on or after {min}.', {
180
- min: this.written(this.min),
181
- });
179
+ return [
180
+ 'rangeUnderflow',
181
+ fillTemplate(this.rangeUnderflowMessage || 'Choose a date on or after {min}.', {
182
+ min: this.written(this.min),
183
+ }),
184
+ ];
182
185
  }
183
186
  if (this.max !== '' && held.some((one) => one > this.max)) {
184
- return fillTemplate(this.rangeOverflowMessage || 'Choose a date on or before {max}.', {
185
- max: this.written(this.max),
186
- });
187
+ return [
188
+ 'rangeOverflow',
189
+ fillTemplate(this.rangeOverflowMessage || 'Choose a date on or before {max}.', {
190
+ max: this.written(this.max),
191
+ }),
192
+ ];
187
193
  }
188
194
  const why = held.map((one) => {
189
195
  const date = asDate(one);
@@ -193,7 +199,10 @@ let HelixHeadlessDateInput = class HelixHeadlessDateInput extends MixinSegmented
193
199
  return this.unavailableMessage || 'Choose a date that is available.';
194
200
  }
195
201
  if (why.includes('step')) {
196
- return this.stepMismatchMessage || 'Choose one of the dates the calendar offers.';
202
+ return [
203
+ 'stepMismatch',
204
+ this.stepMismatchMessage || 'Choose one of the dates the calendar offers.',
205
+ ];
197
206
  }
198
207
  if (this.mode === 'range' && held.length > 2) {
199
208
  return this.rangeLengthMessage || 'A range is two dates.';
@@ -327,7 +336,9 @@ let HelixHeadlessDateInput = class HelixHeadlessDateInput extends MixinSegmented
327
336
  popover="manual"
328
337
  ?hidden=${!this.open}
329
338
  >
339
+ <slot name="panel-header"></slot>
330
340
  ${this.renderPicker()}
341
+ <slot name="panel-footer"></slot>
331
342
  </div>
332
343
  ${this.renderHint()}${this.renderFeedback()}`;
333
344
  }
@@ -21,6 +21,7 @@ const KEYS = new Set([
21
21
  'PageUp',
22
22
  ' ',
23
23
  ]);
24
+ const firstOf = (year, month) => addMonths(asDate('2000-01-01'), (year - 2000) * 12 + month);
24
25
  let HelixHeadlessDatePicker = class HelixHeadlessDatePicker extends MixinControllerValue(HelixFormElement) {
25
26
  constructor() {
26
27
  super(...arguments);
@@ -139,13 +140,13 @@ let HelixHeadlessDatePicker = class HelixHeadlessDatePicker extends MixinControl
139
140
  get shown() {
140
141
  const explicit = /^(\d{4})-(\d{2})$/.exec(this.monthState ?? this.defaultMonth);
141
142
  if (explicit) {
142
- return new Date(Date.UTC(Number(explicit[1]), Number(explicit[2]) - 1, 1));
143
+ return firstOf(Number(explicit[1]), Number(explicit[2]) - 1);
143
144
  }
144
145
  return this.derivedMonth;
145
146
  }
146
147
  get derivedMonth() {
147
148
  const from = asDate(this.selected[0] ?? '') ?? new Date();
148
- return new Date(Date.UTC(from.getUTCFullYear(), from.getUTCMonth(), 1));
149
+ return firstOf(from.getUTCFullYear(), from.getUTCMonth());
149
150
  }
150
151
  get anchor() {
151
152
  const shown = this.shown;
@@ -268,11 +269,16 @@ let HelixHeadlessDatePicker = class HelixHeadlessDatePicker extends MixinControl
268
269
  return;
269
270
  }
270
271
  this.pageYear = at;
271
- this.periodFocus = at === this.shown.getUTCFullYear() ? this.shown.getUTCMonth() : 0;
272
+ const month = this.shown.getUTCMonth();
273
+ const open = Array.from({ length: 12 }, (_, index) => index).filter((index) => !this.monthOut(firstOf(at, index)));
274
+ this.periodFocus = open.includes(month)
275
+ ? month
276
+ : ([...open].sort((left, right) => Math.abs(left - month) - Math.abs(right - month))[0] ??
277
+ month);
272
278
  this.zoom('month');
273
279
  return;
274
280
  }
275
- const first = new Date(Date.UTC(this.periodYear, at, 1));
281
+ const first = firstOf(this.periodYear, at);
276
282
  if (this.monthOut(first)) {
277
283
  return;
278
284
  }
@@ -558,8 +564,8 @@ let HelixHeadlessDatePicker = class HelixHeadlessDatePicker extends MixinControl
558
564
  const years = this.view === 'year';
559
565
  const page = years ? yearPageOf(this.periodYear) : this.periodYear;
560
566
  const heading = years
561
- ? `${yearName.format(new Date(Date.UTC(page, 0, 1)))} – ${yearName.format(new Date(Date.UTC(page + YEARS_SHOWN - 1, 0, 1)))}`
562
- : yearName.format(new Date(Date.UTC(page, 0, 1)));
567
+ ? `${yearName.format(firstOf(page, 0))} – ${yearName.format(firstOf(page + YEARS_SHOWN - 1, 0))}`
568
+ : yearName.format(firstOf(page, 0));
563
569
  const stop = this.periodStop;
564
570
  const cells = periodCells({
565
571
  max: this.max,
@@ -1,5 +1,5 @@
1
1
  import { HelixElement } from '@fusion.dev/helix-core';
2
- import { type TemplateResult } from 'lit';
2
+ import { type PropertyValues, type TemplateResult } from 'lit';
3
3
  /**
4
4
  * @summary One label and its value.
5
5
  *
@@ -12,11 +12,17 @@ import { type TemplateResult } from 'lit';
12
12
  * such as a tag, an avatar, or a link. The label is almost always text, so it
13
13
  * is also a property.
14
14
  *
15
+ * **For a label with several values, write each value as a `<dd>`**, such as
16
+ * the authors of a paper. The item then puts your `<dd>` elements after its
17
+ * `<dt>` in place of its own, so a screen reader hears one term and each of
18
+ * its descriptions, as in a native `<dl>`. A server cannot see your elements,
19
+ * so the served item wraps them in its own `<dd>` until it runs.
20
+ *
15
21
  * @since 0.1.0
16
22
  * @status stable
17
23
  * @documentation https://fusion.dev/helix/components/description-list
18
24
  *
19
- * @slot - The value.
25
+ * @slot - The value, or several `<dd>` elements for several values.
20
26
  * @slot label - The label, when it is more than text. Falls back to `label`.
21
27
  *
22
28
  * @csspart label - The `<dt>`, holding the label.
@@ -31,7 +37,16 @@ export declare class HelixHeadlessDescriptionListItem extends HelixElement {
31
37
  * that varies and is often more than text.
32
38
  */
33
39
  label: string;
40
+ /**
41
+ * Whether the values are the consumer's own `<dd>` elements, which the item
42
+ * then does not wrap. Unknown on a server and while hydrating, where the
43
+ * item draws its own.
44
+ */
45
+ private get several();
46
+ protected firstUpdated(changed: PropertyValues): void;
34
47
  protected render(): TemplateResult;
48
+ /** A value arriving or leaving can change whether the item wraps them. */
49
+ private readonly handleSlotChange;
35
50
  }
36
51
  declare global {
37
52
  interface HTMLElementTagNameMap {
@@ -11,10 +11,23 @@ let HelixHeadlessDescriptionListItem = class HelixHeadlessDescriptionListItem ex
11
11
  constructor() {
12
12
  super(...arguments);
13
13
  this.label = '';
14
+ this.handleSlotChange = () => {
15
+ this.requestUpdate();
16
+ };
17
+ }
18
+ get several() {
19
+ return this.knownChildren.some((child) => child.localName === 'dd');
20
+ }
21
+ firstUpdated(changed) {
22
+ super.firstUpdated(changed);
23
+ this.finishHydration();
14
24
  }
15
25
  render() {
16
- return html `<dt part="label"><slot name="label">${this.label}</slot></dt>
17
- <dd part="value"><slot></slot></dd>`;
26
+ const label = html `<dt part="label"><slot name="label">${this.label}</slot></dt>`;
27
+ return this.several
28
+ ? html `${label}<slot @slotchange=${this.handleSlotChange}></slot>`
29
+ : html `${label}
30
+ <dd part="value"><slot @slotchange=${this.handleSlotChange}></slot></dd>`;
18
31
  }
19
32
  };
20
33
  __decorate([
@@ -1,5 +1,5 @@
1
1
  import { HelixElement } from '@fusion.dev/helix-core';
2
- import { type TemplateResult } from 'lit';
2
+ import { type PropertyValues, type TemplateResult } from 'lit';
3
3
  /**
4
4
  * @summary A list of labels and their values, such as a details panel.
5
5
  *
@@ -15,6 +15,11 @@ import { type TemplateResult } from 'lit';
15
15
  * matches a plain `<dl>` with the same content node for node, both with a
16
16
  * slotted label and with an item set to `display: contents`.
17
17
  *
18
+ * **A named list is a named group.** A `<dl>` takes no name in ARIA 1.2, so
19
+ * the list becomes a group around it when it has `label`, `aria-label` or
20
+ * `aria-labelledby`, and the name lands on the group. Unnamed, the host adds
21
+ * nothing to the tree.
22
+ *
18
23
  * @since 0.1.0
19
24
  * @status stable
20
25
  * @category data
@@ -42,6 +47,27 @@ export declare class HelixHeadlessDescriptionList extends HelixElement {
42
47
  * and React reports that as a hydration mismatch.
43
48
  */
44
49
  direction?: 'row';
50
+ /**
51
+ * The list's name, read by screen readers, such as "Server details". It
52
+ * makes the list a named group.
53
+ */
54
+ label: string;
55
+ /**
56
+ * Hears a name written on the element, which no property mirrors.
57
+ *
58
+ * Lit observes the attributes of its own properties only, and `ariaLabel`
59
+ * and `ariaLabelledByElements` belong to the platform.
60
+ */
61
+ static get observedAttributes(): string[];
62
+ /**
63
+ * Called by the browser when an observed attribute changes. A name written
64
+ * or taken off asks for an update, because it decides whether the list is a
65
+ * group.
66
+ */
67
+ attributeChangedCallback(name: string, old: string | null, value: string | null): void;
68
+ /** Whether anything names the list. */
69
+ private get named();
70
+ protected willUpdate(changed: PropertyValues): void;
45
71
  protected render(): TemplateResult;
46
72
  }
47
73
  declare global {
@@ -4,10 +4,32 @@ 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 } from '@fusion.dev/helix-core';
7
+ import { customElement, HelixElement, hostAria } from '@fusion.dev/helix-core';
8
8
  import { html } from 'lit';
9
9
  import { property } from 'lit/decorators.js';
10
10
  let HelixHeadlessDescriptionList = class HelixHeadlessDescriptionList extends HelixElement {
11
+ constructor() {
12
+ super(...arguments);
13
+ this.label = '';
14
+ }
15
+ static get observedAttributes() {
16
+ return [...super.observedAttributes, 'aria-label', 'aria-labelledby'];
17
+ }
18
+ attributeChangedCallback(name, old, value) {
19
+ super.attributeChangedCallback(name, old, value);
20
+ if (name === 'aria-label' || name === 'aria-labelledby') {
21
+ this.requestUpdate();
22
+ }
23
+ }
24
+ get named() {
25
+ return (this.label !== '' ||
26
+ Boolean(this.getAttribute?.('aria-label')) ||
27
+ Boolean(this.getAttribute?.('aria-labelledby')));
28
+ }
29
+ willUpdate(changed) {
30
+ super.willUpdate(changed);
31
+ hostAria(this.internals, { label: this.label, role: this.named ? 'group' : '' });
32
+ }
11
33
  render() {
12
34
  return html `<dl part="list"><slot></slot></dl>`;
13
35
  }
@@ -15,6 +37,9 @@ let HelixHeadlessDescriptionList = class HelixHeadlessDescriptionList extends He
15
37
  __decorate([
16
38
  property({ reflect: true })
17
39
  ], HelixHeadlessDescriptionList.prototype, "direction", void 0);
40
+ __decorate([
41
+ property()
42
+ ], HelixHeadlessDescriptionList.prototype, "label", void 0);
18
43
  HelixHeadlessDescriptionList = __decorate([
19
44
  customElement('helix-headless-description-list')
20
45
  ], HelixHeadlessDescriptionList);
@@ -1,5 +1,19 @@
1
1
  const CONTROL = 'a[href], audio[controls], button, details, form, iframe, input, select, textarea, video[controls], [contenteditable], [tabindex]';
2
- const isControl = (element) => element.localName.includes('-') || element.matches(CONTROL);
2
+ const isControl = (element) => {
3
+ if (element.matches(CONTROL)) {
4
+ return true;
5
+ }
6
+ if (!element.localName.includes('-')) {
7
+ return false;
8
+ }
9
+ const definition = customElements.get(element.localName);
10
+ const root = element.shadowRoot;
11
+ return (definition === undefined ||
12
+ !(element instanceof definition) ||
13
+ definition.formAssociated === true ||
14
+ root?.delegatesFocus === true ||
15
+ root?.querySelector(CONTROL) != null);
16
+ };
3
17
  export const wordsIn = (slot) => {
4
18
  const words = [];
5
19
  for (const one of slot?.assignedElements({ flatten: true }) ?? []) {
@@ -1,4 +1,4 @@
1
- import { AriaForwardController, CommandController, HelixElement, OpenPhaseController } from '@fusion.dev/helix-core';
1
+ import { AriaForwardController, CommandController, FocusScopeController, HelixElement, OpenPhaseController } from '@fusion.dev/helix-core';
2
2
  import { type PropertyValues, type TemplateResult } from 'lit';
3
3
  declare const HelixHeadlessDialog_base: (new (...args: any[]) => import("@fusion.dev/helix-core").MixinControllerOpenInterface) & typeof HelixElement;
4
4
  /**
@@ -13,6 +13,10 @@ declare const HelixHeadlessDialog_base: (new (...args: any[]) => import("@fusion
13
13
  * - an inert page behind the dialog, unreachable by pointer, keyboard, or
14
14
  * virtual cursor
15
15
  *
16
+ * The dialog adds one thing to those: `Tab` from its last control goes to its
17
+ * first, and `Shift+Tab` from its first to its last. A native modal lets `Tab`
18
+ * past its last control out to the browser's own controls.
19
+ *
16
20
  * `open` calls `showModal()`, and every way the dialog closes goes through
17
21
  * `requestOpen`. A native dialog closes three ways: the property, Escape, and a
18
22
  * `<form method="dialog">` submit. Routing all three through `requestOpen`
@@ -25,7 +29,8 @@ declare const HelixHeadlessDialog_base: (new (...args: any[]) => import("@fusion
25
29
  *
26
30
  * The dialog is described by the words at the start of its body: the elements
27
31
  * in the default slot before the first one that is or holds a control. A
28
- * question above a form describes the dialog, and the form does not. An
32
+ * question above a form describes the dialog, and the form does not. A Helix
33
+ * component that draws words and no control, such as `Text`, counts as words. An
29
34
  * `aria-describedby` on the host replaces it.
30
35
  *
31
36
  * Set `alert` for a dialog that interrupts to ask for an answer, such as a
@@ -190,6 +195,7 @@ export declare class HelixHeadlessDialog extends HelixHeadlessDialog_base {
190
195
  * either. A browser without element reflection keeps the fallback name.
191
196
  */
192
197
  private nameByHeader;
198
+ protected readonly scope: FocusScopeController;
193
199
  /** Whether the body's words are what currently describe the dialog. */
194
200
  private describedByBody;
195
201
  /**
@@ -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, CommandController, customElement, drawDismiss, drawDismissGlyph, HelixElement, headingsIn, hostAria, lockScroll, MixinControllerOpen, OpenPhaseController, reflectElements, unlockScroll, } from '@fusion.dev/helix-core';
7
+ import { AriaForwardController, auditName, CommandController, customElement, drawDismiss, drawDismissGlyph, FocusScopeController, HelixElement, headingsIn, hostAria, lockScroll, MixinControllerOpen, OpenPhaseController, reflectElements, unlockScroll, } from '@fusion.dev/helix-core';
8
8
  import { html, nothing } from 'lit';
9
9
  import { property } from 'lit/decorators.js';
10
10
  import { wordsIn } from '../description.js';
@@ -60,6 +60,16 @@ let HelixHeadlessDialog = class HelixHeadlessDialog extends MixinControllerOpen(
60
60
  this.close(submitter?.hasAttribute('value') ? submitter.value : undefined);
61
61
  };
62
62
  this.namedByHeader = false;
63
+ this.scope = new FocusScopeController(this, {
64
+ contain: () => this.open,
65
+ contents: () => [
66
+ ...['icon', 'header', '', 'footer'].flatMap((name) => this.renderRoot
67
+ ?.querySelector(name ? `slot[name="${name}"]` : 'slot:not([name])')
68
+ ?.assignedElements({ flatten: true }) ?? []),
69
+ ...[...(this.dialog?.children ?? [])].filter((one) => !(one instanceof HTMLSlotElement)),
70
+ ],
71
+ surface: () => this.dialog,
72
+ });
63
73
  this.describedByBody = false;
64
74
  this.handleBackdrop = (event) => {
65
75
  const panel = this.dialog;
@@ -145,6 +155,11 @@ let HelixHeadlessDialog = class HelixHeadlessDialog extends MixinControllerOpen(
145
155
  return;
146
156
  }
147
157
  if (this.open && !dialog.open) {
158
+ auditName(this, () => null, 'Give it a `label`, or a heading in the `header` slot.', () => this.label !== '' ||
159
+ this.namedByHeader ||
160
+ headingsIn(this.renderRoot
161
+ .querySelector('slot[name="header"]')
162
+ ?.assignedElements({ flatten: true }) ?? []).length > 0);
148
163
  void this.openWhenSlotted(dialog);
149
164
  }
150
165
  else if (!this.open && dialog.open) {
@@ -9,6 +9,9 @@ import { type PropertyValues, type TemplateResult } from 'lit';
9
9
  * rendered element. The semantics are then in the server-rendered markup, with
10
10
  * no attribute written by script after the element connects.
11
11
  *
12
+ * Set `announced` for a line that divides one thing from another, and it is
13
+ * read as a separator, named by any content set into it.
14
+ *
12
15
  * Use `orientation="vertical"` between items on one line, such as inside a
13
16
  * toolbar. A vertical divider stretches to fit its flex parent and sets no
14
17
  * height of its own.
@@ -23,9 +23,10 @@ let HelixHeadlessDivider = class HelixHeadlessDivider extends HelixElement {
23
23
  return html `<div
24
24
  part="line"
25
25
  role=${this.announced ? 'separator' : 'presentation'}
26
+ aria-labelledby=${this.announced ? 'content' : nothing}
26
27
  aria-orientation=${this.announced ? (this.orientation ?? 'horizontal') : nothing}
27
28
  ></div>
28
- <span part="content"><slot @slotchange=${() => this.markEmpty()}></slot></span>
29
+ <span id="content" part="content"><slot @slotchange=${() => this.markEmpty()}></slot></span>
29
30
  <div part="line" role="presentation"></div>`;
30
31
  }
31
32
  };
@@ -49,6 +49,7 @@ declare const HelixHeadlessDonutChart_base: typeof HelixElement & (new (...args:
49
49
  * @csspart segment - One slice.
50
50
  * @csspart segment-active - The slice under the pointer. Set alongside `segment`.
51
51
  * @csspart segment-edge - One slice as a closed shape, used to draw its outline.
52
+ * @csspart slice-label - One slice's share, written on the slice under `slice-labels`. Placed with `left` and `top`, or `inset-inline-start` and `top` on a half ring, and carries its series color as `--chart-series`.
52
53
  * @csspart summary - The chart's name and each slice's share, written as a sentence for screen readers. Hide it visually.
53
54
  * @csspart tooltip - The bubble, forwarded from `Tooltip`.
54
55
  * @csspart tooltip-anchor - The `Tooltip` element itself.
@@ -115,6 +116,16 @@ export declare class HelixHeadlessDonutChart extends HelixHeadlessDonutChart_bas
115
116
  * because the styled sheet selects on it.
116
117
  */
117
118
  hole?: 'large' | 'none' | 'small';
119
+ /**
120
+ * Writes each slice's share on the slice, the `slice-label` part, so a
121
+ * reader sees the parts without a legend or a pointer: "29%" in the middle
122
+ * of the band.
123
+ *
124
+ * Absent writes none. A slice under a twentieth of the whole takes no
125
+ * label, there being no room on it for one. A screen reader hears every
126
+ * share in the summary, and the labels are hidden from it.
127
+ */
128
+ sliceLabels: boolean;
118
129
  /**
119
130
  * How much of the circle the whole occupies.
120
131
  *
@@ -175,6 +186,11 @@ export declare class HelixHeadlessDonutChart extends HelixHeadlessDonutChart_bas
175
186
  * slice, so a key stepping by rows would land on a slice that is not there.
176
187
  */
177
188
  get readings(): number;
189
+ /**
190
+ * Whether the slice at this place is drawn, which a slice a legend hid is
191
+ * not. The keys pass over it, as the ring closes over it.
192
+ */
193
+ showsReading(at: number): boolean;
178
194
  protected render(): TemplateResult;
179
195
  /**
180
196
  * What a reader who cannot see the ring is told: the chart's name and each
@@ -194,6 +210,13 @@ export declare class HelixHeadlessDonutChart extends HelixHeadlessDonutChart_bas
194
210
  * table does not hold.
195
211
  */
196
212
  protected renderPlot(shares: DonutShare[]): TemplateResult;
213
+ /**
214
+ * Each slice's share, written in the middle of its band at its mid-angle,
215
+ * as an element beside the drawing so the text is not stretched with it.
216
+ * Placed as the tooltip's point is placed: from the left on a whole ring,
217
+ * whose bearing is a clock's, and from the inline start on a half one.
218
+ */
219
+ protected renderSliceLabels(shares: DonutShare[]): TemplateResult;
197
220
  /**
198
221
  * The view box, cropped to what is actually drawn.
199
222
  *
@@ -238,6 +261,14 @@ export declare class HelixHeadlessDonutChart extends HelixHeadlessDonutChart_bas
238
261
  * box, which is the ring's center for a circle and is not for a sector.
239
262
  */
240
263
  protected renderEdge(share: DonutShare, index: number): TemplateResult;
264
+ /**
265
+ * The rows the tooltip reads, with the slice's share of the whole after its
266
+ * amount, as `AreaChart` writes a part's share under `share`: "612 (24%)".
267
+ *
268
+ * The share is what the ring shows and the table does not, so a reading
269
+ * said by key gives it too, as the summary does.
270
+ */
271
+ private withShare;
241
272
  /**
242
273
  * What a pointer resting on a slice shows.
243
274
  *