@dwelle/excalidraw 0.4.0-c38ebd4 → 0.4.0-c4ea72b

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 +451 -1
  2. package/README.md +6 -2
  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 +2807 -1620
  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 +81 -31
  10. package/types/actions/actionAlign.d.ts +25 -20
  11. package/types/actions/actionBoundText.d.ts +156 -19
  12. package/types/actions/actionCanvas.d.ts +504 -96
  13. package/types/actions/actionClipboard.d.ts +131 -50
  14. package/types/actions/actionDeleteSelected.d.ts +75 -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 +271 -0
  18. package/types/actions/actionExport.d.ts +288 -135
  19. package/types/actions/actionFinalize.d.ts +52 -22
  20. package/types/actions/actionFlip.d.ts +4 -7
  21. package/types/actions/actionFrame.d.ts +423 -0
  22. package/types/actions/actionGroup.d.ts +246 -9
  23. package/types/actions/actionHistory.d.ts +1 -1
  24. package/types/actions/actionLinearEditor.d.ts +29 -13
  25. package/types/actions/actionMenu.d.ts +82 -33
  26. package/types/actions/actionNavigate.d.ts +1 -1
  27. package/types/actions/actionProperties.d.ts +356 -134
  28. package/types/actions/actionSelectAll.d.ts +121 -2
  29. package/types/actions/actionStyles.d.ts +27 -11
  30. package/types/actions/actionToggleGridMode.d.ts +27 -11
  31. package/types/actions/actionToggleStats.d.ts +27 -11
  32. package/types/actions/actionToggleViewMode.d.ts +27 -11
  33. package/types/actions/actionToggleZenMode.d.ts +27 -11
  34. package/types/actions/actionZindex.d.ts +4 -4
  35. package/types/actions/index.d.ts +1 -1
  36. package/types/actions/manager.d.ts +1 -1
  37. package/types/actions/shortcuts.d.ts +1 -1
  38. package/types/actions/types.d.ts +10 -9
  39. package/types/appState.d.ts +12 -9
  40. package/types/charts.d.ts +2 -2
  41. package/types/clients.d.ts +5 -6
  42. package/types/clipboard.d.ts +3 -2
  43. package/types/colors.d.ts +60 -5
  44. package/types/components/Actions.d.ts +7 -7
  45. package/types/components/ActiveConfirmDialog.d.ts +1 -21
  46. package/types/components/App.d.ts +72 -16
  47. package/types/components/Avatar.d.ts +1 -2
  48. package/types/components/Button.d.ts +3 -2
  49. package/types/components/ButtonIconSelect.d.ts +11 -3
  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 +13 -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 +75 -10
  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 +38 -18
  135. package/types/element/binding.d.ts +4 -3
  136. package/types/element/bounds.d.ts +31 -6
  137. package/types/element/collision.d.ts +7 -7
  138. package/types/element/dragElements.d.ts +2 -1
  139. package/types/element/embeddable.d.ts +153 -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 +33 -16
  143. package/types/element/mutateElement.d.ts +1 -1
  144. package/types/element/newElement.d.ts +47 -13
  145. package/types/element/resizeElements.d.ts +1 -0
  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 +13 -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 +52 -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 +4 -1
  168. package/types/math.d.ts +1 -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 +9 -2
  175. package/types/renderer/renderElement.d.ts +12 -22
  176. package/types/renderer/renderScene.d.ts +19 -27
  177. package/types/renderer/roundRect.d.ts +1 -1
  178. package/types/scene/Renderer.d.ts +25 -0
  179. package/types/scene/Scene.d.ts +27 -5
  180. package/types/scene/Shape.d.ts +12 -0
  181. package/types/scene/ShapeCache.d.ts +20 -0
  182. package/types/scene/export.d.ts +49 -11
  183. package/types/scene/scroll.d.ts +1 -1
  184. package/types/scene/scrollbars.d.ts +2 -6
  185. package/types/scene/selection.d.ts +26 -6
  186. package/types/scene/types.d.ts +69 -34
  187. package/types/types.d.ts +145 -56
  188. package/types/utility-types.d.ts +16 -14
  189. package/types/utils.d.ts +70 -11
  190. package/types/zindex.d.ts +4 -4
  191. package/types/actions/actionToggleLock.d.ts +0 -119
  192. package/types/components/ColorPicker.d.ts +0 -14
  193. package/types/components/LibraryButton.d.ts +0 -8
  194. package/types/components/SingleLibraryItem.d.ts +0 -10
  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,10 +132,9 @@ 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;
123
139
  };
124
140
  commitToHistory: true;
