@factorialco/f0-react 8.28.2 → 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 (31) hide show
  1. package/dist/{ChatDocxThumbnail-D5hDwmp7.js → ChatDocxThumbnail-DTpOzL9A.js} +7 -7
  2. package/dist/{ChatPdfThumbnail-DQED3Mv_.js → ChatPdfThumbnail-QKm8T1iP.js} +1 -1
  3. package/dist/{ChatPostComposerDialog-Cglt6c1y.js → ChatPostComposerDialog-DF5B8NLo.js} +3 -3
  4. package/dist/{ChatSheetThumbnail-D8aN1W_0.js → ChatSheetThumbnail-CyiwSdZJ.js} +1 -1
  5. package/dist/{DocumentToolbar-BwYzIfge.js → DocumentToolbar-BAa5mh7x.js} +2 -2
  6. package/dist/{DocxViewer-Do_cwohd.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-BiyeWP_4.js → F0Map-B7PwCmUl.js} +4 -4
  10. package/dist/{F0VideoPlayer-DBb1J8Up.js → F0VideoPlayer-CNvEtJ9U.js} +18 -18
  11. package/dist/{MapProvider-DCv5Igan.js → MapProvider-WM9ZFI_s.js} +7170 -7160
  12. package/dist/SheetViewer-CvQ24W5k.js +123 -0
  13. package/dist/{TextViewer-Dt8cemWN.js → TextViewer-uZnjAB6W.js} +2 -2
  14. package/dist/ai.js +2 -2
  15. package/dist/component-status.js +1 -1
  16. package/dist/{experimental-LUkFpYEc.js → experimental-Bzwkrec6.js} +179 -179
  17. package/dist/experimental.js +40 -40
  18. package/dist/f0.js +10 -10
  19. package/dist/{index-DFrzKaGA.js → index-98s6Ae16.js} +62 -62
  20. package/dist/{index-BvI-KXPR.js → index-B1tQWotf.js} +28 -28
  21. package/dist/{index-Dfpbf7_V.js → index-BuHr35P1.js} +15 -15
  22. package/dist/{index-DmVaizb6.js → index-Ck8-Kqxo.js} +2 -2
  23. package/dist/index-D4H-LP6r.js +4 -0
  24. package/dist/{pdfWorker-BjGGQdoF.js → pdfWorker-C8Mu95m3.js} +2 -2
  25. package/dist/{docx-preview-BaRDMyPN.js → renderDocx-CVEzw9MK.js} +920 -901
  26. package/dist/sheetPreview-Bqj3xODH.js +51 -0
  27. package/dist/styles.css +1 -1
  28. package/package.json +1 -1
  29. package/dist/SheetViewer-BUSJWoTQ.js +0 -111
  30. package/dist/index-BI4MTa72.js +0 -4
  31. package/dist/sheetPreview-Djc-YyVs.js +0 -37
