@fileverse-dev/dsheet 2.1.3-package-cleanup-1 → 2.1.3-rtc-debug-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.
Files changed (74) hide show
  1. package/dist/editor/components/editor-workbook.d.ts +14 -11
  2. package/dist/editor/contexts/editor-context.d.ts +4 -16
  3. package/dist/editor/dsheet-editor.d.ts +1 -1
  4. package/dist/editor/hooks/live-query/use-live-query.d.ts +2 -4
  5. package/dist/editor/hooks/use-editor-data.d.ts +2 -4
  6. package/dist/editor/types.d.ts +29 -36
  7. package/dist/editor/utils/after-update-cell.d.ts +8 -13
  8. package/dist/{executeStringFunction-C26SXUpc.js → executeStringFunction-BkmJj04p.js} +4364 -4742
  9. package/dist/formula.js +1 -1
  10. package/dist/index-DbuVGe3U.js +52666 -0
  11. package/dist/index.d.ts +1 -8
  12. package/dist/index.es.js +51 -55
  13. package/dist/sheet-engine/core/context.d.ts +0 -5
  14. package/dist/sheet-engine/core/index.d.ts +1 -1
  15. package/dist/sheet-engine/core/modules/formula.d.ts +1 -26
  16. package/dist/sheet-engine/core/modules/index.d.ts +1 -3
  17. package/dist/sheet-engine/react/components/SheetOverlay/Icon.d.ts +4 -5
  18. package/dist/sheet-engine/react/components/SheetOverlay/LucideIcon.d.ts +4 -4
  19. package/dist/sheet-engine/react/components/Toolbar/conditionalFormatPortal.d.ts +7 -0
  20. package/dist/sheet-engine/react/components/Toolbar/dataVerificationPortal.d.ts +6 -0
  21. package/dist/sheet-engine/react/components/Workbook/index.d.ts +0 -6
  22. package/dist/sheet-engine/react/components/index.d.ts +0 -1
  23. package/dist/sheet-engine/react/utils/datepickerStyles.d.ts +1 -1
  24. package/dist/style.css +1 -1
  25. package/dist/{use-xlsx-import-impl-C-PHnu49.js → use-xlsx-import-impl-BYpFEhWN.js} +2 -2
  26. package/dist/{xlsx-export-impl-BAJCFNh6.js → xlsx-export-impl-DWDG-U2Y.js} +2 -2
  27. package/package.json +2 -3
  28. package/dist/editor/components/api-key-modal/api-key-input.d.ts +0 -5
  29. package/dist/editor/components/api-key-modal/api-key-modal.d.ts +0 -7
  30. package/dist/editor/components/api-key-modal/rate-limit-info.d.ts +0 -4
  31. package/dist/editor/components/comments/comment-actions-dropdown.d.ts +0 -19
  32. package/dist/editor/components/comments/comment-cell-popup.d.ts +0 -4
  33. package/dist/editor/components/comments/comment-input.d.ts +0 -4
  34. package/dist/editor/components/comments/comment-item.d.ts +0 -4
  35. package/dist/editor/components/comments/comment-sidebar-empty.d.ts +0 -4
  36. package/dist/editor/components/comments/comment-sidebar.d.ts +0 -4
  37. package/dist/editor/components/comments/ens/ens-cache.d.ts +0 -10
  38. package/dist/editor/components/comments/ens/use-ens-status.d.ts +0 -10
  39. package/dist/editor/components/comments/use-comment-cell-popup.d.ts +0 -12
  40. package/dist/editor/components/comments/use-comment-permissions.d.ts +0 -15
  41. package/dist/editor/components/sidebar/editor-right-sidebar.d.ts +0 -20
  42. package/dist/editor/components/sidebar/right-sidebar.d.ts +0 -14
  43. package/dist/editor/components/sidebar/sidebar-context.d.ts +0 -17
  44. package/dist/editor/components/sidebar/sidebar-portal-registry.d.ts +0 -20
  45. package/dist/editor/components/sidebar/use-right-panels.d.ts +0 -12
  46. package/dist/editor/components/sidebars/conditional-format.d.ts +0 -2
  47. package/dist/editor/components/sidebars/data-verification.d.ts +0 -2
  48. package/dist/editor/components/sidebars/function/function-categories-logic.d.ts +0 -11
  49. package/dist/editor/components/sidebars/function/function-categories.d.ts +0 -6
  50. package/dist/editor/components/sidebars/function/function-metadata.d.ts +0 -7
  51. package/dist/editor/components/sidebars/function/functionList.d.ts +0 -8
  52. package/dist/editor/components/sidebars/function/types.d.ts +0 -24
  53. package/dist/editor/components/sidebars/function/use-functions.d.ts +0 -20
  54. package/dist/editor/components/sidebars/function-content.d.ts +0 -8
  55. package/dist/editor/components/sidebars/template-ui.d.ts +0 -22
  56. package/dist/editor/components/sidebars/templates.d.ts +0 -9
  57. package/dist/editor/types/comments.d.ts +0 -133
  58. package/dist/editor/utils/api-key-storage.d.ts +0 -6
  59. package/dist/editor/utils/api-keys-local-storage.d.ts +0 -19
  60. package/dist/editor/utils/cell-comment-marker.d.ts +0 -29
  61. package/dist/editor/utils/comment-key-utils.d.ts +0 -7
  62. package/dist/editor/utils/data-block-error-handler.d.ts +0 -21
  63. package/dist/editor/utils/datablock-error-utils.d.ts +0 -1
  64. package/dist/editor/utils/sheet-editor-safe.d.ts +0 -26
  65. package/dist/index-DSogq3Tz.js +0 -55498
  66. package/dist/sheet-engine/core/modules/formula-async-eval.d.ts +0 -53
  67. package/dist/sheet-engine/core/modules/formula-eval.worker.d.ts +0 -1
  68. package/dist/sheet-engine/core/modules/formula-range-cache.d.ts +0 -20
  69. package/dist/sheet-engine/core/modules/formula-snapshot-eval.d.ts +0 -40
  70. package/dist/sheet-engine/core/modules/formula-transitive-deps.d.ts +0 -7
  71. package/dist/sheet-engine/core/modules/formula-worker-bridge.d.ts +0 -16
  72. package/dist/sheet-engine/core/modules/formula-worker-types.d.ts +0 -24
  73. package/dist/sheet-engine/core/theme.d.ts +0 -67
  74. package/dist/sheet-engine/react/components/SidebarPanelPortals/index.d.ts +0 -17
