@fusion.dev/helix-headless 0.147.0 → 0.149.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 (296) hide show
  1. package/custom-elements.json +11222 -2332
  2. package/dist/accordion/item/accordion-item.d.ts +5 -2
  3. package/dist/accordion/item/accordion-item.js +11 -7
  4. package/dist/accordion/root/accordion-root.js +4 -6
  5. package/dist/announcement/root/announcement-root.d.ts +61 -5
  6. package/dist/announcement/root/announcement-root.js +126 -20
  7. package/dist/area-chart/root/area-chart-root.d.ts +11 -0
  8. package/dist/area-chart/root/area-chart-root.js +21 -9
  9. package/dist/avatar/group/avatar-group.d.ts +10 -2
  10. package/dist/avatar/group/avatar-group.js +10 -5
  11. package/dist/badge/count.d.ts +19 -0
  12. package/dist/badge/count.js +20 -0
  13. package/dist/badge/root/badge-root.d.ts +6 -2
  14. package/dist/badge/root/badge-root.js +8 -22
  15. package/dist/bar-chart/root/bar-chart-root.d.ts +13 -1
  16. package/dist/bar-chart/root/bar-chart-root.js +17 -4
  17. package/dist/blockquote/root/blockquote-root.d.ts +66 -8
  18. package/dist/blockquote/root/blockquote-root.js +85 -8
  19. package/dist/breadcrumbs/breadcrumb/breadcrumb.js +2 -2
  20. package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +8 -1
  21. package/dist/breadcrumbs/root/breadcrumbs-root.js +5 -2
  22. package/dist/button/root/button-root.d.ts +10 -1
  23. package/dist/button/root/button-root.js +3 -2
  24. package/dist/button-group/arrows.d.ts +14 -0
  25. package/dist/button-group/arrows.js +10 -0
  26. package/dist/button-group/root/button-group-root.d.ts +144 -3
  27. package/dist/button-group/root/button-group-root.js +142 -2
  28. package/dist/callout/root/callout-root.d.ts +16 -2
  29. package/dist/callout/root/callout-root.js +16 -4
  30. package/dist/canvas/describe.d.ts +10 -0
  31. package/dist/canvas/describe.js +9 -0
  32. package/dist/canvas/edge-pan.d.ts +61 -0
  33. package/dist/canvas/edge-pan.js +63 -0
  34. package/dist/canvas/neighbor.d.ts +17 -0
  35. package/dist/canvas/neighbor.js +1 -0
  36. package/dist/canvas/node/canvas-node.d.ts +12 -2
  37. package/dist/canvas/node/canvas-node.js +8 -3
  38. package/dist/canvas/root/canvas-document.d.ts +10 -0
  39. package/dist/canvas/root/canvas-document.js +1 -0
  40. package/dist/canvas/root/canvas-root.d.ts +168 -9
  41. package/dist/canvas/root/canvas-root.js +239 -69
  42. package/dist/canvas/snap.d.ts +42 -0
  43. package/dist/canvas/snap.js +32 -0
  44. package/dist/carousel/root/carousel-root.d.ts +9 -3
  45. package/dist/carousel/root/carousel-root.js +17 -10
  46. package/dist/chat/composer/chat-composer.d.ts +5 -0
  47. package/dist/chat/composer/chat-composer.js +4 -1
  48. package/dist/chat/message/chat-message.d.ts +9 -5
  49. package/dist/chat/message/chat-message.js +8 -4
  50. package/dist/chat/naming.js +2 -2
  51. package/dist/chat/root/chat-root.d.ts +40 -4
  52. package/dist/chat/root/chat-root.js +38 -14
  53. package/dist/checkbox/root/checkbox-root.d.ts +11 -0
  54. package/dist/checkbox/root/checkbox-root.js +8 -2
  55. package/dist/checkbox-group/root/checkbox-group-root.d.ts +24 -0
  56. package/dist/checkbox-group/root/checkbox-group-root.js +28 -12
  57. package/dist/checkbox-group/select-all.d.ts +11 -0
  58. package/dist/checkbox-group/select-all.js +5 -0
  59. package/dist/code-block/root/code-block-root.d.ts +20 -8
  60. package/dist/code-block/root/code-block-root.js +16 -5
  61. package/dist/color-input/root/color-input-root.d.ts +13 -0
  62. package/dist/color-input/root/color-input-root.js +18 -5
  63. package/dist/color-picker/root/color-picker-root.d.ts +19 -3
  64. package/dist/color-picker/root/color-picker-root.js +52 -24
  65. package/dist/color-picker/wheel.d.ts +11 -0
  66. package/dist/color-picker/wheel.js +9 -0
  67. package/dist/combobox/root/combobox-root.d.ts +106 -18
  68. package/dist/combobox/root/combobox-root.js +101 -26
  69. package/dist/command/root/command-root.d.ts +19 -9
  70. package/dist/command/root/command-root.js +9 -4
  71. package/dist/copy-button/root/copy-button-root.d.ts +5 -0
  72. package/dist/copy-button/root/copy-button-root.js +7 -2
  73. package/dist/data-table/root/data-table-root.d.ts +171 -29
  74. package/dist/data-table/root/data-table-root.js +284 -161
  75. package/dist/date-input/root/date-input-root.d.ts +32 -9
  76. package/dist/date-input/root/date-input-root.js +66 -44
  77. package/dist/date-picker/root/date-picker-root.d.ts +38 -15
  78. package/dist/date-picker/root/date-picker-root.js +52 -33
  79. package/dist/description-list/item/description-list-item.d.ts +4 -0
  80. package/dist/description-list/item/description-list-item.js +7 -1
  81. package/dist/dialog/root/dialog-root.d.ts +12 -1
  82. package/dist/dialog/root/dialog-root.js +11 -4
  83. package/dist/divider/root/divider-root.d.ts +45 -16
  84. package/dist/divider/root/divider-root.js +28 -4
  85. package/dist/donut-chart/root/donut-chart-root.d.ts +5 -0
  86. package/dist/donut-chart/root/donut-chart-root.js +8 -5
  87. package/dist/drawer/root/drawer-root.d.ts +12 -1
  88. package/dist/drawer/root/drawer-root.js +9 -2
  89. package/dist/drilldown/item/drilldown-item.js +3 -4
  90. package/dist/drilldown/root/drilldown-root.d.ts +5 -0
  91. package/dist/drilldown/root/drilldown-root.js +4 -1
  92. package/dist/element-events.generated.js +26 -3
  93. package/dist/empty/root/empty-root.d.ts +17 -3
  94. package/dist/empty/root/empty-root.js +29 -5
  95. package/dist/file-input/root/file-input-root.d.ts +18 -3
  96. package/dist/file-input/root/file-input-root.js +34 -18
  97. package/dist/file-input/status.js +2 -1
  98. package/dist/filter-input/chip/filter-chip.d.ts +13 -0
  99. package/dist/filter-input/chip/filter-chip.js +7 -3
  100. package/dist/filter-input/menu/filter-menu.d.ts +5 -0
  101. package/dist/filter-input/menu/filter-menu.js +3 -1
  102. package/dist/filter-input/root/filter-input-root.d.ts +20 -3
  103. package/dist/filter-input/root/filter-input-root.js +8 -4
  104. package/dist/format-date/fields.d.ts +20 -0
  105. package/dist/format-date/fields.js +14 -0
  106. package/dist/format-date/options.d.ts +2 -1
  107. package/dist/format-date/options.js +9 -38
  108. package/dist/format-date/root/format-date-root.d.ts +55 -5
  109. package/dist/format-date/root/format-date-root.js +29 -34
  110. package/dist/graph/root/graph-model.d.ts +11 -0
  111. package/dist/graph/root/graph-model.js +4 -0
  112. package/dist/graph/root/graph-root.d.ts +101 -14
  113. package/dist/graph/root/graph-root.js +140 -46
  114. package/dist/heatmap/root/heatmap-root.d.ts +37 -4
  115. package/dist/heatmap/root/heatmap-root.js +51 -16
  116. package/dist/icon-button/root/icon-button-root.d.ts +5 -0
  117. package/dist/icon-button/root/icon-button-root.js +1 -0
  118. package/dist/image/root/image-root.d.ts +11 -0
  119. package/dist/input/root/input-root.d.ts +5 -0
  120. package/dist/input/root/input-root.js +4 -1
  121. package/dist/kbd/root/kbd-root.js +1 -2
  122. package/dist/legend/root/legend-root.js +4 -17
  123. package/dist/lightbox/root/lightbox-root.d.ts +14 -4
  124. package/dist/lightbox/root/lightbox-root.js +25 -7
  125. package/dist/line-chart/root/line-chart-root.d.ts +5 -0
  126. package/dist/line-chart/root/line-chart-root.js +4 -2
  127. package/dist/list/item/list-item.d.ts +32 -0
  128. package/dist/list/item/list-item.js +34 -7
  129. package/dist/list/root/list-root.d.ts +87 -0
  130. package/dist/list/root/list-root.js +119 -23
  131. package/dist/listbox/reorder/index.d.ts +1 -0
  132. package/dist/listbox/reorder/index.js +4 -0
  133. package/dist/listbox/reorder/listbox-reorder.d.ts +83 -0
  134. package/dist/listbox/reorder/listbox-reorder.js +151 -0
  135. package/dist/listbox/root/listbox-root.d.ts +185 -33
  136. package/dist/listbox/root/listbox-root.js +166 -136
  137. package/dist/loader/root/loader-root.d.ts +5 -0
  138. package/dist/loader/root/loader-root.js +3 -1
  139. package/dist/map/area/map-area.d.ts +5 -0
  140. package/dist/map/area/map-area.js +3 -1
  141. package/dist/map/buildings/map-buildings.d.ts +5 -0
  142. package/dist/map/buildings/map-buildings.js +3 -1
  143. package/dist/map/contours/map-contours.d.ts +5 -0
  144. package/dist/map/contours/map-contours.js +3 -1
  145. package/dist/map/landcover/map-landcover.d.ts +5 -0
  146. package/dist/map/landcover/map-landcover.js +3 -1
  147. package/dist/map/marker/map-marker.d.ts +18 -2
  148. package/dist/map/marker/map-marker.js +13 -5
  149. package/dist/map/points/map-points.d.ts +5 -0
  150. package/dist/map/points/map-points.js +6 -4
  151. package/dist/map/position/map-position.d.ts +5 -0
  152. package/dist/map/position/map-position.js +3 -1
  153. package/dist/map/raster/map-raster.d.ts +5 -0
  154. package/dist/map/raster/map-raster.js +3 -1
  155. package/dist/map/root/map-root.d.ts +73 -16
  156. package/dist/map/root/map-root.js +122 -44
  157. package/dist/map/route/map-route.d.ts +5 -0
  158. package/dist/map/route/map-route.js +3 -1
  159. package/dist/map/terrain/map-terrain.d.ts +5 -0
  160. package/dist/map/terrain/map-terrain.js +3 -1
  161. package/dist/megamenu/root/megamenu-root.js +4 -11
  162. package/dist/menu/root/menu-root.d.ts +7 -2
  163. package/dist/menu/root/menu-root.js +3 -1
  164. package/dist/meter/root/meter-root.d.ts +16 -3
  165. package/dist/meter/root/meter-root.js +12 -5
  166. package/dist/navigation/root/navigation-root.d.ts +5 -0
  167. package/dist/navigation/root/navigation-root.js +7 -8
  168. package/dist/notifications/group/notification-group.d.ts +8 -1
  169. package/dist/notifications/group/notification-group.js +12 -6
  170. package/dist/notifications/notification/notification.d.ts +17 -1
  171. package/dist/notifications/notification/notification.js +6 -2
  172. package/dist/notifications/root/notifications-root.d.ts +49 -5
  173. package/dist/notifications/root/notifications-root.js +36 -8
  174. package/dist/number-input/root/number-input-root.d.ts +21 -8
  175. package/dist/number-input/root/number-input-root.js +26 -11
  176. package/dist/object-inspector/root/object-inspector-root.d.ts +56 -13
  177. package/dist/object-inspector/root/object-inspector-root.js +41 -30
  178. package/dist/outline/root/outline-root.d.ts +5 -0
  179. package/dist/outline/root/outline-root.js +3 -1
  180. package/dist/pagination/root/pagination-root.d.ts +7 -1
  181. package/dist/pagination/root/pagination-root.js +16 -7
  182. package/dist/pagination/size/pagination-size.d.ts +8 -3
  183. package/dist/pagination/size/pagination-size.js +5 -3
  184. package/dist/pagination/summary/pagination-summary.d.ts +8 -6
  185. package/dist/pagination/summary/pagination-summary.js +4 -9
  186. package/dist/pin-input/code.d.ts +23 -0
  187. package/dist/pin-input/code.js +21 -0
  188. package/dist/pin-input/root/pin-input-root.d.ts +9 -3
  189. package/dist/pin-input/root/pin-input-root.js +13 -23
  190. package/dist/popover/root/popover-root.d.ts +12 -2
  191. package/dist/popover/root/popover-root.js +10 -4
  192. package/dist/progress/root/progress-root.d.ts +7 -2
  193. package/dist/progress/root/progress-root.js +5 -2
  194. package/dist/qr-code/name.d.ts +3 -2
  195. package/dist/qr-code/name.js +2 -2
  196. package/dist/qr-code/root/qr-code-root.d.ts +26 -5
  197. package/dist/qr-code/root/qr-code-root.js +27 -6
  198. package/dist/radio/group/radio-group.d.ts +11 -0
  199. package/dist/radio/group/radio-group.js +8 -2
  200. package/dist/rating/root/rating-root.d.ts +12 -1
  201. package/dist/rating/root/rating-root.js +10 -3
  202. package/dist/scatter-chart/measures.d.ts +22 -0
  203. package/dist/scatter-chart/measures.js +11 -0
  204. package/dist/scatter-chart/root/scatter-chart-root.d.ts +22 -8
  205. package/dist/scatter-chart/root/scatter-chart-root.js +25 -23
  206. package/dist/select/root/select-root.d.ts +67 -8
  207. package/dist/select/root/select-root.js +45 -11
  208. package/dist/skip-link/root/skip-link-root.d.ts +5 -0
  209. package/dist/skip-link/root/skip-link-root.js +3 -1
  210. package/dist/slider/root/slider-root.d.ts +7 -2
  211. package/dist/slider/root/slider-root.js +11 -5
  212. package/dist/sparkline/readings.d.ts +15 -5
  213. package/dist/sparkline/readings.js +3 -3
  214. package/dist/sparkline/root/sparkline-root.d.ts +9 -4
  215. package/dist/sparkline/root/sparkline-root.js +9 -3
  216. package/dist/speed-dial/group/speed-dial-group.d.ts +48 -0
  217. package/dist/speed-dial/group/speed-dial-group.js +43 -0
  218. package/dist/speed-dial/index.d.ts +1 -0
  219. package/dist/speed-dial/index.js +1 -0
  220. package/dist/speed-dial/item/speed-dial-item.d.ts +26 -1
  221. package/dist/speed-dial/item/speed-dial-item.js +41 -3
  222. package/dist/speed-dial/long-press.d.ts +50 -0
  223. package/dist/speed-dial/long-press.js +48 -0
  224. package/dist/speed-dial/root/speed-dial-root.d.ts +85 -1
  225. package/dist/speed-dial/root/speed-dial-root.js +117 -5
  226. package/dist/splitter/root/splitter-root.d.ts +12 -3
  227. package/dist/splitter/root/splitter-root.js +22 -4
  228. package/dist/steps/root/steps-root.d.ts +9 -2
  229. package/dist/steps/root/steps-root.js +6 -3
  230. package/dist/steps/step/step.d.ts +12 -0
  231. package/dist/steps/step/step.js +11 -2
  232. package/dist/switch/root/switch-root.d.ts +11 -0
  233. package/dist/switch/root/switch-root.js +8 -2
  234. package/dist/table/cell/table-cell.d.ts +8 -1
  235. package/dist/table/cell/table-cell.js +6 -2
  236. package/dist/table/column/table-column.d.ts +11 -4
  237. package/dist/table/column/table-column.js +15 -10
  238. package/dist/table/grid-controller.d.ts +122 -0
  239. package/dist/table/grid-controller.js +299 -0
  240. package/dist/table/root/table-root.d.ts +154 -8
  241. package/dist/table/root/table-root.js +197 -38
  242. package/dist/table/row/table-row.d.ts +55 -1
  243. package/dist/table/row/table-row.js +60 -7
  244. package/dist/tabs/root/tabs-root.d.ts +5 -0
  245. package/dist/tabs/root/tabs-root.js +3 -1
  246. package/dist/tag/group/tag-group.d.ts +5 -0
  247. package/dist/tag/group/tag-group.js +8 -15
  248. package/dist/tag/root/tag-root.d.ts +14 -1
  249. package/dist/tag/root/tag-root.js +11 -8
  250. package/dist/textarea/root/textarea-root.d.ts +5 -0
  251. package/dist/textarea/root/textarea-root.js +3 -1
  252. package/dist/time-input/root/time-input-root.d.ts +14 -7
  253. package/dist/time-input/root/time-input-root.js +43 -32
  254. package/dist/time-picker/root/time-picker-root.d.ts +16 -7
  255. package/dist/time-picker/root/time-picker-root.js +28 -12
  256. package/dist/toast/item/toast-item.d.ts +13 -3
  257. package/dist/toast/item/toast-item.js +2 -0
  258. package/dist/toast/root/toast-root.d.ts +22 -2
  259. package/dist/toast/root/toast-root.js +24 -17
  260. package/dist/toggle/group/toggle-group.js +3 -5
  261. package/dist/toolbar/root/toolbar-root.d.ts +36 -0
  262. package/dist/toolbar/root/toolbar-root.js +43 -9
  263. package/dist/tooltip/root/tooltip-root.d.ts +27 -17
  264. package/dist/tooltip/root/tooltip-root.js +1 -2
  265. package/dist/tour/root/tour-root.d.ts +8 -2
  266. package/dist/tour/root/tour-root.js +4 -2
  267. package/dist/tour/stop/tour-stop.d.ts +5 -0
  268. package/dist/tour/stop/tour-stop.js +6 -1
  269. package/dist/tree/grip.d.ts +5 -0
  270. package/dist/tree/grip.js +1 -0
  271. package/dist/tree/item/tree-item.d.ts +24 -0
  272. package/dist/tree/item/tree-item.js +27 -5
  273. package/dist/tree/root/tree-root.d.ts +66 -1
  274. package/dist/tree/root/tree-root.js +77 -5
  275. package/dist/trend/root/trend-root.d.ts +20 -4
  276. package/dist/trend/root/trend-root.js +20 -5
  277. package/dist/video/root/video-root.d.ts +23 -3
  278. package/dist/video/root/video-root.js +56 -15
  279. package/dist/video-playlist/menu/video-playlist-menu.d.ts +5 -0
  280. package/dist/video-playlist/menu/video-playlist-menu.js +3 -1
  281. package/dist/video-playlist/root/video-playlist-root.d.ts +5 -0
  282. package/dist/video-playlist/root/video-playlist-root.js +3 -1
  283. package/dist/virtual-list/root/virtual-list-root.d.ts +19 -3
  284. package/dist/virtual-list/root/virtual-list-root.js +10 -19
  285. package/lint.json +1 -1
  286. package/package.json +7 -6
  287. package/types/jsx.d.ts +6005 -2114
  288. package/types/svelte.d.ts +1 -0
  289. package/types/vue.d.ts +1594 -676
  290. package/types/words.d.ts +3280 -0
  291. package/dist/kbd/keys.d.ts +0 -29
  292. package/dist/kbd/keys.js +0 -52
  293. package/dist/toast/hotkey.d.ts +0 -22
  294. package/dist/toast/hotkey.js +0 -23
  295. package/dist/tooltip/focus-target.d.ts +0 -6
  296. package/dist/tooltip/focus-target.js +0 -9
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Where a card lands on a board that snaps: the arithmetic of a ruling, kept
3
+ * apart from the board that applies it.
4
+ *
5
+ * Every value is in the document's own units, and a step of nothing, zero or
6
+ * less is no snapping at all, so a board without `snap` moves exactly as it
7
+ * did before there was one.
8
+ */
9
+ /** A box on the board, in the document's own units. */
10
+ export interface SnapBox {
11
+ x: number;
12
+ y: number;
13
+ width: number;
14
+ height: number;
15
+ }
16
+ /**
17
+ * A value at the nearest multiple of `step`, or the value as it is where there
18
+ * is no step. A drag lets go wherever the hand is, and lands on the line
19
+ * nearest it.
20
+ */
21
+ export declare const snapTo: (value: number, step: number | undefined) => number;
22
+ /**
23
+ * The next multiple of `step` from `value`, the way a key points: `way` is `1`
24
+ * or `-1`.
25
+ *
26
+ * **On to the next line, and never back onto the same one.** A card sitting
27
+ * between two lines goes to the line ahead of it, and one on a line goes a
28
+ * whole step, so every press moves the card and every press lands on a line.
29
+ */
30
+ export declare const stepTo: (value: number, way: number, step: number) => number;
31
+ /**
32
+ * A box resized from a corner, with the edges that corner moves snapped, and
33
+ * held to a least size.
34
+ *
35
+ * Only the moving edges: the corner opposite the one in hand stays where it
36
+ * was, as it does without a ruling. Where the line nearest is inside the least
37
+ * size, the box stays at the least size rather than turning inside out.
38
+ */
39
+ export declare const snapBox: (box: SnapBox, start: SnapBox, corner: string, step: number | undefined, least: {
40
+ width: number;
41
+ height: number;
42
+ }) => SnapBox;
@@ -0,0 +1,32 @@
1
+ const snaps = (step) => step !== undefined && Number.isFinite(step) && step > 0;
2
+ export const snapTo = (value, step) => snaps(step) ? Math.round(value / step) * step : value;
3
+ export const stepTo = (value, way, step) => {
4
+ if (way === 0) {
5
+ return value;
6
+ }
7
+ const at = value / step;
8
+ const near = Math.round(at);
9
+ const on = Math.abs(at - near) < 1e-9 ? near : at;
10
+ return (way > 0 ? Math.floor(on) + 1 : Math.ceil(on) - 1) * step;
11
+ };
12
+ export const snapBox = (box, start, corner, step, least) => {
13
+ if (!snaps(step)) {
14
+ return box;
15
+ }
16
+ const left = corner.endsWith('left');
17
+ const top = corner.startsWith('top');
18
+ const right = start.x + start.width;
19
+ const bottom = start.y + start.height;
20
+ const width = left
21
+ ? Math.max(least.width, right - snapTo(box.x, step))
22
+ : Math.max(least.width, snapTo(box.x + box.width, step) - start.x);
23
+ const height = top
24
+ ? Math.max(least.height, bottom - snapTo(box.y, step))
25
+ : Math.max(least.height, snapTo(box.y + box.height, step) - start.y);
26
+ return {
27
+ height,
28
+ width,
29
+ x: left ? right - width : start.x,
30
+ y: top ? bottom - height : start.y,
31
+ };
32
+ };
@@ -1,4 +1,4 @@
1
- import { HelixElement } from '@fusion.dev/helix-core';
1
+ import { ChildrenController, HelixElement } from '@fusion.dev/helix-core';
2
2
  import { type PropertyValues, type TemplateResult } from 'lit';
