@fusion.dev/helix-headless 0.145.0 → 0.147.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 (343) hide show
  1. package/custom-elements.json +12286 -4281
  2. package/dist/accordion/item/accordion-item.d.ts +51 -18
  3. package/dist/accordion/item/accordion-item.js +45 -13
  4. package/dist/accordion/root/accordion-root.d.ts +16 -7
  5. package/dist/accordion/root/accordion-root.js +3 -3
  6. package/dist/announcement/root/announcement-root.d.ts +16 -6
  7. package/dist/announcement/root/announcement-root.js +37 -7
  8. package/dist/app-header/root/app-header-root.d.ts +7 -2
  9. package/dist/app-header/root/app-header-root.js +9 -1
  10. package/dist/app-header/sectioning.d.ts +3 -1
  11. package/dist/app-header/sectioning.js +3 -2
  12. package/dist/area-chart/root/area-chart-root.d.ts +18 -1
  13. package/dist/area-chart/root/area-chart-root.js +11 -3
  14. package/dist/avatar/group/avatar-group.d.ts +20 -14
  15. package/dist/avatar/group/avatar-group.js +17 -19
  16. package/dist/avatar/root/avatar-root.d.ts +31 -1
  17. package/dist/avatar/root/avatar-root.js +11 -1
  18. package/dist/badge/root/badge-root.d.ts +60 -7
  19. package/dist/badge/root/badge-root.js +89 -6
  20. package/dist/bar-chart/root/bar-chart-root.d.ts +18 -1
  21. package/dist/bar-chart/root/bar-chart-root.js +48 -20
  22. package/dist/bar-chart/stack.d.ts +25 -0
  23. package/dist/bar-chart/stack.js +27 -0
  24. package/dist/breadcrumbs/breadcrumb/breadcrumb.d.ts +14 -0
  25. package/dist/breadcrumbs/breadcrumb/breadcrumb.js +12 -2
  26. package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +25 -0
  27. package/dist/breadcrumbs/root/breadcrumbs-root.js +51 -4
  28. package/dist/button/root/button-root.d.ts +50 -38
  29. package/dist/button/root/button-root.js +42 -53
  30. package/dist/button/submitter.d.ts +27 -0
  31. package/dist/button/submitter.js +25 -0
  32. package/dist/button-group/root/button-group-root.d.ts +2 -1
  33. package/dist/button-group/root/button-group-root.js +5 -1
  34. package/dist/canvas/node/canvas-node.d.ts +4 -3
  35. package/dist/canvas/node/canvas-node.js +3 -2
  36. package/dist/canvas/root/canvas-root.js +2 -2
  37. package/dist/card/root/card-root.d.ts +36 -4
  38. package/dist/card/root/card-root.js +29 -10
  39. package/dist/carousel/root/carousel-root.d.ts +43 -4
  40. package/dist/carousel/root/carousel-root.js +40 -12
  41. package/dist/carousel/stops.d.ts +20 -0
  42. package/dist/carousel/stops.js +30 -0
  43. package/dist/chat/message/chat-message.js +5 -4
  44. package/dist/chat/naming.d.ts +5 -1
  45. package/dist/chat/naming.js +4 -2
  46. package/dist/chat/root/chat-root.d.ts +40 -4
  47. package/dist/chat/root/chat-root.js +32 -6
  48. package/dist/checkbox/root/checkbox-root.d.ts +20 -0
  49. package/dist/checkbox/root/checkbox-root.js +18 -7
  50. package/dist/checkbox-group/root/checkbox-group-root.d.ts +8 -2
  51. package/dist/checkbox-group/root/checkbox-group-root.js +14 -11
  52. package/dist/checkbox-group/select-all.d.ts +21 -0
  53. package/dist/checkbox-group/select-all.js +7 -0
  54. package/dist/code-block/highlight.d.ts +15 -0
  55. package/dist/code-block/highlight.js +4 -0
  56. package/dist/code-block/root/code-block-root.d.ts +79 -10
  57. package/dist/code-block/root/code-block-root.js +74 -5
  58. package/dist/color-input/root/color-input-root.d.ts +14 -0
  59. package/dist/color-input/root/color-input-root.js +17 -7
  60. package/dist/color-picker/channels.js +1 -2
  61. package/dist/color-picker/root/color-picker-root.d.ts +53 -16
  62. package/dist/color-picker/root/color-picker-root.js +155 -46
  63. package/dist/color-picker/wheel.d.ts +17 -0
  64. package/dist/color-picker/wheel.js +6 -0
  65. package/dist/combobox/root/combobox-root.d.ts +56 -0
  66. package/dist/combobox/root/combobox-root.js +92 -15
  67. package/dist/command/root/command-root.d.ts +19 -2
  68. package/dist/command/root/command-root.js +24 -23
  69. package/dist/copy-button/root/copy-button-root.d.ts +21 -1
  70. package/dist/copy-button/root/copy-button-root.js +16 -4
  71. package/dist/data-table/index.d.ts +1 -1
  72. package/dist/data-table/index.js +1 -1
  73. package/dist/data-table/keys.d.ts +6 -0
  74. package/dist/data-table/keys.js +14 -0
  75. package/dist/data-table/root/data-table-root.d.ts +27 -18
  76. package/dist/data-table/root/data-table-root.js +31 -57
  77. package/dist/data-table/tree.d.ts +16 -1
  78. package/dist/data-table/tree.js +2 -3
  79. package/dist/date-input/root/date-input-root.d.ts +11 -2
  80. package/dist/date-input/root/date-input-root.js +26 -12
  81. package/dist/date-picker/root/date-picker-root.d.ts +14 -9
  82. package/dist/date-picker/root/date-picker-root.js +33 -22
  83. package/dist/description-list/item/description-list-item.d.ts +18 -4
  84. package/dist/description-list/item/description-list-item.js +8 -4
  85. package/dist/dialog/description.js +15 -1
  86. package/dist/dialog/root/dialog-root.d.ts +8 -2
  87. package/dist/dialog/root/dialog-root.js +16 -1
  88. package/dist/divider/root/divider-root.d.ts +3 -0
  89. package/dist/divider/root/divider-root.js +2 -1
  90. package/dist/donut-chart/root/donut-chart-root.d.ts +31 -0
  91. package/dist/donut-chart/root/donut-chart-root.js +55 -1
  92. package/dist/donut-chart/slice-label.d.ts +35 -0
  93. package/dist/donut-chart/slice-label.js +11 -0
  94. package/dist/drawer/reveal.d.ts +8 -0
  95. package/dist/drawer/reveal.js +1 -0
  96. package/dist/drawer/root/drawer-root.d.ts +63 -2
  97. package/dist/drawer/root/drawer-root.js +75 -4
  98. package/dist/drilldown/item/drilldown-item.d.ts +21 -1
  99. package/dist/drilldown/item/drilldown-item.js +40 -5
  100. package/dist/drilldown/root/drilldown-root.d.ts +21 -3
  101. package/dist/drilldown/root/drilldown-root.js +22 -3
  102. package/dist/element-events.generated.js +35 -6
  103. package/dist/empty/root/empty-root.d.ts +34 -2
  104. package/dist/empty/root/empty-root.js +26 -4
  105. package/dist/file-input/root/file-input-root.d.ts +99 -8
  106. package/dist/file-input/root/file-input-root.js +120 -22
  107. package/dist/file-input/screen.d.ts +2 -1
  108. package/dist/file-input/status.d.ts +24 -0
  109. package/dist/file-input/status.js +10 -0
  110. package/dist/filter-input/chip/filter-chip.d.ts +23 -0
  111. package/dist/filter-input/chip/filter-chip.js +11 -2
  112. package/dist/filter-input/menu/filter-menu.d.ts +2 -0
  113. package/dist/filter-input/menu/filter-menu.js +12 -4
  114. package/dist/filter-input/root/filter-input-root.d.ts +38 -6
  115. package/dist/filter-input/root/filter-input-root.js +18 -28
  116. package/dist/filter-input/suggest.d.ts +28 -3
  117. package/dist/filter-input/suggest.js +18 -8
  118. package/dist/format-date/options.d.ts +3 -4
  119. package/dist/format-date/options.js +2 -2
  120. package/dist/format-date/root/format-date-root.d.ts +27 -17
  121. package/dist/format-date/root/format-date-root.js +27 -48
  122. package/dist/heatmap/root/buckets.d.ts +21 -0
  123. package/dist/heatmap/root/buckets.js +34 -0
  124. package/dist/heatmap/root/heatmap-root.d.ts +83 -11
  125. package/dist/heatmap/root/heatmap-root.js +104 -12
  126. package/dist/icon/index.d.ts +1 -1
  127. package/dist/icon/index.js +1 -1
  128. package/dist/icon/registry.d.ts +26 -1
  129. package/dist/icon/registry.js +12 -1
  130. package/dist/icon/root/icon-root.d.ts +25 -1
  131. package/dist/icon/root/icon-root.js +44 -12
  132. package/dist/icon/root/index.d.ts +1 -1
  133. package/dist/icon/root/index.js +1 -1
  134. package/dist/icon/settle.d.ts +7 -0
  135. package/dist/icon/settle.js +10 -0
  136. package/dist/icon-button/root/icon-button-root.d.ts +2 -0
  137. package/dist/image/root/image-root.d.ts +14 -1
  138. package/dist/image/root/image-root.js +7 -2
  139. package/dist/input/root/input-root.d.ts +34 -3
  140. package/dist/input/root/input-root.js +17 -4
  141. package/dist/kbd/keys.d.ts +29 -0
  142. package/dist/kbd/keys.js +52 -0
  143. package/dist/kbd/root/kbd-root.d.ts +52 -1
  144. package/dist/kbd/root/kbd-root.js +40 -47
  145. package/dist/legend/hidden-series.d.ts +10 -2
  146. package/dist/legend/hidden-series.js +5 -2
  147. package/dist/legend/root/legend-root.d.ts +77 -12
  148. package/dist/legend/root/legend-root.js +71 -17
  149. package/dist/lightbox/root/lightbox-root.d.ts +98 -10
  150. package/dist/lightbox/root/lightbox-root.js +153 -18
  151. package/dist/lightbox/zoom-controller.d.ts +59 -0
  152. package/dist/lightbox/zoom-controller.js +128 -0
  153. package/dist/lightbox/zoom.d.ts +24 -0
  154. package/dist/lightbox/zoom.js +18 -0
  155. package/dist/line-chart/root/line-chart-root.d.ts +38 -1
  156. package/dist/line-chart/root/line-chart-root.js +31 -3
  157. package/dist/list/item/list-item.d.ts +2 -0
  158. package/dist/list/item/list-item.js +11 -2
  159. package/dist/list/root/list-root.d.ts +70 -13
  160. package/dist/list/root/list-root.js +91 -13
  161. package/dist/list/selection.d.ts +54 -7
  162. package/dist/list/selection.js +32 -7
  163. package/dist/listbox/root/listbox-root.d.ts +44 -4
  164. package/dist/listbox/root/listbox-root.js +72 -34
  165. package/dist/loader/busy.d.ts +10 -0
  166. package/dist/loader/busy.js +11 -0
  167. package/dist/loader/root/loader-root.d.ts +9 -2
  168. package/dist/loader/root/loader-root.js +23 -3
  169. package/dist/megamenu/hand-over.d.ts +75 -0
  170. package/dist/megamenu/hand-over.js +67 -0
  171. package/dist/megamenu/root/megamenu-root.d.ts +80 -15
  172. package/dist/megamenu/root/megamenu-root.js +76 -19
  173. package/dist/menu/item/menu-item.d.ts +51 -2
  174. package/dist/menu/item/menu-item.js +50 -26
  175. package/dist/menu/root/menu-root.d.ts +17 -0
  176. package/dist/menu/root/menu-root.js +2 -2
  177. package/dist/meter/root/meter-root.d.ts +62 -1
  178. package/dist/meter/root/meter-root.js +38 -16
  179. package/dist/navigation/root/navigation-root.d.ts +2 -1
  180. package/dist/navigation/root/navigation-root.js +2 -2
  181. package/dist/notifications/root/notifications-root.d.ts +20 -4
  182. package/dist/notifications/root/notifications-root.js +30 -8
  183. package/dist/number-input/grain.d.ts +28 -0
  184. package/dist/number-input/grain.js +14 -0
  185. package/dist/number-input/root/number-input-root.d.ts +34 -9
  186. package/dist/number-input/root/number-input-root.js +31 -25
  187. package/dist/object-inspector/root/object-inspector-root.d.ts +88 -33
  188. package/dist/object-inspector/root/object-inspector-root.js +134 -92
  189. package/dist/object-inspector/rows.d.ts +18 -0
  190. package/dist/object-inspector/rows.js +33 -0
  191. package/dist/option/index.d.ts +1 -0
  192. package/dist/option/index.js +1 -0
  193. package/dist/option/root/option-root.d.ts +5 -3
  194. package/dist/option/separator/option-separator.d.ts +30 -0
  195. package/dist/option/separator/option-separator.js +21 -0
  196. package/dist/outline/root/outline-root.d.ts +30 -0
  197. package/dist/outline/root/outline-root.js +17 -13
  198. package/dist/pagination/size/pagination-size.d.ts +6 -0
  199. package/dist/pagination/size/pagination-size.js +5 -3
  200. package/dist/pin-input/code.d.ts +37 -0
  201. package/dist/pin-input/code.js +25 -0
  202. package/dist/pin-input/root/pin-input-root.d.ts +116 -115
  203. package/dist/pin-input/root/pin-input-root.js +163 -155
  204. package/dist/popover/hide-outside.d.ts +14 -0
  205. package/dist/popover/hide-outside.js +34 -0
  206. package/dist/popover/root/popover-root.d.ts +64 -8
  207. package/dist/popover/root/popover-root.js +67 -4
  208. package/dist/progress/root/progress-root.d.ts +47 -0
  209. package/dist/progress/root/progress-root.js +34 -16
  210. package/dist/qr-code/export.d.ts +45 -1
  211. package/dist/qr-code/export.js +28 -0
  212. package/dist/qr-code/name.d.ts +11 -0
  213. package/dist/qr-code/name.js +7 -0
  214. package/dist/qr-code/root/qr-code-root.d.ts +36 -11
  215. package/dist/qr-code/root/qr-code-root.js +58 -11
  216. package/dist/quote/marks.d.ts +8 -0
  217. package/dist/quote/marks.js +5 -0
  218. package/dist/quote/root/quote-root.d.ts +14 -2
  219. package/dist/quote/root/quote-root.js +23 -1
  220. package/dist/radio/group/radio-group.d.ts +15 -0
  221. package/dist/radio/root/radio-root.d.ts +6 -2
  222. package/dist/radio/root/radio-root.js +7 -2
  223. package/dist/rating/root/rating-root.d.ts +30 -12
  224. package/dist/rating/root/rating-root.js +27 -27
  225. package/dist/scatter-chart/fit.d.ts +15 -0
  226. package/dist/scatter-chart/fit.js +35 -0
  227. package/dist/scatter-chart/root/scatter-chart-root.d.ts +51 -1
  228. package/dist/scatter-chart/root/scatter-chart-root.js +64 -24
  229. package/dist/scroll-area/root/scroll-area-root.d.ts +22 -51
  230. package/dist/scroll-area/root/scroll-area-root.js +57 -173
  231. package/dist/scroll-area/scrollbar-controller.d.ts +111 -0
  232. package/dist/scroll-area/scrollbar-controller.js +172 -0
  233. package/dist/scroll-area/scrollbar.d.ts +27 -8
  234. package/dist/scroll-area/scrollbar.js +10 -1
  235. package/dist/select/align.d.ts +47 -0
  236. package/dist/select/align.js +7 -0
  237. package/dist/select/root/select-root.d.ts +71 -0
  238. package/dist/select/root/select-root.js +78 -6
  239. package/dist/skeleton/root/skeleton-root.d.ts +3 -0
  240. package/dist/skeleton/root/skeleton-root.js +4 -2
  241. package/dist/skip-link/root/skip-link-root.js +2 -2
  242. package/dist/slider/root/slider-root.d.ts +59 -5
  243. package/dist/slider/root/slider-root.js +45 -3
  244. package/dist/sparkline/readings.d.ts +36 -0
  245. package/dist/sparkline/readings.js +36 -0
  246. package/dist/sparkline/root/sparkline-root.d.ts +121 -7
  247. package/dist/sparkline/root/sparkline-root.js +160 -26
  248. package/dist/speed-dial/item/speed-dial-item.d.ts +1 -1
  249. package/dist/speed-dial/item/speed-dial-item.js +2 -2
  250. package/dist/speed-dial/root/speed-dial-root.d.ts +6 -0
  251. package/dist/speed-dial/root/speed-dial-root.js +11 -3
  252. package/dist/splitter/root/splitter-root.d.ts +10 -12
  253. package/dist/splitter/root/splitter-root.js +211 -204
  254. package/dist/stat/root/stat-root.d.ts +14 -5
  255. package/dist/stat/root/stat-root.js +21 -5
  256. package/dist/steps/reach.d.ts +5 -0
  257. package/dist/steps/reach.js +3 -0
  258. package/dist/steps/root/steps-root.d.ts +56 -3
  259. package/dist/steps/root/steps-root.js +50 -6
  260. package/dist/steps/step/step.d.ts +8 -0
  261. package/dist/steps/step/step.js +8 -3
  262. package/dist/switch/root/switch-root.d.ts +10 -0
  263. package/dist/table/column/table-column.d.ts +6 -10
  264. package/dist/table/column/table-column.js +8 -20
  265. package/dist/table/root/table-root.d.ts +31 -10
  266. package/dist/table/root/table-root.js +14 -18
  267. package/dist/table/row/table-row.d.ts +24 -0
  268. package/dist/table/row/table-row.js +37 -1
  269. package/dist/tabs/panel/tab-panel.d.ts +16 -3
  270. package/dist/tabs/panel/tab-panel.js +34 -5
  271. package/dist/tabs/root/tabs-root.d.ts +17 -3
  272. package/dist/tabs/root/tabs-root.js +1 -1
  273. package/dist/tabs/tab/tab.d.ts +5 -0
  274. package/dist/tabs/tab/tab.js +5 -2
  275. package/dist/tag/group/tag-group.d.ts +44 -5
  276. package/dist/tag/group/tag-group.js +60 -9
  277. package/dist/tag/root/tag-root.js +9 -2
  278. package/dist/textarea/root/textarea-root.d.ts +41 -2
  279. package/dist/textarea/root/textarea-root.js +39 -1
  280. package/dist/time-input/root/time-input-root.d.ts +10 -2
  281. package/dist/time-input/root/time-input-root.js +24 -13
  282. package/dist/time-picker/root/time-picker-root.d.ts +28 -17
  283. package/dist/time-picker/root/time-picker-root.js +18 -29
  284. package/dist/time-picker/wheel-name.d.ts +9 -0
  285. package/dist/time-picker/wheel-name.js +15 -0
  286. package/dist/timeline/group/timeline-group.js +2 -2
  287. package/dist/toast/item/toast-item.d.ts +16 -3
  288. package/dist/toast/item/toast-item.js +22 -6
  289. package/dist/toast/root/toast-root.d.ts +34 -4
  290. package/dist/toast/root/toast-root.js +74 -13
  291. package/dist/toast/words.d.ts +12 -0
  292. package/dist/toast/words.js +25 -0
  293. package/dist/toggle/group/toggle-group.d.ts +52 -7
  294. package/dist/toggle/group/toggle-group.js +58 -44
  295. package/dist/toggle/root/toggle-root.js +2 -4
  296. package/dist/toolbar/root/toolbar-root.d.ts +21 -5
  297. package/dist/toolbar/root/toolbar-root.js +52 -8
  298. package/dist/tooltip/root/tooltip-root.d.ts +20 -3
  299. package/dist/tooltip/root/tooltip-root.js +18 -1
  300. package/dist/tour/back.d.ts +10 -0
  301. package/dist/tour/back.js +8 -0
  302. package/dist/tour/root/tour-root.d.ts +45 -2
  303. package/dist/tour/root/tour-root.js +53 -8
  304. package/dist/tour/stop/tour-stop.d.ts +3 -0
  305. package/dist/tour/stop/tour-stop.js +3 -3
  306. package/dist/tree/item/tree-item.d.ts +7 -3
  307. package/dist/tree/item/tree-item.js +3 -0
  308. package/dist/tree/root/tree-root.d.ts +24 -3
  309. package/dist/tree/root/tree-root.js +32 -13
  310. package/dist/tree/selection.js +2 -15
  311. package/dist/trend/figure.d.ts +16 -0
  312. package/dist/trend/figure.js +8 -0
  313. package/dist/trend/root/trend-root.d.ts +83 -19
  314. package/dist/trend/root/trend-root.js +59 -8
  315. package/dist/video/media-events.d.ts +13 -18
  316. package/dist/video/media-events.js +1 -5
  317. package/dist/video/root/extra-controls.d.ts +12 -0
  318. package/dist/video/root/extra-controls.js +6 -2
  319. package/dist/video/root/video-root.d.ts +23 -6
  320. package/dist/video/root/video-root.js +19 -10
  321. package/dist/video-playlist/menu/video-playlist-menu.d.ts +2 -0
  322. package/dist/video-playlist/menu/video-playlist-menu.js +2 -1
  323. package/dist/video-playlist/root/video-playlist-root.d.ts +17 -1
  324. package/dist/video-playlist/root/video-playlist-root.js +3 -0
  325. package/dist/virtual-list/fill.d.ts +11 -8
  326. package/dist/virtual-list/fill.js +10 -17
  327. package/dist/virtual-list/keys.d.ts +16 -7
  328. package/dist/virtual-list/keys.js +17 -6
  329. package/dist/virtual-list/plan.d.ts +65 -0
  330. package/dist/virtual-list/plan.js +27 -0
  331. package/dist/virtual-list/root/virtual-list-root.d.ts +136 -13
  332. package/dist/virtual-list/root/virtual-list-root.js +218 -51
  333. package/lint.json +1 -1
  334. package/package.json +8 -8
  335. package/types/jsx.d.ts +7441 -1458
  336. package/types/svelte.d.ts +1 -0
  337. package/types/vue.d.ts +1501 -326
  338. package/dist/chat/relative-clock.d.ts +0 -39
  339. package/dist/chat/relative-clock.js +0 -31
  340. package/dist/data-table/root/order.d.ts +0 -141
  341. package/dist/data-table/root/order.js +0 -76
  342. package/dist/tag/selection.d.ts +0 -10
  343. package/dist/tag/selection.js +0 -12
