@factorialco/f0-react 8.36.1 → 8.37.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/{ChatPdfThumbnail-BbOPESdU.js → ChatPdfThumbnail-D17gaAZw.js} +1 -1
- package/dist/{ChatPostComposerDialog-Cv7VtLD6.js → ChatPostComposerDialog-Dzcwl3UT.js} +3 -3
- package/dist/{DocumentToolbar-CVrrJ4iA.js → DocumentToolbar-BF90Kcrb.js} +9 -9
- package/dist/{DocxViewer-AbtW-zX4.js → DocxViewer-DXUC2CUW.js} +2 -2
- package/dist/{F0AiProcessingOverlay-BDqqztvk.js → F0AiProcessingOverlay-DTsO9rEl.js} +1 -1
- package/dist/{F0CanvasPanel-WVtVnJRZ.js → F0CanvasPanel-kbwLvapQ.js} +15672 -15669
- package/dist/{index-DqE_RHOm.js → F0DocumentViewer-Bk7ciWZW.js} +142 -149
- package/dist/{F0Map-DLKYcpUE.js → F0Map-B_XG6Txo.js} +4 -4
- package/dist/{F0VideoPlayer-D1jXuNEn.js → F0VideoPlayer-Cdq6rTqq.js} +48 -48
- package/dist/{MapProvider-Q8EU0u5y.js → MapProvider-DrUuwDLP.js} +13643 -13650
- package/dist/{SheetViewer-KR2QIyYj.js → SheetViewer-DgLdv4qf.js} +3 -3
- package/dist/{TextViewer-D28lLt_m.js → TextViewer-7qYfyanJ.js} +2 -2
- package/dist/ai.d.ts +34 -23
- package/dist/ai.js +2 -2
- package/dist/component-status.d.ts +14 -14
- package/dist/component-status.js +1 -1
- package/dist/{experimental-BSsHhEKt.js → experimental-B_Hvv6tU.js} +166 -165
- package/dist/experimental.d.ts +74 -69
- package/dist/experimental.js +63 -63
- package/dist/f0.d.ts +336 -106
- package/dist/f0.js +6788 -6781
- package/dist/i18n-provider-defaults.d.ts +14 -14
- package/dist/index-BGG-4WaL.js +4 -0
- package/dist/{index-C5FgdXF2.js → index-BQthngzU.js} +2 -2
- package/dist/index-CzPx-LpF.js +8 -0
- package/dist/{index-CuAmARkm.js → index-HEb5Ocnl.js} +3 -3
- package/dist/{index-P3wd7w_Q.js → index-QJVt3QQ2.js} +1 -1
- package/dist/pdfWorker-CX_u28dQ.js +13120 -0
- package/package.json +1 -1
- package/dist/index-B5m0OpRD.js +0 -4
- package/dist/pdfWorker-C2B0uWA2.js +0 -13120
- /package/dist/{index2.css → F0DocumentViewer.css} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { u as W, K as je, L as Xe, z as $, M as Ge, N as Ze, O as Ye, Q as qe, R as Qe, U as Je, V as et, W as tt, X as nt, Y as rt, Z as at, _ as ot, $ as st, a0 as ye, a1 as it, a2 as
|
|
1
|
+
import { u as W, K as je, L as Xe, z as $, M as Ge, N as Ze, O as Ye, Q as qe, R as Qe, U as Je, V as et, W as tt, X as nt, Y as rt, Z as at, _ as ot, $ as st, a0 as ye, a1 as it, a2 as Ce, m as ct, a3 as lt, a4 as dt, v as ut, E as ft, G as mt } from "./F0CanvasPanel-kbwLvapQ.js";
|
|
2
2
|
import { jsxs as R, jsx as c } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef as re, useId as pt, useState as x, useRef as F, useEffect as _, useMemo as Q, useCallback as M } from "react";
|
|
4
4
|
import { d as H, f as de } from "./tooltip-CrXp1Uaz.js";
|
|
5
|
-
import { F as
|
|
6
|
-
import { b as vt } from "./MapProvider-
|
|
5
|
+
import { F as Pe, a as ht, b as gt } from "./VolumeMuted-UfTwt2zn.js";
|
|
6
|
+
import { b as vt } from "./MapProvider-DrUuwDLP.js";
|
|
7
7
|
function Re(e) {
|
|
8
8
|
return Array.isArray(e) && e.every(
|
|
9
9
|
(t) => typeof t == "object" && t !== null && "locale" in t && "value" in t
|
|
@@ -201,7 +201,7 @@ const Me = re(
|
|
|
201
201
|
)
|
|
202
202
|
);
|
|
203
203
|
Me.displayName = "CaptionsFilledIcon";
|
|
204
|
-
function
|
|
204
|
+
function Ct({
|
|
205
205
|
value: e,
|
|
206
206
|
onChange: t,
|
|
207
207
|
containerRef: a
|
|
@@ -290,7 +290,7 @@ function Pt({
|
|
|
290
290
|
)
|
|
291
291
|
] });
|
|
292
292
|
}
|
|
293
|
-
function
|
|
293
|
+
function Pt({
|
|
294
294
|
currentTime: e,
|
|
295
295
|
duration: t,
|
|
296
296
|
markerTime: a,
|
|
@@ -298,10 +298,10 @@ function Ct({
|
|
|
298
298
|
onSeek: o
|
|
299
299
|
}) {
|
|
300
300
|
const { t: s } = W(), n = F(null), [u, d] = x(!1), [m, g] = x(null), y = t > 0 ? Math.min(1, e / t) : 0, l = a !== void 0 && t > 0 ? Math.min(1, a / t) : 0, f = a !== void 0 && t > 0 && a > 0 && a < t - le && e < a - le, h = (v) => {
|
|
301
|
-
const
|
|
302
|
-
if (!
|
|
301
|
+
const P = n.current;
|
|
302
|
+
if (!P)
|
|
303
303
|
return 0;
|
|
304
|
-
const A =
|
|
304
|
+
const A = P.getBoundingClientRect();
|
|
305
305
|
return Math.max(0, Math.min(1, (v - A.left) / A.width));
|
|
306
306
|
}, b = (v) => {
|
|
307
307
|
t && o(h(v) * t);
|
|
@@ -314,24 +314,24 @@ function Ct({
|
|
|
314
314
|
}, w = m !== null && r && a !== void 0 && m > l, O = (v) => {
|
|
315
315
|
if (!t)
|
|
316
316
|
return;
|
|
317
|
-
let
|
|
317
|
+
let P = null;
|
|
318
318
|
switch (v.key) {
|
|
319
319
|
case "ArrowLeft":
|
|
320
|
-
|
|
320
|
+
P = Math.max(0, e - J);
|
|
321
321
|
break;
|
|
322
322
|
case "ArrowRight":
|
|
323
|
-
|
|
323
|
+
P = Math.min(t, e + J);
|
|
324
324
|
break;
|
|
325
325
|
case "Home":
|
|
326
|
-
|
|
326
|
+
P = 0;
|
|
327
327
|
break;
|
|
328
328
|
case "End":
|
|
329
|
-
|
|
329
|
+
P = t;
|
|
330
330
|
break;
|
|
331
331
|
default:
|
|
332
332
|
return;
|
|
333
333
|
}
|
|
334
|
-
v.preventDefault(), v.stopPropagation(), o(
|
|
334
|
+
v.preventDefault(), v.stopPropagation(), o(P);
|
|
335
335
|
};
|
|
336
336
|
return /* @__PURE__ */ R(
|
|
337
337
|
"div",
|
|
@@ -513,7 +513,7 @@ function Dt(e) {
|
|
|
513
513
|
return e.audioLanguages > 1 || e.captionLanguages > 1 || e.audioDescriptionLanguages > 1;
|
|
514
514
|
}
|
|
515
515
|
function Tt(e, t) {
|
|
516
|
-
return t || e === 0 ?
|
|
516
|
+
return t || e === 0 ? Pe : e <= 0.5 ? ht : gt;
|
|
517
517
|
}
|
|
518
518
|
function Mt({
|
|
519
519
|
volume: e,
|
|
@@ -530,7 +530,7 @@ function Mt({
|
|
|
530
530
|
size: "sm",
|
|
531
531
|
hideLabel: !0,
|
|
532
532
|
disabled: !0,
|
|
533
|
-
icon:
|
|
533
|
+
icon: Pe,
|
|
534
534
|
label: s("videoPlayer.noAudio")
|
|
535
535
|
}
|
|
536
536
|
) : /* @__PURE__ */ R("div", { className: "flex items-center gap-1", children: [
|
|
@@ -655,9 +655,9 @@ function It({
|
|
|
655
655
|
captionLanguages: w,
|
|
656
656
|
captionLanguage: O,
|
|
657
657
|
onCaptionLanguageChange: v,
|
|
658
|
-
onCaptionsOff:
|
|
658
|
+
onCaptionsOff: P,
|
|
659
659
|
audioDescriptionLanguages: A,
|
|
660
|
-
audioDescriptionLanguage:
|
|
660
|
+
audioDescriptionLanguage: C,
|
|
661
661
|
onAudioDescriptionLanguageChange: i,
|
|
662
662
|
onAudioDescriptionOff: D,
|
|
663
663
|
onTogglePlay: S,
|
|
@@ -702,13 +702,13 @@ function It({
|
|
|
702
702
|
variant: "ghost",
|
|
703
703
|
size: "sm",
|
|
704
704
|
hideLabel: !0,
|
|
705
|
-
icon: e ? it :
|
|
705
|
+
icon: e ? it : Ce,
|
|
706
706
|
label: p(e ? "videoPlayer.pause" : "videoPlayer.play"),
|
|
707
707
|
onClick: S
|
|
708
708
|
}
|
|
709
709
|
),
|
|
710
710
|
/* @__PURE__ */ c(
|
|
711
|
-
|
|
711
|
+
Pt,
|
|
712
712
|
{
|
|
713
713
|
currentTime: t,
|
|
714
714
|
duration: a,
|
|
@@ -733,7 +733,7 @@ function It({
|
|
|
733
733
|
}
|
|
734
734
|
),
|
|
735
735
|
/* @__PURE__ */ c(
|
|
736
|
-
|
|
736
|
+
Ct,
|
|
737
737
|
{
|
|
738
738
|
value: s,
|
|
739
739
|
onChange: K,
|
|
@@ -784,9 +784,9 @@ function It({
|
|
|
784
784
|
captionLanguage: O,
|
|
785
785
|
captionsOn: y,
|
|
786
786
|
onCaptionLanguageChange: v,
|
|
787
|
-
onCaptionsOff:
|
|
787
|
+
onCaptionsOff: P,
|
|
788
788
|
audioDescriptionLanguages: A,
|
|
789
|
-
audioDescriptionLanguage:
|
|
789
|
+
audioDescriptionLanguage: C,
|
|
790
790
|
audioDescriptionOn: f,
|
|
791
791
|
onAudioDescriptionLanguageChange: i,
|
|
792
792
|
onAudioDescriptionOff: D
|
|
@@ -842,29 +842,29 @@ function Nt(e, { enabled: t, describedSrc: a, descriptions: r }) {
|
|
|
842
842
|
const f = e.textTracks, h = typeof window < "u" && "speechSynthesis" in window, b = t && !o && h, E = () => {
|
|
843
843
|
l.current && (l.current = !1, e.play().catch(() => {
|
|
844
844
|
}));
|
|
845
|
-
}, T = (
|
|
845
|
+
}, T = (C) => {
|
|
846
846
|
window.speechSynthesis.cancel();
|
|
847
|
-
const i = new SpeechSynthesisUtterance(
|
|
847
|
+
const i = new SpeechSynthesisUtterance(C);
|
|
848
848
|
i.onend = E, i.onerror = E, window.speechSynthesis.speak(i);
|
|
849
|
-
}, k = /* @__PURE__ */ new WeakSet(), w = [], O = (
|
|
850
|
-
if (
|
|
849
|
+
}, k = /* @__PURE__ */ new WeakSet(), w = [], O = (C) => {
|
|
850
|
+
if (C.kind !== xe || (C.mode = "hidden", k.has(C)) || typeof C.addEventListener != "function")
|
|
851
851
|
return;
|
|
852
|
-
k.add(
|
|
852
|
+
k.add(C);
|
|
853
853
|
const i = () => {
|
|
854
|
-
const S =
|
|
854
|
+
const S = C.activeCues?.[0]?.text || void 0;
|
|
855
855
|
y(S), b && S && (e.paused || (e.pause(), l.current = !0), T(S));
|
|
856
856
|
};
|
|
857
|
-
|
|
857
|
+
C.addEventListener("cuechange", i), w.push(() => C.removeEventListener("cuechange", i));
|
|
858
858
|
}, v = () => {
|
|
859
|
-
let
|
|
859
|
+
let C = !1;
|
|
860
860
|
for (const i of Array.from(f))
|
|
861
|
-
i.kind === xe && (r === void 0 && (
|
|
862
|
-
d(
|
|
861
|
+
i.kind === xe && (r === void 0 && (C = !0), O(i));
|
|
862
|
+
d(C);
|
|
863
863
|
};
|
|
864
864
|
v();
|
|
865
|
-
const
|
|
866
|
-
return
|
|
867
|
-
|
|
865
|
+
const P = typeof f.addEventListener == "function", A = () => v();
|
|
866
|
+
return P && (f.addEventListener("addtrack", A), f.addEventListener("removetrack", A)), () => {
|
|
867
|
+
P && (f.removeEventListener("addtrack", A), f.removeEventListener("removetrack", A)), w.forEach((C) => C()), h && window.speechSynthesis.cancel(), E();
|
|
868
868
|
};
|
|
869
869
|
}, [e, t, o, r, s]), Q(
|
|
870
870
|
() => ({ trackSrc: s, needsCrossOrigin: n, available: m, activeCue: g }),
|
|
@@ -1097,7 +1097,7 @@ function Bt(e) {
|
|
|
1097
1097
|
}, []), v = M(() => {
|
|
1098
1098
|
const i = t.current;
|
|
1099
1099
|
i && (i.muted = !i.muted);
|
|
1100
|
-
}, []),
|
|
1100
|
+
}, []), P = M((i) => {
|
|
1101
1101
|
const D = t.current;
|
|
1102
1102
|
if (!D)
|
|
1103
1103
|
return;
|
|
@@ -1106,7 +1106,7 @@ function Bt(e) {
|
|
|
1106
1106
|
}, []), A = M((i) => {
|
|
1107
1107
|
const D = t.current;
|
|
1108
1108
|
D && (D.playbackRate = i);
|
|
1109
|
-
}, []),
|
|
1109
|
+
}, []), C = M((i) => {
|
|
1110
1110
|
const D = t.current;
|
|
1111
1111
|
if (!D)
|
|
1112
1112
|
return;
|
|
@@ -1127,9 +1127,9 @@ function Bt(e) {
|
|
|
1127
1127
|
setVideoLoaded: u,
|
|
1128
1128
|
togglePlay: O,
|
|
1129
1129
|
toggleMute: v,
|
|
1130
|
-
setVolume:
|
|
1130
|
+
setVolume: P,
|
|
1131
1131
|
setPlaybackRate: A,
|
|
1132
|
-
seekTo:
|
|
1132
|
+
seekTo: C
|
|
1133
1133
|
};
|
|
1134
1134
|
}
|
|
1135
1135
|
function Ht({
|
|
@@ -1176,14 +1176,14 @@ function Wt({
|
|
|
1176
1176
|
}) {
|
|
1177
1177
|
const { t: b } = W(), E = F(null), T = Q(() => ae(e), [e]), [k, w] = x(
|
|
1178
1178
|
() => Z(T, n)
|
|
1179
|
-
), O = T.some((L) => L.locale === k) ? k : Z(T, n), v = ee(e, O) ?? "",
|
|
1179
|
+
), O = T.some((L) => L.locale === k) ? k : Z(T, n), v = ee(e, O) ?? "", P = Q(
|
|
1180
1180
|
() => ae(s?.captions),
|
|
1181
1181
|
[s?.captions]
|
|
1182
|
-
), [A,
|
|
1183
|
-
() => Z(
|
|
1184
|
-
), i =
|
|
1182
|
+
), [A, C] = x(
|
|
1183
|
+
() => Z(P, n)
|
|
1184
|
+
), i = P.some(
|
|
1185
1185
|
(L) => L.locale === A
|
|
1186
|
-
) ? A : Z(
|
|
1186
|
+
) ? A : Z(P, n), D = ee(s?.captions, i), S = Q(
|
|
1187
1187
|
() => ae(s?.descriptions, s?.describedSrc),
|
|
1188
1188
|
[s?.descriptions, s?.describedSrc]
|
|
1189
1189
|
), [B, j] = x(
|
|
@@ -1218,7 +1218,7 @@ function Wt({
|
|
|
1218
1218
|
N && V(), q((L) => !L);
|
|
1219
1219
|
}, [N, V]), Fe = M(
|
|
1220
1220
|
(L) => {
|
|
1221
|
-
|
|
1221
|
+
C(L), I.showing || I.toggle();
|
|
1222
1222
|
},
|
|
1223
1223
|
[I]
|
|
1224
1224
|
), Oe = M(() => {
|
|
@@ -1341,7 +1341,7 @@ function Wt({
|
|
|
1341
1341
|
tabIndex: -1,
|
|
1342
1342
|
onClick: p.togglePlay,
|
|
1343
1343
|
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",
|
|
1344
|
-
children: /* @__PURE__ */ c(ut, { icon:
|
|
1344
|
+
children: /* @__PURE__ */ c(ut, { icon: Ce, size: "lg", color: "#fff" })
|
|
1345
1345
|
}
|
|
1346
1346
|
)
|
|
1347
1347
|
}
|
|
@@ -1384,7 +1384,7 @@ function Wt({
|
|
|
1384
1384
|
audioLanguages: T,
|
|
1385
1385
|
audioLanguage: O,
|
|
1386
1386
|
onAudioLanguageChange: Ne,
|
|
1387
|
-
captionLanguages:
|
|
1387
|
+
captionLanguages: P,
|
|
1388
1388
|
captionLanguage: i,
|
|
1389
1389
|
onCaptionLanguageChange: Fe,
|
|
1390
1390
|
onCaptionsOff: Oe,
|