@fileverse-dev/dsheet 2.0.35 → 2.0.36-rtc

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 (34) 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/{executeStringFunction-BcbEOtCK.js → executeStringFunction-F9mb-SpN.js} +4437 -4447
  14. package/dist/formula.js +1 -1
  15. package/dist/index-CFOs3Loc.js +50962 -0
  16. package/dist/index.d.ts +2 -0
  17. package/dist/index.es.js +34 -33
  18. package/dist/sheet-engine/core/settings.d.ts +3 -0
  19. package/dist/sheet-engine/core/types.d.ts +1 -0
  20. package/dist/style.css +1 -1
  21. package/dist/sync-local/SyncManager.d.ts +67 -0
  22. package/dist/sync-local/collabStateMachine.d.ts +23 -0
  23. package/dist/sync-local/crypto/index.d.ts +6 -0
  24. package/dist/sync-local/index.d.ts +3 -0
  25. package/dist/sync-local/socketClient.d.ts +68 -0
  26. package/dist/sync-local/types/index.d.ts +211 -0
  27. package/dist/sync-local/useSyncManager.d.ts +12 -0
  28. package/dist/sync-local/utils/createAwarenessUpdateHandler.d.ts +8 -0
  29. package/dist/sync-local/utils/objectToFile.d.ts +1 -0
  30. package/dist/{use-xlsx-import-impl-C71wXceP.js → use-xlsx-import-impl-B8AzRFwd.js} +2 -2
  31. package/dist/{xlsx-export-impl-CBDRr4nC.js → xlsx-export-impl-Q1Pec91B.js} +293 -295
  32. package/package.json +13 -9
  33. package/dist/editor/hooks/use-editor-collaboration.d.ts +0 -9
  34. package/dist/index-C7W9rBHx.js +0 -40202
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';
package/dist/index.es.js CHANGED
@@ -1,45 +1,46 @@
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 i, g as c, j as m, k as C, l as p, n as E, o as F, p as x, q as g, r as b, s as f, t as L, u as R, v as u, w as T } from "./index-C7W9rBHx.js";
2
- import { bK as I, bL as w, bM as V, bQ as k, bb as M, e as X, f as _, h as v, a as y, cb as z, aq as P, ci as U } from "./executeStringFunction-BcbEOtCK.js";
3
- import { FLVURL as q } from "@fileverse-dev/formulajs";
4
- import { E as H, S as K } from "./constants-CnhOvijG.js";
1
+ import { S as s, a as l, i as o, T as t, b as r, d as n, e as d, h as S, f as h, g as i, j as c, k as m, l as C, n as p, o as E, p as x, q as F, r as g, s as R, t as f, u as L, v as b, w as u, x as T, z as A } from "./index-CFOs3Loc.js";
2
+ import { bL as w, bM as k, bN as V, bR as z, bb as M, e as X, f as _, h as j, a as v, cc as y, aq as P, cj as U } from "./executeStringFunction-F9mb-SpN.js";
3
+ import { FLVURL as D } from "@fileverse-dev/formulajs";
4
+ import { E as H, S as N } from "./constants-yStXQJiK.js";
5
5
  export {
6
6
  s as DSheetEditor,
7
+ l as DSheetSkeleton,
7
8
  H as ERROR_MESSAGES_FLAG,
8
- q as FLVURL,
9
- l as FortuneCore,
10
- K as SERVICES_API_KEY,
11
- o as TEMPLATES,
9
+ D as FLVURL,
10
+ o as FortuneCore,
11
+ N as SERVICES_API_KEY,
12
+ t as TEMPLATES,
12
13
  r as api,
13
- I as clearColumnsCellsFormat,
14
- t as clearFilter,
15
- w as clearRowsCellsFormat,
14
+ w as clearColumnsCellsFormat,
15
+ n as clearFilter,
16
+ k as clearRowsCellsFormat,
16
17
  V as clearSelectedCellFormat,
17
- n as createFilter,
18
- k as deleteRowCol,
18
+ d as createFilter,
19
+ z as deleteRowCol,
19
20
  M as deleteSelectedCellText,
20
21
  X as executeStringFunction,
21
22
  _ as formulaResponseUiSync,
22
- v as getFlowdata,
23
- y as getSheetIndex,
24
- d as handleCSVUpload,
25
- S as handleCopy,
26
- h as handleExportToCSV,
27
- i as handleExportToJSON,
28
- c as handleExportToXLSX,
29
- m as handleFreeze,
30
- C as handleHorizontalAlign,
31
- p as handleLink,
32
- E as handleMerge,
23
+ j as getFlowdata,
24
+ v as getSheetIndex,
25
+ S as handleCSVUpload,
26
+ h as handleCopy,
27
+ i as handleExportToCSV,
28
+ c as handleExportToJSON,
29
+ m as handleExportToXLSX,
30
+ C as handleFreeze,
31
+ p as handleHorizontalAlign,
32
+ E as handleLink,
33
+ x as handleMerge,
33
34
  F as handlePasteByClick,
34
- x as handleSort,
35
- g as handleTextSize,
36
- b as handleVerticalAlign,
37
- z as insertRowCol,
35
+ g as handleSort,
36
+ R as handleTextSize,
37
+ f as handleVerticalAlign,
38
+ y as insertRowCol,
38
39
  P as jfrefreshgrid,
39
40
  U as loadLocale,
40
- f as removeActiveImage,
41
- L as showImgChooser,
42
- R as toolbarItemClickHandler,
43
- u as updateFormat,
44
- T as useXLSXImport
41
+ L as removeActiveImage,
42
+ b as showImgChooser,
43
+ u as toolbarItemClickHandler,
44
+ T as updateFormat,
45
+ A as useXLSXImport
45
46
  };
@@ -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;