@excalidraw/excalidraw 0.18.0-c4c0649 → 0.18.0-d2463f87d

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 (121) hide show
  1. package/dist/dev/chunk-CBGOW5JB.js +5669 -0
  2. package/dist/dev/chunk-CBGOW5JB.js.map +7 -0
  3. package/dist/dev/chunk-CP5DND7P.js +7 -0
  4. package/dist/dev/chunk-CP5DND7P.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-SURZSZNX.js} +3 -3
  8. package/dist/dev/index.css +47 -20
  9. package/dist/dev/index.css.map +3 -3
  10. package/dist/dev/index.js +5873 -3369
  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-GCFVWREF.js → chunk-I4UNSFV6.js} +4 -4
  17. package/dist/prod/chunk-IRHK23LL.js +4 -0
  18. package/dist/prod/data/image-HXEZYJPQ.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 +18 -3
  25. package/dist/types/common/src/utils.d.ts +3 -5
  26. package/dist/types/element/src/Scene.d.ts +1 -1
  27. package/dist/types/element/src/binding.d.ts +10 -7
  28. package/dist/types/element/src/bounds.d.ts +11 -3
  29. package/dist/types/element/src/collision.d.ts +18 -12
  30. package/dist/types/element/src/cropElement.d.ts +1 -1
  31. package/dist/types/element/src/delta.d.ts +26 -6
  32. package/dist/types/element/src/distance.d.ts +2 -2
  33. package/dist/types/element/src/fractionalIndex.d.ts +8 -2
  34. package/dist/types/element/src/frame.d.ts +2 -2
  35. package/dist/types/element/src/index.d.ts +1 -3
  36. package/dist/types/element/src/linearElementEditor.d.ts +12 -22
  37. package/dist/types/element/src/mutateElement.d.ts +1 -1
  38. package/dist/types/element/src/newElement.d.ts +2 -1
  39. package/dist/types/element/src/resizeElements.d.ts +1 -0
  40. package/dist/types/element/src/selection.d.ts +1 -1
  41. package/dist/types/element/src/shape.d.ts +42 -0
  42. package/dist/types/element/src/sizeHelpers.d.ts +2 -1
  43. package/dist/types/element/src/store.d.ts +12 -8
  44. package/dist/types/element/src/transformHandles.d.ts +4 -4
  45. package/dist/types/element/src/typeChecks.d.ts +15 -1
  46. package/dist/types/element/src/types.d.ts +8 -3
  47. package/dist/types/element/src/utils.d.ts +16 -6
  48. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +21 -12
  49. package/dist/types/excalidraw/actions/actionAlign.d.ts +8 -8
  50. package/dist/types/excalidraw/actions/actionBoundText.d.ts +14 -8
  51. package/dist/types/excalidraw/actions/actionCanvas.d.ts +181 -142
  52. package/dist/types/excalidraw/actions/actionClipboard.d.ts +47 -28
  53. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +7 -4
  54. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +24 -14
  55. package/dist/types/excalidraw/actions/actionDistribute.d.ts +4 -4
  56. package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +2 -2
  57. package/dist/types/excalidraw/actions/actionElementLink.d.ts +6 -3
  58. package/dist/types/excalidraw/actions/actionElementLock.d.ts +29 -24
  59. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +7 -4
  60. package/dist/types/excalidraw/actions/actionExport.d.ts +148 -121
  61. package/dist/types/excalidraw/actions/actionFinalize.d.ts +63 -17
  62. package/dist/types/excalidraw/actions/actionFlip.d.ts +4 -4
  63. package/dist/types/excalidraw/actions/actionFrame.d.ts +78 -66
  64. package/dist/types/excalidraw/actions/actionGroup.d.ts +20 -14
  65. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +500 -4
  66. package/dist/types/excalidraw/actions/actionLink.d.ts +8 -5
  67. package/dist/types/excalidraw/actions/actionMenu.d.ts +22 -13
  68. package/dist/types/excalidraw/actions/actionNavigate.d.ts +14 -8
  69. package/dist/types/excalidraw/actions/actionProperties.d.ts +119 -66
  70. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +10 -7
  71. package/dist/types/excalidraw/actions/actionStyles.d.ts +11 -8
  72. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +9 -6
  73. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +9 -6
  74. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +8 -5
  75. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +9 -6
  76. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +9 -6
  77. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +9 -6
  78. package/dist/types/excalidraw/actions/actionZindex.d.ts +8 -8
  79. package/dist/types/excalidraw/actions/types.d.ts +2 -1
  80. package/dist/types/excalidraw/appState.d.ts +29 -20
  81. package/dist/types/excalidraw/components/App.d.ts +13 -16
  82. package/dist/types/excalidraw/components/ButtonIcon.d.ts +1 -0
  83. package/dist/types/excalidraw/components/{ButtonIconSelect.d.ts → RadioSelection.d.ts} +1 -1
  84. package/dist/types/excalidraw/components/Stats/DragInput.d.ts +11 -1
  85. package/dist/types/excalidraw/components/UnlockPopup.d.ts +8 -0
  86. package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +1 -0
  87. package/dist/types/excalidraw/components/icons.d.ts +2 -0
  88. package/dist/types/excalidraw/components/shapes.d.ts +1 -1
  89. package/dist/types/excalidraw/data/blob.d.ts +1 -1
  90. package/dist/types/excalidraw/eraser/index.d.ts +0 -2
  91. package/dist/types/excalidraw/history.d.ts +21 -5
  92. package/dist/types/excalidraw/lasso/index.d.ts +1 -0
  93. package/dist/types/excalidraw/lasso/utils.d.ts +2 -1
  94. package/dist/types/excalidraw/renderer/helpers.d.ts +4 -4
  95. package/dist/types/excalidraw/scene/Renderer.d.ts +0 -1
  96. package/dist/types/excalidraw/types.d.ts +10 -4
  97. package/dist/types/math/src/angle.d.ts +2 -0
  98. package/dist/types/math/src/constants.d.ts +3 -0
  99. package/dist/types/math/src/curve.d.ts +32 -0
  100. package/dist/types/math/src/index.d.ts +1 -0
  101. package/dist/types/math/src/point.d.ts +1 -1
  102. package/dist/types/math/src/rectangle.d.ts +2 -0
  103. package/dist/types/math/src/vector.d.ts +4 -2
  104. package/history.ts +108 -45
  105. package/package.json +12 -9
  106. package/dist/dev/chunk-HNRFOURL.js +0 -23482
  107. package/dist/dev/chunk-HNRFOURL.js.map +0 -7
  108. package/dist/dev/chunk-JCUIYZXF.js.map +0 -7
  109. package/dist/dev/chunk-VKWYDXFZ.js +0 -7
  110. package/dist/dev/chunk-VKWYDXFZ.js.map +0 -7
  111. package/dist/prod/chunk-G6SRO7HP.js +0 -7
  112. package/dist/prod/chunk-M3D5LUUK.js +0 -33
  113. package/dist/prod/data/image-PMKVN4IF.js +0 -1
  114. package/dist/types/element/src/Shape.d.ts +0 -17
  115. package/dist/types/element/src/ShapeCache.d.ts +0 -25
  116. package/dist/types/element/src/shapes.d.ts +0 -23
  117. package/dist/types/excalidraw/components/ButtonSelect.d.ts +0 -9
  118. package/dist/types/excalidraw/visualdebug.d.ts +0 -41
  119. package/dist/types/utils/src/collision.d.ts +0 -8
  120. /package/dist/dev/data/{image-SLEZBMLG.js.map → image-SURZSZNX.js.map} +0 -0
  121. /package/dist/dev/locales/{en-ZDTPSZNL.js.map → en-SMAPCEOQ.js.map} +0 -0
