@excalidraw/excalidraw 0.15.2-b7350f9 → 0.15.2-fc9a9a2

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 (99) hide show
  1. package/CHANGELOG.md +22 -1
  2. package/dist/excalidraw-assets/locales/{es-ES-json-f2467c6a875a9e288756.js → es-ES-json-4f3da97feff33cb00e6d.js} +1 -1
  3. package/dist/excalidraw-assets/locales/{hi-IN-json-e22f4ad73126c2971850.js → hi-IN-json-3898c9c1216b44476529.js} +1 -1
  4. package/dist/excalidraw-assets/locales/{id-ID-json-0e69caf5d919807ed234.js → id-ID-json-43d505d7071a0e359681.js} +1 -1
  5. package/dist/excalidraw-assets/locales/{kk-KZ-json-106d2a41c68f69765668.js → kk-KZ-json-f648362328b839e9313f.js} +1 -1
  6. package/dist/excalidraw-assets/locales/{pa-IN-json-0fd029451b07248c5194.js → pa-IN-json-d9ee09801ed220840b2b.js} +1 -1
  7. package/dist/excalidraw-assets/{vendor-53d1c69ef585b6dd219b.js → vendor-ef3c5d81a00ef582b871.js} +2 -2
  8. package/dist/excalidraw-assets-dev/{vendor-e6df8519da951026ff69.js → vendor-a14cd58fa2db417e42b2.js} +6 -6
  9. package/dist/excalidraw.development.js +2189 -2123
  10. package/dist/excalidraw.production.min.js +1 -1
  11. package/dist/excalidraw.production.min.js.LICENSE.txt +15 -0
  12. package/package.json +7 -2
  13. package/types/actions/actionAddToLibrary.d.ts +51 -25
  14. package/types/actions/actionAlign.d.ts +19 -20
  15. package/types/actions/actionBoundText.d.ts +38 -20
  16. package/types/actions/actionCanvas.d.ts +310 -88
  17. package/types/actions/actionClipboard.d.ts +81 -40
  18. package/types/actions/actionDeleteSelected.d.ts +45 -22
  19. package/types/actions/actionDistribute.d.ts +5 -6
  20. package/types/actions/actionDuplicateSelection.d.ts +0 -1
  21. package/types/actions/actionElementLock.d.ts +36 -19
  22. package/types/actions/actionExport.d.ts +161 -80
  23. package/types/actions/actionFinalize.d.ts +31 -17
  24. package/types/actions/actionFlip.d.ts +2 -3
  25. package/types/actions/actionFrame.d.ts +56 -30
  26. package/types/actions/actionGroup.d.ts +5 -6
  27. package/types/actions/actionLinearEditor.d.ts +19 -11
  28. package/types/actions/actionMenu.d.ts +51 -25
  29. package/types/actions/actionProperties.d.ts +221 -105
  30. package/types/actions/actionSelectAll.d.ts +0 -1
  31. package/types/actions/actionStyles.d.ts +17 -9
  32. package/types/actions/actionToggleGridMode.d.ts +17 -9
  33. package/types/actions/actionToggleStats.d.ts +17 -9
  34. package/types/actions/actionToggleViewMode.d.ts +17 -9
  35. package/types/actions/actionToggleZenMode.d.ts +17 -9
  36. package/types/actions/types.d.ts +4 -3
  37. package/types/appState.d.ts +7 -7
  38. package/types/colors.d.ts +9 -9
  39. package/types/components/App.d.ts +27 -1
  40. package/types/components/Button.d.ts +0 -1
  41. package/types/components/Card.d.ts +0 -1
  42. package/types/components/ColorPicker/keyboardNavHandlers.d.ts +0 -1
  43. package/types/components/DefaultSidebar.d.ts +0 -1
  44. package/types/components/EyeDropper.d.ts +0 -1
  45. package/types/components/HintViewer.d.ts +3 -4
  46. package/types/components/LayerUI.d.ts +2 -1
  47. package/types/components/LibraryMenuHeaderContent.d.ts +0 -1
  48. package/types/components/LibraryUnit.d.ts +0 -1
  49. package/types/components/LoadingMessage.d.ts +0 -1
  50. package/types/components/MobileMenu.d.ts +3 -2
  51. package/types/components/Section.d.ts +1 -1
  52. package/types/components/Sidebar/SidebarTab.d.ts +0 -1
  53. package/types/components/Sidebar/SidebarTabTrigger.d.ts +0 -1
  54. package/types/components/Sidebar/SidebarTabTriggers.d.ts +0 -1
  55. package/types/components/Sidebar/SidebarTabs.d.ts +0 -1
  56. package/types/components/Stack.d.ts +2 -2
  57. package/types/components/Trans.d.ts +2 -1
  58. package/types/components/dropdownMenu/DropdownMenuTrigger.d.ts +0 -1
  59. package/types/components/icons.d.ts +1 -0
  60. package/types/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -1
  61. package/types/components/welcome-screen/WelcomeScreen.Center.d.ts +0 -1
  62. package/types/components/welcome-screen/WelcomeScreen.d.ts +0 -1
  63. package/types/constants.d.ts +13 -3
  64. package/types/data/url.d.ts +7 -0
  65. package/types/element/Hyperlink.d.ts +26 -14
  66. package/types/element/collision.d.ts +2 -2
  67. package/types/element/embeddable.d.ts +153 -0
  68. package/types/element/linearElementEditor.d.ts +18 -10
  69. package/types/element/newElement.d.ts +5 -2
  70. package/types/element/transformHandles.d.ts +1 -1
  71. package/types/element/typeChecks.d.ts +2 -1
  72. package/types/element/types.d.ts +13 -2
  73. package/types/frame.d.ts +2 -2
  74. package/types/groups.d.ts +3 -3
  75. package/types/history.d.ts +3 -3
  76. package/types/hooks/useOutsideClick.d.ts +0 -1
  77. package/types/hooks/useScrollPosition.d.ts +0 -1
  78. package/types/i18n.d.ts +5 -2
  79. package/types/keys.d.ts +2 -0
  80. package/types/packages/excalidraw/index.d.ts +1 -0
  81. package/types/packages/excalidraw/webpack.dev.config.d.ts +5 -2
  82. package/types/packages/excalidraw/webpack.prod.config.d.ts +3 -0
  83. package/types/packages/utils.d.ts +2 -1
  84. package/types/renderer/renderElement.d.ts +1 -1
  85. package/types/renderer/renderScene.d.ts +2 -1
  86. package/types/scene/Scene.d.ts +13 -0
  87. package/types/scene/export.d.ts +1 -0
  88. package/types/scene/selection.d.ts +11 -1
  89. package/types/types.d.ts +20 -9
  90. package/types/utility-types.d.ts +3 -1
  91. package/types/utils.d.ts +42 -15
  92. /package/dist/excalidraw-assets/{vendor-53d1c69ef585b6dd219b.js.LICENSE.txt → vendor-ef3c5d81a00ef582b871.js.LICENSE.txt} +0 -0
  93. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{es-ES-json-f2467c6a875a9e288756.d.ts → es-ES-json-4f3da97feff33cb00e6d.d.ts} +0 -0
  94. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{hi-IN-json-e22f4ad73126c2971850.d.ts → hi-IN-json-3898c9c1216b44476529.d.ts} +0 -0
  95. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{id-ID-json-0e69caf5d919807ed234.d.ts → id-ID-json-43d505d7071a0e359681.d.ts} +0 -0
  96. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{kk-KZ-json-106d2a41c68f69765668.d.ts → kk-KZ-json-f648362328b839e9313f.d.ts} +0 -0
  97. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{pa-IN-json-0fd029451b07248c5194.d.ts → pa-IN-json-d9ee09801ed220840b2b.d.ts} +0 -0
  98. /package/types/packages/excalidraw/dist/excalidraw-assets/{vendor-53d1c69ef585b6dd219b.d.ts → vendor-ef3c5d81a00ef582b871.d.ts} +0 -0
  99. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/{vendor-e6df8519da951026ff69.d.ts → vendor-a14cd58fa2db417e42b2.d.ts} +0 -0
