@fusion.dev/helix-headless 0.0.0-dev → 0.0.2

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 (210) hide show
  1. package/custom-elements.json +4513 -4483
  2. package/dist/accordion/item/accordion-item.d.ts +13 -15
  3. package/dist/accordion/item/accordion-item.js +15 -17
  4. package/dist/announcement/root/announcement-root.d.ts +7 -25
  5. package/dist/announcement/root/announcement-root.js +7 -20
  6. package/dist/app-header/root/app-header-root.d.ts +10 -17
  7. package/dist/app-header/root/app-header-root.js +9 -18
  8. package/dist/avatar/group/avatar-group.d.ts +10 -19
  9. package/dist/avatar/group/avatar-group.js +12 -17
  10. package/dist/avatar/root/avatar-root.d.ts +8 -8
  11. package/dist/avatar/root/avatar-root.js +19 -20
  12. package/dist/badge/root/badge-root.d.ts +6 -6
  13. package/dist/badge/root/badge-root.js +13 -13
  14. package/dist/bar-chart/root/bar-chart-root.d.ts +21 -29
  15. package/dist/bar-chart/root/bar-chart-root.js +42 -57
  16. package/dist/breadcrumbs/breadcrumb/breadcrumb.d.ts +12 -18
  17. package/dist/breadcrumbs/breadcrumb/breadcrumb.js +13 -16
  18. package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +9 -28
  19. package/dist/breadcrumbs/root/breadcrumbs-root.js +9 -28
  20. package/dist/button/root/button-root.d.ts +84 -94
  21. package/dist/button/root/button-root.js +82 -92
  22. package/dist/callout/root/callout-root.d.ts +4 -5
  23. package/dist/carousel/root/carousel-root.d.ts +59 -71
  24. package/dist/carousel/root/carousel-root.js +73 -101
  25. package/dist/chat/composer/chat-composer.d.ts +29 -33
  26. package/dist/chat/composer/chat-composer.js +40 -44
  27. package/dist/chat/message/chat-message.d.ts +25 -25
  28. package/dist/chat/message/chat-message.js +26 -26
  29. package/dist/chat/root/chat-root.d.ts +28 -41
  30. package/dist/chat/root/chat-root.js +27 -40
  31. package/dist/checkbox/root/checkbox-root.d.ts +10 -12
  32. package/dist/checkbox/root/checkbox-root.js +29 -35
  33. package/dist/checkbox-group/root/checkbox-group-root.d.ts +32 -45
  34. package/dist/checkbox-group/root/checkbox-group-root.js +53 -79
  35. package/dist/code-block/root/code-block-root.d.ts +3 -4
  36. package/dist/code-block/root/code-block-root.js +8 -12
  37. package/dist/color-input/root/color-input-root.d.ts +36 -37
  38. package/dist/color-input/root/color-input-root.js +29 -34
  39. package/dist/color-picker/color.d.ts +7 -8
  40. package/dist/color-picker/color.js +7 -8
  41. package/dist/color-picker/root/color-picker-root.d.ts +55 -57
  42. package/dist/color-picker/root/color-picker-root.js +60 -64
  43. package/dist/combobox/root/combobox-root.d.ts +53 -58
  44. package/dist/combobox/root/combobox-root.js +85 -94
  45. package/dist/command/root/command-root.d.ts +8 -8
  46. package/dist/command/root/command-root.js +29 -33
  47. package/dist/copy-button/root/copy-button-root.d.ts +21 -24
  48. package/dist/copy-button/root/copy-button-root.js +25 -35
  49. package/dist/data-table/root/data-table-root.d.ts +77 -76
  50. package/dist/data-table/root/data-table-root.js +95 -84
  51. package/dist/data-table/root/order.d.ts +2 -2
  52. package/dist/data-table/root/order.js +1 -3
  53. package/dist/date-input/root/date-input-root.d.ts +88 -93
  54. package/dist/date-input/root/date-input-root.js +147 -158
  55. package/dist/date-picker/root/date-picker-root.d.ts +75 -83
  56. package/dist/date-picker/root/date-picker-root.js +120 -143
  57. package/dist/dialog/root/dialog-root.d.ts +41 -24
  58. package/dist/dialog/root/dialog-root.js +47 -24
  59. package/dist/divider/root/divider-root.d.ts +5 -6
  60. package/dist/divider/root/divider-root.js +4 -5
  61. package/dist/donut-chart/root/donut-chart-root.d.ts +22 -25
  62. package/dist/donut-chart/root/donut-chart-root.js +37 -51
  63. package/dist/drawer/root/drawer-root.d.ts +24 -29
  64. package/dist/drawer/root/drawer-root.js +15 -22
  65. package/dist/drilldown/item/drilldown-item.d.ts +14 -14
  66. package/dist/drilldown/item/drilldown-item.js +24 -26
  67. package/dist/drilldown/root/drilldown-root.d.ts +8 -10
  68. package/dist/drilldown/root/drilldown-root.js +6 -7
  69. package/dist/element-events.generated.js +1 -1
  70. package/dist/file-input/root/file-input-root.d.ts +20 -24
  71. package/dist/file-input/root/file-input-root.js +42 -57
  72. package/dist/format-date/root/format-date-root.js +1 -1
  73. package/dist/heatmap/root/buckets.d.ts +8 -8
  74. package/dist/heatmap/root/buckets.js +8 -8
  75. package/dist/heatmap/root/heatmap-root.d.ts +57 -63
  76. package/dist/heatmap/root/heatmap-root.js +72 -83
  77. package/dist/icon/root/icon-root.d.ts +4 -4
  78. package/dist/icon/root/icon-root.js +9 -9
  79. package/dist/icon-button/root/icon-button-root.d.ts +4 -6
  80. package/dist/icon-button/root/icon-button-root.js +4 -6
  81. package/dist/image/root/image-root.d.ts +49 -59
  82. package/dist/image/root/image-root.js +55 -65
  83. package/dist/index.d.ts +5 -5
  84. package/dist/index.js +5 -5
  85. package/dist/input/root/input-root.d.ts +61 -85
  86. package/dist/input/root/input-root.js +79 -106
  87. package/dist/kbd/root/kbd-root.d.ts +8 -7
  88. package/dist/kbd/root/kbd-root.js +71 -11
  89. package/dist/legend/root/legend-root.d.ts +1 -1
  90. package/dist/legend/root/legend-root.js +4 -5
  91. package/dist/line-chart/root/line-chart-root.d.ts +26 -30
  92. package/dist/line-chart/root/line-chart-root.js +10 -10
  93. package/dist/list/item/list-item.d.ts +14 -18
  94. package/dist/list/item/list-item.js +18 -22
  95. package/dist/list/root/list-root.d.ts +4 -4
  96. package/dist/list/root/list-root.js +3 -3
  97. package/dist/listbox/root/listbox-root.d.ts +31 -58
  98. package/dist/listbox/root/listbox-root.js +66 -109
  99. package/dist/megamenu/root/megamenu-root.d.ts +34 -35
  100. package/dist/megamenu/root/megamenu-root.js +53 -58
  101. package/dist/menu/item/menu-item.d.ts +39 -53
  102. package/dist/menu/item/menu-item.js +50 -64
  103. package/dist/menu/root/menu-root.d.ts +30 -40
  104. package/dist/menu/root/menu-root.js +49 -82
  105. package/dist/meter/root/meter-root.d.ts +49 -53
  106. package/dist/meter/root/meter-root.js +22 -27
  107. package/dist/navigation/root/navigation-root.js +11 -19
  108. package/dist/notifications/notification/notification.d.ts +16 -22
  109. package/dist/notifications/notification/notification.js +21 -27
  110. package/dist/notifications/root/notifications-root.d.ts +31 -39
  111. package/dist/notifications/root/notifications-root.js +41 -52
  112. package/dist/number-input/root/number-input-root.d.ts +31 -33
  113. package/dist/number-input/root/number-input-root.js +37 -39
  114. package/dist/option/root/option-root.d.ts +73 -74
  115. package/dist/option/root/option-root.js +62 -64
  116. package/dist/outline/root/outline-root.d.ts +38 -44
  117. package/dist/outline/root/outline-root.js +66 -82
  118. package/dist/pagination/root/pagination-root.d.ts +87 -92
  119. package/dist/pagination/root/pagination-root.js +116 -123
  120. package/dist/pagination/size/pagination-size.d.ts +31 -50
  121. package/dist/pagination/size/pagination-size.js +35 -55
  122. package/dist/pagination/summary/pagination-summary.d.ts +12 -12
  123. package/dist/pagination/summary/pagination-summary.js +18 -18
  124. package/dist/pin-input/root/pin-input-root.d.ts +53 -70
  125. package/dist/pin-input/root/pin-input-root.js +74 -94
  126. package/dist/popover/root/popover-root.d.ts +15 -20
  127. package/dist/popover/root/popover-root.js +19 -36
  128. package/dist/progress/root/progress-root.d.ts +12 -14
  129. package/dist/progress/root/progress-root.js +22 -25
  130. package/dist/qr-code/root/qr-code-root.d.ts +11 -11
  131. package/dist/qr-code/root/qr-code-root.js +12 -14
  132. package/dist/radio/group/radio-group.js +19 -26
  133. package/dist/radio/root/radio-root.d.ts +12 -13
  134. package/dist/radio/root/radio-root.js +12 -13
  135. package/dist/rating/root/rating-root.d.ts +25 -30
  136. package/dist/rating/root/rating-root.js +43 -50
  137. package/dist/scroll-area/root/scroll-area-root.d.ts +11 -14
  138. package/dist/scroll-area/root/scroll-area-root.js +39 -33
  139. package/dist/select/root/select-root.d.ts +7 -12
  140. package/dist/select/root/select-root.js +40 -55
  141. package/dist/slider/root/slider-root.d.ts +53 -60
  142. package/dist/slider/root/slider-root.js +74 -85
  143. package/dist/sparkline/root/sparkline-root.d.ts +43 -47
  144. package/dist/sparkline/root/sparkline-root.js +23 -32
  145. package/dist/speed-dial/item/speed-dial-item.d.ts +6 -6
  146. package/dist/speed-dial/item/speed-dial-item.js +9 -9
  147. package/dist/speed-dial/root/speed-dial-root.d.ts +21 -25
  148. package/dist/speed-dial/root/speed-dial-root.js +32 -40
  149. package/dist/splitter/root/splitter-root.d.ts +98 -111
  150. package/dist/splitter/root/splitter-root.js +96 -123
  151. package/dist/stat/root/stat-root.d.ts +2 -7
  152. package/dist/stat/root/stat-root.js +0 -5
  153. package/dist/steps/step/step.d.ts +19 -24
  154. package/dist/steps/step/step.js +27 -32
  155. package/dist/switch/root/switch-root.js +2 -2
  156. package/dist/table/column/table-column.d.ts +54 -60
  157. package/dist/table/column/table-column.js +95 -68
  158. package/dist/table/root/table-root.d.ts +5 -6
  159. package/dist/table/root/table-root.js +7 -10
  160. package/dist/tabs/panel/tab-panel.d.ts +21 -25
  161. package/dist/tabs/panel/tab-panel.js +25 -29
  162. package/dist/tabs/root/tabs-root.d.ts +25 -34
  163. package/dist/tabs/root/tabs-root.js +22 -28
  164. package/dist/tabs/tab/tab.d.ts +12 -12
  165. package/dist/tabs/tab/tab.js +19 -20
  166. package/dist/textarea/root/textarea-root.d.ts +36 -36
  167. package/dist/textarea/root/textarea-root.js +43 -47
  168. package/dist/time-input/root/time-input-root.d.ts +58 -68
  169. package/dist/time-input/root/time-input-root.js +62 -77
  170. package/dist/time-picker/root/time-picker-root.d.ts +73 -79
  171. package/dist/time-picker/root/time-picker-root.js +72 -84
  172. package/dist/timeline/item/timeline-item.d.ts +8 -11
  173. package/dist/timeline/item/timeline-item.js +8 -11
  174. package/dist/timeline/root/timeline-root.d.ts +5 -7
  175. package/dist/timeline/root/timeline-root.js +5 -7
  176. package/dist/toast/item/toast-item.d.ts +9 -27
  177. package/dist/toast/item/toast-item.js +19 -41
  178. package/dist/toast/root/toast-root.d.ts +10 -14
  179. package/dist/toast/root/toast-root.js +4 -5
  180. package/dist/toggle/group/toggle-group.d.ts +6 -15
  181. package/dist/toggle/group/toggle-group.js +21 -36
  182. package/dist/toggle/root/toggle-root.d.ts +26 -27
  183. package/dist/toggle/root/toggle-root.js +30 -31
  184. package/dist/toolbar/root/toolbar-root.d.ts +7 -10
  185. package/dist/toolbar/root/toolbar-root.js +10 -14
  186. package/dist/tooltip/root/tooltip-root.d.ts +52 -59
  187. package/dist/tooltip/root/tooltip-root.js +98 -93
  188. package/dist/tour/root/tour-root.d.ts +19 -23
  189. package/dist/tour/root/tour-root.js +31 -41
  190. package/dist/tour/stop/tour-stop.d.ts +14 -15
  191. package/dist/tour/stop/tour-stop.js +31 -34
  192. package/dist/tree/item/tree-item.d.ts +30 -35
  193. package/dist/tree/item/tree-item.js +43 -55
  194. package/dist/tree/root/tree-root.d.ts +7 -10
  195. package/dist/tree/root/tree-root.js +33 -42
  196. package/dist/trend/root/trend-root.d.ts +3 -5
  197. package/dist/trend/root/trend-root.js +5 -9
  198. package/dist/video/root/video-root.d.ts +100 -124
  199. package/dist/video/root/video-root.js +142 -176
  200. package/dist/video-playlist/item/video-playlist-item.d.ts +16 -16
  201. package/dist/video-playlist/item/video-playlist-item.js +24 -24
  202. package/dist/video-playlist/menu/video-playlist-menu.d.ts +5 -8
  203. package/dist/video-playlist/menu/video-playlist-menu.js +20 -29
  204. package/dist/video-playlist/root/video-playlist-root.d.ts +16 -11
  205. package/dist/video-playlist/root/video-playlist-root.js +21 -25
  206. package/dist/virtual-list/root/virtual-list-root.d.ts +8 -12
  207. package/dist/virtual-list/root/virtual-list-root.js +11 -16
  208. package/jsx.d.ts +9797 -12561
  209. package/package.json +6 -6
  210. package/vue.d.ts +2684 -3228
