@factorialco/f0-react 8.36.0 → 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.
Files changed (32) hide show
  1. package/dist/{ChatPdfThumbnail-DtjnbxlK.js → ChatPdfThumbnail-D17gaAZw.js} +1 -1
  2. package/dist/{ChatPostComposerDialog-CKyQwOZh.js → ChatPostComposerDialog-Dzcwl3UT.js} +3 -3
  3. package/dist/{DocumentToolbar-DmU2Z6yx.js → DocumentToolbar-BF90Kcrb.js} +9 -9
  4. package/dist/{DocxViewer-C54WGD1S.js → DocxViewer-DXUC2CUW.js} +2 -2
  5. package/dist/{F0AiProcessingOverlay-BDqqztvk.js → F0AiProcessingOverlay-DTsO9rEl.js} +1 -1
  6. package/dist/{F0CanvasPanel-WVtVnJRZ.js → F0CanvasPanel-kbwLvapQ.js} +15672 -15669
  7. package/dist/{index-SaYqmPwO.js → F0DocumentViewer-Bk7ciWZW.js} +142 -149
  8. package/dist/{F0Map-CNWfSFZ1.js → F0Map-B_XG6Txo.js} +4 -4
  9. package/dist/{F0VideoPlayer-D7c3Yh3w.js → F0VideoPlayer-Cdq6rTqq.js} +48 -48
  10. package/dist/{MapProvider-27XPHPiu.js → MapProvider-DrUuwDLP.js} +13645 -13652
  11. package/dist/{SheetViewer-1drEsfd7.js → SheetViewer-DgLdv4qf.js} +3 -3
  12. package/dist/{TextViewer-EXSsPDXE.js → TextViewer-7qYfyanJ.js} +2 -2
  13. package/dist/ai.d.ts +32 -21
  14. package/dist/ai.js +2 -2
  15. package/dist/component-status.d.ts +12 -12
  16. package/dist/component-status.js +1 -1
  17. package/dist/{experimental-B8-mgCce.js → experimental-B_Hvv6tU.js} +166 -165
  18. package/dist/experimental.d.ts +72 -67
  19. package/dist/experimental.js +63 -63
  20. package/dist/f0.d.ts +334 -104
  21. package/dist/f0.js +6788 -6781
  22. package/dist/i18n-provider-defaults.d.ts +12 -12
  23. package/dist/index-BGG-4WaL.js +4 -0
  24. package/dist/{index-C3NBN1Ds.js → index-BQthngzU.js} +2 -2
  25. package/dist/index-CzPx-LpF.js +8 -0
  26. package/dist/{index-BC3sRBhO.js → index-HEb5Ocnl.js} +3 -3
  27. package/dist/{index-P3wd7w_Q.js → index-QJVt3QQ2.js} +1 -1
  28. package/dist/pdfWorker-CX_u28dQ.js +13120 -0
  29. package/package.json +1 -1
  30. package/dist/index-6YSyIntj.js +0 -4
  31. package/dist/pdfWorker-Bt3dfOGU.js +0 -13120
  32. /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 Pe, m as ct, a3 as lt, a4 as dt, v as ut, G as ft, H as mt } from "./F0CanvasPanel-WVtVnJRZ.js";
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 Ce, a as ht, b as gt } from "./VolumeMuted-UfTwt2zn.js";
6
- import { b as vt } from "./MapProvider-27XPHPiu.js";
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 Pt({
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 Ct({
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 C = n.current;
302
- if (!C)
301
+ const P = n.current;
302
+ if (!P)
303
303
  return 0;
304
- const A = C.getBoundingClientRect();
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 C = null;
317
+ let P = null;
318
318
  switch (v.key) {
319
319
  case "ArrowLeft":
320
- C = Math.max(0, e - J);
320
+ P = Math.max(0, e - J);
321
321
  break;
322
322
  case "ArrowRight":
323
- C = Math.min(t, e + J);
323
+ P = Math.min(t, e + J);
324
324
  break;
325
325
  case "Home":
326
- C = 0;
326
+ P = 0;
327
327
  break;
328
328
  case "End":
329
- C = t;
329
+ P = t;
330
330
  break;
331
331
  default:
332
332
  return;
333
333
  }
334
- v.preventDefault(), v.stopPropagation(), o(C);
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 ? Ce : e <= 0.5 ? ht : gt;
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: Ce,
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: C,
658
+ onCaptionsOff: P,
659
659
  audioDescriptionLanguages: A,
660
- audioDescriptionLanguage: P,
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 : Pe,
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
- Ct,
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
- Pt,
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: C,
787
+ onCaptionsOff: P,
788
788
  audioDescriptionLanguages: A,
789
- audioDescriptionLanguage: P,
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 = (P) => {
845
+ }, T = (C) => {
846
846
  window.speechSynthesis.cancel();
847
- const i = new SpeechSynthesisUtterance(P);
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 = (P) => {
850
- if (P.kind !== xe || (P.mode = "hidden", k.has(P)) || typeof P.addEventListener != "function")
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(P);
852
+ k.add(C);
853
853
  const i = () => {
854
- const S = P.activeCues?.[0]?.text || void 0;
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
- P.addEventListener("cuechange", i), w.push(() => P.removeEventListener("cuechange", i));
857
+ C.addEventListener("cuechange", i), w.push(() => C.removeEventListener("cuechange", i));
858
858
  }, v = () => {
859
- let P = !1;
859
+ let C = !1;
860
860
  for (const i of Array.from(f))
861
- i.kind === xe && (r === void 0 && (P = !0), O(i));
862
- d(P);
861
+ i.kind === xe && (r === void 0 && (C = !0), O(i));
862
+ d(C);
863
863
  };
864
864
  v();
865
- const C = typeof f.addEventListener == "function", A = () => v();
866
- return C && (f.addEventListener("addtrack", A), f.addEventListener("removetrack", A)), () => {
867
- C && (f.removeEventListener("addtrack", A), f.removeEventListener("removetrack", A)), w.forEach((P) => P()), h && window.speechSynthesis.cancel(), E();
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
- }, []), C = M((i) => {
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
- }, []), P = M((i) => {
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: C,
1130
+ setVolume: P,
1131
1131
  setPlaybackRate: A,
1132
- seekTo: P
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) ?? "", C = Q(
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, P] = x(
1183
- () => Z(C, n)
1184
- ), i = C.some(
1182
+ ), [A, C] = x(
1183
+ () => Z(P, n)
1184
+ ), i = P.some(
1185
1185
  (L) => L.locale === A
1186
- ) ? A : Z(C, n), D = ee(s?.captions, i), S = Q(
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
- P(L), I.showing || I.toggle();
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: Pe, size: "lg", color: "#fff" })
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: C,
1387
+ captionLanguages: P,
1388
1388
  captionLanguage: i,
1389
1389
  onCaptionLanguageChange: Fe,
1390
1390
  onCaptionsOff: Oe,