@fileverse-dev/dsheet 2.1.2-dropIn-mri-4 → 2.1.2-dropIn-mri-5

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, a as t, b as o, S as r, d as l, i as n, T as d, e as i, f as S, g as c, h, j as m, k as C, l as u, n as p, o as E, p as F, q as g, r as x, s as R, t as f, u as A, v as I, w as L, x as w, z as T, A as b, B as v, D as k, E as D, F as M, G as V, H as X, I as z, J as P, K as U } from "./index-B8AinzRL.js";
2
- import { bV as y, bW as B, bX as G, ar as H, bh as O, e as j, f as q, h as J, a as K, ck as N, aq as W, cs as Y } from "./executeStringFunction-CdefKC3n.js";
1
+ import { C as s, a as t, b as o, S as r, d as l, i as n, T as d, e as i, f as S, g as c, h, j as m, k as C, l as u, n as p, o as E, p as F, q as g, r as x, s as R, t as f, u as A, v as I, w as L, x as w, z as T, A as b, B as v, D as k, E as D, F as M, G as V, H as X, I as z, J as P, K as U } from "./index-DfYO5xfL.js";
2
+ import { bV as y, bW as B, bX as G, ar as H, bh as O, e as j, f as q, h as J, a as K, ck as N, aq as W, cs as Y } from "./executeStringFunction-BU-Q3JXP.js";
3
3
  import { FLVURL as Q } from "@fileverse-dev/formulajs";
4
4
  import { E as ee, S as ae } from "./constants-yStXQJiK.js";