@@ -0,0 +1,5 @@
1
+ const MARKS = new Set(['"', "'", '“', '”', '‘', '’', '„', '«', '»', '‹', '›', '「', '」']);
2
+ export const typedMarks = (text) => {
3
+ const trimmed = text.trim();
4
+ return trimmed !== '' && (MARKS.has(trimmed[0] ?? '') || MARKS.has(trimmed.at(-1) ?? ''));
5
+ };
@@ -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 short quotation, set inline with the text around it.
5
5
  *
@@ -7,7 +7,10 @@ import { type TemplateResult } from 'lit';
7
7
  * Renders a real `<q>`, so the browser supplies the quotation marks. It inserts
8
8
  * the correct marks for the document's language and nests them correctly when
9
9
  * one quotation sits inside another. Do not type quotation marks into the
10
- * content.
10
+ * content: one that starts or ends with a typed mark warns once, with the
11
+ * runtime kind `typed-marks`. A quotation in a language other than the page's takes `lang` on the
12
+ * element, and its marks follow it: `lang="de"` sets „…“ and `lang="fr"` «…»
13
+ * inside an English page.
11
14
  *
12
15
  * For a passage set off from the surrounding text, use a blockquote.
13
16
  *
@@ -26,6 +29,15 @@ export declare class HelixHeadlessQuote extends HelixElement {
26
29
  * URL identifying where the quotation came from.
27
30
  */
28
31
  cite: string;
32
+ /** Whether this quote has said its text carries typed marks, so it says so once. */
33
+ private warned;
34
+ /**
35
+ * Reads the quoted text as it first renders and as it changes, for marks the
36
+ * `<q>` would double. On the shadow root rather than in the template, so the
37
+ * served markup is the `<q>` and its slot and nothing else.
38
+ */
39
+ private readonly readText;
40
+ protected firstUpdated(changed: PropertyValues): void;
29
41
  protected render(): TemplateResult;
30
42
  }
