@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
@@ -431,7 +431,7 @@ let HelixHeadlessVideo = class HelixHeadlessVideo extends HelixElement {
431
431
  this.silent = video.muted;
432
432
  this.loudness = video.volume;
433
433
  void this.remote.attach(video);
434
- relayMedia(video, this);
434
+ relayMedia(video, (event) => this.relayNativeEvent(event));
435
435
  }
436
436
  }
437
437
  updated(changed) {
@@ -560,7 +560,8 @@ let HelixHeadlessVideo = class HelixHeadlessVideo extends HelixElement {
560
560
  <${this.tag('menu-item')}
561
561
  part="entry"
562
562
  exportparts="end: entry-end, item: entry-item, mark: entry-mark, shortcut: entry-shortcut,
563
- shortcut-kbd: entry-shortcut-kbd, start: entry-start"
563
+ shortcut-kbd: entry-shortcut-kbd, shortcut-key: entry-shortcut-key,
564
+ shortcut-separator: entry-shortcut-separator, start: entry-start"
564
565
  value="off"
565
566
  checkable
566
567
  exclusive
@@ -572,7 +573,8 @@ let HelixHeadlessVideo = class HelixHeadlessVideo extends HelixElement {
572
573
  </${this.tag('menu-item')}>
573
574
  ${tracks.map((track, at) => html `<${this.tag('menu-item')} part="entry"
574
575
  exportparts="end: entry-end, item: entry-item, mark: entry-mark, shortcut: entry-shortcut,
575
- shortcut-kbd: entry-shortcut-kbd, start: entry-start"
576
+ shortcut-kbd: entry-shortcut-kbd, shortcut-key: entry-shortcut-key,
577
+ shortcut-separator: entry-shortcut-separator, start: entry-start"
576
578
  value=${track.language || String(at)}
577
579
  checkable
578
580
  exclusive
@@ -600,7 +602,8 @@ let HelixHeadlessVideo = class HelixHeadlessVideo extends HelixElement {
600
602
  if (one === 'remote') {
601
603
  return html `<${this.tag('menu-item')} part="entry"
602
604
  exportparts="end: entry-end, item: entry-item, mark: entry-mark, shortcut: entry-shortcut,
603
- shortcut-kbd: entry-shortcut-kbd, start: entry-start"
605
+ shortcut-kbd: entry-shortcut-kbd, shortcut-key: entry-shortcut-key,
606
+ shortcut-separator: entry-shortcut-separator, start: entry-start"
604
607
  value="remote"
605
608
  @helix-select=${() => void this.remote.prompt()}
606
609
  >
@@ -611,7 +614,8 @@ let HelixHeadlessVideo = class HelixHeadlessVideo extends HelixElement {
611
614
  if (one === 'speed') {
612
615
  return html `<${this.tag('menu-item')} part="entry"
613
616
  exportparts="end: entry-end, item: entry-item, mark: entry-mark, shortcut: entry-shortcut,
614
- shortcut-kbd: entry-shortcut-kbd, start: entry-start" value="speed" @helix-select=${() => this.cycleSpeed()}>
617
+ shortcut-kbd: entry-shortcut-kbd, shortcut-key: entry-shortcut-key,
618
+ shortcut-separator: entry-shortcut-separator, start: entry-start" value="speed" @helix-select=${() => this.cycleSpeed()}>
615
619
  <slot name="speed-icon" slot="start">${drawIcon(gauge)}</slot>
616
620
  ${this.speedLabel}: ${this.rate}x
617
621
  </${this.tag('menu-item')}>`;
@@ -620,7 +624,8 @@ let HelixHeadlessVideo = class HelixHeadlessVideo extends HelixElement {
620
624
  const back = one === 'rewind';
621
625
  return html `<${this.tag('menu-item')} part="entry"
622
626
  exportparts="end: entry-end, item: entry-item, mark: entry-mark, shortcut: entry-shortcut,
623
- shortcut-kbd: entry-shortcut-kbd, start: entry-start"
627
+ shortcut-kbd: entry-shortcut-kbd, shortcut-key: entry-shortcut-key,
628
+ shortcut-separator: entry-shortcut-separator, start: entry-start"
624
629
  value=${one}
625
630
  @helix-select=${() => this.skipBy(back ? -SKIP_SECONDS : SKIP_SECONDS)}
626
631
  >
@@ -633,7 +638,8 @@ let HelixHeadlessVideo = class HelixHeadlessVideo extends HelixElement {
633
638
  if (one === 'previous') {
634
639
  return html `<${this.tag('menu-item')} part="entry"
635
640
  exportparts="end: entry-end, item: entry-item, mark: entry-mark, shortcut: entry-shortcut,
636
- shortcut-kbd: entry-shortcut-kbd, start: entry-start" value="previous" @helix-select=${() => this.skip(true)}>
641
+ shortcut-kbd: entry-shortcut-kbd, shortcut-key: entry-shortcut-key,
642
+ shortcut-separator: entry-shortcut-separator, start: entry-start" value="previous" @helix-select=${() => this.skip(true)}>
637
643
  <slot name="previous-icon" slot="start">${drawIcon(skipBack)}</slot>
638
644
  ${this.previousLabel}
639
645
  </${this.tag('menu-item')}>`;
@@ -641,7 +647,8 @@ let HelixHeadlessVideo = class HelixHeadlessVideo extends HelixElement {
641
647
  if (one === 'next') {
642
648
  return html `<${this.tag('menu-item')} part="entry"
643
649
  exportparts="end: entry-end, item: entry-item, mark: entry-mark, shortcut: entry-shortcut,
644
- shortcut-kbd: entry-shortcut-kbd, start: entry-start" value="next" @helix-select=${() => this.skip(false)}>
650
+ shortcut-kbd: entry-shortcut-kbd, shortcut-key: entry-shortcut-key,
651
+ shortcut-separator: entry-shortcut-separator, start: entry-start" value="next" @helix-select=${() => this.skip(false)}>
645
652
  <slot name="next-icon" slot="start">${drawIcon(skipForward)}</slot>
646
653
  ${this.nextLabel}
647
654
  </${this.tag('menu-item')}>`;
@@ -650,7 +657,8 @@ let HelixHeadlessVideo = class HelixHeadlessVideo extends HelixElement {
650
657
  const local = ownFile(this.src);
651
658
  return html `<${this.tag('menu-item')} part="entry"
652
659
  exportparts="end: entry-end, item: entry-item, mark: entry-mark, shortcut: entry-shortcut,
653
- shortcut-kbd: entry-shortcut-kbd, start: entry-start"
660
+ shortcut-kbd: entry-shortcut-kbd, shortcut-key: entry-shortcut-key,
661
+ shortcut-separator: entry-shortcut-separator, start: entry-start"
654
662
  ?download=${local}
655
663
  href=${this.src}
656
664
  rel=${local ? nothing : 'noreferrer'}
@@ -663,7 +671,8 @@ let HelixHeadlessVideo = class HelixHeadlessVideo extends HelixElement {
663
671
  }
664
672
  return html `<${this.tag('menu-item')} part="entry"
665
673
  exportparts="end: entry-end, item: entry-item, mark: entry-mark, shortcut: entry-shortcut,
666
- shortcut-kbd: entry-shortcut-kbd, start: entry-start" value="pip" @helix-select=${() => void this.togglePip()}>
674
+ shortcut-kbd: entry-shortcut-kbd, shortcut-key: entry-shortcut-key,
675
+ shortcut-separator: entry-shortcut-separator, start: entry-start" value="pip" @helix-select=${() => void this.togglePip()}>
667
676
  <slot name="pip-icon" slot="start">${drawIcon(pictureInPicture)}</slot>
668
677
  ${this.pipLabel}
669
678
  </${this.tag('menu-item')}>`;
@@ -27,6 +27,8 @@ import '../../menu/index.js';
27
27
  * @csspart entry-mark - The mark at the end of an entry: a check mark when it is checked, or a caret when it opens a submenu.
28
28
  * @csspart entry-shortcut - The key drawn for an entry's shortcut. The playlist's entries set none.
29
29
  * @csspart entry-shortcut-kbd - The key inside `entry-shortcut`.
30
+ * @csspart entry-shortcut-key - One key of an entry's shortcut chord, inside `entry-shortcut`. The playlist's entries set none.
31
+ * @csspart entry-shortcut-separator - The `+` between two keys of an entry's shortcut, where the platform writes one.
30
32
  * @csspart entry-start - The column at the start of an entry. It is a slot and is always present.
31
33
  * @csspart menu - The menu that holds the entries.
32
34
  * @csspart menu-back - The button that goes back from a submenu.
@@ -86,7 +86,8 @@ let HelixHeadlessVideoPlaylistMenu = class HelixHeadlessVideoPlaylistMenu extend
86
86
  ${this.entries.map((entry) => html `<${this.tag('menu-item')}
87
87
  part="entry"
88
88
  exportparts="end: entry-end, item: entry-item, mark: entry-mark, shortcut: entry-shortcut,
89
- shortcut-kbd: entry-shortcut-kbd, start: entry-start"
89
+ shortcut-kbd: entry-shortcut-kbd, shortcut-key: entry-shortcut-key,
90
+ shortcut-separator: entry-shortcut-separator, start: entry-start"
90
91
  value=${entry.value}
91
92
  checkable
92
93
  ?checked=${entry.current}
@@ -1,5 +1,6 @@
1
1
  import { HelixElement } from '@fusion.dev/helix-core';
2
2
  import { type PropertyValues, type TemplateResult } from 'lit';
3
+ import { HelixHeadlessVideoPlaylistItem } from '../item/video-playlist-item.js';
3
4
  import { type Repeat } from '../order.js';
4
5
  declare const HelixHeadlessVideoPlaylist_base: (new (...args: any[]) => import("@fusion.dev/helix-core").MixinControllerActiveInterface) & typeof HelixElement;
5
6
  /**
@@ -29,6 +30,12 @@ declare const HelixHeadlessVideoPlaylist_base: (new (...args: any[]) => import("
29
30
  * sends `helix-end`. `shuffle` plays the entries in a random order, starting
30
31
  * from the one that is current, and `previous` retraces that order.
31
32
  *
33
+ * **Keyboard.** Each entry is a button in the tab order, and Enter or Space
34
+ * plays it. The current entry carries `aria-current`. While focus is on the
35
+ * player, the player's own keys work, and `Video` lists them. Its previous
36
+ * and next controls move through the entries in the same order the playlist
37
+ * does.
38
+ *
32
39
  * @since 0.1.0
33
40
  * @status stable
34
41
  * @category media
@@ -38,7 +45,7 @@ declare const HelixHeadlessVideoPlaylist_base: (new (...args: any[]) => import("
38
45
  * @slot - The entries.
39
46
  * @slot player - The player that plays the entries.
40
47
  *
41
- * @event {HelixActivateEvent} helix-activate - The current entry changed. The playlist already holds the new entry when this is sent.
48
+ * @event {HelixActivateEvent} helix-activate - The current entry changed. The playlist already holds the new entry when this is sent, and `detail.previous` is the entry it left. `currentEntry` is the entry itself, with its `src`, `poster` and name.
42
49
  * @event {HelixBeforeActivateEvent} helix-before-activate - The current entry is about to change. Cancelable: cancel it to keep the current entry.
43
50
  * @event {HelixEndEvent} helix-end - The last entry finished playing, and the playlist stopped there. Not sent while `repeat` is set.
44
51
  *
@@ -131,6 +138,15 @@ export declare class HelixHeadlessVideoPlaylist extends HelixHeadlessVideoPlayli
131
138
  * under `repeat="one"` asks for, and a list of one under `repeat="all"`.
132
139
  */
133
140
  private replay;
141
+ /**
142
+ * The entry that is current, with the `src`, `poster`, `value` and name the
143
+ * player was given, or `undefined` in an empty playlist.
144
+ *
145
+ * Read it in a `helix-activate` listener for the clip the playlist moved to,
146
+ * which Web Awesome's change event carries: the event says which entry by
147
+ * value, and this is the entry.
148
+ */
149
+ get currentEntry(): HelixHeadlessVideoPlaylistItem | undefined;
134
150
  /**
135
151
  * Moves to the next entry and plays it, as the player's next control does.
136
152
  * Follows `shuffle`, goes round under `repeat="all"`, and stays on the last
@@ -81,6 +81,9 @@ let HelixHeadlessVideoPlaylist = class HelixHeadlessVideoPlaylist extends MixinC
81
81
  player.currentTime = 0;
82
82
  void Promise.resolve(player.play()).catch(() => { });
83
83
  }
84
+ get currentEntry() {
85
+ return this.resolveActive(this.items);
86
+ }
84
87
  next() {
85
88
  this.step(1);
86
89
  }
@@ -11,14 +11,6 @@
11
11
  *
12
12
  * A field is a key, or a path of keys joined by dots (`author.name`).
13
13
  */
14
- /**
15
- * The value at `path` in `item`, or `undefined` where the path leads nowhere.
16
- *
17
- * A dot separates keys, so `author.name` reads `item.author.name`. A key that
18
- * holds a dot itself is read whole first, which keeps a flat record with a key
19
- * such as `"v1.2"` working.
20
- */
21
- export declare const valueAt: (item: unknown, path: string) => unknown;
22
14
  /**
23
15
  * The text a value takes in a row.
24
16
  *
@@ -28,3 +20,14 @@ export declare const valueAt: (item: unknown, path: string) => unknown;
28
20
  export declare const textOf: (value: unknown) => string;
29
21
  /** Fills one element's holes, its own and those below it, from an item. */
30
22
  export declare const fillHoles: (root: Element, item: unknown) => void;
23
+ /**
24
+ * The key of item `at` in a selecting list's `value`: its `keyField` where it
25
+ * is an object and one is named, a string or a number item itself, and its
26
+ * place in the set otherwise.
27
+ */
28
+ export declare const keyOf: (item: unknown, at: number, keyField: string) => string;
29
+ /**
30
+ * The text typing matches for each item: its `field`, or a string or number
31
+ * item itself, and nothing where an object has no `field` to read.
32
+ */
33
+ export declare const textsOf: (data: readonly unknown[], field: string) => string[];
@@ -1,20 +1,4 @@
1
- export const valueAt = (item, path) => {
2
- if (item === null || typeof item !== 'object') {
3
- return undefined;
4
- }
5
- const record = item;
6
- if (path in record) {
7
- return record[path];
8
- }
9
- let value = record;
10
- for (const key of path.split('.')) {
11
- if (value === null || typeof value !== 'object') {
12
- return undefined;
13
- }
14
- value = value[key];
15
- }
16
- return value;
17
- };
1
+ import { valueAt } from '@fusion.dev/helix-core';
18
2
  export const textOf = (value) => value === undefined || value === null || typeof value === 'object' ? '' : String(value);
19
3
  const ATTRIBUTE = 'data-field-';
20
4
  const writeAttribute = (element, name, value) => {
@@ -37,3 +21,12 @@ export const fillHoles = (root, item) => {
37
21
  }
38
22
  }
39
23
  };
24
+ export const keyOf = (item, at, keyField) => {
25
+ if (keyField !== '' && item !== null && typeof item === 'object') {
26
+ return textOf(valueAt(item, keyField));
27
+ }
28
+ return typeof item === 'string' || typeof item === 'number' ? String(item) : String(at);
29
+ };
30
+ export const textsOf = (data, field) => data.map((item) => field === '' || item === null || typeof item !== 'object'
31
+ ? textOf(item)
32
+ : textOf(valueAt(item, field)));
@@ -1,15 +1,24 @@
1
1
  /**
2
- * Which item a key moves to in a vertical list of `count` items, from `at`.
2
+ * Which item a key moves to in a list of `count` items laid out `across`
3
+ * items to a line, from `at`.
3
4
  *
4
5
  * Index arithmetic, because most of the items are not drawn: the list moves to
5
6
  * an index, scrolls it into view, and focuses the row once it is there. The
6
- * keys are the ones a listbox answers:
7
+ * keys are the ones a listbox answers, and in a grid the ones a grid of
8
+ * options answers:
7
9
  *
8
- * - Up and Down move one item.
9
- * - Home and End move to the first and the last.
10
- * - Page Up and Page Down move by `page`, the number of items on screen less
11
- * one, so the item at one edge of the box lands at the other.
10
+ * - Up and Down move one line, to the item in the same column. Down from the
11
+ * line above a shorter last line goes to the last item.
12
+ * - Left and Right move one item, in a grid only, with `forward` naming the
13
+ * one that moves ahead along the line: Right, or Left on a right-to-left
14
+ * page. In a list they move nothing, and are left to the row.
15
+ * - Home and End move to the first and the last item.
16
+ * - Page Up and Page Down move by `page` lines, the number of lines on screen
17
+ * less one, so the line at one edge of the box lands at the other.
12
18
  *
13
19
  * `undefined` for a key the list does not take, and for an empty list.
14
20
  */
15
- export declare const stepIndex: (key: string, at: number, count: number, page: number) => number | undefined;
21
+ export declare const stepIndex: (key: string, at: number, count: number, page: number, { across, forward }?: {
22
+ across?: number;
23
+ forward?: string;
24
+ }) => number | undefined;
@@ -1,23 +1,34 @@
1
- export const stepIndex = (key, at, count, page) => {
1
+ export const stepIndex = (key, at, count, page, { across = 1, forward = 'ArrowRight' } = {}) => {
2
2
  if (count <= 0) {
3
3
  return undefined;
4
4
  }
5
+ const width = Math.max(1, Math.trunc(across));
5
6
  const last = count - 1;
6
7
  const from = Math.max(0, Math.min(at, last));
7
- const jump = Math.max(1, page);
8
+ const line = Math.floor(from / width);
9
+ const along = (lines) => {
10
+ const to = Math.max(0, Math.min(line + lines, Math.floor(last / width)));
11
+ return Math.min(last, to * width + (from % width));
12
+ };
8
13
  switch (key) {
9
14
  case 'ArrowDown':
10
- return Math.min(last, from + 1);
15
+ return along(1);
11
16
  case 'ArrowUp':
12
- return Math.max(0, from - 1);
17
+ return along(-1);
18
+ case 'ArrowLeft':
19
+ case 'ArrowRight':
20
+ if (width === 1) {
21
+ return undefined;
22
+ }
23
+ return Math.max(0, Math.min(last, from + (key === forward ? 1 : -1)));
13
24
  case 'End':
14
25
  return last;
15
26
  case 'Home':
16
27
  return 0;
17
28
  case 'PageDown':
18
- return Math.min(last, from + jump);
29
+ return along(Math.max(1, page));
19
30
  case 'PageUp':
20
- return Math.max(0, from - jump);
31
+ return along(-Math.max(1, page));
21
32
  default:
22
33
  return undefined;
23
34
  }
@@ -0,0 +1,65 @@
1
+ /**
2
+ * What one pass of a virtual list draws, worked out before any element moves.
3
+ *
4
+ * The list keeps the element of a row that stays in the window, so a pass
5
+ * compares what is drawn with what is wanted and changes only the difference.
6
+ * These are that comparison and the tab-stop rule that follows it, as
7
+ * arithmetic over item indices.
8
+ */
9
+ /** What a pass does to the rows in the tree. */
10
+ export interface DrawPlan {
11
+ /** The items the pass draws, in order: the window, and a kept item outside it. */
12
+ wanted: number[];
13
+ /** The items whose rows leave the tree. */
14
+ remove: Set<number>;
15
+ }
16
+ /** The window, the set's length, the item kept outside the window, and the rows drawn. */
17
+ export interface DrawInput {
18
+ /** The first item of the window. */
19
+ first: number;
20
+ /** One past the last item of the window. */
21
+ last: number;
22
+ /** How many items the set holds. */
23
+ count: number;
24
+ /** The item drawn outside the window to keep or take focus, where there is one. */
25
+ kept?: number | undefined;
26
+ /** The item each drawn row element holds, `NaN` for an element that holds none. */
27
+ drawn: readonly number[];
28
+ /** Whether every drawn row is drawn again from nothing, as for a new way of drawing. */
29
+ redraw?: boolean;
30
+ /**
31
+ * How many items a line holds, in a grid. The kept item brings its whole
32
+ * line, so the columns of the lines around it stay where they are.
33
+ */
34
+ across?: number;
35
+ }
36
+ /**
37
+ * Which items a pass draws, and which drawn rows leave.
38
+ *
39
+ * A drawn row leaves when its item is not wanted, when it holds no item, or
40
+ * when everything is drawn again. A wanted item with no row left is drawn new.
41
+ */
42
+ export declare const drawPlan: ({ across, count, drawn, first, kept, last, redraw, }: DrawInput) => DrawPlan;
43
+ /**
44
+ * Which item holds the list's tab stop after a pass.
45
+ *
46
+ * The item that held it, while its row is drawn. Otherwise the first item on
47
+ * screen, held inside the window and the set.
48
+ */
49
+ export declare const stopAfter: (active: number, wanted: readonly number[], { count, first, last, onScreen, }: {
50
+ count: number;
51
+ first: number;
52
+ last: number;
53
+ onScreen: number;
54
+ }) => number;
55
+ /**
56
+ * The items a span of lines holds, `across` items to a line: what a window of
57
+ * lines draws, or which items a reader sees.
58
+ */
59
+ export declare const itemsOf: (lines: {
60
+ first: number;
61
+ last: number;
62
+ }, across: number, count: number) => {
63
+ first: number;
64
+ last: number;
65
+ };
@@ -0,0 +1,27 @@
1
+ export const drawPlan = ({ across = 1, count, drawn, first, kept, last, redraw = false, }) => {
2
+ const wanted = [];
3
+ for (let at = first; at < Math.min(last, count); at += 1) {
4
+ wanted.push(at);
5
+ }
6
+ if (kept !== undefined && !wanted.includes(kept)) {
7
+ const width = Math.max(1, across);
8
+ const start = kept - (kept % width);
9
+ for (let at = start; at < Math.min(start + width, count); at += 1) {
10
+ wanted.push(at);
11
+ }
12
+ wanted.sort((a, b) => a - b);
13
+ }
14
+ const keep = new Set(wanted);
15
+ const remove = new Set(drawn.filter((index) => redraw || !Number.isInteger(index) || !keep.has(index)));
16
+ return { remove, wanted };
17
+ };
18
+ export const stopAfter = (active, wanted, { count, first, last, onScreen, }) => wanted.includes(active)
19
+ ? active
20
+ : Math.max(Math.min(onScreen, Math.min(last, count) - 1), first, 0);
21
+ export const itemsOf = (lines, across, count) => {
22
+ const width = Math.max(1, across);
23
+ return {
24
+ first: Math.min(lines.first * width, count),
25
+ last: Math.min(lines.last * width, count),
26
+ };
27
+ };
@@ -46,21 +46,55 @@ export interface VirtualListRange {
46
46
  *
47
47
  * Rows are your markup in the light DOM, so your stylesheet styles them.
48
48
  *
49
- * **Keyboard.** The list is one tab stop. Up and Down move between items, Home
50
- * and End go to the first and the last, and Page Up and Page Down move by a
51
- * screen. An item that is not drawn is scrolled into view and focused, so a
52
- * keyboard reaches the whole set. Tab moves on into the focused row's own links
53
- * and buttons. When the row holding the tab stop scrolls away, the stop moves
54
- * to the first row on screen.
49
+ * **A grid.** `columns` lays the items out that many to a line, as a grid of
50
+ * equal columns, and windows the set a line at a time, as React Aria's grid
51
+ * layout does. Each item draws one element, a cell of the grid, and
52
+ * `estimate` is the height of a line. Space the items with padding inside
53
+ * each one, which the list measures with the line.
54
+ *
55
+ * **Keyboard.** The list is one tab stop.
56
+ *
57
+ * | Key | What it does |
58
+ * |---|---|
59
+ * | Down, Up | Moves to the next or the previous item, or in a grid to the item in the same column on the next or the previous line. |
60
+ * | Right, Left | In a grid, moves to the next or the previous item along the line, the other way round on a right-to-left page. |
61
+ * | Home, End | Moves to the first or the last item. |
62
+ * | Page Down, Page Up | Moves by the number of items, or of lines in a grid, on screen. |
63
+ * | A letter or a word | Moves to the next item whose text starts with what you typed. |
64
+ * | Tab | Moves into the focused row's own links and buttons, then out of the list. |
65
+ *
66
+ * An item that is not drawn is scrolled into view and focused, so a keyboard
67
+ * reaches the whole set. When the row holding the tab stop scrolls away, the
68
+ * stop moves to the first row on screen. Typing matches each item's
69
+ * `text-field`, which is the first `data-field` of the row template by default,
70
+ * or the item itself when it is a string or a number.
55
71
  *
56
72
  * Each row says its place in the whole set with `aria-posinset` and
57
73
  * `aria-setsize`, so a screen reader says "4,000 of 10,000". The row holding
58
74
  * focus stays drawn when it scrolls out.
59
75
  *
76
+ * **Selecting.** `selection-mode` makes the list a list box a reader chooses
77
+ * from: `single` selects one item and `multiple` any number. Space or a press
78
+ * selects an item, Shift with Space, an arrow, Home, End or a press takes in
79
+ * the items from the last one chosen, and Control or Command with A selects
80
+ * them all, in `multiple`. `value` holds the chosen items' keys, separated by
81
+ * commas, in the order of the set: `key-field` names each item's key, and a
82
+ * string or a number item is its own key. A change asks with
83
+ * `helix-before-change` and tells with `change`. Each row is an `option`
84
+ * marked `aria-selected`, so a row's own links and buttons are not reached
85
+ * there: keep those to a list without `selection-mode`.
86
+ *
60
87
  * **Loading more.** `helix-range-change` fires as the items on screen change,
61
88
  * and `range` holds them. `helix-load-more` fires once a reader is within one
62
89
  * screen of the end, once for each length of the set: add to `items` and it can
63
- * fire again. `scrollToIndex` takes a reader to an item.
90
+ * fire again. While you fetch, set `loading`: the list is busy, and a row after
91
+ * the last item says "Loading more" (`loading-label`, or your own content in
92
+ * the `loading` slot). `scrollToIndex` takes a reader to an item.
93
+ *
94
+ * **Row height.** Rows are placed by `estimate` until they are drawn. Then the
95
+ * list reads the drawn rows' height once and places every row by it, so a
96
+ * wrong estimate still reaches the last item. Set `measured` for rows of
97
+ * different heights.
64
98
  *
65
99
  * The list follows its source. A new `items` array, an edit to the script's
66
100
  * text, or a script replaced under the same id draws the new rows. A row that
@@ -76,15 +110,25 @@ export interface VirtualListRange {
76
110
  * @documentation https://fusion.dev/helix/components/virtual-list
77
111
  *
78
112
  * @slot - The `<template>` that defines one row. The list writes the rows it renders beside it, and this slot shows them between the two spacers.
113
+ * @slot loading - Content for the row after the last item while `loading` is set. Falls back to `loading-label`.
79
114
  *
115
+ * @event {Event} change - Fired once a press or a key has changed which items are selected, in a list with `selection-mode`.
116
+ * @event {HelixBeforeChangeEvent} helix-before-change - Fired before a press or a key changes which items are selected, with the `value` it would leave. Cancelable.
80
117
  * @event {HelixLoadMoreEvent} helix-load-more - Fired when a reader comes within one screen of the last item, once for each length of the set.
81
118
  * @event {HelixRangeChangeEvent} helix-range-change - Fired when the items on screen change, with the new `first` and `last`, which `range` also holds.
82
119
  *
83
120
  * @csspart after - The space that stands in for the rows below the rendered ones.
84
121
  * @csspart before - The space that stands in for the rows above the rendered ones.
122
+ * @csspart loading - The row after the last item while `loading` is set.
85
123
  * @csspart viewport - The scrolling box. On this tier, it needs only a block size.
86
124
  */
87
125
  export declare class HelixHeadlessVirtualList extends HelixElement {
126
+ /**
127
+ * How many items a line holds. One, the default, is a list; more lays the
128
+ * items out as a grid of that many equal columns, windowed a line at a
129
+ * time, with Left and Right moving along a line.
130
+ */
131
+ columns: number;
88
132
  /**
89
133
  * The height of one row, in pixels, used to find the row at a scroll offset.
90
134
  *
@@ -105,6 +149,12 @@ export declare class HelixHeadlessVirtualList extends HelixElement {
105
149
  * Left unset, the list reads the script that `for` names.
106
150
  */
107
151
  items: readonly unknown[] | undefined;
152
+ /**
153
+ * The field of each item that is its key in `value`, as a key or a path of
154
+ * keys. Empty reads a string or a number item as its own key, and any
155
+ * other item by its place in the set.
156
+ */
157
+ keyField: string;
108
158
  /**
109
159
  * The list's name, read by screen readers, because only some of its rows
110
160
  * are rendered at a time.
@@ -114,11 +164,22 @@ export declare class HelixHeadlessVirtualList extends HelixElement {
114
164
  */
115
165
  label: string;
116
166
  /**
117
- * Places rows by their measured height. Without it, every row is placed by
118
- * `estimate`.
167
+ * Marks the list as busy fetching more items, and draws a row after the last
168
+ * item that says so.
169
+ *
170
+ * Set it when `helix-load-more` starts a fetch, and clear it when the items
171
+ * arrive. The list does not ask for more while it is set.
172
+ */
173
+ loading: boolean;
174
+ /** The text of the row drawn while `loading` is set, where the `loading` slot is empty. */
175
+ loadingLabel: string;
176
+ /**
177
+ * Places each row by its own measured height. Without it, rows are placed
178
+ * by one height: `estimate` until rows are drawn, then the drawn rows' height,
179
+ * read once.
119
180
  *
120
181
  * **Off by default, because the straight line is better when it holds.** One
121
- * estimate makes offset and index convert by division, which can never
182
+ * height makes offset and index convert by division, which can never
122
183
  * disagree with itself; measuring is what a set of genuinely different
123
184
  * heights needs and costs a read of each row as it renders. A list of
124
185
  * one-line rows should leave this alone.
@@ -133,6 +194,24 @@ export declare class HelixHeadlessVirtualList extends HelixElement {
133
194
  * and place in the set. Where it is unset, the row `<template>` is used.
134
195
  */
135
196
  renderItem: VirtualListRenderer | undefined;
197
+ /**
198
+ * Makes the list a list box a reader chooses from: `single` selects one
199
+ * item, and `multiple` any number. Unset is a list a reader reads.
200
+ */
201
+ selectionMode?: 'multiple' | 'single';
202
+ /**
203
+ * The field of each item that typing matches, as a key or a path of keys
204
+ * (`author.name`).
205
+ *
206
+ * Empty by default, which matches the first `data-field` of the row
207
+ * template, or the item itself where it is a string or a number.
208
+ */
209
+ textField: string;
210
+ /**
211
+ * The keys of the chosen items, separated by commas, in a list with
212
+ * `selection-mode`. Set it to start with items chosen.
213
+ */
214
+ value: string;
136
215
  /**
137
216
  * The parsed script.
138
217
  *
@@ -158,8 +237,10 @@ export declare class HelixHeadlessVirtualList extends HelixElement {
158
237
  private released;
159
238
  /** The range last reported, so `helix-range-change` fires only on a change. */
160
239
  private said;
161
- /** The length of the set when `helix-load-more` last fired. */
162
- private askedAt;
240
+ /** The letters typed at the list, which move to the item they start. */
241
+ private readonly typeahead;
242
+ /** The key of the item a Shift range runs from: the last one chosen. */
243
+ private anchor;
163
244
  /**
164
245
  * Watches the source and the tree around it.
165
246
  *
@@ -179,6 +260,10 @@ export declare class HelixHeadlessVirtualList extends HelixElement {
179
260
  * box to measure.
180
261
  */
181
262
  get range(): VirtualListRange;
263
+ /** How many items a line holds: `columns`, at least one. */
264
+ private get across();
265
+ /** The items a span of lines holds. */
266
+ private itemsOn;
182
267
  /**
183
268
  * Scrolls the list to show the item at `index`.
184
269
  *
@@ -199,6 +284,11 @@ export declare class HelixHeadlessVirtualList extends HelixElement {
199
284
  * window moved.
200
285
  */
201
286
  private drawn;
287
+ /**
288
+ * The drawn lines, for the controller to measure: each row in a list, and
289
+ * the first item of each line in a grid, whose cell is as tall as its line.
290
+ */
291
+ private lines;
202
292
  /**
203
293
  * Reads the source named by `for`, before the render that draws it.
204
294
  *
@@ -235,6 +325,11 @@ export declare class HelixHeadlessVirtualList extends HelixElement {
235
325
  * has not been laid out yet asks for nothing.
236
326
  */
237
327
  private report;
328
+ /**
329
+ * The text typing matches for each item: `text-field`, the template's first
330
+ * `data-field`, or a string or number item itself.
331
+ */
332
+ private texts;
238
333
  /** The item a row element drew, for an element that is one of the rows. */
239
334
  private indexOf;
240
335
  /** The row that holds the tab stop for item `index`, where it is drawn. */
@@ -246,6 +341,28 @@ export declare class HelixHeadlessVirtualList extends HelixElement {
246
341
  * is that control's, so a field in a row keeps its arrows.
247
342
  */
248
343
  private readonly handleKeydown;
344
+ /** The key of item `at` in `value`. See `keyField`. */
345
+ private keyAt;
346
+ /** Every item's key, in the order of the set. */
347
+ private keys;
348
+ /** The keys chosen now. */
349
+ private get chosen();
350
+ /**
351
+ * Selects item `at`, or lets it go, asking first. With `extend`, in
352
+ * `multiple`, the items from the anchor to it are taken in, as Data Table
353
+ * and List take in a range. Otherwise the item is where the next range runs
354
+ * from.
355
+ */
356
+ private press;
357
+ /** Keys in the order of the set, a key it no longer holds kept after them. */
358
+ private inOrder;
359
+ /** Asks for a new `value`, and says so once it has moved. */
360
+ private choose;
361
+ /**
362
+ * A press on a row selects it, in a list with `selection-mode`, except on a
363
+ * control of its own. Shift takes in a range.
364
+ */
365
+ private readonly handleClick;
249
366
  /**
250
367
  * Focuses the row for item `index`, scrolling it into view and drawing it
251
368
  * first when it is not drawn.
@@ -266,7 +383,13 @@ export declare class HelixHeadlessVirtualList extends HelixElement {
266
383
  private focusing;
267
384
  /** The item drawn outside the window to keep focus, or to take it, if there is one. */
268
385
  private keptIndex;
269
- /** Writes a row's role and its place in the set. */
386
+ /**
387
+ * Writes a row's role, and whether it is chosen in a list that selects:
388
+ * `option` with `aria-selected` there, and `listitem` otherwise. Every pass,
389
+ * since a choice changes no row's content.
390
+ */
391
+ private mark;
392
+ /** Writes a row's place in the set. */
270
393
  private stamp;
271
394
  /** Fills a drawn row from its item, by `renderItem` or by the template's holes. */
272
395
  private fill;