@fileverse-dev/dsheet 4.1.23-stabilise-package-6 → 4.1.23-stabilise-package-8

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,5 +1,5 @@
1
- import { C as s, f as o, g as t, S as r, h as l, j as n, k as d, T as S, l as c, n as i, o as h, p as m, q as p, t as C, u, v as F, w as E, x, z as g, A as R, B as f, D as A, E as I, F as L, G as w, H as y, I as T, J as v, K as D, L as M, M as b, N as k, O as K, P as O, Q as P } from "./index-CYTfmipC.js";
2
- import { cI as z, cJ as J, cK as U, cQ as X, by as _, e as B, f as G, l as H, a as j, dv as q, dw as N, bh as Q, dx as Y, dy as Z, dC as W, dD as $, dF as ee, J as ae, dS as se, eq as oe, ba as te } from "./executeStringFunction-7PJajNOY.js";
1
+ import { C as s, f as o, g as t, S as r, h as l, j as n, k as d, T as S, l as c, n as i, o as h, p as m, q as p, t as C, u, v as F, w as E, x, z as g, A as R, B as f, D as A, E as I, F as L, G as w, H as y, I as T, J as v, K as D, L as M, M as b, N as k, O as K, P as O, Q as P } from "./index-Dbl7Dh2_.js";
2
+ import { cI as z, cJ as J, cK as U, cQ as X, by as _, e as B, f as G, l as H, a as j, dv as q, dw as N, bh as Q, dx as Y, dy as Z, dC as W, dD as $, dF as ee, J as ae, dS as se, eq as oe, ba as te } from "./executeStringFunction-CN6ZZqZM.js";
3
3
  import { FLVURL as le } from "@fileverse-dev/formulajs";
4
4
  import { E as de, S as Se } from "./constants-8Ij49Lxv.js";
