@fileverse-dev/dsheet 2.1.2-dropIn-5 → 2.1.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.
Files changed (49) hide show
  1. package/dist/editor/components/editor-workbook.d.ts +9 -8
  2. package/dist/editor/contexts/editor-context.d.ts +2 -2
  3. package/dist/editor/dsheet-editor.d.ts +1 -1
  4. package/dist/editor/types.d.ts +5 -19
  5. package/dist/{executeStringFunction-CGbxAbbw.js → executeStringFunction-BkmJj04p.js} +96 -96
  6. package/dist/formula.js +1 -1
  7. package/dist/{index-BDaOOD6V.js → index-DMKCgPDx.js} +39101 -41307
  8. package/dist/index.d.ts +0 -7
  9. package/dist/index.es.js +51 -55
  10. package/dist/sheet-engine/react/components/Toolbar/conditionalFormatPortal.d.ts +7 -0
  11. package/dist/sheet-engine/react/components/Toolbar/dataVerificationPortal.d.ts +6 -0
  12. package/dist/sheet-engine/react/components/Workbook/index.d.ts +0 -4
  13. package/dist/sheet-engine/react/components/index.d.ts +0 -1
  14. package/dist/style.css +1 -1
  15. package/dist/{use-xlsx-import-impl-CLQyfm8_.js → use-xlsx-import-impl-hXBO_hh5.js} +2 -2
  16. package/dist/{xlsx-export-impl-DXIj7EEk.js → xlsx-export-impl-D12yGGTG.js} +2 -2
  17. package/package.json +2 -3
  18. package/dist/editor/components/comments/comment-actions-dropdown.d.ts +0 -19
  19. package/dist/editor/components/comments/comment-cell-popup.d.ts +0 -4
  20. package/dist/editor/components/comments/comment-input.d.ts +0 -4
  21. package/dist/editor/components/comments/comment-item.d.ts +0 -4
  22. package/dist/editor/components/comments/comment-sidebar-empty.d.ts +0 -4
  23. package/dist/editor/components/comments/comment-sidebar.d.ts +0 -4
  24. package/dist/editor/components/comments/ens/ens-cache.d.ts +0 -10
  25. package/dist/editor/components/comments/ens/use-ens-status.d.ts +0 -10
  26. package/dist/editor/components/comments/use-comment-cell-popup.d.ts +0 -12
  27. package/dist/editor/components/comments/use-comment-permissions.d.ts +0 -15
  28. package/dist/editor/components/sidebar/editor-right-sidebar.d.ts +0 -20
  29. package/dist/editor/components/sidebar/right-sidebar.d.ts +0 -14
  30. package/dist/editor/components/sidebar/sidebar-context.d.ts +0 -17
  31. package/dist/editor/components/sidebar/sidebar-portal-registry.d.ts +0 -20
  32. package/dist/editor/components/sidebar/use-right-panels.d.ts +0 -12
  33. package/dist/editor/components/sidebars/conditional-format.d.ts +0 -2
  34. package/dist/editor/components/sidebars/data-verification.d.ts +0 -2
  35. package/dist/editor/components/sidebars/function/function-categories-logic.d.ts +0 -11
  36. package/dist/editor/components/sidebars/function/function-categories.d.ts +0 -6
  37. package/dist/editor/components/sidebars/function/function-metadata.d.ts +0 -7
  38. package/dist/editor/components/sidebars/function/functionList.d.ts +0 -8
  39. package/dist/editor/components/sidebars/function/types.d.ts +0 -24
  40. package/dist/editor/components/sidebars/function/use-functions.d.ts +0 -20
  41. package/dist/editor/components/sidebars/function-content.d.ts +0 -8
  42. package/dist/editor/components/sidebars/template-ui.d.ts +0 -22
  43. package/dist/editor/components/sidebars/templates.d.ts +0 -9
  44. package/dist/editor/types/comments.d.ts +0 -133
  45. package/dist/editor/utils/api-keys-local-storage.d.ts +0 -17
  46. package/dist/editor/utils/cell-comment-marker.d.ts +0 -29
  47. package/dist/editor/utils/comment-key-utils.d.ts +0 -7
  48. package/dist/editor/utils/sheet-editor-safe.d.ts +0 -26
  49. package/dist/sheet-engine/react/components/SidebarPanelPortals/index.d.ts +0 -17
