@fileverse-dev/dsheet 4.1.23-stabilise-package-8 → 4.1.24-stabilise-package-1

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.
@@ -83,6 +83,7 @@ interface EditorProviderProps {
83
83
  isAuthorized: boolean;
84
84
  children: React.ReactNode;
85
85
  dsheetId: string;
86
+ localStoreId?: string;
86
87
  username?: string;
87
88
  portalContent?: string;
88
89
  enableIndexeddbSync?: boolean;
@@ -2,7 +2,7 @@ import { IndexeddbPersistence } from 'y-indexeddb';
2
2
  import { CollaborationProps } from '../../sync-local/types';
3
3
  import { DSheetContentChange } from '../utils/content-change';
4
4
  import * as Y from 'yjs';
5
- export declare const useEditorSync: (dsheetId: string, enableIndexeddbSync?: boolean, isReadOnly?: boolean, portalContent?: string, collaboration?: CollaborationProps, onRemoteApplied?: (update: Uint8Array) => void, onIndexedDbError?: (error: Error) => void) => {
5
+ export declare const useEditorSync: (dsheetId: string, enableIndexeddbSync?: boolean, isReadOnly?: boolean, portalContent?: string, collaboration?: CollaborationProps, onRemoteApplied?: (update: Uint8Array) => void, onIndexedDbError?: (error: Error) => void, localStoreId?: string) => {
6
6
  ydocRef: import('react').MutableRefObject<Y.Doc | null>;
7
7
  persistenceRef: import('react').MutableRefObject<IndexeddbPersistence | null>;
8
8
  syncStatus: "error" | "syncing" | "initializing" | "synced";
@@ -0,0 +1 @@
1
+ export {};
@@ -102,6 +102,9 @@ export interface DsheetProps {
102
102
  showFormulaBar?: boolean;
103
103
  enableIndexeddbSync?: boolean;
104
104
  dsheetId: string;
105
+ /** Names the local IndexedDB database and labels content snapshots
106
+ * (default `dsheetId`). `dsheetId` stays the Yjs root key. */
107
+ localStoreId?: string;
105
108
  /**
106
109
  * Cheap change signal for hosts that persist sheet bodies through Yjs.
107
110
  * Unlike `onChange`, this does not build a plain sheet or encode the Y.Doc.
@@ -3,3 +3,4 @@ import { MutableRefObject } from 'react';
3
3
  import * as Y from 'yjs';
4
4
  export declare const handleExportToXLSX: (workbookRef: MutableRefObject<WorkbookInstance | null>, ydocRef: MutableRefObject<Y.Doc | null>, dsheetId: string, getDocumentTitle?: (dsheetId: string) => Promise<string>) => Promise<void>;
5
5
  export declare const handleExportToODS: (workbookRef: MutableRefObject<WorkbookInstance | null>, ydocRef: MutableRefObject<Y.Doc | null>, dsheetId: string, getDocumentTitle?: (dsheetId: string) => Promise<string>) => Promise<void>;
6
+ export declare const exportToXLSXBytes: (workbookRef: MutableRefObject<WorkbookInstance | null>, ydocRef: MutableRefObject<Y.Doc | null>, dsheetId: string) => Promise<Uint8Array>;
@@ -7,3 +7,4 @@ import * as Y from 'yjs';
7
7
  */
8
8
  export declare const handleExportToXLSX: (workbookRef: MutableRefObject<WorkbookInstance | null>, ydocRef: MutableRefObject<Y.Doc | null>, dsheetId: string, getDocumentTitle?: (dsheetId: string) => Promise<string>) => Promise<void>;
9
9
  export declare const handleExportToODS: (workbookRef: MutableRefObject<WorkbookInstance | null>, ydocRef: MutableRefObject<Y.Doc | null>, dsheetId: string, getDocumentTitle?: (dsheetId: string) => Promise<string>) => Promise<void>;
10
+ export declare const exportToXLSXBytes: (workbookRef: MutableRefObject<WorkbookInstance | null>, ydocRef: MutableRefObject<Y.Doc | null>, dsheetId: string) => Promise<Uint8Array>;