3
3
  /**
4
4
  * @summary Shows one slide of several, with controls to move between them.
@@ -94,6 +94,11 @@ import { type PropertyValues, type TemplateResult } from 'lit';
94
94
  * @cssstate dragging - While a mouse drags the track, under `mouse-drag`.
95
95
  */
96
96
  export declare class HelixHeadlessCarousel extends HelixElement {
97
+ /**
98
+ * The key this family's words are registered under, its styled tag:
99
+ * `registerWords('de', { 'helix-carousel': { nextLabel: 'Nächste Folie' } })`.
100
+ */
101
+ static words: string;
97
102
  /**
98
103
  * Manual, so each slide can be wrapped without its markup being touched.
99
104
  *
@@ -727,9 +732,10 @@ export declare class HelixHeadlessCarousel extends HelixElement {
727
732
  * that changes an assignment is this component calling `assign`, so a slide
728
733
  * appended by a consumer would reach no slot, render nowhere and be counted by
729
734
  * nothing. A default slot needs no watcher, taking whatever is there; a manual
730
- * one does. `Chat` watches for the same reason.
735
+ * one does. `Chat` watches for the same reason, through the same core
736
+ * controller.
731
737
  */
732
- private watcher;
738
+ protected readonly childWatch: ChildrenController;
733
739
  connectedCallback(): void;
734
740
  disconnectedCallback(): void;
735
741
  /** Pauses without forgetting that the reader wanted it running. */
@@ -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 { capturePointer, customElement, fillTemplate, HelixActivateEvent, HelixElement, HelixSelectEvent, hostAria, inlineStep, isRtl, requestChange, } from '@fusion.dev/helix-core';
7
+ import { ChildrenController, capturePointer, customElement, formatWords, HelixActivateEvent, HelixElement, HelixSelectEvent, hostAria, inlineStep, isRtl, requestChange, words, } from '@fusion.dev/helix-core';
8
8
  import { caretLeft, caretRight, play, stop } from '@fusion.dev/helix-icons';
9
9
  import { html, nothing } from 'lit';
10
10
  import { property, state } from 'lit/decorators.js';
@@ -185,13 +185,14 @@ let HelixHeadlessCarousel = class HelixHeadlessCarousel extends HelixElement {
185
185
  };
186
186
  this.scrollFrame = 0;
187
187
  this.stopped = false;
188
- this.watcher = undefined;
188
+ this.childWatch = new ChildrenController(this);
189
189
  this.pause = () => {
190
190
  if (!this.stopped) {
191
191
  this.rotating = false;
192
192
  }
193
193
  };
194
194
  }