31
43
  declare global {
@@ -4,13 +4,35 @@ 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, reportRuntime } from '@fusion.dev/helix-core';
8
8
  import { html, nothing } from 'lit';
9
9
  import { property } from 'lit/decorators.js';
10
+ import { typedMarks } from '../marks.js';
10
11
  let HelixHeadlessQuote = class HelixHeadlessQuote extends HelixElement {
11
12
  constructor() {
12
13
  super(...arguments);
13
14
  this.cite = '';
15
+ this.warned = false;
16
+ this.readText = () => {
17
+ const text = [...this.childNodes]
18
+ .filter((node) => !(node instanceof Element) || !node.slot)
19
+ .map((node) => node.textContent ?? '')
20
+ .join('');
21
+ if (this.warned || !typedMarks(text)) {
22
+ return;
23
+ }
24
+ this.warned = true;
25
+ reportRuntime({
26
+ kind: 'typed-marks',
27
+ message: `<${this.localName}> starts or ends with a typed quotation mark, and the browser sets its own, so the marks show twice. Take the typed marks out.`,
28
+ tag: this.localName,
29
+ });
30
+ };
31
+ }
32
+ firstUpdated(changed) {
33
+ super.firstUpdated(changed);
34
+ this.readText();
35
+ this.renderRoot.addEventListener('slotchange', this.readText);
14
36
  }
15
37
  render() {
16
38
  return html `<q part="quote" cite=${this.cite || nothing}><slot></slot></q>`;
@@ -30,6 +30,21 @@ declare const HelixHeadlessRadioGroup_base: (new (...args: any[]) => import("@fu
30
30
  * `helix-select`. A native radio sends `input` and `change` in the same task as
31
31
  * the click.
32
32
  *
33
+ * **Keyboard.** The group is one tab stop: the chosen radio, or the first that
34
+ * can be chosen.
35
+ *
36
+ * | Key | What it does |
37
+ * |---|---|
38
+ * | Right, Down | Chooses the next radio, from the last back to the first. |
39
+ * | Left, Up | Chooses the radio before, from the first round to the last. |
40
+ * | Home, End | Chooses the first or the last radio. |
41
+ * | Space, Enter | Chooses the focused radio. |
42
+ *
43
+ * Left and Right swap on a right-to-left page, and a disabled radio is passed
44
+ * over. Under `readonly` the arrows move focus and choose nothing. The group
45
+ * is a `radiogroup` named by `label`, and each radio is a `role="radio"`
46
+ * button with `aria-checked`.
47
+ *
33
48
  * @since 0.1.0
34
49
  * @status stable
35
50
  * @aliases RadioButtons, Choice group
@@ -29,15 +29,19 @@ declare const HelixHeadlessRadio_base: (new (...args: any[]) => import("@fusion.
29
29
  * replaces the visible label, and the label becomes the name read by screen
30
30
  * readers. The icon has its own slot so the chip can hide the label and show
31
31
  * the icon.
32
+ * @slot indicator - An icon drawn inside the circle in place of the dot, such
33
+ * as a check mark.
32
34
  *
33
35
  * @event {HelixSelectEvent} helix-select - Fired when the radio is chosen. Cancelable: call `preventDefault()` to keep the current choice.
34
36
  *
35
37
  * @csspart box - The circle. Draw the dot inside it with `::part(box)::after` in
36
- * your stylesheet. This tier ships no CSS, so it renders no separate element for
37
- * the dot, which would add an empty child to your layout.
38
+ * your stylesheet, or slot an icon into `indicator`. This tier ships no CSS, so
39
+ * it renders no separate element for the dot, which would add an empty child to
40
+ * your layout.
38
41
  * @csspart item - The button, which covers the whole row.
39
42
  * @csspart label - The label beside the circle.
40
43
  *
44
+ * @cssstate has-indicator - An icon is slotted into `indicator`.
41
45
  * @cssstate selected - The radio is chosen.
42
46
  */
43
47
  export declare class HelixHeadlessRadio extends HelixHeadlessRadio_base {
@@ -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, HostClickController, MixinSelectableItem, } from '@fusion.dev/helix-core';
7
+ import { customElement, HelixElement, HostClickController, MixinSelectableItem, slotFilled, } from '@fusion.dev/helix-core';
8
8
  import { html } from 'lit';
9
9
  import { property } from 'lit/decorators.js';
10
10
  let HelixHeadlessRadio = class HelixHeadlessRadio extends MixinSelectableItem(HelixElement) {
@@ -32,7 +32,12 @@ let HelixHeadlessRadio = class HelixHeadlessRadio extends MixinSelectableItem(He
32
32
  tabindex=${(this.focusable ?? this.selected) || !this.childrenKnown ? '0' : '-1'}
33
33
  @click=${() => this.select()}
34
34
  >
35
- <span part="box"></span>
35
+ <span part="box" aria-hidden="true"
36
+ ><slot
37
+ name="indicator"
38
+ @slotchange=${(event) => this.toggleState('has-indicator', slotFilled(event.target))}
39
+ ></slot
40
+ ></span>
36
41
  <slot name="icon"></slot>
37
42
  <span part="label"><slot></slot></span>
38
43
  </button>`;
@@ -18,12 +18,27 @@ declare const HelixHeadlessRating_base: (new (...args: any[]) => import("@fusion
18
18
  * With `clearable`, pressing the chosen score again, or Backspace or Delete on
19
19
  * the marks, takes the rating back to unrated and sends `helix-clear`.
20
20
  *
21
+ * **Keyboard.** The marks are one tab stop, on the chosen score or the first.
22
+ *
23
+ * | Key | What it does |
24
+ * |---|---|
25
+ * | Right, Down | Chooses the next score up, and stops at the highest. |
26
+ * | Left, Up | Chooses the next score down, and stops at the lowest. |
27
+ * | Home, End | Chooses the lowest or the highest score. |
28
+ * | Space, Enter | Chooses the focused score, or clears it under `clearable` when it is already chosen. |
29
+ * | Backspace, Delete | Clears the rating, under `clearable`. |
30
+ *
31
+ * Left and Right swap on a right-to-left page. The marks are a `radiogroup`
32
+ * named by `label`, and each score is a `radio` named by `option-label`, such
33
+ * as "3 out of 5". A read-only rating is one `img` named by its score.
34
+ *
21
35
  * @since 0.1.0
22
36
  * @status stable
23
37
  * @category forms
24
38
  * @aliases Stars, Score, Review score
25
39
  * @documentation https://fusion.dev/helix/components/rating
26
40
  *
41
+ * @slot empty-mark - The shape of an unfilled mark, copied into every position of the track, such as an outlined star beside a filled `mark`. Without it, the track copies `mark`.
27
42
  * @slot feedback - The message that says what is wrong, for content richer than a string. It shows while there is a message.
28
43
  * @slot hint - Help under the control, for content richer than the `hint` text.
29
44
  * @slot label - The label, for content richer than the `label` text.
@@ -32,6 +47,7 @@ declare const HelixHeadlessRating_base: (new (...args: any[]) => import("@fusion
32
47
  * @event {Event} change - The score was chosen. Sent together with `input`, because each choice commits the score.
33
48
  * @event {HelixBeforeChangeEvent} helix-before-change - The score is about to change. Cancelable: cancel it to keep the current score.
34
49
  * @event {HelixClearEvent} helix-clear - The rating went back to unrated, under `clearable`. Sent after `input` and `change`.
50
+ * @event {HelixPreviewEvent} helix-preview - The score under the pointer, shown before it is chosen, or `''` once the marks show the score again. Sent once each time the preview changes.
35
51
  * @event {Event} input - The score changed.
36
52
  *
37
53
  * @csspart feedback - The message that says what is wrong.
@@ -170,8 +186,8 @@ export declare class HelixHeadlessRating extends HelixHeadlessRating_base {
170
186
  * each of its own options. Anything past the first slotted element is
171
187
  * ignored.
172
188
  */
173
- private markSource;
174
- /** Whether `markSource` has had its first answer from the children. */
189
+ private readonly mark;
190
+ /** Whether `mark` has had its first answer from the children. */
175
191
  private markRead;
176
192
  /**
177
193
  * What the pointer is over, which is shown instead of the score while it is.
@@ -213,16 +229,17 @@ export declare class HelixHeadlessRating extends HelixHeadlessRating_base {
213
229
  /** The pointer drawing a score, while one is. */
214
230
  private dragging;
215
231
  /**
216
- * One clone per place a mark goes, kept so a render does not remake them.
232
+ * The shape for one place, or nothing when the stylesheet is drawing it.
217
233
  *
218
- * A drag renders on every pointer move, and handing Lit a fresh node each
219
- * time would swap every mark in the row on every frame of a gesture whose
220
- * whole point is that only the fill moves.
234
+ * One copy per place, kept so a render does not remake them: a drag renders
235
+ * on every pointer move, and handing Lit a fresh node each time would swap
236
+ * every mark in the row on every frame of a gesture whose whole point is
237
+ * that only the fill moves.
221
238
  */
222
- private readonly clones;
223
- /** The shape for one place, or nothing when the stylesheet is drawing it. */
224
239
  private markFor;
225
240
  private readonly handleMarkSlot;
241
+ /** The element slotted into `empty-mark`, which the track copies. */
242
+ private readonly empty;
226
243
  /**
227
244
  * The step under a point on the row, or the nearest one to it.
228
245
  *
@@ -297,10 +314,11 @@ export declare class HelixHeadlessRating extends HelixHeadlessRating_base {
297
314
  /** The name of one score, as `optionLabel` writes it. */
298
315
  private nameFor;
299
316
  /**
300
- * The option holding the tab stop: the chosen one, or for a score between
301
- * steps, such as an average of 3.5 on whole marks, the step below it, and
302
- * the first while nothing is chosen. Between steps no option matched, and
303
- * the rating left the tab order.
317
+ * The option that is checked and holds the tab stop: the chosen one, or for
318
+ * a score between steps, such as an average of 3.4 on whole marks, the
319
+ * nearest step, and the first while nothing is chosen. Between steps no
320
+ * option matched, so no option was checked and the rating left the tab
321
+ * order.
304
322
  */
305
323
  private stopAt;
306
324
  protected render(): TemplateResult;
@@ -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, valueAsNumber as asNumber, customElement, fillTemplate, numberAsValue as fromNumber, HelixClearEvent, HelixFormElement, KeyboardNavigationController, MixinControllerValue, MixinField, reportRuntime, } from '@fusion.dev/helix-core';
7
+ import { AriaForwardController, valueAsNumber as asNumber, customElement, fillTemplate, numberAsValue as fromNumber, HelixClearEvent, HelixFormElement, HelixPreviewEvent, KeyboardNavigationController, MixinControllerValue, MixinField, nearest, reportRuntime, SlottedGlyph, } from '@fusion.dev/helix-core';
8
8
  import { html, nothing } from 'lit';
9
9
  import { property, state } from 'lit/decorators.js';
10
10
  let HelixHeadlessRating = class HelixHeadlessRating extends MixinControllerValue(MixinField(HelixFormElement)) {
@@ -22,7 +22,7 @@ let HelixHeadlessRating = class HelixHeadlessRating extends MixinControllerValue
22
22
  this.aria = new AriaForwardController(this, {
23
23
  target: () => this.partNamed('marks'),
24
24
  });
25
- this.markSource = undefined;
25
+ this.mark = new SlottedGlyph();
26
26
  this.markRead = false;
27
27
  this.previewing = undefined;
28
28
  this.keys = new KeyboardNavigationController(this, {
@@ -31,11 +31,12 @@ let HelixHeadlessRating = class HelixHeadlessRating extends MixinControllerValue
31
31
  wrap: false,
32
32
  });
33
33
  this.dragging = undefined;
34
- this.clones = new Map();
35
34
  this.handleMarkSlot = (event) => {
36
- this.clones.clear();
37
- this.markSource = event.target.assignedElements({ flatten: true })[0];
35
+ const slot = event.target;
36
+ (slot.name === 'empty-mark' ? this.empty : this.mark).read(slot);
37
+ this.requestUpdate();
38
38
  };
39
+ this.empty = new SlottedGlyph();
39
40
  this.handleDragStart = (event) => {
40
41
  if (this.isDisabled || this.readOnly || event.button !== 0) {
41
42
  return;
@@ -158,20 +159,11 @@ let HelixHeadlessRating = class HelixHeadlessRating extends MixinControllerValue
158
159
  }));
159
160
  }
160
161
  markFor(layer, index) {
161
- if (!this.markSource) {
162
- return undefined;
163
- }
164
- const key = `${layer}:${index}`;
165
- const held = this.clones.get(key);
166
- if (held) {
167
- return held;
168
- }
169
- const clone = this.markSource.cloneNode(true);
170
- this.clones.set(key, clone);
171
- return clone;
162
+ const glyph = layer === 'track' && this.empty.slotted ? this.empty : this.mark;
163
+ return glyph.copyFor(`${layer}:${index}`);
172
164
  }
173
165
  scoreAt(clientX) {
174
- let nearest;
166
+ let closest;
175
167
  let best = Number.POSITIVE_INFINITY;
176
168
  for (const option of this.renderRoot?.querySelectorAll('[part="option"]') ?? []) {
177
169
  const box = option.getBoundingClientRect();
@@ -181,10 +173,10 @@ let HelixHeadlessRating = class HelixHeadlessRating extends MixinControllerValue
181
173
  const away = clientX < box.left ? box.left - clientX : clientX - box.right;
182
174
  if (away < best) {
183
175
  best = away;
184
- nearest = option.dataset.score;
176
+ closest = option.dataset.score;
185
177
  }
186
178
  }
187
- return nearest;
179
+ return closest;
188
180
  }
189
181
  clearsAt(score) {
190
182
  return this.clearable && this.value !== '' && Number(score) === Number(this.value);
@@ -208,6 +200,11 @@ let HelixHeadlessRating = class HelixHeadlessRating extends MixinControllerValue
208
200
  }
209
201
  updated(changed) {
210
202
  super.updated?.(changed);
203
+ if (changed.has('previewing')) {
204
+ this.dispatchEvent(new HelixPreviewEvent({
205
+ value: this.previewing === undefined ? '' : String(this.previewing),
206
+ }));
207
+ }
211
208
  this.sync();
212
209
  if (this.floor !== this.min && !this.warned) {
213
210
  this.warned = true;
@@ -224,7 +221,8 @@ let HelixHeadlessRating = class HelixHeadlessRating extends MixinControllerValue
224
221
  super.willUpdate(changed);
225
222
  if (!this.markRead && this.childrenKnown) {
226
223
  this.markRead = true;
227
- this.markSource = this.knownChildren.find((child) => child.slot === 'mark');
224
+ this.mark.take(this.knownChildren.find((child) => child.slot === 'mark'));
225
+ this.empty.take(this.knownChildren.find((child) => child.slot === 'empty-mark'));
228
226
  }
229
227
  }
230
228
  firstUpdated(changed) {
@@ -239,8 +237,7 @@ let HelixHeadlessRating = class HelixHeadlessRating extends MixinControllerValue
239
237
  if (!answered) {
240
238
  return first;
241
239
  }
242
- const below = this.steps.filter((score) => score <= this.score);
243
- return below.at(-1) ?? first;
240
+ return nearest(this.steps, this.score) ?? first;
244
241
  }
245
242
  render() {
246
243
  const showing = this.previewing ?? this.score;
@@ -261,7 +258,7 @@ let HelixHeadlessRating = class HelixHeadlessRating extends MixinControllerValue
261
258
  aria-describedby=${this.describedBy ?? nothing}
262
259
  aria-invalid=${this.invalidity ?? nothing}
263
260
  aria-required=${this.required && !this.readOnly ? 'true' : nothing}
264
- data-slotted=${this.markSource ? '' : nothing}
261
+ data-slotted=${this.mark.slotted ? '' : nothing}
265
262
  style=${`--rating-full: ${Math.floor(showing)}; --rating-part: ${showing - Math.floor(showing)}; --rating-steps: ${this.positions.length}`}
266
263
  @pointercancel=${this.handleDragCancel}
267
264
  @keydown=${this.handleClearKey}
@@ -276,9 +273,15 @@ let HelixHeadlessRating = class HelixHeadlessRating extends MixinControllerValue
276
273
  hidden
277
274
  @slotchange=${this.handleMarkSlot}
278
275
  ></slot>
276
+ <slot
277
+ name="empty-mark"
278
+ hidden
279
+ @slotchange=${this.handleMarkSlot}
280
+ ></slot>
279
281
  <span
280
282
  part="track"
281
283
  aria-hidden="true"
284
+ data-slotted=${this.empty.slotted ? '' : nothing}
282
285
  >${marksIn('track')}</span
283
286
  >
284
287
  <span
@@ -295,7 +298,7 @@ let HelixHeadlessRating = class HelixHeadlessRating extends MixinControllerValue
295
298
  part="option"
296
299
  role="radio"
297
300
  type="button"
298
- aria-checked=${answered && this.score === score ? 'true' : 'false'}
301
+ aria-checked=${answered && score === stop ? 'true' : 'false'}
299
302
  aria-label=${this.nameFor(score)}
300
303
  data-score=${String(score)}
301
304
  style=${`--rating-step: ${index + 1}`}
@@ -346,9 +349,6 @@ __decorate([
346
349
  __decorate([
347
350
  property({ attribute: 'value-text' })
348
351
  ], HelixHeadlessRating.prototype, "valueText", void 0);
349
- __decorate([
350
- state()
351
- ], HelixHeadlessRating.prototype, "markSource", void 0);
352
352
  __decorate([
353
353
  state()
354
354
  ], HelixHeadlessRating.prototype, "previewing", void 0);
@@ -0,0 +1,15 @@
1
+ /** Pearson's r, or nothing where there are too few points or no spread to have one. */
2
+ export declare const correlation: (pairs: ReadonlyArray<readonly [number, number]>) => number | undefined;
3
+ /** A straight line, as the measure up at any measure across. */
4
+ export interface Fit {
5
+ /** The measure up where the measure across is zero. */
6
+ intercept: number;
7
+ /** How far up the line goes for each step across. */
8
+ slope: number;
9
+ }
10
+ /**
11
+ * The straight line nearest the points, by least squares, or nothing where
12
+ * there are fewer than two points or they share one measure across, which no
13
+ * line up the page can be fitted to.
14
+ */
15
+ export declare const leastSquares: (pairs: ReadonlyArray<readonly [number, number]>) => Fit | undefined;
@@ -0,0 +1,35 @@
1
+ const mean = (values) => values.reduce((sum, one) => sum + one, 0) / values.length;
2
+ export const correlation = (pairs) => {
3
+ if (pairs.length < 3) {
4
+ return undefined;
5
+ }
6
+ const across = mean(pairs.map(([x]) => x));
7
+ const up = mean(pairs.map(([, y]) => y));
8
+ let both = 0;
9
+ let xs = 0;
10
+ let ys = 0;
11
+ for (const [x, y] of pairs) {
12
+ both += (x - across) * (y - up);
13
+ xs += (x - across) ** 2;
14
+ ys += (y - up) ** 2;
15
+ }
16
+ return xs === 0 || ys === 0 ? undefined : both / Math.sqrt(xs * ys);
17
+ };
18
+ export const leastSquares = (pairs) => {
19
+ if (pairs.length < 2) {
20
+ return undefined;
21
+ }
22
+ const across = mean(pairs.map(([x]) => x));
23
+ const up = mean(pairs.map(([, y]) => y));
24
+ let both = 0;
25
+ let xs = 0;
26
+ for (const [x, y] of pairs) {
27
+ both += (x - across) * (y - up);
28
+ xs += (x - across) ** 2;
29
+ }
30
+ if (xs === 0) {
31
+ return undefined;
32
+ }
33
+ const slope = both / xs;
34
+ return { intercept: up - slope * across, slope };
35
+ };
@@ -5,6 +5,11 @@ import '../../tooltip/index.js';
5
5
  export interface ScatterPoint {
6
6
  depth: number;
7
7
  row: number;
8
+ /**
9
+ * How large the point is drawn under `size-by`, from 0 to 1: the square root
10
+ * of its share of the largest size, so its area follows the measure.
11
+ */
12
+ weight?: number | undefined;
8
13
  x: number;
9
14
  y: number;
10
15
  }
@@ -32,6 +37,14 @@ declare const HelixHeadlessScatterChart_base: typeof HelixElement & (new (...arg
32
37
  * Both axes are labeled, because both positions are values. The ticks sit at
33
38
  * round numbers, and the range extends to them.
34
39
  *
40
+ * `trend` draws each series' line of best fit, by least squares, across the
41
+ * plot in the series' color.
42
+ *
43
+ * **`size-by` names a third measure, drawn as each point's size**, as a bubble
44
+ * chart does: `size-by="Population"` takes that column out of the series and
45
+ * gives each point an area in proportion to its row's number there. The
46
+ * tooltip and the table still say the number.
47
+ *
35
48
  * The summary gives each series' correlation coefficient and its number of
36
49
  * points. The table has every number, and the drawing is hidden from screen
37
50
  * readers.
@@ -66,7 +79,7 @@ declare const HelixHeadlessScatterChart_base: typeof HelixElement & (new (...arg
66
79
  * @csspart point - One row, as a point.
67
80
  * @csspart point-active - A point in the row under the pointer. Set alongside `point`.
68
81
  * @csspart summary - The text that says how strongly the measures relate, for people who cannot see the points.
69
- * @csspart svg - The drawing surface the gridlines sit on.
82
+ * @csspart svg - The drawing surface the gridlines and the trend lines sit on.
70
83
  * @csspart tooltip - The bubble, forwarded from `Tooltip`.
71
84
  * @csspart tooltip-anchor - The `Tooltip` element itself.
72
85
  * @csspart tooltip-arrow - The bubble's point, forwarded from `Tooltip`.
@@ -83,6 +96,7 @@ declare const HelixHeadlessScatterChart_base: typeof HelixElement & (new (...arg
83
96
  * @csspart tooltip-right - The bubble while it is right of the reading. Set alongside `tooltip`.
84
97
  * @csspart tooltip-top - The bubble while it is above the reading. Set alongside `tooltip`.
85
98
  * @csspart tooltip-value - A column's value inside the tooltip.
99
+ * @csspart trend - One series' line of best fit, under `trend`. Carries its series color as `--chart-series`.
86
100
  * @csspart x-axis - The values along the horizontal axis, under the plot.
87
101
  * @csspart x-name - The name of the horizontal measure.
88
102
  * @csspart x-tick - One labeled value on the horizontal axis. Each axis has its own tick part, because `::part()` cannot tell which axis a tick is on.
@@ -90,6 +104,7 @@ declare const HelixHeadlessScatterChart_base: typeof HelixElement & (new (...arg
90
104
  * @csspart y-name - The name of the vertical measure.
91
105
  * @csspart y-tick - One labeled value on the vertical axis.
92
106
  *
107
+ * @cssproperty --chart-point-weight - How large a point is drawn under `size-by`, from 0 to 1, by area. The component writes it, and the stylesheet that sizes the point reads it.
93
108
  * @cssproperty --chart-point-x - A point's horizontal position, as a percentage. The component writes it.
94
109
  * @cssproperty --chart-point-y - A point's vertical position, as a percentage from the top. The component writes it.
95
110
  * @cssproperty --chart-tick - A tick's position along its axis, as a percentage. The component writes it.
@@ -112,6 +127,25 @@ export declare class HelixHeadlessScatterChart extends HelixHeadlessScatterChart
112
127
  * The word the summary uses for a row when it counts them.
113
128
  */
114
129
  pointsLabel: string;
130
+ /**
131
+ * The heading of a column whose numbers size the points, such as
132
+ * `Population`, which makes the chart a bubble chart.
133
+ *
134
+ * That column is then a measure and no series: it draws no points of its
135
+ * own, and each point's area follows its row's number in it. Absent, every
136
+ * point is one size.
137
+ */
138
+ sizeBy: string;
139
+ /**
140
+ * Draws each series' line of best fit across the plot, by least squares, in
141
+ * the series' color: the regression line a reader would otherwise draw by
142
+ * eye.
143
+ *
144
+ * Absent draws none. A series with fewer than two points, or with every
145
+ * point at one measure across, has no line to draw. The summary already
146
+ * gives each series' correlation, which says how near the points are to it.
147
+ */
148
+ trend: boolean;
115
149
  /** The points as last drawn, which the pointer searches. */
116
150
  private drawn;
117
151
  /** The point a pointer is resting nearest, which the tooltip sits on. */
@@ -134,6 +168,16 @@ export declare class HelixHeadlessScatterChart extends HelixHeadlessScatterChart
134
168
  * which is where a reader is told what it is.
135
169
  */
136
170
  seriesOf(cell: number): number | undefined;
171
+ /**
172
+ * The numeric columns by what they measure: the first across, the column
173
+ * `size-by` names as the size, and every other one up, as a series.
174
+ */
175
+ protected get measures(): {
176
+ across: number | undefined;
177
+ size: number | undefined;
178
+ ups: number[];
179
+ };
180
+ showsColumn(cell: number): boolean;
137
181
  /** Whether the levels across are ruled. */
138
182
  protected get rulesX(): boolean;
139
183
  /** Whether the levels up are ruled. */
@@ -150,6 +194,12 @@ export declare class HelixHeadlessScatterChart extends HelixHeadlessScatterChart
150
194
  protected render(): TemplateResult;
151
195
  /** The rules and the points, behind a seam the styled tier can move. */
152
196
  protected renderPlot(field: ScatterField, along: (value: number) => number, up: (value: number) => number): TemplateResult;
197
+ /**
198
+ * Each shown series' line of best fit, from one end of the measure across
199
+ * to the other, under `trend`. The drawing clips a line that leaves the
200
+ * plot.
201
+ */
202
+ protected renderTrends(field: ScatterField, along: (value: number) => number, up: (value: number) => number): TemplateResult[] | typeof nothing;
153
203
  /**
154
204
  * What a reader who cannot see the points is told.
155
205
  *