@@ -1,6 +1,6 @@
1
- import { g as Ue } from "./executeStringFunction-CGbxAbbw.js";
1
+ import { g as Ue } from "./executeStringFunction-BkmJj04p.js";
2
2
  import * as qe from "yjs";
3
- import { m as Xe, y as Ze } from "./index-BDaOOD6V.js";
3
+ import { m as Xe, y as Ze } from "./index-DMKCgPDx.js";
4
4
  import { n as Je } from "./xlsx-hyperlink-inline-DzewAypN.js";
5
5
  import { toast as Be } from "@fileverse/ui";
6
6
  var We = { exports: {} };
@@ -2,8 +2,8 @@ import { utils as dt, write as Nt } from "xlsx-js-style";
2
2
  import { Workbook as Pt } from "exceljs";
3
3
  import { toast as Ut } from "@fileverse/ui";
4
4
  import { addFortuneImagesToWorksheet as Lt } from "./xlsx-image-utils-Cvg0qxRA.js";
5
- import { g as jt, c as xt } from "./executeStringFunction-CGbxAbbw.js";
6
- import { c as Ct } from "./index-BDaOOD6V.js";
5
+ import { g as jt, c as xt } from "./executeStringFunction-BkmJj04p.js";
6
+ import { c as Ct } from "./index-DMKCgPDx.js";
7
7
  import { c as zt, g as Wt } from "./xlsx-hyperlink-inline-DzewAypN.js";
