@fileverse-dev/dsheet 4.1.23-stabilise-package-5 → 4.1.23-stabilise-package-7

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 (24) hide show
  1. package/dist/editor/hooks/use-celldata-compaction.d.ts +21 -0
  2. package/dist/{executeStringFunction-BEXVKyb4.js → executeStringFunction-B27MIrxE.js} +9407 -9141
  3. package/dist/formula.js +1 -1
  4. package/dist/{index-B2qRWUrt.js → index-BvLQlh3C.js} +7026 -7051
  5. package/dist/index.es.js +20 -20
  6. package/dist/sheet-engine/core/api/cell.d.ts +8 -3
  7. package/dist/sheet-engine/core/modules/formula-dep-text.d.ts +9 -1
  8. package/dist/sheet-engine/core/modules/formula-edge-update.d.ts +13 -0
  9. package/dist/sheet-engine/core/modules/formula-tab-load.test.d.ts +1 -0
  10. package/dist/sheet-engine/core/modules/formula-transitive-deps.d.ts +24 -3
  11. package/dist/sheet-engine/core/modules/formula-warmup.d.ts +2 -1
  12. package/dist/sheet-engine/core/modules/formula.d.ts +24 -0
  13. package/dist/sheet-engine/core/modules/history-celldata.d.ts +25 -0
  14. package/dist/sheet-engine/core/modules/rowcol-refused-edit.test.d.ts +1 -0
  15. package/dist/sheet-engine/core/modules/rowcol-unloaded-history.test.d.ts +1 -0
  16. package/dist/sheet-engine/core/modules/structural-edit-prep.d.ts +18 -0
  17. package/dist/sheet-engine/core/modules/structural-edit-prep.test.d.ts +1 -0
  18. package/dist/sheet-engine/react/components/NotationBoxes/shown-comments.d.ts +5 -1
  19. package/dist/sheet-engine/react/components/SheetOverlay/hover-tracker.d.ts +5 -1
  20. package/dist/{use-xlsx-import-impl-C8P5kg6K.js → use-xlsx-import-impl-DeSRTbbq.js} +4 -4
  21. package/dist/{xlsx-defined-names-BPf5_A0O.js → xlsx-defined-names-TZ-vTErq.js} +2 -2
  22. package/dist/{xlsx-export-impl-GUjuzWHG.js → xlsx-export-impl-CNlXZdep.js} +4 -4
  23. package/dist/{xlsx-hyperlink-inline-yhXVMMJ9.js → xlsx-hyperlink-inline-CYEnkzt-.js} +2 -2
  24. package/package.json +1 -1
@@ -3,6 +3,10 @@ import { WorkbookInstance, Sheet } from '../../sheet-engine/react';
3
3
  import { planYdocCompaction } from '../utils/compact-committed-celldata';
4
4
 
5
5
  import * as Y from 'yjs';
6
+ /** Wait before a refused or stopped run is tried again. */
7
+ export declare const COMPACTION_RETRY_MS = 30000;
8
+ /** Tries after the first run; the compaction is also retried on a later open. */
9
+ export declare const COMPACTION_MAX_RETRIES = 10;
6
10
  type UseCelldataCompactionArgs = {
7
11
  dsheetId: string;
8
12
  ydocRef: RefObject<Y.Doc | null>;
@@ -26,6 +30,23 @@ export declare function canRunCompaction(refs: {
26
30
  remoteUpdateRef: MutableRefObject<boolean>;
27
31
  structuralRemountPendingRef?: MutableRefObject<boolean>;
28
32
  }, collabSyncing: boolean): boolean;
33
+ /**
34
+ * Runs `attempt` and, when it asks for a retry (the gate was closed, or a run
35
+ * stopped because the document changed), calls `retry` after `delayMs`, up to
36
+ * `maxRetries` times. Without it a refused run waited for the next open, so
37
+ * compaction made one chunk of progress per open (PR 466 N10).
38
+ */
39
+ export declare function createCompactionRetrier({ attempt, retry, delayMs, maxRetries, setTimer, clearTimer, }: {
40
+ attempt: () => Promise<'done' | 'retry'>;
41
+ retry: () => void;
42
+ delayMs?: number;
43
+ maxRetries?: number;
44
+ setTimer?: (cb: () => void, ms: number) => ReturnType<typeof setTimeout>;
45
+ clearTimer?: (handle: ReturnType<typeof setTimeout>) => void;
46
+ }): {
47
+ run(): Promise<void>;
48
+ cancel(): void;
49
+ };
29
50
  /**
30
51
  * Applies the plan chunk by chunk, yielding between chunks. The plan was made
31
52
  * from the document as it was, and one change in it, the whole-value