@zsviczian/excalidraw 0.18.0-1 → 0.18.0-10

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 (243) hide show
  1. package/README.md +1 -1
  2. package/dist/excalidraw.development.js +2231 -2418
  3. package/dist/excalidraw.production.min.js +1 -1
  4. package/dist/excalidraw.production.min.js.LICENSE.txt +0 -32
  5. package/dist/styles.development.css +2995 -3004
  6. package/dist/styles.production.css +28 -28
  7. package/package.json +14 -2
  8. package/types/{excalidraw/binaryheap.d.ts → common/src/binary-heap.d.ts} +1 -1
  9. package/types/{excalidraw → common/src}/colors.d.ts +1 -0
  10. package/types/{excalidraw → common/src}/constants.d.ts +10 -7
  11. package/types/{excalidraw/fonts/FontMetadata.d.ts → common/src/font-metadata.d.ts} +11 -3
  12. package/types/common/src/index.d.ts +11 -0
  13. package/types/{excalidraw → common/src}/points.d.ts +2 -0
  14. package/types/common/src/promise-pool.d.ts +6 -0
  15. package/types/{excalidraw → common/src}/utils.d.ts +13 -12
  16. package/types/{excalidraw/scene → element/src}/Shape.d.ts +2 -2
  17. package/types/{excalidraw/scene → element/src}/ShapeCache.d.ts +4 -4
  18. package/types/{excalidraw → element/src}/align.d.ts +2 -2
  19. package/types/{excalidraw/element → element/src}/binding.d.ts +8 -8
  20. package/types/{excalidraw/element → element/src}/bounds.d.ts +9 -4
  21. package/types/{excalidraw/element → element/src}/collision.d.ts +3 -3
  22. package/types/{excalidraw/scene → element/src}/comparisons.d.ts +1 -1
  23. package/types/{excalidraw → element/src}/distribute.d.ts +1 -1
  24. package/types/{excalidraw/element → element/src}/dragElements.d.ts +3 -3
  25. package/types/element/src/duplicate.d.ts +63 -0
  26. package/types/{excalidraw/element → element/src}/elbowArrow.d.ts +2 -2
  27. package/types/{excalidraw/element → element/src}/elementLink.d.ts +1 -1
  28. package/types/element/src/embeddable.d.ts +10 -0
  29. package/types/{excalidraw/element → element/src}/flowchart.d.ts +1 -1
  30. package/types/{excalidraw → element/src}/fractionalIndex.d.ts +4 -1
  31. package/types/{excalidraw → element/src}/frame.d.ts +7 -7
  32. package/types/{excalidraw → element/src}/groups.d.ts +5 -5
  33. package/types/{excalidraw/element → element/src}/heading.d.ts +1 -2
  34. package/types/{excalidraw/element → element/src}/image.d.ts +2 -2
  35. package/types/{excalidraw/element → element/src}/index.d.ts +0 -10
  36. package/types/{excalidraw/element → element/src}/linearElementEditor.d.ts +7 -7
  37. package/types/{excalidraw/element → element/src}/mutateElement.d.ts +1 -1
  38. package/types/{excalidraw/element → element/src}/newElement.d.ts +3 -43
  39. package/types/{excalidraw/renderer → element/src}/renderElement.d.ts +3 -3
  40. package/types/{excalidraw/element → element/src}/resizeElements.d.ts +4 -4
  41. package/types/{excalidraw/element → element/src}/resizeTest.d.ts +4 -4
  42. package/types/{excalidraw/scene → element/src}/selection.d.ts +13 -2
  43. package/types/element/src/shapes.d.ts +23 -0
  44. package/types/{excalidraw/element → element/src}/showSelectedShapeActions.d.ts +1 -1
  45. package/types/{excalidraw/element → element/src}/sizeHelpers.d.ts +1 -1
  46. package/types/{excalidraw/element → element/src}/textElement.d.ts +5 -5
  47. package/types/{excalidraw/element → element/src}/transformHandles.d.ts +7 -7
  48. package/types/{excalidraw/element → element/src}/typeChecks.d.ts +2 -2
  49. package/types/{excalidraw/element → element/src}/types.d.ts +2 -2
  50. package/types/{excalidraw/element → element/src}/utils.d.ts +1 -1
  51. package/types/{excalidraw → element/src}/zindex.d.ts +5 -4
  52. package/types/excalidraw/actions/actionAddToLibrary.d.ts +94 -79
  53. package/types/excalidraw/actions/actionAlign.d.ts +7 -7
  54. package/types/excalidraw/actions/actionBoundText.d.ts +68 -58
  55. package/types/excalidraw/actions/actionCanvas.d.ts +738 -455
  56. package/types/excalidraw/actions/actionClipboard.d.ts +197 -167
  57. package/types/excalidraw/actions/actionCropEditor.d.ts +33 -28
  58. package/types/excalidraw/actions/actionDeleteSelected.d.ts +94 -79
  59. package/types/excalidraw/actions/actionDistribute.d.ts +3 -3
  60. package/types/excalidraw/actions/actionDuplicateSelection.d.ts +3 -7
  61. package/types/excalidraw/actions/actionElementLink.d.ts +37 -32
  62. package/types/excalidraw/actions/actionElementLock.d.ts +67 -58
  63. package/types/excalidraw/{element/embeddable.d.ts → actions/actionEmbeddable.d.ts} +33 -38
  64. package/types/excalidraw/actions/actionExport.d.ts +374 -329
  65. package/types/excalidraw/actions/actionFinalize.d.ts +55 -45
  66. package/types/excalidraw/actions/actionFlip.d.ts +3 -3
  67. package/types/excalidraw/actions/actionFrame.d.ts +243 -223
  68. package/types/excalidraw/actions/actionGroup.d.ts +65 -55
  69. package/types/excalidraw/actions/actionHistory.d.ts +1 -1
  70. package/types/excalidraw/actions/actionLinearEditor.d.ts +34 -29
  71. package/types/excalidraw/actions/actionLink.d.ts +33 -28
  72. package/types/excalidraw/actions/actionMenu.d.ts +94 -79
  73. package/types/excalidraw/actions/actionNavigate.d.ts +62 -52
  74. package/types/excalidraw/actions/actionProperties.d.ts +422 -347
  75. package/types/excalidraw/actions/actionSelectAll.d.ts +33 -28
  76. package/types/excalidraw/actions/actionStyles.d.ts +35 -30
  77. package/types/excalidraw/actions/actionTextAutoResize.d.ts +3 -3
  78. package/types/excalidraw/actions/actionToggleGridMode.d.ts +33 -28
  79. package/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +33 -28
  80. package/types/excalidraw/actions/actionToggleSearchMenu.d.ts +64 -54
  81. package/types/excalidraw/actions/actionToggleStats.d.ts +32 -28
  82. package/types/excalidraw/actions/actionToggleViewMode.d.ts +33 -29
  83. package/types/excalidraw/actions/actionToggleZenMode.d.ts +33 -29
  84. package/types/excalidraw/actions/actionZindex.d.ts +8 -8
  85. package/types/excalidraw/actions/index.d.ts +1 -0
  86. package/types/excalidraw/actions/manager.d.ts +2 -2
  87. package/types/excalidraw/actions/shortcuts.d.ts +1 -1
  88. package/types/excalidraw/actions/types.d.ts +4 -4
  89. package/types/excalidraw/animated-trail.d.ts +7 -1
  90. package/types/excalidraw/appState.d.ts +32 -31
  91. package/types/excalidraw/change.d.ts +3 -3
  92. package/types/excalidraw/charts.d.ts +1 -1
  93. package/types/excalidraw/clipboard.d.ts +7 -7
  94. package/types/excalidraw/components/Actions.d.ts +3 -3
  95. package/types/excalidraw/components/App.d.ts +32 -32
  96. package/types/excalidraw/components/Avatar.d.ts +1 -1
  97. package/types/excalidraw/components/ButtonIcon.d.ts +1 -1
  98. package/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +4 -4
  99. package/types/excalidraw/components/ColorPicker/HotkeyLabel.d.ts +1 -2
  100. package/types/excalidraw/components/ColorPicker/Picker.d.ts +2 -2
  101. package/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +1 -1
  102. package/types/excalidraw/components/ColorPicker/ShadeList.d.ts +1 -1
  103. package/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +3 -3
  104. package/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +1 -1
  105. package/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +1 -1
  106. package/types/excalidraw/components/ConfirmDialog.d.ts +1 -1
  107. package/types/excalidraw/components/ContextMenu.d.ts +2 -2
  108. package/types/excalidraw/components/DarkModeToggle.d.ts +1 -1
  109. package/types/excalidraw/components/DefaultSidebar.d.ts +2 -2
  110. package/types/excalidraw/components/DialogActionButton.d.ts +1 -1
  111. package/types/excalidraw/{element → components}/ElementCanvasButtons.d.ts +1 -1
  112. package/types/excalidraw/components/ElementLinkDialog.d.ts +2 -2
  113. package/types/excalidraw/components/EyeDropper.d.ts +1 -1
  114. package/types/excalidraw/components/FixedSideContainer.d.ts +1 -1
  115. package/types/excalidraw/components/FollowMode/FollowMode.d.ts +1 -1
  116. package/types/excalidraw/components/FontPicker/FontPicker.d.ts +1 -1
  117. package/types/excalidraw/components/FontPicker/FontPickerList.d.ts +3 -3
  118. package/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +1 -1
  119. package/types/excalidraw/components/FontPicker/keyboardNavHandlers.d.ts +1 -1
  120. package/types/excalidraw/components/HintViewer.d.ts +1 -1
  121. package/types/excalidraw/components/IconPicker.d.ts +1 -1
  122. package/types/excalidraw/components/ImageExportDialog.d.ts +2 -2
  123. package/types/excalidraw/components/InitializeApp.d.ts +1 -1
  124. package/types/excalidraw/components/Island.d.ts +1 -1
  125. package/types/excalidraw/components/JSONExportDialog.d.ts +2 -2
  126. package/types/excalidraw/components/LayerUI.d.ts +3 -3
  127. package/types/excalidraw/components/LibraryMenuHeaderContent.d.ts +1 -1
  128. package/types/excalidraw/components/LibraryMenuItems.d.ts +1 -1
  129. package/types/excalidraw/components/LibraryMenuSection.d.ts +3 -3
  130. package/types/excalidraw/components/LibraryUnit.d.ts +2 -2
  131. package/types/excalidraw/components/LoadingMessage.d.ts +1 -1
  132. package/types/excalidraw/components/MagicButton.d.ts +1 -1
  133. package/types/excalidraw/components/MobileMenu.d.ts +3 -3
  134. package/types/excalidraw/components/PasteChartDialog.d.ts +1 -1
  135. package/types/excalidraw/components/PropertiesPopover.d.ts +1 -1
  136. package/types/excalidraw/components/PublishLibrary.d.ts +1 -1
  137. package/types/excalidraw/components/SVGLayer.d.ts +1 -1
  138. package/types/excalidraw/components/Sidebar/SidebarTrigger.d.ts +1 -1
  139. package/types/excalidraw/components/Sidebar/common.d.ts +1 -1
  140. package/types/excalidraw/components/Stack.d.ts +1 -1
  141. package/types/excalidraw/components/Stats/Angle.d.ts +1 -1
  142. package/types/excalidraw/components/Stats/Dimension.d.ts +1 -1
  143. package/types/excalidraw/components/Stats/DragInput.d.ts +2 -2
  144. package/types/excalidraw/components/Stats/FontSize.d.ts +1 -1
  145. package/types/excalidraw/components/Stats/MultiAngle.d.ts +1 -1
  146. package/types/excalidraw/components/Stats/MultiDimension.d.ts +2 -2
  147. package/types/excalidraw/components/Stats/MultiFontSize.d.ts +1 -1
  148. package/types/excalidraw/components/Stats/MultiPosition.d.ts +2 -2
  149. package/types/excalidraw/components/Stats/Position.d.ts +1 -1
  150. package/types/excalidraw/components/Stats/index.d.ts +2 -2
  151. package/types/excalidraw/components/Stats/utils.d.ts +1 -1
  152. package/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +1 -1
  153. package/types/excalidraw/components/TTDDialog/MermaidToExcalidrawLib.d.ts +1 -1
  154. package/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +1 -1
  155. package/types/excalidraw/components/TTDDialog/common.d.ts +3 -3
  156. package/types/excalidraw/components/TextField.d.ts +1 -1
  157. package/types/excalidraw/components/Toast.d.ts +1 -1
  158. package/types/excalidraw/components/ToolButton.d.ts +2 -2
  159. package/types/excalidraw/components/Tooltip.d.ts +1 -1
  160. package/types/excalidraw/components/UserList.d.ts +1 -1
  161. package/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +4 -3
  162. package/types/excalidraw/components/canvases/NewElementCanvas.d.ts +2 -2
  163. package/types/excalidraw/components/canvases/StaticCanvas.d.ts +3 -3
  164. package/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +1 -1
  165. package/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +2 -2
  166. package/types/excalidraw/components/dropdownMenu/DropdownMenuItemLink.d.ts +1 -1
  167. package/types/excalidraw/components/hyperlink/Hyperlink.d.ts +2 -2
  168. package/types/excalidraw/components/hyperlink/helpers.d.ts +2 -2
  169. package/types/excalidraw/components/icons.d.ts +2 -1
  170. package/types/excalidraw/components/main-menu/DefaultItems.d.ts +1 -1
  171. package/types/excalidraw/components/main-menu/MainMenu.d.ts +4 -1
  172. package/types/excalidraw/components/shapes.d.ts +62 -0
  173. package/types/excalidraw/context/tunnels.d.ts +1 -1
  174. package/types/excalidraw/data/EditorLocalStorage.d.ts +1 -1
  175. package/types/excalidraw/data/blob.d.ts +4 -4
  176. package/types/excalidraw/data/filesystem.d.ts +2 -2
  177. package/types/excalidraw/data/index.d.ts +2 -2
  178. package/types/excalidraw/data/json.d.ts +1 -1
  179. package/types/excalidraw/data/library.d.ts +3 -3
  180. package/types/excalidraw/data/reconcile.d.ts +2 -2
  181. package/types/excalidraw/data/resave.d.ts +1 -1
  182. package/types/excalidraw/data/restore.d.ts +1 -1
  183. package/types/excalidraw/data/transform.d.ts +4 -4
  184. package/types/excalidraw/data/types.d.ts +3 -3
  185. package/types/excalidraw/eraser/index.d.ts +14 -0
  186. package/types/excalidraw/errors.d.ts +0 -3
  187. package/types/excalidraw/fonts/Fonts.d.ts +2 -12
  188. package/types/excalidraw/history.d.ts +2 -2
  189. package/types/excalidraw/i18n.d.ts +1 -1
  190. package/types/excalidraw/index.d.ts +29 -35
  191. package/types/excalidraw/laser-trails.d.ts +1 -1
  192. package/types/excalidraw/lasso/index.d.ts +15 -0
  193. package/types/excalidraw/lasso/utils.d.ts +12 -0
  194. package/types/excalidraw/obsidianUtils.d.ts +3 -2
  195. package/types/excalidraw/renderer/helpers.d.ts +2 -2
  196. package/types/excalidraw/renderer/staticSvgScene.d.ts +2 -2
  197. package/types/excalidraw/scene/Renderer.d.ts +3 -3
  198. package/types/excalidraw/scene/Scene.d.ts +5 -5
  199. package/types/excalidraw/scene/export.d.ts +1 -1
  200. package/types/excalidraw/scene/index.d.ts +2 -2
  201. package/types/excalidraw/scene/scroll.d.ts +1 -1
  202. package/types/excalidraw/scene/scrollbars.d.ts +2 -3
  203. package/types/excalidraw/scene/types.d.ts +4 -4
  204. package/types/excalidraw/snapping.d.ts +5 -6
  205. package/types/excalidraw/store.d.ts +2 -2
  206. package/types/excalidraw/types.d.ts +26 -16
  207. package/types/excalidraw/visualdebug.d.ts +2 -2
  208. package/types/excalidraw/webpack.dev.config.d.ts +2 -0
  209. package/types/excalidraw/webpack.prod.config.d.ts +2 -0
  210. package/types/excalidraw/{element → wysiwyg}/textWysiwyg.d.ts +1 -1
  211. package/types/math/{point.d.ts → src/point.d.ts} +2 -2
  212. package/types/math/{polygon.d.ts → src/polygon.d.ts} +1 -0
  213. package/types/math/{segment.d.ts → src/segment.d.ts} +1 -1
  214. package/types/math/{types.d.ts → src/types.d.ts} +1 -0
  215. package/types/utils/{bbox.d.ts → src/bbox.d.ts} +1 -1
  216. package/types/utils/{collision.d.ts → src/collision.d.ts} +2 -3
  217. package/types/utils/{export.d.ts → src/export.d.ts} +2 -12
  218. package/types/utils/{index.d.ts → src/index.d.ts} +1 -1
  219. package/types/utils/{geometry → src}/shape.d.ts +2 -15
  220. package/types/utils/{withinBounds.d.ts → src/withinBounds.d.ts} +2 -2
  221. package/types/excalidraw/shapes.d.ts +0 -85
  222. /package/types/{excalidraw → common/src}/keys.d.ts +0 -0
  223. /package/types/{excalidraw → common/src}/queue.d.ts +0 -0
  224. /package/types/{excalidraw → common/src}/random.d.ts +0 -0
  225. /package/types/{excalidraw/data → common/src}/url.d.ts +0 -0
  226. /package/types/{excalidraw → common/src}/utility-types.d.ts +0 -0
  227. /package/types/{excalidraw/element → element/src}/containerCache.d.ts +0 -0
  228. /package/types/{excalidraw/element → element/src}/cropElement.d.ts +0 -0
  229. /package/types/{excalidraw/element → element/src}/distance.d.ts +0 -0
  230. /package/types/{excalidraw/renderer → element/src}/easingFunctions.d.ts +0 -0
  231. /package/types/{excalidraw/element → element/src}/sortElements.d.ts +0 -0
  232. /package/types/{excalidraw/element → element/src}/textMeasurements.d.ts +0 -0
  233. /package/types/{excalidraw/element → element/src}/textWrapping.d.ts +0 -0
  234. /package/types/math/{angle.d.ts → src/angle.d.ts} +0 -0
  235. /package/types/math/{curve.d.ts → src/curve.d.ts} +0 -0
  236. /package/types/math/{ellipse.d.ts → src/ellipse.d.ts} +0 -0
  237. /package/types/math/{index.d.ts → src/index.d.ts} +0 -0
  238. /package/types/math/{line.d.ts → src/line.d.ts} +0 -0
  239. /package/types/math/{range.d.ts → src/range.d.ts} +0 -0
  240. /package/types/math/{rectangle.d.ts → src/rectangle.d.ts} +0 -0
  241. /package/types/math/{triangle.d.ts → src/triangle.d.ts} +0 -0
  242. /package/types/math/{utils.d.ts → src/utils.d.ts} +0 -0
  243. /package/types/math/{vector.d.ts → src/vector.d.ts} +0 -0