5
5
  export {
@@ -146,6 +146,14 @@ export declare function resetFormulaDependencyIndexes(ctx: Context): void;
146
146
  * has recorded its dependencies, unless the graph was invalidated meanwhile.
147
147
  */
148
148
  export declare function finishFullFormulaPass(ctx: Context, epoch: number | null | undefined): void;
149
+ /**
150
+ * A tab that is loaded after the graph was completed keeps the flag on (K60,
151
+ * PR 466): loading builds the grid from `celldata` and does not change the
152
+ * tab's structure, and the text index already treated a whole-row or column
153
+ * reference to a tab with no grid as wide. Without a recorded size the first
154
+ * commit on the tab would take the full pass and clear the flag.
155
+ */
156
+ export declare function recordLoadedSheetSize(ctx: Context, sheetId: string | undefined, data: CellMatrix | null | undefined): void;
149
157
  /**
150
158
  * INDIRECT and OFFSET would resolve references at run time, which the graph
151
159
  * cannot see. Today both evaluate to an error (formulajs implements neither),
@@ -1,5 +1,13 @@
1
1
  import { Context } from '../context';
2
+ import { Sheet } from '../types';
2
3
 
4
+ /**
5
+ * True when the edit would change a cross-tab formula in the tab's celldata.
6
+ * It is the test the rewrite below applies, so the tabs loaded before an edit
7
+ * are the ones it would rewrite (PR 466 N1: `=C1-A!B5` names tab A, but the
8
+ * sheet-name regex reads `C1-A`).
9
+ */
10
+ export declare const celldataFormulaWouldChange: (sheet: Sheet, mode: "add" | "del", rc: "row" | "col", orient: "lefttop" | "rightbottom" | null, stindex: number, step: number, editedTab: string) => boolean;
3
11
  /**
4
12
  * 增加行列
5
13
  * @param {string} type 行或列 ['row', 'column'] 之一
@@ -0,0 +1,36 @@
1
+ import { Context } from '../context';
2
+
3
+ export type StructuralEditOp = {
4
+ insertRowColOp?: {
5
+ type: 'row' | 'column';
6
+ id: string;
7
+ index: number;
8
+ count: number;
9
+ direction: 'lefttop' | 'rightbottom';
10
+ };
11
+ deleteRowColOp?: {
12
+ type: 'row' | 'column';
13
+ id: string;
14
+ start: number;
15
+ end: number;
16
+ };
17
+ };
18
+ /**
19
+ * Indexes of the tabs that are not loaded (no dense `data`) and that the edit
20
+ * rewrites (K6). A tab counts when the rewrite itself would change one of its
21
+ * formulas, or when one names the edited tab. The first is the test the
22
+ * rewrite uses, so the two cannot disagree: the sheet-name regex reads
23
+ * `=C1-A!B5` as a tab called `C1-A` and finds no tab A (PR 466 N1).
24
+ */
25
+ export declare function unloadedTabsRewrittenBy(ctx: Context, op: StructuralEditOp): number[];
26
+ /**
27
+ * Load the tabs a structural edit will rewrite, before the edit and outside
28
+ * the change that history records (PR 466 N1, second review). The rewrite is
29
+ * then recorded as cell patches on `data`, which undo and redo replay for just
30
+ * the cells it touched: a peer's edits to the same tab are left alone, and the
31
+ * tab can be loaded or unloaded again at undo time (`handleUndo` loads it for
32
+ * `data` patches).
33
+ *
34
+ * Returns the same state object when nothing needs loading.
35
+ */
36
+ export declare function loadTabsReadingSheet(ctx: Context, op: StructuralEditOp): Context;
@@ -1,10 +1,10 @@
1
1
  import * as BZ from "yjs";
2
- import { i as Yl, a as hl, b as ul, s as eZ, r as Il, y as pl, d as Rl, m as sl } from "./index-CYTfmipC.js";
3
- import { g as al } from "./executeStringFunction-7PJajNOY.js";
2
+ import { i as Yl, a as hl, b as ul, s as eZ, r as Il, y as pl, d as Rl, m as sl } from "./index-Dbl7Dh2_.js";
3
+ import { g as al } from "./executeStringFunction-CN6ZZqZM.js";
4
4
  import { Workbook as Kl } from "exceljs";
5
5
  import Jl from "luckyexcel";
6
- import { e as xl, b as Ml, n as Sl } from "./xlsx-hyperlink-inline-C88tUQTK.js";
7
- import { parseDefinedNamesFromXlsxBuffer as Nl, excelEntriesToDefinedNames as OZ } from "./xlsx-defined-names-k0uTgLHs.js";
6
+ import { e as xl, b as Ml, n as Sl } from "./xlsx-hyperlink-inline-DjtQMKIL.js";
7
+ import { parseDefinedNamesFromXlsxBuffer as Nl, excelEntriesToDefinedNames as OZ } from "./xlsx-defined-names-C6c8LJn5.js";
8
8
  import { toast as fZ } from "@fileverse/ui";
9
9
  var Zl = { exports: {} };
10
10
  (function(m) {
@@ -1,5 +1,5 @@
1
- import { i as w } from "./executeStringFunction-7PJajNOY.js";
2
- import { J as x } from "./xlsx-hyperlink-inline-C88tUQTK.js";
1
+ import { i as w } from "./executeStringFunction-CN6ZZqZM.js";
2
+ import { J as x } from "./xlsx-hyperlink-inline-DjtQMKIL.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-C88tUQTK.js";
5
- import { b as gt } from "./executeStringFunction-7PJajNOY.js";
6
- import { e as bt } from "./index-CYTfmipC.js";
4
+ import { J as dt, c as X, g as ht, a as mt } from "./xlsx-hyperlink-inline-DjtQMKIL.js";
5
+ import { b as gt } from "./executeStringFunction-CN6ZZqZM.js";
6
+ import { e as bt } from "./index-Dbl7Dh2_.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-k0uTgLHs.js");
857
+ const { applyDefinedNamesToExcelWorkbook: ct } = await import("./xlsx-defined-names-C6c8LJn5.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-7PJajNOY.js";
2
- import { c as wt } from "./index-CYTfmipC.js";
1
+ import { g as Rt, c as yt } from "./executeStringFunction-CN6ZZqZM.js";
2
+ import { c as wt } from "./index-Dbl7Dh2_.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.23-stabilise-package-6",
5
+ "version": "4.1.23-stabilise-package-8",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/fileverse/fileverse-dsheets.git"