@excalidraw/math 0.18.0-c141960 → 0.18.0-c1dbbdf

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 (234) hide show
  1. package/dist/dev/index.js +3 -3
  2. package/dist/dev/index.js.map +2 -2
  3. package/dist/prod/index.js +1 -1
  4. package/dist/types/common/debug.d.ts +21 -0
  5. package/dist/types/common/src/bounds.d.ts +10 -0
  6. package/dist/types/common/src/colors.d.ts +59 -39
  7. package/dist/types/common/src/constants.d.ts +17 -11
  8. package/dist/types/common/src/editorInterface.d.ts +1 -1
  9. package/dist/types/common/src/font-metadata.d.ts +1 -3
  10. package/dist/types/common/src/index.d.ts +2 -1
  11. package/dist/types/common/src/keys.d.ts +1 -1
  12. package/dist/types/common/src/utility-types.d.ts +0 -1
  13. package/dist/types/common/src/utils.d.ts +46 -38
  14. package/dist/types/element/src/Scene.d.ts +5 -3
  15. package/dist/types/element/src/arrows/focus.d.ts +27 -0
  16. package/dist/types/element/src/arrows/helpers.d.ts +5 -0
  17. package/dist/types/element/src/binding.d.ts +19 -12
  18. package/dist/types/element/src/bounds.d.ts +2 -10
  19. package/dist/types/element/src/collision.d.ts +4 -3
  20. package/dist/types/element/src/comparisons.d.ts +7 -7
  21. package/dist/types/element/src/distribute.d.ts +2 -1
  22. package/dist/types/element/src/dragElements.d.ts +3 -3
  23. package/dist/types/element/src/duplicate.d.ts +3 -3
  24. package/dist/types/element/src/elbowArrow.d.ts +2 -0
  25. package/dist/types/element/src/fractionalIndex.d.ts +2 -2
  26. package/dist/types/element/src/frame.d.ts +5 -1
  27. package/dist/types/element/src/heading.d.ts +2 -1
  28. package/dist/types/element/src/image.d.ts +1 -11
  29. package/dist/types/element/src/index.d.ts +3 -0
  30. package/dist/types/element/src/linearElementEditor.d.ts +6 -2
  31. package/dist/types/element/src/mutateElement.d.ts +5 -1
  32. package/dist/types/element/src/newElement.d.ts +6 -6
  33. package/dist/types/element/src/renderElement.d.ts +0 -6
  34. package/dist/types/element/src/resizeElements.d.ts +10 -10
  35. package/dist/types/element/src/resizeTest.d.ts +1 -1
  36. package/dist/types/element/src/selection.d.ts +3 -7
  37. package/dist/types/element/src/shape.d.ts +8 -7
  38. package/dist/types/element/src/textMeasurements.d.ts +1 -3
  39. package/dist/types/{excalidraw/data → element/src}/transform.d.ts +3 -3
  40. package/dist/types/element/src/transformHandles.d.ts +3 -23
  41. package/dist/types/element/src/typeChecks.d.ts +2 -4
  42. package/dist/types/element/src/types.d.ts +1 -1
  43. package/dist/types/element/src/utils.d.ts +8 -4
  44. package/dist/types/element/src/zindex.d.ts +1 -1
  45. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +138 -199
  46. package/dist/types/excalidraw/actions/actionAlign.d.ts +0 -1
  47. package/dist/types/excalidraw/actions/actionBoundText.d.ts +64 -105
  48. package/dist/types/excalidraw/actions/actionCanvas.d.ts +383 -618
  49. package/dist/types/excalidraw/actions/actionClipboard.d.ts +101 -142
  50. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +31 -52
  51. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +100 -163
  52. package/dist/types/excalidraw/actions/actionDistribute.d.ts +0 -1
  53. package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +2 -3
  54. package/dist/types/excalidraw/actions/actionElementLink.d.ts +45 -70
  55. package/dist/types/excalidraw/actions/actionElementLock.d.ts +65 -106
  56. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +49 -70
  57. package/dist/types/excalidraw/actions/actionExport.d.ts +126 -211
  58. package/dist/types/excalidraw/actions/actionFinalize.d.ts +1 -2
  59. package/dist/types/excalidraw/actions/actionFlip.d.ts +0 -1
  60. package/dist/types/excalidraw/actions/actionFrame.d.ts +207 -324
  61. package/dist/types/excalidraw/actions/actionGroup.d.ts +68 -117
  62. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +114 -169
  63. package/dist/types/excalidraw/actions/actionLink.d.ts +51 -72
  64. package/dist/types/excalidraw/actions/actionMenu.d.ts +39 -64
  65. package/dist/types/excalidraw/actions/actionNavigate.d.ts +14 -17
  66. package/dist/types/excalidraw/actions/actionProperties.d.ts +79 -120
  67. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +34 -59
  68. package/dist/types/excalidraw/actions/actionStyles.d.ts +30 -51
  69. package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +3 -3
  70. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +172 -0
  71. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +49 -70
  72. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +172 -0
  73. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +49 -70
  74. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +39 -64
  75. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +48 -69
  76. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +49 -70
  77. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +49 -70
  78. package/dist/types/excalidraw/actions/actionZindex.d.ts +8 -9
  79. package/dist/types/excalidraw/actions/index.d.ts +2 -0
  80. package/dist/types/excalidraw/actions/manager.d.ts +1 -1
  81. package/dist/types/excalidraw/actions/register.d.ts +2 -2
  82. package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
  83. package/dist/types/excalidraw/actions/types.d.ts +1 -1
  84. package/dist/types/excalidraw/appState.d.ts +20 -18
  85. package/dist/types/excalidraw/charts/charts.bar.d.ts +2 -0
  86. package/dist/types/excalidraw/charts/charts.constants.d.ts +48 -0
  87. package/dist/types/excalidraw/charts/charts.helpers.d.ts +32 -0
  88. package/dist/types/excalidraw/charts/charts.line.d.ts +2 -0
  89. package/dist/types/excalidraw/charts/charts.parse.d.ts +10 -0
  90. package/dist/types/excalidraw/charts/charts.radar.d.ts +2 -0
  91. package/dist/types/excalidraw/charts/charts.types.d.ts +18 -0
  92. package/dist/types/excalidraw/charts/index.d.ts +7 -0
  93. package/dist/types/excalidraw/clipboard.d.ts +11 -35
  94. package/dist/types/excalidraw/components/Actions.d.ts +1 -1
  95. package/dist/types/excalidraw/components/App.d.ts +43 -44
  96. package/dist/types/excalidraw/components/Card.d.ts +1 -3
  97. package/dist/types/excalidraw/components/ColorPicker/ColorInput.d.ts +2 -4
  98. package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +0 -1
  99. package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +0 -1
  100. package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +0 -1
  101. package/dist/types/excalidraw/components/CommandPalette/types.d.ts +1 -2
  102. package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +2 -2
  103. package/dist/types/excalidraw/components/DarkModeToggle.d.ts +1 -1
  104. package/dist/types/excalidraw/components/DefaultSidebar.d.ts +9 -13
  105. package/dist/types/excalidraw/components/ElementLinkDialog.d.ts +1 -1
  106. package/dist/types/excalidraw/components/Ellipsify.d.ts +1 -2
  107. package/dist/types/excalidraw/components/ErrorDialog.d.ts +1 -1
  108. package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +0 -1
  109. package/dist/types/excalidraw/components/EyeDropper.d.ts +0 -1
  110. package/dist/types/excalidraw/components/FilledButton.d.ts +1 -0
  111. package/dist/types/excalidraw/components/FontPicker/keyboardNavHandlers.d.ts +0 -1
  112. package/dist/types/excalidraw/components/HelpDialog.d.ts +1 -1
  113. package/dist/types/excalidraw/components/InlineIcon.d.ts +2 -2
  114. package/dist/types/excalidraw/components/LibraryMenuControlButtons.d.ts +1 -1
  115. package/dist/types/excalidraw/components/LibraryMenuHeaderContent.d.ts +1 -2
  116. package/dist/types/excalidraw/components/LibraryUnit.d.ts +2 -3
  117. package/dist/types/excalidraw/components/LoadingMessage.d.ts +0 -1
  118. package/dist/types/excalidraw/components/MobileToolBar.d.ts +0 -1
  119. package/dist/types/excalidraw/components/Modal.d.ts +0 -1
  120. package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirm.d.ts +1 -1
  121. package/dist/types/excalidraw/components/PasteChartDialog.d.ts +4 -5
  122. package/dist/types/excalidraw/components/PropertiesPopover.d.ts +1 -1
  123. package/dist/types/excalidraw/components/RadioGroup.d.ts +0 -1
  124. package/dist/types/excalidraw/components/RadioSelection.d.ts +4 -4
  125. package/dist/types/excalidraw/components/ScrollableList.d.ts +0 -1
  126. package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +15 -21
  127. package/dist/types/excalidraw/components/Sidebar/SidebarHeader.d.ts +1 -1
  128. package/dist/types/excalidraw/components/Sidebar/SidebarTab.d.ts +1 -2
  129. package/dist/types/excalidraw/components/Sidebar/SidebarTabTrigger.d.ts +1 -2
  130. package/dist/types/excalidraw/components/Sidebar/SidebarTabTriggers.d.ts +1 -2
  131. package/dist/types/excalidraw/components/Sidebar/SidebarTabs.d.ts +1 -2
  132. package/dist/types/excalidraw/components/Spinner.d.ts +4 -4
  133. package/dist/types/excalidraw/components/Stats/CanvasGrid.d.ts +0 -1
  134. package/dist/types/excalidraw/components/Stats/Collapsible.d.ts +0 -1
  135. package/dist/types/excalidraw/components/Stats/DragInput.d.ts +0 -1
  136. package/dist/types/excalidraw/components/Stats/index.d.ts +7 -8
  137. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatHistoryMenu.d.ts +15 -0
  138. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatInterface.d.ts +23 -0
  139. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatMessage.d.ts +14 -0
  140. package/dist/types/excalidraw/components/TTDDialog/Chat/TTDChatPanel.d.ts +27 -0
  141. package/dist/types/excalidraw/components/TTDDialog/Chat/index.d.ts +3 -0
  142. package/dist/types/excalidraw/components/TTDDialog/Chat/useChatAgent.d.ts +8 -0
  143. package/dist/types/excalidraw/components/TTDDialog/CodeMirrorEditor.d.ts +11 -0
  144. package/dist/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +3 -2
  145. package/dist/types/excalidraw/components/TTDDialog/TTDContext.d.ts +13 -0
  146. package/dist/types/excalidraw/components/TTDDialog/TTDDialog.d.ts +12 -29
  147. package/dist/types/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +3 -3
  148. package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +5 -2
  149. package/dist/types/excalidraw/components/TTDDialog/TTDDialogPanel.d.ts +13 -9
  150. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTab.d.ts +1 -2
  151. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTrigger.d.ts +1 -2
  152. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTriggers.d.ts +1 -2
  153. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +1 -1
  154. package/dist/types/excalidraw/components/TTDDialog/TTDPreviewPanel.d.ts +9 -0
  155. package/dist/types/excalidraw/components/TTDDialog/TTDWelcomeMessage.d.ts +1 -0
  156. package/dist/types/excalidraw/components/TTDDialog/TextToDiagram.d.ts +9 -0
  157. package/dist/types/excalidraw/components/TTDDialog/common.d.ts +16 -16
  158. package/dist/types/excalidraw/components/TTDDialog/hooks/useChatManagement.d.ts +13 -0
  159. package/dist/types/excalidraw/components/TTDDialog/hooks/useMermaidRenderer.d.ts +14 -0
  160. package/dist/types/excalidraw/components/TTDDialog/hooks/useTextGeneration.d.ts +7 -0
  161. package/dist/types/excalidraw/components/TTDDialog/mermaid-lang-lite.d.ts +2 -0
  162. package/dist/types/excalidraw/components/TTDDialog/types.d.ts +95 -0
  163. package/dist/types/excalidraw/components/TTDDialog/useTTDChatStorage.d.ts +22 -0
  164. package/dist/types/excalidraw/components/TTDDialog/utils/TTDStreamFetch.d.ts +24 -0
  165. package/dist/types/excalidraw/components/TTDDialog/utils/chat.d.ts +10 -0
  166. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidAutoFix.d.ts +1 -0
  167. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidError.d.ts +10 -0
  168. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidValidation.d.ts +1 -0
  169. package/dist/types/excalidraw/components/Toast.d.ts +3 -3
  170. package/dist/types/excalidraw/components/Trans.d.ts +2 -2
  171. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +48 -38
  172. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +7 -6
  173. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuGroup.d.ts +3 -3
  174. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +13 -22
  175. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCheckbox.d.ts +5 -0
  176. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContent.d.ts +5 -4
  177. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +0 -1
  178. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCustom.d.ts +2 -2
  179. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemLink.d.ts +6 -6
  180. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSub.d.ts +23 -0
  181. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubContent.d.ts +8 -0
  182. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubTrigger.d.ts +12 -0
  183. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuTrigger.d.ts +3 -4
  184. package/dist/types/excalidraw/components/dropdownMenu/common.d.ts +2 -2
  185. package/dist/types/excalidraw/components/dropdownMenu/dropdownMenuUtils.d.ts +2 -0
  186. package/dist/types/excalidraw/components/hoc/withInternalFallback.d.ts +1 -1
  187. package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +1 -1
  188. package/dist/types/excalidraw/components/icons.d.ts +22 -13
  189. package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +2 -13
  190. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +19 -2
  191. package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +39 -32
  192. package/dist/types/excalidraw/components/shapes.d.ts +74 -1
  193. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +6 -6
  194. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +15 -16
  195. package/dist/types/excalidraw/data/blob.d.ts +323 -3
  196. package/dist/types/excalidraw/data/encode.d.ts +4 -4
  197. package/dist/types/excalidraw/data/encryption.d.ts +5 -5
  198. package/dist/types/excalidraw/data/filesystem.d.ts +2 -2
  199. package/dist/types/excalidraw/data/index.d.ts +3 -3
  200. package/dist/types/excalidraw/data/json.d.ts +160 -2
  201. package/dist/types/excalidraw/data/library.d.ts +24 -9
  202. package/dist/types/excalidraw/data/restore.d.ts +25 -10
  203. package/dist/types/excalidraw/editor-jotai.d.ts +11 -11
  204. package/dist/types/excalidraw/errors.d.ts +14 -0
  205. package/dist/types/excalidraw/hooks/useOutsideClick.d.ts +1 -2
  206. package/dist/types/excalidraw/hooks/useScrollPosition.d.ts +1 -2
  207. package/dist/types/excalidraw/i18n.d.ts +2 -2
  208. package/dist/types/excalidraw/index.d.ts +6 -4
  209. package/dist/types/excalidraw/renderer/helpers.d.ts +6 -4
  210. package/dist/types/excalidraw/renderer/interactiveScene.d.ts +8 -6
  211. package/dist/types/excalidraw/scene/Renderer.d.ts +5 -2
  212. package/dist/types/excalidraw/scene/export.d.ts +2 -2
  213. package/dist/types/excalidraw/scene/scroll.d.ts +1 -6
  214. package/dist/types/excalidraw/scene/types.d.ts +7 -2
  215. package/dist/types/excalidraw/snapping.d.ts +5 -5
  216. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-bindings.d.ts +1 -1
  217. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-loader.d.ts +1 -1
  218. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-wasm.d.ts +1 -1
  219. package/dist/types/excalidraw/subset/woff2/woff2-loader.d.ts +2 -2
  220. package/dist/types/excalidraw/subset/woff2/woff2-wasm.d.ts +1 -1
  221. package/dist/types/excalidraw/types.d.ts +25 -14
  222. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +2 -2
  223. package/dist/types/math/src/point.d.ts +6 -1
  224. package/dist/types/math/src/polygon.d.ts +2 -2
  225. package/dist/types/math/src/range.d.ts +1 -3
  226. package/dist/types/math/src/segment.d.ts +3 -3
  227. package/dist/types/math/src/types.d.ts +25 -1
  228. package/dist/types/utils/src/bbox.d.ts +1 -1
  229. package/dist/types/utils/src/export.d.ts +5 -5
  230. package/dist/types/utils/src/shape.d.ts +6 -6
  231. package/dist/types/utils/src/withinBounds.d.ts +2 -2
  232. package/package.json +2 -2
  233. package/dist/types/common/src/visualdebug.d.ts +0 -41
  234. package/dist/types/excalidraw/charts.d.ts +0 -27
