@excalidraw/common 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 (226) hide show
  1. package/dist/dev/index.js +1346 -239
  2. package/dist/dev/index.js.map +4 -4
  3. package/dist/prod/index.js +3 -3
  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 +34 -27
  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 +50 -35
  13. package/dist/types/element/src/Scene.d.ts +10 -6
  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 +7 -3
  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/zindex.d.ts +7 -1
  44. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +138 -181
  45. package/dist/types/excalidraw/actions/actionAlign.d.ts +6 -7
  46. package/dist/types/excalidraw/actions/actionBoundText.d.ts +67 -96
  47. package/dist/types/excalidraw/actions/actionCanvas.d.ts +402 -758
  48. package/dist/types/excalidraw/actions/actionClipboard.d.ts +103 -873
  49. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +32 -47
  50. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +110 -159
  51. package/dist/types/excalidraw/actions/actionDistribute.d.ts +2 -3
  52. package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +3 -4
  53. package/dist/types/excalidraw/actions/actionElementLink.d.ts +47 -64
  54. package/dist/types/excalidraw/actions/actionElementLock.d.ts +66 -95
  55. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +49 -64
  56. package/dist/types/excalidraw/actions/actionExport.d.ts +144 -1104
  57. package/dist/types/excalidraw/actions/actionFinalize.d.ts +10 -394
  58. package/dist/types/excalidraw/actions/actionFlip.d.ts +2 -3
  59. package/dist/types/excalidraw/actions/actionFrame.d.ts +252 -347
  60. package/dist/types/excalidraw/actions/actionGroup.d.ts +70 -107
  61. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +165 -220
  62. package/dist/types/excalidraw/actions/actionLink.d.ts +49 -64
  63. package/dist/types/excalidraw/actions/actionMenu.d.ts +42 -425
  64. package/dist/types/excalidraw/actions/actionNavigate.d.ts +18 -359
  65. package/dist/types/excalidraw/actions/actionProperties.d.ts +129 -2488
  66. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +35 -54
  67. package/dist/types/excalidraw/actions/actionStyles.d.ts +32 -47
  68. package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +3 -3
  69. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +49 -64
  70. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +49 -64
  71. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +41 -58
  72. package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +1 -1
  73. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +48 -63
  74. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +49 -64
  75. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +49 -64
  76. package/dist/types/excalidraw/actions/actionZindex.d.ts +8 -9
  77. package/dist/types/excalidraw/actions/index.d.ts +2 -2
  78. package/dist/types/excalidraw/actions/register.d.ts +2 -2
  79. package/dist/types/excalidraw/actions/types.d.ts +4 -4
  80. package/dist/types/excalidraw/appState.d.ts +20 -15
  81. package/dist/types/excalidraw/clipboard.d.ts +55 -16
  82. package/dist/types/excalidraw/components/Actions.d.ts +22 -5
  83. package/dist/types/excalidraw/components/App.d.ts +67 -65
  84. package/dist/types/excalidraw/components/Card.d.ts +1 -3
  85. package/dist/types/excalidraw/components/ColorPicker/ColorInput.d.ts +2 -4
  86. package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +0 -1
  87. package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +2 -0
  88. package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +2 -1
  89. package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +2 -1
  90. package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +0 -1
  91. package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +0 -1
  92. package/dist/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +1 -0
  93. package/dist/types/excalidraw/components/CommandPalette/types.d.ts +1 -3
  94. package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +2 -2
  95. package/dist/types/excalidraw/components/DarkModeToggle.d.ts +1 -1
  96. package/dist/types/excalidraw/components/DefaultSidebar.d.ts +9 -13
  97. package/dist/types/excalidraw/components/ElementLinkDialog.d.ts +1 -1
  98. package/dist/types/excalidraw/components/Ellipsify.d.ts +1 -2
  99. package/dist/types/excalidraw/components/ErrorDialog.d.ts +1 -1
  100. package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +1 -2
  101. package/dist/types/excalidraw/components/EyeDropper.d.ts +0 -1
  102. package/dist/types/excalidraw/components/FilledButton.d.ts +2 -1
  103. package/dist/types/excalidraw/components/FontPicker/FontPicker.d.ts +2 -1
  104. package/dist/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +3 -1
  105. package/dist/types/excalidraw/components/FontPicker/keyboardNavHandlers.d.ts +0 -1
  106. package/dist/types/excalidraw/components/HelpDialog.d.ts +1 -1
  107. package/dist/types/excalidraw/components/HintViewer.d.ts +4 -3
  108. package/dist/types/excalidraw/components/InlineIcon.d.ts +3 -1
  109. package/dist/types/excalidraw/components/LayerUI.d.ts +2 -1
  110. package/dist/types/excalidraw/components/LibraryMenuControlButtons.d.ts +1 -1
  111. package/dist/types/excalidraw/components/LibraryMenuHeaderContent.d.ts +1 -2
  112. package/dist/types/excalidraw/components/LibraryMenuSection.d.ts +1 -1
  113. package/dist/types/excalidraw/components/LibraryUnit.d.ts +2 -3
  114. package/dist/types/excalidraw/components/LoadingMessage.d.ts +0 -1
  115. package/dist/types/excalidraw/components/MobileMenu.d.ts +3 -5
  116. package/dist/types/excalidraw/components/MobileToolBar.d.ts +10 -0
  117. package/dist/types/excalidraw/components/Modal.d.ts +0 -1
  118. package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirm.d.ts +1 -1
  119. package/dist/types/excalidraw/components/Popover.d.ts +2 -1
  120. package/dist/types/excalidraw/components/PropertiesPopover.d.ts +1 -0
  121. package/dist/types/excalidraw/components/RadioGroup.d.ts +0 -1
  122. package/dist/types/excalidraw/components/RadioSelection.d.ts +4 -4
  123. package/dist/types/excalidraw/components/ScrollableList.d.ts +0 -1
  124. package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +15 -21
  125. package/dist/types/excalidraw/components/Sidebar/SidebarHeader.d.ts +1 -1
  126. package/dist/types/excalidraw/components/Sidebar/SidebarTab.d.ts +1 -2
  127. package/dist/types/excalidraw/components/Sidebar/SidebarTabTrigger.d.ts +1 -2
  128. package/dist/types/excalidraw/components/Sidebar/SidebarTabTriggers.d.ts +1 -2
  129. package/dist/types/excalidraw/components/Sidebar/SidebarTabs.d.ts +1 -2
  130. package/dist/types/excalidraw/components/Spinner.d.ts +4 -4
  131. package/dist/types/excalidraw/components/Stats/CanvasGrid.d.ts +0 -1
  132. package/dist/types/excalidraw/components/Stats/Collapsible.d.ts +0 -1
  133. package/dist/types/excalidraw/components/Stats/DragInput.d.ts +0 -1
  134. package/dist/types/excalidraw/components/Stats/index.d.ts +7 -8
  135. package/dist/types/excalidraw/components/Stats/utils.d.ts +1 -1
  136. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatHistoryMenu.d.ts +15 -0
  137. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatInterface.d.ts +27 -0
  138. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatMessage.d.ts +14 -0
  139. package/dist/types/excalidraw/components/TTDDialog/Chat/TTDChatPanel.d.ts +26 -0
  140. package/dist/types/excalidraw/components/TTDDialog/Chat/index.d.ts +3 -0
  141. package/dist/types/excalidraw/components/TTDDialog/Chat/useChatAgent.d.ts +8 -0
  142. package/dist/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +3 -2
  143. package/dist/types/excalidraw/components/TTDDialog/TTDContext.d.ts +13 -0
  144. package/dist/types/excalidraw/components/TTDDialog/TTDDialog.d.ts +4 -25
  145. package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +2 -2
  146. package/dist/types/excalidraw/components/TTDDialog/TTDDialogPanel.d.ts +13 -9
  147. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTab.d.ts +1 -2
  148. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTrigger.d.ts +1 -2
  149. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTriggers.d.ts +1 -2
  150. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +2 -3
  151. package/dist/types/excalidraw/components/TTDDialog/TTDPreviewPanel.d.ts +9 -0
  152. package/dist/types/excalidraw/components/TTDDialog/TextToDiagram.d.ts +8 -0
  153. package/dist/types/excalidraw/components/TTDDialog/common.d.ts +16 -16
  154. package/dist/types/excalidraw/components/TTDDialog/hooks/useChatManagement.d.ts +13 -0
  155. package/dist/types/excalidraw/components/TTDDialog/hooks/useMermaidRenderer.d.ts +14 -0
  156. package/dist/types/excalidraw/components/TTDDialog/hooks/useTextGeneration.d.ts +7 -0
  157. package/dist/types/excalidraw/components/TTDDialog/types.d.ts +91 -0
  158. package/dist/types/excalidraw/components/TTDDialog/useTTDChatStorage.d.ts +22 -0
  159. package/dist/types/excalidraw/components/TTDDialog/utils/TTDStreamFetch.d.ts +24 -0
  160. package/dist/types/excalidraw/components/TTDDialog/utils/chat.d.ts +10 -0
  161. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidValidation.d.ts +1 -0
  162. package/dist/types/excalidraw/components/TextField.d.ts +1 -0
  163. package/dist/types/excalidraw/components/Toast.d.ts +3 -3
  164. package/dist/types/excalidraw/components/ToolPopover.d.ts +25 -0
  165. package/dist/types/excalidraw/components/Trans.d.ts +2 -2
  166. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +6 -3
  167. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +30 -32
  168. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +6 -5
  169. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuGroup.d.ts +3 -3
  170. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +10 -18
  171. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContent.d.ts +3 -3
  172. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +0 -1
  173. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCustom.d.ts +2 -2
  174. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemLink.d.ts +6 -6
  175. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuTrigger.d.ts +3 -4
  176. package/dist/types/excalidraw/components/dropdownMenu/common.d.ts +1 -1
  177. package/dist/types/excalidraw/components/hoc/withInternalFallback.d.ts +1 -1
  178. package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +1 -1
  179. package/dist/types/excalidraw/components/icons.d.ts +26 -12
  180. package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +4 -3
  181. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +2 -2
  182. package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +25 -30
  183. package/dist/types/excalidraw/components/shapes.d.ts +129 -1
  184. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +6 -6
  185. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +15 -16
  186. package/dist/types/excalidraw/data/blob.d.ts +324 -10
  187. package/dist/types/excalidraw/data/encode.d.ts +4 -4
  188. package/dist/types/excalidraw/data/encryption.d.ts +5 -5
  189. package/dist/types/excalidraw/data/filesystem.d.ts +2 -2
  190. package/dist/types/excalidraw/data/index.d.ts +3 -3
  191. package/dist/types/excalidraw/data/json.d.ts +159 -2
  192. package/dist/types/excalidraw/data/library.d.ts +24 -9
  193. package/dist/types/excalidraw/data/restore.d.ts +27 -7
  194. package/dist/types/excalidraw/data/types.d.ts +4 -1
  195. package/dist/types/excalidraw/editor-jotai.d.ts +11 -11
  196. package/dist/types/excalidraw/errors.d.ts +14 -0
  197. package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
  198. package/dist/types/excalidraw/hooks/useOutsideClick.d.ts +4 -3
  199. package/dist/types/excalidraw/hooks/useScrollPosition.d.ts +1 -2
  200. package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +14 -0
  201. package/dist/types/excalidraw/i18n.d.ts +2 -2
  202. package/dist/types/excalidraw/index.d.ts +6 -7
  203. package/dist/types/excalidraw/renderer/animation.d.ts +12 -0
  204. package/dist/types/excalidraw/renderer/helpers.d.ts +6 -8
  205. package/dist/types/excalidraw/renderer/interactiveScene.d.ts +8 -14
  206. package/dist/types/excalidraw/scene/Renderer.d.ts +5 -2
  207. package/dist/types/excalidraw/scene/export.d.ts +2 -2
  208. package/dist/types/excalidraw/scene/scroll.d.ts +1 -6
  209. package/dist/types/excalidraw/scene/types.d.ts +22 -5
  210. package/dist/types/excalidraw/shortcut.d.ts +1 -0
  211. package/dist/types/excalidraw/snapping.d.ts +5 -5
  212. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-bindings.d.ts +1 -1
  213. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-loader.d.ts +1 -1
  214. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-wasm.d.ts +1 -1
  215. package/dist/types/excalidraw/subset/woff2/woff2-loader.d.ts +2 -2
  216. package/dist/types/excalidraw/subset/woff2/woff2-wasm.d.ts +1 -1
  217. package/dist/types/excalidraw/types.d.ts +32 -20
  218. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +2 -2
  219. package/dist/types/math/src/polygon.d.ts +2 -2
  220. package/dist/types/math/src/range.d.ts +1 -3
  221. package/dist/types/math/src/segment.d.ts +4 -3
  222. package/dist/types/utils/src/bbox.d.ts +1 -1
  223. package/dist/types/utils/src/export.d.ts +5 -5
  224. package/dist/types/utils/src/shape.d.ts +6 -6
  225. package/dist/types/utils/src/withinBounds.d.ts +2 -2
  226. package/package.json +7 -1
