@factorialco/f0-react 8.28.3 → 8.28.4

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 (36) hide show
  1. package/dist/{ChatDocxThumbnail-D5hDwmp7.js → ChatDocxThumbnail-DTpOzL9A.js} +7 -7
  2. package/dist/{ChatPdfThumbnail-Cf74m771.js → ChatPdfThumbnail-QKm8T1iP.js} +1 -1
  3. package/dist/{ChatPostComposerDialog-pRNELk68.js → ChatPostComposerDialog-DF5B8NLo.js} +3 -3
  4. package/dist/{ChatSheetThumbnail-D8aN1W_0.js → ChatSheetThumbnail-CyiwSdZJ.js} +1 -1
  5. package/dist/{DocumentToolbar-C4DUcWl7.js → DocumentToolbar-BAa5mh7x.js} +2 -2
  6. package/dist/{DocxViewer-M4FGdd_h.js → DocxViewer-CYBh46FI.js} +7 -7
  7. package/dist/{F0AiProcessingOverlay-Cpx37q3a.js → F0AiProcessingOverlay-3H79lgMd.js} +1 -1
  8. package/dist/{F0CanvasPanel-CRTe0CIF.js → F0CanvasPanel-DAEeI3lV.js} +199 -199
  9. package/dist/{F0Map-BywRoarL.js → F0Map-B7PwCmUl.js} +4 -4
  10. package/dist/{F0VideoPlayer-DUv08bcV.js → F0VideoPlayer-CNvEtJ9U.js} +18 -18
  11. package/dist/{MapProvider-CTtL5mc3.js → MapProvider-WM9ZFI_s.js} +2 -2
  12. package/dist/SheetViewer-CvQ24W5k.js +123 -0
  13. package/dist/{TextViewer-54DAaDA1.js → TextViewer-uZnjAB6W.js} +2 -2
  14. package/dist/ai.d.ts +6 -6
  15. package/dist/ai.js +2 -2
  16. package/dist/component-status.d.ts +6 -6
  17. package/dist/component-status.js +1 -1
  18. package/dist/{experimental-STLmChcB.js → experimental-Bzwkrec6.js} +179 -179
  19. package/dist/experimental.d.ts +6 -6
  20. package/dist/experimental.js +40 -40
  21. package/dist/f0.d.ts +6 -6
  22. package/dist/f0.js +10 -10
  23. package/dist/i18n-provider-defaults.d.ts +6 -6
  24. package/dist/{index-DFrzKaGA.js → index-98s6Ae16.js} +62 -62
  25. package/dist/{index-9MKvlApA.js → index-B1tQWotf.js} +28 -28
  26. package/dist/{index-BXS__6p-.js → index-BuHr35P1.js} +15 -15
  27. package/dist/{index-CKzBQYgd.js → index-Ck8-Kqxo.js} +2 -2
  28. package/dist/index-D4H-LP6r.js +4 -0
  29. package/dist/{pdfWorker-DACTjTuR.js → pdfWorker-C8Mu95m3.js} +2 -2
  30. package/dist/{docx-preview-BaRDMyPN.js → renderDocx-CVEzw9MK.js} +920 -901
  31. package/dist/sheetPreview-Bqj3xODH.js +51 -0
  32. package/dist/styles.css +1 -1
  33. package/package.json +1 -1
  34. package/dist/SheetViewer-BK9NNMZ9.js +0 -111
  35. package/dist/index-D0rQW0DI.js +0 -4
  36. package/dist/sheetPreview-Djc-YyVs.js +0 -37
@@ -1,7 +1,7 @@
1
- import { S as E, y as Ce, u as X, z as Te, w as Le, i as Fe, j as De, k as Ve, A as Ee, l as He, B as Ue, E as Oe, G as We, H as je } from "./F0CanvasPanel-CRTe0CIF.js";
1
+ import { S as E, z as Ce, u as X, A as Te, x as Le, j as Fe, k as De, l as Ve, B as Ee, m as He, E as Ue, G as Oe, H as We, J as je } from "./F0CanvasPanel-DAEeI3lV.js";
2
2
  import { jsx as r, jsxs as P } from "react/jsx-runtime";
3
3
  import { lazy as Y, forwardRef as ce, Suspense as $e, useState as U, useRef as A, useCallback as w, useMemo as ie, useEffect as V } from "react";