@@ -0,0 +1,123 @@
1
+ import { jsx as r, jsxs as n, Fragment as v } from "react/jsx-runtime";
2
+ import { useState as m, useEffect as E } from "react";
3
+ import { u as F, T as S, h as T, S as V, i as A } from "./F0CanvasPanel-DAEeI3lV.js";
4
+ import { d as D } from "./index-B1tQWotf.js";
5
+ import { f as L, c as R } from "./sheetPreview-Bqj3xODH.js";
6
+ import { u as z, D as U } from "./DocumentToolbar-BAa5mh7x.js";
7
+ const w = 1e3, _ = 100, $ = ({
8
+ url: a,
9
+ filename: f,
10
+ withCredentials: d = !0,
11
+ actions: k,
12
+ toolbar: l = "top"
13
+ }) => {
14
+ const c = F(), u = z(), [t, b] = m(null), [N, i] = m(!1), [g, h] = m(0);
15
+ E(() => {
16
+ let e = !1;
17
+ return b(null), i(!1), h(0), L(a, {
18
+ maxRows: w,
19
+ maxCols: _,
20
+ withCredentials: d
21
+ }).then((o) => {
22
+ e || (o.length === 0 ? i(!0) : b(o));
23
+ }).catch(() => {
24
+ e || i(!0);
25
+ }), () => {
26
+ e = !0;
27
+ };
28
+ }, [a, d]);
29
+ const s = t ? t[Math.min(g, t.length - 1)] : null, p = s ? R(s.rows) : [], y = /* @__PURE__ */ r(
30
+ U,
31
+ {
32
+ url: a,
33
+ filename: f,
34
+ withCredentials: d,
35
+ actions: k,
36
+ zoom: u,
37
+ placement: l,
38
+ children: t && t.length > 1 ? /* @__PURE__ */ r(
39
+ S,
40
+ {
41
+ type: "single",
42
+ size: "sm",
43
+ value: String(g),
44
+ onValueChange: (e) => {
45
+ e && h(Number(e));
46
+ },
47
+ className: "justify-start",
48
+ children: t.map((e, o) => /* @__PURE__ */ r(
49
+ T,
50
+ {
51
+ value: String(o),
52
+ className: "whitespace-nowrap",
53
+ children: e.name
54
+ },
55
+ `${e.name}-${o}`
56
+ ))
57
+ }
58
+ ) : null
59
+ }
60
+ );
61
+ return /* @__PURE__ */ n("div", { className: "relative flex h-full w-full flex-col bg-f1-background", children: [
62
+ l === "top" ? y : null,
63
+ N ? /* @__PURE__ */ r("div", { className: "flex min-h-0 grow items-center justify-center text-f1-foreground-secondary", children: c.pdfViewer.previewFailed }) : s ? /* @__PURE__ */ n(v, { children: [
64
+ /* @__PURE__ */ r("div", { className: "min-h-0 grow overflow-auto", children: /* @__PURE__ */ n(
65
+ "table",
66
+ {
67
+ className: "border-collapse text-sm",
68
+ style: { zoom: u.scale },
69
+ children: [
70
+ /* @__PURE__ */ r("thead", { children: /* @__PURE__ */ n("tr", { children: [
71
+ /* @__PURE__ */ r("th", { className: "sticky top-0 z-10 border border-solid border-f1-border-secondary bg-f1-background [background-image:linear-gradient(theme(colors.f1.background.secondary.DEFAULT),theme(colors.f1.background.secondary.DEFAULT))] px-2 py-1" }),
72
+ p.map((e) => /* @__PURE__ */ r(
73
+ "th",
74
+ {
75
+ className: "sticky top-0 z-10 border border-solid border-f1-border-secondary bg-f1-background [background-image:linear-gradient(theme(colors.f1.background.secondary.DEFAULT),theme(colors.f1.background.secondary.DEFAULT))] px-2 py-1 text-center font-medium text-f1-foreground-secondary",
76
+ children: e
77
+ },
78
+ e
79
+ ))
80
+ ] }) }),
81
+ /* @__PURE__ */ r("tbody", { children: s.rows.map((e, o) => /* @__PURE__ */ n("tr", { children: [
82
+ /* @__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 }),
83
+ p.map((j, x) => /* @__PURE__ */ r(
84
+ "td",
85
+ {
86
+ className: "whitespace-nowrap border border-solid border-f1-border-secondary px-2 py-1 text-f1-foreground",
87
+ children: e[x] ?? ""
88
+ },
89
+ x
90
+ ))
91
+ ] }, o)) })
92
+ ]
93
+ }
94
+ ) }),
95
+ s.truncatedRows ? /* @__PURE__ */ n("div", { className: "flex shrink-0 items-center gap-2 border-0 border-t border-solid border-f1-border-secondary px-3 py-1.5 text-sm text-f1-foreground-secondary", children: [
96
+ c.t("pdfViewer.showingFirstRows.other", {
97
+ count: w
98
+ }),
99
+ /* @__PURE__ */ r(
100
+ A,
101
+ {
102
+ onClick: () => {
103
+ D(a, f, d);
104
+ },
105
+ children: c.pdfViewer.download
106
+ }
107
+ )
108
+ ] }) : null
109
+ ] }) : /* @__PURE__ */ r(
110
+ V,
111
+ {
112
+ role: "status",
113
+ "aria-busy": !0,
114
+ "aria-label": c.pdfViewer.loading,
115
+ className: "min-h-0 w-full grow rounded-none"
116
+ }
117
+ ),
118
+ l === "floating" ? y : null
119
+ ] });
120
+ };
121
+ export {
122
+ $ as default
123
+ };
@@ -1,7 +1,7 @@
1
1
  import { jsxs as p, jsx as e } from "react/jsx-runtime";
2
2
  import { useState as u, useEffect as x } from "react";
3
- import { u as w, S as y, p as g } from "./F0CanvasPanel-CRTe0CIF.js";
4
- import { u as k, D as v } from "./DocumentToolbar-BwYzIfge.js";
3
+ import { u as w, S as y, p as g } from "./F0CanvasPanel-DAEeI3lV.js";
4
+ import { u as k, D as v } from "./DocumentToolbar-BAa5mh7x.js";
5
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",
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-CRTe0CIF.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-DAEeI3lV.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-Cpx37q3a.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-3H79lgMd.js";
4
4
  export {
5
5
  g as AiChatTranslationsProvider,
6
6
  e as ChatSpinner,