@fileverse-dev/dsheet 4.1.23-stabilise-package-3 → 4.1.23-stabilise-package-4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/editor/contexts/editor-context.d.ts +2 -0
- package/dist/editor/hooks/use-celldata-compaction.d.ts +23 -2
- package/dist/editor/hooks/use-celldata-compaction.test.d.ts +1 -0
- package/dist/editor/utils/active-sheet-keeper.test.d.ts +1 -0
- package/dist/editor/utils/structural-edit-other-tabs.test.d.ts +1 -0
- package/dist/{executeStringFunction-D5BTPrXL.js → executeStringFunction-BsVLVYUB.js} +711 -691
- package/dist/formula.js +1 -1
- package/dist/{index-BXNWi7s5.js → index-YKT7Lz7Z.js} +18943 -18699
- package/dist/index.es.js +2 -2
- package/dist/sheet-engine/react/components/ContextMenu/FilterMenu.d.ts +2 -2
- package/dist/sheet-engine/react/components/ContextMenu/SheetTab.d.ts +2 -2
- package/dist/sheet-engine/react/components/ContextMenu/index.d.ts +2 -2
- package/dist/sheet-engine/react/components/NotationBoxes/shown-comments.d.ts +16 -0
- package/dist/sheet-engine/react/components/NotationBoxes/shown-comments.test.d.ts +1 -0
- package/dist/sheet-engine/react/components/SVGDefines.d.ts +2 -2
- package/dist/sheet-engine/react/components/SheetOverlay/editing-as-formula.d.ts +7 -0
- package/dist/sheet-engine/react/components/SheetOverlay/editing-as-formula.test.d.ts +1 -0
- package/dist/sheet-engine/react/components/SheetOverlay/hover-tracker.d.ts +40 -0
- package/dist/sheet-engine/react/components/SheetOverlay/hover-tracker.test.d.ts +1 -0
- package/dist/sheet-engine/react/components/SheetTab/index.d.ts +2 -2
- package/dist/sheet-engine/react/components/Toolbar/FunctionList/group-functions.d.ts +9 -0
- package/dist/sheet-engine/react/components/Toolbar/FunctionList/group-functions.test.d.ts +1 -0
- package/dist/sheet-engine/react/components/Toolbar/index.d.ts +2 -2
- package/dist/sheet-engine/react/components/Workbook/stable-handle.d.ts +8 -0
- package/dist/sheet-engine/react/components/Workbook/stable-handle.test.d.ts +1 -0
- package/dist/sheet-engine/react/context/index.d.ts +15 -0
- package/dist/sheet-engine/react/context/use-workbook-store.d.ts +30 -0
- package/dist/sheet-engine/react/context/workbook-store.d.ts +30 -0
- package/dist/sheet-engine/react/context/workbook-store.test.d.ts +1 -0
- package/dist/{use-xlsx-import-impl-gsG9w9qV.js → use-xlsx-import-impl-8Lojcck9.js} +4 -4
- package/dist/{xlsx-defined-names-dZveijsB.js → xlsx-defined-names-D3F23p2Z.js} +2 -2
- package/dist/{xlsx-export-impl-B10lK_L2.js → xlsx-export-impl-DXWvjnk5.js} +4 -4
- package/dist/{xlsx-hyperlink-inline-BFbPe75M.js → xlsx-hyperlink-inline-07QbQDEt.js} +2 -2
- package/package.json +1 -1
|
@@ -37,6 +37,8 @@ export interface EditorContextType {
|
|
|
37
37
|
rebuildLocalStore: () => Promise<void>;
|
|
38
38
|
sheetEditorRef: React.MutableRefObject<WorkbookInstance | null>;
|
|
39
39
|
setSheetEditorRef: React.RefCallback<WorkbookInstance>;
|
|
40
|
+
/** Call when the active sheet changes or sheets appear; lets the keeper remember or restore it. */
|
|
41
|
+
notifyActiveSheetChange: () => void;
|
|
40
42
|
ydocRef: React.MutableRefObject<Y.Doc | null>;
|
|
41
43
|
persistenceRef: React.MutableRefObject<IndexeddbPersistence | null>;
|
|
42
44
|
sheetData: Sheet[];
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { MutableRefObject, RefObject } from 'react';
|
|
2
2
|
import { WorkbookInstance, Sheet } from '../../sheet-engine/react';
|
|
3
|
+
import { planYdocCompaction } from '../utils/compact-committed-celldata';
|
|
3
4
|
|
|
4
|
-
import
|
|
5
|
+
import * as Y from 'yjs';
|
|
5
6
|
type UseCelldataCompactionArgs = {
|
|
6
7
|
dsheetId: string;
|
|
7
8
|
ydocRef: RefObject<Y.Doc | null>;
|
|
@@ -12,11 +13,31 @@ type UseCelldataCompactionArgs = {
|
|
|
12
13
|
isDataLoaded: boolean;
|
|
13
14
|
isReadOnly: boolean;
|
|
14
15
|
remoteUpdateRef: MutableRefObject<boolean>;
|
|
16
|
+
/** True while a structural remote change waits to remount the Workbook. */
|
|
17
|
+
structuralRemountPendingRef?: MutableRefObject<boolean>;
|
|
15
18
|
collabSyncing: boolean;
|
|
16
19
|
};
|
|
20
|
+
/**
|
|
21
|
+
* False while a remote apply is running, while a structural remount is pending
|
|
22
|
+
* (the engine still has the old grid and the Yjs document has the new one) or
|
|
23
|
+
* while collaboration is still syncing.
|
|
24
|
+
*/
|
|
25
|
+
export declare function canRunCompaction(refs: {
|
|
26
|
+
remoteUpdateRef: MutableRefObject<boolean>;
|
|
27
|
+
structuralRemountPendingRef?: MutableRefObject<boolean>;
|
|
28
|
+
}, collabSyncing: boolean): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Applies the plan chunk by chunk, yielding between chunks. The plan was made
|
|
31
|
+
* from the document as it was, and one change in it, the whole-value
|
|
32
|
+
* borderInfo write, would overwrite a newer value. So the run stops, leaving
|
|
33
|
+
* the compaction unfinished (it is retried on a later open), as soon as the
|
|
34
|
+
* document differs from what the previous chunk left. Returns true when every
|
|
35
|
+
* chunk was applied.
|
|
36
|
+
*/
|
|
37
|
+
export declare function applyCompactionChangesInChunks(ydoc: Y.Doc, dsheetId: string, changes: ReturnType<typeof planYdocCompaction>['changes'], handleOnChangePortalUpdate: () => void, isCancelled: () => boolean, sheetEditorRef: RefObject<WorkbookInstance | null>, chunkSize?: number): Promise<boolean>;
|
|
17
38
|
/**
|
|
18
39
|
* One-shot background compaction (celldata + borderInfo). Completion is stored
|
|
19
40
|
* on the anchor sheet's config in Yjs so it syncs across devices.
|
|
20
41
|
*/
|
|
21
|
-
export declare function useCelldataCompaction({ dsheetId, ydocRef, sheetEditorRef, currentDataRef, handleOnChangePortalUpdate, syncStatus, isDataLoaded, isReadOnly, remoteUpdateRef, collabSyncing, }: UseCelldataCompactionArgs): void;
|
|
42
|
+
export declare function useCelldataCompaction({ dsheetId, ydocRef, sheetEditorRef, currentDataRef, handleOnChangePortalUpdate, syncStatus, isDataLoaded, isReadOnly, remoteUpdateRef, structuralRemountPendingRef, collabSyncing, }: UseCelldataCompactionArgs): void;
|
|
22
43
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|