@factorialco/f0-react 8.10.1 → 8.11.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 (35) hide show
  1. package/dist/{ChatPdfThumbnail-DtCxNTHV.js → ChatPdfThumbnail-TLaZnZvC.js} +1 -1
  2. package/dist/{ChatPostComposerDialog-DvRj6Soh.js → ChatPostComposerDialog-CcJrEKKe.js} +3 -3
  3. package/dist/DocumentToolbar-CXRJ8OXq.js +113 -0
  4. package/dist/DocxViewer-BVpuMNRK.js +72 -0
  5. package/dist/{F0AiProcessingOverlay-DfZDuEp8.js → F0AiProcessingOverlay-BikXmclE.js} +1 -1
  6. package/dist/{F0CanvasPanel-CTqnQRE3.js → F0CanvasPanel-rSEKuj9G.js} +865 -863
  7. package/dist/{F0Map-CXih9UM9.js → F0Map-CYcg0jX0.js} +4 -4
  8. package/dist/{F0VideoPlayer-DK2PVVlI.js → F0VideoPlayer-CU_V9ZLL.js} +2 -2
  9. package/dist/{MapProvider-BTkCnHkC.js → MapProvider-C-6QmLYm.js} +2 -2
  10. package/dist/SheetViewer-CPfuzHpV.js +111 -0
  11. package/dist/{TextViewer-DK0N_Kiz.js → TextViewer-B3Ywj3cq.js} +37 -32
  12. package/dist/ai.d.ts +2 -2
  13. package/dist/ai.js +2 -2
  14. package/dist/component-status.d.ts +2 -2
  15. package/dist/component-status.js +1 -1
  16. package/dist/{experimental-CpcmlTSN.js → experimental-CWojgT_y.js} +8 -8
  17. package/dist/experimental.d.ts +2 -2
  18. package/dist/experimental.js +4 -4
  19. package/dist/f0.d.ts +77 -53
  20. package/dist/f0.js +49 -48
  21. package/dist/i18n-provider-defaults.d.ts +2 -2
  22. package/dist/{index--AsP5ABt.js → index-CDQnrJIg.js} +3 -3
  23. package/dist/{index-BjzZa_Vz.js → index-ClSjtDCN.js} +2 -2
  24. package/dist/{index-4Y21ajv9.js → index-D-9j-pbd.js} +1 -1
  25. package/dist/index-Dje-uQ_s.js +589 -0
  26. package/dist/index-rMIHcwIi.js +4 -0
  27. package/dist/index2.css +1 -1
  28. package/dist/{pdfWorker-DHCbnpQ0.js → pdfWorker-fGMmJvrx.js} +2 -2
  29. package/dist/styles.css +1 -1
  30. package/package.json +1 -1
  31. package/dist/DocumentToolbar-BIEBSN8G.js +0 -93
  32. package/dist/DocxViewer-FAppzCEm.js +0 -67
  33. package/dist/SheetViewer-DgXiYpJt.js +0 -108
  34. package/dist/index-BZYFr1nf.js +0 -4
  35. package/dist/index-zpnaxwYU.js +0 -556
@@ -1,7 +1,7 @@
1
1
  import { jsx as o, jsxs as O, Fragment as Ee } from "react/jsx-runtime";
2
2
  import { forwardRef as re, useState as F, useEffect as N, useRef as M, useContext as Ca, createContext as Aa, useCallback as B, useMemo as et, useId as Ia, useImperativeHandle as Fa } from "react";
3
- import { a3 as Xt, u as se, a4 as le, y as Ce, a5 as Ea, a6 as $a, a7 as Oa, i as Ba, n as be, a8 as Wa, v as Yt, a9 as Je, aa as tt, ab as Ie, ac as Da, ad as Ut, ae as Ha, af as Xa, ag as St, ah as Gt, ai as Ya } from "./F0CanvasPanel-CTqnQRE3.js";
4
- import { c as Ua, d as Ga, e as Za } from "./MapProvider-BTkCnHkC.js";
3
+ import { a3 as Xt, u as se, a4 as le, y as Ce, a5 as Ea, a6 as $a, a7 as Oa, i as Ba, n as be, a8 as Wa, v as Yt, a9 as Je, aa as tt, ab as Ie, ac as Da, ad as Ut, ae as Ha, af as Xa, ag as St, ah as Gt, ai as Ya } from "./F0CanvasPanel-rSEKuj9G.js";
4
+ import { c as Ua, d as Ga, e as Za } from "./MapProvider-C-6QmLYm.js";
5
5
  import { d as W, f as Ka } from "./tooltip-CrXp1Uaz.js";
