@fileverse-dev/dsheet 4.1.5 → 4.1.6

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, d as o, f as t, S as r, g as l, h as n, j as d, T as c, k as i, l as S, n as m, o as h, p, q as C, t as u, u as F, v as E, w as g, x as R, z as x, A as f, B as A, D as I, E as L, F as w, G as y, H as T, I as v, J as M, K as b, L as k, M as D, N as z, O as V } from "./index-DgOrT4Bq.js";
2
- import { cy as K, cz as O, cA as P, cG as U, bs as X, e as _, f as j, l as B, a as H, di as q, dj as J, bb as N, dk as Y, dl as Z, dq as Q, dr as W, dt as $, I as ee, dI as ae, ef as se, b4 as oe } from "./executeStringFunction-adhsb5GH.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 c, k as i, l as S, n as m, o as h, p, q as C, t as u, u as F, v as E, w as g, x as R, z as x, A as f, B as A, D as I, E as L, F as w, G as y, H as T, I as v, J as M, K as b, L as k, M as D, N as z, O as V } from "./index-CtdRI4_k.js";
2
+ import { cy as K, cz as O, cA as P, cG as U, bs as X, e as _, f as j, l as B, a as H, di as q, dj as J, bb as N, dk as Y, dl as Z, dq as Q, dr as W, dt as $, I as ee, dI as ae, ef as se, b4 as oe } from "./executeStringFunction-DBNi4cwM.js";
3
3
  import { FLVURL as re } from "@fileverse-dev/formulajs";
4
4
  import { E as ne, S as de } from "./constants-8Ij49Lxv.js";
5
5
  export {
@@ -181,8 +181,8 @@ declare const _default: {
181
181
  };
182
182
  fontarray: string[];
183
183
  fontjson: {
184
- 'times new roman': number;
185
184
  arial: number;
185
+ 'times new roman': number;
186
186
  tahoma: number;
187
187
  verdana: number;
188
188
  };
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Trim two selection index arrays down to the bounding box of "meaningful" cells.
3
+ *
4
+ * `rowIndexArr`/`colIndexArr` are sheet row/column indices in selection order.
5
+ * `isMeaningful(r, c)` decides whether a cell contributes content (data, border, or
6
+ * conditional format). Returns the sub-arrays spanning the first→last meaningful
7
+ * position in each axis. If no cell is meaningful (e.g. select-all of an empty sheet),
8
+ * the selection collapses to a single top-left cell so we never serialise a whole grid
9
+ * of blank cells.
10
+ *
11
+ * This is what stops a select-all of a mostly-empty (or fully-empty) sheet from
12
+ * serialising thousands of blank `<td>`s. Dropped rows/cols hold no data and no CSS, so
13
+ * the trim is lossless — it matches Google Sheets' used-range clamp.
14
+ */
15
+ export declare function clampIndicesToUsedBounds(rowIndexArr: number[], colIndexArr: number[], isMeaningful: (r: number, c: number) => boolean): {
16
+ rows: number[];
17
+ cols: number[];
18
+ };
@@ -7,4 +7,13 @@ export declare function isFormatOnlyEmptyCell(cell: Cell | string | number | boo
7
7
  /** Pull only present format attrs from a format-only empty cell (cheap, no clone). */
8
8
  export declare function extractCellFormatAttrs(cell: Cell | string | number | boolean | null | undefined): Partial<Record<CellFormatAttr, unknown>> | null;
9
9
  export declare function shouldPersistCelldataCell(cell: Cell | string | number | boolean | null | undefined): boolean;
10
+ export declare const CSS_SAFE_CLIPBOARD_ATTRS: readonly ["bg", "ht", "tb", "ff", "vt", "fs", "fc", "bl", "it", "un", "cl"];
11
+ /**
12
+ * True when a cell's `data-fortune-cell` clipboard blob is redundant: the cell
13
+ * has no persistable content and its only format attrs are ones the emitted
14
+ * `<td>` CSS already carries, so cross-document paste reconstructs it losslessly
15
+ * from CSS alone. Cells with content, or with a non-CSS format channel
16
+ * (`ct` / `tr`), return false and keep their blob.
17
+ */
18
+ export declare function isClipboardMetadataRedundant(cell: Cell | string | number | boolean | null | undefined): boolean;
10
19
  export declare function celldataEntryEqual(existing: unknown, next: unknown): boolean;