@@ -1,370 +1,3 @@
1
- /// <reference types="react" />
2
- export declare const actionToggleCanvasMenu: {
3
- name: "toggleCanvasMenu";
4
- label: string;
5
- trackEvent: {
6
- category: "menu";
7
- };
8
- perform: (_: readonly import("../../element/src/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
9
- appState: {
10
- openMenu: "canvas" | null;
11
- contextMenu: {
12
- items: import("../components/ContextMenu").ContextMenuItems;
13
- top: number;
14
- left: number;
15
- } | null;
16
- showWelcomeScreen: boolean;
17
- isLoading: boolean;
18
- errorMessage: import("react").ReactNode;
19
- activeEmbeddable: {
20
- element: import("../../element/src/types").NonDeletedExcalidrawElement;
21
- state: "active" | "hover";
22
- } | null;
23
- newElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawNonSelectionElement> | null;
24
- resizingElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
25
- multiElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawLinearElement> | null;
26
- selectionElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
27
- isBindingEnabled: boolean;
28
- startBoundElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawBindableElement> | null;
29
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
30
- frameToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawFrameLikeElement> | null;
31
- frameRendering: {
32
- enabled: boolean;
33
- name: boolean;
34
- outline: boolean;
35
- clip: boolean;
36
- };
37
- editingFrame: string | null;
38
- elementsToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawElement>[] | null;
39
- editingTextElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
40
- activeTool: {
41
- lastActiveTool: import("../types").ActiveTool | null;
42
- locked: boolean;
43
- fromSelection: boolean;
44
- } & import("../types").ActiveTool;
45
- penMode: boolean;
46
- penDetected: boolean;
47
- exportBackground: boolean;
48
- exportEmbedScene: boolean;
49
- exportWithDarkMode: boolean;
50
- exportScale: number;
51
- currentItemStrokeColor: string;
52
- currentItemBackgroundColor: string;
53
- currentItemFillStyle: import("../../element/src/types").FillStyle;
54
- currentItemStrokeWidth: number;
55
- currentItemStrokeStyle: import("../../element/src/types").StrokeStyle;
56
- currentItemRoughness: number;
57
- currentItemOpacity: number;
58
- currentItemFontFamily: number;
59
- currentItemFontSize: number;
60
- currentItemTextAlign: string;
61
- currentItemStartArrowhead: import("../../element/src/types").Arrowhead | null;
62
- currentItemEndArrowhead: import("../../element/src/types").Arrowhead | null;
63
- currentHoveredFontFamily: number | null;
64
- currentItemRoundness: import("../../element/src/types").StrokeRoundness;
65
- currentItemArrowType: "round" | "sharp" | "elbow";
66
- viewBackgroundColor: string;
67
- scrollX: number;
68
- scrollY: number;
69
- cursorButton: "up" | "down";
70
- scrolledOutside: boolean;
71
- name: string | null;
72
- isResizing: boolean;
73
- isRotating: boolean;
74
- zoom: Readonly<{
75
- value: import("../types").NormalizedZoomValue;
76
- }>;
77
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
78
- openSidebar: {
79
- name: string;
80
- tab?: string | undefined;
81
- } | null;
82
- openDialog: {
83
- name: "imageExport" | "help" | "jsonExport";
84
- } | {
85
- name: "ttd";
86
- tab: "mermaid" | "text-to-diagram";
87
- } | {
88
- name: "commandPalette";
89
- } | {
90
- name: "elementLinkSelector";
91
- sourceElementId: string;
92
- } | null;
93
- defaultSidebarDockedPreference: boolean;
94
- lastPointerDownWith: import("../../element/src/types").PointerType;
95
- selectedElementIds: Readonly<{
96
- [id: string]: true;
97
- }>;
98
- hoveredElementIds: Readonly<{
99
- [id: string]: true;
100
- }>;
101
- previousSelectedElementIds: {
102
- [id: string]: true;
103
- };
104
- selectedElementsAreBeingDragged: boolean;
105
- shouldCacheIgnoreZoom: boolean;
106
- toast: {
107
- message: string;
108
- closable?: boolean | undefined;
109
- duration?: number | undefined;
110
- } | null;
111
- zenModeEnabled: boolean;
112
- theme: import("../../element/src/types").Theme;
113
- gridSize: number;
114
- gridStep: number;
115
- gridModeEnabled: boolean;
116
- viewModeEnabled: boolean;
117
- selectedGroupIds: {
118
- [groupId: string]: boolean;
119
- };
120
- editingGroupId: string | null;
121
- width: number;
122
- height: number;
123
- offsetTop: number;
124
- offsetLeft: number;
125
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
126
- collaborators: Map<import("../types").SocketId, Readonly<{
127
- pointer?: import("../types").CollaboratorPointer | undefined;
128
- button?: "up" | "down" | undefined;
129
- selectedElementIds?: Readonly<{
130
- [id: string]: true;
131
- }> | undefined;
132
- username?: string | null | undefined;
133
- userState?: import("@excalidraw/common").UserIdleState | undefined;
134
- color?: {
135
- background: string;
136
- stroke: string;
137
- } | undefined;
138
- avatarUrl?: string | undefined;
139
- id?: string | undefined;
140
- socketId?: import("../types").SocketId | undefined;
141
- isCurrentUser?: boolean | undefined;
142
- isInCall?: boolean | undefined;
143
- isSpeaking?: boolean | undefined;
144
- isMuted?: boolean | undefined;
145
- }>>;
146
- stats: {
147
- open: boolean;
148
- panels: number;
149
- };
150
- currentChartType: import("../../element/src/types").ChartType;
151
- pasteDialog: {
152
- shown: false;
153
- data: null;
154
- } | {
155
- shown: true;
156
- data: import("../charts").Spreadsheet;
157
- };
158
- showHyperlinkPopup: false | "editor" | "info";
159
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
160
- snapLines: readonly import("../snapping").SnapLine[];
161
- originSnapOffset: {
162
- x: number;
163
- y: number;
164
- } | null;
165
- objectsSnapModeEnabled: boolean;
166
- userToFollow: import("../types").UserToFollow | null;
167
- followedBy: Set<import("../types").SocketId>;
168
- isCropping: boolean;
169
- croppingElementId: string | null;
170
- searchMatches: Readonly<{
171
- focusedId: string | null;
172
- matches: readonly import("../types").SearchMatch[];
173
- }> | null;
174
- activeLockedId: string | null;
175
- lockedMultiSelections: {
176
- [groupId: string]: true;
177
- };
178
- };
179
- captureUpdate: "EVENTUALLY";
180
- };
181
- PanelComponent: ({ appState, updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
182
- } & {
183
- keyTest?: undefined;
184
- };
185
- export declare const actionToggleEditMenu: {
186
- name: "toggleEditMenu";
187
- label: string;
188
- trackEvent: {
189
- category: "menu";
190
- };
191
- perform: (_elements: readonly import("../../element/src/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
192
- appState: {
193
- openMenu: "shape" | null;
194
- contextMenu: {
195
- items: import("../components/ContextMenu").ContextMenuItems;
196
- top: number;
197
- left: number;
198
- } | null;
199
- showWelcomeScreen: boolean;
200
- isLoading: boolean;
201
- errorMessage: import("react").ReactNode;
202
- activeEmbeddable: {
203
- element: import("../../element/src/types").NonDeletedExcalidrawElement;
204
- state: "active" | "hover";
205
- } | null;
206
- newElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawNonSelectionElement> | null;
207
- resizingElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
208
- multiElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawLinearElement> | null;
209
- selectionElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
210
- isBindingEnabled: boolean;
211
- startBoundElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawBindableElement> | null;
212
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
213
- frameToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawFrameLikeElement> | null;
214
- frameRendering: {
215
- enabled: boolean;
216
- name: boolean;
217
- outline: boolean;
218
- clip: boolean;
219
- };
220
- editingFrame: string | null;
221
- elementsToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawElement>[] | null;
222
- editingTextElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
223
- activeTool: {
224
- lastActiveTool: import("../types").ActiveTool | null;
225
- locked: boolean;
226
- fromSelection: boolean;
227
- } & import("../types").ActiveTool;
228
- penMode: boolean;
229
- penDetected: boolean;
230
- exportBackground: boolean;
231
- exportEmbedScene: boolean;
232
- exportWithDarkMode: boolean;
233
- exportScale: number;
234
- currentItemStrokeColor: string;
235
- currentItemBackgroundColor: string;
236
- currentItemFillStyle: import("../../element/src/types").FillStyle;
237
- currentItemStrokeWidth: number;
238
- currentItemStrokeStyle: import("../../element/src/types").StrokeStyle;
239
- currentItemRoughness: number;
240
- currentItemOpacity: number;
241
- currentItemFontFamily: number;
242
- currentItemFontSize: number;
243
- currentItemTextAlign: string;
244
- currentItemStartArrowhead: import("../../element/src/types").Arrowhead | null;
245
- currentItemEndArrowhead: import("../../element/src/types").Arrowhead | null;
246
- currentHoveredFontFamily: number | null;
247
- currentItemRoundness: import("../../element/src/types").StrokeRoundness;
248
- currentItemArrowType: "round" | "sharp" | "elbow";
249
- viewBackgroundColor: string;
250
- scrollX: number;
251
- scrollY: number;
252
- cursorButton: "up" | "down";
253
- scrolledOutside: boolean;
254
- name: string | null;
255
- isResizing: boolean;
256
- isRotating: boolean;
257
- zoom: Readonly<{
258
- value: import("../types").NormalizedZoomValue;
259
- }>;
260
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
261
- openSidebar: {
262
- name: string;
263
- tab?: string | undefined;
264
- } | null;
265
- openDialog: {
266
- name: "imageExport" | "help" | "jsonExport";
267
- } | {
268
- name: "ttd";
269
- tab: "mermaid" | "text-to-diagram";
270
- } | {
271
- name: "commandPalette";
272
- } | {
273
- name: "elementLinkSelector";
274
- sourceElementId: string;
275
- } | null;
276
- defaultSidebarDockedPreference: boolean;
277
- lastPointerDownWith: import("../../element/src/types").PointerType;
278
- selectedElementIds: Readonly<{
279
- [id: string]: true;
280
- }>;
281
- hoveredElementIds: Readonly<{
282
- [id: string]: true;
283
- }>;
284
- previousSelectedElementIds: {
285
- [id: string]: true;
286
- };
287
- selectedElementsAreBeingDragged: boolean;
288
- shouldCacheIgnoreZoom: boolean;
289
- toast: {
290
- message: string;
291
- closable?: boolean | undefined;
292
- duration?: number | undefined;
293
- } | null;
294
- zenModeEnabled: boolean;
295
- theme: import("../../element/src/types").Theme;
296
- gridSize: number;
297
- gridStep: number;
298
- gridModeEnabled: boolean;
299
- viewModeEnabled: boolean;
300
- selectedGroupIds: {
301
- [groupId: string]: boolean;
302
- };
303
- editingGroupId: string | null;
304
- width: number;
305
- height: number;
306
- offsetTop: number;
307
- offsetLeft: number;
308
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
309
- collaborators: Map<import("../types").SocketId, Readonly<{
310
- pointer?: import("../types").CollaboratorPointer | undefined;
311
- button?: "up" | "down" | undefined;
312
- selectedElementIds?: Readonly<{
313
- [id: string]: true;
314
- }> | undefined;
315
- username?: string | null | undefined;
316
- userState?: import("@excalidraw/common").UserIdleState | undefined;
317
- color?: {
318
- background: string;
319
- stroke: string;
320
- } | undefined;
321
- avatarUrl?: string | undefined;
322
- id?: string | undefined;
323
- socketId?: import("../types").SocketId | undefined;
324
- isCurrentUser?: boolean | undefined;
325
- isInCall?: boolean | undefined;
326
- isSpeaking?: boolean | undefined;
327
- isMuted?: boolean | undefined;
328
- }>>;
329
- stats: {
330
- open: boolean;
331
- panels: number;
332
- };
333
- currentChartType: import("../../element/src/types").ChartType;
334
- pasteDialog: {
335
- shown: false;
336
- data: null;
337
- } | {
338
- shown: true;
339
- data: import("../charts").Spreadsheet;
340
- };
341
- showHyperlinkPopup: false | "editor" | "info";
342
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
343
- snapLines: readonly import("../snapping").SnapLine[];
344
- originSnapOffset: {
345
- x: number;
346
- y: number;
347
- } | null;
348
- objectsSnapModeEnabled: boolean;
349
- userToFollow: import("../types").UserToFollow | null;
350
- followedBy: Set<import("../types").SocketId>;
351
- isCropping: boolean;
352
- croppingElementId: string | null;
353
- searchMatches: Readonly<{
354
- focusedId: string | null;
355
- matches: readonly import("../types").SearchMatch[];
356
- }> | null;
357
- activeLockedId: string | null;
358
- lockedMultiSelections: {
359
- [groupId: string]: true;
360
- };
361
- };
362
- captureUpdate: "EVENTUALLY";
363
- };
364
- PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
365
- } & {
366
- keyTest?: undefined;
367
- };
368
1
  export declare const actionShortcuts: {
369
2
  name: "toggleShortcuts";
370
3
  label: string;
@@ -374,11 +7,13 @@ export declare const actionShortcuts: {
374
7
  category: "menu";
375
8
  action: string;
376
9
  };
377
- perform: (_elements: readonly import("../../element/src/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, { focusContainer }: import("../types").AppClassProperties) => {
10
+ perform: (_elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: unknown, { focusContainer }: import("../types").AppClassProperties) => {
378
11
  appState: {
379
12
  openDialog: {
380
13
  name: "help";
381
14
  } | null;
15
+ openMenu: null;
16
+ openPopup: null;
382
17
  contextMenu: {
383
18
  items: import("../components/ContextMenu").ContextMenuItems;
384
19
  top: number;
@@ -386,19 +21,19 @@ export declare const actionShortcuts: {
386
21
  } | null;
387
22
  showWelcomeScreen: boolean;
388
23
  isLoading: boolean;
389
- errorMessage: import("react").ReactNode;
24
+ errorMessage: React.ReactNode;
390
25
  activeEmbeddable: {
391
- element: import("../../element/src/types").NonDeletedExcalidrawElement;
392
- state: "active" | "hover";
26
+ element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
27
+ state: "hover" | "active";
393
28
  } | null;
394
- newElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawNonSelectionElement> | null;
395
- resizingElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
396
- multiElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawLinearElement> | null;
397
- selectionElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
29
+ newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
30
+ resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
31
+ multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
32
+ selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
398
33
  isBindingEnabled: boolean;
399
- startBoundElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawBindableElement> | null;
400
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
401
- frameToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawFrameLikeElement> | null;
34
+ startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
35
+ suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
36
+ frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
402
37
  frameRendering: {
403
38
  enabled: boolean;
404
39
  name: boolean;
@@ -406,13 +41,17 @@ export declare const actionShortcuts: {
406
41
  clip: boolean;
407
42
  };
408
43
  editingFrame: string | null;
409
- elementsToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawElement>[] | null;
410
- editingTextElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
44
+ elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
45
+ editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
411
46
  activeTool: {
412
47
  lastActiveTool: import("../types").ActiveTool | null;
413
48
  locked: boolean;
414
49
  fromSelection: boolean;
415
50
  } & import("../types").ActiveTool;
51
+ preferredSelectionTool: {
52
+ type: "selection" | "lasso";
53
+ initialized: boolean;
54
+ };
416
55
  penMode: boolean;
417
56
  penDetected: boolean;
418
57
  exportBackground: boolean;
@@ -421,19 +60,19 @@ export declare const actionShortcuts: {
421
60
  exportScale: number;
422
61
  currentItemStrokeColor: string;
423
62
  currentItemBackgroundColor: string;
424
- currentItemFillStyle: import("../../element/src/types").FillStyle;
63
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
425
64
  currentItemStrokeWidth: number;
426
- currentItemStrokeStyle: import("../../element/src/types").StrokeStyle;
65
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
427
66
  currentItemRoughness: number;
428
67
  currentItemOpacity: number;
429
- currentItemFontFamily: number;
68
+ currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
430
69
  currentItemFontSize: number;
431
- currentItemTextAlign: string;
432
- currentItemStartArrowhead: import("../../element/src/types").Arrowhead | null;
433
- currentItemEndArrowhead: import("../../element/src/types").Arrowhead | null;
434
- currentHoveredFontFamily: number | null;
435
- currentItemRoundness: import("../../element/src/types").StrokeRoundness;
436
- currentItemArrowType: "round" | "sharp" | "elbow";
70
+ currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
71
+ currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
72
+ currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
73
+ currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
74
+ currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
75
+ currentItemArrowType: "sharp" | "round" | "elbow";
437
76
  viewBackgroundColor: string;
438
77
  scrollX: number;
439
78
  scrollY: number;
@@ -442,17 +81,13 @@ export declare const actionShortcuts: {
442
81
  name: string | null;
443
82
  isResizing: boolean;
444
83
  isRotating: boolean;
445
- zoom: Readonly<{
446
- value: import("../types").NormalizedZoomValue;
447
- }>;
448
- openMenu: "canvas" | "shape" | null;
449
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
84
+ zoom: import("../types").Zoom;
450
85
  openSidebar: {
451
- name: string;
452
- tab?: string | undefined;
86
+ name: import("../types").SidebarName;
87
+ tab?: import("../types").SidebarTabName;
453
88
  } | null;
454
89
  defaultSidebarDockedPreference: boolean;
455
- lastPointerDownWith: import("../../element/src/types").PointerType;
90
+ lastPointerDownWith: import("@excalidraw/element/types").PointerType;
456
91
  selectedElementIds: Readonly<{
457
92
  [id: string]: true;
458
93
  }>;
@@ -466,11 +101,11 @@ export declare const actionShortcuts: {
466
101
  shouldCacheIgnoreZoom: boolean;
467
102
  toast: {
468
103
  message: string;
469
- closable?: boolean | undefined;
470
- duration?: number | undefined;
104
+ closable?: boolean;
105
+ duration?: number;
471
106
  } | null;
472
107
  zenModeEnabled: boolean;
473
- theme: import("../../element/src/types").Theme;
108
+ theme: import("@excalidraw/element/types").Theme;
474
109
  gridSize: number;
475
110
  gridStep: number;
476
111
  gridModeEnabled: boolean;
@@ -478,37 +113,18 @@ export declare const actionShortcuts: {
478
113
  selectedGroupIds: {
479
114
  [groupId: string]: boolean;
480
115
  };
481
- editingGroupId: string | null;
116
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
482
117
  width: number;
483
118
  height: number;
484
119
  offsetTop: number;
485
120
  offsetLeft: number;
486
121
  fileHandle: import("browser-fs-access").FileSystemHandle | null;
487
- collaborators: Map<import("../types").SocketId, Readonly<{
488
- pointer?: import("../types").CollaboratorPointer | undefined;
489
- button?: "up" | "down" | undefined;
490
- selectedElementIds?: Readonly<{
491
- [id: string]: true;
492
- }> | undefined;
493
- username?: string | null | undefined;
494
- userState?: import("@excalidraw/common").UserIdleState | undefined;
495
- color?: {
496
- background: string;
497
- stroke: string;
498
- } | undefined;
499
- avatarUrl?: string | undefined;
500
- id?: string | undefined;
501
- socketId?: import("../types").SocketId | undefined;
502
- isCurrentUser?: boolean | undefined;
503
- isInCall?: boolean | undefined;
504
- isSpeaking?: boolean | undefined;
505
- isMuted?: boolean | undefined;
506
- }>>;
122
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
507
123
  stats: {
508
124
  open: boolean;
509
125
  panels: number;
510
126
  };
511
- currentChartType: import("../../element/src/types").ChartType;
127
+ currentChartType: import("@excalidraw/element/types").ChartType;
512
128
  pasteDialog: {
513
129
  shown: false;
514
130
  data: null;
@@ -516,7 +132,7 @@ export declare const actionShortcuts: {
516
132
  shown: true;
517
133
  data: import("../charts").Spreadsheet;
518
134
  };
519
- showHyperlinkPopup: false | "editor" | "info";
135
+ showHyperlinkPopup: false | "info" | "editor";
520
136
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
521
137
  snapLines: readonly import("../snapping").SnapLine[];
522
138
  originSnapOffset: {
@@ -527,15 +143,16 @@ export declare const actionShortcuts: {
527
143
  userToFollow: import("../types").UserToFollow | null;
528
144
  followedBy: Set<import("../types").SocketId>;
529
145
  isCropping: boolean;
530
- croppingElementId: string | null;
146
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
531
147
  searchMatches: Readonly<{
532
- focusedId: string | null;
148
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
533
149
  matches: readonly import("../types").SearchMatch[];
534
150
  }> | null;
535
151
  activeLockedId: string | null;
536
152
  lockedMultiSelections: {
537
153
  [groupId: string]: true;
538
154
  };
155
+ bindMode: import("@excalidraw/element/types").BindMode;
539
156
  };
540
157
  captureUpdate: "EVENTUALLY";
541
158
  };