@zsviczian/excalidraw 0.15.2-obsidian-8 → 0.15.2-obsidian-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 (281) hide show
  1. package/dist/excalidraw.development.js +1147 -1007
  2. package/dist/excalidraw.production.min.js +1 -1
  3. package/dist/excalidraw.production.min.js.LICENSE.txt +9 -0
  4. package/package.json +6 -2
  5. package/types/.DS_Store +0 -0
  6. package/types/actions/actionAddToLibrary.d.ts +441 -441
  7. package/types/actions/actionAlign.d.ts +97 -97
  8. package/types/actions/actionBoundText.d.ts +331 -331
  9. package/types/actions/actionCanvas.d.ts +1845 -1845
  10. package/types/actions/actionClipboard.d.ts +829 -829
  11. package/types/actions/actionDeleteSelected.d.ts +475 -475
  12. package/types/actions/actionDistribute.d.ts +33 -33
  13. package/types/actions/actionDuplicateSelection.d.ts +22 -22
  14. package/types/actions/actionElementLock.d.ts +316 -316
  15. package/types/actions/actionExport.d.ts +1389 -1388
  16. package/types/actions/actionFinalize.d.ts +299 -302
  17. package/types/actions/actionFlip.d.ts +33 -33
  18. package/types/actions/actionFrame.d.ts +490 -490
  19. package/types/actions/actionGroup.d.ts +45 -45
  20. package/types/actions/actionHistory.d.ts +6 -6
  21. package/types/actions/actionLinearEditor.d.ts +158 -158
  22. package/types/actions/actionMenu.d.ts +479 -479
  23. package/types/actions/actionNavigate.d.ts +14 -14
  24. package/types/actions/actionProperties.d.ts +2013 -2013
  25. package/types/actions/actionSelectAll.d.ts +16 -16
  26. package/types/actions/actionStyles.d.ts +172 -172
  27. package/types/actions/actionToggleGridMode.d.ts +161 -161
  28. package/types/actions/actionToggleLock.d.ts +135 -139
  29. package/types/actions/actionToggleStats.d.ts +158 -158
  30. package/types/actions/actionToggleViewMode.d.ts +160 -160
  31. package/types/actions/actionToggleZenMode.d.ts +160 -160
  32. package/types/actions/actionZindex.d.ts +67 -67
  33. package/types/actions/index.d.ts +24 -24
  34. package/types/actions/manager.d.ts +21 -21
  35. package/types/actions/register.d.ts +5 -5
  36. package/types/actions/shortcuts.d.ts +4 -4
  37. package/types/actions/types.d.ts +45 -44
  38. package/types/align.d.ts +6 -6
  39. package/types/analytics.d.ts +1 -1
  40. package/types/appState.d.ts +81 -81
  41. package/types/charts.d.ts +27 -27
  42. package/types/clients.d.ts +5 -5
  43. package/types/clipboard.d.ts +25 -25
  44. package/types/colors.d.ts +61 -61
  45. package/types/components/Actions.d.ts +36 -36
  46. package/types/components/ActiveConfirmDialog.d.ts +4 -4
  47. package/types/components/App.d.ts +288 -291
  48. package/types/components/Avatar.d.ts +10 -10
  49. package/types/components/BraveMeasureTextError.d.ts +2 -2
  50. package/types/components/Button.d.ts +17 -17
  51. package/types/components/ButtonIconSelect.d.ts +19 -19
  52. package/types/components/Card.d.ts +7 -7
  53. package/types/components/CheckboxItem.d.ts +8 -8
  54. package/types/components/ColorPicker/ColorInput.d.ts +7 -7
  55. package/types/components/ColorPicker/ColorPicker.d.ts +19 -19
  56. package/types/components/ColorPicker/CustomColorList.d.ts +8 -8
  57. package/types/components/ColorPicker/HotkeyLabel.d.ts +8 -8
  58. package/types/components/ColorPicker/Picker.d.ts +18 -18
  59. package/types/components/ColorPicker/PickerColorList.d.ts +10 -10
  60. package/types/components/ColorPicker/PickerHeading.d.ts +5 -5
  61. package/types/components/ColorPicker/ShadeList.d.ts +8 -8
  62. package/types/components/ColorPicker/TopPicks.d.ts +9 -9
  63. package/types/components/ColorPicker/colorPickerUtils.d.ts +21 -21
  64. package/types/components/ColorPicker/keyboardNavHandlers.d.ts +21 -21
  65. package/types/components/ColorPicker.d.ts +19 -19
  66. package/types/components/ConfirmDialog.d.ts +10 -10
  67. package/types/components/ContextMenu.d.ts +15 -15
  68. package/types/components/DarkModeToggle.d.ts +7 -7
  69. package/types/components/DefaultSidebar.d.ts +30 -30
  70. package/types/components/Dialog.d.ts +13 -13
  71. package/types/components/DialogActionButton.d.ts +10 -10
  72. package/types/components/ErrorDialog.d.ts +5 -5
  73. package/types/components/EyeDropper.d.ts +18 -18
  74. package/types/components/FilledButton.d.ts +17 -17
  75. package/types/components/FixedSideContainer.d.ts +9 -9
  76. package/types/components/HandButton.d.ts +10 -10
  77. package/types/components/HelpButton.d.ts +7 -7
  78. package/types/components/HelpDialog.d.ts +4 -4
  79. package/types/components/HintViewer.d.ts +10 -11
  80. package/types/components/IconPicker.d.ts +13 -13
  81. package/types/components/ImageExportDialog.d.ts +13 -13
  82. package/types/components/InitializeApp.d.ts +10 -10
  83. package/types/components/Island.d.ts +10 -10
  84. package/types/components/JSONExportDialog.d.ts +15 -15
  85. package/types/components/LayerUI.d.ts +32 -31
  86. package/types/components/LibraryButton.d.ts +8 -8
  87. package/types/components/LibraryMenu.d.ts +24 -24
  88. package/types/components/LibraryMenuBrowseButton.d.ts +7 -7
  89. package/types/components/LibraryMenuControlButtons.d.ts +9 -9
  90. package/types/components/LibraryMenuHeaderContent.d.ts +18 -18
  91. package/types/components/LibraryMenuItems.d.ts +14 -14
  92. package/types/components/LibraryMenuSection.d.ts +22 -22
  93. package/types/components/LibraryUnit.d.ts +15 -15
  94. package/types/components/LoadingMessage.d.ts +6 -6
  95. package/types/components/LockButton.d.ts +10 -10
  96. package/types/components/MobileMenu.d.ts +27 -26
  97. package/types/components/Modal.d.ts +13 -13
  98. package/types/components/OverwriteConfirm/OverwriteConfirm.d.ts +17 -17
  99. package/types/components/OverwriteConfirm/OverwriteConfirmActions.d.ts +17 -17
  100. package/types/components/OverwriteConfirm/OverwriteConfirmState.d.ts +22 -22
  101. package/types/components/PasteChartDialog.d.ts +8 -8
  102. package/types/components/PenModeButton.d.ts +12 -12
  103. package/types/components/Popover.d.ts +15 -15
  104. package/types/components/ProjectName.d.ts +11 -11
  105. package/types/components/PublishLibrary.d.ts +16 -16
  106. package/types/components/RadioGroup.d.ts +12 -12
  107. package/types/components/Section.d.ts +6 -6
  108. package/types/components/Sidebar/Sidebar.d.ts +76 -76
  109. package/types/components/Sidebar/SidebarHeader.d.ts +7 -7
  110. package/types/components/Sidebar/SidebarTab.d.ts +9 -9
  111. package/types/components/Sidebar/SidebarTabTrigger.d.ts +10 -10
  112. package/types/components/Sidebar/SidebarTabTriggers.d.ts +7 -7
  113. package/types/components/Sidebar/SidebarTabs.d.ts +7 -7
  114. package/types/components/Sidebar/SidebarTrigger.d.ts +6 -6
  115. package/types/components/Sidebar/common.d.ts +33 -33
  116. package/types/components/SingleLibraryItem.d.ts +10 -10
  117. package/types/components/Spinner.d.ts +7 -7
  118. package/types/components/Stack.d.ts +16 -16
  119. package/types/components/Stats.d.ts +11 -11
  120. package/types/components/Switch.d.ts +9 -9
  121. package/types/components/Toast.d.ts +7 -7
  122. package/types/components/ToolButton.d.ts +47 -47
  123. package/types/components/Tooltip.d.ts +17 -17
  124. package/types/components/Trans.d.ts +9 -8
  125. package/types/components/UserList.d.ts +8 -8
  126. package/types/components/context/tunnels.d.ts +16 -16
  127. package/types/components/dropdownMenu/DropdownMenu.d.ts +67 -67
  128. package/types/components/dropdownMenu/DropdownMenuContent.d.ts +15 -15
  129. package/types/components/dropdownMenu/DropdownMenuGroup.d.ts +11 -11
  130. package/types/components/dropdownMenu/DropdownMenuItem.d.ts +12 -12
  131. package/types/components/dropdownMenu/DropdownMenuItemContent.d.ts +6 -6
  132. package/types/components/dropdownMenu/DropdownMenuItemCustom.d.ts +6 -6
  133. package/types/components/dropdownMenu/DropdownMenuItemLink.d.ts +13 -13
  134. package/types/components/dropdownMenu/DropdownMenuSeparator.d.ts +5 -5
  135. package/types/components/dropdownMenu/DropdownMenuTrigger.d.ts +11 -11
  136. package/types/components/dropdownMenu/common.d.ts +6 -6
  137. package/types/components/dropdownMenu/dropdownMenuUtils.d.ts +3 -3
  138. package/types/components/footer/Footer.d.ts +12 -12
  139. package/types/components/footer/FooterCenter.d.ts +8 -8
  140. package/types/components/hoc/withInternalFallback.d.ts +4 -4
  141. package/types/components/hoc/withUpstreamOverride.d.ts +10 -10
  142. package/types/components/icons.d.ts +154 -154
  143. package/types/components/live-collaboration/LiveCollaborationTrigger.d.ts +10 -10
  144. package/types/components/main-menu/DefaultItems.d.ts +44 -44
  145. package/types/components/main-menu/MainMenu.d.ts +61 -61
  146. package/types/components/welcome-screen/WelcomeScreen.Center.d.ts +58 -58
  147. package/types/components/welcome-screen/WelcomeScreen.Hints.d.ts +19 -19
  148. package/types/components/welcome-screen/WelcomeScreen.d.ts +85 -85
  149. package/types/constants.d.ts +226 -225
  150. package/types/context/tunnels.d.ts +19 -19
  151. package/types/context/ui-appState.d.ts +4 -4
  152. package/types/data/blob.d.ts +48 -48
  153. package/types/data/encode.d.ts +53 -53
  154. package/types/data/encryption.d.ts +9 -9
  155. package/types/data/filesystem.d.ts +19 -19
  156. package/types/data/image.d.ts +15 -15
  157. package/types/data/index.d.ts +13 -13
  158. package/types/data/json.d.ts +16 -16
  159. package/types/data/library.d.ts +54 -54
  160. package/types/data/resave.d.ts +5 -5
  161. package/types/data/restore.d.ts +21 -21
  162. package/types/data/types.d.ts +45 -45
  163. package/types/data/url.d.ts +7 -2
  164. package/types/distribute.d.ts +6 -6
  165. package/types/element/Hyperlink.d.ts +182 -182
  166. package/types/element/binding.d.ts +33 -33
  167. package/types/element/bounds.d.ts +53 -53
  168. package/types/element/collision.d.ts +21 -21
  169. package/types/element/dragElements.d.ts +6 -6
  170. package/types/element/embeddable.d.ts +176 -171
  171. package/types/element/image.d.ts +32 -32
  172. package/types/element/index.d.ts +21 -21
  173. package/types/element/linearElementEditor.d.ts +293 -293
  174. package/types/element/mutateElement.d.ts +12 -12
  175. package/types/element/newElement.d.ts +95 -95
  176. package/types/element/resizeElements.d.ts +9 -9
  177. package/types/element/resizeTest.d.ts +13 -13
  178. package/types/element/showSelectedShapeActions.d.ts +3 -3
  179. package/types/element/sizeHelpers.d.ts +21 -21
  180. package/types/element/sortElements.d.ts +2 -2
  181. package/types/element/textElement.d.ts +80 -80
  182. package/types/element/textWysiwyg.d.ts +21 -21
  183. package/types/element/transformHandles.d.ts +35 -35
  184. package/types/element/typeChecks.d.ts +29 -29
  185. package/types/element/types.d.ts +166 -166
  186. package/types/errors.d.ts +8 -8
  187. package/types/frame.d.ts +40 -40
  188. package/types/ga.d.ts +63 -63
  189. package/types/gadirections.d.ts +8 -8
  190. package/types/galines.d.ts +22 -22
  191. package/types/gapoints.d.ts +7 -7
  192. package/types/gatransforms.d.ts +10 -10
  193. package/types/gesture.d.ts +6 -6
  194. package/types/groups.d.ts +31 -31
  195. package/types/history.d.ts +52 -52
  196. package/types/hooks/useCallbackRefState.d.ts +1 -1
  197. package/types/hooks/useCreatePortalContainer.d.ts +5 -5
  198. package/types/hooks/useLibraryItemSvg.d.ts +11 -11
  199. package/types/hooks/useOutsideClick.d.ts +20 -20
  200. package/types/hooks/useScrollPosition.d.ts +2 -2
  201. package/types/hooks/useTransition.d.ts +2 -2
  202. package/types/i18n.d.ts +24 -21
  203. package/types/jotai.d.ts +34 -34
  204. package/types/keys.d.ts +80 -80
  205. package/types/math.d.ts +30 -30
  206. package/types/packages/common.webpack.dev.config.d.ts +72 -72
  207. package/types/packages/common.webpack.prod.config.d.ts +84 -84
  208. package/types/packages/excalidraw/dist/excalidraw.development.d.ts +4 -4
  209. package/types/packages/excalidraw/dist/excalidraw.production.min.d.ts +1 -1
  210. package/types/packages/excalidraw/entry.d.ts +1 -1
  211. package/types/packages/excalidraw/env.d.ts +1 -1
  212. package/types/packages/excalidraw/example/App.d.ts +14 -14
  213. package/types/packages/excalidraw/example/CustomFooter.d.ts +5 -5
  214. package/types/packages/excalidraw/example/MobileFooter.d.ts +5 -5
  215. package/types/packages/excalidraw/example/index.d.ts +1 -1
  216. package/types/packages/excalidraw/example/initialData.d.ts +178 -178
  217. package/types/packages/excalidraw/example/sidebar/ExampleSidebar.d.ts +5 -5
  218. package/types/packages/excalidraw/index.d.ts +37 -37
  219. package/types/packages/excalidraw/main.d.ts +2 -2
  220. package/types/packages/excalidraw/publicPath.d.ts +1 -1
  221. package/types/packages/excalidraw/webpack.dev-server.config.d.ts +19 -19
  222. package/types/packages/excalidraw/webpack.dev.config.d.ts +69 -69
  223. package/types/packages/excalidraw/webpack.prod.config.d.ts +78 -78
  224. package/types/packages/utils.d.ts +43 -42
  225. package/types/points.d.ts +7 -7
  226. package/types/polyfill.d.ts +2 -2
  227. package/types/random.d.ts +4 -4
  228. package/types/renderer/easingFunctions.d.ts +6 -6
  229. package/types/renderer/renderElement.d.ts +37 -37
  230. package/types/renderer/renderScene.d.ts +51 -50
  231. package/types/renderer/roundRect.d.ts +11 -11
  232. package/types/scene/Fonts.d.ts +21 -21
  233. package/types/scene/Scene.d.ts +60 -47
  234. package/types/scene/comparisons.d.ts +10 -10
  235. package/types/scene/export.d.ts +25 -24
  236. package/types/scene/index.d.ts +5 -5
  237. package/types/scene/scroll.d.ts +17 -17
  238. package/types/scene/scrollbars.d.ts +16 -16
  239. package/types/scene/selection.d.ts +31 -31
  240. package/types/scene/types.d.ts +59 -59
  241. package/types/scene/zoom.d.ts +13 -13
  242. package/types/shapes.d.ts +62 -62
  243. package/types/types.d.ts +501 -503
  244. package/types/utility-types.d.ts +25 -22
  245. package/types/utils.d.ts +192 -192
  246. package/types/zindex.d.ts +6 -6
  247. package/types/bug-issue-template.d.ts +0 -2
  248. package/types/components/ActiveFile.d.ts +0 -7
  249. package/types/components/BackgroundPickerAndDarkModeToggle.d.ts +0 -4
  250. package/types/components/ClearCanvas.d.ts +0 -4
  251. package/types/components/CollabButton.d.ts +0 -7
  252. package/types/components/EncryptedIcon.d.ts +0 -2
  253. package/types/components/Footer.d.ts +0 -10
  254. package/types/components/HelpIcon.d.ts +0 -8
  255. package/types/components/MenuItem.d.ts +0 -11
  256. package/types/components/MenuUtils.d.ts +0 -2
  257. package/types/components/SidebarLockButton.d.ts +0 -8
  258. package/types/components/TopErrorBoundary.d.ts +0 -15
  259. package/types/components/WelcomeScreen.d.ts +0 -8
  260. package/types/components/WelcomeScreenDecor.d.ts +0 -6
  261. package/types/components/mainMenu/DefaultItems.d.ts +0 -44
  262. package/types/components/mainMenu/MainMenu.d.ts +0 -63
  263. package/types/element/iframe.d.ts +0 -167
  264. package/types/excalidraw-app/CustomStats.d.ts +0 -9
  265. package/types/excalidraw-app/app_constants.d.ts +0 -32
  266. package/types/excalidraw-app/collab/Collab.d.ts +0 -163
  267. package/types/excalidraw-app/collab/Portal.d.ts +0 -28
  268. package/types/excalidraw-app/collab/RoomDialog.d.ts +0 -13
  269. package/types/excalidraw-app/collab/reconciliation.d.ts +0 -10
  270. package/types/excalidraw-app/components/ExportToExcalidrawPlus.d.ts +0 -9
  271. package/types/excalidraw-app/components/LanguageList.d.ts +0 -4
  272. package/types/excalidraw-app/components/icons.d.ts +0 -1
  273. package/types/excalidraw-app/data/FileManager.d.ts +0 -66
  274. package/types/excalidraw-app/data/LocalData.d.ts +0 -32
  275. package/types/excalidraw-app/data/Locker.d.ts +0 -8
  276. package/types/excalidraw-app/data/firebase.d.ts +0 -25
  277. package/types/excalidraw-app/data/index.d.ts +0 -190
  278. package/types/excalidraw-app/data/localStorage.d.ts +0 -116
  279. package/types/excalidraw-app/data/tabSync.d.ts +0 -9
  280. package/types/excalidraw-app/index.d.ts +0 -26
  281. package/types/packages/excalidraw/example/sidebar/Sidebar.d.ts +0 -5
