@factorialco/f0-react 8.10.1 → 8.11.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-DtCxNTHV.js → ChatPdfThumbnail-ELD5oua9.js} +1 -1
- package/dist/{ChatPostComposerDialog-DvRj6Soh.js → ChatPostComposerDialog-CwJQrIoS.js} +3 -3
- package/dist/DocumentToolbar-BtBTQCtY.js +113 -0
- package/dist/DocxViewer-DnBEWb0C.js +72 -0
- package/dist/{F0AiProcessingOverlay-DfZDuEp8.js → F0AiProcessingOverlay-BikXmclE.js} +1 -1
- package/dist/{F0CanvasPanel-CTqnQRE3.js → F0CanvasPanel-rSEKuj9G.js} +865 -863
- package/dist/{F0Map-CXih9UM9.js → F0Map-DFbZHu7m.js} +4 -4
- package/dist/{F0VideoPlayer-DK2PVVlI.js → F0VideoPlayer-Ba0vlv2e.js} +2 -2
- package/dist/{MapProvider-BTkCnHkC.js → MapProvider-YNqPcTEY.js} +12966 -12902
- package/dist/SheetViewer-Cms_aBKz.js +111 -0
- package/dist/{TextViewer-DK0N_Kiz.js → TextViewer-a0sR0H4H.js} +37 -32
- package/dist/ai.d.ts +12 -12
- package/dist/ai.js +2 -2
- package/dist/component-status.d.ts +12 -12
- package/dist/component-status.js +1 -1
- package/dist/{experimental-CpcmlTSN.js → experimental-BdZCIB78.js} +8 -8
- package/dist/experimental.d.ts +12 -12
- package/dist/experimental.js +4 -4
- package/dist/f0.d.ts +87 -63
- package/dist/f0.js +49 -48
- package/dist/i18n-provider-defaults.d.ts +12 -12
- package/dist/{index-BjzZa_Vz.js → index-BIsKzqtW.js} +2 -2
- package/dist/{index-4Y21ajv9.js → index-D-9j-pbd.js} +1 -1
- package/dist/index-DWQKn9x1.js +4 -0
- package/dist/{index--AsP5ABt.js → index-Df2nVRI0.js} +3 -3
- package/dist/index-qNKyBZ0l.js +589 -0
- package/dist/index2.css +1 -1
- package/dist/{pdfWorker-DHCbnpQ0.js → pdfWorker-Ce0sEPyw.js} +2 -2
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/DocumentToolbar-BIEBSN8G.js +0 -93
- package/dist/DocxViewer-FAppzCEm.js +0 -67
- package/dist/SheetViewer-DgXiYpJt.js +0 -108
- package/dist/index-BZYFr1nf.js +0 -4
- package/dist/index-zpnaxwYU.js +0 -556
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { jsx as r, jsxs as n, Fragment as k } from "react/jsx-runtime";
|
|
2
|
+
import { useState as f, useEffect as S } from "react";
|
|
3
|
+
import { u as V, T as E, h as R, S as z } from "./F0CanvasPanel-rSEKuj9G.js";
|
|
4
|
+
import { f as _, c as j } from "./sheetPreview-Djc-YyVs.js";
|
|
5
|
+
import { u as F, D as I } from "./DocumentToolbar-BtBTQCtY.js";
|
|
6
|
+
const x = 1e3, T = 100, O = ({
|
|
7
|
+
url: a,
|
|
8
|
+
filename: w,
|
|
9
|
+
withCredentials: l = !0,
|
|
10
|
+
actions: N,
|
|
11
|
+
toolbar: c = "top"
|
|
12
|
+
}) => {
|
|
13
|
+
const d = V(), m = F(), [t, u] = f(null), [v, i] = f(!1), [h, b] = f(0);
|
|
14
|
+
S(() => {
|
|
15
|
+
let e = !1;
|
|
16
|
+
return u(null), i(!1), b(0), _(a, {
|
|
17
|
+
maxRows: x,
|
|
18
|
+
maxCols: T,
|
|
19
|
+
withCredentials: l
|
|
20
|
+
}).then((o) => {
|
|
21
|
+
e || (o.length === 0 ? i(!0) : u(o));
|
|
22
|
+
}).catch(() => {
|
|
23
|
+
e || i(!0);
|
|
24
|
+
}), () => {
|
|
25
|
+
e = !0;
|
|
26
|
+
};
|
|
27
|
+
}, [a, l]);
|
|
28
|
+
const s = t ? t[Math.min(h, t.length - 1)] : null, p = s ? j(s.rows) : [], g = /* @__PURE__ */ r(
|
|
29
|
+
I,
|
|
30
|
+
{
|
|
31
|
+
url: a,
|
|
32
|
+
filename: w,
|
|
33
|
+
withCredentials: l,
|
|
34
|
+
actions: N,
|
|
35
|
+
zoom: m,
|
|
36
|
+
placement: c,
|
|
37
|
+
children: t && t.length > 1 ? /* @__PURE__ */ r(
|
|
38
|
+
E,
|
|
39
|
+
{
|
|
40
|
+
type: "single",
|
|
41
|
+
size: "sm",
|
|
42
|
+
value: String(h),
|
|
43
|
+
onValueChange: (e) => {
|
|
44
|
+
e && b(Number(e));
|
|
45
|
+
},
|
|
46
|
+
className: "justify-start",
|
|
47
|
+
children: t.map((e, o) => /* @__PURE__ */ r(
|
|
48
|
+
R,
|
|
49
|
+
{
|
|
50
|
+
value: String(o),
|
|
51
|
+
className: "whitespace-nowrap",
|
|
52
|
+
children: e.name
|
|
53
|
+
},
|
|
54
|
+
`${e.name}-${o}`
|
|
55
|
+
))
|
|
56
|
+
}
|
|
57
|
+
) : null
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
return /* @__PURE__ */ n("div", { className: "relative flex h-full w-full flex-col bg-f1-background", children: [
|
|
61
|
+
c === "top" ? g : null,
|
|
62
|
+
v ? /* @__PURE__ */ r("div", { className: "flex min-h-0 grow items-center justify-center text-f1-foreground-secondary", children: d.pdfViewer.previewFailed }) : s ? /* @__PURE__ */ n(k, { children: [
|
|
63
|
+
/* @__PURE__ */ r("div", { className: "min-h-0 grow overflow-auto", children: /* @__PURE__ */ n(
|
|
64
|
+
"table",
|
|
65
|
+
{
|
|
66
|
+
className: "border-collapse text-sm",
|
|
67
|
+
style: { zoom: m.scale },
|
|
68
|
+
children: [
|
|
69
|
+
/* @__PURE__ */ r("thead", { children: /* @__PURE__ */ n("tr", { children: [
|
|
70
|
+
/* @__PURE__ */ r("th", { className: "sticky top-0 z-10 border border-solid border-f1-border-secondary bg-f1-background-secondary px-2 py-1" }),
|
|
71
|
+
p.map((e) => /* @__PURE__ */ r(
|
|
72
|
+
"th",
|
|
73
|
+
{
|
|
74
|
+
className: "sticky top-0 z-10 border border-solid border-f1-border-secondary bg-f1-background-secondary px-2 py-1 text-center font-medium text-f1-foreground-secondary",
|
|
75
|
+
children: e
|
|
76
|
+
},
|
|
77
|
+
e
|
|
78
|
+
))
|
|
79
|
+
] }) }),
|
|
80
|
+
/* @__PURE__ */ r("tbody", { children: s.rows.map((e, o) => /* @__PURE__ */ n("tr", { children: [
|
|
81
|
+
/* @__PURE__ */ r("td", { className: "border border-solid border-f1-border-secondary bg-f1-background-secondary px-2 py-1 text-center text-f1-foreground-secondary", children: o + 1 }),
|
|
82
|
+
p.map((W, y) => /* @__PURE__ */ r(
|
|
83
|
+
"td",
|
|
84
|
+
{
|
|
85
|
+
className: "whitespace-nowrap border border-solid border-f1-border-secondary px-2 py-1 text-f1-foreground",
|
|
86
|
+
children: e[y] ?? ""
|
|
87
|
+
},
|
|
88
|
+
y
|
|
89
|
+
))
|
|
90
|
+
] }, o)) })
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
) }),
|
|
94
|
+
s.truncatedRows ? /* @__PURE__ */ r("div", { className: "shrink-0 border-0 border-t border-solid border-f1-border-secondary px-3 py-1.5 text-sm text-f1-foreground-secondary", children: d.t("pdfViewer.showingFirstRows.other", {
|
|
95
|
+
count: x
|
|
96
|
+
}) }) : null
|
|
97
|
+
] }) : /* @__PURE__ */ r(
|
|
98
|
+
z,
|
|
99
|
+
{
|
|
100
|
+
role: "status",
|
|
101
|
+
"aria-busy": !0,
|
|
102
|
+
"aria-label": d.pdfViewer.loading,
|
|
103
|
+
className: "min-h-0 w-full grow rounded-none"
|
|
104
|
+
}
|
|
105
|
+
),
|
|
106
|
+
c === "floating" ? g : null
|
|
107
|
+
] });
|
|
108
|
+
};
|
|
109
|
+
export {
|
|
110
|
+
O as default
|
|
111
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { u as
|
|
4
|
-
import { u as
|
|
5
|
-
const
|
|
1
|
+
import { jsxs as p, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useState as u, useEffect as x } from "react";
|
|
3
|
+
import { u as w, S as y, p as g } from "./F0CanvasPanel-rSEKuj9G.js";
|
|
4
|
+
import { u as k, D as v } from "./DocumentToolbar-BtBTQCtY.js";
|
|
5
|
+
const q = 2 * 1024 * 1024, N = [
|
|
6
6
|
"[&_h1]:mb-3 [&_h1]:mt-6 [&_h1]:text-2xl [&_h1]:font-semibold",
|
|
7
7
|
"[&_h2]:mb-2 [&_h2]:mt-5 [&_h2]:text-xl [&_h2]:font-semibold",
|
|
8
8
|
"[&_h3]:mb-2 [&_h3]:mt-4 [&_h3]:text-lg [&_h3]:font-semibold",
|
|
@@ -19,57 +19,62 @@ const k = 2 * 1024 * 1024, v = [
|
|
|
19
19
|
"[&_th]:border [&_th]:border-solid [&_th]:border-f1-border-secondary [&_th]:px-2 [&_th]:py-1 [&_th]:text-left [&_th]:font-medium",
|
|
20
20
|
"[&_td]:border [&_td]:border-solid [&_td]:border-f1-border-secondary [&_td]:px-2 [&_td]:py-1",
|
|
21
21
|
"[&_hr]:my-4 [&_hr]:border-f1-border-secondary"
|
|
22
|
-
].join(" "),
|
|
22
|
+
].join(" "), S = (o, r) => !!r?.toLowerCase().includes("markdown") || o.toLowerCase().endsWith(".md") || o.toLowerCase().endsWith(".markdown"), j = ({
|
|
23
23
|
url: o,
|
|
24
24
|
name: r,
|
|
25
|
-
mimeType:
|
|
25
|
+
mimeType: f,
|
|
26
26
|
withCredentials: l = !0,
|
|
27
|
-
actions:
|
|
27
|
+
actions: b,
|
|
28
|
+
toolbar: d = "top"
|
|
28
29
|
}) => {
|
|
29
|
-
const
|
|
30
|
-
|
|
30
|
+
const a = w(), c = k(), [n, m] = u(null), [h, _] = u(!1);
|
|
31
|
+
x(() => {
|
|
31
32
|
let s = !1;
|
|
32
|
-
return
|
|
33
|
+
return m(null), _(!1), fetch(o, { credentials: l ? "include" : "same-origin" }).then((t) => {
|
|
33
34
|
if (!t.ok)
|
|
34
35
|
throw new Error(`${t.status}`);
|
|
35
36
|
return t.text();
|
|
36
37
|
}).then((t) => {
|
|
37
|
-
s ||
|
|
38
|
+
s || m(t.slice(0, q));
|
|
38
39
|
}).catch(() => {
|
|
39
|
-
s ||
|
|
40
|
+
s || _(!0);
|
|
40
41
|
}), () => {
|
|
41
42
|
s = !0;
|
|
42
43
|
};
|
|
43
|
-
}, [o, l])
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
44
|
+
}, [o, l]);
|
|
45
|
+
const i = /* @__PURE__ */ e(
|
|
46
|
+
v,
|
|
47
|
+
{
|
|
48
|
+
url: o,
|
|
49
|
+
filename: r,
|
|
50
|
+
withCredentials: l,
|
|
51
|
+
actions: b,
|
|
52
|
+
zoom: c,
|
|
53
|
+
placement: d
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
return /* @__PURE__ */ p("div", { className: "relative flex h-full w-full flex-col bg-f1-background", children: [
|
|
57
|
+
d === "top" ? i : null,
|
|
58
|
+
h ? /* @__PURE__ */ e("div", { className: "flex min-h-0 grow items-center justify-center text-f1-foreground-secondary", children: a.pdfViewer.previewFailed }) : n === null ? /* @__PURE__ */ e(
|
|
59
|
+
y,
|
|
56
60
|
{
|
|
57
61
|
role: "status",
|
|
58
62
|
"aria-busy": !0,
|
|
59
|
-
"aria-label":
|
|
63
|
+
"aria-label": a.pdfViewer.loading,
|
|
60
64
|
className: "min-h-0 w-full grow rounded-none"
|
|
61
65
|
}
|
|
62
|
-
) : /* @__PURE__ */ e("div", { className: "min-h-0 grow overflow-auto", children: /* @__PURE__ */ e("div", { style: { zoom:
|
|
66
|
+
) : /* @__PURE__ */ e("div", { className: "min-h-0 grow overflow-auto", children: /* @__PURE__ */ e("div", { style: { zoom: c.scale }, children: S(r, f) ? /* @__PURE__ */ e(
|
|
63
67
|
"div",
|
|
64
68
|
{
|
|
65
|
-
className: `mx-auto max-w-3xl px-6 py-4 text-base text-f1-foreground ${
|
|
69
|
+
className: `mx-auto max-w-3xl px-6 py-4 text-base text-f1-foreground ${N}`,
|
|
66
70
|
dangerouslySetInnerHTML: {
|
|
67
|
-
__html:
|
|
71
|
+
__html: g(n)
|
|
68
72
|
}
|
|
69
73
|
}
|
|
70
|
-
) : /* @__PURE__ */ e("pre", { className: "m-0 whitespace-pre-wrap break-words px-6 py-4 font-mono text-sm text-f1-foreground", children:
|
|
74
|
+
) : /* @__PURE__ */ e("pre", { className: "m-0 whitespace-pre-wrap break-words px-6 py-4 font-mono text-sm text-f1-foreground", children: n }) }) }),
|
|
75
|
+
d === "floating" ? i : null
|
|
71
76
|
] });
|
|
72
77
|
};
|
|
73
78
|
export {
|
|
74
|
-
|
|
79
|
+
j as default
|
|
75
80
|
};
|
package/dist/ai.d.ts
CHANGED
|
@@ -6728,12 +6728,12 @@ declare global {
|
|
|
6728
6728
|
}
|
|
6729
6729
|
|
|
6730
6730
|
|
|
6731
|
-
declare namespace
|
|
6731
|
+
declare namespace DaytimePageInternal {
|
|
6732
6732
|
var displayName: string;
|
|
6733
6733
|
}
|
|
6734
6734
|
|
|
6735
6735
|
|
|
6736
|
-
declare namespace
|
|
6736
|
+
declare namespace _Page {
|
|
6737
6737
|
var displayName: string;
|
|
6738
6738
|
}
|
|
6739
6739
|
|
|
@@ -6760,6 +6760,16 @@ declare namespace Calendar {
|
|
|
6760
6760
|
}
|
|
6761
6761
|
|
|
6762
6762
|
|
|
6763
|
+
declare module "@tiptap/core" {
|
|
6764
|
+
interface Commands<ReturnType> {
|
|
6765
|
+
fontSize: {
|
|
6766
|
+
setFontSize: (fontSize: string) => ReturnType;
|
|
6767
|
+
unsetFontSize: () => ReturnType;
|
|
6768
|
+
};
|
|
6769
|
+
}
|
|
6770
|
+
}
|
|
6771
|
+
|
|
6772
|
+
|
|
6763
6773
|
declare module "@tiptap/core" {
|
|
6764
6774
|
interface Commands<ReturnType> {
|
|
6765
6775
|
aiBlock: {
|
|
@@ -6782,16 +6792,6 @@ declare module "@tiptap/core" {
|
|
|
6782
6792
|
}
|
|
6783
6793
|
|
|
6784
6794
|
|
|
6785
|
-
declare module "@tiptap/core" {
|
|
6786
|
-
interface Commands<ReturnType> {
|
|
6787
|
-
fontSize: {
|
|
6788
|
-
setFontSize: (fontSize: string) => ReturnType;
|
|
6789
|
-
unsetFontSize: () => ReturnType;
|
|
6790
|
-
};
|
|
6791
|
-
}
|
|
6792
|
-
}
|
|
6793
|
-
|
|
6794
|
-
|
|
6795
6795
|
declare module "@tiptap/core" {
|
|
6796
6796
|
interface Commands<ReturnType> {
|
|
6797
6797
|
indent: {
|
package/dist/ai.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as e, D as r, c as t, F as i, a as o, f as n, g as F, d as C, e as l, I as A, P as d, b as u, u as m } from "./F0CanvasPanel-
|
|
1
|
+
import { C as e, D as r, c as t, F as i, a as o, f as n, g as F, d as C, e as l, I as A, P as d, b as u, u as m } from "./F0CanvasPanel-rSEKuj9G.js";
|
|
2
2
|
import { defaultTranslations as c } from "./i18n-provider-defaults.js";
|
|
3
|
-
import { A as g, C as p, t as v, s as I, v as T, y as S, B as f, l as y, i as x, q as b, E as k, G as B, p as H, r as L, j as M, e as O, g as V, k as w, F as D, T as z, w as E, h as G, a as j, n as q, z as R, m as U, o as J, D as K, b as N, f as Q, x as W, c as X, d as Y, u as Z } from "./F0AiProcessingOverlay-
|
|
3
|
+
import { A as g, C as p, t as v, s as I, v as T, y as S, B as f, l as y, i as x, q as b, E as k, G as B, p as H, r as L, j as M, e as O, g as V, k as w, F as D, T as z, w as E, h as G, a as j, n as q, z as R, m as U, o as J, D as K, b as N, f as Q, x as W, c as X, d as Y, u as Z } from "./F0AiProcessingOverlay-BikXmclE.js";
|
|
4
4
|
export {
|
|
5
5
|
g as AiChatTranslationsProvider,
|
|
6
6
|
e as ChatSpinner,
|
|
@@ -262,12 +262,12 @@ declare global {
|
|
|
262
262
|
}
|
|
263
263
|
|
|
264
264
|
|
|
265
|
-
declare namespace
|
|
265
|
+
declare namespace DaytimePageInternal {
|
|
266
266
|
var displayName: string;
|
|
267
267
|
}
|
|
268
268
|
|
|
269
269
|
|
|
270
|
-
declare namespace
|
|
270
|
+
declare namespace _Page {
|
|
271
271
|
var displayName: string;
|
|
272
272
|
}
|
|
273
273
|
|
|
@@ -294,6 +294,16 @@ declare namespace Calendar {
|
|
|
294
294
|
}
|
|
295
295
|
|
|
296
296
|
|
|
297
|
+
declare module "@tiptap/core" {
|
|
298
|
+
interface Commands<ReturnType> {
|
|
299
|
+
fontSize: {
|
|
300
|
+
setFontSize: (fontSize: string) => ReturnType;
|
|
301
|
+
unsetFontSize: () => ReturnType;
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
|
|
297
307
|
declare module "@tiptap/core" {
|
|
298
308
|
interface Commands<ReturnType> {
|
|
299
309
|
aiBlock: {
|
|
@@ -316,16 +326,6 @@ declare module "@tiptap/core" {
|
|
|
316
326
|
}
|
|
317
327
|
|
|
318
328
|
|
|
319
|
-
declare module "@tiptap/core" {
|
|
320
|
-
interface Commands<ReturnType> {
|
|
321
|
-
fontSize: {
|
|
322
|
-
setFontSize: (fontSize: string) => ReturnType;
|
|
323
|
-
unsetFontSize: () => ReturnType;
|
|
324
|
-
};
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
|
|
329
329
|
declare module "@tiptap/core" {
|
|
330
330
|
interface Commands<ReturnType> {
|
|
331
331
|
indent: {
|