@fileverse-dev/dsheet 2.0.36 → 2.1.0-shortcut-2

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 (46) hide show
  1. package/dist/{constants-CnhOvijG.js → constants-yStXQJiK.js} +35 -14
  2. package/dist/constants.d.ts +4 -0
  3. package/dist/constants.js +6 -3
  4. package/dist/editor/components/collab-status-chip.d.ts +8 -0
  5. package/dist/editor/contexts/editor-context.d.ts +15 -5
  6. package/dist/editor/dsheet-editor.d.ts +1 -1
  7. package/dist/editor/hooks/use-collab-awareness.d.ts +17 -0
  8. package/dist/editor/hooks/use-editor-data.d.ts +2 -1
  9. package/dist/editor/hooks/use-editor-sync.d.ts +9 -6
  10. package/dist/editor/types.d.ts +2 -2
  11. package/dist/editor/utils/after-update-cell.d.ts +12 -0
  12. package/dist/editor/utils/formula-ui-sync.d.ts +3 -1
  13. package/dist/editor/utils/remote-apply-guard.d.ts +19 -0
  14. package/dist/{executeStringFunction-Bl4AYetV.js → executeStringFunction-tdvZ0KTi.js} +4727 -4656
  15. package/dist/formula.js +1 -1
  16. package/dist/index-llRXqdgK.js +52173 -0
  17. package/dist/index.d.ts +3 -1
  18. package/dist/index.es.js +45 -39
  19. package/dist/sheet-engine/core/api/cell.d.ts +21 -0
  20. package/dist/sheet-engine/core/events/index.d.ts +1 -0
  21. package/dist/sheet-engine/core/events/keyboard-shortcut-utils.d.ts +58 -0
  22. package/dist/sheet-engine/core/events/shortcuts-v2.d.ts +7 -0
  23. package/dist/sheet-engine/core/index.d.ts +2 -2
  24. package/dist/sheet-engine/core/modules/filter.d.ts +13 -0
  25. package/dist/sheet-engine/core/modules/index.d.ts +1 -1
  26. package/dist/sheet-engine/core/modules/selection.d.ts +8 -0
  27. package/dist/sheet-engine/core/modules/zoom.d.ts +1 -0
  28. package/dist/sheet-engine/core/settings.d.ts +3 -0
  29. package/dist/sheet-engine/core/types.d.ts +1 -0
  30. package/dist/sheet-engine/react/components/Workbook/api.d.ts +23 -0
  31. package/dist/sheet-engine/react/components/Workbook/index.d.ts +15 -0
  32. package/dist/style.css +1 -1
  33. package/dist/sync-local/SyncManager.d.ts +69 -0
  34. package/dist/sync-local/collabStateMachine.d.ts +23 -0
  35. package/dist/sync-local/crypto/index.d.ts +6 -0
  36. package/dist/sync-local/index.d.ts +3 -0
  37. package/dist/sync-local/socketClient.d.ts +68 -0
  38. package/dist/sync-local/types/index.d.ts +212 -0
  39. package/dist/sync-local/useSyncManager.d.ts +12 -0
  40. package/dist/sync-local/utils/createAwarenessUpdateHandler.d.ts +8 -0
  41. package/dist/sync-local/utils/objectToFile.d.ts +1 -0
  42. package/dist/{use-xlsx-import-impl-BIdckUWG.js → use-xlsx-import-impl-D1AnvZ-z.js} +2 -2
  43. package/dist/{xlsx-export-impl-BEVF8Y2c.js → xlsx-export-impl-duuL1dcS.js} +293 -295
  44. package/package.json +15 -10
  45. package/dist/editor/hooks/use-editor-collaboration.d.ts +0 -9
  46. package/dist/index-CqPhp0yr.js +0 -40212
package/dist/index.d.ts CHANGED
@@ -1,10 +1,12 @@
1
1
  export { default as DSheetEditor } from './editor/dsheet-editor';
2
+ export { default as DSheetSkeleton } from './editor/components/skeleton-loader';
2
3
  export { formulaResponseUiSync } from './editor/utils/formula-ui-sync';
3
4
  export { executeStringFunction } from './editor/utils/executeStringFunction';
4
5
  export { FLVURL } from '@fileverse-dev/formulajs';
5
6
  export { loadLocale } from './sheet-engine/core';
6
7
  export type { ErrorMessageHandlerReturnType } from './editor/types';
7
8
  export type { WorkbookInstance } from './sheet-engine/react';
9
+ export type { CollaborationProps, CollabConnectionConfig, CollabSessionMeta, CollabServices, CollabCallbacks, CollabState, CollabStatus, CollabError, CollabErrorCode, CollabUser, } from './sync-local/types';
8
10
  export { ERROR_MESSAGES_FLAG, SERVICES_API_KEY, } from './editor/constants/shared-constants';
