@factorialco/f0-react 10.1.0 → 10.2.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/{ChatDocxThumbnail-CX5HYrKS.js → ChatDocxThumbnail-DdI_ITWn.js} +1 -1
- package/dist/{ChatPdfThumbnail-ISkJYLY9.js → ChatPdfThumbnail-DftUFjlF.js} +1 -1
- package/dist/{ChatPostComposerDialog-DxbHdZxW.js → ChatPostComposerDialog-Gj1gd5ED.js} +3 -3
- package/dist/{ChatSheetThumbnail-B2lUZoSi.js → ChatSheetThumbnail-BKCy7BGq.js} +1 -1
- package/dist/{CoachmarkProvider-DqWyppW-.js → CoachmarkProvider-CsqkzlOs.js} +66867 -19860
- package/dist/{DocumentToolbar-BcDACwRP.js → DocumentToolbar-DeE70FQ2.js} +5 -5
- package/dist/{DocxViewer-D-5449ha.js → DocxViewer-bEu4jZnY.js} +3 -3
- package/dist/F0AiProcessingOverlay-IdMxPTPz.js +5999 -0
- package/dist/{F0Box-DrW7A9gg.js → F0Box-D0fWIRgc.js} +20 -20
- package/dist/{F0CanvasPanel-DCKaKwkK.js → F0CanvasPanel-mMDAtCgu.js} +12993 -9719
- package/dist/F0DocumentViewer-CyCOZ_XC.js +391 -0
- package/dist/F0DocumentViewer-DZSiAv1A.js +3 -0
- package/dist/{F0Map-o0Ni4sbn.js → F0Map-DyOzE_rQ.js} +170 -170
- package/dist/{F0Select-CwkVLiZO.js → F0Select-BrvzcAQQ.js} +2270 -2269
- package/dist/F0VideoPlayer-2XgTkMzT.js +1 -0
- package/dist/{F0VideoPlayer-Iw-SFQqN.js → F0VideoPlayer-CEjGJ_6y.js} +396 -397
- package/dist/{LocationMap-CYwkLWH5.js → LocationMap-Ds0SgBMO.js} +2 -2
- package/dist/{Map-DM9wfTpz.js → Map-DVMFiMrr.js} +55 -55
- package/dist/{SheetViewer-BbDeLWkN.js → SheetViewer-DOPvERv8.js} +5 -5
- package/dist/{TextViewer-CnI7Nabs.js → TextViewer-WRl8atLN.js} +2 -2
- package/dist/ai.d.ts +2 -2
- package/dist/ai.js +3 -3
- package/dist/{axe-Z5T0keK7.js → axe-CpDXsSXe.js} +1 -1
- package/dist/component-status.js +54 -9
- package/dist/{dist-DjxhsV9m.js → dist-7YY6sRd4.js} +1 -1
- package/dist/experimental.d.ts +1702 -66
- package/dist/experimental.js +8944 -8185
- package/dist/{exports-CcIlylmm.d.ts → exports-BDFKcDjH.d.ts} +1 -1
- package/dist/f0.d.ts +3 -3
- package/dist/f0.js +3994 -51002
- package/dist/{index-B_My10oo.d.ts → index-C_3CYY4r.d.ts} +1 -1
- package/dist/{index-CAJfRljV.d.ts → index-NaWQyQZT.d.ts} +7 -1
- package/dist/{maplibre-BD2IQLbD.js → maplibre-DYBwcFt1.js} +3 -3
- package/dist/{maplibre-gl-DT2EWG65.js → maplibre-gl-DVldSYfz.js} +1 -1
- package/dist/{papaparse.min-CJow4fNM.js → papaparse.min-BwPbUAd9.js} +1 -1
- package/dist/{pdfWorker-DYQKoZEy.js → pdfWorker-C_6XT3yW.js} +4 -3
- package/dist/{popover-BTxkQ2PV.js → popover-B2hEEubt.js} +2821 -2780
- package/dist/{renderDocx-gCyLwCY2.js → renderDocx-_UmnE-yc.js} +1 -1
- package/dist/rolldown-runtime-BItFwnF5.js +30 -0
- package/dist/{sheetPreview-CcQwSTIl.js → sheetPreview-Ca0kCtSa.js} +2 -2
- package/dist/styles.css +1 -1
- package/dist/{tooltip-DVXqL5Ri.js → tooltip-TOvfXq9F.js} +1481 -1509
- package/dist/{useData-CiWwYG4W.js → useData-DjJsB0qa.js} +4744 -4743
- package/package.json +1 -1
- package/dist/F0AiProcessingOverlay-CmqXWu0j.js +0 -9183
- package/dist/F0DocumentViewer-CEhoiH_i.js +0 -3
- package/dist/F0DocumentViewer-DpuzMqKE.js +0 -392
- package/dist/F0VideoPlayer-CnrSP5Em.js +0 -1
- package/dist/Printer-snTHysV7.js +0 -34
- package/dist/VolumeMuted-Db9P5djr.js +0 -65
|
@@ -1,392 +0,0 @@
|
|
|
1
|
-
import { I as e } from "./tooltip-DVXqL5Ri.js";
|
|
2
|
-
import { ar as t, b as n, ln as r, rn as i, rr as a, zt as o } from "./popover-BTxkQ2PV.js";
|
|
3
|
-
import { Mi as s, go as c, ua as l } from "./F0CanvasPanel-DCKaKwkK.js";
|
|
4
|
-
import { W as u, q as d } from "./useData-CiWwYG4W.js";
|
|
5
|
-
import { Er as f, dr as p, t as m } from "./F0Select-CwkVLiZO.js";
|
|
6
|
-
import { t as h } from "./Printer-snTHysV7.js";
|
|
7
|
-
import { i as ee, n as g, r as te } from "./pdfWorker-DYQKoZEy.js";
|
|
8
|
-
import { Suspense as _, forwardRef as v, lazy as y, useCallback as b, useEffect as x, useMemo as S, useRef as C, useState as w } from "react";
|
|
9
|
-
import { jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
10
|
-
import './F0DocumentViewer.css';//#region src/addons/documents/F0DocumentViewer/components/PdfLoadingState.tsx
|
|
11
|
-
var D = ({ label: e, width: t, height: n }) => /* @__PURE__ */ T("div", {
|
|
12
|
-
role: "status",
|
|
13
|
-
"aria-label": e,
|
|
14
|
-
"aria-live": "polite",
|
|
15
|
-
"aria-busy": !0,
|
|
16
|
-
className: "F0DocumentViewer__page mx-auto w-fit px-4 pt-4 last:pb-4",
|
|
17
|
-
children: /* @__PURE__ */ T(r, {
|
|
18
|
-
style: {
|
|
19
|
-
width: t,
|
|
20
|
-
height: n
|
|
21
|
-
},
|
|
22
|
-
className: "rounded-lg border border-solid border-f1-border-secondary shadow-md"
|
|
23
|
-
})
|
|
24
|
-
}), O = ({ label: e, icon: t, onClick: r, size: i = "md" }) => /* @__PURE__ */ T(n, {
|
|
25
|
-
label: e,
|
|
26
|
-
icon: t,
|
|
27
|
-
onClick: r,
|
|
28
|
-
hideLabel: !0,
|
|
29
|
-
variant: "outline",
|
|
30
|
-
size: i
|
|
31
|
-
}), k = (t) => e("z-10 flex flex-row items-center gap-2", t === "top" ? "F0DocumentViewer__surface sticky top-0 justify-between px-6 py-4" : "absolute bottom-4 left-1/2 w-max max-w-[calc(100%-2rem)] -translate-x-1/2 gap-4 rounded-xl bg-f1-background-inverse p-2 text-f1-foreground-inverse shadow-lg backdrop-blur-sm"), A = (t, n) => e("flex flex-row items-center gap-2", t === "floating" && "dark", n), j = ({ toolbarRef: t, currentPage: n, totalPages: r, hasDocument: a, selectedScale: o, scaleOptions: s, onPreviousPage: ee, onNextPage: g, onZoomIn: te, onZoomOut: _, onScaleChange: v, rotatable: y, onRotate: b, onPrint: x, onDownload: S, actions: C, placement: w }) => {
|
|
32
|
-
let { pdfViewer: D } = i(), j = A(w);
|
|
33
|
-
return /* @__PURE__ */ E("div", {
|
|
34
|
-
ref: t,
|
|
35
|
-
role: "toolbar",
|
|
36
|
-
"aria-label": D.toolbar,
|
|
37
|
-
"data-placement": w,
|
|
38
|
-
className: k(w),
|
|
39
|
-
children: [
|
|
40
|
-
a ? /* @__PURE__ */ E("span", {
|
|
41
|
-
"aria-live": "polite",
|
|
42
|
-
className: e("whitespace-nowrap text-sm font-medium", w === "top" ? "text-f1-foreground-secondary" : "pl-2 text-f1-foreground-inverse"),
|
|
43
|
-
children: [
|
|
44
|
-
n,
|
|
45
|
-
" / ",
|
|
46
|
-
r
|
|
47
|
-
]
|
|
48
|
-
}) : null,
|
|
49
|
-
/* @__PURE__ */ E("div", {
|
|
50
|
-
className: j,
|
|
51
|
-
children: [/* @__PURE__ */ T(O, {
|
|
52
|
-
label: D.previousPage,
|
|
53
|
-
onClick: ee,
|
|
54
|
-
icon: f,
|
|
55
|
-
size: "sm"
|
|
56
|
-
}), /* @__PURE__ */ T(O, {
|
|
57
|
-
label: D.nextPage,
|
|
58
|
-
onClick: g,
|
|
59
|
-
icon: d,
|
|
60
|
-
size: "sm"
|
|
61
|
-
})]
|
|
62
|
-
}),
|
|
63
|
-
/* @__PURE__ */ E("div", {
|
|
64
|
-
className: j,
|
|
65
|
-
children: [
|
|
66
|
-
/* @__PURE__ */ T(O, {
|
|
67
|
-
label: D.zoomOut,
|
|
68
|
-
onClick: _,
|
|
69
|
-
icon: u
|
|
70
|
-
}),
|
|
71
|
-
/* @__PURE__ */ T(O, {
|
|
72
|
-
label: D.zoomIn,
|
|
73
|
-
onClick: te,
|
|
74
|
-
icon: p
|
|
75
|
-
}),
|
|
76
|
-
/* @__PURE__ */ T(m, {
|
|
77
|
-
hideLabel: !0,
|
|
78
|
-
label: D.scaleSelector,
|
|
79
|
-
options: s,
|
|
80
|
-
value: o,
|
|
81
|
-
onChange: (e) => v(e)
|
|
82
|
-
})
|
|
83
|
-
]
|
|
84
|
-
}),
|
|
85
|
-
/* @__PURE__ */ E("div", {
|
|
86
|
-
className: j,
|
|
87
|
-
children: [
|
|
88
|
-
y ? /* @__PURE__ */ T(O, {
|
|
89
|
-
label: D.rotate,
|
|
90
|
-
onClick: b,
|
|
91
|
-
icon: l
|
|
92
|
-
}) : null,
|
|
93
|
-
/* @__PURE__ */ T(O, {
|
|
94
|
-
label: D.print,
|
|
95
|
-
onClick: x,
|
|
96
|
-
icon: h
|
|
97
|
-
}),
|
|
98
|
-
/* @__PURE__ */ T(O, {
|
|
99
|
-
label: D.download,
|
|
100
|
-
onClick: S,
|
|
101
|
-
icon: c
|
|
102
|
-
}),
|
|
103
|
-
C?.map((e, t) => /* @__PURE__ */ T(O, {
|
|
104
|
-
label: e.label,
|
|
105
|
-
onClick: e.onClick,
|
|
106
|
-
icon: e.icon
|
|
107
|
-
}, `${e.label}-${t}`))
|
|
108
|
-
]
|
|
109
|
-
})
|
|
110
|
-
]
|
|
111
|
-
});
|
|
112
|
-
}, ne = (e, t) => t ? (Math.round(t * e) + .001) / t : e, re = (e, t = window.devicePixelRatio || 1) => {
|
|
113
|
-
e && e.width !== 0 && e.height !== 0 && (e.style.width = `${e.width / t}px`, e.style.height = `${e.height / t}px`);
|
|
114
|
-
}, M = () => {
|
|
115
|
-
let { pdfViewer: t } = i();
|
|
116
|
-
return /* @__PURE__ */ E("div", {
|
|
117
|
-
role: "status",
|
|
118
|
-
"aria-busy": "true",
|
|
119
|
-
"aria-live": "polite",
|
|
120
|
-
"aria-label": t.loading,
|
|
121
|
-
className: e("F0DocumentViewer__surface flex h-full w-full flex-col overflow-hidden", "border border-solid border-f1-border-secondary"),
|
|
122
|
-
children: [/* @__PURE__ */ E("div", {
|
|
123
|
-
className: "flex flex-row items-center justify-between gap-2 px-6 py-4",
|
|
124
|
-
children: [
|
|
125
|
-
/* @__PURE__ */ T(r, { className: "h-8 w-24 rounded-md" }),
|
|
126
|
-
/* @__PURE__ */ T(r, { className: "h-8 w-40 rounded-md" }),
|
|
127
|
-
/* @__PURE__ */ T(r, { className: "h-8 w-20 rounded-md" })
|
|
128
|
-
]
|
|
129
|
-
}), /* @__PURE__ */ T("div", {
|
|
130
|
-
className: "flex flex-1 justify-center p-4",
|
|
131
|
-
children: /* @__PURE__ */ T(r, { className: "h-full w-full max-w-[600px] rounded-md" })
|
|
132
|
-
})]
|
|
133
|
-
});
|
|
134
|
-
}, N = async (e) => {
|
|
135
|
-
let t = await e.saveDocument();
|
|
136
|
-
return new Blob([new Uint8Array(t)], { type: "application/pdf" });
|
|
137
|
-
}, ie = async (e) => {
|
|
138
|
-
if (!e) return;
|
|
139
|
-
let t = URL.createObjectURL(await N(e)), n = document.createElement("iframe");
|
|
140
|
-
n.style.display = "none", n.src = t, n.onload = () => {
|
|
141
|
-
n.focus(), n.contentWindow?.print();
|
|
142
|
-
let e = () => {
|
|
143
|
-
URL.revokeObjectURL(t), n.remove();
|
|
144
|
-
};
|
|
145
|
-
n.contentWindow?.addEventListener("afterprint", e), setTimeout(e, 6e4);
|
|
146
|
-
}, document.body.appendChild(n);
|
|
147
|
-
}, ae = async (e, t) => {
|
|
148
|
-
if (!e) return;
|
|
149
|
-
let n = URL.createObjectURL(await N(e)), r = document.createElement("a");
|
|
150
|
-
r.href = n, r.download = t.length > 0 ? t : "document.pdf", document.body.appendChild(r), r.click(), r.remove(), URL.revokeObjectURL(n);
|
|
151
|
-
}, P = async (e, t, n = !0) => {
|
|
152
|
-
let r = e, i;
|
|
153
|
-
try {
|
|
154
|
-
let t = await fetch(e, { credentials: n ? "include" : "same-origin" });
|
|
155
|
-
if (!t.ok) throw Error(`${t.status}`);
|
|
156
|
-
i = URL.createObjectURL(await t.blob()), r = i;
|
|
157
|
-
} catch {}
|
|
158
|
-
let a = document.createElement("a");
|
|
159
|
-
a.href = r, a.download = t ?? "", a.rel = "noreferrer", i || (a.target = "_blank"), document.body.appendChild(a), a.click(), a.remove(), i && URL.revokeObjectURL(i);
|
|
160
|
-
}, F = [
|
|
161
|
-
"0.5",
|
|
162
|
-
"0.75",
|
|
163
|
-
"1",
|
|
164
|
-
"1.25",
|
|
165
|
-
"1.5",
|
|
166
|
-
"2",
|
|
167
|
-
"3",
|
|
168
|
-
"4"
|
|
169
|
-
], I = F.map(Number), L = (e) => I.find((t) => t > e), oe = (e) => [...I].reverse().find((t) => t < e), se = (e, t, n) => {
|
|
170
|
-
let r = null, i = 0;
|
|
171
|
-
return t.forEach((t, a) => {
|
|
172
|
-
if (!t) return;
|
|
173
|
-
let o = t.offsetHeight, s = t.offsetTop, c = s + o, l = e.offsetHeight - n, u = e.scrollTop + n, d = u + l;
|
|
174
|
-
if (!(u < c && d > s)) return;
|
|
175
|
-
let f;
|
|
176
|
-
if (u <= s) f = d > c ? o : d - s;
|
|
177
|
-
else {
|
|
178
|
-
let e = u - s;
|
|
179
|
-
d < c && (e += c - d), f = o - e;
|
|
180
|
-
}
|
|
181
|
-
f > i && (i = f, r = a + 1);
|
|
182
|
-
}), r;
|
|
183
|
-
};
|
|
184
|
-
//#endregion
|
|
185
|
-
//#region src/addons/documents/F0DocumentViewer/F0DocumentViewer.tsx
|
|
186
|
-
g();
|
|
187
|
-
var R = y(() => import("./SheetViewer-BbDeLWkN.js")), z = y(() => import("./DocxViewer-D-5449ha.js")), B = y(() => import("./TextViewer-CnI7Nabs.js")), V = 48, ce = 150, H = v((e, t) => {
|
|
188
|
-
let { kind: n = "pdf", mimeType: i, toolbar: a = "top", ...o } = e;
|
|
189
|
-
if (n === "pdf") return /* @__PURE__ */ T(U, {
|
|
190
|
-
ref: t,
|
|
191
|
-
toolbar: a,
|
|
192
|
-
...o
|
|
193
|
-
});
|
|
194
|
-
let { url: s, filename: c, actions: l, withCredentials: u = !0, page: d, pagesToDisplay: f, initialScale: p, rotatable: m, initialRotation: h, onRotationChange: ee, onPdfLoaded: g, onPageChange: te, ...v } = o;
|
|
195
|
-
return /* @__PURE__ */ T("div", {
|
|
196
|
-
ref: t,
|
|
197
|
-
...v,
|
|
198
|
-
className: "F0DocumentViewer__surface relative flex h-full w-full flex-col overflow-hidden border border-solid border-f1-border-secondary",
|
|
199
|
-
children: /* @__PURE__ */ E(_, {
|
|
200
|
-
fallback: /* @__PURE__ */ T(r, { className: "h-full w-full rounded-none" }),
|
|
201
|
-
children: [
|
|
202
|
-
n === "sheet" ? /* @__PURE__ */ T(R, {
|
|
203
|
-
url: s,
|
|
204
|
-
filename: c,
|
|
205
|
-
withCredentials: u,
|
|
206
|
-
actions: l,
|
|
207
|
-
toolbar: a
|
|
208
|
-
}) : null,
|
|
209
|
-
n === "docx" ? /* @__PURE__ */ T(z, {
|
|
210
|
-
url: s,
|
|
211
|
-
filename: c,
|
|
212
|
-
withCredentials: u,
|
|
213
|
-
actions: l,
|
|
214
|
-
toolbar: a
|
|
215
|
-
}) : null,
|
|
216
|
-
n === "text" ? /* @__PURE__ */ T(B, {
|
|
217
|
-
url: s,
|
|
218
|
-
name: c ?? "",
|
|
219
|
-
mimeType: i,
|
|
220
|
-
withCredentials: u,
|
|
221
|
-
actions: l,
|
|
222
|
-
toolbar: a
|
|
223
|
-
}) : null
|
|
224
|
-
]
|
|
225
|
-
})
|
|
226
|
-
});
|
|
227
|
-
});
|
|
228
|
-
H.displayName = "F0DocumentViewer";
|
|
229
|
-
var U = v((e, t) => {
|
|
230
|
-
let { url: n, filename: a = "document.pdf", page: s = 0, pagesToDisplay: c = [], initialScale: l = "page-width", withCredentials: u = !0, rotatable: d = !1, initialRotation: f = 0, onRotationChange: p, onPdfLoaded: m, onPageChange: h, actions: g, toolbar: _ = "top", ...v } = e, { pdfViewer: y } = i(), O = Math.max(2, typeof window > "u" ? 1 : window.devicePixelRatio || 1), [k, A] = w(null), [M, N] = w([]), [P, I] = w(1), [R, z] = w(0), [B, H] = w(l), [U, W] = w(f), G = C(null), K = C(null), q = C([]), J = c.length > 0 ? c.length : k?.numPages, Y = b(() => _ === "top" ? K.current?.offsetHeight ?? 0 : 0, [_]), le = M.find(Boolean), ue = (le?.originalWidth ?? 595) * P, de = (le?.originalHeight ?? 842) * P, fe = S(() => [
|
|
231
|
-
{
|
|
232
|
-
value: "page-width",
|
|
233
|
-
label: y.pageWidth
|
|
234
|
-
},
|
|
235
|
-
{
|
|
236
|
-
value: "page-fit",
|
|
237
|
-
label: y.pageFit
|
|
238
|
-
},
|
|
239
|
-
...F.map((e) => ({
|
|
240
|
-
value: e,
|
|
241
|
-
label: `${Number(e) * 100}%`
|
|
242
|
-
}))
|
|
243
|
-
], [y.pageWidth, y.pageFit]), pe = S(() => ({
|
|
244
|
-
url: n,
|
|
245
|
-
withCredentials: u
|
|
246
|
-
}), [n, u]), X = b((e) => {
|
|
247
|
-
let t = (J ?? 1) - 1, n = Math.min(Math.max(e, 0), t), r = q.current[n], i = r?.offsetParent;
|
|
248
|
-
r && i instanceof HTMLElement && (i.scrollTop = r.offsetTop - Y() - 10);
|
|
249
|
-
}, [J, Y]), Z = b((e) => {
|
|
250
|
-
let t = M[R - 1], n = G.current;
|
|
251
|
-
if (!t || !n) return;
|
|
252
|
-
let r = K.current?.offsetHeight ?? 0, i = U === 90 || U === 270, a = i ? t.originalHeight : t.originalWidth, o = i ? t.originalWidth : t.originalHeight, s = e === "page-width" ? (n.clientWidth - V) / a : (n.clientHeight - r - V) / o;
|
|
253
|
-
I(s), H(e);
|
|
254
|
-
}, [
|
|
255
|
-
M,
|
|
256
|
-
R,
|
|
257
|
-
U
|
|
258
|
-
]), me = b((e) => {
|
|
259
|
-
e === "page-width" || e === "page-fit" ? Z(e) : (I(Number(e)), H(e));
|
|
260
|
-
}, [Z]), Q = b((e) => {
|
|
261
|
-
if (e === void 0) return;
|
|
262
|
-
I(e);
|
|
263
|
-
let t = F.find((t) => Number(t) === e);
|
|
264
|
-
t && H(t);
|
|
265
|
-
}, []), he = b(() => Q(L(P)), [P, Q]), ge = b(() => Q(oe(P)), [P, Q]), _e = b(() => {
|
|
266
|
-
W((e) => {
|
|
267
|
-
let t = (e + 90) % 360;
|
|
268
|
-
return p?.(t), t;
|
|
269
|
-
});
|
|
270
|
-
}, [p]), ve = b((e) => {
|
|
271
|
-
A(e), m?.(e), setTimeout(() => {
|
|
272
|
-
z(s + 1), X(s);
|
|
273
|
-
}, 0);
|
|
274
|
-
}, [
|
|
275
|
-
m,
|
|
276
|
-
s,
|
|
277
|
-
X
|
|
278
|
-
]), ye = b((e) => {
|
|
279
|
-
let t = e.target;
|
|
280
|
-
if (!(t instanceof HTMLElement)) return;
|
|
281
|
-
let n = se(t, q.current, Y());
|
|
282
|
-
n && z(n);
|
|
283
|
-
}, [Y]), be = b(() => {
|
|
284
|
-
ie(k);
|
|
285
|
-
}, [k]), xe = b(() => {
|
|
286
|
-
ae(k, a);
|
|
287
|
-
}, [k, a]);
|
|
288
|
-
x(() => {
|
|
289
|
-
A(null), N([]), q.current = [];
|
|
290
|
-
}, [n]), x(() => {
|
|
291
|
-
X(s);
|
|
292
|
-
}, [s, X]), x(() => {
|
|
293
|
-
R > 0 && h?.(R);
|
|
294
|
-
}, [R, h]), x(() => {
|
|
295
|
-
M.length > 0 && (l === "page-width" || l === "page-fit") && Z(l);
|
|
296
|
-
}, [M.length, l]), x(() => {
|
|
297
|
-
(B === "page-width" || B === "page-fit") && Z(B);
|
|
298
|
-
}, [U]);
|
|
299
|
-
let $ = C();
|
|
300
|
-
o({
|
|
301
|
-
ref: G,
|
|
302
|
-
onResize: () => {
|
|
303
|
-
clearTimeout($.current), $.current = setTimeout(() => {
|
|
304
|
-
(B === "page-width" || B === "page-fit") && Z(B);
|
|
305
|
-
}, ce);
|
|
306
|
-
}
|
|
307
|
-
}), x(function() {
|
|
308
|
-
return () => clearTimeout($.current);
|
|
309
|
-
}, []), x(() => {
|
|
310
|
-
let e = G.current;
|
|
311
|
-
if (!e) return;
|
|
312
|
-
let t = (e) => {
|
|
313
|
-
let t = e.target;
|
|
314
|
-
t instanceof HTMLAnchorElement && (t.target = "_blank", t.rel = "noopener noreferrer");
|
|
315
|
-
};
|
|
316
|
-
return e.addEventListener("click", t, !0), () => e.removeEventListener("click", t, !0);
|
|
317
|
-
}, []);
|
|
318
|
-
let Se = {
|
|
319
|
-
toolbarRef: K,
|
|
320
|
-
placement: _,
|
|
321
|
-
currentPage: R,
|
|
322
|
-
totalPages: J,
|
|
323
|
-
hasDocument: !!k?.numPages,
|
|
324
|
-
selectedScale: B,
|
|
325
|
-
scaleOptions: fe,
|
|
326
|
-
onPreviousPage: () => X(R - 2),
|
|
327
|
-
onNextPage: () => X(R),
|
|
328
|
-
onZoomIn: he,
|
|
329
|
-
onZoomOut: ge,
|
|
330
|
-
onScaleChange: me,
|
|
331
|
-
rotatable: d,
|
|
332
|
-
onRotate: _e,
|
|
333
|
-
onPrint: be,
|
|
334
|
-
onDownload: xe,
|
|
335
|
-
actions: g
|
|
336
|
-
};
|
|
337
|
-
return /* @__PURE__ */ E("div", {
|
|
338
|
-
ref: t,
|
|
339
|
-
...v,
|
|
340
|
-
className: "F0DocumentViewer__surface relative flex h-full w-full flex-col overflow-hidden border border-solid border-f1-border-secondary",
|
|
341
|
-
children: [/* @__PURE__ */ E("div", {
|
|
342
|
-
ref: G,
|
|
343
|
-
onScroll: ye,
|
|
344
|
-
className: "F0DocumentViewer__surface relative flex h-full flex-col overflow-auto [scrollbar-gutter:stable_both-edges]",
|
|
345
|
-
children: [_ === "top" ? /* @__PURE__ */ T(j, { ...Se }) : null, n ? /* @__PURE__ */ T(ee, {
|
|
346
|
-
file: pe,
|
|
347
|
-
onLoadSuccess: ve,
|
|
348
|
-
loading: /* @__PURE__ */ T(D, {
|
|
349
|
-
label: y.loading,
|
|
350
|
-
width: ue,
|
|
351
|
-
height: de
|
|
352
|
-
}),
|
|
353
|
-
children: k ? Array.from({ length: J ?? 0 }).map((e, t) => {
|
|
354
|
-
let n = (c.length > 0 ? c[t] : t) + 1;
|
|
355
|
-
return /* @__PURE__ */ T("div", {
|
|
356
|
-
className: "F0DocumentViewer__page mx-auto w-fit px-4 pt-4 last:pb-4",
|
|
357
|
-
children: /* @__PURE__ */ T(te, {
|
|
358
|
-
className: "overflow-hidden rounded-lg border border-solid border-f1-border-secondary shadow-md",
|
|
359
|
-
pageNumber: n,
|
|
360
|
-
scale: ne(P, U === 90 || U === 270 ? M[t]?.originalHeight : M[t]?.originalWidth),
|
|
361
|
-
rotate: U,
|
|
362
|
-
devicePixelRatio: O,
|
|
363
|
-
loading: /* @__PURE__ */ T(r, { style: {
|
|
364
|
-
width: ue,
|
|
365
|
-
height: de
|
|
366
|
-
} }),
|
|
367
|
-
renderForms: !0,
|
|
368
|
-
renderTextLayer: !0,
|
|
369
|
-
inputRef: (e) => {
|
|
370
|
-
q.current[t] = e;
|
|
371
|
-
},
|
|
372
|
-
onRenderSuccess: () => re(q.current[t]?.querySelector("canvas"), O),
|
|
373
|
-
onLoadSuccess: (e) => {
|
|
374
|
-
N((n) => {
|
|
375
|
-
let r = [...n];
|
|
376
|
-
return r[t] = {
|
|
377
|
-
originalWidth: e.originalWidth,
|
|
378
|
-
originalHeight: e.originalHeight
|
|
379
|
-
}, r;
|
|
380
|
-
});
|
|
381
|
-
}
|
|
382
|
-
})
|
|
383
|
-
}, t);
|
|
384
|
-
}) : null
|
|
385
|
-
}) : null]
|
|
386
|
-
}), _ === "floating" ? /* @__PURE__ */ T(j, { ...Se }) : null]
|
|
387
|
-
});
|
|
388
|
-
});
|
|
389
|
-
U.displayName = "PdfViewerBase";
|
|
390
|
-
var W = t(a("F0DocumentViewer", s(H, M))), G = W;
|
|
391
|
-
//#endregion
|
|
392
|
-
export { L as a, A as c, oe as i, O as l, G as n, P as o, F as r, k as s, W as t };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { t as F0VideoPlayer } from "./F0VideoPlayer-Iw-SFQqN.js";
|
package/dist/Printer-snTHysV7.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { forwardRef as e } from "react";
|
|
2
|
-
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
-
var r = e((e, r) => /* @__PURE__ */ n("svg", {
|
|
4
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
5
|
-
fill: "none",
|
|
6
|
-
viewBox: "0 0 24 24",
|
|
7
|
-
ref: r,
|
|
8
|
-
...e,
|
|
9
|
-
children: [
|
|
10
|
-
/* @__PURE__ */ t("path", {
|
|
11
|
-
stroke: "currentColor",
|
|
12
|
-
strokeLinejoin: "round",
|
|
13
|
-
d: "M4 13V11.8C4 10.1198 4 9.27976 4.32698 8.63803C4.6146 8.07354 5.07354 7.6146 5.63803 7.32698C6.27976 7 7.11984 7 8.8 7H15.2C16.8802 7 17.7202 7 18.362 7.32698C18.9265 7.6146 19.3854 8.07354 19.673 8.63803C20 9.27976 20 10.1198 20 11.8V13C20 13.93 20 14.395 19.8978 14.7765C19.6204 15.8117 18.8117 16.6204 17.7765 16.8978C17.395 17 16.93 17 16 17V15.6C16 15.0399 16 14.7599 15.891 14.546C15.7951 14.3578 15.6422 14.2049 15.454 14.109C15.2401 14 14.9601 14 14.4 14H9.6C9.03995 14 8.75992 14 8.54601 14.109C8.35785 14.2049 8.20487 14.3578 8.10899 14.546C8 14.7599 8 15.0399 8 15.6V17C7.07003 17 6.60504 17 6.22354 16.8978C5.18827 16.6204 4.37962 15.8117 4.10222 14.7765C4 14.395 4 13.93 4 13Z"
|
|
14
|
-
}),
|
|
15
|
-
/* @__PURE__ */ t("path", {
|
|
16
|
-
stroke: "currentColor",
|
|
17
|
-
strokeLinejoin: "round",
|
|
18
|
-
d: "M17 7V7C17 5.34315 15.6569 4 14 4H10C8.34315 4 7 5.34315 7 7V7"
|
|
19
|
-
}),
|
|
20
|
-
/* @__PURE__ */ t("path", {
|
|
21
|
-
stroke: "currentColor",
|
|
22
|
-
strokeLinejoin: "round",
|
|
23
|
-
d: "M16 16.8V15.6C16 15.0399 16 14.7599 15.891 14.546C15.7951 14.3578 15.6422 14.2049 15.454 14.109C15.2401 14 14.9601 14 14.4 14H9.6C9.03995 14 8.75992 14 8.54601 14.109C8.35785 14.2049 8.20487 14.3578 8.10899 14.546C8 14.7599 8 15.0399 8 15.6V16.8C8 17.9201 8 18.4802 8.21799 18.908C8.40973 19.2843 8.71569 19.5903 9.09202 19.782C9.51984 20 10.0799 20 11.2 20H12.8C13.9201 20 14.4802 20 14.908 19.782C15.2843 19.5903 15.5903 19.2843 15.782 18.908C16 18.4802 16 17.9201 16 16.8Z"
|
|
24
|
-
}),
|
|
25
|
-
/* @__PURE__ */ t("circle", {
|
|
26
|
-
cx: 17,
|
|
27
|
-
cy: 11,
|
|
28
|
-
r: 1,
|
|
29
|
-
fill: "currentColor"
|
|
30
|
-
})
|
|
31
|
-
]
|
|
32
|
-
}));
|
|
33
|
-
//#endregion
|
|
34
|
-
export { r as t };
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { forwardRef as e } from "react";
|
|
2
|
-
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
-
var r = e((e, r) => /* @__PURE__ */ n("svg", {
|
|
4
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
5
|
-
fill: "none",
|
|
6
|
-
viewBox: "0 0 24 24",
|
|
7
|
-
ref: r,
|
|
8
|
-
...e,
|
|
9
|
-
children: [
|
|
10
|
-
/* @__PURE__ */ t("path", {
|
|
11
|
-
stroke: "currentColor",
|
|
12
|
-
strokeLinecap: "round",
|
|
13
|
-
strokeLinejoin: "round",
|
|
14
|
-
d: "M11 5L6 9H3V15H6L11 19V5Z"
|
|
15
|
-
}),
|
|
16
|
-
/* @__PURE__ */ t("path", {
|
|
17
|
-
stroke: "currentColor",
|
|
18
|
-
strokeLinecap: "round",
|
|
19
|
-
strokeLinejoin: "round",
|
|
20
|
-
d: "M15 9.5C16 10.6667 16 13.3333 15 14.5"
|
|
21
|
-
}),
|
|
22
|
-
/* @__PURE__ */ t("path", {
|
|
23
|
-
stroke: "currentColor",
|
|
24
|
-
strokeLinecap: "round",
|
|
25
|
-
strokeLinejoin: "round",
|
|
26
|
-
d: "M17.5 7C19.6667 9.33333 19.6667 14.6667 17.5 17"
|
|
27
|
-
})
|
|
28
|
-
]
|
|
29
|
-
})), i = e((e, r) => /* @__PURE__ */ n("svg", {
|
|
30
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
31
|
-
fill: "none",
|
|
32
|
-
viewBox: "0 0 24 24",
|
|
33
|
-
ref: r,
|
|
34
|
-
...e,
|
|
35
|
-
children: [/* @__PURE__ */ t("path", {
|
|
36
|
-
stroke: "currentColor",
|
|
37
|
-
strokeLinecap: "round",
|
|
38
|
-
strokeLinejoin: "round",
|
|
39
|
-
d: "M11 5L6 9H3V15H6L11 19V5Z"
|
|
40
|
-
}), /* @__PURE__ */ t("path", {
|
|
41
|
-
stroke: "currentColor",
|
|
42
|
-
strokeLinecap: "round",
|
|
43
|
-
strokeLinejoin: "round",
|
|
44
|
-
d: "M15 9.5C16 10.6667 16 13.3333 15 14.5"
|
|
45
|
-
})]
|
|
46
|
-
})), a = e((e, r) => /* @__PURE__ */ n("svg", {
|
|
47
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
48
|
-
fill: "none",
|
|
49
|
-
viewBox: "0 0 24 24",
|
|
50
|
-
ref: r,
|
|
51
|
-
...e,
|
|
52
|
-
children: [/* @__PURE__ */ t("path", {
|
|
53
|
-
stroke: "currentColor",
|
|
54
|
-
strokeLinecap: "round",
|
|
55
|
-
strokeLinejoin: "round",
|
|
56
|
-
d: "M11 5L6 9H3V15H6L11 19V5Z"
|
|
57
|
-
}), /* @__PURE__ */ t("path", {
|
|
58
|
-
stroke: "currentColor",
|
|
59
|
-
strokeLinecap: "round",
|
|
60
|
-
strokeLinejoin: "round",
|
|
61
|
-
d: "M15.5 9.5L20.5 14.5M20.5 9.5L15.5 14.5"
|
|
62
|
-
})]
|
|
63
|
-
}));
|
|
64
|
-
//#endregion
|
|
65
|
-
export { i as n, r, a as t };
|