@fileverse-dev/dsheet 4.1.22 → 4.1.23-stabilise-package-3

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.
Files changed (106) hide show
  1. package/README.md +10 -0
  2. package/dist/editor/components/editor-workbook.d.ts +6 -0
  3. package/dist/editor/components/sidebar/editor-right-sidebar.d.ts +3 -1
  4. package/dist/editor/components/sidebar/sidebar-offsets.d.ts +12 -0
  5. package/dist/editor/components/sidebar/sidebar-offsets.test.d.ts +1 -0
  6. package/dist/editor/contexts/editor-context.d.ts +7 -0
  7. package/dist/editor/hooks/use-editor-data.d.ts +1 -0
  8. package/dist/editor/hooks/use-editor-sync.d.ts +5 -1
  9. package/dist/editor/types.d.ts +54 -1
  10. package/dist/editor/utils/activate-sheet-for-link.d.ts +3 -0
  11. package/dist/editor/utils/active-sheet-keeper.d.ts +21 -0
  12. package/dist/editor/utils/after-update-cell.d.ts +6 -0
  13. package/dist/editor/utils/after-update-cell.test.d.ts +1 -0
  14. package/dist/editor/utils/apply-comment-markers.d.ts +3 -1
  15. package/dist/editor/utils/apply-comment-markers.test.d.ts +1 -0
  16. package/dist/editor/utils/calc-chain-ydoc-update.test.d.ts +1 -0
  17. package/dist/editor/utils/content-change.d.ts +48 -0
  18. package/dist/editor/utils/content-change.test.d.ts +1 -0
  19. package/dist/editor/utils/content-fingerprint.d.ts +37 -0
  20. package/dist/editor/utils/content-fingerprint.test.d.ts +1 -0
  21. package/dist/editor/utils/editor-handle.d.ts +1 -1
  22. package/dist/editor/utils/format-gate.d.ts +27 -0
  23. package/dist/editor/utils/format-gate.test.d.ts +1 -0
  24. package/dist/editor/utils/legacy-on-change.d.ts +20 -0
  25. package/dist/editor/utils/legacy-on-change.test.d.ts +1 -0
  26. package/dist/editor/utils/navigate-to-sheet.d.ts +22 -0
  27. package/dist/editor/utils/patch-plain-celldata.d.ts +19 -0
  28. package/dist/editor/utils/patch-plain-celldata.test.d.ts +1 -0
  29. package/dist/editor/utils/rebuild-indexeddb-store.d.ts +19 -0
  30. package/dist/editor/utils/rebuild-indexeddb-store.failure.test.d.ts +1 -0
  31. package/dist/editor/utils/rebuild-indexeddb-store.test.d.ts +1 -0
  32. package/dist/editor/utils/remote-apply-guard.d.ts +48 -0
  33. package/dist/editor/utils/remote-apply-guard.test.d.ts +1 -0
  34. package/dist/editor/utils/sheet-ydoc-sync-utils.d.ts +13 -4
  35. package/dist/editor/utils/sheet-ydoc-sync-utils.test.d.ts +1 -0
  36. package/dist/editor/utils/structural-edit-formula-sync.test.d.ts +1 -0
  37. package/dist/editor/utils/update-ydoc.d.ts +9 -1
  38. package/dist/editor/utils/wait-for-sync.d.ts +35 -0
  39. package/dist/editor/utils/wait-for-sync.test.d.ts +1 -0
  40. package/dist/{es-S4GKlN-t.js → es-BlDQ6jCL.js} +1 -0
  41. package/dist/{executeStringFunction-CQ922vEp.js → executeStringFunction-D5BTPrXL.js} +10265 -9843
  42. package/dist/formula.js +1 -1
  43. package/dist/{hi-DMMTDTxZ.js → hi-CP0ta0Yk.js} +1 -0
  44. package/dist/{index-DhQTrCQd.js → index-BXNWi7s5.js} +22557 -21465
  45. package/dist/index.d.ts +1 -1
  46. package/dist/index.es.js +31 -31
  47. package/dist/persistence-utils-CSKBobX8.js +151 -0
  48. package/dist/persistence-utils.d.ts +2 -0
  49. package/dist/persistence.append.test.d.ts +1 -0
  50. package/dist/persistence.d.ts +13 -0
  51. package/dist/persistence.fingerprint.test.d.ts +1 -0
  52. package/dist/persistence.js +122 -74
  53. package/dist/sheet-engine/core/api/cell.d.ts +20 -1
  54. package/dist/sheet-engine/core/api/remote-apply.test.d.ts +1 -0
  55. package/dist/sheet-engine/core/api/sheet-flowdata-lifecycle.d.ts +1 -0
  56. package/dist/sheet-engine/core/api/sheet-flowdata-lifecycle.test.d.ts +1 -0
  57. package/dist/sheet-engine/core/index.d.ts +1 -1
  58. package/dist/sheet-engine/core/locale/en.d.ts +1 -0
  59. package/dist/sheet-engine/core/locale/es.d.ts +1 -0
  60. package/dist/sheet-engine/core/locale/hi.d.ts +1 -0
  61. package/dist/sheet-engine/core/locale/zh.d.ts +1 -0
  62. package/dist/sheet-engine/core/locale/zh_tw.d.ts +1 -0
  63. package/dist/sheet-engine/core/modules/b6-ydoc-writes.test.d.ts +1 -0
  64. package/dist/sheet-engine/core/modules/border.d.ts +9 -0
  65. package/dist/sheet-engine/core/modules/cell-shift.d.ts +11 -0
  66. package/dist/sheet-engine/core/modules/cell.commit-ydoc.test.d.ts +1 -0
  67. package/dist/sheet-engine/core/modules/dataVerification.d.ts +15 -0
  68. package/dist/sheet-engine/core/modules/engine-hot-spots.test.d.ts +1 -0
  69. package/dist/sheet-engine/core/modules/formula-async-eval.d.ts +5 -0
  70. package/dist/sheet-engine/core/modules/formula-narrowing.test.d.ts +1 -0
  71. package/dist/sheet-engine/core/modules/formula-snapshot-eval.d.ts +2 -0
  72. package/dist/sheet-engine/core/modules/formula-transitive-deps.d.ts +5 -1
  73. package/dist/sheet-engine/core/modules/formula-warmup.d.ts +37 -0
  74. package/dist/sheet-engine/core/modules/formula-warmup.test.d.ts +1 -0
  75. package/dist/sheet-engine/core/modules/formula.d.ts +57 -1
  76. package/dist/sheet-engine/core/modules/formula.dep-graph.test.d.ts +1 -0
  77. package/dist/sheet-engine/core/modules/formula.str-change.test.d.ts +1 -0
  78. package/dist/sheet-engine/core/modules/formula.wide-seed.test.d.ts +1 -0
  79. package/dist/sheet-engine/core/modules/history-calc-chain.d.ts +39 -0
  80. package/dist/sheet-engine/core/modules/history-calc-chain.test.d.ts +1 -0
  81. package/dist/sheet-engine/core/modules/history-grid-size.d.ts +16 -0
  82. package/dist/sheet-engine/core/modules/history-grid-size.test.d.ts +1 -0
  83. package/dist/sheet-engine/core/modules/index.d.ts +3 -2
  84. package/dist/sheet-engine/core/paste/paste-dep-graph.test.d.ts +1 -0
  85. package/dist/sheet-engine/core/paste-helpers/calculate-range-cell-size.d.ts +14 -0
  86. package/dist/sheet-engine/core/paste-helpers/calculate-range-cell-size.test.d.ts +1 -0
  87. package/dist/sheet-engine/core/settings.d.ts +15 -1
  88. package/dist/sheet-engine/core/utils/ydoc-celldata-changes.d.ts +29 -2
  89. package/dist/sheet-engine/react/components/ContextMenu/sheet-tab-menu-items.d.ts +15 -0
  90. package/dist/sheet-engine/react/components/Workbook/api.d.ts +4 -0
  91. package/dist/sheet-engine/react/components/Workbook/denomination-scan.d.ts +16 -0
  92. package/dist/sheet-engine/react/components/Workbook/denomination-scan.test.d.ts +1 -0
  93. package/dist/sheet-engine/react/components/Workbook/index.d.ts +2 -0
  94. package/dist/style.css +1 -1
  95. package/dist/sync-local/SyncManager.d.ts +2 -2
  96. package/dist/sync-local/SyncManager.remote-apply.test.d.ts +1 -0
  97. package/dist/sync-local/types/index.d.ts +2 -1
  98. package/dist/{template-data-list-BYOIK_Nd.js → template-data-list-apgmwRAT.js} +18 -10
  99. package/dist/{use-xlsx-import-impl-xphBNZu3.js → use-xlsx-import-impl-gsG9w9qV.js} +120 -119
  100. package/dist/{xlsx-defined-names-3g5n40BA.js → xlsx-defined-names-dZveijsB.js} +2 -2
  101. package/dist/{xlsx-export-impl-DXyQpmMi.js → xlsx-export-impl-B10lK_L2.js} +4 -4
  102. package/dist/{xlsx-hyperlink-inline-Cl9CbP5N.js → xlsx-hyperlink-inline-BFbPe75M.js} +2 -2
  103. package/dist/{zh-Bv4KIDiJ.js → zh-CmOCFd5t.js} +1 -0
  104. package/dist/{zh_tw-BdpsK45h.js → zh_tw-BqyRw1gX.js} +1 -0
  105. package/package.json +2 -2
  106. package/dist/persistence-utils-BXFajzvq.js +0 -98
