@fileverse-dev/dsheet 4.1.27-stabilise-package-2 → 4.1.28

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.
Files changed (134) hide show
  1. package/README.md +0 -10
  2. package/dist/editor/components/skeleton-loader.d.ts +1 -2
  3. package/dist/editor/contexts/editor-context.d.ts +0 -10
  4. package/dist/editor/hooks/use-celldata-compaction.d.ts +2 -44
  5. package/dist/editor/hooks/use-editor-data.d.ts +0 -1
  6. package/dist/editor/hooks/use-editor-sync.d.ts +1 -5
  7. package/dist/editor/types.d.ts +1 -47
  8. package/dist/editor/utils/after-update-cell.d.ts +0 -6
  9. package/dist/editor/utils/apply-comment-markers.d.ts +1 -3
  10. package/dist/editor/utils/editor-handle.d.ts +1 -1
  11. package/dist/editor/utils/remote-apply-guard.d.ts +0 -45
  12. package/dist/editor/utils/sheet-ydoc-sync-utils.d.ts +4 -13
  13. package/dist/editor/utils/update-ydoc.d.ts +1 -9
  14. package/dist/editor/utils/xlsx-export-impl.d.ts +0 -1
  15. package/dist/editor/utils/xlsx-export.d.ts +0 -1
  16. package/dist/{executeStringFunction-D1SB3Bwm.js → executeStringFunction-KWYZ3QNg.js} +13304 -14042
  17. package/dist/formula.js +1 -1
  18. package/dist/{index-DuRBkNo8.js → index-DiA_gqm4.js} +22384 -23650
  19. package/dist/index.d.ts +2 -3
  20. package/dist/index.es.js +55 -58
  21. package/dist/persistence-utils-BXFajzvq.js +98 -0
  22. package/dist/persistence-utils.d.ts +0 -2
  23. package/dist/persistence.d.ts +0 -13
  24. package/dist/persistence.js +74 -122
  25. package/dist/sheet-engine/core/api/cell.d.ts +1 -25
  26. package/dist/sheet-engine/core/api/sheet-flowdata-lifecycle.d.ts +0 -1
  27. package/dist/sheet-engine/core/index.d.ts +1 -1
  28. package/dist/sheet-engine/core/modules/border.d.ts +0 -9
  29. package/dist/sheet-engine/core/modules/dataVerification.d.ts +0 -15
  30. package/dist/sheet-engine/core/modules/formula-async-eval.d.ts +0 -5
  31. package/dist/sheet-engine/core/modules/formula-snapshot-eval.d.ts +0 -2
  32. package/dist/sheet-engine/core/modules/formula-transitive-deps.d.ts +1 -26
  33. package/dist/sheet-engine/core/modules/formula.d.ts +1 -87
  34. package/dist/sheet-engine/core/modules/index.d.ts +2 -3
  35. package/dist/sheet-engine/core/modules/rowcol.d.ts +0 -8
  36. package/dist/sheet-engine/core/paste-helpers/calculate-range-cell-size.d.ts +0 -14
  37. package/dist/sheet-engine/core/settings.d.ts +1 -11
  38. package/dist/sheet-engine/core/utils/filter-selection.d.ts +3 -0
  39. package/dist/sheet-engine/core/utils/ydoc-celldata-changes.d.ts +2 -29
  40. package/dist/sheet-engine/react/components/ContextMenu/FilterMenu.d.ts +2 -2
  41. package/dist/sheet-engine/react/components/ContextMenu/SheetTab.d.ts +2 -2
  42. package/dist/sheet-engine/react/components/ContextMenu/index.d.ts +2 -2
  43. package/dist/sheet-engine/react/components/SVGDefines.d.ts +2 -2
  44. package/dist/sheet-engine/react/components/SheetTab/index.d.ts +2 -2
  45. package/dist/sheet-engine/react/components/Toolbar/index.d.ts +2 -2
  46. package/dist/sheet-engine/react/components/Workbook/api.d.ts +0 -4
  47. package/dist/sheet-engine/react/components/Workbook/index.d.ts +0 -2
  48. package/dist/sheet-engine/react/context/index.d.ts +0 -15
  49. package/dist/style.css +1 -1
  50. package/dist/sync-local/SyncManager.d.ts +2 -2
  51. package/dist/sync-local/socketClient.d.ts +0 -2
  52. package/dist/sync-local/types/index.d.ts +1 -5
  53. package/dist/{use-xlsx-import-impl-DflJ_tOs.js → use-xlsx-import-impl-DVsVdpLm.js} +119 -120
  54. package/dist/{xlsx-defined-names-Bz4lZarM.js → xlsx-defined-names-BqMo-DgB.js} +2 -2
  55. package/dist/xlsx-export-impl-D2KWcmcg.js +880 -0
  56. package/dist/{xlsx-hyperlink-inline-DPSsT1W8.js → xlsx-hyperlink-inline-D15rKG4m.js} +2 -2
  57. package/package.json +1 -1
  58. package/dist/editor/utils/active-sheet-keeper.test.d.ts +0 -1
  59. package/dist/editor/utils/after-update-cell.test.d.ts +0 -1
  60. package/dist/editor/utils/apply-comment-markers.test.d.ts +0 -1
  61. package/dist/editor/utils/calc-chain-ydoc-update.test.d.ts +0 -1
  62. package/dist/editor/utils/content-change.d.ts +0 -48
  63. package/dist/editor/utils/content-change.test.d.ts +0 -1
  64. package/dist/editor/utils/content-fingerprint.d.ts +0 -37
  65. package/dist/editor/utils/content-fingerprint.test.d.ts +0 -1
  66. package/dist/editor/utils/format-gate.d.ts +0 -27
  67. package/dist/editor/utils/format-gate.test.d.ts +0 -1
  68. package/dist/editor/utils/legacy-on-change.d.ts +0 -20
  69. package/dist/editor/utils/legacy-on-change.test.d.ts +0 -1
  70. package/dist/editor/utils/patch-plain-celldata.d.ts +0 -19
  71. package/dist/editor/utils/patch-plain-celldata.test.d.ts +0 -1
  72. package/dist/editor/utils/rebuild-indexeddb-store.d.ts +0 -19
  73. package/dist/editor/utils/rebuild-indexeddb-store.failure.test.d.ts +0 -1
  74. package/dist/editor/utils/rebuild-indexeddb-store.test.d.ts +0 -1
  75. package/dist/editor/utils/remote-apply-guard.test.d.ts +0 -1
  76. package/dist/editor/utils/sheet-ydoc-sync-utils.test.d.ts +0 -1
  77. package/dist/editor/utils/structural-edit-formula-sync.test.d.ts +0 -1
  78. package/dist/editor/utils/structural-edit-other-tabs.test.d.ts +0 -1
  79. package/dist/editor/utils/wait-for-sync.d.ts +0 -43
  80. package/dist/editor/utils/wait-for-sync.test.d.ts +0 -1
  81. package/dist/persistence-utils-CSKBobX8.js +0 -151
  82. package/dist/persistence.append.test.d.ts +0 -1
  83. package/dist/persistence.fingerprint.test.d.ts +0 -1
  84. package/dist/sheet-engine/core/api/remote-apply.test.d.ts +0 -1
  85. package/dist/sheet-engine/core/api/sheet-flowdata-lifecycle.test.d.ts +0 -1
  86. package/dist/sheet-engine/core/modules/b6-ydoc-writes.test.d.ts +0 -1
  87. package/dist/sheet-engine/core/modules/cell-shift-dep-graph.test.d.ts +0 -1
  88. package/dist/sheet-engine/core/modules/cell-shift.d.ts +0 -11
  89. package/dist/sheet-engine/core/modules/cell.commit-ydoc.test.d.ts +0 -1
  90. package/dist/sheet-engine/core/modules/engine-hot-spots.test.d.ts +0 -1
  91. package/dist/sheet-engine/core/modules/formula-dep-text.d.ts +0 -23
  92. package/dist/sheet-engine/core/modules/formula-dep-text.test.d.ts +0 -1
  93. package/dist/sheet-engine/core/modules/formula-edge-update.d.ts +0 -13
  94. package/dist/sheet-engine/core/modules/formula-narrowing.test.d.ts +0 -1
  95. package/dist/sheet-engine/core/modules/formula-tab-load.test.d.ts +0 -1
  96. package/dist/sheet-engine/core/modules/formula-warmup.d.ts +0 -33
  97. package/dist/sheet-engine/core/modules/formula-warmup.test.d.ts +0 -1
  98. package/dist/sheet-engine/core/modules/formula-wide-grid-growth.test.d.ts +0 -1
  99. package/dist/sheet-engine/core/modules/formula.dep-graph.test.d.ts +0 -1
  100. package/dist/sheet-engine/core/modules/formula.str-change.test.d.ts +0 -1
  101. package/dist/sheet-engine/core/modules/formula.wide-seed.test.d.ts +0 -1
  102. package/dist/sheet-engine/core/modules/history-calc-chain.d.ts +0 -39
  103. package/dist/sheet-engine/core/modules/history-calc-chain.test.d.ts +0 -1
  104. package/dist/sheet-engine/core/modules/history-celldata.d.ts +0 -25
  105. package/dist/sheet-engine/core/modules/history-grid-size.d.ts +0 -16
  106. package/dist/sheet-engine/core/modules/history-grid-size.test.d.ts +0 -1
  107. package/dist/sheet-engine/core/modules/rowcol-dep-graph.test.d.ts +0 -1
  108. package/dist/sheet-engine/core/modules/rowcol-refused-edit.test.d.ts +0 -1
  109. package/dist/sheet-engine/core/modules/rowcol-unloaded-history.test.d.ts +0 -1
  110. package/dist/sheet-engine/core/modules/structural-edit-prep.d.ts +0 -36
  111. package/dist/sheet-engine/core/modules/structural-edit-prep.test.d.ts +0 -1
  112. package/dist/sheet-engine/core/paste/paste-dep-graph.test.d.ts +0 -1
  113. package/dist/sheet-engine/core/paste-helpers/calculate-range-cell-size.test.d.ts +0 -1
  114. package/dist/sheet-engine/react/components/NotationBoxes/shown-comments.d.ts +0 -20
  115. package/dist/sheet-engine/react/components/NotationBoxes/shown-comments.test.d.ts +0 -1
  116. package/dist/sheet-engine/react/components/SheetOverlay/editing-as-formula.d.ts +0 -7
  117. package/dist/sheet-engine/react/components/SheetOverlay/editing-as-formula.test.d.ts +0 -1
  118. package/dist/sheet-engine/react/components/SheetOverlay/hover-tracker.d.ts +0 -44
  119. package/dist/sheet-engine/react/components/SheetOverlay/hover-tracker.test.d.ts +0 -1
  120. package/dist/sheet-engine/react/components/Toolbar/FunctionList/group-functions.d.ts +0 -9
  121. package/dist/sheet-engine/react/components/Toolbar/FunctionList/group-functions.test.d.ts +0 -1
  122. package/dist/sheet-engine/react/components/Workbook/denomination-scan.d.ts +0 -16
  123. package/dist/sheet-engine/react/components/Workbook/denomination-scan.test.d.ts +0 -1
  124. package/dist/sheet-engine/react/components/Workbook/stable-handle.d.ts +0 -8
  125. package/dist/sheet-engine/react/components/Workbook/stable-handle.test.d.ts +0 -1
  126. package/dist/sheet-engine/react/context/use-workbook-store.d.ts +0 -30
  127. package/dist/sheet-engine/react/context/workbook-store.d.ts +0 -30
  128. package/dist/sheet-engine/react/context/workbook-store.test.d.ts +0 -1
  129. package/dist/sync-local/SyncManager.remote-apply.test.d.ts +0 -1
  130. package/dist/sync-local/SyncManager.test.d.ts +0 -1
  131. package/dist/sync-local/socketClient.test.d.ts +0 -1
  132. package/dist/xlsx-export-impl-CxEnpZJO.js +0 -903
  133. /package/dist/editor/{hooks/use-celldata-compaction.test.d.ts → utils/filter-select-ydoc-update.test.d.ts} +0 -0
  134. /package/dist/{editor/hooks/use-editor-sync.test.d.ts → sheet-engine/core/modules/filter.test.d.ts} +0 -0