@@ -18,7 +18,7 @@ export declare const actionLink: {
18
18
  errorMessage: import("react").ReactNode;
19
19
  activeEmbeddable: {
20
20
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
21
- state: "hover" | "active";
21
+ state: "active" | "hover";
22
22
  } | null;
23
23
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
24
24
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
@@ -84,7 +84,7 @@ export declare const actionLink: {
84
84
  name: "imageExport" | "help" | "jsonExport";
85
85
  } | {
86
86
  name: "ttd";
87
- tab: "text-to-diagram" | "mermaid";
87
+ tab: "mermaid" | "text-to-diagram";
88
88
  } | {
89
89
  name: "commandPalette";
90
90
  } | {
@@ -156,7 +156,6 @@ export declare const actionLink: {
156
156
  shown: true;
157
157
  data: import("../charts").Spreadsheet;
158
158
  };
159
- pendingImageElementId: string | null;
160
159
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
161
160
  snapLines: readonly import("../snapping").SnapLine[];
162
161
  originSnapOffset: {
@@ -172,6 +171,10 @@ export declare const actionLink: {
172
171
  focusedId: string | null;
173
172
  matches: readonly import("../types").SearchMatch[];
174
173
  }> | null;
174
+ activeLockedId: string | null;
175
+ lockedMultiSelections: {
176
+ [groupId: string]: true;
177
+ };
175
178
  };
176
179
  captureUpdate: "IMMEDIATELY";
177
180
  };
@@ -179,9 +182,9 @@ export declare const actionLink: {
179
182
  category: "hyperlink";
180
183
  action: string;
181
184
  };
182
- keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
185
+ keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
183
186
  predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState) => boolean;
