@zsviczian/excalidraw 0.15.2-obsidian-6 → 0.15.2-obsidian-8

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 (36) hide show
  1. package/dist/excalidraw.development.js +37 -37
  2. package/dist/excalidraw.production.min.js +1 -1
  3. package/package.json +1 -1
  4. package/types/actions/actionAddToLibrary.d.ts +36 -21
  5. package/types/actions/actionBoundText.d.ts +22 -11
  6. package/types/actions/actionCanvas.d.ts +138 -78
  7. package/types/actions/actionClipboard.d.ts +57 -32
  8. package/types/actions/actionDeleteSelected.d.ts +33 -18
  9. package/types/actions/actionElementLock.d.ts +21 -11
  10. package/types/actions/actionExport.d.ts +108 -63
  11. package/types/actions/actionFinalize.d.ts +24 -14
  12. package/types/actions/actionFrame.d.ts +35 -20
  13. package/types/actions/actionLinearEditor.d.ts +12 -7
  14. package/types/actions/actionMenu.d.ts +36 -21
  15. package/types/actions/actionProperties.d.ts +156 -91
  16. package/types/actions/actionStyles.d.ts +12 -7
  17. package/types/actions/actionToggleGridMode.d.ts +12 -7
  18. package/types/actions/actionToggleStats.d.ts +12 -7
  19. package/types/actions/actionToggleViewMode.d.ts +12 -7
  20. package/types/actions/actionToggleZenMode.d.ts +12 -7
  21. package/types/actions/types.d.ts +1 -1
  22. package/types/appState.d.ts +5 -5
  23. package/types/components/App.d.ts +13 -8
  24. package/types/element/Hyperlink.d.ts +12 -7
  25. package/types/element/collision.d.ts +2 -2
  26. package/types/element/embeddable.d.ts +171 -0
  27. package/types/element/iframe.d.ts +4 -4
  28. package/types/element/linearElementEditor.d.ts +12 -7
  29. package/types/element/newElement.d.ts +4 -4
  30. package/types/element/typeChecks.d.ts +4 -4
  31. package/types/element/types.d.ts +6 -6
  32. package/types/groups.d.ts +1 -1
  33. package/types/history.d.ts +3 -3
  34. package/types/scene/selection.d.ts +11 -1
  35. package/types/types.d.ts +19 -14
  36. package/types/utils.d.ts +1 -1