6
6
  import { createPortal as qa } from "react-dom";
7
7
  const Va = (e, t) => ({
@@ -1425,11 +1425,11 @@ const cl = {
1425
1425
  }, []);
1426
1426
  return N(() => () => n.current?.disconnect(), []), { containerRef: l, isDark: e };
1427
1427
  }, Nn = {
1428
- maplibre: () => import("./index-BjzZa_Vz.js").then((e) => e.createMaplibreAdapter),
1428
+ maplibre: () => import("./index-ClSjtDCN.js").then((e) => e.createMaplibreAdapter),
1429
1429
  // Google needs its script in the page before a map can be constructed, so the
1430
1430
  // loader resolves only once the API is up - which is what keeps the factory
1431
1431
  // itself synchronous for every engine.
1432
- google: (e) => import("./index-4Y21ajv9.js").then((t) => t.loadGoogleAdapter(e))
1432
+ google: (e) => import("./index-D-9j-pbd.js").then((t) => t.loadGoogleAdapter(e))
1433
1433
  }, Qe = /* @__PURE__ */ new Map(), jn = (e, t) => {
1434
1434
  const n = Qe.get(e);
1435
1435
  if (n)
@@ -1,9 +1,9 @@
1
- import { u as W, H as je, J as Xe, y as $, K as Ge, L as Ze, M as Ye, N as qe, O as Je, Q as Qe, R as et, U as tt, V as nt, W as rt, X as at, Y as ot, Z as st, _ as ye, $ as it, a0 as Pe, l as ct, a1 as lt, a2 as dt, v as ut, B as ft, E as mt } from "./F0CanvasPanel-CTqnQRE3.js";
1
+ import { u as W, H as je, J as Xe, y as $, K as Ge, L as Ze, M as Ye, N as qe, O as Je, Q as Qe, R as et, U as tt, V as nt, W as rt, X as at, Y as ot, Z as st, _ as ye, $ as it, a0 as Pe, l as ct, a1 as lt, a2 as dt, v as ut, B as ft, E as mt } from "./F0CanvasPanel-rSEKuj9G.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 J, useCallback as M } from "react";
4
4
  import { d as H, f as de } from "./tooltip-CrXp1Uaz.js";
5
5
  import { F as Ce, a as ht, b as gt } from "./VolumeMuted-UfTwt2zn.js";
6
- import { b as vt } from "./MapProvider-BTkCnHkC.js";
6
+ import { b as vt } from "./MapProvider-C-6QmLYm.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
@@ -1,7 +1,7 @@
1
1
  import { jsx as m, jsxs as R, Fragment as We } from "react/jsx-runtime";
2
2
  import * as qe from "react";
3
3
  import oe, { useRef as L, useState as X, useCallback as K, useEffect as ie, useContext as ht, useMemo as Y, createContext as zt, forwardRef as Qe, useLayoutEffect as Lt, memo as Mt, useReducer as uz, cloneElement as KT, PureComponent as ld, useId as mi, useImperativeHandle as ia, Fragment as Vf, createElement as Dm, isValidElement as hz, Suspense as pz, lazy as mz, useDebugValue as YT, version as k4, createRef as XT, useSyncExternalStore as _4 } from "react";
4
- import { f2 as S4, f3 as Zu, f4 as gz, cO as JT, f5 as yz, f6 as vz, f7 as bz, f8 as Ov, f9 as wz, fa as xz, fb as kz, fc as _z, fd as Sz, fe as Cz, ff as Ez, ab as it, fg as ZT, fh as Nz, cl as Vt, aJ as Qu, aK as cd, au as Az, av as Tz, cQ as go, B as Ft, E as ni, G as dd, dh as Dk, et as Ik, eu as Im, S as Be, fi as QT, ev as Mk, u as Re, v as st, bj as eh, co as wc, br as Fy, r as Pk, cU as Oz, cB as eO, cR as Dz, df as Iz, e3 as tO, y as Ie, aY as th, fj as Mz, b4 as Pz, b5 as Rz, fk as Lz, cv as nO, dM as iO, fl as rO, d9 as oO, fm as Fz, fn as $z, fo as _a, fp as Bt, fq as Ni, fr as sO, fs as Bz, ft as aO, fu as zz, fv as Yn, fw as $y, fx as pn, fy as lO, fz as By, fA as Rk, fB as Lk, fC as Fk, fD as Wn, fE as Ci, fF as zb, fG as zy, fH as jz, fI as ai, fJ as $o, fK as ki, fL as ml, fM as $k, fN as jy, fO as Yp, fP as Hy, ez as Bk, fQ as Hz, fR as Xh, fS as Mm, fT as Vz, fU as Wz, fV as Uz, fW as qz, fX as Gz, fY as Kz, fZ as cO, f_ as dO, f$ as fO, g0 as uO, g1 as hO, g2 as Yz, g3 as Pm, g4 as Xz, g5 as Jz, g6 as nh, g7 as ra, cY as Jo, g8 as zk, g9 as Wo, ga as pO, cZ as mO, gb as Zz, gc as Qz, cW as ej, gd as tj, cX as nj, dj as li, ge as ci, gf as ij, gg as rj, gh as oj, gi as sj, gj as aj, gk as jb, gl as lj, a4 as gO, gm as yO, es as kr, aa as Jt, eL as cj, dq as jr, ck as fd, d4 as Xa, am as ih, an as dj, dH as fj, gn as vO, go as bO, o as wO, ad as is, cw as ud, ex as xO, cE as kO, cF as jk, a9 as rh, L as Vy, gp as uj, eq as _O, de as hj, gq as SO, eP as $n, gr as CO, gs as EO, gt as Hb, gu as pj, gv as C4, gw as NO, er as oa, eX as AO, dv as TO, eR as Wy, H as Uy, J as Hk, K as qy, eV as mj, k as Zn, aE as E4, aM as gj, a_ as yj, bw as Vk, gx as OO, gy as vj, eQ as Wk, gz as Uk, gA as DO, gB as gl, gC as Dv, bV as IO, cu as yl, ai as vr, dk as Ks, eo as bj, gD as N4, ek as qk, gE as wj, dT as xj, e7 as kj, e5 as _j, gF as MO, gG as Sj, cP as Cj, gH as Ej, gI as PO, af as RO, gJ as Nj, gK as Aj, gL as Tj, gM as A4, gN as T4, gO as O4, gP as D4, gQ as Oj, aC as Dj, gR as LO, ds as Ij, gS as Mj, cK as hd, M as FO, N as $O, Q as BO, gT as Pj, gU as Rj, gV as I4, dR as Rm, eJ as Wf, U as zO, V as jO, X as HO, Y as VO, w as sa, cp as Hr, s as Lj, x as Fj, gW as $j, z as Gy, gX as WO, gY as UO, gZ as Bj, g_ as Lm, g$ as zj, h0 as jj, h1 as Ba, h2 as Hj, h3 as M4, h4 as Vj, h5 as Wj, h6 as Fm, h7 as Uj, h8 as qj, h9 as Gj, ha as qO, hb as Kj, hc as GO, hd as Yj, he as Ky, hf as pd, hg as Xj, hh as Gk, hi as ln, hj as Jj, cN as Uf, hk as ei, hl as Zj, c_ as oh, hm as Qj, a7 as Ja, at as Vb, dm as eH, dn as tH, cx as KO, cy as YO, cz as XO, hn as Kk, ho as nH, d3 as JO, bP as sh, aS as rs, ei as ZO, ej as QO, aG as eD, aV as iH, ce as tD, dG as rH, hp as oH, hq as sH, hr as $m, hs as Io, m as aH, c2 as lH, ht as cH, dZ as dH, aR as Bm, c5 as nD, c0 as fH, ew as P4, eh as uH, aZ as hH, hu as pH, hv as Yy, hw as Xy, hx as Jy, cA as Zy, hy as mH, hz as zm, hA as gH, hB as yH, dp as vH, hC as iD, by as Iv, hD as bH, hE as wH, bB as xH, bH as kH, hF as R4, hG as _H, hH as L4, hI as Mv, hJ as rD, a1 as oD, c1 as SH, a5 as CH, i as Yk, hK as EH, hL as NH, dO as AH, j as Xk, eE as TH, bU as OH, bL as DH, bt as F4, bx as Jk, ca as IH, ef as MH, hM as sD, hN as PH, hO as Zk, l as RH, ax as LH, aT as FH, c3 as $H, hP as BH, hQ as zH, A as jH, hR as HH, hS as VH, hT as WH, hU as UH, hV as aD, cd as qH, hW as Qk, hX as GH, hY as KH, hZ as YH, h_ as Pv, h$ as XH, i0 as De, i1 as ah, i2 as JH, i3 as ZH, i4 as QH, i5 as eV, i6 as $4, i7 as tV, i8 as jm, R as nV, i9 as iV, ia as Rv, ib as Jh, ic as rV, id as oV, ie as sV, ig as aV, ih as lV, aw as cV, c as dV, c4 as fV, W as Lv, ii as lh, ij as e2, ik as t2, il as ch, im as uV, b_ as hV, eF as n2, ea as B4, al as pV, ah as mV, ed as gV, az as yV, bs as vV, cc as bV, c8 as wV, bl as lD, bm as cD, bn as dD, bK as fD, aI as uD, aq as hD, ao as pD, ar as mD, ap as gD, aO as yD, bZ as vD, cC as bD, io as wD, ip as xV, cJ as kV, ba as _V, b8 as SV, b7 as CV, b6 as EV, b9 as NV, bo as AV, cf as TV, cn as OV, cm as DV, cb as IV, bF as MV, bO as PV, a2 as RV, cs as LV, iq as FV, ir as Fv, is as $V, bu as BV, it as xD, iu as i2, iv as Fs, iw as sc, ix as kD, iy as _D, cI as zV, iz as jV, iA as HV, iB as VV, iC as WV, cD as UV, dQ as qV, cr as GV, iD as KV } from "./F0CanvasPanel-CTqnQRE3.js";
4
+ import { f2 as S4, f3 as Zu, f4 as gz, cO as JT, f5 as yz, f6 as vz, f7 as bz, f8 as Ov, f9 as wz, fa as xz, fb as kz, fc as _z, fd as Sz, fe as Cz, ff as Ez, ab as it, fg as ZT, fh as Nz, cl as Vt, aJ as Qu, aK as cd, au as Az, av as Tz, cQ as go, B as Ft, E as ni, G as dd, dh as Dk, et as Ik, eu as Im, S as Be, fi as QT, ev as Mk, u as Re, v as st, bj as eh, co as wc, br as Fy, r as Pk, cU as Oz, cB as eO, cR as Dz, df as Iz, e3 as tO, y as Ie, aY as th, fj as Mz, b4 as Pz, b5 as Rz, fk as Lz, cv as nO, dM as iO, fl as rO, d9 as oO, fm as Fz, fn as $z, fo as _a, fp as Bt, fq as Ni, fr as sO, fs as Bz, ft as aO, fu as zz, fv as Yn, fw as $y, fx as pn, fy as lO, fz as By, fA as Rk, fB as Lk, fC as Fk, fD as Wn, fE as Ci, fF as zb, fG as zy, fH as jz, fI as ai, fJ as $o, fK as ki, fL as ml, fM as $k, fN as jy, fO as Yp, fP as Hy, ez as Bk, fQ as Hz, fR as Xh, fS as Mm, fT as Vz, fU as Wz, fV as Uz, fW as qz, fX as Gz, fY as Kz, fZ as cO, f_ as dO, f$ as fO, g0 as uO, g1 as hO, g2 as Yz, g3 as Pm, g4 as Xz, g5 as Jz, g6 as nh, g7 as ra, cY as Jo, g8 as zk, g9 as Wo, ga as pO, cZ as mO, gb as Zz, gc as Qz, cW as ej, gd as tj, cX as nj, dj as li, ge as ci, gf as ij, gg as rj, gh as oj, gi as sj, gj as aj, gk as jb, gl as lj, a4 as gO, gm as yO, es as kr, aa as Jt, eL as cj, dq as jr, ck as fd, d4 as Xa, am as ih, an as dj, dH as fj, gn as vO, go as bO, o as wO, ad as is, cw as ud, ex as xO, cE as kO, cF as jk, a9 as rh, L as Vy, gp as uj, eq as _O, de as hj, gq as SO, eP as $n, gr as CO, gs as EO, gt as Hb, gu as pj, gv as C4, gw as NO, er as oa, eX as AO, dv as TO, eR as Wy, H as Uy, J as Hk, K as qy, eV as mj, k as Zn, aE as E4, aM as gj, a_ as yj, bw as Vk, gx as OO, gy as vj, eQ as Wk, gz as Uk, gA as DO, gB as gl, gC as Dv, bV as IO, cu as yl, ai as vr, dk as Ks, eo as bj, gD as N4, ek as qk, gE as wj, dT as xj, e7 as kj, e5 as _j, gF as MO, gG as Sj, cP as Cj, gH as Ej, gI as PO, af as RO, gJ as Nj, gK as Aj, gL as Tj, gM as A4, gN as T4, gO as O4, gP as D4, gQ as Oj, aC as Dj, gR as LO, ds as Ij, gS as Mj, cK as hd, M as FO, N as $O, Q as BO, gT as Pj, gU as Rj, gV as I4, dR as Rm, eJ as Wf, U as zO, V as jO, X as HO, Y as VO, w as sa, cp as Hr, s as Lj, x as Fj, gW as $j, z as Gy, gX as WO, gY as UO, gZ as Bj, g_ as Lm, g$ as zj, h0 as jj, h1 as Ba, h2 as Hj, h3 as M4, h4 as Vj, h5 as Wj, h6 as Fm, h7 as Uj, h8 as qj, h9 as Gj, ha as qO, hb as Kj, hc as GO, hd as Yj, he as Ky, hf as pd, hg as Xj, hh as Gk, hi as ln, hj as Jj, cN as Uf, hk as ei, hl as Zj, c_ as oh, hm as Qj, a7 as Ja, at as Vb, dm as eH, dn as tH, cx as KO, cy as YO, cz as XO, hn as Kk, ho as nH, d3 as JO, bP as sh, aS as rs, ei as ZO, ej as QO, aG as eD, aV as iH, ce as tD, dG as rH, hp as oH, hq as sH, hr as $m, hs as Io, m as aH, c2 as lH, ht as cH, dZ as dH, aR as Bm, c5 as nD, c0 as fH, ew as P4, eh as uH, aZ as hH, hu as pH, hv as Yy, hw as Xy, hx as Jy, cA as Zy, hy as mH, hz as zm, hA as gH, hB as yH, dp as vH, hC as iD, by as Iv, hD as bH, hE as wH, bB as xH, bH as kH, hF as R4, hG as _H, hH as L4, hI as Mv, hJ as rD, a1 as oD, c1 as SH, a5 as CH, i as Yk, hK as EH, hL as NH, dO as AH, j as Xk, eE as TH, bU as OH, bL as DH, bt as F4, bx as Jk, ca as IH, ef as MH, hM as sD, hN as PH, hO as Zk, l as RH, ax as LH, aT as FH, c3 as $H, hP as BH, hQ as zH, A as jH, hR as HH, hS as VH, hT as WH, hU as UH, hV as aD, cd as qH, hW as Qk, hX as GH, hY as KH, hZ as YH, h_ as Pv, h$ as XH, i0 as De, i1 as ah, i2 as JH, i3 as ZH, i4 as QH, i5 as eV, i6 as $4, i7 as tV, i8 as jm, R as nV, i9 as iV, ia as Rv, ib as Jh, ic as rV, id as oV, ie as sV, ig as aV, ih as lV, aw as cV, c as dV, c4 as fV, W as Lv, ii as lh, ij as e2, ik as t2, il as ch, im as uV, b_ as hV, eF as n2, ea as B4, al as pV, ah as mV, ed as gV, az as yV, bs as vV, cc as bV, c8 as wV, bl as lD, bm as cD, bn as dD, bK as fD, aI as uD, aq as hD, ao as pD, ar as mD, ap as gD, aO as yD, bZ as vD, cC as bD, io as wD, ip as xV, cJ as kV, ba as _V, b8 as SV, b7 as CV, b6 as EV, b9 as NV, bo as AV, cf as TV, cn as OV, cm as DV, cb as IV, bF as MV, bO as PV, a2 as RV, cs as LV, iq as FV, ir as Fv, is as $V, bu as BV, it as xD, iu as i2, iv as Fs, iw as sc, ix as kD, iy as _D, cI as zV, iz as jV, iA as HV, iB as VV, iC as WV, cD as UV, dQ as qV, cr as GV, iD as KV } from "./F0CanvasPanel-rSEKuj9G.js";
5
5
  import { d as U, g as YV, e as di, T as dh, a as fh, b as uh, f as tn, u as r2, S as XV, c as Qy } from "./tooltip-CrXp1Uaz.js";
6
6
  import { g as hh } from "./_commonjsHelpers-ByX85dGu.js";
7
7
  import SD, { unstable_batchedUpdates as Zh, createPortal as e1, flushSync as JV } from "react-dom";
@@ -38841,7 +38841,7 @@ const D0 = ({
38841
38841
  }
38842
38842
  );
38843
38843
  }, ghe = mz(
38844
- () => import("./index--AsP5ABt.js").then((e) => ({ default: e.MapCollection }))
38844
+ () => import("./index-CDQnrJIg.js").then((e) => ({ default: e.MapCollection }))
38845
38845
  ), Xs = {
38846
38846
  table: {
38847
38847
  name: "Table",
@@ -0,0 +1,111 @@
1
+ import { jsx as r, jsxs as n, Fragment as k } from "react/jsx-runtime";
2
+ import { useState as f, useEffect as S } from "react";
3
+ import { u as V, T as E, h as R, S as z } from "./F0CanvasPanel-rSEKuj9G.js";
4
+ import { f as _, c as j } from "./sheetPreview-Djc-YyVs.js";
5
+ import { u as F, D as I } from "./DocumentToolbar-CXRJ8OXq.js";
6
+ const x = 1e3, T = 100, O = ({
7
+ url: a,
8
+ filename: w,
9
+ withCredentials: l = !0,
10
+ actions: N,
11
+ toolbar: c = "top"
12
+ }) => {
13
+ const d = V(), m = F(), [t, u] = f(null), [v, i] = f(!1), [h, b] = f(0);
14
+ S(() => {
15
+ let e = !1;
16
+ return u(null), i(!1), b(0), _(a, {
17
+ maxRows: x,
18
+ maxCols: T,
19
+ withCredentials: l
20
+ }).then((o) => {
21
+ e || (o.length === 0 ? i(!0) : u(o));
22
+ }).catch(() => {
23
+ e || i(!0);
24
+ }), () => {
25
+ e = !0;
26
+ };
27
+ }, [a, l]);
28
+ const s = t ? t[Math.min(h, t.length - 1)] : null, p = s ? j(s.rows) : [], g = /* @__PURE__ */ r(
29
+ I,
30
+ {
31
+ url: a,
32
+ filename: w,
33
+ withCredentials: l,
34
+ actions: N,
35
+ zoom: m,
36
+ placement: c,
37
+ children: t && t.length > 1 ? /* @__PURE__ */ r(
38
+ E,
39
+ {
40
+ type: "single",
41
+ size: "sm",
42
+ value: String(h),
43
+ onValueChange: (e) => {
44
+ e && b(Number(e));
45
+ },
46
+ className: "justify-start",
47
+ children: t.map((e, o) => /* @__PURE__ */ r(
48
+ R,
49
+ {
50
+ value: String(o),
51
+ className: "whitespace-nowrap",
52
+ children: e.name
53
+ },
54
+ `${e.name}-${o}`
55
+ ))
56
+ }
57
+ ) : null
58
+ }
59
+ );
60
+ return /* @__PURE__ */ n("div", { className: "relative flex h-full w-full flex-col bg-f1-background", children: [
61
+ c === "top" ? g : null,
62
+ v ? /* @__PURE__ */ r("div", { className: "flex min-h-0 grow items-center justify-center text-f1-foreground-secondary", children: d.pdfViewer.previewFailed }) : s ? /* @__PURE__ */ n(k, { children: [
63
+ /* @__PURE__ */ r("div", { className: "min-h-0 grow overflow-auto", children: /* @__PURE__ */ n(
64
+ "table",
65
+ {
66
+ className: "border-collapse text-sm",
67
+ style: { zoom: m.scale },
68
+ children: [
69
+ /* @__PURE__ */ r("thead", { children: /* @__PURE__ */ n("tr", { children: [
70
+ /* @__PURE__ */ r("th", { className: "sticky top-0 z-10 border border-solid border-f1-border-secondary bg-f1-background-secondary px-2 py-1" }),
71
+ p.map((e) => /* @__PURE__ */ r(
72
+ "th",
73
+ {
74
+ className: "sticky top-0 z-10 border border-solid border-f1-border-secondary bg-f1-background-secondary px-2 py-1 text-center font-medium text-f1-foreground-secondary",
75
+ children: e
76
+ },
77
+ e
78
+ ))
79
+ ] }) }),
80
+ /* @__PURE__ */ r("tbody", { children: s.rows.map((e, o) => /* @__PURE__ */ n("tr", { children: [
81
+ /* @__PURE__ */ r("td", { className: "border border-solid border-f1-border-secondary bg-f1-background-secondary px-2 py-1 text-center text-f1-foreground-secondary", children: o + 1 }),
82
+ p.map((W, y) => /* @__PURE__ */ r(
83
+ "td",
84
+ {
85
+ className: "whitespace-nowrap border border-solid border-f1-border-secondary px-2 py-1 text-f1-foreground",
86
+ children: e[y] ?? ""
87
+ },
88
+ y
89
+ ))
90
+ ] }, o)) })
91
+ ]
92
+ }
93
+ ) }),
94
+ s.truncatedRows ? /* @__PURE__ */ r("div", { className: "shrink-0 border-0 border-t border-solid border-f1-border-secondary px-3 py-1.5 text-sm text-f1-foreground-secondary", children: d.t("pdfViewer.showingFirstRows.other", {
95
+ count: x
96
+ }) }) : null
97
+ ] }) : /* @__PURE__ */ r(
98
+ z,
99
+ {
100
+ role: "status",
101
+ "aria-busy": !0,
102
+ "aria-label": d.pdfViewer.loading,
103
+ className: "min-h-0 w-full grow rounded-none"
104
+ }
105
+ ),
106
+ c === "floating" ? g : null
107
+ ] });
108
+ };
109
+ export {
110
+ O as default
111
+ };
@@ -1,8 +1,8 @@
1
- import { jsxs as b, jsx as e } from "react/jsx-runtime";
2
- import { useState as _, useEffect as h } from "react";
3
- import { u as x, S as p, p as w } from "./F0CanvasPanel-CTqnQRE3.js";
4
- import { u as y, D as g } from "./DocumentToolbar-BIEBSN8G.js";
5
- const k = 2 * 1024 * 1024, v = [
1
+ import { jsxs as p, jsx as e } from "react/jsx-runtime";
2
+ import { useState as u, useEffect as x } from "react";
3
+ import { u as w, S as y, p as g } from "./F0CanvasPanel-rSEKuj9G.js";
4
+ import { u as k, D as v } from "./DocumentToolbar-CXRJ8OXq.js";
5
+ const q = 2 * 1024 * 1024, N = [
6
6
  "[&_h1]:mb-3 [&_h1]:mt-6 [&_h1]:text-2xl [&_h1]:font-semibold",
7
7
  "[&_h2]:mb-2 [&_h2]:mt-5 [&_h2]:text-xl [&_h2]:font-semibold",
8
8
  "[&_h3]:mb-2 [&_h3]:mt-4 [&_h3]:text-lg [&_h3]:font-semibold",
@@ -19,57 +19,62 @@ const k = 2 * 1024 * 1024, v = [
19
19
  "[&_th]:border [&_th]:border-solid [&_th]:border-f1-border-secondary [&_th]:px-2 [&_th]:py-1 [&_th]:text-left [&_th]:font-medium",
20
20
  "[&_td]:border [&_td]:border-solid [&_td]:border-f1-border-secondary [&_td]:px-2 [&_td]:py-1",
21
21
  "[&_hr]:my-4 [&_hr]:border-f1-border-secondary"
22
- ].join(" "), q = (o, r) => !!r?.toLowerCase().includes("markdown") || o.toLowerCase().endsWith(".md") || o.toLowerCase().endsWith(".markdown"), M = ({
22
+ ].join(" "), S = (o, r) => !!r?.toLowerCase().includes("markdown") || o.toLowerCase().endsWith(".md") || o.toLowerCase().endsWith(".markdown"), j = ({
23
23
  url: o,
24
24
  name: r,
25
- mimeType: i,
25
+ mimeType: f,
26
26
  withCredentials: l = !0,
27
- actions: u
27
+ actions: b,
28
+ toolbar: d = "top"
28
29
  }) => {
29
- const n = x(), a = y(), [d, c] = _(null), [f, m] = _(!1);
30
- return h(() => {
30
+ const a = w(), c = k(), [n, m] = u(null), [h, _] = u(!1);
31
+ x(() => {
31
32
  let s = !1;
32
- return c(null), m(!1), fetch(o, { credentials: l ? "include" : "same-origin" }).then((t) => {
33
+ return m(null), _(!1), fetch(o, { credentials: l ? "include" : "same-origin" }).then((t) => {
33
34
  if (!t.ok)
34
35
  throw new Error(`${t.status}`);
35
36
  return t.text();
36
37
  }).then((t) => {
37
- s || c(t.slice(0, k));
38
+ s || m(t.slice(0, q));
38
39
  }).catch(() => {
39
- s || m(!0);
40
+ s || _(!0);
40
41
  }), () => {
41
42
  s = !0;
42
43
  };
43
- }, [o, l]), /* @__PURE__ */ b("div", { className: "flex h-full w-full flex-col bg-f1-background", children: [
44
- /* @__PURE__ */ e(
45
- g,
46
- {
47
- url: o,
48
- filename: r,
49
- withCredentials: l,
50
- actions: u,
51
- zoom: a
52
- }
53
- ),
54
- f ? /* @__PURE__ */ e("div", { className: "flex min-h-0 grow items-center justify-center text-f1-foreground-secondary", children: n.pdfViewer.previewFailed }) : d === null ? /* @__PURE__ */ e(
55
- p,
44
+ }, [o, l]);
45
+ const i = /* @__PURE__ */ e(
46
+ v,
47
+ {
48
+ url: o,
49
+ filename: r,
50
+ withCredentials: l,
51
+ actions: b,
52
+ zoom: c,
53
+ placement: d
54
+ }
55
+ );
56
+ return /* @__PURE__ */ p("div", { className: "relative flex h-full w-full flex-col bg-f1-background", children: [
57
+ d === "top" ? i : null,
58
+ h ? /* @__PURE__ */ e("div", { className: "flex min-h-0 grow items-center justify-center text-f1-foreground-secondary", children: a.pdfViewer.previewFailed }) : n === null ? /* @__PURE__ */ e(
59
+ y,
56
60
  {
57
61
  role: "status",
58
62
  "aria-busy": !0,
59
- "aria-label": n.pdfViewer.loading,
63
+ "aria-label": a.pdfViewer.loading,
60
64
  className: "min-h-0 w-full grow rounded-none"
61
65
  }
62
- ) : /* @__PURE__ */ e("div", { className: "min-h-0 grow overflow-auto", children: /* @__PURE__ */ e("div", { style: { zoom: a.scale }, children: q(r, i) ? /* @__PURE__ */ e(
66
+ ) : /* @__PURE__ */ e("div", { className: "min-h-0 grow overflow-auto", children: /* @__PURE__ */ e("div", { style: { zoom: c.scale }, children: S(r, f) ? /* @__PURE__ */ e(
63
67
  "div",
64
68
  {
65
- className: `mx-auto max-w-3xl px-6 py-4 text-base text-f1-foreground ${v}`,
69
+ className: `mx-auto max-w-3xl px-6 py-4 text-base text-f1-foreground ${N}`,
66
70
  dangerouslySetInnerHTML: {
67
- __html: w(d)
71
+ __html: g(n)
68
72
  }
69
73
  }
70
- ) : /* @__PURE__ */ e("pre", { className: "m-0 whitespace-pre-wrap break-words px-6 py-4 font-mono text-sm text-f1-foreground", children: d }) }) })
74
+ ) : /* @__PURE__ */ e("pre", { className: "m-0 whitespace-pre-wrap break-words px-6 py-4 font-mono text-sm text-f1-foreground", children: n }) }) }),
75
+ d === "floating" ? i : null
71
76
  ] });
72
77
  };
73
78
  export {
74
- M as default
79
+ j as default
75
80
  };
package/dist/ai.d.ts CHANGED
@@ -6728,12 +6728,12 @@ declare global {
6728
6728
  }
6729
6729
 
6730
6730
 
6731
- declare namespace _Page {
6731
+ declare namespace DaytimePageInternal {
6732
6732
  var displayName: string;
6733
6733
  }
6734
6734
 
6735
6735
 
6736
- declare namespace DaytimePageInternal {
6736
+ declare namespace _Page {
6737
6737
  var displayName: string;
6738
6738
  }
6739
6739
 
package/dist/ai.js CHANGED
@@ -1,6 +1,6 @@
1
- import { C as e, D as r, c as t, F as i, a as o, f as n, g as F, d as C, e as l, I as A, P as d, b as u, u as m } from "./F0CanvasPanel-CTqnQRE3.js";
1
+ import { C as e, D as r, c as t, F as i, a as o, f as n, g as F, d as C, e as l, I as A, P as d, b as u, u as m } from "./F0CanvasPanel-rSEKuj9G.js";
2
2
  import { defaultTranslations as c } from "./i18n-provider-defaults.js";
3
- import { A as g, C as p, t as v, s as I, v as T, y as S, B as f, l as y, i as x, q as b, E as k, G as B, p as H, r as L, j as M, e as O, g as V, k as w, F as D, T as z, w as E, h as G, a as j, n as q, z as R, m as U, o as J, D as K, b as N, f as Q, x as W, c as X, d as Y, u as Z } from "./F0AiProcessingOverlay-DfZDuEp8.js";
3
+ import { A as g, C as p, t as v, s as I, v as T, y as S, B as f, l as y, i as x, q as b, E as k, G as B, p as H, r as L, j as M, e as O, g as V, k as w, F as D, T as z, w as E, h as G, a as j, n as q, z as R, m as U, o as J, D as K, b as N, f as Q, x as W, c as X, d as Y, u as Z } from "./F0AiProcessingOverlay-BikXmclE.js";
4
4
  export {
5
5
  g as AiChatTranslationsProvider,
6
6
  e as ChatSpinner,
@@ -262,12 +262,12 @@ declare global {
262
262
  }
263
263
 
264
264
 
265
- declare namespace _Page {
265
+ declare namespace DaytimePageInternal {
266
266
  var displayName: string;
267
267
  }
268
268
 
269
269
 
270
- declare namespace DaytimePageInternal {
270
+ declare namespace _Page {
271
271
  var displayName: string;
272
272
  }
273
273