@@ -1,5 +1,5 @@
1
- import { i as w } from "./executeStringFunction-CQ922vEp.js";
2
- import { J as x } from "./xlsx-hyperlink-inline-Cl9CbP5N.js";
1
+ import { i as w } from "./executeStringFunction-D5BTPrXL.js";
2
+ import { J as x } from "./xlsx-hyperlink-inline-BFbPe75M.js";
3
3
  function g(o) {
4
4
  return o.startsWith("_xlnm.");
5
5
  }
@@ -1,9 +1,9 @@
1
1
  import { utils as S, write as nt } from "xlsx-js-style";
2
2
  import { Workbook as pt } from "exceljs";
3
3
  import { toast as rt } from "@fileverse/ui";
4
- import { J as dt, c as X, g as ht, a as mt } from "./xlsx-hyperlink-inline-Cl9CbP5N.js";
5
- import { b as gt } from "./executeStringFunction-CQ922vEp.js";
6
- import { e as bt } from "./index-DhQTrCQd.js";
4
+ import { J as dt, c as X, g as ht, a as mt } from "./xlsx-hyperlink-inline-BFbPe75M.js";
5
+ import { b as gt } from "./executeStringFunction-D5BTPrXL.js";
6
+ import { e as bt } from "./index-BXNWi7s5.js";
7
7
  const xt = {
8
8
  1: "thin",
9
9
  2: "hair",
@@ -854,7 +854,7 @@ const Z = (t) => {
854
854
  O
855
855
  );
856
856
  });
