@excalidraw/excalidraw 0.18.0-c4c0649 → 0.18.0-c6f8ef9

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 (130) hide show
  1. package/dist/dev/chunk-CP5DND7P.js +7 -0
  2. package/dist/dev/chunk-CP5DND7P.js.map +7 -0
  3. package/dist/dev/chunk-CRKRRBMD.js +5677 -0
  4. package/dist/dev/chunk-CRKRRBMD.js.map +7 -0
  5. package/dist/dev/{chunk-JCUIYZXF.js → chunk-QF5FRM6O.js} +6 -2
  6. package/dist/dev/chunk-QF5FRM6O.js.map +7 -0
  7. package/dist/dev/data/{image-SLEZBMLG.js → image-IWGLHPIX.js} +3 -3
  8. package/dist/dev/index.css +51 -20
  9. package/dist/dev/index.css.map +3 -3
  10. package/dist/dev/index.js +6874 -4280
  11. package/dist/dev/index.js.map +4 -4
  12. package/dist/dev/locales/{en-ZDTPSZNL.js → en-SMAPCEOQ.js} +2 -2
  13. package/dist/dev/subset-shared.chunk.js +1 -1
  14. package/dist/dev/subset-worker.chunk.js +1 -1
  15. package/dist/prod/chunk-A66AFZZU.js +7 -0
  16. package/dist/prod/chunk-HHV2PJKY.js +4 -0
  17. package/dist/prod/{chunk-GCFVWREF.js → chunk-I4UNSFV6.js} +4 -4
  18. package/dist/prod/data/image-4SM4COIL.js +1 -0
  19. package/dist/prod/index.css +1 -1
  20. package/dist/prod/index.js +25 -18
  21. package/dist/prod/locales/{en-MHZ26NAR.js → en-TYY6KWIJ.js} +1 -1
  22. package/dist/prod/subset-shared.chunk.js +1 -1
  23. package/dist/prod/subset-worker.chunk.js +1 -1
  24. package/dist/types/common/src/constants.d.ts +19 -3
  25. package/dist/types/common/src/utils.d.ts +3 -5
  26. package/dist/types/element/src/Scene.d.ts +7 -3
  27. package/dist/types/element/src/align.d.ts +2 -1
  28. package/dist/types/element/src/binding.d.ts +10 -7
  29. package/dist/types/element/src/bounds.d.ts +11 -3
  30. package/dist/types/element/src/collision.d.ts +18 -12
  31. package/dist/types/element/src/cropElement.d.ts +1 -1
  32. package/dist/types/element/src/delta.d.ts +42 -9
  33. package/dist/types/element/src/distance.d.ts +2 -2
  34. package/dist/types/element/src/distribute.d.ts +2 -1
  35. package/dist/types/element/src/fractionalIndex.d.ts +8 -2
  36. package/dist/types/element/src/frame.d.ts +2 -2
  37. package/dist/types/element/src/groups.d.ts +1 -0
  38. package/dist/types/element/src/index.d.ts +1 -3
  39. package/dist/types/element/src/linearElementEditor.d.ts +14 -23
  40. package/dist/types/element/src/mutateElement.d.ts +1 -1
  41. package/dist/types/element/src/newElement.d.ts +2 -1
  42. package/dist/types/element/src/resizeElements.d.ts +1 -0
  43. package/dist/types/element/src/selection.d.ts +1 -1
  44. package/dist/types/element/src/shape.d.ts +42 -0
  45. package/dist/types/element/src/sizeHelpers.d.ts +2 -1
  46. package/dist/types/element/src/store.d.ts +19 -9
  47. package/dist/types/element/src/transformHandles.d.ts +4 -4
  48. package/dist/types/element/src/typeChecks.d.ts +15 -1
  49. package/dist/types/element/src/types.d.ts +8 -3
  50. package/dist/types/element/src/utils.d.ts +16 -6
  51. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +21 -15
  52. package/dist/types/excalidraw/actions/actionAlign.d.ts +8 -8
  53. package/dist/types/excalidraw/actions/actionBoundText.d.ts +14 -10
  54. package/dist/types/excalidraw/actions/actionCanvas.d.ts +180 -154
  55. package/dist/types/excalidraw/actions/actionClipboard.d.ts +50 -36
  56. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +7 -5
  57. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +27 -20
  58. package/dist/types/excalidraw/actions/actionDistribute.d.ts +4 -4
  59. package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +2 -2
  60. package/dist/types/excalidraw/actions/actionElementLink.d.ts +6 -4
  61. package/dist/types/excalidraw/actions/actionElementLock.d.ts +29 -26
  62. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +7 -5
  63. package/dist/types/excalidraw/actions/actionExport.d.ts +147 -129
  64. package/dist/types/excalidraw/actions/actionFinalize.d.ts +65 -20
  65. package/dist/types/excalidraw/actions/actionFlip.d.ts +4 -4
  66. package/dist/types/excalidraw/actions/actionFrame.d.ts +78 -70
  67. package/dist/types/excalidraw/actions/actionGroup.d.ts +20 -16
  68. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +533 -7
  69. package/dist/types/excalidraw/actions/actionLink.d.ts +8 -6
  70. package/dist/types/excalidraw/actions/actionMenu.d.ts +22 -16
  71. package/dist/types/excalidraw/actions/actionNavigate.d.ts +14 -10
  72. package/dist/types/excalidraw/actions/actionProperties.d.ts +119 -81
  73. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +10 -8
  74. package/dist/types/excalidraw/actions/actionStyles.d.ts +11 -9
  75. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +9 -7
  76. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +9 -7
  77. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +8 -6
  78. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +9 -7
  79. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +9 -7
  80. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +9 -7
  81. package/dist/types/excalidraw/actions/actionZindex.d.ts +8 -8
  82. package/dist/types/excalidraw/actions/types.d.ts +2 -1
  83. package/dist/types/excalidraw/appState.d.ts +29 -20
  84. package/dist/types/excalidraw/components/Actions.d.ts +0 -4
  85. package/dist/types/excalidraw/components/App.d.ts +15 -16
  86. package/dist/types/excalidraw/components/ButtonIcon.d.ts +1 -0
  87. package/dist/types/excalidraw/components/Ellipsify.d.ts +4 -0
  88. package/dist/types/excalidraw/components/{ButtonIconSelect.d.ts → RadioSelection.d.ts} +1 -1
  89. package/dist/types/excalidraw/components/Stats/DragInput.d.ts +11 -1
  90. package/dist/types/excalidraw/components/UnlockPopup.d.ts +8 -0
  91. package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +1 -0
  92. package/dist/types/excalidraw/components/icons.d.ts +2 -0
  93. package/dist/types/excalidraw/components/shapes.d.ts +1 -1
  94. package/dist/types/excalidraw/data/blob.d.ts +1 -1
  95. package/dist/types/excalidraw/data/reconcile.d.ts +1 -0
  96. package/dist/types/excalidraw/data/restore.d.ts +6 -1
  97. package/dist/types/excalidraw/eraser/index.d.ts +0 -2
  98. package/dist/types/excalidraw/history.d.ts +21 -5
  99. package/dist/types/excalidraw/index.d.ts +2 -1
  100. package/dist/types/excalidraw/lasso/index.d.ts +1 -0
  101. package/dist/types/excalidraw/lasso/utils.d.ts +2 -1
  102. package/dist/types/excalidraw/renderer/helpers.d.ts +4 -4
  103. package/dist/types/excalidraw/renderer/staticScene.d.ts +4 -1
  104. package/dist/types/excalidraw/scene/Renderer.d.ts +0 -1
  105. package/dist/types/excalidraw/types.d.ts +15 -8
  106. package/dist/types/math/src/angle.d.ts +2 -0
  107. package/dist/types/math/src/constants.d.ts +3 -0
  108. package/dist/types/math/src/curve.d.ts +32 -0
  109. package/dist/types/math/src/index.d.ts +1 -0
  110. package/dist/types/math/src/point.d.ts +1 -1
  111. package/dist/types/math/src/rectangle.d.ts +2 -0
  112. package/dist/types/math/src/vector.d.ts +4 -2
  113. package/history.ts +107 -44
  114. package/package.json +12 -9
  115. package/dist/dev/chunk-HNRFOURL.js +0 -23482
  116. package/dist/dev/chunk-HNRFOURL.js.map +0 -7
  117. package/dist/dev/chunk-JCUIYZXF.js.map +0 -7
  118. package/dist/dev/chunk-VKWYDXFZ.js +0 -7
  119. package/dist/dev/chunk-VKWYDXFZ.js.map +0 -7
  120. package/dist/prod/chunk-G6SRO7HP.js +0 -7
  121. package/dist/prod/chunk-M3D5LUUK.js +0 -33
  122. package/dist/prod/data/image-PMKVN4IF.js +0 -1
  123. package/dist/types/element/src/Shape.d.ts +0 -17
  124. package/dist/types/element/src/ShapeCache.d.ts +0 -25
  125. package/dist/types/element/src/shapes.d.ts +0 -23
  126. package/dist/types/excalidraw/components/ButtonSelect.d.ts +0 -9
  127. package/dist/types/excalidraw/visualdebug.d.ts +0 -41
  128. package/dist/types/utils/src/collision.d.ts +0 -8
  129. /package/dist/dev/data/{image-SLEZBMLG.js.map → image-IWGLHPIX.js.map} +0 -0
  130. /package/dist/dev/locales/{en-ZDTPSZNL.js.map → en-SMAPCEOQ.js.map} +0 -0
