@zsviczian/excalidraw 0.15.2-obsidian-1 → 0.15.2-obsidian-3

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 (127) hide show
  1. package/dist/excalidraw.development.js +1438 -364
  2. package/dist/excalidraw.production.min.js +1 -1
  3. package/package.json +2 -2
  4. package/types/actions/actionAddToLibrary.d.ts +48 -24
  5. package/types/actions/actionBoundText.d.ts +32 -16
  6. package/types/actions/actionCanvas.d.ts +160 -80
  7. package/types/actions/actionClipboard.d.ts +80 -40
  8. package/types/actions/actionDeleteSelected.d.ts +48 -24
  9. package/types/actions/actionElementLock.d.ts +287 -0
  10. package/types/actions/actionExport.d.ts +145 -73
  11. package/types/actions/actionFinalize.d.ts +32 -16
  12. package/types/actions/actionFlip.d.ts +2 -4
  13. package/types/actions/actionHistory.d.ts +1 -1
  14. package/types/actions/actionLinearEditor.d.ts +16 -8
  15. package/types/actions/actionMenu.d.ts +48 -24
  16. package/types/actions/actionProperties.d.ts +210 -106
  17. package/types/actions/actionStyles.d.ts +16 -8
  18. package/types/actions/actionToggleGridMode.d.ts +16 -8
  19. package/types/actions/actionToggleLock.d.ts +5 -2
  20. package/types/actions/actionToggleStats.d.ts +16 -8
  21. package/types/actions/actionToggleViewMode.d.ts +16 -8
  22. package/types/actions/actionToggleZenMode.d.ts +16 -8
  23. package/types/actions/index.d.ts +1 -1
  24. package/types/actions/manager.d.ts +1 -1
  25. package/types/actions/shortcuts.d.ts +1 -1
  26. package/types/actions/types.d.ts +7 -7
  27. package/types/appState.d.ts +5 -2
  28. package/types/charts.d.ts +2 -2
  29. package/types/clients.d.ts +4 -1
  30. package/types/clipboard.d.ts +2 -2
  31. package/types/colors.d.ts +59 -5
  32. package/types/components/Actions.d.ts +5 -5
  33. package/types/components/App.d.ts +13 -3
  34. package/types/components/Avatar.d.ts +1 -1
  35. package/types/components/Button.d.ts +3 -1
  36. package/types/components/ColorPicker/ColorInput.d.ts +7 -0
  37. package/types/components/ColorPicker/ColorPicker.d.ts +18 -0
  38. package/types/components/ColorPicker/CustomColorList.d.ts +8 -0
  39. package/types/components/ColorPicker/HotkeyLabel.d.ts +8 -0
  40. package/types/components/ColorPicker/Picker.d.ts +16 -0
  41. package/types/components/ColorPicker/PickerColorList.d.ts +10 -0
  42. package/types/components/ColorPicker/PickerHeading.d.ts +5 -0
  43. package/types/components/ColorPicker/ShadeList.d.ts +8 -0
  44. package/types/components/ColorPicker/TopPicks.d.ts +9 -0
  45. package/types/components/ColorPicker/colorPickerUtils.d.ts +41 -0
  46. package/types/components/ColorPicker/keyboardNavHandlers.d.ts +16 -0
  47. package/types/components/ContextMenu.d.ts +3 -3
  48. package/types/components/DefaultSidebar.d.ts +30 -0
  49. package/types/components/Dialog.d.ts +2 -2
  50. package/types/components/FilledButton.d.ts +16 -0
  51. package/types/components/FixedSideContainer.d.ts +1 -1
  52. package/types/components/HandButton.d.ts +1 -1
  53. package/types/components/HelpButton.d.ts +1 -1
  54. package/types/components/HintViewer.d.ts +2 -2
  55. package/types/components/ImageExportDialog.d.ts +8 -13
  56. package/types/components/Island.d.ts +1 -1
  57. package/types/components/JSONExportDialog.d.ts +4 -4
  58. package/types/components/LayerUI.d.ts +4 -10
  59. package/types/components/LibraryMenu.d.ts +33 -14
  60. package/types/components/LibraryMenuBrowseButton.d.ts +2 -2
  61. package/types/components/LibraryMenuControlButtons.d.ts +9 -0
  62. package/types/components/LibraryMenuHeaderContent.d.ts +11 -28
  63. package/types/components/LibraryMenuItems.d.ts +6 -7
  64. package/types/components/LibraryMenuSection.d.ts +22 -0
  65. package/types/components/LibraryUnit.d.ts +7 -3
  66. package/types/components/LockButton.d.ts +1 -1
  67. package/types/components/MobileMenu.d.ts +4 -4
  68. package/types/components/PasteChartDialog.d.ts +4 -5
  69. package/types/components/PenModeButton.d.ts +1 -1
  70. package/types/components/Popover.d.ts +1 -1
  71. package/types/components/ProjectName.d.ts +2 -1
  72. package/types/components/PublishLibrary.d.ts +2 -2
  73. package/types/components/RadioGroup.d.ts +12 -0
  74. package/types/components/Sidebar/Sidebar.d.ts +68 -45
  75. package/types/components/Sidebar/SidebarHeader.d.ts +6 -19
  76. package/types/components/Sidebar/SidebarTab.d.ts +9 -0
  77. package/types/components/Sidebar/SidebarTabTrigger.d.ts +10 -0
  78. package/types/components/Sidebar/SidebarTabTriggers.d.ts +7 -0
  79. package/types/components/Sidebar/SidebarTabs.d.ts +7 -0
  80. package/types/components/Sidebar/SidebarTrigger.d.ts +6 -0
  81. package/types/components/Sidebar/common.d.ts +24 -7
  82. package/types/components/Spinner.d.ts +2 -1
  83. package/types/components/Stack.d.ts +4 -3
  84. package/types/components/Stats.d.ts +3 -3
  85. package/types/components/Switch.d.ts +9 -0
  86. package/types/components/ToolButton.d.ts +3 -3
  87. package/types/components/Tooltip.d.ts +1 -1
  88. package/types/components/Trans.d.ts +8 -0
  89. package/types/components/footer/Footer.d.ts +2 -2
  90. package/types/components/icons.d.ts +7 -1
  91. package/types/constants.d.ts +10 -0
  92. package/types/context/tunnels.d.ts +18 -0
  93. package/types/context/ui-appState.d.ts +4 -0
  94. package/types/data/encode.d.ts +1 -1
  95. package/types/data/filesystem.d.ts +1 -1
  96. package/types/data/library.d.ts +2 -0
  97. package/types/data/restore.d.ts +2 -2
  98. package/types/data/types.d.ts +3 -5
  99. package/types/element/Hyperlink.d.ts +18 -10
  100. package/types/element/binding.d.ts +2 -2
  101. package/types/element/bounds.d.ts +1 -1
  102. package/types/element/linearElementEditor.d.ts +16 -8
  103. package/types/element/mutateElement.d.ts +1 -1
  104. package/types/element/newElement.d.ts +7 -2
  105. package/types/element/resizeElements.d.ts +1 -0
  106. package/types/element/showSelectedShapeActions.d.ts +2 -2
  107. package/types/element/textElement.d.ts +2 -2
  108. package/types/element/transformHandles.d.ts +5 -5
  109. package/types/element/types.d.ts +35 -35
  110. package/types/errors.d.ts +1 -1
  111. package/types/ga.d.ts +5 -5
  112. package/types/hooks/useLibraryItemSvg.d.ts +31 -0
  113. package/types/hooks/useOutsideClick.d.ts +1 -1
  114. package/types/hooks/useScrollPosition.d.ts +2 -0
  115. package/types/hooks/useTransition.d.ts +2 -0
  116. package/types/i18n.d.ts +2 -2
  117. package/types/keys.d.ts +1 -1
  118. package/types/packages/excalidraw/index.d.ts +3 -2
  119. package/types/packages/utils.d.ts +3 -3
  120. package/types/renderer/easingFunctions.d.ts +1 -1
  121. package/types/renderer/renderElement.d.ts +2 -2
  122. package/types/scene/Scene.d.ts +4 -4
  123. package/types/scene/selection.d.ts +4 -4
  124. package/types/scene/types.d.ts +4 -4
  125. package/types/types.d.ts +65 -46
  126. package/types/utility-types.d.ts +13 -13
  127. package/types/utils.d.ts +5 -5