195
+ static { this.words = 'helix-carousel'; }
195
196
  static { this.shadowRootOptions = {
196
197
  ...HelixElement.shadowRootOptions,
197
198
  slotAssignment: 'manual',
@@ -388,8 +389,6 @@ let HelixHeadlessCarousel = class HelixHeadlessCarousel extends HelixElement {
388
389
  super.connectedCallback();
389
390
  this.addEventListener('focusin', this.pause);
390
391
  this.addEventListener('pointerenter', this.pause);
391
- this.watcher = new MutationObserver(() => this.requestUpdate());
392
- this.watcher.observe(this, { childList: true });
393
392
  this.watchPane();
394
393
  if (this.hasUpdated) {
395
394
  this.runTimer();
@@ -403,8 +402,6 @@ let HelixHeadlessCarousel = class HelixHeadlessCarousel extends HelixElement {
403
402
  }
404
403
  this.removeEventListener('focusin', this.pause);
405
404
  this.removeEventListener('pointerenter', this.pause);
406
- this.watcher?.disconnect();
407
- this.watcher = undefined;
408
405
  this.sizes?.disconnect();
409
406
  this.sizes = undefined;
410
407
  this.watched = undefined;
@@ -419,7 +416,7 @@ let HelixHeadlessCarousel = class HelixHeadlessCarousel extends HelixElement {
419
416
  if (changed.has('index')) {
420
417
  this.showing = undefined;
421
418
  if (this.hasUpdated) {
422
- this.said = fillTemplate(this.slideLabel, {
419
+ this.said = formatWords(this, 'slideLabel', {
423
420
  count: this.slides.length,
424
421
  index: this.index + 1,
425
422
  });
@@ -569,7 +566,7 @@ let HelixHeadlessCarousel = class HelixHeadlessCarousel extends HelixElement {
569
566
  part="slide"
570
567
  role="group"
571
568
  aria-roledescription=${this.slideRoleLabel || nothing}
572
- aria-label=${fillTemplate(this.slideLabel, { count: this.slides.length, index: index + 1 })}
569
+ aria-label=${formatWords(this, 'slideLabel', { count: this.slides.length, index: index + 1 })}
573
570
  style=${this.paneStyle(index, last, stops)}
574
571
  >
575
572
  <slot
@@ -580,14 +577,14 @@ let HelixHeadlessCarousel = class HelixHeadlessCarousel extends HelixElement {
580
577
  </div>
581
578
  ${''}<span part="live" aria-live=${rotating ? 'off' : 'polite'}>${this.said}</span>
582
579
  ${this.slides.length > 1 && this.across !== undefined
583
- ? html `<div part="indicators" role="group" aria-label=${fillTemplate(this.indicatorsLabel, { label: this.label })}>
580
+ ? html `<div part="indicators" role="group" aria-label=${formatWords(this, 'indicatorsLabel', { label: this.label })}>
584
581
  ${''}
585
582
  ${stops.map((stop, at) => {
586
583
  const current = at === showing;
587
584
  return html `<button
588
585
  part="indicator${current ? ' indicator-current' : ''}"
589
586
  type="button"
590
- aria-label=${fillTemplate(this.indicatorLabel, { index: at + 1 })}
587
+ aria-label=${formatWords(this, 'indicatorLabel', { index: at + 1 })}
591
588
  aria-current=${at === place ? 'true' : nothing}
592
589
  tabindex=${at === place ? '0' : '-1'}
593
590
  ?data-current=${current}
@@ -612,15 +609,18 @@ __decorate([
612
609
  property({ type: Number })
613
610
  ], HelixHeadlessCarousel.prototype, "index", null);
614
611
  __decorate([
612
+ words,
615
613
  property({ attribute: 'indicator-label' })
616
614
  ], HelixHeadlessCarousel.prototype, "indicatorLabel", void 0);
617
615
  __decorate([
616
+ words,
618
617
  property({ attribute: 'indicators-label' })
619
618
  ], HelixHeadlessCarousel.prototype, "indicatorsLabel", void 0);
620
619
  __decorate([
621
620
  property({ type: Number })
622
621
  ], HelixHeadlessCarousel.prototype, "interval", void 0);
623
622
  __decorate([
623
+ words,
624
624
  property()
625
625
  ], HelixHeadlessCarousel.prototype, "label", void 0);
626
626
  __decorate([
@@ -630,6 +630,7 @@ __decorate([
630
630
  property({ attribute: 'mouse-drag', reflect: true, type: Boolean })
631
631
  ], HelixHeadlessCarousel.prototype, "mouseDrag", void 0);
632
632
  __decorate([
633
+ words,
633
634
  property({ attribute: 'next-label' })
634
635
  ], HelixHeadlessCarousel.prototype, "nextLabel", void 0);
635
636
  __decorate([
@@ -642,24 +643,30 @@ __decorate([
642
643
  property({ attribute: 'per-view', converter: COUNT_OR_AUTO, reflect: true })
643
644
  ], HelixHeadlessCarousel.prototype, "perView", void 0);
644
645
  __decorate([
646
+ words,
645
647
  property({ attribute: 'previous-label' })
646
648
  ], HelixHeadlessCarousel.prototype, "previousLabel", void 0);
647
649
  __decorate([
650
+ words,
648
651
  property({ attribute: 'role-label' })
649
652
  ], HelixHeadlessCarousel.prototype, "roleLabel", void 0);
650
653
  __decorate([
654
+ words,
651
655
  property({ attribute: 'slide-label' })
652
656
  ], HelixHeadlessCarousel.prototype, "slideLabel", void 0);
653
657
  __decorate([
658
+ words,
654
659
  property({ attribute: 'slide-role-label' })
655
660
  ], HelixHeadlessCarousel.prototype, "slideRoleLabel", void 0);
656
661
  __decorate([
657
662
  property({ attribute: 'slides-per-move', type: Number })
658
663
  ], HelixHeadlessCarousel.prototype, "slidesPerMove", void 0);
659
664
  __decorate([
665
+ words,
660
666
  property({ attribute: 'start-label' })
661
667
  ], HelixHeadlessCarousel.prototype, "startLabel", void 0);
662
668
  __decorate([
669
+ words,
663
670
  property({ attribute: 'stop-label' })
664
671
  ], HelixHeadlessCarousel.prototype, "stopLabel", void 0);
665
672
  __decorate([
@@ -47,6 +47,11 @@ import { type PropertyValues, type TemplateResult } from 'lit';
47
47
  * @csspart tools - The row under the field.
48
48
  */
49
49
  export declare class HelixHeadlessChatComposer extends HelixFormElement {
50
+ /**
51
+ * The key this part's words are registered under, its styled tag:
52
+ * `registerWords('de', { 'helix-chat-composer': { sendLabel: 'Senden' } })`.
53
+ */
54
+ static words: string;
50
55
  /**
51
56
  * The field's name, read by screen readers.
52
57
  */
@@ -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 { customElement, DelayController, HelixFormElement, HelixSendEvent, HelixTypingEvent, hostAria, markRegion, } from '@fusion.dev/helix-core';
7
+ import { customElement, DelayController, HelixFormElement, HelixSendEvent, HelixTypingEvent, hostAria, markRegion, words, } from '@fusion.dev/helix-core';
8
8
  import { arrowElbowDownLeft } from '@fusion.dev/helix-icons';
9
9
  import { html } from 'lit';
10
10
  import { property } from 'lit/decorators.js';
@@ -43,6 +43,7 @@ let HelixHeadlessChatComposer = class HelixHeadlessChatComposer extends HelixFor
43
43
  this.send();
44
44
  };
45
45
  }
46
+ static { this.words = 'helix-chat-composer'; }
46
47
  get typing() {
47
48
  return this.writing;
48
49
  }
@@ -136,6 +137,7 @@ let HelixHeadlessChatComposer = class HelixHeadlessChatComposer extends HelixFor
136
137
  }
137
138
  };
138
139
  __decorate([
140
+ words,
139
141
  property()
140
142
  ], HelixHeadlessChatComposer.prototype, "label", void 0);
141
143
  __decorate([
@@ -145,6 +147,7 @@ __decorate([
145
147
  property({ type: Number })
146
148
  ], HelixHeadlessChatComposer.prototype, "rows", void 0);
147
149
  __decorate([
150
+ words,
148
151
  property({ attribute: 'send-label' })
149
152
  ], HelixHeadlessChatComposer.prototype, "sendLabel", void 0);
150
153
  __decorate([
@@ -3,8 +3,8 @@ import { nothing, type PropertyValues, type TemplateResult } from 'lit';
3
3
  /**
4
4
  * What a turn that did not send is called, where nobody said otherwise.
5
5
  *
6
- * Exported because the transcript says it too: a failure is announced in the
7
- * words the turn shows, and two defaults for one phrase are two phrases.
6
+ * @deprecated The English of `failed-label`, which is now a word property:
7
+ * register its words with `registerWords`. Removed in the next major version.
8
8
  */
9
9
  export declare const FAILED_LABEL = "Not sent";
10
10
  /**
@@ -55,6 +55,11 @@ export declare const FAILED_LABEL = "Not sent";
55
55
  * @csspart time - The turn's time.
56
56
  */
57
57
  export declare class HelixHeadlessChatMessage extends HelixElement {
58
+ /**
59
+ * The key this part's words are registered under, its styled tag:
60
+ * `registerWords('de', { 'helix-chat-message': { retryLabel: 'Erneut versuchen' } })`.
61
+ */
62
+ static words: string;
58
63
  /**
59
64
  * The turn's time, in any format `Date` parses.
60
65
  */
@@ -82,9 +87,8 @@ export declare class HelixHeadlessChatMessage extends HelixElement {
82
87
  */
83
88
  failedLabel: string;
84
89
  /**
85
- * Locale for the timestamp.
86
- *
87
- * Empty is the runtime's own.
90
+ * The locale the timestamp and the words are in, as a BCP 47 tag such as
91
+ * `de`. Empty reads the nearest `lang`, then the browser's language.
88
92
  */
89
93
  locale: string;
90
94
  /**
@@ -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 { customElement, HelixElement, HelixSendEvent, hostAria, markRegion, RelativeClockController, relativeTime, requestChange, TONE_MARKS, } from '@fusion.dev/helix-core';
7
+ import { customElement, HelixElement, HelixSendEvent, hostAria, markRegion, RelativeClockController, relativeTime, requestChange, TONE_MARKS, words, wordsLocale, } from '@fusion.dev/helix-core';
8
8
  import { html, nothing } from 'lit';
9
9
  import { property } from 'lit/decorators.js';
10
10
  import { unsafeSVG } from 'lit/directives/unsafe-svg.js';
@@ -15,7 +15,7 @@ let HelixHeadlessChatMessage = class HelixHeadlessChatMessage extends HelixEleme
15
15
  super(...arguments);
16
16
  this.at = '';
17
17
  this.authorLabel = '';
18
- this.failedLabel = FAILED_LABEL;
18
+ this.failedLabel = 'Not sent';
19
19
  this.locale = '';
20
20
  this.retryLabel = 'Try again';
21
21
  this.sendingLabel = 'Sending';
@@ -24,7 +24,7 @@ let HelixHeadlessChatMessage = class HelixHeadlessChatMessage extends HelixEleme
24
24
  this.clock = new RelativeClockController(this, {
25
25
  expires: (now) => {
26
26
  const moment = this.moment;
27
- return moment ? relativeTime(this.locale)(moment, now).next : undefined;
27
+ return moment ? relativeTime(wordsLocale(this))(moment, now).next : undefined;
28
28
  },
29
29
  });
30
30
  this.handleFill = () => {
@@ -49,6 +49,7 @@ let HelixHeadlessChatMessage = class HelixHeadlessChatMessage extends HelixEleme
49
49
  });
50
50
  };
51
51
  }
52
+ static { this.words = 'helix-chat-message'; }
52
53
  get moment() {
53
54
  if (this.at === '') {
54
55
  return undefined;
@@ -66,7 +67,7 @@ let HelixHeadlessChatMessage = class HelixHeadlessChatMessage extends HelixEleme
66
67
  }
67
68
  get reading() {
68
69
  const moment = this.moment;
69
- return moment ? relativeTime(this.locale)(moment, new Date(this.clock.now)).text : '';
70
+ return moment ? relativeTime(wordsLocale(this))(moment, new Date(this.clock.now)).text : '';
70
71
  }
71
72
  get name() {
72
73
  return turnName(authorWords(this.author, this.authorLabel, this.turnWords), this.reading, this.turnWords);
@@ -142,15 +143,18 @@ __decorate([
142
143
  property({ attribute: 'author-label' })
143
144
  ], HelixHeadlessChatMessage.prototype, "authorLabel", void 0);
144
145
  __decorate([
146
+ words,
145
147
  property({ attribute: 'failed-label' })
146
148
  ], HelixHeadlessChatMessage.prototype, "failedLabel", void 0);
147
149
  __decorate([
148
150
  property()
149
151
  ], HelixHeadlessChatMessage.prototype, "locale", void 0);
150
152
  __decorate([
153
+ words,
151
154
  property({ attribute: 'retry-label' })
152
155
  ], HelixHeadlessChatMessage.prototype, "retryLabel", void 0);
153
156
  __decorate([
157
+ words,
154
158
  property({ attribute: 'sending-label' })
155
159
  ], HelixHeadlessChatMessage.prototype, "sendingLabel", void 0);
156
160
  __decorate([
@@ -1,4 +1,4 @@
1
- import { fillTemplate } from '@fusion.dev/helix-core';
1
+ import { formatMessage } from '@fusion.dev/helix-core';
2
2
  export const TURN_WORDS = { me: 'You', sentence: '{author}, {time}', turn: 'Message' };
3
3
  export const authorWords = (author, authorLabel, words) => {
4
4
  if (authorLabel !== '') {
@@ -10,5 +10,5 @@ export const authorWords = (author, authorLabel, words) => {
10
10
  return author === undefined || author === 'them' ? '' : author;
11
11
  };
12
12
  export const turnName = (author, time, words) => author !== '' && time !== ''
13
- ? fillTemplate(words.sentence, { author, time })
13
+ ? formatMessage(words.sentence, { author, time }, '')
14
14
  : author || time || words.turn;
@@ -1,6 +1,6 @@
1
- import { HelixElement } from '@fusion.dev/helix-core';
1
+ import { ChildrenController, HelixElement } from '@fusion.dev/helix-core';
2
2
  import { type PropertyValues, type TemplateResult } from 'lit';
3
- import { type HelixHeadlessChatMessage } from '../message/chat-message.js';
3
+ import type { HelixHeadlessChatMessage } from '../message/chat-message.js';
4
4
  /** One turn handed over as data, which is what `turns` holds. */
5
5
  export interface ChatTurn {
6
6
  /** When it was said, as anything `Date` parses. */
@@ -128,6 +128,11 @@ declare const HelixHeadlessChat_base: (new (...args: any[]) => import("@fusion.d
128
128
  * @csspart typing - The words that say who is typing, in the status band, while `typing` names someone.
129
129
  */
130
130
  export declare class HelixHeadlessChat extends HelixHeadlessChat_base {
131
+ /**
132
+ * The key this family's words are registered under, its styled tag:
133
+ * `registerWords('de', { 'helix-chat': { typingLabel: '{author} schreibt' } })`.
134
+ */
135
+ static words: string;
131
136
  /**
132
137
  * Slots are assigned manually, so only the turns go into the log.
133
138
  *
@@ -159,6 +164,19 @@ export declare class HelixHeadlessChat extends HelixHeadlessChat_base {
159
164
  * so a default of true had no attribute that turned it off.
160
165
  */
161
166
  defaultPinned: boolean;
167
+ /**
168
+ * What a turn from `turns` that did not send says, and what a screen reader
169
+ * hears before its words. A turn you write as a child says its own
170
+ * `failed-label`.
171
+ */
172
+ failedLabel: string;
173
+ /**
174
+ * What a screen reader hears for a turn that did not send. `{failed}` is the
175
+ * turn's `failed-label` and `{text}` is its words.
176
+ */
177
+ failedTurnLabel: string;
178
+ /** The conversation's name, read by screen readers, where `label` is empty. */
179
+ fallbackLabel: string;
162
180
  /**
163
181
  * Whether there are older turns to load, and whether they are loading.
164
182
  *
@@ -253,8 +271,18 @@ export declare class HelixHeadlessChat extends HelixHeadlessChat_base {
253
271
  * a turn is told again only when they change.
254
272
  */
255
273
  private words;
256
- /** Watches for turns arriving, since a manual slot hears nothing about them. */
257
- private watcher;
274
+ /**
275
+ * Watches for turns arriving, since a manual slot hears nothing about them.
276
+ *
277
+ * **A turn that arrives after first paint reaches nothing on its own.**
278
+ * Slots are assigned by hand here, so appending a child assigns it to
279
+ * nothing, fires no `slotchange`, and schedules no render: the transcript
280
+ * went on showing "Nothing to show" over six children it already had, and
281
+ * the one thing a conversation does is grow. Measured with
282
+ * `assignedElements()` at zero against `children` at nine. Children only,
283
+ * never a turn's own text, which a streaming turn rewrites every frame.
284
+ */
285
+ protected readonly childWatch: ChildrenController;
258
286
  /** Watches the turns' own `state`, which is when one of them settles. */
259
287
  private settling;
260
288
  /** Watches the turns and the log for size, which scrolling does not report. */
@@ -366,6 +394,14 @@ export declare class HelixHeadlessChat extends HelixHeadlessChat_base {
366
394
  * turn; what they were reading is the one fixed point. It is also idempotent,
367
395
  * which is what lets it run beside the browser's own scroll anchoring where
368
396
  * there is some: a turn the browser already put back has not moved.
397
+ *
398
+ * **A transcript fed as data writes no scroll offset while the reader
399
+ * scrolls.** Turns drawn above the reader for the first time come out taller
400
+ * or shorter than the estimate, and a write to `scrollTop` to make up for
401
+ * them ends a fling on iOS. While the reader scrolls, the controller holds
402
+ * them instead, in its spacer above the window, and squares the scroll offset
403
+ * once the log is still. The turn noted before a scroll whose event has not
404
+ * arrived is out of date, so that counts as scrolling too.
369
405
  */
370
406
  private restore;
371
407
  /** Fires `helix-history` once for each time the reader reaches the top. */