@excalidraw/element 0.18.0-9036812b6 → 0.18.0-9ba0f5d

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 (227) hide show
  1. package/dist/dev/index.js +3846 -2092
  2. package/dist/dev/index.js.map +4 -4
  3. package/dist/prod/index.js +17 -17
  4. package/dist/types/common/src/bounds.d.ts +10 -0
  5. package/dist/types/common/src/colors.d.ts +59 -39
  6. package/dist/types/common/src/constants.d.ts +33 -26
  7. package/dist/types/common/src/editorInterface.d.ts +34 -0
  8. package/dist/types/common/src/font-metadata.d.ts +1 -3
  9. package/dist/types/common/src/index.d.ts +2 -0
  10. package/dist/types/common/src/keys.d.ts +1 -1
  11. package/dist/types/common/src/utility-types.d.ts +0 -1
  12. package/dist/types/common/src/utils.d.ts +49 -34
  13. package/dist/types/element/src/Scene.d.ts +9 -5
  14. package/dist/types/element/src/binding.d.ts +58 -44
  15. package/dist/types/element/src/bounds.d.ts +3 -11
  16. package/dist/types/element/src/collision.d.ts +6 -2
  17. package/dist/types/element/src/comparisons.d.ts +7 -7
  18. package/dist/types/element/src/delta.d.ts +6 -3
  19. package/dist/types/element/src/dragElements.d.ts +3 -3
  20. package/dist/types/element/src/duplicate.d.ts +3 -3
  21. package/dist/types/element/src/fractionalIndex.d.ts +2 -2
  22. package/dist/types/element/src/frame.d.ts +5 -1
  23. package/dist/types/element/src/heading.d.ts +2 -1
  24. package/dist/types/element/src/image.d.ts +1 -11
  25. package/dist/types/element/src/index.d.ts +2 -3
  26. package/dist/types/element/src/linearElementEditor.d.ts +16 -20
  27. package/dist/types/element/src/mutateElement.d.ts +3 -1
  28. package/dist/types/element/src/newElement.d.ts +6 -6
  29. package/dist/types/element/src/positionElementsOnGrid.d.ts +2 -0
  30. package/dist/types/element/src/renderElement.d.ts +4 -7
  31. package/dist/types/element/src/resizeElements.d.ts +10 -10
  32. package/dist/types/element/src/resizeTest.d.ts +6 -5
  33. package/dist/types/element/src/selection.d.ts +3 -7
  34. package/dist/types/element/src/shape.d.ts +8 -7
  35. package/dist/types/element/src/store.d.ts +6 -1
  36. package/dist/types/element/src/textElement.d.ts +1 -1
  37. package/dist/types/element/src/textMeasurements.d.ts +1 -3
  38. package/dist/types/{excalidraw/data → element/src}/transform.d.ts +3 -3
  39. package/dist/types/element/src/transformHandles.d.ts +8 -27
  40. package/dist/types/element/src/typeChecks.d.ts +4 -7
  41. package/dist/types/element/src/types.d.ts +7 -11
  42. package/dist/types/element/src/utils.d.ts +5 -2
  43. package/dist/types/element/src/visualdebug.d.ts +59 -0
  44. package/dist/types/element/src/zindex.d.ts +7 -1
  45. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +93 -136
  46. package/dist/types/excalidraw/actions/actionAlign.d.ts +6 -7
  47. package/dist/types/excalidraw/actions/actionBoundText.d.ts +67 -96
  48. package/dist/types/excalidraw/actions/actionCanvas.d.ts +402 -758
  49. package/dist/types/excalidraw/actions/actionClipboard.d.ts +86 -856
  50. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +32 -47
  51. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +110 -159
  52. package/dist/types/excalidraw/actions/actionDistribute.d.ts +2 -3
  53. package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +2 -3
  54. package/dist/types/excalidraw/actions/actionElementLink.d.ts +28 -45
  55. package/dist/types/excalidraw/actions/actionElementLock.d.ts +66 -95
  56. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +33 -48
  57. package/dist/types/excalidraw/actions/actionExport.d.ts +144 -1104
  58. package/dist/types/excalidraw/actions/actionFinalize.d.ts +10 -394
  59. package/dist/types/excalidraw/actions/actionFlip.d.ts +2 -3
  60. package/dist/types/excalidraw/actions/actionFrame.d.ts +227 -322
  61. package/dist/types/excalidraw/actions/actionGroup.d.ts +70 -107
  62. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +140 -195
  63. package/dist/types/excalidraw/actions/actionLink.d.ts +30 -45
  64. package/dist/types/excalidraw/actions/actionMenu.d.ts +27 -410
  65. package/dist/types/excalidraw/actions/actionNavigate.d.ts +18 -359
  66. package/dist/types/excalidraw/actions/actionProperties.d.ts +129 -2488
  67. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +35 -54
  68. package/dist/types/excalidraw/actions/actionStyles.d.ts +32 -47
  69. package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +1 -1
  70. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +32 -47
  71. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +32 -47
  72. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +25 -42
  73. package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +1 -1
  74. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +32 -47
  75. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +32 -47
  76. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +33 -48
  77. package/dist/types/excalidraw/actions/actionZindex.d.ts +2 -3
  78. package/dist/types/excalidraw/actions/index.d.ts +2 -2
  79. package/dist/types/excalidraw/actions/register.d.ts +2 -2
  80. package/dist/types/excalidraw/actions/types.d.ts +4 -4
  81. package/dist/types/excalidraw/appState.d.ts +12 -7
  82. package/dist/types/excalidraw/clipboard.d.ts +55 -16
  83. package/dist/types/excalidraw/components/Actions.d.ts +22 -5
  84. package/dist/types/excalidraw/components/App.d.ts +67 -65
  85. package/dist/types/excalidraw/components/Card.d.ts +1 -3
  86. package/dist/types/excalidraw/components/ColorPicker/ColorInput.d.ts +2 -4
  87. package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +0 -1
  88. package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +2 -0
  89. package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +2 -1
  90. package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +2 -1
  91. package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +0 -1
  92. package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +0 -1
  93. package/dist/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +1 -0
  94. package/dist/types/excalidraw/components/CommandPalette/types.d.ts +1 -3
  95. package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +2 -2
  96. package/dist/types/excalidraw/components/DarkModeToggle.d.ts +1 -1
  97. package/dist/types/excalidraw/components/DefaultSidebar.d.ts +9 -13
  98. package/dist/types/excalidraw/components/ElementLinkDialog.d.ts +1 -1
  99. package/dist/types/excalidraw/components/Ellipsify.d.ts +1 -2
  100. package/dist/types/excalidraw/components/ErrorDialog.d.ts +1 -1
  101. package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +1 -2
  102. package/dist/types/excalidraw/components/EyeDropper.d.ts +0 -1
  103. package/dist/types/excalidraw/components/FilledButton.d.ts +2 -1
  104. package/dist/types/excalidraw/components/FontPicker/FontPicker.d.ts +2 -1
  105. package/dist/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +3 -1
  106. package/dist/types/excalidraw/components/FontPicker/keyboardNavHandlers.d.ts +0 -1
  107. package/dist/types/excalidraw/components/HelpDialog.d.ts +1 -1
  108. package/dist/types/excalidraw/components/HintViewer.d.ts +4 -3
  109. package/dist/types/excalidraw/components/InlineIcon.d.ts +3 -1
  110. package/dist/types/excalidraw/components/LayerUI.d.ts +2 -1
  111. package/dist/types/excalidraw/components/LibraryMenuControlButtons.d.ts +1 -1
  112. package/dist/types/excalidraw/components/LibraryMenuHeaderContent.d.ts +1 -2
  113. package/dist/types/excalidraw/components/LibraryMenuSection.d.ts +1 -1
  114. package/dist/types/excalidraw/components/LibraryUnit.d.ts +2 -3
  115. package/dist/types/excalidraw/components/LoadingMessage.d.ts +0 -1
  116. package/dist/types/excalidraw/components/MobileMenu.d.ts +3 -5
  117. package/dist/types/excalidraw/components/MobileToolBar.d.ts +10 -0
  118. package/dist/types/excalidraw/components/Modal.d.ts +0 -1
  119. package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirm.d.ts +1 -1
  120. package/dist/types/excalidraw/components/Popover.d.ts +2 -1
  121. package/dist/types/excalidraw/components/PropertiesPopover.d.ts +1 -0
  122. package/dist/types/excalidraw/components/RadioGroup.d.ts +0 -1
  123. package/dist/types/excalidraw/components/RadioSelection.d.ts +4 -4
  124. package/dist/types/excalidraw/components/ScrollableList.d.ts +0 -1
  125. package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +15 -21
  126. package/dist/types/excalidraw/components/Sidebar/SidebarHeader.d.ts +1 -1
  127. package/dist/types/excalidraw/components/Sidebar/SidebarTab.d.ts +1 -2
  128. package/dist/types/excalidraw/components/Sidebar/SidebarTabTrigger.d.ts +1 -2
  129. package/dist/types/excalidraw/components/Sidebar/SidebarTabTriggers.d.ts +1 -2
  130. package/dist/types/excalidraw/components/Sidebar/SidebarTabs.d.ts +1 -2
  131. package/dist/types/excalidraw/components/Spinner.d.ts +4 -4
  132. package/dist/types/excalidraw/components/Stats/CanvasGrid.d.ts +0 -1
  133. package/dist/types/excalidraw/components/Stats/Collapsible.d.ts +0 -1
  134. package/dist/types/excalidraw/components/Stats/DragInput.d.ts +0 -1
  135. package/dist/types/excalidraw/components/Stats/index.d.ts +7 -8
  136. package/dist/types/excalidraw/components/Stats/utils.d.ts +1 -1
  137. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatHistoryMenu.d.ts +15 -0
  138. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatInterface.d.ts +27 -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 +26 -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/MermaidToExcalidraw.d.ts +3 -2
  144. package/dist/types/excalidraw/components/TTDDialog/TTDContext.d.ts +13 -0
  145. package/dist/types/excalidraw/components/TTDDialog/TTDDialog.d.ts +4 -25
  146. package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +2 -2
  147. package/dist/types/excalidraw/components/TTDDialog/TTDDialogPanel.d.ts +13 -9
  148. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTab.d.ts +1 -2
  149. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTrigger.d.ts +1 -2
  150. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTriggers.d.ts +1 -2
  151. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +2 -3
  152. package/dist/types/excalidraw/components/TTDDialog/TTDPreviewPanel.d.ts +9 -0
  153. package/dist/types/excalidraw/components/TTDDialog/TextToDiagram.d.ts +8 -0
  154. package/dist/types/excalidraw/components/TTDDialog/common.d.ts +16 -16
  155. package/dist/types/excalidraw/components/TTDDialog/hooks/useChatManagement.d.ts +13 -0
  156. package/dist/types/excalidraw/components/TTDDialog/hooks/useMermaidRenderer.d.ts +14 -0
  157. package/dist/types/excalidraw/components/TTDDialog/hooks/useTextGeneration.d.ts +7 -0
  158. package/dist/types/excalidraw/components/TTDDialog/types.d.ts +91 -0
  159. package/dist/types/excalidraw/components/TTDDialog/useTTDChatStorage.d.ts +22 -0
  160. package/dist/types/excalidraw/components/TTDDialog/utils/TTDStreamFetch.d.ts +24 -0
  161. package/dist/types/excalidraw/components/TTDDialog/utils/chat.d.ts +10 -0
  162. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidValidation.d.ts +1 -0
  163. package/dist/types/excalidraw/components/TextField.d.ts +1 -0
  164. package/dist/types/excalidraw/components/Toast.d.ts +3 -3
  165. package/dist/types/excalidraw/components/ToolPopover.d.ts +25 -0
  166. package/dist/types/excalidraw/components/Trans.d.ts +2 -2
  167. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +6 -3
  168. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +30 -32
  169. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +6 -5
  170. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuGroup.d.ts +3 -3
  171. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +10 -18
  172. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContent.d.ts +3 -3
  173. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +0 -1
  174. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCustom.d.ts +2 -2
  175. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemLink.d.ts +6 -6
  176. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuTrigger.d.ts +3 -4
  177. package/dist/types/excalidraw/components/dropdownMenu/common.d.ts +1 -1
  178. package/dist/types/excalidraw/components/hoc/withInternalFallback.d.ts +1 -1
  179. package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +1 -1
  180. package/dist/types/excalidraw/components/icons.d.ts +26 -12
  181. package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +4 -3
  182. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +2 -2
  183. package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +25 -30
  184. package/dist/types/excalidraw/components/shapes.d.ts +129 -1
  185. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +6 -6
  186. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +15 -16
  187. package/dist/types/excalidraw/data/blob.d.ts +324 -10
  188. package/dist/types/excalidraw/data/encode.d.ts +4 -4
  189. package/dist/types/excalidraw/data/encryption.d.ts +5 -5
  190. package/dist/types/excalidraw/data/filesystem.d.ts +2 -2
  191. package/dist/types/excalidraw/data/index.d.ts +3 -3
  192. package/dist/types/excalidraw/data/json.d.ts +159 -2
  193. package/dist/types/excalidraw/data/library.d.ts +24 -9
  194. package/dist/types/excalidraw/data/restore.d.ts +27 -7
  195. package/dist/types/excalidraw/data/types.d.ts +4 -1
  196. package/dist/types/excalidraw/editor-jotai.d.ts +11 -11
  197. package/dist/types/excalidraw/errors.d.ts +14 -0
  198. package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
  199. package/dist/types/excalidraw/hooks/useOutsideClick.d.ts +4 -3
  200. package/dist/types/excalidraw/hooks/useScrollPosition.d.ts +1 -2
  201. package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +14 -0
  202. package/dist/types/excalidraw/i18n.d.ts +2 -2
  203. package/dist/types/excalidraw/index.d.ts +6 -7
  204. package/dist/types/excalidraw/renderer/animation.d.ts +12 -0
  205. package/dist/types/excalidraw/renderer/helpers.d.ts +6 -8
  206. package/dist/types/excalidraw/renderer/interactiveScene.d.ts +8 -14
  207. package/dist/types/excalidraw/scene/Renderer.d.ts +5 -2
  208. package/dist/types/excalidraw/scene/export.d.ts +2 -2
  209. package/dist/types/excalidraw/scene/scroll.d.ts +1 -6
  210. package/dist/types/excalidraw/scene/types.d.ts +22 -5
  211. package/dist/types/excalidraw/shortcut.d.ts +1 -0
  212. package/dist/types/excalidraw/snapping.d.ts +5 -5
  213. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-bindings.d.ts +1 -1
  214. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-loader.d.ts +1 -1
  215. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-wasm.d.ts +1 -1
  216. package/dist/types/excalidraw/subset/woff2/woff2-loader.d.ts +2 -2
  217. package/dist/types/excalidraw/subset/woff2/woff2-wasm.d.ts +1 -1
  218. package/dist/types/excalidraw/types.d.ts +32 -20
  219. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +2 -2
  220. package/dist/types/math/src/polygon.d.ts +2 -2
  221. package/dist/types/math/src/range.d.ts +1 -3
  222. package/dist/types/math/src/segment.d.ts +4 -3
  223. package/dist/types/utils/src/bbox.d.ts +1 -1
  224. package/dist/types/utils/src/export.d.ts +5 -5
  225. package/dist/types/utils/src/shape.d.ts +6 -6
  226. package/dist/types/utils/src/withinBounds.d.ts +2 -2
  227. package/package.json +9 -3