9
11
  export { TEMPLATES } from '@fileverse-dev/dsheets-templates/template-metadata-list';
10
12
  export { handleCSVUpload } from './editor/utils/csv-import';
@@ -13,5 +15,5 @@ export { handleExportToCSV } from './editor/utils/csv-export';
13
15
  export { handleExportToJSON } from './editor/utils/json-export';
14
16
  export { useXLSXImport } from './editor/hooks/use-xlsx-import';
15
17
  export * as FortuneCore from './sheet-engine/core';
16
- export { createFilter, clearFilter, handleSort, handleCopy, handlePasteByClick, removeActiveImage, jfrefreshgrid, deleteSelectedCellText, deleteRowCol, getFlowdata, updateFormat, handleTextSize, handleHorizontalAlign, handleVerticalAlign, toolbarItemClickHandler, getSheetIndex, handleMerge, clearSelectedCellFormat, clearColumnsCellsFormat, clearRowsCellsFormat, handleFreeze, insertRowCol, showImgChooser, handleLink, api, } from './sheet-engine/core';
18
+ export { createFilter, clearFilter, handleSort, handleCopy, handlePasteByClick, removeActiveImage, jfrefreshgrid, deleteSelectedCellText, deleteRowCol, getFlowdata, updateFormat, handleTextSize, handleHorizontalAlign, handleVerticalAlign, toolbarItemClickHandler, getSheetIndex, handleMerge, clearSelectedCellFormat, clearColumnsCellsFormat, clearRowsCellsFormat, handleFreeze, insertRowCol, showImgChooser, handleLink, api, describeMatchedShortcut, isFormulaListShortcut, isOpenShortcutsModalShortcut, isZoomInShortcut, isZoomOutShortcut, } from './sheet-engine/core';
17
19
  export type { PatchOptions } from './sheet-engine/core';
package/dist/index.es.js CHANGED
@@ -1,45 +1,51 @@
1
- import { S as s, i as l, T as o, a as r, c as t, b as n, h as d, d as S, e as h, f as c, g as i, j as m, k as C, l as p, n as E, o as F, p as x, q as g, r as R, s as f, t as L, u as b, v as u, w as T } from "./index-CqPhp0yr.js";
2
- import { bL as I, bM as w, bN as V, bR as k, bb as M, e as X, f as _, h as j, a as v, cc as y, aq as z, cj as P } from "./executeStringFunction-Bl4AYetV.js";
3
- import { FLVURL as q } from "@fileverse-dev/formulajs";
4
- import { E as H, S as N } from "./constants-CnhOvijG.js";
1
+ import { S as s, a as o, i as t, T as l, b as r, d as n, e as d, f as S, h, g as c, j as i, k as m, l as u, n as C, o as p, p as E, q as F, r as x, s as g, t as f, u as R, v as L, w as b, x as A, z as I, A as T, B as w, C as V, D as k, E as M } from "./index-llRXqdgK.js";
2
+ import { bP as O, bQ as P, bR as X, bV as _, bg as v, e as y, f as D, h as U, a as j, cf as q, aq as B, cm as G } from "./executeStringFunction-tdvZ0KTi.js";
3
+ import { FLVURL as Z } from "@fileverse-dev/formulajs";
4
+ import { E as K, S as N } from "./constants-yStXQJiK.js";
5
5
  export {
6
6
  s as DSheetEditor,
7
- H as ERROR_MESSAGES_FLAG,
8
- q as FLVURL,
9
- l as FortuneCore,
7
+ o as DSheetSkeleton,
8
+ K as ERROR_MESSAGES_FLAG,
9
+ Z as FLVURL,
10
+ t as FortuneCore,
10
11
  N as SERVICES_API_KEY,
11
- o as TEMPLATES,
12
+ l as TEMPLATES,
12
13
  r as api,
13
- I as clearColumnsCellsFormat,
14
- t as clearFilter,
15
- w as clearRowsCellsFormat,
16
- V as clearSelectedCellFormat,
17
- n as createFilter,
18
- k as deleteRowCol,
19
- M as deleteSelectedCellText,
20
- X as executeStringFunction,
21
- _ as formulaResponseUiSync,
22
- j as getFlowdata,
23
- v as getSheetIndex,
24
- d as handleCSVUpload,
25
- S as handleCopy,
26
- h as handleExportToCSV,
27
- c as handleExportToJSON,
28
- i as handleExportToXLSX,
29
- m as handleFreeze,
30
- C as handleHorizontalAlign,
31
- p as handleLink,
32
- E as handleMerge,
33
- F as handlePasteByClick,
34
- x as handleSort,
35
- g as handleTextSize,
14
+ O as clearColumnsCellsFormat,
15
+ n as clearFilter,
16
+ P as clearRowsCellsFormat,
17
+ X as clearSelectedCellFormat,
18
+ d as createFilter,
19
+ _ as deleteRowCol,
20
+ v as deleteSelectedCellText,
21
+ S as describeMatchedShortcut,
22
+ y as executeStringFunction,
23
+ D as formulaResponseUiSync,
24
+ U as getFlowdata,
25
+ j as getSheetIndex,
26
+ h as handleCSVUpload,
27
+ c as handleCopy,
28
+ i as handleExportToCSV,
29
+ m as handleExportToJSON,
30
+ u as handleExportToXLSX,
31
+ C as handleFreeze,
32
+ p as handleHorizontalAlign,
33
+ E as handleLink,
34
+ F as handleMerge,
35
+ x as handlePasteByClick,
36
+ g as handleSort,
37
+ f as handleTextSize,
36
38
  R as handleVerticalAlign,
37
- y as insertRowCol,
38
- z as jfrefreshgrid,
39
- P as loadLocale,
40
- f as removeActiveImage,
41
- L as showImgChooser,
42
- b as toolbarItemClickHandler,
43
- u as updateFormat,
44
- T as useXLSXImport
39
+ q as insertRowCol,
40
+ L as isFormulaListShortcut,
41
+ b as isOpenShortcutsModalShortcut,
42
+ A as isZoomInShortcut,
43
+ I as isZoomOutShortcut,
44
+ B as jfrefreshgrid,
45
+ G as loadLocale,
46
+ T as removeActiveImage,
47
+ w as showImgChooser,
48
+ V as toolbarItemClickHandler,
49
+ k as updateFormat,
50
+ M as useXLSXImport
45
51
  };