@@ -1,14 +1,13 @@
1
1
  export declare const actionToggleViewMode: {
2
2
  name: "viewMode";
3
3
  label: string;
4
- paletteName: string;
5
4
  icon: import("react/jsx-runtime").JSX.Element;
6
5
  viewMode: true;
7
6
  trackEvent: {
8
7
  category: "canvas";
9
8
  predicate: (appState: Readonly<import("../types").AppState>) => boolean;
10
9
  };
11
- perform(elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: import("../types").AppClassProperties): {
10
+ perform(elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: import("../types").AppClassProperties): {
12
11
  appState: {
13
12
  viewModeEnabled: boolean;
14
13
  contextMenu: {
@@ -20,17 +19,17 @@ export declare const actionToggleViewMode: {
20
19
  isLoading: boolean;
21
20
  errorMessage: import("react").ReactNode;
22
21
  activeEmbeddable: {
23
- element: import("../element/types").NonDeletedExcalidrawElement;
22
+ element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
24
23
  state: "active" | "hover";
25
24
  } | null;
26
- newElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawNonSelectionElement> | null;
27
- resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
28
- multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
29
- selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
25
+ newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
26
+ resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
27
+ multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
28
+ selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
30
29
  isBindingEnabled: boolean;
31
- startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
32
- suggestedBindings: import("../element/binding").SuggestedBinding[];
33
- frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameLikeElement> | null;
30
+ startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
31
+ suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
32
+ frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
34
33
  frameRendering: {
35
34
  enabled: boolean;
36
35
  name: boolean;
@@ -38,12 +37,13 @@ export declare const actionToggleViewMode: {
38
37
  clip: boolean;
39
38
  };
40
39
  editingFrame: string | null;
41
- elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
42
- editingTextElement: import("../element/types").NonDeletedExcalidrawElement | null;
43
- editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
40
+ elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
41
+ editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
42
+ editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
44
43
  activeTool: {
45
44
  lastActiveTool: import("../types").ActiveTool | null;
46
45
  locked: boolean;
46
+ fromSelection: boolean;
47
47
  } & import("../types").ActiveTool;
48
48
  penMode: boolean;
49
49
  penDetected: boolean;
@@ -53,18 +53,18 @@ export declare const actionToggleViewMode: {
53
53
  exportScale: number;
54
54
  currentItemStrokeColor: string;
55
55
  currentItemBackgroundColor: string;
56
- currentItemFillStyle: import("../element/types").FillStyle;
56
+ currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
57
57
  currentItemStrokeWidth: number;
58
- currentItemStrokeStyle: import("../element/types").StrokeStyle;
58
+ currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
59
59
  currentItemRoughness: number;
60
60
  currentItemOpacity: number;
61
61
  currentItemFontFamily: number;
62
62
  currentItemFontSize: number;
63
63
  currentItemTextAlign: string;
64
- currentItemStartArrowhead: import("../element/types").Arrowhead | null;
65
- currentItemEndArrowhead: import("../element/types").Arrowhead | null;
64
+ currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
65
+ currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
66
66
  currentHoveredFontFamily: number | null;
67
- currentItemRoundness: import("../element/types").StrokeRoundness;
67
+ currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
68
68
  currentItemArrowType: "round" | "sharp" | "elbow";
69
69
  viewBackgroundColor: string;
70
70
  scrollX: number;
@@ -77,7 +77,7 @@ export declare const actionToggleViewMode: {
77
77
  zoom: Readonly<{
78
78
  value: import("../types").NormalizedZoomValue;
79
79
  }>;
80
- openMenu: "canvas" | "shape" | null;
80
+ openMenu: "shape" | "canvas" | null;
81
81
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
82
82
  openSidebar: {
83
83
  name: string;
@@ -95,7 +95,7 @@ export declare const actionToggleViewMode: {
95
95
  sourceElementId: string;
96
96
  } | null;
97
97
  defaultSidebarDockedPreference: boolean;
98
- lastPointerDownWith: import("../element/types").PointerType;
98
+ lastPointerDownWith: import("@excalidraw/element/types").PointerType;
99
99
  selectedElementIds: Readonly<{
100
100
  [id: string]: true;
101
101
  }>;
@@ -113,7 +113,7 @@ export declare const actionToggleViewMode: {
113
113
  duration?: number | undefined;
114
114
  } | null;
115
115
  zenModeEnabled: boolean;
116
- theme: import("../element/types").Theme;
116
+ theme: import("@excalidraw/element/types").Theme;
117
117
  gridSize: number;
118
118
  gridStep: number;
119
119
  gridModeEnabled: boolean;
@@ -133,7 +133,7 @@ export declare const actionToggleViewMode: {
133
133
  [id: string]: true;
134
134
  }> | undefined;
135
135
  username?: string | null | undefined;
136
- userState?: import("..").UserIdleState | undefined;
136
+ userState?: import("@excalidraw/common").UserIdleState | undefined;
137
137
  color?: {
138
138
  background: string;
139
139
  stroke: string;
@@ -150,7 +150,7 @@ export declare const actionToggleViewMode: {
150
150
  open: boolean;
151
151
  panels: number;
152
152
  };
153
- currentChartType: import("../element/types").ChartType;
153
+ currentChartType: import("@excalidraw/element/types").ChartType;
154
154
  pasteDialog: {
155
155
  shown: false;
156
156
  data: null;
@@ -159,13 +159,13 @@ export declare const actionToggleViewMode: {
159
159
  data: import("../charts").Spreadsheet;
160
160
  };
161
161
  pendingImageElementId: string | null;
162
- showHyperlinkPopup: false | "info" | "editor";
162
+ showHyperlinkPopup: false | "editor" | "info";
163
163
  linkOpacity: number;
164
164
  trayModeEnabled: boolean;
165
165
  colorPalette?: {
166
- canvasBackground: import("../colors").ColorPaletteCustom;
167
- elementBackground: import("../colors").ColorPaletteCustom;
168
- elementStroke: import("../colors").ColorPaletteCustom;
166
+ canvasBackground: import("@excalidraw/common").ColorPaletteCustom;
167
+ elementBackground: import("@excalidraw/common").ColorPaletteCustom;
168
+ elementStroke: import("@excalidraw/common").ColorPaletteCustom;
169
169
  topPicks: {
170
170
  canvasBackground: [string, string, string, string, string];
171
171
  elementStroke: [string, string, string, string, string];
@@ -182,6 +182,10 @@ export declare const actionToggleViewMode: {
182
182
  Bold: string;
183
183
  Regular: string;
184
184
  };
185
+ gridDirection: {
186
+ horizontal: boolean;
187
+ vertical: boolean;
188
+ };
185
189
  highlightSearchResult: boolean;
186
190
  dynamicStyle: {
187
191
  [x: string]: string;
@@ -192,7 +196,7 @@ export declare const actionToggleViewMode: {
192
196
  nameColor: string;
193
197
  };
194
198
  invertBindingBehaviour: boolean;
195
- selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
199
+ selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
196
200
  snapLines: readonly import("../snapping").SnapLine[];
197
201
  originSnapOffset: {
198
202
  x: number;
@@ -217,7 +221,7 @@ export declare const actionToggleViewMode: {
217
221
  captureUpdate: "EVENTUALLY";
218
222
  };
219
223
  checked: (appState: Readonly<import("../types").AppState>) => boolean;
220
- predicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps) => boolean;
224
+ predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps) => boolean;
221
225
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
222
226
  } & {
223
227
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
@@ -2,13 +2,12 @@ export declare const actionToggleZenMode: {
2
2
  name: "zenMode";
3
3
  label: string;
4
4
  icon: import("react/jsx-runtime").JSX.Element;
5
- paletteName: string;
6
5
  viewMode: true;
7
6
  trackEvent: {
8
7
  category: "canvas";
9
8
  predicate: (appState: Readonly<import("../types").AppState>) => boolean;
10
9
  };
11
- perform(elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>): {
10
+ perform(elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>): {
12
11
  appState: {
13
12
  zenModeEnabled: boolean;
14
13
  contextMenu: {
@@ -20,17 +19,17 @@ export declare const actionToggleZenMode: {
20
19
  isLoading: boolean;
21
20
  errorMessage: import("react").ReactNode;
22
21
  activeEmbeddable: {
23
- element: import("../element/types").NonDeletedExcalidrawElement;
22
+ element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
24
23
  state: "active" | "hover";
25
24
  } | null;
26
- newElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawNonSelectionElement> | null;
27
- resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
28
- multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
29
- selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
25
+ newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
26
+ resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
27
+ multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
28
+ selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
30
29
  isBindingEnabled: boolean;
31
- startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
32
- suggestedBindings: import("../element/binding").SuggestedBinding[];
33
- frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameLikeElement> | null;
30
+ startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
31
+ suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
32
+ frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
34
33
  frameRendering: {
35
34
  enabled: boolean;
36
35
  name: boolean;
@@ -38,12 +37,13 @@ export declare const actionToggleZenMode: {
38
37
  clip: boolean;
39
38
  };
40
39
  editingFrame: string | null;
41
- elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
42
- editingTextElement: import("../element/types").NonDeletedExcalidrawElement | null;
43
- editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
40
+ elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
41
+ editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
42
+ editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
44
43
  activeTool: {
45
44
  lastActiveTool: import("../types").ActiveTool | null;
46
45
  locked: boolean;
46
+ fromSelection: boolean;
47
47
  } & import("../types").ActiveTool;
48
48
  penMode: boolean;
49
49
  penDetected: boolean;
@@ -53,18 +53,18 @@ export declare const actionToggleZenMode: {
53
53
  exportScale: number;
54
54
  currentItemStrokeColor: string;
55
55
  currentItemBackgroundColor: string;
56
- currentItemFillStyle: import("../element/types").FillStyle;
56
+ currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
57
57
  currentItemStrokeWidth: number;
58
- currentItemStrokeStyle: import("../element/types").StrokeStyle;
58
+ currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
59
59
  currentItemRoughness: number;
60
60
  currentItemOpacity: number;
61
61
  currentItemFontFamily: number;
62
62
  currentItemFontSize: number;
63
63
  currentItemTextAlign: string;
64
- currentItemStartArrowhead: import("../element/types").Arrowhead | null;
65
- currentItemEndArrowhead: import("../element/types").Arrowhead | null;
64
+ currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
65
+ currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
66
66
  currentHoveredFontFamily: number | null;
67
- currentItemRoundness: import("../element/types").StrokeRoundness;
67
+ currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
68
68
  currentItemArrowType: "round" | "sharp" | "elbow";
69
69
  viewBackgroundColor: string;
70
70
  scrollX: number;
@@ -77,7 +77,7 @@ export declare const actionToggleZenMode: {
77
77
  zoom: Readonly<{
78
78
  value: import("../types").NormalizedZoomValue;
79
79
  }>;
80
- openMenu: "canvas" | "shape" | null;
80
+ openMenu: "shape" | "canvas" | null;
81
81
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
82
82
  openSidebar: {
83
83
  name: string;
@@ -95,7 +95,7 @@ export declare const actionToggleZenMode: {
95
95
  sourceElementId: string;
96
96
  } | null;
97
97
  defaultSidebarDockedPreference: boolean;
98
- lastPointerDownWith: import("../element/types").PointerType;
98
+ lastPointerDownWith: import("@excalidraw/element/types").PointerType;
99
99
  selectedElementIds: Readonly<{
100
100
  [id: string]: true;
101
101
  }>;
@@ -112,7 +112,7 @@ export declare const actionToggleZenMode: {
112
112
  closable?: boolean | undefined;
113
113
  duration?: number | undefined;
114
114
  } | null;
115
- theme: import("../element/types").Theme;
115
+ theme: import("@excalidraw/element/types").Theme;
116
116
  gridSize: number;
117
117
  gridStep: number;
118
118
  gridModeEnabled: boolean;
@@ -133,7 +133,7 @@ export declare const actionToggleZenMode: {
133
133
  [id: string]: true;
134
134
  }> | undefined;
135
135
  username?: string | null | undefined;
136
- userState?: import("..").UserIdleState | undefined;
136
+ userState?: import("@excalidraw/common").UserIdleState | undefined;
137
137
  color?: {
138
138
  background: string;
139
139
  stroke: string;
@@ -150,7 +150,7 @@ export declare const actionToggleZenMode: {
150
150
  open: boolean;
151
151
  panels: number;
152
152
  };
153
- currentChartType: import("../element/types").ChartType;
153
+ currentChartType: import("@excalidraw/element/types").ChartType;
154
154
  pasteDialog: {
155
155
  shown: false;
156
156
  data: null;
@@ -159,13 +159,13 @@ export declare const actionToggleZenMode: {
159
159
  data: import("../charts").Spreadsheet;
160
160
  };
161
161
  pendingImageElementId: string | null;
162
- showHyperlinkPopup: false | "info" | "editor";
162
+ showHyperlinkPopup: false | "editor" | "info";
163
163
  linkOpacity: number;
164
164
  trayModeEnabled: boolean;
165
165
  colorPalette?: {
166
- canvasBackground: import("../colors").ColorPaletteCustom;
167
- elementBackground: import("../colors").ColorPaletteCustom;
168
- elementStroke: import("../colors").ColorPaletteCustom;
166
+ canvasBackground: import("@excalidraw/common").ColorPaletteCustom;
167
+ elementBackground: import("@excalidraw/common").ColorPaletteCustom;
168
+ elementStroke: import("@excalidraw/common").ColorPaletteCustom;
169
169
  topPicks: {
170
170
  canvasBackground: [string, string, string, string, string];
171
171
  elementStroke: [string, string, string, string, string];
@@ -182,6 +182,10 @@ export declare const actionToggleZenMode: {
182
182
  Bold: string;
183
183
  Regular: string;
184
184
  };
185
+ gridDirection: {
186
+ horizontal: boolean;
187
+ vertical: boolean;
188
+ };
185
189
  highlightSearchResult: boolean;
186
190
  dynamicStyle: {
187
191
  [x: string]: string;
@@ -192,7 +196,7 @@ export declare const actionToggleZenMode: {
192
196
  nameColor: string;
193
197
  };
194
198
  invertBindingBehaviour: boolean;
195
- selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
199
+ selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
196
200
  snapLines: readonly import("../snapping").SnapLine[];
197
201
  originSnapOffset: {
198
202
  x: number;
@@ -217,7 +221,7 @@ export declare const actionToggleZenMode: {
217
221
  captureUpdate: "EVENTUALLY";
218
222
  };
219
223
  checked: (appState: Readonly<import("../types").AppState>) => boolean;
220
- predicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps) => boolean;
224
+ predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps) => boolean;
221
225
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
222
226
  } & {
223
227
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
@@ -6,8 +6,8 @@ export declare const actionSendBackward: {
6
6
  trackEvent: {
7
7
  category: "element";
8
8
  };
9
- perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
10
- elements: readonly import("../element/types").ExcalidrawElement[];
9
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: any, app: import("../types").AppClassProperties) => {
10
+ elements: readonly import("@excalidraw/element/types").ExcalidrawElement[];
11
11
  appState: Readonly<import("../types").AppState>;
12
12
  captureUpdate: "IMMEDIATELY";
13
13
  };
@@ -25,8 +25,8 @@ export declare const actionBringForward: {
25
25
  trackEvent: {
26
26
  category: "element";
27
27
  };
28
- perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
29
- elements: readonly import("../element/types").ExcalidrawElement[];
28
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: any, app: import("../types").AppClassProperties) => {
29
+ elements: readonly import("@excalidraw/element/types").ExcalidrawElement[];
30
30
  appState: Readonly<import("../types").AppState>;
31
31
  captureUpdate: "IMMEDIATELY";
32
32
  };
@@ -44,8 +44,8 @@ export declare const actionSendToBack: {
44
44
  trackEvent: {
45
45
  category: "element";
46
46
  };
47
- perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
48
- elements: readonly import("../element/types").ExcalidrawElement[] | import("../element/types").ExcalidrawElement[];
47
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
48
+ elements: readonly import("@excalidraw/element/types").ExcalidrawElement[] | import("@excalidraw/element/types").ExcalidrawElement[];
49
49
  appState: Readonly<import("../types").AppState>;
50
50
  captureUpdate: "IMMEDIATELY";
51
51
  };
@@ -62,8 +62,8 @@ export declare const actionBringToFront: {
62
62
  trackEvent: {
63
63
  category: "element";
64
64
  };
65
- perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
66
- elements: readonly import("../element/types").ExcalidrawElement[] | import("../element/types").ExcalidrawElement[];
65
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
66
+ elements: readonly import("@excalidraw/element/types").ExcalidrawElement[] | import("@excalidraw/element/types").ExcalidrawElement[];
67
67
  appState: Readonly<import("../types").AppState>;
68
68
  captureUpdate: "IMMEDIATELY";
69
69
  };
@@ -4,6 +4,7 @@ export { actionSelectAll } from "./actionSelectAll";
4
4
  export { actionDuplicateSelection } from "./actionDuplicateSelection";
5
5
  export { actionChangeStrokeColor, actionChangeBackgroundColor, actionChangeStrokeWidth, actionChangeFillStyle, actionChangeSloppiness, actionChangeOpacity, actionChangeFontSize, actionChangeFontFamily, actionChangeTextAlign, actionChangeVerticalAlign, } from "./actionProperties";
6
6
  export { actionChangeViewBackgroundColor, actionClearCanvas, actionZoomIn, actionZoomOut, actionResetZoom, actionZoomToFit, actionToggleTheme, zoomToFitElements, } from "./actionCanvas";
7
+ export { actionSetEmbeddableAsActiveTool } from "./actionEmbeddable";
7
8
  export { actionFinalize } from "./actionFinalize";
8
9
  export { actionChangeProjectName, actionChangeExportBackground, actionSaveToActiveFile, actionSaveFileToDisk, actionLoadScene, } from "./actionExport";
9
10
  export { actionCopyStyles, actionPasteStyles } from "./actionStyles";
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
- import type { Action, UpdaterFn, ActionName, ActionResult, PanelComponentProps, ActionSource } from "./types";
3
- import type { OrderedExcalidrawElement } from "../element/types";
2
+ import type { OrderedExcalidrawElement } from "@excalidraw/element/types";
4
3
  import type { AppClassProperties, AppState } from "../types";
4
+ import type { Action, UpdaterFn, ActionName, ActionResult, PanelComponentProps, ActionSource } from "./types";
5
5
  export declare class ActionManager {
6
6
  actions: Record<ActionName, Action>;
7
7
  updater: (actionResult: ActionResult | Promise<ActionResult>) => void;
@@ -1,4 +1,4 @@
1
- import type { SubtypeOf } from "../utility-types";
1
+ import type { SubtypeOf } from "@excalidraw/common/utility-types";
2
2
  import type { ActionName } from "./types";
3
3
  export type ShortcutName = SubtypeOf<ActionName, "toggleTheme" | "loadScene" | "clearCanvas" | "cut" | "copy" | "paste" | "copyStyles" | "pasteStyles" | "selectAll" | "deleteSelectedElements" | "duplicateSelection" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyAsPng" | "group" | "ungroup" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "addToLibrary" | "viewMode" | "flipHorizontal" | "flipVertical" | "hyperlink" | "toggleElementLock" | "toggleLaserPointerTool" | "resetZoom" | "zoomOut" | "zoomIn" | "zoomToFit" | "zoomToFitSelectionInViewport" | "zoomToFitSelection" | "toggleEraserTool" | "toggleHandTool" | "setFrameAsActiveTool" | "saveFileToDisk" | "saveToActiveFile" | "toggleShortcuts" | "wrapSelectionInFrame"> | "saveScene" | "imageExport" | "commandPalette" | "searchMenu";
4
4
  export declare const getShortcutFromShortcutName: (name: ShortcutName, idx?: number) => string;
@@ -1,7 +1,7 @@
1
- import type React from "react";
2
- import type { ExcalidrawElement, OrderedExcalidrawElement } from "../element/types";
3
- import type { AppClassProperties, AppState, ExcalidrawProps, BinaryFiles, UIAppState } from "../types";
1
+ import type { ExcalidrawElement, OrderedExcalidrawElement } from "@excalidraw/element/types";
4
2
  import type { CaptureUpdateActionType } from "../store";
3
+ import type { AppClassProperties, AppState, ExcalidrawProps, BinaryFiles, UIAppState } from "../types";
4
+ import type React from "react";
5
5
  export type ActionSource = "ui" | "keyboard" | "contextMenu" | "api" | "commandPalette";
6
6
  /** if false, the action should be prevented */
7
7
  export type ActionResult = {
@@ -14,7 +14,7 @@ export type ActionResult = {
14
14
  type ActionFn = (elements: readonly OrderedExcalidrawElement[], appState: Readonly<AppState>, formData: any, app: AppClassProperties) => ActionResult | Promise<ActionResult>;
15
15
  export type UpdaterFn = (res: ActionResult) => void;
16
16
  export type ActionFilterFn = (action: Action) => void;
17
- export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeArrowType" | "changeOpacity" | "changeFontSize" | "toggleCanvasMenu" | "toggleEditMenu" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "clearCanvas" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "flipHorizontal" | "flipVertical" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "toggleEraserTool" | "toggleHandTool" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "setFrameAsActiveTool" | "setEmbeddableAsActiveTool" | "createContainerFromText" | "wrapTextInContainer" | "toggleLaserPointerTool" | "commandPalette" | "autoResize" | "elementStats" | "searchMenu" | "copyElementLink" | "linkToElement" | "cropEditor" | "wrapSelectionInFrame";
17
+ export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeArrowType" | "changeOpacity" | "changeFontSize" | "toggleCanvasMenu" | "toggleEditMenu" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "clearCanvas" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "flipHorizontal" | "flipVertical" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "toggleEraserTool" | "toggleHandTool" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "setFrameAsActiveTool" | "setEmbeddableAsActiveTool" | "createContainerFromText" | "wrapTextInContainer" | "toggleLaserPointerTool" | "commandPalette" | "autoResize" | "elementStats" | "searchMenu" | "copyElementLink" | "linkToElement" | "cropEditor" | "wrapSelectionInFrame" | "toggleLassoTool";
18
18
  export type PanelComponentProps = {
19
19
  elements: readonly ExcalidrawElement[];
20
20
  appState: AppState;
@@ -1,3 +1,4 @@
1
+ import { LaserPointer } from "@zsviczian/laser-pointer";
1
2
  import type { LaserPointerOptions } from "@zsviczian/laser-pointer";
2
3
  import type { AnimationFrameHandler } from "./animation-frame-handler";
3
4
  import type App from "./components/App";
@@ -10,15 +11,18 @@ export interface Trail {
10
11
  }
11
12
  export interface AnimatedTrailOptions {
12
13
  fill: (trail: AnimatedTrail) => string;
14
+ stroke?: (trail: AnimatedTrail) => string;
15
+ animateTrail?: boolean;
13
16
  }
14
17
  export declare class AnimatedTrail implements Trail {
15
18
  private animationFrameHandler;
16
- private app;
19
+ protected app: App;
17
20
  private options;
18
21
  private currentTrail?;
19
22
  private pastTrails;
20
23
  private container?;
21
24
  private trailElement;
25
+ private trailAnimation?;
22
26
  constructor(animationFrameHandler: AnimationFrameHandler, app: App, options: Partial<LaserPointerOptions> & Partial<AnimatedTrailOptions>);
23
27
  get hasCurrentTrail(): boolean;
24
28
  hasLastPoint(x: number, y: number): boolean;
@@ -27,6 +31,8 @@ export declare class AnimatedTrail implements Trail {
27
31
  startPath(x: number, y: number): void;
28
32
  addPointToPath(x: number, y: number): void;
29
33
  endPath(): void;
34
+ getCurrentTrail(): LaserPointer | undefined;
35
+ clearTrails(): void;
30
36
  private update;
31
37
  private onFrame;
32
38
  private drawTrail;
@@ -1,80 +1,81 @@
1
1
  import type { AppState, NormalizedZoomValue } from "./types";
2
2
  export declare const getDefaultAppState: () => Omit<AppState, "offsetTop" | "offsetLeft" | "width" | "height">;
3
3
  export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>) => {
4
+ viewBackgroundColor?: string | undefined;
5
+ name?: string | null | undefined;
6
+ zoom?: Readonly<{
7
+ value: NormalizedZoomValue;
8
+ }> | undefined;
9
+ scrollX?: number | undefined;
10
+ scrollY?: number | undefined;
11
+ editingGroupId?: string | null | undefined;
12
+ selectedElementIds?: Readonly<{
13
+ [id: string]: true;
14
+ }> | undefined;
15
+ theme?: import("@excalidraw/element/types").Theme | undefined;
16
+ selectedGroupIds?: {
17
+ [groupId: string]: boolean;
18
+ } | undefined;
19
+ selectedLinearElement?: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null | undefined;
4
20
  zenModeEnabled?: boolean | undefined;
5
21
  gridModeEnabled?: boolean | undefined;
6
22
  objectsSnapModeEnabled?: boolean | undefined;
7
- theme?: import("./element/types").Theme | undefined;
8
- name?: string | null | undefined;
9
- currentItemArrowType?: "round" | "sharp" | "elbow" | undefined;
23
+ shouldCacheIgnoreZoom?: boolean | undefined;
24
+ exportScale?: number | undefined;
25
+ gridSize?: number | undefined;
26
+ gridStep?: number | undefined;
10
27
  showWelcomeScreen?: boolean | undefined;
11
28
  activeTool?: ({
12
29
  lastActiveTool: import("./types").ActiveTool | null;
13
30
  locked: boolean;
31
+ fromSelection: boolean;
14
32
  } & import("./types").ActiveTool) | undefined;
15
33
  penMode?: boolean | undefined;
16
34
  penDetected?: boolean | undefined;
17
35
  exportBackground?: boolean | undefined;
18
36
  exportEmbedScene?: boolean | undefined;
19
37
  exportWithDarkMode?: boolean | undefined;
20
- exportScale?: number | undefined;
21
38
  currentItemStrokeColor?: string | undefined;
22
39
  currentItemBackgroundColor?: string | undefined;
23
- currentItemFillStyle?: import("./element/types").FillStyle | undefined;
40
+ currentItemFillStyle?: import("@excalidraw/element/types").FillStyle | undefined;
24
41
  currentItemStrokeWidth?: number | undefined;
25
- currentItemStrokeStyle?: import("./element/types").StrokeStyle | undefined;
42
+ currentItemStrokeStyle?: import("@excalidraw/element/types").StrokeStyle | undefined;
26
43
  currentItemRoughness?: number | undefined;
27
44
  currentItemOpacity?: number | undefined;
28
45
  currentItemFontFamily?: number | undefined;
29
46
  currentItemFontSize?: number | undefined;
30
47
  currentItemTextAlign?: string | undefined;
31
- currentItemStartArrowhead?: import("./element/types").Arrowhead | null | undefined;
32
- currentItemEndArrowhead?: import("./element/types").Arrowhead | null | undefined;
33
- currentItemRoundness?: import("./element/types").StrokeRoundness | undefined;
34
- viewBackgroundColor?: string | undefined;
35
- scrollX?: number | undefined;
36
- scrollY?: number | undefined;
48
+ currentItemStartArrowhead?: import("@excalidraw/element/types").Arrowhead | null | undefined;
49
+ currentItemEndArrowhead?: import("@excalidraw/element/types").Arrowhead | null | undefined;
50
+ currentItemRoundness?: import("@excalidraw/element/types").StrokeRoundness | undefined;
51
+ currentItemArrowType?: "round" | "sharp" | "elbow" | undefined;
37
52
  cursorButton?: "up" | "down" | undefined;
38
53
  scrolledOutside?: boolean | undefined;
39
- zoom?: Readonly<{
40
- value: NormalizedZoomValue;
41
- }> | undefined;
42
- openMenu?: "canvas" | "shape" | null | undefined;
54
+ openMenu?: "shape" | "canvas" | null | undefined;
43
55
  openSidebar?: {
44
56
  name: string;
45
57
  tab?: string | undefined;
46
58
  } | null | undefined;
47
59
  defaultSidebarDockedPreference?: boolean | undefined;
48
- lastPointerDownWith?: import("./element/types").PointerType | undefined;
49
- selectedElementIds?: Readonly<{
50
- [id: string]: true;
51
- }> | undefined;
60
+ lastPointerDownWith?: import("@excalidraw/element/types").PointerType | undefined;
52
61
  previousSelectedElementIds?: {
53
62
  [id: string]: true;
54
63
  } | undefined;
55
- shouldCacheIgnoreZoom?: boolean | undefined;
56
- gridSize?: number | undefined;
57
- gridStep?: number | undefined;
58
- selectedGroupIds?: {
59
- [groupId: string]: boolean;
60
- } | undefined;
61
- editingGroupId?: string | null | undefined;
62
64
  stats?: {
63
65
  open: boolean;
64
66
  panels: number;
65
67
  } | undefined;
66
- currentChartType?: import("./element/types").ChartType | undefined;
67
- selectedLinearElement?: import("./element/linearElementEditor").LinearElementEditor | null | undefined;
68
+ currentChartType?: import("@excalidraw/element/types").ChartType | undefined;
68
69
  };
69
70
  export declare const cleanAppStateForExport: (appState: Partial<AppState>) => {
70
- gridModeEnabled?: boolean | undefined;
71
71
  viewBackgroundColor?: string | undefined;
72
+ gridModeEnabled?: boolean | undefined;
72
73
  gridSize?: number | undefined;
73
74
  gridStep?: number | undefined;
74
75
  };
75
76
  export declare const clearAppStateForDatabase: (appState: Partial<AppState>) => {
76
- gridModeEnabled?: boolean | undefined;
77
77
  viewBackgroundColor?: string | undefined;
78
+ gridModeEnabled?: boolean | undefined;
78
79
  gridSize?: number | undefined;
79
80
  gridStep?: number | undefined;
80
81
  };
@@ -1,7 +1,7 @@
1
- import type { ElementUpdate } from "./element/mutateElement";
2
- import type { ExcalidrawElement, Ordered, OrderedExcalidrawElement, SceneElementsMap } from "./element/types";
1
+ import type { ElementUpdate } from "@excalidraw/element/mutateElement";
2
+ import type { ExcalidrawElement, Ordered, OrderedExcalidrawElement, SceneElementsMap } from "@excalidraw/element/types";
3
+ import type { ValueOf } from "@excalidraw/common/utility-types";
3
4
  import type { AppState, ObservedAppState } from "./types";
4
- import type { ValueOf } from "./utility-types";
5
5
  /**
6
6
  * Represents the difference between two objects of the same type.
7
7
  *
@@ -1,4 +1,4 @@
1
- import type { NonDeletedExcalidrawElement } from "./element/types";
1
+ import type { NonDeletedExcalidrawElement } from "@excalidraw/element/types";
2
2
  export type ChartElements = readonly NonDeletedExcalidrawElement[];
3
3
  export interface Spreadsheet {
4
4
  title: string | null;