@@ -1,593 +1,16 @@
1
- /// <reference types="react" />
2
- export declare const actionCopy: {
3
- name: "copy";
4
- label: string;
5
- icon: import("react/jsx-runtime").JSX.Element;
6
- trackEvent: {
7
- category: "element";
8
- };
9
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, event: ClipboardEvent | null, app: import("../types").AppClassProperties) => Promise<{
10
- captureUpdate: "EVENTUALLY";
11
- appState: {
12
- errorMessage: any;
13
- contextMenu: {
14
- items: import("../components/ContextMenu").ContextMenuItems;
15
- top: number;
16
- left: number;
17
- } | null;
18
- showWelcomeScreen: boolean;
19
- isLoading: boolean;
20
- activeEmbeddable: {
21
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
22
- state: "active" | "hover";
23
- } | null;
24
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
25
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
26
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
27
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
28
- isBindingEnabled: boolean;
29
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
30
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
31
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
32
- frameRendering: {
33
- enabled: boolean;
34
- name: boolean;
35
- outline: boolean;
36
- clip: boolean;
37
- };
38
- editingFrame: string | null;
39
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
40
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
41
- activeTool: {
42
- lastActiveTool: import("../types").ActiveTool | null;
43
- locked: boolean;
44
- fromSelection: boolean;
45
- } & import("../types").ActiveTool;
46
- penMode: boolean;
47
- penDetected: boolean;
48
- exportBackground: boolean;
49
- exportEmbedScene: boolean;
50
- exportWithDarkMode: boolean;
51
- exportScale: number;
52
- currentItemStrokeColor: string;
53
- currentItemBackgroundColor: string;
54
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
55
- currentItemStrokeWidth: number;
56
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
57
- currentItemRoughness: number;
58
- currentItemOpacity: number;
59
- currentItemFontFamily: number;
60
- currentItemFontSize: number;
61
- currentItemTextAlign: string;
62
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
63
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
64
- currentHoveredFontFamily: number | null;
65
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
66
- currentItemArrowType: "round" | "sharp" | "elbow";
67
- viewBackgroundColor: string;
68
- scrollX: number;
69
- scrollY: number;
70
- cursorButton: "up" | "down";
71
- scrolledOutside: boolean;
72
- name: string | null;
73
- isResizing: boolean;
74
- isRotating: boolean;
75
- zoom: Readonly<{
76
- value: import("../types").NormalizedZoomValue;
77
- }>;
78
- openMenu: "canvas" | "shape" | null;
79
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
80
- openSidebar: {
81
- name: string;
82
- tab?: string | undefined;
83
- } | null;
84
- openDialog: {
85
- name: "imageExport" | "help" | "jsonExport";
86
- } | {
87
- name: "ttd";
88
- tab: "mermaid" | "text-to-diagram";
89
- } | {
90
- name: "commandPalette";
91
- } | {
92
- name: "elementLinkSelector";
93
- sourceElementId: string;
94
- } | null;
95
- defaultSidebarDockedPreference: boolean;
96
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
97
- selectedElementIds: Readonly<{
98
- [id: string]: true;
99
- }>;
100
- hoveredElementIds: Readonly<{
101
- [id: string]: true;
102
- }>;
103
- previousSelectedElementIds: {
104
- [id: string]: true;
105
- };
106
- selectedElementsAreBeingDragged: boolean;
107
- shouldCacheIgnoreZoom: boolean;
108
- toast: {
109
- message: string;
110
- closable?: boolean | undefined;
111
- duration?: number | undefined;
112
- } | null;
113
- zenModeEnabled: boolean;
114
- theme: import("@excalidraw/element/types").Theme;
115
- gridSize: number;
116
- gridStep: number;
117
- gridModeEnabled: boolean;
118
- viewModeEnabled: boolean;
119
- selectedGroupIds: {
120
- [groupId: string]: boolean;
121
- };
122
- editingGroupId: string | null;
123
- width: number;
124
- height: number;
125
- offsetTop: number;
126
- offsetLeft: number;
127
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
128
- collaborators: Map<import("../types").SocketId, Readonly<{
129
- pointer?: import("../types").CollaboratorPointer | undefined;
130
- button?: "up" | "down" | undefined;
131
- selectedElementIds?: Readonly<{
132
- [id: string]: true;
133
- }> | undefined;
134
- username?: string | null | undefined;
135
- userState?: import("@excalidraw/common").UserIdleState | undefined;
136
- color?: {
137
- background: string;
138
- stroke: string;
139
- } | undefined;
140
- avatarUrl?: string | undefined;
141
- id?: string | undefined;
142
- socketId?: import("../types").SocketId | undefined;
143
- isCurrentUser?: boolean | undefined;
144
- isInCall?: boolean | undefined;
145
- isSpeaking?: boolean | undefined;
146
- isMuted?: boolean | undefined;
147
- }>>;
148
- stats: {
149
- open: boolean;
150
- panels: number;
151
- };
152
- currentChartType: import("@excalidraw/element/types").ChartType;
153
- pasteDialog: {
154
- shown: false;
155
- data: null;
156
- } | {
157
- shown: true;
158
- data: import("../charts").Spreadsheet;
159
- };
160
- showHyperlinkPopup: false | "editor" | "info";
161
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
162
- snapLines: readonly import("../snapping").SnapLine[];
163
- originSnapOffset: {
164
- x: number;
165
- y: number;
166
- } | null;
167
- objectsSnapModeEnabled: boolean;
168
- userToFollow: import("../types").UserToFollow | null;
169
- followedBy: Set<import("../types").SocketId>;
170
- isCropping: boolean;
171
- croppingElementId: string | null;
172
- searchMatches: Readonly<{
173
- focusedId: string | null;
174
- matches: readonly import("../types").SearchMatch[];
175
- }> | null;
176
- activeLockedId: string | null;
177
- lockedMultiSelections: {
178
- [groupId: string]: true;
179
- };
180
- };
181
- } | {
182
- captureUpdate: "EVENTUALLY";
183
- appState?: undefined;
184
- }>;
185
- keyTest: undefined;
186
- } & {
187
- keyTest?: undefined;
188
- };
189
- export declare const actionPaste: {
190
- name: "paste";
191
- label: string;
192
- trackEvent: {
193
- category: "element";
194
- };
195
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, data: any, app: import("../types").AppClassProperties) => Promise<false | {
196
- captureUpdate: "EVENTUALLY";
197
- appState: {
198
- errorMessage: string;
199
- contextMenu: {
200
- items: import("../components/ContextMenu").ContextMenuItems;
201
- top: number;
202
- left: number;
203
- } | null;
204
- showWelcomeScreen: boolean;
205
- isLoading: boolean;
206
- activeEmbeddable: {
207
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
208
- state: "active" | "hover";
209
- } | null;
210
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
211
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
212
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
213
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
214
- isBindingEnabled: boolean;
215
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
216
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
217
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
218
- frameRendering: {
219
- enabled: boolean;
220
- name: boolean;
221
- outline: boolean;
222
- clip: boolean;
223
- };
224
- editingFrame: string | null;
225
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
226
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
227
- activeTool: {
228
- lastActiveTool: import("../types").ActiveTool | null;
229
- locked: boolean;
230
- fromSelection: boolean;
231
- } & import("../types").ActiveTool;
232
- penMode: boolean;
233
- penDetected: boolean;
234
- exportBackground: boolean;
235
- exportEmbedScene: boolean;
236
- exportWithDarkMode: boolean;
237
- exportScale: number;
238
- currentItemStrokeColor: string;
239
- currentItemBackgroundColor: string;
240
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
241
- currentItemStrokeWidth: number;
242
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
243
- currentItemRoughness: number;
244
- currentItemOpacity: number;
245
- currentItemFontFamily: number;
246
- currentItemFontSize: number;
247
- currentItemTextAlign: string;
248
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
249
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
250
- currentHoveredFontFamily: number | null;
251
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
252
- currentItemArrowType: "round" | "sharp" | "elbow";
253
- viewBackgroundColor: string;
254
- scrollX: number;
255
- scrollY: number;
256
- cursorButton: "up" | "down";
257
- scrolledOutside: boolean;
258
- name: string | null;
259
- isResizing: boolean;
260
- isRotating: boolean;
261
- zoom: Readonly<{
262
- value: import("../types").NormalizedZoomValue;
263
- }>;
264
- openMenu: "canvas" | "shape" | null;
265
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
266
- openSidebar: {
267
- name: string;
268
- tab?: string | undefined;
269
- } | null;
270
- openDialog: {
271
- name: "imageExport" | "help" | "jsonExport";
272
- } | {
273
- name: "ttd";
274
- tab: "mermaid" | "text-to-diagram";
275
- } | {
276
- name: "commandPalette";
277
- } | {
278
- name: "elementLinkSelector";
279
- sourceElementId: string;
280
- } | null;
281
- defaultSidebarDockedPreference: boolean;
282
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
283
- selectedElementIds: Readonly<{
284
- [id: string]: true;
285
- }>;
286
- hoveredElementIds: Readonly<{
287
- [id: string]: true;
288
- }>;
289
- previousSelectedElementIds: {
290
- [id: string]: true;
291
- };
292
- selectedElementsAreBeingDragged: boolean;
293
- shouldCacheIgnoreZoom: boolean;
294
- toast: {
295
- message: string;
296
- closable?: boolean | undefined;
297
- duration?: number | undefined;
298
- } | null;
299
- zenModeEnabled: boolean;
300
- theme: import("@excalidraw/element/types").Theme;
301
- gridSize: number;
302
- gridStep: number;
303
- gridModeEnabled: boolean;
304
- viewModeEnabled: boolean;
305
- selectedGroupIds: {
306
- [groupId: string]: boolean;
307
- };
308
- editingGroupId: string | null;
309
- width: number;
310
- height: number;
311
- offsetTop: number;
312
- offsetLeft: number;
313
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
314
- collaborators: Map<import("../types").SocketId, Readonly<{
315
- pointer?: import("../types").CollaboratorPointer | undefined;
316
- button?: "up" | "down" | undefined;
317
- selectedElementIds?: Readonly<{
318
- [id: string]: true;
319
- }> | undefined;
320
- username?: string | null | undefined;
321
- userState?: import("@excalidraw/common").UserIdleState | undefined;
322
- color?: {
323
- background: string;
324
- stroke: string;
325
- } | undefined;
326
- avatarUrl?: string | undefined;
327
- id?: string | undefined;
328
- socketId?: import("../types").SocketId | undefined;
329
- isCurrentUser?: boolean | undefined;
330
- isInCall?: boolean | undefined;
331
- isSpeaking?: boolean | undefined;
332
- isMuted?: boolean | undefined;
333
- }>>;
334
- stats: {
335
- open: boolean;
336
- panels: number;
337
- };
338
- currentChartType: import("@excalidraw/element/types").ChartType;
339
- pasteDialog: {
340
- shown: false;
341
- data: null;
342
- } | {
343
- shown: true;
344
- data: import("../charts").Spreadsheet;
345
- };
346
- showHyperlinkPopup: false | "editor" | "info";
347
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
348
- snapLines: readonly import("../snapping").SnapLine[];
349
- originSnapOffset: {
350
- x: number;
351
- y: number;
352
- } | null;
353
- objectsSnapModeEnabled: boolean;
354
- userToFollow: import("../types").UserToFollow | null;
355
- followedBy: Set<import("../types").SocketId>;
356
- isCropping: boolean;
357
- croppingElementId: string | null;
358
- searchMatches: Readonly<{
359
- focusedId: string | null;
360
- matches: readonly import("../types").SearchMatch[];
361
- }> | null;
362
- activeLockedId: string | null;
363
- lockedMultiSelections: {
364
- [groupId: string]: true;
365
- };
366
- };
367
- } | {
368
- captureUpdate: "EVENTUALLY";
369
- appState?: undefined;
370
- }>;
371
- keyTest: undefined;
372
- } & {
373
- keyTest?: undefined;
374
- };
375
- export declare const actionCut: {
376
- name: "cut";
377
- label: string;
378
- icon: import("react/jsx-runtime").JSX.Element;
379
- trackEvent: {
380
- category: "element";
381
- };
382
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, event: ClipboardEvent | null, app: import("../types").AppClassProperties) => false | {
383
- elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
384
- appState: {
385
- selectedLinearElement: null;
386
- contextMenu: {
387
- items: import("../components/ContextMenu").ContextMenuItems;
388
- top: number;
389
- left: number;
390
- } | null;
391
- showWelcomeScreen: boolean;
392
- isLoading: boolean;
393
- errorMessage: import("react").ReactNode;
394
- activeEmbeddable: {
395
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
396
- state: "active" | "hover";
397
- } | null;
398
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
399
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
400
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
401
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
402
- isBindingEnabled: boolean;
403
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
404
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
405
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
406
- frameRendering: {
407
- enabled: boolean;
408
- name: boolean;
409
- outline: boolean;
410
- clip: boolean;
411
- };
412
- editingFrame: string | null;
413
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
414
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
415
- activeTool: {
416
- lastActiveTool: import("../types").ActiveTool | null;
417
- locked: boolean;
418
- fromSelection: boolean;
419
- } & import("../types").ActiveTool;
420
- penMode: boolean;
421
- penDetected: boolean;
422
- exportBackground: boolean;
423
- exportEmbedScene: boolean;
424
- exportWithDarkMode: boolean;
425
- exportScale: number;
426
- currentItemStrokeColor: string;
427
- currentItemBackgroundColor: string;
428
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
429
- currentItemStrokeWidth: number;
430
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
431
- currentItemRoughness: number;
432
- currentItemOpacity: number;
433
- currentItemFontFamily: number;
434
- currentItemFontSize: number;
435
- currentItemTextAlign: string;
436
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
437
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
438
- currentHoveredFontFamily: number | null;
439
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
440
- currentItemArrowType: "round" | "sharp" | "elbow";
441
- viewBackgroundColor: string;
442
- scrollX: number;
443
- scrollY: number;
444
- cursorButton: "up" | "down";
445
- scrolledOutside: boolean;
446
- name: string | null;
447
- isResizing: boolean;
448
- isRotating: boolean;
449
- zoom: Readonly<{
450
- value: import("../types").NormalizedZoomValue;
451
- }>;
452
- openMenu: "canvas" | "shape" | null;
453
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
454
- openSidebar: {
455
- name: string;
456
- tab?: string | undefined;
457
- } | null;
458
- openDialog: {
459
- name: "imageExport" | "help" | "jsonExport";
460
- } | {
461
- name: "ttd";
462
- tab: "mermaid" | "text-to-diagram";
463
- } | {
464
- name: "commandPalette";
465
- } | {
466
- name: "elementLinkSelector";
467
- sourceElementId: string;
468
- } | null;
469
- defaultSidebarDockedPreference: boolean;
470
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
471
- selectedElementIds: Readonly<{
472
- [id: string]: true;
473
- }>;
474
- hoveredElementIds: Readonly<{
475
- [id: string]: true;
476
- }>;
477
- previousSelectedElementIds: {
478
- [id: string]: true;
479
- };
480
- selectedElementsAreBeingDragged: boolean;
481
- shouldCacheIgnoreZoom: boolean;
482
- toast: {
483
- message: string;
484
- closable?: boolean | undefined;
485
- duration?: number | undefined;
486
- } | null;
487
- zenModeEnabled: boolean;
488
- theme: import("@excalidraw/element/types").Theme;
489
- gridSize: number;
490
- gridStep: number;
491
- gridModeEnabled: boolean;
492
- viewModeEnabled: boolean;
493
- selectedGroupIds: {
494
- [groupId: string]: boolean;
495
- };
496
- editingGroupId: string | null;
497
- width: number;
498
- height: number;
499
- offsetTop: number;
500
- offsetLeft: number;
501
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
502
- collaborators: Map<import("../types").SocketId, Readonly<{
503
- pointer?: import("../types").CollaboratorPointer | undefined;
504
- button?: "up" | "down" | undefined;
505
- selectedElementIds?: Readonly<{
506
- [id: string]: true;
507
- }> | undefined;
508
- username?: string | null | undefined;
509
- userState?: import("@excalidraw/common").UserIdleState | undefined;
510
- color?: {
511
- background: string;
512
- stroke: string;
513
- } | undefined;
514
- avatarUrl?: string | undefined;
515
- id?: string | undefined;
516
- socketId?: import("../types").SocketId | undefined;
517
- isCurrentUser?: boolean | undefined;
518
- isInCall?: boolean | undefined;
519
- isSpeaking?: boolean | undefined;
520
- isMuted?: boolean | undefined;
521
- }>>;
522
- stats: {
523
- open: boolean;
524
- panels: number;
525
- };
526
- currentChartType: import("@excalidraw/element/types").ChartType;
527
- pasteDialog: {
528
- shown: false;
529
- data: null;
530
- } | {
531
- shown: true;
532
- data: import("../charts").Spreadsheet;
533
- };
534
- showHyperlinkPopup: false | "editor" | "info";
535
- snapLines: readonly import("../snapping").SnapLine[];
536
- originSnapOffset: {
537
- x: number;
538
- y: number;
539
- } | null;
540
- objectsSnapModeEnabled: boolean;
541
- userToFollow: import("../types").UserToFollow | null;
542
- followedBy: Set<import("../types").SocketId>;
543
- isCropping: boolean;
544
- croppingElementId: string | null;
545
- searchMatches: Readonly<{
546
- focusedId: string | null;
547
- matches: readonly import("../types").SearchMatch[];
548
- }> | null;
549
- activeLockedId: string | null;
550
- lockedMultiSelections: {
551
- [groupId: string]: true;
552
- };
553
- };
554
- captureUpdate: "IMMEDIATELY";
555
- } | {
556
- elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
1
+ export declare const actionCopy: import("./types").Action<ClipboardEvent | null> & {
2
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: import("../types").AppState, elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
3
+ };
4
+ export declare const actionPaste: {
5
+ name: "paste";
6
+ label: string;
7
+ trackEvent: {
8
+ category: "element";
9
+ };
10
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, data: unknown, app: import("../types").AppClassProperties) => Promise<false | {
11
+ captureUpdate: "EVENTUALLY";
557
12
  appState: {
558
- selectedLinearElement: {
559
- selectedPointsIndices: number[];
560
- startBindingElement: import("@excalidraw/element/types").ExcalidrawBindableElement | "keep" | null;
561
- endBindingElement: import("@excalidraw/element/types").ExcalidrawBindableElement | "keep" | null;
562
- elementId: string & {
563
- _brand: "excalidrawLinearElementId";
564
- };
565
- pointerDownState: Readonly<{
566
- prevSelectedPointsIndices: readonly number[] | null;
567
- lastClickedPoint: number;
568
- lastClickedIsEndPoint: boolean;
569
- origin: Readonly<{
570
- x: number;
571
- y: number;
572
- }> | null;
573
- segmentMidpoint: {
574
- value: import("../../math/src").GlobalPoint | null;
575
- index: number | null;
576
- added: boolean;
577
- };
578
- }>;
579
- isDragging: boolean;
580
- lastUncommittedPoint: import("../../math/src").LocalPoint | null;
581
- pointerOffset: Readonly<{
582
- x: number;
583
- y: number;
584
- }>;
585
- hoverPointIndex: number;
586
- segmentMidPointHoveredCoords: import("../../math/src").GlobalPoint | null;
587
- elbowed: boolean;
588
- customLineAngle: number | null;
589
- isEditing: boolean;
590
- };
13
+ errorMessage: string;
591
14
  contextMenu: {
592
15
  items: import("../components/ContextMenu").ContextMenuItems;
593
16
  top: number;
@@ -595,10 +18,9 @@ export declare const actionCut: {
595
18
  } | null;
596
19
  showWelcomeScreen: boolean;
597
20
  isLoading: boolean;
598
- errorMessage: import("react").ReactNode;
599
21
  activeEmbeddable: {
600
22
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
601
- state: "active" | "hover";
23
+ state: "hover" | "active";
602
24
  } | null;
603
25
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
604
26
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
@@ -606,7 +28,7 @@ export declare const actionCut: {
606
28
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
607
29
  isBindingEnabled: boolean;
608
30
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
609
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
31
+ suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
610
32
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
611
33
  frameRendering: {
612
34
  enabled: boolean;
@@ -622,6 +44,10 @@ export declare const actionCut: {
622
44
  locked: boolean;
623
45
  fromSelection: boolean;
624
46
  } & import("../types").ActiveTool;
47
+ preferredSelectionTool: {
48
+ type: "selection" | "lasso";
49
+ initialized: boolean;
50
+ };
625
51
  penMode: boolean;
626
52
  penDetected: boolean;
627
53
  exportBackground: boolean;
@@ -630,19 +56,19 @@ export declare const actionCut: {
630
56
  exportScale: number;
631
57
  currentItemStrokeColor: string;
632
58
  currentItemBackgroundColor: string;
633
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
59
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
634
60
  currentItemStrokeWidth: number;
635
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
61
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
636
62
  currentItemRoughness: number;
637
63
  currentItemOpacity: number;
638
- currentItemFontFamily: number;
64
+ currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
639
65
  currentItemFontSize: number;
640
- currentItemTextAlign: string;
66
+ currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
641
67
  currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
642
68
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
643
- currentHoveredFontFamily: number | null;
69
+ currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
644
70
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
645
- currentItemArrowType: "round" | "sharp" | "elbow";
71
+ currentItemArrowType: "sharp" | "round" | "elbow";
646
72
  viewBackgroundColor: string;
647
73
  scrollX: number;
648
74
  scrollY: number;
@@ -651,26 +77,26 @@ export declare const actionCut: {
651
77
  name: string | null;
652
78
  isResizing: boolean;
653
79
  isRotating: boolean;
654
- zoom: Readonly<{
655
- value: import("../types").NormalizedZoomValue;
656
- }>;
657
- openMenu: "canvas" | "shape" | null;
658
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
80
+ zoom: import("../types").Zoom;
81
+ openMenu: "canvas" | null;
82
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
659
83
  openSidebar: {
660
- name: string;
661
- tab?: string | undefined;
84
+ name: import("../types").SidebarName;
85
+ tab?: import("../types").SidebarTabName;
662
86
  } | null;
663
- openDialog: {
87
+ openDialog: null | {
664
88
  name: "imageExport" | "help" | "jsonExport";
665
89
  } | {
666
90
  name: "ttd";
667
- tab: "mermaid" | "text-to-diagram";
91
+ tab: "text-to-diagram" | "mermaid";
668
92
  } | {
669
93
  name: "commandPalette";
94
+ } | {
95
+ name: "settings";
670
96
  } | {
671
97
  name: "elementLinkSelector";
672
- sourceElementId: string;
673
- } | null;
98
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
99
+ };
674
100
  defaultSidebarDockedPreference: boolean;
675
101
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
676
102
  selectedElementIds: Readonly<{
@@ -686,8 +112,8 @@ export declare const actionCut: {
686
112
  shouldCacheIgnoreZoom: boolean;
687
113
  toast: {
688
114
  message: string;
689
- closable?: boolean | undefined;
690
- duration?: number | undefined;
115
+ closable?: boolean;
116
+ duration?: number;
691
117
  } | null;
692
118
  zenModeEnabled: boolean;
693
119
  theme: import("@excalidraw/element/types").Theme;
@@ -698,32 +124,13 @@ export declare const actionCut: {
698
124
  selectedGroupIds: {
699
125
  [groupId: string]: boolean;
700
126
  };
701
- editingGroupId: string | null;
127
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
702
128
  width: number;
703
129
  height: number;
704
130
  offsetTop: number;
705
131
  offsetLeft: number;
706
132
  fileHandle: import("browser-fs-access").FileSystemHandle | null;
707
- collaborators: Map<import("../types").SocketId, Readonly<{
708
- pointer?: import("../types").CollaboratorPointer | undefined;
709
- button?: "up" | "down" | undefined;
710
- selectedElementIds?: Readonly<{
711
- [id: string]: true;
712
- }> | undefined;
713
- username?: string | null | undefined;
714
- userState?: import("@excalidraw/common").UserIdleState | undefined;
715
- color?: {
716
- background: string;
717
- stroke: string;
718
- } | undefined;
719
- avatarUrl?: string | undefined;
720
- id?: string | undefined;
721
- socketId?: import("../types").SocketId | undefined;
722
- isCurrentUser?: boolean | undefined;
723
- isInCall?: boolean | undefined;
724
- isSpeaking?: boolean | undefined;
725
- isMuted?: boolean | undefined;
726
- }>>;
133
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
727
134
  stats: {
728
135
  open: boolean;
729
136
  panels: number;
@@ -736,7 +143,8 @@ export declare const actionCut: {
736
143
  shown: true;
737
144
  data: import("../charts").Spreadsheet;
738
145
  };
739
- showHyperlinkPopup: false | "editor" | "info";
146
+ showHyperlinkPopup: false | "info" | "editor";
147
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
740
148
  snapLines: readonly import("../snapping").SnapLine[];
741
149
  originSnapOffset: {
742
150
  x: number;
@@ -746,191 +154,27 @@ export declare const actionCut: {
746
154
  userToFollow: import("../types").UserToFollow | null;
747
155
  followedBy: Set<import("../types").SocketId>;
748
156
  isCropping: boolean;
749
- croppingElementId: string | null;
157
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
750
158
  searchMatches: Readonly<{
751
- focusedId: string | null;
159
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
752
160
  matches: readonly import("../types").SearchMatch[];
753
161
  }> | null;
754
162
  activeLockedId: string | null;
755
163
  lockedMultiSelections: {
756
164
  [groupId: string]: true;
757
165
  };
166
+ bindMode: import("@excalidraw/element/types").BindMode;
758
167
  };
759
- captureUpdate: "IMMEDIATELY";
760
168
  } | {
761
- elements: import("@excalidraw/element/types").ExcalidrawElement[];
762
- appState: {
763
- activeTool: {
764
- lastActiveTool: import("../types").ActiveTool | null;
765
- locked: boolean;
766
- fromSelection: boolean;
767
- } & import("../types").ActiveTool;
768
- multiElement: null;
769
- activeEmbeddable: null;
770
- selectedLinearElement: null;
771
- editingGroupId: string | null;
772
- selectedElementIds: Readonly<{
773
- [id: string]: true;
774
- }>;
775
- selectedGroupIds: {
776
- [groupId: string]: boolean;
777
- };
778
- contextMenu: {
779
- items: import("../components/ContextMenu").ContextMenuItems;
780
- top: number;
781
- left: number;
782
- } | null;
783
- showWelcomeScreen: boolean;
784
- isLoading: boolean;
785
- errorMessage: import("react").ReactNode;
786
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
787
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
788
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
789
- isBindingEnabled: boolean;
790
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
791
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
792
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
793
- frameRendering: {
794
- enabled: boolean;
795
- name: boolean;
796
- outline: boolean;
797
- clip: boolean;
798
- };
799
- editingFrame: string | null;
800
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
801
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
802
- penMode: boolean;
803
- penDetected: boolean;
804
- exportBackground: boolean;
805
- exportEmbedScene: boolean;
806
- exportWithDarkMode: boolean;
807
- exportScale: number;
808
- currentItemStrokeColor: string;
809
- currentItemBackgroundColor: string;
810
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
811
- currentItemStrokeWidth: number;
812
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
813
- currentItemRoughness: number;
814
- currentItemOpacity: number;
815
- currentItemFontFamily: number;
816
- currentItemFontSize: number;
817
- currentItemTextAlign: string;
818
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
819
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
820
- currentHoveredFontFamily: number | null;
821
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
822
- currentItemArrowType: "round" | "sharp" | "elbow";
823
- viewBackgroundColor: string;
824
- scrollX: number;
825
- scrollY: number;
826
- cursorButton: "up" | "down";
827
- scrolledOutside: boolean;
828
- name: string | null;
829
- isResizing: boolean;
830
- isRotating: boolean;
831
- zoom: Readonly<{
832
- value: import("../types").NormalizedZoomValue;
833
- }>;
834
- openMenu: "canvas" | "shape" | null;
835
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
836
- openSidebar: {
837
- name: string;
838
- tab?: string | undefined;
839
- } | null;
840
- openDialog: {
841
- name: "imageExport" | "help" | "jsonExport";
842
- } | {
843
- name: "ttd";
844
- tab: "mermaid" | "text-to-diagram";
845
- } | {
846
- name: "commandPalette";
847
- } | {
848
- name: "elementLinkSelector";
849
- sourceElementId: string;
850
- } | null;
851
- defaultSidebarDockedPreference: boolean;
852
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
853
- hoveredElementIds: Readonly<{
854
- [id: string]: true;
855
- }>;
856
- previousSelectedElementIds: {
857
- [id: string]: true;
858
- };
859
- selectedElementsAreBeingDragged: boolean;
860
- shouldCacheIgnoreZoom: boolean;
861
- toast: {
862
- message: string;
863
- closable?: boolean | undefined;
864
- duration?: number | undefined;
865
- } | null;
866
- zenModeEnabled: boolean;
867
- theme: import("@excalidraw/element/types").Theme;
868
- gridSize: number;
869
- gridStep: number;
870
- gridModeEnabled: boolean;
871
- viewModeEnabled: boolean;
872
- width: number;
873
- height: number;
874
- offsetTop: number;
875
- offsetLeft: number;
876
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
877
- collaborators: Map<import("../types").SocketId, Readonly<{
878
- pointer?: import("../types").CollaboratorPointer | undefined;
879
- button?: "up" | "down" | undefined;
880
- selectedElementIds?: Readonly<{
881
- [id: string]: true;
882
- }> | undefined;
883
- username?: string | null | undefined;
884
- userState?: import("@excalidraw/common").UserIdleState | undefined;
885
- color?: {
886
- background: string;
887
- stroke: string;
888
- } | undefined;
889
- avatarUrl?: string | undefined;
890
- id?: string | undefined;
891
- socketId?: import("../types").SocketId | undefined;
892
- isCurrentUser?: boolean | undefined;
893
- isInCall?: boolean | undefined;
894
- isSpeaking?: boolean | undefined;
895
- isMuted?: boolean | undefined;
896
- }>>;
897
- stats: {
898
- open: boolean;
899
- panels: number;
900
- };
901
- currentChartType: import("@excalidraw/element/types").ChartType;
902
- pasteDialog: {
903
- shown: false;
904
- data: null;
905
- } | {
906
- shown: true;
907
- data: import("../charts").Spreadsheet;
908
- };
909
- showHyperlinkPopup: false | "editor" | "info";
910
- snapLines: readonly import("../snapping").SnapLine[];
911
- originSnapOffset: {
912
- x: number;
913
- y: number;
914
- } | null;
915
- objectsSnapModeEnabled: boolean;
916
- userToFollow: import("../types").UserToFollow | null;
917
- followedBy: Set<import("../types").SocketId>;
918
- isCropping: boolean;
919
- croppingElementId: string | null;
920
- searchMatches: Readonly<{
921
- focusedId: string | null;
922
- matches: readonly import("../types").SearchMatch[];
923
- }> | null;
924
- activeLockedId: string | null;
925
- lockedMultiSelections: {
926
- [groupId: string]: true;
927
- };
928
- };
929
- captureUpdate: "IMMEDIATELY" | "EVENTUALLY";
930
- };
931
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
169
+ captureUpdate: "EVENTUALLY";
170
+ appState?: undefined;
171
+ }>;
172
+ keyTest: undefined;
932
173
  } & {
933
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
174
+ keyTest?: undefined;
175
+ };
176
+ export declare const actionCut: import("./types").Action<ClipboardEvent | null> & {
177
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: import("../types").AppState, elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
934
178
  };
935
179
  export declare const actionCopyAsSvg: {
936
180
  name: "copyAsSvg";
@@ -939,7 +183,7 @@ export declare const actionCopyAsSvg: {
939
183
  trackEvent: {
940
184
  category: "element";
941
185
  };
942
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _data: any, app: import("../types").AppClassProperties) => Promise<{
186
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _data: unknown, app: import("../types").AppClassProperties) => Promise<{
943
187
  captureUpdate: "EVENTUALLY";
944
188
  appState?: undefined;
945
189
  } | {
@@ -969,7 +213,7 @@ export declare const actionCopyAsPng: {
969
213
  trackEvent: {
970
214
  category: "element";
971
215
  };
972
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _data: any, app: import("../types").AppClassProperties) => Promise<{
216
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _data: unknown, app: import("../types").AppClassProperties) => Promise<{
973
217
  captureUpdate: "EVENTUALLY";
974
218
  appState?: undefined;
975
219
  } | {
@@ -984,7 +228,7 @@ export declare const actionCopyAsPng: {
984
228
  isLoading: boolean;
985
229
  activeEmbeddable: {
986
230
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
987
- state: "active" | "hover";
231
+ state: "hover" | "active";
988
232
  } | null;
989
233
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
990
234
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
@@ -992,7 +236,7 @@ export declare const actionCopyAsPng: {
992
236
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
993
237
  isBindingEnabled: boolean;
994
238
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
995
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
239
+ suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
996
240
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
997
241
  frameRendering: {
998
242
  enabled: boolean;
@@ -1008,6 +252,10 @@ export declare const actionCopyAsPng: {
1008
252
  locked: boolean;
1009
253
  fromSelection: boolean;
1010
254
  } & import("../types").ActiveTool;
255
+ preferredSelectionTool: {
256
+ type: "selection" | "lasso";
257
+ initialized: boolean;
258
+ };
1011
259
  penMode: boolean;
1012
260
  penDetected: boolean;
1013
261
  exportBackground: boolean;
@@ -1016,19 +264,19 @@ export declare const actionCopyAsPng: {
1016
264
  exportScale: number;
1017
265
  currentItemStrokeColor: string;
1018
266
  currentItemBackgroundColor: string;
1019
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
267
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
1020
268
  currentItemStrokeWidth: number;
1021
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
269
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
1022
270
  currentItemRoughness: number;
1023
271
  currentItemOpacity: number;
1024
- currentItemFontFamily: number;
272
+ currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
1025
273
  currentItemFontSize: number;
1026
- currentItemTextAlign: string;
274
+ currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
1027
275
  currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
1028
276
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
1029
- currentHoveredFontFamily: number | null;
277
+ currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
1030
278
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
1031
- currentItemArrowType: "round" | "sharp" | "elbow";
279
+ currentItemArrowType: "sharp" | "round" | "elbow";
1032
280
  viewBackgroundColor: string;
1033
281
  scrollX: number;
1034
282
  scrollY: number;
@@ -1037,26 +285,26 @@ export declare const actionCopyAsPng: {
1037
285
  name: string | null;
1038
286
  isResizing: boolean;
1039
287
  isRotating: boolean;
1040
- zoom: Readonly<{
1041
- value: import("../types").NormalizedZoomValue;
1042
- }>;
1043
- openMenu: "canvas" | "shape" | null;
1044
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
288
+ zoom: import("../types").Zoom;
289
+ openMenu: "canvas" | null;
290
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
1045
291
  openSidebar: {
1046
- name: string;
1047
- tab?: string | undefined;
292
+ name: import("../types").SidebarName;
293
+ tab?: import("../types").SidebarTabName;
1048
294
  } | null;
1049
- openDialog: {
295
+ openDialog: null | {
1050
296
  name: "imageExport" | "help" | "jsonExport";
1051
297
  } | {
1052
298
  name: "ttd";
1053
- tab: "mermaid" | "text-to-diagram";
299
+ tab: "text-to-diagram" | "mermaid";
1054
300
  } | {
1055
301
  name: "commandPalette";
302
+ } | {
303
+ name: "settings";
1056
304
  } | {
1057
305
  name: "elementLinkSelector";
1058
- sourceElementId: string;
1059
- } | null;
306
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
307
+ };
1060
308
  defaultSidebarDockedPreference: boolean;
1061
309
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
1062
310
  selectedElementIds: Readonly<{
@@ -1072,8 +320,8 @@ export declare const actionCopyAsPng: {
1072
320
  shouldCacheIgnoreZoom: boolean;
1073
321
  toast: {
1074
322
  message: string;
1075
- closable?: boolean | undefined;
1076
- duration?: number | undefined;
323
+ closable?: boolean;
324
+ duration?: number;
1077
325
  } | null;
1078
326
  zenModeEnabled: boolean;
1079
327
  theme: import("@excalidraw/element/types").Theme;
@@ -1084,32 +332,13 @@ export declare const actionCopyAsPng: {
1084
332
  selectedGroupIds: {
1085
333
  [groupId: string]: boolean;
1086
334
  };
1087
- editingGroupId: string | null;
335
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
1088
336
  width: number;
1089
337
  height: number;
1090
338
  offsetTop: number;
1091
339
  offsetLeft: number;
1092
340
  fileHandle: import("browser-fs-access").FileSystemHandle | null;
1093
- collaborators: Map<import("../types").SocketId, Readonly<{
1094
- pointer?: import("../types").CollaboratorPointer | undefined;
1095
- button?: "up" | "down" | undefined;
1096
- selectedElementIds?: Readonly<{
1097
- [id: string]: true;
1098
- }> | undefined;
1099
- username?: string | null | undefined;
1100
- userState?: import("@excalidraw/common").UserIdleState | undefined;
1101
- color?: {
1102
- background: string;
1103
- stroke: string;
1104
- } | undefined;
1105
- avatarUrl?: string | undefined;
1106
- id?: string | undefined;
1107
- socketId?: import("../types").SocketId | undefined;
1108
- isCurrentUser?: boolean | undefined;
1109
- isInCall?: boolean | undefined;
1110
- isSpeaking?: boolean | undefined;
1111
- isMuted?: boolean | undefined;
1112
- }>>;
341
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
1113
342
  stats: {
1114
343
  open: boolean;
1115
344
  panels: number;
@@ -1122,7 +351,7 @@ export declare const actionCopyAsPng: {
1122
351
  shown: true;
1123
352
  data: import("../charts").Spreadsheet;
1124
353
  };
1125
- showHyperlinkPopup: false | "editor" | "info";
354
+ showHyperlinkPopup: false | "info" | "editor";
1126
355
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
1127
356
  snapLines: readonly import("../snapping").SnapLine[];
1128
357
  originSnapOffset: {
@@ -1133,15 +362,16 @@ export declare const actionCopyAsPng: {
1133
362
  userToFollow: import("../types").UserToFollow | null;
1134
363
  followedBy: Set<import("../types").SocketId>;
1135
364
  isCropping: boolean;
1136
- croppingElementId: string | null;
365
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
1137
366
  searchMatches: Readonly<{
1138
- focusedId: string | null;
367
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
1139
368
  matches: readonly import("../types").SearchMatch[];
1140
369
  }> | null;
1141
370
  activeLockedId: string | null;
1142
371
  lockedMultiSelections: {
1143
372
  [groupId: string]: true;
1144
373
  };
374
+ bindMode: import("@excalidraw/element/types").BindMode;
1145
375
  };
1146
376
  captureUpdate: "EVENTUALLY";
1147
377
  }>;
@@ -1157,7 +387,7 @@ export declare const copyText: {
1157
387
  trackEvent: {
1158
388
  category: "element";
1159
389
  };
1160
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: import("../types").AppClassProperties) => {
390
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: unknown, app: import("../types").AppClassProperties) => {
1161
391
  captureUpdate: "EVENTUALLY";
1162
392
  };
1163
393
  predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, _: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;