@factorialco/f0-react 10.6.1 → 10.8.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/dist/{ChatPostComposerDialog-BeJZv7tT.js → ChatPostComposerDialog-Fz7bdV_-.js} +3 -3
- package/dist/{CoachmarkProvider-DVF40v2q.js → CoachmarkProvider-DqNqwEPd.js} +21880 -21945
- package/dist/{DocumentToolbar-rCarM1oo.js → DocumentToolbar-B4aCipER.js} +5 -5
- package/dist/{ChatDocxThumbnail-DdI_ITWn.js → DocxThumbnail-kHTNnwW0.js} +1 -1
- package/dist/{DocxViewer-C1dP05wX.js → DocxViewer-BOdYordL.js} +2 -2
- package/dist/{F0AiProcessingOverlay-CrvPHV1G.js → F0AiProcessingOverlay-BTW13lnQ.js} +1682 -2192
- package/dist/{F0Box-D0fWIRgc.js → F0Box-CYL5_Zhb.js} +1 -1
- package/dist/{F0CanvasPanel-C7vHU_iJ.js → F0CanvasPanel-BcBFycU-.js} +9869 -7037
- package/dist/F0DocumentViewer-BqRsz00c.js +3 -0
- package/dist/{F0DocumentViewer-BrxSgrT8.js → F0DocumentViewer-CWZNde9w.js} +8 -8
- package/dist/{F0Map-DC_Mplnx.js → F0Map-4fqLL5gP.js} +22 -22
- package/dist/{F0Select-CovHF33V.js → F0Select-By_QpX1S.js} +2 -2
- package/dist/{F0VideoPlayer-NjaAU0Gm.js → F0VideoPlayer-CTsCZ4u5.js} +105 -105
- package/dist/F0VideoPlayer-DEpDxvjC.js +1 -0
- package/dist/{Map-D6mJxw2a.js → Map-B_fzR9ly.js} +29 -29
- package/dist/{ChatPdfThumbnail-adL3N5Xz.js → PdfThumbnail-BLNfQ1EH.js} +2 -2
- package/dist/{ChatSheetThumbnail-BKCy7BGq.js → SheetThumbnail-HtGezPp4.js} +1 -1
- package/dist/{SheetViewer-8ZWEuOLq.js → SheetViewer-BhZTOpb4.js} +4 -4
- package/dist/{ChatTextThumbnail-Ct32PcXO.js → TextThumbnail-X04JgaNI.js} +1 -1
- package/dist/{TextViewer-B00Rmqc7.js → TextViewer-B1eR_7q4.js} +2 -2
- package/dist/ai.d.ts +4 -4
- package/dist/ai.js +5 -5
- package/dist/component-status.js +51 -7
- package/dist/{dist-7YY6sRd4.js → dist-CUsub1Mu.js} +1 -1
- package/dist/dist-Dt-cTb6D.js +43 -0
- package/dist/experimental.d.ts +2 -2
- package/dist/experimental.js +8554 -10320
- package/dist/{exports-B1AxzHkB.d.ts → exports-cU26nMV5.d.ts} +449 -16
- package/dist/f0.d.ts +5 -5
- package/dist/f0.js +2034 -2034
- package/dist/{i18n-provider-defaults-DliS9uYl.js → i18n-provider-defaults-BA2_-hRH.js} +2 -0
- package/dist/{i18n-provider-defaults-DiJM3DSg.d.ts → i18n-provider-defaults-m88KkXdP.d.ts} +2 -0
- package/dist/i18n-provider-defaults.d.ts +1 -1
- package/dist/i18n-provider-defaults.js +1 -1
- package/dist/{index-DQo_UZ7M.d.ts → index-BDEEuyti.d.ts} +3 -3
- package/dist/{index-CHpMOnlX.d.ts → index-BftFpZQm.d.ts} +95 -4
- package/dist/{maplibre-C8TCdToL.js → maplibre-NpfvETJP.js} +1 -1
- package/dist/{pdfWorker-8f29nzGo.js → pdfWorker-CA8jPCRh.js} +2 -2
- package/dist/{popover-B2hEEubt.js → popover-B7fqB9lu.js} +1 -1
- package/dist/styles.css +1 -1
- package/dist/{useData-DjJsB0qa.js → useData-CAl9SKtE.js} +1 -1
- package/dist/useFullscreen-CNwpzjpz.js +23 -0
- package/package.json +1 -1
- package/dist/F0DocumentViewer-Crhq3XFQ.js +0 -3
- package/dist/F0VideoPlayer-C0kP3yFk.js +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { t as D } from "./
|
|
1
|
+
import { A as e, B as t, F as n, I as r, L as i, U as a, V as o, a as s, an as c, ar as l, b as u, i as d, in as f, j as p, rn as m, rr as h, t as g, z as _ } from "./popover-B7fqB9lu.js";
|
|
2
|
+
import { I as v, L as y } from "./tooltip-TOvfXq9F.js";
|
|
3
|
+
import { Bo as b, Es as x, Ha as S, Ua as ee, Wa as C, lo as te, po as w, qo as T, uo as ne, us as re } from "./F0CanvasPanel-BcBFycU-.js";
|
|
4
|
+
import { t as E } from "./Check-DAp9gCRh.js";
|
|
5
|
+
import { t as D } from "./useFullscreen-CNwpzjpz.js";
|
|
6
6
|
import { forwardRef as O, useCallback as k, useEffect as A, useId as j, useMemo as M, useRef as N, useState as P } from "react";
|
|
7
7
|
import { jsx as F, jsxs as I } from "react/jsx-runtime";
|
|
8
8
|
//#region src/elements/lib/localized.ts
|
|
@@ -190,24 +190,24 @@ ae.displayName = "CaptionsFilledIcon";
|
|
|
190
190
|
//#endregion
|
|
191
191
|
//#region src/blocks/F0VideoPlayer/components/PlaybackRateMenu.tsx
|
|
192
192
|
function oe({ value: e, onChange: t, containerRef: n }) {
|
|
193
|
-
let { t: r } =
|
|
194
|
-
return /* @__PURE__ */ I(
|
|
193
|
+
let { t: r } = m(), [i, a] = P(!1);
|
|
194
|
+
return /* @__PURE__ */ I(g, {
|
|
195
195
|
open: i,
|
|
196
196
|
onOpenChange: a,
|
|
197
|
-
children: [/* @__PURE__ */ F(
|
|
197
|
+
children: [/* @__PURE__ */ F(s, {
|
|
198
198
|
asChild: !0,
|
|
199
|
-
children: /* @__PURE__ */ F(
|
|
199
|
+
children: /* @__PURE__ */ F(u, {
|
|
200
200
|
variant: "ghost",
|
|
201
201
|
size: "sm",
|
|
202
202
|
label: J(e),
|
|
203
203
|
"aria-label": r("videoPlayer.playbackSpeed", { rate: J(e) })
|
|
204
204
|
})
|
|
205
|
-
}), /* @__PURE__ */ F(
|
|
205
|
+
}), /* @__PURE__ */ F(d, {
|
|
206
206
|
container: n.current,
|
|
207
207
|
side: "top",
|
|
208
208
|
align: "end",
|
|
209
209
|
sideOffset: 8,
|
|
210
|
-
className:
|
|
210
|
+
className: v("flex w-auto min-w-[7rem] flex-col gap-0.5 rounded-md border", "border-solid border-f1-border-secondary bg-f1-background p-1 shadow-md"),
|
|
211
211
|
role: "menu",
|
|
212
212
|
"aria-label": r("videoPlayer.playbackSpeedLabel"),
|
|
213
213
|
onKeyDown: (e) => {
|
|
@@ -237,13 +237,13 @@ function oe({ value: e, onChange: t, containerRef: n }) {
|
|
|
237
237
|
type: "button",
|
|
238
238
|
role: "menuitemradio",
|
|
239
239
|
"aria-checked": r,
|
|
240
|
-
className:
|
|
240
|
+
className: v("relative flex items-center rounded-xs py-1.5 pl-8 pr-3", "cursor-pointer border-none bg-transparent text-left text-sm font-medium tabular-nums", "text-f1-foreground transition-colors hover:bg-f1-background-secondary", "focus-visible:bg-f1-background-secondary focus-visible:outline-none", "[&_svg]:h-3.5 [&_svg]:w-3.5"),
|
|
241
241
|
onClick: () => {
|
|
242
242
|
t(n), a(!1);
|
|
243
243
|
},
|
|
244
244
|
children: [r ? /* @__PURE__ */ F("span", {
|
|
245
245
|
className: "absolute left-2.5 inline-flex items-center",
|
|
246
|
-
children: /* @__PURE__ */ F(
|
|
246
|
+
children: /* @__PURE__ */ F(E, {})
|
|
247
247
|
}) : null, J(n)]
|
|
248
248
|
}, n);
|
|
249
249
|
})
|
|
@@ -253,23 +253,23 @@ function oe({ value: e, onChange: t, containerRef: n }) {
|
|
|
253
253
|
//#endregion
|
|
254
254
|
//#region src/blocks/F0VideoPlayer/components/Seekbar.tsx
|
|
255
255
|
function se({ currentTime: e, duration: t, markerTime: n, blockSeekPastMarker: r = !1, onSeek: i }) {
|
|
256
|
-
let { t: a } =
|
|
256
|
+
let { t: a } = m(), o = N(null), [s, c] = P(!1), [l, u] = P(null), d = t > 0 ? Math.min(1, e / t) : 0, f = n !== void 0 && t > 0 ? Math.min(1, n / t) : 0, p = n !== void 0 && t > 0 && n > 0 && n < t - .25 && e < n - .25, h = (e) => {
|
|
257
257
|
let t = o.current;
|
|
258
258
|
if (!t) return 0;
|
|
259
259
|
let n = t.getBoundingClientRect();
|
|
260
260
|
return Math.max(0, Math.min(1, (e - n.left) / n.width));
|
|
261
261
|
}, g = (e) => {
|
|
262
|
-
t && i(
|
|
262
|
+
t && i(h(e) * t);
|
|
263
263
|
}, _ = (e) => {
|
|
264
264
|
t && (e.preventDefault(), e.currentTarget.setPointerCapture(e.pointerId), c(!0), g(e.clientX));
|
|
265
|
-
},
|
|
266
|
-
t && (u(
|
|
265
|
+
}, b = (e) => {
|
|
266
|
+
t && (u(h(e.clientX)), s && g(e.clientX));
|
|
267
267
|
}, x = (e) => {
|
|
268
268
|
s && (c(!1), e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId));
|
|
269
269
|
}, S = l !== null && r && n !== void 0 && l > f;
|
|
270
270
|
return /* @__PURE__ */ I("div", {
|
|
271
271
|
ref: o,
|
|
272
|
-
className:
|
|
272
|
+
className: v("relative flex h-4 flex-1 items-center rounded-sm", "cursor-pointer touch-none", y()),
|
|
273
273
|
role: "slider",
|
|
274
274
|
tabIndex: 0,
|
|
275
275
|
"aria-label": a("videoPlayer.seekLabel"),
|
|
@@ -281,7 +281,7 @@ function se({ currentTime: e, duration: t, markerTime: n, blockSeekPastMarker: r
|
|
|
281
281
|
total: q(t)
|
|
282
282
|
}),
|
|
283
283
|
onPointerDown: _,
|
|
284
|
-
onPointerMove:
|
|
284
|
+
onPointerMove: b,
|
|
285
285
|
onPointerUp: x,
|
|
286
286
|
onPointerCancel: x,
|
|
287
287
|
onLostPointerCapture: () => c(!1),
|
|
@@ -328,33 +328,33 @@ function se({ currentTime: e, duration: t, markerTime: n, blockSeekPastMarker: r
|
|
|
328
328
|
//#endregion
|
|
329
329
|
//#region src/blocks/F0VideoPlayer/components/SettingsMenu.tsx
|
|
330
330
|
var $ = "off", ce = "py-2 pr-4 text-base font-medium", le = "gap-2 py-2 pl-3 pr-2 text-base font-medium", ue = "max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[13rem] overflow-y-auto p-1";
|
|
331
|
-
function de({ icon: e, label:
|
|
332
|
-
let h = p !== void 0, g =
|
|
333
|
-
return /* @__PURE__ */ I(
|
|
331
|
+
function de({ icon: e, label: a, container: s, options: l, value: u, onLanguageChange: d, on: f, onOff: p, offLabel: m }) {
|
|
332
|
+
let h = p !== void 0, g = l.find((e) => e.locale === u), v = h && !f ? m : g ? B(g) : m;
|
|
333
|
+
return /* @__PURE__ */ I(_, { children: [/* @__PURE__ */ I(o, {
|
|
334
334
|
className: le,
|
|
335
335
|
children: [
|
|
336
|
-
/* @__PURE__ */ F(
|
|
336
|
+
/* @__PURE__ */ F(c, { icon: e }),
|
|
337
337
|
/* @__PURE__ */ F("span", {
|
|
338
338
|
className: "flex-1",
|
|
339
|
-
children:
|
|
339
|
+
children: a
|
|
340
340
|
}),
|
|
341
341
|
/* @__PURE__ */ F("span", {
|
|
342
342
|
className: "text-f1-foreground-secondary",
|
|
343
|
-
children:
|
|
343
|
+
children: v
|
|
344
344
|
})
|
|
345
345
|
]
|
|
346
|
-
}), /* @__PURE__ */ F(
|
|
347
|
-
container:
|
|
348
|
-
children: /* @__PURE__ */ F(
|
|
346
|
+
}), /* @__PURE__ */ F(n, {
|
|
347
|
+
container: s ?? void 0,
|
|
348
|
+
children: /* @__PURE__ */ F(t, {
|
|
349
349
|
className: ue,
|
|
350
|
-
children: /* @__PURE__ */ I(
|
|
350
|
+
children: /* @__PURE__ */ I(r, {
|
|
351
351
|
value: h ? f ? u : $ : u,
|
|
352
352
|
onValueChange: (e) => h && e === $ ? p() : d(e),
|
|
353
|
-
children: [
|
|
353
|
+
children: [l.map((e) => /* @__PURE__ */ F(i, {
|
|
354
354
|
value: e.locale,
|
|
355
355
|
className: ce,
|
|
356
356
|
children: B(e)
|
|
357
|
-
}, e.locale)), h ? /* @__PURE__ */ F(
|
|
357
|
+
}, e.locale)), h ? /* @__PURE__ */ F(i, {
|
|
358
358
|
value: $,
|
|
359
359
|
className: ce,
|
|
360
360
|
children: m
|
|
@@ -363,25 +363,25 @@ function de({ icon: e, label: t, container: o, options: c, value: u, onLanguageC
|
|
|
363
363
|
})
|
|
364
364
|
})] });
|
|
365
365
|
}
|
|
366
|
-
function fe({ containerRef:
|
|
367
|
-
let { t: y } =
|
|
368
|
-
return /* @__PURE__ */ I(
|
|
366
|
+
function fe({ containerRef: t, audioLanguages: n, audioLanguage: r, onAudioLanguageChange: i, captionLanguages: o, captionLanguage: s, captionsOn: c, onCaptionLanguageChange: l, onCaptionsOff: d, audioDescriptionLanguages: f, audioDescriptionLanguage: h, audioDescriptionOn: g, onAudioDescriptionLanguageChange: _, onAudioDescriptionOff: v }) {
|
|
367
|
+
let { t: y } = m(), b = t.current, x = y("videoPlayer.off");
|
|
368
|
+
return /* @__PURE__ */ I(e, { children: [/* @__PURE__ */ F(a, {
|
|
369
369
|
asChild: !0,
|
|
370
|
-
children: /* @__PURE__ */ F(
|
|
370
|
+
children: /* @__PURE__ */ F(u, {
|
|
371
371
|
variant: "ghost",
|
|
372
372
|
size: "sm",
|
|
373
373
|
hideLabel: !0,
|
|
374
374
|
icon: w,
|
|
375
375
|
label: y("videoPlayer.settings")
|
|
376
376
|
})
|
|
377
|
-
}), /* @__PURE__ */ I(
|
|
377
|
+
}), /* @__PURE__ */ I(p, {
|
|
378
378
|
container: b,
|
|
379
379
|
side: "top",
|
|
380
380
|
align: "end",
|
|
381
381
|
className: ue,
|
|
382
382
|
children: [
|
|
383
383
|
n.length > 1 ? /* @__PURE__ */ F(de, {
|
|
384
|
-
icon:
|
|
384
|
+
icon: re,
|
|
385
385
|
label: y("videoPlayer.audio"),
|
|
386
386
|
container: b,
|
|
387
387
|
options: n,
|
|
@@ -389,15 +389,15 @@ function fe({ containerRef: e, audioLanguages: n, audioLanguage: r, onAudioLangu
|
|
|
389
389
|
onLanguageChange: i,
|
|
390
390
|
offLabel: x
|
|
391
391
|
}) : null,
|
|
392
|
-
|
|
392
|
+
o.length > 1 ? /* @__PURE__ */ F(de, {
|
|
393
393
|
icon: Q,
|
|
394
394
|
label: y("videoPlayer.subtitles"),
|
|
395
395
|
container: b,
|
|
396
|
-
options:
|
|
396
|
+
options: o,
|
|
397
397
|
value: s,
|
|
398
398
|
on: c,
|
|
399
399
|
onLanguageChange: l,
|
|
400
|
-
onOff:
|
|
400
|
+
onOff: d,
|
|
401
401
|
offLabel: x
|
|
402
402
|
}) : null,
|
|
403
403
|
f.length > 1 ? /* @__PURE__ */ F(de, {
|
|
@@ -405,7 +405,7 @@ function fe({ containerRef: e, audioLanguages: n, audioLanguage: r, onAudioLangu
|
|
|
405
405
|
label: y("videoPlayer.audioDescription"),
|
|
406
406
|
container: b,
|
|
407
407
|
options: f,
|
|
408
|
-
value:
|
|
408
|
+
value: h,
|
|
409
409
|
on: g,
|
|
410
410
|
onLanguageChange: _,
|
|
411
411
|
onOff: v,
|
|
@@ -420,20 +420,20 @@ function pe(e) {
|
|
|
420
420
|
//#endregion
|
|
421
421
|
//#region src/blocks/F0VideoPlayer/components/VolumeControl.tsx
|
|
422
422
|
function me(e, t) {
|
|
423
|
-
return t || e === 0 ?
|
|
423
|
+
return t || e === 0 ? S : e <= .5 ? ee : C;
|
|
424
424
|
}
|
|
425
425
|
function he({ volume: e, isMuted: t, onToggleMute: n, onVolumeChange: r, silent: i = !1 }) {
|
|
426
|
-
let { t: a } =
|
|
427
|
-
return i ? /* @__PURE__ */ F(
|
|
426
|
+
let { t: a } = m(), o = t || e === 0;
|
|
427
|
+
return i ? /* @__PURE__ */ F(u, {
|
|
428
428
|
variant: "ghost",
|
|
429
429
|
size: "sm",
|
|
430
430
|
hideLabel: !0,
|
|
431
431
|
disabled: !0,
|
|
432
|
-
icon:
|
|
432
|
+
icon: S,
|
|
433
433
|
label: a("videoPlayer.noAudio")
|
|
434
434
|
}) : /* @__PURE__ */ I("div", {
|
|
435
435
|
className: "flex items-center gap-1",
|
|
436
|
-
children: [/* @__PURE__ */ F(
|
|
436
|
+
children: [/* @__PURE__ */ F(u, {
|
|
437
437
|
variant: "ghost",
|
|
438
438
|
size: "sm",
|
|
439
439
|
hideLabel: !0,
|
|
@@ -447,7 +447,7 @@ function he({ volume: e, isMuted: t, onToggleMute: n, onVolumeChange: r, silent:
|
|
|
447
447
|
});
|
|
448
448
|
}
|
|
449
449
|
function ge({ value: e, onChange: t }) {
|
|
450
|
-
let { t: n } =
|
|
450
|
+
let { t: n } = m(), r = N(null), [i, a] = P(!1), o = Math.max(0, Math.min(1, e)), s = (e) => {
|
|
451
451
|
let t = r.current;
|
|
452
452
|
if (!t) return 0;
|
|
453
453
|
let n = t.getBoundingClientRect(), i = n.width - 12;
|
|
@@ -461,7 +461,7 @@ function ge({ value: e, onChange: t }) {
|
|
|
461
461
|
};
|
|
462
462
|
return /* @__PURE__ */ I("div", {
|
|
463
463
|
ref: r,
|
|
464
|
-
className:
|
|
464
|
+
className: v("relative flex h-4 w-[60px] items-center rounded-sm", "cursor-pointer touch-none", y()),
|
|
465
465
|
role: "slider",
|
|
466
466
|
tabIndex: 0,
|
|
467
467
|
"aria-label": n("videoPlayer.volume"),
|
|
@@ -510,20 +510,20 @@ function ge({ value: e, onChange: t }) {
|
|
|
510
510
|
}
|
|
511
511
|
//#endregion
|
|
512
512
|
//#region src/blocks/F0VideoPlayer/components/Controls.tsx
|
|
513
|
-
function _e({ isPlaying: e, currentTime: t, duration: n, volume: r, isMuted: i, playbackRate: a, isFullscreen: o, markerTime: s, blockSeekPastMarker: c, containerRef: l, captionsAvailable:
|
|
514
|
-
let { t: H } =
|
|
515
|
-
audioLanguages:
|
|
513
|
+
function _e({ isPlaying: e, currentTime: t, duration: n, volume: r, isMuted: i, playbackRate: a, isFullscreen: o, markerTime: s, blockSeekPastMarker: c, containerRef: l, captionsAvailable: d, captionsOn: f, audioDescriptionAvailable: p, audioDescriptionOn: h, silent: g, persist: _, audioLanguages: y, audioLanguage: S, onAudioLanguageChange: ee, captionLanguages: C, captionLanguage: w, onCaptionLanguageChange: re, onCaptionsOff: E, audioDescriptionLanguages: D, audioDescriptionLanguage: O, onAudioDescriptionLanguageChange: k, onAudioDescriptionOff: A, onTogglePlay: j, onToggleMute: M, onVolumeChange: N, onPlaybackRateChange: P, onToggleFullscreen: L, onToggleCaptions: R, onToggleAudioDescription: z, onSeek: B, download: V }) {
|
|
514
|
+
let { t: H } = m(), U = d && C.length <= 1, W = p && D.length <= 1, G = pe({
|
|
515
|
+
audioLanguages: y.length,
|
|
516
516
|
captionLanguages: C.length,
|
|
517
517
|
audioDescriptionLanguages: D.length
|
|
518
518
|
});
|
|
519
519
|
return /* @__PURE__ */ I("div", {
|
|
520
|
-
className:
|
|
520
|
+
className: v("dark absolute inset-x-0 bottom-0 z-[2] flex select-none items-center gap-2", "rounded-b-[inherit] bg-gradient-to-t from-[#000000f2] via-[#000000b3] to-transparent px-3 py-3", "[text-shadow:0_1px_2px_rgba(0,0,0,0.55)] [&_svg]:drop-shadow-[0_1px_2px_rgba(0,0,0,0.55)]", "transition-opacity duration-200 motion-reduce:transition-none", !e || _ ? "opacity-100" : "opacity-0 group-hover:opacity-100 group-focus-within:opacity-100"),
|
|
521
521
|
children: [
|
|
522
|
-
/* @__PURE__ */ F(
|
|
522
|
+
/* @__PURE__ */ F(u, {
|
|
523
523
|
variant: "ghost",
|
|
524
524
|
size: "sm",
|
|
525
525
|
hideLabel: !0,
|
|
526
|
-
icon: e ?
|
|
526
|
+
icon: e ? ne : te,
|
|
527
527
|
label: H(e ? "videoPlayer.pause" : "videoPlayer.play"),
|
|
528
528
|
onClick: j
|
|
529
529
|
}),
|
|
@@ -554,7 +554,7 @@ function _e({ isPlaying: e, currentTime: t, duration: n, volume: r, isMuted: i,
|
|
|
554
554
|
onChange: P,
|
|
555
555
|
containerRef: l
|
|
556
556
|
}),
|
|
557
|
-
U ? /* @__PURE__ */ F(
|
|
557
|
+
U ? /* @__PURE__ */ F(u, {
|
|
558
558
|
variant: "ghost",
|
|
559
559
|
size: "sm",
|
|
560
560
|
hideLabel: !0,
|
|
@@ -563,32 +563,32 @@ function _e({ isPlaying: e, currentTime: t, duration: n, volume: r, isMuted: i,
|
|
|
563
563
|
"aria-pressed": f,
|
|
564
564
|
onClick: R
|
|
565
565
|
}) : null,
|
|
566
|
-
W ? /* @__PURE__ */ F(
|
|
566
|
+
W ? /* @__PURE__ */ F(u, {
|
|
567
567
|
variant: "ghost",
|
|
568
568
|
size: "sm",
|
|
569
569
|
hideLabel: !0,
|
|
570
|
-
icon:
|
|
570
|
+
icon: h ? ie : Z,
|
|
571
571
|
label: H("videoPlayer.audioDescription"),
|
|
572
|
-
"aria-pressed":
|
|
572
|
+
"aria-pressed": h,
|
|
573
573
|
onClick: z
|
|
574
574
|
}) : null,
|
|
575
575
|
G ? /* @__PURE__ */ F(fe, {
|
|
576
576
|
containerRef: l,
|
|
577
|
-
audioLanguages:
|
|
578
|
-
audioLanguage:
|
|
579
|
-
onAudioLanguageChange:
|
|
577
|
+
audioLanguages: y,
|
|
578
|
+
audioLanguage: S,
|
|
579
|
+
onAudioLanguageChange: ee,
|
|
580
580
|
captionLanguages: C,
|
|
581
581
|
captionLanguage: w,
|
|
582
582
|
captionsOn: f,
|
|
583
|
-
onCaptionLanguageChange:
|
|
584
|
-
onCaptionsOff:
|
|
583
|
+
onCaptionLanguageChange: re,
|
|
584
|
+
onCaptionsOff: E,
|
|
585
585
|
audioDescriptionLanguages: D,
|
|
586
586
|
audioDescriptionLanguage: O,
|
|
587
|
-
audioDescriptionOn:
|
|
587
|
+
audioDescriptionOn: h,
|
|
588
588
|
onAudioDescriptionLanguageChange: k,
|
|
589
589
|
onAudioDescriptionOff: A
|
|
590
590
|
}) : null,
|
|
591
|
-
V ? /* @__PURE__ */ F(
|
|
591
|
+
V ? /* @__PURE__ */ F(u, {
|
|
592
592
|
variant: "ghost",
|
|
593
593
|
size: "sm",
|
|
594
594
|
hideLabel: !0,
|
|
@@ -596,11 +596,11 @@ function _e({ isPlaying: e, currentTime: t, duration: n, volume: r, isMuted: i,
|
|
|
596
596
|
label: V.label,
|
|
597
597
|
onClick: V.onClick
|
|
598
598
|
}) : null,
|
|
599
|
-
/* @__PURE__ */ F(
|
|
599
|
+
/* @__PURE__ */ F(u, {
|
|
600
600
|
variant: "ghost",
|
|
601
601
|
size: "sm",
|
|
602
602
|
hideLabel: !0,
|
|
603
|
-
icon: o ?
|
|
603
|
+
icon: o ? b : T,
|
|
604
604
|
label: H(o ? "videoPlayer.exitFullscreen" : "videoPlayer.enterFullscreen"),
|
|
605
605
|
onClick: L
|
|
606
606
|
})
|
|
@@ -929,8 +929,8 @@ function Me({ video: e, onTrackAction: t }) {
|
|
|
929
929
|
}
|
|
930
930
|
//#endregion
|
|
931
931
|
//#region src/blocks/F0VideoPlayer/internal.tsx
|
|
932
|
-
function Ne({ src:
|
|
933
|
-
let { t:
|
|
932
|
+
function Ne({ src: e, poster: t, ariaLabel: n, silent: r = !1, persistControls: i = !1, content: a, defaultLanguage: o, autoPlay: s = !1, autoFocus: c = !1, download: l, restrictForwardSeek: u = !1, onTrackAction: d, onMilestone: p, onComplete: h, ...g }) {
|
|
933
|
+
let { t: _ } = m(), b = N(null), x = M(() => z(e), [e]), [S, ee] = P(() => V(x, o)), C = x.some((e) => e.locale === S) ? S : V(x, o), w = R(e, C) ?? "", T = M(() => z(a?.captions), [a?.captions]), [ne, re] = P(() => V(T, o)), E = T.some((e) => e.locale === ne) ? ne : V(T, o), O = R(a?.captions, E), j = M(() => z(a?.descriptions, a?.describedSrc), [a?.descriptions, a?.describedSrc]), [L, B] = P(() => V(j, o)), H = j.some((e) => e.locale === L) ? L : V(j, o), U = R(a?.descriptions, H), W = R(a?.describedSrc, H), [G, K] = P(!1), q = G && W ? W : w, J = je(q), Y = De(J.videoElement, O), X = xe(J.videoElement, {
|
|
934
934
|
enabled: G,
|
|
935
935
|
describedSrc: W,
|
|
936
936
|
descriptions: U
|
|
@@ -956,26 +956,26 @@ function Ne({ src: t, poster: n, ariaLabel: r, silent: i = !1, persistControls:
|
|
|
956
956
|
}, [W, Z]);
|
|
957
957
|
Me({
|
|
958
958
|
video: J.videoElement,
|
|
959
|
-
onTrackAction:
|
|
959
|
+
onTrackAction: d
|
|
960
960
|
}), Ae({
|
|
961
961
|
video: J.videoElement,
|
|
962
|
-
onMilestone:
|
|
962
|
+
onMilestone: p,
|
|
963
963
|
resetKey: w
|
|
964
964
|
}), ke({
|
|
965
965
|
video: J.videoElement,
|
|
966
|
-
onComplete:
|
|
966
|
+
onComplete: h,
|
|
967
967
|
resetKey: w
|
|
968
968
|
});
|
|
969
969
|
let { maxWatchedTime: ce, clampSeek: le } = Ce({
|
|
970
970
|
video: J.videoElement,
|
|
971
|
-
enabled:
|
|
971
|
+
enabled: u,
|
|
972
972
|
resetKey: w
|
|
973
|
-
}), ue = k((e) => J.seekTo(le(e)), [J, le]), { isFullscreen: de, toggleFullscreen: fe } =
|
|
973
|
+
}), ue = k((e) => J.seekTo(le(e)), [J, le]), { isFullscreen: de, toggleFullscreen: fe } = D({ targetRef: b }), pe = k(() => {}, []), me = !!(G && W);
|
|
974
974
|
A(() => {
|
|
975
975
|
let e = J.videoRef.current;
|
|
976
|
-
|
|
976
|
+
r && e && (e.muted = !me);
|
|
977
977
|
}, [
|
|
978
|
-
|
|
978
|
+
r,
|
|
979
979
|
me,
|
|
980
980
|
J.videoElement,
|
|
981
981
|
J.videoRef
|
|
@@ -984,27 +984,27 @@ function Ne({ src: t, poster: n, ariaLabel: r, silent: i = !1, persistControls:
|
|
|
984
984
|
videoRef: J.videoRef,
|
|
985
985
|
seek: ue,
|
|
986
986
|
togglePlay: J.togglePlay,
|
|
987
|
-
toggleMute:
|
|
987
|
+
toggleMute: r ? pe : J.toggleMute,
|
|
988
988
|
toggleFullscreen: fe,
|
|
989
|
-
setVolume:
|
|
989
|
+
setVolume: r ? pe : J.setVolume
|
|
990
990
|
});
|
|
991
991
|
A(() => {
|
|
992
|
-
|
|
993
|
-
}, [
|
|
992
|
+
c && b.current?.focus({ preventScroll: !0 });
|
|
993
|
+
}, [c]);
|
|
994
994
|
let ge = (e) => e.preventDefault();
|
|
995
995
|
return /* @__PURE__ */ I("div", {
|
|
996
|
-
ref:
|
|
997
|
-
className:
|
|
996
|
+
ref: b,
|
|
997
|
+
className: v("group relative h-full w-full overflow-hidden rounded-[inherit] bg-f1-foreground dark:bg-f1-background", "[&:fullscreen]:h-screen [&:fullscreen]:w-screen [&:fullscreen]:rounded-none", y()),
|
|
998
998
|
role: "region",
|
|
999
|
-
"aria-label":
|
|
999
|
+
"aria-label": n ?? _("videoPlayer.regionLabel"),
|
|
1000
1000
|
tabIndex: 0,
|
|
1001
1001
|
onKeyDown: he,
|
|
1002
|
-
"data-video-captions":
|
|
1003
|
-
...
|
|
1002
|
+
"data-video-captions": r ? "no-audio" : Y.available ? "available" : "missing",
|
|
1003
|
+
...g,
|
|
1004
1004
|
children: [
|
|
1005
1005
|
/* @__PURE__ */ I("video", {
|
|
1006
1006
|
ref: J.setVideoNode,
|
|
1007
|
-
autoPlay:
|
|
1007
|
+
autoPlay: s,
|
|
1008
1008
|
playsInline: !0,
|
|
1009
1009
|
disablePictureInPicture: !0,
|
|
1010
1010
|
disableRemotePlayback: !0,
|
|
@@ -1012,20 +1012,20 @@ function Ne({ src: t, poster: n, ariaLabel: r, silent: i = !1, persistControls:
|
|
|
1012
1012
|
onContextMenu: ge,
|
|
1013
1013
|
onClick: J.togglePlay,
|
|
1014
1014
|
src: q,
|
|
1015
|
-
poster:
|
|
1015
|
+
poster: t,
|
|
1016
1016
|
crossOrigin: Y.needsCrossOrigin || X.needsCrossOrigin ? "anonymous" : void 0,
|
|
1017
1017
|
onLoadedData: () => J.setVideoLoaded(!0),
|
|
1018
|
-
className:
|
|
1019
|
-
style: { opacity: J.videoLoaded ||
|
|
1018
|
+
className: v("block h-full w-full cursor-pointer rounded-[inherit] object-contain transition-opacity duration-300", "[&::-webkit-media-text-track-container]:![transform:translateY(-3.5rem)]"),
|
|
1019
|
+
style: { opacity: J.videoLoaded || t ? 1 : 0 },
|
|
1020
1020
|
children: [Y.trackSrc ? /* @__PURE__ */ F("track", {
|
|
1021
1021
|
kind: "captions",
|
|
1022
1022
|
src: Y.trackSrc,
|
|
1023
|
-
label:
|
|
1023
|
+
label: _("videoPlayer.captions"),
|
|
1024
1024
|
default: !1
|
|
1025
1025
|
}) : null, X.trackSrc ? /* @__PURE__ */ F("track", {
|
|
1026
1026
|
kind: "descriptions",
|
|
1027
1027
|
src: X.trackSrc,
|
|
1028
|
-
label:
|
|
1028
|
+
label: _("videoPlayer.audioDescription"),
|
|
1029
1029
|
default: !1
|
|
1030
1030
|
}) : null]
|
|
1031
1031
|
}),
|
|
@@ -1038,8 +1038,8 @@ function Ne({ src: t, poster: n, ariaLabel: r, silent: i = !1, persistControls:
|
|
|
1038
1038
|
tabIndex: -1,
|
|
1039
1039
|
onClick: J.togglePlay,
|
|
1040
1040
|
className: "pointer-events-auto flex size-14 items-center justify-center rounded-full bg-f1-foreground/70 pl-0.5 shadow-[0_2px_8px_rgba(0,0,0,0.45)] transition-transform duration-150 hover:scale-105 motion-reduce:transition-none dark:bg-f1-background/70 [&_svg]:size-7",
|
|
1041
|
-
children: /* @__PURE__ */ F(
|
|
1042
|
-
icon:
|
|
1041
|
+
children: /* @__PURE__ */ F(f, {
|
|
1042
|
+
icon: te,
|
|
1043
1043
|
size: "lg",
|
|
1044
1044
|
color: "#fff"
|
|
1045
1045
|
})
|
|
@@ -1054,7 +1054,7 @@ function Ne({ src: t, poster: n, ariaLabel: r, silent: i = !1, persistControls:
|
|
|
1054
1054
|
className: "pr-1 font-medium not-italic opacity-70",
|
|
1055
1055
|
children: [
|
|
1056
1056
|
"[",
|
|
1057
|
-
|
|
1057
|
+
_("videoPlayer.audioDescription"),
|
|
1058
1058
|
"]"
|
|
1059
1059
|
]
|
|
1060
1060
|
}), X.activeCue]
|
|
@@ -1063,7 +1063,7 @@ function Ne({ src: t, poster: n, ariaLabel: r, silent: i = !1, persistControls:
|
|
|
1063
1063
|
/* @__PURE__ */ F("span", {
|
|
1064
1064
|
className: "sr-only",
|
|
1065
1065
|
"aria-live": "polite",
|
|
1066
|
-
children: J.isPlaying ?
|
|
1066
|
+
children: J.isPlaying ? _("videoPlayer.playing") : _("videoPlayer.paused")
|
|
1067
1067
|
}),
|
|
1068
1068
|
J.videoLoaded ? /* @__PURE__ */ F(_e, {
|
|
1069
1069
|
isPlaying: J.isPlaying,
|
|
@@ -1073,20 +1073,20 @@ function Ne({ src: t, poster: n, ariaLabel: r, silent: i = !1, persistControls:
|
|
|
1073
1073
|
isMuted: J.isMuted,
|
|
1074
1074
|
playbackRate: J.playbackRate,
|
|
1075
1075
|
isFullscreen: de,
|
|
1076
|
-
markerTime:
|
|
1077
|
-
blockSeekPastMarker:
|
|
1078
|
-
containerRef:
|
|
1076
|
+
markerTime: u ? ce : void 0,
|
|
1077
|
+
blockSeekPastMarker: u,
|
|
1078
|
+
containerRef: b,
|
|
1079
1079
|
captionsAvailable: Y.available,
|
|
1080
1080
|
captionsOn: Y.showing,
|
|
1081
1081
|
audioDescriptionAvailable: X.available,
|
|
1082
1082
|
audioDescriptionOn: G,
|
|
1083
|
-
silent:
|
|
1084
|
-
persist:
|
|
1085
|
-
audioLanguages:
|
|
1086
|
-
audioLanguage:
|
|
1083
|
+
silent: r,
|
|
1084
|
+
persist: i,
|
|
1085
|
+
audioLanguages: x,
|
|
1086
|
+
audioLanguage: C,
|
|
1087
1087
|
onAudioLanguageChange: ie,
|
|
1088
1088
|
captionLanguages: T,
|
|
1089
|
-
captionLanguage:
|
|
1089
|
+
captionLanguage: E,
|
|
1090
1090
|
onCaptionLanguageChange: ae,
|
|
1091
1091
|
onCaptionsOff: oe,
|
|
1092
1092
|
audioDescriptionLanguages: j,
|
|
@@ -1101,13 +1101,13 @@ function Ne({ src: t, poster: n, ariaLabel: r, silent: i = !1, persistControls:
|
|
|
1101
1101
|
onToggleCaptions: Y.toggle,
|
|
1102
1102
|
onToggleAudioDescription: Q,
|
|
1103
1103
|
onSeek: ue,
|
|
1104
|
-
download:
|
|
1104
|
+
download: l
|
|
1105
1105
|
}) : null
|
|
1106
1106
|
]
|
|
1107
1107
|
});
|
|
1108
1108
|
}
|
|
1109
1109
|
//#endregion
|
|
1110
1110
|
//#region src/blocks/F0VideoPlayer/F0VideoPlayer.tsx
|
|
1111
|
-
var Pe =
|
|
1111
|
+
var Pe = l(h("F0VideoPlayer", Ne));
|
|
1112
1112
|
//#endregion
|
|
1113
1113
|
export { R as a, B as i, z as n, V as r, Pe as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as F0VideoPlayer } from "./F0VideoPlayer-CTsCZ4u5.js";
|