4
- import { e as ze, D as Me, P as Be, c as Ie } from "./pdfWorker-DACTjTuR.js";
4
+ import { e as ze, D as Me, P as Be, c as Ie } from "./pdfWorker-C8Mu95m3.js";
5
5
  import { F as Ae } from "./Printer-BD-FEi_2.js";
6
6
  import { d as G } from "./tooltip-CrXp1Uaz.js";
7
7
  import './index2.css';const Ge = ({
@@ -58,22 +58,22 @@ import './index2.css';const Ge = ({
58
58
  onZoomIn: u,
59
59
  onZoomOut: b,
60
60
  onScaleChange: N,
61
- rotatable: v,
61
+ rotatable: y,
62
62
  onRotate: x,
63
63
  onPrint: O,
64
64
  onDownload: m,
65
65
  actions: C,
66
- placement: y
66
+ placement: v
67
67
  }) => {
68
- const { pdfViewer: p } = X(), g = qe(y);
68
+ const { pdfViewer: p } = X(), g = qe(v);
69
69
  return /* @__PURE__ */ P(
70
70
  "div",
71
71
  {
72
72
  ref: e,
73
73
  role: "toolbar",
74
74
  "aria-label": p.toolbar,
75
- "data-placement": y,
76
- className: Ze(y),
75
+ "data-placement": v,
76
+ className: Ze(v),
77
77
  children: [
78
78
  i ? /* @__PURE__ */ P(
79
79
  "span",
@@ -81,7 +81,7 @@ import './index2.css';const Ge = ({
81
81
  "aria-live": "polite",
82
82
  className: G(
83
83
  "whitespace-nowrap text-sm font-medium",
84
- y === "top" ? "text-f1-foreground-secondary" : "pl-2 text-f1-foreground-inverse"
84
+ v === "top" ? "text-f1-foreground-secondary" : "pl-2 text-f1-foreground-inverse"
85
85
  ),
86
86
  children: [
87
87
  t,
@@ -139,7 +139,7 @@ import './index2.css';const Ge = ({
139
139
  )
140
140
  ] }),
141
141
  /* @__PURE__ */ P("div", { className: g, children: [
142
- v ? /* @__PURE__ */ r(
142
+ y ? /* @__PURE__ */ r(
143
143
  _,
144
144
  {
145
145
  label: p.rotate,
@@ -224,21 +224,21 @@ import './index2.css';const Ge = ({
224
224
  return t.forEach((s, c) => {
225
225
  if (!s)
226
226
  return;
227
- const h = s.offsetHeight, u = s.offsetTop, b = u + h, N = e.offsetHeight - o, v = e.scrollTop + o, x = v + N;
228
- if (!(v < b && x > u))
227
+ const h = s.offsetHeight, u = s.offsetTop, b = u + h, N = e.offsetHeight - o, y = e.scrollTop + o, x = y + N;
228
+ if (!(y < b && x > u))
229
229
  return;
230
230
  let m;
231
- if (v <= u)
231
+ if (y <= u)
232
232
  m = x > b ? h : x - u;
233
233
  else {
234
- let C = v - u;
234
+ let C = y - u;
235
235
  x < b && (C += b - x), m = h - C;
236
236
  }
237
237
  m > l && (l = m, i = c + 1);
238
238
  }), i;
239
239
  };
240
240
  ze();
241
- const ot = Y(() => import("./SheetViewer-BK9NNMZ9.js")), nt = Y(() => import("./DocxViewer-M4FGdd_h.js")), rt = Y(() => import("./TextViewer-54DAaDA1.js")), se = 48, at = 150, ue = ce((e, t) => {
241
+ const ot = Y(() => import("./SheetViewer-CvQ24W5k.js")), nt = Y(() => import("./DocxViewer-CYBh46FI.js")), rt = Y(() => import("./TextViewer-uZnjAB6W.js")), se = 48, at = 150, ue = ce((e, t) => {
242
242
  const { kind: o = "pdf", mimeType: i, toolbar: l = "top", ...s } = e;
243
243
  if (o === "pdf")
244
244
  return /* @__PURE__ */ r(me, { ref: t, toolbar: l, ...s });
@@ -248,12 +248,12 @@ const ot = Y(() => import("./SheetViewer-BK9NNMZ9.js")), nt = Y(() => import("./
248
248
  actions: u,
249
249
  withCredentials: b = !0,
250
250
  page: N,
251
- pagesToDisplay: v,
251
+ pagesToDisplay: y,
252
252
  initialScale: x,
253
253
  rotatable: O,
254
254
  initialRotation: m,
255
255
  onRotationChange: C,
256
- onPdfLoaded: y,
256
+ onPdfLoaded: v,
257
257
  onPageChange: p,
258
258
  ...g
259
259
  } = s;
@@ -311,12 +311,12 @@ const me = ce((e, t) => {
311
311
  rotatable: u = !1,
312
312
  initialRotation: b = 0,
313
313
  onRotationChange: N,
314
- onPdfLoaded: v,
314
+ onPdfLoaded: y,
315
315
  onPageChange: x,
316
316
  actions: O,
317
317
  toolbar: m = "top",
318
318
  ...C
319
- } = e, { pdfViewer: y } = X(), p = Math.max(
319
+ } = e, { pdfViewer: v } = X(), p = Math.max(
320
320
  2,
321
321
  typeof window > "u" ? 1 : window.devicePixelRatio || 1
322
322
  ), [g, R] = U(null), [S, ee] = U([]), [T, Z] = U(1), [k, te] = U(0), [L, q] = U(c), [F, ge] = U(b), $ = A(null), J = A(null), W = A([]), z = s.length > 0 ? s.length : g?.numPages, M = w(
@@ -324,14 +324,14 @@ const me = ce((e, t) => {
324
324
  [m]
325
325
  ), oe = S.find(Boolean), ne = (oe?.originalWidth ?? 595) * T, re = (oe?.originalHeight ?? 842) * T, he = ie(
326
326
  () => [
327
- { value: "page-width", label: y.pageWidth },
328
- { value: "page-fit", label: y.pageFit },
327
+ { value: "page-width", label: v.pageWidth },
328
+ { value: "page-fit", label: v.pageFit },
329
329
  ...Q.map((n) => ({
330
330
  value: n,
331
331
  label: `${Number(n) * 100}%`
332
332
  }))
333
333
  ],
334
- [y.pageWidth, y.pageFit]
334
+ [v.pageWidth, v.pageFit]
335
335
  ), be = ie(() => ({ url: o, withCredentials: h }), [o, h]), H = w(
336
336
  (n) => {
337
337
  const a = (z ?? 1) - 1, d = Math.min(Math.max(n, 0), a), f = W.current[d], D = f?.offsetParent;
@@ -365,21 +365,21 @@ const me = ce((e, t) => {
365
365
  }, []), xe = w(
366
366
  () => B(Ye(T)),
367
367
  [T, B]
368
- ), ye = w(
368
+ ), ve = w(
369
369
  () => B(et(T)),
370
370
  [T, B]
371
- ), ve = w(() => {
371
+ ), ye = w(() => {
372
372
  ge((n) => {
373
373
  const a = (n + 90) % 360;
374
374
  return N?.(a), a;
375
375
  });
376
376
  }, [N]), Pe = w(
377
377
  (n) => {
378
- R(n), v?.(n), setTimeout(() => {
378
+ R(n), y?.(n), setTimeout(() => {
379
379
  te(l + 1), H(l);
380
380
  }, 0);
381
381
  },
382
- [v, l, H]
382
+ [y, l, H]
383
383
  ), Re = w(
384
384
  (n) => {
385
385
  const a = n.target;
@@ -440,10 +440,10 @@ const me = ce((e, t) => {
440
440
  onPreviousPage: () => H(k - 2),
441
441
  onNextPage: () => H(k),
442
442
  onZoomIn: xe,
443
- onZoomOut: ye,
443
+ onZoomOut: ve,
444
444
  onScaleChange: we,
445
445
  rotatable: u,
446
- onRotate: ve,
446
+ onRotate: ye,
447
447
  onPrint: Se,
448
448
  onDownload: ke,
449
449
  actions: O
@@ -471,7 +471,7 @@ const me = ce((e, t) => {
471
471
  loading: /* @__PURE__ */ r(
472
472
  Ge,
473
473
  {
474
- label: y.loading,
474
+ label: v.loading,
475
475
  width: ne,
476
476
  height: re
477
477
  }
@@ -1,9 +1,9 @@
1
1
  import { jsxs as k, jsx as o, Fragment as rn } from "react/jsx-runtime";
2
2
  import { useRef as p, useEffect as v, useMemo as M, useCallback as A, useState as w } from "react";
3
- import { o as En, q as Fn, r as ln, s as Tn, t as Dn, v as Pn, w as Bn, x as Ln, u as sn } from "./F0CanvasPanel-CRTe0CIF.js";
3
+ import { q as En, r as Fn, s as ln, t as Tn, v as Dn, w as Pn, x as Bn, y as Ln, u as sn } from "./F0CanvasPanel-DAEeI3lV.js";
4
4
  import { d as L, f as on, u as In } from "./tooltip-CrXp1Uaz.js";
5
- import { a as cn, u as Qn, S as jn } from "./MapProvider-CTtL5mc3.js";
6
- import { a as Kn, b as Un, R as tn } from "./F0Map-BywRoarL.js";
5
+ import { a as cn, u as Qn, S as jn } from "./MapProvider-WM9ZFI_s.js";
6
+ import { a as Kn, b as Un, R as tn } from "./F0Map-B7PwCmUl.js";
7
7
  const R = 3, _n = ({
8
8
  title: e,
9
9
  count: t,
@@ -283,7 +283,7 @@ const R = 3, _n = ({
283
283
  );
284
284
  },
285
285
  [l, d, f, s]
286
- ), S = p(null), N = A(
286
+ ), S = p(null), y = A(
287
287
  (n) => {
288
288
  b(n), x.has(n) && S.current && (O.current = n, S.current.focusMarker(n), O.current = null, D.current = !0);
289
289
  },
@@ -295,23 +295,23 @@ const R = 3, _n = ({
295
295
  },
296
296
  []
297
297
  );
298
- const [P, Nn] = w(!1), [yn, z] = w(!1), [B, H] = w(""), J = (n) => {
299
- n !== P && (Nn(n), gn?.(n));
298
+ const [P, yn] = w(!1), [Nn, z] = w(!1), [B, H] = w(""), J = (n) => {
299
+ n !== P && (yn(n), gn?.(n));
300
300
  }, An = () => {
301
301
  z(!0), H(""), J(!0);
302
302
  }, Z = M(
303
303
  () => ({
304
- select: (n) => n ? N(f(n)) : b(null),
304
+ select: (n) => n ? y(f(n)) : b(null),
305
305
  selectedRecordId: h,
306
306
  placement: (n) => {
307
307
  const g = f(n);
308
308
  return x.has(g) ? "placed" : W.get(g) ?? "unplaced";
309
309
  }
310
310
  }),
311
- [N, b, f, h, x, W]
312
- ), y = h ? d.find((n) => f(n) === h) ?? null : null, G = p(null);
313
- y && (G.current = y);
314
- const V = y ?? G.current, Y = A(() => S.current?.fitToMarkers(), []), wn = Xn({
311
+ [y, b, f, h, x, W]
312
+ ), N = h ? d.find((n) => f(n) === h) ?? null : null, G = p(null);
313
+ N && (G.current = N);
314
+ const V = N ?? G.current, Y = A(() => S.current?.fitToMarkers(), []), wn = Xn({
315
315
  querySignature: JSON.stringify({
316
316
  filters: e.currentFilters ?? {},
317
317
  search: e.currentSearch ?? ""
@@ -331,8 +331,8 @@ const R = 3, _n = ({
331
331
  const nn = p(null);
332
332
  v(() => {
333
333
  const n = `${c}:${u ?? 0}`;
334
- !c || nn.current === n || !d.some((g) => f(g) === c) || (nn.current = n, N(c));
335
- }, [c, u, d, f, N]);
334
+ !c || nn.current === n || !d.some((g) => f(g) === c) || (nn.current = n, y(c));
335
+ }, [c, u, d, f, y]);
336
336
  const Rn = M(() => {
337
337
  const n = B.trim().toLowerCase();
338
338
  return !C || !n ? null : [...m, ...T].filter(
@@ -365,7 +365,7 @@ const R = 3, _n = ({
365
365
  unplaced: m,
366
366
  placed: T,
367
367
  matches: Rn,
368
- notOnMapOpen: yn,
368
+ notOnMapOpen: Nn,
369
369
  onNotOnMapOpenChange: z
370
370
  }
371
371
  ),
@@ -399,7 +399,7 @@ const R = 3, _n = ({
399
399
  // oxlint-disable-next-line react/jsx-no-useless-fragment -- a node, not null: see above
400
400
  /* @__PURE__ */ o(rn, {})
401
401
  ) : null,
402
- detailOpen: !!y,
402
+ detailOpen: !!N,
403
403
  clearSelectionOnBackgroundClick: !F,
404
404
  fullScreen: !0
405
405
  }