@@ -1,3 +1,9 @@
1
+ /*
2
+ object-assign
3
+ (c) Sindre Sorhus
4
+ @license MIT
5
+ */
6
+
1
7
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
2
8
 
3
9
  /**
@@ -29,3 +35,12 @@
29
35
  * This source code is licensed under the MIT license found in the
30
36
  * LICENSE file in the root directory of this source tree.
31
37
  */
38
+
39
+ /** @license React v17.0.2
40
+ * react-jsx-runtime.production.min.js
41
+ *
42
+ * Copyright (c) Facebook, Inc. and its affiliates.
43
+ *
44
+ * This source code is licensed under the MIT license found in the
45
+ * LICENSE file in the root directory of this source tree.
46
+ */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@excalidraw/excalidraw",
3
- "version": "0.15.2-b7350f9",
3
+ "version": "0.15.2-fc9a9a2",
4
4
  "main": "main.js",
5
5
  "types": "types/packages/excalidraw/index.d.ts",
6
6
  "files": [
@@ -52,15 +52,19 @@
52
52
  "@babel/preset-env": "7.18.6",
53
53
  "@babel/preset-react": "7.18.6",
54
54
  "@babel/preset-typescript": "7.18.6",
55
+ "@size-limit/preset-big-lib": "8.2.6",
55
56
  "autoprefixer": "10.4.7",
56
57
  "babel-loader": "8.2.5",
57
58
  "babel-plugin-transform-class-properties": "6.24.1",
58
59
  "cross-env": "7.0.3",
59
60
  "css-loader": "6.7.1",
60
61
  "dotenv": "16.0.1",
62
+ "import-meta-loader": "1.1.0",
61
63
  "mini-css-extract-plugin": "2.6.1",
62
64
  "postcss-loader": "7.0.1",
63
65
  "sass-loader": "13.0.2",
66
+ "size-limit": "8.2.4",
67
+ "style-loader": "3.3.3",
64
68
  "terser-webpack-plugin": "5.3.3",
65
69
  "ts-loader": "9.3.1",
66
70
  "typescript": "4.9.4",
@@ -79,6 +83,7 @@
79
83
  "pack": "yarn build:umd && yarn pack",
80
84
  "start": "webpack serve --config webpack.dev-server.config.js",
81
85
  "install:deps": "yarn install --frozen-lockfile && yarn --cwd ../../../",
82
- "build:example": "EXAMPLE=true webpack --config webpack.dev-server.config.js && yarn gen:types"
86
+ "build:example": "EXAMPLE=true webpack --config webpack.dev-server.config.js && yarn gen:types",
87
+ "size": "yarn build:umd && size-limit"
83
88
  }
