@dwelle/excalidraw 0.4.0-d68dd48 → 0.4.0-e03b600

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 (163) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +4 -0
  3. package/dist/excalidraw.development.js +1314 -248
  4. package/dist/excalidraw.production.min.js +1 -1
  5. package/package.json +2 -2
  6. package/types/actions/actionAddToLibrary.d.ts +36 -12
  7. package/types/actions/actionAlign.d.ts +6 -0
  8. package/types/actions/actionBoundText.d.ts +24 -8
  9. package/types/actions/actionCanvas.d.ts +235 -41
  10. package/types/actions/actionClipboard.d.ts +60 -20
  11. package/types/actions/actionDeleteSelected.d.ts +36 -12
  12. package/types/actions/actionElementLock.d.ts +254 -0
  13. package/types/actions/actionExport.d.ts +109 -37
  14. package/types/actions/actionFinalize.d.ts +24 -8
  15. package/types/actions/actionFlip.d.ts +2 -4
  16. package/types/actions/actionFrame.d.ts +397 -0
  17. package/types/actions/actionGroup.d.ts +2 -2
  18. package/types/actions/actionHistory.d.ts +1 -1
  19. package/types/actions/actionLinearEditor.d.ts +12 -4
  20. package/types/actions/actionMenu.d.ts +37 -14
  21. package/types/actions/actionNavigate.d.ts +1 -1
  22. package/types/actions/actionProperties.d.ts +158 -54
  23. package/types/actions/actionStyles.d.ts +12 -4
  24. package/types/actions/actionToggleGridMode.d.ts +12 -4
  25. package/types/actions/actionToggleStats.d.ts +12 -4
  26. package/types/actions/actionToggleViewMode.d.ts +12 -4
  27. package/types/actions/actionToggleZenMode.d.ts +12 -4
  28. package/types/actions/actionZindex.d.ts +4 -4
  29. package/types/actions/index.d.ts +1 -1
  30. package/types/actions/manager.d.ts +1 -1
  31. package/types/actions/shortcuts.d.ts +1 -1
  32. package/types/actions/types.d.ts +7 -7
  33. package/types/appState.d.ts +6 -3
  34. package/types/charts.d.ts +2 -2
  35. package/types/clients.d.ts +5 -6
  36. package/types/clipboard.d.ts +2 -2
  37. package/types/colors.d.ts +60 -5
  38. package/types/components/Actions.d.ts +5 -5
  39. package/types/components/ActiveConfirmDialog.d.ts +1 -21
  40. package/types/components/App.d.ts +32 -9
  41. package/types/components/Avatar.d.ts +1 -2
  42. package/types/components/Button.d.ts +3 -1
  43. package/types/components/ColorPicker/ColorInput.d.ts +7 -0
  44. package/types/components/ColorPicker/ColorPicker.d.ts +19 -0
  45. package/types/components/ColorPicker/CustomColorList.d.ts +8 -0
  46. package/types/components/ColorPicker/HotkeyLabel.d.ts +8 -0
  47. package/types/components/ColorPicker/Picker.d.ts +18 -0
  48. package/types/components/ColorPicker/PickerColorList.d.ts +10 -0
  49. package/types/components/ColorPicker/PickerHeading.d.ts +5 -0
  50. package/types/components/ColorPicker/ShadeList.d.ts +8 -0
  51. package/types/components/ColorPicker/TopPicks.d.ts +9 -0
  52. package/types/components/ColorPicker/colorPickerUtils.d.ts +21 -0
  53. package/types/components/ColorPicker/keyboardNavHandlers.d.ts +21 -0
  54. package/types/components/ContextMenu.d.ts +3 -3
  55. package/types/components/DefaultSidebar.d.ts +30 -0
  56. package/types/components/Dialog.d.ts +3 -4
  57. package/types/components/EyeDropper.d.ts +18 -0
  58. package/types/components/FilledButton.d.ts +17 -0
  59. package/types/components/FixedSideContainer.d.ts +1 -1
  60. package/types/components/HandButton.d.ts +1 -1
  61. package/types/components/HelpButton.d.ts +1 -1
  62. package/types/components/HintViewer.d.ts +2 -2
  63. package/types/components/HomeButton.d.ts +1 -1
  64. package/types/components/ImageExportDialog.d.ts +8 -13
  65. package/types/components/Island.d.ts +1 -1
  66. package/types/components/JSONExportDialog.d.ts +4 -4
  67. package/types/components/LayerUI.d.ts +4 -10
  68. package/types/components/LibraryMenu.d.ts +13 -14
  69. package/types/components/LibraryMenuBrowseButton.d.ts +2 -2
  70. package/types/components/LibraryMenuControlButtons.d.ts +9 -0
  71. package/types/components/LibraryMenuHeaderContent.d.ts +11 -28
  72. package/types/components/LibraryMenuItems.d.ts +6 -7
  73. package/types/components/LibraryMenuSection.d.ts +22 -0
  74. package/types/components/LibraryUnit.d.ts +7 -3
  75. package/types/components/LockButton.d.ts +1 -1
  76. package/types/components/MobileMenu.d.ts +4 -4
  77. package/types/components/OverwriteConfirm/OverwriteConfirm.d.ts +17 -0
  78. package/types/components/OverwriteConfirm/OverwriteConfirmActions.d.ts +17 -0
  79. package/types/components/OverwriteConfirm/OverwriteConfirmState.d.ts +22 -0
  80. package/types/components/PasteChartDialog.d.ts +4 -5
  81. package/types/components/PenModeButton.d.ts +1 -1
  82. package/types/components/Popover.d.ts +1 -1
  83. package/types/components/ProjectName.d.ts +2 -1
  84. package/types/components/PublishLibrary.d.ts +2 -2
  85. package/types/components/RadioGroup.d.ts +12 -0
  86. package/types/components/Sidebar/Sidebar.d.ts +66 -63
  87. package/types/components/Sidebar/SidebarHeader.d.ts +6 -19
  88. package/types/components/Sidebar/SidebarTab.d.ts +9 -0
  89. package/types/components/Sidebar/SidebarTabTrigger.d.ts +10 -0
  90. package/types/components/Sidebar/SidebarTabTriggers.d.ts +7 -0
  91. package/types/components/Sidebar/SidebarTabs.d.ts +7 -0
  92. package/types/components/Sidebar/SidebarTrigger.d.ts +6 -0
  93. package/types/components/Sidebar/common.d.ts +24 -7
  94. package/types/components/Spinner.d.ts +2 -1
  95. package/types/components/Stack.d.ts +4 -3
  96. package/types/components/Stats.d.ts +3 -3
  97. package/types/components/Switch.d.ts +9 -0
  98. package/types/components/ToolButton.d.ts +5 -4
  99. package/types/components/Tooltip.d.ts +1 -1
  100. package/types/components/Trans.d.ts +8 -0
  101. package/types/components/dropdownMenu/DropdownMenu.d.ts +3 -2
  102. package/types/components/dropdownMenu/DropdownMenuTrigger.d.ts +4 -2
  103. package/types/components/footer/Footer.d.ts +2 -2
  104. package/types/components/icons.d.ts +11 -1
  105. package/types/components/main-menu/MainMenu.d.ts +3 -2
  106. package/types/constants.d.ts +42 -6
  107. package/types/context/tunnels.d.ts +19 -0
  108. package/types/context/ui-appState.d.ts +4 -0
  109. package/types/data/blob.d.ts +2 -2
  110. package/types/data/encode.d.ts +1 -1
  111. package/types/data/filesystem.d.ts +2 -1
  112. package/types/data/library.d.ts +3 -45
  113. package/types/data/restore.d.ts +2 -2
  114. package/types/data/types.d.ts +3 -5
  115. package/types/element/Hyperlink.d.ts +14 -6
  116. package/types/element/binding.d.ts +3 -3
  117. package/types/element/bounds.d.ts +31 -6
  118. package/types/element/collision.d.ts +7 -7
  119. package/types/element/dragElements.d.ts +2 -1
  120. package/types/element/image.d.ts +11 -1
  121. package/types/element/index.d.ts +3 -2
  122. package/types/element/linearElementEditor.d.ts +13 -5
  123. package/types/element/mutateElement.d.ts +1 -1
  124. package/types/element/newElement.d.ts +10 -3
  125. package/types/element/resizeElements.d.ts +1 -0
  126. package/types/element/showSelectedShapeActions.d.ts +2 -2
  127. package/types/element/textElement.d.ts +3 -2
  128. package/types/element/transformHandles.d.ts +12 -5
  129. package/types/element/typeChecks.d.ts +2 -1
  130. package/types/element/types.d.ts +40 -35
  131. package/types/emitter.d.ts +1 -1
  132. package/types/errors.d.ts +1 -1
  133. package/types/frame.d.ts +40 -0
  134. package/types/ga.d.ts +5 -5
  135. package/types/groups.d.ts +4 -0
  136. package/types/hooks/useCreatePortalContainer.d.ts +4 -0
  137. package/types/hooks/useLibraryItemSvg.d.ts +11 -0
  138. package/types/hooks/useOutsideClick.d.ts +19 -1
  139. package/types/hooks/useScrollPosition.d.ts +2 -0
  140. package/types/hooks/useTransition.d.ts +2 -0
  141. package/types/i18n.d.ts +2 -2
  142. package/types/jotai.d.ts +16 -104
  143. package/types/keys.d.ts +2 -1
  144. package/types/math.d.ts +1 -0
  145. package/types/packages/excalidraw/example/initialData.d.ts +6 -0
  146. package/types/packages/excalidraw/index.d.ts +2 -1
  147. package/types/packages/utils.d.ts +2 -2
  148. package/types/renderer/renderElement.d.ts +4 -3
  149. package/types/renderer/renderScene.d.ts +12 -3
  150. package/types/renderer/roundRect.d.ts +1 -1
  151. package/types/scene/Scene.d.ts +12 -5
  152. package/types/scene/export.d.ts +3 -2
  153. package/types/scene/selection.d.ts +15 -5
  154. package/types/scene/types.d.ts +4 -4
  155. package/types/types.d.ts +91 -52
  156. package/types/utility-types.d.ts +13 -13
  157. package/types/utils.d.ts +20 -25
  158. package/types/zindex.d.ts +4 -4
  159. package/types/actions/actionToggleLock.d.ts +0 -119
  160. package/types/components/ColorPicker.d.ts +0 -14
  161. package/types/components/LibraryButton.d.ts +0 -8
  162. package/types/components/context/tunnels.d.ts +0 -16
  163. package/types/components/hoc/withUpstreamOverride.d.ts +0 -10
