@fileverse-dev/dsheet 2.0.0 → 2.0.1

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 (28) hide show
  1. package/dist/editor/components/import-button-ui.d.ts +1 -1
  2. package/dist/editor/utils/csv-import.d.ts +1 -1
  3. package/dist/editor/utils/custom-toolbar-item.d.ts +1 -1
  4. package/dist/editor/utils/export-filename.d.ts +1 -0
  5. package/dist/{es-DHiiPgkU.js → es-DqFXH9BK.js} +9 -1
  6. package/dist/{hi-DgkuC9mD.js → hi-cBN4FoX2.js} +9 -1
  7. package/dist/index.es.js +17505 -16766
  8. package/dist/sheet-engine/core/context.d.ts +5 -0
  9. package/dist/sheet-engine/core/index.d.ts +1 -1
  10. package/dist/sheet-engine/core/locale/en.d.ts +8 -0
  11. package/dist/sheet-engine/core/locale/es.d.ts +8 -0
  12. package/dist/sheet-engine/core/locale/hi.d.ts +8 -0
  13. package/dist/sheet-engine/core/locale/zh.d.ts +8 -0
  14. package/dist/sheet-engine/core/locale/zh_tw.d.ts +8 -0
  15. package/dist/sheet-engine/core/modules/cell.d.ts +5 -0
  16. package/dist/sheet-engine/core/modules/formula.d.ts +9 -0
  17. package/dist/sheet-engine/core/modules/index.d.ts +3 -3
  18. package/dist/sheet-engine/core/modules/rowcol.d.ts +4 -0
  19. package/dist/sheet-engine/core/modules/selection.d.ts +6 -0
  20. package/dist/sheet-engine/core/modules/validation.d.ts +11 -0
  21. package/dist/sheet-engine/core/utils/patch.d.ts +2 -0
  22. package/dist/sheet-engine/react/components/ResetRowHeight/index.d.ts +3 -0
  23. package/dist/sheet-engine/react/components/Workbook/api.d.ts +2 -0
  24. package/dist/sheet-engine/react/components/Workbook/index.d.ts +1 -0
  25. package/dist/style.css +1 -1
  26. package/dist/{zh-ForBOJJx.js → zh-UJov73Dl.js} +9 -1
  27. package/dist/{zh_tw-CjJceJE_.js → zh_tw-DTGOcDTq.js} +9 -1
  28. package/package.json +2 -2
