@factorialco/f0-react 7.23.0 → 7.24.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-BBAjTpRO.js → ChatPdfThumbnail-DzeBhA18.js} +1 -1
- package/dist/{ChatPostComposerDialog-CzzBwu4c.js → ChatPostComposerDialog-DDLVT6WW.js} +3 -3
- package/dist/{DocumentToolbar-CLmAa1CS.js → DocumentToolbar-5oxgBa7d.js} +2 -2
- package/dist/{DocxViewer-17wM_5Ub.js → DocxViewer-r1GX7pUj.js} +2 -2
- package/dist/{F0AiProcessingOverlay-Crv3v_qi.js → F0AiProcessingOverlay-nojpvoxK.js} +285 -285
- package/dist/{F0CanvasPanel-B2aaoYnV.js → F0CanvasPanel-DnlpQoxW.js} +639 -638
- package/dist/F0Map-BK43p1Ck.js +2499 -0
- package/dist/{F0VideoPlayer-aMaViir7.js → F0VideoPlayer-DKPfOJBp.js} +79 -79
- package/dist/{MapProvider-cgH29EcL.js → MapProvider-bLF59EA-.js} +8174 -8124
- package/dist/{SheetViewer-DRvoh1Ht.js → SheetViewer-C9Ca3S1F.js} +2 -2
- package/dist/{TextViewer-t6wTzXs4.js → TextViewer-B_O1q-K3.js} +2 -2
- package/dist/ai.d.ts +18 -8
- package/dist/ai.js +2 -2
- package/dist/component-status.d.ts +8 -8
- package/dist/component-status.js +2 -2
- package/dist/{experimental-7owBUBms.js → experimental-FF0XQX9W.js} +11859 -13903
- package/dist/experimental.d.ts +363 -88
- package/dist/experimental.js +291 -284
- package/dist/f0.d.ts +178 -8
- package/dist/f0.js +6005 -6007
- package/dist/i18n-provider-defaults.d.ts +18 -8
- package/dist/i18n-provider-defaults.js +11 -1
- package/dist/index-BUqW79F1.js +4 -0
- package/dist/index-BWwc7G48.js +410 -0
- package/dist/{index-CyVOH26Y.js → index-CCea6fTM.js} +1 -1
- package/dist/index-DjrijFLO.js +256 -0
- package/dist/{index-zELO6ifF.js → index-P0wMW0hA.js} +31 -31
- package/dist/{pdfWorker-tk-Ol5j0.js → pdfWorker-DHOTMIrl.js} +3 -3
- package/dist/styles.css +1 -1
- package/dist/{tooltip-BElsa4MF.js → tooltip-CrXp1Uaz.js} +2 -2
- package/package.json +1 -1
- package/dist/index-C2NRpdhB.js +0 -4
- package/dist/index-DnEPnn6A.js +0 -255
- /package/dist/{experimental.css → maplibre-gl.css} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { S as L,
|
|
1
|
+
import { S as L, y as ye, u as q, z as Se, w as Re, i as ke, j as _e, k as Ne, A as Ce, l as Le, B as Fe, E as Ve, G as Te } from "./F0CanvasPanel-DnlpQoxW.js";
|
|
2
2
|
import { jsx as t, jsxs as y } from "react/jsx-runtime";
|
|
3
3
|
import { lazy as J, forwardRef as ne, Suspense as He, useState as V, useRef as A, useMemo as te, useCallback as w, useEffect as T } from "react";
|
|
4
|
-
import { e as Ee, D as Ue, P as je, c as De } from "./pdfWorker-
|
|
4
|
+
import { e as Ee, D as Ue, P as je, c as De } from "./pdfWorker-DHOTMIrl.js";
|
|
5
5
|
import { F as We } from "./Printer-BD-FEi_2.js";
|
|
6
|
-
import { d as ae } from "./tooltip-
|
|
6
|
+
import { d as ae } from "./tooltip-CrXp1Uaz.js";
|
|
7
7
|
import './index2.css';const Oe = ({
|
|
8
8
|
label: o,
|
|
9
9
|
width: a,
|
|
@@ -39,7 +39,7 @@ import './index2.css';const Oe = ({
|
|
|
39
39
|
variant: "outline",
|
|
40
40
|
size: i
|
|
41
41
|
}
|
|
42
|
-
),
|
|
42
|
+
), G = "flex flex-row items-center gap-2", Be = ({
|
|
43
43
|
toolbarRef: o,
|
|
44
44
|
currentPage: a,
|
|
45
45
|
totalPages: e,
|
|
@@ -57,7 +57,7 @@ import './index2.css';const Oe = ({
|
|
|
57
57
|
onDownload: x,
|
|
58
58
|
actions: h
|
|
59
59
|
}) => {
|
|
60
|
-
const { pdfViewer: c } =
|
|
60
|
+
const { pdfViewer: c } = q();
|
|
61
61
|
return /* @__PURE__ */ y(
|
|
62
62
|
"div",
|
|
63
63
|
{
|
|
@@ -69,7 +69,7 @@ import './index2.css';const Oe = ({
|
|
|
69
69
|
"px-6 py-4"
|
|
70
70
|
),
|
|
71
71
|
children: [
|
|
72
|
-
/* @__PURE__ */ y("div", { className:
|
|
72
|
+
/* @__PURE__ */ y("div", { className: G, children: [
|
|
73
73
|
i ? /* @__PURE__ */ y(
|
|
74
74
|
"span",
|
|
75
75
|
{
|
|
@@ -101,7 +101,7 @@ import './index2.css';const Oe = ({
|
|
|
101
101
|
}
|
|
102
102
|
)
|
|
103
103
|
] }),
|
|
104
|
-
/* @__PURE__ */ y("div", { className:
|
|
104
|
+
/* @__PURE__ */ y("div", { className: G, children: [
|
|
105
105
|
/* @__PURE__ */ t(
|
|
106
106
|
R,
|
|
107
107
|
{
|
|
@@ -129,7 +129,7 @@ import './index2.css';const Oe = ({
|
|
|
129
129
|
}
|
|
130
130
|
)
|
|
131
131
|
] }),
|
|
132
|
-
/* @__PURE__ */ y("div", { className:
|
|
132
|
+
/* @__PURE__ */ y("div", { className: G, children: [
|
|
133
133
|
P ? /* @__PURE__ */ t(
|
|
134
134
|
R,
|
|
135
135
|
{
|
|
@@ -170,7 +170,7 @@ import './index2.css';const Oe = ({
|
|
|
170
170
|
}, re = async (o) => {
|
|
171
171
|
const a = await o.saveDocument();
|
|
172
172
|
return new Blob([new Uint8Array(a)], { type: "application/pdf" });
|
|
173
|
-
},
|
|
173
|
+
}, $e = async (o) => {
|
|
174
174
|
if (!o)
|
|
175
175
|
return;
|
|
176
176
|
const a = URL.createObjectURL(await re(o)), e = document.createElement("iframe");
|
|
@@ -199,7 +199,7 @@ import './index2.css';const Oe = ({
|
|
|
199
199
|
}
|
|
200
200
|
const l = document.createElement("a");
|
|
201
201
|
l.href = i, l.download = a ?? "", l.rel = "noreferrer", s || (l.target = "_blank"), document.body.appendChild(l), l.click(), l.remove(), s && URL.revokeObjectURL(s);
|
|
202
|
-
},
|
|
202
|
+
}, Z = [
|
|
203
203
|
"0.5",
|
|
204
204
|
"0.75",
|
|
205
205
|
"1",
|
|
@@ -208,7 +208,7 @@ import './index2.css';const Oe = ({
|
|
|
208
208
|
"2",
|
|
209
209
|
"3",
|
|
210
210
|
"4"
|
|
211
|
-
], ie =
|
|
211
|
+
], ie = Z.map(Number), Me = (o) => ie.find((a) => a > o), Ie = (o) => [...ie].reverse().find((a) => a < o), Ae = (o, a, e) => {
|
|
212
212
|
let i = null, s = 0;
|
|
213
213
|
return a.forEach((l, d) => {
|
|
214
214
|
if (!l)
|
|
@@ -227,7 +227,7 @@ import './index2.css';const Oe = ({
|
|
|
227
227
|
}), i;
|
|
228
228
|
};
|
|
229
229
|
Ee();
|
|
230
|
-
const
|
|
230
|
+
const Ge = J(() => import("./SheetViewer-C9Ca3S1F.js")), Ze = J(() => import("./DocxViewer-r1GX7pUj.js")), qe = J(() => import("./TextViewer-B_O1q-K3.js")), oe = 48, le = ne(
|
|
231
231
|
(o, a) => {
|
|
232
232
|
const { kind: e = "pdf", mimeType: i, ...s } = o;
|
|
233
233
|
if (e === "pdf")
|
|
@@ -259,7 +259,7 @@ const qe = J(() => import("./SheetViewer-DRvoh1Ht.js")), Ge = J(() => import("./
|
|
|
259
259
|
fallback: /* @__PURE__ */ t(L, { className: "h-full w-full rounded-none" }),
|
|
260
260
|
children: [
|
|
261
261
|
e === "sheet" ? /* @__PURE__ */ t(
|
|
262
|
-
|
|
262
|
+
Ge,
|
|
263
263
|
{
|
|
264
264
|
url: l,
|
|
265
265
|
filename: d,
|
|
@@ -268,7 +268,7 @@ const qe = J(() => import("./SheetViewer-DRvoh1Ht.js")), Ge = J(() => import("./
|
|
|
268
268
|
}
|
|
269
269
|
) : null,
|
|
270
270
|
e === "docx" ? /* @__PURE__ */ t(
|
|
271
|
-
|
|
271
|
+
Ze,
|
|
272
272
|
{
|
|
273
273
|
url: l,
|
|
274
274
|
filename: d,
|
|
@@ -277,7 +277,7 @@ const qe = J(() => import("./SheetViewer-DRvoh1Ht.js")), Ge = J(() => import("./
|
|
|
277
277
|
}
|
|
278
278
|
) : null,
|
|
279
279
|
e === "text" ? /* @__PURE__ */ t(
|
|
280
|
-
|
|
280
|
+
qe,
|
|
281
281
|
{
|
|
282
282
|
url: l,
|
|
283
283
|
name: d ?? "",
|
|
@@ -309,11 +309,11 @@ const se = ne((o, a) => {
|
|
|
309
309
|
onPageChange: g,
|
|
310
310
|
actions: H,
|
|
311
311
|
...x
|
|
312
|
-
} = o, { pdfViewer: h } =
|
|
312
|
+
} = o, { pdfViewer: h } = q(), [c, b] = V(null), [_, K] = V([]), [N, z] = V(1), [S, Q] = V(0), [U, M] = V(d), [E, ce] = V(v), I = A(null), j = A(null), D = A([]), W = l.length > 0 ? l.length : c?.numPages, X = _.find(Boolean), Y = (X?.originalWidth ?? 595) * N, ee = (X?.originalHeight ?? 842) * N, de = te(
|
|
313
313
|
() => [
|
|
314
314
|
{ value: "page-width", label: h.pageWidth },
|
|
315
315
|
{ value: "page-fit", label: h.pageFit },
|
|
316
|
-
...
|
|
316
|
+
...Z.map((n) => ({
|
|
317
317
|
value: n,
|
|
318
318
|
label: `${Number(n) * 100}%`
|
|
319
319
|
}))
|
|
@@ -330,7 +330,7 @@ const se = ne((o, a) => {
|
|
|
330
330
|
const r = _[S - 1], f = I.current;
|
|
331
331
|
if (!r || !f)
|
|
332
332
|
return;
|
|
333
|
-
const u = j.current?.offsetHeight ?? 0, C = E === 90 || E === 270,
|
|
333
|
+
const u = j.current?.offsetHeight ?? 0, C = E === 90 || E === 270, $ = C ? r.originalHeight : r.originalWidth, ve = C ? r.originalWidth : r.originalHeight, xe = n === "page-width" ? (f.clientWidth - oe) / $ : (f.clientHeight - u - oe) / ve;
|
|
334
334
|
z(xe), M(n);
|
|
335
335
|
},
|
|
336
336
|
[_, S, E]
|
|
@@ -343,18 +343,18 @@ const se = ne((o, a) => {
|
|
|
343
343
|
z(Number(n)), M(n);
|
|
344
344
|
},
|
|
345
345
|
[O]
|
|
346
|
-
),
|
|
346
|
+
), B = w((n) => {
|
|
347
347
|
if (n === void 0)
|
|
348
348
|
return;
|
|
349
349
|
z(n);
|
|
350
|
-
const r =
|
|
350
|
+
const r = Z.find((f) => Number(f) === n);
|
|
351
351
|
r && M(r);
|
|
352
352
|
}, []), me = w(
|
|
353
|
-
() =>
|
|
354
|
-
[N,
|
|
353
|
+
() => B(Me(N)),
|
|
354
|
+
[N, B]
|
|
355
355
|
), pe = w(
|
|
356
|
-
() =>
|
|
357
|
-
[N,
|
|
356
|
+
() => B(Ie(N)),
|
|
357
|
+
[N, B]
|
|
358
358
|
), ge = w(() => {
|
|
359
359
|
ce((n) => {
|
|
360
360
|
const r = (n + 90) % 360;
|
|
@@ -378,7 +378,7 @@ const se = ne((o, a) => {
|
|
|
378
378
|
);
|
|
379
379
|
f && Q(f);
|
|
380
380
|
}, []), we = w(() => {
|
|
381
|
-
|
|
381
|
+
$e(c);
|
|
382
382
|
}, [c]), Pe = w(() => {
|
|
383
383
|
ze(c, i);
|
|
384
384
|
}, [c, i]);
|
|
@@ -415,7 +415,7 @@ const se = ne((o, a) => {
|
|
|
415
415
|
className: "F0PdfViewer__surface relative flex h-full flex-col overflow-auto [scrollbar-gutter:stable_both-edges]",
|
|
416
416
|
children: [
|
|
417
417
|
/* @__PURE__ */ t(
|
|
418
|
-
|
|
418
|
+
Be,
|
|
419
419
|
{
|
|
420
420
|
toolbarRef: j,
|
|
421
421
|
currentPage: S,
|
|
@@ -477,11 +477,11 @@ const se = ne((o, a) => {
|
|
|
477
477
|
},
|
|
478
478
|
onLoadSuccess: (u) => {
|
|
479
479
|
K((C) => {
|
|
480
|
-
const
|
|
481
|
-
return
|
|
480
|
+
const $ = [...C];
|
|
481
|
+
return $[r] = {
|
|
482
482
|
originalWidth: u.originalWidth,
|
|
483
483
|
originalHeight: u.originalHeight
|
|
484
|
-
},
|
|
484
|
+
}, $;
|
|
485
485
|
});
|
|
486
486
|
}
|
|
487
487
|
}
|
|
@@ -500,7 +500,7 @@ const se = ne((o, a) => {
|
|
|
500
500
|
});
|
|
501
501
|
se.displayName = "PdfViewerBase";
|
|
502
502
|
const Je = () => {
|
|
503
|
-
const { pdfViewer: o } =
|
|
503
|
+
const { pdfViewer: o } = q();
|
|
504
504
|
return /* @__PURE__ */ y(
|
|
505
505
|
"div",
|
|
506
506
|
{
|
|
@@ -549,7 +549,7 @@ export {
|
|
|
549
549
|
R as T,
|
|
550
550
|
Ie as a,
|
|
551
551
|
at as d,
|
|
552
|
-
|
|
552
|
+
Z as f,
|
|
553
553
|
rt as i,
|
|
554
554
|
Me as n,
|
|
555
555
|
Ke as p
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { createContext, useReducer, forwardRef, useRef, useImperativeHandle, useEffect, useCallback, useMemo, useContext, useLayoutEffect } from "react";
|
|
3
|
-
import { e as clsx } from "./tooltip-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { e as clsx } from "./tooltip-CrXp1Uaz.js";
|
|
4
|
+
import { aj as invariant } from "./F0CanvasPanel-DnlpQoxW.js";
|
|
5
|
+
import { e as dequal } from "./MapProvider-bLF59EA-.js";
|
|
6
6
|
import { a as getAugmentedNamespace, g as getDefaultExportFromCjs } from "./_commonjsHelpers-ByX85dGu.js";
|
|
7
7
|
import { c as commonjsRequire } from "./_commonjs-dynamic-modules-BpilXLfW.js";
|
|
8
8
|
import './pdfWorker.css';var pdf$1 = { exports: {} };
|