84
89
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const actionAddToLibrary: {
3
2
  name: "addToLibrary";
4
3
  trackEvent: {
@@ -18,6 +17,10 @@ export declare const actionAddToLibrary: {
18
17
  showWelcomeScreen: boolean;
19
18
  isLoading: boolean;
20
19
  errorMessage: import("react").ReactNode;
20
+ activeEmbeddable: {
21
+ element: import("../element/types").NonDeletedExcalidrawElement;
22
+ state: "active" | "hover";
23
+ } | null;
21
24
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
22
25
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
23
26
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -26,7 +29,12 @@ export declare const actionAddToLibrary: {
26
29
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
27
30
  suggestedBindings: import("../element/binding").SuggestedBinding[];
28
31
  frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
29
- shouldRenderFrames: boolean;
32
+ frameRendering: {
33
+ enabled: boolean;
34
+ name: boolean;
35
+ outline: boolean;
36
+ clip: boolean;
37
+ };
30
38
  editingFrame: string | null;
31
39
  elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
32
40
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
@@ -35,7 +43,7 @@ export declare const actionAddToLibrary: {
35
43
  lastActiveTool: import("../types").LastActiveTool;
36
44
  locked: boolean;
37
45
  } & ({
38
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
46
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
39
47
  customType: null;
40
48
  } | {
41
49
  type: "custom";
@@ -80,16 +88,16 @@ export declare const actionAddToLibrary: {
80
88
  openDialog: "imageExport" | "help" | "jsonExport" | null;
81
89
  defaultSidebarDockedPreference: boolean;
82
90
  lastPointerDownWith: import("../element/types").PointerType;
83
- selectedElementIds: {
84
- [id: string]: boolean;
85
- };
91
+ selectedElementIds: Readonly<{
92
+ [id: string]: true;
93
+ }>;
86
94
  previousSelectedElementIds: {
87
- [id: string]: boolean;
95
+ [id: string]: true;
88
96
  };
89
97
  selectedElementsAreBeingDragged: boolean;
90
98
  shouldCacheIgnoreZoom: boolean;
91
99
  zenModeEnabled: boolean;
92
- theme: string;
100
+ theme: import("../element/types").Theme;
93
101
  gridSize: number | null;
94
102
  viewModeEnabled: boolean;
95
103
  selectedGroupIds: {
@@ -112,7 +120,7 @@ export declare const actionAddToLibrary: {
112
120
  data: import("../charts").Spreadsheet;
113
121
  };
114
122
  pendingImageElementId: string | null;
115
- showHyperlinkPopup: false | "info" | "editor";
123
+ showHyperlinkPopup: false | "editor" | "info";
116
124
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
117
125
  };
118
126
  } | {
@@ -126,6 +134,10 @@ export declare const actionAddToLibrary: {
126
134
  } | null;
127
135
  showWelcomeScreen: boolean;
128
136
  isLoading: boolean;
137
+ activeEmbeddable: {
138
+ element: import("../element/types").NonDeletedExcalidrawElement;
139
+ state: "active" | "hover";
140
+ } | null;
129
141
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
130
142
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
131
143
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -134,7 +146,12 @@ export declare const actionAddToLibrary: {
134
146
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
135
147
  suggestedBindings: import("../element/binding").SuggestedBinding[];
136
148
  frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
137
- shouldRenderFrames: boolean;
149
+ frameRendering: {
150
+ enabled: boolean;
151
+ name: boolean;
152
+ outline: boolean;
153
+ clip: boolean;
154
+ };
138
155
  editingFrame: string | null;
139
156
  elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
140
157
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
@@ -143,7 +160,7 @@ export declare const actionAddToLibrary: {
143
160
  lastActiveTool: import("../types").LastActiveTool;
144
161
  locked: boolean;
145
162
  } & ({
146
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
163
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
147
164
  customType: null;
148
165
  } | {
149
166
  type: "custom";
@@ -188,11 +205,11 @@ export declare const actionAddToLibrary: {
188
205
  openDialog: "imageExport" | "help" | "jsonExport" | null;
189
206
  defaultSidebarDockedPreference: boolean;
190
207
  lastPointerDownWith: import("../element/types").PointerType;
191
- selectedElementIds: {
192
- [id: string]: boolean;
193
- };
208
+ selectedElementIds: Readonly<{
209
+ [id: string]: true;
210
+ }>;
194
211
  previousSelectedElementIds: {
195
- [id: string]: boolean;
212
+ [id: string]: true;
196
213
  };
197
214
  selectedElementsAreBeingDragged: boolean;
198
215
  shouldCacheIgnoreZoom: boolean;
@@ -202,7 +219,7 @@ export declare const actionAddToLibrary: {
202
219
  duration?: number | undefined;
203
220
  } | null;
204
221
  zenModeEnabled: boolean;
205
- theme: string;
222
+ theme: import("../element/types").Theme;
206
223
  gridSize: number | null;
207
224
  viewModeEnabled: boolean;
208
225
  selectedGroupIds: {
@@ -225,7 +242,7 @@ export declare const actionAddToLibrary: {
225
242
  data: import("../charts").Spreadsheet;
226
243
  };
227
244
  pendingImageElementId: string | null;
228
- showHyperlinkPopup: false | "info" | "editor";
245
+ showHyperlinkPopup: false | "editor" | "info";
229
246
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
230
247
  };
231
248
  }> | {
@@ -239,6 +256,10 @@ export declare const actionAddToLibrary: {
239
256
  } | null;
240
257
  showWelcomeScreen: boolean;
241
258
  isLoading: boolean;
259
+ activeEmbeddable: {
260
+ element: import("../element/types").NonDeletedExcalidrawElement;
261
+ state: "active" | "hover";
262
+ } | null;
242
263
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
243
264
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
244
265
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -247,7 +268,12 @@ export declare const actionAddToLibrary: {
247
268
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
248
269
  suggestedBindings: import("../element/binding").SuggestedBinding[];
249
270
  frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
250
- shouldRenderFrames: boolean;
271
+ frameRendering: {
272
+ enabled: boolean;
273
+ name: boolean;
274
+ outline: boolean;
275
+ clip: boolean;
276
+ };
251
277
  editingFrame: string | null;
252
278
  elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
253
279
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
@@ -256,7 +282,7 @@ export declare const actionAddToLibrary: {
256
282
  lastActiveTool: import("../types").LastActiveTool;
257
283
  locked: boolean;
258
284
  } & ({
259
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
285
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
260
286
  customType: null;
261
287
  } | {
262
288
  type: "custom";
@@ -301,11 +327,11 @@ export declare const actionAddToLibrary: {
301
327
  openDialog: "imageExport" | "help" | "jsonExport" | null;
302
328
  defaultSidebarDockedPreference: boolean;
303
329
  lastPointerDownWith: import("../element/types").PointerType;
304
- selectedElementIds: {
305
- [id: string]: boolean;
306
- };
330
+ selectedElementIds: Readonly<{
331
+ [id: string]: true;
332
+ }>;
307
333
  previousSelectedElementIds: {
308
- [id: string]: boolean;
334
+ [id: string]: true;
309
335
  };
310
336
  selectedElementsAreBeingDragged: boolean;
311
337
  shouldCacheIgnoreZoom: boolean;
@@ -315,7 +341,7 @@ export declare const actionAddToLibrary: {
315
341
  duration?: number | undefined;
316
342
  } | null;
317
343
  zenModeEnabled: boolean;
318
- theme: string;
344
+ theme: import("../element/types").Theme;
319
345
  gridSize: number | null;
320
346
  viewModeEnabled: boolean;
321
347
  selectedGroupIds: {
@@ -338,7 +364,7 @@ export declare const actionAddToLibrary: {
338
364
  data: import("../charts").Spreadsheet;
339
365
  };
340
366
  pendingImageElementId: string | null;
341
- showHyperlinkPopup: false | "info" | "editor";
367
+ showHyperlinkPopup: false | "editor" | "info";
342
368
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
343
369
  };
344
370
  };
@@ -1,19 +1,18 @@
1
- /// <reference types="react" />
2
1
  import { ExcalidrawElement } from "../element/types";
3
- import { AppState } from "../types";
2
+ import { AppClassProperties, AppState } from "../types";
4
3
  export declare const actionAlignTop: {
5
4
  name: "alignTop";
6
5
  trackEvent: {
7
6
  category: "element";
8
7
  };
9
- predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
10
- perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
8
+ predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: unknown, app: AppClassProperties) => boolean;
9
+ perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
11
10
  appState: Readonly<AppState>;
12
11
  elements: import("../scene/Scene").ExcalidrawElementsIncludingDeleted;
13
12
  commitToHistory: true;
14
13
  };
15
14
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
16
- PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
15
+ PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
17
16
  } & {
18
17
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
19
18
  };
@@ -22,14 +21,14 @@ export declare const actionAlignBottom: {
22
21
  trackEvent: {
23
22
  category: "element";
24
23
  };
25
- predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
26
- perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
24
+ predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: unknown, app: AppClassProperties) => boolean;
25
+ perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
27
26
  appState: Readonly<AppState>;
28
27
  elements: import("../scene/Scene").ExcalidrawElementsIncludingDeleted;
29
28
  commitToHistory: true;
30
29
  };
31
30
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
32
- PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
31
+ PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
33
32
  } & {
34
33
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
35
34
  };
@@ -38,14 +37,14 @@ export declare const actionAlignLeft: {
38
37
  trackEvent: {
39
38
  category: "element";
40
39
  };
41
- predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
42
- perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
40
+ predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: unknown, app: AppClassProperties) => boolean;
41
+ perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
43
42
  appState: Readonly<AppState>;
44
43
  elements: import("../scene/Scene").ExcalidrawElementsIncludingDeleted;
45
44
  commitToHistory: true;
46
45
  };
47
46
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
48
- PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
47
+ PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
49
48
  } & {
50
49
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
51
50
  };
@@ -54,14 +53,14 @@ export declare const actionAlignRight: {
54
53
  trackEvent: {
55
54
  category: "element";
56
55
  };
57
- predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
58
- perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
56
+ predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: unknown, app: AppClassProperties) => boolean;
57
+ perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
59
58
  appState: Readonly<AppState>;
60
59
  elements: import("../scene/Scene").ExcalidrawElementsIncludingDeleted;
61
60
  commitToHistory: true;
62
61
  };
63
62
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
64
- PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
63
+ PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
65
64
  } & {
66
65
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
67
66
  };
@@ -70,13 +69,13 @@ export declare const actionAlignVerticallyCentered: {
70
69
  trackEvent: {
71
70
  category: "element";
72
71
  };
73
- predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
74
- perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
72
+ predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: unknown, app: AppClassProperties) => boolean;
73
+ perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
75
74
  appState: Readonly<AppState>;
76
75
  elements: import("../scene/Scene").ExcalidrawElementsIncludingDeleted;
77
76
  commitToHistory: true;
78
77
  };
79
- PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
78
+ PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
80
79
  } & {
81
80
  keyTest?: undefined;
82
81
  };
@@ -85,13 +84,13 @@ export declare const actionAlignHorizontallyCentered: {
85
84
  trackEvent: {
86
85
  category: "element";
87
86
  };
88
- predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
89
- perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
87
+ predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: unknown, app: AppClassProperties) => boolean;
88
+ perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
90
89
  appState: Readonly<AppState>;
91
90
  elements: import("../scene/Scene").ExcalidrawElementsIncludingDeleted;
92
91
  commitToHistory: true;
93
92
  };
94
- PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
93
+ PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
95
94
  } & {
96
95
  keyTest?: undefined;
97
96
  };
@@ -1,14 +1,14 @@
1
- /// <reference types="react" />
2
1
  import { ExcalidrawElement, ExcalidrawLinearElement } from "../element/types";
3
2
  import { AppState } from "../types";
3
+ import { Mutable } from "../utility-types";
4
4
  export declare const actionUnbindText: {
5
5
  name: "unbindText";
6
6
  contextItemLabel: string;
7
7
  trackEvent: {
8
8
  category: "element";
9
9
  };
10
- predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
11
- perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
10
+ predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
11
+ perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
12
12
  elements: readonly ExcalidrawElement[];
13
13
  appState: Readonly<AppState>;
14
14
  commitToHistory: true;
@@ -22,8 +22,8 @@ export declare const actionBindText: {
22
22
  trackEvent: {
23
23
  category: "element";
24
24
  };
25
- predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
26
- perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
25
+ predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
26
+ perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
27
27
  elements: ExcalidrawElement[];
28
28
  appState: {
29
29
  selectedElementIds: {
@@ -37,6 +37,10 @@ export declare const actionBindText: {
37
37
  showWelcomeScreen: boolean;
38
38
  isLoading: boolean;
39
39
  errorMessage: import("react").ReactNode;
40
+ activeEmbeddable: {
41
+ element: import("../element/types").NonDeletedExcalidrawElement;
42
+ state: "active" | "hover";
43
+ } | null;
40
44
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
41
45
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
42
46
  multiElement: import("../element/types").NonDeleted<ExcalidrawLinearElement> | null;
@@ -45,7 +49,12 @@ export declare const actionBindText: {
45
49
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
46
50
  suggestedBindings: import("../element/binding").SuggestedBinding[];
47
51
  frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
48
- shouldRenderFrames: boolean;
52
+ frameRendering: {
53
+ enabled: boolean;
54
+ name: boolean;
55
+ outline: boolean;
56
+ clip: boolean;
57
+ };
49
58
  editingFrame: string | null;
50
59
  elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
51
60
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
@@ -54,7 +63,7 @@ export declare const actionBindText: {
54
63
  lastActiveTool: import("../types").LastActiveTool;
55
64
  locked: boolean;
56
65
  } & ({
57
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
66
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
58
67
  customType: null;
59
68
  } | {
60
69
  type: "custom";
@@ -100,7 +109,7 @@ export declare const actionBindText: {
100
109
  defaultSidebarDockedPreference: boolean;
101
110
  lastPointerDownWith: import("../element/types").PointerType;
102
111
  previousSelectedElementIds: {
103
- [id: string]: boolean;
112
+ [id: string]: true;
104
113
  };
105
114
  selectedElementsAreBeingDragged: boolean;
106
115
  shouldCacheIgnoreZoom: boolean;
@@ -110,7 +119,7 @@ export declare const actionBindText: {
110
119
  duration?: number | undefined;
111
120
  } | null;
112
121
  zenModeEnabled: boolean;
113
- theme: string;
122
+ theme: import("../element/types").Theme;
114
123
  gridSize: number | null;
115
124
  viewModeEnabled: boolean;
116
125
  selectedGroupIds: {
@@ -133,7 +142,7 @@ export declare const actionBindText: {
133
142
  data: import("../charts").Spreadsheet;
134
143
  };
135
144
  pendingImageElementId: string | null;
136
- showHyperlinkPopup: false | "info" | "editor";
145
+ showHyperlinkPopup: false | "editor" | "info";
137
146
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
138
147
  };
139
148
  commitToHistory: true;
@@ -147,13 +156,13 @@ export declare const actionWrapTextInContainer: {
147
156
  trackEvent: {
148
157
  category: "element";
149
158
  };
150
- predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
151
- perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
159
+ predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
160
+ perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
152
161
  elements: readonly ExcalidrawElement[];
153
162
  appState: {
154
- selectedElementIds: {
155
- [id: string]: boolean;
156
- };
163
+ selectedElementIds: Mutable<Readonly<{
164
+ [id: string]: true;
165
+ }>>;
157
166
  contextMenu: {
158
167
  items: import("../components/ContextMenu").ContextMenuItems;
159
168
  top: number;
@@ -162,6 +171,10 @@ export declare const actionWrapTextInContainer: {
162
171
  showWelcomeScreen: boolean;
163
172
  isLoading: boolean;
164
173
  errorMessage: import("react").ReactNode;
174
+ activeEmbeddable: {
175
+ element: import("../element/types").NonDeletedExcalidrawElement;
176
+ state: "active" | "hover";
177
+ } | null;
165
178
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
166
179
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
167
180
  multiElement: import("../element/types").NonDeleted<ExcalidrawLinearElement> | null;
@@ -170,7 +183,12 @@ export declare const actionWrapTextInContainer: {
170
183
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
171
184
  suggestedBindings: import("../element/binding").SuggestedBinding[];
172
185
  frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
173
- shouldRenderFrames: boolean;
186
+ frameRendering: {
187
+ enabled: boolean;
188
+ name: boolean;
189
+ outline: boolean;
190
+ clip: boolean;
191
+ };
174
192
  editingFrame: string | null;
175
193
  elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
176
194
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
@@ -179,7 +197,7 @@ export declare const actionWrapTextInContainer: {
179
197
  lastActiveTool: import("../types").LastActiveTool;
180
198
  locked: boolean;
181
199
  } & ({
182
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
200
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
183
201
  customType: null;
184
202
  } | {
185
203
  type: "custom";
@@ -225,7 +243,7 @@ export declare const actionWrapTextInContainer: {
225
243
  defaultSidebarDockedPreference: boolean;
226
244
  lastPointerDownWith: import("../element/types").PointerType;
227
245
  previousSelectedElementIds: {
228
- [id: string]: boolean;
246
+ [id: string]: true;
229
247
  };
230
248
  selectedElementsAreBeingDragged: boolean;
231
249
  shouldCacheIgnoreZoom: boolean;
@@ -235,7 +253,7 @@ export declare const actionWrapTextInContainer: {
235
253
  duration?: number | undefined;
236
254
  } | null;
237
255
  zenModeEnabled: boolean;
238
- theme: string;
256
+ theme: import("../element/types").Theme;
239
257
  gridSize: number | null;
240
258
  viewModeEnabled: boolean;
241
259
  selectedGroupIds: {
@@ -258,7 +276,7 @@ export declare const actionWrapTextInContainer: {
258
276
  data: import("../charts").Spreadsheet;
259
277
  };
260
278
  pendingImageElementId: string | null;
261
- showHyperlinkPopup: false | "info" | "editor";
279
+ showHyperlinkPopup: false | "editor" | "info";
262
280
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
263
281
  };
264
282
  commitToHistory: true;