@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
|
@@ -1369,10 +1369,9 @@ declare module "@tiptap/core" {
|
|
|
1369
1369
|
|
|
1370
1370
|
declare module "@tiptap/core" {
|
|
1371
1371
|
interface Commands<ReturnType> {
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
outdent: () => ReturnType;
|
|
1372
|
+
fontSize: {
|
|
1373
|
+
setFontSize: (fontSize: string) => ReturnType;
|
|
1374
|
+
unsetFontSize: () => ReturnType;
|
|
1376
1375
|
};
|
|
1377
1376
|
}
|
|
1378
1377
|
}
|
|
@@ -1380,8 +1379,10 @@ declare module "@tiptap/core" {
|
|
|
1380
1379
|
|
|
1381
1380
|
declare module "@tiptap/core" {
|
|
1382
1381
|
interface Commands<ReturnType> {
|
|
1383
|
-
|
|
1384
|
-
|
|
1382
|
+
indent: {
|
|
1383
|
+
setIndent: (level: number) => ReturnType;
|
|
1384
|
+
unsetIndent: () => ReturnType;
|
|
1385
|
+
outdent: () => ReturnType;
|
|
1385
1386
|
};
|
|
1386
1387
|
}
|
|
1387
1388
|
}
|
|
@@ -1389,9 +1390,8 @@ declare module "@tiptap/core" {
|
|
|
1389
1390
|
|
|
1390
1391
|
declare module "@tiptap/core" {
|
|
1391
1392
|
interface Commands<ReturnType> {
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
unsetFontSize: () => ReturnType;
|
|
1393
|
+
moodTracker: {
|
|
1394
|
+
insertMoodTracker: (data: MoodTrackerData) => ReturnType;
|
|
1395
1395
|
};
|
|
1396
1396
|
}
|
|
1397
1397
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { S as L, m as ye, u as Z, n as Se, o as Re, i as ke, j as _e, k as Ne, q as Ce, l as Le, w as Fe, r as Ve, s as Te } from "./F0CanvasPanel-
|
|
1
|
+
import { S as L, m as ye, u as Z, n as Se, o as Re, i as ke, j as _e, k as Ne, q as Ce, l as Le, w as Fe, r as Ve, s as Te } from "./F0CanvasPanel-VDUWMSmw.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-38_nmvOc.js";
|
|
5
5
|
import { F as We } from "./Printer-BD-FEi_2.js";
|
|
6
6
|
import { d as ae } from "./tooltip-CMBdJvJA.js";
|
|
7
7
|
import './index.css';const Oe = ({
|
|
@@ -44,8 +44,8 @@ import './index.css';const Oe = ({
|
|
|
44
44
|
currentPage: a,
|
|
45
45
|
totalPages: e,
|
|
46
46
|
hasDocument: i,
|
|
47
|
-
selectedScale:
|
|
48
|
-
scaleOptions:
|
|
47
|
+
selectedScale: s,
|
|
48
|
+
scaleOptions: l,
|
|
49
49
|
onPreviousPage: d,
|
|
50
50
|
onNextPage: p,
|
|
51
51
|
onZoomIn: m,
|
|
@@ -70,7 +70,7 @@ import './index.css';const Oe = ({
|
|
|
70
70
|
),
|
|
71
71
|
children: [
|
|
72
72
|
/* @__PURE__ */ y("div", { className: q, children: [
|
|
73
|
-
i
|
|
73
|
+
i ? /* @__PURE__ */ y(
|
|
74
74
|
"span",
|
|
75
75
|
{
|
|
76
76
|
"aria-live": "polite",
|
|
@@ -81,7 +81,7 @@ import './index.css';const Oe = ({
|
|
|
81
81
|
e
|
|
82
82
|
]
|
|
83
83
|
}
|
|
84
|
-
),
|
|
84
|
+
) : null,
|
|
85
85
|
/* @__PURE__ */ t(
|
|
86
86
|
R,
|
|
87
87
|
{
|
|
@@ -123,21 +123,21 @@ import './index.css';const Oe = ({
|
|
|
123
123
|
{
|
|
124
124
|
hideLabel: !0,
|
|
125
125
|
label: c.scaleSelector,
|
|
126
|
-
options:
|
|
127
|
-
value:
|
|
126
|
+
options: l,
|
|
127
|
+
value: s,
|
|
128
128
|
onChange: (b) => k(b)
|
|
129
129
|
}
|
|
130
130
|
)
|
|
131
131
|
] }),
|
|
132
132
|
/* @__PURE__ */ y("div", { className: q, children: [
|
|
133
|
-
P
|
|
133
|
+
P ? /* @__PURE__ */ t(
|
|
134
134
|
R,
|
|
135
135
|
{
|
|
136
136
|
label: c.rotate,
|
|
137
137
|
onClick: g,
|
|
138
138
|
icon: Ce
|
|
139
139
|
}
|
|
140
|
-
),
|
|
140
|
+
) : null,
|
|
141
141
|
/* @__PURE__ */ t(
|
|
142
142
|
R,
|
|
143
143
|
{
|
|
@@ -187,18 +187,18 @@ import './index.css';const Oe = ({
|
|
|
187
187
|
const e = URL.createObjectURL(await re(o)), i = document.createElement("a");
|
|
188
188
|
i.href = e, i.download = a.length > 0 ? a : "document.pdf", document.body.appendChild(i), i.click(), i.remove(), URL.revokeObjectURL(e);
|
|
189
189
|
}, at = async (o, a, e = !0) => {
|
|
190
|
-
let i = o,
|
|
190
|
+
let i = o, s;
|
|
191
191
|
try {
|
|
192
192
|
const d = await fetch(o, {
|
|
193
193
|
credentials: e ? "include" : "same-origin"
|
|
194
194
|
});
|
|
195
195
|
if (!d.ok)
|
|
196
196
|
throw new Error(`${d.status}`);
|
|
197
|
-
|
|
197
|
+
s = URL.createObjectURL(await d.blob()), i = s;
|
|
198
198
|
} catch {
|
|
199
199
|
}
|
|
200
|
-
const
|
|
201
|
-
|
|
200
|
+
const l = document.createElement("a");
|
|
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
|
}, G = [
|
|
203
203
|
"0.5",
|
|
204
204
|
"0.75",
|
|
@@ -209,11 +209,11 @@ import './index.css';const Oe = ({
|
|
|
209
209
|
"3",
|
|
210
210
|
"4"
|
|
211
211
|
], ie = G.map(Number), Me = (o) => ie.find((a) => a > o), Ie = (o) => [...ie].reverse().find((a) => a < o), Ae = (o, a, e) => {
|
|
212
|
-
let i = null,
|
|
213
|
-
return a.forEach((
|
|
214
|
-
if (!
|
|
212
|
+
let i = null, s = 0;
|
|
213
|
+
return a.forEach((l, d) => {
|
|
214
|
+
if (!l)
|
|
215
215
|
return;
|
|
216
|
-
const p =
|
|
216
|
+
const p = l.offsetHeight, m = l.offsetTop, v = m + p, k = o.offsetHeight - e, P = o.scrollTop + e, g = P + k;
|
|
217
217
|
if (!(P < v && g > m))
|
|
218
218
|
return;
|
|
219
219
|
let x;
|
|
@@ -223,17 +223,17 @@ import './index.css';const Oe = ({
|
|
|
223
223
|
let h = P - m;
|
|
224
224
|
g < v && (h += v - g), x = p - h;
|
|
225
225
|
}
|
|
226
|
-
x >
|
|
226
|
+
x > s && (s = x, i = d + 1);
|
|
227
227
|
}), i;
|
|
228
228
|
};
|
|
229
229
|
Ee();
|
|
230
|
-
const qe = J(() => import("./SheetViewer-
|
|
230
|
+
const qe = J(() => import("./SheetViewer-CrvzW594.js")), Ge = J(() => import("./DocxViewer-CcY7eUEM.js")), Ze = J(() => import("./TextViewer-GmdvBh9P.js")), oe = 48, le = ne(
|
|
231
231
|
(o, a) => {
|
|
232
|
-
const { kind: e = "pdf", mimeType: i, ...
|
|
232
|
+
const { kind: e = "pdf", mimeType: i, ...s } = o;
|
|
233
233
|
if (e === "pdf")
|
|
234
|
-
return /* @__PURE__ */ t(
|
|
234
|
+
return /* @__PURE__ */ t(se, { ref: a, ...s });
|
|
235
235
|
const {
|
|
236
|
-
url:
|
|
236
|
+
url: l,
|
|
237
237
|
filename: d,
|
|
238
238
|
actions: p,
|
|
239
239
|
withCredentials: m = !0,
|
|
@@ -246,7 +246,7 @@ const qe = J(() => import("./SheetViewer-DSbC_CR2.js")), Ge = J(() => import("./
|
|
|
246
246
|
onPdfLoaded: h,
|
|
247
247
|
onPageChange: c,
|
|
248
248
|
...b
|
|
249
|
-
} =
|
|
249
|
+
} = s;
|
|
250
250
|
return /* @__PURE__ */ t(
|
|
251
251
|
"div",
|
|
252
252
|
{
|
|
@@ -258,34 +258,34 @@ const qe = J(() => import("./SheetViewer-DSbC_CR2.js")), Ge = J(() => import("./
|
|
|
258
258
|
{
|
|
259
259
|
fallback: /* @__PURE__ */ t(L, { className: "h-full w-full rounded-none" }),
|
|
260
260
|
children: [
|
|
261
|
-
e === "sheet"
|
|
261
|
+
e === "sheet" ? /* @__PURE__ */ t(
|
|
262
262
|
qe,
|
|
263
263
|
{
|
|
264
|
-
url:
|
|
264
|
+
url: l,
|
|
265
265
|
filename: d,
|
|
266
266
|
withCredentials: m,
|
|
267
267
|
actions: p
|
|
268
268
|
}
|
|
269
|
-
),
|
|
270
|
-
e === "docx"
|
|
269
|
+
) : null,
|
|
270
|
+
e === "docx" ? /* @__PURE__ */ t(
|
|
271
271
|
Ge,
|
|
272
272
|
{
|
|
273
|
-
url:
|
|
273
|
+
url: l,
|
|
274
274
|
filename: d,
|
|
275
275
|
withCredentials: m,
|
|
276
276
|
actions: p
|
|
277
277
|
}
|
|
278
|
-
),
|
|
279
|
-
e === "text"
|
|
278
|
+
) : null,
|
|
279
|
+
e === "text" ? /* @__PURE__ */ t(
|
|
280
280
|
Ze,
|
|
281
281
|
{
|
|
282
|
-
url:
|
|
282
|
+
url: l,
|
|
283
283
|
name: d ?? "",
|
|
284
284
|
mimeType: i,
|
|
285
285
|
withCredentials: m,
|
|
286
286
|
actions: p
|
|
287
287
|
}
|
|
288
|
-
)
|
|
288
|
+
) : null
|
|
289
289
|
]
|
|
290
290
|
}
|
|
291
291
|
)
|
|
@@ -293,13 +293,13 @@ const qe = J(() => import("./SheetViewer-DSbC_CR2.js")), Ge = J(() => import("./
|
|
|
293
293
|
);
|
|
294
294
|
}
|
|
295
295
|
);
|
|
296
|
-
|
|
297
|
-
const
|
|
296
|
+
le.displayName = "F0PdfViewer";
|
|
297
|
+
const se = ne((o, a) => {
|
|
298
298
|
const {
|
|
299
299
|
url: e,
|
|
300
300
|
filename: i = "document.pdf",
|
|
301
|
-
page:
|
|
302
|
-
pagesToDisplay:
|
|
301
|
+
page: s = 0,
|
|
302
|
+
pagesToDisplay: l = [],
|
|
303
303
|
initialScale: d = "page-width",
|
|
304
304
|
withCredentials: p = !0,
|
|
305
305
|
rotatable: m = !1,
|
|
@@ -309,7 +309,7 @@ const le = ne((o, a) => {
|
|
|
309
309
|
onPageChange: g,
|
|
310
310
|
actions: H,
|
|
311
311
|
...x
|
|
312
|
-
} = o, { pdfViewer: h } = Z(), [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 =
|
|
312
|
+
} = o, { pdfViewer: h } = Z(), [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 },
|
|
@@ -363,10 +363,10 @@ const le = ne((o, a) => {
|
|
|
363
363
|
}, [k]), he = w(
|
|
364
364
|
(n) => {
|
|
365
365
|
b(n), P?.(n), setTimeout(() => {
|
|
366
|
-
Q(
|
|
366
|
+
Q(s + 1), F(s);
|
|
367
367
|
}, 0);
|
|
368
368
|
},
|
|
369
|
-
[P,
|
|
369
|
+
[P, s, F]
|
|
370
370
|
), be = w((n) => {
|
|
371
371
|
const r = n.target;
|
|
372
372
|
if (!(r instanceof HTMLElement))
|
|
@@ -385,8 +385,8 @@ const le = ne((o, a) => {
|
|
|
385
385
|
return T(() => {
|
|
386
386
|
b(null), K([]), D.current = [];
|
|
387
387
|
}, [e]), T(() => {
|
|
388
|
-
F(
|
|
389
|
-
}, [
|
|
388
|
+
F(s);
|
|
389
|
+
}, [s, F]), T(() => {
|
|
390
390
|
S > 0 && g?.(S);
|
|
391
391
|
}, [S, g]), T(() => {
|
|
392
392
|
_.length > 0 && (d === "page-width" || d === "page-fit") && O(d);
|
|
@@ -435,7 +435,7 @@ const le = ne((o, a) => {
|
|
|
435
435
|
actions: H
|
|
436
436
|
}
|
|
437
437
|
),
|
|
438
|
-
e
|
|
438
|
+
e ? /* @__PURE__ */ t(
|
|
439
439
|
Ue,
|
|
440
440
|
{
|
|
441
441
|
file: fe,
|
|
@@ -448,8 +448,8 @@ const le = ne((o, a) => {
|
|
|
448
448
|
height: ee
|
|
449
449
|
}
|
|
450
450
|
),
|
|
451
|
-
children: c
|
|
452
|
-
const f = (
|
|
451
|
+
children: c ? Array.from({ length: W ?? 0 }).map((n, r) => {
|
|
452
|
+
const f = (l.length > 0 ? l[r] : r) + 1;
|
|
453
453
|
return /* @__PURE__ */ t(
|
|
454
454
|
"div",
|
|
455
455
|
{
|
|
@@ -489,16 +489,16 @@ const le = ne((o, a) => {
|
|
|
489
489
|
},
|
|
490
490
|
r
|
|
491
491
|
);
|
|
492
|
-
})
|
|
492
|
+
}) : null
|
|
493
493
|
}
|
|
494
|
-
)
|
|
494
|
+
) : null
|
|
495
495
|
]
|
|
496
496
|
}
|
|
497
497
|
)
|
|
498
498
|
}
|
|
499
499
|
);
|
|
500
500
|
});
|
|
501
|
-
|
|
501
|
+
se.displayName = "PdfViewerBase";
|
|
502
502
|
const Je = () => {
|
|
503
503
|
const { pdfViewer: o } = Z();
|
|
504
504
|
return /* @__PURE__ */ y(
|
|
@@ -536,7 +536,7 @@ const Je = () => {
|
|
|
536
536
|
], Qe = Fe(
|
|
537
537
|
Ve(
|
|
538
538
|
"F0PdfViewer",
|
|
539
|
-
Te(
|
|
539
|
+
Te(le, Je)
|
|
540
540
|
)
|
|
541
541
|
), rt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
542
542
|
__proto__: null,
|
|
@@ -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
3
|
import { e as clsx } from "./tooltip-CMBdJvJA.js";
|
|
4
|
-
import { W as invariant } from "./F0CanvasPanel-
|
|
5
|
-
import { d as dequal } from "./CoachmarkProvider-
|
|
4
|
+
import { W as invariant } from "./F0CanvasPanel-VDUWMSmw.js";
|
|
5
|
+
import { d as dequal } from "./CoachmarkProvider-FhruFtJe.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: {} };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@factorialco/f0-react",
|
|
3
|
-
"version": "6.88.
|
|
3
|
+
"version": "6.88.5",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/factorialco/f0.git",
|
|
@@ -166,6 +166,7 @@
|
|
|
166
166
|
"emoji-mart": "^5.6.0",
|
|
167
167
|
"emojibase-data": "^16.0.3",
|
|
168
168
|
"eslint-plugin-import": "^2.32.0",
|
|
169
|
+
"eslint-plugin-react": "^7.37.5",
|
|
169
170
|
"eslint-plugin-react-refresh": "^0.4.26",
|
|
170
171
|
"eslint-plugin-sonarjs": "^4.2.0",
|
|
171
172
|
"eslint-plugin-storybook": "^10.3.3",
|
package/dist/index-uG8opRj1.js
DELETED