@@ -6,6 +6,27 @@ export declare function getCellValue(ctx: Context, row: number, column: number,
6
6
  type?: keyof Cell;
7
7
  }): any;
8
8
  export declare function setCellValue(ctx: Context, row: number, column: number, value: any, cellInput: HTMLDivElement | null, options?: CommonOptions, callAfterUpdate?: boolean): void;
9
+ /**
10
+ * Apply a cell value coming from a remote RTC peer, verbatim.
11
+ *
12
+ * This differs from `setCellValue` in two important ways and must be used for
13
+ * every Yjs-driven remote apply:
14
+ *
15
+ * 1. It NEVER runs the formula engine and NEVER fires the local-edit hooks
16
+ * (`onLocalCellEdit` / `afterUpdateCell`). The peer already computed the
17
+ * value, so we use the synced `v`/`m`/`f` as-is. This avoids both
18
+ * recomputation divergence and an update loop back into Yjs.
19
+ *
20
+ * 2. It PRESERVES the formula calc list. The regular `setCellValue` object
21
+ * branch calls `delFunctionGroup`, which removes the cell from `calcChain`
22
+ * and strips its dependency edges. Because `execFunctionGroup` walks
23
+ * `calcChain` to decide what to recompute, dropping a formula cell there
24
+ * permanently breaks its reactivity on that client (even after RTC stops).
25
+ * Here we instead keep formula cells registered via
26
+ * `insertUpdateFunctionGroup`, so they stay reactive to future local edits
27
+ * on both owner and peer.
28
+ */
29
+ export declare function applyRemoteCellValue(ctx: Context, row: number, column: number, value: any, options?: CommonOptions): void;
9
30
  export declare function clearCell(ctx: Context, row: number, column: number, options?: CommonOptions): void;
10
31
  export declare function setCellFormat(ctx: Context, row: number, column: number, attr: keyof Cell, value: any, options?: CommonOptions): void;
11
32
  export declare function autoFillCell(ctx: Context, copyRange: SingleRange, applyRange: SingleRange, direction: 'up' | 'down' | 'left' | 'right'): void;
@@ -1,4 +1,5 @@
1
1
  export { handleCopy } from './copy';
2
2
  export { handleGlobalKeyDown } from './keyboard';
3
+ export { describeMatchedShortcut, isOpenShortcutsModalShortcut, isFormulaListShortcut, isZoomInShortcut, isZoomOutShortcut, } from './keyboard-shortcut-utils';
3
4
  export { fixPositionOnFrozenCells, handleCellAreaMouseDown, handleCellAreaDoubleClick, handleContextMenu, mouseRender, handleOverlayMouseMove, handleOverlayMouseUp, handleRowHeaderMouseDown, handleColumnHeaderMouseDown, handleColSizeHandleMouseDown, handleColSizeHandleDoubleClick, handleRowSizeHandleMouseDown, handleColFreezeHandleMouseDown, handleRowFreezeHandleMouseDown, } from './mouse';
