@dwelle/excalidraw 0.4.0-d68dd48 → 0.4.0-da7ef3e

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 (199) hide show
  1. package/CHANGELOG.md +280 -2
  2. package/README.md +4 -0
  3. package/dist/excalidraw-assets/{vendor-2002fe1b8862917b36c1.js → vendor-d415b28e9024dee4bb1b.js} +2 -2
  4. package/dist/excalidraw-assets-dev/{vendor-e6df8519da951026ff69.js → vendor-a14cd58fa2db417e42b2.js} +6 -6
  5. package/dist/excalidraw.development.js +2863 -1610
  6. package/dist/excalidraw.production.min.js +1 -1
  7. package/main.js +1 -8
  8. package/package.json +8 -3
  9. package/types/actions/actionAddToLibrary.d.ts +99 -31
  10. package/types/actions/actionAlign.d.ts +25 -20
  11. package/types/actions/actionBoundText.d.ts +70 -24
  12. package/types/actions/actionCanvas.d.ts +477 -109
  13. package/types/actions/actionClipboard.d.ts +161 -50
  14. package/types/actions/actionDeleteSelected.d.ts +93 -28
  15. package/types/actions/actionDistribute.d.ts +7 -8
  16. package/types/actions/actionDuplicateSelection.d.ts +0 -1
  17. package/types/actions/actionElementLock.d.ts +283 -0
  18. package/types/actions/actionExport.d.ts +342 -135
  19. package/types/actions/actionFinalize.d.ts +64 -22
  20. package/types/actions/actionFlip.d.ts +4 -7
  21. package/types/actions/actionFrame.d.ts +441 -0
  22. package/types/actions/actionGroup.d.ts +258 -9
  23. package/types/actions/actionHistory.d.ts +1 -1
  24. package/types/actions/actionLinearEditor.d.ts +35 -13
  25. package/types/actions/actionMenu.d.ts +100 -33
  26. package/types/actions/actionNavigate.d.ts +1 -1
  27. package/types/actions/actionProperties.d.ts +433 -133
  28. package/types/actions/actionSelectAll.d.ts +127 -2
  29. package/types/actions/actionStyles.d.ts +33 -11
  30. package/types/actions/actionToggleGridMode.d.ts +33 -11
  31. package/types/actions/{actionToggleLock.d.ts → actionToggleObjectsSnapMode.d.ts} +47 -23
  32. package/types/actions/actionToggleStats.d.ts +33 -11
  33. package/types/actions/actionToggleViewMode.d.ts +33 -11
  34. package/types/actions/actionToggleZenMode.d.ts +33 -11
  35. package/types/actions/actionZindex.d.ts +4 -4
  36. package/types/actions/index.d.ts +2 -1
  37. package/types/actions/manager.d.ts +1 -1
  38. package/types/actions/shortcuts.d.ts +1 -1
  39. package/types/actions/types.d.ts +10 -9
  40. package/types/appState.d.ts +13 -9
  41. package/types/charts.d.ts +2 -2
  42. package/types/clients.d.ts +5 -6
  43. package/types/clipboard.d.ts +3 -2
  44. package/types/colors.d.ts +60 -5
  45. package/types/components/Actions.d.ts +7 -7
  46. package/types/components/ActiveConfirmDialog.d.ts +1 -21
  47. package/types/components/App.d.ts +62 -15
  48. package/types/components/Avatar.d.ts +1 -2
  49. package/types/components/Button.d.ts +3 -2
  50. package/types/components/Card.d.ts +0 -1
  51. package/types/components/ColorPicker/ColorInput.d.ts +9 -0
  52. package/types/components/ColorPicker/ColorPicker.d.ts +19 -0
  53. package/types/components/ColorPicker/CustomColorList.d.ts +8 -0
  54. package/types/components/ColorPicker/HotkeyLabel.d.ts +8 -0
  55. package/types/components/ColorPicker/Picker.d.ts +18 -0
  56. package/types/components/ColorPicker/PickerColorList.d.ts +10 -0
  57. package/types/components/ColorPicker/PickerHeading.d.ts +5 -0
  58. package/types/components/ColorPicker/ShadeList.d.ts +8 -0
  59. package/types/components/ColorPicker/TopPicks.d.ts +9 -0
  60. package/types/components/ColorPicker/colorPickerUtils.d.ts +21 -0
  61. package/types/components/ColorPicker/keyboardNavHandlers.d.ts +20 -0
  62. package/types/components/ContextMenu.d.ts +3 -3
  63. package/types/components/DefaultSidebar.d.ts +29 -0
  64. package/types/components/Dialog.d.ts +3 -4
  65. package/types/components/ExcalidrawLogo.d.ts +15 -0
  66. package/types/components/EyeDropper.d.ts +28 -0
  67. package/types/components/FilledButton.d.ts +17 -0
  68. package/types/components/FixedSideContainer.d.ts +1 -1
  69. package/types/components/HandButton.d.ts +1 -1
  70. package/types/components/HelpButton.d.ts +1 -1
  71. package/types/components/HintViewer.d.ts +4 -5
  72. package/types/components/HomeButton.d.ts +1 -1
  73. package/types/components/ImageExportDialog.d.ts +8 -13
  74. package/types/components/Island.d.ts +1 -1
  75. package/types/components/JSONExportDialog.d.ts +5 -5
  76. package/types/components/LayerUI.d.ts +7 -11
  77. package/types/components/LibraryMenu.d.ts +13 -14
  78. package/types/components/LibraryMenuBrowseButton.d.ts +2 -2
  79. package/types/components/LibraryMenuControlButtons.d.ts +9 -0
  80. package/types/components/LibraryMenuHeaderContent.d.ts +10 -28
  81. package/types/components/LibraryMenuItems.d.ts +6 -7
  82. package/types/components/LibraryMenuSection.d.ts +22 -0
  83. package/types/components/LibraryUnit.d.ts +6 -3
  84. package/types/components/LoadingMessage.d.ts +0 -1
  85. package/types/components/LockButton.d.ts +1 -1
  86. package/types/components/MobileMenu.d.ts +7 -6
  87. package/types/components/OverwriteConfirm/OverwriteConfirm.d.ts +17 -0
  88. package/types/components/OverwriteConfirm/OverwriteConfirmActions.d.ts +17 -0
  89. package/types/components/OverwriteConfirm/OverwriteConfirmState.d.ts +22 -0
  90. package/types/components/PasteChartDialog.d.ts +4 -5
  91. package/types/components/PenModeButton.d.ts +1 -1
  92. package/types/components/Popover.d.ts +1 -1
  93. package/types/components/ProjectName.d.ts +2 -1
  94. package/types/components/PublishLibrary.d.ts +2 -2
  95. package/types/components/RadioGroup.d.ts +12 -0
  96. package/types/components/Section.d.ts +1 -1
  97. package/types/components/Sidebar/Sidebar.d.ts +66 -63
  98. package/types/components/Sidebar/SidebarHeader.d.ts +6 -19
  99. package/types/components/Sidebar/SidebarTab.d.ts +8 -0
  100. package/types/components/Sidebar/SidebarTabTrigger.d.ts +9 -0
  101. package/types/components/Sidebar/SidebarTabTriggers.d.ts +6 -0
  102. package/types/components/Sidebar/SidebarTabs.d.ts +6 -0
  103. package/types/components/Sidebar/SidebarTrigger.d.ts +6 -0
  104. package/types/components/Sidebar/common.d.ts +24 -7
  105. package/types/components/Spinner.d.ts +2 -1
  106. package/types/components/Stack.d.ts +4 -3
  107. package/types/components/Stats.d.ts +3 -3
  108. package/types/components/Switch.d.ts +9 -0
  109. package/types/components/ToolButton.d.ts +5 -4
  110. package/types/components/Tooltip.d.ts +1 -1
  111. package/types/components/Trans.d.ts +9 -0
  112. package/types/components/canvases/InteractiveCanvas.d.ts +27 -0
  113. package/types/components/canvases/StaticCanvas.d.ts +18 -0
  114. package/types/components/canvases/index.d.ts +3 -0
  115. package/types/components/dropdownMenu/DropdownMenu.d.ts +3 -2
  116. package/types/components/dropdownMenu/DropdownMenuTrigger.d.ts +3 -2
  117. package/types/components/footer/Footer.d.ts +2 -2
  118. package/types/components/icons.d.ts +12 -1
  119. package/types/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -1
  120. package/types/components/main-menu/MainMenu.d.ts +3 -2
  121. package/types/components/welcome-screen/WelcomeScreen.Center.d.ts +0 -1
  122. package/types/components/welcome-screen/WelcomeScreen.d.ts +0 -1
  123. package/types/constants.d.ts +64 -9
  124. package/types/context/tunnels.d.ts +19 -0
  125. package/types/context/ui-appState.d.ts +4 -0
  126. package/types/data/blob.d.ts +2 -2
  127. package/types/data/encode.d.ts +1 -1
  128. package/types/data/filesystem.d.ts +2 -1
  129. package/types/data/library.d.ts +3 -45
  130. package/types/data/restore.d.ts +2 -2
  131. package/types/data/transform.d.ts +71 -0
  132. package/types/data/types.d.ts +3 -5
  133. package/types/data/url.d.ts +7 -0
  134. package/types/element/Hyperlink.d.ts +44 -18
  135. package/types/element/binding.d.ts +4 -3
  136. package/types/element/bounds.d.ts +30 -6
  137. package/types/element/collision.d.ts +7 -7
  138. package/types/element/dragElements.d.ts +12 -2
  139. package/types/element/embeddable.d.ts +159 -0
  140. package/types/element/image.d.ts +11 -1
  141. package/types/element/index.d.ts +3 -2
  142. package/types/element/linearElementEditor.d.ts +38 -16
  143. package/types/element/mutateElement.d.ts +1 -1
  144. package/types/element/newElement.d.ts +21 -7
  145. package/types/element/resizeElements.d.ts +3 -2
  146. package/types/element/showSelectedShapeActions.d.ts +2 -2
  147. package/types/element/sizeHelpers.d.ts +8 -1
  148. package/types/element/textElement.d.ts +7 -8
  149. package/types/element/textWysiwyg.d.ts +1 -1
  150. package/types/element/transformHandles.d.ts +15 -8
  151. package/types/element/typeChecks.d.ts +3 -1
  152. package/types/element/types.d.ts +51 -35
  153. package/types/emitter.d.ts +1 -1
  154. package/types/errors.d.ts +1 -1
  155. package/types/frame.d.ts +40 -0
  156. package/types/ga.d.ts +5 -5
  157. package/types/groups.d.ts +15 -11
  158. package/types/history.d.ts +3 -3
  159. package/types/hooks/useCreatePortalContainer.d.ts +4 -0
  160. package/types/hooks/useLibraryItemSvg.d.ts +11 -0
  161. package/types/hooks/useOutsideClick.d.ts +19 -2
  162. package/types/hooks/useScrollPosition.d.ts +1 -0
  163. package/types/hooks/useStable.d.ts +1 -0
  164. package/types/hooks/useTransition.d.ts +2 -0
  165. package/types/i18n.d.ts +7 -4
  166. package/types/jotai.d.ts +16 -104
  167. package/types/keys.d.ts +5 -1
  168. package/types/math.d.ts +3 -0
  169. package/types/packages/excalidraw/example/initialData.d.ts +182 -64
  170. package/types/packages/excalidraw/index.d.ts +5 -2
  171. package/types/packages/excalidraw/main.d.ts +3 -1
  172. package/types/packages/excalidraw/webpack.dev.config.d.ts +5 -2
  173. package/types/packages/excalidraw/webpack.prod.config.d.ts +3 -0
  174. package/types/packages/utils.d.ts +5 -2
  175. package/types/renderer/renderElement.d.ts +11 -22
  176. package/types/renderer/renderScene.d.ts +19 -27
  177. package/types/renderer/renderSnaps.d.ts +2 -0
  178. package/types/renderer/roundRect.d.ts +1 -1
  179. package/types/scene/Renderer.d.ts +25 -0
  180. package/types/scene/Scene.d.ts +27 -5
  181. package/types/scene/Shape.d.ts +12 -0
  182. package/types/scene/ShapeCache.d.ts +20 -0
  183. package/types/scene/export.d.ts +37 -11
  184. package/types/scene/scroll.d.ts +1 -1
  185. package/types/scene/scrollbars.d.ts +2 -6
  186. package/types/scene/selection.d.ts +27 -6
  187. package/types/scene/types.d.ts +69 -34
  188. package/types/snapping.d.ts +108 -0
  189. package/types/types.d.ts +161 -56
  190. package/types/utility-types.d.ts +16 -14
  191. package/types/utils.d.ts +64 -24
  192. package/types/zindex.d.ts +4 -4
  193. package/types/components/ColorPicker.d.ts +0 -14
  194. package/types/components/LibraryButton.d.ts +0 -8
  195. package/types/components/context/tunnels.d.ts +0 -16
  196. package/types/components/hoc/withUpstreamOverride.d.ts +0 -10
  197. /package/dist/excalidraw-assets/{vendor-2002fe1b8862917b36c1.js.LICENSE.txt → vendor-d415b28e9024dee4bb1b.js.LICENSE.txt} +0 -0
  198. /package/types/packages/excalidraw/dist/excalidraw-assets/{vendor-2002fe1b8862917b36c1.d.ts → vendor-d415b28e9024dee4bb1b.d.ts} +0 -0
  199. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/{vendor-e6df8519da951026ff69.d.ts → vendor-a14cd58fa2db417e42b2.d.ts} +0 -0
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ExcalidrawElement } from "../element/types";
3
2
  import { AppState, NormalizedZoomValue } from "../types";