@@ -50,13 +50,17 @@ let HelixHeadlessVideoPlaylistItem = class HelixHeadlessVideoPlaylistItem extend
50
50
  constructor() {
51
51
  super(...arguments);
52
52
  /**
53
- * What identifies the entry, and what `active` is compared against.
53
+ * Whether the player is on this entry.
54
+ *
55
+ * Written by the playlist rather than by the entry, the way an option's
56
+ * selection is: an entry that made itself current would be a second answer to
57
+ * which one is playing.
54
58
  */
55
- this.value = '';
59
+ this.current = false;
56
60
  /**
57
- * The file this entry plays.
61
+ * Whether the entry can be chosen.
58
62
  */
59
- this.src = '';
63
+ this.disabled = false;
60
64
  /**
61
65
  * What covers the picture before this entry plays, and the row's thumbnail.
62
66
  *
@@ -68,17 +72,13 @@ let HelixHeadlessVideoPlaylistItem = class HelixHeadlessVideoPlaylistItem extend
68
72
  */
69
73
  this.poster = '';
70
74
  /**
71
- * Whether the entry can be chosen.
75
+ * The file this entry plays.
72
76
  */
73
- this.disabled = false;
77
+ this.src = '';
74
78
  /**
75
- * Whether the player is on this entry.
76
- *
77
- * Written by the playlist rather than by the entry, the way an option's
78
- * selection is: an entry that made itself current would be a second answer to
79
- * which one is playing.
79
+ * What identifies the entry, and what `active` is compared against.
80
80
  */
81
- this.current = false;
81
+ this.value = '';
82
82
  this.choose = () => {
83
83
  if (this.disabled) {
84
84
  return;
@@ -89,10 +89,10 @@ let HelixHeadlessVideoPlaylistItem = class HelixHeadlessVideoPlaylistItem extend
89
89
  /**
90
90
  * The entry's name, which is the words and not everything in it.
91
91
  *
92
- * `textContent` was what this used, and it takes the whole subtree: a row with
93
- * a duration in `meta` reported "His Girl Friday0:06", and that string went to
94
- * the player and on to the lock screen. Only the nodes the consumer left
95
- * unslotted are the name; anything named is a column beside it.
92
+ * `textContent` takes the whole subtree: a row with a duration in `meta`
93
+ * reads as "His Girl Friday0:06", and that string reaches the player and the
94
+ * lock screen. Only the nodes the consumer left unslotted are the name;
95
+ * anything named is a column beside it.
96
96
  *
97
97
  * Light DOM rather than `assignedNodes`, so it answers on the server too,
98
98
  * where there is no slot to ask. `Option.text` reads its own the same way.
@@ -142,20 +142,20 @@ let HelixHeadlessVideoPlaylistItem = class HelixHeadlessVideoPlaylistItem extend
142
142
  }
143
143
  };
144
144
  __decorate([
145
- property()
146
- ], HelixHeadlessVideoPlaylistItem.prototype, "value", void 0);
145
+ property({ attribute: false })
146
+ ], HelixHeadlessVideoPlaylistItem.prototype, "current", void 0);
147
147
  __decorate([
148
- property()
149
- ], HelixHeadlessVideoPlaylistItem.prototype, "src", void 0);
148
+ property({ reflect: true, type: Boolean })
149
+ ], HelixHeadlessVideoPlaylistItem.prototype, "disabled", void 0);
150
150
  __decorate([
151
151
  property()
152
152
  ], HelixHeadlessVideoPlaylistItem.prototype, "poster", void 0);
153
153
  __decorate([
154
- property({ reflect: true, type: Boolean })
155
- ], HelixHeadlessVideoPlaylistItem.prototype, "disabled", void 0);
154
+ property()
155
+ ], HelixHeadlessVideoPlaylistItem.prototype, "src", void 0);
156
156
  __decorate([
157
- property({ attribute: false })
158
- ], HelixHeadlessVideoPlaylistItem.prototype, "current", void 0);
157
+ property()
158
+ ], HelixHeadlessVideoPlaylistItem.prototype, "value", void 0);
159
159
  HelixHeadlessVideoPlaylistItem = __decorate([
160
160
  customElement('helix-headless-video-playlist-item')
161
161
  ], HelixHeadlessVideoPlaylistItem);
@@ -31,9 +31,9 @@ import '../../menu/index.js';
31
31
  *
32
32
  * **Choosing dispatches `helix-select`, the same event an entry dispatches.**
33
33
  * It never writes `active` on the playlist, which looks like the shorter path
34
- * and would latch the controlled contract: a playlist assigned `active` once
35
- * goes quiet and waits for a consumer who was never there. Announcing is what
36
- * an entry does, the playlist already listens for it, and a consumer refusing a
34
+ * and skips the cancelable request: an assignment applies the change with no
35
+ * `helix-before-activate` for anyone to refuse. Announcing is what an entry
36
+ * does, the playlist already listens for it, and a consumer refusing a
37
37
  * selection gets `preventDefault()` on one event rather than two paths that
38
38
  * behave differently.
39
39
  *
@@ -51,7 +51,6 @@ import '../../menu/index.js';
51
51
  * @csspart entry-item - The row, which is an `<a>` where `href` is set.
52
52
  * @csspart entry-mark - The trailing mark: a tick when checked, a caret when it opens
53
53
  * @csspart entry-start - The leading column, which is a slot and is always there.
54
- * @csspart icon - The glyph on the trigger.
55
54
  * @csspart menu - The menu that holds the entries.
56
55
  * @csspart menu-back - The control that returns from a submenu.
57
56
  * @csspart menu-back-mark - The glyph on the back control of a submenu.
@@ -97,10 +96,8 @@ export declare class HelixHeadlessVideoPlaylistMenu extends HelixElement {
97
96
  * **Which entry is current** is `active`, a property with no attribute, so
98
97
  * there is nothing to observe: events travel up from the playlist and this
99
98
  * element is below it, and mirroring `active` to a `data-` name is ruled out
100
- * on its own merits, `active` being a payload rather than a boolean fact.
101
- * Mirroring it was written and reverted here: it put `data-active` onto every
102
- * host, which `tree-root.ssr.spec.ts` caught, and the rule it broke was the
103
- * one that stops a copied host coming back frozen.
99
+ * on its own merits, `active` being a payload rather than a boolean fact. A
100
+ * `data-active` on every host is what `tree-root.ssr.spec.ts` fails on.
104
101
  *
105
102
  * So it is re-read at the moment it is looked at. `helix-before-open` comes from the
106
103
  * menu in this element's own shadow root, which is the one direction events
@@ -42,9 +42,9 @@ const ITEMS = 'helix-video-playlist-item, helix-headless-video-playlist-item';
42
42
  *
43
43
  * **Choosing dispatches `helix-select`, the same event an entry dispatches.**
44
44
  * It never writes `active` on the playlist, which looks like the shorter path
45
- * and would latch the controlled contract: a playlist assigned `active` once
46
- * goes quiet and waits for a consumer who was never there. Announcing is what
47
- * an entry does, the playlist already listens for it, and a consumer refusing a
45
+ * and skips the cancelable request: an assignment applies the change with no
46
+ * `helix-before-activate` for anyone to refuse. Announcing is what an entry
47
+ * does, the playlist already listens for it, and a consumer refusing a
48
48
  * selection gets `preventDefault()` on one event rather than two paths that
49
49
  * behave differently.
50
50
  *
@@ -62,7 +62,6 @@ const ITEMS = 'helix-video-playlist-item, helix-headless-video-playlist-item';
62
62
  * @csspart entry-item - The row, which is an `<a>` where `href` is set.
63
63
  * @csspart entry-mark - The trailing mark: a tick when checked, a caret when it opens
64
64
  * @csspart entry-start - The leading column, which is a slot and is always there.
65
- * @csspart icon - The glyph on the trigger.
66
65
  * @csspart menu - The menu that holds the entries.
67
66
  * @csspart menu-back - The control that returns from a submenu.
68
67
  * @csspart menu-back-mark - The glyph on the back control of a submenu.
@@ -95,10 +94,9 @@ let HelixHeadlessVideoPlaylistMenu = class HelixHeadlessVideoPlaylistMenu extend
95
94
  *
96
95
  * The entries are the playlist's light DOM rather than this element's, so
97
96
  * nothing about them schedules an update here: an entry added, removed, or
98
- * made current changes a tree this element only looks at. A bumped field is
99
- * the usual way to say "render again", and here it is a field nothing reads,
100
- * which the linter is right to call out. Asking directly says the same thing
101
- * with nothing to explain. */
97
+ * made current changes a tree this element only looks at. A bumped `@state`
98
+ * field is the usual way to say "render again", and here it would be a field
99
+ * nothing reads, which the linter is right to call out. */
102
100
  this.reread = () => {
103
101
  this.requestUpdate();
104
102
  };
@@ -121,17 +119,14 @@ let HelixHeadlessVideoPlaylistMenu = class HelixHeadlessVideoPlaylistMenu extend
121
119
  }
122
120
  /* Resolved once, on the client, and never during a render.
123
121
  *
124
- * `render` reached for this through `closestInstance` at first, which walks
125
- * `parentNode` and steps across a `ShadowRoot` by following its `host`. That
126
- * names `ShadowRoot`, which the server has no global for, so every SSR of
127
- * this element threw `ReferenceError: Can't find variable: ShadowRoot` from
128
- * inside Lit's own result collector, three frames from anything recognisable.
129
- *
130
- * Which is the tree-inspection rule arriving as a crash rather than as a
131
- * wrong answer: a component that walks the tree to render cannot render on a
132
- * server, and the server has no tree to walk anyway. Held here instead, set
133
- * after the first update, and `undefined` on the server, where an empty menu
134
- * is the honest output. */
122
+ * `closestInstance` walks `parentNode` and steps across a `ShadowRoot` by
123
+ * following its `host`, and the server has no `ShadowRoot` global, so
124
+ * reaching for it inside `render` throws
125
+ * `ReferenceError: Can't find variable: ShadowRoot` from inside Lit's own
126
+ * result collector. A component that walks the tree to render cannot render
127
+ * on a server, and the server has no tree to walk anyway. Set after the first
128
+ * update, and `undefined` on the server, where an empty menu is the honest
129
+ * output. */
135
130
  #playlist;
136
131
  /** The playlist this menu belongs to, found upward through the slots. */
137
132
  get playlist() {
@@ -154,10 +149,8 @@ let HelixHeadlessVideoPlaylistMenu = class HelixHeadlessVideoPlaylistMenu extend
154
149
  * **Which entry is current** is `active`, a property with no attribute, so
155
150
  * there is nothing to observe: events travel up from the playlist and this
156
151
  * element is below it, and mirroring `active` to a `data-` name is ruled out
157
- * on its own merits, `active` being a payload rather than a boolean fact.
158
- * Mirroring it was written and reverted here: it put `data-active` onto every
159
- * host, which `tree-root.ssr.spec.ts` caught, and the rule it broke was the
160
- * one that stops a copied host coming back frozen.
152
+ * on its own merits, `active` being a payload rather than a boolean fact. A
153
+ * `data-active` on every host is what `tree-root.ssr.spec.ts` fails on.
161
154
  *
162
155
  * So it is re-read at the moment it is looked at. `helix-before-open` comes from the
163
156
  * menu in this element's own shadow root, which is the one direction events
@@ -204,16 +197,14 @@ let HelixHeadlessVideoPlaylistMenu = class HelixHeadlessVideoPlaylistMenu extend
204
197
  }}
205
198
  >
206
199
  ${
207
- /* The still, where there is one, for the reason the list beside the
208
- player shows one: a reader picks an episode by recognising it
209
- faster than by reading its title, and this menu opens over the
210
- picture where reading is hardest.
200
+ /* The still, where there is one: a reader picks an episode by
201
+ recognizing it faster than by reading its title, and this menu
202
+ opens over the picture where reading is hardest.
211
203
  *
212
204
  * In `start`, which is free: `Menu.Item` renders its tick *after*
213
205
  * the label as `part="mark"`, so the leading column has nothing to
214
206
  * collide with. `alt=""`, because the name is in the same row and a
215
- * still repeating it is the same thing said twice, which is what
216
- * `Video.Playlist.Item` already decided about its own thumbnail.
207
+ * still repeating it is the same thing said twice.
217
208
  *
218
209
  * Omitted rather than empty where there is no poster, an `<img>`
219
210
  * with no `src` being a broken-image glyph in every engine. */
@@ -51,18 +51,15 @@ export declare class HelixHeadlessVideoPlaylist extends HelixHeadlessVideoPlayli
51
51
  /**
52
52
  * The entries, in the order the consumer wrote them.
53
53
  *
54
- * **Found by tag and filtered on the property, never on `[value]`.** The
55
- * prefilter used to be an attribute selector, which is redundant beside the
56
- * tag match and is the half that broke: React assigns a matching property
57
- * rather than an attribute, so a playlist written in JSX carried no `value`
58
- * attribute anywhere and `querySelectorAll('[value]')` returned nothing. Every
59
- * entry vanished from the list, the active one included, and the component
60
- * threw no error because an empty playlist is a legal playlist.
54
+ * **Found by tag and filtered on the property, never on `[value]`.** React
55
+ * assigns a matching property rather than an attribute, so a playlist written
56
+ * in JSX carries no `value` attribute anywhere and `querySelectorAll('[value]')`
57
+ * returns nothing: every entry vanishes from the list, the active one
58
+ * included, and nothing throws, an empty playlist being a legal playlist.
61
59
  *
62
- * Reading `one.value` answers the same question and answers it the same way
63
- * whether the consumer wrote markup or set a property, which is the only form
64
- * that works for both. Found by rendering the React twin of this family's
65
- * examples beside the markup ones.
60
+ * Reading `one.value` answers the same question the same way whether the
61
+ * consumer wrote markup or set a property, which is the only form that works
62
+ * for both.
66
63
  */
67
64
  private get items();
68
65
  /**
@@ -80,6 +77,14 @@ export declare class HelixHeadlessVideoPlaylist extends HelixHeadlessVideoPlayli
80
77
  * shows its start control and waits.
81
78
  */
82
79
  private chased;
80
+ /**
81
+ * The player, whichever tag the consumer slotted.
82
+ *
83
+ * Asked of the slot rather than matched by tag name: the headless tier's
84
+ * player is `helix-headless-video` and the styled tier's is `helix-video`, and
85
+ * a consumer bringing a third under either name should still be driven. What
86
+ * is needed of it is `src`, which is the whole of the contract.
87
+ */
83
88
  private get player();
84
89
  /** Moves by one, and does nothing at either end. */
85
90
  private step;
@@ -56,14 +56,6 @@ let HelixHeadlessVideoPlaylist = class HelixHeadlessVideoPlaylist extends MixinC
56
56
  * Accessible name for the list, which usually has no visible heading.
57
57
  */
58
58
  this.label = 'Playlist';
59
- /*
60
- * The player, whichever tag the consumer slotted.
61
- *
62
- * Asked of the slot rather than matched by tag name: the headless tier's
63
- * player is `helix-headless-video` and the styled tier's is `helix-video`, and a
64
- * consumer bringing a third under either name should still be driven. What is
65
- * needed of it is `src`, which is the whole of the contract.
66
- */
67
59
  /**
68
60
  * Whether the entry changed because somebody moved through the playlist.
69
61
  *
@@ -83,12 +75,11 @@ let HelixHeadlessVideoPlaylist = class HelixHeadlessVideoPlaylist extends MixinC
83
75
  /* Stopped and not relayed. The entry says it was chosen, this element says
84
76
  what is playing, and a consumer hearing both would hear one press twice
85
77
  under two names.
86
- *
87
- * `stopImmediatePropagation`, not `stopPropagation`. The consumer's listener
88
- * is on this same element, and stopping propagation only keeps an event off
89
- * the *next* node: every listener already bound here still runs, so the
90
- * entry's selection reached them anyway. Command carries the longer note,
91
- * and the spec below is what caught this one. */
78
+
79
+ `stopImmediatePropagation`, not `stopPropagation`. The consumer's listener
80
+ is on this same element, and stopping propagation only keeps an event off
81
+ the *next* node: every listener already bound here still runs, so the
82
+ entry's selection reaches them anyway. Command carries the longer note. */
92
83
  event.stopImmediatePropagation();
93
84
  this.chased = true;
94
85
  this.requestActive(event.detail.value);
@@ -109,24 +100,29 @@ let HelixHeadlessVideoPlaylist = class HelixHeadlessVideoPlaylist extends MixinC
109
100
  /**
110
101
  * The entries, in the order the consumer wrote them.
111
102
  *
112
- * **Found by tag and filtered on the property, never on `[value]`.** The
113
- * prefilter used to be an attribute selector, which is redundant beside the
114
- * tag match and is the half that broke: React assigns a matching property
115
- * rather than an attribute, so a playlist written in JSX carried no `value`
116
- * attribute anywhere and `querySelectorAll('[value]')` returned nothing. Every
117
- * entry vanished from the list, the active one included, and the component
118
- * threw no error because an empty playlist is a legal playlist.
103
+ * **Found by tag and filtered on the property, never on `[value]`.** React
104
+ * assigns a matching property rather than an attribute, so a playlist written
105
+ * in JSX carries no `value` attribute anywhere and `querySelectorAll('[value]')`
106
+ * returns nothing: every entry vanishes from the list, the active one
107
+ * included, and nothing throws, an empty playlist being a legal playlist.
119
108
  *
120
- * Reading `one.value` answers the same question and answers it the same way
121
- * whether the consumer wrote markup or set a property, which is the only form
122
- * that works for both. Found by rendering the React twin of this family's
123
- * examples beside the markup ones.
109
+ * Reading `one.value` answers the same question the same way whether the
110
+ * consumer wrote markup or set a property, which is the only form that works
111
+ * for both.
124
112
  */
125
113
  get items() {
126
114
  return [
127
115
  ...this.querySelectorAll('helix-video-playlist-item, helix-headless-video-playlist-item'),
128
116
  ].filter((one) => one.value !== '');
129
117
  }
118
+ /**
119
+ * The player, whichever tag the consumer slotted.
120
+ *
121
+ * Asked of the slot rather than matched by tag name: the headless tier's
122
+ * player is `helix-headless-video` and the styled tier's is `helix-video`, and
123
+ * a consumer bringing a third under either name should still be driven. What
124
+ * is needed of it is `src`, which is the whole of the contract.
125
+ */
130
126
  get player() {
131
127
  const slot = this.renderRoot?.querySelector('slot[name="player"]');
132
128
  const first = slot?.assignedElements()[0];
@@ -18,13 +18,11 @@ import { type PropertyValues, type TemplateResult } from 'lit';
18
18
  * emits it, React re-emits it as a child rather than applying it, and it is one
19
19
  * node whatever the row count.
20
20
  *
21
- * **The same shape the charts already use**, `for="<id>"` pointing at markup the
22
- * consumer wrote, and the difference is what is at the other end. A chart names
23
- * a `<table>`, which is the accessible version of the picture and which a reader
24
- * with no JavaScript still gets. Ten thousand rows cannot be that: the table
25
- * would be the cost this exists to avoid. So the accessible version here is the
26
- * rendered window plus `aria-setsize` and `aria-posinset`, which is what says
27
- * "four thousand of ten thousand" rather than "four of twenty".
21
+ * **The accessible version is not a `<table>`**, the way it is for the charts
22
+ * that share this `for="<id>"` shape: ten thousand rows in one is the cost this
23
+ * exists to avoid. It is the rendered window plus `aria-setsize` and
24
+ * `aria-posinset`, which is what says "four thousand of ten thousand" rather
25
+ * than "four of twenty".
28
26
  *
29
27
  * **Rows are light DOM, deliberately.** They are cloned from the consumer's
30
28
  * template and appended to the host, so a document rule reaches them, the base
@@ -105,11 +103,9 @@ export declare class HelixHeadlessVirtualList extends HelixElement {
105
103
  /**
106
104
  * Puts the windowed rows into the light DOM, and takes the rest out.
107
105
  *
108
- * Cleared and re-cloned rather than reconciled, which is the simple thing and
109
- * is measured rather than assumed to be enough: a window is twenty-odd rows
110
- * and cloning that many is well under a frame. A reconciler here would be
111
- * carrying keys and identity for a set nothing selects into, and is the kind
112
- * of optimisation to add against a measurement rather than ahead of one.
106
+ * Cleared and re-cloned rather than reconciled: a window is twenty-odd rows
107
+ * and cloning that many is well under a frame. A reconciler here would carry
108
+ * keys and identity for a set nothing selects into.
113
109
  */
114
110
  private place;
115
111
  protected render(): TemplateResult;
@@ -25,13 +25,11 @@ import { property, state } from 'lit/decorators.js';
25
25
  * emits it, React re-emits it as a child rather than applying it, and it is one
26
26
  * node whatever the row count.
27
27
  *
28
- * **The same shape the charts already use**, `for="<id>"` pointing at markup the
29
- * consumer wrote, and the difference is what is at the other end. A chart names
30
- * a `<table>`, which is the accessible version of the picture and which a reader
31
- * with no JavaScript still gets. Ten thousand rows cannot be that: the table
32
- * would be the cost this exists to avoid. So the accessible version here is the
33
- * rendered window plus `aria-setsize` and `aria-posinset`, which is what says
34
- * "four thousand of ten thousand" rather than "four of twenty".
28
+ * **The accessible version is not a `<table>`**, the way it is for the charts
29
+ * that share this `for="<id>"` shape: ten thousand rows in one is the cost this
30
+ * exists to avoid. It is the rendered window plus `aria-setsize` and
31
+ * `aria-posinset`, which is what says "four thousand of ten thousand" rather
32
+ * than "four of twenty".
35
33
  *
36
34
  * **Rows are light DOM, deliberately.** They are cloned from the consumer's
37
35
  * template and appended to the host, so a document rule reaches them, the base
@@ -98,10 +96,9 @@ let HelixHeadlessVirtualList = class HelixHeadlessVirtualList extends HelixEleme
98
96
  * Empty on a server, which has nothing to read.
99
97
  */
100
98
  this.rows = [];
101
- /* No `overscan` property. The controller's four is a statement about a frame
102
- of fast scrolling at a 32 pixel row, which is a fact about the platform
103
- rather than a preference, and a knob here would be one more thing to get
104
- wrong for no case anybody has. */
99
+ /* No `overscan` property. The controller's four is a frame of fast scrolling
100
+ at a 32 pixel row, which is a fact about the platform rather than a
101
+ preference. */
105
102
  this.virtualize = new VirtualizeController(this, {
106
103
  container: () => this.renderRoot.querySelector('[part="viewport"]'),
107
104
  count: () => this.rows.length,
@@ -149,11 +146,9 @@ let HelixHeadlessVirtualList = class HelixHeadlessVirtualList extends HelixEleme
149
146
  /**
150
147
  * Puts the windowed rows into the light DOM, and takes the rest out.
151
148
  *
152
- * Cleared and re-cloned rather than reconciled, which is the simple thing and
153
- * is measured rather than assumed to be enough: a window is twenty-odd rows
154
- * and cloning that many is well under a frame. A reconciler here would be
155
- * carrying keys and identity for a set nothing selects into, and is the kind
156
- * of optimisation to add against a measurement rather than ahead of one.
149
+ * Cleared and re-cloned rather than reconciled: a window is twenty-odd rows
150
+ * and cloning that many is well under a frame. A reconciler here would carry
151
+ * keys and identity for a set nothing selects into.
157
152
  */
158
153
  place() {
159
154
  const template = this.querySelector('template');