@@ -192,6 +192,11 @@ export type Context = {
192
192
  luckysheetPaintSingle: boolean;
193
193
  defaultCell: Cell;
194
194
  groupValuesRefreshData: any[];
195
+ /**
196
+ * Incremented when formula `func_selectedrange` moves via keyboard (`rangeOfFormula`)
197
+ * so React re-renders — `FormulaCache` is a class and Immer does not track it.
198
+ */
199
+ formulaRangeNavRevision: number;
195
200
  formulaCache: FormulaCache;
196
201
  hooks: Hooks;
197
202
  showSheetList?: boolean;
@@ -7,7 +7,7 @@ export { defaultSettings } from './settings';
7
7
  export type { Settings, Hooks } from './settings';
8
8
  export { handleCopy, handleGlobalKeyDown, handlePaste, handlePasteByClick, fixPositionOnFrozenCells, handleCellAreaMouseDown, handleCellAreaDoubleClick, handleContextMenu, mouseRender, handleOverlayMouseMove, handleOverlayMouseUp, handleRowHeaderMouseDown, handleColumnHeaderMouseDown, handleColSizeHandleMouseDown, handleColSizeHandleDoubleClick, handleRowSizeHandleMouseDown, handleColFreezeHandleMouseDown, handleRowFreezeHandleMouseDown, } from './events';
9
9
  export * from './locale';
10
- export { getBorderInfoComputeRange, getBorderInfoCompute, normalizedCellAttr, normalizedAttr, getCellValue, setCellValue, getRealCellValue, mergeBorder, cancelNormalSelected, updateCell, getRangetxt, getRangeByTxt, getInlineStringHTML, getStyleByCell, clearSelectedCellFormat, clearRowsCellsFormat, clearColumnsCellsFormat, clipboard, moveToEnd, getRangeRectsByCharacterOffset, update, is_date, valueShowEs, FormulaCache, groupValuesRefresh, setCaretPosition, getrangeseleciton, getFormulaEditorOwner, rangeHightlightselected, handleFormulaInput, israngeseleciton, createRangeHightlight, maybeRecoverDirtyRangeSelection, getFormulaRangeIndexAtCaret, isCaretAtValidFormulaRangeInsertionPoint, isLegacyFormulaRangeMode, markRangeSelectionDirty, setFormulaEditorOwner, functionHTMLGenerate, suppressFormulaRangeSelectionForInitialEdit, rangeSetValue, getFormulaRangeIndexForKeyboardSync, createFormulaRangeSelect, isFormulaReferenceInputMode, initFreeze, isInlineStringCell, getInlineStringNoStyle, rowLocation, rowLocationByIndex, colLocation, colLocationByIndex, insertRowCol, deleteRowCol, hideSelected, showSelected, isShowHidenCR, scrollToHighlightCell, selectTitlesMap, selectTitlesRange, normalizeSelection, syncPrimaryCellActiveFromSelection, setPrimaryCellActive, advancePrimaryCellInLastMultiSelection, moveHighlightCell, deleteSelectedCellText, selectAll, fixRowStyleOverflowInFreeze, fixColumnStyleOverflowInFreeze, calcSelectionInfo, addSheet, deleteSheet, editSheetName, changeSheet, updateFormat, autoSelectionFormula, handleBold, handleItalic, handleStrikeThrough, handleUnderline, handleHorizontalAlign, handleVerticalAlign, handleTextColor, handleTextBackground, handleBorder, handleMerge, handleSort, handleFreeze, handleTextSize, handleSum, handleLink, toolbarItemClickHandler, toolbarItemSelectedFunc, handleScreenShot, insertImage, showImgChooser, drawArrow, setEditingComment, removeEditingComment, newComment, editComment, deleteComment, showComments, showHideComment, showHideAllComments, onCommentBoxMoveStart, removeActiveImage, cancelActiveImgItem, onImageMoveStart, onImageResizeStart, createDropCellRange, sortSelection, searchAll, searchNext, replace, replaceAll, getCellRowColumn, getCellHyperlink, saveHyperlink, removeHyperlink, showLinkCard, goToLink, isLinkValid, createFilterOptions, clearFilter, createFilter, getFilterColumnValues, getFilterColumnColors, orderbydatafiler, saveFilter, onCellsMoveStart, cfSplitRange, updateMoreCell, getRegStr, getDataArr, applyLocation, getOptionValue, getSelectRange, getDropdownList, setDropdownValue, confirmMessage, setConditionRules, handleOverlayTouchStart, handleOverlayTouchEnd, MAX_ZOOM_RATIO, MIN_ZOOM_RATIO, handleKeydownForZoom, jfrefreshgrid, sanitizeDuneUrl, insertDuneChart, onIframeMoveStart, onIframeResizeStart, onIframeMove, onIframeMoveEnd, onIframeResize, onIframeResizeEnd, setCellError, clearCellError, isdatatypemulti, diff, isdatetime, isRealNull, isRealNum, iscelldata, getcellrange, cancelFunctionrangeSelected, seletedHighlistByindex, spillSortResult, execfunction, insertUpdateFunctionGroup, remapFormulaReferencesByMap, checkCF, getComputeMap, cancelPaintModel, hideCRCount, getdatabyselection, } from './modules';
10
+ export { getBorderInfoComputeRange, getBorderInfoCompute, normalizedCellAttr, normalizedAttr, getCellValue, setCellValue, getRealCellValue, mergeBorder, cancelNormalSelected, updateCell, getRangetxt, getRangeByTxt, getInlineStringHTML, getStyleByCell, clearSelectedCellFormat, clearRowsCellsFormat, clearColumnsCellsFormat, clipboard, moveToEnd, getRangeRectsByCharacterOffset, update, is_date, valueShowEs, FormulaCache, groupValuesRefresh, execFunctionGroup, setCaretPosition, getrangeseleciton, getFormulaEditorOwner, rangeHightlightselected, handleFormulaInput, israngeseleciton, createRangeHightlight, maybeRecoverDirtyRangeSelection, getFormulaRangeIndexAtCaret, isCaretAtValidFormulaRangeInsertionPoint, isLegacyFormulaRangeMode, markRangeSelectionDirty, setFormulaEditorOwner, functionHTMLGenerate, suppressFormulaRangeSelectionForInitialEdit, rangeSetValue, getFormulaRangeIndexForKeyboardSync, createFormulaRangeSelect, isFormulaReferenceInputMode, seedFormulaFuncSelectedRangeFromLastSelection, initFreeze, isInlineStringCell, getInlineStringNoStyle, rowLocation, rowLocationByIndex, colLocation, colLocationByIndex, insertRowCol, deleteRowCol, hideSelected, showSelected, isShowHidenCR, scrollToHighlightCell, selectTitlesMap, selectTitlesRange, normalizeSelection, syncPrimaryCellActiveFromSelection, setPrimaryCellActive, advancePrimaryCellInLastMultiSelection, snapSheetSelectionFocusToCellPreserveMultiRange, moveHighlightCell, deleteSelectedCellText, selectAll, fixRowStyleOverflowInFreeze, fixColumnStyleOverflowInFreeze, calcSelectionInfo, addSheet, deleteSheet, editSheetName, changeSheet, updateFormat, autoSelectionFormula, handleBold, handleItalic, handleStrikeThrough, handleUnderline, handleHorizontalAlign, handleVerticalAlign, handleTextColor, handleTextBackground, handleBorder, handleMerge, handleSort, handleFreeze, handleTextSize, handleSum, handleLink, toolbarItemClickHandler, toolbarItemSelectedFunc, handleScreenShot, insertImage, showImgChooser, drawArrow, setEditingComment, removeEditingComment, newComment, editComment, deleteComment, showComments, showHideComment, showHideAllComments, onCommentBoxMoveStart, removeActiveImage, cancelActiveImgItem, onImageMoveStart, onImageResizeStart, createDropCellRange, sortSelection, searchAll, searchNext, replace, replaceAll, getCellRowColumn, getCellHyperlink, saveHyperlink, removeHyperlink, showLinkCard, goToLink, isLinkValid, createFilterOptions, clearFilter, createFilter, getFilterColumnValues, getFilterColumnColors, orderbydatafiler, saveFilter, onCellsMoveStart, cfSplitRange, updateMoreCell, getRegStr, getDataArr, applyLocation, getOptionValue, getSelectRange, getDropdownList, setDropdownValue, confirmMessage, setConditionRules, handleOverlayTouchStart, handleOverlayTouchEnd, MAX_ZOOM_RATIO, MIN_ZOOM_RATIO, handleKeydownForZoom, jfrefreshgrid, sanitizeDuneUrl, insertDuneChart, onIframeMoveStart, onIframeResizeStart, onIframeMove, onIframeMoveEnd, onIframeResize, onIframeResizeEnd, setCellError, clearCellError, isdatatypemulti, diff, isdatetime, isRealNull, isRealNum, isNumericCellType, iscelldata, getcellrange, cancelFunctionrangeSelected, seletedHighlistByindex, spillSortResult, execfunction, insertUpdateFunctionGroup, remapFormulaReferencesByMap, checkCF, getComputeMap, cancelPaintModel, hideCRCount, getdatabyselection, } from './modules';
11
11
  export type { FilterDate, FilterValue, FilterColor } from './modules';
12
12
  export { getFreezeState, toggleFreeze, indexToColumnChar, escapeScriptTag, escapeHTMLTag, getSheetIndex, replaceHtml, isAllowEdit, isAllowEditReadOnly, filterPatch, patchToOp, opToPatch, inverseRowColOptions, } from './utils';
13
13
  export type { PatchOptions, ChangedSheet } from './utils';
@@ -379,6 +379,14 @@ declare const _default: {
379
379
  cannotDeleteColumnReadOnly: string;
380
380
  cannotInsertOnRowReadOnly: string;
381
381
  cannotInsertOnColumnReadOnly: string;
382
+ insertRowAboveOne: string;
383
+ insertRowsAboveN: string;
384
+ insertRowBelowOne: string;
385
+ insertRowsBelowN: string;
386
+ insertColumnLeftOne: string;
387
+ insertColumnsLeftN: string;
388
+ insertColumnRightOne: string;
389
+ insertColumnsRightN: string;
382
390
  rowOverLimit: string;
383
391
  columnOverLimit: string;
384
392
  conditionFormat: string;
@@ -548,6 +548,14 @@ declare const _default: {
548
548
  cannotDeleteColumnReadOnly: string;
549
549
  cannotInsertOnRowReadOnly: string;
550
550
  cannotInsertOnColumnReadOnly: string;
551
+ insertRowAboveOne: string;
552
+ insertRowsAboveN: string;
553
+ insertRowBelowOne: string;
554
+ insertRowsBelowN: string;
555
+ insertColumnLeftOne: string;
556
+ insertColumnsLeftN: string;
557
+ insertColumnRightOne: string;
558
+ insertColumnsRightN: string;
551
559
  rowOverLimit: string;
552
560
  columnOverLimit: string;
553
561
  };
@@ -418,6 +418,14 @@ declare const _default: {
418
418
  cannotDeleteColumnReadOnly: string;
419
419
  cannotInsertOnRowReadOnly: string;
420
420
  cannotInsertOnColumnReadOnly: string;
421
+ insertRowAboveOne: string;
422
+ insertRowsAboveN: string;
423
+ insertRowBelowOne: string;
424
+ insertRowsBelowN: string;
425
+ insertColumnLeftOne: string;
426
+ insertColumnsLeftN: string;
427
+ insertColumnRightOne: string;
428
+ insertColumnsRightN: string;
421
429
  rowOverLimit: string;
422
430
  columnOverLimit: string;
423
431
  };
@@ -435,6 +435,14 @@ declare const _default: {
435
435
  cannotDeleteColumnReadOnly: string;
436
436
  cannotInsertOnRowReadOnly: string;
437
437
  cannotInsertOnColumnReadOnly: string;
438
+ insertRowAboveOne: string;
439
+ insertRowsAboveN: string;
440
+ insertRowBelowOne: string;
441
+ insertRowsBelowN: string;
442
+ insertColumnLeftOne: string;
443
+ insertColumnsLeftN: string;
444
+ insertColumnRightOne: string;
445
+ insertColumnsRightN: string;
438
446
  rowOverLimit: string;
439
447
  columnOverLimit: string;
440
448
  conditionFormat: string;
@@ -581,6 +581,14 @@ declare const _default: {
581
581
  cannotDeleteColumnReadOnly: string;
582
582
  cannotInsertOnRowReadOnly: string;
583
583
  cannotInsertOnColumnReadOnly: string;
584
+ insertRowAboveOne: string;
585
+ insertRowsAboveN: string;
586
+ insertRowBelowOne: string;
587
+ insertRowsBelowN: string;
588
+ insertColumnLeftOne: string;
589
+ insertColumnsLeftN: string;
590
+ insertColumnRightOne: string;
591
+ insertColumnsRightN: string;
584
592
  rowOverLimit: string;
585
593
  columnOverLimit: string;
586
594
  };
@@ -1,6 +1,11 @@
1
1
  import { Context } from '../context';
2
2
  import { Cell, CellMatrix, Range, Selection, SingleRange } from '../types';
3
3
 
4
+ /**
5
+ * Recompute auto row height for one row from wrap/inline cells; updates cfg.rowlen and ctx.config.
6
+ * Used from updateCell and deleteSelectedCellText (bulk clear).
7
+ */
8
+ export declare function recalcAutoRowHeightForRow(ctx: Context, r: number, d: CellMatrix, canvas: CanvasRenderingContext2D | null | undefined): void;
4
9
  export declare function normalizedCellAttr(cell: Cell, attr: keyof Cell, defaultFontSize?: number): any;
5
10
  export declare function normalizedAttr(data: CellMatrix, r: number, c: number, attr: keyof Cell): any;
6
11
  export declare function getCellValue(r: number, c: number, data: CellMatrix, attr?: keyof Cell): any;
@@ -23,6 +23,8 @@ export declare class FormulaCache {
23
23
  rangedrag_row_start?: boolean;
24
24
  rangeSelectionActive?: boolean | null;
25
25
  keyboardRangeSelectionLock?: boolean;
26
+ /** True after arrow/Shift+arrow moved `func_selectedrange` without updating yellow selection. */
27
+ formulaKeyboardRefSync?: boolean;
26
28
  formulaEditorOwner?: "cell" | "fx" | null;
27
29
  functionRangeIndex?: number[];
28
30
  functionlistMap: any;
@@ -39,6 +41,13 @@ export declare function insertUpdateFunctionGroup(ctx: Context, r: number, c: nu
39
41
  export declare function execfunction(ctx: Context, txt: string, r: number, c: number, id?: string, calcChainSet?: Set<string>, isrefresh?: boolean, notInsertFunc?: boolean): any[];
40
42
  export declare function groupValuesRefresh(ctx: Context): void;
41
43
  export declare function execFunctionGroup(ctx: Context, origin_r: number, origin_c: number, value: any, id?: string, data?: any, isForce?: boolean): void;
44
+ /**
45
+ * Before the first `moveHighlightCell/Range(..., "rangeOfFormula")` while editing
46
+ * a formula, copy the current yellow selection into `func_selectedrange` so
47
+ * keyboard navigation updates only the blue formula overlay (like mouse drag),
48
+ * without resizing `luckysheet_select_save`.
49
+ */
50
+ export declare function seedFormulaFuncSelectedRangeFromLastSelection(ctx: Context): boolean;
42
51
  export declare function createFormulaRangeSelect(ctx: Context, select: {
43
52
  rangeIndex: number;
44
53
  } & Rect): void;
@@ -3,12 +3,12 @@ export { normalizedCellAttr, normalizedAttr, getCellValue, setCellValue, getReal
3
3
  export { default as clipboard } from './clipboard';
4
4
  export { moveToEnd, getRangeRectsByCharacterOffset } from './cursor';
5
5
  export { update, is_date, valueShowEs } from './format';
6
- export { FormulaCache, groupValuesRefresh, setCaretPosition, getrangeseleciton, getFormulaEditorOwner, rangeHightlightselected, handleFormulaInput, israngeseleciton, createRangeHightlight, createFormulaRangeSelect, maybeRecoverDirtyRangeSelection, delFunctionGroup, functionHTMLGenerate, onFormulaRangeDragEnd, rangeDrag, rangeSetValue, remapFormulaReferencesByMap, getFormulaRangeIndexAtCaret, isCaretAtValidFormulaRangeInsertionPoint, isLegacyFormulaRangeMode, markRangeSelectionDirty, getFormulaRangeIndexForKeyboardSync, isFormulaReferenceInputMode, functionStrChange, setFormulaEditorOwner, getAllFunctionGroup, suppressFormulaRangeSelectionForInitialEdit, } from './formula';
6
+ export { FormulaCache, groupValuesRefresh, setCaretPosition, getrangeseleciton, getFormulaEditorOwner, rangeHightlightselected, handleFormulaInput, israngeseleciton, createRangeHightlight, createFormulaRangeSelect, maybeRecoverDirtyRangeSelection, delFunctionGroup, functionHTMLGenerate, onFormulaRangeDragEnd, rangeDrag, rangeSetValue, remapFormulaReferencesByMap, getFormulaRangeIndexAtCaret, isCaretAtValidFormulaRangeInsertionPoint, isLegacyFormulaRangeMode, markRangeSelectionDirty, getFormulaRangeIndexForKeyboardSync, isFormulaReferenceInputMode, seedFormulaFuncSelectedRangeFromLastSelection, functionStrChange, setFormulaEditorOwner, getAllFunctionGroup, execFunctionGroup, suppressFormulaRangeSelectionForInitialEdit, } from './formula';
7
7
  export { initFreeze } from './freeze';
8
8
  export { isInlineStringCell, getInlineStringNoStyle } from './inline-string';
9
9
  export { rowLocation, rowLocationByIndex, colLocation, colLocationByIndex, } from './location';
10
10
  export { insertRowCol, deleteRowCol, hideSelected, showSelected, isShowHidenCR, hideCRCount, } from './rowcol';
11
- export { scrollToHighlightCell, seletedHighlistByindex, selectTitlesMap, selectTitlesRange, normalizeSelection, syncPrimaryCellActiveFromSelection, setPrimaryCellActive, advancePrimaryCellInLastMultiSelection, moveHighlightCell, deleteSelectedCellText, selectAll, fixRowStyleOverflowInFreeze, fixColumnStyleOverflowInFreeze, calcSelectionInfo, rangeValueToHtml, } from './selection';
11
+ export { scrollToHighlightCell, seletedHighlistByindex, selectTitlesMap, selectTitlesRange, normalizeSelection, syncPrimaryCellActiveFromSelection, setPrimaryCellActive, advancePrimaryCellInLastMultiSelection, snapSheetSelectionFocusToCellPreserveMultiRange, moveHighlightCell, deleteSelectedCellText, selectAll, fixRowStyleOverflowInFreeze, fixColumnStyleOverflowInFreeze, calcSelectionInfo, rangeValueToHtml, } from './selection';
12
12
  export { addSheet, deleteSheet, editSheetName, changeSheet, updateSheet, } from './sheet';
13
13
  export { updateFormat, autoSelectionFormula, handleBold, handleItalic, handleStrikeThrough, handleUnderline, handleHorizontalAlign, handleVerticalAlign, handleTextColor, handleTextBackground, handleBorder, handleMerge, handleSort, handleFreeze, handleTextSize, handleSum, handleLink, toolbarItemClickHandler, toolbarItemSelectedFunc, updateFormatCell, cancelPaintModel, } from './toolbar';
14
14
  export { handleScreenShot } from './screenshot';
@@ -34,7 +34,7 @@ export { jfrefreshgrid } from './refresh';
34
34
  export { sanitizeDuneUrl, insertDuneChart, onIframeMoveStart, onIframeResizeStart, onIframeMove, onIframeMoveEnd, onIframeResize, onIframeResizeEnd, } from './iframe';
35
35
  export { setCellError, clearCellError, overShowError, } from './error-state-helpers';
36
36
  export { checkCellIsLocked } from './protection';
37
- export { isdatatypemulti, diff, isdatetime, isRealNull, isRealNum, } from './validation';
37
+ export { isdatatypemulti, diff, isdatetime, isRealNull, isRealNum, isNumericCellType, } from './validation';
38
38
  export { iscelldata, getcellrange, execfunction, insertUpdateFunctionGroup, functionCopy, } from './formula';
39
39
  export { checkCF, getComputeMap } from './ConditionFormat';
40
40
  export { getdatabyselection, getQKBorder } from './cell';
@@ -15,6 +15,10 @@ export declare function insertRowCol(ctx: Context, op: {
15
15
  count: number;
16
16
  direction: "lefttop" | "rightbottom";
17
17
  id: string;
18
+ /** Pre-insert row index for each inserted row (length must equal count). */
19
+ templateSourceRows?: number[];
20
+ /** Pre-insert column index for each inserted column (length must equal count). */
21
+ templateSourceColumns?: number[];
18
22
  }, changeSelection?: boolean): void;
19
23
  export declare function deleteRowCol(ctx: Context, op: {
20
24
  type: "row" | "column";
@@ -32,6 +32,12 @@ export declare function advancePrimaryCellInLastMultiSelection(ctx: Context, for
32
32
  * selection that runs `normalizeSelection` will re-sync from the new range.
33
33
  */
34
34
  export declare function setPrimaryCellActive(ctx: Context, r: number, c: number): void;
35
+ /**
36
+ * After formula segment / delete handling, move selection focus to the edited cell
37
+ * (r,c). If the sheet already has a multi-cell range and (r,c) is inside it, keep
38
+ * that range so Enter-primary navigation + typing do not collapse the yellow box.
39
+ */
40
+ export declare function snapSheetSelectionFocusToCellPreserveMultiRange(ctx: Context, r: number, c: number): void;
35
41
  export declare function normalizeSelection(ctx: Context, selection: SheetType["luckysheet_select_save"]): import('..').Selection[] | undefined;
36
42
  export declare function selectTitlesMap(rangeMap: Record<string, number>, range1: number, range2: number): Record<string, number>;
37
43
  export declare function selectTitlesRange(map: Record<string, number>): number[][];
@@ -16,6 +16,17 @@ export declare function valueIsError(value: string): boolean;
16
16
  export declare function isRealNull(val: any): boolean;
17
17
  export declare function isHexValue(str: string): boolean;
18
18
  export declare function isRealNum(val: any): boolean;
19
+ /**
20
+ * Explicit number format (`t === 'n'`) or General/Automatic with a numeric stored value (`t === 'g'`).
21
+ * Use wherever logic previously required `ct.t === 'n'` so Automatic numeric cells behave the same.
22
+ */
23
+ export declare function isNumericCellType(cell: {
24
+ ct?: {
25
+ t?: string;
26
+ fa?: string;
27
+ };
28
+ v?: unknown;
29
+ } | null | undefined): boolean;
19
30
  export type DateFormatInfo = {
20
31
  year: number;
21
32
  month: number;
@@ -15,6 +15,8 @@ export type PatchOptions = {
15
15
  count: number;
16
16
  direction: 'lefttop' | 'rightbottom';
17
17
  id: string;
18
+ templateSourceRows?: number[];
19
+ templateSourceColumns?: number[];
18
20
  };
19
21
  deleteRowColOp?: {
20
22
  type: 'row' | 'column';
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+
3
+ export declare const ResetRowHeight: React.FC;
@@ -6,6 +6,8 @@ import { useDialog } from '../../hooks/useDialog';
6
6
  export declare function generateAPIs(context: Context, setContext: (recipe: (ctx: Context) => void, options?: SetContextOptions) => void, handleUndo: () => void, handleRedo: () => void, settings: Required<Settings>, cellInput: HTMLDivElement | null, scrollbarX: HTMLDivElement | null, scrollbarY: HTMLDivElement | null, globalCache: GlobalCache | null, refs: any): {
7
7
  applyOp: (ops: Op[]) => void;
8
8
  getCryptoPrice: typeof getCryptoPrice;
9
+ /** Runs the formula engine on every cell in calcChain (all sheets). Use after XLSX import so values are computed, not cached from the file. */
10
+ recalculateAllFormulas: () => void;
9
11
  getCellValue: (row: number, column: number, options?: api.CommonOptions & {
10
12
  type?: keyof Cell;
11
13
  }) => any;
@@ -12,6 +12,7 @@ type AdditionalProps = {
12
12
  declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalProps & React.RefAttributes<{
13
13
  applyOp: (ops: Op[]) => void;
14
14
  getCryptoPrice: typeof getCryptoPrice;
15
+ recalculateAllFormulas: () => void;
15
16
  getCellValue: (row: number, column: number, options?: api.CommonOptions & {
16
17
  type?: keyof import('../../../core').Cell;
17
18
  }) => any;