highsoft-ui 1.0.189 → 1.0.190
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/dist/{Accordion-NPNV0Rdr.js → Accordion-BAuBLmE3.js} +2 -2
- package/dist/{Breadcrumb-Diyjpqys.js → Breadcrumb-DyHxzIHZ.js} +3 -3
- package/dist/{BrowserFrame-Bs2fIKzy.js → BrowserFrame-BPBOv1Tk.js} +5 -5
- package/dist/{Button-DtCIaVhq.js → Button-C45Uhxsb.js} +1 -1
- package/dist/{ButtonGroup-6tLQmpEH.js → ButtonGroup-CiqrtZuw.js} +1 -1
- package/dist/{Checkbox-CqFkzrVk.js → Checkbox-CVftEg1_.js} +1 -1
- package/dist/{CodeBlock-BM_Vefdj.js → CodeBlock-B3wBSBYj.js} +4 -4
- package/dist/{CookiePolicyModal-BXIr4v-D.js → CookiePolicyModal-DjSphVoO.js} +2 -2
- package/dist/{CopyCode-4IXo0bTs.js → CopyCode-CUpfwNcv.js} +2 -2
- package/dist/{Dropdown-DoQBagdU.js → Dropdown-CrVLfZiy.js} +1 -1
- package/dist/{Footer-J3MxvPPO.js → Footer-DzsWk7mZ.js} +7 -7
- package/dist/{FooterBottom-CT_vF7Wo.js → FooterBottom-Dr8pA9M3.js} +1 -1
- package/dist/{FooterHelp-BMGx8Hk_.js → FooterHelp-CTJGT2jE.js} +1 -1
- package/dist/{FooterLinks-Bl9DTxcj.js → FooterLinks-WUB3E0CX.js} +2 -2
- package/dist/{Header-Dbi8eOiH.js → Header-LQoKnhWx.js} +16 -16
- package/dist/{InputGrouped-B3WGuESX.js → InputGrouped-Ddlan78b.js} +3 -3
- package/dist/{Label-DwiX1ZiD.js → Label-BE2jiXll.js} +1 -1
- package/dist/{List-_Ahztqfe.js → List-DsP9RBn1.js} +1 -1
- package/dist/{LogoCarousel-e-1WK43R.js → LogoCarousel-DZCklh0c.js} +3 -3
- package/dist/{NewsletterSignup-BY5-NuDn.js → NewsletterSignup-DZNPeWVb.js} +4 -4
- package/dist/{Notification-D93nzw6M.js → Notification-BSUYpeGy.js} +3 -3
- package/dist/{PrefPanel-DTbo6QDa.js → PrefPanel-Dqu4mVyV.js} +7 -7
- package/dist/{PrevNextNav-ChqvTQGz.js → PrevNextNav-ChtdXmcy.js} +1 -1
- package/dist/{ProductNotice-BfI0v5Ag.js → ProductNotice-DnQEPFsx.js} +2 -2
- package/dist/{RoadmapDetails-DIByXo2r.js → RoadmapDetails-BgX6JZ4M.js} +5 -5
- package/dist/{SearchDropdown-X_PX34tw.js → SearchDropdown-DeqQ84uc.js} +1 -1
- package/dist/VideoPlayer-DmgXtaQU.js +456 -0
- package/dist/{VideoPlayerModal-DhH0G9cJ.js → VideoPlayerModal-bQthGzgn.js} +2 -2
- package/dist/{YoutubeModal-DcnPW63b.js → YoutubeModal-CAsJ5oKk.js} +1 -1
- package/dist/components/Accordion/index.js +1 -1
- package/dist/components/Breadcrumb/index.js +1 -1
- package/dist/components/BrowserFrame/index.js +1 -1
- package/dist/components/Button/index.js +1 -1
- package/dist/components/ButtonGroup/index.js +1 -1
- package/dist/components/Checkbox/index.js +1 -1
- package/dist/components/CodeBlock/index.js +1 -1
- package/dist/components/CopyCode/index.js +1 -1
- package/dist/components/Dropdown/index.js +1 -1
- package/dist/components/Figure/ZoomImage.js +2 -2
- package/dist/components/Footer/CookiePolicyModal.js +1 -1
- package/dist/components/Footer/FooterBottom.js +1 -1
- package/dist/components/Footer/FooterHelp.js +1 -1
- package/dist/components/Footer/FooterLinks.js +1 -1
- package/dist/components/Footer/YoutubeModal.js +1 -1
- package/dist/components/Footer/index.js +1 -1
- package/dist/components/Header/index.js +1 -1
- package/dist/components/InputGrouped/index.js +1 -1
- package/dist/components/Label/index.js +1 -1
- package/dist/components/List/index.js +1 -1
- package/dist/components/LogoCarousel/index.js +1 -1
- package/dist/components/Modal/ModalContactFooter.js +2 -2
- package/dist/components/Modal/index.js +2 -2
- package/dist/components/NewsletterSignup/index.js +1 -1
- package/dist/components/Notification/index.js +1 -1
- package/dist/components/PrefPanel/index.js +1 -1
- package/dist/components/PrevNextNav/index.js +1 -1
- package/dist/components/ProductNotice/index.js +1 -1
- package/dist/components/PromoBanner/index.js +19 -19
- package/dist/components/RoadmapDetails/index.js +1 -1
- package/dist/components/Search/SearchDialog.js +8 -8
- package/dist/components/Search/index.js +2 -2
- package/dist/components/SearchDropdown/index.js +1 -1
- package/dist/components/Sidebar/NavDisclosure.js +1 -1
- package/dist/components/Sidebar/NavGroup.js +1 -1
- package/dist/components/Sidebar/Sidebar.js +10 -10
- package/dist/components/Sidebar/SidebarLayout.js +1 -1
- package/dist/components/Sidebar/SidebarSwitcher.js +1 -1
- package/dist/components/VideoCover/index.js +115 -102
- package/dist/components/VideoPlayer/VideoPlayerModal.js +1 -1
- package/dist/components/VideoPlayer/index.js +1 -1
- package/dist/{create-element-ChcNUMOL.js → create-element-BP8g1yS0.js} +1 -1
- package/dist/{esm-CqcQTziN.js → esm-BMNJ2hLn.js} +79 -51
- package/dist/highsoft-ui.css +1 -1
- package/dist/lib/components/VideoCover/index.d.ts +5 -2
- package/dist/main.js +24 -24
- package/dist/{prism-light-B3J0jr_a.js → prism-light-9X-EbG8v.js} +1 -1
- package/dist/{styles.module-BnKyCO6_.js → styles.module-G9LPGB5g.js} +2 -0
- package/package.json +1 -1
- package/dist/VideoPlayer-DRtH0Ah7.js +0 -456
|
@@ -56,8 +56,11 @@ export interface VideoCoverProps {
|
|
|
56
56
|
* instead (size the parent to shape the cover).
|
|
57
57
|
*/
|
|
58
58
|
aspectRatio?: string;
|
|
59
|
-
/**
|
|
60
|
-
|
|
59
|
+
/**
|
|
60
|
+
* Corner radius in px or as a CSS border-radius value, including a design
|
|
61
|
+
* token such as `var(--border_radius-size-8)`. Defaults to the 0 px token.
|
|
62
|
+
*/
|
|
63
|
+
radius?: CSSProperties['borderRadius'];
|
|
61
64
|
/**
|
|
62
65
|
* Show a small always-visible playback toggle in the corner (WCAG 2.2.2
|
|
63
66
|
* "Pause, Stop, Hide"). Three states: pause while the video plays, replay
|
package/dist/main.js
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
import { c as e, d as t, r as n, s as r, u as i } from "./utils-bAjntFD8.js";
|
|
2
2
|
import { TrackingProvider as a, dataLayerTracker as o, gtagTracker as s, useTracker as c } from "./tracking.js";
|
|
3
3
|
import { t as l } from "./Box-BZgeSeCV.js";
|
|
4
|
-
import { t as u } from "./Button-
|
|
4
|
+
import { t as u } from "./Button-C45Uhxsb.js";
|
|
5
5
|
import { n as d } from "./Typography-DI1AkqiO.js";
|
|
6
|
-
import { n as f, t as p } from "./Accordion-
|
|
7
|
-
import { t as m } from "./BrowserFrame-
|
|
6
|
+
import { n as f, t as p } from "./Accordion-BAuBLmE3.js";
|
|
7
|
+
import { t as m } from "./BrowserFrame-BPBOv1Tk.js";
|
|
8
8
|
import { t as h } from "./Icon-BUgFags4.js";
|
|
9
9
|
import { Figure as g } from "./components/Figure/index.js";
|
|
10
|
-
import { t as _ } from "./CopyCode-
|
|
10
|
+
import { t as _ } from "./CopyCode-CUpfwNcv.js";
|
|
11
11
|
import { t as v } from "./FrameworkIcon-B8GmMx0r.js";
|
|
12
|
-
import { t as y } from "./CodeBlock-
|
|
12
|
+
import { t as y } from "./CodeBlock-B3wBSBYj.js";
|
|
13
13
|
import { n as b, t as x } from "./ClientLogo-Dj7K48YL.js";
|
|
14
|
-
import { t as S } from "./LogoCarousel-
|
|
14
|
+
import { t as S } from "./LogoCarousel-DZCklh0c.js";
|
|
15
15
|
import { t as C } from "./Link-CYR92_U0.js";
|
|
16
16
|
import { t as w } from "./ProductIconFrame-CGrI3X4C.js";
|
|
17
17
|
import { ProductIcon as T } from "./components/ProductIcon/index.js";
|
|
18
|
-
import { t as E } from "./ButtonGroup-
|
|
18
|
+
import { t as E } from "./ButtonGroup-CiqrtZuw.js";
|
|
19
19
|
import { t as D } from "./InputSolo-CbnsJlJu.js";
|
|
20
|
-
import { t as O } from "./SearchDropdown-
|
|
21
|
-
import { i as k, n as A, r as j, t as M } from "./InputGrouped-
|
|
20
|
+
import { t as O } from "./SearchDropdown-DeqQ84uc.js";
|
|
21
|
+
import { i as k, n as A, r as j, t as M } from "./InputGrouped-Ddlan78b.js";
|
|
22
22
|
import { t as N } from "./Container-BDssaLig.js";
|
|
23
23
|
import { t as P } from "./DiscordInvite-DfPVlJ5G.js";
|
|
24
24
|
import { t as F } from "./Heading-DNDHqYWO.js";
|
|
25
|
-
import { n as I, t as L } from "./List-
|
|
25
|
+
import { n as I, t as L } from "./List-DsP9RBn1.js";
|
|
26
26
|
import { n as R, t as z } from "./Features-Cgcbnv5_.js";
|
|
27
27
|
import { t as B } from "./Logo-Bz0G2G-k.js";
|
|
28
|
-
import { t as V } from "./NewsletterSignup-
|
|
29
|
-
import { n as H, r as U, t as W } from "./Dropdown-
|
|
30
|
-
import { t as G } from "./PrefPanel-
|
|
31
|
-
import { n as K, t as q } from "./Label-
|
|
28
|
+
import { t as V } from "./NewsletterSignup-DZNPeWVb.js";
|
|
29
|
+
import { n as H, r as U, t as W } from "./Dropdown-CrVLfZiy.js";
|
|
30
|
+
import { t as G } from "./PrefPanel-Dqu4mVyV.js";
|
|
31
|
+
import { n as K, t as q } from "./Label-BE2jiXll.js";
|
|
32
32
|
import { VideoCover as J } from "./components/VideoCover/index.js";
|
|
33
|
-
import { t as Y } from "./VideoPlayer-
|
|
34
|
-
import { t as X } from "./VideoPlayerModal-
|
|
35
|
-
import { t as Z } from "./Footer-
|
|
33
|
+
import { t as Y } from "./VideoPlayer-DmgXtaQU.js";
|
|
34
|
+
import { t as X } from "./VideoPlayerModal-bQthGzgn.js";
|
|
35
|
+
import { t as Z } from "./Footer-DzsWk7mZ.js";
|
|
36
36
|
import { n as Q } from "./GPTInput-g460kfc6.js";
|
|
37
|
-
import { t as $ } from "./Notification-
|
|
38
|
-
import { n as ee, t as te } from "./Header-
|
|
37
|
+
import { t as $ } from "./Notification-BSUYpeGy.js";
|
|
38
|
+
import { n as ee, t as te } from "./Header-LQoKnhWx.js";
|
|
39
39
|
import { t as ne } from "./Tabs-TRXBM5Zr.js";
|
|
40
40
|
import { n as re, t as ie } from "./RadioBox-C7bDjItJ.js";
|
|
41
|
-
import { n as ae, t as oe } from "./Checkbox-
|
|
41
|
+
import { n as ae, t as oe } from "./Checkbox-CVftEg1_.js";
|
|
42
42
|
import { t as se } from "./Toggle-BHjptO7-.js";
|
|
43
43
|
import { t as ce } from "./ToggleCard-kMpxzTnh.js";
|
|
44
44
|
import { t as le } from "./ToggleList-Dh7wb2-W.js";
|
|
45
45
|
import { Modal as ue } from "./components/Modal/index.js";
|
|
46
|
-
import { t as de } from "./RoadmapDetails-
|
|
46
|
+
import { t as de } from "./RoadmapDetails-BgX6JZ4M.js";
|
|
47
47
|
import { ModalContactFooter as fe } from "./components/Modal/ModalContactFooter.js";
|
|
48
48
|
import { useOptionalSidebarLayout as pe, useSidebarLayout as me } from "./components/Sidebar/context.js";
|
|
49
49
|
import { SidebarLayout as he, SidebarMain as ge } from "./components/Sidebar/SidebarLayout.js";
|
|
@@ -54,13 +54,13 @@ import { NavItem as Ce } from "./components/Sidebar/NavItem.js";
|
|
|
54
54
|
import { NavGroup as we } from "./components/Sidebar/NavGroup.js";
|
|
55
55
|
import { NavDisclosure as Te } from "./components/Sidebar/NavDisclosure.js";
|
|
56
56
|
import "./components/Sidebar/index.js";
|
|
57
|
-
import { t as Ee } from "./PrevNextNav-
|
|
57
|
+
import { t as Ee } from "./PrevNextNav-ChtdXmcy.js";
|
|
58
58
|
import { productFraming as De } from "./components/PromoBanner/product-framing.js";
|
|
59
59
|
import { promoBannerProducts as Oe } from "./components/PromoBanner/products.js";
|
|
60
60
|
import { PromoBanner as ke } from "./components/PromoBanner/index.js";
|
|
61
61
|
import { PRODUCT_NOTICE_EVENTS as Ae } from "./components/ProductNotice/tracking.js";
|
|
62
|
-
import { t as je } from "./ProductNotice-
|
|
63
|
-
import { t as Me } from "./Breadcrumb-
|
|
62
|
+
import { t as je } from "./ProductNotice-DnQEPFsx.js";
|
|
63
|
+
import { t as Me } from "./Breadcrumb-DyHxzIHZ.js";
|
|
64
64
|
import { t as Ne } from "./TableOfContents-d26S7KYx.js";
|
|
65
65
|
import { ThemeLoader as Pe, themeLoaderScript as Fe } from "./components/ThemeLoader/index.js";
|
|
66
66
|
export { p as Accordion, f as AccordionItem, l as Box, Me as Breadcrumb, m as BrowserFrame, u as Button, E as ButtonGroup, oe as Checkbox, ae as CheckboxGroup, x as ClientLogo, y as CodeBlock, N as Container, _ as CopyCode, P as DiscordInvite, W as Dropdown, H as DropdownItem, U as DropdownSeparator, z as FeatureItem, R as Features, g as Figure, Z as Footer, M as FormGroup, A as FormRow, v as FrameworkIcon, Q as GPTInput, te as Header, F as Heading, h as Icon, j as InputGrouped, D as InputSolo, q as Label, C as Link, L as List, I as ListItem, B as Logo, S as LogoCarousel, ue as Modal, fe as ModalContactFooter, Te as NavDisclosure, we as NavGroup, Ce as NavItem, K as NewTag, V as NewsletterSignup, $ as Notification, Ae as PRODUCT_NOTICE_EVENTS, G as PrefPanel, Ee as PrevNextNav, T as ProductIcon, w as ProductIconFrame, je as ProductNotice, ke as PromoBanner, ie as RadioBox, re as RadioBoxGroup, de as RoadmapDetails, O as SearchDropdown, k as SelectGrouped, ve as Sidebar, ye as SidebarBody, be as SidebarHeader, he as SidebarLayout, ge as SidebarMain, _e as SidebarResizer, xe as SidebarSection, Se as SidebarSwitcher, ee as SubHeader, Ne as TableOfContents, ne as Tabs, Pe as ThemeLoader, i as ThemeProvider, se as Toggle, ce as ToggleCard, le as ToggleList, a as TrackingProvider, d as Typography, J as VideoCover, Y as VideoPlayer, X as VideoPlayerModal, b as clientLogoLabels, o as dataLayerTracker, s as gtagTracker, De as promoBannerFraming, Oe as promoBannerProducts, Fe as themeLoaderScript, n as useClipboard, t as useNextTheme, pe as useOptionalSidebarLayout, me as useSidebarLayout, r as useSuccessFlash, e as useTheme, c as useTracker };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as e } from "./chunk-jwUa06l-.js";
|
|
2
|
-
import { r as t, t as n } from "./create-element-
|
|
2
|
+
import { r as t, t as n } from "./create-element-BP8g1yS0.js";
|
|
3
3
|
import r from "react";
|
|
4
4
|
//#region node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
|
|
5
5
|
function i(e, t) {
|
|
@@ -4,6 +4,8 @@ var e = {
|
|
|
4
4
|
cover: "a1m2bq_cover",
|
|
5
5
|
figure: "a1m2bq_figure",
|
|
6
6
|
hoverZoom: "a1m2bq_hoverZoom",
|
|
7
|
+
playbackArtwork: "a1m2bq_playbackArtwork",
|
|
8
|
+
playbackButton: "a1m2bq_playbackButton",
|
|
7
9
|
playControl: "a1m2bq_playControl",
|
|
8
10
|
poster: "a1m2bq_poster",
|
|
9
11
|
reduced: "a1m2bq_reduced",
|
package/package.json
CHANGED
|
@@ -1,456 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { t as e } from "./clsx-BWCAbrjV.js";
|
|
3
|
-
import { E as t, F as n, M as r, a as i, i as a, mt as o, n as s, o as ee, s as c, w as l } from "./esm-CqcQTziN.js";
|
|
4
|
-
import { t as u } from "./Icon-BUgFags4.js";
|
|
5
|
-
import { detectProvider as d, providerPosterUrl as f, useMediaEngine as p } from "./components/VideoPlayer/useMediaEngine.js";
|
|
6
|
-
import { forwardRef as m, useCallback as h, useEffect as g, useId as _, useImperativeHandle as v, useRef as y, useState as b } from "react";
|
|
7
|
-
import { jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
8
|
-
var C = {
|
|
9
|
-
button: "_1OFWhq_button",
|
|
10
|
-
ccButton: "_1OFWhq_ccButton",
|
|
11
|
-
centerPlay: "_1OFWhq_centerPlay",
|
|
12
|
-
controlBar: "_1OFWhq_controlBar",
|
|
13
|
-
docked: "_1OFWhq_docked",
|
|
14
|
-
dragging: "_1OFWhq_dragging",
|
|
15
|
-
embed: "_1OFWhq_embed",
|
|
16
|
-
fullscreenTranscript: "_1OFWhq_fullscreenTranscript",
|
|
17
|
-
fullscreenTranscriptBody: "_1OFWhq_fullscreenTranscriptBody",
|
|
18
|
-
fullscreenTranscriptClose: "_1OFWhq_fullscreenTranscriptClose",
|
|
19
|
-
fullscreenTranscriptHeader: "_1OFWhq_fullscreenTranscriptHeader",
|
|
20
|
-
fullscreenTranscriptOpen: "_1OFWhq_fullscreenTranscriptOpen",
|
|
21
|
-
fullscreenTranscriptTitle: "_1OFWhq_fullscreenTranscriptTitle",
|
|
22
|
-
fullscreenTranscriptVisible: "_1OFWhq_fullscreenTranscriptVisible",
|
|
23
|
-
idle: "_1OFWhq_idle",
|
|
24
|
-
player: "_1OFWhq_player",
|
|
25
|
-
progress: "_1OFWhq_progress",
|
|
26
|
-
scrim: "_1OFWhq_scrim",
|
|
27
|
-
slider: "_1OFWhq_slider",
|
|
28
|
-
sliderBuffered: "_1OFWhq_sliderBuffered",
|
|
29
|
-
sliderFill: "_1OFWhq_sliderFill",
|
|
30
|
-
sliderThumb: "_1OFWhq_sliderThumb",
|
|
31
|
-
sliderTrack: "_1OFWhq_sliderTrack",
|
|
32
|
-
stack: "_1OFWhq_stack",
|
|
33
|
-
startCover: "_1OFWhq_startCover",
|
|
34
|
-
tapLayer: "_1OFWhq_tapLayer",
|
|
35
|
-
time: "_1OFWhq_time",
|
|
36
|
-
timeDuration: "_1OFWhq_timeDuration",
|
|
37
|
-
transcript: "_1OFWhq_transcript",
|
|
38
|
-
transcriptBody: "_1OFWhq_transcriptBody",
|
|
39
|
-
transcriptButton: "_1OFWhq_transcriptButton",
|
|
40
|
-
transcriptClip: "_1OFWhq_transcriptClip",
|
|
41
|
-
transcriptReveal: "_1OFWhq_transcriptReveal",
|
|
42
|
-
transcriptRevealOpen: "_1OFWhq_transcriptRevealOpen",
|
|
43
|
-
video: "_1OFWhq_video",
|
|
44
|
-
volumePopover: "_1OFWhq_volumePopover",
|
|
45
|
-
volumeSlider: "_1OFWhq_volumeSlider",
|
|
46
|
-
volumeWrap: "_1OFWhq_volumeWrap"
|
|
47
|
-
}, te = "var(--HS-text-brand-default-alt)", ne = 2600, w = -4;
|
|
48
|
-
function T(e) {
|
|
49
|
-
if (!Number.isFinite(e) || e < 0) return "0:00";
|
|
50
|
-
let t = Math.floor(e), n = Math.floor(t / 3600), r = Math.floor(t % 3600 / 60), i = t % 60, a = n > 0 ? String(r).padStart(2, "0") : String(r), o = String(i).padStart(2, "0");
|
|
51
|
-
return n > 0 ? `${n}:${a}:${o}` : `${a}:${o}`;
|
|
52
|
-
}
|
|
53
|
-
var E = (e) => Math.max(0, Math.min(1, e));
|
|
54
|
-
function D({ value: t, buffered: n, ariaLabel: r, ariaValueText: i, className: a, step: o = .05, onChange: s, onScrubStart: ee, onScrubEnd: c }) {
|
|
55
|
-
let l = y(null), [u, d] = b(!1), f = (e) => `${E(e) * 100}%`, p = h((e) => {
|
|
56
|
-
let t = l.current;
|
|
57
|
-
if (!t) return 0;
|
|
58
|
-
let n = t.getBoundingClientRect();
|
|
59
|
-
return E((e - n.left) / n.width);
|
|
60
|
-
}, []), m = (e) => {
|
|
61
|
-
e.preventDefault(), l.current?.setPointerCapture(e.pointerId), d(!0), ee?.(), s(p(e.clientX));
|
|
62
|
-
}, g = (e) => {
|
|
63
|
-
u && s(p(e.clientX));
|
|
64
|
-
}, _ = (e) => {
|
|
65
|
-
u && (d(!1), c?.(), l.current?.releasePointerCapture?.(e.pointerId));
|
|
66
|
-
}, v = (e) => {
|
|
67
|
-
let n = null;
|
|
68
|
-
switch (e.key) {
|
|
69
|
-
case "ArrowRight":
|
|
70
|
-
case "ArrowUp":
|
|
71
|
-
n = t + o;
|
|
72
|
-
break;
|
|
73
|
-
case "ArrowLeft":
|
|
74
|
-
case "ArrowDown":
|
|
75
|
-
n = t - o;
|
|
76
|
-
break;
|
|
77
|
-
case "Home":
|
|
78
|
-
n = 0;
|
|
79
|
-
break;
|
|
80
|
-
case "End":
|
|
81
|
-
n = 1;
|
|
82
|
-
break;
|
|
83
|
-
default: return;
|
|
84
|
-
}
|
|
85
|
-
e.preventDefault(), e.stopPropagation(), s(E(n));
|
|
86
|
-
};
|
|
87
|
-
return /* @__PURE__ */ S("div", {
|
|
88
|
-
ref: l,
|
|
89
|
-
role: "slider",
|
|
90
|
-
tabIndex: 0,
|
|
91
|
-
"aria-label": r,
|
|
92
|
-
"aria-valuemin": 0,
|
|
93
|
-
"aria-valuemax": 100,
|
|
94
|
-
"aria-valuenow": Math.round(E(t) * 100),
|
|
95
|
-
"aria-valuetext": i,
|
|
96
|
-
className: e(C.slider, a, { [C.dragging]: u }),
|
|
97
|
-
onPointerDown: m,
|
|
98
|
-
onPointerMove: g,
|
|
99
|
-
onPointerUp: _,
|
|
100
|
-
onPointerCancel: _,
|
|
101
|
-
onKeyDown: v,
|
|
102
|
-
children: [/* @__PURE__ */ S("div", {
|
|
103
|
-
className: C.sliderTrack,
|
|
104
|
-
children: [n != null && /* @__PURE__ */ x("div", {
|
|
105
|
-
className: C.sliderBuffered,
|
|
106
|
-
style: { width: f(n) }
|
|
107
|
-
}), /* @__PURE__ */ x("div", {
|
|
108
|
-
className: C.sliderFill,
|
|
109
|
-
style: { width: f(t) }
|
|
110
|
-
})]
|
|
111
|
-
}), /* @__PURE__ */ x("span", {
|
|
112
|
-
className: C.sliderThumb,
|
|
113
|
-
style: { left: f(t) }
|
|
114
|
-
})]
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
var O = m(({ src: m, sources: O, poster: k, muted: re = !1, autoPlay: ie = !1, loop: A = !1, playsInline: ae = !0, preload: oe = "metadata", aspectRatio: se = "16 / 9", radius: j = 16, accentGradient: ce = te, tracks: M, transcript: N, transcriptTitle: P = "Transcript", "aria-label": F = "Video player", className: le, style: ue }, de) => {
|
|
118
|
-
let I = d(m, !!O?.length), L = I !== "file", R = !L && M ? M : [], z = R.map((e, t) => (e.kind ?? "captions") === "descriptions" ? -1 : t).filter((e) => e >= 0), B = p({
|
|
119
|
-
provider: I,
|
|
120
|
-
src: m,
|
|
121
|
-
muted: re,
|
|
122
|
-
autoPlay: ie,
|
|
123
|
-
loop: A
|
|
124
|
-
}), { state: V } = B, H = y(null), U = y(null), W = y(void 0), G = _(), fe = h((e) => {
|
|
125
|
-
U.current = e, B.videoRef(e);
|
|
126
|
-
}, [B]);
|
|
127
|
-
v(de, () => U.current, []);
|
|
128
|
-
let [K, pe] = b(!1), [me, q] = b(!1), [he, J] = b(!1), [ge, _e] = b(!1), [Y, ve] = b(() => R.findIndex((e) => e.default && (e.kind ?? "captions") !== "descriptions")), [X, Z] = b(!1), Q = _(), ye = y(null), be = y(null), [xe, Se] = b(void 0);
|
|
129
|
-
g(() => {
|
|
130
|
-
V.playing && _e(!0);
|
|
131
|
-
}, [V.playing]), g(() => {
|
|
132
|
-
if (Se(void 0), I !== "vimeo" || k || !m) return;
|
|
133
|
-
let e = !1;
|
|
134
|
-
return fetch(`https://vimeo.com/api/oembed.json?url=${encodeURIComponent(m)}&width=1280`).then((e) => e.ok ? e.json() : null).then((t) => {
|
|
135
|
-
!e && t?.thumbnail_url && Se(t.thumbnail_url);
|
|
136
|
-
}).catch(() => {}), () => {
|
|
137
|
-
e = !0;
|
|
138
|
-
};
|
|
139
|
-
}, [
|
|
140
|
-
I,
|
|
141
|
-
k,
|
|
142
|
-
m
|
|
143
|
-
]), g(() => {
|
|
144
|
-
let e = () => pe(document.fullscreenElement === H.current);
|
|
145
|
-
return document.addEventListener("fullscreenchange", e), () => document.removeEventListener("fullscreenchange", e);
|
|
146
|
-
}, []), g(() => {
|
|
147
|
-
K && X && be.current?.focus();
|
|
148
|
-
}, [K, X]);
|
|
149
|
-
let Ce = h(() => {
|
|
150
|
-
q(!1), window.clearTimeout(W.current), W.current = window.setTimeout(() => q(!0), ne);
|
|
151
|
-
}, []);
|
|
152
|
-
g(() => () => window.clearTimeout(W.current), []);
|
|
153
|
-
let $ = h(() => {
|
|
154
|
-
let e = H.current;
|
|
155
|
-
e && (document.fullscreenElement === e ? document.exitFullscreen().catch(() => {}) : e.requestFullscreen?.().catch(() => {}));
|
|
156
|
-
}, []), we = h(() => {
|
|
157
|
-
Z(!1), window.requestAnimationFrame(() => ye.current?.focus());
|
|
158
|
-
}, []);
|
|
159
|
-
g(() => {
|
|
160
|
-
let e = U.current;
|
|
161
|
-
if (!e || !R.length) return;
|
|
162
|
-
let t = e.textTracks;
|
|
163
|
-
for (let e = 0; e < t.length; e += 1) {
|
|
164
|
-
let n = t[e];
|
|
165
|
-
n && (n.mode = e === Y ? "showing" : "hidden");
|
|
166
|
-
}
|
|
167
|
-
}, [
|
|
168
|
-
Y,
|
|
169
|
-
R.length,
|
|
170
|
-
V.duration
|
|
171
|
-
]), g(() => {
|
|
172
|
-
let e = U.current;
|
|
173
|
-
if (!e || !R.length || typeof VTTCue > "u" || typeof CSS < "u" && CSS.supports?.("-webkit-box-reflect", "below 0px")) return;
|
|
174
|
-
let t = Array.from(e.textTracks).map((e) => {
|
|
175
|
-
let t = () => {
|
|
176
|
-
let t = e.cues ?? e.activeCues;
|
|
177
|
-
if (t) for (let e = 0; e < t.length; e += 1) {
|
|
178
|
-
let n = t[e];
|
|
179
|
-
n instanceof VTTCue && n.line !== w && (n.line = w);
|
|
180
|
-
}
|
|
181
|
-
};
|
|
182
|
-
return t(), e.addEventListener("cuechange", t), [e, t];
|
|
183
|
-
});
|
|
184
|
-
return () => t.forEach(([e, t]) => e.removeEventListener("cuechange", t));
|
|
185
|
-
}, [
|
|
186
|
-
R.length,
|
|
187
|
-
Y,
|
|
188
|
-
V.duration
|
|
189
|
-
]);
|
|
190
|
-
let Te = h(() => {
|
|
191
|
-
if (!z.length) return;
|
|
192
|
-
let e = z.indexOf(Y), t = e + 1 < z.length ? z[e + 1] ?? -1 : -1;
|
|
193
|
-
ve(e === -1 ? z[0] ?? -1 : t);
|
|
194
|
-
}, [z, Y]), Ee = (e) => {
|
|
195
|
-
if (e.target === e.currentTarget) switch (e.key) {
|
|
196
|
-
case " ":
|
|
197
|
-
case "k":
|
|
198
|
-
e.preventDefault(), B.toggle();
|
|
199
|
-
break;
|
|
200
|
-
case "f":
|
|
201
|
-
e.preventDefault(), $();
|
|
202
|
-
break;
|
|
203
|
-
case "m":
|
|
204
|
-
e.preventDefault(), B.toggleMute();
|
|
205
|
-
break;
|
|
206
|
-
case "c":
|
|
207
|
-
e.preventDefault(), Te();
|
|
208
|
-
break;
|
|
209
|
-
case "t":
|
|
210
|
-
N != null && (e.preventDefault(), Z((e) => !e));
|
|
211
|
-
break;
|
|
212
|
-
case "ArrowRight":
|
|
213
|
-
e.preventDefault(), B.seekBy(5);
|
|
214
|
-
break;
|
|
215
|
-
case "ArrowLeft":
|
|
216
|
-
e.preventDefault(), B.seekBy(-5);
|
|
217
|
-
break;
|
|
218
|
-
default:
|
|
219
|
-
}
|
|
220
|
-
}, De = k ?? f(I, m) ?? xe, Oe = V.duration ? E(V.currentTime / V.duration) : 0, ke = V.muted || V.volume === 0 ? a : V.volume < .5 ? i : ee, Ae = {
|
|
221
|
-
"--vp-radius": `${j}px`,
|
|
222
|
-
"--vp-gradient": ce,
|
|
223
|
-
aspectRatio: K ? void 0 : se
|
|
224
|
-
}, je = I === "file" ? /* @__PURE__ */ S("video", {
|
|
225
|
-
ref: fe,
|
|
226
|
-
className: C.video,
|
|
227
|
-
src: O?.length ? void 0 : m,
|
|
228
|
-
poster: k,
|
|
229
|
-
muted: re,
|
|
230
|
-
autoPlay: ie,
|
|
231
|
-
loop: A,
|
|
232
|
-
playsInline: ae,
|
|
233
|
-
preload: oe,
|
|
234
|
-
onClick: B.toggle,
|
|
235
|
-
children: [O?.map((e) => /* @__PURE__ */ x("source", {
|
|
236
|
-
src: e.src,
|
|
237
|
-
type: e.type
|
|
238
|
-
}, e.src)), R.map((e) => /* @__PURE__ */ x("track", {
|
|
239
|
-
src: e.src,
|
|
240
|
-
srcLang: e.srclang,
|
|
241
|
-
label: e.label,
|
|
242
|
-
kind: e.kind ?? "captions"
|
|
243
|
-
}, e.src))]
|
|
244
|
-
}) : /* @__PURE__ */ x("div", {
|
|
245
|
-
ref: B.mountRef,
|
|
246
|
-
className: C.embed
|
|
247
|
-
}), Me = /* @__PURE__ */ S("div", {
|
|
248
|
-
ref: H,
|
|
249
|
-
role: "region",
|
|
250
|
-
"aria-label": F,
|
|
251
|
-
"aria-labelledby": G,
|
|
252
|
-
tabIndex: 0,
|
|
253
|
-
className: e("hsui-video-player", C.player, {
|
|
254
|
-
[C.playing]: V.playing,
|
|
255
|
-
[C.ended]: V.ended,
|
|
256
|
-
[C.idle]: me && V.playing && !he,
|
|
257
|
-
[C.docked]: N != null && X,
|
|
258
|
-
[C.fullscreenTranscriptVisible]: K && X
|
|
259
|
-
}, le),
|
|
260
|
-
style: {
|
|
261
|
-
...Ae,
|
|
262
|
-
...ue
|
|
263
|
-
},
|
|
264
|
-
onPointerMove: Ce,
|
|
265
|
-
onPointerLeave: () => V.playing && q(!0),
|
|
266
|
-
onKeyDown: Ee,
|
|
267
|
-
onDoubleClick: $,
|
|
268
|
-
children: [
|
|
269
|
-
/* @__PURE__ */ x("span", {
|
|
270
|
-
id: G,
|
|
271
|
-
className: "sr-only",
|
|
272
|
-
children: F
|
|
273
|
-
}),
|
|
274
|
-
je,
|
|
275
|
-
L && !ge && /* @__PURE__ */ x("div", {
|
|
276
|
-
className: C.startCover,
|
|
277
|
-
"aria-hidden": "true",
|
|
278
|
-
style: De ? { backgroundImage: `url("${De}")` } : void 0
|
|
279
|
-
}),
|
|
280
|
-
L && /* @__PURE__ */ x("button", {
|
|
281
|
-
type: "button",
|
|
282
|
-
className: C.tapLayer,
|
|
283
|
-
onClick: B.toggle,
|
|
284
|
-
"aria-label": V.playing ? "Pause" : "Play",
|
|
285
|
-
tabIndex: -1
|
|
286
|
-
}),
|
|
287
|
-
/* @__PURE__ */ x("div", {
|
|
288
|
-
className: C.scrim,
|
|
289
|
-
"aria-hidden": "true"
|
|
290
|
-
}),
|
|
291
|
-
!V.playing && /* @__PURE__ */ x("button", {
|
|
292
|
-
type: "button",
|
|
293
|
-
className: C.centerPlay,
|
|
294
|
-
onClick: B.toggle,
|
|
295
|
-
"aria-label": V.ended ? "Replay" : "Play",
|
|
296
|
-
tabIndex: -1,
|
|
297
|
-
children: /* @__PURE__ */ x(u, {
|
|
298
|
-
name: l,
|
|
299
|
-
size: 32
|
|
300
|
-
})
|
|
301
|
-
}),
|
|
302
|
-
/* @__PURE__ */ S("div", {
|
|
303
|
-
className: C.controlBar,
|
|
304
|
-
children: [
|
|
305
|
-
/* @__PURE__ */ x("button", {
|
|
306
|
-
type: "button",
|
|
307
|
-
className: C.button,
|
|
308
|
-
onClick: B.toggle,
|
|
309
|
-
"aria-label": V.playing ? "Pause" : "Play",
|
|
310
|
-
children: /* @__PURE__ */ x(u, {
|
|
311
|
-
name: V.playing ? t : l,
|
|
312
|
-
size: 20
|
|
313
|
-
})
|
|
314
|
-
}),
|
|
315
|
-
/* @__PURE__ */ S("div", {
|
|
316
|
-
className: C.volumeWrap,
|
|
317
|
-
children: [/* @__PURE__ */ x("button", {
|
|
318
|
-
type: "button",
|
|
319
|
-
className: C.button,
|
|
320
|
-
onClick: B.toggleMute,
|
|
321
|
-
"aria-label": V.muted ? "Unmute" : "Mute",
|
|
322
|
-
"aria-pressed": V.muted,
|
|
323
|
-
children: /* @__PURE__ */ x(u, {
|
|
324
|
-
name: ke,
|
|
325
|
-
size: 20
|
|
326
|
-
})
|
|
327
|
-
}), /* @__PURE__ */ x("div", {
|
|
328
|
-
className: C.volumePopover,
|
|
329
|
-
children: /* @__PURE__ */ x(D, {
|
|
330
|
-
className: C.volumeSlider,
|
|
331
|
-
value: V.volume,
|
|
332
|
-
ariaLabel: "Volume",
|
|
333
|
-
ariaValueText: `${Math.round(V.volume * 100)}%`,
|
|
334
|
-
onChange: B.setVolume
|
|
335
|
-
})
|
|
336
|
-
})]
|
|
337
|
-
}),
|
|
338
|
-
/* @__PURE__ */ x("span", {
|
|
339
|
-
className: C.time,
|
|
340
|
-
children: T(V.currentTime)
|
|
341
|
-
}),
|
|
342
|
-
/* @__PURE__ */ x(D, {
|
|
343
|
-
className: C.progress,
|
|
344
|
-
value: Oe,
|
|
345
|
-
buffered: V.buffered,
|
|
346
|
-
ariaLabel: "Seek",
|
|
347
|
-
ariaValueText: `${T(V.currentTime)} of ${T(V.duration)}`,
|
|
348
|
-
onChange: B.seekFraction,
|
|
349
|
-
onScrubStart: () => {
|
|
350
|
-
J(!0), B.beginSeek();
|
|
351
|
-
},
|
|
352
|
-
onScrubEnd: () => {
|
|
353
|
-
J(!1), B.endSeek();
|
|
354
|
-
}
|
|
355
|
-
}),
|
|
356
|
-
/* @__PURE__ */ x("span", {
|
|
357
|
-
className: e(C.time, C.timeDuration),
|
|
358
|
-
children: T(V.duration)
|
|
359
|
-
}),
|
|
360
|
-
N != null && /* @__PURE__ */ x("button", {
|
|
361
|
-
ref: ye,
|
|
362
|
-
type: "button",
|
|
363
|
-
className: e(C.button, C.transcriptButton),
|
|
364
|
-
onClick: () => Z((e) => !e),
|
|
365
|
-
"aria-expanded": X,
|
|
366
|
-
"aria-controls": Q,
|
|
367
|
-
"aria-label": X ? "Hide transcript" : "Show transcript",
|
|
368
|
-
children: /* @__PURE__ */ x(u, {
|
|
369
|
-
name: o,
|
|
370
|
-
size: 20
|
|
371
|
-
})
|
|
372
|
-
}),
|
|
373
|
-
z.length > 0 && /* @__PURE__ */ x("button", {
|
|
374
|
-
type: "button",
|
|
375
|
-
className: e(C.button, C.ccButton),
|
|
376
|
-
onClick: Te,
|
|
377
|
-
"aria-pressed": Y !== -1,
|
|
378
|
-
"aria-label": Y === -1 ? "Turn on captions" : z.length > 1 ? `Captions: ${R[Y]?.label ?? ""} — next track` : "Turn off captions",
|
|
379
|
-
children: /* @__PURE__ */ x(u, {
|
|
380
|
-
name: c,
|
|
381
|
-
size: 20
|
|
382
|
-
})
|
|
383
|
-
}),
|
|
384
|
-
/* @__PURE__ */ x("button", {
|
|
385
|
-
type: "button",
|
|
386
|
-
className: C.button,
|
|
387
|
-
onClick: $,
|
|
388
|
-
"aria-label": K ? "Exit fullscreen" : "Enter fullscreen",
|
|
389
|
-
children: /* @__PURE__ */ x(u, {
|
|
390
|
-
name: K ? r : n,
|
|
391
|
-
size: 20
|
|
392
|
-
})
|
|
393
|
-
})
|
|
394
|
-
]
|
|
395
|
-
}),
|
|
396
|
-
K && N != null && /* @__PURE__ */ S("aside", {
|
|
397
|
-
id: Q,
|
|
398
|
-
role: "region",
|
|
399
|
-
"aria-label": P,
|
|
400
|
-
"aria-hidden": !X,
|
|
401
|
-
inert: !X,
|
|
402
|
-
className: e(C.fullscreenTranscript, { [C.fullscreenTranscriptOpen]: X }),
|
|
403
|
-
onKeyDown: (e) => {
|
|
404
|
-
e.key === "Escape" && (e.preventDefault(), we());
|
|
405
|
-
},
|
|
406
|
-
children: [/* @__PURE__ */ S("div", {
|
|
407
|
-
className: C.fullscreenTranscriptHeader,
|
|
408
|
-
children: [/* @__PURE__ */ x("h2", {
|
|
409
|
-
className: C.fullscreenTranscriptTitle,
|
|
410
|
-
children: P
|
|
411
|
-
}), /* @__PURE__ */ x("button", {
|
|
412
|
-
ref: be,
|
|
413
|
-
type: "button",
|
|
414
|
-
className: C.fullscreenTranscriptClose,
|
|
415
|
-
onClick: we,
|
|
416
|
-
"aria-label": "Close transcript",
|
|
417
|
-
children: /* @__PURE__ */ x(u, {
|
|
418
|
-
name: s,
|
|
419
|
-
size: 20
|
|
420
|
-
})
|
|
421
|
-
})]
|
|
422
|
-
}), /* @__PURE__ */ x("div", {
|
|
423
|
-
className: e(C.transcriptBody, C.fullscreenTranscriptBody),
|
|
424
|
-
children: N
|
|
425
|
-
})]
|
|
426
|
-
})
|
|
427
|
-
]
|
|
428
|
-
});
|
|
429
|
-
return N == null ? Me : /* @__PURE__ */ S("div", {
|
|
430
|
-
className: e("hsui-video-player-stack", C.stack),
|
|
431
|
-
children: [Me, !K && /* @__PURE__ */ x("div", {
|
|
432
|
-
className: e(C.transcriptReveal, { [C.transcriptRevealOpen]: X }),
|
|
433
|
-
inert: !X,
|
|
434
|
-
children: /* @__PURE__ */ x("div", {
|
|
435
|
-
className: C.transcriptClip,
|
|
436
|
-
children: /* @__PURE__ */ x("div", {
|
|
437
|
-
id: Q,
|
|
438
|
-
role: "region",
|
|
439
|
-
"aria-label": P,
|
|
440
|
-
className: C.transcript,
|
|
441
|
-
style: {
|
|
442
|
-
borderBottomLeftRadius: j,
|
|
443
|
-
borderBottomRightRadius: j
|
|
444
|
-
},
|
|
445
|
-
children: /* @__PURE__ */ x("div", {
|
|
446
|
-
className: C.transcriptBody,
|
|
447
|
-
children: N
|
|
448
|
-
})
|
|
449
|
-
})
|
|
450
|
-
})
|
|
451
|
-
})]
|
|
452
|
-
});
|
|
453
|
-
});
|
|
454
|
-
O.displayName = "VideoPlayer";
|
|
455
|
-
//#endregion
|
|
456
|
-
export { O as t };
|