@@ -37,11 +37,6 @@ export type FormulaAsyncEvalJob = {
37
37
  impactedByCircular: string[];
38
38
  cycleNodes: string[];
39
39
  workerSnapshotKey: string;
40
- /**
41
- * Set on a forced full pass: the dependency-graph epoch it started at. The
42
- * last chunk marks the graph complete if the epoch is unchanged (C8).
43
- */
44
- fullPassEpoch?: number | null;
45
40
  nextIndex: number;
46
41
  total: number;
47
42
  debug?: FormulaEvalDebug;
@@ -20,8 +20,6 @@ export type SnapshotFormulaResult = {
20
20
  spe?: unknown;
21
21
  deps: string[];
22
22
  isError: boolean;
23
- /** Read a sheet name that doesn't exist; the main thread keeps it on every commit's run list (C8). */
24
- unresolvedSheetRef?: boolean;
25
23
  };
26
24
  export type SnapshotEvalInput = {
27
25
  sheets: SnapshotSheet[];
@@ -1,32 +1,7 @@
1
1
  /** Cell / formula key format used in depsByCell and revDepsByCell. */
2
2
  export declare function toFormulaDepCellKey(sheetId: string, r: number, c: number): string;
3
- /** A range a wide formula reads (more cells than get individual edges). */
4
- export type WideRange = {
5
- sheetId: string;
6
- startRow: number;
7
- endRow: number;
8
- startCol: number;
9
- endCol: number;
10
- };
11
- /**
12
- * Wide formulas (ranges over MAX_RANGE_DEPS cells record no cell edges).
13
- * `ranges` holds the ranges of those whose ranges could be read; a key in
14
- * `keys` without an entry in `ranges` can't be bounded, so it joins every walk.
15
- */
16
- export type WideFormulaIndex = {
17
- keys: Iterable<string>;
18
- ranges: Map<string, WideRange[]>;
19
- };
20
3
  /**
21
4
  * Walk revDepsByCell from a changed cell to collect every formula cell that
22
5
  * must recalculate (direct + transitive dependents).
23
- *
24
- * `extraFormulaSeeds` are formulas that run on every commit whatever the
25
- * graph says (named ranges covering the edited cell). They join the same
26
- * walk, so formulas that read their results are reached too.
27
- *
28
- * A wide formula joins the walk only when one of its ranges holds the edited
29
- * cell or a formula cell the walk reaches; one whose ranges can't be read
30
- * joins every walk. It then seeds the walk like any other formula.
31
6
  */
32
- export declare function collectTransitiveFormulaDependents(originCellKey: string, revDepsByCell: Map<string, Set<string>>, extraFormulaSeeds?: Iterable<string>, wide?: WideFormulaIndex): Set<string>;
7
+ export declare function collectTransitiveFormulaDependents(originCellKey: string, revDepsByCell: Map<string, Set<string>>): Set<string>;
@@ -3,7 +3,6 @@ import { Context } from '../context';
3
3
  import { FormulaArrowMode, FormulaArrowOverride } from './formula-arrow-mode';
4
4
  import { FormulaAsyncEvalJob } from './formula-async-eval';
5
5
  import { RangePassCacheEntry } from './formula-range-cache';
6
- import { WideRange } from './formula-transitive-deps';
7
6
  import { SnapshotEvalOutput } from './formula-snapshot-eval';
8
7
 
9
8
  /** True when the formula is only numeric ops on TODAY()/NOW() (incl. unary +/−); used to display serials as dates. */
@@ -56,32 +55,6 @@ export declare class FormulaCache {
56
55
  * affect them even when no precise reverse edge exists.
57
56
  */
58
57
  formulasWithWideRangeDeps: Set<string>;
59
- /**
60
- * The ranges of the wide formulas whose ranges could be read, by formula
61
- * key. A wide formula joins a commit's walk only when one of these holds the
62
- * edited cell or a formula cell the walk reaches. A key in
63
- * `formulasWithWideRangeDeps` with no entry here (an unresolved tab, an
64
- * unreadable range) joins every walk.
65
- */
66
- wideRangesByFormula: Map<string, WideRange[]>;
67
- /**
68
- * True once a full pass has evaluated every formula in the chain since the
69
- * indexes were last reset, so `revDepsByCell` lists every dependent of every
70
- * cell (C8). While true, a commit to a cell with no dependents runs no
71
- * formula pass. Cleared by `markDepGraphIncomplete`.
72
- */
73
- depGraphComplete: boolean;
74
- /**
75
- * Bumped each time the flag is cleared. A deferred full pass records it at
76
- * start and sets the flag only if nothing cleared it while it ran.
77
- */
78
- depGraphEpoch: number;
79
- /**
80
- * Grid size (`rows x cols`) of each dense tab when the graph was completed.
81
- * Whole-row and whole-column references were recorded at that size, so a
82
- * commit to a tab that has grown since takes the full pass again.
83
- */
84
- depGraphSheetSizes: Map<string, string>;
85
58
  /**
86
59
  * Dependency collection state for the currently-parsed formula, set by `execfunction`.
87
60
  * When null, dependency recording is disabled.
@@ -90,10 +63,6 @@ export declare class FormulaCache {
90
63
  originKey: string;
91
64
  deps: Set<string>;
92
65
  hasWideRangeDep: boolean;
93
- /** Ranges over the cap, in the order they were read. */
94
- wideRanges: WideRange[];
95
- /** A wide dependency whose range can't be bounded (unresolved tab). */
96
- wideUnreadable: boolean;
97
66
  };
98
67
  /** Step 2: per execFunctionGroup pass cache for materialized range reads. */
99
68
  rangeValuePassCache?: Map<string, RangePassCacheEntry>;
@@ -101,21 +70,6 @@ export declare class FormulaCache {
101
70
  hits: number;
102
71
  misses: number;
103
72
  };
104
- /**
105
- * Drop every recorded formula dependency, back to the state a fresh mount
106
- * has. Used when a sheet's formula list is replaced from outside the
107
- * engine (a collaborator's calcChain change, A4).
108
- */
109
- resetDependencyIndexes(): void;
110
- /**
111
- * The graph may miss edges: formulas moved, were rewritten or entered the
112
- * chain without being evaluated. Commits take the full pass again until the
113
- * next full pass completes.
114
- */
115
- markDepGraphIncomplete(): void;
116
- /** Called after each `markDepGraphIncomplete` (the C8 warm-up re-runs). */
117
- depGraphIncompleteListeners: Set<() => void>;
118
- onDepGraphIncomplete(listener: () => void): () => void;
119
73
  constructor();
120
74
  materializeFullRangeFragment(context: Context, sheetId: string, flowdata: CellMatrix | null | undefined, startRow: number, endRow: number, startCol: number, endCol: number): {
121
75
  fragment: any[][];
@@ -127,46 +81,10 @@ export declare class FormulaCache {
127
81
  export declare function iscelldata(txt: string): boolean;
128
82
  export declare function getcellrange(ctx: Context, txt: string, formulaId?: string): any;
129
83
  export declare function getAllFunctionGroup(ctx: Context): any[];
130
- /** Remove the dependency edges recorded for a cell that is no longer a formula. */
131
- export declare function dropDependencyEdges(ctx: Context, r: number, c: number, id: string): void;
132
- /**
133
- * delFunctionGroup for many cells of one sheet: the chain and the dynamic
134
- * array list are filtered once, not scanned and copied per cell. Same result
135
- * as calling delFunctionGroup for each cell.
136
- */
137
- export declare function delFunctionGroupBatch(ctx: Context, id: string, cells: {
138
- r: number;
139
- c: number;
140
- }[]): void;
141
84
  export declare function delFunctionGroup(ctx: Context, r: number, c: number, id?: string): void;
142
85
  export declare function insertUpdateFunctionGroup(ctx: Context, r: number, c: number, id?: string, calcChainSet?: Set<string>): void;
143
- /**
144
- * Drop every recorded formula dependency, back to a fresh mount's state, and
145
- * mark the graph incomplete (A4, C8).
146
- */
147
- export declare function resetFormulaDependencyIndexes(ctx: Context): void;
148
- /**
149
- * End of a full pass that started at `epoch` (C8): every formula in the chain
150
- * has recorded its dependencies, unless the graph was invalidated meanwhile.
151
- */
152
- export declare function finishFullFormulaPass(ctx: Context, epoch: number | null | undefined): void;
153
- /**
154
- * A tab that is loaded after the graph was completed keeps the flag on (K60,
155
- * PR 466): loading builds the grid from `celldata` and does not change the
156
- * tab's structure, and the text index already treated a whole-row or column
157
- * reference to a tab with no grid as wide. Without a recorded size the first
158
- * commit on the tab would take the full pass and clear the flag.
159
- */
160
- export declare function recordLoadedSheetSize(ctx: Context, sheetId: string | undefined, data: CellMatrix | null | undefined): void;
161
- /**
162
- * INDIRECT and OFFSET would resolve references at run time, which the graph
163
- * cannot see. Today both evaluate to an error (formulajs implements neither),
164
- * but formulas using them are kept on every commit's run list regardless.
165
- */
166
- export declare const RUNTIME_REFERENCE_RE: RegExp;
167
86
  export declare function execfunction(ctx: Context, txt: string, r: number, c: number, id?: string, calcChainSet?: Set<string>, isrefresh?: boolean, notInsertFunc?: boolean): any[];
168
87
  export declare function groupValuesRefresh(ctx: Context): void;
169
- export declare function mergeFormulaDeps(ctx: Context, originKey: string, deps: Iterable<string>): void;
170
88
  /** Apply worker chunk output onto the live context (main thread only). */
171
89
  export declare function applyWorkerFormulaChunkResults(ctx: Context, output: SnapshotEvalOutput, impactedByCircular: Set<string>, cycleNodes: Set<string>, calcChainKeys?: string[], data?: CellMatrix | null): void;
172
90
  /** Run up to `chunkSize` formulas from an async job. Returns true when job is complete. */
@@ -252,10 +170,6 @@ export declare function markRangeSelectionDirty(ctx: Context): void;
252
170
  export declare function getFormulaRangeIndexForKeyboardSync($editor: HTMLDivElement): number | null;
253
171
  export declare function handleFormulaInput(ctx: Context, $copyTo: HTMLDivElement | null | undefined, $editor: HTMLDivElement, kcode: number, preText?: string, refreshRangeSelect?: boolean): void;
254
172
  export declare function toggleFormulaAbsoluteReferenceAtCaret(ctx: Context, $copyTo: HTMLDivElement | null | undefined, $editor: HTMLDivElement | null | undefined): boolean;
255
- export type FormulaTabs = {
256
- editedTab: string;
257
- formulaTab: string;
258
- };
259
173
  /** True while picking a range for a formula (sheet selection drives references). */
260
174
  export declare function isLegacyFormulaRangeMode(ctx: Context): boolean;
261
175
  export declare function israngeseleciton(ctx: Context, istooltip?: boolean): boolean;
@@ -280,7 +194,7 @@ export declare function getFormulaArrowMode(ctx: Context): FormulaArrowMode;
280
194
  /** True while arrows should drive a cell reference (READY or ACTIVE). */
281
195
  export declare function isFormulaReferenceInputMode(ctx: Context): boolean;
282
196
  export declare function maybeRecoverDirtyRangeSelection(ctx: Context): boolean;
283
- export declare function functionStrChange(txt: string, type: string, rc: 'row' | 'col', orient: string | null, stindex: number, step: number, tabs: FormulaTabs): string;
197
+ export declare function functionStrChange(txt: string, type: string, rc: 'row' | 'col', orient: string | null, stindex: number, step: number): string;
284
198
  export declare function rangeSetValue(ctx: Context, cellInput: HTMLDivElement, selected: any, fxInput?: HTMLDivElement | null): void;
285
199
  export declare function onFormulaRangeDragEnd(ctx: Context): void;
286
200
  export declare function rangeDrag(ctx: Context, e: MouseEvent, cellInput: HTMLDivElement, scrollLeft: number, scrollTop: number, container: HTMLDivElement, fxInput?: HTMLDivElement | null): void;
@@ -33,17 +33,16 @@ export { cfSplitRange } from './conditionalFormat';
33
33
  export { CFSplitRange } from './ConditionFormat';
34
34
  export { updateMoreCell, getRegStr, getDataArr } from './splitColumn';
35
35
  export { applyLocation, getOptionValue, getSelectRange, } from './locationCondition';
36
- export { getDropdownList, setDropdownValue, confirmMessage, cellFocus, validateCellData, splitDropdownOptions, getDropdownOptions, } from './dataVerification';
36
+ export { getDropdownList, setDropdownValue, confirmMessage, cellFocus, validateCellData, } from './dataVerification';
37
37
  export { setConditionRules, CF_DATE_DEFAULT_FORMAT, parseCfDateConditionForUi, formatCfDatePresetSnapshot, parseDdMmYyyyToSerial, } from './ConditionFormat';
38
38
  export { handleOverlayTouchStart, handleOverlayTouchEnd } from './mobile';
39
39
  export { MAX_ZOOM_RATIO, MIN_ZOOM_RATIO } from './zoom';
40
40
  export { jfrefreshgrid } from './refresh';
41
- export { deleteCellsShift, insertCellsShift } from './cell-shift';
42
41
  export { sanitizeDuneUrl, insertDuneChart, onIframeMoveStart, onIframeResizeStart, onIframeMove, onIframeMoveEnd, onIframeResize, onIframeResizeEnd, } from './iframe';
43
42
  export { setCellError, clearCellError, overShowError, } from './error-state-helpers';
44
43
  export { checkCellIsLocked } from './protection';
45
44
  export { detectDateFormat, isdatatypemulti, diff, isdatetime, isRealNull, isRealNum, isNumericCellType, } from './validation';
46
- export { iscelldata, getcellrange, execfunction, execFunctionGroup, refreshFormulasUsingDefinedNames, runFormulaEvalChunk, applyWorkerFormulaChunkResults, finishFullFormulaPass, resetFormulaDependencyIndexes, insertUpdateFunctionGroup, functionCopy, } from './formula';
45
+ export { iscelldata, getcellrange, execfunction, execFunctionGroup, refreshFormulasUsingDefinedNames, runFormulaEvalChunk, applyWorkerFormulaChunkResults, insertUpdateFunctionGroup, functionCopy, } from './formula';
47
46
  export { checkCF, getComputeMap } from './ConditionFormat';
48
47
  export { isValidDefinedNameIdentifier, getDefinedNameDisplayRange, findDefinedNameForSelection, findDefinedNameByName, resolveDefinedNameForFormula, addDefinedName, updateDefinedName, deleteDefinedName, selectDefinedName, openNamedRangesSidebar, scheduleDefinedNamesSync, shiftDefinedNamesOnInsert, shiftDefinedNamesOnDelete, removeDefinedNamesForSheet, } from './namedRanges';
49
48
  export { getdatabyselection, getQKBorder } from './cell';
@@ -1,13 +1,5 @@
1
1
  import { Context } from '../context';
2
- import { Sheet } from '../types';
3
2
 
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;
11
3
  /**
12
4
  * 增加行列
13
5
  * @param {string} type 行或列 ['row', 'column'] 之一
@@ -1,18 +1,5 @@
1
1
  import { Context } from '../context';
2
2
 
3
- type Measure2d = {
4
- measureText(t: string): {
5
- width: number;
6
- };
7
- font: string;
8
- };
9
- /** Drop cached widths, e.g. after web fonts load and change the metrics. */
10
- export declare function clearSingleLineCache(): void;
11
- /**
12
- * Width of one line of text in `font`, from canvas measureText, cached by
13
- * (font, text). No DOM layout is involved.
14
- */
15
- export declare function measureSingleLine(font: string, text: string, ctx2d: Measure2d): number;
16
3
  export declare function calculateRangeCellSize(ctx: Context, sheetId: string, startRow: number, endRow: number, startCol: number, endCol: number, maxColumnWidth?: number): {
17
4
  rowMax: Record<number, number>;
18
5
  colMax: Record<number, number>;
@@ -22,4 +9,3 @@ export declare const updateSheetCellSizes: (ctx: Context, sheetIndex: number, me
22
9
  rowMax: Record<number, number>;
23
10
  colMax: Record<number, number>;
24
11
  }, maxColumnWidth?: number) => void;
25
- export {};
@@ -29,17 +29,7 @@ export type Hooks = {
29
29
  beforeUpdateCell?: (r: number, c: number, value: any) => boolean;
30
30
  /** Clears RTC remote-apply lock so local edits can run data-block formulas. */
31
31
  onLocalCellEdit?: () => void;
32
- afterUpdateCell?: (row: number, column: number, oldValue: any, newValue: any,
33
- /** Sheet that held the cell when it was committed (updateCell only). */
34
- sheetId?: string,
35
- /**
36
- * `skipPersist`: the caller writes this cell to Yjs in its own batch (paste
37
- * and fill), after the cell is final. Persisting here too wrote the
38
- * pre-format value first, so every formula was written twice.
39
- */
40
- options?: {
41
- skipPersist?: boolean;
42
- }) => void;
32
+ afterUpdateCell?: (row: number, column: number, oldValue: any, newValue: any) => void;
43
33
  afterSelectionChange?: (sheetId: string, selection: Selection) => void;
44
34
  beforeRenderRowHeaderCell?: (rowNumber: string, rowIndex: number, top: number, width: number, height: number, ctx: CanvasRenderingContext2D) => boolean;
45
35
  afterRenderRowHeaderCell?: (rowNumber: string, rowIndex: number, top: number, width: number, height: number, ctx: CanvasRenderingContext2D) => void;
@@ -0,0 +1,3 @@
1
+ import { Sheet } from '../types';
2
+
3
+ export declare function isValidFilterSelection(selection: unknown): selection is NonNullable<Sheet['filter_select']>;
@@ -1,17 +1,6 @@
1
1
  import { Context } from '../context';
2
2
  import { Cell, CellWithRowAndCol } from '../types';
3
3
 
4
- /** Receives changes instead of the updateCellYdoc hook (see createYdocBatch). */
5
- export type YdocChangeSink = (changes: any[]) => void;
6
- /**
7
- * Collect the Yjs changes of one structural edit and send them in a single
8
- * updateCellYdoc call, so the edit is one transaction and one update for peers
9
- * (an insert used to send four and a delete five).
10
- */
11
- export declare function createYdocBatch(ctx: Context): {
12
- sink: YdocChangeSink;
13
- flush: () => void;
14
- };
15
4
  export type CelldataYdocChange = {
16
5
  sheetId: string;
17
6
  path: string[];
@@ -28,29 +17,13 @@ export declare function cellsEqualForYdocPersist(before: unknown, after: unknown
28
17
  export declare function snapshotPersistedCelldataInRange(data: unknown[][] | null | undefined, r1: number, r2: number, c1: number, c2: number, celldata?: CellWithRowAndCol[] | null): Map<string, Cell | string | number | boolean>;
29
18
  export declare function appendCelldataDiffChange(changes: CelldataYdocChange[], sheetId: string, r: number, c: number, cell: unknown, beforePersisted?: Map<string, Cell | string | number | boolean>): void;
30
19
  export declare function buildCelldataChangesForRange(sheetId: string, data: unknown[][], r1: number, r2: number, c1: number, c2: number, beforePersisted?: Map<string, Cell | string | number | boolean>): CelldataYdocChange[];
31
- export declare function emitCelldataRangeDiffToYdoc(ctx: Context, sheetId: string, data: unknown[][], r1: number, r2: number, c1: number, c2: number, beforePersisted?: Map<string, Cell | string | number | boolean>, sink?: YdocChangeSink): void;
32
- /** Formula text per tab and cell key, taken before a structural edit rewrites it. */
33
- export type FormulaTextSnapshot = Map<string, Map<string, string>>;
34
- /**
35
- * Snapshot formula text on every hydrated tab. A row/column insert or delete
36
- * rewrites formulas on all tabs, but only the edited tab's shifted range is
37
- * diffed to Yjs, so the rest has to be found by comparing against this.
38
- */
39
- export declare function snapshotFormulaTexts(ctx: Context): FormulaTextSnapshot;
40
- /**
41
- * Emit cells whose formula text changed since `before`, so peers see the
42
- * rewrite. On the edited tab, cells at or past (`editedFromR`, `editedFromC`)
43
- * are skipped: the range diff already writes them. `before` keys are
44
- * pre-edit coordinates, which equal post-edit ones for every cell outside
45
- * that range.
46
- */
47
- export declare function emitRewrittenFormulasToYdoc(ctx: Context, before: FormulaTextSnapshot, editedSheetId: string, editedFromR: number, editedFromC: number, sink?: YdocChangeSink): void;
20
+ export declare function emitCelldataRangeDiffToYdoc(ctx: Context, sheetId: string, data: unknown[][], r1: number, r2: number, c1: number, c2: number, beforePersisted?: Map<string, Cell | string | number | boolean>): void;
48
21
  /**
49
22
  * After delete row/col, emit deletes for persisted keys that now sit past the
50
23
  * shrunken grid. Range diffs only visit coordinates still inside `data`, so
51
24
  * tail keys would otherwise resurrect on peers/reload.
52
25
  */
53
- export declare function emitCelldataDeletesBeyondGrid(ctx: Context, sheetId: string, beforePersisted: Map<string, Cell | string | number | boolean> | undefined, rowCount: number, colCount: number, sink?: YdocChangeSink): void;
26
+ export declare function emitCelldataDeletesBeyondGrid(ctx: Context, sheetId: string, beforePersisted: Map<string, Cell | string | number | boolean> | undefined, rowCount: number, colCount: number): void;
54
27
  export type MergeBounds = {
55
28
  minR: number;
56
29
  minC: number;
@@ -1,4 +1,4 @@
1
1
  import { default as React } from 'react';
2
2
 
3
- declare const _default: React.NamedExoticComponent<{}>;
4
- export default _default;
3
+ declare const FilterMenu: React.FC;
4
+ export default FilterMenu;
@@ -1,4 +1,4 @@
1
1
  import { default as React } from 'react';
2
2
 
3
- declare const _default: React.NamedExoticComponent<{}>;
4
- export default _default;
3
+ declare const SheetTabContextMenu: React.FC;
4
+ export default SheetTabContextMenu;
@@ -1,4 +1,4 @@
1
1
  import { default as React } from 'react';
2
2
 
3
- declare const _default: React.NamedExoticComponent<{}>;
4
- export default _default;
3
+ declare const ContextMenu: React.FC;
4
+ export default ContextMenu;
@@ -1,6 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
 
3
- declare const _default: React.NamedExoticComponent<{
3
+ declare const SVGDefines: React.FC<{
4
4
  currency: string;
5
5
  }>;
6
- export default _default;
6
+ export default SVGDefines;
@@ -1,4 +1,4 @@
1
1
  import { default as React } from 'react';
2
2
 
3
- declare const _default: React.NamedExoticComponent<{}>;
4
- export default _default;
3
+ declare const SheetTab: React.FC;
4
+ export default SheetTab;
@@ -7,11 +7,11 @@ export declare const CurrencySelector: ({ cell, defaultTextFormat, toolTipText,
7
7
  defaultTextFormat: string;
8
8
  toolTipText: string;
9
9
  }) => import("react/jsx-runtime").JSX.Element;
10
- declare const _default: React.NamedExoticComponent<{
10
+ declare const Toolbar: React.FC<{
11
11
  setMoreItems: React.Dispatch<React.SetStateAction<React.ReactNode>>;
12
12
  moreItemsOpen: boolean;
13
13
  onMoreToolbarItemsClose?: () => void;
14
14
  moreToolbarItems?: React.ReactNode;
15
15
  trailingContent?: React.ReactNode;
16
16
  }>;
17
- export default _default;
17
+ export default Toolbar;
@@ -31,10 +31,6 @@ export declare function generateAPIs(context: Context, setContext: (recipe: (ctx
31
31
  applyRemoteCellValue: (row: number, column: number, value: any, options?: api.CommonOptions & {
32
32
  type?: keyof Cell;
33
33
  }) => void;
34
- /** Remote formula-list change, applied in place (A4). */
35
- setSheetCalcChain: (calcChain: Sheet["calcChain"], options?: api.CommonOptions) => void;
36
- /** Remote cell batch: one quiet update, off the local undo stack (A5). */
37
- applyRemoteCells: (cells: api.RemoteCellChange[], options?: api.CommonOptions, onSkip?: (cell: api.RemoteCellChange, error: unknown) => void) => void;
38
34
  setCellError: (row: number, column: number, errorMessage: {
39
35
  title: string;
40
36
  message: string;
@@ -33,8 +33,6 @@ declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalPro
33
33
  applyRemoteCellValue: (row: number, column: number, value: any, options?: api.CommonOptions & {
34
34
  type?: keyof import('../../../core').Cell;
35
35
  }) => void;
36
- setSheetCalcChain: (calcChain: SheetType["calcChain"], options?: api.CommonOptions) => void;
37
- applyRemoteCells: (cells: api.RemoteCellChange[], options?: api.CommonOptions, onSkip?: (cell: api.RemoteCellChange, error: unknown) => void) => void;
38
36
  setCellError: (row: number, column: number, errorMessage: {
39
37
  title: string;
40
38
  message: string;
@@ -1,6 +1,5 @@
1
1
  import { default as React } from 'react';
2
2
  import { Context, Settings, GlobalCache, PatchOptions } from '../../core';
3
- import { WorkbookStore } from './workbook-store';
4
3
 
5
4
  export type RefValues = {
6
5
  globalCache: GlobalCache;
@@ -24,18 +23,4 @@ declare const WorkbookContext: React.Context<{
24
23
  handleUndo: () => void;
25
24
  handleRedo: () => void;
26
25
  }>;
27
- /**
28
- * The parts of the workbook that rarely change (setters, settings, refs) plus
29
- * the store holding the latest context. Components that must not render on
30
- * every update read this instead of `WorkbookContext` (E2).
31
- */
32
- export type WorkbookStable = {
33
- store: WorkbookStore<Context>;
34
- setContext: (recipe: (ctx: Context) => void, options?: SetContextOptions) => void;
35
- settings: Required<Settings>;
36
- refs: RefValues;
37
- handleUndo: () => void;
38
- handleRedo: () => void;
39
- };
40
- export declare const WorkbookStableContext: React.Context<WorkbookStable>;
41
26
  export default WorkbookContext;