@fileverse-dev/dsheet 4.0.3-import-compaction.1 → 4.0.3-import-compaction.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.
- package/dist/editor/hooks/use-celldata-compaction.d.ts +2 -3
- package/dist/editor/utils/compact-committed-celldata.d.ts +11 -10
- package/dist/{index-CtF9qA4V.js → index-DdJcYIoi.js} +4016 -3905
- package/dist/index.es.js +1 -1
- package/dist/sheet-engine/core/paste/paste-border-utils.d.ts +2 -0
- package/dist/sheet-engine/core/types.d.ts +2 -0
- package/dist/use-xlsx-import-impl-DVD4F0Xa.js +1892 -0
- package/dist/{xlsx-export-impl-DZRu--sN.js → xlsx-export-impl-Dtm9yKqt.js} +10 -11
- package/dist/xlsx-hyperlink-inline-D8ZL-y78.js +195 -0
- package/package.json +1 -1
- package/dist/use-xlsx-import-impl-DC5xEiJb.js +0 -1895
- package/dist/xlsx-hyperlink-inline-DzewAypN.js +0 -71
- package/dist/xlsx-image-utils-Cvg0qxRA.js +0 -126
|
@@ -15,9 +15,8 @@ type UseCelldataCompactionArgs = {
|
|
|
15
15
|
collabSyncing: boolean;
|
|
16
16
|
};
|
|
17
17
|
/**
|
|
18
|
-
* One-shot background compaction
|
|
19
|
-
*
|
|
20
|
-
* after the editor is synced and idle so it does not compete with load or edits.
|
|
18
|
+
* One-shot background compaction (celldata + borderInfo). Completion is stored
|
|
19
|
+
* on the anchor sheet's config in Yjs so it syncs across devices.
|
|
21
20
|
*/
|
|
22
21
|
export declare function useCelldataCompaction({ dsheetId, ydocRef, sheetEditorRef, currentDataRef, handleOnChangePortalUpdate, syncStatus, isDataLoaded, isReadOnly, remoteUpdateRef, collabSyncing, }: UseCelldataCompactionArgs): void;
|
|
23
22
|
export {};
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import { CellMatrix, CellWithRowAndCol, Sheet } from '../../sheet-engine/core/types';
|
|
2
2
|
import { SheetChangePath } from './update-ydoc';
|
|
3
3
|
import * as Y from 'yjs';
|
|
4
|
-
|
|
5
|
-
export
|
|
4
|
+
/** Celldata + borderInfo compaction; bump when rules change. */
|
|
5
|
+
export declare const SHEET_COMPACTION_REV = 2;
|
|
6
|
+
export declare const SHEET_COMPACTION_CONFIG_KEY = "sheetCompactionRev";
|
|
7
|
+
export type SheetCompactionResult = {
|
|
6
8
|
removedFromYdoc: number;
|
|
7
9
|
clearedInMemory: number;
|
|
8
10
|
changes: SheetChangePath[];
|
|
9
11
|
};
|
|
10
|
-
export declare function
|
|
11
|
-
export declare function
|
|
12
|
-
export declare function
|
|
12
|
+
export declare function readSheetCompactionRev(config: unknown): number;
|
|
13
|
+
export declare function getAnchorSheet(sheets: Sheet[] | null | undefined): Sheet | null;
|
|
14
|
+
export declare function hasSheetCompactionCompleted(ydoc: Y.Doc, dsheetId: string): boolean;
|
|
15
|
+
export declare function buildCompactionRevChange(ydoc: Y.Doc, dsheetId: string): SheetChangePath | null;
|
|
16
|
+
export declare function markCompactionRevInMemory(sheets: Sheet[] | null | undefined): void;
|
|
13
17
|
/** Collect Yjs celldata keys that should not be persisted (format-only / empty ghosts). */
|
|
14
18
|
export declare function collectStaleCelldataKeys(celldataMap: Y.Map<unknown> | Record<string, unknown> | null | undefined): string[];
|
|
15
19
|
export declare function buildCelldataDeleteChanges(sheetId: string, keys: string[]): SheetChangePath[];
|
|
@@ -21,8 +25,5 @@ export declare function compactSheetCelldataArray(celldata: CellWithRowAndCol[]
|
|
|
21
25
|
removed: number;
|
|
22
26
|
};
|
|
23
27
|
export declare function compactInMemorySheets(sheets: Sheet[] | null | undefined): number;
|
|
24
|
-
/**
|
|
25
|
-
|
|
26
|
-
* `changes` via `updateYdocSheetData`.
|
|
27
|
-
*/
|
|
28
|
-
export declare function planYdocCelldataCompaction(ydoc: Y.Doc, dsheetId: string): CelldataCompactionResult;
|
|
28
|
+
/** Scan Y.Doc for committed ghosts. Does not mutate — caller applies `changes`. */
|
|
29
|
+
export declare function planYdocCompaction(ydoc: Y.Doc, dsheetId: string): SheetCompactionResult;
|