@nous-excalidraw/excalidraw 0.18.9-beta.2 → 0.18.9-beta.21

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 (94) hide show
  1. package/dist/dev/{chunk-DSYRTCAK.js → chunk-6PNL5SR6.js} +34 -14
  2. package/dist/dev/chunk-6PNL5SR6.js.map +7 -0
  3. package/dist/dev/{chunk-CYLA22NC.js → chunk-FGNDYJ2B.js} +2 -2
  4. package/dist/dev/{chunk-CYLA22NC.js.map → chunk-FGNDYJ2B.js.map} +1 -1
  5. package/dist/dev/{chunk-4JOINNOK.js → chunk-IXBA2ET3.js} +3 -1
  6. package/dist/dev/chunk-IXBA2ET3.js.map +7 -0
  7. package/dist/dev/components/TTDDialog/{CodeMirrorEditor-T4CL43BJ.js → CodeMirrorEditor-LUWBT76B.js} +2 -2
  8. package/dist/dev/data/{image-OB55CB4R.js → image-5IO6LC6F.js} +3 -3
  9. package/dist/dev/index.css +2 -2
  10. package/dist/dev/index.css.map +1 -1
  11. package/dist/dev/index.js +1598 -1039
  12. package/dist/dev/index.js.map +4 -4
  13. package/dist/dev/locales/{en-WD25OMHJ.js → en-FKZ7NP7W.js} +2 -2
  14. package/dist/dev/locales/{zh-CN-SZ37453H.js → zh-CN-MQID2QWX.js} +3 -1
  15. package/dist/dev/locales/zh-CN-MQID2QWX.js.map +7 -0
  16. package/dist/dev/subset-shared.chunk.js +1 -1
  17. package/dist/dev/subset-worker.chunk.js +1 -1
  18. package/dist/prod/{chunk-LOOWOR4L.js → chunk-KGPK36EJ.js} +1 -1
  19. package/dist/prod/{chunk-CR4SD7AI.js → chunk-TFET7NMD.js} +1 -1
  20. package/dist/prod/chunk-YAGSAM37.js +4 -0
  21. package/dist/prod/components/TTDDialog/{CodeMirrorEditor-KIQDCIKP.js → CodeMirrorEditor-QL4RYZUZ.js} +1 -1
  22. package/dist/prod/data/image-LRQMDLTI.js +1 -0
  23. package/dist/prod/index.css +1 -1
  24. package/dist/prod/index.js +41 -36
  25. package/dist/prod/locales/{en-CMP6EMR6.js → en-QIAUJ35X.js} +1 -1
  26. package/dist/prod/locales/{zh-CN-MVX3E32U.js → zh-CN-3F3C6RA5.js} +1 -1
  27. package/dist/prod/subset-shared.chunk.js +1 -1
  28. package/dist/prod/subset-worker.chunk.js +1 -1
  29. package/dist/types/common/src/constants.d.ts +12 -20
  30. package/dist/types/common/src/fontSize.d.ts +27 -0
  31. package/dist/types/common/src/index.d.ts +2 -0
  32. package/dist/types/common/src/strokeWidth.d.ts +68 -0
  33. package/dist/types/common/src/zoomDisplay.d.ts +3 -0
  34. package/dist/types/common/src/zoomStep.d.ts +15 -0
  35. package/dist/types/element/src/Scene.d.ts +1 -1
  36. package/dist/types/element/src/bounds.d.ts +6 -1
  37. package/dist/types/element/src/comparisons.d.ts +5 -5
  38. package/dist/types/element/src/frame.d.ts +2 -5
  39. package/dist/types/element/src/index.d.ts +1 -0
  40. package/dist/types/element/src/renderElement.d.ts +1 -0
  41. package/dist/types/element/src/resizeElements.d.ts +1 -2
  42. package/dist/types/element/src/selection.d.ts +1 -1
  43. package/dist/types/element/src/shape.d.ts +5 -3
  44. package/dist/types/element/src/strokeWidth.d.ts +11 -0
  45. package/dist/types/element/src/typeChecks.d.ts +3 -1
  46. package/dist/types/element/src/types.d.ts +8 -5
  47. package/dist/types/element/src/utils.d.ts +3 -1
  48. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +3 -0
  49. package/dist/types/excalidraw/actions/actionBoundText.d.ts +2 -0
  50. package/dist/types/excalidraw/actions/actionCanvas.d.ts +59 -31
  51. package/dist/types/excalidraw/actions/actionClipboard.d.ts +2 -0
  52. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +1 -0
  53. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +3 -0
  54. package/dist/types/excalidraw/actions/actionDeselect.d.ts +1 -0
  55. package/dist/types/excalidraw/actions/actionElementLink.d.ts +1 -0
  56. package/dist/types/excalidraw/actions/actionElementLock.d.ts +2 -0
  57. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +1 -0
  58. package/dist/types/excalidraw/actions/actionExport.d.ts +8 -6
  59. package/dist/types/excalidraw/actions/actionFrame.d.ts +38 -0
  60. package/dist/types/excalidraw/actions/actionGroup.d.ts +2 -0
  61. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +35 -0
  62. package/dist/types/excalidraw/actions/actionLink.d.ts +1 -0
  63. package/dist/types/excalidraw/actions/actionMenu.d.ts +1 -0
  64. package/dist/types/excalidraw/actions/actionProperties.d.ts +2 -0
  65. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +1 -0
  66. package/dist/types/excalidraw/actions/actionStyles.d.ts +1 -0
  67. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +1 -0
  68. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +1 -0
  69. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +1 -0
  70. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +1 -0
  71. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +1 -0
  72. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +1 -0
  73. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +1 -0
  74. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +1 -0
  75. package/dist/types/excalidraw/appState.d.ts +5 -5
  76. package/dist/types/excalidraw/components/App.d.ts +28 -3
  77. package/dist/types/excalidraw/components/icons.d.ts +1 -0
  78. package/dist/types/excalidraw/components/shapes.d.ts +22 -1
  79. package/dist/types/excalidraw/data/blob.d.ts +14 -12
  80. package/dist/types/excalidraw/data/json.d.ts +7 -6
  81. package/dist/types/excalidraw/scene/types.d.ts +7 -0
  82. package/dist/types/excalidraw/scene/zoom.d.ts +2 -0
  83. package/dist/types/excalidraw/snapping.d.ts +1 -1
  84. package/dist/types/excalidraw/types.d.ts +7 -2
  85. package/dist/types/utils/src/shape.d.ts +2 -2
  86. package/package.json +4 -4
  87. package/dist/dev/chunk-4JOINNOK.js.map +0 -7
  88. package/dist/dev/chunk-DSYRTCAK.js.map +0 -7
  89. package/dist/dev/locales/zh-CN-SZ37453H.js.map +0 -7
  90. package/dist/prod/chunk-HFHOWOFT.js +0 -4
  91. package/dist/prod/data/image-5LSIY7YB.js +0 -1
  92. /package/dist/dev/components/TTDDialog/{CodeMirrorEditor-T4CL43BJ.js.map → CodeMirrorEditor-LUWBT76B.js.map} +0 -0
  93. /package/dist/dev/data/{image-OB55CB4R.js.map → image-5IO6LC6F.js.map} +0 -0
  94. /package/dist/dev/locales/{en-WD25OMHJ.js.map → en-FKZ7NP7W.js.map} +0 -0
