@fileverse-dev/dsheet 2.1.5 → 3.0.1-formula-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 (132) hide show
  1. package/dist/{constants-yStXQJiK.js → constants-Cdz6oSCq.js} +5 -7
  2. package/dist/constants.js +1 -1
  3. package/dist/editor/components/api-key-modal/api-key-input.d.ts +5 -0
  4. package/dist/editor/components/api-key-modal/api-key-modal.d.ts +7 -0
  5. package/dist/editor/components/api-key-modal/rate-limit-info.d.ts +4 -0
  6. package/dist/editor/components/comments/comment-actions-dropdown.d.ts +19 -0
  7. package/dist/editor/components/comments/comment-cell-popup.d.ts +4 -0
  8. package/dist/editor/components/comments/comment-input.d.ts +4 -0
  9. package/dist/editor/components/comments/comment-item.d.ts +4 -0
  10. package/dist/editor/components/comments/comment-sidebar-empty.d.ts +4 -0
  11. package/dist/editor/components/comments/comment-sidebar.d.ts +4 -0
  12. package/dist/editor/components/comments/ens/ens-cache.d.ts +10 -0
  13. package/dist/editor/components/comments/ens/use-ens-status.d.ts +10 -0
  14. package/dist/editor/components/comments/use-comment-cell-popup.d.ts +12 -0
  15. package/dist/editor/components/comments/use-comment-permissions.d.ts +15 -0
  16. package/dist/editor/components/editor-workbook-sync.d.ts +1 -1
  17. package/dist/editor/components/editor-workbook.d.ts +11 -17
  18. package/dist/editor/components/sidebar/editor-right-sidebar.d.ts +20 -0
  19. package/dist/editor/components/sidebar/right-sidebar.d.ts +14 -0
  20. package/dist/editor/components/sidebar/sidebar-context.d.ts +17 -0
  21. package/dist/editor/components/sidebar/sidebar-portal-registry.d.ts +20 -0
  22. package/dist/editor/components/sidebar/use-right-panels.d.ts +12 -0
  23. package/dist/editor/components/sidebars/conditional-format.d.ts +2 -0
  24. package/dist/editor/components/sidebars/data-verification.d.ts +2 -0
  25. package/dist/editor/components/sidebars/function/function-categories-logic.d.ts +11 -0
  26. package/dist/editor/components/sidebars/function/function-categories.d.ts +6 -0
  27. package/dist/editor/components/sidebars/function/function-metadata.d.ts +7 -0
  28. package/dist/editor/components/sidebars/function/functionList.d.ts +8 -0
  29. package/dist/editor/components/sidebars/function/types.d.ts +24 -0
  30. package/dist/editor/components/sidebars/function/use-functions.d.ts +20 -0
  31. package/dist/editor/components/sidebars/function-content.d.ts +8 -0
  32. package/dist/editor/components/sidebars/named-ranges.d.ts +2 -0
  33. package/dist/editor/components/sidebars/template-ui.d.ts +22 -0
  34. package/dist/editor/components/sidebars/templates.d.ts +9 -0
  35. package/dist/editor/components/smart-contract/error-toast.d.ts +11 -0
  36. package/dist/editor/components/smart-contract/modal/abi-input-section.d.ts +11 -0
  37. package/dist/editor/components/smart-contract/modal/contract-name-section.d.ts +13 -0
  38. package/dist/editor/components/smart-contract/modal/file-upload-section.d.ts +12 -0
  39. package/dist/editor/components/smart-contract/modal/import-section.d.ts +8 -0
  40. package/dist/editor/components/smart-contract/modal/modal-header.d.ts +17 -0
  41. package/dist/editor/components/smart-contract/smart-contract-list-item.d.ts +8 -0
  42. package/dist/editor/components/smart-contract/smart-contract-modal-ui.d.ts +33 -0
  43. package/dist/editor/components/smart-contract/smart-contract-modal.d.ts +12 -0
  44. package/dist/editor/components/smart-contract/smart-contract-reading-intro.d.ts +4 -0
  45. package/dist/editor/components/smart-contract/smart-contract-view-list.d.ts +6 -0
  46. package/dist/editor/components/smart-contract/use-address-validation.d.ts +5 -0
  47. package/dist/editor/components/smart-contract/use-modal-outside-click.d.ts +18 -0
  48. package/dist/editor/components/smart-contract/use-smart-contract-modal.d.ts +38 -0
  49. package/dist/editor/constants/shared-constants.d.ts +0 -2
  50. package/dist/editor/contexts/editor-context.d.ts +20 -5
  51. package/dist/editor/dsheet-editor.d.ts +1 -1
  52. package/dist/editor/hooks/live-query/use-live-query.d.ts +4 -2
  53. package/dist/editor/hooks/use-celldata-compaction.d.ts +23 -0
  54. package/dist/editor/hooks/use-editor-data.d.ts +4 -2
  55. package/dist/editor/hooks/use-smart-contract.d.ts +26 -0
  56. package/dist/editor/hooks/use-xlsx-import-impl.d.ts +8 -1
  57. package/dist/editor/hooks/use-xlsx-import.d.ts +2 -1
  58. package/dist/editor/types/comments.d.ts +134 -0
  59. package/dist/editor/types/smart-contract.d.ts +88 -0
  60. package/dist/editor/types.d.ts +39 -32
  61. package/dist/editor/utils/after-update-cell.d.ts +13 -8
  62. package/dist/editor/utils/api-key-storage.d.ts +6 -0
  63. package/dist/editor/utils/api-keys-local-storage.d.ts +19 -0
  64. package/dist/editor/utils/cell-comment-marker.d.ts +30 -0
  65. package/dist/editor/utils/comment-key-utils.d.ts +7 -0
  66. package/dist/editor/utils/compact-committed-celldata.d.ts +28 -0
  67. package/dist/editor/utils/config-ydoc-update.d.ts +20 -0
  68. package/dist/editor/utils/csv-import.d.ts +3 -1
  69. package/dist/editor/utils/data-block-error-handler.d.ts +21 -0
  70. package/dist/editor/utils/datablock-error-utils.d.ts +1 -0
  71. package/dist/editor/utils/defined-names-ydoc.d.ts +31 -0
  72. package/dist/editor/utils/sheet-editor-safe.d.ts +26 -0
  73. package/dist/editor/utils/smart-contract/constants.d.ts +488 -0
  74. package/dist/editor/utils/smart-contract/error-helper.d.ts +20 -0
  75. package/dist/editor/utils/smart-contract/helpers.d.ts +4 -0
  76. package/dist/editor/utils/smart-contract/reading-utils.d.ts +34 -0
  77. package/dist/editor/utils/smart-contract/signature-utils.d.ts +9 -0
  78. package/dist/editor/utils/spreadsheet-import.d.ts +12 -0
  79. package/dist/editor/utils/update-ydoc.d.ts +2 -2
  80. package/dist/editor/utils/xlsx-defined-names.d.ts +41 -0
  81. package/dist/executeStringFunction-DMPoSj5F.js +32826 -0
  82. package/dist/formula.js +1 -1
  83. package/dist/index-DAVuAF9T.js +55303 -0
  84. package/dist/index.d.ts +11 -1
  85. package/dist/index.es.js +55 -49
  86. package/dist/jszip.min-CEyB-71x.js +2319 -0
  87. package/dist/sheet-engine/core/api/cell.d.ts +0 -20
  88. package/dist/sheet-engine/core/api/common.d.ts +2 -1
  89. package/dist/sheet-engine/core/api/index.d.ts +1 -0
  90. package/dist/sheet-engine/core/api/sheet-flowdata-lifecycle.d.ts +17 -0
  91. package/dist/sheet-engine/core/api/sheet.d.ts +5 -0
  92. package/dist/sheet-engine/core/context.d.ts +8 -1
  93. package/dist/sheet-engine/core/index.d.ts +2 -2
  94. package/dist/sheet-engine/core/modules/formula-async-eval.d.ts +53 -0
  95. package/dist/sheet-engine/core/modules/formula-eval.worker.d.ts +1 -0
  96. package/dist/sheet-engine/core/modules/formula-range-cache.d.ts +20 -0
  97. package/dist/sheet-engine/core/modules/formula-snapshot-eval.d.ts +51 -0
  98. package/dist/sheet-engine/core/modules/formula-transitive-deps.d.ts +7 -0
  99. package/dist/sheet-engine/core/modules/formula-worker-bridge.d.ts +17 -0
  100. package/dist/sheet-engine/core/modules/formula-worker-types.d.ts +24 -0
  101. package/dist/sheet-engine/core/modules/formula.d.ts +53 -1
  102. package/dist/sheet-engine/core/modules/index.d.ts +5 -2
  103. package/dist/sheet-engine/core/modules/namedRanges.d.ts +53 -0
  104. package/dist/sheet-engine/core/modules/sheet-metadata-hooks.d.ts +4 -0
  105. package/dist/sheet-engine/core/modules/sheet.d.ts +17 -1
  106. package/dist/sheet-engine/core/paste/paste-border-utils.d.ts +23 -0
  107. package/dist/sheet-engine/core/settings.d.ts +3 -1
  108. package/dist/sheet-engine/core/theme.d.ts +67 -0
  109. package/dist/sheet-engine/core/types.d.ts +20 -0
  110. package/dist/sheet-engine/core/utils/border-config-utils.d.ts +16 -0
  111. package/dist/sheet-engine/core/utils/cell-persist-utils.d.ts +10 -0
  112. package/dist/sheet-engine/core/utils/range-format.d.ts +71 -0
  113. package/dist/sheet-engine/core/utils/ydoc-celldata-changes.d.ts +40 -0
  114. package/dist/sheet-engine/react/components/NamedRanges/index.d.ts +4 -0
  115. package/dist/sheet-engine/react/components/SheetOverlay/Icon.d.ts +5 -4
  116. package/dist/sheet-engine/react/components/SheetOverlay/LucideIcon.d.ts +4 -4
  117. package/dist/sheet-engine/react/components/SidebarPanelPortals/index.d.ts +17 -0
  118. package/dist/sheet-engine/react/components/Workbook/api.d.ts +8 -1
  119. package/dist/sheet-engine/react/components/Workbook/index.d.ts +11 -1
  120. package/dist/sheet-engine/react/components/index.d.ts +1 -0
  121. package/dist/sheet-engine/react/utils/datepickerStyles.d.ts +1 -1
  122. package/dist/style.css +1 -1
  123. package/dist/use-xlsx-import-impl-DzthrhwA.js +1595 -0
  124. package/dist/xlsx-defined-names-D2KoICbm.js +117 -0
  125. package/dist/xlsx-export-impl-b2z4De4f.js +818 -0
  126. package/package.json +6 -4
  127. package/dist/executeStringFunction-BkmJj04p.js +0 -27295
  128. package/dist/index-Drl8OuI3.js +0 -52659
  129. package/dist/sheet-engine/react/components/Toolbar/conditionalFormatPortal.d.ts +0 -7
  130. package/dist/sheet-engine/react/components/Toolbar/dataVerificationPortal.d.ts +0 -6
  131. package/dist/use-xlsx-import-impl-DC_BfAcT.js +0 -1527
  132. package/dist/xlsx-export-impl-DP_eK3zS.js +0 -3126