@@ -51,12 +51,16 @@ export declare const actionCut: {
51
51
  isBindingEnabled: boolean;
52
52
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
53
53
  suggestedBindings: import("../element/binding").SuggestedBinding[];
54
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
55
+ shouldRenderFrames: boolean;
56
+ editingFrame: string | null;
57
+ elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
54
58
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
55
59
  activeTool: {
56
60
  lastActiveTool: import("../types").LastActiveTool;
57
61
  locked: boolean;
58
62
  } & ({
59
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
63
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
60
64
  customType: null;
61
65
  } | {
62
66
  type: "custom";
@@ -93,10 +97,13 @@ export declare const actionCut: {
93
97
  value: import("../types").NormalizedZoomValue;
94
98
  }>;
95
99
  openMenu: "canvas" | "shape" | null;
96
- openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
97
- openSidebar: "library" | "customSidebar" | null;
100
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
101
+ openSidebar: {
102
+ name: string;
103
+ tab?: string | undefined;
104
+ } | null;
98
105
  openDialog: "imageExport" | "help" | "jsonExport" | null;
99
- isSidebarDocked: boolean;
106
+ defaultSidebarDockedPreference: boolean;
100
107
  lastPointerDownWith: import("../element/types").PointerType;
101
108
  selectedElementIds: {
102
109
  [id: string]: boolean;
@@ -104,6 +111,7 @@ export declare const actionCut: {
104
111
  previousSelectedElementIds: {
105
112
  [id: string]: boolean;
106
113
  };
114
+ selectedElementsAreBeingDragged: boolean;
107
115
  shouldCacheIgnoreZoom: boolean;
108
116
  toast: {
109
117
  message: string;
@@ -185,12 +193,16 @@ export declare const actionCut: {
185
193
  isBindingEnabled: boolean;
186
194
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
187
195
  suggestedBindings: import("../element/binding").SuggestedBinding[];
196
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
197
+ shouldRenderFrames: boolean;
198
+ editingFrame: string | null;
199
+ elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
188
200
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
189
201
  activeTool: {
190
202
  lastActiveTool: import("../types").LastActiveTool;
191
203
  locked: boolean;
192
204
  } & ({
193
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
205
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
194
206
  customType: null;
195
207
  } | {
196
208
  type: "custom";
@@ -227,10 +239,13 @@ export declare const actionCut: {
227
239
  value: import("../types").NormalizedZoomValue;
228
240
  }>;
229
241
  openMenu: "canvas" | "shape" | null;
230
- openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
231
- openSidebar: "library" | "customSidebar" | null;
242
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
243
+ openSidebar: {
244
+ name: string;
245
+ tab?: string | undefined;
246
+ } | null;
232
247
  openDialog: "imageExport" | "help" | "jsonExport" | null;
233
- isSidebarDocked: boolean;
248
+ defaultSidebarDockedPreference: boolean;
234
249
  lastPointerDownWith: import("../element/types").PointerType;
235
250
  selectedElementIds: {
236
251
  [id: string]: boolean;
@@ -238,6 +253,7 @@ export declare const actionCut: {
238
253
  previousSelectedElementIds: {
239
254
  [id: string]: boolean;
240
255
  };
256
+ selectedElementsAreBeingDragged: boolean;
241
257
  shouldCacheIgnoreZoom: boolean;
242
258
  toast: {
243
259
  message: string;
@@ -279,7 +295,7 @@ export declare const actionCut: {
279
295
  lastActiveTool: import("../types").LastActiveTool;
280
296
  locked: boolean;
281
297
  } & ({
282
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
298
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
283
299
  customType: null;
284
300
  } | {
285
301
  type: "custom";
@@ -301,6 +317,10 @@ export declare const actionCut: {
301
317
  isBindingEnabled: boolean;
302
318
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
303
319
  suggestedBindings: import("../element/binding").SuggestedBinding[];
320
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
321
+ shouldRenderFrames: boolean;
322
+ editingFrame: string | null;
323
+ elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
304
324
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
305
325
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
306
326
  penMode: boolean;
@@ -334,14 +354,18 @@ export declare const actionCut: {
334
354
  value: import("../types").NormalizedZoomValue;
335
355
  }>;
336
356
  openMenu: "canvas" | "shape" | null;
337
- openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
338
- openSidebar: "library" | "customSidebar" | null;
357
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
358
+ openSidebar: {
359
+ name: string;
360
+ tab?: string | undefined;
361
+ } | null;
339
362
  openDialog: "imageExport" | "help" | "jsonExport" | null;
340
- isSidebarDocked: boolean;
363
+ defaultSidebarDockedPreference: boolean;
341
364
  lastPointerDownWith: import("../element/types").PointerType;
342
365
  previousSelectedElementIds: {
343
366
  [id: string]: boolean;
344
367
  };
368
+ selectedElementsAreBeingDragged: boolean;
345
369
  shouldCacheIgnoreZoom: boolean;
346
370
  toast: {
347
371
  message: string;
@@ -408,13 +432,17 @@ export declare const actionCopyAsSvg: {
408
432
  isBindingEnabled: boolean;
409
433
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
410
434
  suggestedBindings: import("../element/binding").SuggestedBinding[];
435
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
436
+ shouldRenderFrames: boolean;
437
+ editingFrame: string | null;
438
+ elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
411
439
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
412
440
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
413
441
  activeTool: {
414
442
  lastActiveTool: import("../types").LastActiveTool;
415
443
  locked: boolean;
416
444
  } & ({
417
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
445
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
418
446
  customType: null;
419
447
  } | {
420
448
  type: "custom";
@@ -451,10 +479,13 @@ export declare const actionCopyAsSvg: {
451
479
  value: import("../types").NormalizedZoomValue;
452
480
  }>;
453
481
  openMenu: "canvas" | "shape" | null;
454
- openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
455
- openSidebar: "library" | "customSidebar" | null;
482
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
483
+ openSidebar: {
484
+ name: string;
485
+ tab?: string | undefined;
486
+ } | null;
456
487
  openDialog: "imageExport" | "help" | "jsonExport" | null;
457
- isSidebarDocked: boolean;
488
+ defaultSidebarDockedPreference: boolean;
458
489
  lastPointerDownWith: import("../element/types").PointerType;
459
490
  selectedElementIds: {
460
491
  [id: string]: boolean;
@@ -462,6 +493,7 @@ export declare const actionCopyAsSvg: {
462
493
  previousSelectedElementIds: {
463
494
  [id: string]: boolean;
464
495
  };
496
+ selectedElementsAreBeingDragged: boolean;
465
497
  shouldCacheIgnoreZoom: boolean;
466
498
  toast: {
467
499
  message: string;
@@ -527,13 +559,17 @@ export declare const actionCopyAsPng: {
527
559
  isBindingEnabled: boolean;
528
560
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
529
561
  suggestedBindings: import("../element/binding").SuggestedBinding[];
562
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
563
+ shouldRenderFrames: boolean;
564
+ editingFrame: string | null;
565
+ elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
530
566
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
531
567
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
532
568
  activeTool: {
533
569
  lastActiveTool: import("../types").LastActiveTool;
534
570
  locked: boolean;
535
571
  } & ({
536
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
572
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
537
573
  customType: null;
538
574
  } | {
539
575
  type: "custom";
@@ -570,10 +606,13 @@ export declare const actionCopyAsPng: {
570
606
  value: import("../types").NormalizedZoomValue;
571
607
  }>;
572
608
  openMenu: "canvas" | "shape" | null;
573
- openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
574
- openSidebar: "library" | "customSidebar" | null;
609
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
610
+ openSidebar: {
611
+ name: string;
612
+ tab?: string | undefined;
613
+ } | null;
575
614
  openDialog: "imageExport" | "help" | "jsonExport" | null;
576
- isSidebarDocked: boolean;
615
+ defaultSidebarDockedPreference: boolean;
577
616
  lastPointerDownWith: import("../element/types").PointerType;
578
617
  selectedElementIds: {
579
618
  [id: string]: boolean;
@@ -581,6 +620,7 @@ export declare const actionCopyAsPng: {
581
620
  previousSelectedElementIds: {
582
621
  [id: string]: boolean;
583
622
  };
623
+ selectedElementsAreBeingDragged: boolean;
584
624
  shouldCacheIgnoreZoom: boolean;
585
625
  toast: {
586
626
  message: string;
@@ -27,12 +27,16 @@ export declare const actionDeleteSelected: {
27
27
  isBindingEnabled: boolean;
28
28
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
29
29
  suggestedBindings: import("../element/binding").SuggestedBinding[];
30
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
31
+ shouldRenderFrames: boolean;
32
+ editingFrame: string | null;
33
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
30
34
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
31
35
  activeTool: {
32
36
  lastActiveTool: import("../types").LastActiveTool;
33
37
  locked: boolean;
34
38
  } & ({
35
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
39
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
36
40
  customType: null;
37
41
  } | {
38
42
  type: "custom";
@@ -69,10 +73,13 @@ export declare const actionDeleteSelected: {
69
73
  value: import("../types").NormalizedZoomValue;
70
74
  }>;
71
75
  openMenu: "canvas" | "shape" | null;
72
- openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
73
- openSidebar: "library" | "customSidebar" | null;
76
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
77
+ openSidebar: {
78
+ name: string;
79
+ tab?: string | undefined;
80
+ } | null;
74
81
  openDialog: "imageExport" | "help" | "jsonExport" | null;
75
- isSidebarDocked: boolean;
82
+ defaultSidebarDockedPreference: boolean;
76
83
  lastPointerDownWith: import("../element/types").PointerType;
77
84
  selectedElementIds: {
78
85
  [id: string]: boolean;
@@ -80,6 +87,7 @@ export declare const actionDeleteSelected: {
80
87
  previousSelectedElementIds: {
81
88
  [id: string]: boolean;
82
89
  };
90
+ selectedElementsAreBeingDragged: boolean;
83
91
  shouldCacheIgnoreZoom: boolean;
84
92
  toast: {
85
93
  message: string;
@@ -161,12 +169,16 @@ export declare const actionDeleteSelected: {
161
169
  isBindingEnabled: boolean;
162
170
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
163
171
  suggestedBindings: import("../element/binding").SuggestedBinding[];
172
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
173
+ shouldRenderFrames: boolean;
174
+ editingFrame: string | null;
175
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
164
176
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
165
177
  activeTool: {
166
178
  lastActiveTool: import("../types").LastActiveTool;
167
179
  locked: boolean;
168
180
  } & ({
169
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
181
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
170
182
  customType: null;
171
183
  } | {
172
184
  type: "custom";
@@ -203,10 +215,13 @@ export declare const actionDeleteSelected: {
203
215
  value: import("../types").NormalizedZoomValue;
204
216
  }>;
205
217
  openMenu: "canvas" | "shape" | null;
206
- openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
207
- openSidebar: "library" | "customSidebar" | null;
218
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
219
+ openSidebar: {
220
+ name: string;
221
+ tab?: string | undefined;
222
+ } | null;
208
223
  openDialog: "imageExport" | "help" | "jsonExport" | null;
209
- isSidebarDocked: boolean;
224
+ defaultSidebarDockedPreference: boolean;
210
225
  lastPointerDownWith: import("../element/types").PointerType;
211
226
  selectedElementIds: {
212
227
  [id: string]: boolean;
@@ -214,6 +229,7 @@ export declare const actionDeleteSelected: {
214
229
  previousSelectedElementIds: {
215
230
  [id: string]: boolean;
216
231
  };
232
+ selectedElementsAreBeingDragged: boolean;
217
233
  shouldCacheIgnoreZoom: boolean;
218
234
  toast: {
219
235
  message: string;
@@ -255,7 +271,7 @@ export declare const actionDeleteSelected: {
255
271
  lastActiveTool: import("../types").LastActiveTool;
256
272
  locked: boolean;
257
273
  } & ({
258
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
274
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
259
275
  customType: null;
260
276
  } | {
261
277
  type: "custom";
@@ -277,6 +293,10 @@ export declare const actionDeleteSelected: {
277
293
  isBindingEnabled: boolean;
278
294
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
279
295
  suggestedBindings: import("../element/binding").SuggestedBinding[];
296
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
297
+ shouldRenderFrames: boolean;
298
+ editingFrame: string | null;
299
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
280
300
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
281
301
  editingLinearElement: LinearElementEditor | null;
282
302
  penMode: boolean;
@@ -310,14 +330,18 @@ export declare const actionDeleteSelected: {
310
330
  value: import("../types").NormalizedZoomValue;
311
331
  }>;
312
332
  openMenu: "canvas" | "shape" | null;
313
- openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
314
- openSidebar: "library" | "customSidebar" | null;
333
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
334
+ openSidebar: {
335
+ name: string;
336
+ tab?: string | undefined;
337
+ } | null;
315
338
  openDialog: "imageExport" | "help" | "jsonExport" | null;
316
- isSidebarDocked: boolean;
339
+ defaultSidebarDockedPreference: boolean;
317
340
  lastPointerDownWith: import("../element/types").PointerType;
318
341
  previousSelectedElementIds: {
319
342
  [id: string]: boolean;
320
343
  };
344
+ selectedElementsAreBeingDragged: boolean;
321
345
  shouldCacheIgnoreZoom: boolean;
322
346
  toast: {
323
347
  message: string;
@@ -0,0 +1,254 @@
1
+ /// <reference types="react" />
2
+ import { ExcalidrawElement } from "../element/types";
3
+ export declare const actionToggleElementLock: {
4
+ name: "toggleElementLock";
5
+ trackEvent: {
6
+ category: "element";
7
+ };
8
+ predicate: (elements: readonly ExcalidrawElement[], appState: import("../types").AppState) => boolean;
9
+ perform: (elements: readonly ExcalidrawElement[], appState: Readonly<import("../types").AppState>) => false | {
10
+ elements: ExcalidrawElement[];
11
+ appState: {
12
+ selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
13
+ contextMenu: {
14
+ items: import("../components/ContextMenu").ContextMenuItems;
15
+ top: number;
16
+ left: number;
17
+ } | null;
18
+ showWelcomeScreen: boolean;
19
+ isLoading: boolean;
20
+ errorMessage: import("react").ReactNode;
21
+ draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
22
+ resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
23
+ multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
24
+ selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
25
+ isBindingEnabled: boolean;
26
+ startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
27
+ suggestedBindings: import("../element/binding").SuggestedBinding[];
28
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
29
+ shouldRenderFrames: boolean;
30
+ editingFrame: string | null;
31
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
32
+ editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
33
+ editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
34
+ activeTool: {
35
+ lastActiveTool: import("../types").LastActiveTool;
36
+ locked: boolean;
37
+ } & ({
38
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
39
+ customType: null;
40
+ } | {
41
+ type: "custom";
42
+ customType: string;
43
+ });
44
+ penMode: boolean;
45
+ penDetected: boolean;
46
+ exportBackground: boolean;
47
+ exportEmbedScene: boolean;
48
+ exportWithDarkMode: boolean;
49
+ exportScale: number;
50
+ currentItemStrokeColor: string;
51
+ currentItemBackgroundColor: string;
52
+ currentItemFillStyle: import("../element/types").FillStyle;
53
+ currentItemStrokeWidth: number;
54
+ currentItemStrokeStyle: import("../element/types").StrokeStyle;
55
+ currentItemRoughness: number;
56
+ currentItemOpacity: number;
57
+ currentItemFontFamily: number;
58
+ currentItemFontSize: number;
59
+ currentItemTextAlign: string;
60
+ currentItemStartArrowhead: import("../element/types").Arrowhead | null;
61
+ currentItemEndArrowhead: import("../element/types").Arrowhead | null;
62
+ currentItemRoundness: import("../element/types").StrokeRoundness;
63
+ viewBackgroundColor: string;
64
+ scrollX: number;
65
+ scrollY: number;
66
+ cursorButton: "up" | "down";
67
+ scrolledOutside: boolean;
68
+ name: string;
69
+ isResizing: boolean;
70
+ isRotating: boolean;
71
+ zoom: Readonly<{
72
+ value: import("../types").NormalizedZoomValue;
73
+ }>;
74
+ openMenu: "canvas" | "shape" | null;
75
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
76
+ openSidebar: {
77
+ name: string;
78
+ tab?: string | undefined;
79
+ } | null;
80
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
81
+ defaultSidebarDockedPreference: boolean;
82
+ lastPointerDownWith: import("../element/types").PointerType;
83
+ selectedElementIds: {
84
+ [id: string]: boolean;
85
+ };
86
+ previousSelectedElementIds: {
87
+ [id: string]: boolean;
88
+ };
89
+ selectedElementsAreBeingDragged: boolean;
90
+ shouldCacheIgnoreZoom: boolean;
91
+ toast: {
92
+ message: string;
93
+ closable?: boolean | undefined;
94
+ duration?: number | undefined;
95
+ } | null;
96
+ zenModeEnabled: boolean;
97
+ theme: string;
98
+ gridSize: number | null;
99
+ viewModeEnabled: boolean;
100
+ selectedGroupIds: {
101
+ [groupId: string]: boolean;
102
+ };
103
+ editingGroupId: string | null;
104
+ width: number;
105
+ height: number;
106
+ offsetTop: number;
107
+ offsetLeft: number;
108
+ fileHandle: import("browser-fs-access").FileSystemHandle | null;
109
+ collaborators: Map<string, import("../types").Collaborator>;
110
+ showStats: boolean;
111
+ currentChartType: import("../element/types").ChartType;
112
+ pasteDialog: {
113
+ shown: false;
114
+ data: null;
115
+ } | {
116
+ shown: true;
117
+ data: import("../charts").Spreadsheet;
118
+ };
119
+ pendingImageElementId: string | null;
120
+ showHyperlinkPopup: false | "info" | "editor";
121
+ };
122
+ commitToHistory: true;
123
+ };
124
+ contextItemLabel: (elements: readonly ExcalidrawElement[], appState: Readonly<import("../types").AppState>) => "labels.elementLock.unlock" | "labels.elementLock.lock" | "labels.elementLock.lockAll" | "labels.elementLock.unlockAll";
125
+ keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: import("../types").AppState, elements: readonly ExcalidrawElement[]) => boolean;
126
+ } & {
127
+ keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: import("../types").AppState, elements: readonly ExcalidrawElement[]) => boolean) | undefined;
128
+ };
129
+ export declare const actionUnlockAllElements: {
130
+ name: "unlockAllElements";
131
+ trackEvent: {
132
+ category: "canvas";
133
+ };
134
+ viewMode: false;
135
+ predicate: (elements: readonly ExcalidrawElement[]) => boolean;
136
+ perform: (elements: readonly ExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
137
+ elements: ExcalidrawElement[];
138
+ appState: {
139
+ selectedElementIds: {
140
+ [k: string]: true;
141
+ };
142
+ contextMenu: {
143
+ items: import("../components/ContextMenu").ContextMenuItems;
144
+ top: number;
145
+ left: number;
146
+ } | null;
147
+ showWelcomeScreen: boolean;
148
+ isLoading: boolean;
149
+ errorMessage: import("react").ReactNode;
150
+ draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
151
+ resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
152
+ multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
153
+ selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
154
+ isBindingEnabled: boolean;
155
+ startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
156
+ suggestedBindings: import("../element/binding").SuggestedBinding[];
157
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
158
+ shouldRenderFrames: boolean;
159
+ editingFrame: string | null;
160
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
161
+ editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
162
+ editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
163
+ activeTool: {
164
+ lastActiveTool: import("../types").LastActiveTool;
165
+ locked: boolean;
166
+ } & ({
167
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
168
+ customType: null;
169
+ } | {
170
+ type: "custom";
171
+ customType: string;
172
+ });
173
+ penMode: boolean;
174
+ penDetected: boolean;
175
+ exportBackground: boolean;
176
+ exportEmbedScene: boolean;
177
+ exportWithDarkMode: boolean;
178
+ exportScale: number;
179
+ currentItemStrokeColor: string;
180
+ currentItemBackgroundColor: string;
181
+ currentItemFillStyle: import("../element/types").FillStyle;
182
+ currentItemStrokeWidth: number;
183
+ currentItemStrokeStyle: import("../element/types").StrokeStyle;
184
+ currentItemRoughness: number;
185
+ currentItemOpacity: number;
186
+ currentItemFontFamily: number;
187
+ currentItemFontSize: number;
188
+ currentItemTextAlign: string;
189
+ currentItemStartArrowhead: import("../element/types").Arrowhead | null;
190
+ currentItemEndArrowhead: import("../element/types").Arrowhead | null;
191
+ currentItemRoundness: import("../element/types").StrokeRoundness;
192
+ viewBackgroundColor: string;
193
+ scrollX: number;
194
+ scrollY: number;
195
+ cursorButton: "up" | "down";
196
+ scrolledOutside: boolean;
197
+ name: string;
198
+ isResizing: boolean;
199
+ isRotating: boolean;
200
+ zoom: Readonly<{
201
+ value: import("../types").NormalizedZoomValue;
202
+ }>;
203
+ openMenu: "canvas" | "shape" | null;
204
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
205
+ openSidebar: {
206
+ name: string;
207
+ tab?: string | undefined;
208
+ } | null;
209
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
210
+ defaultSidebarDockedPreference: boolean;
211
+ lastPointerDownWith: import("../element/types").PointerType;
212
+ previousSelectedElementIds: {
213
+ [id: string]: boolean;
214
+ };
215
+ selectedElementsAreBeingDragged: boolean;
216
+ shouldCacheIgnoreZoom: boolean;
217
+ toast: {
218
+ message: string;
219
+ closable?: boolean | undefined;
220
+ duration?: number | undefined;
221
+ } | null;
222
+ zenModeEnabled: boolean;
223
+ theme: string;
224
+ gridSize: number | null;
225
+ viewModeEnabled: boolean;
226
+ selectedGroupIds: {
227
+ [groupId: string]: boolean;
228
+ };
229
+ editingGroupId: string | null;
230
+ width: number;
231
+ height: number;
232
+ offsetTop: number;
233
+ offsetLeft: number;
234
+ fileHandle: import("browser-fs-access").FileSystemHandle | null;
235
+ collaborators: Map<string, import("../types").Collaborator>;
236
+ showStats: boolean;
237
+ currentChartType: import("../element/types").ChartType;
238
+ pasteDialog: {
239
+ shown: false;
240
+ data: null;
241
+ } | {
242
+ shown: true;
243
+ data: import("../charts").Spreadsheet;
244
+ };
245
+ pendingImageElementId: string | null;
246
+ showHyperlinkPopup: false | "info" | "editor";
247
+ selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
248
+ };
249
+ commitToHistory: true;
250
+ };
251
+ contextItemLabel: string;
252
+ } & {
253
+ keyTest?: undefined;
254
+ };