@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.
- package/custom-elements.json +4513 -4483
- package/dist/accordion/item/accordion-item.d.ts +13 -15
- package/dist/accordion/item/accordion-item.js +15 -17
- package/dist/announcement/root/announcement-root.d.ts +7 -25
- package/dist/announcement/root/announcement-root.js +7 -20
- package/dist/app-header/root/app-header-root.d.ts +10 -17
- package/dist/app-header/root/app-header-root.js +9 -18
- package/dist/avatar/group/avatar-group.d.ts +10 -19
- package/dist/avatar/group/avatar-group.js +12 -17
- package/dist/avatar/root/avatar-root.d.ts +8 -8
- package/dist/avatar/root/avatar-root.js +19 -20
- package/dist/badge/root/badge-root.d.ts +6 -6
- package/dist/badge/root/badge-root.js +13 -13
- package/dist/bar-chart/root/bar-chart-root.d.ts +21 -29
- package/dist/bar-chart/root/bar-chart-root.js +42 -57
- package/dist/breadcrumbs/breadcrumb/breadcrumb.d.ts +12 -18
- package/dist/breadcrumbs/breadcrumb/breadcrumb.js +13 -16
- package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +9 -28
- package/dist/breadcrumbs/root/breadcrumbs-root.js +9 -28
- package/dist/button/root/button-root.d.ts +84 -94
- package/dist/button/root/button-root.js +82 -92
- package/dist/callout/root/callout-root.d.ts +4 -5
- package/dist/carousel/root/carousel-root.d.ts +59 -71
- package/dist/carousel/root/carousel-root.js +73 -101
- package/dist/chat/composer/chat-composer.d.ts +29 -33
- package/dist/chat/composer/chat-composer.js +40 -44
- package/dist/chat/message/chat-message.d.ts +25 -25
- package/dist/chat/message/chat-message.js +26 -26
- package/dist/chat/root/chat-root.d.ts +28 -41
- package/dist/chat/root/chat-root.js +27 -40
- package/dist/checkbox/root/checkbox-root.d.ts +10 -12
- package/dist/checkbox/root/checkbox-root.js +29 -35
- package/dist/checkbox-group/root/checkbox-group-root.d.ts +32 -45
- package/dist/checkbox-group/root/checkbox-group-root.js +53 -79
- package/dist/code-block/root/code-block-root.d.ts +3 -4
- package/dist/code-block/root/code-block-root.js +8 -12
- package/dist/color-input/root/color-input-root.d.ts +36 -37
- package/dist/color-input/root/color-input-root.js +29 -34
- package/dist/color-picker/color.d.ts +7 -8
- package/dist/color-picker/color.js +7 -8
- package/dist/color-picker/root/color-picker-root.d.ts +55 -57
- package/dist/color-picker/root/color-picker-root.js +60 -64
- package/dist/combobox/root/combobox-root.d.ts +53 -58
- package/dist/combobox/root/combobox-root.js +85 -94
- package/dist/command/root/command-root.d.ts +8 -8
- package/dist/command/root/command-root.js +29 -33
- package/dist/copy-button/root/copy-button-root.d.ts +21 -24
- package/dist/copy-button/root/copy-button-root.js +25 -35
- package/dist/data-table/root/data-table-root.d.ts +77 -76
- package/dist/data-table/root/data-table-root.js +95 -84
- package/dist/data-table/root/order.d.ts +2 -2
- package/dist/data-table/root/order.js +1 -3
- package/dist/date-input/root/date-input-root.d.ts +88 -93
- package/dist/date-input/root/date-input-root.js +147 -158
- package/dist/date-picker/root/date-picker-root.d.ts +75 -83
- package/dist/date-picker/root/date-picker-root.js +120 -143
- package/dist/dialog/root/dialog-root.d.ts +41 -24
- package/dist/dialog/root/dialog-root.js +47 -24
- package/dist/divider/root/divider-root.d.ts +5 -6
- package/dist/divider/root/divider-root.js +4 -5
- package/dist/donut-chart/root/donut-chart-root.d.ts +22 -25
- package/dist/donut-chart/root/donut-chart-root.js +37 -51
- package/dist/drawer/root/drawer-root.d.ts +24 -29
- package/dist/drawer/root/drawer-root.js +15 -22
- package/dist/drilldown/item/drilldown-item.d.ts +14 -14
- package/dist/drilldown/item/drilldown-item.js +24 -26
- package/dist/drilldown/root/drilldown-root.d.ts +8 -10
- package/dist/drilldown/root/drilldown-root.js +6 -7
- package/dist/element-events.generated.js +1 -1
- package/dist/file-input/root/file-input-root.d.ts +20 -24
- package/dist/file-input/root/file-input-root.js +42 -57
- package/dist/format-date/root/format-date-root.js +1 -1
- package/dist/heatmap/root/buckets.d.ts +8 -8
- package/dist/heatmap/root/buckets.js +8 -8
- package/dist/heatmap/root/heatmap-root.d.ts +57 -63
- package/dist/heatmap/root/heatmap-root.js +72 -83
- package/dist/icon/root/icon-root.d.ts +4 -4
- package/dist/icon/root/icon-root.js +9 -9
- package/dist/icon-button/root/icon-button-root.d.ts +4 -6
- package/dist/icon-button/root/icon-button-root.js +4 -6
- package/dist/image/root/image-root.d.ts +49 -59
- package/dist/image/root/image-root.js +55 -65
- package/dist/index.d.ts +5 -5
- package/dist/index.js +5 -5
- package/dist/input/root/input-root.d.ts +61 -85
- package/dist/input/root/input-root.js +79 -106
- package/dist/kbd/root/kbd-root.d.ts +8 -7
- package/dist/kbd/root/kbd-root.js +71 -11
- package/dist/legend/root/legend-root.d.ts +1 -1
- package/dist/legend/root/legend-root.js +4 -5
- package/dist/line-chart/root/line-chart-root.d.ts +26 -30
- package/dist/line-chart/root/line-chart-root.js +10 -10
- package/dist/list/item/list-item.d.ts +14 -18
- package/dist/list/item/list-item.js +18 -22
- package/dist/list/root/list-root.d.ts +4 -4
- package/dist/list/root/list-root.js +3 -3
- package/dist/listbox/root/listbox-root.d.ts +31 -58
- package/dist/listbox/root/listbox-root.js +66 -109
- package/dist/megamenu/root/megamenu-root.d.ts +34 -35
- package/dist/megamenu/root/megamenu-root.js +53 -58
- package/dist/menu/item/menu-item.d.ts +39 -53
- package/dist/menu/item/menu-item.js +50 -64
- package/dist/menu/root/menu-root.d.ts +30 -40
- package/dist/menu/root/menu-root.js +49 -82
- package/dist/meter/root/meter-root.d.ts +49 -53
- package/dist/meter/root/meter-root.js +22 -27
- package/dist/navigation/root/navigation-root.js +11 -19
- package/dist/notifications/notification/notification.d.ts +16 -22
- package/dist/notifications/notification/notification.js +21 -27
- package/dist/notifications/root/notifications-root.d.ts +31 -39
- package/dist/notifications/root/notifications-root.js +41 -52
- package/dist/number-input/root/number-input-root.d.ts +31 -33
- package/dist/number-input/root/number-input-root.js +37 -39
- package/dist/option/root/option-root.d.ts +73 -74
- package/dist/option/root/option-root.js +62 -64
- package/dist/outline/root/outline-root.d.ts +38 -44
- package/dist/outline/root/outline-root.js +66 -82
- package/dist/pagination/root/pagination-root.d.ts +87 -92
- package/dist/pagination/root/pagination-root.js +116 -123
- package/dist/pagination/size/pagination-size.d.ts +31 -50
- package/dist/pagination/size/pagination-size.js +35 -55
- package/dist/pagination/summary/pagination-summary.d.ts +12 -12
- package/dist/pagination/summary/pagination-summary.js +18 -18
- package/dist/pin-input/root/pin-input-root.d.ts +53 -70
- package/dist/pin-input/root/pin-input-root.js +74 -94
- package/dist/popover/root/popover-root.d.ts +15 -20
- package/dist/popover/root/popover-root.js +19 -36
- package/dist/progress/root/progress-root.d.ts +12 -14
- package/dist/progress/root/progress-root.js +22 -25
- package/dist/qr-code/root/qr-code-root.d.ts +11 -11
- package/dist/qr-code/root/qr-code-root.js +12 -14
- package/dist/radio/group/radio-group.js +19 -26
- package/dist/radio/root/radio-root.d.ts +12 -13
- package/dist/radio/root/radio-root.js +12 -13
- package/dist/rating/root/rating-root.d.ts +25 -30
- package/dist/rating/root/rating-root.js +43 -50
- package/dist/scroll-area/root/scroll-area-root.d.ts +11 -14
- package/dist/scroll-area/root/scroll-area-root.js +39 -33
- package/dist/select/root/select-root.d.ts +7 -12
- package/dist/select/root/select-root.js +40 -55
- package/dist/slider/root/slider-root.d.ts +53 -60
- package/dist/slider/root/slider-root.js +74 -85
- package/dist/sparkline/root/sparkline-root.d.ts +43 -47
- package/dist/sparkline/root/sparkline-root.js +23 -32
- package/dist/speed-dial/item/speed-dial-item.d.ts +6 -6
- package/dist/speed-dial/item/speed-dial-item.js +9 -9
- package/dist/speed-dial/root/speed-dial-root.d.ts +21 -25
- package/dist/speed-dial/root/speed-dial-root.js +32 -40
- package/dist/splitter/root/splitter-root.d.ts +98 -111
- package/dist/splitter/root/splitter-root.js +96 -123
- package/dist/stat/root/stat-root.d.ts +2 -7
- package/dist/stat/root/stat-root.js +0 -5
- package/dist/steps/step/step.d.ts +19 -24
- package/dist/steps/step/step.js +27 -32
- package/dist/switch/root/switch-root.js +2 -2
- package/dist/table/column/table-column.d.ts +54 -60
- package/dist/table/column/table-column.js +95 -68
- package/dist/table/root/table-root.d.ts +5 -6
- package/dist/table/root/table-root.js +7 -10
- package/dist/tabs/panel/tab-panel.d.ts +21 -25
- package/dist/tabs/panel/tab-panel.js +25 -29
- package/dist/tabs/root/tabs-root.d.ts +25 -34
- package/dist/tabs/root/tabs-root.js +22 -28
- package/dist/tabs/tab/tab.d.ts +12 -12
- package/dist/tabs/tab/tab.js +19 -20
- package/dist/textarea/root/textarea-root.d.ts +36 -36
- package/dist/textarea/root/textarea-root.js +43 -47
- package/dist/time-input/root/time-input-root.d.ts +58 -68
- package/dist/time-input/root/time-input-root.js +62 -77
- package/dist/time-picker/root/time-picker-root.d.ts +73 -79
- package/dist/time-picker/root/time-picker-root.js +72 -84
- package/dist/timeline/item/timeline-item.d.ts +8 -11
- package/dist/timeline/item/timeline-item.js +8 -11
- package/dist/timeline/root/timeline-root.d.ts +5 -7
- package/dist/timeline/root/timeline-root.js +5 -7
- package/dist/toast/item/toast-item.d.ts +9 -27
- package/dist/toast/item/toast-item.js +19 -41
- package/dist/toast/root/toast-root.d.ts +10 -14
- package/dist/toast/root/toast-root.js +4 -5
- package/dist/toggle/group/toggle-group.d.ts +6 -15
- package/dist/toggle/group/toggle-group.js +21 -36
- package/dist/toggle/root/toggle-root.d.ts +26 -27
- package/dist/toggle/root/toggle-root.js +30 -31
- package/dist/toolbar/root/toolbar-root.d.ts +7 -10
- package/dist/toolbar/root/toolbar-root.js +10 -14
- package/dist/tooltip/root/tooltip-root.d.ts +52 -59
- package/dist/tooltip/root/tooltip-root.js +98 -93
- package/dist/tour/root/tour-root.d.ts +19 -23
- package/dist/tour/root/tour-root.js +31 -41
- package/dist/tour/stop/tour-stop.d.ts +14 -15
- package/dist/tour/stop/tour-stop.js +31 -34
- package/dist/tree/item/tree-item.d.ts +30 -35
- package/dist/tree/item/tree-item.js +43 -55
- package/dist/tree/root/tree-root.d.ts +7 -10
- package/dist/tree/root/tree-root.js +33 -42
- package/dist/trend/root/trend-root.d.ts +3 -5
- package/dist/trend/root/trend-root.js +5 -9
- package/dist/video/root/video-root.d.ts +100 -124
- package/dist/video/root/video-root.js +142 -176
- package/dist/video-playlist/item/video-playlist-item.d.ts +16 -16
- package/dist/video-playlist/item/video-playlist-item.js +24 -24
- package/dist/video-playlist/menu/video-playlist-menu.d.ts +5 -8
- package/dist/video-playlist/menu/video-playlist-menu.js +20 -29
- package/dist/video-playlist/root/video-playlist-root.d.ts +16 -11
- package/dist/video-playlist/root/video-playlist-root.js +21 -25
- package/dist/virtual-list/root/virtual-list-root.d.ts +8 -12
- package/dist/virtual-list/root/virtual-list-root.js +11 -16
- package/jsx.d.ts +9797 -12561
- package/package.json +6 -6
- 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
|
-
*
|
|
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.
|
|
59
|
+
this.current = false;
|
|
56
60
|
/**
|
|
57
|
-
*
|
|
61
|
+
* Whether the entry can be chosen.
|
|
58
62
|
*/
|
|
59
|
-
this.
|
|
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
|
-
*
|
|
75
|
+
* The file this entry plays.
|
|
72
76
|
*/
|
|
73
|
-
this.
|
|
77
|
+
this.src = '';
|
|
74
78
|
/**
|
|
75
|
-
*
|
|
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.
|
|
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`
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
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, "
|
|
145
|
+
property({ attribute: false })
|
|
146
|
+
], HelixHeadlessVideoPlaylistItem.prototype, "current", void 0);
|
|
147
147
|
__decorate([
|
|
148
|
-
property()
|
|
149
|
-
], HelixHeadlessVideoPlaylistItem.prototype, "
|
|
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(
|
|
155
|
-
], HelixHeadlessVideoPlaylistItem.prototype, "
|
|
154
|
+
property()
|
|
155
|
+
], HelixHeadlessVideoPlaylistItem.prototype, "src", void 0);
|
|
156
156
|
__decorate([
|
|
157
|
-
property(
|
|
158
|
-
], HelixHeadlessVideoPlaylistItem.prototype, "
|
|
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
|
|
35
|
-
*
|
|
36
|
-
*
|
|
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
|
-
*
|
|
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
|
|
46
|
-
*
|
|
47
|
-
*
|
|
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
|
|
99
|
-
* the usual way to say "render again", and here it
|
|
100
|
-
* which the linter is right to call out.
|
|
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
|
-
* `
|
|
125
|
-
* `
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
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
|
-
*
|
|
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
|
|
208
|
-
|
|
209
|
-
|
|
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
|
|
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]`.**
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
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
|
|
63
|
-
*
|
|
64
|
-
*
|
|
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
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
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]`.**
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
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
|
|
121
|
-
*
|
|
122
|
-
*
|
|
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
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
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
|
|
109
|
-
*
|
|
110
|
-
* and
|
|
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
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
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
|
|
102
|
-
|
|
103
|
-
|
|
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
|
|
153
|
-
*
|
|
154
|
-
* and
|
|
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');
|