@fusion.dev/helix-headless 0.104.1 → 0.106.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.
- package/custom-elements.json +10386 -3813
- package/dist/accordion/item/accordion-item.d.ts +17 -16
- package/dist/accordion/root/accordion-root.d.ts +13 -17
- package/dist/announcement/root/announcement-root.d.ts +24 -31
- package/dist/app-header/root/app-header-root.d.ts +14 -14
- package/dist/area-chart/root/area-chart-root.d.ts +29 -48
- package/dist/avatar/group/avatar-group.d.ts +6 -8
- package/dist/avatar/root/avatar-root.d.ts +11 -11
- package/dist/badge/root/badge-root.d.ts +14 -15
- package/dist/bar-chart/root/bar-chart-root.d.ts +40 -44
- package/dist/blockquote/root/blockquote-root.d.ts +5 -7
- package/dist/breadcrumbs/breadcrumb/breadcrumb.d.ts +25 -33
- package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +12 -11
- package/dist/button/root/button-root.d.ts +16 -17
- package/dist/button-group/root/button-group-root.d.ts +9 -10
- package/dist/callout/root/callout-root.d.ts +10 -15
- package/dist/canvas/edge/canvas-edge.d.ts +21 -21
- package/dist/canvas/node/canvas-node.d.ts +43 -45
- package/dist/canvas/root/canvas-root.d.ts +100 -99
- package/dist/card/root/card-root.d.ts +10 -12
- package/dist/carousel/root/carousel-root.d.ts +32 -33
- package/dist/chat/composer/chat-composer.d.ts +24 -26
- package/dist/chat/message/chat-message.d.ts +30 -33
- package/dist/chat/root/chat-root.d.ts +63 -80
- package/dist/checkbox/root/checkbox-root.d.ts +30 -32
- package/dist/checkbox-group/root/checkbox-group-root.d.ts +25 -25
- package/dist/code/root/code-root.d.ts +6 -10
- package/dist/code-block/root/code-block-root.d.ts +35 -48
- package/dist/color-input/root/color-input-root.d.ts +62 -56
- package/dist/color-input/root/color-input-root.js +3 -0
- package/dist/color-picker/root/color-picker-root.d.ts +61 -49
- package/dist/color-picker/root/color-picker-root.js +4 -0
- package/dist/combobox/root/combobox-root.d.ts +52 -53
- package/dist/command/root/command-root.d.ts +40 -40
- package/dist/command/root/command-root.js +1 -0
- package/dist/copy-button/root/copy-button-root.d.ts +24 -26
- package/dist/data-table/root/data-table-root.d.ts +106 -107
- package/dist/date-input/root/date-input-root.d.ts +54 -53
- package/dist/date-picker/root/date-picker-root.d.ts +25 -21
- package/dist/description-list/item/description-list-item.d.ts +7 -7
- package/dist/description-list/root/description-list-root.d.ts +10 -15
- package/dist/dialog/root/dialog-root.d.ts +22 -19
- package/dist/divider/root/divider-root.d.ts +12 -13
- package/dist/donut-chart/root/donut-chart-root.d.ts +19 -20
- package/dist/drawer/root/drawer-root.d.ts +19 -18
- package/dist/drilldown/item/drilldown-item.d.ts +28 -28
- package/dist/drilldown/root/drilldown-root.d.ts +22 -28
- package/dist/element-events.generated.js +19 -1
- package/dist/empty/root/empty-root.d.ts +16 -19
- package/dist/file-input/root/file-input-root.d.ts +32 -32
- package/dist/filter-input/chip/filter-chip.d.ts +36 -39
- package/dist/filter-input/field/filter-field.d.ts +25 -31
- package/dist/filter-input/menu/filter-menu.d.ts +50 -47
- package/dist/filter-input/operator/filter-operator.d.ts +15 -20
- package/dist/filter-input/root/filter-input-root.d.ts +80 -98
- package/dist/format-date/root/format-date-root.d.ts +19 -27
- package/dist/heatmap/root/heatmap-root.d.ts +40 -41
- package/dist/icon/root/icon-root.d.ts +21 -23
- package/dist/icon-button/root/icon-button-root.d.ts +12 -14
- package/dist/image/root/image-root.d.ts +30 -30
- package/dist/input/root/input-root.d.ts +36 -35
- package/dist/kbd/root/kbd-root.d.ts +13 -15
- package/dist/legend/root/legend-root.d.ts +18 -16
- package/dist/lightbox/item/lightbox-item.d.ts +13 -15
- package/dist/lightbox/root/lightbox-root.d.ts +40 -41
- package/dist/line-chart/root/line-chart-root.d.ts +20 -29
- package/dist/list/item/list-item.d.ts +17 -22
- package/dist/list/root/list-root.d.ts +6 -7
- package/dist/listbox/root/listbox-root.d.ts +42 -41
- package/dist/loader/root/loader-root.d.ts +16 -20
- package/dist/map/area/map-area.d.ts +48 -0
- package/dist/map/area/map-area.js +40 -0
- package/dist/map/buildings/map-buildings.d.ts +45 -0
- package/dist/map/buildings/map-buildings.js +37 -0
- package/dist/map/contours/map-contours.d.ts +61 -0
- package/dist/map/contours/map-contours.js +54 -0
- package/dist/map/index.d.ts +14 -0
- package/dist/map/index.js +10 -0
- package/dist/map/landcover/map-landcover.d.ts +47 -0
- package/dist/map/landcover/map-landcover.js +37 -0
- package/dist/map/marker/map-marker.d.ts +120 -0
- package/dist/map/marker/map-marker.js +109 -0
- package/dist/map/points/map-points.d.ts +139 -0
- package/dist/map/points/map-points.js +161 -0
- package/dist/map/position/map-position.d.ts +70 -0
- package/dist/map/position/map-position.js +89 -0
- package/dist/map/raster/map-raster.d.ts +84 -0
- package/dist/map/raster/map-raster.js +96 -0
- package/dist/map/root/map-root.d.ts +269 -52
- package/dist/map/root/map-root.js +473 -5
- package/dist/map/route/map-route.d.ts +73 -0
- package/dist/map/route/map-route.js +52 -0
- package/dist/map/terrain/map-terrain.d.ts +68 -0
- package/dist/map/terrain/map-terrain.js +58 -0
- package/dist/megamenu/root/megamenu-root.d.ts +27 -25
- package/dist/menu/item/menu-item.d.ts +30 -31
- package/dist/menu/root/menu-root.d.ts +25 -29
- package/dist/meter/root/meter-root.d.ts +22 -21
- package/dist/navigation/root/navigation-root.d.ts +13 -16
- package/dist/notifications/group/notification-group.d.ts +27 -28
- package/dist/notifications/notification/notification.d.ts +35 -42
- package/dist/notifications/root/notifications-root.d.ts +22 -24
- package/dist/number-input/root/number-input-root.d.ts +46 -50
- package/dist/object-inspector/root/object-inspector-root.d.ts +46 -58
- package/dist/option/group/option-group.d.ts +11 -11
- package/dist/option/root/option-root.d.ts +28 -33
- package/dist/outline/root/outline-root.d.ts +18 -17
- package/dist/pagination/root/pagination-root.d.ts +37 -39
- package/dist/pagination/size/pagination-size.d.ts +37 -43
- package/dist/pagination/summary/pagination-summary.d.ts +12 -14
- package/dist/pin-input/root/pin-input-root.d.ts +32 -38
- package/dist/popover/root/popover-root.d.ts +16 -21
- package/dist/progress/root/progress-root.d.ts +16 -14
- package/dist/qr-code/root/qr-code-root.d.ts +22 -25
- package/dist/quote/root/quote-root.d.ts +5 -6
- package/dist/radio/group/radio-group.d.ts +26 -28
- package/dist/radio/root/radio-root.d.ts +24 -28
- package/dist/rating/root/rating-root.d.ts +27 -30
- package/dist/scatter-chart/root/scatter-chart-root.d.ts +43 -55
- package/dist/scroll-area/root/scroll-area-root.d.ts +15 -21
- package/dist/select/root/select-root.d.ts +41 -44
- package/dist/skeleton/root/skeleton-root.d.ts +7 -8
- package/dist/skip-link/root/skip-link-root.d.ts +21 -28
- package/dist/slider/root/slider-root.d.ts +36 -39
- package/dist/sparkline/root/sparkline-root.d.ts +22 -28
- package/dist/speed-dial/item/speed-dial-item.d.ts +21 -21
- package/dist/speed-dial/root/speed-dial-root.d.ts +25 -27
- package/dist/splitter/root/splitter-root.d.ts +37 -41
- package/dist/stat/group/stat-group.d.ts +4 -4
- package/dist/stat/root/stat-root.d.ts +8 -9
- package/dist/steps/root/steps-root.d.ts +11 -14
- package/dist/steps/step/step.d.ts +22 -29
- package/dist/switch/root/switch-root.d.ts +20 -24
- package/dist/table/cell/table-cell.d.ts +18 -8
- package/dist/table/cell/table-cell.js +5 -1
- package/dist/table/column/table-column.d.ts +62 -55
- package/dist/table/root/table-root.d.ts +16 -17
- package/dist/table/row/table-row.d.ts +3 -3
- package/dist/tabs/panel/tab-panel.d.ts +3 -3
- package/dist/tabs/root/tabs-root.d.ts +19 -17
- package/dist/tabs/tab/tab.d.ts +6 -6
- package/dist/tag/root/tag-root.d.ts +11 -12
- package/dist/textarea/root/textarea-root.d.ts +29 -32
- package/dist/time-input/root/time-input-root.d.ts +70 -69
- package/dist/time-picker/root/time-picker-root.d.ts +58 -66
- package/dist/timeline/item/timeline-item.d.ts +18 -24
- package/dist/timeline/root/timeline-root.d.ts +13 -21
- package/dist/toast/item/toast-item.d.ts +21 -22
- package/dist/toast/root/toast-root.d.ts +18 -23
- package/dist/toggle/group/toggle-group.d.ts +23 -25
- package/dist/toggle/root/toggle-root.d.ts +8 -8
- package/dist/toolbar/root/toolbar-root.d.ts +7 -10
- package/dist/tooltip/root/tooltip-root.d.ts +41 -47
- package/dist/tour/root/tour-root.d.ts +24 -26
- package/dist/tour/stop/tour-stop.d.ts +39 -48
- package/dist/tree/item/tree-item.d.ts +23 -25
- package/dist/tree/root/tree-root.d.ts +13 -12
- package/dist/trend/root/trend-root.d.ts +18 -19
- package/dist/video/root/video-root.d.ts +108 -101
- package/dist/video-playlist/item/video-playlist-item.d.ts +23 -28
- package/dist/video-playlist/menu/video-playlist-menu.d.ts +17 -21
- package/dist/video-playlist/root/video-playlist-root.d.ts +21 -25
- package/dist/virtual-list/root/virtual-list-root.d.ts +27 -26
- package/package.json +5 -5
- package/types/jsx.d.ts +14011 -11983
- package/types/svelte.d.ts +10 -0
- package/types/vue.d.ts +2143 -1497
|
@@ -2,34 +2,32 @@ import { HelixElement } from '@fusion.dev/helix-core';
|
|
|
2
2
|
import { nothing, type PropertyValues, type TemplateResult } from 'lit';
|
|
3
3
|
import '../../menu/index.js';
|
|
4
4
|
/**
|
|
5
|
-
* @summary
|
|
6
|
-
* browser's.
|
|
5
|
+
* @summary A video player with controls drawn by Helix.
|
|
7
6
|
*
|
|
8
7
|
* @description
|
|
9
|
-
*
|
|
10
|
-
* in Picture, AirPlay and
|
|
11
|
-
*
|
|
8
|
+
* The picture is a native `<video>`, so decoding, buffering, captions, Picture
|
|
9
|
+
* in Picture, AirPlay, and codecs come from the platform. The component
|
|
10
|
+
* replaces the control bar, because the native bar cannot be styled.
|
|
12
11
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
12
|
+
* The scrubber and the volume are `<input type="range">` elements, so arrow
|
|
13
|
+
* keys, Home and End, touch targets, and screen reader announcements work as
|
|
14
|
+
* they do natively.
|
|
16
15
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
16
|
+
* When you set `controls`, the browser's control bar is used, the Helix bar is
|
|
17
|
+
* not drawn, and the keys below are not bound, so a key press does not seek
|
|
18
|
+
* twice.
|
|
20
19
|
*
|
|
21
|
-
* The keys
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
20
|
+
* The keys match other players, and they are bound on the element only:
|
|
21
|
+
* - Space and `k` play or pause.
|
|
22
|
+
* - The arrow keys seek and change the volume.
|
|
23
|
+
* - `m` mutes.
|
|
24
|
+
* - `f` toggles fullscreen.
|
|
25
25
|
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* because the consumer's light DOM is theirs, and rebuilt whenever the slot
|
|
32
|
-
* changes.
|
|
26
|
+
* `<source>` and `<track>` children are copied into the video. A media element
|
|
27
|
+
* selects resources from its own child nodes, and a slot is one node, so
|
|
28
|
+
* slotted sources would give the video no text tracks, no current source, and a
|
|
29
|
+
* `readyState` of zero, and it would not play. They are copied so your light
|
|
30
|
+
* DOM stays intact, and are copied again whenever the slot changes.
|
|
33
31
|
*
|
|
34
32
|
* @since 0.1.0
|
|
35
33
|
* @status stable
|
|
@@ -38,71 +36,69 @@ import '../../menu/index.js';
|
|
|
38
36
|
* @documentation https://fusion.dev/helix/components/video
|
|
39
37
|
*
|
|
40
38
|
* @slot - `<source>` and `<track>` elements, which are copied into the video.
|
|
41
|
-
* @slot controls -
|
|
42
|
-
* @slot header -
|
|
39
|
+
* @slot controls - Extra controls, added to the control bar before the fullscreen button.
|
|
40
|
+
* @slot header - Content over the top left of the picture, such as a heading and a back button.
|
|
43
41
|
* @slot poster - Shown over the video until it starts.
|
|
44
42
|
*
|
|
45
|
-
* @event {Event} ended - Relayed,
|
|
46
|
-
* @event {HelixNextEvent} helix-next -
|
|
47
|
-
* @event {HelixPreviousEvent} helix-previous -
|
|
48
|
-
* @event {Event} pause - Relayed
|
|
49
|
-
* @event {Event} play - Relayed
|
|
43
|
+
* @event {Event} ended - The video reached its end. Relayed from the inner video, since the native event does not cross the shadow boundary.
|
|
44
|
+
* @event {HelixNextEvent} helix-next - The next video was requested. Load it in response.
|
|
45
|
+
* @event {HelixPreviousEvent} helix-previous - The previous video was requested. Load it in response.
|
|
46
|
+
* @event {Event} pause - Playback paused. Relayed from the inner video.
|
|
47
|
+
* @event {Event} play - Playback started. Relayed from the inner video.
|
|
50
48
|
*
|
|
51
|
-
* @csspart captions -
|
|
52
|
-
* @csspart captions-menu - The
|
|
49
|
+
* @csspart captions - The button that turns captions on and off.
|
|
50
|
+
* @csspart captions-menu - The menu of caption languages, when the video has more than one track.
|
|
53
51
|
* @csspart captions-menu-back - The control that returns from a submenu.
|
|
54
52
|
* @csspart captions-menu-back-mark - The glyph on the back control of a submenu.
|
|
55
|
-
* @csspart captions-menu-empty -
|
|
53
|
+
* @csspart captions-menu-empty - The text shown when the menu has no items.
|
|
56
54
|
* @csspart captions-menu-header - The bar above a submenu, holding the way back and its name.
|
|
57
|
-
* @csspart captions-menu-live - The inner menu's `live
|
|
58
|
-
* @csspart captions-menu-loading -
|
|
55
|
+
* @csspart captions-menu-live - The inner menu's `live` part, a live region that repeats the empty and loading text for screen readers.
|
|
56
|
+
* @csspart captions-menu-loading - The text shown while the items are loading.
|
|
59
57
|
* @csspart captions-menu-surface - The floating panel the menu is drawn on.
|
|
60
58
|
* @csspart captions-menu-title - The name of the submenu that is showing.
|
|
61
|
-
* @csspart controls - The bar along the bottom.
|
|
62
|
-
* @csspart cue - The caption on screen
|
|
63
|
-
* @csspart download -
|
|
64
|
-
* @csspart entry - One row in a menu
|
|
59
|
+
* @csspart controls - The control bar along the bottom.
|
|
60
|
+
* @csspart cue - The caption currently on screen, drawn by this element.
|
|
61
|
+
* @csspart download - The button that downloads the file, when `extra-controls` includes it.
|
|
62
|
+
* @csspart entry - One row in a menu that the player opens.
|
|
65
63
|
* @csspart entry-item - The row, which is an `<a>` where `href` is set.
|
|
66
|
-
* @csspart entry-mark - The trailing mark: a
|
|
67
|
-
* @csspart entry-start - The leading column
|
|
68
|
-
* @csspart failure -
|
|
69
|
-
* @csspart forward - The
|
|
70
|
-
* @csspart fullscreen - The
|
|
71
|
-
* @csspart header - The region top left
|
|
72
|
-
* @csspart live -
|
|
73
|
-
* @csspart loading -
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
* @csspart
|
|
79
|
-
* @csspart
|
|
80
|
-
* @csspart next - Asks for the next item, where it was asked for.
|
|
81
|
-
* @csspart overflow - The menu holding the controls kept off the bar.
|
|
64
|
+
* @csspart entry-mark - The trailing mark: a check mark when the row is checked, or a caret when it opens a submenu.
|
|
65
|
+
* @csspart entry-start - The leading column that holds the `start` slot. It is always rendered.
|
|
66
|
+
* @csspart failure - The message shown when the source cannot be played.
|
|
67
|
+
* @csspart forward - The button that skips forward ten seconds.
|
|
68
|
+
* @csspart fullscreen - The button that enters and leaves fullscreen.
|
|
69
|
+
* @csspart header - The region at the top left that holds the `header` slot.
|
|
70
|
+
* @csspart live - A live region that repeats the loading text, so screen readers announce it when it changes. Visually hidden in the styled tier.
|
|
71
|
+
* @csspart loading - The text shown while the video waits for more data. Draw the spinner
|
|
72
|
+
* with `::part(loading)::before` in your stylesheet. This tier ships no CSS and renders
|
|
73
|
+
* no extra box for it.
|
|
74
|
+
* @csspart more - The button that opens the `overflow` menu.
|
|
75
|
+
* @csspart mute - The button that turns sound on and off.
|
|
76
|
+
* @csspart next - The button that requests the next video, when `extra-controls` includes it.
|
|
77
|
+
* @csspart overflow - The menu that holds the controls kept off the bar.
|
|
82
78
|
* @csspart overflow-back - The control that returns from a submenu.
|
|
83
79
|
* @csspart overflow-back-mark - The glyph on the back control of a submenu.
|
|
84
|
-
* @csspart overflow-empty -
|
|
80
|
+
* @csspart overflow-empty - The text shown when the menu has no items.
|
|
85
81
|
* @csspart overflow-header - The bar above a submenu, holding the way back and its name.
|
|
86
|
-
* @csspart overflow-live - The inner menu's `live
|
|
87
|
-
* @csspart overflow-loading -
|
|
82
|
+
* @csspart overflow-live - The inner menu's `live` part, a live region that repeats the empty and loading text for screen readers.
|
|
83
|
+
* @csspart overflow-loading - The text shown while the items are loading.
|
|
88
84
|
* @csspart overflow-surface - The floating panel the menu is drawn on.
|
|
89
85
|
* @csspart overflow-title - The name of the submenu that is showing.
|
|
90
|
-
* @csspart pip -
|
|
91
|
-
* @csspart play -
|
|
92
|
-
* @csspart poster -
|
|
93
|
-
* @csspart previous -
|
|
94
|
-
* @csspart remote -
|
|
86
|
+
* @csspart pip - The picture-in-picture button, when `extra-controls` includes it and the browser supports it.
|
|
87
|
+
* @csspart play - The button that plays and pauses.
|
|
88
|
+
* @csspart poster - The poster that covers the video before it plays.
|
|
89
|
+
* @csspart previous - The button that requests the previous video, when `extra-controls` includes it.
|
|
90
|
+
* @csspart remote - The button that plays the video on another device, when one is available.
|
|
95
91
|
* @csspart remote-pressed - The remote control while the picture is on another device, beside `remote`.
|
|
96
|
-
* @csspart rewind - The
|
|
97
|
-
* @csspart scrubber -
|
|
98
|
-
* @csspart sound - The
|
|
99
|
-
* @csspart speed -
|
|
92
|
+
* @csspart rewind - The button that skips back ten seconds.
|
|
93
|
+
* @csspart scrubber - The slider that shows the position and moves playback to a new one.
|
|
94
|
+
* @csspart sound - The mute button and the volume slider, grouped as one control.
|
|
95
|
+
* @csspart speed - The playback speed control, when `extra-controls` includes it.
|
|
100
96
|
* @csspart stage - The box holding the picture and its controls, and the focus
|
|
101
97
|
* target the keys are bound to.
|
|
102
|
-
* @csspart start - The
|
|
98
|
+
* @csspart start - The large play button over the picture, shown while the video is not playing.
|
|
103
99
|
* @csspart time - The position and the duration.
|
|
104
100
|
* @csspart video - The video itself.
|
|
105
|
-
* @csspart volume -
|
|
101
|
+
* @csspart volume - The volume slider.
|
|
106
102
|
*
|
|
107
103
|
* @cssproperty --video-intrinsic-ratio - The media's own aspect ratio, once it is known. `--video-aspect-ratio` overrides it.
|
|
108
104
|
* @cssproperty --video-level - The current volume, 0 to 1.
|
|
@@ -110,7 +106,8 @@ import '../../menu/index.js';
|
|
|
110
106
|
*/
|
|
111
107
|
export declare class HelixHeadlessVideo extends HelixElement {
|
|
112
108
|
/**
|
|
113
|
-
* Whether
|
|
109
|
+
* Whether the video starts playing on its own. Browsers allow this only while
|
|
110
|
+
* it is muted.
|
|
114
111
|
*
|
|
115
112
|
* Forwarded rather than acted on. Whether an unprompted play is permitted is
|
|
116
113
|
* the browser's policy and not this element's, and `play()` already swallows
|
|
@@ -119,7 +116,8 @@ export declare class HelixHeadlessVideo extends HelixElement {
|
|
|
119
116
|
*/
|
|
120
117
|
autoplay: boolean;
|
|
121
118
|
/**
|
|
122
|
-
*
|
|
119
|
+
* The name of the captions control when the video has one track. The control
|
|
120
|
+
* turns that track on and off.
|
|
123
121
|
*
|
|
124
122
|
* **Every word this player speaks is a property**, so a page in another
|
|
125
123
|
* language hears its own: the play, pause, loading and error labels were,
|
|
@@ -127,11 +125,13 @@ export declare class HelixHeadlessVideo extends HelixElement {
|
|
|
127
125
|
*/
|
|
128
126
|
captionsLabel: string;
|
|
129
127
|
/**
|
|
130
|
-
* The row that turns captions off,
|
|
128
|
+
* The name of the row that turns captions off, when the video has several
|
|
129
|
+
* tracks.
|
|
131
130
|
*/
|
|
132
131
|
captionsOffLabel: string;
|
|
133
132
|
/**
|
|
134
|
-
* Whether the browser draws
|
|
133
|
+
* Whether the browser draws its native controls. When set, this element draws
|
|
134
|
+
* no controls of its own.
|
|
135
135
|
*
|
|
136
136
|
* A fallback rather than a default. Two bars over one video is worse than
|
|
137
137
|
* either alone, so this one is not drawn at all when it is set.
|
|
@@ -143,7 +143,7 @@ export declare class HelixHeadlessVideo extends HelixElement {
|
|
|
143
143
|
*/
|
|
144
144
|
crossOrigin: 'anonymous' | 'use-credentials' | null;
|
|
145
145
|
/**
|
|
146
|
-
* Whether
|
|
146
|
+
* Whether the video starts muted, which an autoplaying video must do.
|
|
147
147
|
*
|
|
148
148
|
* **Named for the platform's split, which is real.** The `muted` content
|
|
149
149
|
* attribute reflects to `defaultMuted`; the `muted` property is live state a
|
|
@@ -154,11 +154,12 @@ export declare class HelixHeadlessVideo extends HelixElement {
|
|
|
154
154
|
*/
|
|
155
155
|
defaultMuted: boolean;
|
|
156
156
|
/**
|
|
157
|
-
* Whether the browser
|
|
157
|
+
* Whether picture in picture is turned off, so the browser does not offer it.
|
|
158
158
|
*/
|
|
159
159
|
disablePictureInPicture: boolean;
|
|
160
160
|
/**
|
|
161
|
-
* Whether
|
|
161
|
+
* Whether remote playback is turned off, so the browser does not offer to
|
|
162
|
+
* play on another device.
|
|
162
163
|
*/
|
|
163
164
|
disableRemotePlayback: boolean;
|
|
164
165
|
/**
|
|
@@ -166,11 +167,11 @@ export declare class HelixHeadlessVideo extends HelixElement {
|
|
|
166
167
|
*/
|
|
167
168
|
downloadLabel: string;
|
|
168
169
|
/**
|
|
169
|
-
*
|
|
170
|
+
* The message shown when the video cannot be played.
|
|
170
171
|
*/
|
|
171
172
|
errorLabel: string;
|
|
172
173
|
/**
|
|
173
|
-
*
|
|
174
|
+
* Extra controls to add to the bar, named in the order they appear.
|
|
174
175
|
*
|
|
175
176
|
* A list rather than a property apiece. A bar is a row with a budget, and a
|
|
176
177
|
* boolean per feature invites a consumer to switch all of them on: naming
|
|
@@ -214,7 +215,8 @@ export declare class HelixHeadlessVideo extends HelixElement {
|
|
|
214
215
|
*/
|
|
215
216
|
fullscreenLabel: string;
|
|
216
217
|
/**
|
|
217
|
-
* How long the bar
|
|
218
|
+
* How long the control bar stays after the pointer stops moving, in
|
|
219
|
+
* milliseconds.
|
|
218
220
|
*
|
|
219
221
|
* A wait rather than leaving with the pointer, or a reader moving across the
|
|
220
222
|
* picture to reach a control watches the bar vanish under them. Zero turns
|
|
@@ -226,15 +228,15 @@ export declare class HelixHeadlessVideo extends HelixElement {
|
|
|
226
228
|
*/
|
|
227
229
|
idleDelay: number;
|
|
228
230
|
/**
|
|
229
|
-
* Accessible name
|
|
231
|
+
* Accessible name for the video, which its filename does not provide.
|
|
230
232
|
*/
|
|
231
233
|
label: string;
|
|
232
234
|
/**
|
|
233
|
-
*
|
|
235
|
+
* The text announced while the video waits for more data.
|
|
234
236
|
*/
|
|
235
237
|
loadingLabel: string;
|
|
236
238
|
/**
|
|
237
|
-
* Whether
|
|
239
|
+
* Whether the video starts again at the end.
|
|
238
240
|
*/
|
|
239
241
|
loop: boolean;
|
|
240
242
|
/**
|
|
@@ -242,7 +244,8 @@ export declare class HelixHeadlessVideo extends HelixElement {
|
|
|
242
244
|
*/
|
|
243
245
|
moreLabel: string;
|
|
244
246
|
/**
|
|
245
|
-
*
|
|
247
|
+
* The name of the mute control. The control shows as pressed while the video
|
|
248
|
+
* is muted.
|
|
246
249
|
*/
|
|
247
250
|
muteLabel: string;
|
|
248
251
|
/**
|
|
@@ -250,8 +253,8 @@ export declare class HelixHeadlessVideo extends HelixElement {
|
|
|
250
253
|
*/
|
|
251
254
|
nextLabel: string;
|
|
252
255
|
/**
|
|
253
|
-
* Controls
|
|
254
|
-
*
|
|
256
|
+
* Controls to place in a menu behind one button, named the same way as
|
|
257
|
+
* `extra-controls`.
|
|
255
258
|
*
|
|
256
259
|
* **Named rather than measured, and the reason is that a width cannot answer
|
|
257
260
|
* this.** A media query asks about the window, and the bar's problem is its
|
|
@@ -268,7 +271,7 @@ export declare class HelixHeadlessVideo extends HelixElement {
|
|
|
268
271
|
*/
|
|
269
272
|
overflowControls: string;
|
|
270
273
|
/**
|
|
271
|
-
*
|
|
274
|
+
* The name of the play control while pressing it would pause the video.
|
|
272
275
|
*/
|
|
273
276
|
pauseLabel: string;
|
|
274
277
|
/**
|
|
@@ -280,19 +283,19 @@ export declare class HelixHeadlessVideo extends HelixElement {
|
|
|
280
283
|
*/
|
|
281
284
|
pipLabel: string;
|
|
282
285
|
/**
|
|
283
|
-
*
|
|
286
|
+
* The name of the play control while pressing it would start the video.
|
|
284
287
|
*/
|
|
285
288
|
playLabel: string;
|
|
286
289
|
/**
|
|
287
|
-
* Whether
|
|
290
|
+
* Whether the video plays in place, inside the page.
|
|
288
291
|
*/
|
|
289
292
|
playsInline: boolean;
|
|
290
293
|
/**
|
|
291
|
-
*
|
|
294
|
+
* An image shown before the video plays, drawn by the browser.
|
|
292
295
|
*/
|
|
293
296
|
poster: string;
|
|
294
297
|
/**
|
|
295
|
-
* How much to
|
|
298
|
+
* How much of the video to load before playback is requested.
|
|
296
299
|
*/
|
|
297
300
|
preload: 'auto' | 'metadata' | 'none';
|
|
298
301
|
/**
|
|
@@ -320,11 +323,12 @@ export declare class HelixHeadlessVideo extends HelixElement {
|
|
|
320
323
|
*/
|
|
321
324
|
speeds: string;
|
|
322
325
|
/**
|
|
323
|
-
*
|
|
326
|
+
* The URL of the video, when there is one file.
|
|
324
327
|
*/
|
|
325
328
|
src: string;
|
|
326
329
|
/**
|
|
327
|
-
* The
|
|
330
|
+
* The large play button over the picture while the video is not playing. Set
|
|
331
|
+
* `none` to hide it.
|
|
328
332
|
*
|
|
329
333
|
* **On unless it is turned off, because a stopped video has nothing else.**
|
|
330
334
|
* Measured on the bar as it was: the play glyph is 16 by 16 in a 24 by 24
|
|
@@ -441,7 +445,7 @@ export declare class HelixHeadlessVideo extends HelixElement {
|
|
|
441
445
|
*/
|
|
442
446
|
private media;
|
|
443
447
|
/**
|
|
444
|
-
* The
|
|
448
|
+
* The URL of the source the video is playing.
|
|
445
449
|
*
|
|
446
450
|
* **Published because there is no other way in.** The `<video>` is inside
|
|
447
451
|
* this shadow root and `querySelector` does not cross it, so a consumer
|
|
@@ -469,29 +473,29 @@ export declare class HelixHeadlessVideo extends HelixElement {
|
|
|
469
473
|
*/
|
|
470
474
|
get currentTime(): number;
|
|
471
475
|
set currentTime(seconds: number);
|
|
472
|
-
/** The rate
|
|
476
|
+
/** The playback rate the video returns to by default. */
|
|
473
477
|
get defaultPlaybackRate(): number;
|
|
474
478
|
set defaultPlaybackRate(rate: number);
|
|
475
479
|
/** How long the media runs, in seconds, and `NaN` until that is known. */
|
|
476
480
|
get duration(): number;
|
|
477
481
|
/** Whether playback has run off the end. */
|
|
478
482
|
get ended(): boolean;
|
|
479
|
-
/** Whether playback is
|
|
483
|
+
/** Whether playback is paused, which is the resting state. */
|
|
480
484
|
get paused(): boolean;
|
|
481
|
-
/** How fast
|
|
485
|
+
/** How fast the video plays, where 1 is the recorded speed. */
|
|
482
486
|
get playbackRate(): number;
|
|
483
487
|
set playbackRate(rate: number);
|
|
484
488
|
/** Whether pitch is held steady when the rate changes. */
|
|
485
489
|
get preservesPitch(): boolean;
|
|
486
490
|
set preservesPitch(preserve: boolean);
|
|
487
|
-
/** Whether
|
|
491
|
+
/** Whether the video is moving to a new position. */
|
|
488
492
|
get seeking(): boolean;
|
|
489
493
|
/** The media's own height in pixels, and zero until the metadata has loaded. */
|
|
490
494
|
get videoHeight(): number;
|
|
491
495
|
/** The media's own width in pixels, and zero until the metadata has loaded. */
|
|
492
496
|
get videoWidth(): number;
|
|
493
497
|
/**
|
|
494
|
-
* Whether
|
|
498
|
+
* Whether the video is muted right now. The mute control changes it.
|
|
495
499
|
*
|
|
496
500
|
* The live half of the pair above. Writing mutes or unmutes the media itself
|
|
497
501
|
* rather than the attribute, which is what the platform does and what the
|
|
@@ -499,12 +503,12 @@ export declare class HelixHeadlessVideo extends HelixElement {
|
|
|
499
503
|
*/
|
|
500
504
|
get muted(): boolean;
|
|
501
505
|
set muted(quiet: boolean);
|
|
502
|
-
/**
|
|
506
|
+
/** The volume, from 0 to 1. */
|
|
503
507
|
get volume(): number;
|
|
504
508
|
set volume(level: number);
|
|
505
509
|
private get video();
|
|
506
510
|
/**
|
|
507
|
-
* Starts
|
|
511
|
+
* Starts playback, if the browser allows it.
|
|
508
512
|
*
|
|
509
513
|
* The rejection is swallowed on purpose: a browser refuses `play()` when
|
|
510
514
|
* nothing the reader did asked for it, and that is a policy answer rather than
|
|
@@ -512,9 +516,12 @@ export declare class HelixHeadlessVideo extends HelixElement {
|
|
|
512
516
|
* control, which is the correct thing to be looking at.
|
|
513
517
|
*/
|
|
514
518
|
play(): void;
|
|
515
|
-
/**
|
|
519
|
+
/** Pauses playback and leaves the current frame showing. */
|
|
516
520
|
pause(): void;
|
|
517
|
-
/**
|
|
521
|
+
/**
|
|
522
|
+
* Plays the video if it is paused, and pauses it if it is playing. The play
|
|
523
|
+
* button and the play keys call this.
|
|
524
|
+
*/
|
|
518
525
|
toggle(): void;
|
|
519
526
|
/** Moves to a point in seconds, clamped to what exists. */
|
|
520
527
|
seek(seconds: number): void;
|
|
@@ -4,23 +4,18 @@ import { type TemplateResult } from 'lit';
|
|
|
4
4
|
* @summary One entry in a video playlist.
|
|
5
5
|
*
|
|
6
6
|
* @description
|
|
7
|
-
* **
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* what keeps a playlist usable with a player the consumer configured
|
|
11
|
-
* themselves.
|
|
7
|
+
* **An entry holds a source, a poster, and a name**, and the playlist passes
|
|
8
|
+
* them to the player. The entry does not touch a `<video>`, so the playlist
|
|
9
|
+
* works with a player you configured yourself.
|
|
12
10
|
*
|
|
13
|
-
* **
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* `aria-activedescendant`. Nothing here needs that, because focus really moves
|
|
19
|
-
* to the button.
|
|
11
|
+
* **Each entry is a `<button>` inside a `listitem`.** The `list` and `listitem`
|
|
12
|
+
* roles tell a screen reader how many entries there are and the position of the
|
|
13
|
+
* focused one. Focus moves to the button, so the entry does not need the
|
|
14
|
+
* `listbox` pattern, which keeps focus elsewhere and marks the current item
|
|
15
|
+
* with `aria-activedescendant`. `Option` documents that pattern.
|
|
20
16
|
*
|
|
21
|
-
* `aria-current
|
|
22
|
-
* have a selection.
|
|
23
|
-
* the player is on.
|
|
17
|
+
* The entry playing now carries `aria-current`. `aria-selected` belongs to
|
|
18
|
+
* roles that have a selection.
|
|
24
19
|
*
|
|
25
20
|
* @since 0.1.0
|
|
26
21
|
* @status stable
|
|
@@ -28,21 +23,21 @@ import { type TemplateResult } from 'lit';
|
|
|
28
23
|
* @documentation https://fusion.dev/helix/components/video-playlist
|
|
29
24
|
*
|
|
30
25
|
* @slot - The entry's name.
|
|
31
|
-
* @slot media - A thumbnail.
|
|
32
|
-
* @slot meta -
|
|
26
|
+
* @slot media - A thumbnail. Defaults to an image of `poster`.
|
|
27
|
+
* @slot meta - Content after the name, such as a duration or a date.
|
|
33
28
|
*
|
|
34
|
-
* @event {HelixSelectEvent} helix-select -
|
|
29
|
+
* @event {HelixSelectEvent} helix-select - The entry was chosen. Cancelable: cancel it to keep the current entry.
|
|
35
30
|
*
|
|
36
|
-
* @csspart container - The
|
|
31
|
+
* @csspart container - The list item that holds the button.
|
|
37
32
|
* @csspart item - The row, which is a button.
|
|
38
|
-
* @csspart item-current -
|
|
39
|
-
* @csspart label - The name and
|
|
40
|
-
* @csspart media - The
|
|
41
|
-
* @csspart thumbnail - The image `poster`
|
|
33
|
+
* @csspart item-current - Added to `item` for the entry that is playing.
|
|
34
|
+
* @csspart label - The name and the content after it.
|
|
35
|
+
* @csspart media - The column at the start of the row.
|
|
36
|
+
* @csspart thumbnail - The image of `poster`, shown when the `media` slot is empty.
|
|
42
37
|
*/
|
|
43
38
|
export declare class HelixHeadlessVideoPlaylistItem extends HelixElement {
|
|
44
39
|
/**
|
|
45
|
-
* Whether
|
|
40
|
+
* Whether this entry is the one playing.
|
|
46
41
|
*
|
|
47
42
|
* Written by the playlist rather than by the entry, the way an option's
|
|
48
43
|
* selection is: an entry that made itself current would be a second answer to
|
|
@@ -50,11 +45,11 @@ export declare class HelixHeadlessVideoPlaylistItem extends HelixElement {
|
|
|
50
45
|
*/
|
|
51
46
|
current: boolean;
|
|
52
47
|
/**
|
|
53
|
-
*
|
|
48
|
+
* Prevents the entry from being chosen.
|
|
54
49
|
*/
|
|
55
50
|
disabled: boolean;
|
|
56
51
|
/**
|
|
57
|
-
*
|
|
52
|
+
* The image shown before this entry plays, also used as the row's thumbnail.
|
|
58
53
|
*
|
|
59
54
|
* One property doing both, because they are the same picture: the frame that
|
|
60
55
|
* stands for the clip stands for it in the list too. It is the `media` slot's
|
|
@@ -68,11 +63,11 @@ export declare class HelixHeadlessVideoPlaylistItem extends HelixElement {
|
|
|
68
63
|
*/
|
|
69
64
|
src: string;
|
|
70
65
|
/**
|
|
71
|
-
*
|
|
66
|
+
* The entry's identifier, compared against the playlist's `active`.
|
|
72
67
|
*/
|
|
73
68
|
value: string;
|
|
74
69
|
/**
|
|
75
|
-
* The entry's name,
|
|
70
|
+
* The entry's name: its own text, without the content in its named slots.
|
|
76
71
|
*
|
|
77
72
|
* `textContent` takes the whole subtree: a row with a duration in `meta`
|
|
78
73
|
* reads as "His Girl Friday0:06", and that string reaches the player and the
|
|
@@ -5,15 +5,11 @@ import '../../menu/index.js';
|
|
|
5
5
|
* @summary The playlist's entries, as a menu inside the player's control bar.
|
|
6
6
|
*
|
|
7
7
|
* @description
|
|
8
|
-
*
|
|
9
|
-
* the player is a list a reader scrolls to; the same list in the control bar is
|
|
10
|
-
* one they open over the video.
|
|
8
|
+
* Opens the playlist entries from the player's control bar, over the video.
|
|
11
9
|
*
|
|
12
|
-
* **
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* control bar. What can is an element the consumer writes there, which is what
|
|
16
|
-
* `Video`'s `controls` slot is for.
|
|
10
|
+
* **You place the menu yourself**, in `Video`'s `controls` slot. A shadow root
|
|
11
|
+
* cannot project into a sibling's light DOM, so the playlist cannot render into
|
|
12
|
+
* the player's control bar.
|
|
17
13
|
*
|
|
18
14
|
* @since 0.1.0
|
|
19
15
|
* @status stable
|
|
@@ -23,27 +19,27 @@ import '../../menu/index.js';
|
|
|
23
19
|
*
|
|
24
20
|
* @slot trigger - Replaces the button that opens the menu.
|
|
25
21
|
*
|
|
26
|
-
* @event {HelixSelectEvent} helix-select -
|
|
22
|
+
* @event {HelixSelectEvent} helix-select - An entry was chosen. The event carries its value, and the playlist listens for it. Cancelable: cancel it to keep the current entry.
|
|
27
23
|
*
|
|
28
24
|
* @csspart entry - One entry in the menu.
|
|
29
|
-
* @csspart entry-item - The row
|
|
30
|
-
* @csspart entry-mark - The
|
|
31
|
-
* @csspart entry-start - The
|
|
25
|
+
* @csspart entry-item - The entry's row. It is an `<a>` when `href` is set.
|
|
26
|
+
* @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.
|
|
27
|
+
* @csspart entry-start - The column at the start of an entry. It is a slot and is always present.
|
|
32
28
|
* @csspart menu - The menu that holds the entries.
|
|
33
|
-
* @csspart menu-back - The
|
|
34
|
-
* @csspart menu-back-mark - The
|
|
29
|
+
* @csspart menu-back - The button that goes back from a submenu.
|
|
30
|
+
* @csspart menu-back-mark - The icon on a submenu's back button.
|
|
35
31
|
* @csspart menu-empty - Shown when there are no items to show.
|
|
36
|
-
* @csspart menu-header - The bar above a submenu, holding the
|
|
37
|
-
* @csspart menu-live - The inner menu's `live
|
|
38
|
-
* @csspart menu-loading - Shown while the items are
|
|
32
|
+
* @csspart menu-header - The bar above a submenu, holding the back button and the submenu's name.
|
|
33
|
+
* @csspart menu-live - The inner menu's `live` part, the region screen readers announce its empty and loading messages from.
|
|
34
|
+
* @csspart menu-loading - Shown while the items are loading.
|
|
39
35
|
* @csspart menu-surface - The floating panel the menu is drawn on.
|
|
40
|
-
* @csspart menu-title - The name of the submenu that is
|
|
41
|
-
* @csspart poster - An entry's
|
|
42
|
-
* @csspart trigger - The button that opens
|
|
36
|
+
* @csspart menu-title - The name of the submenu that is shown.
|
|
37
|
+
* @csspart poster - An entry's poster image, if it has one.
|
|
38
|
+
* @csspart trigger - The button that opens the menu.
|
|
43
39
|
*/
|
|
44
40
|
export declare class HelixHeadlessVideoPlaylistMenu extends HelixElement {
|
|
45
41
|
/**
|
|
46
|
-
* The
|
|
42
|
+
* The name of the menu and its trigger, read by screen readers.
|
|
47
43
|
*
|
|
48
44
|
* "Episodes" suits a series and is wrong for a set of camera angles, and the
|
|
49
45
|
* component cannot know which one it is in.
|