@@ -93,10 +93,13 @@ export declare const actionCut: {
93
93
  value: import("../types").NormalizedZoomValue;
94
94
  }>;
95
95
  openMenu: "canvas" | "shape" | null;
96
- openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
97
- openSidebar: "library" | "customSidebar" | null;
96
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
97
+ openSidebar: {
98
+ name: string;
99
+ tab?: string | undefined;
100
+ } | null;
98
101
  openDialog: "imageExport" | "help" | "jsonExport" | null;
99
- isSidebarDocked: boolean;
102
+ defaultSidebarDockedPreference: boolean;
100
103
  lastPointerDownWith: import("../element/types").PointerType;
101
104
  selectedElementIds: {
102
105
  [id: string]: boolean;
@@ -138,11 +141,16 @@ export declare const actionCut: {
138
141
  showHyperlinkPopup: false | "info" | "editor";
139
142
  linkOpacity: number;
140
143
  trayModeEnabled: boolean;
141
- colorPalette: {
142
- canvasBackground?: string[] | undefined;
143
- elementBackground?: string[] | undefined;
144
- elementStroke?: string[] | undefined;
145
- };
144
+ colorPalette?: {
145
+ canvasBackground: import("../colors").ColorPaletteCustom;
146
+ elementBackground: import("../colors").ColorPaletteCustom;
147
+ elementStroke: import("../colors").ColorPaletteCustom;
148
+ topPicks: {
149
+ canvasBackground: [string, string, string, string, string];
150
+ elementStroke: [string, string, string, string, string];
151
+ elementBackground: [string, string, string, string, string];
152
+ };
153
+ } | undefined;
146
154
  allowWheelZoom?: boolean | undefined;
147
155
  allowPinchZoom?: boolean | undefined;
148
156
  pinnedScripts?: string[] | undefined;
@@ -244,10 +252,13 @@ export declare const actionCut: {
244
252
  value: import("../types").NormalizedZoomValue;
245
253
  }>;
246
254
  openMenu: "canvas" | "shape" | null;
247
- openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
248
- openSidebar: "library" | "customSidebar" | null;
255
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
256
+ openSidebar: {
257
+ name: string;
258
+ tab?: string | undefined;
259
+ } | null;
249
260
  openDialog: "imageExport" | "help" | "jsonExport" | null;
250
- isSidebarDocked: boolean;
261
+ defaultSidebarDockedPreference: boolean;
251
262
  lastPointerDownWith: import("../element/types").PointerType;
252
263
  selectedElementIds: {
253
264
  [id: string]: boolean;
@@ -289,11 +300,16 @@ export declare const actionCut: {
289
300
  showHyperlinkPopup: false | "info" | "editor";
290
301
  linkOpacity: number;
291
302
  trayModeEnabled: boolean;
292
- colorPalette: {
293
- canvasBackground?: string[] | undefined;
294
- elementBackground?: string[] | undefined;
295
- elementStroke?: string[] | undefined;
296
- };
303
+ colorPalette?: {
304
+ canvasBackground: import("../colors").ColorPaletteCustom;
305
+ elementBackground: import("../colors").ColorPaletteCustom;
306
+ elementStroke: import("../colors").ColorPaletteCustom;
307
+ topPicks: {
308
+ canvasBackground: [string, string, string, string, string];
309
+ elementStroke: [string, string, string, string, string];
310
+ elementBackground: [string, string, string, string, string];
311
+ };
312
+ } | undefined;
297
313
  allowWheelZoom?: boolean | undefined;
298
314
  allowPinchZoom?: boolean | undefined;
299
315
  pinnedScripts?: string[] | undefined;
@@ -368,10 +384,13 @@ export declare const actionCut: {
368
384
  value: import("../types").NormalizedZoomValue;
369
385
  }>;
370
386
  openMenu: "canvas" | "shape" | null;
371
- openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
372
- openSidebar: "library" | "customSidebar" | null;
387
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
388
+ openSidebar: {
389
+ name: string;
390
+ tab?: string | undefined;
391
+ } | null;
373
392
  openDialog: "imageExport" | "help" | "jsonExport" | null;
374
- isSidebarDocked: boolean;
393
+ defaultSidebarDockedPreference: boolean;
375
394
  lastPointerDownWith: import("../element/types").PointerType;
376
395
  previousSelectedElementIds: {
377
396
  [id: string]: boolean;
@@ -410,11 +429,16 @@ export declare const actionCut: {
410
429
  showHyperlinkPopup: false | "info" | "editor";
411
430
  linkOpacity: number;
412
431
  trayModeEnabled: boolean;
413
- colorPalette: {
414
- canvasBackground?: string[] | undefined;
415
- elementBackground?: string[] | undefined;
416
- elementStroke?: string[] | undefined;
417
- };
432
+ colorPalette?: {
433
+ canvasBackground: import("../colors").ColorPaletteCustom;
434
+ elementBackground: import("../colors").ColorPaletteCustom;
435
+ elementStroke: import("../colors").ColorPaletteCustom;
436
+ topPicks: {
437
+ canvasBackground: [string, string, string, string, string];
438
+ elementStroke: [string, string, string, string, string];
439
+ elementBackground: [string, string, string, string, string];
440
+ };
441
+ } | undefined;
418
442
  allowWheelZoom?: boolean | undefined;
419
443
  allowPinchZoom?: boolean | undefined;
420
444
  pinnedScripts?: string[] | undefined;
@@ -502,10 +526,13 @@ export declare const actionCopyAsSvg: {
502
526
  value: import("../types").NormalizedZoomValue;
503
527
  }>;
504
528
  openMenu: "canvas" | "shape" | null;
505
- openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
506
- openSidebar: "library" | "customSidebar" | null;
529
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
530
+ openSidebar: {
531
+ name: string;
532
+ tab?: string | undefined;
533
+ } | null;
507
534
  openDialog: "imageExport" | "help" | "jsonExport" | null;
508
- isSidebarDocked: boolean;
535
+ defaultSidebarDockedPreference: boolean;
509
536
  lastPointerDownWith: import("../element/types").PointerType;
510
537
  selectedElementIds: {
511
538
  [id: string]: boolean;
@@ -547,11 +574,16 @@ export declare const actionCopyAsSvg: {
547
574
  showHyperlinkPopup: false | "info" | "editor";
548
575
  linkOpacity: number;
549
576
  trayModeEnabled: boolean;
550
- colorPalette: {
551
- canvasBackground?: string[] | undefined;
552
- elementBackground?: string[] | undefined;
553
- elementStroke?: string[] | undefined;
554
- };
577
+ colorPalette?: {
578
+ canvasBackground: import("../colors").ColorPaletteCustom;
579
+ elementBackground: import("../colors").ColorPaletteCustom;
580
+ elementStroke: import("../colors").ColorPaletteCustom;
581
+ topPicks: {
582
+ canvasBackground: [string, string, string, string, string];
583
+ elementStroke: [string, string, string, string, string];
584
+ elementBackground: [string, string, string, string, string];
585
+ };
586
+ } | undefined;
555
587
  allowWheelZoom?: boolean | undefined;
556
588
  allowPinchZoom?: boolean | undefined;
557
589
  pinnedScripts?: string[] | undefined;
@@ -638,10 +670,13 @@ export declare const actionCopyAsPng: {
638
670
  value: import("../types").NormalizedZoomValue;
639
671
  }>;
640
672
  openMenu: "canvas" | "shape" | null;
641
- openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
642
- openSidebar: "library" | "customSidebar" | null;
673
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
674
+ openSidebar: {
675
+ name: string;
676
+ tab?: string | undefined;
677
+ } | null;
643
678
  openDialog: "imageExport" | "help" | "jsonExport" | null;
644
- isSidebarDocked: boolean;
679
+ defaultSidebarDockedPreference: boolean;
645
680
  lastPointerDownWith: import("../element/types").PointerType;
646
681
  selectedElementIds: {
647
682
  [id: string]: boolean;
@@ -683,11 +718,16 @@ export declare const actionCopyAsPng: {
683
718
  showHyperlinkPopup: false | "info" | "editor";
684
719
  linkOpacity: number;
685
720
  trayModeEnabled: boolean;
686
- colorPalette: {
687
- canvasBackground?: string[] | undefined;
688
- elementBackground?: string[] | undefined;
689
- elementStroke?: string[] | undefined;
690
- };
721
+ colorPalette?: {
722
+ canvasBackground: import("../colors").ColorPaletteCustom;
723
+ elementBackground: import("../colors").ColorPaletteCustom;
724
+ elementStroke: import("../colors").ColorPaletteCustom;
725
+ topPicks: {
726
+ canvasBackground: [string, string, string, string, string];
727
+ elementStroke: [string, string, string, string, string];
728
+ elementBackground: [string, string, string, string, string];
729
+ };
730
+ } | undefined;
691
731
  allowWheelZoom?: boolean | undefined;
692
732
  allowPinchZoom?: boolean | undefined;
693
733
  pinnedScripts?: string[] | undefined;
@@ -69,10 +69,13 @@ export declare const actionDeleteSelected: {
69
69
  value: import("../types").NormalizedZoomValue;
70
70
  }>;
71
71
  openMenu: "canvas" | "shape" | null;
72
- openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
73
- openSidebar: "library" | "customSidebar" | null;
72
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
73
+ openSidebar: {
74
+ name: string;
75
+ tab?: string | undefined;
76
+ } | null;
74
77
  openDialog: "imageExport" | "help" | "jsonExport" | null;
75
- isSidebarDocked: boolean;
78
+ defaultSidebarDockedPreference: boolean;
76
79
  lastPointerDownWith: import("../element/types").PointerType;
77
80
  selectedElementIds: {
78
81
  [id: string]: boolean;
@@ -114,11 +117,16 @@ export declare const actionDeleteSelected: {
114
117
  showHyperlinkPopup: false | "info" | "editor";
115
118
  linkOpacity: number;
116
119
  trayModeEnabled: boolean;
117
- colorPalette: {
118
- canvasBackground?: string[] | undefined;
119
- elementBackground?: string[] | undefined;
120
- elementStroke?: string[] | undefined;
121
- };
120
+ colorPalette?: {
121
+ canvasBackground: import("../colors").ColorPaletteCustom;
122
+ elementBackground: import("../colors").ColorPaletteCustom;
123
+ elementStroke: import("../colors").ColorPaletteCustom;
124
+ topPicks: {
125
+ canvasBackground: [string, string, string, string, string];
126
+ elementStroke: [string, string, string, string, string];
127
+ elementBackground: [string, string, string, string, string];
128
+ };
129
+ } | undefined;
122
130
  allowWheelZoom?: boolean | undefined;
123
131
  allowPinchZoom?: boolean | undefined;
124
132
  pinnedScripts?: string[] | undefined;
@@ -220,10 +228,13 @@ export declare const actionDeleteSelected: {
220
228
  value: import("../types").NormalizedZoomValue;
221
229
  }>;
222
230
  openMenu: "canvas" | "shape" | null;
223
- openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
224
- openSidebar: "library" | "customSidebar" | null;
231
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
232
+ openSidebar: {
233
+ name: string;
234
+ tab?: string | undefined;
235
+ } | null;
225
236
  openDialog: "imageExport" | "help" | "jsonExport" | null;
226
- isSidebarDocked: boolean;
237
+ defaultSidebarDockedPreference: boolean;
227
238
  lastPointerDownWith: import("../element/types").PointerType;
228
239
  selectedElementIds: {
229
240
  [id: string]: boolean;
@@ -265,11 +276,16 @@ export declare const actionDeleteSelected: {
265
276
  showHyperlinkPopup: false | "info" | "editor";
266
277
  linkOpacity: number;
267
278
  trayModeEnabled: boolean;
268
- colorPalette: {
269
- canvasBackground?: string[] | undefined;
270
- elementBackground?: string[] | undefined;
271
- elementStroke?: string[] | undefined;
272
- };
279
+ colorPalette?: {
280
+ canvasBackground: import("../colors").ColorPaletteCustom;
281
+ elementBackground: import("../colors").ColorPaletteCustom;
282
+ elementStroke: import("../colors").ColorPaletteCustom;
283
+ topPicks: {
284
+ canvasBackground: [string, string, string, string, string];
285
+ elementStroke: [string, string, string, string, string];
286
+ elementBackground: [string, string, string, string, string];
287
+ };
288
+ } | undefined;
273
289
  allowWheelZoom?: boolean | undefined;
274
290
  allowPinchZoom?: boolean | undefined;
275
291
  pinnedScripts?: string[] | undefined;
@@ -344,10 +360,13 @@ export declare const actionDeleteSelected: {
344
360
  value: import("../types").NormalizedZoomValue;
345
361
  }>;
346
362
  openMenu: "canvas" | "shape" | null;
347
- openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
348
- openSidebar: "library" | "customSidebar" | null;
363
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
364
+ openSidebar: {
365
+ name: string;
366
+ tab?: string | undefined;
367
+ } | null;
349
368
  openDialog: "imageExport" | "help" | "jsonExport" | null;
350
- isSidebarDocked: boolean;
369
+ defaultSidebarDockedPreference: boolean;
351
370
  lastPointerDownWith: import("../element/types").PointerType;
352
371
  previousSelectedElementIds: {
353
372
  [id: string]: boolean;
@@ -386,11 +405,16 @@ export declare const actionDeleteSelected: {
386
405
  showHyperlinkPopup: false | "info" | "editor";
387
406
  linkOpacity: number;
388
407
  trayModeEnabled: boolean;
389
- colorPalette: {
390
- canvasBackground?: string[] | undefined;
391
- elementBackground?: string[] | undefined;
392
- elementStroke?: string[] | undefined;
393
- };
408
+ colorPalette?: {
409
+ canvasBackground: import("../colors").ColorPaletteCustom;
410
+ elementBackground: import("../colors").ColorPaletteCustom;
411
+ elementStroke: import("../colors").ColorPaletteCustom;
412
+ topPicks: {
413
+ canvasBackground: [string, string, string, string, string];
414
+ elementStroke: [string, string, string, string, string];
415
+ elementBackground: [string, string, string, string, string];
416
+ };
417
+ } | undefined;
394
418
  allowWheelZoom?: boolean | undefined;
395
419
  allowPinchZoom?: boolean | undefined;
396
420
  pinnedScripts?: string[] | undefined;
@@ -0,0 +1,287 @@
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
+ perform: (elements: readonly ExcalidrawElement[], appState: Readonly<import("../types").AppState>) => false | {
9
+ elements: ExcalidrawElement[];
10
+ appState: {
11
+ selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
12
+ contextMenu: {
13
+ items: import("../components/ContextMenu").ContextMenuItems;
14
+ top: number;
15
+ left: number;
16
+ } | null;
17
+ showWelcomeScreen: boolean;
18
+ isLoading: boolean;
19
+ errorMessage: import("react").ReactNode;
20
+ draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
21
+ resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
22
+ multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
23
+ selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
24
+ isBindingEnabled: boolean;
25
+ startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
26
+ suggestedBindings: import("../element/binding").SuggestedBinding[];
27
+ editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
28
+ editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
29
+ activeTool: {
30
+ lastActiveTool: import("../types").LastActiveTool;
31
+ locked: boolean;
32
+ } & ({
33
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
34
+ customType: null;
35
+ } | {
36
+ type: "custom";
37
+ customType: string;
38
+ });
39
+ penMode: boolean;
40
+ penDetected: boolean;
41
+ exportBackground: boolean;
42
+ exportEmbedScene: boolean;
43
+ exportWithDarkMode: boolean;
44
+ exportScale: number;
45
+ currentItemStrokeColor: string;
46
+ currentItemBackgroundColor: string;
47
+ currentItemFillStyle: import("../element/types").FillStyle;
48
+ currentItemStrokeWidth: number;
49
+ currentItemStrokeStyle: import("../element/types").StrokeStyle;
50
+ currentItemRoughness: number;
51
+ currentItemOpacity: number;
52
+ currentItemFontFamily: number;
53
+ currentItemFontSize: number;
54
+ currentItemTextAlign: string;
55
+ currentItemStartArrowhead: import("../element/types").Arrowhead | null;
56
+ currentItemEndArrowhead: import("../element/types").Arrowhead | null;
57
+ currentItemRoundness: import("../element/types").StrokeRoundness;
58
+ viewBackgroundColor: string;
59
+ scrollX: number;
60
+ scrollY: number;
61
+ cursorButton: "up" | "down";
62
+ scrolledOutside: boolean;
63
+ name: string;
64
+ isResizing: boolean;
65
+ isRotating: boolean;
66
+ zoom: Readonly<{
67
+ value: import("../types").NormalizedZoomValue;
68
+ }>;
69
+ openMenu: "canvas" | "shape" | null;
70
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
71
+ openSidebar: {
72
+ name: string;
73
+ tab?: string | undefined;
74
+ } | null;
75
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
76
+ defaultSidebarDockedPreference: boolean;
77
+ lastPointerDownWith: import("../element/types").PointerType;
78
+ selectedElementIds: {
79
+ [id: string]: boolean;
80
+ };
81
+ previousSelectedElementIds: {
82
+ [id: string]: boolean;
83
+ };
84
+ shouldCacheIgnoreZoom: boolean;
85
+ toast: {
86
+ message: string;
87
+ closable?: boolean | undefined;
88
+ duration?: number | undefined;
89
+ } | null;
90
+ zenModeEnabled: boolean;
91
+ theme: string;
92
+ gridSize: number | null;
93
+ previousGridSize: number | null;
94
+ viewModeEnabled: boolean;
95
+ selectedGroupIds: {
96
+ [groupId: string]: boolean;
97
+ };
98
+ editingGroupId: string | null;
99
+ width: number;
100
+ height: number;
101
+ offsetTop: number;
102
+ offsetLeft: number;
103
+ fileHandle: import("browser-fs-access").FileSystemHandle | null;
104
+ collaborators: Map<string, import("../types").Collaborator>;
105
+ showStats: boolean;
106
+ currentChartType: import("../element/types").ChartType;
107
+ pasteDialog: {
108
+ shown: false;
109
+ data: null;
110
+ } | {
111
+ shown: true;
112
+ data: import("../charts").Spreadsheet;
113
+ };
114
+ pendingImageElementId: string | null;
115
+ showHyperlinkPopup: false | "info" | "editor";
116
+ linkOpacity: number;
117
+ trayModeEnabled: boolean;
118
+ colorPalette?: {
119
+ canvasBackground: import("../colors").ColorPaletteCustom;
120
+ elementBackground: import("../colors").ColorPaletteCustom;
121
+ elementStroke: import("../colors").ColorPaletteCustom;
122
+ topPicks: {
123
+ canvasBackground: [string, string, string, string, string];
124
+ elementStroke: [string, string, string, string, string];
125
+ elementBackground: [string, string, string, string, string];
126
+ };
127
+ } | undefined;
128
+ allowWheelZoom?: boolean | undefined;
129
+ allowPinchZoom?: boolean | undefined;
130
+ pinnedScripts?: string[] | undefined;
131
+ customPens?: any[] | undefined;
132
+ currentStrokeOptions?: any;
133
+ resetCustomPen?: any;
134
+ gridColor: string;
135
+ dynamicStyle: string;
136
+ invertBindingBehaviour: boolean;
137
+ };
138
+ commitToHistory: true;
139
+ };
140
+ contextItemLabel: (elements: readonly ExcalidrawElement[], appState: Readonly<import("../types").AppState>) => "labels.elementLock.unlock" | "labels.elementLock.lock" | "labels.elementLock.lockAll" | "labels.elementLock.unlockAll";
141
+ keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: import("../types").AppState, elements: readonly ExcalidrawElement[]) => boolean;
142
+ } & {
143
+ keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: import("../types").AppState, elements: readonly ExcalidrawElement[]) => boolean) | undefined;
144
+ };
145
+ export declare const actionUnlockAllElements: {
146
+ name: "unlockAllElements";
147
+ trackEvent: {
148
+ category: "canvas";
149
+ };
150
+ viewMode: false;
151
+ predicate: (elements: readonly ExcalidrawElement[]) => boolean;
152
+ perform: (elements: readonly ExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
153
+ elements: ExcalidrawElement[];
154
+ appState: {
155
+ selectedElementIds: {
156
+ [k: string]: true;
157
+ };
158
+ contextMenu: {
159
+ items: import("../components/ContextMenu").ContextMenuItems;
160
+ top: number;
161
+ left: number;
162
+ } | null;
163
+ showWelcomeScreen: boolean;
164
+ isLoading: boolean;
165
+ errorMessage: import("react").ReactNode;
166
+ draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
167
+ resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
168
+ multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
169
+ selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
170
+ isBindingEnabled: boolean;
171
+ startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
172
+ suggestedBindings: import("../element/binding").SuggestedBinding[];
173
+ editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
174
+ editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
175
+ activeTool: {
176
+ lastActiveTool: import("../types").LastActiveTool;
177
+ locked: boolean;
178
+ } & ({
179
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
180
+ customType: null;
181
+ } | {
182
+ type: "custom";
183
+ customType: string;
184
+ });
185
+ penMode: boolean;
186
+ penDetected: boolean;
187
+ exportBackground: boolean;
188
+ exportEmbedScene: boolean;
189
+ exportWithDarkMode: boolean;
190
+ exportScale: number;
191
+ currentItemStrokeColor: string;
192
+ currentItemBackgroundColor: string;
193
+ currentItemFillStyle: import("../element/types").FillStyle;
194
+ currentItemStrokeWidth: number;
195
+ currentItemStrokeStyle: import("../element/types").StrokeStyle;
196
+ currentItemRoughness: number;
197
+ currentItemOpacity: number;
198
+ currentItemFontFamily: number;
199
+ currentItemFontSize: number;
200
+ currentItemTextAlign: string;
201
+ currentItemStartArrowhead: import("../element/types").Arrowhead | null;
202
+ currentItemEndArrowhead: import("../element/types").Arrowhead | null;
203
+ currentItemRoundness: import("../element/types").StrokeRoundness;
204
+ viewBackgroundColor: string;
205
+ scrollX: number;
206
+ scrollY: number;
207
+ cursorButton: "up" | "down";
208
+ scrolledOutside: boolean;
209
+ name: string;
210
+ isResizing: boolean;
211
+ isRotating: boolean;
212
+ zoom: Readonly<{
213
+ value: import("../types").NormalizedZoomValue;
214
+ }>;
215
+ openMenu: "canvas" | "shape" | null;
216
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
217
+ openSidebar: {
218
+ name: string;
219
+ tab?: string | undefined;
220
+ } | null;
221
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
222
+ defaultSidebarDockedPreference: boolean;
223
+ lastPointerDownWith: import("../element/types").PointerType;
224
+ previousSelectedElementIds: {
225
+ [id: string]: boolean;
226
+ };
227
+ shouldCacheIgnoreZoom: boolean;
228
+ toast: {
229
+ message: string;
230
+ closable?: boolean | undefined;
231
+ duration?: number | undefined;
232
+ } | null;
233
+ zenModeEnabled: boolean;
234
+ theme: string;
235
+ gridSize: number | null;
236
+ previousGridSize: number | null;
237
+ viewModeEnabled: boolean;
238
+ selectedGroupIds: {
239
+ [groupId: string]: boolean;
240
+ };
241
+ editingGroupId: string | null;
242
+ width: number;
243
+ height: number;
244
+ offsetTop: number;
245
+ offsetLeft: number;
246
+ fileHandle: import("browser-fs-access").FileSystemHandle | null;
247
+ collaborators: Map<string, import("../types").Collaborator>;
248
+ showStats: boolean;
249
+ currentChartType: import("../element/types").ChartType;
250
+ pasteDialog: {
251
+ shown: false;
252
+ data: null;
253
+ } | {
254
+ shown: true;
255
+ data: import("../charts").Spreadsheet;
256
+ };
257
+ pendingImageElementId: string | null;
258
+ showHyperlinkPopup: false | "info" | "editor";
259
+ linkOpacity: number;
260
+ trayModeEnabled: boolean;
261
+ colorPalette?: {
262
+ canvasBackground: import("../colors").ColorPaletteCustom;
263
+ elementBackground: import("../colors").ColorPaletteCustom;
264
+ elementStroke: import("../colors").ColorPaletteCustom;
265
+ topPicks: {
266
+ canvasBackground: [string, string, string, string, string];
267
+ elementStroke: [string, string, string, string, string];
268
+ elementBackground: [string, string, string, string, string];
269
+ };
270
+ } | undefined;
271
+ allowWheelZoom?: boolean | undefined;
272
+ allowPinchZoom?: boolean | undefined;
273
+ pinnedScripts?: string[] | undefined;
274
+ customPens?: any[] | undefined;
275
+ currentStrokeOptions?: any;
276
+ resetCustomPen?: any;
277
+ gridColor: string;
278
+ dynamicStyle: string;
279
+ invertBindingBehaviour: boolean;
280
+ selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
281
+ };
282
+ commitToHistory: true;
283
+ };
284
+ contextItemLabel: string;
285
+ } & {
286
+ keyTest?: undefined;
287
+ };