@excalidraw/element 0.18.0-7b8a5f54c → 0.18.0-7ea3229

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 (240) hide show
  1. package/dist/dev/index.js +5099 -2604
  2. package/dist/dev/index.js.map +4 -4
  3. package/dist/prod/index.js +18 -18
  4. package/dist/types/common/debug.d.ts +21 -0
  5. package/dist/types/common/src/bounds.d.ts +10 -0
  6. package/dist/types/common/src/colors.d.ts +59 -39
  7. package/dist/types/common/src/constants.d.ts +37 -26
  8. package/dist/types/common/src/editorInterface.d.ts +34 -0
  9. package/dist/types/common/src/font-metadata.d.ts +1 -3
  10. package/dist/types/common/src/index.d.ts +3 -0
  11. package/dist/types/common/src/keys.d.ts +1 -1
  12. package/dist/types/common/src/utility-types.d.ts +0 -1
  13. package/dist/types/common/src/utils.d.ts +52 -38
  14. package/dist/types/element/src/Scene.d.ts +3 -3
  15. package/dist/types/element/src/arrows/focus.d.ts +27 -0
  16. package/dist/types/element/src/arrows/helpers.d.ts +5 -0
  17. package/dist/types/element/src/binding.d.ts +66 -46
  18. package/dist/types/element/src/bounds.d.ts +3 -11
  19. package/dist/types/element/src/collision.d.ts +7 -2
  20. package/dist/types/element/src/comparisons.d.ts +7 -7
  21. package/dist/types/element/src/delta.d.ts +4 -4
  22. package/dist/types/element/src/distribute.d.ts +2 -1
  23. package/dist/types/element/src/dragElements.d.ts +3 -3
  24. package/dist/types/element/src/duplicate.d.ts +3 -3
  25. package/dist/types/element/src/fractionalIndex.d.ts +2 -2
  26. package/dist/types/element/src/frame.d.ts +5 -1
  27. package/dist/types/element/src/heading.d.ts +2 -1
  28. package/dist/types/element/src/image.d.ts +1 -11
  29. package/dist/types/element/src/index.d.ts +4 -3
  30. package/dist/types/element/src/linearElementEditor.d.ts +18 -20
  31. package/dist/types/element/src/mutateElement.d.ts +3 -1
  32. package/dist/types/element/src/newElement.d.ts +6 -6
  33. package/dist/types/element/src/positionElementsOnGrid.d.ts +2 -0
  34. package/dist/types/element/src/renderElement.d.ts +4 -7
  35. package/dist/types/element/src/resizeElements.d.ts +10 -10
  36. package/dist/types/element/src/resizeTest.d.ts +6 -5
  37. package/dist/types/element/src/selection.d.ts +3 -7
  38. package/dist/types/element/src/shape.d.ts +8 -7
  39. package/dist/types/element/src/store.d.ts +3 -2
  40. package/dist/types/element/src/textElement.d.ts +1 -1
  41. package/dist/types/element/src/textMeasurements.d.ts +1 -3
  42. package/dist/types/{excalidraw/data → element/src}/transform.d.ts +3 -3
  43. package/dist/types/element/src/transformHandles.d.ts +8 -27
  44. package/dist/types/element/src/typeChecks.d.ts +4 -7
  45. package/dist/types/element/src/types.d.ts +7 -11
  46. package/dist/types/element/src/utils.d.ts +8 -3
  47. package/dist/types/element/src/visualdebug.d.ts +59 -0
  48. package/dist/types/element/src/zindex.d.ts +7 -1
  49. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +102 -136
  50. package/dist/types/excalidraw/actions/actionAlign.d.ts +6 -7
  51. package/dist/types/excalidraw/actions/actionBoundText.d.ts +73 -96
  52. package/dist/types/excalidraw/actions/actionCanvas.d.ts +438 -758
  53. package/dist/types/excalidraw/actions/actionClipboard.d.ts +92 -856
  54. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +35 -47
  55. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +121 -159
  56. package/dist/types/excalidraw/actions/actionDistribute.d.ts +2 -3
  57. package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +2 -3
  58. package/dist/types/excalidraw/actions/actionElementLink.d.ts +31 -45
  59. package/dist/types/excalidraw/actions/actionElementLock.d.ts +72 -95
  60. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +36 -48
  61. package/dist/types/excalidraw/actions/actionExport.d.ts +161 -1109
  62. package/dist/types/excalidraw/actions/actionFinalize.d.ts +10 -394
  63. package/dist/types/excalidraw/actions/actionFlip.d.ts +2 -3
  64. package/dist/types/excalidraw/actions/actionFrame.d.ts +239 -322
  65. package/dist/types/excalidraw/actions/actionGroup.d.ts +76 -107
  66. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +145 -195
  67. package/dist/types/excalidraw/actions/actionLink.d.ts +33 -45
  68. package/dist/types/excalidraw/actions/actionMenu.d.ts +30 -410
  69. package/dist/types/excalidraw/actions/actionNavigate.d.ts +18 -359
  70. package/dist/types/excalidraw/actions/actionProperties.d.ts +135 -2488
  71. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +38 -54
  72. package/dist/types/excalidraw/actions/actionStyles.d.ts +35 -47
  73. package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +1 -1
  74. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +35 -47
  75. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +35 -47
  76. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +28 -42
  77. package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +1 -1
  78. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +35 -47
  79. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +35 -47
  80. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +36 -48
  81. package/dist/types/excalidraw/actions/actionZindex.d.ts +2 -3
  82. package/dist/types/excalidraw/actions/index.d.ts +2 -2
  83. package/dist/types/excalidraw/actions/register.d.ts +2 -2
  84. package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
  85. package/dist/types/excalidraw/actions/types.d.ts +4 -4
  86. package/dist/types/excalidraw/appState.d.ts +17 -12
  87. package/dist/types/excalidraw/clipboard.d.ts +58 -17
  88. package/dist/types/excalidraw/components/Actions.d.ts +22 -5
  89. package/dist/types/excalidraw/components/App.d.ts +77 -68
  90. package/dist/types/excalidraw/components/Card.d.ts +1 -3
  91. package/dist/types/excalidraw/components/ColorPicker/ColorInput.d.ts +2 -4
  92. package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +0 -1
  93. package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +2 -0
  94. package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +2 -1
  95. package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +2 -1
  96. package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +0 -1
  97. package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +0 -1
  98. package/dist/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +1 -0
  99. package/dist/types/excalidraw/components/CommandPalette/types.d.ts +2 -4
  100. package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +2 -2
  101. package/dist/types/excalidraw/components/DarkModeToggle.d.ts +1 -1
  102. package/dist/types/excalidraw/components/DefaultSidebar.d.ts +9 -13
  103. package/dist/types/excalidraw/components/ElementLinkDialog.d.ts +1 -1
  104. package/dist/types/excalidraw/components/Ellipsify.d.ts +1 -2
  105. package/dist/types/excalidraw/components/ErrorDialog.d.ts +1 -1
  106. package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +1 -2
  107. package/dist/types/excalidraw/components/EyeDropper.d.ts +0 -1
  108. package/dist/types/excalidraw/components/FilledButton.d.ts +2 -1
  109. package/dist/types/excalidraw/components/FontPicker/FontPicker.d.ts +2 -1
  110. package/dist/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +3 -1
  111. package/dist/types/excalidraw/components/FontPicker/keyboardNavHandlers.d.ts +0 -1
  112. package/dist/types/excalidraw/components/HelpDialog.d.ts +1 -1
  113. package/dist/types/excalidraw/components/HintViewer.d.ts +4 -3
  114. package/dist/types/excalidraw/components/InlineIcon.d.ts +3 -1
  115. package/dist/types/excalidraw/components/LayerUI.d.ts +2 -1
  116. package/dist/types/excalidraw/components/LibraryMenuControlButtons.d.ts +1 -1
  117. package/dist/types/excalidraw/components/LibraryMenuHeaderContent.d.ts +1 -2
  118. package/dist/types/excalidraw/components/LibraryMenuSection.d.ts +1 -1
  119. package/dist/types/excalidraw/components/LibraryUnit.d.ts +2 -3
  120. package/dist/types/excalidraw/components/LoadingMessage.d.ts +0 -1
  121. package/dist/types/excalidraw/components/MobileMenu.d.ts +3 -5
  122. package/dist/types/excalidraw/components/MobileToolBar.d.ts +10 -0
  123. package/dist/types/excalidraw/components/Modal.d.ts +0 -1
  124. package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirm.d.ts +1 -1
  125. package/dist/types/excalidraw/components/Popover.d.ts +2 -1
  126. package/dist/types/excalidraw/components/PropertiesPopover.d.ts +2 -1
  127. package/dist/types/excalidraw/components/RadioGroup.d.ts +0 -1
  128. package/dist/types/excalidraw/components/RadioSelection.d.ts +4 -4
  129. package/dist/types/excalidraw/components/ScrollableList.d.ts +0 -1
  130. package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +15 -21
  131. package/dist/types/excalidraw/components/Sidebar/SidebarHeader.d.ts +1 -1
  132. package/dist/types/excalidraw/components/Sidebar/SidebarTab.d.ts +1 -2
  133. package/dist/types/excalidraw/components/Sidebar/SidebarTabTrigger.d.ts +1 -2
  134. package/dist/types/excalidraw/components/Sidebar/SidebarTabTriggers.d.ts +1 -2
  135. package/dist/types/excalidraw/components/Sidebar/SidebarTabs.d.ts +1 -2
  136. package/dist/types/excalidraw/components/Spinner.d.ts +4 -4
  137. package/dist/types/excalidraw/components/Stats/CanvasGrid.d.ts +0 -1
  138. package/dist/types/excalidraw/components/Stats/Collapsible.d.ts +0 -1
  139. package/dist/types/excalidraw/components/Stats/DragInput.d.ts +0 -1
  140. package/dist/types/excalidraw/components/Stats/index.d.ts +7 -8
  141. package/dist/types/excalidraw/components/Stats/utils.d.ts +1 -1
  142. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatHistoryMenu.d.ts +15 -0
  143. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatInterface.d.ts +23 -0
  144. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatMessage.d.ts +14 -0
  145. package/dist/types/excalidraw/components/TTDDialog/Chat/TTDChatPanel.d.ts +27 -0
  146. package/dist/types/excalidraw/components/TTDDialog/Chat/index.d.ts +3 -0
  147. package/dist/types/excalidraw/components/TTDDialog/Chat/useChatAgent.d.ts +8 -0
  148. package/dist/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +3 -2
  149. package/dist/types/excalidraw/components/TTDDialog/TTDContext.d.ts +13 -0
  150. package/dist/types/excalidraw/components/TTDDialog/TTDDialog.d.ts +12 -29
  151. package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +2 -2
  152. package/dist/types/excalidraw/components/TTDDialog/TTDDialogPanel.d.ts +13 -9
  153. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTab.d.ts +1 -2
  154. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTrigger.d.ts +1 -2
  155. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTriggers.d.ts +1 -2
  156. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +2 -3
  157. package/dist/types/excalidraw/components/TTDDialog/TTDPreviewPanel.d.ts +9 -0
  158. package/dist/types/excalidraw/components/TTDDialog/TTDWelcomeMessage.d.ts +1 -0
  159. package/dist/types/excalidraw/components/TTDDialog/TextToDiagram.d.ts +9 -0
  160. package/dist/types/excalidraw/components/TTDDialog/common.d.ts +16 -16
  161. package/dist/types/excalidraw/components/TTDDialog/hooks/useChatManagement.d.ts +13 -0
  162. package/dist/types/excalidraw/components/TTDDialog/hooks/useMermaidRenderer.d.ts +14 -0
  163. package/dist/types/excalidraw/components/TTDDialog/hooks/useTextGeneration.d.ts +7 -0
  164. package/dist/types/excalidraw/components/TTDDialog/types.d.ts +95 -0
  165. package/dist/types/excalidraw/components/TTDDialog/useTTDChatStorage.d.ts +22 -0
  166. package/dist/types/excalidraw/components/TTDDialog/utils/TTDStreamFetch.d.ts +24 -0
  167. package/dist/types/excalidraw/components/TTDDialog/utils/chat.d.ts +10 -0
  168. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidValidation.d.ts +1 -0
  169. package/dist/types/excalidraw/components/TextField.d.ts +1 -0
  170. package/dist/types/excalidraw/components/Toast.d.ts +3 -3
  171. package/dist/types/excalidraw/components/ToolPopover.d.ts +25 -0
  172. package/dist/types/excalidraw/components/Trans.d.ts +2 -2
  173. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +6 -3
  174. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +47 -35
  175. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +7 -5
  176. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuGroup.d.ts +3 -3
  177. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +13 -22
  178. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCheckbox.d.ts +5 -0
  179. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContent.d.ts +5 -4
  180. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +0 -1
  181. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCustom.d.ts +2 -2
  182. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemLink.d.ts +6 -6
  183. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSub.d.ts +23 -0
  184. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubContent.d.ts +8 -0
  185. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubTrigger.d.ts +12 -0
  186. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuTrigger.d.ts +3 -4
  187. package/dist/types/excalidraw/components/dropdownMenu/common.d.ts +2 -2
  188. package/dist/types/excalidraw/components/dropdownMenu/dropdownMenuUtils.d.ts +2 -0
  189. package/dist/types/excalidraw/components/hoc/withInternalFallback.d.ts +1 -1
  190. package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +1 -1
  191. package/dist/types/excalidraw/components/icons.d.ts +32 -13
  192. package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +4 -3
  193. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +17 -2
  194. package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +39 -35
  195. package/dist/types/excalidraw/components/shapes.d.ts +202 -1
  196. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +6 -6
  197. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +15 -16
  198. package/dist/types/excalidraw/data/blob.d.ts +330 -10
  199. package/dist/types/excalidraw/data/encode.d.ts +4 -4
  200. package/dist/types/excalidraw/data/encryption.d.ts +5 -5
  201. package/dist/types/excalidraw/data/filesystem.d.ts +2 -2
  202. package/dist/types/excalidraw/data/index.d.ts +3 -3
  203. package/dist/types/excalidraw/data/json.d.ts +162 -2
  204. package/dist/types/excalidraw/data/library.d.ts +24 -9
  205. package/dist/types/excalidraw/data/restore.d.ts +25 -10
  206. package/dist/types/excalidraw/data/types.d.ts +4 -1
  207. package/dist/types/excalidraw/editor-jotai.d.ts +11 -11
  208. package/dist/types/excalidraw/errors.d.ts +14 -0
  209. package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
  210. package/dist/types/excalidraw/hooks/useOutsideClick.d.ts +4 -3
  211. package/dist/types/excalidraw/hooks/useScrollPosition.d.ts +1 -2
  212. package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +14 -0
  213. package/dist/types/excalidraw/i18n.d.ts +2 -2
  214. package/dist/types/excalidraw/index.d.ts +7 -7
  215. package/dist/types/excalidraw/renderer/animation.d.ts +12 -0
  216. package/dist/types/excalidraw/renderer/helpers.d.ts +6 -8
  217. package/dist/types/excalidraw/renderer/interactiveScene.d.ts +8 -14
  218. package/dist/types/excalidraw/scene/Renderer.d.ts +5 -2
  219. package/dist/types/excalidraw/scene/export.d.ts +2 -2
  220. package/dist/types/excalidraw/scene/scroll.d.ts +1 -6
  221. package/dist/types/excalidraw/scene/types.d.ts +22 -5
  222. package/dist/types/excalidraw/shortcut.d.ts +1 -0
  223. package/dist/types/excalidraw/snapping.d.ts +5 -5
  224. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-bindings.d.ts +1 -1
  225. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-loader.d.ts +1 -1
  226. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-wasm.d.ts +1 -1
  227. package/dist/types/excalidraw/subset/woff2/woff2-loader.d.ts +2 -2
  228. package/dist/types/excalidraw/subset/woff2/woff2-wasm.d.ts +1 -1
  229. package/dist/types/excalidraw/types.d.ts +38 -21
  230. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +2 -2
  231. package/dist/types/math/src/point.d.ts +6 -1
  232. package/dist/types/math/src/polygon.d.ts +2 -2
  233. package/dist/types/math/src/range.d.ts +1 -3
  234. package/dist/types/math/src/segment.d.ts +4 -3
  235. package/dist/types/math/src/types.d.ts +25 -1
  236. package/dist/types/utils/src/bbox.d.ts +1 -1
  237. package/dist/types/utils/src/export.d.ts +5 -5
  238. package/dist/types/utils/src/shape.d.ts +6 -6
  239. package/dist/types/utils/src/withinBounds.d.ts +2 -2
  240. package/package.json +9 -3
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const actionToggleObjectsSnapMode: {
3
2
  name: "objectsSnapMode";
4
3
  label: string;
@@ -19,10 +18,10 @@ export declare const actionToggleObjectsSnapMode: {
19
18
  } | null;
20
19
  showWelcomeScreen: boolean;
21
20
  isLoading: boolean;
22
- errorMessage: import("react").ReactNode;
21
+ errorMessage: React.ReactNode;
23
22
  activeEmbeddable: {
24
23
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
25
- state: "active" | "hover";
24
+ state: "hover" | "active";
26
25
  } | null;
27
26
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
28
27
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
@@ -30,7 +29,10 @@ export declare const actionToggleObjectsSnapMode: {
30
29
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
31
30
  isBindingEnabled: boolean;
32
31
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
33
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
32
+ suggestedBinding: {
33
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
34
+ midPoint?: import("@excalidraw/math").GlobalPoint;
35
+ } | null;
34
36
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
35
37
  frameRendering: {
36
38
  enabled: boolean;
@@ -46,6 +48,10 @@ export declare const actionToggleObjectsSnapMode: {
46
48
  locked: boolean;
47
49
  fromSelection: boolean;
48
50
  } & import("../types").ActiveTool;
51
+ preferredSelectionTool: {
52
+ type: "selection" | "lasso";
53
+ initialized: boolean;
54
+ };
49
55
  penMode: boolean;
50
56
  penDetected: boolean;
51
57
  exportBackground: boolean;
@@ -54,19 +60,19 @@ export declare const actionToggleObjectsSnapMode: {
54
60
  exportScale: number;
55
61
  currentItemStrokeColor: string;
56
62
  currentItemBackgroundColor: string;
57
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
63
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
58
64
  currentItemStrokeWidth: number;
59
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
65
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
60
66
  currentItemRoughness: number;
61
67
  currentItemOpacity: number;
62
- currentItemFontFamily: number;
68
+ currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
63
69
  currentItemFontSize: number;
64
- currentItemTextAlign: string;
70
+ currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
65
71
  currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
66
72
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
67
- currentHoveredFontFamily: number | null;
73
+ currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
68
74
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
69
- currentItemArrowType: "round" | "sharp" | "elbow";
75
+ currentItemArrowType: "sharp" | "round" | "elbow";
70
76
  viewBackgroundColor: string;
71
77
  scrollX: number;
72
78
  scrollY: number;
@@ -75,26 +81,26 @@ export declare const actionToggleObjectsSnapMode: {
75
81
  name: string | null;
76
82
  isResizing: boolean;
77
83
  isRotating: boolean;
78
- zoom: Readonly<{
79
- value: import("../types").NormalizedZoomValue;
80
- }>;
81
- openMenu: "canvas" | "shape" | null;
82
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
84
+ zoom: import("../types").Zoom;
85
+ openMenu: "canvas" | null;
86
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
83
87
  openSidebar: {
84
- name: string;
85
- tab?: string | undefined;
88
+ name: import("../types").SidebarName;
89
+ tab?: import("../types").SidebarTabName;
86
90
  } | null;
87
- openDialog: {
91
+ openDialog: null | {
88
92
  name: "imageExport" | "help" | "jsonExport";
89
93
  } | {
90
94
  name: "ttd";
91
- tab: "mermaid" | "text-to-diagram";
95
+ tab: "text-to-diagram" | "mermaid";
92
96
  } | {
93
97
  name: "commandPalette";
98
+ } | {
99
+ name: "settings";
94
100
  } | {
95
101
  name: "elementLinkSelector";
96
- sourceElementId: string;
97
- } | null;
102
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
103
+ };
98
104
  defaultSidebarDockedPreference: boolean;
99
105
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
100
106
  selectedElementIds: Readonly<{
@@ -110,8 +116,8 @@ export declare const actionToggleObjectsSnapMode: {
110
116
  shouldCacheIgnoreZoom: boolean;
111
117
  toast: {
112
118
  message: string;
113
- closable?: boolean | undefined;
114
- duration?: number | undefined;
119
+ closable?: boolean;
120
+ duration?: number;
115
121
  } | null;
116
122
  zenModeEnabled: boolean;
117
123
  theme: import("@excalidraw/element/types").Theme;
@@ -121,32 +127,13 @@ export declare const actionToggleObjectsSnapMode: {
121
127
  selectedGroupIds: {
122
128
  [groupId: string]: boolean;
123
129
  };
124
- editingGroupId: string | null;
130
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
125
131
  width: number;
126
132
  height: number;
127
133
  offsetTop: number;
128
134
  offsetLeft: number;
129
135
  fileHandle: import("browser-fs-access").FileSystemHandle | null;
130
- collaborators: Map<import("../types").SocketId, Readonly<{
131
- pointer?: import("../types").CollaboratorPointer | undefined;
132
- button?: "up" | "down" | undefined;
133
- selectedElementIds?: Readonly<{
134
- [id: string]: true;
135
- }> | undefined;
136
- username?: string | null | undefined;
137
- userState?: import("@excalidraw/common").UserIdleState | undefined;
138
- color?: {
139
- background: string;
140
- stroke: string;
141
- } | undefined;
142
- avatarUrl?: string | undefined;
143
- id?: string | undefined;
144
- socketId?: import("../types").SocketId | undefined;
145
- isCurrentUser?: boolean | undefined;
146
- isInCall?: boolean | undefined;
147
- isSpeaking?: boolean | undefined;
148
- isMuted?: boolean | undefined;
149
- }>>;
136
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
150
137
  stats: {
151
138
  open: boolean;
152
139
  panels: number;
@@ -159,7 +146,7 @@ export declare const actionToggleObjectsSnapMode: {
159
146
  shown: true;
160
147
  data: import("../charts").Spreadsheet;
161
148
  };
162
- showHyperlinkPopup: false | "editor" | "info";
149
+ showHyperlinkPopup: false | "info" | "editor";
163
150
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
164
151
  snapLines: readonly import("../snapping").SnapLine[];
165
152
  originSnapOffset: {
@@ -169,15 +156,16 @@ export declare const actionToggleObjectsSnapMode: {
169
156
  userToFollow: import("../types").UserToFollow | null;
170
157
  followedBy: Set<import("../types").SocketId>;
171
158
  isCropping: boolean;
172
- croppingElementId: string | null;
159
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
173
160
  searchMatches: Readonly<{
174
- focusedId: string | null;
161
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
175
162
  matches: readonly import("../types").SearchMatch[];
176
163
  }> | null;
177
164
  activeLockedId: string | null;
178
165
  lockedMultiSelections: {
179
166
  [groupId: string]: true;
180
167
  };
168
+ bindMode: import("@excalidraw/element/types").BindMode;
181
169
  };
182
170
  captureUpdate: "EVENTUALLY";
183
171
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { AppState } from "../types";
3
2
  export declare const actionToggleSearchMenu: {
4
3
  name: "searchMenu";
@@ -11,7 +10,7 @@ export declare const actionToggleSearchMenu: {
11
10
  action: string;
12
11
  predicate: (appState: Readonly<AppState>) => boolean;
13
12
  };
14
- perform(elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties): false | {
13
+ perform(elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties): false | {
15
14
  appState: {
16
15
  openSidebar: {
17
16
  name: "default";
@@ -25,10 +24,10 @@ export declare const actionToggleSearchMenu: {
25
24
  } | null;
26
25
  showWelcomeScreen: boolean;
27
26
  isLoading: boolean;
28
- errorMessage: import("react").ReactNode;
27
+ errorMessage: React.ReactNode;
29
28
  activeEmbeddable: {
30
29
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
31
- state: "active" | "hover";
30
+ state: "hover" | "active";
32
31
  } | null;
33
32
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
34
33
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
@@ -36,7 +35,10 @@ export declare const actionToggleSearchMenu: {
36
35
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
37
36
  isBindingEnabled: boolean;
38
37
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
39
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
38
+ suggestedBinding: {
39
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
40
+ midPoint?: import("@excalidraw/math").GlobalPoint;
41
+ } | null;
40
42
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
41
43
  frameRendering: {
42
44
  enabled: boolean;
@@ -52,6 +54,10 @@ export declare const actionToggleSearchMenu: {
52
54
  locked: boolean;
53
55
  fromSelection: boolean;
54
56
  } & import("../types").ActiveTool;
57
+ preferredSelectionTool: {
58
+ type: "selection" | "lasso";
59
+ initialized: boolean;
60
+ };
55
61
  penMode: boolean;
56
62
  penDetected: boolean;
57
63
  exportBackground: boolean;
@@ -60,19 +66,19 @@ export declare const actionToggleSearchMenu: {
60
66
  exportScale: number;
61
67
  currentItemStrokeColor: string;
62
68
  currentItemBackgroundColor: string;
63
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
69
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
64
70
  currentItemStrokeWidth: number;
65
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
71
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
66
72
  currentItemRoughness: number;
67
73
  currentItemOpacity: number;
68
- currentItemFontFamily: number;
74
+ currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
69
75
  currentItemFontSize: number;
70
- currentItemTextAlign: string;
76
+ currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
71
77
  currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
72
78
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
73
- currentHoveredFontFamily: number | null;
79
+ currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
74
80
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
75
- currentItemArrowType: "round" | "sharp" | "elbow";
81
+ currentItemArrowType: "sharp" | "round" | "elbow";
76
82
  viewBackgroundColor: string;
77
83
  scrollX: number;
78
84
  scrollY: number;
@@ -81,11 +87,9 @@ export declare const actionToggleSearchMenu: {
81
87
  name: string | null;
82
88
  isResizing: boolean;
83
89
  isRotating: boolean;
84
- zoom: Readonly<{
85
- value: import("../types").NormalizedZoomValue;
86
- }>;
87
- openMenu: "canvas" | "shape" | null;
88
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
90
+ zoom: import("../types").Zoom;
91
+ openMenu: "canvas" | null;
92
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
89
93
  defaultSidebarDockedPreference: boolean;
90
94
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
91
95
  selectedElementIds: Readonly<{
@@ -101,8 +105,8 @@ export declare const actionToggleSearchMenu: {
101
105
  shouldCacheIgnoreZoom: boolean;
102
106
  toast: {
103
107
  message: string;
104
- closable?: boolean | undefined;
105
- duration?: number | undefined;
108
+ closable?: boolean;
109
+ duration?: number;
106
110
  } | null;
107
111
  zenModeEnabled: boolean;
108
112
  theme: import("@excalidraw/element/types").Theme;
@@ -113,32 +117,13 @@ export declare const actionToggleSearchMenu: {
113
117
  selectedGroupIds: {
114
118
  [groupId: string]: boolean;
115
119
  };
116
- editingGroupId: string | null;
120
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
117
121
  width: number;
118
122
  height: number;
119
123
  offsetTop: number;
120
124
  offsetLeft: number;
121
125
  fileHandle: import("browser-fs-access").FileSystemHandle | null;
122
- collaborators: Map<import("../types").SocketId, Readonly<{
123
- pointer?: import("../types").CollaboratorPointer | undefined;
124
- button?: "up" | "down" | undefined;
125
- selectedElementIds?: Readonly<{
126
- [id: string]: true;
127
- }> | undefined;
128
- username?: string | null | undefined;
129
- userState?: import("@excalidraw/common").UserIdleState | undefined;
130
- color?: {
131
- background: string;
132
- stroke: string;
133
- } | undefined;
134
- avatarUrl?: string | undefined;
135
- id?: string | undefined;
136
- socketId?: import("../types").SocketId | undefined;
137
- isCurrentUser?: boolean | undefined;
138
- isInCall?: boolean | undefined;
139
- isSpeaking?: boolean | undefined;
140
- isMuted?: boolean | undefined;
141
- }>>;
126
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
142
127
  stats: {
143
128
  open: boolean;
144
129
  panels: number;
@@ -151,7 +136,7 @@ export declare const actionToggleSearchMenu: {
151
136
  shown: true;
152
137
  data: import("../charts").Spreadsheet;
153
138
  };
154
- showHyperlinkPopup: false | "editor" | "info";
139
+ showHyperlinkPopup: false | "info" | "editor";
155
140
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
156
141
  snapLines: readonly import("../snapping").SnapLine[];
157
142
  originSnapOffset: {
@@ -162,15 +147,16 @@ export declare const actionToggleSearchMenu: {
162
147
  userToFollow: import("../types").UserToFollow | null;
163
148
  followedBy: Set<import("../types").SocketId>;
164
149
  isCropping: boolean;
165
- croppingElementId: string | null;
150
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
166
151
  searchMatches: Readonly<{
167
- focusedId: string | null;
152
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
168
153
  matches: readonly import("../types").SearchMatch[];
169
154
  }> | null;
170
155
  activeLockedId: string | null;
171
156
  lockedMultiSelections: {
172
157
  [groupId: string]: true;
173
158
  };
159
+ bindMode: import("@excalidraw/element/types").BindMode;
174
160
  };
175
161
  captureUpdate: "EVENTUALLY";
176
162
  };
@@ -9,7 +9,7 @@ export declare const actionToggleShapeSwitch: {
9
9
  action: string;
10
10
  };
11
11
  keywords: string[];
12
- perform(elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: import("../types").AppClassProperties): {
12
+ perform(elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: unknown, app: import("../types").AppClassProperties): {
13
13
  captureUpdate: "NEVER";
14
14
  };
15
15
  checked: (appState: Readonly<import("../types").AppState>) => boolean;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const actionToggleStats: {
3
2
  name: "stats";
4
3
  label: string;
@@ -21,10 +20,10 @@ export declare const actionToggleStats: {
21
20
  } | null;
22
21
  showWelcomeScreen: boolean;
23
22
  isLoading: boolean;
24
- errorMessage: import("react").ReactNode;
23
+ errorMessage: React.ReactNode;
25
24
  activeEmbeddable: {
26
25
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
27
- state: "active" | "hover";
26
+ state: "hover" | "active";
28
27
  } | null;
29
28
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
30
29
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
@@ -32,7 +31,10 @@ export declare const actionToggleStats: {
32
31
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
33
32
  isBindingEnabled: boolean;
34
33
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
35
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
34
+ suggestedBinding: {
35
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
36
+ midPoint?: import("@excalidraw/math").GlobalPoint;
37
+ } | null;
36
38
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
37
39
  frameRendering: {
38
40
  enabled: boolean;
@@ -48,6 +50,10 @@ export declare const actionToggleStats: {
48
50
  locked: boolean;
49
51
  fromSelection: boolean;
50
52
  } & import("../types").ActiveTool;
53
+ preferredSelectionTool: {
54
+ type: "selection" | "lasso";
55
+ initialized: boolean;
56
+ };
51
57
  penMode: boolean;
52
58
  penDetected: boolean;
53
59
  exportBackground: boolean;
@@ -56,19 +62,19 @@ export declare const actionToggleStats: {
56
62
  exportScale: number;
57
63
  currentItemStrokeColor: string;
58
64
  currentItemBackgroundColor: string;
59
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
65
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
60
66
  currentItemStrokeWidth: number;
61
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
67
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
62
68
  currentItemRoughness: number;
63
69
  currentItemOpacity: number;
64
- currentItemFontFamily: number;
70
+ currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
65
71
  currentItemFontSize: number;
66
- currentItemTextAlign: string;
72
+ currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
67
73
  currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
68
74
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
69
- currentHoveredFontFamily: number | null;
75
+ currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
70
76
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
71
- currentItemArrowType: "round" | "sharp" | "elbow";
77
+ currentItemArrowType: "sharp" | "round" | "elbow";
72
78
  viewBackgroundColor: string;
73
79
  scrollX: number;
74
80
  scrollY: number;
@@ -77,26 +83,26 @@ export declare const actionToggleStats: {
77
83
  name: string | null;
78
84
  isResizing: boolean;
79
85
  isRotating: boolean;
80
- zoom: Readonly<{
81
- value: import("../types").NormalizedZoomValue;
82
- }>;
83
- openMenu: "canvas" | "shape" | null;
84
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
86
+ zoom: import("../types").Zoom;
87
+ openMenu: "canvas" | null;
88
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
85
89
  openSidebar: {
86
- name: string;
87
- tab?: string | undefined;
90
+ name: import("../types").SidebarName;
91
+ tab?: import("../types").SidebarTabName;
88
92
  } | null;
89
- openDialog: {
93
+ openDialog: null | {
90
94
  name: "imageExport" | "help" | "jsonExport";
91
95
  } | {
92
96
  name: "ttd";
93
- tab: "mermaid" | "text-to-diagram";
97
+ tab: "text-to-diagram" | "mermaid";
94
98
  } | {
95
99
  name: "commandPalette";
100
+ } | {
101
+ name: "settings";
96
102
  } | {
97
103
  name: "elementLinkSelector";
98
- sourceElementId: string;
99
- } | null;
104
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
105
+ };
100
106
  defaultSidebarDockedPreference: boolean;
101
107
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
102
108
  selectedElementIds: Readonly<{
@@ -112,8 +118,8 @@ export declare const actionToggleStats: {
112
118
  shouldCacheIgnoreZoom: boolean;
113
119
  toast: {
114
120
  message: string;
115
- closable?: boolean | undefined;
116
- duration?: number | undefined;
121
+ closable?: boolean;
122
+ duration?: number;
117
123
  } | null;
118
124
  zenModeEnabled: boolean;
119
125
  theme: import("@excalidraw/element/types").Theme;
@@ -124,32 +130,13 @@ export declare const actionToggleStats: {
124
130
  selectedGroupIds: {
125
131
  [groupId: string]: boolean;
126
132
  };
127
- editingGroupId: string | null;
133
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
128
134
  width: number;
129
135
  height: number;
130
136
  offsetTop: number;
131
137
  offsetLeft: number;
132
138
  fileHandle: import("browser-fs-access").FileSystemHandle | null;
133
- collaborators: Map<import("../types").SocketId, Readonly<{
134
- pointer?: import("../types").CollaboratorPointer | undefined;
135
- button?: "up" | "down" | undefined;
136
- selectedElementIds?: Readonly<{
137
- [id: string]: true;
138
- }> | undefined;
139
- username?: string | null | undefined;
140
- userState?: import("@excalidraw/common").UserIdleState | undefined;
141
- color?: {
142
- background: string;
143
- stroke: string;
144
- } | undefined;
145
- avatarUrl?: string | undefined;
146
- id?: string | undefined;
147
- socketId?: import("../types").SocketId | undefined;
148
- isCurrentUser?: boolean | undefined;
149
- isInCall?: boolean | undefined;
150
- isSpeaking?: boolean | undefined;
151
- isMuted?: boolean | undefined;
152
- }>>;
139
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
153
140
  currentChartType: import("@excalidraw/element/types").ChartType;
154
141
  pasteDialog: {
155
142
  shown: false;
@@ -158,7 +145,7 @@ export declare const actionToggleStats: {
158
145
  shown: true;
159
146
  data: import("../charts").Spreadsheet;
160
147
  };
161
- showHyperlinkPopup: false | "editor" | "info";
148
+ showHyperlinkPopup: false | "info" | "editor";
162
149
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
163
150
  snapLines: readonly import("../snapping").SnapLine[];
164
151
  originSnapOffset: {
@@ -169,15 +156,16 @@ export declare const actionToggleStats: {
169
156
  userToFollow: import("../types").UserToFollow | null;
170
157
  followedBy: Set<import("../types").SocketId>;
171
158
  isCropping: boolean;
172
- croppingElementId: string | null;
159
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
173
160
  searchMatches: Readonly<{
174
- focusedId: string | null;
161
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
175
162
  matches: readonly import("../types").SearchMatch[];
176
163
  }> | null;
177
164
  activeLockedId: string | null;
178
165
  lockedMultiSelections: {
179
166
  [groupId: string]: true;
180
167
  };
168
+ bindMode: import("@excalidraw/element/types").BindMode;
181
169
  };
182
170
  captureUpdate: "EVENTUALLY";
183
171
  };