@factorialco/f0-react 6.88.3 → 6.88.5
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-DdrOp7Rm.js → ChatPdfThumbnail-DTUuStMh.js} +1 -1
- package/dist/{CoachmarkProvider-CoPINK6_.js → CoachmarkProvider-FhruFtJe.js} +2701 -2711
- package/dist/{DocumentToolbar-p4qZSVUD.js → DocumentToolbar-DUvkpuLz.js} +29 -29
- package/dist/{DocxViewer-_Z59Wr2S.js → DocxViewer-CcY7eUEM.js} +10 -10
- package/dist/{F0AiProcessingOverlay-CwJG6TgU.js → F0AiProcessingOverlay-ByIJjCN4.js} +408 -402
- package/dist/{F0CanvasPanel-CpgOQnbI.js → F0CanvasPanel-VDUWMSmw.js} +1426 -1416
- package/dist/{F0VideoPlayer-CXAjfSnS.js → F0VideoPlayer-CxWjT4fA.js} +143 -139
- package/dist/{LocationMap-Bp7gglCx.js → LocationMap-D6lqT6Gn.js} +1 -1
- package/dist/{SheetViewer-DSbC_CR2.js → SheetViewer-CrvzW594.js} +12 -12
- package/dist/{TextViewer-BkgAiijZ.js → TextViewer-GmdvBh9P.js} +2 -2
- package/dist/ai.d.ts +9 -9
- package/dist/ai.js +2 -2
- package/dist/component-status.d.ts +9 -9
- package/dist/component-status.js +72 -70
- package/dist/{experimental-Crt7EEav.js → experimental-CLNsFHrX.js} +583 -569
- package/dist/experimental.d.ts +9 -9
- package/dist/experimental.js +3 -3
- package/dist/f0.d.ts +9 -9
- package/dist/f0.js +396 -388
- package/dist/i18n-provider-defaults.d.ts +9 -9
- package/dist/index-DJGcz9TP.js +4 -0
- package/dist/{index-BP9845Kl.js → index-DfeNTo6-.js} +49 -49
- package/dist/{pdfWorker-wHv_aPH2.js → pdfWorker-38_nmvOc.js} +2 -2
- package/package.json +2 -1
- package/dist/index-uG8opRj1.js +0 -4
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { jsxs as i, jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { u as x, i as w, j as k, k as S, l as C } from "./F0CanvasPanel-
|
|
4
|
-
import { n as g, a as h, f as v, T as
|
|
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-VDUWMSmw.js";
|
|
4
|
+
import { n as g, a as h, f as v, T as n, d as F } from "./index-DfeNTo6-.js";
|
|
5
5
|
const D = () => {
|
|
6
|
-
const [
|
|
6
|
+
const [r, a] = b(1), t = m(
|
|
7
7
|
() => a((e) => g(e) ?? e),
|
|
8
8
|
[]
|
|
9
9
|
), c = m(
|
|
10
10
|
() => a((e) => h(e) ?? e),
|
|
11
11
|
[]
|
|
12
12
|
);
|
|
13
|
-
return { scale:
|
|
13
|
+
return { scale: r, zoomIn: t, zoomOut: c, setScale: a };
|
|
14
14
|
}, I = ({
|
|
15
|
-
url:
|
|
15
|
+
url: r,
|
|
16
16
|
filename: a,
|
|
17
|
-
withCredentials:
|
|
17
|
+
withCredentials: t,
|
|
18
18
|
actions: c,
|
|
19
19
|
zoom: e,
|
|
20
20
|
children: f
|
|
21
21
|
}) => {
|
|
22
22
|
const { pdfViewer: s } = x(), d = p(
|
|
23
|
-
() => v.map((
|
|
24
|
-
value:
|
|
25
|
-
label: `${Number(
|
|
23
|
+
() => v.map((l) => ({
|
|
24
|
+
value: l,
|
|
25
|
+
label: `${Number(l) * 100}%`
|
|
26
26
|
})),
|
|
27
27
|
[]
|
|
28
28
|
);
|
|
@@ -33,54 +33,54 @@ const D = () => {
|
|
|
33
33
|
"aria-label": s.toolbar,
|
|
34
34
|
className: "F0PdfViewer__surface sticky top-0 z-10 flex flex-row items-center justify-between gap-2 px-6 py-4",
|
|
35
35
|
children: [
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
e
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
|
|
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
40
|
{
|
|
41
41
|
label: s.zoomOut,
|
|
42
42
|
onClick: e.zoomOut,
|
|
43
43
|
icon: w
|
|
44
44
|
}
|
|
45
45
|
),
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
|
|
46
|
+
/* @__PURE__ */ o(
|
|
47
|
+
n,
|
|
48
48
|
{
|
|
49
49
|
label: s.zoomIn,
|
|
50
50
|
onClick: e.zoomIn,
|
|
51
51
|
icon: k
|
|
52
52
|
}
|
|
53
53
|
),
|
|
54
|
-
/* @__PURE__ */
|
|
54
|
+
/* @__PURE__ */ o(
|
|
55
55
|
S,
|
|
56
56
|
{
|
|
57
57
|
hideLabel: !0,
|
|
58
58
|
label: s.scaleSelector,
|
|
59
59
|
options: d,
|
|
60
60
|
value: String(e.scale),
|
|
61
|
-
onChange: (
|
|
61
|
+
onChange: (l) => e.setScale(Number(l))
|
|
62
62
|
}
|
|
63
63
|
)
|
|
64
|
-
] }),
|
|
64
|
+
] }) : null,
|
|
65
65
|
/* @__PURE__ */ i("div", { className: "flex flex-1 basis-0 flex-row items-center justify-end gap-2", children: [
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
-
|
|
66
|
+
/* @__PURE__ */ o(
|
|
67
|
+
n,
|
|
68
68
|
{
|
|
69
69
|
label: s.download,
|
|
70
70
|
onClick: () => {
|
|
71
|
-
F(
|
|
71
|
+
F(r, a, t);
|
|
72
72
|
},
|
|
73
73
|
icon: C
|
|
74
74
|
}
|
|
75
75
|
),
|
|
76
|
-
c?.map((
|
|
77
|
-
|
|
76
|
+
c?.map((l, u) => /* @__PURE__ */ o(
|
|
77
|
+
n,
|
|
78
78
|
{
|
|
79
|
-
label:
|
|
80
|
-
onClick:
|
|
81
|
-
icon:
|
|
79
|
+
label: l.label,
|
|
80
|
+
onClick: l.onClick,
|
|
81
|
+
icon: l.icon
|
|
82
82
|
},
|
|
83
|
-
`${
|
|
83
|
+
`${l.label}-${u}`
|
|
84
84
|
))
|
|
85
85
|
] })
|
|
86
86
|
]
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { jsxs as c, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { r as g } from "./docx-preview-BaRDMyPN.js";
|
|
3
3
|
import { useRef as h, useState as b, useEffect as p } from "react";
|
|
4
|
-
import { u as v, S as w } from "./F0CanvasPanel-
|
|
5
|
-
import { u as x, D as y } from "./DocumentToolbar-
|
|
4
|
+
import { u as v, S as w } from "./F0CanvasPanel-VDUWMSmw.js";
|
|
5
|
+
import { u as x, D as y } from "./DocumentToolbar-DUvkpuLz.js";
|
|
6
6
|
const V = ({
|
|
7
7
|
url: o,
|
|
8
8
|
filename: d,
|
|
9
9
|
withCredentials: a = !0,
|
|
10
10
|
actions: m
|
|
11
11
|
}) => {
|
|
12
|
-
const s = v(), i = x(),
|
|
12
|
+
const s = v(), i = x(), u = h(null), [l, n] = b("loading");
|
|
13
13
|
return p(() => {
|
|
14
|
-
const
|
|
15
|
-
if (!
|
|
14
|
+
const f = u.current;
|
|
15
|
+
if (!f)
|
|
16
16
|
return;
|
|
17
17
|
let r = !1;
|
|
18
18
|
return n("loading"), fetch(o, { credentials: a ? "include" : "same-origin" }).then((e) => {
|
|
@@ -21,7 +21,7 @@ const V = ({
|
|
|
21
21
|
return e.blob();
|
|
22
22
|
}).then((e) => {
|
|
23
23
|
if (!r)
|
|
24
|
-
return g(e,
|
|
24
|
+
return g(e, f, void 0, {
|
|
25
25
|
inWrapper: !0,
|
|
26
26
|
breakPages: !0
|
|
27
27
|
}).then(() => {
|
|
@@ -44,7 +44,7 @@ const V = ({
|
|
|
44
44
|
}
|
|
45
45
|
),
|
|
46
46
|
/* @__PURE__ */ c("div", { className: "relative min-h-0 grow overflow-auto bg-f1-background-secondary", children: [
|
|
47
|
-
l === "loading"
|
|
47
|
+
l === "loading" ? /* @__PURE__ */ t(
|
|
48
48
|
w,
|
|
49
49
|
{
|
|
50
50
|
role: "status",
|
|
@@ -52,12 +52,12 @@ const V = ({
|
|
|
52
52
|
"aria-label": s.pdfViewer.loading,
|
|
53
53
|
className: "absolute inset-0 h-full w-full rounded-none"
|
|
54
54
|
}
|
|
55
|
-
),
|
|
56
|
-
l === "failed"
|
|
55
|
+
) : null,
|
|
56
|
+
l === "failed" ? /* @__PURE__ */ t("div", { className: "flex h-full w-full items-center justify-center bg-f1-background text-f1-foreground-secondary", children: s.pdfViewer.previewFailed }) : null,
|
|
57
57
|
/* @__PURE__ */ t(
|
|
58
58
|
"div",
|
|
59
59
|
{
|
|
60
|
-
ref:
|
|
60
|
+
ref: u,
|
|
61
61
|
className: l === "failed" ? "hidden" : void 0,
|
|
62
62
|
style: { zoom: i.scale }
|
|
63
63
|
}
|