@fileverse-dev/dsheet 4.0.5-edit-mode-12 → 4.0.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/dist/editor/components/api-key-modal/api-key-input.d.ts +1 -1
- package/dist/editor/components/api-key-modal/api-key-modal.d.ts +1 -3
- package/dist/editor/components/api-key-modal/rate-limit-info.d.ts +1 -1
- package/dist/editor/components/comments/comment-sidebar-empty.d.ts +1 -1
- package/dist/editor/components/editor-workbook.d.ts +1 -5
- package/dist/editor/components/export-menu-section.d.ts +1 -1
- package/dist/editor/components/import-button-ui.d.ts +1 -1
- package/dist/editor/components/permission-chip.d.ts +1 -5
- package/dist/editor/components/read-only-export-button.d.ts +1 -1
- package/dist/editor/components/sidebar/editor-right-sidebar.d.ts +1 -1
- package/dist/editor/components/sidebar/right-sidebar.d.ts +2 -2
- package/dist/editor/components/sidebar/sidebar-context.d.ts +1 -1
- package/dist/editor/components/sidebar/sidebar-portal-registry.d.ts +2 -2
- package/dist/editor/components/sidebars/conditional-format.d.ts +1 -1
- package/dist/editor/components/sidebars/data-verification.d.ts +1 -1
- package/dist/editor/components/sidebars/function/function-categories.d.ts +1 -3
- package/dist/editor/components/sidebars/function/function-metadata.d.ts +1 -1
- package/dist/editor/components/sidebars/function/functionList.d.ts +1 -2
- package/dist/editor/components/sidebars/function-content.d.ts +1 -1
- package/dist/editor/components/sidebars/named-ranges.d.ts +1 -1
- package/dist/editor/components/sidebars/template-ui.d.ts +2 -4
- package/dist/editor/components/sidebars/templates.d.ts +1 -1
- package/dist/editor/components/skeleton-loader.d.ts +4 -4
- package/dist/editor/components/smart-contract/error-toast.d.ts +1 -1
- package/dist/editor/components/smart-contract/smart-contract-list-item.d.ts +1 -2
- package/dist/editor/components/smart-contract/smart-contract-reading-intro.d.ts +1 -1
- package/dist/editor/components/smart-contract.d.ts +1 -1
- package/dist/editor/components/transition-wrapper.d.ts +1 -1
- package/dist/editor/contexts/editor-context.d.ts +2 -11
- package/dist/editor/dsheet-editor.d.ts +2 -3
- package/dist/editor/hooks/use-collab-awareness.d.ts +6 -3
- package/dist/editor/hooks/use-editor-data.d.ts +2 -2
- package/dist/editor/hooks/use-editor-sync.d.ts +2 -6
- package/dist/editor/types.d.ts +3 -29
- package/dist/editor/utils/custom-toolbar-item.d.ts +3 -3
- package/dist/editor/utils/smart-contract/constants.d.ts +1 -7
- package/dist/{executeStringFunction-B6fhDKyN.js → executeStringFunction-CxsiamWG.js} +6421 -6339
- package/dist/formula.js +1 -1
- package/dist/{index-D7psIU8B.js → index-CQUhZB3J.js} +19505 -20459
- package/dist/index.d.ts +1 -3
- package/dist/index.es.js +48 -52
- package/dist/persistence-utils-DsM_MOB1.js +89 -0
- package/dist/persistence-utils.d.ts +0 -6
- package/dist/persistence.js +1 -1
- package/dist/sheet-engine/core/modules/format.d.ts +5 -1
- package/dist/sheet-engine/react/components/DataVerification/ColorPicker.d.ts +1 -3
- package/dist/sheet-engine/react/components/DataVerification/DropdownOption.d.ts +1 -1
- package/dist/sheet-engine/react/components/DuneChartsInputModal/DuneChartsInputModal.d.ts +1 -2
- package/dist/sheet-engine/react/components/SheetOverlay/FormulaHint/dragable-div.d.ts +1 -1
- package/dist/sheet-engine/react/components/SheetOverlay/FormulaHint/index.d.ts +1 -2
- package/dist/sheet-engine/react/components/SheetOverlay/Icon.d.ts +19 -19
- package/dist/sheet-engine/react/components/SheetOverlay/LucideIcon.d.ts +19 -19
- package/dist/sheet-engine/react/components/Toolbar/FunctionList/FunctionListButton.d.ts +1 -1
- package/dist/sheet-engine/react/components/Toolbar/FunctionList/HoverMenuItem.d.ts +1 -1
- package/dist/sheet-engine/react/components/Toolbar/index.d.ts +1 -2
- package/dist/sheet-engine/react/components/Workbook/index.d.ts +0 -1
- package/dist/style.css +1 -1
- package/dist/sync-local/SyncManager.d.ts +9 -54
- package/dist/sync-local/index.d.ts +1 -1
- package/dist/sync-local/socketClient.d.ts +8 -74
- package/dist/sync-local/types/index.d.ts +15 -111
- package/dist/sync-local/useSyncManager.d.ts +0 -4
- package/dist/sync-local/utils/objectToFile.d.ts +1 -0
- package/dist/{use-xlsx-import-impl-B73ILpg3.js → use-xlsx-import-impl-DNTnmzDN.js} +53 -53
- package/dist/{xlsx-defined-names-Bl8Y-KEV.js → xlsx-defined-names-BHxDk83p.js} +2 -2
- package/dist/{xlsx-export-impl-FuZcrQ2a.js → xlsx-export-impl-r3bDoVjv.js} +4 -4
- package/dist/{xlsx-hyperlink-inline-Cdizm_s4.js → xlsx-hyperlink-inline-B5IR_SOR.js} +2 -2
- package/package.json +2 -2
- package/dist/editor/components/editor-workbook-controls.d.ts +0 -11
- package/dist/editor/components/editor-workbook-controls.test.d.ts +0 -1
- package/dist/editor/components/permission-chip-model.d.ts +0 -34
- package/dist/editor/components/permission-chip.test.d.ts +0 -1
- package/dist/editor/hooks/collaboration-lifecycle.d.ts +0 -35
- package/dist/editor/hooks/collaboration-lifecycle.test.d.ts +0 -1
- package/dist/editor/utils/detach-workbook-data.d.ts +0 -8
- package/dist/editor/utils/detach-workbook-data.test.d.ts +0 -1
- package/dist/editor/utils/editor-handle.d.ts +0 -11
- package/dist/editor/utils/editor-handle.test.d.ts +0 -1
- package/dist/persistence-utils-BBTuIssZ.js +0 -97
- package/dist/persistence-utils.test.d.ts +0 -1
- package/dist/sync-local/crypto/room-key.d.ts +0 -2
- package/dist/sync-local/crypto/room-key.test.d.ts +0 -1
- package/dist/sync-local/floor.d.ts +0 -8
- package/dist/sync-local/floor.test.d.ts +0 -1
- package/dist/sync-local/presence.d.ts +0 -11
- package/dist/sync-local/presence.test.d.ts +0 -1
- package/dist/sync-local/session-tools.d.ts +0 -31
- package/dist/sync-local/session-tools.test.d.ts +0 -1
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
|
|
3
1
|
export interface ApiKeyModalProps {
|
|
4
2
|
open: boolean;
|
|
5
3
|
apiKeyName: string;
|
|
6
4
|
onSave: (key: string) => void;
|
|
7
5
|
onClose: () => void;
|
|
8
6
|
}
|
|
9
|
-
export declare const ApiKeyModal: ({ open, apiKeyName, onSave, onClose, }: ApiKeyModalProps) =>
|
|
7
|
+
export declare const ApiKeyModal: ({ open, apiKeyName, onSave, onClose, }: ApiKeyModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { SidebarPortalRegistryHandle, SidebarPortalRenderer } from '../../sheet-engine/react';
|
|
3
3
|
import { ThemeKey } from '../../sheet-engine/core/theme';
|
|
4
|
-
import { OnboardingHandlerType
|
|
4
|
+
import { OnboardingHandlerType } from '../types';
|
|
5
5
|
import { CommentsConfig } from '../types/comments';
|
|
6
6
|
|
|
7
7
|
type OnboardingHandler = OnboardingHandlerType;
|
|
@@ -24,10 +24,6 @@ interface EditorWorkbookProps {
|
|
|
24
24
|
sidebarActivePanel?: string | null;
|
|
25
25
|
sidebarPortalRegistry?: SidebarPortalRegistryHandle | null;
|
|
26
26
|
sidebarPortalRenderers?: Record<string, SidebarPortalRenderer>;
|
|
27
|
-
permissionMode?: DSheetPermissionMode | null;
|
|
28
|
-
onEnterEdit?: () => void;
|
|
29
|
-
onSignInToComment?: () => void;
|
|
30
|
-
onViewerModeChange?: (mode: 'comment' | 'view') => void;
|
|
31
27
|
theme?: ThemeKey;
|
|
32
28
|
}
|
|
33
29
|
export declare const EditorWorkbook: React.NamedExoticComponent<EditorWorkbookProps>;
|
|
@@ -7,5 +7,5 @@ type ExportMenuSectionProps = ExportHandlers & {
|
|
|
7
7
|
onItemClick?: () => void;
|
|
8
8
|
testIdPrefix?: string;
|
|
9
9
|
};
|
|
10
|
-
export declare const ExportMenuSection: ({ handleExportToJSON, handleExportToXLSX, handleExportToCSV, onItemClick, testIdPrefix, }: ExportMenuSectionProps) => import("react").JSX.Element;
|
|
10
|
+
export declare const ExportMenuSection: ({ handleExportToJSON, handleExportToXLSX, handleExportToCSV, onItemClick, testIdPrefix, }: ExportMenuSectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { DSheetPermissionMode } from '../types';
|
|
3
2
|
|
|
4
3
|
interface PermissionChipProps {
|
|
5
|
-
|
|
6
|
-
onEnterEdit?: () => void;
|
|
7
|
-
onSignInToComment?: () => void;
|
|
8
|
-
onViewerModeChange?: (mode: 'comment' | 'view') => void;
|
|
4
|
+
allowComments: boolean;
|
|
9
5
|
}
|
|
10
6
|
export declare const PermissionChip: React.FC<PermissionChipProps>;
|
|
11
7
|
export {};
|
|
@@ -3,5 +3,5 @@ import { ExportHandlers } from './export-menu-section';
|
|
|
3
3
|
type ReadOnlyExportButtonProps = ExportHandlers & {
|
|
4
4
|
setExportDropdownOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
5
5
|
};
|
|
6
|
-
export declare const ReadOnlyExportButton: ({ setExportDropdownOpen, handleExportToXLSX, handleExportToCSV, handleExportToJSON, }: ReadOnlyExportButtonProps) => import("react").JSX.Element;
|
|
6
|
+
export declare const ReadOnlyExportButton: ({ setExportDropdownOpen, handleExportToXLSX, handleExportToCSV, handleExportToJSON, }: ReadOnlyExportButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -16,5 +16,5 @@ interface EditorRightSidebarProps {
|
|
|
16
16
|
/** Read/preview mode hides the toolbar, so the sidebar starts higher. */
|
|
17
17
|
isReadOnly?: boolean;
|
|
18
18
|
}
|
|
19
|
-
export declare const EditorRightSidebar: ({ isOpen, activePanelConfig, onClose, isReadOnly, }: EditorRightSidebarProps) => import("react").JSX.Element;
|
|
19
|
+
export declare const EditorRightSidebar: ({ isOpen, activePanelConfig, onClose, isReadOnly, }: EditorRightSidebarProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
20
|
export {};
|
|
@@ -7,8 +7,8 @@ export declare function RightSidebar({ width, className, children, isOpen, top,
|
|
|
7
7
|
isOpen?: boolean;
|
|
8
8
|
top?: string;
|
|
9
9
|
height?: string;
|
|
10
|
-
}>): import("react").JSX.Element;
|
|
10
|
+
}>): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export declare function RightSidebarHeader({ className, children, }: Readonly<{
|
|
12
12
|
className?: string;
|
|
13
13
|
children: ReactNode;
|
|
14
|
-
}>): import("react").JSX.Element;
|
|
14
|
+
}>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -12,6 +12,6 @@ interface SidebarContextType {
|
|
|
12
12
|
export declare function SidebarProvider({ children, isReadMode, }: Readonly<{
|
|
13
13
|
children: ReactNode;
|
|
14
14
|
isReadMode?: boolean;
|
|
15
|
-
}>): import("react").JSX.Element;
|
|
15
|
+
}>): import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
export declare function useSidebar(): SidebarContextType;
|
|
17
17
|
export {};
|
|
@@ -7,7 +7,7 @@ export type SidebarPortalRegistryHandle = {
|
|
|
7
7
|
};
|
|
8
8
|
export declare function SidebarPortalRegistryProvider({ children, }: Readonly<{
|
|
9
9
|
children: ReactNode;
|
|
10
|
-
}>): import("react").JSX.Element;
|
|
10
|
+
}>): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export declare function useSidebarPortalRegistryHandle(): SidebarPortalRegistryHandle;
|
|
12
12
|
export declare function useSidebarPortalTargets(): SidebarPortalTargets;
|
|
13
13
|
export declare function useSidebarPortalTarget(panelId: string): (node: HTMLElement | null) => void;
|
|
@@ -16,5 +16,5 @@ interface SidebarPortalSlotProps {
|
|
|
16
16
|
className?: string;
|
|
17
17
|
style?: CSSProperties;
|
|
18
18
|
}
|
|
19
|
-
export declare function SidebarPortalSlot({ panelId, className, style, }: Readonly<SidebarPortalSlotProps>): import("react").JSX.Element;
|
|
19
|
+
export declare function SidebarPortalSlot({ panelId, className, style, }: Readonly<SidebarPortalSlotProps>): import("react/jsx-runtime").JSX.Element;
|
|
20
20
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const ConditionalFormat: () => import("react").JSX.Element;
|
|
1
|
+
declare const ConditionalFormat: () => import("react/jsx-runtime").JSX.Element;
|
|
2
2
|
export { ConditionalFormat };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const DataVerification: () => import("react").JSX.Element;
|
|
1
|
+
declare const DataVerification: () => import("react/jsx-runtime").JSX.Element;
|
|
2
2
|
export { DataVerification };
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
|
|
3
1
|
declare const FunctionCategories: ({ onCategorySelection, categories, categoryName, }: {
|
|
4
2
|
onCategorySelection: (value: string) => void;
|
|
5
3
|
categoryName: string;
|
|
6
4
|
categories: string[];
|
|
7
|
-
}) =>
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
6
|
export default FunctionCategories;
|
|
@@ -3,5 +3,5 @@ import { SpreadsheetFunction } from './types';
|
|
|
3
3
|
declare const FunctionMetadata: ({ selectedFunction, onInsert, }: {
|
|
4
4
|
selectedFunction: SpreadsheetFunction;
|
|
5
5
|
onInsert: () => void;
|
|
6
|
-
}) => import("react").JSX.Element;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export default FunctionMetadata;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { SpreadsheetFunction } from './types';
|
|
3
2
|
|
|
4
3
|
declare const FunctionList: ({ list, onFunctionSelection, selectedFunction, }: {
|
|
5
4
|
list: SpreadsheetFunction[];
|
|
6
5
|
onFunctionSelection: (data: SpreadsheetFunction, functionIndex: number) => void;
|
|
7
6
|
selectedFunction: SpreadsheetFunction | null;
|
|
8
|
-
}) =>
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export default FunctionList;
|
|
@@ -4,5 +4,5 @@ import { WorkbookInstance } from '../../../sheet-engine/react';
|
|
|
4
4
|
declare const FunctionContent: ({ sheetEditorRef, shouldHandleSuggestionFromCell, }: {
|
|
5
5
|
sheetEditorRef: React.RefObject<WorkbookInstance>;
|
|
6
6
|
shouldHandleSuggestionFromCell: number;
|
|
7
|
-
}) =>
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export default FunctionContent;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const NamedRanges: () => import("react").JSX.Element;
|
|
1
|
+
declare const NamedRanges: () => import("react/jsx-runtime").JSX.Element;
|
|
2
2
|
export { NamedRanges };
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
|
|
3
1
|
export interface Template {
|
|
4
2
|
slug: string;
|
|
5
3
|
title: string;
|
|
@@ -18,7 +16,7 @@ export declare const TemplateCard: ({ template, onMouseEnter, onMouseLeave, onSe
|
|
|
18
16
|
onMouseEnter?: () => void;
|
|
19
17
|
onMouseLeave?: () => void;
|
|
20
18
|
onSelect: () => void;
|
|
21
|
-
}) =>
|
|
19
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
22
20
|
export declare const TemplatePreview: ({ template }: {
|
|
23
21
|
template: Template;
|
|
24
|
-
}) =>
|
|
22
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,5 +5,5 @@ interface TemplatesProps {
|
|
|
5
5
|
setSelectedTemplate: (template: string) => void;
|
|
6
6
|
setHoveredTemplate: React.Dispatch<React.SetStateAction<Template | null>>;
|
|
7
7
|
}
|
|
8
|
-
export declare const Templates: ({ setSelectedTemplate, setHoveredTemplate, }: TemplatesProps) =>
|
|
8
|
+
export declare const Templates: ({ setSelectedTemplate, setHoveredTemplate, }: TemplatesProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export declare const SkeletonFormulaBar: () => import("react").JSX.Element;
|
|
1
|
+
export declare const SkeletonFormulaBar: () => import("react/jsx-runtime").JSX.Element;
|
|
2
2
|
export declare const SkeletonToolbar: ({ isReadOnly, }: {
|
|
3
3
|
isReadOnly: boolean | undefined;
|
|
4
|
-
}) => import("react").JSX.Element;
|
|
5
|
-
export declare const SkeletonGrid: () => import("react").JSX.Element;
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const SkeletonGrid: () => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
declare const SkeletonLoader: ({ isReadOnly, }: {
|
|
7
7
|
isReadOnly: boolean | undefined;
|
|
8
|
-
}) => import("react").JSX.Element;
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export default SkeletonLoader;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { Abi } from 'viem';
|
|
3
2
|
import { ContractConfig } from '../../types/smart-contract';
|
|
4
3
|
|
|
@@ -6,4 +5,4 @@ export declare const SmartContractListItem: ({ contract, onDelete, fetchContract
|
|
|
6
5
|
contract: ContractConfig;
|
|
7
6
|
onDelete?: (name: string) => void;
|
|
8
7
|
fetchContractAbi: (contract: ContractConfig) => Promise<Abi>;
|
|
9
|
-
}) =>
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -12,5 +12,5 @@ interface TransitionWrapperProps {
|
|
|
12
12
|
* A wrapper component that provides smooth enter/exit transitions for its children
|
|
13
13
|
* using opacity and transform animations.
|
|
14
14
|
*/
|
|
15
|
-
export declare const TransitionWrapper: ({ show, children, duration, transitionClasses, }: TransitionWrapperProps) => import("react").JSX.Element | null;
|
|
15
|
+
export declare const TransitionWrapper: ({ show, children, duration, transitionClasses, }: TransitionWrapperProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
16
16
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { LiveQueryData, Sheet, WorkbookInstance } from '../../sheet-engine/react';
|
|
3
3
|
import { IndexeddbPersistence } from 'y-indexeddb';
|
|
4
|
-
import { SheetUpdateData, DataBlockEvent
|
|
4
|
+
import { SheetUpdateData, DataBlockEvent } from '../types';
|
|
5
5
|
import { CommentsConfig } from '../types/comments';
|
|
6
6
|
import { ApiKeyStorage } from '../utils/api-key-storage';
|
|
7
7
|
import { OpenApiKeyModalFn } from '../utils/data-block-error-handler';
|
|
@@ -32,7 +32,6 @@ export interface EditorContextType {
|
|
|
32
32
|
}>>;
|
|
33
33
|
refreshIndexedDB: () => Promise<void>;
|
|
34
34
|
sheetEditorRef: React.MutableRefObject<WorkbookInstance | null>;
|
|
35
|
-
setSheetEditorRef: React.RefCallback<WorkbookInstance>;
|
|
36
35
|
ydocRef: React.MutableRefObject<Y.Doc | null>;
|
|
37
36
|
persistenceRef: React.MutableRefObject<IndexeddbPersistence | null>;
|
|
38
37
|
sheetData: Sheet[];
|
|
@@ -46,7 +45,6 @@ export interface EditorContextType {
|
|
|
46
45
|
setForceSheetRender: React.Dispatch<React.SetStateAction<number>>;
|
|
47
46
|
syncStatus: 'initializing' | 'syncing' | 'synced' | 'error';
|
|
48
47
|
collabEnabled?: boolean;
|
|
49
|
-
isLiveCollabSession: boolean;
|
|
50
48
|
collabIsOwner?: boolean;
|
|
51
49
|
collabState?: CollabState;
|
|
52
50
|
isCollabReady?: boolean;
|
|
@@ -81,8 +79,7 @@ interface EditorProviderProps {
|
|
|
81
79
|
onContentUpdate?: () => void;
|
|
82
80
|
onChange?: (data: SheetUpdateData, encodedUpdate?: string) => void;
|
|
83
81
|
collaboration?: CollaborationProps;
|
|
84
|
-
externalEditorRef?: React.
|
|
85
|
-
legacyEditorRef?: React.Ref<DSheetEditorHandle>;
|
|
82
|
+
externalEditorRef?: React.MutableRefObject<WorkbookInstance | null>;
|
|
86
83
|
commentsConfig?: CommentsConfig;
|
|
87
84
|
editorStateRef?: React.MutableRefObject<{
|
|
88
85
|
refreshIndexedDB: () => Promise<void>;
|
|
@@ -90,10 +87,6 @@ interface EditorProviderProps {
|
|
|
90
87
|
mergeContent: (encodedState: string) => DSheetContentSnapshot;
|
|
91
88
|
terminateSession?: () => void;
|
|
92
89
|
updateCollaboratorName?: (name: string) => void;
|
|
93
|
-
updateSessionTitle?: (args: {
|
|
94
|
-
encryptedTitle: string;
|
|
95
|
-
documentTitle: string;
|
|
96
|
-
}) => void;
|
|
97
90
|
rehydrateAfterCollabSync?: (reason?: string) => boolean;
|
|
98
91
|
} | null>;
|
|
99
92
|
enableLiveQuery?: boolean;
|
|
@@ -102,8 +95,6 @@ interface EditorProviderProps {
|
|
|
102
95
|
onDataBlockEvent?: (event: DataBlockEvent) => void;
|
|
103
96
|
smartContracts?: SmartContractConfig;
|
|
104
97
|
onContentSyncStatusChange?: (status: 'initializing' | 'syncing' | 'synced' | 'error') => void;
|
|
105
|
-
onCollaborationInitializationComplete?: (result: 'ready' | 'error') => void;
|
|
106
|
-
onIndexedDbError?: (error: Error) => void;
|
|
107
98
|
}
|
|
108
99
|
export declare const EditorProvider: React.FC<EditorProviderProps>;
|
|
109
100
|
export declare const useEditor: () => EditorContextType;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DSheetEditorHandle, DsheetProps } from './types';
|
|
1
|
+
import { DsheetProps } from './types';
|
|
3
2
|
|
|
4
3
|
/**
|
|
5
4
|
* SpreadsheetEditor component that provides a collaborative spreadsheet interface
|
|
@@ -8,5 +7,5 @@ import { DSheetEditorHandle, DsheetProps } from './types';
|
|
|
8
7
|
* @param props - Component properties
|
|
9
8
|
* @returns The SpreadsheetEditor component
|
|
10
9
|
*/
|
|
11
|
-
declare const SpreadsheetEditor:
|
|
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;
|
|
12
11
|
export default SpreadsheetEditor;
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { Awareness } from 'y-protocols/awareness';
|
|
2
2
|
import { WorkbookInstance } from '../../sheet-engine/react';
|
|
3
|
+
import { CollabUser } from '../../sync-local/types';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Reads remote cursor positions from Yjs awareness and keeps Fortune sheet's
|
|
6
7
|
* native presence list in sync. Fortune renders colored cell borders + username
|
|
7
8
|
* labels automatically via context.presences[].
|
|
8
9
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
10
|
+
* Also emits the full collaborator list (including the local user) via
|
|
11
|
+
* `onCollaboratorsChange` so host apps can render navbar chips. This mirrors
|
|
12
|
+
* ddoc's editor-layer awareness handler, which maps awareness.states →
|
|
13
|
+
* `{ clientId, ...user }` and fires on every awareness update + once on mount.
|
|
11
14
|
*/
|
|
12
|
-
export declare const useCollabAwareness: (awareness: Awareness | null | undefined, sheetEditorRef: React.MutableRefObject<WorkbookInstance | null
|
|
15
|
+
export declare const useCollabAwareness: (awareness: Awareness | null | undefined, sheetEditorRef: React.MutableRefObject<WorkbookInstance | null>, onCollaboratorsChange?: (collaborators: CollabUser[]) => void) => {
|
|
13
16
|
localColor: "#30bced" | "#6eeb83" | "#fa69d1" | "#ecd444" | "#ee6352" | "#db3041" | "#0ad7f2" | "#1bff39";
|
|
14
17
|
};
|
|
@@ -8,7 +8,7 @@ import * as Y from 'yjs';
|
|
|
8
8
|
* Hook for managing sheet data
|
|
9
9
|
* Handles initialization, updates, and persistence of sheet data
|
|
10
10
|
*/
|
|
11
|
-
export declare const useEditorData: (ydocRef: React.MutableRefObject<Y.Doc | null>, dsheetId: string, sheetEditorRef: React.MutableRefObject<WorkbookInstance | null>, setForceSheetRender?: React.Dispatch<React.SetStateAction<number>>, isReadOnly?: boolean, onChange?: (data: Sheet[]) => void, syncStatus?: "initializing" | "syncing" | "synced" | "error",
|
|
11
|
+
export declare const useEditorData: (ydocRef: React.MutableRefObject<Y.Doc | null>, dsheetId: string, sheetEditorRef: React.MutableRefObject<WorkbookInstance | null>, setForceSheetRender?: React.Dispatch<React.SetStateAction<number>>, portalContent?: string, isReadOnly?: boolean, onChange?: (data: Sheet[]) => void, syncStatus?: "initializing" | "syncing" | "synced" | "error", commentData?: object, dataBlockCalcFunction?: {
|
|
12
12
|
[key: string]: {
|
|
13
13
|
[key: string]: any;
|
|
14
14
|
};
|
|
@@ -16,7 +16,7 @@ export declare const useEditorData: (ydocRef: React.MutableRefObject<Y.Doc | nul
|
|
|
16
16
|
[key: string]: {
|
|
17
17
|
[key: string]: any;
|
|
18
18
|
};
|
|
19
|
-
}>>, enableLiveQuery?: boolean, liveQueryRefreshRate?: number, apiKeyStorage?: ApiKeyStorage, openApiKeyModal?: OpenApiKeyModalFn, onDataBlockEvent?: (event: DataBlockEvent) => void, allowComments?: boolean, collabEnabled?: boolean) => {
|
|
19
|
+
}>>, enableLiveQuery?: boolean, liveQueryRefreshRate?: number, apiKeyStorage?: ApiKeyStorage, openApiKeyModal?: OpenApiKeyModalFn, onDataBlockEvent?: (event: DataBlockEvent) => void, allowComments?: boolean, hasCollabContentInitialised?: boolean, collabEnabled?: boolean) => {
|
|
20
20
|
sheetData: Sheet[];
|
|
21
21
|
setSheetData: import('react').Dispatch<import('react').SetStateAction<Sheet[]>>;
|
|
22
22
|
currentDataRef: import('react').MutableRefObject<Sheet[]>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { IndexeddbPersistence } from 'y-indexeddb';
|
|
2
2
|
import { CollaborationProps } from '../../sync-local/types';
|
|
3
3
|
import * as Y from 'yjs';
|
|
4
|
-
export declare const useEditorSync: (dsheetId: string, enableIndexeddbSync?: boolean, isReadOnly?: boolean,
|
|
4
|
+
export declare const useEditorSync: (dsheetId: string, enableIndexeddbSync?: boolean, isReadOnly?: boolean, collaboration?: CollaborationProps, onCollabUpdate?: (fullState: string, updateChunk: string) => void) => {
|
|
5
5
|
ydocRef: import('react').MutableRefObject<Y.Doc | null>;
|
|
6
6
|
persistenceRef: import('react').MutableRefObject<IndexeddbPersistence | null>;
|
|
7
7
|
syncStatus: "error" | "syncing" | "initializing" | "synced";
|
|
8
|
-
|
|
8
|
+
isSyncedRef: import('react').MutableRefObject<boolean>;
|
|
9
9
|
refreshIndexedDB: () => Promise<void>;
|
|
10
10
|
getContentSnapshot: () => import('../../persistence-utils').DSheetContentSnapshot;
|
|
11
11
|
mergeContent: (encodedState: string) => import('../../persistence-utils').DSheetContentSnapshot;
|
|
@@ -13,10 +13,6 @@ export declare const useEditorSync: (dsheetId: string, enableIndexeddbSync?: boo
|
|
|
13
13
|
isCollabReady: boolean;
|
|
14
14
|
isCollabSyncing: boolean;
|
|
15
15
|
terminateSession: () => void;
|
|
16
|
-
updateTitle: (args: {
|
|
17
|
-
encryptedTitle: string;
|
|
18
|
-
documentTitle: string;
|
|
19
|
-
}) => void;
|
|
20
16
|
awareness: import('y-protocols/awareness.js').Awareness | null;
|
|
21
17
|
hasCollabContentInitialised: boolean;
|
|
22
18
|
};
|
package/dist/editor/types.d.ts
CHANGED
|
@@ -10,7 +10,6 @@ import { DSheetContentSnapshot } from '../persistence';
|
|
|
10
10
|
|
|
11
11
|
import * as Y from 'yjs';
|
|
12
12
|
export type { ThemeKey } from '../sheet-engine/core/theme';
|
|
13
|
-
export type DSheetPermissionMode = 'view' | 'comment' | 'edit';
|
|
14
13
|
export type { CommentThread, CommentReply, CommentActionParams, CommentsConfig, } from './types/comments';
|
|
15
14
|
export { CommentAction } from './types/comments';
|
|
16
15
|
export interface SheetUpdateData {
|
|
@@ -23,15 +22,6 @@ export interface EditorValues {
|
|
|
23
22
|
openPanel: (panelId: string) => void;
|
|
24
23
|
closePanel: () => void;
|
|
25
24
|
}
|
|
26
|
-
export type DSheetEditorHandle = WorkbookInstance & {
|
|
27
|
-
refreshIndexedDB: () => Promise<void>;
|
|
28
|
-
terminateSession: () => void;
|
|
29
|
-
updateCollaboratorName: (name: string) => void;
|
|
30
|
-
updateSessionTitle: (args: {
|
|
31
|
-
encryptedTitle: string;
|
|
32
|
-
documentTitle: string;
|
|
33
|
-
}) => void;
|
|
34
|
-
};
|
|
35
25
|
export interface PanelConfig {
|
|
36
26
|
id: string;
|
|
37
27
|
header: {
|
|
@@ -77,23 +67,9 @@ export interface DsheetProps {
|
|
|
77
67
|
onContentUpdate?: () => void;
|
|
78
68
|
onChange?: (updateData: SheetUpdateData, encodedUpdate?: string) => void;
|
|
79
69
|
collaboration?: CollaborationProps;
|
|
80
|
-
/** Called when local IndexedDB persistence fails. The editor and durable
|
|
81
|
-
* collaboration continue using the in-memory Y.Doc, matching dDoc. */
|
|
82
|
-
onIndexedDbError?: (error: Error) => void;
|
|
83
70
|
username?: string;
|
|
84
71
|
portalContent?: string;
|
|
85
72
|
isReadOnly?: boolean;
|
|
86
|
-
/** Permission status displayed above the toolbar. When omitted, read-only
|
|
87
|
-
* sheets retain the existing View/View-and-comment behavior. */
|
|
88
|
-
permissionMode?: DSheetPermissionMode;
|
|
89
|
-
/** Called when a read-only consumer asks to elevate to edit mode. The host
|
|
90
|
-
* owns access proof, loading, errors, and the resulting mode transition. */
|
|
91
|
-
onEnterEdit?: () => void;
|
|
92
|
-
/** Called when an invited commenter needs to authenticate before the host can
|
|
93
|
-
* recover comment capability. */
|
|
94
|
-
onSignInToComment?: () => void;
|
|
95
|
-
/** Lets the host toggle a recovered commenter between comment and view mode. */
|
|
96
|
-
onViewerModeChange?: (mode: 'comment' | 'view') => void;
|
|
97
73
|
allowSheetDownload?: boolean;
|
|
98
74
|
isTemplateOpen?: boolean;
|
|
99
75
|
selectedTemplate?: string;
|
|
@@ -104,8 +80,9 @@ export interface DsheetProps {
|
|
|
104
80
|
setForceSheetRender?: React.Dispatch<React.SetStateAction<number>>;
|
|
105
81
|
commentsConfig?: CommentsConfig;
|
|
106
82
|
toggleTemplateSidebar?: () => void;
|
|
107
|
-
|
|
108
|
-
|
|
83
|
+
sheetEditorRef?: RefObject<WorkbookInstance & {
|
|
84
|
+
refreshIndexedDB: () => Promise<void>;
|
|
85
|
+
}>;
|
|
109
86
|
/** Override where datablock API keys are stored (default: localStorage). */
|
|
110
87
|
apiKeyStorage?: ApiKeyStorage;
|
|
111
88
|
/** Optional lifecycle events for analytics / side-effects. */
|
|
@@ -116,9 +93,6 @@ export interface DsheetProps {
|
|
|
116
93
|
* collab start/resume on 'synced' — starting before local content is fully
|
|
117
94
|
* synced is what let the RTC layer bind to a stale doc in the past. */
|
|
118
95
|
onContentSyncStatusChange?: (status: 'initializing' | 'syncing' | 'synced' | 'error') => void;
|
|
119
|
-
/** Fires once the first collaboration sync has been reconciled with the
|
|
120
|
-
* workbook, or when that reconciliation fails. */
|
|
121
|
-
onCollaborationInitializationComplete?: (result: 'ready' | 'error') => void;
|
|
122
96
|
editorStateRef?: React.MutableRefObject<{
|
|
123
97
|
refreshIndexedDB: () => Promise<void>;
|
|
124
98
|
getContentSnapshot: () => DSheetContentSnapshot;
|
|
@@ -23,12 +23,12 @@ export declare const getCustomToolbarItems: ({ handleContentPortal, setShowSmart
|
|
|
23
23
|
}) => ({
|
|
24
24
|
key: string;
|
|
25
25
|
tooltip: string;
|
|
26
|
-
icon:
|
|
26
|
+
icon: import("react/jsx-runtime").JSX.Element;
|
|
27
27
|
onClick?: undefined;
|
|
28
28
|
} | {
|
|
29
29
|
key: string;
|
|
30
30
|
tooltip: string;
|
|
31
|
-
icon:
|
|
31
|
+
icon: import("react/jsx-runtime").JSX.Element;
|
|
32
32
|
onClick: (() => void) | undefined;
|
|
33
33
|
})[];
|
|
34
34
|
type ReadOnlyExportDeps = {
|
|
@@ -45,6 +45,6 @@ export declare const getReadOnlyCustomToolbarItems: ({ setExportDropdownOpen, ha
|
|
|
45
45
|
key: string;
|
|
46
46
|
tooltip: string;
|
|
47
47
|
onClick: () => void;
|
|
48
|
-
icon:
|
|
48
|
+
icon: import("react/jsx-runtime").JSX.Element;
|
|
49
49
|
}[];
|
|
50
50
|
export {};
|
|
@@ -36,7 +36,6 @@ export declare const SUPPORTED_VIEM_CHAIN_MAP: {
|
|
|
36
36
|
};
|
|
37
37
|
};
|
|
38
38
|
sourceId?: number | undefined | undefined;
|
|
39
|
-
supportsTransactionReplacementDetection?: boolean | undefined | undefined;
|
|
40
39
|
testnet: true;
|
|
41
40
|
custom?: Record<string, unknown> | undefined;
|
|
42
41
|
extendSchema?: Record<string, unknown> | undefined;
|
|
@@ -85,7 +84,6 @@ export declare const SUPPORTED_VIEM_CHAIN_MAP: {
|
|
|
85
84
|
};
|
|
86
85
|
};
|
|
87
86
|
sourceId?: number | undefined | undefined;
|
|
88
|
-
supportsTransactionReplacementDetection?: boolean | undefined | undefined;
|
|
89
87
|
testnet?: boolean | undefined | undefined;
|
|
90
88
|
custom?: Record<string, unknown> | undefined;
|
|
91
89
|
extendSchema?: Record<string, unknown> | undefined;
|
|
@@ -173,7 +171,6 @@ export declare const SUPPORTED_VIEM_CHAIN_MAP: {
|
|
|
173
171
|
};
|
|
174
172
|
};
|
|
175
173
|
sourceId: 1;
|
|
176
|
-
supportsTransactionReplacementDetection?: boolean | undefined | undefined;
|
|
177
174
|
testnet?: boolean | undefined | undefined;
|
|
178
175
|
custom?: Record<string, unknown> | undefined;
|
|
179
176
|
extendSchema?: Record<string, unknown> | undefined;
|
|
@@ -408,8 +405,6 @@ export declare const SUPPORTED_VIEM_CHAIN_MAP: {
|
|
|
408
405
|
transactionHash: import('viem').Hash;
|
|
409
406
|
transactionIndex: number;
|
|
410
407
|
type: import('viem').TransactionType;
|
|
411
|
-
depositNonce?: bigint | undefined | undefined;
|
|
412
|
-
depositReceiptVersion?: number | undefined | undefined;
|
|
413
408
|
l1GasPrice: bigint | null;
|
|
414
409
|
l1GasUsed: bigint | null;
|
|
415
410
|
l1Fee: bigint | null;
|
|
@@ -462,11 +457,10 @@ export declare const SUPPORTED_VIEM_CHAIN_MAP: {
|
|
|
462
457
|
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
463
458
|
rpcUrls: {
|
|
464
459
|
readonly default: {
|
|
465
|
-
readonly http: readonly ["https://
|
|
460
|
+
readonly http: readonly ["https://eth.merkle.io"];
|
|
466
461
|
};
|
|
467
462
|
};
|
|
468
463
|
sourceId?: number | undefined | undefined;
|
|
469
|
-
supportsTransactionReplacementDetection?: boolean | undefined | undefined;
|
|
470
464
|
testnet?: boolean | undefined | undefined;
|
|
471
465
|
custom?: Record<string, unknown> | undefined;
|
|
472
466
|
extendSchema?: Record<string, unknown> | undefined;
|