857
- const { applyDefinedNamesToExcelWorkbook: ct } = await import("./xlsx-defined-names-3g5n40BA.js");
857
+ const { applyDefinedNamesToExcelWorkbook: ct } = await import("./xlsx-defined-names-dZveijsB.js");
858
858
  ct(
859
859
  B,
860
860
  (k = (C = (s = t.current).getWorkbookContext) == null ? void 0 : C.call(s)) == null ? void 0 : k.definedNames,
@@ -1,5 +1,5 @@
1
- import { g as Rt, c as yt } from "./executeStringFunction-CQ922vEp.js";
2
- import { c as wt } from "./index-DhQTrCQd.js";
1
+ import { g as Rt, c as yt } from "./executeStringFunction-D5BTPrXL.js";
2
+ import { c as wt } from "./index-BXNWi7s5.js";
3
3
  function jt(J, nt) {
4
4
  const g = J.getImages();
5
5
  if (!g.length) return [];
@@ -12261,6 +12261,7 @@ field 可以是与 database 第一行中某个列标题对应的文本标签,
12261
12261
  cancelText: "取消",
12262
12262
  chooseText: "确定颜色",
12263
12263
  focus: "聚焦",
12264
+ copyLink: "复制工作表链接",
12264
12265
  tipNameRepeat: "标签页的名称不能重复!请重新修改",
12265
12266
  noMoreSheet: "工作薄内至少含有一张可视工作表。若需删除选定的工作表,请先插入一张新工作表或显示一张隐藏的工作表。",
12266
12267
  confirmDelete: "是否删除",
@@ -12240,6 +12240,7 @@ field可以是與database第一行中某個列標題對應的文字標籤,也可
12240
12240
  cancelText: "取消",
12241
12241
  chooseText: "確定顏色",
12242
12242
  focus: "聚焦",
12243
+ copyLink: "複製工作表連結",
12243
12244
  tipNameRepeat: "籤頁的名稱不能重複!請重新修改",
12244
12245
  noMoreSheet: "工作薄內至少含有一張可視工作表。若需删除選定的工作表,請先插入一張新工作表或顯示一張隱藏的工作表。。",
12245
12246
  confirmDelete: "是否删除",
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.1.22",
5
+ "version": "4.1.23-stabilise-package-3",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/fileverse/fileverse-dsheets.git"
@@ -62,7 +62,7 @@
62
62
  ]
63
63
  },
