@zsviczian/excalidraw 0.18.0-1 → 0.18.0-2

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 (122) hide show
  1. package/README.md +1 -1
  2. package/dist/excalidraw.development.js +339 -361
  3. package/dist/excalidraw.production.min.js +1 -1
  4. package/dist/excalidraw.production.min.js.LICENSE.txt +0 -32
  5. package/dist/styles.development.css +2976 -2982
  6. package/dist/styles.production.css +23 -23
  7. package/package.json +1 -1
  8. package/types/excalidraw/actions/actionCanvas.d.ts +7 -7
  9. package/types/excalidraw/actions/actionDeleteSelected.d.ts +1 -1
  10. package/types/excalidraw/actions/actionExport.d.ts +8 -8
  11. package/types/excalidraw/actions/actionFrame.d.ts +51 -51
  12. package/types/excalidraw/actions/actionHistory.d.ts +1 -1
  13. package/types/excalidraw/actions/actionProperties.d.ts +2 -2
  14. package/types/excalidraw/actions/actionSelectAll.d.ts +1 -1
  15. package/types/excalidraw/actions/manager.d.ts +1 -1
  16. package/types/excalidraw/actions/types.d.ts +2 -2
  17. package/types/excalidraw/animated-trail.d.ts +1 -1
  18. package/types/excalidraw/appState.d.ts +8 -8
  19. package/types/excalidraw/clipboard.d.ts +6 -6
  20. package/types/excalidraw/components/Actions.d.ts +2 -2
  21. package/types/excalidraw/components/App.d.ts +7 -7
  22. package/types/excalidraw/components/Avatar.d.ts +1 -1
  23. package/types/excalidraw/components/ButtonIcon.d.ts +1 -1
  24. package/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +3 -3
  25. package/types/excalidraw/components/ColorPicker/Picker.d.ts +1 -1
  26. package/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -1
  27. package/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +1 -1
  28. package/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +1 -1
  29. package/types/excalidraw/components/ConfirmDialog.d.ts +1 -1
  30. package/types/excalidraw/components/ContextMenu.d.ts +2 -2
  31. package/types/excalidraw/components/DefaultSidebar.d.ts +1 -1
  32. package/types/excalidraw/components/DialogActionButton.d.ts +1 -1
  33. package/types/excalidraw/components/ElementLinkDialog.d.ts +2 -2
  34. package/types/excalidraw/components/EyeDropper.d.ts +1 -1
  35. package/types/excalidraw/components/FixedSideContainer.d.ts +1 -1
  36. package/types/excalidraw/components/FollowMode/FollowMode.d.ts +1 -1
  37. package/types/excalidraw/components/FontPicker/FontPicker.d.ts +1 -1
  38. package/types/excalidraw/components/FontPicker/FontPickerList.d.ts +2 -2
  39. package/types/excalidraw/components/FontPicker/keyboardNavHandlers.d.ts +1 -1
  40. package/types/excalidraw/components/HintViewer.d.ts +1 -1
  41. package/types/excalidraw/components/IconPicker.d.ts +1 -1
  42. package/types/excalidraw/components/ImageExportDialog.d.ts +2 -2
  43. package/types/excalidraw/components/InitializeApp.d.ts +1 -1
  44. package/types/excalidraw/components/Island.d.ts +1 -1
  45. package/types/excalidraw/components/JSONExportDialog.d.ts +2 -2
  46. package/types/excalidraw/components/LayerUI.d.ts +2 -2
  47. package/types/excalidraw/components/LibraryMenuHeaderContent.d.ts +1 -1
  48. package/types/excalidraw/components/LibraryMenuItems.d.ts +1 -1
  49. package/types/excalidraw/components/LibraryMenuSection.d.ts +2 -2
  50. package/types/excalidraw/components/LibraryUnit.d.ts +1 -1
  51. package/types/excalidraw/components/MagicButton.d.ts +1 -1
  52. package/types/excalidraw/components/MobileMenu.d.ts +2 -2
  53. package/types/excalidraw/components/PasteChartDialog.d.ts +1 -1
  54. package/types/excalidraw/components/PropertiesPopover.d.ts +1 -1
  55. package/types/excalidraw/components/PublishLibrary.d.ts +1 -1
  56. package/types/excalidraw/components/SVGLayer.d.ts +1 -1
  57. package/types/excalidraw/components/Sidebar/SidebarTrigger.d.ts +1 -1
  58. package/types/excalidraw/components/Sidebar/common.d.ts +1 -1
  59. package/types/excalidraw/components/Stack.d.ts +1 -1
  60. package/types/excalidraw/components/Stats/DragInput.d.ts +2 -2
  61. package/types/excalidraw/components/Stats/MultiDimension.d.ts +1 -1
  62. package/types/excalidraw/components/Stats/MultiPosition.d.ts +1 -1
  63. package/types/excalidraw/components/Stats/index.d.ts +1 -1
  64. package/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +1 -1
  65. package/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +1 -1
  66. package/types/excalidraw/components/TTDDialog/common.d.ts +2 -2
  67. package/types/excalidraw/components/TextField.d.ts +1 -1
  68. package/types/excalidraw/components/Toast.d.ts +1 -1
  69. package/types/excalidraw/components/ToolButton.d.ts +2 -2
  70. package/types/excalidraw/components/Tooltip.d.ts +1 -1
  71. package/types/excalidraw/components/UserList.d.ts +1 -1
  72. package/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +3 -3
  73. package/types/excalidraw/components/canvases/NewElementCanvas.d.ts +1 -1
  74. package/types/excalidraw/components/canvases/StaticCanvas.d.ts +3 -3
  75. package/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +1 -1
  76. package/types/excalidraw/components/dropdownMenu/DropdownMenuItemLink.d.ts +1 -1
  77. package/types/excalidraw/components/hyperlink/Hyperlink.d.ts +2 -2
  78. package/types/excalidraw/components/main-menu/DefaultItems.d.ts +1 -1
  79. package/types/excalidraw/constants.d.ts +3 -3
  80. package/types/excalidraw/context/tunnels.d.ts +1 -1
  81. package/types/excalidraw/data/blob.d.ts +1 -1
  82. package/types/excalidraw/data/filesystem.d.ts +1 -1
  83. package/types/excalidraw/data/index.d.ts +1 -1
  84. package/types/excalidraw/data/library.d.ts +2 -2
  85. package/types/excalidraw/data/types.d.ts +2 -2
  86. package/types/excalidraw/element/ElementCanvasButtons.d.ts +1 -1
  87. package/types/excalidraw/element/binding.d.ts +5 -5
  88. package/types/excalidraw/element/bounds.d.ts +2 -2
  89. package/types/excalidraw/element/collision.d.ts +2 -2
  90. package/types/excalidraw/element/dragElements.d.ts +1 -1
  91. package/types/excalidraw/element/elbowArrow.d.ts +2 -2
  92. package/types/excalidraw/element/embeddable.d.ts +1 -1
  93. package/types/excalidraw/element/linearElementEditor.d.ts +4 -4
  94. package/types/excalidraw/element/resizeElements.d.ts +3 -3
  95. package/types/excalidraw/element/resizeTest.d.ts +3 -3
  96. package/types/excalidraw/element/showSelectedShapeActions.d.ts +1 -1
  97. package/types/excalidraw/element/textElement.d.ts +1 -1
  98. package/types/excalidraw/element/transformHandles.d.ts +5 -5
  99. package/types/excalidraw/element/utils.d.ts +1 -1
  100. package/types/excalidraw/frame.d.ts +3 -3
  101. package/types/excalidraw/history.d.ts +1 -1
  102. package/types/excalidraw/index.d.ts +4 -4
  103. package/types/excalidraw/laser-trails.d.ts +1 -1
  104. package/types/excalidraw/renderer/helpers.d.ts +1 -1
  105. package/types/excalidraw/renderer/renderElement.d.ts +1 -1
  106. package/types/excalidraw/renderer/staticSvgScene.d.ts +1 -1
  107. package/types/excalidraw/scene/Renderer.d.ts +1 -1
  108. package/types/excalidraw/scene/Scene.d.ts +2 -2
  109. package/types/excalidraw/scene/Shape.d.ts +2 -2
  110. package/types/excalidraw/scene/ShapeCache.d.ts +3 -3
  111. package/types/excalidraw/scene/scroll.d.ts +1 -1
  112. package/types/excalidraw/scene/scrollbars.d.ts +1 -1
  113. package/types/excalidraw/scene/types.d.ts +3 -3
  114. package/types/excalidraw/shapes.d.ts +1 -1
  115. package/types/excalidraw/snapping.d.ts +1 -1
  116. package/types/excalidraw/store.d.ts +1 -1
  117. package/types/excalidraw/types.d.ts +12 -12
  118. package/types/excalidraw/visualdebug.d.ts +1 -1
  119. package/types/utils/collision.d.ts +3 -3
  120. package/types/utils/export.d.ts +2 -2
  121. package/types/utils/geometry/shape.d.ts +1 -1
  122. package/types/utils/withinBounds.d.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zsviczian/excalidraw",