5
5
  export {
@@ -1,13 +1,16 @@
1
1
  /** Minimum formula count before deferring eval to chunked async (Step 1). */
2
2
  export declare const FORMULA_ASYNC_EVAL_THRESHOLD = 15;
3
3
  /** Formulas evaluated per animation frame during async recalc. */
4
- export declare const FORMULA_ASYNC_CHUNK_SIZE = 20;
4
+ export declare const FORMULA_ASYNC_CHUNK_SIZE = 50;
5
5
  /** Use a Web Worker when the async job has at least this many formulas. */
6
6
  export declare const FORMULA_WORKER_THRESHOLD = 100;
7
7
  /** Formulas evaluated per worker message (larger — runs off main thread). */
8
- export declare const FORMULA_WORKER_CHUNK_SIZE = 150;
8
+ export declare const FORMULA_WORKER_CHUNK_SIZE = 300;
9
9
  /** Maximum time to wait for a worker chunk before falling back to the real engine. */
10
10
  export declare const FORMULA_WORKER_CHUNK_TIMEOUT_MS = 30000;
11
+ /** localStorage key for the optional formula execution debug panel. */
12
+ export declare const FORMULA_EXEC_DEBUG_STORAGE_KEY = "fortune-formula-execution-debug";
13
+ export declare function isFormulaExecutionDebugEnabled(): boolean;
11
14
  export type FormulaEvalDebugMode = 'worker' | 'main-thread' | 'fallback';
12
15
  export type FormulaEvalDebug = {
13
16
  mode: FormulaEvalDebugMode;
@@ -33,6 +36,7 @@ export type FormulaAsyncEvalJob = {
33
36
  calcChainKeys: string[];
34
37
  impactedByCircular: string[];
35
38
  cycleNodes: string[];
39
+ workerSnapshotKey: string;
36
40
  nextIndex: number;
37
41
  total: number;
38
42
  debug?: FormulaEvalDebug;
@@ -3,12 +3,14 @@ import { SnapshotEvalInput, SnapshotEvalOutput, SnapshotFormulaCell, evalFormula
3
3
  import { FORMULA_WORKER_CHUNK_SIZE } from './formula-async-eval';
4
4
 
5
5
  export declare function buildSnapshotEvalInput(ctx: Context, formulas: SnapshotFormulaCell[]): SnapshotEvalInput;
6
+ export declare function buildWorkerEvalInput(ctx: Context, formulas: SnapshotFormulaCell[]): Omit<SnapshotEvalInput, 'sheets'>;
7
+ export declare function initFormulaWorkerSnapshot(ctx: Context, snapshotKey: string): boolean;
6
8
  /**
7
9
  * Evaluate a formula chunk off the critical UI path when possible.
8
10
  * Uses an inline Web Worker. Callers should fall back to the real engine on
9
11
  * rejection so the worker cannot silently leave a recalculation job hanging.
10
12
  */
11
- export declare function evalFormulasInBackground(input: SnapshotEvalInput): Promise<SnapshotEvalOutput>;
13
+ export declare function evalFormulasInBackground(snapshotKey: string, input: Omit<SnapshotEvalInput, 'sheets'>): Promise<SnapshotEvalOutput>;
12
14
  /** @deprecated Use evalFormulasInBackground */
13
15
  export declare const evalFormulasInWorker: typeof evalFormulasInBackground;
14
16
  export { FORMULA_WORKER_CHUNK_SIZE, evalFormulasInSnapshot };
@@ -1,10 +1,17 @@
1
- import { SnapshotEvalInput, SnapshotEvalOutput } from './formula-snapshot-eval';
1
+ import { SnapshotEvalInput, SnapshotEvalOutput, SnapshotSheet } from './formula-snapshot-eval';
2
2
 
3
+ export type WorkerInitSnapshotRequest = {
4
+ type: 'init-snapshot';
5
+ snapshotKey: string;
6
+ sheets: SnapshotSheet[];
7
+ };
3
8
  export type WorkerEvalRequest = {
4
9
  type: 'eval';
5
10
  requestId: number;
6
- input: SnapshotEvalInput;
11
+ snapshotKey: string;
12
+ input: Omit<SnapshotEvalInput, 'sheets'>;
7
13
  };
14
+ export type WorkerRequest = WorkerInitSnapshotRequest | WorkerEvalRequest;
8
15
  export type WorkerEvalResponse = {
9
16
  type: 'eval-result';
10
17
  requestId: number;
@@ -1,6 +1,6 @@
1
- import { g as Ue } from "./executeStringFunction-CdefKC3n.js";
1
+ import { g as Ue } from "./executeStringFunction-BU-Q3JXP.js";
2
2
  import * as qe from "yjs";
3
- import { m as Xe, y as Ze } from "./index-B8AinzRL.js";
3
+ import { m as Xe, y as Ze } from "./index-DfYO5xfL.js";
4
4
  import { n as Je } from "./xlsx-hyperlink-inline-DzewAypN.js";
5
5
  import { toast as Be } from "@fileverse/ui";
6
6
  var We = { exports: {} };
@@ -2,8 +2,8 @@ import { utils as dt, write as Nt } from "xlsx-js-style";
2
2
  import { Workbook as Pt } from "exceljs";
3
3
  import { toast as Ut } from "@fileverse/ui";
4
4
  import { addFortuneImagesToWorksheet as Lt } from "./xlsx-image-utils-Cvg0qxRA.js";
5
- import { g as jt, c as xt } from "./executeStringFunction-CdefKC3n.js";
6
- import { c as Ct } from "./index-B8AinzRL.js";
5
+ import { g as jt, c as xt } from "./executeStringFunction-BU-Q3JXP.js";
6
+ import { c as Ct } from "./index-DfYO5xfL.js";
7
7
  import { c as zt, g as Wt } from "./xlsx-hyperlink-inline-DzewAypN.js";
8
8
  const Mt = {
9
9
  1: "thin",
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@fileverse-dev/dsheet",
3
3
  "private": false,
4
4
  "description": "DSheet",
5
- "version": "2.1.2-dropIn-mri-4",
5
+ "version": "2.1.2-dropIn-mri-5",
6
6
  "main": "dist/index.es.js",
7
7
  "module": "dist/index.es.js",
8
8
  "exports": {