@factorialco/f0-react 8.10.1 → 8.11.1
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-DtCxNTHV.js → ChatPdfThumbnail-ELD5oua9.js} +1 -1
- package/dist/{ChatPostComposerDialog-DvRj6Soh.js → ChatPostComposerDialog-CwJQrIoS.js} +3 -3
- package/dist/DocumentToolbar-BtBTQCtY.js +113 -0
- package/dist/DocxViewer-DnBEWb0C.js +72 -0
- package/dist/{F0AiProcessingOverlay-DfZDuEp8.js → F0AiProcessingOverlay-BikXmclE.js} +1 -1
- package/dist/{F0CanvasPanel-CTqnQRE3.js → F0CanvasPanel-rSEKuj9G.js} +865 -863
- package/dist/{F0Map-CXih9UM9.js → F0Map-DFbZHu7m.js} +4 -4
- package/dist/{F0VideoPlayer-DK2PVVlI.js → F0VideoPlayer-Ba0vlv2e.js} +2 -2
- package/dist/{MapProvider-BTkCnHkC.js → MapProvider-YNqPcTEY.js} +12966 -12902
- package/dist/SheetViewer-Cms_aBKz.js +111 -0
- package/dist/{TextViewer-DK0N_Kiz.js → TextViewer-a0sR0H4H.js} +37 -32
- package/dist/ai.d.ts +12 -12
- package/dist/ai.js +2 -2
- package/dist/component-status.d.ts +12 -12
- package/dist/component-status.js +1 -1
- package/dist/{experimental-CpcmlTSN.js → experimental-BdZCIB78.js} +8 -8
- package/dist/experimental.d.ts +12 -12
- package/dist/experimental.js +4 -4
- package/dist/f0.d.ts +87 -63
- package/dist/f0.js +49 -48
- package/dist/i18n-provider-defaults.d.ts +12 -12
- package/dist/{index-BjzZa_Vz.js → index-BIsKzqtW.js} +2 -2
- package/dist/{index-4Y21ajv9.js → index-D-9j-pbd.js} +1 -1
- package/dist/index-DWQKn9x1.js +4 -0
- package/dist/{index--AsP5ABt.js → index-Df2nVRI0.js} +3 -3
- package/dist/index-qNKyBZ0l.js +589 -0
- package/dist/index2.css +1 -1
- package/dist/{pdfWorker-DHCbnpQ0.js → pdfWorker-Ce0sEPyw.js} +2 -2
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/DocumentToolbar-BIEBSN8G.js +0 -93
- package/dist/DocxViewer-FAppzCEm.js +0 -67
- package/dist/SheetViewer-DgXiYpJt.js +0 -108
- package/dist/index-BZYFr1nf.js +0 -4
- package/dist/index-zpnaxwYU.js +0 -556
package/package.json
CHANGED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { jsxs as i, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { useState as b, useCallback as m, useMemo as p } from "react";
|
|
3
|
-
import { u as x, i as w, j as k, k as S, l as C } from "./F0CanvasPanel-CTqnQRE3.js";
|
|
4
|
-
import { n as g, a as h, f as v, T as n, d as F } from "./index-zpnaxwYU.js";
|
|
5
|
-
const D = () => {
|
|
6
|
-
const [r, a] = b(1), t = m(
|
|
7
|
-
() => a((e) => g(e) ?? e),
|
|
8
|
-
[]
|
|
9
|
-
), c = m(
|
|
10
|
-
() => a((e) => h(e) ?? e),
|
|
11
|
-
[]
|
|
12
|
-
);
|
|
13
|
-
return { scale: r, zoomIn: t, zoomOut: c, setScale: a };
|
|
14
|
-
}, I = ({
|
|
15
|
-
url: r,
|
|
16
|
-
filename: a,
|
|
17
|
-
withCredentials: t,
|
|
18
|
-
actions: c,
|
|
19
|
-
zoom: e,
|
|
20
|
-
children: f
|
|
21
|
-
}) => {
|
|
22
|
-
const { pdfViewer: s } = x(), d = p(
|
|
23
|
-
() => v.map((l) => ({
|
|
24
|
-
value: l,
|
|
25
|
-
label: `${Number(l) * 100}%`
|
|
26
|
-
})),
|
|
27
|
-
[]
|
|
28
|
-
);
|
|
29
|
-
return /* @__PURE__ */ i(
|
|
30
|
-
"div",
|
|
31
|
-
{
|
|
32
|
-
role: "toolbar",
|
|
33
|
-
"aria-label": s.toolbar,
|
|
34
|
-
className: "F0PdfViewer__surface sticky top-0 z-10 flex flex-row items-center justify-between gap-2 px-6 py-4",
|
|
35
|
-
children: [
|
|
36
|
-
/* @__PURE__ */ o("div", { className: "flex min-w-0 flex-1 basis-0 flex-row items-center gap-2 overflow-x-auto", children: f }),
|
|
37
|
-
e ? /* @__PURE__ */ i("div", { className: "flex shrink-0 flex-row items-center gap-2", children: [
|
|
38
|
-
/* @__PURE__ */ o(
|
|
39
|
-
n,
|
|
40
|
-
{
|
|
41
|
-
label: s.zoomOut,
|
|
42
|
-
onClick: e.zoomOut,
|
|
43
|
-
icon: w
|
|
44
|
-
}
|
|
45
|
-
),
|
|
46
|
-
/* @__PURE__ */ o(
|
|
47
|
-
n,
|
|
48
|
-
{
|
|
49
|
-
label: s.zoomIn,
|
|
50
|
-
onClick: e.zoomIn,
|
|
51
|
-
icon: k
|
|
52
|
-
}
|
|
53
|
-
),
|
|
54
|
-
/* @__PURE__ */ o(
|
|
55
|
-
S,
|
|
56
|
-
{
|
|
57
|
-
hideLabel: !0,
|
|
58
|
-
label: s.scaleSelector,
|
|
59
|
-
options: d,
|
|
60
|
-
value: String(e.scale),
|
|
61
|
-
onChange: (l) => e.setScale(Number(l))
|
|
62
|
-
}
|
|
63
|
-
)
|
|
64
|
-
] }) : null,
|
|
65
|
-
/* @__PURE__ */ i("div", { className: "flex flex-1 basis-0 flex-row items-center justify-end gap-2", children: [
|
|
66
|
-
/* @__PURE__ */ o(
|
|
67
|
-
n,
|
|
68
|
-
{
|
|
69
|
-
label: s.download,
|
|
70
|
-
onClick: () => {
|
|
71
|
-
F(r, a, t);
|
|
72
|
-
},
|
|
73
|
-
icon: C
|
|
74
|
-
}
|
|
75
|
-
),
|
|
76
|
-
c?.map((l, u) => /* @__PURE__ */ o(
|
|
77
|
-
n,
|
|
78
|
-
{
|
|
79
|
-
label: l.label,
|
|
80
|
-
onClick: l.onClick,
|
|
81
|
-
icon: l.icon
|
|
82
|
-
},
|
|
83
|
-
`${l.label}-${u}`
|
|
84
|
-
))
|
|
85
|
-
] })
|
|
86
|
-
]
|
|
87
|
-
}
|
|
88
|
-
);
|
|
89
|
-
};
|
|
90
|
-
export {
|
|
91
|
-
I as D,
|
|
92
|
-
D as u
|
|
93
|
-
};
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { jsxs as c, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { r as g } from "./docx-preview-BaRDMyPN.js";
|
|
3
|
-
import { useRef as b, useState as h, useEffect as w } from "react";
|
|
4
|
-
import { u as p, S as v } from "./F0CanvasPanel-CTqnQRE3.js";
|
|
5
|
-
import { u as x, D as y } from "./DocumentToolbar-BIEBSN8G.js";
|
|
6
|
-
const V = ({
|
|
7
|
-
url: t,
|
|
8
|
-
filename: d,
|
|
9
|
-
withCredentials: a = !0,
|
|
10
|
-
actions: m
|
|
11
|
-
}) => {
|
|
12
|
-
const s = p(), i = x(), u = b(null), [l, n] = h("loading");
|
|
13
|
-
return w(() => {
|
|
14
|
-
const f = u.current;
|
|
15
|
-
if (!f)
|
|
16
|
-
return;
|
|
17
|
-
let r = !1;
|
|
18
|
-
return n("loading"), fetch(t, { credentials: a ? "include" : "same-origin" }).then((e) => {
|
|
19
|
-
if (!e.ok)
|
|
20
|
-
throw new Error(`${e.status}`);
|
|
21
|
-
return e.blob();
|
|
22
|
-
}).then(async (e) => {
|
|
23
|
-
r || (await g(e, f, void 0, {
|
|
24
|
-
inWrapper: !0,
|
|
25
|
-
breakPages: !0
|
|
26
|
-
}), r || n("ready"));
|
|
27
|
-
}).catch(() => {
|
|
28
|
-
r || n("failed");
|
|
29
|
-
}), () => {
|
|
30
|
-
r = !0;
|
|
31
|
-
};
|
|
32
|
-
}, [t, a]), /* @__PURE__ */ c("div", { className: "flex h-full w-full flex-col bg-f1-background", children: [
|
|
33
|
-
/* @__PURE__ */ o(
|
|
34
|
-
y,
|
|
35
|
-
{
|
|
36
|
-
url: t,
|
|
37
|
-
filename: d,
|
|
38
|
-
withCredentials: a,
|
|
39
|
-
actions: m,
|
|
40
|
-
zoom: i
|
|
41
|
-
}
|
|
42
|
-
),
|
|
43
|
-
/* @__PURE__ */ c("div", { className: "relative min-h-0 grow overflow-auto bg-f1-background-secondary", children: [
|
|
44
|
-
l === "loading" ? /* @__PURE__ */ o(
|
|
45
|
-
v,
|
|
46
|
-
{
|
|
47
|
-
role: "status",
|
|
48
|
-
"aria-busy": !0,
|
|
49
|
-
"aria-label": s.pdfViewer.loading,
|
|
50
|
-
className: "absolute inset-0 h-full w-full rounded-none"
|
|
51
|
-
}
|
|
52
|
-
) : null,
|
|
53
|
-
l === "failed" ? /* @__PURE__ */ o("div", { className: "flex h-full w-full items-center justify-center bg-f1-background text-f1-foreground-secondary", children: s.pdfViewer.previewFailed }) : null,
|
|
54
|
-
/* @__PURE__ */ o(
|
|
55
|
-
"div",
|
|
56
|
-
{
|
|
57
|
-
ref: u,
|
|
58
|
-
className: l === "failed" ? "hidden" : void 0,
|
|
59
|
-
style: { zoom: i.scale }
|
|
60
|
-
}
|
|
61
|
-
)
|
|
62
|
-
] })
|
|
63
|
-
] });
|
|
64
|
-
};
|
|
65
|
-
export {
|
|
66
|
-
V as default
|
|
67
|
-
};
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { jsxs as a, jsx as r, Fragment as N } from "react/jsx-runtime";
|
|
2
|
-
import { useState as i, useEffect as k } from "react";
|
|
3
|
-
import { u as v, T as S, h as V, S as R } from "./F0CanvasPanel-CTqnQRE3.js";
|
|
4
|
-
import { f as z, c as E } from "./sheetPreview-Djc-YyVs.js";
|
|
5
|
-
import { u as _, D as j } from "./DocumentToolbar-BIEBSN8G.js";
|
|
6
|
-
const g = 1e3, F = 100, G = ({
|
|
7
|
-
url: n,
|
|
8
|
-
filename: y,
|
|
9
|
-
withCredentials: d = !0,
|
|
10
|
-
actions: x
|
|
11
|
-
}) => {
|
|
12
|
-
const l = v(), f = _(), [t, m] = i(null), [w, c] = i(!1), [u, b] = i(0);
|
|
13
|
-
k(() => {
|
|
14
|
-
let e = !1;
|
|
15
|
-
return m(null), c(!1), b(0), z(n, {
|
|
16
|
-
maxRows: g,
|
|
17
|
-
maxCols: F,
|
|
18
|
-
withCredentials: d
|
|
19
|
-
}).then((o) => {
|
|
20
|
-
e || (o.length === 0 ? c(!0) : m(o));
|
|
21
|
-
}).catch(() => {
|
|
22
|
-
e || c(!0);
|
|
23
|
-
}), () => {
|
|
24
|
-
e = !0;
|
|
25
|
-
};
|
|
26
|
-
}, [n, d]);
|
|
27
|
-
const s = t ? t[Math.min(u, t.length - 1)] : null, h = s ? E(s.rows) : [];
|
|
28
|
-
return /* @__PURE__ */ a("div", { className: "flex h-full w-full flex-col bg-f1-background", children: [
|
|
29
|
-
/* @__PURE__ */ r(
|
|
30
|
-
j,
|
|
31
|
-
{
|
|
32
|
-
url: n,
|
|
33
|
-
filename: y,
|
|
34
|
-
withCredentials: d,
|
|
35
|
-
actions: x,
|
|
36
|
-
zoom: f,
|
|
37
|
-
children: t && t.length > 1 ? /* @__PURE__ */ r(
|
|
38
|
-
S,
|
|
39
|
-
{
|
|
40
|
-
type: "single",
|
|
41
|
-
size: "sm",
|
|
42
|
-
value: String(u),
|
|
43
|
-
onValueChange: (e) => {
|
|
44
|
-
e && b(Number(e));
|
|
45
|
-
},
|
|
46
|
-
className: "justify-start",
|
|
47
|
-
children: t.map((e, o) => /* @__PURE__ */ r(
|
|
48
|
-
V,
|
|
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
|
-
w ? /* @__PURE__ */ r("div", { className: "flex min-h-0 grow items-center justify-center text-f1-foreground-secondary", children: l.pdfViewer.previewFailed }) : s ? /* @__PURE__ */ a(N, { children: [
|
|
61
|
-
/* @__PURE__ */ r("div", { className: "min-h-0 grow overflow-auto", children: /* @__PURE__ */ a(
|
|
62
|
-
"table",
|
|
63
|
-
{
|
|
64
|
-
className: "border-collapse text-sm",
|
|
65
|
-
style: { zoom: f.scale },
|
|
66
|
-
children: [
|
|
67
|
-
/* @__PURE__ */ r("thead", { children: /* @__PURE__ */ a("tr", { children: [
|
|
68
|
-
/* @__PURE__ */ r("th", { className: "sticky top-0 z-10 border border-solid border-f1-border-secondary bg-f1-background-secondary px-2 py-1" }),
|
|
69
|
-
h.map((e) => /* @__PURE__ */ r(
|
|
70
|
-
"th",
|
|
71
|
-
{
|
|
72
|
-
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",
|
|
73
|
-
children: e
|
|
74
|
-
},
|
|
75
|
-
e
|
|
76
|
-
))
|
|
77
|
-
] }) }),
|
|
78
|
-
/* @__PURE__ */ r("tbody", { children: s.rows.map((e, o) => /* @__PURE__ */ a("tr", { children: [
|
|
79
|
-
/* @__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 }),
|
|
80
|
-
h.map((I, p) => /* @__PURE__ */ r(
|
|
81
|
-
"td",
|
|
82
|
-
{
|
|
83
|
-
className: "whitespace-nowrap border border-solid border-f1-border-secondary px-2 py-1 text-f1-foreground",
|
|
84
|
-
children: e[p] ?? ""
|
|
85
|
-
},
|
|
86
|
-
p
|
|
87
|
-
))
|
|
88
|
-
] }, o)) })
|
|
89
|
-
]
|
|
90
|
-
}
|
|
91
|
-
) }),
|
|
92
|
-
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: l.t("pdfViewer.showingFirstRows.other", {
|
|
93
|
-
count: g
|
|
94
|
-
}) }) : null
|
|
95
|
-
] }) : /* @__PURE__ */ r(
|
|
96
|
-
R,
|
|
97
|
-
{
|
|
98
|
-
role: "status",
|
|
99
|
-
"aria-busy": !0,
|
|
100
|
-
"aria-label": l.pdfViewer.loading,
|
|
101
|
-
className: "min-h-0 w-full grow rounded-none"
|
|
102
|
-
}
|
|
103
|
-
)
|
|
104
|
-
] });
|
|
105
|
-
};
|
|
106
|
-
export {
|
|
107
|
-
G as default
|
|
108
|
-
};
|
package/dist/index-BZYFr1nf.js
DELETED