184
187
  PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
185
188
  } & {
186
- keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
189
+ keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
187
190
  };
@@ -18,7 +18,7 @@ export declare const actionToggleCanvasMenu: {
18
18
  errorMessage: import("react").ReactNode;
19
19
  activeEmbeddable: {
20
20
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
21
- state: "hover" | "active";
21
+ state: "active" | "hover";
22
22
  } | null;
23
23
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
24
24
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
@@ -84,7 +84,7 @@ export declare const actionToggleCanvasMenu: {
84
84
  name: "imageExport" | "help" | "jsonExport";
85
85
  } | {
86
86
  name: "ttd";
87
- tab: "text-to-diagram" | "mermaid";
87
+ tab: "mermaid" | "text-to-diagram";
88
88
  } | {
89
89
  name: "commandPalette";
90
90
  } | {
@@ -156,8 +156,7 @@ export declare const actionToggleCanvasMenu: {
156
156
  shown: true;
157
157
  data: import("../charts").Spreadsheet;
158
158
  };
159
- pendingImageElementId: string | null;
160
- showHyperlinkPopup: false | "info" | "editor";
159
+ showHyperlinkPopup: false | "editor" | "info";
161
160
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
162
161
  snapLines: readonly import("../snapping").SnapLine[];
163
162
  originSnapOffset: {
@@ -173,6 +172,10 @@ export declare const actionToggleCanvasMenu: {
173
172
  focusedId: string | null;
174
173
  matches: readonly import("../types").SearchMatch[];
175
174
  }> | null;
175
+ activeLockedId: string | null;
176
+ lockedMultiSelections: {
177
+ [groupId: string]: true;
178
+ };
176
179
  };
177
180
  captureUpdate: "EVENTUALLY";
178
181
  };
@@ -199,7 +202,7 @@ export declare const actionToggleEditMenu: {
199
202
  errorMessage: import("react").ReactNode;
200
203
  activeEmbeddable: {
201
204
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
202
- state: "hover" | "active";
205
+ state: "active" | "hover";
203
206
  } | null;
204
207
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
205
208
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
@@ -265,7 +268,7 @@ export declare const actionToggleEditMenu: {
265
268
  name: "imageExport" | "help" | "jsonExport";
266
269
  } | {
267
270
  name: "ttd";
268
- tab: "text-to-diagram" | "mermaid";
271
+ tab: "mermaid" | "text-to-diagram";
269
272
  } | {
270
273
  name: "commandPalette";
271
274
  } | {
@@ -337,8 +340,7 @@ export declare const actionToggleEditMenu: {
337
340
  shown: true;
338
341
  data: import("../charts").Spreadsheet;
339
342
  };
340
- pendingImageElementId: string | null;
341
- showHyperlinkPopup: false | "info" | "editor";
343
+ showHyperlinkPopup: false | "editor" | "info";
342
344
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
343
345
  snapLines: readonly import("../snapping").SnapLine[];
344
346
  originSnapOffset: {
@@ -354,6 +356,10 @@ export declare const actionToggleEditMenu: {
354
356
  focusedId: string | null;
355
357
  matches: readonly import("../types").SearchMatch[];
356
358
  }> | null;
359
+ activeLockedId: string | null;
360
+ lockedMultiSelections: {
361
+ [groupId: string]: true;
362
+ };
357
363
  };
358
364
  captureUpdate: "EVENTUALLY";
359
365
  };
@@ -385,7 +391,7 @@ export declare const actionShortcuts: {
385
391
  errorMessage: import("react").ReactNode;
386
392
  activeEmbeddable: {
387
393
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
388
- state: "hover" | "active";
394
+ state: "active" | "hover";
389
395
  } | null;
390
396
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
391
397
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
@@ -513,8 +519,7 @@ export declare const actionShortcuts: {
513
519
  shown: true;
514
520
  data: import("../charts").Spreadsheet;
515
521
  };
516
- pendingImageElementId: string | null;
517
- showHyperlinkPopup: false | "info" | "editor";
522
+ showHyperlinkPopup: false | "editor" | "info";
518
523
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
519
524
  snapLines: readonly import("../snapping").SnapLine[];
520
525
  originSnapOffset: {
@@ -530,10 +535,14 @@ export declare const actionShortcuts: {
530
535
  focusedId: string | null;
531
536
  matches: readonly import("../types").SearchMatch[];
532
537
  }> | null;
538
+ activeLockedId: string | null;
539
+ lockedMultiSelections: {
540
+ [groupId: string]: true;
541
+ };
533
542
  };
534
543
  captureUpdate: "EVENTUALLY";
535
544
  };
536
- keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
545
+ keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
537
546
  } & {
538
- keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
547
+ keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
539
548
  };
@@ -20,7 +20,7 @@ export declare const actionGoToCollaborator: {
20
20
  errorMessage: import("react").ReactNode;
21
21
  activeEmbeddable: {
22
22
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
23
- state: "hover" | "active";
23
+ state: "active" | "hover";
24
24
  } | null;
25
25
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
26
26
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
@@ -87,7 +87,7 @@ export declare const actionGoToCollaborator: {
87
87
  name: "imageExport" | "help" | "jsonExport";
88
88
  } | {
89
89
  name: "ttd";
90
- tab: "text-to-diagram" | "mermaid";
90
+ tab: "mermaid" | "text-to-diagram";
91
91
  } | {
92
92
  name: "commandPalette";
93
93
  } | {
@@ -159,8 +159,7 @@ export declare const actionGoToCollaborator: {
159
159
  shown: true;
160
160
  data: import("../charts").Spreadsheet;
161
161
  };
162
- pendingImageElementId: string | null;
163
- showHyperlinkPopup: false | "info" | "editor";
162
+ showHyperlinkPopup: false | "editor" | "info";
164
163
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
165
164
  snapLines: readonly import("../snapping").SnapLine[];
166
165
  originSnapOffset: {
@@ -175,6 +174,10 @@ export declare const actionGoToCollaborator: {
175
174
  focusedId: string | null;
176
175
  matches: readonly import("../types").SearchMatch[];
177
176
  }> | null;
177
+ activeLockedId: string | null;
178
+ lockedMultiSelections: {
179
+ [groupId: string]: true;
180
+ };
178
181
  };
179
182
  captureUpdate: "EVENTUALLY";
180
183
  } | {
@@ -194,7 +197,7 @@ export declare const actionGoToCollaborator: {
194
197
  errorMessage: import("react").ReactNode;
195
198
  activeEmbeddable: {
196
199
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
197
- state: "hover" | "active";
200
+ state: "active" | "hover";
198
201
  } | null;
199
202
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
200
203
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
@@ -260,7 +263,7 @@ export declare const actionGoToCollaborator: {
260
263
  name: "imageExport" | "help" | "jsonExport";
261
264
  } | {
262
265
  name: "ttd";
263
- tab: "text-to-diagram" | "mermaid";
266
+ tab: "mermaid" | "text-to-diagram";
264
267
  } | {
265
268
  name: "commandPalette";
266
269
  } | {
@@ -332,8 +335,7 @@ export declare const actionGoToCollaborator: {
332
335
  shown: true;
333
336
  data: import("../charts").Spreadsheet;
334
337
  };
335
- pendingImageElementId: string | null;
336
- showHyperlinkPopup: false | "info" | "editor";
338
+ showHyperlinkPopup: false | "editor" | "info";
337
339
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
338
340
  snapLines: readonly import("../snapping").SnapLine[];
339
341
  originSnapOffset: {
@@ -348,6 +350,10 @@ export declare const actionGoToCollaborator: {
348
350
  focusedId: string | null;
349
351
  matches: readonly import("../types").SearchMatch[];
350
352
  }> | null;
353
+ activeLockedId: string | null;
354
+ lockedMultiSelections: {
355
+ [groupId: string]: true;
356
+ };
351
357
  };
352
358
  captureUpdate: "EVENTUALLY";
353
359
  };