@fileverse-dev/dsheet 4.1.22 → 4.1.23-stabilise-package-3
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/README.md +10 -0
- package/dist/editor/components/editor-workbook.d.ts +6 -0
- package/dist/editor/components/sidebar/editor-right-sidebar.d.ts +3 -1
- package/dist/editor/components/sidebar/sidebar-offsets.d.ts +12 -0
- package/dist/editor/components/sidebar/sidebar-offsets.test.d.ts +1 -0
- package/dist/editor/contexts/editor-context.d.ts +7 -0
- package/dist/editor/hooks/use-editor-data.d.ts +1 -0
- package/dist/editor/hooks/use-editor-sync.d.ts +5 -1
- package/dist/editor/types.d.ts +54 -1
- package/dist/editor/utils/activate-sheet-for-link.d.ts +3 -0
- package/dist/editor/utils/active-sheet-keeper.d.ts +21 -0
- package/dist/editor/utils/after-update-cell.d.ts +6 -0
- package/dist/editor/utils/after-update-cell.test.d.ts +1 -0
- package/dist/editor/utils/apply-comment-markers.d.ts +3 -1
- package/dist/editor/utils/apply-comment-markers.test.d.ts +1 -0
- package/dist/editor/utils/calc-chain-ydoc-update.test.d.ts +1 -0
- package/dist/editor/utils/content-change.d.ts +48 -0
- package/dist/editor/utils/content-change.test.d.ts +1 -0
- package/dist/editor/utils/content-fingerprint.d.ts +37 -0
- package/dist/editor/utils/content-fingerprint.test.d.ts +1 -0
- package/dist/editor/utils/editor-handle.d.ts +1 -1
- package/dist/editor/utils/format-gate.d.ts +27 -0
- package/dist/editor/utils/format-gate.test.d.ts +1 -0
- package/dist/editor/utils/legacy-on-change.d.ts +20 -0
- package/dist/editor/utils/legacy-on-change.test.d.ts +1 -0
- package/dist/editor/utils/navigate-to-sheet.d.ts +22 -0
- package/dist/editor/utils/patch-plain-celldata.d.ts +19 -0
- package/dist/editor/utils/patch-plain-celldata.test.d.ts +1 -0
- package/dist/editor/utils/rebuild-indexeddb-store.d.ts +19 -0
- package/dist/editor/utils/rebuild-indexeddb-store.failure.test.d.ts +1 -0
- package/dist/editor/utils/rebuild-indexeddb-store.test.d.ts +1 -0
- package/dist/editor/utils/remote-apply-guard.d.ts +48 -0
- package/dist/editor/utils/remote-apply-guard.test.d.ts +1 -0
- package/dist/editor/utils/sheet-ydoc-sync-utils.d.ts +13 -4
- package/dist/editor/utils/sheet-ydoc-sync-utils.test.d.ts +1 -0
- package/dist/editor/utils/structural-edit-formula-sync.test.d.ts +1 -0
- package/dist/editor/utils/update-ydoc.d.ts +9 -1
- package/dist/editor/utils/wait-for-sync.d.ts +35 -0
- package/dist/editor/utils/wait-for-sync.test.d.ts +1 -0
- package/dist/{es-S4GKlN-t.js → es-BlDQ6jCL.js} +1 -0
- package/dist/{executeStringFunction-CQ922vEp.js → executeStringFunction-D5BTPrXL.js} +10265 -9843
- package/dist/formula.js +1 -1
- package/dist/{hi-DMMTDTxZ.js → hi-CP0ta0Yk.js} +1 -0
- package/dist/{index-DhQTrCQd.js → index-BXNWi7s5.js} +22557 -21465
- package/dist/index.d.ts +1 -1
- package/dist/index.es.js +31 -31
- package/dist/persistence-utils-CSKBobX8.js +151 -0
- package/dist/persistence-utils.d.ts +2 -0
- package/dist/persistence.append.test.d.ts +1 -0
- package/dist/persistence.d.ts +13 -0
- package/dist/persistence.fingerprint.test.d.ts +1 -0
- package/dist/persistence.js +122 -74
- package/dist/sheet-engine/core/api/cell.d.ts +20 -1
- package/dist/sheet-engine/core/api/remote-apply.test.d.ts +1 -0
- package/dist/sheet-engine/core/api/sheet-flowdata-lifecycle.d.ts +1 -0
- package/dist/sheet-engine/core/api/sheet-flowdata-lifecycle.test.d.ts +1 -0
- package/dist/sheet-engine/core/index.d.ts +1 -1
- package/dist/sheet-engine/core/locale/en.d.ts +1 -0
- package/dist/sheet-engine/core/locale/es.d.ts +1 -0
- package/dist/sheet-engine/core/locale/hi.d.ts +1 -0
- package/dist/sheet-engine/core/locale/zh.d.ts +1 -0
- package/dist/sheet-engine/core/locale/zh_tw.d.ts +1 -0
- package/dist/sheet-engine/core/modules/b6-ydoc-writes.test.d.ts +1 -0
- package/dist/sheet-engine/core/modules/border.d.ts +9 -0
- package/dist/sheet-engine/core/modules/cell-shift.d.ts +11 -0
- package/dist/sheet-engine/core/modules/cell.commit-ydoc.test.d.ts +1 -0
- package/dist/sheet-engine/core/modules/dataVerification.d.ts +15 -0
- package/dist/sheet-engine/core/modules/engine-hot-spots.test.d.ts +1 -0
- package/dist/sheet-engine/core/modules/formula-async-eval.d.ts +5 -0
- package/dist/sheet-engine/core/modules/formula-narrowing.test.d.ts +1 -0
- package/dist/sheet-engine/core/modules/formula-snapshot-eval.d.ts +2 -0
- package/dist/sheet-engine/core/modules/formula-transitive-deps.d.ts +5 -1
- package/dist/sheet-engine/core/modules/formula-warmup.d.ts +37 -0
- package/dist/sheet-engine/core/modules/formula-warmup.test.d.ts +1 -0
- package/dist/sheet-engine/core/modules/formula.d.ts +57 -1
- package/dist/sheet-engine/core/modules/formula.dep-graph.test.d.ts +1 -0
- package/dist/sheet-engine/core/modules/formula.str-change.test.d.ts +1 -0
- package/dist/sheet-engine/core/modules/formula.wide-seed.test.d.ts +1 -0
- package/dist/sheet-engine/core/modules/history-calc-chain.d.ts +39 -0
- package/dist/sheet-engine/core/modules/history-calc-chain.test.d.ts +1 -0
- package/dist/sheet-engine/core/modules/history-grid-size.d.ts +16 -0
- package/dist/sheet-engine/core/modules/history-grid-size.test.d.ts +1 -0
- package/dist/sheet-engine/core/modules/index.d.ts +3 -2
- package/dist/sheet-engine/core/paste/paste-dep-graph.test.d.ts +1 -0
- package/dist/sheet-engine/core/paste-helpers/calculate-range-cell-size.d.ts +14 -0
- package/dist/sheet-engine/core/paste-helpers/calculate-range-cell-size.test.d.ts +1 -0
- package/dist/sheet-engine/core/settings.d.ts +15 -1
- package/dist/sheet-engine/core/utils/ydoc-celldata-changes.d.ts +29 -2
- package/dist/sheet-engine/react/components/ContextMenu/sheet-tab-menu-items.d.ts +15 -0
- package/dist/sheet-engine/react/components/Workbook/api.d.ts +4 -0
- package/dist/sheet-engine/react/components/Workbook/denomination-scan.d.ts +16 -0
- package/dist/sheet-engine/react/components/Workbook/denomination-scan.test.d.ts +1 -0
- package/dist/sheet-engine/react/components/Workbook/index.d.ts +2 -0
- package/dist/style.css +1 -1
- package/dist/sync-local/SyncManager.d.ts +2 -2
- package/dist/sync-local/SyncManager.remote-apply.test.d.ts +1 -0
- package/dist/sync-local/types/index.d.ts +2 -1
- package/dist/{template-data-list-BYOIK_Nd.js → template-data-list-apgmwRAT.js} +18 -10
- package/dist/{use-xlsx-import-impl-xphBNZu3.js → use-xlsx-import-impl-gsG9w9qV.js} +120 -119
- package/dist/{xlsx-defined-names-3g5n40BA.js → xlsx-defined-names-dZveijsB.js} +2 -2
- package/dist/{xlsx-export-impl-DXyQpmMi.js → xlsx-export-impl-B10lK_L2.js} +4 -4
- package/dist/{xlsx-hyperlink-inline-Cl9CbP5N.js → xlsx-hyperlink-inline-BFbPe75M.js} +2 -2
- package/dist/{zh-Bv4KIDiJ.js → zh-CmOCFd5t.js} +1 -0
- package/dist/{zh_tw-BdpsK45h.js → zh_tw-BqyRw1gX.js} +1 -0
- package/package.json +2 -2
- package/dist/persistence-utils-BXFajzvq.js +0 -98
|
@@ -2,19 +2,29 @@ import { WorkbookInstance } from '../../sheet-engine/react';
|
|
|
2
2
|
import { SheetChangePath } from './update-ydoc';
|
|
3
3
|
|
|
4
4
|
import * as Y from 'yjs';
|
|
5
|
+
export { readYdocSheetField } from './update-ydoc';
|
|
6
|
+
/** Sheet fields the per-feature Yjs hooks sync. */
|
|
7
|
+
export declare const SYNCED_SHEET_FIELDS: readonly ["calcChain", "config", "dataVerification", "luckysheet_conditionformat_save", "hyperlink", "filter", "filter_select", "liveQueryList", "dataBlockCalcFunction"];
|
|
5
8
|
type SyncContext = {
|
|
6
9
|
currentSheetId: string;
|
|
10
|
+
/** Only `field` is populated: the value stored in Yjs. */
|
|
7
11
|
oldSheet: Record<string, any>;
|
|
12
|
+
/** The engine's current value of `field` for the active sheet. */
|
|
13
|
+
newValue: any;
|
|
14
|
+
/** The engine's active sheet, for checks against its cells. */
|
|
15
|
+
engineSheet: Record<string, any> | undefined;
|
|
8
16
|
ydoc: Y.Doc;
|
|
9
17
|
};
|
|
10
18
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
19
|
+
* Old (Yjs) and new (engine) value of one field of the active sheet (A3).
|
|
20
|
+
* Reads only that field: no whole-workbook conversion, and no getSheet(),
|
|
21
|
+
* which rebuilds celldata from the dense grid.
|
|
13
22
|
*/
|
|
14
|
-
export declare const getSheetYdocSyncContext: ({ sheetEditorRef, ydocRef, dsheetId, }: {
|
|
23
|
+
export declare const getSheetYdocSyncContext: ({ sheetEditorRef, ydocRef, dsheetId, field, }: {
|
|
15
24
|
sheetEditorRef: React.RefObject<WorkbookInstance | null>;
|
|
16
25
|
ydocRef: React.RefObject<Y.Doc | null>;
|
|
17
26
|
dsheetId: string;
|
|
27
|
+
field: string;
|
|
18
28
|
}) => SyncContext | null;
|
|
19
29
|
export declare const buildMapFieldChanges: ({ sheetId, fieldPath, oldData, newData, }: {
|
|
20
30
|
sheetId: string;
|
|
@@ -28,4 +38,3 @@ export declare const applyYdocSheetChanges: ({ ydoc, dsheetId, changes, handleCo
|
|
|
28
38
|
changes: SheetChangePath[];
|
|
29
39
|
handleContentPortal?: any;
|
|
30
40
|
}) => void;
|
|
31
|
-
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -17,5 +17,13 @@ export type SheetChangePath = {
|
|
|
17
17
|
export declare const updateYdocSheetData: (ydoc: Y.Doc | null, dsheetId: string, changes: SheetChangePath[], handleContentPortal: any, onCellFormatRangesCommitted?: (commits: Array<{
|
|
18
18
|
sheetId: string;
|
|
19
19
|
ranges: CellFormatRange[];
|
|
20
|
-
}>) => void
|
|
20
|
+
}>) => void,
|
|
21
|
+
/** Transaction origin; omit for user edits. */
|
|
22
|
+
origin?: unknown) => void;
|
|
21
23
|
export declare function ySheetArrayToPlain(sheetArray: Y.Array<Y.Map>): Sheet[];
|
|
24
|
+
/**
|
|
25
|
+
* One field of one sheet, with the same value ySheetArrayToPlain gives for
|
|
26
|
+
* it, without converting the rest of the workbook (A3). Shared, read-only
|
|
27
|
+
* semantics as ySheetArrayToPlain.
|
|
28
|
+
*/
|
|
29
|
+
export declare function readYdocSheetField(ydoc: Y.Doc, dsheetId: string, sheetId: string, field: string): any;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Waits for a y-indexeddb provider without trusting it to finish.
|
|
3
|
+
*
|
|
4
|
+
* In y-indexeddb 9.0.12 `whenSynced` resolves only on 'synced'. It has no
|
|
5
|
+
* reject path, and a provider that is destroyed before its first read, or whose
|
|
6
|
+
* first read never completes, never syncs. Awaiting it directly hangs the
|
|
7
|
+
* bootstrap, and a rebuild that waits for the bootstrap hangs with it.
|
|
8
|
+
*/
|
|
9
|
+
export declare const INDEXEDDB_SYNC_TIMEOUT_MS = 15000;
|
|
10
|
+
/** How long a rebuild waits for a running bootstrap before it abandons it. */
|
|
11
|
+
export declare const REBUILD_BOOTSTRAP_WAIT_MS = 3000;
|
|
12
|
+
export declare class PersistenceSyncTimeoutError extends Error {
|
|
13
|
+
constructor(ms: number);
|
|
14
|
+
}
|
|
15
|
+
export declare class PersistenceSupersededError extends Error {
|
|
16
|
+
constructor();
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Resolves when `whenSynced` does. Rejects with PersistenceSyncTimeoutError
|
|
20
|
+
* after `timeoutMs`, or with PersistenceSupersededError as soon as
|
|
21
|
+
* `isCurrent()` turns false (checked every 100 ms): a newer bootstrap or an
|
|
22
|
+
* unmount owns the provider then, and it may already be destroyed.
|
|
23
|
+
*/
|
|
24
|
+
export declare function waitForPersistenceSynced(persistence: {
|
|
25
|
+
whenSynced: Promise<unknown>;
|
|
26
|
+
}, options?: {
|
|
27
|
+
timeoutMs?: number;
|
|
28
|
+
isCurrent?: () => boolean;
|
|
29
|
+
}): Promise<void>;
|
|
30
|
+
/**
|
|
31
|
+
* Waits for a running bootstrap for at most `ms`. 'stuck' means it has not
|
|
32
|
+
* settled; the caller then abandons it (bumps the generation) instead of
|
|
33
|
+
* waiting for a provider that may never sync.
|
|
34
|
+
*/
|
|
35
|
+
export declare function waitForBootstrapOrAbandon(bootstrap: Promise<unknown>, ms?: number): Promise<'settled' | 'stuck'>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -11198,6 +11198,7 @@ If the value is FALSE, return the accrued interest from the first interest accru
|
|
|
11198
11198
|
cancelText: "Cancelar",
|
|
11199
11199
|
chooseText: "Confirmar color",
|
|
11200
11200
|
focus: "Enfocar",
|
|
11201
|
+
copyLink: "Copiar enlace a la hoja",
|
|
11201
11202
|
tipNameRepeat: "¡El nombre de la página de la pestaña no se puede repetir! Revísalo",
|
|
11202
11203
|
noMoreSheet: "El libro de trabajo contiene al menos una hoja de trabajo visual. Para eliminar la hoja de trabajo seleccionada, inserta una nueva hoja de trabajo o muestra una hoja de trabajo oculta",
|
|
11203
11204
|
confirmDelete: "¿Estás seguro de eliminar",
|