@fileverse-dev/dsheet 4.0.3 → 4.0.5-edit-mode-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/{constants-Cdz6oSCq.js → constants-CRFfbkoQ.js} +1 -1
- package/dist/constants.js +1 -1
- package/dist/{crypto-constants-CqpCRs86.js → crypto-constants-ZTlAYRUf.js} +33 -22
- package/dist/editor/components/sidebar/use-right-panels.d.ts +1 -1
- package/dist/editor/components/sidebars/named-ranges.d.ts +2 -0
- package/dist/editor/contexts/editor-context.d.ts +13 -5
- package/dist/editor/dsheet-editor.d.ts +3 -2
- package/dist/editor/hooks/collaboration-lifecycle.d.ts +30 -0
- package/dist/editor/hooks/collaboration-lifecycle.test.d.ts +1 -0
- package/dist/editor/hooks/use-celldata-compaction.d.ts +2 -3
- package/dist/editor/hooks/use-collab-awareness.d.ts +3 -6
- package/dist/editor/hooks/use-editor-data.d.ts +2 -2
- package/dist/editor/hooks/use-editor-sync.d.ts +7 -3
- package/dist/editor/types.d.ts +17 -6
- package/dist/editor/utils/compact-committed-celldata.d.ts +11 -10
- package/dist/editor/utils/defined-names-ydoc.d.ts +31 -0
- package/dist/editor/utils/editor-handle.d.ts +11 -0
- package/dist/editor/utils/editor-handle.test.d.ts +1 -0
- package/dist/editor/utils/import-compaction.d.ts +25 -0
- package/dist/editor/utils/xlsx-defined-names.d.ts +41 -0
- package/dist/editor/utils/xlsx-import-pipeline.d.ts +28 -0
- package/dist/{executeStringFunction-BQvE7aeV.js → executeStringFunction-B6fhDKyN.js} +7014 -6490
- package/dist/formula.js +1 -1
- package/dist/{index-CeTa91qc.js → index-CXPCkzqN.js} +19874 -18415
- package/dist/index.d.ts +3 -1
- package/dist/index.es.js +51 -47
- package/dist/persistence-utils-BXFajzvq.js +98 -0
- package/dist/persistence-utils.d.ts +8 -2
- package/dist/persistence-utils.test.d.ts +1 -0
- package/dist/persistence.js +1 -1
- package/dist/sheet-engine/core/api/common.d.ts +1 -0
- package/dist/sheet-engine/core/context.d.ts +3 -1
- package/dist/sheet-engine/core/index.d.ts +2 -2
- package/dist/sheet-engine/core/modules/formula-snapshot-eval.d.ts +11 -0
- package/dist/sheet-engine/core/modules/formula.d.ts +27 -0
- package/dist/sheet-engine/core/modules/index.d.ts +3 -2
- package/dist/sheet-engine/core/modules/namedRanges.d.ts +53 -0
- package/dist/sheet-engine/core/paste/paste-border-utils.d.ts +2 -0
- package/dist/sheet-engine/core/settings.d.ts +2 -0
- package/dist/sheet-engine/core/types.d.ts +21 -0
- package/dist/sheet-engine/react/components/NamedRanges/index.d.ts +4 -0
- package/dist/sheet-engine/react/components/Workbook/api.d.ts +1 -0
- package/dist/sheet-engine/react/components/Workbook/index.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/sync-local/SyncManager.d.ts +54 -9
- package/dist/sync-local/crypto/room-key.d.ts +2 -0
- package/dist/sync-local/crypto/room-key.test.d.ts +1 -0
- package/dist/sync-local/floor.d.ts +8 -0
- package/dist/sync-local/floor.test.d.ts +1 -0
- package/dist/sync-local/index.d.ts +1 -1
- package/dist/sync-local/presence.d.ts +11 -0
- package/dist/sync-local/presence.test.d.ts +1 -0
- package/dist/sync-local/session-tools.d.ts +31 -0
- package/dist/sync-local/session-tools.test.d.ts +1 -0
- package/dist/sync-local/socketClient.d.ts +74 -8
- package/dist/sync-local/types/index.d.ts +111 -15
- package/dist/sync-local/useSyncManager.d.ts +4 -0
- package/dist/{template-data-list-oP1s0Uxn.js → template-data-list-RKnVLsuf.js} +51 -50
- package/dist/use-xlsx-import-impl-BtFa-ngI.js +1898 -0
- package/dist/worker/dsheet-worker-client.d.ts +14 -0
- package/dist/worker/dsheet-worker.d.ts +14 -0
- package/dist/xlsx-defined-names-DIgNskJ5.js +117 -0
- package/dist/xlsx-export-impl-CfnWkjsY.js +831 -0
- package/dist/xlsx-hyperlink-inline-BkyQuqyy.js +2512 -0
- package/package.json +5 -4
- package/dist/persistence-utils-DsM_MOB1.js +0 -89
- package/dist/sync-local/utils/objectToFile.d.ts +0 -1
- package/dist/use-xlsx-import-impl-BVsfV8ZV.js +0 -1572
- package/dist/xlsx-export-impl-Ber9FhFY.js +0 -3138
- package/dist/xlsx-hyperlink-inline-DzewAypN.js +0 -71
- package/dist/xlsx-image-utils-Cvg0qxRA.js +0 -126
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@fileverse-dev/dsheet",
|
|
3
3
|
"private": false,
|
|
4
4
|
"description": "DSheet",
|
|
5
|
-
"version": "4.0.
|
|
5
|
+
"version": "4.0.5-edit-mode-1",
|
|
6
6
|
"main": "dist/index.es.js",
|
|
7
7
|
"module": "dist/index.es.js",
|
|
8
8
|
"exports": {
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
]
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@fileverse-dev/dsheets-templates": "^0.0.
|
|
62
|
-
"@fileverse-dev/formulajs": "
|
|
61
|
+
"@fileverse-dev/dsheets-templates": "^0.0.31",
|
|
62
|
+
"@fileverse-dev/formulajs": "4.4.54",
|
|
63
63
|
"@fileverse/crypto": "^0.0.22",
|
|
64
64
|
"@fileverse/ens": "^0.0.4",
|
|
65
65
|
"@fileverse/ui": "^5.1.9",
|
|
@@ -69,6 +69,7 @@
|
|
|
69
69
|
"@tippyjs/react": "^4.2.6",
|
|
70
70
|
"@ucans/ucans": "^0.12.0",
|
|
71
71
|
"classnames": "^2.5.1",
|
|
72
|
+
"comlink": "^4.4.2",
|
|
72
73
|
"dayjs": "^1.11.0",
|
|
73
74
|
"exceljs": "^4.4.0",
|
|
74
75
|
"immer": "^9.0.12",
|
|
@@ -125,4 +126,4 @@
|
|
|
125
126
|
"vitest": "^3.2.4",
|
|
126
127
|
"yjs": "13.6.30"
|
|
127
128
|
}
|
|
128
|
-
}
|
|
129
|
+
}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import * as c from "yjs";
|
|
2
|
-
const u = typeof Buffer == "function";
|
|
3
|
-
typeof TextDecoder == "function" && new TextDecoder();
|
|
4
|
-
typeof TextEncoder == "function" && new TextEncoder();
|
|
5
|
-
const b = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", s = Array.prototype.slice.call(b), l = ((t) => {
|
|
6
|
-
let e = {};
|
|
7
|
-
return t.forEach((r, o) => e[r] = o), e;
|
|
8
|
-
})(s), g = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/, f = String.fromCharCode.bind(String), h = typeof Uint8Array.from == "function" ? Uint8Array.from.bind(Uint8Array) : (t) => new Uint8Array(Array.prototype.slice.call(t, 0)), S = (t) => t.replace(/=/g, "").replace(/[+\/]/g, (e) => e == "+" ? "-" : "_"), A = (t) => t.replace(/[^A-Za-z0-9\+\/]/g, ""), E = (t) => {
|
|
9
|
-
let e, r, o, n, a = "";
|
|
10
|
-
const p = t.length % 3;
|
|
11
|
-
for (let i = 0; i < t.length; ) {
|
|
12
|
-
if ((r = t.charCodeAt(i++)) > 255 || (o = t.charCodeAt(i++)) > 255 || (n = t.charCodeAt(i++)) > 255)
|
|
13
|
-
throw new TypeError("invalid character found");
|
|
14
|
-
e = r << 16 | o << 8 | n, a += s[e >> 18 & 63] + s[e >> 12 & 63] + s[e >> 6 & 63] + s[e & 63];
|
|
15
|
-
}
|
|
16
|
-
return p ? a.slice(0, p - 3) + "===".substring(p) : a;
|
|
17
|
-
}, U = typeof btoa == "function" ? (t) => btoa(t) : u ? (t) => Buffer.from(t, "binary").toString("base64") : E, d = u ? (t) => Buffer.from(t).toString("base64") : (t) => {
|
|
18
|
-
let r = [];
|
|
19
|
-
for (let o = 0, n = t.length; o < n; o += 4096)
|
|
20
|
-
r.push(f.apply(null, t.subarray(o, o + 4096)));
|
|
21
|
-
return U(r.join(""));
|
|
22
|
-
}, m = (t, e = !1) => e ? S(d(t)) : d(t), _ = (t) => {
|
|
23
|
-
if (t = t.replace(/\s+/g, ""), !g.test(t))
|
|
24
|
-
throw new TypeError("malformed base64.");
|
|
25
|
-
t += "==".slice(2 - (t.length & 3));
|
|
26
|
-
let e, r, o, n = [];
|
|
27
|
-
for (let a = 0; a < t.length; )
|
|
28
|
-
e = l[t.charAt(a++)] << 18 | l[t.charAt(a++)] << 12 | (r = l[t.charAt(a++)]) << 6 | (o = l[t.charAt(a++)]), r === 64 ? n.push(f(e >> 16 & 255)) : o === 64 ? n.push(f(e >> 16 & 255, e >> 8 & 255)) : n.push(f(e >> 16 & 255, e >> 8 & 255, e & 255));
|
|
29
|
-
return n.join("");
|
|
30
|
-
}, w = typeof atob == "function" ? (t) => atob(A(t)) : u ? (t) => Buffer.from(t, "base64").toString("binary") : _, D = u ? (t) => h(Buffer.from(t, "base64")) : (t) => h(w(t).split("").map((e) => e.charCodeAt(0))), T = (t) => D(C(t)), C = (t) => A(t.replace(/[-_]/g, (e) => e == "-" ? "+" : "/")), P = 8e3, x = (t) => t instanceof Error ? t : new Error(String(t)), v = async (t, e) => {
|
|
31
|
-
let r;
|
|
32
|
-
try {
|
|
33
|
-
return await Promise.race([
|
|
34
|
-
t,
|
|
35
|
-
new Promise((o, n) => {
|
|
36
|
-
r = setTimeout(
|
|
37
|
-
() => n(new Error("dSheet IndexedDB operation timed out")),
|
|
38
|
-
e
|
|
39
|
-
);
|
|
40
|
-
})
|
|
41
|
-
]);
|
|
42
|
-
} finally {
|
|
43
|
-
r && clearTimeout(r);
|
|
44
|
-
}
|
|
45
|
-
}, y = (t, e, r) => ({
|
|
46
|
-
dsheetId: t,
|
|
47
|
-
status: e,
|
|
48
|
-
encodedState: null,
|
|
49
|
-
stateVector: null,
|
|
50
|
-
...r ? { error: x(r) } : {}
|
|
51
|
-
}), B = (t, e) => {
|
|
52
|
-
const r = c.encodeStateAsUpdate(e);
|
|
53
|
-
return {
|
|
54
|
-
dsheetId: t,
|
|
55
|
-
status: r.length <= 2 ? "empty" : "available",
|
|
56
|
-
encodedState: m(r),
|
|
57
|
-
stateVector: m(c.encodeStateVector(e))
|
|
58
|
-
};
|
|
59
|
-
}, z = (t, e, r) => {
|
|
60
|
-
if (!r)
|
|
61
|
-
return y(
|
|
62
|
-
t,
|
|
63
|
-
"unavailable",
|
|
64
|
-
new Error("dSheet document is not ready")
|
|
65
|
-
);
|
|
66
|
-
let o;
|
|
67
|
-
const n = new c.Doc();
|
|
68
|
-
try {
|
|
69
|
-
o = T(e), c.applyUpdate(n, o);
|
|
70
|
-
} catch (a) {
|
|
71
|
-
return y(t, "corrupt", a);
|
|
72
|
-
} finally {
|
|
73
|
-
n.destroy();
|
|
74
|
-
}
|
|
75
|
-
try {
|
|
76
|
-
return c.applyUpdate(r, o, "dsheet-package-ingress"), B(t, r);
|
|
77
|
-
} catch (a) {
|
|
78
|
-
return y(t, "corrupt", a);
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
export {
|
|
82
|
-
P as D,
|
|
83
|
-
m as f,
|
|
84
|
-
z as m,
|
|
85
|
-
B as s,
|
|
86
|
-
T as t,
|
|
87
|
-
y as u,
|
|
88
|
-
v as w
|
|
89
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const objectToFile: (data: Record<string, unknown>, fileName: string) => File;
|