@excalidraw/excalidraw 0.14.2-dd4c333 → 0.14.2-f8e65bb

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@excalidraw/excalidraw",
3
- "version": "0.14.2-dd4c333",
3
+ "version": "0.14.2-f8e65bb",
4
4
  "main": "main.js",
5
5
  "types": "types/packages/excalidraw/index.d.ts",
6
6
  "files": [
@@ -64,7 +64,7 @@
64
64
  "terser-webpack-plugin": "5.3.3",
65
65
  "ts-loader": "9.3.1",
66
66
  "typescript": "4.7.4",
67
- "webpack": "5.73.0",
67
+ "webpack": "5.76.0",
68
68
  "webpack-bundle-analyzer": "4.5.0",
69
69
  "webpack-cli": "4.10.0",
70
70
  "webpack-dev-server": "4.9.3",
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare const actionAddToLibrary: {
2
3
  name: "addToLibrary";
3
4
  trackEvent: {
@@ -16,7 +17,7 @@ export declare const actionAddToLibrary: {
16
17
  } | null;
17
18
  showWelcomeScreen: boolean;
18
19
  isLoading: boolean;
19
- errorMessage: string | null;
20
+ errorMessage: import("react").ReactNode;
20
21
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
21
22
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
22
23
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ExcalidrawElement, ExcalidrawLinearElement } from "../element/types";
2
3
  export declare const actionUnbindText: {
3
4
  name: "unbindText";
@@ -34,7 +35,7 @@ export declare const actionBindText: {
34
35
  } | null;
35
36
  showWelcomeScreen: boolean;
36
37
  isLoading: boolean;
37
- errorMessage: string | null;
38
+ errorMessage: import("react").ReactNode;
38
39
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
39
40
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
40
41
  multiElement: import("../element/types").NonDeleted<ExcalidrawLinearElement> | null;
@@ -55,7 +55,7 @@ export declare const actionClearCanvas: {
55
55
  } | null;
56
56
  showWelcomeScreen: boolean;
57
57
  isLoading: boolean;
58
- errorMessage: string | null;
58
+ errorMessage: import("react").ReactNode;
59
59
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
60
60
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
61
61
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -146,7 +146,7 @@ export declare const actionZoomIn: {
146
146
  } | null;
147
147
  showWelcomeScreen: boolean;
148
148
  isLoading: boolean;
149
- errorMessage: string | null;
149
+ errorMessage: import("react").ReactNode;
150
150
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
151
151
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
152
152
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -263,7 +263,7 @@ export declare const actionZoomOut: {
263
263
  } | null;
264
264
  showWelcomeScreen: boolean;
265
265
  isLoading: boolean;
266
- errorMessage: string | null;
266
+ errorMessage: import("react").ReactNode;
267
267
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
268
268
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
269
269
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -380,7 +380,7 @@ export declare const actionResetZoom: {
380
380
  } | null;
381
381
  showWelcomeScreen: boolean;
382
382
  isLoading: boolean;
383
- errorMessage: string | null;
383
+ errorMessage: import("react").ReactNode;
384
384
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
385
385
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
386
386
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -477,6 +477,112 @@ export declare const actionResetZoom: {
477
477
  } & {
478
478
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
479
479
  };
480
+ export declare const zoomToFitElements: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, zoomToSelection: boolean) => {
481
+ appState: {
482
+ zoom: {
483
+ value: NormalizedZoomValue;
484
+ };
485
+ scrollX: number;
486
+ scrollY: number;
487
+ contextMenu: {
488
+ items: import("../components/ContextMenu").ContextMenuItems;
489
+ top: number;
490
+ left: number;
491
+ } | null;
492
+ showWelcomeScreen: boolean;
493
+ isLoading: boolean;
494
+ errorMessage: import("react").ReactNode;
495
+ draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
496
+ resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
497
+ multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
498
+ selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
499
+ isBindingEnabled: boolean;
500
+ startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
501
+ suggestedBindings: import("../element/binding").SuggestedBinding[];
502
+ editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
503
+ editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
504
+ activeTool: {
505
+ lastActiveTool: import("../types").LastActiveTool;
506
+ locked: boolean;
507
+ } & ({
508
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
509
+ customType: null;
510
+ } | {
511
+ type: "custom";
512
+ customType: string;
513
+ });
514
+ penMode: boolean;
515
+ penDetected: boolean;
516
+ exportBackground: boolean;
517
+ exportEmbedScene: boolean;
518
+ exportWithDarkMode: boolean;
519
+ exportScale: number;
520
+ currentItemStrokeColor: string;
521
+ currentItemBackgroundColor: string;
522
+ currentItemFillStyle: import("../element/types").FillStyle;
523
+ currentItemStrokeWidth: number;
524
+ currentItemStrokeStyle: import("../element/types").StrokeStyle;
525
+ currentItemRoughness: number;
526
+ currentItemOpacity: number;
527
+ currentItemFontFamily: number;
528
+ currentItemFontSize: number;
529
+ currentItemTextAlign: string;
530
+ currentItemStartArrowhead: import("../element/types").Arrowhead | null;
531
+ currentItemEndArrowhead: import("../element/types").Arrowhead | null;
532
+ currentItemRoundness: import("../element/types").StrokeRoundness;
533
+ viewBackgroundColor: string;
534
+ cursorButton: "up" | "down";
535
+ scrolledOutside: boolean;
536
+ name: string;
537
+ isResizing: boolean;
538
+ isRotating: boolean;
539
+ openMenu: "canvas" | "shape" | null;
540
+ openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
541
+ openSidebar: "library" | "customSidebar" | null;
542
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
543
+ isSidebarDocked: boolean;
544
+ lastPointerDownWith: import("../element/types").PointerType;
545
+ selectedElementIds: {
546
+ [id: string]: boolean;
547
+ };
548
+ previousSelectedElementIds: {
549
+ [id: string]: boolean;
550
+ };
551
+ shouldCacheIgnoreZoom: boolean;
552
+ toast: {
553
+ message: string;
554
+ closable?: boolean | undefined;
555
+ duration?: number | undefined;
556
+ } | null;
557
+ zenModeEnabled: boolean;
558
+ theme: string;
559
+ gridSize: number | null;
560
+ viewModeEnabled: boolean;
561
+ selectedGroupIds: {
562
+ [groupId: string]: boolean;
563
+ };
564
+ editingGroupId: string | null;
565
+ width: number;
566
+ height: number;
567
+ offsetTop: number;
568
+ offsetLeft: number;
569
+ fileHandle: import("browser-fs-access").FileSystemHandle | null;
570
+ collaborators: Map<string, import("../types").Collaborator>;
571
+ showStats: boolean;
572
+ currentChartType: import("../element/types").ChartType;
573
+ pasteDialog: {
574
+ shown: false;
575
+ data: null;
576
+ } | {
577
+ shown: true;
578
+ data: import("../charts").Spreadsheet;
579
+ };
580
+ pendingImageElementId: string | null;
581
+ showHyperlinkPopup: false | "info" | "editor";
582
+ selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
583
+ };
584
+ commitToHistory: boolean;
585
+ };
480
586
  export declare const actionZoomToSelected: {
481
587
  name: "zoomToSelection";
482
588
  trackEvent: {
@@ -496,7 +602,7 @@ export declare const actionZoomToSelected: {
496
602
  } | null;
497
603
  showWelcomeScreen: boolean;
498
604
  isLoading: boolean;
499
- errorMessage: string | null;
605
+ errorMessage: import("react").ReactNode;
500
606
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
501
607
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
502
608
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -612,7 +718,7 @@ export declare const actionZoomToFit: {
612
718
  } | null;
613
719
  showWelcomeScreen: boolean;
614
720
  isLoading: boolean;
615
- errorMessage: string | null;
721
+ errorMessage: import("react").ReactNode;
616
722
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
617
723
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
618
724
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -724,7 +830,7 @@ export declare const actionToggleTheme: {
724
830
  } | null;
725
831
  showWelcomeScreen: boolean;
726
832
  isLoading: boolean;
727
- errorMessage: string | null;
833
+ errorMessage: import("react").ReactNode;
728
834
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
729
835
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
730
836
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -851,7 +957,7 @@ export declare const actionToggleEraserTool: {
851
957
  } | null;
852
958
  showWelcomeScreen: boolean;
853
959
  isLoading: boolean;
854
- errorMessage: string | null;
960
+ errorMessage: import("react").ReactNode;
855
961
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
856
962
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
857
963
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -962,7 +1068,7 @@ export declare const actionToggleHandTool: {
962
1068
  } | null;
963
1069
  showWelcomeScreen: boolean;
964
1070
  isLoading: boolean;
965
- errorMessage: string | null;
1071
+ errorMessage: import("react").ReactNode;
966
1072
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
967
1073
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
968
1074
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -43,7 +43,7 @@ export declare const actionCut: {
43
43
  } | null;
44
44
  showWelcomeScreen: boolean;
45
45
  isLoading: boolean;
46
- errorMessage: string | null;
46
+ errorMessage: import("react").ReactNode;
47
47
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
48
48
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
49
49
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -177,7 +177,7 @@ export declare const actionCut: {
177
177
  } | null;
178
178
  showWelcomeScreen: boolean;
179
179
  isLoading: boolean;
180
- errorMessage: string | null;
180
+ errorMessage: import("react").ReactNode;
181
181
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
182
182
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
183
183
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -294,7 +294,7 @@ export declare const actionCut: {
294
294
  } | null;
295
295
  showWelcomeScreen: boolean;
296
296
  isLoading: boolean;
297
- errorMessage: string | null;
297
+ errorMessage: import("react").ReactNode;
298
298
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
299
299
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
300
300
  selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
@@ -19,7 +19,7 @@ export declare const actionDeleteSelected: {
19
19
  } | null;
20
20
  showWelcomeScreen: boolean;
21
21
  isLoading: boolean;
22
- errorMessage: string | null;
22
+ errorMessage: import("react").ReactNode;
23
23
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
24
24
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
25
25
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -153,7 +153,7 @@ export declare const actionDeleteSelected: {
153
153
  } | null;
154
154
  showWelcomeScreen: boolean;
155
155
  isLoading: boolean;
156
- errorMessage: string | null;
156
+ errorMessage: import("react").ReactNode;
157
157
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
158
158
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
159
159
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -270,7 +270,7 @@ export declare const actionDeleteSelected: {
270
270
  } | null;
271
271
  showWelcomeScreen: boolean;
272
272
  isLoading: boolean;
273
- errorMessage: string | null;
273
+ errorMessage: import("react").ReactNode;
274
274
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
275
275
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
276
276
  selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
@@ -13,7 +13,7 @@ export declare const actionChangeProjectName: {
13
13
  } | null;
14
14
  showWelcomeScreen: boolean;
15
15
  isLoading: boolean;
16
- errorMessage: string | null;
16
+ errorMessage: import("react").ReactNode;
17
17
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
18
18
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
19
19
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -129,7 +129,7 @@ export declare const actionChangeExportScale: {
129
129
  } | null;
130
130
  showWelcomeScreen: boolean;
131
131
  isLoading: boolean;
132
- errorMessage: string | null;
132
+ errorMessage: import("react").ReactNode;
133
133
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
134
134
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
135
135
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -245,7 +245,7 @@ export declare const actionChangeExportBackground: {
245
245
  } | null;
246
246
  showWelcomeScreen: boolean;
247
247
  isLoading: boolean;
248
- errorMessage: string | null;
248
+ errorMessage: import("react").ReactNode;
249
249
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
250
250
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
251
251
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -361,7 +361,7 @@ export declare const actionChangeExportEmbedScene: {
361
361
  } | null;
362
362
  showWelcomeScreen: boolean;
363
363
  isLoading: boolean;
364
- errorMessage: string | null;
364
+ errorMessage: import("react").ReactNode;
365
365
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
366
366
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
367
367
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -481,7 +481,7 @@ export declare const actionSaveToActiveFile: {
481
481
  } | null;
482
482
  showWelcomeScreen: boolean;
483
483
  isLoading: boolean;
484
- errorMessage: string | null;
484
+ errorMessage: import("react").ReactNode;
485
485
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
486
486
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
487
487
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -595,7 +595,7 @@ export declare const actionSaveFileToDisk: {
595
595
  } | null;
596
596
  showWelcomeScreen: boolean;
597
597
  isLoading: boolean;
598
- errorMessage: string | null;
598
+ errorMessage: import("react").ReactNode;
599
599
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
600
600
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
601
601
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -726,7 +726,7 @@ export declare const actionLoadScene: {
726
726
  } | null;
727
727
  showWelcomeScreen: boolean;
728
728
  isLoading: boolean;
729
- errorMessage: string | null;
729
+ errorMessage: import("react").ReactNode;
730
730
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
731
731
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
732
732
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -935,7 +935,7 @@ export declare const actionExportWithDarkMode: {
935
935
  } | null;
936
936
  showWelcomeScreen: boolean;
937
937
  isLoading: boolean;
938
- errorMessage: string | null;
938
+ errorMessage: import("react").ReactNode;
939
939
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
940
940
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
941
941
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -16,7 +16,7 @@ export declare const actionFinalize: {
16
16
  } | null;
17
17
  showWelcomeScreen: boolean;
18
18
  isLoading: boolean;
19
- errorMessage: string | null;
19
+ errorMessage: import("react").ReactNode;
20
20
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
21
21
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
22
22
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -141,7 +141,7 @@ export declare const actionFinalize: {
141
141
  } | null;
142
142
  showWelcomeScreen: boolean;
143
143
  isLoading: boolean;
144
- errorMessage: string | null;
144
+ errorMessage: import("react").ReactNode;
145
145
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
146
146
  selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
147
147
  isBindingEnabled: boolean;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { LinearElementEditor } from "../element/linearElementEditor";
2
3
  import { ExcalidrawLinearElement } from "../element/types";
3
4
  export declare const actionToggleLinearEditor: {
@@ -16,7 +17,7 @@ export declare const actionToggleLinearEditor: {
16
17
  } | null;
17
18
  showWelcomeScreen: boolean;
18
19
  isLoading: boolean;
19
- errorMessage: string | null;
20
+ errorMessage: import("react").ReactNode;
20
21
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
21
22
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
22
23
  multiElement: import("../element/types").NonDeleted<ExcalidrawLinearElement> | null;
@@ -14,7 +14,7 @@ export declare const actionToggleCanvasMenu: {
14
14
  } | null;
15
15
  showWelcomeScreen: boolean;
16
16
  isLoading: boolean;
17
- errorMessage: string | null;
17
+ errorMessage: import("react").ReactNode;
18
18
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
19
19
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
20
20
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -129,7 +129,7 @@ export declare const actionToggleEditMenu: {
129
129
  } | null;
130
130
  showWelcomeScreen: boolean;
131
131
  isLoading: boolean;
132
- errorMessage: string | null;
132
+ errorMessage: import("react").ReactNode;
133
133
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
134
134
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
135
135
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -260,7 +260,7 @@ export declare const actionShortcuts: {
260
260
  } | null;
261
261
  showWelcomeScreen: boolean;
262
262
  isLoading: boolean;
263
- errorMessage: string | null;
263
+ errorMessage: import("react").ReactNode;
264
264
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
265
265
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
266
266
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -31,7 +31,7 @@ export declare const actionChangeFillStyle: {
31
31
  } | null;
32
32
  showWelcomeScreen: boolean;
33
33
  isLoading: boolean;
34
- errorMessage: string | null;
34
+ errorMessage: import("react").ReactNode;
35
35
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
36
36
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
37
37
  multiElement: import("../element/types").NonDeleted<ExcalidrawLinearElement> | null;
@@ -145,7 +145,7 @@ export declare const actionChangeStrokeWidth: {
145
145
  } | null;
146
146
  showWelcomeScreen: boolean;
147
147
  isLoading: boolean;
148
- errorMessage: string | null;
148
+ errorMessage: import("react").ReactNode;
149
149
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
150
150
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
151
151
  multiElement: import("../element/types").NonDeleted<ExcalidrawLinearElement> | null;
@@ -259,7 +259,7 @@ export declare const actionChangeSloppiness: {
259
259
  } | null;
260
260
  showWelcomeScreen: boolean;
261
261
  isLoading: boolean;
262
- errorMessage: string | null;
262
+ errorMessage: import("react").ReactNode;
263
263
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
264
264
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
265
265
  multiElement: import("../element/types").NonDeleted<ExcalidrawLinearElement> | null;
@@ -373,7 +373,7 @@ export declare const actionChangeStrokeStyle: {
373
373
  } | null;
374
374
  showWelcomeScreen: boolean;
375
375
  isLoading: boolean;
376
- errorMessage: string | null;
376
+ errorMessage: import("react").ReactNode;
377
377
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
378
378
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
379
379
  multiElement: import("../element/types").NonDeleted<ExcalidrawLinearElement> | null;
@@ -487,7 +487,7 @@ export declare const actionChangeOpacity: {
487
487
  } | null;
488
488
  showWelcomeScreen: boolean;
489
489
  isLoading: boolean;
490
- errorMessage: string | null;
490
+ errorMessage: import("react").ReactNode;
491
491
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
492
492
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
493
493
  multiElement: import("../element/types").NonDeleted<ExcalidrawLinearElement> | null;
@@ -601,7 +601,7 @@ export declare const actionChangeFontSize: {
601
601
  } | null;
602
602
  showWelcomeScreen: boolean;
603
603
  isLoading: boolean;
604
- errorMessage: string | null;
604
+ errorMessage: import("react").ReactNode;
605
605
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
606
606
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
607
607
  multiElement: import("../element/types").NonDeleted<ExcalidrawLinearElement> | null;
@@ -715,7 +715,7 @@ export declare const actionDecreaseFontSize: {
715
715
  } | null;
716
716
  showWelcomeScreen: boolean;
717
717
  isLoading: boolean;
718
- errorMessage: string | null;
718
+ errorMessage: import("react").ReactNode;
719
719
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
720
720
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
721
721
  multiElement: import("../element/types").NonDeleted<ExcalidrawLinearElement> | null;
@@ -829,7 +829,7 @@ export declare const actionIncreaseFontSize: {
829
829
  } | null;
830
830
  showWelcomeScreen: boolean;
831
831
  isLoading: boolean;
832
- errorMessage: string | null;
832
+ errorMessage: import("react").ReactNode;
833
833
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
834
834
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
835
835
  multiElement: import("../element/types").NonDeleted<ExcalidrawLinearElement> | null;
@@ -943,7 +943,7 @@ export declare const actionChangeFontFamily: {
943
943
  } | null;
944
944
  showWelcomeScreen: boolean;
945
945
  isLoading: boolean;
946
- errorMessage: string | null;
946
+ errorMessage: import("react").ReactNode;
947
947
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
948
948
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
949
949
  multiElement: import("../element/types").NonDeleted<ExcalidrawLinearElement> | null;
@@ -1057,7 +1057,7 @@ export declare const actionChangeTextAlign: {
1057
1057
  } | null;
1058
1058
  showWelcomeScreen: boolean;
1059
1059
  isLoading: boolean;
1060
- errorMessage: string | null;
1060
+ errorMessage: import("react").ReactNode;
1061
1061
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
1062
1062
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
1063
1063
  multiElement: import("../element/types").NonDeleted<ExcalidrawLinearElement> | null;
@@ -1172,7 +1172,7 @@ export declare const actionChangeVerticalAlign: {
1172
1172
  } | null;
1173
1173
  showWelcomeScreen: boolean;
1174
1174
  isLoading: boolean;
1175
- errorMessage: string | null;
1175
+ errorMessage: import("react").ReactNode;
1176
1176
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
1177
1177
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
1178
1178
  multiElement: import("../element/types").NonDeleted<ExcalidrawLinearElement> | null;
@@ -1287,7 +1287,7 @@ export declare const actionChangeRoundness: {
1287
1287
  } | null;
1288
1288
  showWelcomeScreen: boolean;
1289
1289
  isLoading: boolean;
1290
- errorMessage: string | null;
1290
+ errorMessage: import("react").ReactNode;
1291
1291
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
1292
1292
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
1293
1293
  multiElement: import("../element/types").NonDeleted<ExcalidrawLinearElement> | null;
@@ -1403,7 +1403,7 @@ export declare const actionChangeArrowhead: {
1403
1403
  } | null;
1404
1404
  showWelcomeScreen: boolean;
1405
1405
  isLoading: boolean;
1406
- errorMessage: string | null;
1406
+ errorMessage: import("react").ReactNode;
1407
1407
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
1408
1408
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
1409
1409
  multiElement: import("../element/types").NonDeleted<ExcalidrawLinearElement> | null;
@@ -17,7 +17,7 @@ export declare const actionCopyStyles: {
17
17
  } | null;
18
18
  showWelcomeScreen: boolean;
19
19
  isLoading: boolean;
20
- errorMessage: string | null;
20
+ errorMessage: import("react").ReactNode;
21
21
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
22
22
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
23
23
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -17,7 +17,7 @@ export declare const actionToggleGridMode: {
17
17
  } | null;
18
18
  showWelcomeScreen: boolean;
19
19
  isLoading: boolean;
20
- errorMessage: string | null;
20
+ errorMessage: import("react").ReactNode;
21
21
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
22
22
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
23
23
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -16,7 +16,7 @@ export declare const actionToggleLock: {
16
16
  } | null;
17
17
  showWelcomeScreen: boolean;
18
18
  isLoading: boolean;
19
- errorMessage: string | null;
19
+ errorMessage: import("react").ReactNode;
20
20
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
21
21
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
22
22
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -15,7 +15,7 @@ export declare const actionToggleStats: {
15
15
  } | null;
16
16
  showWelcomeScreen: boolean;
17
17
  isLoading: boolean;
18
- errorMessage: string | null;
18
+ errorMessage: import("react").ReactNode;
19
19
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
20
20
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
21
21
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -16,7 +16,7 @@ export declare const actionToggleViewMode: {
16
16
  } | null;
17
17
  showWelcomeScreen: boolean;
18
18
  isLoading: boolean;
19
- errorMessage: string | null;
19
+ errorMessage: import("react").ReactNode;
20
20
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
21
21
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
22
22
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -16,7 +16,7 @@ export declare const actionToggleZenMode: {
16
16
  } | null;
17
17
  showWelcomeScreen: boolean;
18
18
  isLoading: boolean;
19
- errorMessage: string | null;
19
+ errorMessage: import("react").ReactNode;
20
20
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
21
21
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
22
22
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -93,7 +93,18 @@ declare class App extends React.Component<AppProps, AppState> {
93
93
  toggleLock: (source?: "keyboard" | "ui") => void;
94
94
  togglePenMode: () => void;
95
95
  onHandToolToggle: () => void;
96
- scrollToContent: (target?: ExcalidrawElement | readonly ExcalidrawElement[]) => void;
96
+ /**
97
+ * Zooms on canvas viewport center
98
+ */
99
+ zoomCanvas: (value: number) => void;
100
+ private cancelInProgresAnimation;
101
+ scrollToContent: (target?: ExcalidrawElement | readonly ExcalidrawElement[], opts?: {
102
+ fitToContent?: boolean;
103
+ animate?: boolean;
104
+ duration?: number;
105
+ }) => void;
106
+ /** use when changing scrollX/scrollY/zoom based on user interaction */
107
+ private translateCanvas;
97
108
  setToast: (toast: {
98
109
  message: string;
99
110
  closable?: boolean;
@@ -0,0 +1,2 @@
1
+ declare const BraveMeasureTextError: () => JSX.Element;
2
+ export default BraveMeasureTextError;
@@ -1,4 +1,5 @@
1
- export declare const ErrorDialog: ({ message, onClose, }: {
2
- message: string;
1
+ import React from "react";
2
+ export declare const ErrorDialog: ({ children, onClose, }: {
3
+ children?: React.ReactNode;
3
4
  onClose?: (() => void) | undefined;
4
5
  }) => JSX.Element;