@factorialco/f0-react 8.28.3 → 8.28.4
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-D5hDwmp7.js → ChatDocxThumbnail-DTpOzL9A.js} +7 -7
- package/dist/{ChatPdfThumbnail-Cf74m771.js → ChatPdfThumbnail-QKm8T1iP.js} +1 -1
- package/dist/{ChatPostComposerDialog-pRNELk68.js → ChatPostComposerDialog-DF5B8NLo.js} +3 -3
- package/dist/{ChatSheetThumbnail-D8aN1W_0.js → ChatSheetThumbnail-CyiwSdZJ.js} +1 -1
- package/dist/{DocumentToolbar-C4DUcWl7.js → DocumentToolbar-BAa5mh7x.js} +2 -2
- package/dist/{DocxViewer-M4FGdd_h.js → DocxViewer-CYBh46FI.js} +7 -7
- package/dist/{F0AiProcessingOverlay-Cpx37q3a.js → F0AiProcessingOverlay-3H79lgMd.js} +1 -1
- package/dist/{F0CanvasPanel-CRTe0CIF.js → F0CanvasPanel-DAEeI3lV.js} +199 -199
- package/dist/{F0Map-BywRoarL.js → F0Map-B7PwCmUl.js} +4 -4
- package/dist/{F0VideoPlayer-DUv08bcV.js → F0VideoPlayer-CNvEtJ9U.js} +18 -18
- package/dist/{MapProvider-CTtL5mc3.js → MapProvider-WM9ZFI_s.js} +2 -2
- package/dist/SheetViewer-CvQ24W5k.js +123 -0
- package/dist/{TextViewer-54DAaDA1.js → TextViewer-uZnjAB6W.js} +2 -2
- package/dist/ai.d.ts +6 -6
- package/dist/ai.js +2 -2
- package/dist/component-status.d.ts +6 -6
- package/dist/component-status.js +1 -1
- package/dist/{experimental-STLmChcB.js → experimental-Bzwkrec6.js} +179 -179
- package/dist/experimental.d.ts +6 -6
- package/dist/experimental.js +40 -40
- package/dist/f0.d.ts +6 -6
- package/dist/f0.js +10 -10
- package/dist/i18n-provider-defaults.d.ts +6 -6
- package/dist/{index-DFrzKaGA.js → index-98s6Ae16.js} +62 -62
- package/dist/{index-9MKvlApA.js → index-B1tQWotf.js} +28 -28
- package/dist/{index-BXS__6p-.js → index-BuHr35P1.js} +15 -15
- package/dist/{index-CKzBQYgd.js → index-Ck8-Kqxo.js} +2 -2
- package/dist/index-D4H-LP6r.js +4 -0
- package/dist/{pdfWorker-DACTjTuR.js → pdfWorker-C8Mu95m3.js} +2 -2
- package/dist/{docx-preview-BaRDMyPN.js → renderDocx-CVEzw9MK.js} +920 -901
- package/dist/sheetPreview-Bqj3xODH.js +51 -0
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/SheetViewer-BK9NNMZ9.js +0 -111
- package/dist/index-D0rQW0DI.js +0 -4
- package/dist/sheetPreview-Djc-YyVs.js +0 -37
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { utils as a, read as f } from "./xlsx-CzlURDDb.js";
|
|
2
|
+
const l = [80, 75, 3, 4], w = [208, 207, 17, 224], d = (e, t) => t.every((r, o) => e[o] === r), y = (e) => {
|
|
3
|
+
try {
|
|
4
|
+
return new TextDecoder("utf-8", { fatal: !0 }).decode(e);
|
|
5
|
+
} catch {
|
|
6
|
+
return null;
|
|
7
|
+
}
|
|
8
|
+
}, k = (e) => {
|
|
9
|
+
const t = new Uint8Array(e);
|
|
10
|
+
if (!d(t, l) && !d(t, w)) {
|
|
11
|
+
const r = y(t);
|
|
12
|
+
if (r !== null)
|
|
13
|
+
return f(r, { type: "string", raw: !0 });
|
|
14
|
+
}
|
|
15
|
+
return f(e, { type: "array", raw: !0 });
|
|
16
|
+
}, m = (e, { maxRows: t, maxCols: r }) => {
|
|
17
|
+
const o = k(e);
|
|
18
|
+
return o.SheetNames.map((s) => {
|
|
19
|
+
const c = o.Sheets[s], u = c?.["!ref"];
|
|
20
|
+
if (!c || !u)
|
|
21
|
+
return { name: s, rows: [], truncatedRows: !1 };
|
|
22
|
+
const n = a.decode_range(u), i = n.e.r - n.s.r + 1 > t;
|
|
23
|
+
n.e.r = Math.min(n.e.r, n.s.r + t - 1), n.e.c = Math.min(n.e.c, n.s.c + r - 1);
|
|
24
|
+
const h = a.sheet_to_json(c, {
|
|
25
|
+
header: 1,
|
|
26
|
+
raw: !1,
|
|
27
|
+
// formatted text, not raw values
|
|
28
|
+
defval: "",
|
|
29
|
+
range: n
|
|
30
|
+
});
|
|
31
|
+
return { name: s, rows: h, truncatedRows: i };
|
|
32
|
+
});
|
|
33
|
+
}, _ = (e) => {
|
|
34
|
+
const t = e.reduce((r, o) => Math.max(r, o.length), 0);
|
|
35
|
+
return Array.from({ length: t }, (r, o) => a.encode_col(o));
|
|
36
|
+
}, g = async (e, {
|
|
37
|
+
maxRows: t,
|
|
38
|
+
maxCols: r,
|
|
39
|
+
withCredentials: o = !0
|
|
40
|
+
}) => {
|
|
41
|
+
const s = await fetch(e, {
|
|
42
|
+
credentials: o ? "include" : "same-origin"
|
|
43
|
+
});
|
|
44
|
+
if (!s.ok)
|
|
45
|
+
throw new Error(`Failed to fetch sheet: ${s.status}`);
|
|
46
|
+
return m(await s.arrayBuffer(), { maxRows: t, maxCols: r });
|
|
47
|
+
};
|
|
48
|
+
export {
|
|
49
|
+
_ as c,
|
|
50
|
+
g as f
|
|
51
|
+
};
|