@fileverse-dev/dsheet 3.0.2-patch.4 → 3.0.2-patch.6

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 CHANGED
@@ -80,6 +80,7 @@ function App() {
80
80
  | Prop | Type | Default | Description |
81
81
  |------|------|---------|-------------|
82
82
  | `onChange` | `(data: SheetUpdateData, encodedUpdate?: string) => void` | - | Callback when sheet data changes |
83
+ | `onContentUpdate` | `() => void` | - | Cheap throttled callback that does not encode or reconstruct the sheet |
83
84
  | `portalContent` | `string` | - | Encoded initial sheet data |
84
85
  | `isReadOnly` | `boolean` | `false` | Enable read-only mode |
85
86
  | `allowComments` | `boolean` | `false` | Enable comments (requires `isReadOnly=true`) |
@@ -76,6 +76,7 @@ interface EditorProviderProps {
76
76
  portalContent?: string;
77
77
  enableIndexeddbSync?: boolean;
78
78
  isReadOnly?: boolean;
79
+ onContentUpdate?: () => void;
79
80
  onChange?: (data: SheetUpdateData, encodedUpdate?: string) => void;
80
81
  collaboration?: CollaborationProps;
81
82
  externalEditorRef?: React.MutableRefObject<WorkbookInstance | null>;
@@ -7,5 +7,5 @@ import { DsheetProps } from './types';
7
7
  * @param props - Component properties
8
8
  * @returns The SpreadsheetEditor component
9
9
  */
10
- declare const SpreadsheetEditor: ({ isReadOnly, allowSheetDownload, renderNavbar, enableIndexeddbSync, dsheetId, portalContent, onChange, username, selectedTemplate, toggleTemplateSidebar, isTemplateOpen, onboardingComplete, onboardingCompleteLocalStorageKey, onboardingHandler, commentsConfig, setFetchingURLData, setShowFetchURLModal, setInputFetchURLDataBlock, sheetEditorRef: externalSheetEditorRef, onDuneChartEmbed, onSheetCountChange, isAuthorized, getDocumentTitle, updateDocumentTitle, editorStateRef, setSelectedTemplate, isNewSheet, liveQueryRefreshRate, enableLiveQuery, collaboration, customPanels, apiKeyStorage, onDataBlockEvent, smartContracts, theme, onContentSyncStatusChange, }: DsheetProps) => JSX.Element;
10
+ declare const SpreadsheetEditor: ({ isReadOnly, allowSheetDownload, renderNavbar, enableIndexeddbSync, dsheetId, portalContent, onContentUpdate, onChange, username, selectedTemplate, toggleTemplateSidebar, isTemplateOpen, onboardingComplete, onboardingCompleteLocalStorageKey, onboardingHandler, commentsConfig, setFetchingURLData, setShowFetchURLModal, setInputFetchURLDataBlock, sheetEditorRef: externalSheetEditorRef, onDuneChartEmbed, onSheetCountChange, isAuthorized, getDocumentTitle, updateDocumentTitle, editorStateRef, setSelectedTemplate, isNewSheet, liveQueryRefreshRate, enableLiveQuery, collaboration, customPanels, apiKeyStorage, onDataBlockEvent, smartContracts, theme, onContentSyncStatusChange, }: DsheetProps) => JSX.Element;
11
11
  export default SpreadsheetEditor;
@@ -60,6 +60,11 @@ export interface DsheetProps {
60
60
  renderNavbar?: (editorValues?: EditorValues) => JSX.Element;
61
61
  enableIndexeddbSync?: boolean;
62
62
  dsheetId: string;
63
+ /**
64
+ * Cheap change signal for hosts that persist sheet bodies through Yjs.
65
+ * Unlike `onChange`, this does not build a plain sheet or encode the Y.Doc.
66
+ */
67
+ onContentUpdate?: () => void;
63
68
  onChange?: (updateData: SheetUpdateData, encodedUpdate?: string) => void;
64
69
  collaboration?: CollaborationProps;
65
70
  username?: string;