4
5
  export { handlePaste, handlePasteByClick } from './paste';
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Google Sheets–style keyboard matchers.
3
+ * - Letters / digits / F-keys: physical `code`
4
+ * - Punctuation (docs show characters): `code` + `key` + modifiers
5
+ */
6
+ export declare function hasMod(e: KeyboardEvent): boolean;
7
+ /**
8
+ * Insert date — Cmd/Ctrl+; (Google Sheets).
9
+ * Match on typed `;` character (AZERTY often uses Shift+, → code Comma).
10
+ * US QWERTY: physical Semicolon key without shift.
11
+ */
12
+ export declare function isInsertDateShortcut(e: KeyboardEvent): boolean;
13
+ /**
14
+ * Insert time — Cmd/Ctrl+Shift+; (Google Sheets).
15
+ * US QWERTY: Shift+; → key ":" code Semicolon.
16
+ * AZERTY (runtime): Cmd+Shift+; → code Comma with key "." or ","; Cmd+Shift+. → code Period with key "/" or ".".
17
+ */
18
+ export declare function isInsertTimeShortcut(e: KeyboardEvent): boolean;
19
+ /** Google Mac: ⌘+Option+Shift+; — insert date and time (AZERTY-safe). */
20
+ export declare function isInsertDateTimeShortcut(e: KeyboardEvent): boolean;
21
+ /**
22
+ * US / EU: Cmd/Ctrl+Shift+" — insert date and time.
23
+ * Mac AZERTY: `"` is Shift+3, but ⌘+Shift+3 is macOS screenshot (never reaches the page).
24
+ * Use ⌘+Option+Shift+3/; or Ctrl+Shift+3 instead (Google Mac alternates).
25
+ */
26
+ export declare function isUsInsertDateTimeQuoteShortcut(e: KeyboardEvent): boolean;
27
+ export declare function isPlainTextFormatShortcut(e: KeyboardEvent): boolean;
28
+ /**
29
+ * Strikethrough — Google Sheets:
30
+ * Mac: Cmd+Shift+X, Ctrl+Option+Shift+5
31
+ * Win: Alt+Shift+5, Ctrl+Shift+X
32
+ */
33
+ export declare function isStrikethroughShortcut(e: KeyboardEvent): boolean;
34
+ /** Google / dSheets: Cmd+Option+M (Mac), Ctrl+Alt+M (Win). AZERTY M-key slot. */
35
+ export declare function isInsertCommentShortcut(e: KeyboardEvent): boolean;
36
+ /** Google Sheets: Cmd/Ctrl+A — select all. AZERTY types "a" on physical KeyQ. */
37
+ export declare function isSelectAllShortcut(e: KeyboardEvent): boolean;
38
+ /**
39
+ * Number formats — Google Mac: Ctrl+Shift+1–6; also Cmd/Ctrl+Shift+1–6.
40
+ */
41
+ export declare function isNumberFormatModifier(e: KeyboardEvent): boolean;
42
+ export declare function isDigitFormatKey(e: KeyboardEvent, digit: string): boolean;
43
+ /**
44
+ * Formula list — Ctrl/Cmd+) (Google Sheets).
45
+ * US: Shift+0 → ")"; AZERTY: Shift+5 → ")" (code Digit5, often Equal-adjacent noise).
46
+ */
47
+ export declare function isFormulaListShortcut(e: KeyboardEvent): boolean;
48
+ export declare function isFindShortcut(e: KeyboardEvent): boolean;
49
+ export declare function isFindReplaceShortcut(e: KeyboardEvent): boolean;
50
+ export declare function isZoomInShortcut(e: KeyboardEvent): boolean;
51
+ export declare function isZoomOutShortcut(e: KeyboardEvent): boolean;
52
+ /**
53
+ * Open shortcuts modal — Ctrl/Cmd+/ (Google Sheets).
54
+ * AZERTY Mac: `/` is Shift+7; must not overlap zoom (+/=) or formula list `)`.
55
+ */
56
+ export declare function isOpenShortcutsModalShortcut(e: KeyboardEvent): boolean;
57
+ /** Label which engine shortcut would match (best-effort; for host debug tooling). */
58
+ export declare function describeMatchedShortcut(e: KeyboardEvent): string | null;
@@ -0,0 +1,7 @@
1
+ import { Context } from '../context';
2
+ import { GlobalCache } from '../types';
3
+
4
+ /**
5
+ * TEC-2311 shortcuts v2 — returns true when the event was handled.
6
+ */
7
+ export declare function handleShortcutsV2(ctx: Context, cellInput: HTMLDivElement, e: KeyboardEvent, cache: GlobalCache, canvas?: CanvasRenderingContext2D): boolean;
@@ -5,9 +5,9 @@ export { defaultContext, getFlowdata, ensureSheetIndex, initSheetIndex, updateCo
5
5
  export type { Context } from './context';
6
6
  export { defaultSettings } from './settings';
7
7
  export type { Settings, Hooks, DateBaseLocale } from './settings';
8
- export { handleCopy, handleGlobalKeyDown, handlePaste, handlePasteByClick, fixPositionOnFrozenCells, handleCellAreaMouseDown, handleCellAreaDoubleClick, handleContextMenu, mouseRender, handleOverlayMouseMove, handleOverlayMouseUp, handleRowHeaderMouseDown, handleColumnHeaderMouseDown, handleColSizeHandleMouseDown, handleColSizeHandleDoubleClick, handleRowSizeHandleMouseDown, handleColFreezeHandleMouseDown, handleRowFreezeHandleMouseDown, } from './events';
8
+ export { handleCopy, handleGlobalKeyDown, handlePaste, handlePasteByClick, fixPositionOnFrozenCells, handleCellAreaMouseDown, handleCellAreaDoubleClick, handleContextMenu, mouseRender, handleOverlayMouseMove, handleOverlayMouseUp, handleRowHeaderMouseDown, handleColumnHeaderMouseDown, handleColSizeHandleMouseDown, handleColSizeHandleDoubleClick, handleRowSizeHandleMouseDown, handleColFreezeHandleMouseDown, handleRowFreezeHandleMouseDown, describeMatchedShortcut, isOpenShortcutsModalShortcut, isFormulaListShortcut, isZoomInShortcut, isZoomOutShortcut, } from './events';
9
9
  export * from './locale';
10
- export { getBorderInfoComputeRange, getBorderInfoCompute, normalizedCellAttr, normalizedAttr, getCellValue, setCellValue, getRealCellValue, mergeBorder, cancelNormalSelected, updateCell, getRangetxt, getRangeByTxt, isValidRangeText, getInlineStringHTML, applyLinkToSelection, getHyperlinksFromInlineSegments, getUniformLinkFromWindowSelectionInEditor, getHyperlinkAtCaretInContentEditable, getStyleByCell, clearSelectedCellFormat, clearRowsCellsFormat, clearColumnsCellsFormat, clipboard, moveToEnd, getRangeRectsByCharacterOffset, getDateBaseLocale, getCanonicalDateEditFormat, getDateEditFormatForCell, isUsDateBaseLocale, normalizeDateBaseLocale, shouldPreserveDateFormatForEdit, setDateBaseLocale, update, is_date, valueShowEs, isTypedCurrencyDisplayFormat, isCurrencyLikeNumberFormat, buildFiatCurrencyFormat, quoteSsfLiteral, 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, getFilterHiddenRowsUnionFromFilterMap, getFilterHiddenRowsUnion, ensureManualHiddenInitialized, rebuildRowHiddenUnion, scrollToHighlightCell, selectTitlesMap, selectTitlesRange, defaultLuckysheetSelectRanges, normalizeSelection, syncPrimaryCellActiveFromSelection, selectionIsExactlyOneMergeBlock, 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, mergeSelectionHasValues, handleSort, handleFreeze, handleTextSize, handleSum, handleLink, captureLinkEditorOpenSnapshot, isHyperlinkCreationBlocked, toolbarItemClickHandler, toolbarItemSelectedFunc, handleScreenShot, insertImage, showImgChooser, drawArrow, setEditingComment, removeEditingComment, removeOverShowComment, newComment, editComment, deleteComment, showComments, showHideComment, showHideAllComments, onCommentBoxMoveStart, removeActiveImage, cancelActiveImgItem, onImageMoveStart, onImageResizeStart, createDropCellRange, sortSelection, sortSheetBySelectedColumn, searchAll, searchNext, replace, replaceAll, replaceAllScoped, getSearchIndexArr, getSearchIndexArrAsync, getFindRangeOnCurrentSheet, getQuickSearchIndexArr, getQuickSearchHiddenConfig, getCellHyperlinks, getHyperlinkDisplayTextInCell, getInlineLinkPlainRange, getUniformLinkCoveringPlainRange, getUniformLinkAtPlainOffset, removeHyperlinkForLink, updateHyperlinkForLink, syncLinkCardAfterHyperlinkChange, expandCellRectForMerge, shouldQuickSearchUseAsync, runQuickSearchIndexArrAsync, QUICK_SEARCH_ASYNC_ROW_THRESHOLD, parseRangeText, getCellRowColumn, getCellHyperlink, saveHyperlink, removeHyperlink, showLinkCard, goToLink, isLinkValid, createFilterOptions, clearFilter, clearFilterForColumn, toggleViewerFilter, createFilter, getFilterColumnValues, getFilterColumnColors, orderbydatafiler, saveFilter, onCellsMoveStart, cfSplitRange, updateMoreCell, getRegStr, getDataArr, applyLocation, getOptionValue, getSelectRange, getDropdownList, setDropdownValue, confirmMessage, setConditionRules, CF_DATE_DEFAULT_FORMAT, parseCfDateConditionForUi, formatCfDatePresetSnapshot, parseDdMmYyyyToSerial, handleOverlayTouchStart, handleOverlayTouchEnd, MAX_ZOOM_RATIO, MIN_ZOOM_RATIO, handleKeydownForZoom, jfrefreshgrid, sanitizeDuneUrl, insertDuneChart, onIframeMoveStart, onIframeResizeStart, onIframeMove, onIframeMoveEnd, onIframeResize, onIframeResizeEnd, setCellError, clearCellError, detectDateFormat, isdatatypemulti, diff, isdatetime, isRealNull, isRealNum, isNumericCellType, 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, isValidRangeText, getInlineStringHTML, applyLinkToSelection, getHyperlinksFromInlineSegments, getUniformLinkFromWindowSelectionInEditor, getHyperlinkAtCaretInContentEditable, getStyleByCell, clearSelectedCellFormat, clearRowsCellsFormat, clearColumnsCellsFormat, clipboard, moveToEnd, getRangeRectsByCharacterOffset, getDateBaseLocale, getCanonicalDateEditFormat, getDateEditFormatForCell, isUsDateBaseLocale, normalizeDateBaseLocale, shouldPreserveDateFormatForEdit, setDateBaseLocale, update, is_date, valueShowEs, isTypedCurrencyDisplayFormat, isCurrencyLikeNumberFormat, buildFiatCurrencyFormat, quoteSsfLiteral, 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, getFilterHiddenRowsUnionFromFilterMap, getFilterHiddenRowsUnion, ensureManualHiddenInitialized, rebuildRowHiddenUnion, scrollToHighlightCell, selectTitlesMap, selectTitlesRange, defaultLuckysheetSelectRanges, normalizeSelection, syncPrimaryCellActiveFromSelection, selectionIsExactlyOneMergeBlock, 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, mergeSelectionHasValues, handleSort, handleFreeze, handleTextSize, handleSum, handleLink, captureLinkEditorOpenSnapshot, isHyperlinkCreationBlocked, toolbarItemClickHandler, toolbarItemSelectedFunc, handleScreenShot, insertImage, showImgChooser, drawArrow, setEditingComment, removeEditingComment, removeOverShowComment, newComment, editComment, deleteComment, showComments, showHideComment, showHideAllComments, onCommentBoxMoveStart, removeActiveImage, cancelActiveImgItem, onImageMoveStart, onImageResizeStart, createDropCellRange, sortSelection, sortSheetBySelectedColumn, searchAll, searchNext, replace, replaceAll, replaceAllScoped, getSearchIndexArr, getSearchIndexArrAsync, getFindRangeOnCurrentSheet, getQuickSearchIndexArr, getQuickSearchHiddenConfig, getCellHyperlinks, getHyperlinkDisplayTextInCell, getInlineLinkPlainRange, getUniformLinkCoveringPlainRange, getUniformLinkAtPlainOffset, removeHyperlinkForLink, updateHyperlinkForLink, syncLinkCardAfterHyperlinkChange, expandCellRectForMerge, shouldQuickSearchUseAsync, runQuickSearchIndexArrAsync, QUICK_SEARCH_ASYNC_ROW_THRESHOLD, parseRangeText, getCellRowColumn, getCellHyperlink, saveHyperlink, removeHyperlink, showLinkCard, goToLink, isLinkValid, createFilterOptions, clearFilter, clearFilterForColumn, toggleViewerFilter, createFilter, applySheetFilterState, getFilterColumnValues, getFilterColumnColors, orderbydatafiler, saveFilter, onCellsMoveStart, cfSplitRange, updateMoreCell, getRegStr, getDataArr, applyLocation, getOptionValue, getSelectRange, getDropdownList, setDropdownValue, confirmMessage, setConditionRules, CF_DATE_DEFAULT_FORMAT, parseCfDateConditionForUi, formatCfDatePresetSnapshot, parseDdMmYyyyToSerial, handleOverlayTouchStart, handleOverlayTouchEnd, MAX_ZOOM_RATIO, MIN_ZOOM_RATIO, handleKeydownForZoom, jfrefreshgrid, sanitizeDuneUrl, insertDuneChart, onIframeMoveStart, onIframeResizeStart, onIframeMove, onIframeMoveEnd, onIframeResize, onIframeResizeEnd, setCellError, clearCellError, detectDateFormat, 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';
@@ -46,3 +46,16 @@ export declare function getFilterColumnColors(ctx: Context, col: number, startRo
46
46
  fcColors: FilterColor[];
47
47
  };
48
48
  export declare function saveFilter(ctx: Context, optionState: boolean, hiddenRows: Record<string, number>, caljs: any, st_r: number, ed_r: number, cindex: number, st_c: number, ed_c: number): void;
49
+ type SheetFilterState = {
50
+ filter?: Record<string, any> | null;
51
+ filter_select?: {
52
+ row: number[];
53
+ column: number[];
54
+ } | null;
55
+ };
56
+ /**
57
+ * Apply filter state from Yjs on a remote RTC peer without a Workbook remount.
58
+ * Bypasses isAllowEdit — caller must only invoke for remote-origin updates.
59
+ */
60
+ export declare function applySheetFilterState(ctx: Context, sheetId: string, state: SheetFilterState): void;
61
+ export {};
@@ -22,7 +22,7 @@ export { sortSelection, sortSheetBySelectedColumn, spillSortResult, } from './so
22
22
  export { searchAll, searchNext, replace, replaceAll, replaceAllScoped, getSearchIndexArr, getSearchIndexArrAsync, getFindRangeOnCurrentSheet, getQuickSearchIndexArr, getQuickSearchHiddenConfig, expandCellRectForMerge, shouldQuickSearchUseAsync, runQuickSearchIndexArrAsync, QUICK_SEARCH_ASYNC_ROW_THRESHOLD, parseRangeText, } from './searchReplace';
23
23
  export type { CheckModes, HyperlinkMap, FindSearchScope, ReplaceScope, SearchHiddenConfig, SearchNextResult, ReplaceAllResult, } from './searchReplace';
24
24
  export { getCellRowColumn, getCellHyperlink, getCellHyperlinks, getHyperlinkDisplayTextInCell, getInlineLinkPlainRange, getUniformLinkCoveringPlainRange, getUniformLinkAtPlainOffset, saveHyperlink, removeHyperlink, removeHyperlinkForLink, updateHyperlinkForLink, syncLinkCardAfterHyperlinkChange, showLinkCard, goToLink, isLinkValid, } from './hyperlink';
25
- export { createFilterOptions, clearFilter, clearFilterForColumn, toggleViewerFilter, createFilter, getFilterColumnValues, getFilterColumnColors, orderbydatafiler, saveFilter, } from './filter';
25
+ export { createFilterOptions, clearFilter, clearFilterForColumn, toggleViewerFilter, createFilter, applySheetFilterState, getFilterColumnValues, getFilterColumnColors, orderbydatafiler, saveFilter, } from './filter';
26
26
  export type { FilterDate, FilterValue, FilterColor } from './filter';
27
27
  export { onCellsMoveStart, onCellsMove, onCellsMoveEnd } from './moveCells';
28
28
  export { cfSplitRange } from './conditionalFormat';
@@ -70,6 +70,7 @@ export declare function fillDownData(ctx: Context): string;
70
70
  export declare function textFormat(ctx: Context, type: 'left' | 'center' | 'right'): string;
71
71
  export declare function fillDate(ctx: Context): string;
72
72
  export declare function fillTime(ctx: Context): string;
73
+ export declare function fillDateTime(ctx: Context): string;
73
74
  export declare function selectIsOverlap(ctx: Context, range?: any): boolean;
74
75
  export declare function selectAll(ctx: Context): void;
75
76
  export declare function fixRowStyleOverflowInFreeze(ctx: Context, r1: number, r2: number, freeze: Freezen | undefined): {
@@ -90,4 +91,11 @@ export declare function calcSelectionInfo(ctx: Context): {
90
91
  min: number;
91
92
  average: string;
92
93
  };
94
+ /** Move the active selection focus to an absolute row/column (Home/End navigation). */
95
+ export declare function jumpHighlightCell(ctx: Context, targetRow: number, targetCol: number): void;
96
+ /**
97
+ * Fill every cell in the current selection with the active/focus cell value
98
+ * (Ctrl/Cmd+Enter — same value across the whole selection).
99
+ */
100
+ export declare function fillSelectionWithActiveValue(ctx: Context, cellInput: HTMLDivElement, canvas?: CanvasRenderingContext2D): boolean;
93
101
  export {};
@@ -1,3 +1,4 @@
1
1
  export declare const MAX_ZOOM_RATIO = 4;
2
2
  export declare const MIN_ZOOM_RATIO = 0.1;
3
3
  export declare function handleKeydownForZoom(ev: KeyboardEvent, currentZoom: number): number;
4
+ export declare function applyZoomStep(currentZoom: number, direction: 'in' | 'out' | 'reset'): number;
@@ -25,6 +25,8 @@ export type Hooks = {
25
25
  updateCellYdoc?: (changes: SheetChangePath[]) => void;
26
26
  updateAllCell?: (sheetId: string) => void;
27
27
  beforeUpdateCell?: (r: number, c: number, value: any) => boolean;
28
+ /** Clears RTC remote-apply lock so local edits can run data-block formulas. */
29
+ onLocalCellEdit?: () => void;
28
30
  afterUpdateCell?: (row: number, column: number, oldValue: any, newValue: any) => void;
29
31
  afterSelectionChange?: (sheetId: string, selection: Selection) => void;
30
32
  beforeRenderRowHeaderCell?: (rowNumber: string, rowIndex: number, top: number, width: number, height: number, ctx: CanvasRenderingContext2D) => boolean;
@@ -131,6 +133,7 @@ export type Settings = {
131
133
  onSheetCountChange?: (count: number) => void;
132
134
  isAuthorized?: boolean;
133
135
  isFlvReadOnly?: boolean;
136
+ isRTCActive?: boolean;
134
137
  dateBaseLocale?: DateBaseLocale;
135
138
  /** When true, do not auto-select A1 on load (e.g. onboarding modal runs first). */
136
139
  suppressInitialCellSelection?: boolean;
@@ -112,6 +112,7 @@ export type Presence = {
112
112
  username: string;
113
113
  userId?: string;
114
114
  color: string;
115
+ isEns?: boolean;
115
116
  selection: {
116
117
  r: number;
117
118
  c: number;
@@ -19,6 +19,17 @@ export declare function generateAPIs(context: Context, setContext: (recipe: (ctx
19
19
  setCellValue: (row: number, column: number, value: any, options?: api.CommonOptions & {
20
20
  type?: keyof Cell;
21
21
  }, callAfterUpdate?: boolean) => void;
22
+ /**
23
+ * Apply a cell value coming from a remote RTC peer, verbatim.
24
+ *
25
+ * Use this (instead of `setCellValue`) for every Yjs-driven remote apply:
26
+ * it writes the synced value/formula as-is without running the formula
27
+ * engine and without firing local-edit hooks, while keeping formula cells
28
+ * registered in `calcChain` so they remain reactive to future local edits.
29
+ */
30
+ applyRemoteCellValue: (row: number, column: number, value: any, options?: api.CommonOptions & {
31
+ type?: keyof Cell;
32
+ }) => void;
22
33
  setCellError: (row: number, column: number, errorMessage: {
23
34
  title: string;
24
35
  message: string;
@@ -126,6 +137,18 @@ export declare function generateAPIs(context: Context, setContext: (recipe: (ctx
126
137
  activateSheet: (options?: api.CommonOptions) => void;
127
138
  setSheetName: (name: string, options?: api.CommonOptions) => void;
128
139
  setSheetOrder: (orderList: Record<string, number>) => void;
140
+ setSheetImages: (images: any[], options?: api.CommonOptions) => void;
141
+ setSheetIframes: (iframes: any[], options?: api.CommonOptions) => void;
142
+ setSheetDataVerification: (dataVerification: Record<string, any>, options?: api.CommonOptions) => void;
143
+ setSheetFilterState: (state: {
144
+ filter?: Record<string, any> | null;
145
+ filter_select?: {
146
+ row: number[];
147
+ column: number[];
148
+ } | null;
149
+ }, options?: api.CommonOptions) => void;
150
+ setSheetMapField: (field: string, value: Record<string, any> | null | undefined, options?: api.CommonOptions) => void;
151
+ setSheetConditionFormatRules: (rules: any[], options?: api.CommonOptions) => void;
129
152
  scroll: (options: {
130
153
  scrollLeft?: number;
131
154
  scrollTop?: number;
@@ -23,6 +23,9 @@ declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalPro
23
23
  setCellValue: (row: number, column: number, value: any, options?: api.CommonOptions & {
24
24
  type?: keyof import('../../../core').Cell;
25
25
  }, callAfterUpdate?: boolean) => void;
26
+ applyRemoteCellValue: (row: number, column: number, value: any, options?: api.CommonOptions & {
27
+ type?: keyof import('../../../core').Cell;
28
+ }) => void;
26
29
  setCellError: (row: number, column: number, errorMessage: {
27
30
  title: string;
28
31
  message: string;
@@ -130,6 +133,18 @@ declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalPro
130
133
  activateSheet: (options?: api.CommonOptions) => void;
131
134
  setSheetName: (name: string, options?: api.CommonOptions) => void;
132
135
  setSheetOrder: (orderList: Record<string, number>) => void;
136
+ setSheetImages: (images: any[], options?: api.CommonOptions) => void;
137
+ setSheetIframes: (iframes: any[], options?: api.CommonOptions) => void;
138
+ setSheetDataVerification: (dataVerification: Record<string, any>, options?: api.CommonOptions) => void;
139
+ setSheetFilterState: (state: {
140
+ filter?: Record<string, any> | null;
141
+ filter_select?: {
142
+ row: number[];
143
+ column: number[];
144
+ } | null;
145
+ }, options?: api.CommonOptions) => void;
146
+ setSheetMapField: (field: string, value: Record<string, any> | null | undefined, options?: api.CommonOptions) => void;
147
+ setSheetConditionFormatRules: (rules: any[], options?: api.CommonOptions) => void;
133
148
  scroll: (options: {
134
149
  scrollLeft?: number;
135
150
  scrollTop?: number;