@@ -34,6 +34,7 @@ export declare const actionClearCanvas: {
34
34
  fromSelection: boolean;
35
35
  } & import("../types").ActiveTool;
36
36
  viewBackgroundColor: string;
37
+ zoom: import("../types").Zoom;
37
38
  frameRendering: {
38
39
  enabled: boolean;
39
40
  name: boolean;
@@ -41,9 +42,6 @@ export declare const actionClearCanvas: {
41
42
  clip: boolean;
42
43
  };
43
44
  name: string | null;
44
- zoom: import("../types").Zoom;
45
- isBindingEnabled: boolean;
46
- isMidpointSnappingEnabled: boolean;
47
45
  selectedElementIds: Readonly<{
48
46
  [id: string]: true;
49
47
  }>;
@@ -81,11 +79,14 @@ export declare const actionClearCanvas: {
81
79
  selectedLinearElement: import("@nous-excalidraw/element").LinearElementEditor | null;
82
80
  multiElement: import("@nous-excalidraw/element/types").NonDeleted<import("@nous-excalidraw/element/types").ExcalidrawLinearElement> | null;
83
81
  newElement: import("@nous-excalidraw/element/types").NonDeleted<import("@nous-excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
82
+ isBindingEnabled: boolean;
83
+ isMidpointSnappingEnabled: boolean;
84
84
  suggestedBinding: {
85
85
  element: import("@nous-excalidraw/element/types").NonDeleted<import("@nous-excalidraw/element/types").ExcalidrawBindableElement>;
86
86
  midPoint?: import("@nous-excalidraw/math").GlobalPoint;
87
87
  } | null;
88
88
  isRotating: boolean;
89
+ isResizing: boolean;
89
90
  elementsToHighlight: import("@nous-excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
90
91
  collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
91
92
  snapLines: readonly import("../snapping").SnapLine[];
@@ -105,7 +106,6 @@ export declare const actionClearCanvas: {
105
106
  exportScale: number;
106
107
  currentItemArrowType: "sharp" | "round" | "elbow";
107
108
  selectedElementsAreBeingDragged: boolean;
108
- bindMode: import("@nous-excalidraw/element/types").BindMode;
109
109
  contextMenu: {
110
110
  items: import("../components/ContextMenu").ContextMenuItems;
111
111
  top: number;
@@ -129,6 +129,7 @@ export declare const actionClearCanvas: {
129
129
  currentItemBackgroundColor: string;
130
130
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
131
131
  currentItemStrokeWidth: number;
132
+ currentItemStrokeWidthCustom: boolean;
132
133
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
133
134
  currentItemRoughness: number;
134
135
  currentItemOpacity: number;
@@ -141,7 +142,6 @@ export declare const actionClearCanvas: {
141
142
  currentItemRoundness: import("@nous-excalidraw/element/types").StrokeRoundness;
142
143
  cursorButton: "up" | "down";
143
144
  scrolledOutside: boolean;
144
- isResizing: boolean;
145
145
  openMenu: "canvas" | null;
146
146
  openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
147
147
  openSidebar: {
@@ -170,6 +170,7 @@ export declare const actionClearCanvas: {
170
170
  lockedMultiSelections: {
171
171
  [groupId: string]: true;
172
172
  };
173
+ bindMode: import("@nous-excalidraw/element/types").BindMode;
173
174
  };
174
175
  captureUpdate: "IMMEDIATELY";
175
176
  };
@@ -184,7 +185,8 @@ export declare const actionZoomIn: {
184
185
  trackEvent: {
185
186
  category: "canvas";
186
187
  };
187
- perform: (_elements: readonly import("@nous-excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
188
+ perform: (elements: readonly import("@nous-excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
189
+ elements: ExcalidrawElement[];
188
190
  appState: {
189
191
  userToFollow: null;
190
192
  scrollX: number;
@@ -192,6 +194,8 @@ export declare const actionZoomIn: {
192
194
  zoom: {
193
195
  value: import("../types").NormalizedZoomValue;
194
196
  };
197
+ currentItemStrokeWidth: number;
198
+ currentItemFontSize: number;
195
199
  contextMenu: {
196
200
  items: import("../components/ContextMenu").ContextMenuItems;
197
201
  top: number;
@@ -247,12 +251,11 @@ export declare const actionZoomIn: {
247
251
  currentItemStrokeColor: string;
248
252
  currentItemBackgroundColor: string;
249
253
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
250
- currentItemStrokeWidth: number;
254
+ currentItemStrokeWidthCustom: boolean;
251
255
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
252
256
  currentItemRoughness: number;
253
257
  currentItemOpacity: number;
254
258
  currentItemFontFamily: import("@nous-excalidraw/element/types").FontFamilyValues;
255
- currentItemFontSize: number;
256
259
  currentItemTextAlign: import("@nous-excalidraw/element/types").TextAlign;
257
260
  currentItemStartArrowhead: import("@nous-excalidraw/element/types").Arrowhead | null;
258
261
  currentItemEndArrowhead: import("@nous-excalidraw/element/types").Arrowhead | null;
@@ -362,7 +365,8 @@ export declare const actionZoomOut: {
362
365
  trackEvent: {
363
366
  category: "canvas";
364
367
  };
365
- perform: (_elements: readonly import("@nous-excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
368
+ perform: (elements: readonly import("@nous-excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
369
+ elements: ExcalidrawElement[];
366
370
  appState: {
367
371
  userToFollow: null;
368
372
  scrollX: number;
@@ -370,6 +374,8 @@ export declare const actionZoomOut: {
370
374
  zoom: {
371
375
  value: import("../types").NormalizedZoomValue;
372
376
  };
377
+ currentItemStrokeWidth: number;
378
+ currentItemFontSize: number;
373
379
  contextMenu: {
374
380
  items: import("../components/ContextMenu").ContextMenuItems;
375
381
  top: number;
@@ -425,12 +431,11 @@ export declare const actionZoomOut: {
425
431
  currentItemStrokeColor: string;
426
432
  currentItemBackgroundColor: string;
427
433
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
428
- currentItemStrokeWidth: number;
434
+ currentItemStrokeWidthCustom: boolean;
429
435
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
430
436
  currentItemRoughness: number;
431
437
  currentItemOpacity: number;
432
438
  currentItemFontFamily: import("@nous-excalidraw/element/types").FontFamilyValues;
433
- currentItemFontSize: number;
434
439
  currentItemTextAlign: import("@nous-excalidraw/element/types").TextAlign;
435
440
  currentItemStartArrowhead: import("@nous-excalidraw/element/types").Arrowhead | null;
436
441
  currentItemEndArrowhead: import("@nous-excalidraw/element/types").Arrowhead | null;
@@ -540,7 +545,8 @@ export declare const actionResetZoom: {
540
545
  trackEvent: {
541
546
  category: "canvas";
542
547
  };
543
- perform: (_elements: readonly import("@nous-excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
548
+ perform: (elements: readonly import("@nous-excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
549
+ elements: ExcalidrawElement[];
544
550
  appState: {
545
551
  userToFollow: null;
546
552
  scrollX: number;
@@ -548,6 +554,8 @@ export declare const actionResetZoom: {
548
554
  zoom: {
549
555
  value: import("../types").NormalizedZoomValue;
550
556
  };
557
+ currentItemStrokeWidth: number;
558
+ currentItemFontSize: number;
551
559
  contextMenu: {
552
560
  items: import("../components/ContextMenu").ContextMenuItems;
553
561
  top: number;
@@ -603,12 +611,11 @@ export declare const actionResetZoom: {
603
611
  currentItemStrokeColor: string;
604
612
  currentItemBackgroundColor: string;
605
613
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
606
- currentItemStrokeWidth: number;
614
+ currentItemStrokeWidthCustom: boolean;
607
615
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
608
616
  currentItemRoughness: number;
609
617
  currentItemOpacity: number;
610
618
  currentItemFontFamily: import("@nous-excalidraw/element/types").FontFamilyValues;
611
- currentItemFontSize: number;
612
619
  currentItemTextAlign: import("@nous-excalidraw/element/types").TextAlign;
613
620
  currentItemStartArrowhead: import("@nous-excalidraw/element/types").Arrowhead | null;
614
621
  currentItemEndArrowhead: import("@nous-excalidraw/element/types").Arrowhead | null;
@@ -710,9 +717,13 @@ export declare const actionResetZoom: {
710
717
  } & {
711
718
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
712
719
  };
713
- export declare const zoomToFitBounds: ({ bounds, appState, canvasOffsets, fitToViewport, viewportZoomFactor, minZoom, maxZoom, }: {
720
+ export declare const zoomToFitBounds: ({ bounds, appState, canvasOffsets, fitCanvasOffsets, scrollCanvasOffsets, fitToViewport, viewportZoomFactor, minZoom, maxZoom, elements, }: {
714
721
  bounds: SceneBounds;
715
722
  canvasOffsets?: Offsets;
723
+ /** offsets used only for zoom / effective viewport size */
724
+ fitCanvasOffsets?: Offsets;
725
+ /** offsets used only for scroll centering (defaults to fitCanvasOffsets) */
726
+ scrollCanvasOffsets?: Offsets;
716
727
  appState: Readonly<AppState>;
717
728
  /** whether to fit content to viewport (beyond >100%) */
718
729
  fitToViewport: boolean;
@@ -720,13 +731,18 @@ export declare const zoomToFitBounds: ({ bounds, appState, canvasOffsets, fitToV
720
731
  viewportZoomFactor?: number;
721
732
  minZoom?: number;
722
733
  maxZoom?: number;
734
+ elements?: readonly ExcalidrawElement[];
723
735
  }) => {
736
+ captureUpdate: "EVENTUALLY";
737
+ elements?: ExcalidrawElement[] | undefined;
724
738
  appState: {
725
739
  scrollX: number;
726
740
  scrollY: number;
727
741
  zoom: {
728
742
  value: import("../types").NormalizedZoomValue;
729
743
  };
744
+ currentItemStrokeWidth: number;
745
+ currentItemFontSize: number;
730
746
  contextMenu: {
731
747
  items: import("../components/ContextMenu").ContextMenuItems;
732
748
  top: number;
@@ -782,12 +798,11 @@ export declare const zoomToFitBounds: ({ bounds, appState, canvasOffsets, fitToV
782
798
  currentItemStrokeColor: string;
783
799
  currentItemBackgroundColor: string;
784
800
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
785
- currentItemStrokeWidth: number;
801
+ currentItemStrokeWidthCustom: boolean;
786
802
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
787
803
  currentItemRoughness: number;
788
804
  currentItemOpacity: number;
789
805
  currentItemFontFamily: import("@nous-excalidraw/element/types").FontFamilyValues;
790
- currentItemFontSize: number;
791
806
  currentItemTextAlign: import("@nous-excalidraw/element/types").TextAlign;
792
807
  currentItemStartArrowhead: import("@nous-excalidraw/element/types").Arrowhead | null;
793
808
  currentItemEndArrowhead: import("@nous-excalidraw/element/types").Arrowhead | null;
@@ -883,10 +898,11 @@ export declare const zoomToFitBounds: ({ bounds, appState, canvasOffsets, fitToV
883
898
  };
884
899
  bindMode: import("@nous-excalidraw/element/types").BindMode;
885
900
  };
886
- captureUpdate: "EVENTUALLY";
887
901
  };
888
- export declare const zoomToFit: ({ canvasOffsets, targetElements, appState, fitToViewport, viewportZoomFactor, minZoom, maxZoom, }: {
902
+ export declare const zoomToFit: ({ canvasOffsets, fitCanvasOffsets, scrollCanvasOffsets, targetElements, appState, fitToViewport, viewportZoomFactor, minZoom, maxZoom, elements, }: {
889
903
  canvasOffsets?: Offsets;
904
+ fitCanvasOffsets?: Offsets;
905
+ scrollCanvasOffsets?: Offsets;
890
906
  targetElements: readonly ExcalidrawElement[];
891
907
  appState: Readonly<AppState>;
892
908
  /** whether to fit content to viewport (beyond >100%) */
@@ -895,13 +911,18 @@ export declare const zoomToFit: ({ canvasOffsets, targetElements, appState, fitT
895
911
  viewportZoomFactor?: number;
896
912
  minZoom?: number;
897
913
  maxZoom?: number;
914
+ elements?: readonly ExcalidrawElement[];
898
915
  }) => {
916
+ captureUpdate: "EVENTUALLY";
917
+ elements?: ExcalidrawElement[] | undefined;
899
918
  appState: {
900
919
  scrollX: number;
901
920
  scrollY: number;
902
921
  zoom: {
903
922
  value: import("../types").NormalizedZoomValue;
904
923
  };
924
+ currentItemStrokeWidth: number;
925
+ currentItemFontSize: number;
905
926
  contextMenu: {
906
927
  items: import("../components/ContextMenu").ContextMenuItems;
907
928
  top: number;
@@ -957,12 +978,11 @@ export declare const zoomToFit: ({ canvasOffsets, targetElements, appState, fitT
957
978
  currentItemStrokeColor: string;
958
979
  currentItemBackgroundColor: string;
959
980
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
960
- currentItemStrokeWidth: number;
981
+ currentItemStrokeWidthCustom: boolean;
961
982
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
962
983
  currentItemRoughness: number;
963
984
  currentItemOpacity: number;
964
985
  currentItemFontFamily: import("@nous-excalidraw/element/types").FontFamilyValues;
965
- currentItemFontSize: number;
966
986
  currentItemTextAlign: import("@nous-excalidraw/element/types").TextAlign;
967
987
  currentItemStartArrowhead: import("@nous-excalidraw/element/types").Arrowhead | null;
968
988
  currentItemEndArrowhead: import("@nous-excalidraw/element/types").Arrowhead | null;
@@ -1058,7 +1078,6 @@ export declare const zoomToFit: ({ canvasOffsets, targetElements, appState, fitT
1058
1078
  };
1059
1079
  bindMode: import("@nous-excalidraw/element/types").BindMode;
1060
1080
  };
1061
- captureUpdate: "EVENTUALLY";
1062
1081
  };
1063
1082
  export declare const actionZoomToFitSelectionInViewport: {
1064
1083
  name: "zoomToFitSelectionInViewport";
@@ -1068,12 +1087,16 @@ export declare const actionZoomToFitSelectionInViewport: {
1068
1087
  category: "canvas";
1069
1088
  };
1070
1089
  perform: (elements: readonly import("@nous-excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
1090
+ captureUpdate: "EVENTUALLY";
1091
+ elements?: ExcalidrawElement[] | undefined;
1071
1092
  appState: {
1072
1093
  scrollX: number;
1073
1094
  scrollY: number;
1074
1095
  zoom: {
1075
1096
  value: import("../types").NormalizedZoomValue;
1076
1097
  };
1098
+ currentItemStrokeWidth: number;
1099
+ currentItemFontSize: number;
1077
1100
  contextMenu: {
1078
1101
  items: import("../components/ContextMenu").ContextMenuItems;
1079
1102
  top: number;
@@ -1129,12 +1152,11 @@ export declare const actionZoomToFitSelectionInViewport: {
1129
1152
  currentItemStrokeColor: string;
1130
1153
  currentItemBackgroundColor: string;
1131
1154
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
1132
- currentItemStrokeWidth: number;
1155
+ currentItemStrokeWidthCustom: boolean;
1133
1156
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
1134
1157
  currentItemRoughness: number;
1135
1158
  currentItemOpacity: number;
1136
1159
  currentItemFontFamily: import("@nous-excalidraw/element/types").FontFamilyValues;
1137
- currentItemFontSize: number;
1138
1160
  currentItemTextAlign: import("@nous-excalidraw/element/types").TextAlign;
1139
1161
  currentItemStartArrowhead: import("@nous-excalidraw/element/types").Arrowhead | null;
1140
1162
  currentItemEndArrowhead: import("@nous-excalidraw/element/types").Arrowhead | null;
@@ -1230,7 +1252,6 @@ export declare const actionZoomToFitSelectionInViewport: {
1230
1252
  };
1231
1253
  bindMode: import("@nous-excalidraw/element/types").BindMode;
1232
1254
  };
1233
- captureUpdate: "EVENTUALLY";
1234
1255
  };
1235
1256
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
1236
1257
  } & {
@@ -1244,12 +1265,16 @@ export declare const actionZoomToFitSelection: {
1244
1265
  category: "canvas";
1245
1266
  };
1246
1267
  perform: (elements: readonly import("@nous-excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
1268
+ captureUpdate: "EVENTUALLY";
1269
+ elements?: ExcalidrawElement[] | undefined;
1247
1270
  appState: {
1248
1271
  scrollX: number;
1249
1272
  scrollY: number;
1250
1273
  zoom: {
1251
1274
  value: import("../types").NormalizedZoomValue;
1252
1275
  };
1276
+ currentItemStrokeWidth: number;
1277
+ currentItemFontSize: number;
1253
1278
  contextMenu: {
1254
1279
  items: import("../components/ContextMenu").ContextMenuItems;
1255
1280
  top: number;
@@ -1305,12 +1330,11 @@ export declare const actionZoomToFitSelection: {
1305
1330
  currentItemStrokeColor: string;
1306
1331
  currentItemBackgroundColor: string;
1307
1332
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
1308
- currentItemStrokeWidth: number;
1333
+ currentItemStrokeWidthCustom: boolean;
1309
1334
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
1310
1335
  currentItemRoughness: number;
1311
1336
  currentItemOpacity: number;
1312
1337
  currentItemFontFamily: import("@nous-excalidraw/element/types").FontFamilyValues;
1313
- currentItemFontSize: number;
1314
1338
  currentItemTextAlign: import("@nous-excalidraw/element/types").TextAlign;
1315
1339
  currentItemStartArrowhead: import("@nous-excalidraw/element/types").Arrowhead | null;
1316
1340
  currentItemEndArrowhead: import("@nous-excalidraw/element/types").Arrowhead | null;
@@ -1406,7 +1430,6 @@ export declare const actionZoomToFitSelection: {
1406
1430
  };
1407
1431
  bindMode: import("@nous-excalidraw/element/types").BindMode;
1408
1432
  };
1409
- captureUpdate: "EVENTUALLY";
1410
1433
  };
1411
1434
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
1412
1435
  } & {
@@ -1421,12 +1444,16 @@ export declare const actionZoomToFit: {
1421
1444
  category: "canvas";
1422
1445
  };
1423
1446
  perform: (elements: readonly import("@nous-excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
1447
+ captureUpdate: "EVENTUALLY";
1448
+ elements?: ExcalidrawElement[] | undefined;
1424
1449
  appState: {
1425
1450
  scrollX: number;
1426
1451
  scrollY: number;
1427
1452
  zoom: {
1428
1453
  value: import("../types").NormalizedZoomValue;
1429
1454
  };
1455
+ currentItemStrokeWidth: number;
1456
+ currentItemFontSize: number;
1430
1457
  contextMenu: {
1431
1458
  items: import("../components/ContextMenu").ContextMenuItems;
1432
1459
  top: number;
@@ -1482,12 +1509,11 @@ export declare const actionZoomToFit: {
1482
1509
  currentItemStrokeColor: string;
1483
1510
  currentItemBackgroundColor: string;
1484
1511
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
1485
- currentItemStrokeWidth: number;
1512
+ currentItemStrokeWidthCustom: boolean;
1486
1513
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
1487
1514
  currentItemRoughness: number;
1488
1515
  currentItemOpacity: number;
1489
1516
  currentItemFontFamily: import("@nous-excalidraw/element/types").FontFamilyValues;
1490
- currentItemFontSize: number;
1491
1517
  currentItemTextAlign: import("@nous-excalidraw/element/types").TextAlign;
1492
1518
  currentItemStartArrowhead: import("@nous-excalidraw/element/types").Arrowhead | null;
1493
1519
  currentItemEndArrowhead: import("@nous-excalidraw/element/types").Arrowhead | null;
@@ -1583,7 +1609,6 @@ export declare const actionZoomToFit: {
1583
1609
  };
1584
1610
  bindMode: import("@nous-excalidraw/element/types").BindMode;
1585
1611
  };
1586
- captureUpdate: "EVENTUALLY";
1587
1612
  };
1588
1613
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
1589
1614
  } & {
@@ -1655,6 +1680,7 @@ export declare const actionToggleEraserTool: {
1655
1680
  currentItemBackgroundColor: string;
1656
1681
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
1657
1682
  currentItemStrokeWidth: number;
1683
+ currentItemStrokeWidthCustom: boolean;
1658
1684
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
1659
1685
  currentItemRoughness: number;
1660
1686
  currentItemOpacity: number;
@@ -1823,6 +1849,7 @@ export declare const actionToggleLassoTool: {
1823
1849
  currentItemBackgroundColor: string;
1824
1850
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
1825
1851
  currentItemStrokeWidth: number;
1852
+ currentItemStrokeWidthCustom: boolean;
1826
1853
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
1827
1854
  currentItemRoughness: number;
1828
1855
  currentItemOpacity: number;
@@ -1990,6 +2017,7 @@ export declare const actionToggleHandTool: {
1990
2017
  currentItemBackgroundColor: string;
1991
2018
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
1992
2019
  currentItemStrokeWidth: number;
2020
+ currentItemStrokeWidthCustom: boolean;
1993
2021
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
1994
2022
  currentItemRoughness: number;
1995
2023
  currentItemOpacity: number;
@@ -66,6 +66,7 @@ export declare const actionPaste: {
66
66
  currentItemBackgroundColor: string;
67
67
  currentItemFillStyle: import("@nous-excalidraw/element/types").ExcalidrawElement["fillStyle"];
68
68
  currentItemStrokeWidth: number;
69
+ currentItemStrokeWidthCustom: boolean;
69
70
  currentItemStrokeStyle: import("@nous-excalidraw/element/types").ExcalidrawElement["strokeStyle"];
70
71
  currentItemRoughness: number;
71
72
  currentItemOpacity: number;
@@ -278,6 +279,7 @@ export declare const actionCopyAsPng: {
278
279
  currentItemBackgroundColor: string;
279
280
  currentItemFillStyle: import("@nous-excalidraw/element/types").ExcalidrawElement["fillStyle"];
280
281
  currentItemStrokeWidth: number;
282
+ currentItemStrokeWidthCustom: boolean;
281
283
  currentItemStrokeStyle: import("@nous-excalidraw/element/types").ExcalidrawElement["strokeStyle"];
282
284
  currentItemRoughness: number;
283
285
  currentItemOpacity: number;
@@ -67,6 +67,7 @@ export declare const actionToggleCropEditor: {
67
67
  currentItemBackgroundColor: string;
68
68
  currentItemFillStyle: import("@nous-excalidraw/element/types").ExcalidrawElement["fillStyle"];
69
69
  currentItemStrokeWidth: number;
70
+ currentItemStrokeWidthCustom: boolean;
70
71
  currentItemStrokeStyle: import("@nous-excalidraw/element/types").ExcalidrawElement["strokeStyle"];
71
72
  currentItemRoughness: number;
72
73
  currentItemOpacity: number;
@@ -68,6 +68,7 @@ export declare const actionDeleteSelected: {
68
68
  currentItemBackgroundColor: string;
69
69
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
70
70
  currentItemStrokeWidth: number;
71
+ currentItemStrokeWidthCustom: boolean;
71
72
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
72
73
  currentItemRoughness: number;
73
74
  currentItemOpacity: number;
@@ -263,6 +264,7 @@ export declare const actionDeleteSelected: {
263
264
  currentItemBackgroundColor: string;
264
265
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
265
266
  currentItemStrokeWidth: number;
267
+ currentItemStrokeWidthCustom: boolean;
266
268
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
267
269
  currentItemRoughness: number;
268
270
  currentItemOpacity: number;
@@ -426,6 +428,7 @@ export declare const actionDeleteSelected: {
426
428
  currentItemBackgroundColor: string;
427
429
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
428
430
  currentItemStrokeWidth: number;
431
+ currentItemStrokeWidthCustom: boolean;
429
432
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
430
433
  currentItemRoughness: number;
431
434
  currentItemOpacity: number;
@@ -60,6 +60,7 @@ export declare const actionDeselect: {
60
60
  currentItemBackgroundColor: string;
61
61
  currentItemFillStyle: import("@nous-excalidraw/element/types").ExcalidrawElement["fillStyle"];
62
62
  currentItemStrokeWidth: number;
63
+ currentItemStrokeWidthCustom: boolean;
63
64
  currentItemStrokeStyle: import("@nous-excalidraw/element/types").ExcalidrawElement["strokeStyle"];
64
65
  currentItemRoughness: number;
65
66
  currentItemOpacity: number;
@@ -96,6 +96,7 @@ export declare const actionLinkToElement: {
96
96
  currentItemBackgroundColor: string;
97
97
  currentItemFillStyle: import("@nous-excalidraw/element/types").ExcalidrawElement["fillStyle"];
98
98
  currentItemStrokeWidth: number;
99
+ currentItemStrokeWidthCustom: boolean;
99
100
  currentItemStrokeStyle: import("@nous-excalidraw/element/types").ExcalidrawElement["strokeStyle"];
100
101
  currentItemRoughness: number;
101
102
  currentItemOpacity: number;
@@ -78,6 +78,7 @@ export declare const actionToggleElementLock: {
78
78
  currentItemBackgroundColor: string;
79
79
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
80
80
  currentItemStrokeWidth: number;
81
+ currentItemStrokeWidthCustom: boolean;
81
82
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
82
83
  currentItemRoughness: number;
83
84
  currentItemOpacity: number;
@@ -251,6 +252,7 @@ export declare const actionUnlockAllElements: {
251
252
  currentItemBackgroundColor: string;
252
253
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
253
254
  currentItemStrokeWidth: number;
255
+ currentItemStrokeWidthCustom: boolean;
254
256
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
255
257
  currentItemRoughness: number;
256
258
  currentItemOpacity: number;
@@ -64,6 +64,7 @@ export declare const actionSetEmbeddableAsActiveTool: {
64
64
  currentItemBackgroundColor: string;
65
65
  currentItemFillStyle: import("@nous-excalidraw/element/types").ExcalidrawElement["fillStyle"];
66
66
  currentItemStrokeWidth: number;
67
+ currentItemStrokeWidthCustom: boolean;
67
68
  currentItemStrokeStyle: import("@nous-excalidraw/element/types").ExcalidrawElement["strokeStyle"];
68
69
  currentItemRoughness: number;
69
70
  currentItemOpacity: number;
@@ -84,6 +84,7 @@ export declare const actionLoadScene: {
84
84
  appState: {
85
85
  viewBackgroundColor: string;
86
86
  theme: Theme;
87
+ zoom: import("../types").Zoom;
87
88
  frameRendering: {
88
89
  enabled: boolean;
89
90
  name: boolean;
@@ -91,9 +92,6 @@ export declare const actionLoadScene: {
91
92
  clip: boolean;
92
93
  };
93
94
  name: string | null;
94
- zoom: import("../types").Zoom;
95
- isBindingEnabled: boolean;
96
- isMidpointSnappingEnabled: boolean;
97
95
  selectedElementIds: Readonly<{
98
96
  [id: string]: true;
99
97
  }>;
@@ -136,11 +134,14 @@ export declare const actionLoadScene: {
136
134
  selectedLinearElement: import("@nous-excalidraw/element").LinearElementEditor | null;
137
135
  multiElement: import("@nous-excalidraw/element/types").NonDeleted<import("@nous-excalidraw/element/types").ExcalidrawLinearElement> | null;
138
136
  newElement: import("@nous-excalidraw/element/types").NonDeleted<import("@nous-excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
137
+ isBindingEnabled: boolean;
138
+ isMidpointSnappingEnabled: boolean;
139
139
  suggestedBinding: {
140
140
  element: import("@nous-excalidraw/element/types").NonDeleted<import("@nous-excalidraw/element/types").ExcalidrawBindableElement>;
141
141
  midPoint?: import("@nous-excalidraw/math").GlobalPoint;
142
142
  } | null;
143
143
  isRotating: boolean;
144
+ isResizing: boolean;
144
145
  elementsToHighlight: import("@nous-excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
145
146
  collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
146
147
  snapLines: readonly import("../snapping").SnapLine[];
@@ -160,8 +161,6 @@ export declare const actionLoadScene: {
160
161
  exportScale: number;
161
162
  currentItemArrowType: "sharp" | "round" | "elbow";
162
163
  selectedElementsAreBeingDragged: boolean;
163
- bindMode: import("@nous-excalidraw/element/types").BindMode;
164
- gridSize: number;
165
164
  contextMenu: {
166
165
  items: import("../components/ContextMenu").ContextMenuItems;
167
166
  top: number;
@@ -189,6 +188,7 @@ export declare const actionLoadScene: {
189
188
  currentItemBackgroundColor: string;
190
189
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
191
190
  currentItemStrokeWidth: number;
191
+ currentItemStrokeWidthCustom: boolean;
192
192
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
193
193
  currentItemRoughness: number;
194
194
  currentItemOpacity: number;
@@ -201,7 +201,6 @@ export declare const actionLoadScene: {
201
201
  currentItemRoundness: import("@nous-excalidraw/element/types").StrokeRoundness;
202
202
  cursorButton: "up" | "down";
203
203
  scrolledOutside: boolean;
204
- isResizing: boolean;
205
204
  openMenu: "canvas" | null;
206
205
  openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
207
206
  openSidebar: {
@@ -218,6 +217,7 @@ export declare const actionLoadScene: {
218
217
  closable?: boolean;
219
218
  duration?: number;
220
219
  } | null;
220
+ gridSize: number;
221
221
  gridStep: number;
222
222
  gridModeEnabled: boolean;
223
223
  fileHandle: FileSystemFileHandle | null;
@@ -236,6 +236,7 @@ export declare const actionLoadScene: {
236
236
  lockedMultiSelections: {
237
237
  [groupId: string]: true;
238
238
  };
239
+ bindMode: import("@nous-excalidraw/element/types").BindMode;
239
240
  };
240
241
  files: BinaryFiles;
241
242
  captureUpdate: "IMMEDIATELY";
@@ -298,6 +299,7 @@ export declare const actionLoadScene: {
298
299
  currentItemBackgroundColor: string;
299
300
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
300
301
  currentItemStrokeWidth: number;
302
+ currentItemStrokeWidthCustom: boolean;
301
303
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
302
304
  currentItemRoughness: number;
303
305
  currentItemOpacity: number;
@@ -66,6 +66,7 @@ export declare const actionSelectAllElementsInFrame: {
66
66
  currentItemBackgroundColor: string;
67
67
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
68
68
  currentItemStrokeWidth: number;
69
+ currentItemStrokeWidthCustom: boolean;
69
70
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
70
71
  currentItemRoughness: number;
71
72
  currentItemOpacity: number;
@@ -244,6 +245,7 @@ export declare const actionRemoveAllElementsFromFrame: {
244
245
  currentItemBackgroundColor: string;
245
246
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
246
247
  currentItemStrokeWidth: number;
248
+ currentItemStrokeWidthCustom: boolean;
247
249
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
248
250
  currentItemRoughness: number;
249
251
  currentItemOpacity: number;
@@ -420,6 +422,7 @@ export declare const actionupdateFrameRendering: {
420
422
  currentItemBackgroundColor: string;
421
423
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
422
424
  currentItemStrokeWidth: number;
425
+ currentItemStrokeWidthCustom: boolean;
423
426
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
424
427
  currentItemRoughness: number;
425
428
  currentItemOpacity: number;
@@ -596,6 +599,7 @@ export declare const actionSetFrameAsActiveTool: {
596
599
  currentItemBackgroundColor: string;
597
600
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
598
601
  currentItemStrokeWidth: number;
602
+ currentItemStrokeWidthCustom: boolean;
599
603
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
600
604
  currentItemRoughness: number;
601
605
  currentItemOpacity: number;
@@ -884,6 +888,40 @@ export declare const actionWrapSelectionInFrame: {
884
888
  link: string | null;
885
889
  locked: boolean;
886
890
  customData?: Record<string, any>;
891
+ }> & {
892
+ type: "triangle";
893
+ } & {
894
+ index: import("@nous-excalidraw/element/types").FractionalIndex;
895
+ }) | (Readonly<{
896
+ id: string;
897
+ x: number;
898
+ y: number;
899
+ strokeColor: string;
900
+ backgroundColor: string;
901
+ fillStyle: import("@nous-excalidraw/element/types").FillStyle;
902
+ strokeWidth: number;
903
+ strokeStyle: import("@nous-excalidraw/element/types").StrokeStyle;
904
+ roundness: null | {
905
+ type: import("@nous-excalidraw/element/types").RoundnessType;
906
+ value?: number;
907
+ };
908
+ roughness: number;
909
+ opacity: number;
910
+ width: number;
911
+ height: number;
912
+ angle: import("@nous-excalidraw/math").Radians;
913
+ seed: number;
914
+ version: number;
915
+ versionNonce: number;
916
+ index: import("@nous-excalidraw/element/types").FractionalIndex | null;
917
+ isDeleted: boolean;
918
+ groupIds: readonly import("@nous-excalidraw/element/types").GroupId[];
919
+ frameId: string | null;
920
+ boundElements: readonly import("@nous-excalidraw/element/types").BoundElement[] | null;
921
+ updated: number;
922
+ link: string | null;
923
+ locked: boolean;
924
+ customData?: Record<string, any>;
887
925
  }> & {
888
926
  type: "ellipse";
889
927
  } & {