4
3
  export declare const actionChangeViewBackgroundColor: {
@@ -9,7 +8,7 @@ export declare const actionChangeViewBackgroundColor: {
9
8
  appState: any;
10
9
  commitToHistory: boolean;
11
10
  };
12
- PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
11
+ PanelComponent: ({ elements, appState, updateData, appProps }: import("./types").PanelComponentProps) => JSX.Element;
13
12
  } & {
14
13
  keyTest?: undefined;
15
14
  };
@@ -23,7 +22,7 @@ export declare const actionClearCanvas: {
23
22
  elements: ExcalidrawElement[];
24
23
  appState: {
25
24
  files: {};
26
- theme: string;
25
+ theme: import("../element/types").Theme;
27
26
  penMode: boolean;
28
27
  penDetected: boolean;
29
28
  exportBackground: boolean;
@@ -41,13 +40,19 @@ export declare const actionClearCanvas: {
41
40
  lastActiveTool: import("../types").LastActiveTool;
42
41
  locked: boolean;
43
42
  } & ({
44
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
43
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
45
44
  customType: null;
46
45
  } | {
47
46
  type: "custom";
48
47
  customType: string;
49
48
  });
50
49
  name: string;
50
+ toast: {
51
+ message: string;
52
+ closable?: boolean | undefined;
53
+ duration?: number | undefined;
54
+ } | null;
55
+ collaborators: Map<string, import("../types").Collaborator>;
51
56
  contextMenu: {
52
57
  items: import("../components/ContextMenu").ContextMenuItems;
53
58
  top: number;
@@ -56,6 +61,10 @@ export declare const actionClearCanvas: {
56
61
  showWelcomeScreen: boolean;
57
62
  isLoading: boolean;
58
63
  errorMessage: import("react").ReactNode;
64
+ activeEmbeddable: {
65
+ element: import("../element/types").NonDeletedExcalidrawElement;
66
+ state: "active" | "hover";
67
+ } | null;
59
68
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
60
69
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
61
70
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -63,6 +72,15 @@ export declare const actionClearCanvas: {
63
72
  isBindingEnabled: boolean;
64
73
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
65
74
  suggestedBindings: import("../element/binding").SuggestedBinding[];
75
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
76
+ frameRendering: {
77
+ enabled: boolean;
78
+ name: boolean;
79
+ outline: boolean;
80
+ clip: boolean;
81
+ };
82
+ editingFrame: string | null;
83
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
66
84
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
67
85
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
68
86
  exportWithDarkMode: boolean;
@@ -91,23 +109,22 @@ export declare const actionClearCanvas: {
91
109
  value: NormalizedZoomValue;
92
110
  }>;
93
111
  openMenu: "canvas" | "shape" | null;
94
- openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
95
- openSidebar: "library" | "customSidebar" | null;
112
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
113
+ openSidebar: {
114
+ name: string;
115
+ tab?: string | undefined;
116
+ } | null;
96
117
  openDialog: "imageExport" | "help" | "jsonExport" | null;
97
- isSidebarDocked: boolean;
118
+ defaultSidebarDockedPreference: boolean;
98
119
  lastPointerDownWith: import("../element/types").PointerType;
99
- selectedElementIds: {
100
- [id: string]: boolean;
101
- };
120
+ selectedElementIds: Readonly<{
121
+ [id: string]: true;
122
+ }>;
102
123
  previousSelectedElementIds: {
103
- [id: string]: boolean;
124
+ [id: string]: true;
104
125
  };
126
+ selectedElementsAreBeingDragged: boolean;
105
127
  shouldCacheIgnoreZoom: boolean;
106
- toast: {
107
- message: string;
108
- closable?: boolean | undefined;
109
- duration?: number | undefined;
110
- } | null;
111
128
  zenModeEnabled: boolean;
112
129
  viewModeEnabled: boolean;
113
130
  selectedGroupIds: {
@@ -115,11 +132,16 @@ export declare const actionClearCanvas: {
115
132
  };
116
133
  editingGroupId: string | null;
117
134
  fileHandle: import("browser-fs-access").FileSystemHandle | null;
118
- collaborators: Map<string, import("../types").Collaborator>;
119
135
  currentChartType: import("../element/types").ChartType;
120
136
  pendingImageElementId: string | null;
121
- showHyperlinkPopup: false | "info" | "editor";
137
+ showHyperlinkPopup: false | "editor" | "info";
122
138
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
139
+ snapLines: import("../snapping").SnapLine[];
140
+ originSnapOffset: {
141
+ x: number;
142
+ y: number;
143
+ } | null;
144
+ objectsSnapModeEnabled: boolean;
123
145
  };
124
146
  commitToHistory: true;
125
147
  };
@@ -147,6 +169,10 @@ export declare const actionZoomIn: {
147
169
  showWelcomeScreen: boolean;
148
170
  isLoading: boolean;
149
171
  errorMessage: import("react").ReactNode;
172
+ activeEmbeddable: {
173
+ element: import("../element/types").NonDeletedExcalidrawElement;
174
+ state: "active" | "hover";
175
+ } | null;
150
176
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
151
177
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
152
178
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -154,13 +180,22 @@ export declare const actionZoomIn: {
154
180
  isBindingEnabled: boolean;
155
181
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
156
182
  suggestedBindings: import("../element/binding").SuggestedBinding[];
183
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
184
+ frameRendering: {
185
+ enabled: boolean;
186
+ name: boolean;
187
+ outline: boolean;
188
+ clip: boolean;
189
+ };
190
+ editingFrame: string | null;
191
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
157
192
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
158
193
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
159
194
  activeTool: {
160
195
  lastActiveTool: import("../types").LastActiveTool;
161
196
  locked: boolean;
162
197
  } & ({
163
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
198
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
164
199
  customType: null;
165
200
  } | {
166
201
  type: "custom";
@@ -192,17 +227,21 @@ export declare const actionZoomIn: {
192
227
  isResizing: boolean;
193
228
  isRotating: boolean;
194
229
  openMenu: "canvas" | "shape" | null;
195
- openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
196
- openSidebar: "library" | "customSidebar" | null;
230
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
231
+ openSidebar: {
232
+ name: string;
233
+ tab?: string | undefined;
234
+ } | null;
197
235
  openDialog: "imageExport" | "help" | "jsonExport" | null;
198
- isSidebarDocked: boolean;
236
+ defaultSidebarDockedPreference: boolean;
199
237
  lastPointerDownWith: import("../element/types").PointerType;
200
- selectedElementIds: {
201
- [id: string]: boolean;
202
- };
238
+ selectedElementIds: Readonly<{
239
+ [id: string]: true;
240
+ }>;
203
241
  previousSelectedElementIds: {
204
- [id: string]: boolean;
242
+ [id: string]: true;
205
243
  };
244
+ selectedElementsAreBeingDragged: boolean;
206
245
  shouldCacheIgnoreZoom: boolean;
207
246
  toast: {
208
247
  message: string;
@@ -210,7 +249,7 @@ export declare const actionZoomIn: {
210
249
  duration?: number | undefined;
211
250
  } | null;
212
251
  zenModeEnabled: boolean;
213
- theme: string;
252
+ theme: import("../element/types").Theme;
214
253
  gridSize: number | null;
215
254
  viewModeEnabled: boolean;
216
255
  selectedGroupIds: {
@@ -233,8 +272,14 @@ export declare const actionZoomIn: {
233
272
  data: import("../charts").Spreadsheet;
234
273
  };
235
274
  pendingImageElementId: string | null;
236
- showHyperlinkPopup: false | "info" | "editor";
275
+ showHyperlinkPopup: false | "editor" | "info";
237
276
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
277
+ snapLines: import("../snapping").SnapLine[];
278
+ originSnapOffset: {
279
+ x: number;
280
+ y: number;
281
+ } | null;
282
+ objectsSnapModeEnabled: boolean;
238
283
  };
239
284
  commitToHistory: false;
240
285
  };
@@ -264,6 +309,10 @@ export declare const actionZoomOut: {
264
309
  showWelcomeScreen: boolean;
265
310
  isLoading: boolean;
266
311
  errorMessage: import("react").ReactNode;
312
+ activeEmbeddable: {
313
+ element: import("../element/types").NonDeletedExcalidrawElement;
314
+ state: "active" | "hover";
315
+ } | null;
267
316
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
268
317
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
269
318
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -271,13 +320,22 @@ export declare const actionZoomOut: {
271
320
  isBindingEnabled: boolean;
272
321
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
273
322
  suggestedBindings: import("../element/binding").SuggestedBinding[];
323
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
324
+ frameRendering: {
325
+ enabled: boolean;
326
+ name: boolean;
327
+ outline: boolean;
328
+ clip: boolean;
329
+ };
330
+ editingFrame: string | null;
331
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
274
332
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
275
333
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
276
334
  activeTool: {
277
335
  lastActiveTool: import("../types").LastActiveTool;
278
336
  locked: boolean;
279
337
  } & ({
280
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
338
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
281
339
  customType: null;
282
340
  } | {
283
341
  type: "custom";
@@ -309,17 +367,21 @@ export declare const actionZoomOut: {
309
367
  isResizing: boolean;
310
368
  isRotating: boolean;
311
369
  openMenu: "canvas" | "shape" | null;
312
- openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
313
- openSidebar: "library" | "customSidebar" | null;
370
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
371
+ openSidebar: {
372
+ name: string;
373
+ tab?: string | undefined;
374
+ } | null;
314
375
  openDialog: "imageExport" | "help" | "jsonExport" | null;
315
- isSidebarDocked: boolean;
376
+ defaultSidebarDockedPreference: boolean;
316
377
  lastPointerDownWith: import("../element/types").PointerType;
317
- selectedElementIds: {
318
- [id: string]: boolean;
319
- };
378
+ selectedElementIds: Readonly<{
379
+ [id: string]: true;
380
+ }>;
320
381
  previousSelectedElementIds: {
321
- [id: string]: boolean;
382
+ [id: string]: true;
322
383
  };
384
+ selectedElementsAreBeingDragged: boolean;
323
385
  shouldCacheIgnoreZoom: boolean;
324
386
  toast: {
325
387
  message: string;
@@ -327,7 +389,7 @@ export declare const actionZoomOut: {
327
389
  duration?: number | undefined;
328
390
  } | null;
329
391
  zenModeEnabled: boolean;
330
- theme: string;
392
+ theme: import("../element/types").Theme;
331
393
  gridSize: number | null;
332
394
  viewModeEnabled: boolean;
333
395
  selectedGroupIds: {
@@ -350,8 +412,14 @@ export declare const actionZoomOut: {
350
412
  data: import("../charts").Spreadsheet;
351
413
  };
352
414
  pendingImageElementId: string | null;
353
- showHyperlinkPopup: false | "info" | "editor";
415
+ showHyperlinkPopup: false | "editor" | "info";
354
416
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
417
+ snapLines: import("../snapping").SnapLine[];
418
+ originSnapOffset: {
419
+ x: number;
420
+ y: number;
421
+ } | null;
422
+ objectsSnapModeEnabled: boolean;
355
423
  };
356
424
  commitToHistory: false;
357
425
  };
@@ -381,6 +449,10 @@ export declare const actionResetZoom: {
381
449
  showWelcomeScreen: boolean;
382
450
  isLoading: boolean;
383
451
  errorMessage: import("react").ReactNode;
452
+ activeEmbeddable: {
453
+ element: import("../element/types").NonDeletedExcalidrawElement;
454
+ state: "active" | "hover";
455
+ } | null;
384
456
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
385
457
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
386
458
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -388,13 +460,22 @@ export declare const actionResetZoom: {
388
460
  isBindingEnabled: boolean;
389
461
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
390
462
  suggestedBindings: import("../element/binding").SuggestedBinding[];
463
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
464
+ frameRendering: {
465
+ enabled: boolean;
466
+ name: boolean;
467
+ outline: boolean;
468
+ clip: boolean;
469
+ };
470
+ editingFrame: string | null;
471
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
391
472
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
392
473
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
393
474
  activeTool: {
394
475
  lastActiveTool: import("../types").LastActiveTool;
395
476
  locked: boolean;
396
477
  } & ({
397
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
478
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
398
479
  customType: null;
399
480
  } | {
400
481
  type: "custom";
@@ -426,17 +507,21 @@ export declare const actionResetZoom: {
426
507
  isResizing: boolean;
427
508
  isRotating: boolean;
428
509
  openMenu: "canvas" | "shape" | null;
429
- openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
430
- openSidebar: "library" | "customSidebar" | null;
510
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
511
+ openSidebar: {
512
+ name: string;
513
+ tab?: string | undefined;
514
+ } | null;
431
515
  openDialog: "imageExport" | "help" | "jsonExport" | null;
432
- isSidebarDocked: boolean;
516
+ defaultSidebarDockedPreference: boolean;
433
517
  lastPointerDownWith: import("../element/types").PointerType;
434
- selectedElementIds: {
435
- [id: string]: boolean;
436
- };
518
+ selectedElementIds: Readonly<{
519
+ [id: string]: true;
520
+ }>;
437
521
  previousSelectedElementIds: {
438
- [id: string]: boolean;
522
+ [id: string]: true;
439
523
  };
524
+ selectedElementsAreBeingDragged: boolean;
440
525
  shouldCacheIgnoreZoom: boolean;
441
526
  toast: {
442
527
  message: string;
@@ -444,7 +529,7 @@ export declare const actionResetZoom: {
444
529
  duration?: number | undefined;
445
530
  } | null;
446
531
  zenModeEnabled: boolean;
447
- theme: string;
532
+ theme: import("../element/types").Theme;
448
533
  gridSize: number | null;
449
534
  viewModeEnabled: boolean;
450
535
  selectedGroupIds: {
@@ -467,8 +552,14 @@ export declare const actionResetZoom: {
467
552
  data: import("../charts").Spreadsheet;
468
553
  };
469
554
  pendingImageElementId: string | null;
470
- showHyperlinkPopup: false | "info" | "editor";
555
+ showHyperlinkPopup: false | "editor" | "info";
471
556
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
557
+ snapLines: import("../snapping").SnapLine[];
558
+ originSnapOffset: {
559
+ x: number;
560
+ y: number;
561
+ } | null;
562
+ objectsSnapModeEnabled: boolean;
472
563
  };
473
564
  commitToHistory: false;
474
565
  };
@@ -477,13 +568,20 @@ export declare const actionResetZoom: {
477
568
  } & {
478
569
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
479
570
  };
480
- export declare const zoomToFitElements: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, zoomToSelection: boolean) => {
571
+ export declare const zoomToFit: ({ targetElements, appState, fitToViewport, viewportZoomFactor, }: {
572
+ targetElements: readonly ExcalidrawElement[];
573
+ appState: Readonly<AppState>;
574
+ /** whether to fit content to viewport (beyond >100%) */
575
+ fitToViewport: boolean;
576
+ /** zoom content to cover X of the viewport, when fitToViewport=true */
577
+ viewportZoomFactor?: number | undefined;
578
+ }) => {
481
579
  appState: {
580
+ scrollX: number;
581
+ scrollY: number;
482
582
  zoom: {
483
583
  value: NormalizedZoomValue;
484
584
  };
485
- scrollX: number;
486
- scrollY: number;
487
585
  contextMenu: {
488
586
  items: import("../components/ContextMenu").ContextMenuItems;
489
587
  top: number;
@@ -492,6 +590,10 @@ export declare const zoomToFitElements: (elements: readonly ExcalidrawElement[],
492
590
  showWelcomeScreen: boolean;
493
591
  isLoading: boolean;
494
592
  errorMessage: import("react").ReactNode;
593
+ activeEmbeddable: {
594
+ element: import("../element/types").NonDeletedExcalidrawElement;
595
+ state: "active" | "hover";
596
+ } | null;
495
597
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
496
598
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
497
599
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -499,13 +601,22 @@ export declare const zoomToFitElements: (elements: readonly ExcalidrawElement[],
499
601
  isBindingEnabled: boolean;
500
602
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
501
603
  suggestedBindings: import("../element/binding").SuggestedBinding[];
604
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
605
+ frameRendering: {
606
+ enabled: boolean;
607
+ name: boolean;
608
+ outline: boolean;
609
+ clip: boolean;
610
+ };
611
+ editingFrame: string | null;
612
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
502
613
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
503
614
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
504
615
  activeTool: {
505
616
  lastActiveTool: import("../types").LastActiveTool;
506
617
  locked: boolean;
507
618
  } & ({
508
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
619
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
509
620
  customType: null;
510
621
  } | {
511
622
  type: "custom";
@@ -537,17 +648,21 @@ export declare const zoomToFitElements: (elements: readonly ExcalidrawElement[],
537
648
  isResizing: boolean;
538
649
  isRotating: boolean;
539
650
  openMenu: "canvas" | "shape" | null;
540
- openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
541
- openSidebar: "library" | "customSidebar" | null;
651
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
652
+ openSidebar: {
653
+ name: string;
654
+ tab?: string | undefined;
655
+ } | null;
542
656
  openDialog: "imageExport" | "help" | "jsonExport" | null;
543
- isSidebarDocked: boolean;
657
+ defaultSidebarDockedPreference: boolean;
544
658
  lastPointerDownWith: import("../element/types").PointerType;
545
- selectedElementIds: {
546
- [id: string]: boolean;
547
- };
659
+ selectedElementIds: Readonly<{
660
+ [id: string]: true;
661
+ }>;
548
662
  previousSelectedElementIds: {
549
- [id: string]: boolean;
663
+ [id: string]: true;
550
664
  };
665
+ selectedElementsAreBeingDragged: boolean;
551
666
  shouldCacheIgnoreZoom: boolean;
552
667
  toast: {
553
668
  message: string;
@@ -555,7 +670,7 @@ export declare const zoomToFitElements: (elements: readonly ExcalidrawElement[],
555
670
  duration?: number | undefined;
556
671
  } | null;
557
672
  zenModeEnabled: boolean;
558
- theme: string;
673
+ theme: import("../element/types").Theme;
559
674
  gridSize: number | null;
560
675
  viewModeEnabled: boolean;
561
676
  selectedGroupIds: {
@@ -578,23 +693,167 @@ export declare const zoomToFitElements: (elements: readonly ExcalidrawElement[],
578
693
  data: import("../charts").Spreadsheet;
579
694
  };
580
695
  pendingImageElementId: string | null;
581
- showHyperlinkPopup: false | "info" | "editor";
696
+ showHyperlinkPopup: false | "editor" | "info";
582
697
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
698
+ snapLines: import("../snapping").SnapLine[];
699
+ originSnapOffset: {
700
+ x: number;
701
+ y: number;
702
+ } | null;
703
+ objectsSnapModeEnabled: boolean;
583
704
  };
584
705
  commitToHistory: boolean;
585
706
  };
586
- export declare const actionZoomToSelected: {
587
- name: "zoomToSelection";
707
+ export declare const actionZoomToFitSelectionInViewport: {
708
+ name: "zoomToFitSelectionInViewport";
588
709
  trackEvent: {
589
710
  category: "canvas";
590
711
  };
591
- perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
712
+ perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
592
713
  appState: {
714
+ scrollX: number;
715
+ scrollY: number;
593
716
  zoom: {
594
717
  value: NormalizedZoomValue;
595
718
  };
719
+ contextMenu: {
720
+ items: import("../components/ContextMenu").ContextMenuItems;
721
+ top: number;
722
+ left: number;
723
+ } | null;
724
+ showWelcomeScreen: boolean;
725
+ isLoading: boolean;
726
+ errorMessage: import("react").ReactNode;
727
+ activeEmbeddable: {
728
+ element: import("../element/types").NonDeletedExcalidrawElement;
729
+ state: "active" | "hover";
730
+ } | null;
731
+ draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
732
+ resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
733
+ multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
734
+ selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
735
+ isBindingEnabled: boolean;
736
+ startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
737
+ suggestedBindings: import("../element/binding").SuggestedBinding[];
738
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
739
+ frameRendering: {
740
+ enabled: boolean;
741
+ name: boolean;
742
+ outline: boolean;
743
+ clip: boolean;
744
+ };
745
+ editingFrame: string | null;
746
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
747
+ editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
748
+ editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
749
+ activeTool: {
750
+ lastActiveTool: import("../types").LastActiveTool;
751
+ locked: boolean;
752
+ } & ({
753
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
754
+ customType: null;
755
+ } | {
756
+ type: "custom";
757
+ customType: string;
758
+ });
759
+ penMode: boolean;
760
+ penDetected: boolean;
761
+ exportBackground: boolean;
762
+ exportEmbedScene: boolean;
763
+ exportWithDarkMode: boolean;
764
+ exportScale: number;
765
+ currentItemStrokeColor: string;
766
+ currentItemBackgroundColor: string;
767
+ currentItemFillStyle: import("../element/types").FillStyle;
768
+ currentItemStrokeWidth: number;
769
+ currentItemStrokeStyle: import("../element/types").StrokeStyle;
770
+ currentItemRoughness: number;
771
+ currentItemOpacity: number;
772
+ currentItemFontFamily: number;
773
+ currentItemFontSize: number;
774
+ currentItemTextAlign: string;
775
+ currentItemStartArrowhead: import("../element/types").Arrowhead | null;
776
+ currentItemEndArrowhead: import("../element/types").Arrowhead | null;
777
+ currentItemRoundness: import("../element/types").StrokeRoundness;
778
+ viewBackgroundColor: string;
779
+ cursorButton: "up" | "down";
780
+ scrolledOutside: boolean;
781
+ name: string;
782
+ isResizing: boolean;
783
+ isRotating: boolean;
784
+ openMenu: "canvas" | "shape" | null;
785
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
786
+ openSidebar: {
787
+ name: string;
788
+ tab?: string | undefined;
789
+ } | null;
790
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
791
+ defaultSidebarDockedPreference: boolean;
792
+ lastPointerDownWith: import("../element/types").PointerType;
793
+ selectedElementIds: Readonly<{
794
+ [id: string]: true;
795
+ }>;
796
+ previousSelectedElementIds: {
797
+ [id: string]: true;
798
+ };
799
+ selectedElementsAreBeingDragged: boolean;
800
+ shouldCacheIgnoreZoom: boolean;
801
+ toast: {
802
+ message: string;
803
+ closable?: boolean | undefined;
804
+ duration?: number | undefined;
805
+ } | null;
806
+ zenModeEnabled: boolean;
807
+ theme: import("../element/types").Theme;
808
+ gridSize: number | null;
809
+ viewModeEnabled: boolean;
810
+ selectedGroupIds: {
811
+ [groupId: string]: boolean;
812
+ };
813
+ editingGroupId: string | null;
814
+ width: number;
815
+ height: number;
816
+ offsetTop: number;
817
+ offsetLeft: number;
818
+ fileHandle: import("browser-fs-access").FileSystemHandle | null;
819
+ collaborators: Map<string, import("../types").Collaborator>;
820
+ showStats: boolean;
821
+ currentChartType: import("../element/types").ChartType;
822
+ pasteDialog: {
823
+ shown: false;
824
+ data: null;
825
+ } | {
826
+ shown: true;
827
+ data: import("../charts").Spreadsheet;
828
+ };
829
+ pendingImageElementId: string | null;
830
+ showHyperlinkPopup: false | "editor" | "info";
831
+ selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
832
+ snapLines: import("../snapping").SnapLine[];
833
+ originSnapOffset: {
834
+ x: number;
835
+ y: number;
836
+ } | null;
837
+ objectsSnapModeEnabled: boolean;
838
+ };
839
+ commitToHistory: boolean;
840
+ };
841
+ keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
842
+ } & {
843
+ keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
844
+ };
845
+ export declare const actionZoomToFitSelection: {
846
+ name: "zoomToFitSelection";
847
+ trackEvent: {
848
+ category: "canvas";
849
+ };
850
+ perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
851
+ appState: {
596
852
  scrollX: number;
597
853
  scrollY: number;
854
+ zoom: {
855
+ value: NormalizedZoomValue;
856
+ };
598
857
  contextMenu: {
599
858
  items: import("../components/ContextMenu").ContextMenuItems;
600
859
  top: number;
@@ -603,6 +862,10 @@ export declare const actionZoomToSelected: {
603
862
  showWelcomeScreen: boolean;
604
863
  isLoading: boolean;
605
864
  errorMessage: import("react").ReactNode;
865
+ activeEmbeddable: {
866
+ element: import("../element/types").NonDeletedExcalidrawElement;
867
+ state: "active" | "hover";
868
+ } | null;
606
869
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
607
870
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
608
871
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -610,13 +873,22 @@ export declare const actionZoomToSelected: {
610
873
  isBindingEnabled: boolean;
611
874
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
612
875
  suggestedBindings: import("../element/binding").SuggestedBinding[];
876
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
877
+ frameRendering: {
878
+ enabled: boolean;
879
+ name: boolean;
880
+ outline: boolean;
881
+ clip: boolean;
882
+ };
883
+ editingFrame: string | null;
884
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
613
885
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
614
886
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
615
887
  activeTool: {
616
888
  lastActiveTool: import("../types").LastActiveTool;
617
889
  locked: boolean;
618
890
  } & ({
619
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
891
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
620
892
  customType: null;
621
893
  } | {
622
894
  type: "custom";
@@ -648,17 +920,21 @@ export declare const actionZoomToSelected: {
648
920
  isResizing: boolean;
649
921
  isRotating: boolean;
650
922
  openMenu: "canvas" | "shape" | null;
651
- openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
652
- openSidebar: "library" | "customSidebar" | null;
923
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
924
+ openSidebar: {
925
+ name: string;
926
+ tab?: string | undefined;
927
+ } | null;
653
928
  openDialog: "imageExport" | "help" | "jsonExport" | null;
654
- isSidebarDocked: boolean;
929
+ defaultSidebarDockedPreference: boolean;
655
930
  lastPointerDownWith: import("../element/types").PointerType;
656
- selectedElementIds: {
657
- [id: string]: boolean;
658
- };
931
+ selectedElementIds: Readonly<{
932
+ [id: string]: true;
933
+ }>;
659
934
  previousSelectedElementIds: {
660
- [id: string]: boolean;
935
+ [id: string]: true;
661
936
  };
937
+ selectedElementsAreBeingDragged: boolean;
662
938
  shouldCacheIgnoreZoom: boolean;
663
939
  toast: {
664
940
  message: string;
@@ -666,7 +942,7 @@ export declare const actionZoomToSelected: {
666
942
  duration?: number | undefined;
667
943
  } | null;
668
944
  zenModeEnabled: boolean;
669
- theme: string;
945
+ theme: import("../element/types").Theme;
670
946
  gridSize: number | null;
671
947
  viewModeEnabled: boolean;
672
948
  selectedGroupIds: {
@@ -689,8 +965,14 @@ export declare const actionZoomToSelected: {
689
965
  data: import("../charts").Spreadsheet;
690
966
  };
691
967
  pendingImageElementId: string | null;
692
- showHyperlinkPopup: false | "info" | "editor";
968
+ showHyperlinkPopup: false | "editor" | "info";
693
969
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
970
+ snapLines: import("../snapping").SnapLine[];
971
+ originSnapOffset: {
972
+ x: number;
973
+ y: number;
974
+ } | null;
975
+ objectsSnapModeEnabled: boolean;
694
976
  };
695
977
  commitToHistory: boolean;
696
978
  };
@@ -706,11 +988,11 @@ export declare const actionZoomToFit: {
706
988
  };
707
989
  perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
708
990
  appState: {
991
+ scrollX: number;
992
+ scrollY: number;
709
993
  zoom: {
710
994
  value: NormalizedZoomValue;
711
995
  };
712
- scrollX: number;
713
- scrollY: number;
714
996
  contextMenu: {
715
997
  items: import("../components/ContextMenu").ContextMenuItems;
716
998
  top: number;
@@ -719,6 +1001,10 @@ export declare const actionZoomToFit: {
719
1001
  showWelcomeScreen: boolean;
720
1002
  isLoading: boolean;
721
1003
  errorMessage: import("react").ReactNode;
1004
+ activeEmbeddable: {
1005
+ element: import("../element/types").NonDeletedExcalidrawElement;
1006
+ state: "active" | "hover";
1007
+ } | null;
722
1008
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
723
1009
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
724
1010
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -726,13 +1012,22 @@ export declare const actionZoomToFit: {
726
1012
  isBindingEnabled: boolean;
727
1013
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
728
1014
  suggestedBindings: import("../element/binding").SuggestedBinding[];
1015
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
1016
+ frameRendering: {
1017
+ enabled: boolean;
1018
+ name: boolean;
1019
+ outline: boolean;
1020
+ clip: boolean;
1021
+ };
1022
+ editingFrame: string | null;
1023
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
729
1024
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
730
1025
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
731
1026
  activeTool: {
732
1027
  lastActiveTool: import("../types").LastActiveTool;
733
1028
  locked: boolean;
734
1029
  } & ({
735
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
1030
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
736
1031
  customType: null;
737
1032
  } | {
738
1033
  type: "custom";
@@ -764,17 +1059,21 @@ export declare const actionZoomToFit: {
764
1059
  isResizing: boolean;
765
1060
  isRotating: boolean;
766
1061
  openMenu: "canvas" | "shape" | null;
767
- openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
768
- openSidebar: "library" | "customSidebar" | null;
1062
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
1063
+ openSidebar: {
1064
+ name: string;
1065
+ tab?: string | undefined;
1066
+ } | null;
769
1067
  openDialog: "imageExport" | "help" | "jsonExport" | null;
770
- isSidebarDocked: boolean;
1068
+ defaultSidebarDockedPreference: boolean;
771
1069
  lastPointerDownWith: import("../element/types").PointerType;
772
- selectedElementIds: {
773
- [id: string]: boolean;
774
- };
1070
+ selectedElementIds: Readonly<{
1071
+ [id: string]: true;
1072
+ }>;
775
1073
  previousSelectedElementIds: {
776
- [id: string]: boolean;
1074
+ [id: string]: true;
777
1075
  };
1076
+ selectedElementsAreBeingDragged: boolean;
778
1077
  shouldCacheIgnoreZoom: boolean;
779
1078
  toast: {
780
1079
  message: string;
@@ -782,7 +1081,7 @@ export declare const actionZoomToFit: {
782
1081
  duration?: number | undefined;
783
1082
  } | null;
784
1083
  zenModeEnabled: boolean;
785
- theme: string;
1084
+ theme: import("../element/types").Theme;
786
1085
  gridSize: number | null;
787
1086
  viewModeEnabled: boolean;
788
1087
  selectedGroupIds: {
@@ -805,8 +1104,14 @@ export declare const actionZoomToFit: {
805
1104
  data: import("../charts").Spreadsheet;
806
1105
  };
807
1106
  pendingImageElementId: string | null;
808
- showHyperlinkPopup: false | "info" | "editor";
1107
+ showHyperlinkPopup: false | "editor" | "info";
809
1108
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
1109
+ snapLines: import("../snapping").SnapLine[];
1110
+ originSnapOffset: {
1111
+ x: number;
1112
+ y: number;
1113
+ } | null;
1114
+ objectsSnapModeEnabled: boolean;
810
1115
  };
811
1116
  commitToHistory: boolean;
812
1117
  };
@@ -831,6 +1136,10 @@ export declare const actionToggleTheme: {
831
1136
  showWelcomeScreen: boolean;
832
1137
  isLoading: boolean;
833
1138
  errorMessage: import("react").ReactNode;
1139
+ activeEmbeddable: {
1140
+ element: import("../element/types").NonDeletedExcalidrawElement;
1141
+ state: "active" | "hover";
1142
+ } | null;
834
1143
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
835
1144
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
836
1145
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -838,13 +1147,22 @@ export declare const actionToggleTheme: {
838
1147
  isBindingEnabled: boolean;
839
1148
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
840
1149
  suggestedBindings: import("../element/binding").SuggestedBinding[];
1150
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
1151
+ frameRendering: {
1152
+ enabled: boolean;
1153
+ name: boolean;
1154
+ outline: boolean;
1155
+ clip: boolean;
1156
+ };
1157
+ editingFrame: string | null;
1158
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
841
1159
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
842
1160
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
843
1161
  activeTool: {
844
1162
  lastActiveTool: import("../types").LastActiveTool;
845
1163
  locked: boolean;
846
1164
  } & ({
847
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
1165
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
848
1166
  customType: null;
849
1167
  } | {
850
1168
  type: "custom";
@@ -881,17 +1199,21 @@ export declare const actionToggleTheme: {
881
1199
  value: NormalizedZoomValue;
882
1200
  }>;
883
1201
  openMenu: "canvas" | "shape" | null;
884
- openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
885
- openSidebar: "library" | "customSidebar" | null;
1202
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
1203
+ openSidebar: {
1204
+ name: string;
1205
+ tab?: string | undefined;
1206
+ } | null;
886
1207
  openDialog: "imageExport" | "help" | "jsonExport" | null;
887
- isSidebarDocked: boolean;
1208
+ defaultSidebarDockedPreference: boolean;
888
1209
  lastPointerDownWith: import("../element/types").PointerType;
889
- selectedElementIds: {
890
- [id: string]: boolean;
891
- };
1210
+ selectedElementIds: Readonly<{
1211
+ [id: string]: true;
1212
+ }>;
892
1213
  previousSelectedElementIds: {
893
- [id: string]: boolean;
1214
+ [id: string]: true;
894
1215
  };
1216
+ selectedElementsAreBeingDragged: boolean;
895
1217
  shouldCacheIgnoreZoom: boolean;
896
1218
  toast: {
897
1219
  message: string;
@@ -921,8 +1243,14 @@ export declare const actionToggleTheme: {
921
1243
  data: import("../charts").Spreadsheet;
922
1244
  };
923
1245
  pendingImageElementId: string | null;
924
- showHyperlinkPopup: false | "info" | "editor";
1246
+ showHyperlinkPopup: false | "editor" | "info";
925
1247
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
1248
+ snapLines: import("../snapping").SnapLine[];
1249
+ originSnapOffset: {
1250
+ x: number;
1251
+ y: number;
1252
+ } | null;
1253
+ objectsSnapModeEnabled: boolean;
926
1254
  };
927
1255
  commitToHistory: false;
928
1256
  };
@@ -940,11 +1268,12 @@ export declare const actionToggleEraserTool: {
940
1268
  appState: {
941
1269
  selectedElementIds: {};
942
1270
  selectedGroupIds: {};
1271
+ activeEmbeddable: null;
943
1272
  activeTool: {
944
1273
  lastActiveTool: import("../types").LastActiveTool;
945
1274
  locked: boolean;
946
1275
  } & ({
947
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
1276
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
948
1277
  customType: null;
949
1278
  } | {
950
1279
  type: "custom";
@@ -965,6 +1294,15 @@ export declare const actionToggleEraserTool: {
965
1294
  isBindingEnabled: boolean;
966
1295
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
967
1296
  suggestedBindings: import("../element/binding").SuggestedBinding[];
1297
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
1298
+ frameRendering: {
1299
+ enabled: boolean;
1300
+ name: boolean;
1301
+ outline: boolean;
1302
+ clip: boolean;
1303
+ };
1304
+ editingFrame: string | null;
1305
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
968
1306
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
969
1307
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
970
1308
  penMode: boolean;
@@ -998,14 +1336,18 @@ export declare const actionToggleEraserTool: {
998
1336
  value: NormalizedZoomValue;
999
1337
  }>;
1000
1338
  openMenu: "canvas" | "shape" | null;
1001
- openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
1002
- openSidebar: "library" | "customSidebar" | null;
1339
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
1340
+ openSidebar: {
1341
+ name: string;
1342
+ tab?: string | undefined;
1343
+ } | null;
1003
1344
  openDialog: "imageExport" | "help" | "jsonExport" | null;
1004
- isSidebarDocked: boolean;
1345
+ defaultSidebarDockedPreference: boolean;
1005
1346
  lastPointerDownWith: import("../element/types").PointerType;
1006
1347
  previousSelectedElementIds: {
1007
- [id: string]: boolean;
1348
+ [id: string]: true;
1008
1349
  };
1350
+ selectedElementsAreBeingDragged: boolean;
1009
1351
  shouldCacheIgnoreZoom: boolean;
1010
1352
  toast: {
1011
1353
  message: string;
@@ -1013,7 +1355,7 @@ export declare const actionToggleEraserTool: {
1013
1355
  duration?: number | undefined;
1014
1356
  } | null;
1015
1357
  zenModeEnabled: boolean;
1016
- theme: string;
1358
+ theme: import("../element/types").Theme;
1017
1359
  gridSize: number | null;
1018
1360
  viewModeEnabled: boolean;
1019
1361
  editingGroupId: string | null;
@@ -1033,8 +1375,14 @@ export declare const actionToggleEraserTool: {
1033
1375
  data: import("../charts").Spreadsheet;
1034
1376
  };
1035
1377
  pendingImageElementId: string | null;
1036
- showHyperlinkPopup: false | "info" | "editor";
1378
+ showHyperlinkPopup: false | "editor" | "info";
1037
1379
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
1380
+ snapLines: import("../snapping").SnapLine[];
1381
+ originSnapOffset: {
1382
+ x: number;
1383
+ y: number;
1384
+ } | null;
1385
+ objectsSnapModeEnabled: boolean;
1038
1386
  };
1039
1387
  commitToHistory: true;
1040
1388
  };
@@ -1051,11 +1399,12 @@ export declare const actionToggleHandTool: {
1051
1399
  appState: {
1052
1400
  selectedElementIds: {};
1053
1401
  selectedGroupIds: {};
1402
+ activeEmbeddable: null;
1054
1403
  activeTool: {
1055
1404
  lastActiveTool: import("../types").LastActiveTool;
1056
1405
  locked: boolean;
1057
1406
  } & ({
1058
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
1407
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
1059
1408
  customType: null;
1060
1409
  } | {
1061
1410
  type: "custom";
@@ -1076,6 +1425,15 @@ export declare const actionToggleHandTool: {
1076
1425
  isBindingEnabled: boolean;
1077
1426
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
1078
1427
  suggestedBindings: import("../element/binding").SuggestedBinding[];
1428
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
1429
+ frameRendering: {
1430
+ enabled: boolean;
1431
+ name: boolean;
1432
+ outline: boolean;
1433
+ clip: boolean;
1434
+ };
1435
+ editingFrame: string | null;
1436
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
1079
1437
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
1080
1438
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
1081
1439
  penMode: boolean;
@@ -1109,14 +1467,18 @@ export declare const actionToggleHandTool: {
1109
1467
  value: NormalizedZoomValue;
1110
1468
  }>;
1111
1469
  openMenu: "canvas" | "shape" | null;
1112
- openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
1113
- openSidebar: "library" | "customSidebar" | null;
1470
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
1471
+ openSidebar: {
1472
+ name: string;
1473
+ tab?: string | undefined;
1474
+ } | null;
1114
1475
  openDialog: "imageExport" | "help" | "jsonExport" | null;
1115
- isSidebarDocked: boolean;
1476
+ defaultSidebarDockedPreference: boolean;
1116
1477
  lastPointerDownWith: import("../element/types").PointerType;
1117
1478
  previousSelectedElementIds: {
1118
- [id: string]: boolean;
1479
+ [id: string]: true;
1119
1480
  };
1481
+ selectedElementsAreBeingDragged: boolean;
1120
1482
  shouldCacheIgnoreZoom: boolean;
1121
1483
  toast: {
1122
1484
  message: string;
@@ -1124,7 +1486,7 @@ export declare const actionToggleHandTool: {
1124
1486
  duration?: number | undefined;
1125
1487
  } | null;
1126
1488
  zenModeEnabled: boolean;
1127
- theme: string;
1489
+ theme: import("../element/types").Theme;
1128
1490
  gridSize: number | null;
1129
1491
  viewModeEnabled: boolean;
1130
1492
  editingGroupId: string | null;
@@ -1144,8 +1506,14 @@ export declare const actionToggleHandTool: {
1144
1506
  data: import("../charts").Spreadsheet;
1145
1507
  };
1146
1508
  pendingImageElementId: string | null;
1147
- showHyperlinkPopup: false | "info" | "editor";
1509
+ showHyperlinkPopup: false | "editor" | "info";
1148
1510
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
1511
+ snapLines: import("../snapping").SnapLine[];
1512
+ originSnapOffset: {
1513
+ x: number;
1514
+ y: number;
1515
+ } | null;
1516
+ objectsSnapModeEnabled: boolean;
1149
1517
  };
1150
1518
  commitToHistory: true;
1151
1519
  };