@@ -35,7 +35,7 @@ export declare const actionRemoveAllElementsFromFrame: {
35
35
  showWelcomeScreen: boolean;
36
36
  isLoading: boolean;
37
37
  errorMessage: import("react").ReactNode;
38
- activeIFrame: {
38
+ activeEmbeddable: {
39
39
  element: import("../element/types").NonDeletedExcalidrawElement;
40
40
  state: "active" | "hover";
41
41
  } | null;
@@ -47,7 +47,12 @@ export declare const actionRemoveAllElementsFromFrame: {
47
47
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
48
48
  suggestedBindings: import("../element/binding").SuggestedBinding[];
49
49
  frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
50
- shouldRenderFrames: boolean;
50
+ frameRendering: {
51
+ enabled: boolean;
52
+ name: boolean;
53
+ outline: boolean;
54
+ clip: boolean;
55
+ };
51
56
  editingFrame: string | null;
52
57
  elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
53
58
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
@@ -56,7 +61,7 @@ export declare const actionRemoveAllElementsFromFrame: {
56
61
  lastActiveTool: import("../types").LastActiveTool;
57
62
  locked: boolean;
58
63
  } & ({
59
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "iframe" | "image" | "frame" | "freedraw" | "eraser" | "hand";
64
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
60
65
  customType: null;
61
66
  } | {
62
67
  type: "custom";
@@ -102,7 +107,7 @@ export declare const actionRemoveAllElementsFromFrame: {
102
107
  defaultSidebarDockedPreference: boolean;
103
108
  lastPointerDownWith: import("../element/types").PointerType;
104
109
  previousSelectedElementIds: {
105
- [id: string]: boolean;
110
+ [id: string]: true;
106
111
  };
107
112
  selectedElementsAreBeingDragged: boolean;
108
113
  shouldCacheIgnoreZoom: boolean;
@@ -171,8 +176,8 @@ export declare const actionRemoveAllElementsFromFrame: {
171
176
  } & {
172
177
  keyTest?: undefined;
173
178
  };
174
- export declare const actionToggleFrameRendering: {
175
- name: "toggleFrameRendering";
179
+ export declare const actionupdateFrameRendering: {
180
+ name: "updateFrameRendering";
176
181
  viewMode: true;
177
182
  trackEvent: {
178
183
  category: "canvas";
@@ -180,7 +185,12 @@ export declare const actionToggleFrameRendering: {
180
185
  perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
181
186
  elements: readonly ExcalidrawElement[];
182
187
  appState: {
183
- shouldRenderFrames: boolean;
188
+ frameRendering: {
189
+ enabled: boolean;
190
+ name: boolean;
191
+ outline: boolean;
192
+ clip: boolean;
193
+ };
184
194
  contextMenu: {
185
195
  items: import("../components/ContextMenu").ContextMenuItems;
186
196
  top: number;
@@ -189,7 +199,7 @@ export declare const actionToggleFrameRendering: {
189
199
  showWelcomeScreen: boolean;
190
200
  isLoading: boolean;
191
201
  errorMessage: import("react").ReactNode;
192
- activeIFrame: {
202
+ activeEmbeddable: {
193
203
  element: import("../element/types").NonDeletedExcalidrawElement;
194
204
  state: "active" | "hover";
195
205
  } | null;
@@ -209,7 +219,7 @@ export declare const actionToggleFrameRendering: {
209
219
  lastActiveTool: import("../types").LastActiveTool;
210
220
  locked: boolean;
211
221
  } & ({
212
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "iframe" | "image" | "frame" | "freedraw" | "eraser" | "hand";
222
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
213
223
  customType: null;
214
224
  } | {
215
225
  type: "custom";
@@ -254,11 +264,11 @@ export declare const actionToggleFrameRendering: {
254
264
  openDialog: "imageExport" | "help" | "jsonExport" | null;
255
265
  defaultSidebarDockedPreference: boolean;
256
266
  lastPointerDownWith: import("../element/types").PointerType;
257
- selectedElementIds: {
258
- [id: string]: boolean;
259
- };
267
+ selectedElementIds: Readonly<{
268
+ [id: string]: true;
269
+ }>;
260
270
  previousSelectedElementIds: {
261
- [id: string]: boolean;
271
+ [id: string]: true;
262
272
  };
263
273
  selectedElementsAreBeingDragged: boolean;
264
274
  shouldCacheIgnoreZoom: boolean;
@@ -335,7 +345,7 @@ export declare const actionSetFrameAsActiveTool: {
335
345
  lastActiveTool: import("../types").LastActiveTool;
336
346
  locked: boolean;
337
347
  } & ({
338
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "iframe" | "image" | "frame" | "freedraw" | "eraser" | "hand";
348
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
339
349
  customType: null;
340
350
  } | {
341
351
  type: "custom";
@@ -349,7 +359,7 @@ export declare const actionSetFrameAsActiveTool: {
349
359
  showWelcomeScreen: boolean;
350
360
  isLoading: boolean;
351
361
  errorMessage: import("react").ReactNode;
352
- activeIFrame: {
362
+ activeEmbeddable: {
353
363
  element: import("../element/types").NonDeletedExcalidrawElement;
354
364
  state: "active" | "hover";
355
365
  } | null;
@@ -361,7 +371,12 @@ export declare const actionSetFrameAsActiveTool: {
361
371
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
362
372
  suggestedBindings: import("../element/binding").SuggestedBinding[];
363
373
  frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
364
- shouldRenderFrames: boolean;
374
+ frameRendering: {
375
+ enabled: boolean;
376
+ name: boolean;
377
+ outline: boolean;
378
+ clip: boolean;
379
+ };
365
380
  editingFrame: string | null;
366
381
  elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
367
382
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
@@ -405,11 +420,11 @@ export declare const actionSetFrameAsActiveTool: {
405
420
  openDialog: "imageExport" | "help" | "jsonExport" | null;
406
421
  defaultSidebarDockedPreference: boolean;
407
422
  lastPointerDownWith: import("../element/types").PointerType;
408
- selectedElementIds: {
409
- [id: string]: boolean;
410
- };
423
+ selectedElementIds: Readonly<{
424
+ [id: string]: true;
425
+ }>;
411
426
  previousSelectedElementIds: {
412
- [id: string]: boolean;
427
+ [id: string]: true;
413
428
  };
414
429
  selectedElementsAreBeingDragged: boolean;
415
430
  shouldCacheIgnoreZoom: boolean;
@@ -18,7 +18,7 @@ export declare const actionToggleLinearEditor: {
18
18
  showWelcomeScreen: boolean;
19
19
  isLoading: boolean;
20
20
  errorMessage: import("react").ReactNode;
21
- activeIFrame: {
21
+ activeEmbeddable: {
22
22
  element: import("../element/types").NonDeletedExcalidrawElement;
23
23
  state: "active" | "hover";
24
24
  } | null;
@@ -30,7 +30,12 @@ export declare const actionToggleLinearEditor: {
30
30
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
31
31
  suggestedBindings: import("../element/binding").SuggestedBinding[];
32
32
  frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
33
- shouldRenderFrames: boolean;
33
+ frameRendering: {
34
+ enabled: boolean;
35
+ name: boolean;
36
+ outline: boolean;
37
+ clip: boolean;
38
+ };
34
39
  editingFrame: string | null;
35
40
  elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
36
41
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
@@ -38,7 +43,7 @@ export declare const actionToggleLinearEditor: {
38
43
  lastActiveTool: import("../types").LastActiveTool;
39
44
  locked: boolean;
40
45
  } & ({
41
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "iframe" | "image" | "frame" | "freedraw" | "eraser" | "hand";
46
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
42
47
  customType: null;
43
48
  } | {
44
49
  type: "custom";
@@ -83,11 +88,11 @@ export declare const actionToggleLinearEditor: {
83
88
  openDialog: "imageExport" | "help" | "jsonExport" | null;
84
89
  defaultSidebarDockedPreference: boolean;
85
90
  lastPointerDownWith: import("../element/types").PointerType;
86
- selectedElementIds: {
87
- [id: string]: boolean;
88
- };
91
+ selectedElementIds: Readonly<{
92
+ [id: string]: true;
93
+ }>;
89
94
  previousSelectedElementIds: {
90
- [id: string]: boolean;
95
+ [id: string]: true;
91
96
  };
92
97
  selectedElementsAreBeingDragged: boolean;
93
98
  shouldCacheIgnoreZoom: boolean;
@@ -15,7 +15,7 @@ export declare const actionToggleCanvasMenu: {
15
15
  showWelcomeScreen: boolean;
16
16
  isLoading: boolean;
17
17
  errorMessage: import("react").ReactNode;
18
- activeIFrame: {
18
+ activeEmbeddable: {
19
19
  element: import("../element/types").NonDeletedExcalidrawElement;
20
20
  state: "active" | "hover";
21
21
  } | null;
@@ -27,7 +27,12 @@ export declare const actionToggleCanvasMenu: {
27
27
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
28
28
  suggestedBindings: import("../element/binding").SuggestedBinding[];
29
29
  frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
30
- shouldRenderFrames: boolean;
30
+ frameRendering: {
31
+ enabled: boolean;
32
+ name: boolean;
33
+ outline: boolean;
34
+ clip: boolean;
35
+ };
31
36
  editingFrame: string | null;
32
37
  elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
33
38
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
@@ -36,7 +41,7 @@ export declare const actionToggleCanvasMenu: {
36
41
  lastActiveTool: import("../types").LastActiveTool;
37
42
  locked: boolean;
38
43
  } & ({
39
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "iframe" | "image" | "frame" | "freedraw" | "eraser" | "hand";
44
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
40
45
  customType: null;
41
46
  } | {
42
47
  type: "custom";
@@ -80,11 +85,11 @@ export declare const actionToggleCanvasMenu: {
80
85
  openDialog: "imageExport" | "help" | "jsonExport" | null;
81
86
  defaultSidebarDockedPreference: boolean;
82
87
  lastPointerDownWith: import("../element/types").PointerType;
83
- selectedElementIds: {
84
- [id: string]: boolean;
85
- };
88
+ selectedElementIds: Readonly<{
89
+ [id: string]: true;
90
+ }>;
86
91
  previousSelectedElementIds: {
87
- [id: string]: boolean;
92
+ [id: string]: true;
88
93
  };
89
94
  selectedElementsAreBeingDragged: boolean;
90
95
  shouldCacheIgnoreZoom: boolean;
@@ -164,7 +169,7 @@ export declare const actionToggleEditMenu: {
164
169
  showWelcomeScreen: boolean;
165
170
  isLoading: boolean;
166
171
  errorMessage: import("react").ReactNode;
167
- activeIFrame: {
172
+ activeEmbeddable: {
168
173
  element: import("../element/types").NonDeletedExcalidrawElement;
169
174
  state: "active" | "hover";
170
175
  } | null;
@@ -176,7 +181,12 @@ export declare const actionToggleEditMenu: {
176
181
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
177
182
  suggestedBindings: import("../element/binding").SuggestedBinding[];
178
183
  frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
179
- shouldRenderFrames: boolean;
184
+ frameRendering: {
185
+ enabled: boolean;
186
+ name: boolean;
187
+ outline: boolean;
188
+ clip: boolean;
189
+ };
180
190
  editingFrame: string | null;
181
191
  elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
182
192
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
@@ -185,7 +195,7 @@ export declare const actionToggleEditMenu: {
185
195
  lastActiveTool: import("../types").LastActiveTool;
186
196
  locked: boolean;
187
197
  } & ({
188
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "iframe" | "image" | "frame" | "freedraw" | "eraser" | "hand";
198
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
189
199
  customType: null;
190
200
  } | {
191
201
  type: "custom";
@@ -229,11 +239,11 @@ export declare const actionToggleEditMenu: {
229
239
  openDialog: "imageExport" | "help" | "jsonExport" | null;
230
240
  defaultSidebarDockedPreference: boolean;
231
241
  lastPointerDownWith: import("../element/types").PointerType;
232
- selectedElementIds: {
233
- [id: string]: boolean;
234
- };
242
+ selectedElementIds: Readonly<{
243
+ [id: string]: true;
244
+ }>;
235
245
  previousSelectedElementIds: {
236
- [id: string]: boolean;
246
+ [id: string]: true;
237
247
  };
238
248
  selectedElementsAreBeingDragged: boolean;
239
249
  shouldCacheIgnoreZoom: boolean;
@@ -329,7 +339,7 @@ export declare const actionShortcuts: {
329
339
  showWelcomeScreen: boolean;
330
340
  isLoading: boolean;
331
341
  errorMessage: import("react").ReactNode;
332
- activeIFrame: {
342
+ activeEmbeddable: {
333
343
  element: import("../element/types").NonDeletedExcalidrawElement;
334
344
  state: "active" | "hover";
335
345
  } | null;
@@ -341,7 +351,12 @@ export declare const actionShortcuts: {
341
351
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
342
352
  suggestedBindings: import("../element/binding").SuggestedBinding[];
343
353
  frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
344
- shouldRenderFrames: boolean;
354
+ frameRendering: {
355
+ enabled: boolean;
356
+ name: boolean;
357
+ outline: boolean;
358
+ clip: boolean;
359
+ };
345
360
  editingFrame: string | null;
346
361
  elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
347
362
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
@@ -350,7 +365,7 @@ export declare const actionShortcuts: {
350
365
  lastActiveTool: import("../types").LastActiveTool;
351
366
  locked: boolean;
352
367
  } & ({
353
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "iframe" | "image" | "frame" | "freedraw" | "eraser" | "hand";
368
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
354
369
  customType: null;
355
370
  } | {
356
371
  type: "custom";
@@ -394,11 +409,11 @@ export declare const actionShortcuts: {
394
409
  } | null;
395
410
  defaultSidebarDockedPreference: boolean;
396
411
  lastPointerDownWith: import("../element/types").PointerType;
397
- selectedElementIds: {
398
- [id: string]: boolean;
399
- };
412
+ selectedElementIds: Readonly<{
413
+ [id: string]: true;
414
+ }>;
400
415
  previousSelectedElementIds: {
401
- [id: string]: boolean;
416
+ [id: string]: true;
402
417
  };
403
418
  selectedElementsAreBeingDragged: boolean;
404
419
  shouldCacheIgnoreZoom: boolean;