@@ -3,14 +3,12 @@ import type { ValueOf } from "@excalidraw/common/utility-types";
3
3
  import type { IMAGE_MIME_TYPES, STRING_MIME_TYPES } from "@excalidraw/common";
4
4
  import type { ExcalidrawElement, NonDeletedExcalidrawElement } from "@excalidraw/element/types";
5
5
  import type { FileSystemHandle } from "./data/filesystem";
6
- import type { Spreadsheet } from "./charts";
7
6
  import type { BinaryFiles } from "./types";
8
7
  export type PastedMixedContent = {
9
8
  type: "text" | "imageUrl";
10
9
  value: string;
11
10
  }[];
12
11
  export interface ClipboardData {
13
- spreadsheet?: Spreadsheet;
14
12
  elements?: readonly ExcalidrawElement[];
15
13
  files?: BinaryFiles;
16
14
  text?: string;
@@ -23,26 +21,16 @@ export declare const probablySupportsClipboardReadText: boolean;
23
21
  export declare const probablySupportsClipboardWriteText: boolean;
24
22
  export declare const probablySupportsClipboardBlob: boolean;
25
23
  export declare const createPasteEvent: ({ types, files, }: {
26
- types?: {
27
- "text/plain"?: string | File | undefined;
28
- "text/html"?: string | File | undefined;
29
- "image/svg+xml"?: string | File | undefined;
30
- "image/png"?: string | File | undefined;
31
- "image/jpeg"?: string | File | undefined;
32
- "image/gif"?: string | File | undefined;
33
- "image/webp"?: string | File | undefined;
34
- "image/bmp"?: string | File | undefined;
35
- "image/x-icon"?: string | File | undefined;
36
- "image/avif"?: string | File | undefined;
37
- "image/jfif"?: string | File | undefined;
38
- } | undefined;
39
- files?: File[] | undefined;
24
+ types?: { [key in AllowedPasteMimeTypes]?: string | File; };
25
+ files?: File[];
40
26
  }) => ClipboardEvent;
41
27
  export declare const serializeAsClipboardJSON: ({ elements, files, }: {
42
28
  elements: readonly NonDeletedExcalidrawElement[];
43
29
  files: BinaryFiles | null;
44
30
  }) => string;
45
- export declare const copyToClipboard: (elements: readonly NonDeletedExcalidrawElement[], files: BinaryFiles | null, clipboardEvent?: ClipboardEvent | null) => Promise<void>;
31
+ export declare const copyToClipboard: (elements: readonly NonDeletedExcalidrawElement[], files: BinaryFiles | null,
32
+ /** supply if available to make the operation more certain to succeed */
33
+ clipboardEvent?: ClipboardEvent | null) => Promise<void>;
46
34
  /**
47
35
  * Reads OS clipboard programmatically. May not work on all browsers.
48
36
  * Will prompt user for permission if not granted.
@@ -86,7 +74,7 @@ type ParsedDataTransferItemType<T extends AllowedParsedDataTransferItem["type"]>
86
74
  export type ParsedDataTransferFile = Extract<AllowedParsedDataTransferItem, {
87
75
  kind: "file";
88
76
  }>;
89
- type ParsedDataTranferList = ParsedDataTransferItem[] & {
77
+ export type ParsedDataTranferList = ParsedDataTransferItem[] & {
90
78
  /**
91
79
  * Only allows filtering by known `string` data types, since `file`
92
80
  * types can have multiple items of the same type (e.g. multiple image files)
@@ -101,29 +89,17 @@ type ParsedDataTranferList = ParsedDataTransferItem[] & {
101
89
  getData: typeof getDataTransferItemData;
102
90
  getFiles: typeof getDataTransferFiles;
103
91
  };
104
- declare const findDataTransferItemType: <T extends ValueOf<{
105
- readonly text: "text/plain";
106
- readonly html: "text/html";
107
- readonly json: "application/json";
108
- readonly excalidraw: "application/vnd.excalidraw+json";
109
- readonly excalidrawlib: "application/vnd.excalidrawlib+json";
110
- readonly excalidrawlibIds: "application/vnd.excalidrawlib.ids+json";
111
- }>>(this: ParsedDataTranferList, type: T) => ParsedDataTransferItemType<T> | null;
112
- declare const getDataTransferItemData: <T extends ValueOf<{
113
- readonly text: "text/plain";
114
- readonly html: "text/html";
115
- readonly json: "application/json";
116
- readonly excalidraw: "application/vnd.excalidraw+json";
117
- readonly excalidrawlib: "application/vnd.excalidrawlib+json";
118
- readonly excalidrawlibIds: "application/vnd.excalidrawlib.ids+json";
119
- }>>(this: ParsedDataTranferList, type: T) => ParsedDataTransferItemType<ValueOf<typeof STRING_MIME_TYPES>>["value"] | null;
92
+ declare const findDataTransferItemType: <T extends ValueOf<typeof STRING_MIME_TYPES>>(this: ParsedDataTranferList, type: T) => ParsedDataTransferItemType<T> | null;
93
+ declare const getDataTransferItemData: <T extends ValueOf<typeof STRING_MIME_TYPES>>(this: ParsedDataTranferList, type: T) => ParsedDataTransferItemType<ValueOf<typeof STRING_MIME_TYPES>>["value"] | null;
120
94
  declare const getDataTransferFiles: (this: ParsedDataTranferList) => ParsedDataTransferFile[];
95
+ /** @returns list of MIME types, synchronously */
96
+ export declare const parseDataTransferEventMimeTypes: (event: ClipboardEvent | DragEvent | React.DragEvent<HTMLDivElement>) => Set<string>;
121
97
  export declare const parseDataTransferEvent: (event: ClipboardEvent | DragEvent | React.DragEvent<HTMLDivElement>) => Promise<ParsedDataTranferList>;
122
98
  /**
123
99
  * Attempts to parse clipboard event.
124
100
  */
125
101
  export declare const parseClipboard: (dataList: ParsedDataTranferList, isPlainPaste?: boolean) => Promise<ClipboardData>;
126
102
  export declare const copyBlobToClipboardAsPng: (blob: Blob | Promise<Blob>) => Promise<void>;
127
- export declare const copyTextToSystemClipboard: (text: string | null, clipboardEvent?: ClipboardEvent | null) => Promise<void>;
103
+ export declare const copyTextToSystemClipboard: <MimeType extends ValueOf<typeof STRING_MIME_TYPES>>(text: string | { [K in MimeType]: string; } | null, clipboardEvent?: ClipboardEvent | null) => Promise<void>;
128
104
  export declare const isClipboardEvent: (event: React.SyntheticEvent | Event) => event is ClipboardEvent;
129
105
  export {};
@@ -36,7 +36,7 @@ export declare const ZoomActions: ({ renderAction, zoom, }: {
36
36
  }) => import("react/jsx-runtime").JSX.Element;
37
37
  export declare const UndoRedoActions: ({ renderAction, className, }: {
38
38
  renderAction: ActionManager["renderAction"];
39
- className?: string | undefined;
39
+ className?: string;
40
40
  }) => import("react/jsx-runtime").JSX.Element;
41
41
  export declare const ExitZenModeButton: ({ actionManager, showExitZenModeBtn, }: {
42
42
  actionManager: ActionManager;
@@ -10,6 +10,7 @@ import { Fonts } from "../fonts";
10
10
  import { type WritableAtom } from "../editor-jotai";
11
11
  import { Renderer } from "../scene/Renderer";
12
12
  import { LaserTrails } from "../laser-trails";
13
+ import { isOverScrollBars } from "../scene/scrollbars";
13
14
  import { LassoTrail } from "../lasso";
14
15
  import { EraserTrail } from "../eraser";
15
16
  import type { ExportedElements } from "../data";
@@ -28,7 +29,7 @@ export declare const useEditorInterface: () => Readonly<{
28
29
  desktopUIMode: "compact" | "full";
29
30
  userAgent: Readonly<{
30
31
  isMobileDevice: boolean;
31
- platform: "other" | "ios" | "android" | "unknown";
32
+ platform: "ios" | "android" | "other" | "unknown";
32
33
  }>;
33
34
  isTouchScreen: boolean;
34
35
  canFitSidebar: boolean;
@@ -88,10 +89,16 @@ declare class App extends React.Component<AppProps, AppState> {
88
89
  lastPointerDownEvent: React.PointerEvent<HTMLElement> | null;
89
90
  lastPointerUpEvent: React.PointerEvent<HTMLElement> | PointerEvent | null;
90
91
  lastPointerMoveEvent: PointerEvent | null;
92
+ /** current frame pointer cords */
91
93
  lastPointerMoveCoords: {
92
94
  x: number;
93
95
  y: number;
94
96
  } | null;
97
+ /** previous frame pointer coords */
98
+ previousPointerMoveCoords: {
99
+ x: number;
100
+ y: number;
101
+ } | null;
95
102
  lastViewportPosition: {
96
103
  x: number;
97
104
  y: number;
@@ -114,11 +121,7 @@ declare class App extends React.Component<AppProps, AppState> {
114
121
  x: number;
115
122
  y: number;
116
123
  }>;
117
- scrollbars: {
118
- isOverEither: boolean;
119
- isOverHorizontal: boolean;
120
- isOverVertical: boolean;
121
- };
124
+ scrollbars: ReturnType<typeof isOverScrollBars>;
122
125
  lastCoords: {
123
126
  x: number;
124
127
  y: number;
@@ -131,7 +134,7 @@ declare class App extends React.Component<AppProps, AppState> {
131
134
  x: number;
132
135
  y: number;
133
136
  };
134
- arrowDirection: "end" | "origin";
137
+ arrowDirection: "origin" | "end";
135
138
  center: {
136
139
  x: number;
137
140
  y: number;
@@ -158,14 +161,10 @@ declare class App extends React.Component<AppProps, AppState> {
158
161
  blockDragging: boolean;
159
162
  };
160
163
  eventListeners: {
161
- onMove: {
162
- (...args: any[]): void;
163
- flush(): void;
164
- cancel(): void;
165
- } | null;
166
- onUp: ((event: PointerEvent) => void) | null;
167
- onKeyDown: ((event: KeyboardEvent) => void) | null;
168
- onKeyUp: ((event: KeyboardEvent) => void) | null;
164
+ onMove: null | ReturnType<typeof import("@excalidraw/common").throttleRAF>;
165
+ onUp: null | ((event: PointerEvent) => void);
166
+ onKeyDown: null | ((event: KeyboardEvent) => void);
167
+ onKeyUp: null | ((event: KeyboardEvent) => void);
169
168
  };
170
169
  boxSelection: {
171
170
  hasOccurred: boolean;
@@ -184,11 +183,7 @@ declare class App extends React.Component<AppProps, AppState> {
184
183
  x: number;
185
184
  y: number;
186
185
  }>;
187
- scrollbars: {
188
- isOverEither: boolean;
189
- isOverHorizontal: boolean;
190
- isOverVertical: boolean;
191
- };
186
+ scrollbars: ReturnType<typeof isOverScrollBars>;
192
187
  lastCoords: {
193
188
  x: number;
194
189
  y: number;
@@ -201,7 +196,7 @@ declare class App extends React.Component<AppProps, AppState> {
201
196
  x: number;
202
197
  y: number;
203
198
  };
204
- arrowDirection: "end" | "origin";
199
+ arrowDirection: "origin" | "end";
205
200
  center: {
206
201
  x: number;
207
202
  y: number;
@@ -228,14 +223,10 @@ declare class App extends React.Component<AppProps, AppState> {
228
223
  blockDragging: boolean;
229
224
  };
230
225
  eventListeners: {
231
- onMove: {
232
- (...args: any[]): void;
233
- flush(): void;
234
- cancel(): void;
235
- } | null;
236
- onUp: ((event: PointerEvent) => void) | null;
237
- onKeyDown: ((event: KeyboardEvent) => void) | null;
238
- onKeyUp: ((event: KeyboardEvent) => void) | null;
226
+ onMove: null | ReturnType<typeof import("@excalidraw/common").throttleRAF>;
227
+ onUp: null | ((event: PointerEvent) => void);
228
+ onKeyDown: null | ((event: KeyboardEvent) => void);
229
+ onKeyUp: null | ((event: KeyboardEvent) => void);
239
230
  };
240
231
  boxSelection: {
241
232
  hasOccurred: boolean;
@@ -261,7 +252,9 @@ declare class App extends React.Component<AppProps, AppState> {
261
252
  */
262
253
  getEffectiveGridSize: () => NullableGridSize;
263
254
  private getHTMLIFrameElement;
264
- private handleEmbeddableCenterClick;
255
+ private handleIframeLikeElementHover;
256
+ /** @returns true if iframe-like element click handled */
257
+ private handleIframeLikeCenterClick;
265
258
  private isIframeLikeElementCenter;
266
259
  private updateEmbedValidationStatus;
267
260
  private updateEmbeddables;
@@ -274,7 +267,7 @@ declare class App extends React.Component<AppProps, AppState> {
274
267
  render(): import("react/jsx-runtime").JSX.Element;
275
268
  focusContainer: AppClassProperties["focusContainer"];
276
269
  getSceneElementsIncludingDeleted: () => readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
277
- getSceneElementsMapIncludingDeleted: () => Map<string, Ordered<ExcalidrawElement>> & import("@excalidraw/common/utility-types").MakeBrand<"SceneElementsMap">;
270
+ getSceneElementsMapIncludingDeleted: () => SceneElementsMap;
278
271
  getSceneElements: () => readonly Ordered<NonDeletedExcalidrawElement>[];
279
272
  onInsertElements: (elements: readonly ExcalidrawElement[]) => void;
280
273
  onExportImage: (type: keyof typeof EXPORT_IMAGE_TYPES, elements: ExportedElements, opts: {
@@ -343,20 +336,27 @@ declare class App extends React.Component<AppProps, AppState> {
343
336
  setAppState: React.Component<any, AppState>["setState"];
344
337
  removePointer: (event: React.PointerEvent<HTMLElement> | PointerEvent) => void;
345
338
  toggleLock: (source?: "keyboard" | "ui") => void;
346
- updateFrameRendering: (opts: Partial<{
347
- enabled: boolean;
348
- name: boolean;
349
- outline: boolean;
350
- clip: boolean;
351
- }> | ((prevState: AppState["frameRendering"]) => Partial<AppState["frameRendering"]>)) => void;
339
+ updateFrameRendering: (opts: Partial<AppState["frameRendering"]> | ((prevState: AppState["frameRendering"]) => Partial<AppState["frameRendering"]>)) => void;
352
340
  togglePenMode: (force: boolean | null) => void;
353
341
  onHandToolToggle: () => void;
354
342
  /**
355
343
  * Zooms on canvas viewport center
356
344
  */
357
- zoomCanvas: (value: number) => void;
345
+ zoomCanvas: (
346
+ /**
347
+ * Decimal fraction, auto-clamped between MIN_ZOOM and MAX_ZOOM.
348
+ * 1 = 100% zoom, 2 = 200% zoom, 0.5 = 50% zoom
349
+ */
350
+ value: number) => void;
358
351
  private cancelInProgressAnimation;
359
- scrollToContent: (target?: string | ExcalidrawElement | readonly ExcalidrawElement[], opts?: ({
352
+ scrollToContent: (
353
+ /**
354
+ * target to scroll to
355
+ *
356
+ * - string - id of element or group, or url containing elementLink
357
+ * - ExcalidrawElement | ExcalidrawElement[] - element(s) objects
358
+ */
359
+ target?: string | ExcalidrawElement | readonly ExcalidrawElement[], opts?: ({
360
360
  fitToContent?: boolean;
361
361
  fitToViewport?: never;
362
362
  viewportZoomFactor?: number;
@@ -393,7 +393,7 @@ declare class App extends React.Component<AppProps, AppState> {
393
393
  private addMissingFiles;
394
394
  updateScene: <K extends keyof AppState>(sceneData: {
395
395
  elements?: SceneData["elements"];
396
- appState?: Pick<AppState, K> | null | undefined;
396
+ appState?: Pick<AppState, K> | null;
397
397
  collaborators?: SceneData["collaborators"];
398
398
  /**
399
399
  * Controls which updates should be captured by the `Store`. Captured updates are emmitted and listened to by other components, such as `History` for undo / redo purposes.
@@ -416,8 +416,8 @@ declare class App extends React.Component<AppProps, AppState> {
416
416
  */
417
417
  toggleSidebar: ({ name, tab, force, }: {
418
418
  name: SidebarName | null;
419
- tab?: string | undefined;
420
- force?: boolean | undefined;
419
+ tab?: SidebarTabName;
420
+ force?: boolean;
421
421
  }) => boolean;
422
422
  private updateCurrentCursorPosition;
423
423
  getEditorUIOffsets: () => Offsets;
@@ -460,7 +460,7 @@ declare class App extends React.Component<AppProps, AppState> {
460
460
  private finishImageCropping;
461
461
  private handleCanvasDoubleClick;
462
462
  private getElementLinkAtPosition;
463
- private redirectToLink;
463
+ private handleElementLinkClick;
464
464
  private getTopLayerFrameAtSceneCoords;
465
465
  private handleCanvasPointerMove;
466
466
  private handleEraser;
@@ -531,7 +531,6 @@ declare class App extends React.Component<AppProps, AppState> {
531
531
  /** generally you should use `addNewImagesToImageCache()` directly if you need
532
532
  * to render new images. This is just a failsafe */
533
533
  private scheduleImageRefresh;
534
- private updateBindingEnabledOnPointerMove;
535
534
  private clearSelection;
536
535
  private handleInteractiveCanvasRef;
537
536
  private insertImages;
@@ -1,7 +1,5 @@
1
- /// <reference types="react" />
2
- import OpenColor from "open-color";
3
1
  import "./Card.scss";
4
2
  export declare const Card: React.FC<{
5
- color: keyof OpenColor | "primary";
3
+ color: "primary" | "lime" | "pink";
6
4
  children?: React.ReactNode;
7
5
  }>;
@@ -1,10 +1,8 @@
1
1
  import type { ColorPickerType } from "./colorPickerUtils";
2
- interface ColorInputProps {
2
+ export declare const ColorInput: ({ color, onChange, label, colorPickerType, placeholder, }: {
3
3
  color: string;
4
4
  onChange: (color: string) => void;
5
5
  label: string;
6
6
  colorPickerType: ColorPickerType;
7
7
  placeholder?: string;
8
- }
9
- export declare const ColorInput: ({ color, onChange, label, colorPickerType, placeholder, }: ColorInputProps) => import("react/jsx-runtime").JSX.Element;
10
- export {};
8
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -3,7 +3,6 @@ import type { ExcalidrawElement } from "@excalidraw/element/types";
3
3
  import "./ColorPicker.scss";
4
4
  import type { ColorPickerType } from "./colorPickerUtils";
5
5
  import type { AppState } from "../../types";
6
- export declare const getColor: (color: string) => string | null;
7
6
  interface ColorPickerProps {
8
7
  type: ColorPickerType;
9
8
  /**
@@ -17,5 +17,4 @@ export type ActiveColorPickerSectionAtomType = "custom" | "baseColors" | "shades
17
17
  export declare const activeColorPickerSectionAtom: import("jotai/vanilla/atom").PrimitiveAtom<ActiveColorPickerSectionAtomType> & {
18
18
  init: ActiveColorPickerSectionAtomType;
19
19
  };
20
- export declare const isColorDark: (color: string, threshold?: number) => boolean;
21
20
  export type ColorPickerType = "canvasBackground" | "elementBackground" | "elementStroke";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { ColorPaletteCustom } from "@excalidraw/common";
3
2
  import type { ActiveColorPickerSectionAtomType } from "./colorPickerUtils";
4
3
  interface ColorPickerKeyNavHandlerProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { ActionManager } from "../../actions/manager";
3
2
  import type { Action } from "../../actions/types";
4
3
  export type CommandPaletteItem = {
@@ -15,7 +14,7 @@ export type CommandPaletteItem = {
15
14
  category: string;
16
15
  order?: number;
17
16
  predicate?: boolean | Action["predicate"];
18
- shortcut?: string;
17
+ shortcut?: string | null;
19
18
  /** if false, command will not show while in view mode */
20
19
  viewMode?: boolean;
21
20
  perform: (data: {
@@ -16,8 +16,8 @@ export declare const adjustBoundTextSize: (container: ExcalidrawTextContainer, b
16
16
  type ConversionType = "generic" | "linear" | null;
17
17
  export declare const convertElementTypes: (app: App, { conversionType, nextType, direction, }: {
18
18
  conversionType: ConversionType;
19
- nextType?: ConvertibleTypes | undefined;
20
- direction?: "left" | "right" | undefined;
19
+ nextType?: ConvertibleTypes;
20
+ direction?: "left" | "right";
21
21
  }) => boolean;
22
22
  export declare const getConversionTypeFromElements: (elements: ExcalidrawElement[]) => ConversionType;
23
23
  export default ConvertElementTypePopup;
@@ -3,5 +3,5 @@ import "./ToolIcon.scss";
3
3
  export declare const DarkModeToggle: (props: {
4
4
  value: Theme;
5
5
  onChange: (value: Theme) => void;
6
- title?: string | undefined;
6
+ title?: string;
7
7
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,26 +1,22 @@
1
- /// <reference types="react" />
2
1
  import type { MarkOptional } from "@excalidraw/common/utility-types";
3
2
  import "../components/dropdownMenu/DropdownMenu.scss";
4
3
  import type { SidebarProps, SidebarTriggerProps } from "./Sidebar/common";
5
4
  export declare const DefaultSidebar: import("react").FC<Omit<MarkOptional<Omit<{
6
- name: string;
7
- children: import("react").ReactNode;
8
- onStateChange?: ((state: {
9
- name: string;
10
- tab?: string | undefined;
11
- } | null) => void) | undefined;
12
- onDock?: ((docked: boolean) => void) | undefined;
13
- docked?: boolean | undefined;
14
- className?: string | undefined;
15
- __fallback?: boolean | undefined;
5
+ name: import("../types").SidebarName;
6
+ children: React.ReactNode;
7
+ onStateChange?: (state: import("../types").AppState["openSidebar"]) => void;
8
+ onDock?: (docked: boolean) => void;
9
+ docked?: boolean;
10
+ className?: string;
11
+ __fallback?: boolean;
16
12
  }, "name">, "children">, "onDock"> & {
17
13
  /** pass `false` to disable docking */
18
14
  onDock?: SidebarProps["onDock"] | false;
19
15
  } & {
20
- __fallback?: boolean | undefined;
16
+ __fallback?: boolean;
21
17
  }> & {
22
18
  Trigger: import("react").FC<Omit<SidebarTriggerProps, "name"> & import("react").HTMLAttributes<HTMLDivElement> & {
23
- __fallback?: boolean | undefined;
19
+ __fallback?: boolean;
24
20
  }>;
25
21
  TabTriggers: {
26
22
  ({ children }: {
@@ -6,7 +6,7 @@ declare const ElementLinkDialog: ({ sourceElementId, onClose, appState, scene, g
6
6
  sourceElementId: ExcalidrawElement["id"];
7
7
  appState: UIAppState;
8
8
  scene: Scene;
9
- onClose?: (() => void) | undefined;
9
+ onClose?: () => void;
10
10
  generateLinkForSelection: AppProps["generateLinkForSelection"];
11
11
  }) => import("react/jsx-runtime").JSX.Element;
12
12
  export default ElementLinkDialog;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const Ellipsify: ({ children, ...rest }: {
3
2
  children: React.ReactNode;
4
- } & import("react").HTMLAttributes<HTMLSpanElement>) => import("react/jsx-runtime").JSX.Element;
3
+ } & React.HTMLAttributes<HTMLSpanElement>) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
2
  export declare const ErrorDialog: ({ children, onClose, }: {
3
3
  children?: React.ReactNode;
4
- onClose?: (() => void) | undefined;
4
+ onClose?: () => void;
5
5
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./ExcalidrawLogo.scss";
3
2
  type LogoSize = "xs" | "small" | "normal" | "large" | "custom" | "mobile";
4
3
  interface LogoProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { ExcalidrawElement } from "@excalidraw/element/types";
3
2
  import "./EyeDropper.scss";
4
3
  import type { ColorPickerType } from "./ColorPicker/colorPickerUtils";
@@ -14,5 +14,6 @@ export type FilledButtonProps = {
14
14
  className?: string;
15
15
  fullWidth?: boolean;
16
16
  icon?: React.ReactNode;
17
+ disabled?: boolean;
17
18
  };
18
19
  export declare const FilledButton: React.ForwardRefExoticComponent<FilledButtonProps & React.RefAttributes<HTMLButtonElement>>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { Node } from "@excalidraw/common";
3
2
  import { type FontDescriptor } from "./FontPickerList";
4
3
  interface FontPickerKeyNavHandlerProps {
@@ -1,4 +1,4 @@
1
1
  import "./HelpDialog.scss";
2
2
  export declare const HelpDialog: ({ onClose }: {
3
- onClose?: (() => void) | undefined;
3
+ onClose?: () => void;
4
4
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  export declare const InlineIcon: ({ className, icon, size, }: {
2
- className?: string | undefined;
2
+ className?: string;
3
3
  icon: React.ReactNode;
4
- size?: string | undefined;
4
+ size?: string;
5
5
  }) => import("react/jsx-runtime").JSX.Element;
@@ -5,5 +5,5 @@ export declare const LibraryMenuControlButtons: ({ libraryReturnUrl, theme, id,
5
5
  id: string;
6
6
  style: React.CSSProperties;
7
7
  children?: React.ReactNode;
8
- className?: string | undefined;
8
+ className?: string;
9
9
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type Library from "../data/library";
3
2
  import type { LibraryItem, UIAppState } from "../types";
4
3
  export declare const LibraryDropdownMenuButton: React.FC<{
@@ -14,5 +13,5 @@ export declare const LibraryDropdownMenuButton: React.FC<{
14
13
  export declare const LibraryDropdownMenu: ({ selectedItems, onSelectItems, className, }: {
15
14
  selectedItems: LibraryItem["id"][];
16
15
  onSelectItems: (id: LibraryItem["id"][]) => void;
17
- className?: string | undefined;
16
+ className?: string;
18
17
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,11 +1,10 @@
1
- /// <reference types="react" />
2
1
  import "./LibraryUnit.scss";
3
2
  import type { LibraryItem } from "../types";
4
3
  import type { SvgCache } from "../hooks/useLibraryItemSvg";
5
4
  export declare const LibraryUnit: import("react").MemoExoticComponent<({ id, elements, isPending, onClick, selected, onToggle, onDrag, svgCache, }: {
6
5
  id: LibraryItem["id"] | /** for pending item */ null;
7
- elements?: readonly import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawElement>[] | undefined;
8
- isPending?: boolean | undefined;
6
+ elements?: LibraryItem["elements"];
7
+ isPending?: boolean;
9
8
  onClick: (id: LibraryItem["id"] | null) => void;
10
9
  selected: boolean;
11
10
  onToggle: (id: string, event: React.MouseEvent) => void;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { Theme } from "@excalidraw/element/types";
3
2
  export declare const LoadingMessage: React.FC<{
4
3
  delay?: number;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./ToolIcon.scss";
3
2
  import "./MobileToolBar.scss";
4
3
  import type { AppClassProperties, UIAppState } from "../types";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./Modal.scss";
3
2
  import type { AppState } from "../types";
4
3
  export declare const Modal: React.FC<{
@@ -4,7 +4,7 @@ export type OverwriteConfirmDialogProps = {
4
4
  children: React.ReactNode;
5
5
  };
6
6
  declare const OverwriteConfirmDialog: React.FC<OverwriteConfirmDialogProps & {
7
- __fallback?: boolean | undefined;
7
+ __fallback?: boolean;
8
8
  }> & {
9
9
  Actions: (({ children }: {
10
10
  children: React.ReactNode;
@@ -1,8 +1,7 @@
1
- import React from "react";
2
1
  import "./PasteChartDialog.scss";
3
- import type { UIAppState } from "../types";
4
- export declare const PasteChartDialog: ({ setAppState, appState, onClose, }: {
5
- appState: UIAppState;
2
+ import type { Spreadsheet } from "../charts";
3
+ export declare const PasteChartDialog: ({ data, rawText, onClose, }: {
4
+ data: Spreadsheet;
5
+ rawText: string;
6
6
  onClose: () => void;
7
- setAppState: React.Component<any, UIAppState>["setState"];
8
7
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import * as Popover from "@radix-ui/react-popover";
1
+ import { Popover } from "radix-ui";
2
2
  import React, { type ReactNode } from "react";
3
3
  interface PropertiesPopoverProps {
4
4
  className?: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./RadioGroup.scss";
3
2
  export type RadioGroupChoice<T> = {
4
3
  value: T;
@@ -4,14 +4,14 @@ export declare const RadioSelection: <T extends Object>(props: {
4
4
  value: T;
5
5
  text: string;
6
6
  icon: JSX.Element;
7
- testId?: string | undefined;
7
+ testId?: string;
8
8
  /** if not supplied, defaults to value identity check */
9
- active?: boolean | undefined;
9
+ active?: boolean;
10
10
  }[];
11
11
  value: T | null;
12
- type?: "button" | "radio" | undefined;
12
+ type?: "radio" | "button";
13
13
  } & ({
14
- type?: "radio" | undefined;
14
+ type?: "radio";
15
15
  group: string;
16
16
  onChange: (value: T) => void;
17
17
  } | {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./ScrollableList.scss";
3
2
  interface ScrollableListProps {
4
3
  className?: string;