@@ -147,6 +163,10 @@ export declare const actionZoomIn: {
147
163
  showWelcomeScreen: boolean;
148
164
  isLoading: boolean;
149
165
  errorMessage: import("react").ReactNode;
166
+ activeEmbeddable: {
167
+ element: import("../element/types").NonDeletedExcalidrawElement;
168
+ state: "active" | "hover";
169
+ } | null;
150
170
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
151
171
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
152
172
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -154,13 +174,22 @@ export declare const actionZoomIn: {
154
174
  isBindingEnabled: boolean;
155
175
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
156
176
  suggestedBindings: import("../element/binding").SuggestedBinding[];
177
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
178
+ frameRendering: {
179
+ enabled: boolean;
180
+ name: boolean;
181
+ outline: boolean;
182
+ clip: boolean;
183
+ };
184
+ editingFrame: string | null;
185
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
157
186
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
158
187
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
159
188
  activeTool: {
160
189
  lastActiveTool: import("../types").LastActiveTool;
161
190
  locked: boolean;
162
191
  } & ({
163
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
192
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
164
193
  customType: null;
165
194
  } | {
166
195
  type: "custom";
@@ -192,17 +221,21 @@ export declare const actionZoomIn: {
192
221
  isResizing: boolean;
193
222
  isRotating: boolean;
194
223
  openMenu: "canvas" | "shape" | null;
195
- openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
196
- openSidebar: "library" | "customSidebar" | null;
224
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
225
+ openSidebar: {
226
+ name: string;
227
+ tab?: string | undefined;
228
+ } | null;
197
229
  openDialog: "imageExport" | "help" | "jsonExport" | null;
198
- isSidebarDocked: boolean;
230
+ defaultSidebarDockedPreference: boolean;
199
231
  lastPointerDownWith: import("../element/types").PointerType;
200
- selectedElementIds: {
201
- [id: string]: boolean;
202
- };
232
+ selectedElementIds: Readonly<{
233
+ [id: string]: true;
234
+ }>;
203
235
  previousSelectedElementIds: {
204
- [id: string]: boolean;
236
+ [id: string]: true;
205
237
  };
238
+ selectedElementsAreBeingDragged: boolean;
206
239
  shouldCacheIgnoreZoom: boolean;
207
240
  toast: {
208
241
  message: string;
@@ -210,7 +243,7 @@ export declare const actionZoomIn: {
210
243
  duration?: number | undefined;
211
244
  } | null;
212
245
  zenModeEnabled: boolean;
213
- theme: string;
246
+ theme: import("../element/types").Theme;
214
247
  gridSize: number | null;
215
248
  viewModeEnabled: boolean;
216
249
  selectedGroupIds: {
@@ -233,7 +266,7 @@ export declare const actionZoomIn: {
233
266
  data: import("../charts").Spreadsheet;
234
267
  };
235
268
  pendingImageElementId: string | null;
236
- showHyperlinkPopup: false | "info" | "editor";
269
+ showHyperlinkPopup: false | "editor" | "info";
237
270
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
238
271
  };
239
272
  commitToHistory: false;
@@ -264,6 +297,10 @@ export declare const actionZoomOut: {
264
297
  showWelcomeScreen: boolean;
265
298
  isLoading: boolean;
266
299
  errorMessage: import("react").ReactNode;
300
+ activeEmbeddable: {
301
+ element: import("../element/types").NonDeletedExcalidrawElement;
302
+ state: "active" | "hover";
303
+ } | null;
267
304
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
268
305
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
269
306
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -271,13 +308,22 @@ export declare const actionZoomOut: {
271
308
  isBindingEnabled: boolean;
272
309
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
273
310
  suggestedBindings: import("../element/binding").SuggestedBinding[];
311
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
312
+ frameRendering: {
313
+ enabled: boolean;
314
+ name: boolean;
315
+ outline: boolean;
316
+ clip: boolean;
317
+ };
318
+ editingFrame: string | null;
319
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
274
320
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
275
321
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
276
322
  activeTool: {
277
323
  lastActiveTool: import("../types").LastActiveTool;
278
324
  locked: boolean;
279
325
  } & ({
280
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
326
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
281
327
  customType: null;
282
328
  } | {
283
329
  type: "custom";
@@ -309,17 +355,21 @@ export declare const actionZoomOut: {
309
355
  isResizing: boolean;
310
356
  isRotating: boolean;
311
357
  openMenu: "canvas" | "shape" | null;
312
- openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
313
- openSidebar: "library" | "customSidebar" | null;
358
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
359
+ openSidebar: {
360
+ name: string;
361
+ tab?: string | undefined;
362
+ } | null;
314
363
  openDialog: "imageExport" | "help" | "jsonExport" | null;
315
- isSidebarDocked: boolean;
364
+ defaultSidebarDockedPreference: boolean;
316
365
  lastPointerDownWith: import("../element/types").PointerType;
317
- selectedElementIds: {
318
- [id: string]: boolean;
319
- };
366
+ selectedElementIds: Readonly<{
367
+ [id: string]: true;
368
+ }>;
320
369
  previousSelectedElementIds: {
321
- [id: string]: boolean;
370
+ [id: string]: true;
322
371
  };
372
+ selectedElementsAreBeingDragged: boolean;
323
373
  shouldCacheIgnoreZoom: boolean;
324
374
  toast: {
325
375
  message: string;
@@ -327,7 +377,7 @@ export declare const actionZoomOut: {
327
377
  duration?: number | undefined;
328
378
  } | null;
329
379
  zenModeEnabled: boolean;
330
- theme: string;
380
+ theme: import("../element/types").Theme;
331
381
  gridSize: number | null;
332
382
  viewModeEnabled: boolean;
333
383
  selectedGroupIds: {
@@ -350,7 +400,7 @@ export declare const actionZoomOut: {
350
400
  data: import("../charts").Spreadsheet;
351
401
  };
352
402
  pendingImageElementId: string | null;
353
- showHyperlinkPopup: false | "info" | "editor";
403
+ showHyperlinkPopup: false | "editor" | "info";
354
404
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
355
405
  };
356
406
  commitToHistory: false;
@@ -381,6 +431,10 @@ export declare const actionResetZoom: {
381
431
  showWelcomeScreen: boolean;
382
432
  isLoading: boolean;
383
433
  errorMessage: import("react").ReactNode;
434
+ activeEmbeddable: {
435
+ element: import("../element/types").NonDeletedExcalidrawElement;
436
+ state: "active" | "hover";
437
+ } | null;
384
438
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
385
439
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
386
440
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -388,13 +442,22 @@ export declare const actionResetZoom: {
388
442
  isBindingEnabled: boolean;
389
443
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
390
444
  suggestedBindings: import("../element/binding").SuggestedBinding[];
445
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
446
+ frameRendering: {
447
+ enabled: boolean;
448
+ name: boolean;
449
+ outline: boolean;
450
+ clip: boolean;
451
+ };
452
+ editingFrame: string | null;
453
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
391
454
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
392
455
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
393
456
  activeTool: {
394
457
  lastActiveTool: import("../types").LastActiveTool;
395
458
  locked: boolean;
396
459
  } & ({
397
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
460
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
398
461
  customType: null;
399
462
  } | {
400
463
  type: "custom";
@@ -426,17 +489,21 @@ export declare const actionResetZoom: {
426
489
  isResizing: boolean;
427
490
  isRotating: boolean;
428
491
  openMenu: "canvas" | "shape" | null;
429
- openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
430
- openSidebar: "library" | "customSidebar" | null;
492
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
493
+ openSidebar: {
494
+ name: string;
495
+ tab?: string | undefined;
496
+ } | null;
431
497
  openDialog: "imageExport" | "help" | "jsonExport" | null;
432
- isSidebarDocked: boolean;
498
+ defaultSidebarDockedPreference: boolean;
433
499
  lastPointerDownWith: import("../element/types").PointerType;
434
- selectedElementIds: {
435
- [id: string]: boolean;
436
- };
500
+ selectedElementIds: Readonly<{
501
+ [id: string]: true;
502
+ }>;
437
503
  previousSelectedElementIds: {
438
- [id: string]: boolean;
504
+ [id: string]: true;
439
505
  };
506
+ selectedElementsAreBeingDragged: boolean;
440
507
  shouldCacheIgnoreZoom: boolean;
441
508
  toast: {
442
509
  message: string;
@@ -444,7 +511,7 @@ export declare const actionResetZoom: {
444
511
  duration?: number | undefined;
445
512
  } | null;
446
513
  zenModeEnabled: boolean;
447
- theme: string;
514
+ theme: import("../element/types").Theme;
448
515
  gridSize: number | null;
449
516
  viewModeEnabled: boolean;
450
517
  selectedGroupIds: {
@@ -467,7 +534,7 @@ export declare const actionResetZoom: {
467
534
  data: import("../charts").Spreadsheet;
468
535
  };
469
536
  pendingImageElementId: string | null;
470
- showHyperlinkPopup: false | "info" | "editor";
537
+ showHyperlinkPopup: false | "editor" | "info";
471
538
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
472
539
  };
473
540
  commitToHistory: false;
@@ -477,18 +544,280 @@ export declare const actionResetZoom: {
477
544
  } & {
478
545
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
479
546
  };
480
- export declare const actionZoomToSelected: {
481
- name: "zoomToSelection";
547
+ export declare const zoomToFit: ({ targetElements, appState, fitToViewport, viewportZoomFactor, }: {
548
+ targetElements: readonly ExcalidrawElement[];
549
+ appState: Readonly<AppState>;
550
+ /** whether to fit content to viewport (beyond >100%) */
551
+ fitToViewport: boolean;
552
+ /** zoom content to cover X of the viewport, when fitToViewport=true */
553
+ viewportZoomFactor?: number | undefined;
554
+ }) => {
555
+ appState: {
556
+ scrollX: number;
557
+ scrollY: number;
558
+ zoom: {
559
+ value: NormalizedZoomValue;
560
+ };
561
+ contextMenu: {
562
+ items: import("../components/ContextMenu").ContextMenuItems;
563
+ top: number;
564
+ left: number;
565
+ } | null;
566
+ showWelcomeScreen: boolean;
567
+ isLoading: boolean;
568
+ errorMessage: import("react").ReactNode;
569
+ activeEmbeddable: {
570
+ element: import("../element/types").NonDeletedExcalidrawElement;
571
+ state: "active" | "hover";
572
+ } | null;
573
+ draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
574
+ resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
575
+ multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
576
+ selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
577
+ isBindingEnabled: boolean;
578
+ startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
579
+ suggestedBindings: import("../element/binding").SuggestedBinding[];
580
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
581
+ frameRendering: {
582
+ enabled: boolean;
583
+ name: boolean;
584
+ outline: boolean;
585
+ clip: boolean;
586
+ };
587
+ editingFrame: string | null;
588
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
589
+ editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
590
+ editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
591
+ activeTool: {
592
+ lastActiveTool: import("../types").LastActiveTool;
593
+ locked: boolean;
594
+ } & ({
595
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
596
+ customType: null;
597
+ } | {
598
+ type: "custom";
599
+ customType: string;
600
+ });
601
+ penMode: boolean;
602
+ penDetected: boolean;
603
+ exportBackground: boolean;
604
+ exportEmbedScene: boolean;
605
+ exportWithDarkMode: boolean;
606
+ exportScale: number;
607
+ currentItemStrokeColor: string;
608
+ currentItemBackgroundColor: string;
609
+ currentItemFillStyle: import("../element/types").FillStyle;
610
+ currentItemStrokeWidth: number;
611
+ currentItemStrokeStyle: import("../element/types").StrokeStyle;
612
+ currentItemRoughness: number;
613
+ currentItemOpacity: number;
614
+ currentItemFontFamily: number;
615
+ currentItemFontSize: number;
616
+ currentItemTextAlign: string;
617
+ currentItemStartArrowhead: import("../element/types").Arrowhead | null;
618
+ currentItemEndArrowhead: import("../element/types").Arrowhead | null;
619
+ currentItemRoundness: import("../element/types").StrokeRoundness;
620
+ viewBackgroundColor: string;
621
+ cursorButton: "up" | "down";
622
+ scrolledOutside: boolean;
623
+ name: string;
624
+ isResizing: boolean;
625
+ isRotating: boolean;
626
+ openMenu: "canvas" | "shape" | null;
627
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
628
+ openSidebar: {
629
+ name: string;
630
+ tab?: string | undefined;
631
+ } | null;
632
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
633
+ defaultSidebarDockedPreference: boolean;
634
+ lastPointerDownWith: import("../element/types").PointerType;
635
+ selectedElementIds: Readonly<{
636
+ [id: string]: true;
637
+ }>;
638
+ previousSelectedElementIds: {
639
+ [id: string]: true;
640
+ };
641
+ selectedElementsAreBeingDragged: boolean;
642
+ shouldCacheIgnoreZoom: boolean;
643
+ toast: {
644
+ message: string;
645
+ closable?: boolean | undefined;
646
+ duration?: number | undefined;
647
+ } | null;
648
+ zenModeEnabled: boolean;
649
+ theme: import("../element/types").Theme;
650
+ gridSize: number | null;
651
+ viewModeEnabled: boolean;
652
+ selectedGroupIds: {
653
+ [groupId: string]: boolean;
654
+ };
655
+ editingGroupId: string | null;
656
+ width: number;
657
+ height: number;
658
+ offsetTop: number;
659
+ offsetLeft: number;
660
+ fileHandle: import("browser-fs-access").FileSystemHandle | null;
661
+ collaborators: Map<string, import("../types").Collaborator>;
662
+ showStats: boolean;
663
+ currentChartType: import("../element/types").ChartType;
664
+ pasteDialog: {
665
+ shown: false;
666
+ data: null;
667
+ } | {
668
+ shown: true;
669
+ data: import("../charts").Spreadsheet;
670
+ };
671
+ pendingImageElementId: string | null;
672
+ showHyperlinkPopup: false | "editor" | "info";
673
+ selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
674
+ };
675
+ commitToHistory: boolean;
676
+ };
677
+ export declare const actionZoomToFitSelectionInViewport: {
678
+ name: "zoomToFitSelectionInViewport";
482
679
  trackEvent: {
483
680
  category: "canvas";
484
681
  };
485
- perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
682
+ perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
486
683
  appState: {
684
+ scrollX: number;
685
+ scrollY: number;
487
686
  zoom: {
488
687
  value: NormalizedZoomValue;
489
688
  };
689
+ contextMenu: {
690
+ items: import("../components/ContextMenu").ContextMenuItems;
691
+ top: number;
692
+ left: number;
693
+ } | null;
694
+ showWelcomeScreen: boolean;
695
+ isLoading: boolean;
696
+ errorMessage: import("react").ReactNode;
697
+ activeEmbeddable: {
698
+ element: import("../element/types").NonDeletedExcalidrawElement;
699
+ state: "active" | "hover";
700
+ } | null;
701
+ draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
702
+ resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
703
+ multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
704
+ selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
705
+ isBindingEnabled: boolean;
706
+ startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
707
+ suggestedBindings: import("../element/binding").SuggestedBinding[];
708
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
709
+ frameRendering: {
710
+ enabled: boolean;
711
+ name: boolean;
712
+ outline: boolean;
713
+ clip: boolean;
714
+ };
715
+ editingFrame: string | null;
716
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
717
+ editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
718
+ editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
719
+ activeTool: {
720
+ lastActiveTool: import("../types").LastActiveTool;
721
+ locked: boolean;
722
+ } & ({
723
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
724
+ customType: null;
725
+ } | {
726
+ type: "custom";
727
+ customType: string;
728
+ });
729
+ penMode: boolean;
730
+ penDetected: boolean;
731
+ exportBackground: boolean;
732
+ exportEmbedScene: boolean;
733
+ exportWithDarkMode: boolean;
734
+ exportScale: number;
735
+ currentItemStrokeColor: string;
736
+ currentItemBackgroundColor: string;
737
+ currentItemFillStyle: import("../element/types").FillStyle;
738
+ currentItemStrokeWidth: number;
739
+ currentItemStrokeStyle: import("../element/types").StrokeStyle;
740
+ currentItemRoughness: number;
741
+ currentItemOpacity: number;
742
+ currentItemFontFamily: number;
743
+ currentItemFontSize: number;
744
+ currentItemTextAlign: string;
745
+ currentItemStartArrowhead: import("../element/types").Arrowhead | null;
746
+ currentItemEndArrowhead: import("../element/types").Arrowhead | null;
747
+ currentItemRoundness: import("../element/types").StrokeRoundness;
748
+ viewBackgroundColor: string;
749
+ cursorButton: "up" | "down";
750
+ scrolledOutside: boolean;
751
+ name: string;
752
+ isResizing: boolean;
753
+ isRotating: boolean;
754
+ openMenu: "canvas" | "shape" | null;
755
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
756
+ openSidebar: {
757
+ name: string;
758
+ tab?: string | undefined;
759
+ } | null;
760
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
761
+ defaultSidebarDockedPreference: boolean;
762
+ lastPointerDownWith: import("../element/types").PointerType;
763
+ selectedElementIds: Readonly<{
764
+ [id: string]: true;
765
+ }>;
766
+ previousSelectedElementIds: {
767
+ [id: string]: true;
768
+ };
769
+ selectedElementsAreBeingDragged: boolean;
770
+ shouldCacheIgnoreZoom: boolean;
771
+ toast: {
772
+ message: string;
773
+ closable?: boolean | undefined;
774
+ duration?: number | undefined;
775
+ } | null;
776
+ zenModeEnabled: boolean;
777
+ theme: import("../element/types").Theme;
778
+ gridSize: number | null;
779
+ viewModeEnabled: boolean;
780
+ selectedGroupIds: {
781
+ [groupId: string]: boolean;
782
+ };
783
+ editingGroupId: string | null;
784
+ width: number;
785
+ height: number;
786
+ offsetTop: number;
787
+ offsetLeft: number;
788
+ fileHandle: import("browser-fs-access").FileSystemHandle | null;
789
+ collaborators: Map<string, import("../types").Collaborator>;
790
+ showStats: boolean;
791
+ currentChartType: import("../element/types").ChartType;
792
+ pasteDialog: {
793
+ shown: false;
794
+ data: null;
795
+ } | {
796
+ shown: true;
797
+ data: import("../charts").Spreadsheet;
798
+ };
799
+ pendingImageElementId: string | null;
800
+ showHyperlinkPopup: false | "editor" | "info";
801
+ selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
802
+ };
803
+ commitToHistory: boolean;
804
+ };
805
+ keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
806
+ } & {
807
+ keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
808
+ };
809
+ export declare const actionZoomToFitSelection: {
810
+ name: "zoomToFitSelection";
811
+ trackEvent: {
812
+ category: "canvas";
813
+ };
814
+ perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
815
+ appState: {
490
816
  scrollX: number;
491
817
  scrollY: number;
818
+ zoom: {
819
+ value: NormalizedZoomValue;
820
+ };
492
821
  contextMenu: {
493
822
  items: import("../components/ContextMenu").ContextMenuItems;
494
823
  top: number;
@@ -497,6 +826,10 @@ export declare const actionZoomToSelected: {
497
826
  showWelcomeScreen: boolean;
498
827
  isLoading: boolean;
499
828
  errorMessage: import("react").ReactNode;
829
+ activeEmbeddable: {
830
+ element: import("../element/types").NonDeletedExcalidrawElement;
831
+ state: "active" | "hover";
832
+ } | null;
500
833
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
501
834
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
502
835
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -504,13 +837,22 @@ export declare const actionZoomToSelected: {
504
837
  isBindingEnabled: boolean;
505
838
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
506
839
  suggestedBindings: import("../element/binding").SuggestedBinding[];
840
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
841
+ frameRendering: {
842
+ enabled: boolean;
843
+ name: boolean;
844
+ outline: boolean;
845
+ clip: boolean;
846
+ };
847
+ editingFrame: string | null;
848
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
507
849
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
508
850
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
509
851
  activeTool: {
510
852
  lastActiveTool: import("../types").LastActiveTool;
511
853
  locked: boolean;
512
854
  } & ({
513
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
855
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
514
856
  customType: null;
515
857
  } | {
516
858
  type: "custom";
@@ -542,17 +884,21 @@ export declare const actionZoomToSelected: {
542
884
  isResizing: boolean;
543
885
  isRotating: boolean;
544
886
  openMenu: "canvas" | "shape" | null;
545
- openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
546
- openSidebar: "library" | "customSidebar" | null;
887
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
888
+ openSidebar: {
889
+ name: string;
890
+ tab?: string | undefined;
891
+ } | null;
547
892
  openDialog: "imageExport" | "help" | "jsonExport" | null;
548
- isSidebarDocked: boolean;
893
+ defaultSidebarDockedPreference: boolean;
549
894
  lastPointerDownWith: import("../element/types").PointerType;
550
- selectedElementIds: {
551
- [id: string]: boolean;
552
- };
895
+ selectedElementIds: Readonly<{
896
+ [id: string]: true;
897
+ }>;
553
898
  previousSelectedElementIds: {
554
- [id: string]: boolean;
899
+ [id: string]: true;
555
900
  };
901
+ selectedElementsAreBeingDragged: boolean;
556
902
  shouldCacheIgnoreZoom: boolean;
557
903
  toast: {
558
904
  message: string;
@@ -560,7 +906,7 @@ export declare const actionZoomToSelected: {
560
906
  duration?: number | undefined;
561
907
  } | null;
562
908
  zenModeEnabled: boolean;
563
- theme: string;
909
+ theme: import("../element/types").Theme;
564
910
  gridSize: number | null;
565
911
  viewModeEnabled: boolean;
566
912
  selectedGroupIds: {
@@ -583,7 +929,7 @@ export declare const actionZoomToSelected: {
583
929
  data: import("../charts").Spreadsheet;
584
930
  };
585
931
  pendingImageElementId: string | null;
586
- showHyperlinkPopup: false | "info" | "editor";
932
+ showHyperlinkPopup: false | "editor" | "info";
587
933
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
588
934
  };
589
935
  commitToHistory: boolean;
@@ -600,11 +946,11 @@ export declare const actionZoomToFit: {
600
946
  };
601
947
  perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
602
948
  appState: {
949
+ scrollX: number;
950
+ scrollY: number;
603
951
  zoom: {
604
952
  value: NormalizedZoomValue;
605
953
  };
606
- scrollX: number;
607
- scrollY: number;
608
954
  contextMenu: {
609
955
  items: import("../components/ContextMenu").ContextMenuItems;
610
956
  top: number;
@@ -613,6 +959,10 @@ export declare const actionZoomToFit: {
613
959
  showWelcomeScreen: boolean;
614
960
  isLoading: boolean;
615
961
  errorMessage: import("react").ReactNode;
962
+ activeEmbeddable: {
963
+ element: import("../element/types").NonDeletedExcalidrawElement;
964
+ state: "active" | "hover";
965
+ } | null;
616
966
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
617
967
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
618
968
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -620,13 +970,22 @@ export declare const actionZoomToFit: {
620
970
  isBindingEnabled: boolean;
621
971
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
622
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;
623
982
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
624
983
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
625
984
  activeTool: {
626
985
  lastActiveTool: import("../types").LastActiveTool;
627
986
  locked: boolean;
628
987
  } & ({
629
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
988
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
630
989
  customType: null;
631
990
  } | {
632
991
  type: "custom";
@@ -658,17 +1017,21 @@ export declare const actionZoomToFit: {
658
1017
  isResizing: boolean;
659
1018
  isRotating: boolean;
660
1019
  openMenu: "canvas" | "shape" | null;
661
- openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
662
- openSidebar: "library" | "customSidebar" | null;
1020
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
1021
+ openSidebar: {
1022
+ name: string;
1023
+ tab?: string | undefined;
1024
+ } | null;
663
1025
  openDialog: "imageExport" | "help" | "jsonExport" | null;
664
- isSidebarDocked: boolean;
1026
+ defaultSidebarDockedPreference: boolean;
665
1027
  lastPointerDownWith: import("../element/types").PointerType;
666
- selectedElementIds: {
667
- [id: string]: boolean;
668
- };
1028
+ selectedElementIds: Readonly<{
1029
+ [id: string]: true;
1030
+ }>;
669
1031
  previousSelectedElementIds: {
670
- [id: string]: boolean;
1032
+ [id: string]: true;
671
1033
  };
1034
+ selectedElementsAreBeingDragged: boolean;
672
1035
  shouldCacheIgnoreZoom: boolean;
673
1036
  toast: {
674
1037
  message: string;
@@ -676,7 +1039,7 @@ export declare const actionZoomToFit: {
676
1039
  duration?: number | undefined;
677
1040
  } | null;
678
1041
  zenModeEnabled: boolean;
679
- theme: string;
1042
+ theme: import("../element/types").Theme;
680
1043
  gridSize: number | null;
681
1044
  viewModeEnabled: boolean;
682
1045
  selectedGroupIds: {
@@ -699,7 +1062,7 @@ export declare const actionZoomToFit: {
699
1062
  data: import("../charts").Spreadsheet;
700
1063
  };
701
1064
  pendingImageElementId: string | null;
702
- showHyperlinkPopup: false | "info" | "editor";
1065
+ showHyperlinkPopup: false | "editor" | "info";
703
1066
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
704
1067
  };
705
1068
  commitToHistory: boolean;
@@ -725,6 +1088,10 @@ export declare const actionToggleTheme: {
725
1088
  showWelcomeScreen: boolean;
726
1089
  isLoading: boolean;
727
1090
  errorMessage: import("react").ReactNode;
1091
+ activeEmbeddable: {
1092
+ element: import("../element/types").NonDeletedExcalidrawElement;
1093
+ state: "active" | "hover";
1094
+ } | null;
728
1095
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
729
1096
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
730
1097
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -732,13 +1099,22 @@ export declare const actionToggleTheme: {
732
1099
  isBindingEnabled: boolean;
733
1100
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
734
1101
  suggestedBindings: import("../element/binding").SuggestedBinding[];
1102
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
1103
+ frameRendering: {
1104
+ enabled: boolean;
1105
+ name: boolean;
1106
+ outline: boolean;
1107
+ clip: boolean;
1108
+ };
1109
+ editingFrame: string | null;
1110
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
735
1111
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
736
1112
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
737
1113
  activeTool: {
738
1114
  lastActiveTool: import("../types").LastActiveTool;
739
1115
  locked: boolean;
740
1116
  } & ({
741
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
1117
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
742
1118
  customType: null;
743
1119
  } | {
744
1120
  type: "custom";
@@ -775,17 +1151,21 @@ export declare const actionToggleTheme: {
775
1151
  value: NormalizedZoomValue;
776
1152
  }>;
777
1153
  openMenu: "canvas" | "shape" | null;
778
- openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
779
- openSidebar: "library" | "customSidebar" | null;
1154
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
1155
+ openSidebar: {
1156
+ name: string;
1157
+ tab?: string | undefined;
1158
+ } | null;
780
1159
  openDialog: "imageExport" | "help" | "jsonExport" | null;
781
- isSidebarDocked: boolean;
1160
+ defaultSidebarDockedPreference: boolean;
782
1161
  lastPointerDownWith: import("../element/types").PointerType;
783
- selectedElementIds: {
784
- [id: string]: boolean;
785
- };
1162
+ selectedElementIds: Readonly<{
1163
+ [id: string]: true;
1164
+ }>;
786
1165
  previousSelectedElementIds: {
787
- [id: string]: boolean;
1166
+ [id: string]: true;
788
1167
  };
1168
+ selectedElementsAreBeingDragged: boolean;
789
1169
  shouldCacheIgnoreZoom: boolean;
790
1170
  toast: {
791
1171
  message: string;
@@ -815,7 +1195,7 @@ export declare const actionToggleTheme: {
815
1195
  data: import("../charts").Spreadsheet;
816
1196
  };
817
1197
  pendingImageElementId: string | null;
818
- showHyperlinkPopup: false | "info" | "editor";
1198
+ showHyperlinkPopup: false | "editor" | "info";
819
1199
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
820
1200
  };
821
1201
  commitToHistory: false;
@@ -834,11 +1214,12 @@ export declare const actionToggleEraserTool: {
834
1214
  appState: {
835
1215
  selectedElementIds: {};
836
1216
  selectedGroupIds: {};
1217
+ activeEmbeddable: null;
837
1218
  activeTool: {
838
1219
  lastActiveTool: import("../types").LastActiveTool;
839
1220
  locked: boolean;
840
1221
  } & ({
841
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
1222
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
842
1223
  customType: null;
843
1224
  } | {
844
1225
  type: "custom";
@@ -859,6 +1240,15 @@ export declare const actionToggleEraserTool: {
859
1240
  isBindingEnabled: boolean;
860
1241
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
861
1242
  suggestedBindings: import("../element/binding").SuggestedBinding[];
1243
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
1244
+ frameRendering: {
1245
+ enabled: boolean;
1246
+ name: boolean;
1247
+ outline: boolean;
1248
+ clip: boolean;
1249
+ };
1250
+ editingFrame: string | null;
1251
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
862
1252
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
863
1253
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
864
1254
  penMode: boolean;
@@ -892,14 +1282,18 @@ export declare const actionToggleEraserTool: {
892
1282
  value: NormalizedZoomValue;
893
1283
  }>;
894
1284
  openMenu: "canvas" | "shape" | null;
895
- openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
896
- openSidebar: "library" | "customSidebar" | null;
1285
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
1286
+ openSidebar: {
1287
+ name: string;
1288
+ tab?: string | undefined;
1289
+ } | null;
897
1290
  openDialog: "imageExport" | "help" | "jsonExport" | null;
898
- isSidebarDocked: boolean;
1291
+ defaultSidebarDockedPreference: boolean;
899
1292
  lastPointerDownWith: import("../element/types").PointerType;
900
1293
  previousSelectedElementIds: {
901
- [id: string]: boolean;
1294
+ [id: string]: true;
902
1295
  };
1296
+ selectedElementsAreBeingDragged: boolean;
903
1297
  shouldCacheIgnoreZoom: boolean;
904
1298
  toast: {
905
1299
  message: string;
@@ -907,7 +1301,7 @@ export declare const actionToggleEraserTool: {
907
1301
  duration?: number | undefined;
908
1302
  } | null;
909
1303
  zenModeEnabled: boolean;
910
- theme: string;
1304
+ theme: import("../element/types").Theme;
911
1305
  gridSize: number | null;
912
1306
  viewModeEnabled: boolean;
913
1307
  editingGroupId: string | null;
@@ -927,7 +1321,7 @@ export declare const actionToggleEraserTool: {
927
1321
  data: import("../charts").Spreadsheet;
928
1322
  };
929
1323
  pendingImageElementId: string | null;
930
- showHyperlinkPopup: false | "info" | "editor";
1324
+ showHyperlinkPopup: false | "editor" | "info";
931
1325
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
932
1326
  };
933
1327
  commitToHistory: true;
@@ -945,11 +1339,12 @@ export declare const actionToggleHandTool: {
945
1339
  appState: {
946
1340
  selectedElementIds: {};
947
1341
  selectedGroupIds: {};
1342
+ activeEmbeddable: null;
948
1343
  activeTool: {
949
1344
  lastActiveTool: import("../types").LastActiveTool;
950
1345
  locked: boolean;
951
1346
  } & ({
952
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
1347
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
953
1348
  customType: null;
954
1349
  } | {
955
1350
  type: "custom";
@@ -970,6 +1365,15 @@ export declare const actionToggleHandTool: {
970
1365
  isBindingEnabled: boolean;
971
1366
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
972
1367
  suggestedBindings: import("../element/binding").SuggestedBinding[];
1368
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
1369
+ frameRendering: {
1370
+ enabled: boolean;
1371
+ name: boolean;
1372
+ outline: boolean;
1373
+ clip: boolean;
1374
+ };
1375
+ editingFrame: string | null;
1376
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
973
1377
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
974
1378
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
975
1379
  penMode: boolean;
@@ -1003,14 +1407,18 @@ export declare const actionToggleHandTool: {
1003
1407
  value: NormalizedZoomValue;
1004
1408
  }>;
1005
1409
  openMenu: "canvas" | "shape" | null;
1006
- openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
1007
- openSidebar: "library" | "customSidebar" | null;
1410
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
1411
+ openSidebar: {
1412
+ name: string;
1413
+ tab?: string | undefined;
1414
+ } | null;
1008
1415
  openDialog: "imageExport" | "help" | "jsonExport" | null;
1009
- isSidebarDocked: boolean;
1416
+ defaultSidebarDockedPreference: boolean;
1010
1417
  lastPointerDownWith: import("../element/types").PointerType;
1011
1418
  previousSelectedElementIds: {
1012
- [id: string]: boolean;
1419
+ [id: string]: true;
1013
1420
  };
1421
+ selectedElementsAreBeingDragged: boolean;
1014
1422
  shouldCacheIgnoreZoom: boolean;
1015
1423
  toast: {
1016
1424
  message: string;
@@ -1018,7 +1426,7 @@ export declare const actionToggleHandTool: {
1018
1426
  duration?: number | undefined;
1019
1427
  } | null;
1020
1428
  zenModeEnabled: boolean;
1021
- theme: string;
1429
+ theme: import("../element/types").Theme;
1022
1430
  gridSize: number | null;
1023
1431
  viewModeEnabled: boolean;
1024
1432
  editingGroupId: string | null;
@@ -1038,7 +1446,7 @@ export declare const actionToggleHandTool: {
1038
1446
  data: import("../charts").Spreadsheet;
1039
1447
  };
1040
1448
  pendingImageElementId: string | null;
1041
- showHyperlinkPopup: false | "info" | "editor";
1449
+ showHyperlinkPopup: false | "editor" | "info";
1042
1450
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
1043
1451
  };
1044
1452
  commitToHistory: true;