8
8
  const Mt = {
9
9
  1: "thin",
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@fileverse-dev/dsheet",
3
3
  "private": false,
4
4
  "description": "DSheet",
5
- "version": "2.1.2-dropIn-5",
5
+ "version": "2.1.3",
6
6
  "main": "dist/index.es.js",
7
7
  "module": "dist/index.es.js",
8
8
  "exports": {
@@ -52,7 +52,6 @@
52
52
  "@fileverse-dev/dsheets-templates": "^0.0.29",
53
53
  "@fileverse-dev/formulajs": "^4.4.53",
54
54
  "@fileverse/crypto": "^0.0.22",
55
- "@fileverse/ens": "^0.0.4",
56
55
  "@fileverse/ui": "^5.0.0",
57
56
  "@noble/ciphers": "^2.2.0",
58
57
  "@noble/curves": "^2.2.0",
@@ -111,4 +110,4 @@
111
110
  "typescript": "^5.2.2",
112
111
  "vite": "^5.0.0"
113
112
  }
114
- }
113
+ }
@@ -1,19 +0,0 @@
1
- import { default as React } from 'react';
2
- import { CommentThread, CommentReply, CommentActionParams } from '../../types/comments';
3
-
4
- interface CommentActionsDropdownProps {
5
- comment: CommentThread | CommentReply;
6
- onAction: (action: CommentActionParams) => void;
7
- isReply?: boolean;
8
- parentCommentId?: string;
9
- ownerAddress?: string;
10
- currentUserName?: string;
11
- currentUserAddress?: string;
12
- isOwner?: boolean;
13
- dsheetId?: string;
14
- commentKey?: string;
15
- row: number;
16
- col: number;
17
- }
18
- export declare const CommentActionsDropdown: React.FC<CommentActionsDropdownProps>;
19
- export {};
@@ -1,4 +0,0 @@
1
- import { default as React } from 'react';
2
- import { CommentCellUIProps } from '../../types/comments';
3
-
4
- export declare const CommentCellUI: React.FC<CommentCellUIProps>;
@@ -1,4 +0,0 @@
1
- import { default as React } from 'react';
2
- import { CommentInputProps } from '../../types/comments';
3
-
4
- export declare const CommentInput: React.FC<CommentInputProps>;
@@ -1,4 +0,0 @@
1
- import { default as React } from 'react';
2
- import { CommentItemProps } from '../../types/comments';
3
-
4
- export declare const CommentItem: React.FC<CommentItemProps>;
@@ -1,4 +0,0 @@
1
- declare const CommentSidebarEmpty: ({ setShowComment, }: {
2
- setShowComment: React.Dispatch<React.SetStateAction<boolean>>;
3
- }) => import("react/jsx-runtime").JSX.Element;
4
- export { CommentSidebarEmpty };
@@ -1,4 +0,0 @@
1
- import { default as React } from 'react';
2
- import { CommentsContentProps } from '../../types/comments';
3
-
4
- export declare const CommentsContent: React.FC<CommentsContentProps>;
@@ -1,10 +0,0 @@
1
- export interface EnsStatus {
2
- name: string;
3
- isEns: boolean;
4
- }
5
- /** Push the host-provided RPC URL into the singleton (called from EditorContent). */
6
- export declare const setEnsResolutionUrl: (url: string | undefined) => void;
7
- export declare const subscribeEns: (cb: () => void) => () => boolean;
8
- export declare const getCachedEns: (username: string) => EnsStatus | undefined;
9
- /** Resolve `username` to an EnsStatus, deduped + cached. No-op if already cached/in-flight. */
10
- export declare const resolveEns: (username: string) => Promise<void>;
@@ -1,10 +0,0 @@
1
- import { EnsStatus } from './ens-cache';
2
-
3
- /**
4
- * Resolve a comment username to a display name + ENS flag.
5
- * - Empty → "Anonymous".
6
- * - Cache hit → returned immediately.
7
- * - Miss → triggers a deduped resolve; re-renders when it lands.
8
- * - Plain names short-circuit inside getAddressName (no network).
9
- */
10
- export declare const useEnsStatus: (username?: string) => EnsStatus;
@@ -1,12 +0,0 @@
1
- export declare const useCommentCell: ({ onSendComment, cellKey, }: {
2
- onSendComment: (commentKey: string, textareaId: string) => void;
3
- cellKey: string;
4
- }) => {
5
- cellKey: string;
6
- textareaId: string;
7
- handleSend: (textareaId: string) => void;
8
- handleKeyDown: (e: React.KeyboardEvent) => void;
9
- handleDoubleClick: (e: React.MouseEvent) => void;
10
- handleScroll: (e: React.UIEvent) => void;
11
- handler: (e: WheelEvent) => void;
12
- };
@@ -1,15 +0,0 @@
1
- export declare const useCommentPermissions: (ownerAddress?: string, currentUserName?: string, currentUserAddress?: string, isOwner?: boolean) => {
2
- canDeleteComment: (item: {
3
- username: string;
4
- }) => boolean;
5
- canResolveComment: (item: {
6
- username: string;
7
- }) => boolean;
8
- canDeleteReply: (item: {
9
- username: string;
10
- }) => boolean;
11
- canResolveReply: (item: {
12
- username: string;
13
- }) => boolean;
14
- isOwner: boolean;
15
- };
@@ -1,20 +0,0 @@
1
- import { ReactNode } from 'react';
2
-
3
- export interface ActivePanelConfig {
4
- id: string;
5
- width: string;
6
- header: {
7
- title: string;
8
- subtitle?: string;
9
- };
10
- content: ReactNode;
11
- }
12
- interface EditorRightSidebarProps {
13
- isOpen: boolean;
14
- activePanelConfig: ActivePanelConfig | null;
15
- onClose: () => void;
16
- /** Read/preview mode hides the toolbar, so the sidebar starts higher. */
17
- isReadOnly?: boolean;
18
- }
19
- export declare const EditorRightSidebar: ({ isOpen, activePanelConfig, onClose, isReadOnly, }: EditorRightSidebarProps) => import("react/jsx-runtime").JSX.Element;
20
- export {};
@@ -1,14 +0,0 @@
1
- import { ReactNode } from 'react';
2
-
3
- export declare function RightSidebar({ width, className, children, isOpen, top, height, }: Readonly<{
4
- width?: string;
5
- className?: string;
6
- children: ReactNode;
7
- isOpen?: boolean;
8
- top?: string;
9
- height?: string;
10
- }>): import("react/jsx-runtime").JSX.Element;
11
- export declare function RightSidebarHeader({ className, children, }: Readonly<{
12
- className?: string;
13
- children: ReactNode;
14
- }>): import("react/jsx-runtime").JSX.Element;
@@ -1,17 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { PanelId } from './use-right-panels';
3
-
4
- interface SidebarContextType {
5
- activePanel: PanelId | null;
6
- isOpen: boolean;
7
- openPanel: (panel: PanelId) => void;
8
- closePanel: () => void;
9
- togglePanel: (panel: PanelId) => void;
10
- isActive: (panel: PanelId) => boolean;
11
- }
12
- export declare function SidebarProvider({ children, isReadMode, }: Readonly<{
13
- children: ReactNode;
14
- isReadMode?: boolean;
15
- }>): import("react/jsx-runtime").JSX.Element;
16
- export declare function useSidebar(): SidebarContextType;
17
- export {};
@@ -1,20 +0,0 @@
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 {};
@@ -1,12 +0,0 @@
1
- export type BuiltInPanelType = 'templates' | 'comments' | 'functions' | 'data-verification' | 'conditional-format';
2
- export type PanelId = BuiltInPanelType | string;
3
- interface UseRightPanelsReturn {
4
- activePanel: PanelId | null;
5
- isOpen: boolean;
6
- openPanel: (panel: PanelId) => void;
7
- closePanel: () => void;
8
- togglePanel: (panel: PanelId) => void;
9
- isActive: (panel: PanelId) => boolean;
10
- }
11
- export declare const useRightPanels: (isReadMode?: boolean) => UseRightPanelsReturn;
12
- export {};
@@ -1,2 +0,0 @@
1
- declare const ConditionalFormat: () => import("react/jsx-runtime").JSX.Element;
2
- export { ConditionalFormat };
@@ -1,2 +0,0 @@
1
- declare const DataVerification: () => import("react/jsx-runtime").JSX.Element;
2
- export { DataVerification };
@@ -1,11 +0,0 @@
1
- import { SpreadsheetFunction } from './types';
2
-
3
- export declare const PARSER_FUNCTIONS: Set<string>;
4
- export declare const TYPE_TO_CATEGORY_KEY: Record<number, string>;
5
- export declare const CATEGORY_ORDER: readonly ["All", "Datablock", "Array", "Database", "Date", "Engineering", "Financial", "Info", "Logical", "Lookup", "Math", "Operator", "Parser", "Statistical", "Text", "Other"];
6
- export type CategoryKey = (typeof CATEGORY_ORDER)[number];
7
- export declare function getFunctionCategoryKey(fnName: string, typeId: number): CategoryKey;
8
- export declare function groupFunctionsByCategory(functionlist: SpreadsheetFunction[]): {
9
- categories: ("Text" | "Date" | "Other" | "Logical" | "All" | "Array" | "Database" | "Engineering" | "Datablock" | "Financial" | "Lookup" | "Math" | "Operator" | "Parser" | "Statistical" | "Info")[];
10
- byCategory: Map<"Text" | "Date" | "Other" | "Logical" | "All" | "Array" | "Database" | "Engineering" | "Datablock" | "Financial" | "Lookup" | "Math" | "Operator" | "Parser" | "Statistical" | "Info", SpreadsheetFunction[]>;
11
- };
@@ -1,6 +0,0 @@
1
- declare const FunctionCategories: ({ onCategorySelection, categories, categoryName, }: {
2
- onCategorySelection: (value: string) => void;
3
- categoryName: string;
4
- categories: string[];
5
- }) => import("react/jsx-runtime").JSX.Element;
6
- export default FunctionCategories;
@@ -1,7 +0,0 @@
1
- import { SpreadsheetFunction } from './types';
2
-
3
- declare const FunctionMetadata: ({ selectedFunction, onInsert, }: {
4
- selectedFunction: SpreadsheetFunction;
5
- onInsert: () => void;
6
- }) => import("react/jsx-runtime").JSX.Element;
7
- export default FunctionMetadata;
@@ -1,8 +0,0 @@
1
- import { SpreadsheetFunction } from './types';
2
-
3
- declare const FunctionList: ({ list, onFunctionSelection, selectedFunction, }: {
4
- list: SpreadsheetFunction[];
5
- onFunctionSelection: (data: SpreadsheetFunction, functionIndex: number) => void;
6
- selectedFunction: SpreadsheetFunction | null;
7
- }) => import("react/jsx-runtime").JSX.Element;
8
- export default FunctionList;
@@ -1,24 +0,0 @@
1
- export type FunctionParam = {
2
- name: string;
3
- detail: string;
4
- example: string;
5
- require: string;
6
- repeat: string;
7
- type: string;
8
- };
9
- export type SpreadsheetFunction = {
10
- API_KEY: string;
11
- LOGO: string;
12
- BRAND_COLOR: string;
13
- n: string;
14
- t: any;
15
- d: string;
16
- a: string;
17
- m?: number[];
18
- p: FunctionParam[];
19
- examples: {
20
- title: string;
21
- argumentString: string;
22
- description: string;
23
- }[];
24
- };
@@ -1,20 +0,0 @@
1
- import { WorkbookInstance } from '../../../../sheet-engine/react';
2
- import { default as React } from 'react';
3
- import { SpreadsheetFunction } from './types';
4
-
5
- declare const useFunctions: (sheetEditorRef: React.RefObject<WorkbookInstance>, shouldHandleSuggestionFromCell: number) => {
6
- filteredFunctionList: SpreadsheetFunction[];
7
- functionIndex: number;
8
- setFunctionIndex: React.Dispatch<React.SetStateAction<number>>;
9
- setSearchText: React.Dispatch<React.SetStateAction<string>>;
10
- selectedFunction: SpreadsheetFunction | null;
11
- groupedFunctions: {
12
- categories: ("Text" | "Date" | "Other" | "Logical" | "All" | "Array" | "Database" | "Engineering" | "Datablock" | "Financial" | "Lookup" | "Math" | "Operator" | "Parser" | "Statistical" | "Info")[];
13
- byCategory: Map<"Text" | "Date" | "Other" | "Logical" | "All" | "Array" | "Database" | "Engineering" | "Datablock" | "Financial" | "Lookup" | "Math" | "Operator" | "Parser" | "Statistical" | "Info", SpreadsheetFunction[]>;
14
- };
15
- setSelectedCategory: React.Dispatch<React.SetStateAction<"Text" | "Date" | "Other" | "Logical" | "All" | "Array" | "Database" | "Engineering" | "Datablock" | "Financial" | "Lookup" | "Math" | "Operator" | "Parser" | "Statistical" | "Info">>;
16
- setSelectedFunction: React.Dispatch<React.SetStateAction<SpreadsheetFunction | null>>;
17
- searchText: string;
18
- selectedCategoryName: "Text" | "Date" | "Other" | "Logical" | "All" | "Array" | "Database" | "Engineering" | "Datablock" | "Financial" | "Lookup" | "Math" | "Operator" | "Parser" | "Statistical" | "Info";
19
- };
20
- export default useFunctions;
@@ -1,8 +0,0 @@
1
- import { default as React } from 'react';
2
- import { WorkbookInstance } from '../../../sheet-engine/react';
3
-
4
- declare const FunctionContent: ({ sheetEditorRef, shouldHandleSuggestionFromCell, }: {
5
- sheetEditorRef: React.RefObject<WorkbookInstance>;
6
- shouldHandleSuggestionFromCell: number;
7
- }) => import("react/jsx-runtime").JSX.Element;
8
- export default FunctionContent;
@@ -1,22 +0,0 @@
1
- export interface Template {
2
- slug: string;
3
- title: string;
4
- description: string;
5
- thumbnail: string;
6
- fullImage: string;
7
- category?: string;
8
- isProTemplate: boolean;
9
- techStack: {
10
- name: string;
11
- image: string;
12
- }[];
13
- }
14
- export declare const TemplateCard: ({ template, onMouseEnter, onMouseLeave, onSelect, }: {
15
- template: Template;
16
- onMouseEnter?: () => void;
17
- onMouseLeave?: () => void;
18
- onSelect: () => void;
19
- }) => import("react/jsx-runtime").JSX.Element;
20
- export declare const TemplatePreview: ({ template }: {
21
- template: Template;
22
- }) => import("react/jsx-runtime").JSX.Element;
@@ -1,9 +0,0 @@
1
- import { default as React } from 'react';
2
- import { Template } from './template-ui';
3
-
4
- interface TemplatesProps {
5
- setSelectedTemplate: (template: string) => void;
6
- setHoveredTemplate: React.Dispatch<React.SetStateAction<Template | null>>;
7
- }
8
- export declare const Templates: ({ setSelectedTemplate, setHoveredTemplate, }: TemplatesProps) => import("react/jsx-runtime").JSX.Element;
9
- export {};
@@ -1,133 +0,0 @@
1
- import { default as React } from 'react';
2
-
3
- export interface CommentThread {
4
- id: string;
5
- key: string;
6
- dsheetId: string;
7
- username: string;
8
- content: string;
9
- createdAt: string;
10
- commentIndex: number;
11
- cellContent?: string;
12
- replies: CommentReply[];
13
- isResolved?: boolean;
14
- isDeleted?: boolean;
15
- }
16
- export interface CommentReply {
17
- id: string;
18
- username: string;
19
- content: string;
20
- createdAt: string;
21
- commentIndex: number;
22
- isResolved?: boolean;
23
- isDeleted?: boolean;
24
- }
25
- export declare enum CommentAction {
26
- RESOLVE = "resolve",
27
- UNRESOLVE = "unresolve",
28
- DELETE = "delete"
29
- }
30
- export interface CommentActionParams {
31
- action: CommentAction;
32
- commentId: string;
33
- dsheetId: string;
34
- commentKey: string;
35
- isReply?: boolean;
36
- parentCommentId?: string;
37
- row: number;
38
- col: number;
39
- }
40
- export interface CommentsConfig {
41
- commentsData: Record<string, CommentThread>;
42
- onSendComment: (key: string, textareaId: string) => void;
43
- onCommentAction: (action: CommentActionParams) => void;
44
- userName?: string;
45
- ownerAddress?: string;
46
- currentUserAddress?: string;
47
- isOwner?: boolean;
48
- isAuthenticated?: boolean;
49
- unauthenticatedFallback?: React.ReactNode;
50
- ensResolutionUrl?: string;
51
- disabled?: boolean;
52
- }
53
- export interface CellPosition {
54
- row: number;
55
- col: number;
56
- sheetId?: string;
57
- }
58
- export interface SheetEditorRef {
59
- scroll: (o: {
60
- scrollLeft?: number;
61
- scrollTop?: number;
62
- targetRow?: number;
63
- targetColumn?: number;
64
- }) => void;
65
- setSelection: (s: Array<{
66
- row: number[];
67
- column: number[];
68
- }>) => void;
69
- }
70
- export interface CommentInputProps {
71
- id: string;
72
- onSend: (textareaId: string) => void;
73
- placeholder?: string;
74
- autoFocus?: boolean;
75
- className?: string;
76
- backgroundColor?: string;
77
- inCellComment?: boolean;
78
- cancelComment?: () => void;
79
- onBlur?: () => void;
80
- isStaticButton?: boolean;
81
- removeCancelButton?: boolean;
82
- focusTrap?: boolean;
83
- disabled?: boolean;
84
- }
85
- export interface CommentItemProps {
86
- comment: CommentThread;
87
- showAvatar?: boolean;
88
- avatarSize?: 'sm' | 'md' | 'lg';
89
- className?: string;
90
- isHovered?: boolean;
91
- sheetName?: string;
92
- cellReference?: string;
93
- onAction?: (a: CommentActionParams) => void;
94
- ownerAddress?: string;
95
- currentUserAddress?: string;
96
- isOwner?: boolean;
97
- currentUserName?: string;
98
- contentClassName?: string;
99
- isCellPopup?: boolean;
100
- shouldShowActions?: boolean;
101
- row?: number;
102
- col?: number;
103
- }
104
- export interface CommentCellUIProps {
105
- row: number;
106
- col: number;
107
- sheetId: string;
108
- comment?: CommentThread;
109
- onSendComment: (commentKey: string, textareaId: string) => void;
110
- onAction?: (a: CommentActionParams) => void;
111
- ownerAddress?: string;
112
- currentUserAddress?: string;
113
- isOwner?: boolean;
114
- sheetEditorRef?: React.RefObject<SheetEditorRef>;
115
- currentUserName?: string;
116
- removeCommentFromCell: (row: number, col: number) => void;
117
- dragHandler: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
118
- isHover?: boolean;
119
- disabled?: boolean;
120
- }
121
- export interface CommentsContentProps {
122
- sheetEditorRef: React.RefObject<SheetEditorRef>;
123
- userName: string | undefined;
124
- commentsData: Record<string, CommentThread>;
125
- onSendComment: (commentKey: string, textareaId: string) => void;
126
- onCommentAction?: (a: CommentActionParams) => void;
127
- ownerAddress?: string;
128
- currentUserAddress?: string;
129
- isOwner?: boolean;
130
- disabled?: boolean;
131
- isAuthenticated?: boolean;
132
- unauthenticatedFallback?: React.ReactNode;
133
- }
@@ -1,17 +0,0 @@
1
- export declare const INVALID_KEY_MARKER = "_invalid";
2
- export declare const RATE_LIMITED_KEYS = "RATE_LIMITED_KEYS";
3
- export declare const DATABLOCK_API_KEYS: string[];
4
- export declare class ApiKeyStorageHelper {
5
- static getApiKey(keyName: string): string;
6
- static clearApiKeys(): void;
7
- static saveApiKey(keyName: string, key: string): void;
8
- static getAllSupportedApiKeys(): Record<string, string>;
9
- static getListOfRateLimitedKeys(): any;
10
- static markKeyAsRateLimited(key: string): void;
11
- }
12
- export declare const getApiKey: (keyName: string) => string;
13
- export declare const clearApiKeys: () => void;
14
- export declare const saveApiKey: (keyName: string, key: string) => void;
15
- export declare const getListOfRateLimitedKeys: () => any;
16
- export declare const getAllSupportedApiKeysInLs: () => Record<string, string>;
17
- export declare const markKeyAsRateLimited: (key: string) => void;
@@ -1,29 +0,0 @@
1
- type SheetEditorRefLike = {
2
- current: {
3
- getWorkbookSetContext?: () => unknown;
4
- } | null;
5
- } | null | undefined;
6
- /**
7
- * Clears the comment indicator from a cell.
8
- *
9
- * - Hides the package-rendered marker DOM node immediately so the user sees
10
- * the change without waiting for a re-render.
11
- * - Sets `cell.ps = undefined` in the workbook model so the dsheet package
12
- * stops drawing the marker on subsequent renders / persists.
13
- *
14
- * Used on top-level comment delete and on top-level comment resolve.
15
- */
16
- export declare const hideCellCommentMarker: (sheetEditorRef: SheetEditorRefLike, row: number, col: number) => void;
17
- /**
18
- * Restores the comment indicator on a cell.
19
- *
20
- * - Removes the inline `display: none` we set on hide so the package's marker
21
- * DOM node becomes visible again if it still exists.
22
- * - Re-creates a minimal `cell.ps` stub in the workbook model so the package
23
- * redraws the marker on next render. Geometry fields are `null` so the
24
- * package recomputes them; the existing `ps` is preserved if already set.
25
- *
26
- * Used on top-level comment unresolve.
27
- */
28
- export declare const showCellCommentMarker: (sheetEditorRef: SheetEditorRefLike, row: number, col: number, value?: string) => void;
29
- export {};
@@ -1,7 +0,0 @@
1
- import { CellPosition } from '../types/comments';
2
-
3
- export declare const parseCellKey: (key: string) => CellPosition | null;
4
- export declare const generateWithoutCellKey: (dataLength: number) => string;
5
- export declare const isCellComment: (key: string) => boolean;
6
- export declare const getCellReference: (row: number, col: number) => string;
7
- export declare const formatCommentDateTime: (dateString: string) => string;
@@ -1,26 +0,0 @@
1
- import { RefObject } from 'react';
2
- import { SheetEditorRef } from '../types/comments';
3
-
4
- type SheetEditorRefLike = RefObject<SheetEditorRef | null> | null | undefined;
5
- type WorkbookSheetLike = {
6
- id?: string;
7
- order?: number;
8
- name?: string;
9
- };
10
- export declare function isWorkbookReady(ref: SheetEditorRefLike): boolean;
11
- export declare function getCurrentSheetSafe(ref: SheetEditorRefLike): WorkbookSheetLike | null;
12
- export declare function getCurrentSheetOrderSafe(ref: SheetEditorRefLike): number;
13
- export declare function getCurrentSheetIdSafe(ref: SheetEditorRefLike): string;
14
- export declare function getAllSheetsSafe(ref: SheetEditorRefLike): WorkbookSheetLike[];
15
- export declare function buildSheetOrderNameMap(ref: SheetEditorRefLike): Map<number, string>;
16
- /**
17
- * Returns a map keyed by BOTH the sheet's immutable id AND its numeric
18
- * order-as-string so that both new (UUID) and legacy (order) comment keys
19
- * resolve to the correct display name in a single lookup.
20
- */
21
- export declare function buildSheetIdNameMap(ref: SheetEditorRefLike): Map<string, string>;
22
- export declare function findSheetById(ref: SheetEditorRefLike, id: string): WorkbookSheetLike | null;
23
- export declare function activateSheetById(ref: SheetEditorRefLike, id: string): boolean;
24
- export declare function findSheetByOrder(ref: SheetEditorRefLike, order: number): WorkbookSheetLike | null;
25
- export declare function activateSheetByOrder(ref: SheetEditorRefLike, order: number): boolean;
26
- export {};
@@ -1,17 +0,0 @@
1
- import { default as React } from 'react';
2
- import { Context } from '../../../core';
3
- import { default as WorkbookContext } from '../../context';
4
-
5
- export type SidebarPortalTargets = Record<string, HTMLElement | undefined>;
6
- export type SidebarPortalRegistryHandle = {
7
- getTargets: () => SidebarPortalTargets;
8
- subscribe: (onStoreChange: () => void) => () => void;
9
- };
10
- export type SidebarPortalRenderer = (workbook: React.ContextType<typeof WorkbookContext>) => React.ReactNode;
11
- interface SidebarPanelPortalsProps {
12
- activePanel: string | null;
13
- portalRegistry?: SidebarPortalRegistryHandle | null;
14
- extraPortals?: Record<string, SidebarPortalRenderer>;
15
- }
16
- export declare function SidebarPanelPortals({ activePanel, portalRegistry, extraPortals, }: Readonly<SidebarPanelPortalsProps>): React.ReactPortal | null;
17
- export type { Context };