@fileverse-dev/dsheet 2.1.2-dropIn-1 → 2.1.2-dropIn-3

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.
@@ -1,4 +1,5 @@
1
1
  import { default as React } from 'react';
2
+ import { SidebarPortalRegistryHandle, SidebarPortalRenderer } from '../../sheet-engine/react';
2
3
  import { SmartContractQueryHandler } from '../utils/after-update-cell';
3
4
  import { OnboardingHandlerType, DataBlockApiKeyHandlerType } from '../types';
4
5
  import { CommentsConfig } from '../types/comments';
@@ -26,6 +27,9 @@ interface EditorWorkbookProps {
26
27
  onDuneChartEmbed?: () => void;
27
28
  onSheetCountChange?: (sheetCount: number) => void;
28
29
  handleSmartContractQuery?: SmartContractQueryHandler;
30
+ sidebarActivePanel?: string | null;
31
+ sidebarPortalRegistry?: SidebarPortalRegistryHandle | null;
32
+ sidebarPortalRenderers?: Record<string, SidebarPortalRenderer>;
29
33
  }
30
34
  export declare const EditorWorkbook: React.NamedExoticComponent<EditorWorkbookProps>;
31
35
  export {};
@@ -0,0 +1,20 @@
1
+ import { CSSProperties, ReactNode } from 'react';
2
+
3
+ export type SidebarPortalTargets = Record<string, HTMLElement>;
4
+ export type SidebarPortalRegistryHandle = {
5
+ getTargets: () => SidebarPortalTargets;
6
+ subscribe: (onStoreChange: () => void) => () => void;
7
+ };
8
+ export declare function SidebarPortalRegistryProvider({ children, }: Readonly<{
9
+ children: ReactNode;
10
+ }>): import("react/jsx-runtime").JSX.Element;
11
+ export declare function useSidebarPortalRegistryHandle(): SidebarPortalRegistryHandle;
12
+ export declare function useSidebarPortalTargets(): SidebarPortalTargets;
13
+ export declare function useSidebarPortalTarget(panelId: string): (node: HTMLElement | null) => void;
14
+ interface SidebarPortalSlotProps {
15
+ panelId: string;
16
+ className?: string;
17
+ style?: CSSProperties;
18
+ }
19
+ export declare function SidebarPortalSlot({ panelId, className, style, }: Readonly<SidebarPortalSlotProps>): import("react/jsx-runtime").JSX.Element;
20
+ export {};
@@ -48,6 +48,7 @@ export interface CommentsConfig {
48
48
  isAuthenticated?: boolean;
49
49
  unauthenticatedFallback?: React.ReactNode;
50
50
  ensResolutionUrl?: string;
51
+ disabled?: boolean;
51
52
  }
52
53
  export interface CellPosition {
53
54
  row: number;
@@ -115,6 +116,7 @@ export interface CommentCellUIProps {
115
116
  removeCommentFromCell: (row: number, col: number) => void;
116
117
  dragHandler: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
117
118
  isHover?: boolean;
119
+ disabled?: boolean;
118
120
  }
119
121
  export interface CommentsContentProps {
120
122
  sheetEditorRef: React.RefObject<SheetEditorRef>;
@@ -125,4 +127,5 @@ export interface CommentsContentProps {
125
127
  ownerAddress?: string;
126
128
  currentUserAddress?: string;
127
129
  isOwner?: boolean;
130
+ disabled?: boolean;
128
131
  }