@@ -1,1845 +1,1845 @@
1
- /// <reference types="react" />
2
- import { ExcalidrawElement } from "../element/types";
3
- import { AppState, NormalizedZoomValue } from "../types";
4
- export declare const actionChangeViewBackgroundColor: {
5
- name: "changeViewBackgroundColor";
6
- trackEvent: false;
7
- predicate: (elements: readonly ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
8
- perform: (_: readonly ExcalidrawElement[], appState: Readonly<AppState>, value: any) => {
9
- appState: any;
10
- commitToHistory: boolean;
11
- };
12
- PanelComponent: ({ elements, appState, updateData, appProps }: import("./types").PanelComponentProps) => JSX.Element;
13
- } & {
14
- keyTest?: undefined;
15
- };
16
- export declare const actionClearCanvas: {
17
- name: "clearCanvas";
18
- trackEvent: {
19
- category: "canvas";
20
- };
21
- predicate: (elements: readonly ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
22
- perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
23
- elements: ExcalidrawElement[];
24
- appState: {
25
- files: {};
26
- theme: string;
27
- penMode: boolean;
28
- penDetected: boolean;
29
- exportBackground: boolean;
30
- exportEmbedScene: boolean;
31
- gridSize: number | null;
32
- showStats: boolean;
33
- pasteDialog: {
34
- shown: false;
35
- data: null;
36
- } | {
37
- shown: true;
38
- data: import("../charts").Spreadsheet;
39
- };
40
- activeTool: {
41
- lastActiveTool: import("../types").LastActiveTool;
42
- locked: boolean;
43
- } & ({
44
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
45
- customType: null;
46
- } | {
47
- type: "custom";
48
- customType: string;
49
- });
50
- colorPalette: {
51
- canvasBackground: import("../colors").ColorPaletteCustom;
52
- elementBackground: import("../colors").ColorPaletteCustom;
53
- elementStroke: import("../colors").ColorPaletteCustom;
54
- topPicks: {
55
- canvasBackground: [string, string, string, string, string];
56
- elementStroke: [string, string, string, string, string];
57
- elementBackground: [string, string, string, string, string];
58
- };
59
- } | undefined;
60
- trayModeEnabled: boolean;
61
- allowPinchZoom: boolean | undefined;
62
- allowWheelZoom: boolean | undefined;
63
- pinnedScripts: string[] | undefined;
64
- customPens: any[] | undefined;
65
- name: string;
66
- contextMenu: {
67
- items: import("../components/ContextMenu").ContextMenuItems;
68
- top: number;
69
- left: number;
70
- } | null;
71
- showWelcomeScreen: boolean;
72
- isLoading: boolean;
73
- errorMessage: import("react").ReactNode;
74
- activeEmbeddable: {
75
- element: import("../element/types").NonDeletedExcalidrawElement;
76
- state: "active" | "hover";
77
- } | null;
78
- draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
79
- resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
80
- multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
81
- selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
82
- isBindingEnabled: boolean;
83
- startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
84
- suggestedBindings: import("../element/binding").SuggestedBinding[];
85
- frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
86
- frameRendering: {
87
- enabled: boolean;
88
- name: boolean;
89
- outline: boolean;
90
- clip: boolean;
91
- };
92
- editingFrame: string | null;
93
- elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
94
- editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
95
- editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
96
- exportWithDarkMode: boolean;
97
- exportScale: number;
98
- currentItemStrokeColor: string;
99
- currentItemBackgroundColor: string;
100
- currentItemFillStyle: import("../element/types").FillStyle;
101
- currentItemStrokeWidth: number;
102
- currentItemStrokeStyle: import("../element/types").StrokeStyle;
103
- currentItemRoughness: number;
104
- currentItemOpacity: number;
105
- currentItemFontFamily: number;
106
- currentItemFontSize: number;
107
- currentItemTextAlign: string;
108
- currentItemStartArrowhead: import("../element/types").Arrowhead | null;
109
- currentItemEndArrowhead: import("../element/types").Arrowhead | null;
110
- currentItemRoundness: import("../element/types").StrokeRoundness;
111
- viewBackgroundColor: string;
112
- scrollX: number;
113
- scrollY: number;
114
- cursorButton: "up" | "down";
115
- scrolledOutside: boolean;
116
- isResizing: boolean;
117
- isRotating: boolean;
118
- zoom: Readonly<{
119
- value: NormalizedZoomValue;
120
- }>;
121
- openMenu: "canvas" | "shape" | null;
122
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
123
- openSidebar: {
124
- name: string;
125
- tab?: string | undefined;
126
- } | null;
127
- openDialog: "imageExport" | "help" | "jsonExport" | null;
128
- defaultSidebarDockedPreference: boolean;
129
- lastPointerDownWith: import("../element/types").PointerType;
130
- selectedElementIds: Readonly<{
131
- [id: string]: true;
132
- }>;
133
- previousSelectedElementIds: {
134
- [id: string]: true;
135
- };
136
- selectedElementsAreBeingDragged: boolean;
137
- shouldCacheIgnoreZoom: boolean;
138
- toast: {
139
- message: string;
140
- closable?: boolean | undefined;
141
- duration?: number | undefined;
142
- } | null;
143
- zenModeEnabled: boolean;
144
- previousGridSize: number | null;
145
- viewModeEnabled: boolean;
146
- selectedGroupIds: {
147
- [groupId: string]: boolean;
148
- };
149
- editingGroupId: string | null;
150
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
151
- collaborators: Map<string, import("../types").Collaborator>;
152
- currentChartType: import("../element/types").ChartType;
153
- pendingImageElementId: string | null;
154
- showHyperlinkPopup: false | "info" | "editor";
155
- linkOpacity: number;
156
- currentStrokeOptions?: any;
157
- resetCustomPen?: any;
158
- gridColor: string;
159
- dynamicStyle: string;
160
- invertBindingBehaviour: boolean;
161
- selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
162
- };
163
- commitToHistory: true;
164
- };
165
- } & {
166
- keyTest?: undefined;
167
- };
168
- export declare const actionZoomIn: {
169
- name: "zoomIn";
170
- viewMode: true;
171
- trackEvent: {
172
- category: "canvas";
173
- };
174
- perform: (_elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
175
- appState: {
176
- scrollX: number;
177
- scrollY: number;
178
- zoom: {
179
- value: NormalizedZoomValue;
180
- };
181
- contextMenu: {
182
- items: import("../components/ContextMenu").ContextMenuItems;
183
- top: number;
184
- left: number;
185
- } | null;
186
- showWelcomeScreen: boolean;
187
- isLoading: boolean;
188
- errorMessage: import("react").ReactNode;
189
- activeEmbeddable: {
190
- element: import("../element/types").NonDeletedExcalidrawElement;
191
- state: "active" | "hover";
192
- } | null;
193
- draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
194
- resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
195
- multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
196
- selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
197
- isBindingEnabled: boolean;
198
- startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
199
- suggestedBindings: import("../element/binding").SuggestedBinding[];
200
- frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
201
- frameRendering: {
202
- enabled: boolean;
203
- name: boolean;
204
- outline: boolean;
205
- clip: boolean;
206
- };
207
- editingFrame: string | null;
208
- elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
209
- editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
210
- editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
211
- activeTool: {
212
- lastActiveTool: import("../types").LastActiveTool;
213
- locked: boolean;
214
- } & ({
215
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
216
- customType: null;
217
- } | {
218
- type: "custom";
219
- customType: string;
220
- });
221
- penMode: boolean;
222
- penDetected: boolean;
223
- exportBackground: boolean;
224
- exportEmbedScene: boolean;
225
- exportWithDarkMode: boolean;
226
- exportScale: number;
227
- currentItemStrokeColor: string;
228
- currentItemBackgroundColor: string;
229
- currentItemFillStyle: import("../element/types").FillStyle;
230
- currentItemStrokeWidth: number;
231
- currentItemStrokeStyle: import("../element/types").StrokeStyle;
232
- currentItemRoughness: number;
233
- currentItemOpacity: number;
234
- currentItemFontFamily: number;
235
- currentItemFontSize: number;
236
- currentItemTextAlign: string;
237
- currentItemStartArrowhead: import("../element/types").Arrowhead | null;
238
- currentItemEndArrowhead: import("../element/types").Arrowhead | null;
239
- currentItemRoundness: import("../element/types").StrokeRoundness;
240
- viewBackgroundColor: string;
241
- cursorButton: "up" | "down";
242
- scrolledOutside: boolean;
243
- name: string;
244
- isResizing: boolean;
245
- isRotating: boolean;
246
- openMenu: "canvas" | "shape" | null;
247
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
248
- openSidebar: {
249
- name: string;
250
- tab?: string | undefined;
251
- } | null;
252
- openDialog: "imageExport" | "help" | "jsonExport" | null;
253
- defaultSidebarDockedPreference: boolean;
254
- lastPointerDownWith: import("../element/types").PointerType;
255
- selectedElementIds: Readonly<{
256
- [id: string]: true;
257
- }>;
258
- previousSelectedElementIds: {
259
- [id: string]: true;
260
- };
261
- selectedElementsAreBeingDragged: boolean;
262
- shouldCacheIgnoreZoom: boolean;
263
- toast: {
264
- message: string;
265
- closable?: boolean | undefined;
266
- duration?: number | undefined;
267
- } | null;
268
- zenModeEnabled: boolean;
269
- theme: string;
270
- gridSize: number | null;
271
- previousGridSize: number | null;
272
- viewModeEnabled: boolean;
273
- selectedGroupIds: {
274
- [groupId: string]: boolean;
275
- };
276
- editingGroupId: string | null;
277
- width: number;
278
- height: number;
279
- offsetTop: number;
280
- offsetLeft: number;
281
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
282
- collaborators: Map<string, import("../types").Collaborator>;
283
- showStats: boolean;
284
- currentChartType: import("../element/types").ChartType;
285
- pasteDialog: {
286
- shown: false;
287
- data: null;
288
- } | {
289
- shown: true;
290
- data: import("../charts").Spreadsheet;
291
- };
292
- pendingImageElementId: string | null;
293
- showHyperlinkPopup: false | "info" | "editor";
294
- linkOpacity: number;
295
- trayModeEnabled: boolean;
296
- colorPalette?: {
297
- canvasBackground: import("../colors").ColorPaletteCustom;
298
- elementBackground: import("../colors").ColorPaletteCustom;
299
- elementStroke: import("../colors").ColorPaletteCustom;
300
- topPicks: {
301
- canvasBackground: [string, string, string, string, string];
302
- elementStroke: [string, string, string, string, string];
303
- elementBackground: [string, string, string, string, string];
304
- };
305
- } | undefined;
306
- allowWheelZoom?: boolean | undefined;
307
- allowPinchZoom?: boolean | undefined;
308
- pinnedScripts?: string[] | undefined;
309
- customPens?: any[] | undefined;
310
- currentStrokeOptions?: any;
311
- resetCustomPen?: any;
312
- gridColor: string;
313
- dynamicStyle: string;
314
- invertBindingBehaviour: boolean;
315
- selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
316
- };
317
- commitToHistory: false;
318
- };
319
- PanelComponent: ({ updateData }: import("./types").PanelComponentProps) => JSX.Element;
320
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
321
- } & {
322
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
323
- };
324
- export declare const actionZoomOut: {
325
- name: "zoomOut";
326
- viewMode: true;
327
- trackEvent: {
328
- category: "canvas";
329
- };
330
- perform: (_elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
331
- appState: {
332
- scrollX: number;
333
- scrollY: number;
334
- zoom: {
335
- value: NormalizedZoomValue;
336
- };
337
- contextMenu: {
338
- items: import("../components/ContextMenu").ContextMenuItems;
339
- top: number;
340
- left: number;
341
- } | null;
342
- showWelcomeScreen: boolean;
343
- isLoading: boolean;
344
- errorMessage: import("react").ReactNode;
345
- activeEmbeddable: {
346
- element: import("../element/types").NonDeletedExcalidrawElement;
347
- state: "active" | "hover";
348
- } | null;
349
- draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
350
- resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
351
- multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
352
- selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
353
- isBindingEnabled: boolean;
354
- startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
355
- suggestedBindings: import("../element/binding").SuggestedBinding[];
356
- frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
357
- frameRendering: {
358
- enabled: boolean;
359
- name: boolean;
360
- outline: boolean;
361
- clip: boolean;
362
- };
363
- editingFrame: string | null;
364
- elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
365
- editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
366
- editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
367
- activeTool: {
368
- lastActiveTool: import("../types").LastActiveTool;
369
- locked: boolean;
370
- } & ({
371
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
372
- customType: null;
373
- } | {
374
- type: "custom";
375
- customType: string;
376
- });
377
- penMode: boolean;
378
- penDetected: boolean;
379
- exportBackground: boolean;
380
- exportEmbedScene: boolean;
381
- exportWithDarkMode: boolean;
382
- exportScale: number;
383
- currentItemStrokeColor: string;
384
- currentItemBackgroundColor: string;
385
- currentItemFillStyle: import("../element/types").FillStyle;
386
- currentItemStrokeWidth: number;
387
- currentItemStrokeStyle: import("../element/types").StrokeStyle;
388
- currentItemRoughness: number;
389
- currentItemOpacity: number;
390
- currentItemFontFamily: number;
391
- currentItemFontSize: number;
392
- currentItemTextAlign: string;
393
- currentItemStartArrowhead: import("../element/types").Arrowhead | null;
394
- currentItemEndArrowhead: import("../element/types").Arrowhead | null;
395
- currentItemRoundness: import("../element/types").StrokeRoundness;
396
- viewBackgroundColor: string;
397
- cursorButton: "up" | "down";
398
- scrolledOutside: boolean;
399
- name: string;
400
- isResizing: boolean;
401
- isRotating: boolean;
402
- openMenu: "canvas" | "shape" | null;
403
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
404
- openSidebar: {
405
- name: string;
406
- tab?: string | undefined;
407
- } | null;
408
- openDialog: "imageExport" | "help" | "jsonExport" | null;
409
- defaultSidebarDockedPreference: boolean;
410
- lastPointerDownWith: import("../element/types").PointerType;
411
- selectedElementIds: Readonly<{
412
- [id: string]: true;
413
- }>;
414
- previousSelectedElementIds: {
415
- [id: string]: true;
416
- };
417
- selectedElementsAreBeingDragged: boolean;
418
- shouldCacheIgnoreZoom: boolean;
419
- toast: {
420
- message: string;
421
- closable?: boolean | undefined;
422
- duration?: number | undefined;
423
- } | null;
424
- zenModeEnabled: boolean;
425
- theme: string;
426
- gridSize: number | null;
427
- previousGridSize: number | null;
428
- viewModeEnabled: boolean;
429
- selectedGroupIds: {
430
- [groupId: string]: boolean;
431
- };
432
- editingGroupId: string | null;
433
- width: number;
434
- height: number;
435
- offsetTop: number;
436
- offsetLeft: number;
437
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
438
- collaborators: Map<string, import("../types").Collaborator>;
439
- showStats: boolean;
440
- currentChartType: import("../element/types").ChartType;
441
- pasteDialog: {
442
- shown: false;
443
- data: null;
444
- } | {
445
- shown: true;
446
- data: import("../charts").Spreadsheet;
447
- };
448
- pendingImageElementId: string | null;
449
- showHyperlinkPopup: false | "info" | "editor";
450
- linkOpacity: number;
451
- trayModeEnabled: boolean;
452
- colorPalette?: {
453
- canvasBackground: import("../colors").ColorPaletteCustom;
454
- elementBackground: import("../colors").ColorPaletteCustom;
455
- elementStroke: import("../colors").ColorPaletteCustom;
456
- topPicks: {
457
- canvasBackground: [string, string, string, string, string];
458
- elementStroke: [string, string, string, string, string];
459
- elementBackground: [string, string, string, string, string];
460
- };
461
- } | undefined;
462
- allowWheelZoom?: boolean | undefined;
463
- allowPinchZoom?: boolean | undefined;
464
- pinnedScripts?: string[] | undefined;
465
- customPens?: any[] | undefined;
466
- currentStrokeOptions?: any;
467
- resetCustomPen?: any;
468
- gridColor: string;
469
- dynamicStyle: string;
470
- invertBindingBehaviour: boolean;
471
- selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
472
- };
473
- commitToHistory: false;
474
- };
475
- PanelComponent: ({ updateData }: import("./types").PanelComponentProps) => JSX.Element;
476
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
477
- } & {
478
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
479
- };
480
- export declare const actionResetZoom: {
481
- name: "resetZoom";
482
- viewMode: true;
483
- trackEvent: {
484
- category: "canvas";
485
- };
486
- perform: (_elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
487
- appState: {
488
- scrollX: number;
489
- scrollY: number;
490
- zoom: {
491
- value: NormalizedZoomValue;
492
- };
493
- contextMenu: {
494
- items: import("../components/ContextMenu").ContextMenuItems;
495
- top: number;
496
- left: number;
497
- } | null;
498
- showWelcomeScreen: boolean;
499
- isLoading: boolean;
500
- errorMessage: import("react").ReactNode;
501
- activeEmbeddable: {
502
- element: import("../element/types").NonDeletedExcalidrawElement;
503
- state: "active" | "hover";
504
- } | null;
505
- draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
506
- resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
507
- multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
508
- selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
509
- isBindingEnabled: boolean;
510
- startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
511
- suggestedBindings: import("../element/binding").SuggestedBinding[];
512
- frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
513
- frameRendering: {
514
- enabled: boolean;
515
- name: boolean;
516
- outline: boolean;
517
- clip: boolean;
518
- };
519
- editingFrame: string | null;
520
- elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
521
- editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
522
- editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
523
- activeTool: {
524
- lastActiveTool: import("../types").LastActiveTool;
525
- locked: boolean;
526
- } & ({
527
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
528
- customType: null;
529
- } | {
530
- type: "custom";
531
- customType: string;
532
- });
533
- penMode: boolean;
534
- penDetected: boolean;
535
- exportBackground: boolean;
536
- exportEmbedScene: boolean;
537
- exportWithDarkMode: boolean;
538
- exportScale: number;
539
- currentItemStrokeColor: string;
540
- currentItemBackgroundColor: string;
541
- currentItemFillStyle: import("../element/types").FillStyle;
542
- currentItemStrokeWidth: number;
543
- currentItemStrokeStyle: import("../element/types").StrokeStyle;
544
- currentItemRoughness: number;
545
- currentItemOpacity: number;
546
- currentItemFontFamily: number;
547
- currentItemFontSize: number;
548
- currentItemTextAlign: string;
549
- currentItemStartArrowhead: import("../element/types").Arrowhead | null;
550
- currentItemEndArrowhead: import("../element/types").Arrowhead | null;
551
- currentItemRoundness: import("../element/types").StrokeRoundness;
552
- viewBackgroundColor: string;
553
- cursorButton: "up" | "down";
554
- scrolledOutside: boolean;
555
- name: string;
556
- isResizing: boolean;
557
- isRotating: boolean;
558
- openMenu: "canvas" | "shape" | null;
559
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
560
- openSidebar: {
561
- name: string;
562
- tab?: string | undefined;
563
- } | null;
564
- openDialog: "imageExport" | "help" | "jsonExport" | null;
565
- defaultSidebarDockedPreference: boolean;
566
- lastPointerDownWith: import("../element/types").PointerType;
567
- selectedElementIds: Readonly<{
568
- [id: string]: true;
569
- }>;
570
- previousSelectedElementIds: {
571
- [id: string]: true;
572
- };
573
- selectedElementsAreBeingDragged: boolean;
574
- shouldCacheIgnoreZoom: boolean;
575
- toast: {
576
- message: string;
577
- closable?: boolean | undefined;
578
- duration?: number | undefined;
579
- } | null;
580
- zenModeEnabled: boolean;
581
- theme: string;
582
- gridSize: number | null;
583
- previousGridSize: number | null;
584
- viewModeEnabled: boolean;
585
- selectedGroupIds: {
586
- [groupId: string]: boolean;
587
- };
588
- editingGroupId: string | null;
589
- width: number;
590
- height: number;
591
- offsetTop: number;
592
- offsetLeft: number;
593
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
594
- collaborators: Map<string, import("../types").Collaborator>;
595
- showStats: boolean;
596
- currentChartType: import("../element/types").ChartType;
597
- pasteDialog: {
598
- shown: false;
599
- data: null;
600
- } | {
601
- shown: true;
602
- data: import("../charts").Spreadsheet;
603
- };
604
- pendingImageElementId: string | null;
605
- showHyperlinkPopup: false | "info" | "editor";
606
- linkOpacity: number;
607
- trayModeEnabled: boolean;
608
- colorPalette?: {
609
- canvasBackground: import("../colors").ColorPaletteCustom;
610
- elementBackground: import("../colors").ColorPaletteCustom;
611
- elementStroke: import("../colors").ColorPaletteCustom;
612
- topPicks: {
613
- canvasBackground: [string, string, string, string, string];
614
- elementStroke: [string, string, string, string, string];
615
- elementBackground: [string, string, string, string, string];
616
- };
617
- } | undefined;
618
- allowWheelZoom?: boolean | undefined;
619
- allowPinchZoom?: boolean | undefined;
620
- pinnedScripts?: string[] | undefined;
621
- customPens?: any[] | undefined;
622
- currentStrokeOptions?: any;
623
- resetCustomPen?: any;
624
- gridColor: string;
625
- dynamicStyle: string;
626
- invertBindingBehaviour: boolean;
627
- selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
628
- };
629
- commitToHistory: false;
630
- };
631
- PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => JSX.Element;
632
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
633
- } & {
634
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
635
- };
636
- export declare const zoomToFit: ({ targetElements, appState, fitToViewport, viewportZoomFactor, }: {
637
- targetElements: readonly ExcalidrawElement[];
638
- appState: Readonly<AppState>;
639
- /** whether to fit content to viewport (beyond >100%) */
640
- fitToViewport: boolean;
641
- /** zoom content to cover X of the viewport, when fitToViewport=true */
642
- viewportZoomFactor?: number | undefined;
643
- }) => {
644
- appState: {
645
- scrollX: number;
646
- scrollY: number;
647
- zoom: {
648
- value: NormalizedZoomValue;
649
- };
650
- contextMenu: {
651
- items: import("../components/ContextMenu").ContextMenuItems;
652
- top: number;
653
- left: number;
654
- } | null;
655
- showWelcomeScreen: boolean;
656
- isLoading: boolean;
657
- errorMessage: import("react").ReactNode;
658
- activeEmbeddable: {
659
- element: import("../element/types").NonDeletedExcalidrawElement;
660
- state: "active" | "hover";
661
- } | null;
662
- draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
663
- resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
664
- multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
665
- selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
666
- isBindingEnabled: boolean;
667
- startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
668
- suggestedBindings: import("../element/binding").SuggestedBinding[];
669
- frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
670
- frameRendering: {
671
- enabled: boolean;
672
- name: boolean;
673
- outline: boolean;
674
- clip: boolean;
675
- };
676
- editingFrame: string | null;
677
- elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
678
- editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
679
- editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
680
- activeTool: {
681
- lastActiveTool: import("../types").LastActiveTool;
682
- locked: boolean;
683
- } & ({
684
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
685
- customType: null;
686
- } | {
687
- type: "custom";
688
- customType: string;
689
- });
690
- penMode: boolean;
691
- penDetected: boolean;
692
- exportBackground: boolean;
693
- exportEmbedScene: boolean;
694
- exportWithDarkMode: boolean;
695
- exportScale: number;
696
- currentItemStrokeColor: string;
697
- currentItemBackgroundColor: string;
698
- currentItemFillStyle: import("../element/types").FillStyle;
699
- currentItemStrokeWidth: number;
700
- currentItemStrokeStyle: import("../element/types").StrokeStyle;
701
- currentItemRoughness: number;
702
- currentItemOpacity: number;
703
- currentItemFontFamily: number;
704
- currentItemFontSize: number;
705
- currentItemTextAlign: string;
706
- currentItemStartArrowhead: import("../element/types").Arrowhead | null;
707
- currentItemEndArrowhead: import("../element/types").Arrowhead | null;
708
- currentItemRoundness: import("../element/types").StrokeRoundness;
709
- viewBackgroundColor: string;
710
- cursorButton: "up" | "down";
711
- scrolledOutside: boolean;
712
- name: string;
713
- isResizing: boolean;
714
- isRotating: boolean;
715
- openMenu: "canvas" | "shape" | null;
716
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
717
- openSidebar: {
718
- name: string;
719
- tab?: string | undefined;
720
- } | null;
721
- openDialog: "imageExport" | "help" | "jsonExport" | null;
722
- defaultSidebarDockedPreference: boolean;
723
- lastPointerDownWith: import("../element/types").PointerType;
724
- selectedElementIds: Readonly<{
725
- [id: string]: true;
726
- }>;
727
- previousSelectedElementIds: {
728
- [id: string]: true;
729
- };
730
- selectedElementsAreBeingDragged: boolean;
731
- shouldCacheIgnoreZoom: boolean;
732
- toast: {
733
- message: string;
734
- closable?: boolean | undefined;
735
- duration?: number | undefined;
736
- } | null;
737
- zenModeEnabled: boolean;
738
- theme: string;
739
- gridSize: number | null;
740
- previousGridSize: number | null;
741
- viewModeEnabled: boolean;
742
- selectedGroupIds: {
743
- [groupId: string]: boolean;
744
- };
745
- editingGroupId: string | null;
746
- width: number;
747
- height: number;
748
- offsetTop: number;
749
- offsetLeft: number;
750
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
751
- collaborators: Map<string, import("../types").Collaborator>;
752
- showStats: boolean;
753
- currentChartType: import("../element/types").ChartType;
754
- pasteDialog: {
755
- shown: false;
756
- data: null;
757
- } | {
758
- shown: true;
759
- data: import("../charts").Spreadsheet;
760
- };
761
- pendingImageElementId: string | null;
762
- showHyperlinkPopup: false | "info" | "editor";
763
- linkOpacity: number;
764
- trayModeEnabled: boolean;
765
- colorPalette?: {
766
- canvasBackground: import("../colors").ColorPaletteCustom;
767
- elementBackground: import("../colors").ColorPaletteCustom;
768
- elementStroke: import("../colors").ColorPaletteCustom;
769
- topPicks: {
770
- canvasBackground: [string, string, string, string, string];
771
- elementStroke: [string, string, string, string, string];
772
- elementBackground: [string, string, string, string, string];
773
- };
774
- } | undefined;
775
- allowWheelZoom?: boolean | undefined;
776
- allowPinchZoom?: boolean | undefined;
777
- pinnedScripts?: string[] | undefined;
778
- customPens?: any[] | undefined;
779
- currentStrokeOptions?: any;
780
- resetCustomPen?: any;
781
- gridColor: string;
782
- dynamicStyle: string;
783
- invertBindingBehaviour: boolean;
784
- selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
785
- };
786
- commitToHistory: boolean;
787
- };
788
- export declare const actionZoomToFitSelectionInViewport: {
789
- name: "zoomToFitSelectionInViewport";
790
- trackEvent: {
791
- category: "canvas";
792
- };
793
- perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
794
- appState: {
795
- scrollX: number;
796
- scrollY: number;
797
- zoom: {
798
- value: NormalizedZoomValue;
799
- };
800
- contextMenu: {
801
- items: import("../components/ContextMenu").ContextMenuItems;
802
- top: number;
803
- left: number;
804
- } | null;
805
- showWelcomeScreen: boolean;
806
- isLoading: boolean;
807
- errorMessage: import("react").ReactNode;
808
- activeEmbeddable: {
809
- element: import("../element/types").NonDeletedExcalidrawElement;
810
- state: "active" | "hover";
811
- } | null;
812
- draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
813
- resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
814
- multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
815
- selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
816
- isBindingEnabled: boolean;
817
- startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
818
- suggestedBindings: import("../element/binding").SuggestedBinding[];
819
- frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
820
- frameRendering: {
821
- enabled: boolean;
822
- name: boolean;
823
- outline: boolean;
824
- clip: boolean;
825
- };
826
- editingFrame: string | null;
827
- elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
828
- editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
829
- editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
830
- activeTool: {
831
- lastActiveTool: import("../types").LastActiveTool;
832
- locked: boolean;
833
- } & ({
834
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
835
- customType: null;
836
- } | {
837
- type: "custom";
838
- customType: string;
839
- });
840
- penMode: boolean;
841
- penDetected: boolean;
842
- exportBackground: boolean;
843
- exportEmbedScene: boolean;
844
- exportWithDarkMode: boolean;
845
- exportScale: number;
846
- currentItemStrokeColor: string;
847
- currentItemBackgroundColor: string;
848
- currentItemFillStyle: import("../element/types").FillStyle;
849
- currentItemStrokeWidth: number;
850
- currentItemStrokeStyle: import("../element/types").StrokeStyle;
851
- currentItemRoughness: number;
852
- currentItemOpacity: number;
853
- currentItemFontFamily: number;
854
- currentItemFontSize: number;
855
- currentItemTextAlign: string;
856
- currentItemStartArrowhead: import("../element/types").Arrowhead | null;
857
- currentItemEndArrowhead: import("../element/types").Arrowhead | null;
858
- currentItemRoundness: import("../element/types").StrokeRoundness;
859
- viewBackgroundColor: string;
860
- cursorButton: "up" | "down";
861
- scrolledOutside: boolean;
862
- name: string;
863
- isResizing: boolean;
864
- isRotating: boolean;
865
- openMenu: "canvas" | "shape" | null;
866
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
867
- openSidebar: {
868
- name: string;
869
- tab?: string | undefined;
870
- } | null;
871
- openDialog: "imageExport" | "help" | "jsonExport" | null;
872
- defaultSidebarDockedPreference: boolean;
873
- lastPointerDownWith: import("../element/types").PointerType;
874
- selectedElementIds: Readonly<{
875
- [id: string]: true;
876
- }>;
877
- previousSelectedElementIds: {
878
- [id: string]: true;
879
- };
880
- selectedElementsAreBeingDragged: boolean;
881
- shouldCacheIgnoreZoom: boolean;
882
- toast: {
883
- message: string;
884
- closable?: boolean | undefined;
885
- duration?: number | undefined;
886
- } | null;
887
- zenModeEnabled: boolean;
888
- theme: string;
889
- gridSize: number | null;
890
- previousGridSize: number | null;
891
- viewModeEnabled: boolean;
892
- selectedGroupIds: {
893
- [groupId: string]: boolean;
894
- };
895
- editingGroupId: string | null;
896
- width: number;
897
- height: number;
898
- offsetTop: number;
899
- offsetLeft: number;
900
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
901
- collaborators: Map<string, import("../types").Collaborator>;
902
- showStats: boolean;
903
- currentChartType: import("../element/types").ChartType;
904
- pasteDialog: {
905
- shown: false;
906
- data: null;
907
- } | {
908
- shown: true;
909
- data: import("../charts").Spreadsheet;
910
- };
911
- pendingImageElementId: string | null;
912
- showHyperlinkPopup: false | "info" | "editor";
913
- linkOpacity: number;
914
- trayModeEnabled: boolean;
915
- colorPalette?: {
916
- canvasBackground: import("../colors").ColorPaletteCustom;
917
- elementBackground: import("../colors").ColorPaletteCustom;
918
- elementStroke: import("../colors").ColorPaletteCustom;
919
- topPicks: {
920
- canvasBackground: [string, string, string, string, string];
921
- elementStroke: [string, string, string, string, string];
922
- elementBackground: [string, string, string, string, string];
923
- };
924
- } | undefined;
925
- allowWheelZoom?: boolean | undefined;
926
- allowPinchZoom?: boolean | undefined;
927
- pinnedScripts?: string[] | undefined;
928
- customPens?: any[] | undefined;
929
- currentStrokeOptions?: any;
930
- resetCustomPen?: any;
931
- gridColor: string;
932
- dynamicStyle: string;
933
- invertBindingBehaviour: boolean;
934
- selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
935
- };
936
- commitToHistory: boolean;
937
- };
938
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
939
- } & {
940
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
941
- };
942
- export declare const actionZoomToFitSelection: {
943
- name: "zoomToFitSelection";
944
- trackEvent: {
945
- category: "canvas";
946
- };
947
- perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
948
- appState: {
949
- scrollX: number;
950
- scrollY: number;
951
- zoom: {
952
- value: NormalizedZoomValue;
953
- };
954
- contextMenu: {
955
- items: import("../components/ContextMenu").ContextMenuItems;
956
- top: number;
957
- left: number;
958
- } | null;
959
- showWelcomeScreen: boolean;
960
- isLoading: boolean;
961
- errorMessage: import("react").ReactNode;
962
- activeEmbeddable: {
963
- element: import("../element/types").NonDeletedExcalidrawElement;
964
- state: "active" | "hover";
965
- } | null;
966
- draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
967
- resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
968
- multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
969
- selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
970
- isBindingEnabled: boolean;
971
- startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
972
- suggestedBindings: import("../element/binding").SuggestedBinding[];
973
- frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
974
- frameRendering: {
975
- enabled: boolean;
976
- name: boolean;
977
- outline: boolean;
978
- clip: boolean;
979
- };
980
- editingFrame: string | null;
981
- elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
982
- editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
983
- editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
984
- activeTool: {
985
- lastActiveTool: import("../types").LastActiveTool;
986
- locked: boolean;
987
- } & ({
988
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
989
- customType: null;
990
- } | {
991
- type: "custom";
992
- customType: string;
993
- });
994
- penMode: boolean;
995
- penDetected: boolean;
996
- exportBackground: boolean;
997
- exportEmbedScene: boolean;
998
- exportWithDarkMode: boolean;
999
- exportScale: number;
1000
- currentItemStrokeColor: string;
1001
- currentItemBackgroundColor: string;
1002
- currentItemFillStyle: import("../element/types").FillStyle;
1003
- currentItemStrokeWidth: number;
1004
- currentItemStrokeStyle: import("../element/types").StrokeStyle;
1005
- currentItemRoughness: number;
1006
- currentItemOpacity: number;
1007
- currentItemFontFamily: number;
1008
- currentItemFontSize: number;
1009
- currentItemTextAlign: string;
1010
- currentItemStartArrowhead: import("../element/types").Arrowhead | null;
1011
- currentItemEndArrowhead: import("../element/types").Arrowhead | null;
1012
- currentItemRoundness: import("../element/types").StrokeRoundness;
1013
- viewBackgroundColor: string;
1014
- cursorButton: "up" | "down";
1015
- scrolledOutside: boolean;
1016
- name: string;
1017
- isResizing: boolean;
1018
- isRotating: boolean;
1019
- openMenu: "canvas" | "shape" | null;
1020
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
1021
- openSidebar: {
1022
- name: string;
1023
- tab?: string | undefined;
1024
- } | null;
1025
- openDialog: "imageExport" | "help" | "jsonExport" | null;
1026
- defaultSidebarDockedPreference: boolean;
1027
- lastPointerDownWith: import("../element/types").PointerType;
1028
- selectedElementIds: Readonly<{
1029
- [id: string]: true;
1030
- }>;
1031
- previousSelectedElementIds: {
1032
- [id: string]: true;
1033
- };
1034
- selectedElementsAreBeingDragged: boolean;
1035
- shouldCacheIgnoreZoom: boolean;
1036
- toast: {
1037
- message: string;
1038
- closable?: boolean | undefined;
1039
- duration?: number | undefined;
1040
- } | null;
1041
- zenModeEnabled: boolean;
1042
- theme: string;
1043
- gridSize: number | null;
1044
- previousGridSize: number | null;
1045
- viewModeEnabled: boolean;
1046
- selectedGroupIds: {
1047
- [groupId: string]: boolean;
1048
- };
1049
- editingGroupId: string | null;
1050
- width: number;
1051
- height: number;
1052
- offsetTop: number;
1053
- offsetLeft: number;
1054
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
1055
- collaborators: Map<string, import("../types").Collaborator>;
1056
- showStats: boolean;
1057
- currentChartType: import("../element/types").ChartType;
1058
- pasteDialog: {
1059
- shown: false;
1060
- data: null;
1061
- } | {
1062
- shown: true;
1063
- data: import("../charts").Spreadsheet;
1064
- };
1065
- pendingImageElementId: string | null;
1066
- showHyperlinkPopup: false | "info" | "editor";
1067
- linkOpacity: number;
1068
- trayModeEnabled: boolean;
1069
- colorPalette?: {
1070
- canvasBackground: import("../colors").ColorPaletteCustom;
1071
- elementBackground: import("../colors").ColorPaletteCustom;
1072
- elementStroke: import("../colors").ColorPaletteCustom;
1073
- topPicks: {
1074
- canvasBackground: [string, string, string, string, string];
1075
- elementStroke: [string, string, string, string, string];
1076
- elementBackground: [string, string, string, string, string];
1077
- };
1078
- } | undefined;
1079
- allowWheelZoom?: boolean | undefined;
1080
- allowPinchZoom?: boolean | undefined;
1081
- pinnedScripts?: string[] | undefined;
1082
- customPens?: any[] | undefined;
1083
- currentStrokeOptions?: any;
1084
- resetCustomPen?: any;
1085
- gridColor: string;
1086
- dynamicStyle: string;
1087
- invertBindingBehaviour: boolean;
1088
- selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
1089
- };
1090
- commitToHistory: boolean;
1091
- };
1092
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
1093
- } & {
1094
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
1095
- };
1096
- export declare const actionZoomToFit: {
1097
- name: "zoomToFit";
1098
- viewMode: true;
1099
- trackEvent: {
1100
- category: "canvas";
1101
- };
1102
- perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
1103
- appState: {
1104
- scrollX: number;
1105
- scrollY: number;
1106
- zoom: {
1107
- value: NormalizedZoomValue;
1108
- };
1109
- contextMenu: {
1110
- items: import("../components/ContextMenu").ContextMenuItems;
1111
- top: number;
1112
- left: number;
1113
- } | null;
1114
- showWelcomeScreen: boolean;
1115
- isLoading: boolean;
1116
- errorMessage: import("react").ReactNode;
1117
- activeEmbeddable: {
1118
- element: import("../element/types").NonDeletedExcalidrawElement;
1119
- state: "active" | "hover";
1120
- } | null;
1121
- draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
1122
- resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
1123
- multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
1124
- selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
1125
- isBindingEnabled: boolean;
1126
- startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
1127
- suggestedBindings: import("../element/binding").SuggestedBinding[];
1128
- frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
1129
- frameRendering: {
1130
- enabled: boolean;
1131
- name: boolean;
1132
- outline: boolean;
1133
- clip: boolean;
1134
- };
1135
- editingFrame: string | null;
1136
- elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
1137
- editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
1138
- editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
1139
- activeTool: {
1140
- lastActiveTool: import("../types").LastActiveTool;
1141
- locked: boolean;
1142
- } & ({
1143
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
1144
- customType: null;
1145
- } | {
1146
- type: "custom";
1147
- customType: string;
1148
- });
1149
- penMode: boolean;
1150
- penDetected: boolean;
1151
- exportBackground: boolean;
1152
- exportEmbedScene: boolean;
1153
- exportWithDarkMode: boolean;
1154
- exportScale: number;
1155
- currentItemStrokeColor: string;
1156
- currentItemBackgroundColor: string;
1157
- currentItemFillStyle: import("../element/types").FillStyle;
1158
- currentItemStrokeWidth: number;
1159
- currentItemStrokeStyle: import("../element/types").StrokeStyle;
1160
- currentItemRoughness: number;
1161
- currentItemOpacity: number;
1162
- currentItemFontFamily: number;
1163
- currentItemFontSize: number;
1164
- currentItemTextAlign: string;
1165
- currentItemStartArrowhead: import("../element/types").Arrowhead | null;
1166
- currentItemEndArrowhead: import("../element/types").Arrowhead | null;
1167
- currentItemRoundness: import("../element/types").StrokeRoundness;
1168
- viewBackgroundColor: string;
1169
- cursorButton: "up" | "down";
1170
- scrolledOutside: boolean;
1171
- name: string;
1172
- isResizing: boolean;
1173
- isRotating: boolean;
1174
- openMenu: "canvas" | "shape" | null;
1175
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
1176
- openSidebar: {
1177
- name: string;
1178
- tab?: string | undefined;
1179
- } | null;
1180
- openDialog: "imageExport" | "help" | "jsonExport" | null;
1181
- defaultSidebarDockedPreference: boolean;
1182
- lastPointerDownWith: import("../element/types").PointerType;
1183
- selectedElementIds: Readonly<{
1184
- [id: string]: true;
1185
- }>;
1186
- previousSelectedElementIds: {
1187
- [id: string]: true;
1188
- };
1189
- selectedElementsAreBeingDragged: boolean;
1190
- shouldCacheIgnoreZoom: boolean;
1191
- toast: {
1192
- message: string;
1193
- closable?: boolean | undefined;
1194
- duration?: number | undefined;
1195
- } | null;
1196
- zenModeEnabled: boolean;
1197
- theme: string;
1198
- gridSize: number | null;
1199
- previousGridSize: number | null;
1200
- viewModeEnabled: boolean;
1201
- selectedGroupIds: {
1202
- [groupId: string]: boolean;
1203
- };
1204
- editingGroupId: string | null;
1205
- width: number;
1206
- height: number;
1207
- offsetTop: number;
1208
- offsetLeft: number;
1209
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
1210
- collaborators: Map<string, import("../types").Collaborator>;
1211
- showStats: boolean;
1212
- currentChartType: import("../element/types").ChartType;
1213
- pasteDialog: {
1214
- shown: false;
1215
- data: null;
1216
- } | {
1217
- shown: true;
1218
- data: import("../charts").Spreadsheet;
1219
- };
1220
- pendingImageElementId: string | null;
1221
- showHyperlinkPopup: false | "info" | "editor";
1222
- linkOpacity: number;
1223
- trayModeEnabled: boolean;
1224
- colorPalette?: {
1225
- canvasBackground: import("../colors").ColorPaletteCustom;
1226
- elementBackground: import("../colors").ColorPaletteCustom;
1227
- elementStroke: import("../colors").ColorPaletteCustom;
1228
- topPicks: {
1229
- canvasBackground: [string, string, string, string, string];
1230
- elementStroke: [string, string, string, string, string];
1231
- elementBackground: [string, string, string, string, string];
1232
- };
1233
- } | undefined;
1234
- allowWheelZoom?: boolean | undefined;
1235
- allowPinchZoom?: boolean | undefined;
1236
- pinnedScripts?: string[] | undefined;
1237
- customPens?: any[] | undefined;
1238
- currentStrokeOptions?: any;
1239
- resetCustomPen?: any;
1240
- gridColor: string;
1241
- dynamicStyle: string;
1242
- invertBindingBehaviour: boolean;
1243
- selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
1244
- };
1245
- commitToHistory: boolean;
1246
- };
1247
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
1248
- } & {
1249
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
1250
- };
1251
- export declare const actionToggleTheme: {
1252
- name: "toggleTheme";
1253
- viewMode: true;
1254
- trackEvent: {
1255
- category: "canvas";
1256
- };
1257
- perform: (_: readonly ExcalidrawElement[], appState: Readonly<AppState>, value: any, app: import("../types").AppClassProperties) => {
1258
- appState: {
1259
- theme: any;
1260
- contextMenu: {
1261
- items: import("../components/ContextMenu").ContextMenuItems;
1262
- top: number;
1263
- left: number;
1264
- } | null;
1265
- showWelcomeScreen: boolean;
1266
- isLoading: boolean;
1267
- errorMessage: import("react").ReactNode;
1268
- activeEmbeddable: {
1269
- element: import("../element/types").NonDeletedExcalidrawElement;
1270
- state: "active" | "hover";
1271
- } | null;
1272
- draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
1273
- resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
1274
- multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
1275
- selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
1276
- isBindingEnabled: boolean;
1277
- startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
1278
- suggestedBindings: import("../element/binding").SuggestedBinding[];
1279
- frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
1280
- frameRendering: {
1281
- enabled: boolean;
1282
- name: boolean;
1283
- outline: boolean;
1284
- clip: boolean;
1285
- };
1286
- editingFrame: string | null;
1287
- elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
1288
- editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
1289
- editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
1290
- activeTool: {
1291
- lastActiveTool: import("../types").LastActiveTool;
1292
- locked: boolean;
1293
- } & ({
1294
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
1295
- customType: null;
1296
- } | {
1297
- type: "custom";
1298
- customType: string;
1299
- });
1300
- penMode: boolean;
1301
- penDetected: boolean;
1302
- exportBackground: boolean;
1303
- exportEmbedScene: boolean;
1304
- exportWithDarkMode: boolean;
1305
- exportScale: number;
1306
- currentItemStrokeColor: string;
1307
- currentItemBackgroundColor: string;
1308
- currentItemFillStyle: import("../element/types").FillStyle;
1309
- currentItemStrokeWidth: number;
1310
- currentItemStrokeStyle: import("../element/types").StrokeStyle;
1311
- currentItemRoughness: number;
1312
- currentItemOpacity: number;
1313
- currentItemFontFamily: number;
1314
- currentItemFontSize: number;
1315
- currentItemTextAlign: string;
1316
- currentItemStartArrowhead: import("../element/types").Arrowhead | null;
1317
- currentItemEndArrowhead: import("../element/types").Arrowhead | null;
1318
- currentItemRoundness: import("../element/types").StrokeRoundness;
1319
- viewBackgroundColor: string;
1320
- scrollX: number;
1321
- scrollY: number;
1322
- cursorButton: "up" | "down";
1323
- scrolledOutside: boolean;
1324
- name: string;
1325
- isResizing: boolean;
1326
- isRotating: boolean;
1327
- zoom: Readonly<{
1328
- value: NormalizedZoomValue;
1329
- }>;
1330
- openMenu: "canvas" | "shape" | null;
1331
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
1332
- openSidebar: {
1333
- name: string;
1334
- tab?: string | undefined;
1335
- } | null;
1336
- openDialog: "imageExport" | "help" | "jsonExport" | null;
1337
- defaultSidebarDockedPreference: boolean;
1338
- lastPointerDownWith: import("../element/types").PointerType;
1339
- selectedElementIds: Readonly<{
1340
- [id: string]: true;
1341
- }>;
1342
- previousSelectedElementIds: {
1343
- [id: string]: true;
1344
- };
1345
- selectedElementsAreBeingDragged: boolean;
1346
- shouldCacheIgnoreZoom: boolean;
1347
- toast: {
1348
- message: string;
1349
- closable?: boolean | undefined;
1350
- duration?: number | undefined;
1351
- } | null;
1352
- zenModeEnabled: boolean;
1353
- gridSize: number | null;
1354
- previousGridSize: number | null;
1355
- viewModeEnabled: boolean;
1356
- selectedGroupIds: {
1357
- [groupId: string]: boolean;
1358
- };
1359
- editingGroupId: string | null;
1360
- width: number;
1361
- height: number;
1362
- offsetTop: number;
1363
- offsetLeft: number;
1364
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
1365
- collaborators: Map<string, import("../types").Collaborator>;
1366
- showStats: boolean;
1367
- currentChartType: import("../element/types").ChartType;
1368
- pasteDialog: {
1369
- shown: false;
1370
- data: null;
1371
- } | {
1372
- shown: true;
1373
- data: import("../charts").Spreadsheet;
1374
- };
1375
- pendingImageElementId: string | null;
1376
- showHyperlinkPopup: false | "info" | "editor";
1377
- linkOpacity: number;
1378
- trayModeEnabled: boolean;
1379
- colorPalette?: {
1380
- canvasBackground: import("../colors").ColorPaletteCustom;
1381
- elementBackground: import("../colors").ColorPaletteCustom;
1382
- elementStroke: import("../colors").ColorPaletteCustom;
1383
- topPicks: {
1384
- canvasBackground: [string, string, string, string, string];
1385
- elementStroke: [string, string, string, string, string];
1386
- elementBackground: [string, string, string, string, string];
1387
- };
1388
- } | undefined;
1389
- allowWheelZoom?: boolean | undefined;
1390
- allowPinchZoom?: boolean | undefined;
1391
- pinnedScripts?: string[] | undefined;
1392
- customPens?: any[] | undefined;
1393
- currentStrokeOptions?: any;
1394
- resetCustomPen?: any;
1395
- gridColor: string;
1396
- dynamicStyle: string;
1397
- invertBindingBehaviour: boolean;
1398
- selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
1399
- };
1400
- commitToHistory: false;
1401
- };
1402
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
1403
- predicate: (elements: readonly ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
1404
- } & {
1405
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
1406
- };
1407
- export declare const actionToggleEraserTool: {
1408
- name: "toggleEraserTool";
1409
- trackEvent: {
1410
- category: "toolbar";
1411
- };
1412
- perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
1413
- appState: {
1414
- selectedElementIds: {};
1415
- selectedGroupIds: {};
1416
- activeEmbeddable: null;
1417
- activeTool: {
1418
- lastActiveTool: import("../types").LastActiveTool;
1419
- locked: boolean;
1420
- } & ({
1421
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
1422
- customType: null;
1423
- } | {
1424
- type: "custom";
1425
- customType: string;
1426
- });
1427
- contextMenu: {
1428
- items: import("../components/ContextMenu").ContextMenuItems;
1429
- top: number;
1430
- left: number;
1431
- } | null;
1432
- showWelcomeScreen: boolean;
1433
- isLoading: boolean;
1434
- errorMessage: import("react").ReactNode;
1435
- draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
1436
- resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
1437
- multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
1438
- selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
1439
- isBindingEnabled: boolean;
1440
- startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
1441
- suggestedBindings: import("../element/binding").SuggestedBinding[];
1442
- frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
1443
- frameRendering: {
1444
- enabled: boolean;
1445
- name: boolean;
1446
- outline: boolean;
1447
- clip: boolean;
1448
- };
1449
- editingFrame: string | null;
1450
- elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
1451
- editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
1452
- editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
1453
- penMode: boolean;
1454
- penDetected: boolean;
1455
- exportBackground: boolean;
1456
- exportEmbedScene: boolean;
1457
- exportWithDarkMode: boolean;
1458
- exportScale: number;
1459
- currentItemStrokeColor: string;
1460
- currentItemBackgroundColor: string;
1461
- currentItemFillStyle: import("../element/types").FillStyle;
1462
- currentItemStrokeWidth: number;
1463
- currentItemStrokeStyle: import("../element/types").StrokeStyle;
1464
- currentItemRoughness: number;
1465
- currentItemOpacity: number;
1466
- currentItemFontFamily: number;
1467
- currentItemFontSize: number;
1468
- currentItemTextAlign: string;
1469
- currentItemStartArrowhead: import("../element/types").Arrowhead | null;
1470
- currentItemEndArrowhead: import("../element/types").Arrowhead | null;
1471
- currentItemRoundness: import("../element/types").StrokeRoundness;
1472
- viewBackgroundColor: string;
1473
- scrollX: number;
1474
- scrollY: number;
1475
- cursorButton: "up" | "down";
1476
- scrolledOutside: boolean;
1477
- name: string;
1478
- isResizing: boolean;
1479
- isRotating: boolean;
1480
- zoom: Readonly<{
1481
- value: NormalizedZoomValue;
1482
- }>;
1483
- openMenu: "canvas" | "shape" | null;
1484
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
1485
- openSidebar: {
1486
- name: string;
1487
- tab?: string | undefined;
1488
- } | null;
1489
- openDialog: "imageExport" | "help" | "jsonExport" | null;
1490
- defaultSidebarDockedPreference: boolean;
1491
- lastPointerDownWith: import("../element/types").PointerType;
1492
- previousSelectedElementIds: {
1493
- [id: string]: true;
1494
- };
1495
- selectedElementsAreBeingDragged: boolean;
1496
- shouldCacheIgnoreZoom: boolean;
1497
- toast: {
1498
- message: string;
1499
- closable?: boolean | undefined;
1500
- duration?: number | undefined;
1501
- } | null;
1502
- zenModeEnabled: boolean;
1503
- theme: string;
1504
- gridSize: number | null;
1505
- previousGridSize: number | null;
1506
- viewModeEnabled: boolean;
1507
- editingGroupId: string | null;
1508
- width: number;
1509
- height: number;
1510
- offsetTop: number;
1511
- offsetLeft: number;
1512
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
1513
- collaborators: Map<string, import("../types").Collaborator>;
1514
- showStats: boolean;
1515
- currentChartType: import("../element/types").ChartType;
1516
- pasteDialog: {
1517
- shown: false;
1518
- data: null;
1519
- } | {
1520
- shown: true;
1521
- data: import("../charts").Spreadsheet;
1522
- };
1523
- pendingImageElementId: string | null;
1524
- showHyperlinkPopup: false | "info" | "editor";
1525
- linkOpacity: number;
1526
- trayModeEnabled: boolean;
1527
- colorPalette?: {
1528
- canvasBackground: import("../colors").ColorPaletteCustom;
1529
- elementBackground: import("../colors").ColorPaletteCustom;
1530
- elementStroke: import("../colors").ColorPaletteCustom;
1531
- topPicks: {
1532
- canvasBackground: [string, string, string, string, string];
1533
- elementStroke: [string, string, string, string, string];
1534
- elementBackground: [string, string, string, string, string];
1535
- };
1536
- } | undefined;
1537
- allowWheelZoom?: boolean | undefined;
1538
- allowPinchZoom?: boolean | undefined;
1539
- pinnedScripts?: string[] | undefined;
1540
- customPens?: any[] | undefined;
1541
- currentStrokeOptions?: any;
1542
- resetCustomPen?: any;
1543
- gridColor: string;
1544
- dynamicStyle: string;
1545
- invertBindingBehaviour: boolean;
1546
- selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
1547
- };
1548
- commitToHistory: true;
1549
- };
1550
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
1551
- } & {
1552
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
1553
- };
1554
- export declare const actionToggleHandTool: {
1555
- name: "toggleHandTool";
1556
- trackEvent: {
1557
- category: "toolbar";
1558
- };
1559
- perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
1560
- appState: {
1561
- selectedElementIds: {};
1562
- selectedGroupIds: {};
1563
- activeEmbeddable: null;
1564
- activeTool: {
1565
- lastActiveTool: import("../types").LastActiveTool;
1566
- locked: boolean;
1567
- } & ({
1568
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
1569
- customType: null;
1570
- } | {
1571
- type: "custom";
1572
- customType: string;
1573
- });
1574
- contextMenu: {
1575
- items: import("../components/ContextMenu").ContextMenuItems;
1576
- top: number;
1577
- left: number;
1578
- } | null;
1579
- showWelcomeScreen: boolean;
1580
- isLoading: boolean;
1581
- errorMessage: import("react").ReactNode;
1582
- draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
1583
- resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
1584
- multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
1585
- selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
1586
- isBindingEnabled: boolean;
1587
- startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
1588
- suggestedBindings: import("../element/binding").SuggestedBinding[];
1589
- frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
1590
- frameRendering: {
1591
- enabled: boolean;
1592
- name: boolean;
1593
- outline: boolean;
1594
- clip: boolean;
1595
- };
1596
- editingFrame: string | null;
1597
- elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
1598
- editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
1599
- editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
1600
- penMode: boolean;
1601
- penDetected: boolean;
1602
- exportBackground: boolean;
1603
- exportEmbedScene: boolean;
1604
- exportWithDarkMode: boolean;
1605
- exportScale: number;
1606
- currentItemStrokeColor: string;
1607
- currentItemBackgroundColor: string;
1608
- currentItemFillStyle: import("../element/types").FillStyle;
1609
- currentItemStrokeWidth: number;
1610
- currentItemStrokeStyle: import("../element/types").StrokeStyle;
1611
- currentItemRoughness: number;
1612
- currentItemOpacity: number;
1613
- currentItemFontFamily: number;
1614
- currentItemFontSize: number;
1615
- currentItemTextAlign: string;
1616
- currentItemStartArrowhead: import("../element/types").Arrowhead | null;
1617
- currentItemEndArrowhead: import("../element/types").Arrowhead | null;
1618
- currentItemRoundness: import("../element/types").StrokeRoundness;
1619
- viewBackgroundColor: string;
1620
- scrollX: number;
1621
- scrollY: number;
1622
- cursorButton: "up" | "down";
1623
- scrolledOutside: boolean;
1624
- name: string;
1625
- isResizing: boolean;
1626
- isRotating: boolean;
1627
- zoom: Readonly<{
1628
- value: NormalizedZoomValue;
1629
- }>;
1630
- openMenu: "canvas" | "shape" | null;
1631
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
1632
- openSidebar: {
1633
- name: string;
1634
- tab?: string | undefined;
1635
- } | null;
1636
- openDialog: "imageExport" | "help" | "jsonExport" | null;
1637
- defaultSidebarDockedPreference: boolean;
1638
- lastPointerDownWith: import("../element/types").PointerType;
1639
- previousSelectedElementIds: {
1640
- [id: string]: true;
1641
- };
1642
- selectedElementsAreBeingDragged: boolean;
1643
- shouldCacheIgnoreZoom: boolean;
1644
- toast: {
1645
- message: string;
1646
- closable?: boolean | undefined;
1647
- duration?: number | undefined;
1648
- } | null;
1649
- zenModeEnabled: boolean;
1650
- theme: string;
1651
- gridSize: number | null;
1652
- previousGridSize: number | null;
1653
- viewModeEnabled: boolean;
1654
- editingGroupId: string | null;
1655
- width: number;
1656
- height: number;
1657
- offsetTop: number;
1658
- offsetLeft: number;
1659
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
1660
- collaborators: Map<string, import("../types").Collaborator>;
1661
- showStats: boolean;
1662
- currentChartType: import("../element/types").ChartType;
1663
- pasteDialog: {
1664
- shown: false;
1665
- data: null;
1666
- } | {
1667
- shown: true;
1668
- data: import("../charts").Spreadsheet;
1669
- };
1670
- pendingImageElementId: string | null;
1671
- showHyperlinkPopup: false | "info" | "editor";
1672
- linkOpacity: number;
1673
- trayModeEnabled: boolean;
1674
- colorPalette?: {
1675
- canvasBackground: import("../colors").ColorPaletteCustom;
1676
- elementBackground: import("../colors").ColorPaletteCustom;
1677
- elementStroke: import("../colors").ColorPaletteCustom;
1678
- topPicks: {
1679
- canvasBackground: [string, string, string, string, string];
1680
- elementStroke: [string, string, string, string, string];
1681
- elementBackground: [string, string, string, string, string];
1682
- };
1683
- } | undefined;
1684
- allowWheelZoom?: boolean | undefined;
1685
- allowPinchZoom?: boolean | undefined;
1686
- pinnedScripts?: string[] | undefined;
1687
- customPens?: any[] | undefined;
1688
- currentStrokeOptions?: any;
1689
- resetCustomPen?: any;
1690
- gridColor: string;
1691
- dynamicStyle: string;
1692
- invertBindingBehaviour: boolean;
1693
- selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
1694
- };
1695
- commitToHistory: true;
1696
- };
1697
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
1698
- } & {
1699
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
1700
- };
1701
- export declare const zoomToFitElements: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, zoomToSelection: boolean, maxZoom?: number, margin?: number) => {
1702
- appState: {
1703
- zoom: {
1704
- value: NormalizedZoomValue;
1705
- };
1706
- scrollX: number;
1707
- scrollY: number;
1708
- contextMenu: {
1709
- items: import("../components/ContextMenu").ContextMenuItems;
1710
- top: number;
1711
- left: number;
1712
- } | null;
1713
- showWelcomeScreen: boolean;
1714
- isLoading: boolean;
1715
- errorMessage: import("react").ReactNode;
1716
- activeEmbeddable: {
1717
- element: import("../element/types").NonDeletedExcalidrawElement;
1718
- state: "active" | "hover";
1719
- } | null;
1720
- draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
1721
- resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
1722
- multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
1723
- selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
1724
- isBindingEnabled: boolean;
1725
- startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
1726
- suggestedBindings: import("../element/binding").SuggestedBinding[];
1727
- frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
1728
- frameRendering: {
1729
- enabled: boolean;
1730
- name: boolean;
1731
- outline: boolean;
1732
- clip: boolean;
1733
- };
1734
- editingFrame: string | null;
1735
- elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
1736
- editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
1737
- editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
1738
- activeTool: {
1739
- lastActiveTool: import("../types").LastActiveTool;
1740
- locked: boolean;
1741
- } & ({
1742
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
1743
- customType: null;
1744
- } | {
1745
- type: "custom";
1746
- customType: string;
1747
- });
1748
- penMode: boolean;
1749
- penDetected: boolean;
1750
- exportBackground: boolean;
1751
- exportEmbedScene: boolean;
1752
- exportWithDarkMode: boolean;
1753
- exportScale: number;
1754
- currentItemStrokeColor: string;
1755
- currentItemBackgroundColor: string;
1756
- currentItemFillStyle: import("../element/types").FillStyle;
1757
- currentItemStrokeWidth: number;
1758
- currentItemStrokeStyle: import("../element/types").StrokeStyle;
1759
- currentItemRoughness: number;
1760
- currentItemOpacity: number;
1761
- currentItemFontFamily: number;
1762
- currentItemFontSize: number;
1763
- currentItemTextAlign: string;
1764
- currentItemStartArrowhead: import("../element/types").Arrowhead | null;
1765
- currentItemEndArrowhead: import("../element/types").Arrowhead | null;
1766
- currentItemRoundness: import("../element/types").StrokeRoundness;
1767
- viewBackgroundColor: string;
1768
- cursorButton: "up" | "down";
1769
- scrolledOutside: boolean;
1770
- name: string;
1771
- isResizing: boolean;
1772
- isRotating: boolean;
1773
- openMenu: "canvas" | "shape" | null;
1774
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
1775
- openSidebar: {
1776
- name: string;
1777
- tab?: string | undefined;
1778
- } | null;
1779
- openDialog: "imageExport" | "help" | "jsonExport" | null;
1780
- defaultSidebarDockedPreference: boolean;
1781
- lastPointerDownWith: import("../element/types").PointerType;
1782
- selectedElementIds: Readonly<{
1783
- [id: string]: true;
1784
- }>;
1785
- previousSelectedElementIds: {
1786
- [id: string]: true;
1787
- };
1788
- selectedElementsAreBeingDragged: boolean;
1789
- shouldCacheIgnoreZoom: boolean;
1790
- toast: {
1791
- message: string;
1792
- closable?: boolean | undefined;
1793
- duration?: number | undefined;
1794
- } | null;
1795
- zenModeEnabled: boolean;
1796
- theme: string;
1797
- gridSize: number | null;
1798
- previousGridSize: number | null;
1799
- viewModeEnabled: boolean;
1800
- selectedGroupIds: {
1801
- [groupId: string]: boolean;
1802
- };
1803
- editingGroupId: string | null;
1804
- width: number;
1805
- height: number;
1806
- offsetTop: number;
1807
- offsetLeft: number;
1808
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
1809
- collaborators: Map<string, import("../types").Collaborator>;
1810
- showStats: boolean;
1811
- currentChartType: import("../element/types").ChartType;
1812
- pasteDialog: {
1813
- shown: false;
1814
- data: null;
1815
- } | {
1816
- shown: true;
1817
- data: import("../charts").Spreadsheet;
1818
- };
1819
- pendingImageElementId: string | null;
1820
- showHyperlinkPopup: false | "info" | "editor";
1821
- linkOpacity: number;
1822
- trayModeEnabled: boolean;
1823
- colorPalette?: {
1824
- canvasBackground: import("../colors").ColorPaletteCustom;
1825
- elementBackground: import("../colors").ColorPaletteCustom;
1826
- elementStroke: import("../colors").ColorPaletteCustom;
1827
- topPicks: {
1828
- canvasBackground: [string, string, string, string, string];
1829
- elementStroke: [string, string, string, string, string];
1830
- elementBackground: [string, string, string, string, string];
1831
- };
1832
- } | undefined;
1833
- allowWheelZoom?: boolean | undefined;
1834
- allowPinchZoom?: boolean | undefined;
1835
- pinnedScripts?: string[] | undefined;
1836
- customPens?: any[] | undefined;
1837
- currentStrokeOptions?: any;
1838
- resetCustomPen?: any;
1839
- gridColor: string;
1840
- dynamicStyle: string;
1841
- invertBindingBehaviour: boolean;
1842
- selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
1843
- };
1844
- commitToHistory: boolean;
1845
- };
1
+ /// <reference types="react" />
2
+ import { ExcalidrawElement } from "../element/types";
3
+ import { AppClassProperties, AppState, NormalizedZoomValue } from "../types";
4
+ export declare const actionChangeViewBackgroundColor: {
5
+ name: "changeViewBackgroundColor";
6
+ trackEvent: false;
7
+ predicate: (elements: readonly ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
8
+ perform: (_: readonly ExcalidrawElement[], appState: Readonly<AppState>, value: any) => {
9
+ appState: any;
10
+ commitToHistory: boolean;
11
+ };
12
+ PanelComponent: ({ elements, appState, updateData, appProps }: import("./types").PanelComponentProps) => JSX.Element;
13
+ } & {
14
+ keyTest?: undefined;
15
+ };
16
+ export declare const actionClearCanvas: {
17
+ name: "clearCanvas";
18
+ trackEvent: {
19
+ category: "canvas";
20
+ };
21
+ predicate: (elements: readonly ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
22
+ perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
23
+ elements: ExcalidrawElement[];
24
+ appState: {
25
+ files: {};
26
+ theme: import("../element/types").Theme;
27
+ penMode: boolean;
28
+ penDetected: boolean;
29
+ exportBackground: boolean;
30
+ exportEmbedScene: boolean;
31
+ gridSize: number | null;
32
+ showStats: boolean;
33
+ pasteDialog: {
34
+ shown: false;
35
+ data: null;
36
+ } | {
37
+ shown: true;
38
+ data: import("../charts").Spreadsheet;
39
+ };
40
+ activeTool: {
41
+ lastActiveTool: import("../types").LastActiveTool;
42
+ locked: boolean;
43
+ } & ({
44
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
45
+ customType: null;
46
+ } | {
47
+ type: "custom";
48
+ customType: string;
49
+ });
50
+ colorPalette: {
51
+ canvasBackground: import("../colors").ColorPaletteCustom;
52
+ elementBackground: import("../colors").ColorPaletteCustom;
53
+ elementStroke: import("../colors").ColorPaletteCustom;
54
+ topPicks: {
55
+ canvasBackground: [string, string, string, string, string];
56
+ elementStroke: [string, string, string, string, string];
57
+ elementBackground: [string, string, string, string, string];
58
+ };
59
+ } | undefined;
60
+ trayModeEnabled: boolean;
61
+ allowPinchZoom: boolean | undefined;
62
+ allowWheelZoom: boolean | undefined;
63
+ pinnedScripts: string[] | undefined;
64
+ customPens: any[] | undefined;
65
+ name: string;
66
+ toast: {
67
+ message: string;
68
+ closable?: boolean | undefined;
69
+ duration?: number | undefined;
70
+ } | null;
71
+ collaborators: Map<string, import("../types").Collaborator>;
72
+ contextMenu: {
73
+ items: import("../components/ContextMenu").ContextMenuItems;
74
+ top: number;
75
+ left: number;
76
+ } | null;
77
+ showWelcomeScreen: boolean;
78
+ isLoading: boolean;
79
+ errorMessage: import("react").ReactNode;
80
+ activeEmbeddable: {
81
+ element: import("../element/types").NonDeletedExcalidrawElement;
82
+ state: "active" | "hover";
83
+ } | null;
84
+ draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
85
+ resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
86
+ multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
87
+ selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
88
+ isBindingEnabled: boolean;
89
+ startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
90
+ suggestedBindings: import("../element/binding").SuggestedBinding[];
91
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
92
+ frameRendering: {
93
+ enabled: boolean;
94
+ name: boolean;
95
+ outline: boolean;
96
+ clip: boolean;
97
+ };
98
+ editingFrame: string | null;
99
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
100
+ editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
101
+ editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
102
+ exportWithDarkMode: boolean;
103
+ exportScale: number;
104
+ currentItemStrokeColor: string;
105
+ currentItemBackgroundColor: string;
106
+ currentItemFillStyle: import("../element/types").FillStyle;
107
+ currentItemStrokeWidth: number;
108
+ currentItemStrokeStyle: import("../element/types").StrokeStyle;
109
+ currentItemRoughness: number;
110
+ currentItemOpacity: number;
111
+ currentItemFontFamily: number;
112
+ currentItemFontSize: number;
113
+ currentItemTextAlign: string;
114
+ currentItemStartArrowhead: import("../element/types").Arrowhead | null;
115
+ currentItemEndArrowhead: import("../element/types").Arrowhead | null;
116
+ currentItemRoundness: import("../element/types").StrokeRoundness;
117
+ viewBackgroundColor: string;
118
+ scrollX: number;
119
+ scrollY: number;
120
+ cursorButton: "up" | "down";
121
+ scrolledOutside: boolean;
122
+ isResizing: boolean;
123
+ isRotating: boolean;
124
+ zoom: Readonly<{
125
+ value: NormalizedZoomValue;
126
+ }>;
127
+ openMenu: "canvas" | "shape" | null;
128
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
129
+ openSidebar: {
130
+ name: string;
131
+ tab?: string | undefined;
132
+ } | null;
133
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
134
+ defaultSidebarDockedPreference: boolean;
135
+ lastPointerDownWith: import("../element/types").PointerType;
136
+ selectedElementIds: Readonly<{
137
+ [id: string]: true;
138
+ }>;
139
+ previousSelectedElementIds: {
140
+ [id: string]: true;
141
+ };
142
+ selectedElementsAreBeingDragged: boolean;
143
+ shouldCacheIgnoreZoom: boolean;
144
+ zenModeEnabled: boolean;
145
+ previousGridSize: number | null;
146
+ viewModeEnabled: boolean;
147
+ selectedGroupIds: {
148
+ [groupId: string]: boolean;
149
+ };
150
+ editingGroupId: string | null;
151
+ fileHandle: import("browser-fs-access").FileSystemHandle | null;
152
+ currentChartType: import("../element/types").ChartType;
153
+ pendingImageElementId: string | null;
154
+ showHyperlinkPopup: false | "editor" | "info";
155
+ linkOpacity: number;
156
+ currentStrokeOptions?: any;
157
+ resetCustomPen?: any;
158
+ gridColor: string;
159
+ dynamicStyle: string;
160
+ invertBindingBehaviour: boolean;
161
+ selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
162
+ };
163
+ commitToHistory: true;
164
+ };
165
+ } & {
166
+ keyTest?: undefined;
167
+ };
168
+ export declare const actionZoomIn: {
169
+ name: "zoomIn";
170
+ viewMode: true;
171
+ trackEvent: {
172
+ category: "canvas";
173
+ };
174
+ perform: (_elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
175
+ appState: {
176
+ scrollX: number;
177
+ scrollY: number;
178
+ zoom: {
179
+ value: NormalizedZoomValue;
180
+ };
181
+ contextMenu: {
182
+ items: import("../components/ContextMenu").ContextMenuItems;
183
+ top: number;
184
+ left: number;
185
+ } | null;
186
+ showWelcomeScreen: boolean;
187
+ isLoading: boolean;
188
+ errorMessage: import("react").ReactNode;
189
+ activeEmbeddable: {
190
+ element: import("../element/types").NonDeletedExcalidrawElement;
191
+ state: "active" | "hover";
192
+ } | null;
193
+ draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
194
+ resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
195
+ multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
196
+ selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
197
+ isBindingEnabled: boolean;
198
+ startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
199
+ suggestedBindings: import("../element/binding").SuggestedBinding[];
200
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
201
+ frameRendering: {
202
+ enabled: boolean;
203
+ name: boolean;
204
+ outline: boolean;
205
+ clip: boolean;
206
+ };
207
+ editingFrame: string | null;
208
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
209
+ editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
210
+ editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
211
+ activeTool: {
212
+ lastActiveTool: import("../types").LastActiveTool;
213
+ locked: boolean;
214
+ } & ({
215
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
216
+ customType: null;
217
+ } | {
218
+ type: "custom";
219
+ customType: string;
220
+ });
221
+ penMode: boolean;
222
+ penDetected: boolean;
223
+ exportBackground: boolean;
224
+ exportEmbedScene: boolean;
225
+ exportWithDarkMode: boolean;
226
+ exportScale: number;
227
+ currentItemStrokeColor: string;
228
+ currentItemBackgroundColor: string;
229
+ currentItemFillStyle: import("../element/types").FillStyle;
230
+ currentItemStrokeWidth: number;
231
+ currentItemStrokeStyle: import("../element/types").StrokeStyle;
232
+ currentItemRoughness: number;
233
+ currentItemOpacity: number;
234
+ currentItemFontFamily: number;
235
+ currentItemFontSize: number;
236
+ currentItemTextAlign: string;
237
+ currentItemStartArrowhead: import("../element/types").Arrowhead | null;
238
+ currentItemEndArrowhead: import("../element/types").Arrowhead | null;
239
+ currentItemRoundness: import("../element/types").StrokeRoundness;
240
+ viewBackgroundColor: string;
241
+ cursorButton: "up" | "down";
242
+ scrolledOutside: boolean;
243
+ name: string;
244
+ isResizing: boolean;
245
+ isRotating: boolean;
246
+ openMenu: "canvas" | "shape" | null;
247
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
248
+ openSidebar: {
249
+ name: string;
250
+ tab?: string | undefined;
251
+ } | null;
252
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
253
+ defaultSidebarDockedPreference: boolean;
254
+ lastPointerDownWith: import("../element/types").PointerType;
255
+ selectedElementIds: Readonly<{
256
+ [id: string]: true;
257
+ }>;
258
+ previousSelectedElementIds: {
259
+ [id: string]: true;
260
+ };
261
+ selectedElementsAreBeingDragged: boolean;
262
+ shouldCacheIgnoreZoom: boolean;
263
+ toast: {
264
+ message: string;
265
+ closable?: boolean | undefined;
266
+ duration?: number | undefined;
267
+ } | null;
268
+ zenModeEnabled: boolean;
269
+ theme: import("../element/types").Theme;
270
+ gridSize: number | null;
271
+ previousGridSize: number | null;
272
+ viewModeEnabled: boolean;
273
+ selectedGroupIds: {
274
+ [groupId: string]: boolean;
275
+ };
276
+ editingGroupId: string | null;
277
+ width: number;
278
+ height: number;
279
+ offsetTop: number;
280
+ offsetLeft: number;
281
+ fileHandle: import("browser-fs-access").FileSystemHandle | null;
282
+ collaborators: Map<string, import("../types").Collaborator>;
283
+ showStats: boolean;
284
+ currentChartType: import("../element/types").ChartType;
285
+ pasteDialog: {
286
+ shown: false;
287
+ data: null;
288
+ } | {
289
+ shown: true;
290
+ data: import("../charts").Spreadsheet;
291
+ };
292
+ pendingImageElementId: string | null;
293
+ showHyperlinkPopup: false | "editor" | "info";
294
+ linkOpacity: number;
295
+ trayModeEnabled: boolean;
296
+ colorPalette?: {
297
+ canvasBackground: import("../colors").ColorPaletteCustom;
298
+ elementBackground: import("../colors").ColorPaletteCustom;
299
+ elementStroke: import("../colors").ColorPaletteCustom;
300
+ topPicks: {
301
+ canvasBackground: [string, string, string, string, string];
302
+ elementStroke: [string, string, string, string, string];
303
+ elementBackground: [string, string, string, string, string];
304
+ };
305
+ } | undefined;
306
+ allowWheelZoom?: boolean | undefined;
307
+ allowPinchZoom?: boolean | undefined;
308
+ pinnedScripts?: string[] | undefined;
309
+ customPens?: any[] | undefined;
310
+ currentStrokeOptions?: any;
311
+ resetCustomPen?: any;
312
+ gridColor: string;
313
+ dynamicStyle: string;
314
+ invertBindingBehaviour: boolean;
315
+ selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
316
+ };
317
+ commitToHistory: false;
318
+ };
319
+ PanelComponent: ({ updateData }: import("./types").PanelComponentProps) => JSX.Element;
320
+ keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
321
+ } & {
322
+ keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
323
+ };
324
+ export declare const actionZoomOut: {
325
+ name: "zoomOut";
326
+ viewMode: true;
327
+ trackEvent: {
328
+ category: "canvas";
329
+ };
330
+ perform: (_elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
331
+ appState: {
332
+ scrollX: number;
333
+ scrollY: number;
334
+ zoom: {
335
+ value: NormalizedZoomValue;
336
+ };
337
+ contextMenu: {
338
+ items: import("../components/ContextMenu").ContextMenuItems;
339
+ top: number;
340
+ left: number;
341
+ } | null;
342
+ showWelcomeScreen: boolean;
343
+ isLoading: boolean;
344
+ errorMessage: import("react").ReactNode;
345
+ activeEmbeddable: {
346
+ element: import("../element/types").NonDeletedExcalidrawElement;
347
+ state: "active" | "hover";
348
+ } | null;
349
+ draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
350
+ resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
351
+ multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
352
+ selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
353
+ isBindingEnabled: boolean;
354
+ startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
355
+ suggestedBindings: import("../element/binding").SuggestedBinding[];
356
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
357
+ frameRendering: {
358
+ enabled: boolean;
359
+ name: boolean;
360
+ outline: boolean;
361
+ clip: boolean;
362
+ };
363
+ editingFrame: string | null;
364
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
365
+ editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
366
+ editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
367
+ activeTool: {
368
+ lastActiveTool: import("../types").LastActiveTool;
369
+ locked: boolean;
370
+ } & ({
371
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
372
+ customType: null;
373
+ } | {
374
+ type: "custom";
375
+ customType: string;
376
+ });
377
+ penMode: boolean;
378
+ penDetected: boolean;
379
+ exportBackground: boolean;
380
+ exportEmbedScene: boolean;
381
+ exportWithDarkMode: boolean;
382
+ exportScale: number;
383
+ currentItemStrokeColor: string;
384
+ currentItemBackgroundColor: string;
385
+ currentItemFillStyle: import("../element/types").FillStyle;
386
+ currentItemStrokeWidth: number;
387
+ currentItemStrokeStyle: import("../element/types").StrokeStyle;
388
+ currentItemRoughness: number;
389
+ currentItemOpacity: number;
390
+ currentItemFontFamily: number;
391
+ currentItemFontSize: number;
392
+ currentItemTextAlign: string;
393
+ currentItemStartArrowhead: import("../element/types").Arrowhead | null;
394
+ currentItemEndArrowhead: import("../element/types").Arrowhead | null;
395
+ currentItemRoundness: import("../element/types").StrokeRoundness;
396
+ viewBackgroundColor: string;
397
+ cursorButton: "up" | "down";
398
+ scrolledOutside: boolean;
399
+ name: string;
400
+ isResizing: boolean;
401
+ isRotating: boolean;
402
+ openMenu: "canvas" | "shape" | null;
403
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
404
+ openSidebar: {
405
+ name: string;
406
+ tab?: string | undefined;
407
+ } | null;
408
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
409
+ defaultSidebarDockedPreference: boolean;
410
+ lastPointerDownWith: import("../element/types").PointerType;
411
+ selectedElementIds: Readonly<{
412
+ [id: string]: true;
413
+ }>;
414
+ previousSelectedElementIds: {
415
+ [id: string]: true;
416
+ };
417
+ selectedElementsAreBeingDragged: boolean;
418
+ shouldCacheIgnoreZoom: boolean;
419
+ toast: {
420
+ message: string;
421
+ closable?: boolean | undefined;
422
+ duration?: number | undefined;
423
+ } | null;
424
+ zenModeEnabled: boolean;
425
+ theme: import("../element/types").Theme;
426
+ gridSize: number | null;
427
+ previousGridSize: number | null;
428
+ viewModeEnabled: boolean;
429
+ selectedGroupIds: {
430
+ [groupId: string]: boolean;
431
+ };
432
+ editingGroupId: string | null;
433
+ width: number;
434
+ height: number;
435
+ offsetTop: number;
436
+ offsetLeft: number;
437
+ fileHandle: import("browser-fs-access").FileSystemHandle | null;
438
+ collaborators: Map<string, import("../types").Collaborator>;
439
+ showStats: boolean;
440
+ currentChartType: import("../element/types").ChartType;
441
+ pasteDialog: {
442
+ shown: false;
443
+ data: null;
444
+ } | {
445
+ shown: true;
446
+ data: import("../charts").Spreadsheet;
447
+ };
448
+ pendingImageElementId: string | null;
449
+ showHyperlinkPopup: false | "editor" | "info";
450
+ linkOpacity: number;
451
+ trayModeEnabled: boolean;
452
+ colorPalette?: {
453
+ canvasBackground: import("../colors").ColorPaletteCustom;
454
+ elementBackground: import("../colors").ColorPaletteCustom;
455
+ elementStroke: import("../colors").ColorPaletteCustom;
456
+ topPicks: {
457
+ canvasBackground: [string, string, string, string, string];
458
+ elementStroke: [string, string, string, string, string];
459
+ elementBackground: [string, string, string, string, string];
460
+ };
461
+ } | undefined;
462
+ allowWheelZoom?: boolean | undefined;
463
+ allowPinchZoom?: boolean | undefined;
464
+ pinnedScripts?: string[] | undefined;
465
+ customPens?: any[] | undefined;
466
+ currentStrokeOptions?: any;
467
+ resetCustomPen?: any;
468
+ gridColor: string;
469
+ dynamicStyle: string;
470
+ invertBindingBehaviour: boolean;
471
+ selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
472
+ };
473
+ commitToHistory: false;
474
+ };
475
+ PanelComponent: ({ updateData }: import("./types").PanelComponentProps) => JSX.Element;
476
+ keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
477
+ } & {
478
+ keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
479
+ };
480
+ export declare const actionResetZoom: {
481
+ name: "resetZoom";
482
+ viewMode: true;
483
+ trackEvent: {
484
+ category: "canvas";
485
+ };
486
+ perform: (_elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
487
+ appState: {
488
+ scrollX: number;
489
+ scrollY: number;
490
+ zoom: {
491
+ value: NormalizedZoomValue;
492
+ };
493
+ contextMenu: {
494
+ items: import("../components/ContextMenu").ContextMenuItems;
495
+ top: number;
496
+ left: number;
497
+ } | null;
498
+ showWelcomeScreen: boolean;
499
+ isLoading: boolean;
500
+ errorMessage: import("react").ReactNode;
501
+ activeEmbeddable: {
502
+ element: import("../element/types").NonDeletedExcalidrawElement;
503
+ state: "active" | "hover";
504
+ } | null;
505
+ draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
506
+ resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
507
+ multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
508
+ selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
509
+ isBindingEnabled: boolean;
510
+ startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
511
+ suggestedBindings: import("../element/binding").SuggestedBinding[];
512
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
513
+ frameRendering: {
514
+ enabled: boolean;
515
+ name: boolean;
516
+ outline: boolean;
517
+ clip: boolean;
518
+ };
519
+ editingFrame: string | null;
520
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
521
+ editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
522
+ editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
523
+ activeTool: {
524
+ lastActiveTool: import("../types").LastActiveTool;
525
+ locked: boolean;
526
+ } & ({
527
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
528
+ customType: null;
529
+ } | {
530
+ type: "custom";
531
+ customType: string;
532
+ });
533
+ penMode: boolean;
534
+ penDetected: boolean;
535
+ exportBackground: boolean;
536
+ exportEmbedScene: boolean;
537
+ exportWithDarkMode: boolean;
538
+ exportScale: number;
539
+ currentItemStrokeColor: string;
540
+ currentItemBackgroundColor: string;
541
+ currentItemFillStyle: import("../element/types").FillStyle;
542
+ currentItemStrokeWidth: number;
543
+ currentItemStrokeStyle: import("../element/types").StrokeStyle;
544
+ currentItemRoughness: number;
545
+ currentItemOpacity: number;
546
+ currentItemFontFamily: number;
547
+ currentItemFontSize: number;
548
+ currentItemTextAlign: string;
549
+ currentItemStartArrowhead: import("../element/types").Arrowhead | null;
550
+ currentItemEndArrowhead: import("../element/types").Arrowhead | null;
551
+ currentItemRoundness: import("../element/types").StrokeRoundness;
552
+ viewBackgroundColor: string;
553
+ cursorButton: "up" | "down";
554
+ scrolledOutside: boolean;
555
+ name: string;
556
+ isResizing: boolean;
557
+ isRotating: boolean;
558
+ openMenu: "canvas" | "shape" | null;
559
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
560
+ openSidebar: {
561
+ name: string;
562
+ tab?: string | undefined;
563
+ } | null;
564
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
565
+ defaultSidebarDockedPreference: boolean;
566
+ lastPointerDownWith: import("../element/types").PointerType;
567
+ selectedElementIds: Readonly<{
568
+ [id: string]: true;
569
+ }>;
570
+ previousSelectedElementIds: {
571
+ [id: string]: true;
572
+ };
573
+ selectedElementsAreBeingDragged: boolean;
574
+ shouldCacheIgnoreZoom: boolean;
575
+ toast: {
576
+ message: string;
577
+ closable?: boolean | undefined;
578
+ duration?: number | undefined;
579
+ } | null;
580
+ zenModeEnabled: boolean;
581
+ theme: import("../element/types").Theme;
582
+ gridSize: number | null;
583
+ previousGridSize: number | null;
584
+ viewModeEnabled: boolean;
585
+ selectedGroupIds: {
586
+ [groupId: string]: boolean;
587
+ };
588
+ editingGroupId: string | null;
589
+ width: number;
590
+ height: number;
591
+ offsetTop: number;
592
+ offsetLeft: number;
593
+ fileHandle: import("browser-fs-access").FileSystemHandle | null;
594
+ collaborators: Map<string, import("../types").Collaborator>;
595
+ showStats: boolean;
596
+ currentChartType: import("../element/types").ChartType;
597
+ pasteDialog: {
598
+ shown: false;
599
+ data: null;
600
+ } | {
601
+ shown: true;
602
+ data: import("../charts").Spreadsheet;
603
+ };
604
+ pendingImageElementId: string | null;
605
+ showHyperlinkPopup: false | "editor" | "info";
606
+ linkOpacity: number;
607
+ trayModeEnabled: boolean;
608
+ colorPalette?: {
609
+ canvasBackground: import("../colors").ColorPaletteCustom;
610
+ elementBackground: import("../colors").ColorPaletteCustom;
611
+ elementStroke: import("../colors").ColorPaletteCustom;
612
+ topPicks: {
613
+ canvasBackground: [string, string, string, string, string];
614
+ elementStroke: [string, string, string, string, string];
615
+ elementBackground: [string, string, string, string, string];
616
+ };
617
+ } | undefined;
618
+ allowWheelZoom?: boolean | undefined;
619
+ allowPinchZoom?: boolean | undefined;
620
+ pinnedScripts?: string[] | undefined;
621
+ customPens?: any[] | undefined;
622
+ currentStrokeOptions?: any;
623
+ resetCustomPen?: any;
624
+ gridColor: string;
625
+ dynamicStyle: string;
626
+ invertBindingBehaviour: boolean;
627
+ selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
628
+ };
629
+ commitToHistory: false;
630
+ };
631
+ PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => JSX.Element;
632
+ keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
633
+ } & {
634
+ keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
635
+ };
636
+ export declare const zoomToFit: ({ targetElements, appState, fitToViewport, viewportZoomFactor, }: {
637
+ targetElements: readonly ExcalidrawElement[];
638
+ appState: Readonly<AppState>;
639
+ /** whether to fit content to viewport (beyond >100%) */
640
+ fitToViewport: boolean;
641
+ /** zoom content to cover X of the viewport, when fitToViewport=true */
642
+ viewportZoomFactor?: number | undefined;
643
+ }) => {
644
+ appState: {
645
+ scrollX: number;
646
+ scrollY: number;
647
+ zoom: {
648
+ value: NormalizedZoomValue;
649
+ };
650
+ contextMenu: {
651
+ items: import("../components/ContextMenu").ContextMenuItems;
652
+ top: number;
653
+ left: number;
654
+ } | null;
655
+ showWelcomeScreen: boolean;
656
+ isLoading: boolean;
657
+ errorMessage: import("react").ReactNode;
658
+ activeEmbeddable: {
659
+ element: import("../element/types").NonDeletedExcalidrawElement;
660
+ state: "active" | "hover";
661
+ } | null;
662
+ draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
663
+ resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
664
+ multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
665
+ selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
666
+ isBindingEnabled: boolean;
667
+ startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
668
+ suggestedBindings: import("../element/binding").SuggestedBinding[];
669
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
670
+ frameRendering: {
671
+ enabled: boolean;
672
+ name: boolean;
673
+ outline: boolean;
674
+ clip: boolean;
675
+ };
676
+ editingFrame: string | null;
677
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
678
+ editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
679
+ editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
680
+ activeTool: {
681
+ lastActiveTool: import("../types").LastActiveTool;
682
+ locked: boolean;
683
+ } & ({
684
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
685
+ customType: null;
686
+ } | {
687
+ type: "custom";
688
+ customType: string;
689
+ });
690
+ penMode: boolean;
691
+ penDetected: boolean;
692
+ exportBackground: boolean;
693
+ exportEmbedScene: boolean;
694
+ exportWithDarkMode: boolean;
695
+ exportScale: number;
696
+ currentItemStrokeColor: string;
697
+ currentItemBackgroundColor: string;
698
+ currentItemFillStyle: import("../element/types").FillStyle;
699
+ currentItemStrokeWidth: number;
700
+ currentItemStrokeStyle: import("../element/types").StrokeStyle;
701
+ currentItemRoughness: number;
702
+ currentItemOpacity: number;
703
+ currentItemFontFamily: number;
704
+ currentItemFontSize: number;
705
+ currentItemTextAlign: string;
706
+ currentItemStartArrowhead: import("../element/types").Arrowhead | null;
707
+ currentItemEndArrowhead: import("../element/types").Arrowhead | null;
708
+ currentItemRoundness: import("../element/types").StrokeRoundness;
709
+ viewBackgroundColor: string;
710
+ cursorButton: "up" | "down";
711
+ scrolledOutside: boolean;
712
+ name: string;
713
+ isResizing: boolean;
714
+ isRotating: boolean;
715
+ openMenu: "canvas" | "shape" | null;
716
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
717
+ openSidebar: {
718
+ name: string;
719
+ tab?: string | undefined;
720
+ } | null;
721
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
722
+ defaultSidebarDockedPreference: boolean;
723
+ lastPointerDownWith: import("../element/types").PointerType;
724
+ selectedElementIds: Readonly<{
725
+ [id: string]: true;
726
+ }>;
727
+ previousSelectedElementIds: {
728
+ [id: string]: true;
729
+ };
730
+ selectedElementsAreBeingDragged: boolean;
731
+ shouldCacheIgnoreZoom: boolean;
732
+ toast: {
733
+ message: string;
734
+ closable?: boolean | undefined;
735
+ duration?: number | undefined;
736
+ } | null;
737
+ zenModeEnabled: boolean;
738
+ theme: import("../element/types").Theme;
739
+ gridSize: number | null;
740
+ previousGridSize: number | null;
741
+ viewModeEnabled: boolean;
742
+ selectedGroupIds: {
743
+ [groupId: string]: boolean;
744
+ };
745
+ editingGroupId: string | null;
746
+ width: number;
747
+ height: number;
748
+ offsetTop: number;
749
+ offsetLeft: number;
750
+ fileHandle: import("browser-fs-access").FileSystemHandle | null;
751
+ collaborators: Map<string, import("../types").Collaborator>;
752
+ showStats: boolean;
753
+ currentChartType: import("../element/types").ChartType;
754
+ pasteDialog: {
755
+ shown: false;
756
+ data: null;
757
+ } | {
758
+ shown: true;
759
+ data: import("../charts").Spreadsheet;
760
+ };
761
+ pendingImageElementId: string | null;
762
+ showHyperlinkPopup: false | "editor" | "info";
763
+ linkOpacity: number;
764
+ trayModeEnabled: boolean;
765
+ colorPalette?: {
766
+ canvasBackground: import("../colors").ColorPaletteCustom;
767
+ elementBackground: import("../colors").ColorPaletteCustom;
768
+ elementStroke: import("../colors").ColorPaletteCustom;
769
+ topPicks: {
770
+ canvasBackground: [string, string, string, string, string];
771
+ elementStroke: [string, string, string, string, string];
772
+ elementBackground: [string, string, string, string, string];
773
+ };
774
+ } | undefined;
775
+ allowWheelZoom?: boolean | undefined;
776
+ allowPinchZoom?: boolean | undefined;
777
+ pinnedScripts?: string[] | undefined;
778
+ customPens?: any[] | undefined;
779
+ currentStrokeOptions?: any;
780
+ resetCustomPen?: any;
781
+ gridColor: string;
782
+ dynamicStyle: string;
783
+ invertBindingBehaviour: boolean;
784
+ selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
785
+ };
786
+ commitToHistory: boolean;
787
+ };
788
+ export declare const actionZoomToFitSelectionInViewport: {
789
+ name: "zoomToFitSelectionInViewport";
790
+ trackEvent: {
791
+ category: "canvas";
792
+ };
793
+ perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
794
+ appState: {
795
+ scrollX: number;
796
+ scrollY: number;
797
+ zoom: {
798
+ value: NormalizedZoomValue;
799
+ };
800
+ contextMenu: {
801
+ items: import("../components/ContextMenu").ContextMenuItems;
802
+ top: number;
803
+ left: number;
804
+ } | null;
805
+ showWelcomeScreen: boolean;
806
+ isLoading: boolean;
807
+ errorMessage: import("react").ReactNode;
808
+ activeEmbeddable: {
809
+ element: import("../element/types").NonDeletedExcalidrawElement;
810
+ state: "active" | "hover";
811
+ } | null;
812
+ draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
813
+ resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
814
+ multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
815
+ selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
816
+ isBindingEnabled: boolean;
817
+ startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
818
+ suggestedBindings: import("../element/binding").SuggestedBinding[];
819
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
820
+ frameRendering: {
821
+ enabled: boolean;
822
+ name: boolean;
823
+ outline: boolean;
824
+ clip: boolean;
825
+ };
826
+ editingFrame: string | null;
827
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
828
+ editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
829
+ editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
830
+ activeTool: {
831
+ lastActiveTool: import("../types").LastActiveTool;
832
+ locked: boolean;
833
+ } & ({
834
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
835
+ customType: null;
836
+ } | {
837
+ type: "custom";
838
+ customType: string;
839
+ });
840
+ penMode: boolean;
841
+ penDetected: boolean;
842
+ exportBackground: boolean;
843
+ exportEmbedScene: boolean;
844
+ exportWithDarkMode: boolean;
845
+ exportScale: number;
846
+ currentItemStrokeColor: string;
847
+ currentItemBackgroundColor: string;
848
+ currentItemFillStyle: import("../element/types").FillStyle;
849
+ currentItemStrokeWidth: number;
850
+ currentItemStrokeStyle: import("../element/types").StrokeStyle;
851
+ currentItemRoughness: number;
852
+ currentItemOpacity: number;
853
+ currentItemFontFamily: number;
854
+ currentItemFontSize: number;
855
+ currentItemTextAlign: string;
856
+ currentItemStartArrowhead: import("../element/types").Arrowhead | null;
857
+ currentItemEndArrowhead: import("../element/types").Arrowhead | null;
858
+ currentItemRoundness: import("../element/types").StrokeRoundness;
859
+ viewBackgroundColor: string;
860
+ cursorButton: "up" | "down";
861
+ scrolledOutside: boolean;
862
+ name: string;
863
+ isResizing: boolean;
864
+ isRotating: boolean;
865
+ openMenu: "canvas" | "shape" | null;
866
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
867
+ openSidebar: {
868
+ name: string;
869
+ tab?: string | undefined;
870
+ } | null;
871
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
872
+ defaultSidebarDockedPreference: boolean;
873
+ lastPointerDownWith: import("../element/types").PointerType;
874
+ selectedElementIds: Readonly<{
875
+ [id: string]: true;
876
+ }>;
877
+ previousSelectedElementIds: {
878
+ [id: string]: true;
879
+ };
880
+ selectedElementsAreBeingDragged: boolean;
881
+ shouldCacheIgnoreZoom: boolean;
882
+ toast: {
883
+ message: string;
884
+ closable?: boolean | undefined;
885
+ duration?: number | undefined;
886
+ } | null;
887
+ zenModeEnabled: boolean;
888
+ theme: import("../element/types").Theme;
889
+ gridSize: number | null;
890
+ previousGridSize: number | null;
891
+ viewModeEnabled: boolean;
892
+ selectedGroupIds: {
893
+ [groupId: string]: boolean;
894
+ };
895
+ editingGroupId: string | null;
896
+ width: number;
897
+ height: number;
898
+ offsetTop: number;
899
+ offsetLeft: number;
900
+ fileHandle: import("browser-fs-access").FileSystemHandle | null;
901
+ collaborators: Map<string, import("../types").Collaborator>;
902
+ showStats: boolean;
903
+ currentChartType: import("../element/types").ChartType;
904
+ pasteDialog: {
905
+ shown: false;
906
+ data: null;
907
+ } | {
908
+ shown: true;
909
+ data: import("../charts").Spreadsheet;
910
+ };
911
+ pendingImageElementId: string | null;
912
+ showHyperlinkPopup: false | "editor" | "info";
913
+ linkOpacity: number;
914
+ trayModeEnabled: boolean;
915
+ colorPalette?: {
916
+ canvasBackground: import("../colors").ColorPaletteCustom;
917
+ elementBackground: import("../colors").ColorPaletteCustom;
918
+ elementStroke: import("../colors").ColorPaletteCustom;
919
+ topPicks: {
920
+ canvasBackground: [string, string, string, string, string];
921
+ elementStroke: [string, string, string, string, string];
922
+ elementBackground: [string, string, string, string, string];
923
+ };
924
+ } | undefined;
925
+ allowWheelZoom?: boolean | undefined;
926
+ allowPinchZoom?: boolean | undefined;
927
+ pinnedScripts?: string[] | undefined;
928
+ customPens?: any[] | undefined;
929
+ currentStrokeOptions?: any;
930
+ resetCustomPen?: any;
931
+ gridColor: string;
932
+ dynamicStyle: string;
933
+ invertBindingBehaviour: boolean;
934
+ selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
935
+ };
936
+ commitToHistory: boolean;
937
+ };
938
+ keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
939
+ } & {
940
+ keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
941
+ };
942
+ export declare const actionZoomToFitSelection: {
943
+ name: "zoomToFitSelection";
944
+ trackEvent: {
945
+ category: "canvas";
946
+ };
947
+ perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
948
+ appState: {
949
+ scrollX: number;
950
+ scrollY: number;
951
+ zoom: {
952
+ value: NormalizedZoomValue;
953
+ };
954
+ contextMenu: {
955
+ items: import("../components/ContextMenu").ContextMenuItems;
956
+ top: number;
957
+ left: number;
958
+ } | null;
959
+ showWelcomeScreen: boolean;
960
+ isLoading: boolean;
961
+ errorMessage: import("react").ReactNode;
962
+ activeEmbeddable: {
963
+ element: import("../element/types").NonDeletedExcalidrawElement;
964
+ state: "active" | "hover";
965
+ } | null;
966
+ draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
967
+ resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
968
+ multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
969
+ selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
970
+ isBindingEnabled: boolean;
971
+ startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
972
+ suggestedBindings: import("../element/binding").SuggestedBinding[];
973
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
974
+ frameRendering: {
975
+ enabled: boolean;
976
+ name: boolean;
977
+ outline: boolean;
978
+ clip: boolean;
979
+ };
980
+ editingFrame: string | null;
981
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
982
+ editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
983
+ editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
984
+ activeTool: {
985
+ lastActiveTool: import("../types").LastActiveTool;
986
+ locked: boolean;
987
+ } & ({
988
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
989
+ customType: null;
990
+ } | {
991
+ type: "custom";
992
+ customType: string;
993
+ });
994
+ penMode: boolean;
995
+ penDetected: boolean;
996
+ exportBackground: boolean;
997
+ exportEmbedScene: boolean;
998
+ exportWithDarkMode: boolean;
999
+ exportScale: number;
1000
+ currentItemStrokeColor: string;
1001
+ currentItemBackgroundColor: string;
1002
+ currentItemFillStyle: import("../element/types").FillStyle;
1003
+ currentItemStrokeWidth: number;
1004
+ currentItemStrokeStyle: import("../element/types").StrokeStyle;
1005
+ currentItemRoughness: number;
1006
+ currentItemOpacity: number;
1007
+ currentItemFontFamily: number;
1008
+ currentItemFontSize: number;
1009
+ currentItemTextAlign: string;
1010
+ currentItemStartArrowhead: import("../element/types").Arrowhead | null;
1011
+ currentItemEndArrowhead: import("../element/types").Arrowhead | null;
1012
+ currentItemRoundness: import("../element/types").StrokeRoundness;
1013
+ viewBackgroundColor: string;
1014
+ cursorButton: "up" | "down";
1015
+ scrolledOutside: boolean;
1016
+ name: string;
1017
+ isResizing: boolean;
1018
+ isRotating: boolean;
1019
+ openMenu: "canvas" | "shape" | null;
1020
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
1021
+ openSidebar: {
1022
+ name: string;
1023
+ tab?: string | undefined;
1024
+ } | null;
1025
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
1026
+ defaultSidebarDockedPreference: boolean;
1027
+ lastPointerDownWith: import("../element/types").PointerType;
1028
+ selectedElementIds: Readonly<{
1029
+ [id: string]: true;
1030
+ }>;
1031
+ previousSelectedElementIds: {
1032
+ [id: string]: true;
1033
+ };
1034
+ selectedElementsAreBeingDragged: boolean;
1035
+ shouldCacheIgnoreZoom: boolean;
1036
+ toast: {
1037
+ message: string;
1038
+ closable?: boolean | undefined;
1039
+ duration?: number | undefined;
1040
+ } | null;
1041
+ zenModeEnabled: boolean;
1042
+ theme: import("../element/types").Theme;
1043
+ gridSize: number | null;
1044
+ previousGridSize: number | null;
1045
+ viewModeEnabled: boolean;
1046
+ selectedGroupIds: {
1047
+ [groupId: string]: boolean;
1048
+ };
1049
+ editingGroupId: string | null;
1050
+ width: number;
1051
+ height: number;
1052
+ offsetTop: number;
1053
+ offsetLeft: number;
1054
+ fileHandle: import("browser-fs-access").FileSystemHandle | null;
1055
+ collaborators: Map<string, import("../types").Collaborator>;
1056
+ showStats: boolean;
1057
+ currentChartType: import("../element/types").ChartType;
1058
+ pasteDialog: {
1059
+ shown: false;
1060
+ data: null;
1061
+ } | {
1062
+ shown: true;
1063
+ data: import("../charts").Spreadsheet;
1064
+ };
1065
+ pendingImageElementId: string | null;
1066
+ showHyperlinkPopup: false | "editor" | "info";
1067
+ linkOpacity: number;
1068
+ trayModeEnabled: boolean;
1069
+ colorPalette?: {
1070
+ canvasBackground: import("../colors").ColorPaletteCustom;
1071
+ elementBackground: import("../colors").ColorPaletteCustom;
1072
+ elementStroke: import("../colors").ColorPaletteCustom;
1073
+ topPicks: {
1074
+ canvasBackground: [string, string, string, string, string];
1075
+ elementStroke: [string, string, string, string, string];
1076
+ elementBackground: [string, string, string, string, string];
1077
+ };
1078
+ } | undefined;
1079
+ allowWheelZoom?: boolean | undefined;
1080
+ allowPinchZoom?: boolean | undefined;
1081
+ pinnedScripts?: string[] | undefined;
1082
+ customPens?: any[] | undefined;
1083
+ currentStrokeOptions?: any;
1084
+ resetCustomPen?: any;
1085
+ gridColor: string;
1086
+ dynamicStyle: string;
1087
+ invertBindingBehaviour: boolean;
1088
+ selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
1089
+ };
1090
+ commitToHistory: boolean;
1091
+ };
1092
+ keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
1093
+ } & {
1094
+ keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
1095
+ };
1096
+ export declare const actionZoomToFit: {
1097
+ name: "zoomToFit";
1098
+ viewMode: true;
1099
+ trackEvent: {
1100
+ category: "canvas";
1101
+ };
1102
+ perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
1103
+ appState: {
1104
+ scrollX: number;
1105
+ scrollY: number;
1106
+ zoom: {
1107
+ value: NormalizedZoomValue;
1108
+ };
1109
+ contextMenu: {
1110
+ items: import("../components/ContextMenu").ContextMenuItems;
1111
+ top: number;
1112
+ left: number;
1113
+ } | null;
1114
+ showWelcomeScreen: boolean;
1115
+ isLoading: boolean;
1116
+ errorMessage: import("react").ReactNode;
1117
+ activeEmbeddable: {
1118
+ element: import("../element/types").NonDeletedExcalidrawElement;
1119
+ state: "active" | "hover";
1120
+ } | null;
1121
+ draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
1122
+ resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
1123
+ multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
1124
+ selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
1125
+ isBindingEnabled: boolean;
1126
+ startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
1127
+ suggestedBindings: import("../element/binding").SuggestedBinding[];
1128
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
1129
+ frameRendering: {
1130
+ enabled: boolean;
1131
+ name: boolean;
1132
+ outline: boolean;
1133
+ clip: boolean;
1134
+ };
1135
+ editingFrame: string | null;
1136
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
1137
+ editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
1138
+ editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
1139
+ activeTool: {
1140
+ lastActiveTool: import("../types").LastActiveTool;
1141
+ locked: boolean;
1142
+ } & ({
1143
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
1144
+ customType: null;
1145
+ } | {
1146
+ type: "custom";
1147
+ customType: string;
1148
+ });
1149
+ penMode: boolean;
1150
+ penDetected: boolean;
1151
+ exportBackground: boolean;
1152
+ exportEmbedScene: boolean;
1153
+ exportWithDarkMode: boolean;
1154
+ exportScale: number;
1155
+ currentItemStrokeColor: string;
1156
+ currentItemBackgroundColor: string;
1157
+ currentItemFillStyle: import("../element/types").FillStyle;
1158
+ currentItemStrokeWidth: number;
1159
+ currentItemStrokeStyle: import("../element/types").StrokeStyle;
1160
+ currentItemRoughness: number;
1161
+ currentItemOpacity: number;
1162
+ currentItemFontFamily: number;
1163
+ currentItemFontSize: number;
1164
+ currentItemTextAlign: string;
1165
+ currentItemStartArrowhead: import("../element/types").Arrowhead | null;
1166
+ currentItemEndArrowhead: import("../element/types").Arrowhead | null;
1167
+ currentItemRoundness: import("../element/types").StrokeRoundness;
1168
+ viewBackgroundColor: string;
1169
+ cursorButton: "up" | "down";
1170
+ scrolledOutside: boolean;
1171
+ name: string;
1172
+ isResizing: boolean;
1173
+ isRotating: boolean;
1174
+ openMenu: "canvas" | "shape" | null;
1175
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
1176
+ openSidebar: {
1177
+ name: string;
1178
+ tab?: string | undefined;
1179
+ } | null;
1180
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
1181
+ defaultSidebarDockedPreference: boolean;
1182
+ lastPointerDownWith: import("../element/types").PointerType;
1183
+ selectedElementIds: Readonly<{
1184
+ [id: string]: true;
1185
+ }>;
1186
+ previousSelectedElementIds: {
1187
+ [id: string]: true;
1188
+ };
1189
+ selectedElementsAreBeingDragged: boolean;
1190
+ shouldCacheIgnoreZoom: boolean;
1191
+ toast: {
1192
+ message: string;
1193
+ closable?: boolean | undefined;
1194
+ duration?: number | undefined;
1195
+ } | null;
1196
+ zenModeEnabled: boolean;
1197
+ theme: import("../element/types").Theme;
1198
+ gridSize: number | null;
1199
+ previousGridSize: number | null;
1200
+ viewModeEnabled: boolean;
1201
+ selectedGroupIds: {
1202
+ [groupId: string]: boolean;
1203
+ };
1204
+ editingGroupId: string | null;
1205
+ width: number;
1206
+ height: number;
1207
+ offsetTop: number;
1208
+ offsetLeft: number;
1209
+ fileHandle: import("browser-fs-access").FileSystemHandle | null;
1210
+ collaborators: Map<string, import("../types").Collaborator>;
1211
+ showStats: boolean;
1212
+ currentChartType: import("../element/types").ChartType;
1213
+ pasteDialog: {
1214
+ shown: false;
1215
+ data: null;
1216
+ } | {
1217
+ shown: true;
1218
+ data: import("../charts").Spreadsheet;
1219
+ };
1220
+ pendingImageElementId: string | null;
1221
+ showHyperlinkPopup: false | "editor" | "info";
1222
+ linkOpacity: number;
1223
+ trayModeEnabled: boolean;
1224
+ colorPalette?: {
1225
+ canvasBackground: import("../colors").ColorPaletteCustom;
1226
+ elementBackground: import("../colors").ColorPaletteCustom;
1227
+ elementStroke: import("../colors").ColorPaletteCustom;
1228
+ topPicks: {
1229
+ canvasBackground: [string, string, string, string, string];
1230
+ elementStroke: [string, string, string, string, string];
1231
+ elementBackground: [string, string, string, string, string];
1232
+ };
1233
+ } | undefined;
1234
+ allowWheelZoom?: boolean | undefined;
1235
+ allowPinchZoom?: boolean | undefined;
1236
+ pinnedScripts?: string[] | undefined;
1237
+ customPens?: any[] | undefined;
1238
+ currentStrokeOptions?: any;
1239
+ resetCustomPen?: any;
1240
+ gridColor: string;
1241
+ dynamicStyle: string;
1242
+ invertBindingBehaviour: boolean;
1243
+ selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
1244
+ };
1245
+ commitToHistory: boolean;
1246
+ };
1247
+ keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
1248
+ } & {
1249
+ keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
1250
+ };
1251
+ export declare const actionToggleTheme: {
1252
+ name: "toggleTheme";
1253
+ viewMode: true;
1254
+ trackEvent: {
1255
+ category: "canvas";
1256
+ };
1257
+ perform: (_: readonly ExcalidrawElement[], appState: Readonly<AppState>, value: any, app: AppClassProperties) => {
1258
+ appState: {
1259
+ theme: any;
1260
+ contextMenu: {
1261
+ items: import("../components/ContextMenu").ContextMenuItems;
1262
+ top: number;
1263
+ left: number;
1264
+ } | null;
1265
+ showWelcomeScreen: boolean;
1266
+ isLoading: boolean;
1267
+ errorMessage: import("react").ReactNode;
1268
+ activeEmbeddable: {
1269
+ element: import("../element/types").NonDeletedExcalidrawElement;
1270
+ state: "active" | "hover";
1271
+ } | null;
1272
+ draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
1273
+ resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
1274
+ multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
1275
+ selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
1276
+ isBindingEnabled: boolean;
1277
+ startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
1278
+ suggestedBindings: import("../element/binding").SuggestedBinding[];
1279
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
1280
+ frameRendering: {
1281
+ enabled: boolean;
1282
+ name: boolean;
1283
+ outline: boolean;
1284
+ clip: boolean;
1285
+ };
1286
+ editingFrame: string | null;
1287
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
1288
+ editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
1289
+ editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
1290
+ activeTool: {
1291
+ lastActiveTool: import("../types").LastActiveTool;
1292
+ locked: boolean;
1293
+ } & ({
1294
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
1295
+ customType: null;
1296
+ } | {
1297
+ type: "custom";
1298
+ customType: string;
1299
+ });
1300
+ penMode: boolean;
1301
+ penDetected: boolean;
1302
+ exportBackground: boolean;
1303
+ exportEmbedScene: boolean;
1304
+ exportWithDarkMode: boolean;
1305
+ exportScale: number;
1306
+ currentItemStrokeColor: string;
1307
+ currentItemBackgroundColor: string;
1308
+ currentItemFillStyle: import("../element/types").FillStyle;
1309
+ currentItemStrokeWidth: number;
1310
+ currentItemStrokeStyle: import("../element/types").StrokeStyle;
1311
+ currentItemRoughness: number;
1312
+ currentItemOpacity: number;
1313
+ currentItemFontFamily: number;
1314
+ currentItemFontSize: number;
1315
+ currentItemTextAlign: string;
1316
+ currentItemStartArrowhead: import("../element/types").Arrowhead | null;
1317
+ currentItemEndArrowhead: import("../element/types").Arrowhead | null;
1318
+ currentItemRoundness: import("../element/types").StrokeRoundness;
1319
+ viewBackgroundColor: string;
1320
+ scrollX: number;
1321
+ scrollY: number;
1322
+ cursorButton: "up" | "down";
1323
+ scrolledOutside: boolean;
1324
+ name: string;
1325
+ isResizing: boolean;
1326
+ isRotating: boolean;
1327
+ zoom: Readonly<{
1328
+ value: NormalizedZoomValue;
1329
+ }>;
1330
+ openMenu: "canvas" | "shape" | null;
1331
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
1332
+ openSidebar: {
1333
+ name: string;
1334
+ tab?: string | undefined;
1335
+ } | null;
1336
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
1337
+ defaultSidebarDockedPreference: boolean;
1338
+ lastPointerDownWith: import("../element/types").PointerType;
1339
+ selectedElementIds: Readonly<{
1340
+ [id: string]: true;
1341
+ }>;
1342
+ previousSelectedElementIds: {
1343
+ [id: string]: true;
1344
+ };
1345
+ selectedElementsAreBeingDragged: boolean;
1346
+ shouldCacheIgnoreZoom: boolean;
1347
+ toast: {
1348
+ message: string;
1349
+ closable?: boolean | undefined;
1350
+ duration?: number | undefined;
1351
+ } | null;
1352
+ zenModeEnabled: boolean;
1353
+ gridSize: number | null;
1354
+ previousGridSize: number | null;
1355
+ viewModeEnabled: boolean;
1356
+ selectedGroupIds: {
1357
+ [groupId: string]: boolean;
1358
+ };
1359
+ editingGroupId: string | null;
1360
+ width: number;
1361
+ height: number;
1362
+ offsetTop: number;
1363
+ offsetLeft: number;
1364
+ fileHandle: import("browser-fs-access").FileSystemHandle | null;
1365
+ collaborators: Map<string, import("../types").Collaborator>;
1366
+ showStats: boolean;
1367
+ currentChartType: import("../element/types").ChartType;
1368
+ pasteDialog: {
1369
+ shown: false;
1370
+ data: null;
1371
+ } | {
1372
+ shown: true;
1373
+ data: import("../charts").Spreadsheet;
1374
+ };
1375
+ pendingImageElementId: string | null;
1376
+ showHyperlinkPopup: false | "editor" | "info";
1377
+ linkOpacity: number;
1378
+ trayModeEnabled: boolean;
1379
+ colorPalette?: {
1380
+ canvasBackground: import("../colors").ColorPaletteCustom;
1381
+ elementBackground: import("../colors").ColorPaletteCustom;
1382
+ elementStroke: import("../colors").ColorPaletteCustom;
1383
+ topPicks: {
1384
+ canvasBackground: [string, string, string, string, string];
1385
+ elementStroke: [string, string, string, string, string];
1386
+ elementBackground: [string, string, string, string, string];
1387
+ };
1388
+ } | undefined;
1389
+ allowWheelZoom?: boolean | undefined;
1390
+ allowPinchZoom?: boolean | undefined;
1391
+ pinnedScripts?: string[] | undefined;
1392
+ customPens?: any[] | undefined;
1393
+ currentStrokeOptions?: any;
1394
+ resetCustomPen?: any;
1395
+ gridColor: string;
1396
+ dynamicStyle: string;
1397
+ invertBindingBehaviour: boolean;
1398
+ selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
1399
+ };
1400
+ commitToHistory: false;
1401
+ };
1402
+ keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
1403
+ predicate: (elements: readonly ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
1404
+ } & {
1405
+ keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
1406
+ };
1407
+ export declare const actionToggleEraserTool: {
1408
+ name: "toggleEraserTool";
1409
+ trackEvent: {
1410
+ category: "toolbar";
1411
+ };
1412
+ perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
1413
+ appState: {
1414
+ selectedElementIds: {};
1415
+ selectedGroupIds: {};
1416
+ activeEmbeddable: null;
1417
+ activeTool: {
1418
+ lastActiveTool: import("../types").LastActiveTool;
1419
+ locked: boolean;
1420
+ } & ({
1421
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
1422
+ customType: null;
1423
+ } | {
1424
+ type: "custom";
1425
+ customType: string;
1426
+ });
1427
+ contextMenu: {
1428
+ items: import("../components/ContextMenu").ContextMenuItems;
1429
+ top: number;
1430
+ left: number;
1431
+ } | null;
1432
+ showWelcomeScreen: boolean;
1433
+ isLoading: boolean;
1434
+ errorMessage: import("react").ReactNode;
1435
+ draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
1436
+ resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
1437
+ multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
1438
+ selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
1439
+ isBindingEnabled: boolean;
1440
+ startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
1441
+ suggestedBindings: import("../element/binding").SuggestedBinding[];
1442
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
1443
+ frameRendering: {
1444
+ enabled: boolean;
1445
+ name: boolean;
1446
+ outline: boolean;
1447
+ clip: boolean;
1448
+ };
1449
+ editingFrame: string | null;
1450
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
1451
+ editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
1452
+ editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
1453
+ penMode: boolean;
1454
+ penDetected: boolean;
1455
+ exportBackground: boolean;
1456
+ exportEmbedScene: boolean;
1457
+ exportWithDarkMode: boolean;
1458
+ exportScale: number;
1459
+ currentItemStrokeColor: string;
1460
+ currentItemBackgroundColor: string;
1461
+ currentItemFillStyle: import("../element/types").FillStyle;
1462
+ currentItemStrokeWidth: number;
1463
+ currentItemStrokeStyle: import("../element/types").StrokeStyle;
1464
+ currentItemRoughness: number;
1465
+ currentItemOpacity: number;
1466
+ currentItemFontFamily: number;
1467
+ currentItemFontSize: number;
1468
+ currentItemTextAlign: string;
1469
+ currentItemStartArrowhead: import("../element/types").Arrowhead | null;
1470
+ currentItemEndArrowhead: import("../element/types").Arrowhead | null;
1471
+ currentItemRoundness: import("../element/types").StrokeRoundness;
1472
+ viewBackgroundColor: string;
1473
+ scrollX: number;
1474
+ scrollY: number;
1475
+ cursorButton: "up" | "down";
1476
+ scrolledOutside: boolean;
1477
+ name: string;
1478
+ isResizing: boolean;
1479
+ isRotating: boolean;
1480
+ zoom: Readonly<{
1481
+ value: NormalizedZoomValue;
1482
+ }>;
1483
+ openMenu: "canvas" | "shape" | null;
1484
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
1485
+ openSidebar: {
1486
+ name: string;
1487
+ tab?: string | undefined;
1488
+ } | null;
1489
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
1490
+ defaultSidebarDockedPreference: boolean;
1491
+ lastPointerDownWith: import("../element/types").PointerType;
1492
+ previousSelectedElementIds: {
1493
+ [id: string]: true;
1494
+ };
1495
+ selectedElementsAreBeingDragged: boolean;
1496
+ shouldCacheIgnoreZoom: boolean;
1497
+ toast: {
1498
+ message: string;
1499
+ closable?: boolean | undefined;
1500
+ duration?: number | undefined;
1501
+ } | null;
1502
+ zenModeEnabled: boolean;
1503
+ theme: import("../element/types").Theme;
1504
+ gridSize: number | null;
1505
+ previousGridSize: number | null;
1506
+ viewModeEnabled: boolean;
1507
+ editingGroupId: string | null;
1508
+ width: number;
1509
+ height: number;
1510
+ offsetTop: number;
1511
+ offsetLeft: number;
1512
+ fileHandle: import("browser-fs-access").FileSystemHandle | null;
1513
+ collaborators: Map<string, import("../types").Collaborator>;
1514
+ showStats: boolean;
1515
+ currentChartType: import("../element/types").ChartType;
1516
+ pasteDialog: {
1517
+ shown: false;
1518
+ data: null;
1519
+ } | {
1520
+ shown: true;
1521
+ data: import("../charts").Spreadsheet;
1522
+ };
1523
+ pendingImageElementId: string | null;
1524
+ showHyperlinkPopup: false | "editor" | "info";
1525
+ linkOpacity: number;
1526
+ trayModeEnabled: boolean;
1527
+ colorPalette?: {
1528
+ canvasBackground: import("../colors").ColorPaletteCustom;
1529
+ elementBackground: import("../colors").ColorPaletteCustom;
1530
+ elementStroke: import("../colors").ColorPaletteCustom;
1531
+ topPicks: {
1532
+ canvasBackground: [string, string, string, string, string];
1533
+ elementStroke: [string, string, string, string, string];
1534
+ elementBackground: [string, string, string, string, string];
1535
+ };
1536
+ } | undefined;
1537
+ allowWheelZoom?: boolean | undefined;
1538
+ allowPinchZoom?: boolean | undefined;
1539
+ pinnedScripts?: string[] | undefined;
1540
+ customPens?: any[] | undefined;
1541
+ currentStrokeOptions?: any;
1542
+ resetCustomPen?: any;
1543
+ gridColor: string;
1544
+ dynamicStyle: string;
1545
+ invertBindingBehaviour: boolean;
1546
+ selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
1547
+ };
1548
+ commitToHistory: true;
1549
+ };
1550
+ keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
1551
+ } & {
1552
+ keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
1553
+ };
1554
+ export declare const actionToggleHandTool: {
1555
+ name: "toggleHandTool";
1556
+ trackEvent: {
1557
+ category: "toolbar";
1558
+ };
1559
+ perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
1560
+ appState: {
1561
+ selectedElementIds: {};
1562
+ selectedGroupIds: {};
1563
+ activeEmbeddable: null;
1564
+ activeTool: {
1565
+ lastActiveTool: import("../types").LastActiveTool;
1566
+ locked: boolean;
1567
+ } & ({
1568
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
1569
+ customType: null;
1570
+ } | {
1571
+ type: "custom";
1572
+ customType: string;
1573
+ });
1574
+ contextMenu: {
1575
+ items: import("../components/ContextMenu").ContextMenuItems;
1576
+ top: number;
1577
+ left: number;
1578
+ } | null;
1579
+ showWelcomeScreen: boolean;
1580
+ isLoading: boolean;
1581
+ errorMessage: import("react").ReactNode;
1582
+ draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
1583
+ resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
1584
+ multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
1585
+ selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
1586
+ isBindingEnabled: boolean;
1587
+ startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
1588
+ suggestedBindings: import("../element/binding").SuggestedBinding[];
1589
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
1590
+ frameRendering: {
1591
+ enabled: boolean;
1592
+ name: boolean;
1593
+ outline: boolean;
1594
+ clip: boolean;
1595
+ };
1596
+ editingFrame: string | null;
1597
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
1598
+ editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
1599
+ editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
1600
+ penMode: boolean;
1601
+ penDetected: boolean;
1602
+ exportBackground: boolean;
1603
+ exportEmbedScene: boolean;
1604
+ exportWithDarkMode: boolean;
1605
+ exportScale: number;
1606
+ currentItemStrokeColor: string;
1607
+ currentItemBackgroundColor: string;
1608
+ currentItemFillStyle: import("../element/types").FillStyle;
1609
+ currentItemStrokeWidth: number;
1610
+ currentItemStrokeStyle: import("../element/types").StrokeStyle;
1611
+ currentItemRoughness: number;
1612
+ currentItemOpacity: number;
1613
+ currentItemFontFamily: number;
1614
+ currentItemFontSize: number;
1615
+ currentItemTextAlign: string;
1616
+ currentItemStartArrowhead: import("../element/types").Arrowhead | null;
1617
+ currentItemEndArrowhead: import("../element/types").Arrowhead | null;
1618
+ currentItemRoundness: import("../element/types").StrokeRoundness;
1619
+ viewBackgroundColor: string;
1620
+ scrollX: number;
1621
+ scrollY: number;
1622
+ cursorButton: "up" | "down";
1623
+ scrolledOutside: boolean;
1624
+ name: string;
1625
+ isResizing: boolean;
1626
+ isRotating: boolean;
1627
+ zoom: Readonly<{
1628
+ value: NormalizedZoomValue;
1629
+ }>;
1630
+ openMenu: "canvas" | "shape" | null;
1631
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
1632
+ openSidebar: {
1633
+ name: string;
1634
+ tab?: string | undefined;
1635
+ } | null;
1636
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
1637
+ defaultSidebarDockedPreference: boolean;
1638
+ lastPointerDownWith: import("../element/types").PointerType;
1639
+ previousSelectedElementIds: {
1640
+ [id: string]: true;
1641
+ };
1642
+ selectedElementsAreBeingDragged: boolean;
1643
+ shouldCacheIgnoreZoom: boolean;
1644
+ toast: {
1645
+ message: string;
1646
+ closable?: boolean | undefined;
1647
+ duration?: number | undefined;
1648
+ } | null;
1649
+ zenModeEnabled: boolean;
1650
+ theme: import("../element/types").Theme;
1651
+ gridSize: number | null;
1652
+ previousGridSize: number | null;
1653
+ viewModeEnabled: boolean;
1654
+ editingGroupId: string | null;
1655
+ width: number;
1656
+ height: number;
1657
+ offsetTop: number;
1658
+ offsetLeft: number;
1659
+ fileHandle: import("browser-fs-access").FileSystemHandle | null;
1660
+ collaborators: Map<string, import("../types").Collaborator>;
1661
+ showStats: boolean;
1662
+ currentChartType: import("../element/types").ChartType;
1663
+ pasteDialog: {
1664
+ shown: false;
1665
+ data: null;
1666
+ } | {
1667
+ shown: true;
1668
+ data: import("../charts").Spreadsheet;
1669
+ };
1670
+ pendingImageElementId: string | null;
1671
+ showHyperlinkPopup: false | "editor" | "info";
1672
+ linkOpacity: number;
1673
+ trayModeEnabled: boolean;
1674
+ colorPalette?: {
1675
+ canvasBackground: import("../colors").ColorPaletteCustom;
1676
+ elementBackground: import("../colors").ColorPaletteCustom;
1677
+ elementStroke: import("../colors").ColorPaletteCustom;
1678
+ topPicks: {
1679
+ canvasBackground: [string, string, string, string, string];
1680
+ elementStroke: [string, string, string, string, string];
1681
+ elementBackground: [string, string, string, string, string];
1682
+ };
1683
+ } | undefined;
1684
+ allowWheelZoom?: boolean | undefined;
1685
+ allowPinchZoom?: boolean | undefined;
1686
+ pinnedScripts?: string[] | undefined;
1687
+ customPens?: any[] | undefined;
1688
+ currentStrokeOptions?: any;
1689
+ resetCustomPen?: any;
1690
+ gridColor: string;
1691
+ dynamicStyle: string;
1692
+ invertBindingBehaviour: boolean;
1693
+ selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
1694
+ };
1695
+ commitToHistory: true;
1696
+ };
1697
+ keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
1698
+ } & {
1699
+ keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
1700
+ };
1701
+ export declare const zoomToFitElements: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, zoomToSelection: boolean, app: AppClassProperties, maxZoom?: number, margin?: number) => {
1702
+ appState: {
1703
+ zoom: {
1704
+ value: NormalizedZoomValue;
1705
+ };
1706
+ scrollX: number;
1707
+ scrollY: number;
1708
+ contextMenu: {
1709
+ items: import("../components/ContextMenu").ContextMenuItems;
1710
+ top: number;
1711
+ left: number;
1712
+ } | null;
1713
+ showWelcomeScreen: boolean;
1714
+ isLoading: boolean;
1715
+ errorMessage: import("react").ReactNode;
1716
+ activeEmbeddable: {
1717
+ element: import("../element/types").NonDeletedExcalidrawElement;
1718
+ state: "active" | "hover";
1719
+ } | null;
1720
+ draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
1721
+ resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
1722
+ multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
1723
+ selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
1724
+ isBindingEnabled: boolean;
1725
+ startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
1726
+ suggestedBindings: import("../element/binding").SuggestedBinding[];
1727
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
1728
+ frameRendering: {
1729
+ enabled: boolean;
1730
+ name: boolean;
1731
+ outline: boolean;
1732
+ clip: boolean;
1733
+ };
1734
+ editingFrame: string | null;
1735
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
1736
+ editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
1737
+ editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
1738
+ activeTool: {
1739
+ lastActiveTool: import("../types").LastActiveTool;
1740
+ locked: boolean;
1741
+ } & ({
1742
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
1743
+ customType: null;
1744
+ } | {
1745
+ type: "custom";
1746
+ customType: string;
1747
+ });
1748
+ penMode: boolean;
1749
+ penDetected: boolean;
1750
+ exportBackground: boolean;
1751
+ exportEmbedScene: boolean;
1752
+ exportWithDarkMode: boolean;
1753
+ exportScale: number;
1754
+ currentItemStrokeColor: string;
1755
+ currentItemBackgroundColor: string;
1756
+ currentItemFillStyle: import("../element/types").FillStyle;
1757
+ currentItemStrokeWidth: number;
1758
+ currentItemStrokeStyle: import("../element/types").StrokeStyle;
1759
+ currentItemRoughness: number;
1760
+ currentItemOpacity: number;
1761
+ currentItemFontFamily: number;
1762
+ currentItemFontSize: number;
1763
+ currentItemTextAlign: string;
1764
+ currentItemStartArrowhead: import("../element/types").Arrowhead | null;
1765
+ currentItemEndArrowhead: import("../element/types").Arrowhead | null;
1766
+ currentItemRoundness: import("../element/types").StrokeRoundness;
1767
+ viewBackgroundColor: string;
1768
+ cursorButton: "up" | "down";
1769
+ scrolledOutside: boolean;
1770
+ name: string;
1771
+ isResizing: boolean;
1772
+ isRotating: boolean;
1773
+ openMenu: "canvas" | "shape" | null;
1774
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
1775
+ openSidebar: {
1776
+ name: string;
1777
+ tab?: string | undefined;
1778
+ } | null;
1779
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
1780
+ defaultSidebarDockedPreference: boolean;
1781
+ lastPointerDownWith: import("../element/types").PointerType;
1782
+ selectedElementIds: Readonly<{
1783
+ [id: string]: true;
1784
+ }>;
1785
+ previousSelectedElementIds: {
1786
+ [id: string]: true;
1787
+ };
1788
+ selectedElementsAreBeingDragged: boolean;
1789
+ shouldCacheIgnoreZoom: boolean;
1790
+ toast: {
1791
+ message: string;
1792
+ closable?: boolean | undefined;
1793
+ duration?: number | undefined;
1794
+ } | null;
1795
+ zenModeEnabled: boolean;
1796
+ theme: import("../element/types").Theme;
1797
+ gridSize: number | null;
1798
+ previousGridSize: number | null;
1799
+ viewModeEnabled: boolean;
1800
+ selectedGroupIds: {
1801
+ [groupId: string]: boolean;
1802
+ };
1803
+ editingGroupId: string | null;
1804
+ width: number;
1805
+ height: number;
1806
+ offsetTop: number;
1807
+ offsetLeft: number;
1808
+ fileHandle: import("browser-fs-access").FileSystemHandle | null;
1809
+ collaborators: Map<string, import("../types").Collaborator>;
1810
+ showStats: boolean;
1811
+ currentChartType: import("../element/types").ChartType;
1812
+ pasteDialog: {
1813
+ shown: false;
1814
+ data: null;
1815
+ } | {
1816
+ shown: true;
1817
+ data: import("../charts").Spreadsheet;
1818
+ };
1819
+ pendingImageElementId: string | null;
1820
+ showHyperlinkPopup: false | "editor" | "info";
1821
+ linkOpacity: number;
1822
+ trayModeEnabled: boolean;
1823
+ colorPalette?: {
1824
+ canvasBackground: import("../colors").ColorPaletteCustom;
1825
+ elementBackground: import("../colors").ColorPaletteCustom;
1826
+ elementStroke: import("../colors").ColorPaletteCustom;
1827
+ topPicks: {
1828
+ canvasBackground: [string, string, string, string, string];
1829
+ elementStroke: [string, string, string, string, string];
1830
+ elementBackground: [string, string, string, string, string];
1831
+ };
1832
+ } | undefined;
1833
+ allowWheelZoom?: boolean | undefined;
1834
+ allowPinchZoom?: boolean | undefined;
1835
+ pinnedScripts?: string[] | undefined;
1836
+ customPens?: any[] | undefined;
1837
+ currentStrokeOptions?: any;
1838
+ resetCustomPen?: any;
1839
+ gridColor: string;
1840
+ dynamicStyle: string;
1841
+ invertBindingBehaviour: boolean;
1842
+ selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
1843
+ };
1844
+ commitToHistory: boolean;
1845
+ };