@@ -1,17 +1,28 @@
1
1
  /// <reference types="react" />
2
2
  import type { ExcalidrawElement } from "@excalidraw/element/types";
3
+ import type { AppState } from "../types";
3
4
  export declare const actionToggleElementLock: {
4
5
  name: "toggleElementLock";
5
- label: (elements: readonly ExcalidrawElement[], appState: Readonly<import("../types").AppState>, app: import("../types").AppClassProperties) => "labels.elementLock.unlock" | "labels.elementLock.lock" | "labels.elementLock.lockAll" | "labels.elementLock.unlockAll";
6
+ label: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, app: import("../types").AppClassProperties) => "labels.elementLock.lock" | "labels.elementLock.unlock";
6
7
  icon: (appState: import("../types").UIAppState, elements: readonly ExcalidrawElement[]) => import("react/jsx-runtime").JSX.Element;
7
8
  trackEvent: {
8
9
  category: "element";
9
10
  };
10
- predicate: (elements: readonly ExcalidrawElement[], appState: import("../types").AppState, _: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
11
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: import("../types").AppClassProperties) => false | {
11
+ predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
12
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => false | {
12
13
  elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
13
14
  appState: {
15
+ selectedElementIds: Readonly<{
16
+ [id: string]: true;
17
+ }>;
18
+ selectedGroupIds: {
19
+ [groupId: string]: boolean;
20
+ };
14
21
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
22
+ lockedMultiSelections: {
23
+ [x: string]: true;
24
+ };
25
+ activeLockedId: string | null;
15
26
  contextMenu: {
16
27
  items: import("../components/ContextMenu").ContextMenuItems;
17
28
  top: number;
@@ -22,7 +33,7 @@ export declare const actionToggleElementLock: {
22
33
  errorMessage: import("react").ReactNode;
23
34
  activeEmbeddable: {
24
35
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
25
- state: "hover" | "active";
36
+ state: "active" | "hover";
26
37
  } | null;
27
38
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
28
39
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
@@ -41,7 +52,6 @@ export declare const actionToggleElementLock: {
41
52
  editingFrame: string | null;
42
53
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
43
54
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
44
- editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
45
55
  activeTool: {
46
56
  lastActiveTool: import("../types").ActiveTool | null;
47
57
  locked: boolean;
@@ -89,7 +99,7 @@ export declare const actionToggleElementLock: {
89
99
  name: "imageExport" | "help" | "jsonExport";
90
100
  } | {
91
101
  name: "ttd";
92
- tab: "text-to-diagram" | "mermaid";
102
+ tab: "mermaid" | "text-to-diagram";
93
103
  } | {
94
104
  name: "commandPalette";
95
105
  } | {
@@ -98,9 +108,6 @@ export declare const actionToggleElementLock: {
98
108
  } | null;
99
109
  defaultSidebarDockedPreference: boolean;
100
110
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
101
- selectedElementIds: Readonly<{
102
- [id: string]: true;
103
- }>;
104
111
  hoveredElementIds: Readonly<{
105
112
  [id: string]: true;
106
113
  }>;
@@ -120,9 +127,6 @@ export declare const actionToggleElementLock: {
120
127
  gridStep: number;
121
128
  gridModeEnabled: boolean;
122
129
  viewModeEnabled: boolean;
123
- selectedGroupIds: {
124
- [groupId: string]: boolean;
125
- };
126
130
  editingGroupId: string | null;
127
131
  width: number;
128
132
  height: number;
@@ -161,8 +165,7 @@ export declare const actionToggleElementLock: {
161
165
  shown: true;
162
166
  data: import("../charts").Spreadsheet;
163
167
  };
164
- pendingImageElementId: string | null;
165
- showHyperlinkPopup: false | "info" | "editor";
168
+ showHyperlinkPopup: false | "editor" | "info";
166
169
  snapLines: readonly import("../snapping").SnapLine[];
167
170
  originSnapOffset: {
168
171
  x: number;
@@ -180,9 +183,9 @@ export declare const actionToggleElementLock: {
180
183
  };
181
184
  captureUpdate: "IMMEDIATELY";
182
185
  };
183
- keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent, appState: import("../types").AppState, elements: readonly ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean;
186
+ keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState, elements: readonly ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean;
184
187
  } & {
185
- keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent, appState: import("../types").AppState, elements: readonly ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
188
+ keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState, elements: readonly ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
186
189
  };
187
190
  export declare const actionUnlockAllElements: {
188
191
  name: "unlockAllElements";
@@ -191,13 +194,18 @@ export declare const actionUnlockAllElements: {
191
194
  };
192
195
  viewMode: false;
193
196
  icon: import("react/jsx-runtime").JSX.Element;
194
- predicate: (elements: readonly ExcalidrawElement[], appState: import("../types").AppState) => boolean;
195
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
197
+ predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
198
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>) => {
196
199
  elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
197
200
  appState: {
198
201
  selectedElementIds: {
199
202
  [k: string]: true;
200
203
  };
204
+ selectedGroupIds: {
205
+ [groupId: string]: boolean;
206
+ };
207
+ lockedMultiSelections: {};
208
+ activeLockedId: null;
201
209
  contextMenu: {
202
210
  items: import("../components/ContextMenu").ContextMenuItems;
203
211
  top: number;
@@ -208,7 +216,7 @@ export declare const actionUnlockAllElements: {
208
216
  errorMessage: import("react").ReactNode;
209
217
  activeEmbeddable: {
210
218
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
211
- state: "hover" | "active";
219
+ state: "active" | "hover";
212
220
  } | null;
213
221
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
214
222
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
@@ -227,7 +235,6 @@ export declare const actionUnlockAllElements: {
227
235
  editingFrame: string | null;
228
236
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
229
237
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
230
- editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
231
238
  activeTool: {
232
239
  lastActiveTool: import("../types").ActiveTool | null;
233
240
  locked: boolean;
@@ -275,7 +282,7 @@ export declare const actionUnlockAllElements: {
275
282
  name: "imageExport" | "help" | "jsonExport";
276
283
  } | {
277
284
  name: "ttd";
278
- tab: "text-to-diagram" | "mermaid";
285
+ tab: "mermaid" | "text-to-diagram";
279
286
  } | {
280
287
  name: "commandPalette";
281
288
  } | {
@@ -303,9 +310,6 @@ export declare const actionUnlockAllElements: {
303
310
  gridStep: number;
304
311
  gridModeEnabled: boolean;
305
312
  viewModeEnabled: boolean;
306
- selectedGroupIds: {
307
- [groupId: string]: boolean;
308
- };
309
313
  editingGroupId: string | null;
310
314
  width: number;
311
315
  height: number;
@@ -344,8 +348,7 @@ export declare const actionUnlockAllElements: {
344
348
  shown: true;
345
349
  data: import("../charts").Spreadsheet;
346
350
  };
347
- pendingImageElementId: string | null;
348
- showHyperlinkPopup: false | "info" | "editor";
351
+ showHyperlinkPopup: false | "editor" | "info";
349
352
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
350
353
  snapLines: readonly import("../snapping").SnapLine[];
351
354
  originSnapOffset: {
@@ -24,7 +24,7 @@ export declare const actionSetEmbeddableAsActiveTool: {
24
24
  errorMessage: import("react").ReactNode;
25
25
  activeEmbeddable: {
26
26
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
27
- state: "hover" | "active";
27
+ state: "active" | "hover";
28
28
  } | null;
29
29
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
30
30
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
@@ -43,7 +43,6 @@ export declare const actionSetEmbeddableAsActiveTool: {
43
43
  editingFrame: string | null;
44
44
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
45
45
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
46
- editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
47
46
  penMode: boolean;
48
47
  penDetected: boolean;
49
48
  exportBackground: boolean;
@@ -86,7 +85,7 @@ export declare const actionSetEmbeddableAsActiveTool: {
86
85
  name: "imageExport" | "help" | "jsonExport";
87
86
  } | {
88
87
  name: "ttd";
89
- tab: "text-to-diagram" | "mermaid";
88
+ tab: "mermaid" | "text-to-diagram";
90
89
  } | {
91
90
  name: "commandPalette";
92
91
  } | {
@@ -158,8 +157,7 @@ export declare const actionSetEmbeddableAsActiveTool: {
158
157
  shown: true;
159
158
  data: import("../charts").Spreadsheet;
160
159
  };
161
- pendingImageElementId: string | null;
162
- showHyperlinkPopup: false | "info" | "editor";
160
+ showHyperlinkPopup: false | "editor" | "info";
163
161
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
164
162
  snapLines: readonly import("../snapping").SnapLine[];
165
163
  originSnapOffset: {
@@ -175,6 +173,10 @@ export declare const actionSetEmbeddableAsActiveTool: {
175
173
  focusedId: string | null;
176
174
  matches: readonly import("../types").SearchMatch[];
177
175
  }> | null;
176
+ activeLockedId: string | null;
177
+ lockedMultiSelections: {
178
+ [groupId: string]: true;
179
+ };
178
180
  };
179
181
  captureUpdate: "EVENTUALLY";
180
182
  };