@fileverse-dev/dsheet 4.1.16 → 4.1.17-history-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/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C as s, d as o, f as t, S as r, g as l, h as n, j as d, T as S, k as c, l as i, n as m, o as h, p, q as C, t as u, u as E, v as F, w as g, x, z as R, A, B as f, D as I, E as L, F as T, G as w, H as y, I as v, J as D, K as M, L as b, M as k, N as z, O, P } from "./index-DV7neprH.js";
1
+ import { C as s, d as o, f as t, S as r, g as l, h as n, j as d, T as S, k as c, l as i, n as m, o as h, p, q as C, t as u, u as E, v as F, w as g, x, z as R, A, B as f, D as I, E as L, F as T, G as w, H as y, I as v, J as D, K as M, L as b, M as k, N as z, O, P } from "./index-D1F86l4X.js";
2
2
  import { cy as G, cz as K, cA as U, cG as X, bs as _, e as j, f as B, l as H, a as J, dj as N, dk as q, bb as Y, dl as Z, dm as Q, dr as W, ds as $, du as ee, I as ae, dJ as se, eg as oe, b4 as te } from "./executeStringFunction-B1_kGelH.js";
3
3
  import { FLVURL as le } from "@fileverse-dev/formulajs";
4
4
  import { E as de, S as Se } from "./constants-8Ij49Lxv.js";
@@ -0,0 +1,24 @@
1
+ import { IndexeddbPersistence } from 'y-indexeddb';
2
+
3
+ /**
4
+ * Below this many already-replayed rows the store is left alone. A normal
5
+ * open leaves two (the previous compacted row plus y-indexeddb's small attach
6
+ * row), so rewriting the full doc then would buy nothing.
7
+ */
8
+ export declare const DEFAULT_COMPACTION_MIN_ROWS = 3;
9
+ /**
10
+ * y-indexeddb appends a copy of the doc every time a provider attaches, and
11
+ * only trims after 500 rows. Older dSheet builds attached to a doc that
12
+ * already held the published content, so each open stored a FULL copy and
13
+ * every load replayed them all.
14
+ *
15
+ * During sync y-indexeddb applies every stored row to the doc and then sets
16
+ * `_dbref` to one past the last key. Every row below `_dbref` is therefore
17
+ * already in `persistence.doc`, so those rows are replaced with a single
18
+ * `encodeStateAsUpdate(doc)` without reading or merging them. Rows at or above
19
+ * `_dbref` (later edits, writes from another tab) are never touched.
20
+ *
21
+ * Runs in ONE readwrite transaction: any failure rolls back to the original
22
+ * rows. Returns the number of rows replaced (0 when nothing was compacted).
23
+ */
24
+ export declare const compactDsheetPersistence: (persistence: IndexeddbPersistence, minRows?: number) => Promise<number>;
@@ -1,10 +1,10 @@
1
1
  import * as BZ from "yjs";
2
- import { i as Yl, a as hl, s as eZ, r as ul, y as Il, b as pl, m as Rl } from "./index-DV7neprH.js";
2
+ import { i as Yl, a as hl, s as eZ, r as ul, y as Il, b as pl, m as Rl } from "./index-D1F86l4X.js";
3
3
  import { g as sl } from "./executeStringFunction-B1_kGelH.js";
4
4
  import { Workbook as al } from "exceljs";
5
5
  import Kl from "luckyexcel";
6
- import { e as Jl, b as xl, n as Ml } from "./xlsx-hyperlink-inline-Ds-KIXU2.js";
7
- import { parseDefinedNamesFromXlsxBuffer as Sl, excelEntriesToDefinedNames as OZ } from "./xlsx-defined-names-DpMQs9x_.js";
6
+ import { e as Jl, b as xl, n as Ml } from "./xlsx-hyperlink-inline-BwKPvD2f.js";
7
+ import { parseDefinedNamesFromXlsxBuffer as Sl, excelEntriesToDefinedNames as OZ } from "./xlsx-defined-names-CjllTwj9.js";
8
8
  import { toast as fZ } from "@fileverse/ui";
9
9
  var Zl = { exports: {} };
10
10
  (function(m) {
@@ -1,5 +1,5 @@
1
1
  import { i as w } from "./executeStringFunction-B1_kGelH.js";
2
- import { J as x } from "./xlsx-hyperlink-inline-Ds-KIXU2.js";
2
+ import { J as x } from "./xlsx-hyperlink-inline-BwKPvD2f.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-Ds-KIXU2.js";
4
+ import { J as dt, c as X, g as ht, a as mt } from "./xlsx-hyperlink-inline-BwKPvD2f.js";
5
5
  import { b as gt } from "./executeStringFunction-B1_kGelH.js";
6
- import { e as bt } from "./index-DV7neprH.js";
6
+ import { e as bt } from "./index-D1F86l4X.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-DpMQs9x_.js");
857
+ const { applyDefinedNamesToExcelWorkbook: ct } = await import("./xlsx-defined-names-CjllTwj9.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
1
  import { g as Rt, c as yt } from "./executeStringFunction-B1_kGelH.js";
2
- import { c as wt } from "./index-DV7neprH.js";
2
+ import { c as wt } from "./index-D1F86l4X.js";
3
3
  function jt(J, nt) {
4
4
  const g = J.getImages();
5
5
  if (!g.length) return [];
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.16",
5
+ "version": "4.1.17-history-1",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/fileverse/fileverse-dsheets.git"
@@ -119,6 +119,7 @@
119
119
  "eslint-plugin-prettier": "^5.2.1",
120
120
  "eslint-plugin-react-hooks": "^4.6.0",
121
121
  "eslint-plugin-react-refresh": "^0.4.4",
122
+ "fake-indexeddb": "^6.2.5",
122
123
  "husky": "^9.1.7",
123
124
  "lint-staged": "^15.2.10",
124
125
  "postcss": "^8.4.38",