64
64
  "dependencies": {
65
- "@fileverse-dev/dsheets-templates": "0.0.34",
65
+ "@fileverse-dev/dsheets-templates": "0.0.35",
66
66
  "@fileverse-dev/formulajs": "4.4.55",
67
67
  "@fileverse/crypto": "^0.0.22",
68
68
  "@fileverse/ens": "^0.0.4",
@@ -1,98 +0,0 @@
1
- import * as i from "yjs";
2
- const p = typeof Buffer == "function";
3
- typeof TextDecoder == "function" && new TextDecoder();
4
- typeof TextEncoder == "function" && new TextEncoder();
5
- const A = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", c = Array.prototype.slice.call(A), f = ((t) => {
6
- let e = {};
7
- return t.forEach((r, n) => e[r] = n), e;
8
- })(c), b = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/, u = String.fromCharCode.bind(String), d = typeof Uint8Array.from == "function" ? Uint8Array.from.bind(Uint8Array) : (t) => new Uint8Array(Array.prototype.slice.call(t, 0)), E = (t) => t.replace(/=/g, "").replace(/[+\/]/g, (e) => e == "+" ? "-" : "_"), g = (t) => t.replace(/[^A-Za-z0-9\+\/]/g, ""), S = (t) => {
9
- let e, r, n, o, a = "";
10
- const s = t.length % 3;
11
- for (let l = 0; l < t.length; ) {
12
- if ((r = t.charCodeAt(l++)) > 255 || (n = t.charCodeAt(l++)) > 255 || (o = t.charCodeAt(l++)) > 255)
13
- throw new TypeError("invalid character found");
14
- e = r << 16 | n << 8 | o, a += c[e >> 18 & 63] + c[e >> 12 & 63] + c[e >> 6 & 63] + c[e & 63];
15
- }
16
- return s ? a.slice(0, s - 3) + "===".substring(s) : a;
17
- }, U = typeof btoa == "function" ? (t) => btoa(t) : p ? (t) => Buffer.from(t, "binary").toString("base64") : S, y = p ? (t) => Buffer.from(t).toString("base64") : (t) => {
18
- let r = [];
19
- for (let n = 0, o = t.length; n < o; n += 4096)
20
- r.push(u.apply(null, t.subarray(n, n + 4096)));
21
- return U(r.join(""));
22
- }, h = (t, e = !1) => e ? E(y(t)) : y(t), _ = (t) => {
23
- if (t = t.replace(/\s+/g, ""), !b.test(t))
24
- throw new TypeError("malformed base64.");
25
- t += "==".slice(2 - (t.length & 3));
26
- let e, r, n, o = [];
27
- for (let a = 0; a < t.length; )
28
- e = f[t.charAt(a++)] << 18 | f[t.charAt(a++)] << 12 | (r = f[t.charAt(a++)]) << 6 | (n = f[t.charAt(a++)]), r === 64 ? o.push(u(e >> 16 & 255)) : n === 64 ? o.push(u(e >> 16 & 255, e >> 8 & 255)) : o.push(u(e >> 16 & 255, e >> 8 & 255, e & 255));
29
- return o.join("");
30
- }, w = typeof atob == "function" ? (t) => atob(g(t)) : p ? (t) => Buffer.from(t, "base64").toString("binary") : _, D = p ? (t) => d(Buffer.from(t, "base64")) : (t) => d(w(t).split("").map((e) => e.charCodeAt(0))), T = (t) => D(C(t)), C = (t) => g(t.replace(/[-_]/g, (e) => e == "-" ? "+" : "/")), v = 8e3, x = (t) => t instanceof Error ? t : new Error(String(t)), B = (t, e, r = "dsheet-package-ingress") => {
31
- const n = T(e), o = new i.Doc();
32
- try {
33
- i.applyUpdate(o, n);
34
- } finally {
35
- o.destroy();
36
- }
37
- let a = !1;
38
- const s = () => {
39
- a = !0;
40
- };
41
- t.on("update", s);
42
- try {
43
- return i.applyUpdate(t, n, r), a;
44
- } finally {
45
- t.off("update", s);
46
- }
47
- }, z = async (t, e) => {
48
- let r;
49
- try {
50
- return await Promise.race([
51
- t,
52
- new Promise((n, o) => {
53
- r = setTimeout(
54
- () => o(new Error("dSheet IndexedDB operation timed out")),
55
- e
56
- );
57
- })
58
- ]);
59
- } finally {
60
- r && clearTimeout(r);
61
- }
62
- }, m = (t, e, r) => ({
63
- dsheetId: t,
64
- status: e,
65
- encodedState: null,
66
- stateVector: null,
67
- ...r ? { error: x(r) } : {}
68
- }), P = (t, e) => {
69
- const r = i.encodeStateAsUpdate(e);
70
- return {
71
- dsheetId: t,
72
- status: r.length <= 2 ? "empty" : "available",
73
- encodedState: h(r),
74
- stateVector: h(i.encodeStateVector(e))
75
- };
76
- }, Z = (t, e, r) => {
77
- if (!r)
78
- return m(
79
- t,
80
- "unavailable",
81
- new Error("dSheet document is not ready")
82
- );
83
- try {
84
- return B(r, e, "dsheet-package-ingress"), P(t, r);
85
- } catch (n) {
86
- return m(t, "corrupt", n);
87
- }
88
- };
89
- export {
90
- v as D,
91
- Z as a,
92
- h as f,
93
- B as m,
94
- P as s,
95
- T as t,
96
- m as u,
97
- z as w
98
- };