@fileverse-dev/dsheet 4.1.23-stabilise-package-7 → 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-BvLQlh3C.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-B27MIrxE.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 {
@@ -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'] 之一
@@ -1,10 +1,28 @@
1
1
  import { Context } from '../context';
2
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
+ };
3
18
  /**
4
- * Indexes of the tabs that are not loaded (no dense `data`) and hold a formula
5
- * naming the edited tab. A structural edit rewrites those formulas (K6).
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).
6
24
  */
7
- export declare function unloadedTabsReadingSheet(ctx: Context, editedSheetId: string): number[];
25
+ export declare function unloadedTabsRewrittenBy(ctx: Context, op: StructuralEditOp): number[];
8
26
  /**
9
27
  * Load the tabs a structural edit will rewrite, before the edit and outside
10
28
  * the change that history records (PR 466 N1, second review). The rewrite is
@@ -15,4 +33,4 @@ export declare function unloadedTabsReadingSheet(ctx: Context, editedSheetId: st
15
33
  *
16
34
  * Returns the same state object when nothing needs loading.
17
35
  */
18
- export declare function loadTabsReadingSheet(ctx: Context, editedSheetId: string | undefined): Context;
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-BvLQlh3C.js";
3
- import { g as al } from "./executeStringFunction-B27MIrxE.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-CYEnkzt-.js";
7
- import { parseDefinedNamesFromXlsxBuffer as Nl, excelEntriesToDefinedNames as OZ } from "./xlsx-defined-names-TZ-vTErq.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-B27MIrxE.js";
2
- import { J as x } from "./xlsx-hyperlink-inline-CYEnkzt-.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-CYEnkzt-.js";
5
- import { b as gt } from "./executeStringFunction-B27MIrxE.js";
6
- import { e as bt } from "./index-BvLQlh3C.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-TZ-vTErq.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-B27MIrxE.js";
2
- import { c as wt } from "./index-BvLQlh3C.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-7",
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"