@@ -1,13 +1,11 @@
1
- import { E as n, S as a } from "./crypto-constants-CqpCRs86.js";
2
- const E = n, d = a, f = [
1
+ import { E as a, S as n } from "./crypto-constants-CqpCRs86.js";
2
+ const E = a, d = n, f = [
3
3
  {
4
4
  id: "0",
5
5
  name: "Sheet1",
6
6
  celldata: [],
7
7
  config: {},
8
- order: 0,
9
- row: 500,
10
- column: 26
8
+ order: 0
11
9
  }
12
10
  ], m = [
13
11
  "undo",
@@ -52,8 +50,8 @@ const E = n, d = a, f = [
52
50
  "copy",
53
51
  "paste",
54
52
  "|",
55
- "insert-row",
56
53
  "insert-row-above",
54
+ "insert-row",
57
55
  "insert-column",
58
56
  "insert-column-right",
59
57
  "insert-cells",
@@ -89,8 +87,8 @@ const E = n, d = a, f = [
89
87
  "copy",
90
88
  "paste",
91
89
  "|",
92
- "insert-row",
93
90
  "insert-row-above",
91
+ "insert-row",
94
92
  "insert-column",
95
93
  "insert-column-right",
96
94
  "|",
package/dist/constants.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as R, c as _, E as C, S as a, p as s } from "./constants-yStXQJiK.js";
1
+ import { a as R, c as _, E as C, S as a, p as s } from "./constants-Cdz6oSCq.js";
2
2
  export {
3
3
  R as COLLAB_PRESENCE_COLORS,
4
4
  _ as ENS_PRESENCE_COLOR,
@@ -0,0 +1,5 @@
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;
@@ -0,0 +1,7 @@
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;
@@ -0,0 +1,4 @@
1
+ export declare const RateLimitInfo: ({ onInsertKey, name, }: {
2
+ onInsertKey: () => void;
3
+ name: string;
4
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,19 @@
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 {};
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ import { CommentCellUIProps } from '../../types/comments';
3
+
4
+ export declare const CommentCellUI: React.FC<CommentCellUIProps>;
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ import { CommentInputProps } from '../../types/comments';
3
+
4
+ export declare const CommentInput: React.FC<CommentInputProps>;
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ import { CommentItemProps } from '../../types/comments';
3
+
4
+ export declare const CommentItem: React.FC<CommentItemProps>;
@@ -0,0 +1,4 @@
1
+ declare const CommentSidebarEmpty: ({ setShowComment, }: {
2
+ setShowComment: React.Dispatch<React.SetStateAction<boolean>>;
3
+ }) => import("react/jsx-runtime").JSX.Element;
4
+ export { CommentSidebarEmpty };
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ import { CommentsContentProps } from '../../types/comments';
3
+
4
+ export declare const CommentsContent: React.FC<CommentsContentProps>;
@@ -0,0 +1,10 @@
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>;
@@ -0,0 +1,10 @@
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;
@@ -0,0 +1,12 @@
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
+ };
@@ -0,0 +1,15 @@
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
+ };
@@ -19,5 +19,5 @@ export declare const createAfterOrderChangesHandler: ({ sheetEditorRef, ydocRef,
19
19
  export declare const createAfterColorChangesHandler: ({ sheetEditorRef, ydocRef, dsheetId, handleOnChangePortalUpdate, }: SyncContext) => () => void;
20
20
  export declare const createAfterHideChangesHandler: ({ sheetEditorRef, ydocRef, dsheetId, handleOnChangePortalUpdate, }: SyncContext) => () => void;
21
21
  export declare const createAfterColRowChangesHandler: ({ sheetEditorRef, ydocRef, dsheetId, handleOnChangePortalUpdate, }: SyncContext) => () => void;
22
- export declare const updateAllCell: ({ sheetEditorRef, ydocRef, dsheetId, handleOnChangePortalUpdate, }: SyncContext, subSheetId: string) => void;
22
+ export declare const updateAllCell: ({ sheetEditorRef, ydocRef, dsheetId, handleOnChangePortalUpdate, }: SyncContext, subSheetId: string, caller?: string) => void;
23
23
  export {};
@@ -1,36 +1,30 @@
1
- import { default as React, ComponentProps } from 'react';
2
- import { Workbook } from '../../sheet-engine/react';
3
- import { SmartContractQueryHandler } from '../utils/after-update-cell';
4
- import { OnboardingHandlerType, DataBlockApiKeyHandlerType } from '../types';
1
+ import { default as React } from 'react';
2
+ import { SidebarPortalRegistryHandle, SidebarPortalRenderer } from '../../sheet-engine/react';
3
+ import { ThemeKey } from '../../sheet-engine/core/theme';
4
+ import { OnboardingHandlerType } from '../types';
5
+ import { CommentsConfig } from '../types/comments';
5
6
 
6
7
  type OnboardingHandler = OnboardingHandlerType;
7
- type DataBlockApiKeyHandler = DataBlockApiKeyHandlerType;
8
8
  interface EditorWorkbookProps {
9
- setShowSmartContractModal?: React.Dispatch<React.SetStateAction<boolean>>;
10
9
  setShowFetchURLModal?: React.Dispatch<React.SetStateAction<boolean>>;
11
10
  setFetchingURLData?: (fetching: boolean) => void;
12
11
  setInputFetchURLDataBlock?: React.Dispatch<React.SetStateAction<string>>;
13
12
  isReadOnly?: boolean;
14
13
  allowSheetDownload?: boolean;
15
- allowComments?: boolean;
16
14
  toggleTemplateSidebar?: () => void;
17
15
  onboardingComplete?: boolean;
18
16
  onboardingCompleteLocalStorageKey?: string;
19
17
  onboardingHandler?: OnboardingHandler;
20
- dataBlockApiKeyHandler?: DataBlockApiKeyHandler;
21
18
  exportDropdownOpen?: boolean;
22
- commentData?: Object;
23
- getCommentCellUI?: ComponentProps<typeof Workbook>['getCommentCellUI'];
19
+ commentsConfig?: CommentsConfig;
24
20
  setExportDropdownOpen?: React.Dispatch<React.SetStateAction<boolean>>;
25
21
  dsheetId: string;
26
- storeApiKey?: (apiKeyName: string) => void;
27
- onDataBlockApiResponse?: (dataBlockName: string) => void;
28
22
  onDuneChartEmbed?: () => void;
29
23
  onSheetCountChange?: (sheetCount: number) => void;
30
- handleSmartContractQuery?: SmartContractQueryHandler;
24
+ sidebarActivePanel?: string | null;
25
+ sidebarPortalRegistry?: SidebarPortalRegistryHandle | null;
26
+ sidebarPortalRenderers?: Record<string, SidebarPortalRenderer>;
27
+ theme?: ThemeKey;
31
28
  }
32
- /**
33
- * EditorWorkbook component handles rendering the Fortune Workbook with proper configuration
34
- */
35
- export declare const EditorWorkbook: React.FC<EditorWorkbookProps>;
29
+ export declare const EditorWorkbook: React.NamedExoticComponent<EditorWorkbookProps>;
36
30
  export {};
@@ -0,0 +1,20 @@
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 {};
@@ -0,0 +1,14 @@
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;
@@ -0,0 +1,17 @@
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 {};
@@ -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 {};
@@ -0,0 +1,12 @@
1
+ export type BuiltInPanelType = 'templates' | 'comments' | 'functions' | 'data-verification' | 'conditional-format' | 'named-ranges';
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 {};
@@ -0,0 +1,2 @@
1
+ declare const ConditionalFormat: () => import("react/jsx-runtime").JSX.Element;
2
+ export { ConditionalFormat };
@@ -0,0 +1,2 @@
1
+ declare const DataVerification: () => import("react/jsx-runtime").JSX.Element;
2
+ export { DataVerification };
@@ -0,0 +1,11 @@
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
+ };
@@ -0,0 +1,6 @@
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;
@@ -0,0 +1,7 @@
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;
@@ -0,0 +1,8 @@
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;
@@ -0,0 +1,24 @@
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
+ };
@@ -0,0 +1,20 @@
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;
@@ -0,0 +1,8 @@
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;
@@ -0,0 +1,2 @@
1
+ declare const NamedRanges: () => import("react/jsx-runtime").JSX.Element;
2
+ export { NamedRanges };
@@ -0,0 +1,22 @@
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;
@@ -0,0 +1,9 @@
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 {};
@@ -0,0 +1,11 @@
1
+ export declare const SmartContractReadingErrorToast: ({ smartContractReadingError, setSmartContractReadingError, openPanel, }: {
2
+ smartContractReadingError: {
3
+ hasError: boolean;
4
+ errorMessage: string;
5
+ };
6
+ setSmartContractReadingError: (error: {
7
+ hasError: boolean;
8
+ errorMessage: string;
9
+ }) => void;
10
+ openPanel: (panel: string) => void;
11
+ }) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface AbiInputSectionProps {
4
+ abiCode: string;
5
+ setAbiCode: (value: string) => void;
6
+ errorState: {
7
+ message: string;
8
+ } | null;
9
+ }
10
+ export declare const AbiInputSection: React.FC<AbiInputSectionProps>;
11
+ export {};
@@ -0,0 +1,13 @@
1
+ import { default as React } from 'react';
2
+ import { ContractConfig } from '../../../types/smart-contract';
3
+
4
+ interface ContractNameSectionProps {
5
+ smartContractName: string;
6
+ setSmartContractName: (name: string) => void;
7
+ registryMap: Record<string, ContractConfig>;
8
+ abiCode: string;
9
+ isLoading: boolean;
10
+ onClickProceed: () => Promise<void>;
11
+ }
12
+ export declare const ContractNameSection: React.FC<ContractNameSectionProps>;
13
+ export {};
@@ -0,0 +1,12 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface FileUploadSectionProps {
4
+ uploadedFile: any;
5
+ uploadProgress: number;
6
+ isUploading: boolean;
7
+ handleRemoveFile: () => void;
8
+ handleFileInputChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
9
+ fileInputRef: React.RefObject<HTMLInputElement>;
10
+ }
11
+ export declare const FileUploadSection: React.FC<FileUploadSectionProps>;
12
+ export {};
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface ImportSectionProps {
4
+ isImporting: boolean;
5
+ handleImport: () => void;
6
+ }
7
+ export declare const ImportSection: React.FC<ImportSectionProps>;
8
+ export {};
@@ -0,0 +1,17 @@
1
+ import { default as React } from 'react';
2
+ import { SupportedChain } from '../../../types/smart-contract';
3
+
4
+ interface ModalHeaderProps {
5
+ inputAddress: string;
6
+ setFormStep: (step: number) => void;
7
+ onAddressChange: (url: string) => void;
8
+ setSelectedChain: (chain: SupportedChain) => void;
9
+ networks: {
10
+ label: string;
11
+ value: SupportedChain;
12
+ }[];
13
+ selectedChain: SupportedChain;
14
+ showHint: boolean;
15
+ }
16
+ export declare const ModalHeader: React.FC<ModalHeaderProps>;
17
+ export {};
@@ -0,0 +1,8 @@
1
+ import { Abi } from 'viem';
2
+ import { ContractConfig } from '../../types/smart-contract';
3
+
4
+ export declare const SmartContractListItem: ({ contract, onDelete, fetchContractAbi, }: {
5
+ contract: ContractConfig;
6
+ onDelete?: (name: string) => void;
7
+ fetchContractAbi: (contract: ContractConfig) => Promise<Abi>;
8
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,33 @@
1
+ import { default as React, MutableRefObject } from 'react';
2
+ import { ContractConfig, SupportedChain } from '../../types/smart-contract';
3
+
4
+ interface SmartContractModalUIProps {
5
+ abiCode: string;
6
+ smartContractName: string;
7
+ setSmartContractName: React.Dispatch<React.SetStateAction<string>>;
8
+ setAbiCode: React.Dispatch<React.SetStateAction<string>>;
9
+ uploadedFile: any;
10
+ setUploadedFile: React.Dispatch<React.SetStateAction<any>>;
11
+ uploadProgress: number;
12
+ isUploading: boolean;
13
+ handleRemoveFile: () => void;
14
+ handleUploadAreaClick: () => void;
15
+ handleFileInputChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
16
+ fileInputRef: React.RefObject<HTMLInputElement>;
17
+ selectedChain: SupportedChain;
18
+ setSelectedChain: React.Dispatch<React.SetStateAction<SupportedChain>>;
19
+ formStep: number;
20
+ setFormStep: React.Dispatch<React.SetStateAction<number>>;
21
+ onClickProceed: (abi?: any) => Promise<void>;
22
+ inputAddress: string;
23
+ isValidURL: boolean;
24
+ modalDivRef: React.RefObject<HTMLDivElement>;
25
+ onAddressChange: (url: string) => void;
26
+ isImportingRef: MutableRefObject<boolean>;
27
+ registryMapRef: MutableRefObject<Record<string, ContractConfig>>;
28
+ errorState: {
29
+ message: string;
30
+ } | null;
31
+ }
32
+ export declare const SmartContractModalUI: React.FC<SmartContractModalUIProps>;
33
+ export {};
@@ -0,0 +1,12 @@
1
+ import { default as React, MutableRefObject } from 'react';
2
+ import { ContractConfig, SupportedChain } from '../../types/smart-contract';
3
+ import { Hex } from 'viem';
4
+
5
+ interface FetchUrlDataBlockProps {
6
+ showSmartContractModal: boolean;
7
+ setShowSmartContractModal: (show: boolean) => void;
8
+ onSaveContract: (address: Hex, chain: SupportedChain, abi: string, smartContractName: string) => Promise<void>;
9
+ registryMapRef: MutableRefObject<Record<string, ContractConfig>>;
10
+ }
11
+ export declare const SmartContractModal: React.FC<FetchUrlDataBlockProps>;
12
+ export {};
@@ -0,0 +1,4 @@
1
+ export declare const SmartContractReadingIntro: ({ isAuthorized, onOpenPanel, }: {
2
+ isAuthorized: boolean;
3
+ onOpenPanel: (panelId: string) => void;
4
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ import { SmartContractListViewProps, MyContractsProps, PopularContractsProps } from '../../types/smart-contract';
3
+
4
+ export declare const MyContracts: React.FC<MyContractsProps>;
5
+ export declare const PopularContracts: React.FC<PopularContractsProps>;
6
+ export declare const SmartContractListView: React.FC<SmartContractListViewProps>;
@@ -0,0 +1,5 @@
1
+ export declare const useAddressValidation: () => {
2
+ isValidAddress: boolean;
3
+ handleAddressChange: (address: string) => address is `0x${string}`;
4
+ resetValidation: () => void;
5
+ };