@@ -1,6 +1,6 @@
1
- import { g as Ue } from "./executeStringFunction-C26SXUpc.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-DSogq3Tz.js";
3
+ import { m as Xe, y as Ze } from "./index-DbuVGe3U.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-C26SXUpc.js";
6
- import { c as Ct } from "./index-DSogq3Tz.js";
5
+ import { g as jt, c as xt } from "./executeStringFunction-BkmJj04p.js";
6
+ import { c as Ct } from "./index-DbuVGe3U.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.3-package-cleanup-1",
5
+ "version": "2.1.3-rtc-debug-1",
6
6
  "main": "dist/index.es.js",
7
7
  "module": "dist/index.es.js",
8
8
  "exports": {
@@ -52,8 +52,7 @@
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
- "@fileverse/ui": "^5.1.9",
55
+ "@fileverse/ui": "^5.0.0",
57
56
  "@noble/ciphers": "^2.2.0",
58
57
  "@noble/curves": "^2.2.0",
59
58
  "@stablelib/ed25519": "^2.1.0",
@@ -1,5 +0,0 @@
1
- export declare const ApiKeyInput: ({ name, onSave, onCancel, }: {
2
- name: string;
3
- onSave: (value: string) => void;
4
- onCancel: () => void;
5
- }) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +0,0 @@
1
- export interface ApiKeyModalProps {
2
- open: boolean;
3
- apiKeyName: string;
4
- onSave: (key: string) => void;
5
- onClose: () => void;
6
- }
7
- export declare const ApiKeyModal: ({ open, apiKeyName, onSave, onClose, }: ApiKeyModalProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +0,0 @@
1
- export declare const RateLimitInfo: ({ onInsertKey, name, }: {
2
- onInsertKey: () => void;
3
- name: string;
4
- }) => import("react/jsx-runtime").JSX.Element;
@@ -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,6 +0,0 @@
1
- export interface ApiKeyStorage {
2
- get: (name: string) => string | null;
3
- set: (name: string, key: string) => void;
4
- remove?: (name: string) => void;
5
- }
6
- export declare const defaultApiKeyStorage: ApiKeyStorage;
@@ -1,19 +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 removeApiKey(keyName: string): void;
9
- static getAllSupportedApiKeys(): Record<string, string>;
10
- static getListOfRateLimitedKeys(): any;
11
- static markKeyAsRateLimited(key: string): void;
12
- }
13
- export declare const getApiKey: (keyName: string) => string;
14
- export declare const clearApiKeys: () => void;
15
- export declare const saveApiKey: (keyName: string, key: string) => void;
16
- export declare const removeApiKey: (keyName: string) => void;
17
- export declare const getListOfRateLimitedKeys: () => any;
18
- export declare const getAllSupportedApiKeysInLs: () => Record<string, string>;
19
- 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,21 +0,0 @@
1
- import { Cell, WorkbookInstance } from '../../sheet-engine/react';
2
- import { DataBlockEvent, ErrorMessageHandlerReturnType } from '../types';
3
- import { ApiKeyStorage } from './api-key-storage';
4
- import { SmartContractQueryHandler } from './after-update-cell';
5
-
6
- export type OpenApiKeyModalFn = (apiKeyName: string, callbacks: {
7
- onSave: (key: string) => void;
8
- onClose: () => void;
9
- }) => void;
10
- export interface DataBlockErrorHandlerParams {
11
- data: ErrorMessageHandlerReturnType;
12
- sheetEditorRef: React.RefObject<WorkbookInstance | null>;
13
- row: number;
14
- column: number;
15
- newValue: Cell;
16
- apiKeyStorage: ApiKeyStorage;
17
- openApiKeyModal: OpenApiKeyModalFn;
18
- onDataBlockEvent?: (event: DataBlockEvent) => void;
19
- handleSmartContractQuery?: SmartContractQueryHandler;
20
- }
21
- export declare const handleDataBlockError: ({ data, sheetEditorRef, row, column, newValue, apiKeyStorage, openApiKeyModal, onDataBlockEvent, handleSmartContractQuery, }: DataBlockErrorHandlerParams) => Promise<void>;
@@ -1 +0,0 @@
1
- export declare const isDatablockError: (value: unknown) => boolean;