@factorialco/f0-react 4.43.0 → 4.45.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.
- package/dist/DocumentToolbar-CW3DaM_j.js +93 -0
- package/dist/DocxViewer-Dpj4i6ig.js +5575 -0
- package/dist/{F0AiProcessingOverlay-BEP7sCit.js → F0AiProcessingOverlay-rViVqtAb.js} +3 -3
- package/dist/{F0CanvasPanel-DbqD05BD.js → F0CanvasPanel-VGTPb68G.js} +87701 -87664
- package/dist/{LocationMap-k_Xf8FpF.js → LocationMap-CdKO0X5V.js} +1 -1
- package/dist/SheetViewer-huUU5vFM.js +137 -0
- package/dist/TextViewer-DXDZcvag.js +74 -0
- package/dist/ai.d.ts +11 -0
- package/dist/ai.js +2 -2
- package/dist/component-status.js +1 -1
- package/dist/experimental.d.ts +18 -1
- package/dist/experimental.js +5 -5
- package/dist/f0-C3TJ0moH.js +79279 -0
- package/dist/f0.d.ts +84 -1
- package/dist/f0.js +299 -79563
- package/dist/i18n-provider-defaults.d.ts +11 -0
- package/dist/i18n-provider-defaults.js +13 -2
- package/dist/{index-CU7LjzD8.js → index-CNi_8WQC.js} +14655 -14406
- package/dist/styles.css +1 -1
- package/dist/xlsx-CzlURDDb.js +24525 -0
- package/package.json +3 -2
- package/dist/xlsx-Bedf3nwD.js +0 -15557
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { jsxs as i, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { useState as u, useCallback as m, useMemo as p } from "react";
|
|
3
|
+
import { u as x, h as w, i as k, j as S, k as h } from "./F0CanvasPanel-VGTPb68G.js";
|
|
4
|
+
import { n as C, a as g, f as v, T as r, d as F } from "./f0-C3TJ0moH.js";
|
|
5
|
+
const D = () => {
|
|
6
|
+
const [t, a] = u(1), n = m(
|
|
7
|
+
() => a((e) => C(e) ?? e),
|
|
8
|
+
[]
|
|
9
|
+
), c = m(
|
|
10
|
+
() => a((e) => g(e) ?? e),
|
|
11
|
+
[]
|
|
12
|
+
);
|
|
13
|
+
return { scale: t, zoomIn: n, zoomOut: c, setScale: a };
|
|
14
|
+
}, I = ({
|
|
15
|
+
url: t,
|
|
16
|
+
filename: a,
|
|
17
|
+
withCredentials: n,
|
|
18
|
+
actions: c,
|
|
19
|
+
zoom: e,
|
|
20
|
+
children: f
|
|
21
|
+
}) => {
|
|
22
|
+
const { pdfViewer: s } = x(), d = p(
|
|
23
|
+
() => v.map((o) => ({
|
|
24
|
+
value: o,
|
|
25
|
+
label: `${Number(o) * 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__ */ l("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__ */ l(
|
|
39
|
+
r,
|
|
40
|
+
{
|
|
41
|
+
label: s.zoomOut,
|
|
42
|
+
onClick: e.zoomOut,
|
|
43
|
+
icon: w
|
|
44
|
+
}
|
|
45
|
+
),
|
|
46
|
+
/* @__PURE__ */ l(
|
|
47
|
+
r,
|
|
48
|
+
{
|
|
49
|
+
label: s.zoomIn,
|
|
50
|
+
onClick: e.zoomIn,
|
|
51
|
+
icon: k
|
|
52
|
+
}
|
|
53
|
+
),
|
|
54
|
+
/* @__PURE__ */ l(
|
|
55
|
+
S,
|
|
56
|
+
{
|
|
57
|
+
hideLabel: !0,
|
|
58
|
+
label: s.scaleSelector,
|
|
59
|
+
options: d,
|
|
60
|
+
value: String(e.scale),
|
|
61
|
+
onChange: (o) => e.setScale(Number(o))
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
] }),
|
|
65
|
+
/* @__PURE__ */ i("div", { className: "flex flex-1 basis-0 flex-row items-center justify-end gap-2", children: [
|
|
66
|
+
/* @__PURE__ */ l(
|
|
67
|
+
r,
|
|
68
|
+
{
|
|
69
|
+
label: s.download,
|
|
70
|
+
onClick: () => {
|
|
71
|
+
F(t, a, n);
|
|
72
|
+
},
|
|
73
|
+
icon: h
|
|
74
|
+
}
|
|
75
|
+
),
|
|
76
|
+
c?.map((o, b) => /* @__PURE__ */ l(
|
|
77
|
+
r,
|
|
78
|
+
{
|
|
79
|
+
label: o.label,
|
|
80
|
+
onClick: o.onClick,
|
|
81
|
+
icon: o.icon
|
|
82
|
+
},
|
|
83
|
+
`${o.label}-${b}`
|
|
84
|
+
))
|
|
85
|
+
] })
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
};
|
|
90
|
+
export {
|
|
91
|
+
I as D,
|
|
92
|
+
D as u
|
|
93
|
+
};
|