3
- "version": "0.18.0-1",
3
+ "version": "0.18.0-2",
4
4
  "main": "main.js",
5
5
  "module": "./dist/prod/index.js",
6
6
  "types": "types/excalidraw/index.d.ts",
@@ -1,6 +1,6 @@
1
- import type { ExcalidrawElement } from "../element/types";
2
- import type { AppState, Offsets, AppClassProperties } from "../types";
3
1
  import type { SceneBounds } from "../element/bounds";
2
+ import type { ExcalidrawElement } from "../element/types";
3
+ import type { AppClassProperties, AppState, Offsets } from "../types";
4
4
  export declare const actionChangeViewBackgroundColor: {
5
5
  name: "changeViewBackgroundColor";
6
6
  label: string;
@@ -66,11 +66,6 @@ export declare const actionClearCanvas: {
66
66
  allowWheelZoom: boolean | undefined;
67
67
  pinnedScripts: string[] | undefined;
68
68
  customPens: any[] | undefined;
69
- viewModeEnabled: boolean;
70
- zenModeEnabled: boolean;
71
- objectsSnapModeEnabled: boolean;
72
- name: string | null;
73
- currentItemArrowType: "round" | "sharp" | "elbow";
74
69
  contextMenu: {
75
70
  items: import("../components/ContextMenu").ContextMenuItems;
76
71
  top: number;
@@ -117,11 +112,13 @@ export declare const actionClearCanvas: {
117
112
  currentItemEndArrowhead: import("../element/types").Arrowhead | null;
118
113
  currentHoveredFontFamily: number | null;
119
114
  currentItemRoundness: import("../element/types").StrokeRoundness;
115
+ currentItemArrowType: "round" | "sharp" | "elbow";
120
116
  viewBackgroundColor: string;
121
117
  scrollX: number;
122
118
  scrollY: number;
123
119
  cursorButton: "up" | "down";
124
120
  scrolledOutside: boolean;
121
+ name: string | null;
125
122
  isResizing: boolean;
126
123
  isRotating: boolean;
127
124
  zoom: Readonly<{
@@ -162,6 +159,8 @@ export declare const actionClearCanvas: {
162
159
  closable?: boolean | undefined;
163
160
  duration?: number | undefined;
164
161
  } | null;
162
+ zenModeEnabled: boolean;
163
+ viewModeEnabled: boolean;
165
164
  selectedGroupIds: {
166
165
  [groupId: string]: boolean;
167
166
  };
@@ -213,6 +212,7 @@ export declare const actionClearCanvas: {
213
212
  x: number;
214
213
  y: number;
215
214
  } | null;
215
+ objectsSnapModeEnabled: boolean;
216
216
  userToFollow: import("../types").UserToFollow | null;
217
217
  followedBy: Set<import("../types").SocketId>;
218
218
  isCropping: boolean;
@@ -1,6 +1,6 @@
1
+ import { LinearElementEditor } from "../element/linearElementEditor";
1
2
  import type { ExcalidrawElement } from "../element/types";
2
3
  import type { AppClassProperties, AppState } from "../types";
3
- import { LinearElementEditor } from "../element/linearElementEditor";
4
4
  export declare const actionDeleteSelected: {
5
5
  name: "deleteSelectedElements";
6
6
  label: string;
@@ -1,5 +1,5 @@
1
- import type { Theme } from "../element/types";
2
1
  import "../components/ToolIcon.scss";
2
+ import type { Theme } from "../element/types";
3
3
  export declare const actionChangeProjectName: {
4
4
  name: "changeProjectName";
5
5
  label: string;
@@ -1316,13 +1316,6 @@ export declare const actionLoadScene: {
1316
1316
  perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: import("../types").AppClassProperties) => Promise<false | {
1317
1317
  elements: import("../element/types").OrderedExcalidrawElement[];
1318
1318
  appState: {
1319
- viewModeEnabled: boolean;
1320
- zenModeEnabled: boolean;
1321
- gridModeEnabled: boolean;
1322
- objectsSnapModeEnabled: boolean;
1323
- theme: Theme;
1324
- name: string | null;
1325
- currentItemArrowType: "round" | "sharp" | "elbow";
1326
1319
  contextMenu: {
1327
1320
  items: import("../components/ContextMenu").ContextMenuItems;
1328
1321
  top: number;
@@ -1377,11 +1370,13 @@ export declare const actionLoadScene: {
1377
1370
  currentItemEndArrowhead: import("../element/types").Arrowhead | null;
1378
1371
  currentHoveredFontFamily: number | null;
1379
1372
  currentItemRoundness: import("../element/types").StrokeRoundness;
1373
+ currentItemArrowType: "round" | "sharp" | "elbow";
1380
1374
  viewBackgroundColor: string;
1381
1375
  scrollX: number;
1382
1376
  scrollY: number;
1383
1377
  cursorButton: "up" | "down";
1384
1378
  scrolledOutside: boolean;
1379
+ name: string | null;
1385
1380
  isResizing: boolean;
1386
1381
  isRotating: boolean;
1387
1382
  zoom: Readonly<{
@@ -1422,8 +1417,12 @@ export declare const actionLoadScene: {
1422
1417
  closable?: boolean | undefined;
1423
1418
  duration?: number | undefined;
1424
1419
  } | null;
1420
+ zenModeEnabled: boolean;
1421
+ theme: Theme;
1425
1422
  gridSize: number;
1426
1423
  gridStep: number;
1424
+ gridModeEnabled: boolean;
1425
+ viewModeEnabled: boolean;
1427
1426
  selectedGroupIds: {
1428
1427
  [groupId: string]: boolean;
1429
1428
  };
@@ -1501,6 +1500,7 @@ export declare const actionLoadScene: {
1501
1500
  x: number;
1502
1501
  y: number;
1503
1502
  } | null;
1503
+ objectsSnapModeEnabled: boolean;
1504
1504
  userToFollow: import("../types").UserToFollow | null;
1505
1505
  followedBy: Set<import("../types").SocketId>;
1506
1506
  isCropping: boolean;
@@ -920,15 +920,21 @@ export declare const actionWrapSelectionInFrame: {
920
920
  frameId: string | null;
921
921
  boundElements: readonly Readonly<{
922
922
  id: string;
923
- type: "text" | "arrow";
923
+ type: "arrow" | "text";
924
924
  }>[] | null;
925
925
  updated: number;
926
926
  link: string | null;
927
927
  locked: boolean;
928
928
  customData?: Record<string, any> | undefined;
929
+ }> & Readonly<{
930
+ type: "line" | "arrow";
931
+ points: readonly import("@excalidraw/math").LocalPoint[];
932
+ lastCommittedPoint: import("@excalidraw/math").LocalPoint | null;
933
+ startBinding: import("../element/types").PointBinding | null;
934
+ endBinding: import("../element/types").PointBinding | null;
935
+ startArrowhead: import("../element/types").Arrowhead | null;
936
+ endArrowhead: import("../element/types").Arrowhead | null;
929
937
  }> & {
930
- type: "selection";
931
- } & {
932
938
  index: import("../element/types").FractionalIndex;
933
939
  }) | (Readonly<{
934
940
  id: string;
@@ -957,14 +963,14 @@ export declare const actionWrapSelectionInFrame: {
957
963
  frameId: string | null;
958
964
  boundElements: readonly Readonly<{
959
965
  id: string;
960
- type: "text" | "arrow";
966
+ type: "arrow" | "text";
961
967
  }>[] | null;
962
968
  updated: number;
963
969
  link: string | null;
964
970
  locked: boolean;
965
971
  customData?: Record<string, any> | undefined;
966
972
  }> & {
967
- type: "rectangle";
973
+ type: "selection";
968
974
  } & {
969
975
  index: import("../element/types").FractionalIndex;
970
976
  }) | (Readonly<{
@@ -994,14 +1000,14 @@ export declare const actionWrapSelectionInFrame: {
994
1000
  frameId: string | null;
995
1001
  boundElements: readonly Readonly<{
996
1002
  id: string;
997
- type: "text" | "arrow";
1003
+ type: "arrow" | "text";
998
1004
  }>[] | null;
999
1005
  updated: number;
1000
1006
  link: string | null;
1001
1007
  locked: boolean;
1002
1008
  customData?: Record<string, any> | undefined;
1003
1009
  }> & {
1004
- type: "diamond";
1010
+ type: "rectangle";
1005
1011
  } & {
1006
1012
  index: import("../element/types").FractionalIndex;
1007
1013
  }) | (Readonly<{
@@ -1031,14 +1037,14 @@ export declare const actionWrapSelectionInFrame: {
1031
1037
  frameId: string | null;
1032
1038
  boundElements: readonly Readonly<{
1033
1039
  id: string;
1034
- type: "text" | "arrow";
1040
+ type: "arrow" | "text";
1035
1041
  }>[] | null;
1036
1042
  updated: number;
1037
1043
  link: string | null;
1038
1044
  locked: boolean;
1039
1045
  customData?: Record<string, any> | undefined;
1040
1046
  }> & {
1041
- type: "ellipse";
1047
+ type: "diamond";
1042
1048
  } & {
1043
1049
  index: import("../element/types").FractionalIndex;
1044
1050
  }) | (Readonly<{
@@ -1068,27 +1074,15 @@ export declare const actionWrapSelectionInFrame: {
1068
1074
  frameId: string | null;
1069
1075
  boundElements: readonly Readonly<{
1070
1076
  id: string;
1071
- type: "text" | "arrow";
1077
+ type: "arrow" | "text";
1072
1078
  }>[] | null;
1073
1079
  updated: number;
1074
1080
  link: string | null;
1075
1081
  locked: boolean;
1076
1082
  customData?: Record<string, any> | undefined;
1077
- }> & Readonly<{
1078
- type: "text";
1079
- fontSize: number;
1080
- fontFamily: number;
1081
- text: string;
1082
- rawText: string;
1083
- textAlign: string;
1084
- verticalAlign: string;
1085
- containerId: string | null;
1086
- originalText: string;
1087
- autoResize: boolean;
1088
- lineHeight: number & {
1089
- _brand: "unitlessLineHeight";
1090
- };
1091
1083
  }> & {
1084
+ type: "ellipse";
1085
+ } & {
1092
1086
  index: import("../element/types").FractionalIndex;
1093
1087
  }) | (Readonly<{
1094
1088
  id: string;
@@ -1117,20 +1111,15 @@ export declare const actionWrapSelectionInFrame: {
1117
1111
  frameId: string | null;
1118
1112
  boundElements: readonly Readonly<{
1119
1113
  id: string;
1120
- type: "text" | "arrow";
1114
+ type: "arrow" | "text";
1121
1115
  }>[] | null;
1122
1116
  updated: number;
1123
1117
  link: string | null;
1124
1118
  locked: boolean;
1125
1119
  customData?: Record<string, any> | undefined;
1126
1120
  }> & Readonly<{
1127
- type: "line" | "arrow";
1128
- points: readonly import("@excalidraw/math").LocalPoint[];
1129
- lastCommittedPoint: import("@excalidraw/math").LocalPoint | null;
1130
- startBinding: import("../element/types").PointBinding | null;
1131
- endBinding: import("../element/types").PointBinding | null;
1132
- startArrowhead: import("../element/types").Arrowhead | null;
1133
- endArrowhead: import("../element/types").Arrowhead | null;
1121
+ type: "embeddable";
1122
+ scale: [number, number];
1134
1123
  }> & {
1135
1124
  index: import("../element/types").FractionalIndex;
1136
1125
  }) | (Readonly<{
@@ -1160,18 +1149,18 @@ export declare const actionWrapSelectionInFrame: {
1160
1149
  frameId: string | null;
1161
1150
  boundElements: readonly Readonly<{
1162
1151
  id: string;
1163
- type: "text" | "arrow";
1152
+ type: "arrow" | "text";
1164
1153
  }>[] | null;
1165
1154
  updated: number;
1166
1155
  link: string | null;
1167
1156
  locked: boolean;
1168
1157
  customData?: Record<string, any> | undefined;
1169
1158
  }> & Readonly<{
1170
- type: "freedraw";
1171
- points: readonly import("@excalidraw/math").LocalPoint[];
1172
- pressures: readonly number[];
1173
- simulatePressure: boolean;
1174
- lastCommittedPoint: import("@excalidraw/math").LocalPoint | null;
1159
+ type: "iframe";
1160
+ customData?: {
1161
+ generationData?: import("../element/types").MagicGenerationData | undefined;
1162
+ } | undefined;
1163
+ scale: [number, number];
1175
1164
  }> & {
1176
1165
  index: import("../element/types").FractionalIndex;
1177
1166
  }) | (Readonly<{
@@ -1201,7 +1190,7 @@ export declare const actionWrapSelectionInFrame: {
1201
1190
  frameId: string | null;
1202
1191
  boundElements: readonly Readonly<{
1203
1192
  id: string;
1204
- type: "text" | "arrow";
1193
+ type: "arrow" | "text";
1205
1194
  }>[] | null;
1206
1195
  updated: number;
1207
1196
  link: string | null;
@@ -1210,7 +1199,7 @@ export declare const actionWrapSelectionInFrame: {
1210
1199
  }> & Readonly<{
1211
1200
  type: "image";
1212
1201
  fileId: import("../element/types").FileId | null;
1213
- status: "error" | "pending" | "saved";
1202
+ status: "pending" | "error" | "saved";
1214
1203
  scale: [number, number];
1215
1204
  crop: import("../element/types").ImageCrop | null;
1216
1205
  }> & {
@@ -1242,7 +1231,7 @@ export declare const actionWrapSelectionInFrame: {
1242
1231
  frameId: string | null;
1243
1232
  boundElements: readonly Readonly<{
1244
1233
  id: string;
1245
- type: "text" | "arrow";
1234
+ type: "arrow" | "text";
1246
1235
  }>[] | null;
1247
1236
  updated: number;
1248
1237
  link: string | null;
@@ -1280,7 +1269,7 @@ export declare const actionWrapSelectionInFrame: {
1280
1269
  frameId: string | null;
1281
1270
  boundElements: readonly Readonly<{
1282
1271
  id: string;
1283
- type: "text" | "arrow";
1272
+ type: "arrow" | "text";
1284
1273
  }>[] | null;
1285
1274
  updated: number;
1286
1275
  link: string | null;
@@ -1318,18 +1307,26 @@ export declare const actionWrapSelectionInFrame: {
1318
1307
  frameId: string | null;
1319
1308
  boundElements: readonly Readonly<{
1320
1309
  id: string;
1321
- type: "text" | "arrow";
1310
+ type: "arrow" | "text";
1322
1311
  }>[] | null;
1323
1312
  updated: number;
1324
1313
  link: string | null;
1325
1314
  locked: boolean;
1326
1315
  customData?: Record<string, any> | undefined;
1327
1316
  }> & Readonly<{
1328
- type: "iframe";
1329
- customData?: {
1330
- generationData?: import("../element/types").MagicGenerationData | undefined;
1331
- } | undefined;
1332
- scale: [number, number];
1317
+ type: "text";
1318
+ fontSize: number;
1319
+ fontFamily: number;
1320
+ text: string;
1321
+ rawText: string;
1322
+ textAlign: string;
1323
+ verticalAlign: string;
1324
+ containerId: string | null;
1325
+ originalText: string;
1326
+ autoResize: boolean;
1327
+ lineHeight: number & {
1328
+ _brand: "unitlessLineHeight";
1329
+ };
1333
1330
  }> & {
1334
1331
  index: import("../element/types").FractionalIndex;
1335
1332
  }) | (Readonly<{
@@ -1359,15 +1356,18 @@ export declare const actionWrapSelectionInFrame: {
1359
1356
  frameId: string | null;
1360
1357
  boundElements: readonly Readonly<{
1361
1358
  id: string;
1362
- type: "text" | "arrow";
1359
+ type: "arrow" | "text";
1363
1360
  }>[] | null;
1364
1361
  updated: number;
1365
1362
  link: string | null;
1366
1363
  locked: boolean;
1367
1364
  customData?: Record<string, any> | undefined;
1368
1365
  }> & Readonly<{
1369
- type: "embeddable";
1370
- scale: [number, number];
1366
+ type: "freedraw";
1367
+ points: readonly import("@excalidraw/math").LocalPoint[];
1368
+ pressures: readonly number[];
1369
+ simulatePressure: boolean;
1370
+ lastCommittedPoint: import("@excalidraw/math").LocalPoint | null;
1371
1371
  }> & {
1372
1372
  index: import("../element/types").FractionalIndex;
1373
1373
  }) | import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement>)[];
@@ -1,6 +1,6 @@
1
- import type { Action } from "./types";
2
1
  import type { History } from "../history";
3
2
  import type { Store } from "../store";
3
+ import type { Action } from "./types";
4
4
  type ActionCreator = (history: History, store: Store) => Action;
5
5
  export declare const createUndoAction: ActionCreator;
6
6
  export declare const createRedoAction: ActionCreator;
@@ -1,6 +1,6 @@
1
- import type { AppClassProperties, AppState, Primitive } from "../types";
2
- import type { Arrowhead, ExcalidrawBindableElement, ExcalidrawElement, ExcalidrawLinearElement } from "../element/types";
3
1
  import { LinearElementEditor } from "../element/linearElementEditor";
2
+ import type { Arrowhead, ExcalidrawBindableElement, ExcalidrawElement, ExcalidrawLinearElement } from "../element/types";
3
+ import type { AppClassProperties, AppState, Primitive } from "../types";
4
4
  export declare const changeProperty: (elements: readonly ExcalidrawElement[], appState: AppState, callback: (element: ExcalidrawElement) => ExcalidrawElement, includeBoundText?: boolean) => ExcalidrawElement[];
5
5
  export declare const getFormValue: <T extends Primitive>(elements: readonly ExcalidrawElement[], appState: AppState, getAttribute: (element: ExcalidrawElement) => T, isRelevantElement: true | ((element: ExcalidrawElement) => boolean), defaultValue: T | ((isSomeElementSelected: boolean) => T)) => T;
6
6
  export declare const actionChangeStrokeColor: {
@@ -1,5 +1,5 @@
1
- import type { ExcalidrawElement } from "../element/types";
2
1
  import { LinearElementEditor } from "../element/linearElementEditor";
2
+ import type { ExcalidrawElement } from "../element/types";
3
3
  export declare const actionSelectAll: {
4
4
  name: "selectAll";
5
5
  label: string;
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
- import type { Action, UpdaterFn, ActionName, ActionResult, PanelComponentProps, ActionSource } from "./types";
3
2
  import type { OrderedExcalidrawElement } from "../element/types";
4
3
  import type { AppClassProperties, AppState } from "../types";
4
+ import type { Action, UpdaterFn, ActionName, ActionResult, PanelComponentProps, ActionSource } from "./types";
5
5
  export declare class ActionManager {
6
6
  actions: Record<ActionName, Action>;
7
7
  updater: (actionResult: ActionResult | Promise<ActionResult>) => void;
@@ -1,7 +1,7 @@
1
- import type React from "react";
2
1
  import type { ExcalidrawElement, OrderedExcalidrawElement } from "../element/types";
3
- import type { AppClassProperties, AppState, ExcalidrawProps, BinaryFiles, UIAppState } from "../types";
4
2
  import type { CaptureUpdateActionType } from "../store";
3
+ import type { AppClassProperties, AppState, ExcalidrawProps, BinaryFiles, UIAppState } from "../types";
4
+ import type React from "react";
5
5
  export type ActionSource = "ui" | "keyboard" | "contextMenu" | "api" | "commandPalette";
6
6
  /** if false, the action should be prevented */
7
7
  export type ActionResult = {
@@ -1,6 +1,6 @@
1
- import type { LaserPointerOptions } from "@zsviczian/laser-pointer";
2
1
  import type { AnimationFrameHandler } from "./animation-frame-handler";
3
2
  import type App from "./components/App";
3
+ import type { LaserPointerOptions } from "@zsviczian/laser-pointer";
4
4
  export interface Trail {
5
5
  start(container: SVGSVGElement): void;
6
6
  stop(): void;
@@ -1,12 +1,6 @@
1
1
  import type { AppState, NormalizedZoomValue } from "./types";
2
2
  export declare const getDefaultAppState: () => Omit<AppState, "offsetTop" | "offsetLeft" | "width" | "height">;
3
3
  export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>) => {
4
- zenModeEnabled?: boolean | undefined;
5
- gridModeEnabled?: boolean | undefined;
6
- objectsSnapModeEnabled?: boolean | undefined;
7
- theme?: import("./element/types").Theme | undefined;
8
- name?: string | null | undefined;
9
- currentItemArrowType?: "round" | "sharp" | "elbow" | undefined;
10
4
  showWelcomeScreen?: boolean | undefined;
11
5
  activeTool?: ({
12
6
  lastActiveTool: import("./types").ActiveTool | null;
@@ -31,11 +25,13 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
31
25
  currentItemStartArrowhead?: import("./element/types").Arrowhead | null | undefined;
32
26
  currentItemEndArrowhead?: import("./element/types").Arrowhead | null | undefined;
33
27
  currentItemRoundness?: import("./element/types").StrokeRoundness | undefined;
28
+ currentItemArrowType?: "round" | "sharp" | "elbow" | undefined;
34
29
  viewBackgroundColor?: string | undefined;
35
30
  scrollX?: number | undefined;
36
31
  scrollY?: number | undefined;
37
32
  cursorButton?: "up" | "down" | undefined;
38
33
  scrolledOutside?: boolean | undefined;
34
+ name?: string | null | undefined;
39
35
  zoom?: Readonly<{
40
36
  value: NormalizedZoomValue;
41
37
  }> | undefined;
@@ -53,8 +49,11 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
53
49
  [id: string]: true;
54
50
  } | undefined;
55
51
  shouldCacheIgnoreZoom?: boolean | undefined;
52
+ zenModeEnabled?: boolean | undefined;
53
+ theme?: import("./element/types").Theme | undefined;
56
54
  gridSize?: number | undefined;
57
55
  gridStep?: number | undefined;
56
+ gridModeEnabled?: boolean | undefined;
58
57
  selectedGroupIds?: {
59
58
  [groupId: string]: boolean;
60
59
  } | undefined;
@@ -65,18 +64,19 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
65
64
  } | undefined;
66
65
  currentChartType?: import("./element/types").ChartType | undefined;
67
66
  selectedLinearElement?: import("./element/linearElementEditor").LinearElementEditor | null | undefined;
67
+ objectsSnapModeEnabled?: boolean | undefined;
68
68
  };
69
69
  export declare const cleanAppStateForExport: (appState: Partial<AppState>) => {
70
- gridModeEnabled?: boolean | undefined;
71
70
  viewBackgroundColor?: string | undefined;
72
71
  gridSize?: number | undefined;
73
72
  gridStep?: number | undefined;
73
+ gridModeEnabled?: boolean | undefined;
74
74
  };
75
75
  export declare const clearAppStateForDatabase: (appState: Partial<AppState>) => {
76
- gridModeEnabled?: boolean | undefined;
77
76
  viewBackgroundColor?: string | undefined;
78
77
  gridSize?: number | undefined;
79
78
  gridStep?: number | undefined;
79
+ gridModeEnabled?: boolean | undefined;
80
80
  };
81
81
  export declare const isEraserActive: ({ activeTool, }: {
82
82
  activeTool: AppState["activeTool"];
@@ -1,7 +1,7 @@
1
+ import { ALLOWED_PASTE_MIME_TYPES } from "./constants";
2
+ import type { Spreadsheet } from "./charts";
1
3
  import type { ExcalidrawElement, NonDeletedExcalidrawElement } from "./element/types";
2
4
  import type { BinaryFiles } from "./types";
3
- import type { Spreadsheet } from "./charts";
4
- import { ALLOWED_PASTE_MIME_TYPES } from "./constants";
5
5
  export type PastedMixedContent = {
6
6
  type: "text" | "imageUrl";
7
7
  value: string;
@@ -21,6 +21,8 @@ export declare const probablySupportsClipboardWriteText: boolean;
21
21
  export declare const probablySupportsClipboardBlob: boolean;
22
22
  export declare const createPasteEvent: ({ types, files, }: {
23
23
  types?: {
24
+ "text/plain"?: string | File | undefined;
25
+ "text/html"?: string | File | undefined;
24
26
  "image/svg+xml"?: string | File | undefined;
25
27
  "image/png"?: string | File | undefined;
26
28
  "image/jpeg"?: string | File | undefined;
@@ -30,8 +32,6 @@ export declare const createPasteEvent: ({ types, files, }: {
30
32
  "image/x-icon"?: string | File | undefined;
31
33
  "image/avif"?: string | File | undefined;
32
34
  "image/jfif"?: string | File | undefined;
33
- "text/plain"?: string | File | undefined;
34
- "text/html"?: string | File | undefined;
35
35
  } | undefined;
36
36
  files?: File[] | undefined;
37
37
  }) => ClipboardEvent;
@@ -45,6 +45,8 @@ export declare const copyToClipboard: (elements: readonly NonDeletedExcalidrawEl
45
45
  * Will prompt user for permission if not granted.
46
46
  */
47
47
  export declare const readSystemClipboard: () => Promise<{
48
+ "text/plain"?: string | File | undefined;
49
+ "text/html"?: string | File | undefined;
48
50
  "image/svg+xml"?: string | File | undefined;
49
51
  "image/png"?: string | File | undefined;
50
52
  "image/jpeg"?: string | File | undefined;
@@ -54,8 +56,6 @@ export declare const readSystemClipboard: () => Promise<{
54
56
  "image/x-icon"?: string | File | undefined;
55
57
  "image/avif"?: string | File | undefined;
56
58
  "image/jfif"?: string | File | undefined;
57
- "text/plain"?: string | File | undefined;
58
- "text/html"?: string | File | undefined;
59
59
  }>;
60
60
  /**
61
61
  * Attempts to parse clipboard event.
@@ -1,7 +1,7 @@
1
- import type { ActionManager } from "../actions/manager";
1
+ import "./Actions.scss";
2
2
  import type { ExcalidrawElement, NonDeletedElementsMap, NonDeletedSceneElementsMap } from "../element/types";
3
3
  import type { AppClassProperties, AppProps, UIAppState, Zoom } from "../types";
4
- import "./Actions.scss";
4
+ import type { ActionManager } from "../actions/manager";
5
5
  export declare const canChangeStrokeColor: (appState: UIAppState, targetElements: ExcalidrawElement[]) => boolean;
6
6
  export declare const canChangeBackgroundColor: (appState: UIAppState, targetElements: ExcalidrawElement[]) => boolean;
7
7
  export declare const SelectedShapeActions: ({ appState, elementsMap, renderAction, app, }: {
@@ -1,23 +1,23 @@
1
1
  import React from "react";
2
- import type { RoughCanvas } from "roughjs/bin/canvas";
3
2
  import { ActionManager } from "../actions/manager";
4
- import type { ActionResult } from "../actions/types";
3
+ import { AnimationFrameHandler } from "../animation-frame-handler";
5
4
  import { type EXPORT_IMAGE_TYPES } from "../constants";
6
- import type { ExportedElements } from "../data";
7
5
  import { LinearElementEditor } from "../element/linearElementEditor";
8
- import type { ExcalidrawElement, ExcalidrawLinearElement, NonDeleted, InitializedExcalidrawImageElement, ExcalidrawImageElement, NonDeletedExcalidrawElement, ExcalidrawFrameLikeElement, ExcalidrawIframeElement, ExcalidrawEmbeddableElement, Ordered } from "../element/types";
9
6
  import { History } from "../history";
10
7
  import Scene from "../scene/Scene";
11
- import type { AppClassProperties, AppProps, AppState, ExcalidrawImperativeAPI, BinaryFiles, LibraryItems, SceneData, Device, FrameNameBoundsCache, SidebarName, SidebarTabName, ToolType, OnUserFollowedPayload, GenerateDiagramToCode, NullableGridSize, Offsets } from "../types";
12
- import type { FileSystemHandle } from "../data/filesystem";
13
8
  import { Fonts } from "../fonts";
14
9
  import { Renderer } from "../scene/Renderer";
15
10
  import { Emitter } from "../emitter";
16
11
  import { Store } from "../store";
17
- import { AnimationFrameHandler } from "../animation-frame-handler";
18
12
  import { AnimatedTrail } from "../animated-trail";
19
13
  import { LaserTrails } from "../laser-trails";
20
14
  import { FlowChartCreator } from "../element/flowchart";
15
+ import type { ActionResult } from "../actions/types";
16
+ import type { ExportedElements } from "../data";
17
+ import type { FileSystemHandle } from "../data/filesystem";
18
+ import type { ExcalidrawElement, ExcalidrawLinearElement, NonDeleted, InitializedExcalidrawImageElement, ExcalidrawImageElement, NonDeletedExcalidrawElement, ExcalidrawFrameLikeElement, ExcalidrawIframeElement, ExcalidrawEmbeddableElement, Ordered } from "../element/types";
19
+ import type { AppClassProperties, AppProps, AppState, ExcalidrawImperativeAPI, BinaryFiles, LibraryItems, SceneData, Device, FrameNameBoundsCache, SidebarName, SidebarTabName, ToolType, OnUserFollowedPayload, GenerateDiagramToCode, NullableGridSize, Offsets } from "../types";
20
+ import type { RoughCanvas } from "roughjs/bin/canvas";
21
21
  export declare const ExcalidrawContainerContext: React.Context<{
22
22
  container: HTMLDivElement | null;
23
23
  id: string | null;
@@ -1,5 +1,5 @@
1
- import "./Avatar.scss";
2
1
  import React from "react";
2
+ import "./Avatar.scss";
3
3
  type AvatarProps = {
4
4
  onClick: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
5
5
  color: string;
@@ -1,5 +1,5 @@
1
- import type { JSX } from "react";
2
1
  import "./ButtonIcon.scss";
2
+ import type { JSX } from "react";
3
3
  interface ButtonIconProps {
4
4
  icon: JSX.Element;
5
5
  title: string;
@@ -1,8 +1,8 @@
1
- import type { ExcalidrawElement } from "../../element/types";
2
- import type { AppState } from "../../types";
1
+ import "./ColorPicker.scss";
3
2
  import type { ColorPickerType } from "./colorPickerUtils";
4
3
  import type { ColorTuple, ColorPaletteCustom } from "../../colors";
5
- import "./ColorPicker.scss";
4
+ import type { ExcalidrawElement } from "../../element/types";
5
+ import type { AppState } from "../../types";
6
6
  export declare const getColor: (color: string) => string | null;
7
7
  interface ColorPickerProps {
8
8
  type: ColorPickerType;
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
- import type { ExcalidrawElement } from "../../element/types";
3
2
  import type { ColorPickerType } from "./colorPickerUtils";
4
3
  import type { ColorPaletteCustom } from "../../colors";
4
+ import type { ExcalidrawElement } from "../../element/types";
5
5
  interface PickerProps {
6
6
  color: string;
7
7
  onChange: (color: string) => void;
@@ -1,5 +1,5 @@
1
- import type { ExcalidrawElement } from "../../element/types";
2
1
  import type { ColorPickerColor, ColorPaletteCustom } from "../../colors";
2
+ import type { ExcalidrawElement } from "../../element/types";
3
3
  export declare const getColorNameAndShadeFromColor: ({ palette, color, }: {
4
4
  palette: ColorPaletteCustom;
5
5
  color: string;
@@ -1,5 +1,5 @@
1
- import type { ColorPaletteCustom } from "../../colors";
2
1
  import type { ActiveColorPickerSectionAtomType } from "./colorPickerUtils";
2
+ import type { ColorPaletteCustom } from "../../colors";
3
3
  interface ColorPickerKeyNavHandlerProps {
4
4
  event: React.KeyboardEvent;
5
5
  activeColorPickerSection: ActiveColorPickerSectionAtomType;
@@ -1,6 +1,6 @@
1
- import type { CommandPaletteItem } from "./types";
2
1
  import * as defaultItems from "./defaultCommandPaletteItems";
3
2
  import "./CommandPalette.scss";
3
+ import type { CommandPaletteItem } from "./types";
4
4
  export declare const DEFAULT_CATEGORIES: {
5
5
  app: string;
6
6
  export: string;
@@ -1,5 +1,5 @@
1
- import type { DialogProps } from "./Dialog";
2
1
  import "./ConfirmDialog.scss";
2
+ import type { DialogProps } from "./Dialog";
3
3
  interface Props extends Omit<DialogProps, "onCloseRequest"> {
4
4
  onConfirm: () => void;
5
5
  onCancel: () => void;