@dwelle/excalidraw 0.5.0-8cb033d → 0.5.0-90f2d4e

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 (141) hide show
  1. package/dist/dev/{chunk-C6WW3IWU.js → chunk-BIYCCCC4.js} +14 -4
  2. package/dist/dev/chunk-BIYCCCC4.js.map +7 -0
  3. package/dist/dev/chunk-QW2KPMGE.js +7 -0
  4. package/dist/dev/chunk-QW2KPMGE.js.map +7 -0
  5. package/dist/dev/{chunk-2LNRWI74.js → chunk-VPDGV5DO.js} +9679 -8756
  6. package/dist/dev/chunk-VPDGV5DO.js.map +7 -0
  7. package/dist/dev/data/{image-7QZI7GM4.js → image-RC4Z3PZK.js} +3 -3
  8. package/dist/dev/index.css +695 -506
  9. package/dist/dev/index.css.map +3 -3
  10. package/dist/dev/index.js +4223 -2821
  11. package/dist/dev/index.js.map +4 -4
  12. package/dist/dev/locales/{en-VFJV7E2V.js → en-XLJO5VTH.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-DUG5AXRR.js +33 -0
  16. package/dist/prod/chunk-M2OFWNPH.js +7 -0
  17. package/dist/prod/{chunk-O65DDAOS.js → chunk-SPUFWQ3U.js} +4 -4
  18. package/dist/prod/data/image-W7J67QSB.js +1 -0
  19. package/dist/prod/index.css +1 -1
  20. package/dist/prod/index.js +20 -20
  21. package/dist/prod/locales/{en-UUHXMMMY.js → en-DMU2KFKH.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 +38 -6
  25. package/dist/types/common/src/utils.d.ts +6 -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 +12 -4
  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 +41 -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 +2 -3
  39. package/dist/types/element/src/linearElementEditor.d.ts +13 -15
  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/positionElementsOnGrid.d.ts +2 -0
  43. package/dist/types/element/src/renderElement.d.ts +4 -1
  44. package/dist/types/element/src/resizeElements.d.ts +1 -0
  45. package/dist/types/element/src/selection.d.ts +1 -1
  46. package/dist/types/element/src/shape.d.ts +42 -0
  47. package/dist/types/element/src/sizeHelpers.d.ts +2 -1
  48. package/dist/types/element/src/store.d.ts +19 -9
  49. package/dist/types/element/src/textElement.d.ts +1 -1
  50. package/dist/types/element/src/transformHandles.d.ts +4 -4
  51. package/dist/types/element/src/typeChecks.d.ts +15 -1
  52. package/dist/types/element/src/types.d.ts +8 -3
  53. package/dist/types/element/src/utils.d.ts +16 -6
  54. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +15 -18
  55. package/dist/types/excalidraw/actions/actionAlign.d.ts +8 -8
  56. package/dist/types/excalidraw/actions/actionBoundText.d.ts +10 -12
  57. package/dist/types/excalidraw/actions/actionCanvas.d.ts +158 -170
  58. package/dist/types/excalidraw/actions/actionClipboard.d.ts +38 -42
  59. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +5 -6
  60. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +21 -23
  61. package/dist/types/excalidraw/actions/actionDistribute.d.ts +4 -4
  62. package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +2 -2
  63. package/dist/types/excalidraw/actions/actionElementLink.d.ts +4 -5
  64. package/dist/types/excalidraw/actions/actionElementLock.d.ts +12 -14
  65. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +5 -6
  66. package/dist/types/excalidraw/actions/actionExport.d.ts +130 -139
  67. package/dist/types/excalidraw/actions/actionFinalize.d.ts +61 -22
  68. package/dist/types/excalidraw/actions/actionFlip.d.ts +4 -4
  69. package/dist/types/excalidraw/actions/actionFrame.d.ts +70 -74
  70. package/dist/types/excalidraw/actions/actionGroup.d.ts +16 -18
  71. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +532 -9
  72. package/dist/types/excalidraw/actions/actionLink.d.ts +6 -7
  73. package/dist/types/excalidraw/actions/actionMenu.d.ts +16 -19
  74. package/dist/types/excalidraw/actions/actionNavigate.d.ts +10 -12
  75. package/dist/types/excalidraw/actions/actionProperties.d.ts +107 -105
  76. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +8 -9
  77. package/dist/types/excalidraw/actions/actionStyles.d.ts +9 -10
  78. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +7 -8
  79. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +7 -8
  80. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +6 -7
  81. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +7 -8
  82. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +7 -8
  83. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +7 -8
  84. package/dist/types/excalidraw/actions/actionZindex.d.ts +8 -8
  85. package/dist/types/excalidraw/actions/index.d.ts +1 -1
  86. package/dist/types/excalidraw/actions/types.d.ts +2 -1
  87. package/dist/types/excalidraw/appState.d.ts +21 -20
  88. package/dist/types/excalidraw/clipboard.d.ts +64 -1
  89. package/dist/types/excalidraw/components/Actions.d.ts +8 -5
  90. package/dist/types/excalidraw/components/App.d.ts +21 -27
  91. package/dist/types/excalidraw/components/ButtonIcon.d.ts +1 -0
  92. package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +2 -1
  93. package/dist/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +1 -0
  94. package/dist/types/excalidraw/components/Ellipsify.d.ts +4 -0
  95. package/dist/types/excalidraw/components/FontPicker/FontPicker.d.ts +2 -1
  96. package/dist/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +2 -1
  97. package/dist/types/excalidraw/components/InlineIcon.d.ts +3 -1
  98. package/dist/types/excalidraw/components/LibraryMenuSection.d.ts +1 -1
  99. package/dist/types/excalidraw/components/PropertiesPopover.d.ts +1 -0
  100. package/dist/types/excalidraw/components/Stats/DragInput.d.ts +11 -1
  101. package/dist/types/excalidraw/components/TextField.d.ts +1 -0
  102. package/dist/types/excalidraw/components/icons.d.ts +7 -0
  103. package/dist/types/excalidraw/components/shapes.d.ts +129 -1
  104. package/dist/types/excalidraw/data/blob.d.ts +4 -8
  105. package/dist/types/excalidraw/data/reconcile.d.ts +1 -0
  106. package/dist/types/excalidraw/data/restore.d.ts +6 -1
  107. package/dist/types/excalidraw/data/types.d.ts +4 -1
  108. package/dist/types/excalidraw/eraser/index.d.ts +0 -2
  109. package/dist/types/excalidraw/history.d.ts +21 -5
  110. package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
  111. package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +14 -0
  112. package/dist/types/excalidraw/index.d.ts +2 -1
  113. package/dist/types/excalidraw/lasso/utils.d.ts +2 -1
  114. package/dist/types/excalidraw/renderer/helpers.d.ts +4 -4
  115. package/dist/types/excalidraw/renderer/staticScene.d.ts +4 -1
  116. package/dist/types/excalidraw/scene/Renderer.d.ts +0 -1
  117. package/dist/types/excalidraw/types.d.ts +12 -9
  118. package/dist/types/math/src/angle.d.ts +2 -0
  119. package/dist/types/math/src/constants.d.ts +3 -0
  120. package/dist/types/math/src/curve.d.ts +32 -0
  121. package/dist/types/math/src/index.d.ts +1 -0
  122. package/dist/types/math/src/point.d.ts +1 -1
  123. package/dist/types/math/src/rectangle.d.ts +2 -0
  124. package/dist/types/math/src/segment.d.ts +1 -0
  125. package/dist/types/math/src/vector.d.ts +4 -2
  126. package/history.ts +107 -44
  127. package/package.json +9 -9
  128. package/dist/dev/chunk-2LNRWI74.js.map +0 -7
  129. package/dist/dev/chunk-C6WW3IWU.js.map +0 -7
  130. package/dist/dev/chunk-NR24AOHB.js +0 -7
  131. package/dist/dev/chunk-NR24AOHB.js.map +0 -7
  132. package/dist/prod/chunk-JUZ2P6ZK.js +0 -33
  133. package/dist/prod/chunk-ZSOIT5RG.js +0 -7
  134. package/dist/prod/data/image-RPTD4VCP.js +0 -1
  135. package/dist/types/element/src/Shape.d.ts +0 -17
  136. package/dist/types/element/src/ShapeCache.d.ts +0 -25
  137. package/dist/types/element/src/shapes.d.ts +0 -23
  138. package/dist/types/excalidraw/visualdebug.d.ts +0 -41
  139. package/dist/types/utils/src/collision.d.ts +0 -8
  140. /package/dist/dev/data/{image-7QZI7GM4.js.map → image-RC4Z3PZK.js.map} +0 -0
  141. /package/dist/dev/locales/{en-VFJV7E2V.js.map → en-XLJO5VTH.js.map} +0 -0
@@ -51,7 +51,7 @@ export declare const actionLinkToElement: {
51
51
  errorMessage: import("react").ReactNode;
52
52
  activeEmbeddable: {
53
53
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
54
- state: "hover" | "active";
54
+ state: "active" | "hover";
55
55
  } | null;
56
56
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
57
57
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
@@ -70,7 +70,6 @@ export declare const actionLinkToElement: {
70
70
  editingFrame: string | null;
71
71
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
72
72
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
73
- editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
74
73
  activeTool: {
75
74
  lastActiveTool: import("../types").ActiveTool | null;
76
75
  locked: boolean;
@@ -109,7 +108,7 @@ export declare const actionLinkToElement: {
109
108
  value: import("../types").NormalizedZoomValue;
110
109
  }>;
111
110
  openMenu: "canvas" | "shape" | null;
112
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
111
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
113
112
  openSidebar: {
114
113
  name: string;
115
114
  tab?: string | undefined;
@@ -179,8 +178,7 @@ export declare const actionLinkToElement: {
179
178
  shown: true;
180
179
  data: import("../charts").Spreadsheet;
181
180
  };
182
- pendingImageElementId: string | null;
183
- showHyperlinkPopup: false | "info" | "editor";
181
+ showHyperlinkPopup: false | "editor" | "info";
184
182
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
185
183
  snapLines: readonly import("../snapping").SnapLine[];
186
184
  originSnapOffset: {
@@ -200,6 +198,7 @@ export declare const actionLinkToElement: {
200
198
  lockedMultiSelections: {
201
199
  [groupId: string]: true;
202
200
  };
201
+ stylesPanelMode: "compact" | "full";
203
202
  };
204
203
  captureUpdate: "IMMEDIATELY";
205
204
  elements?: undefined;
@@ -33,7 +33,7 @@ export declare const actionToggleElementLock: {
33
33
  errorMessage: import("react").ReactNode;
34
34
  activeEmbeddable: {
35
35
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
36
- state: "hover" | "active";
36
+ state: "active" | "hover";
37
37
  } | null;
38
38
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
39
39
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
@@ -52,7 +52,6 @@ export declare const actionToggleElementLock: {
52
52
  editingFrame: string | null;
53
53
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
54
54
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
55
- editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
56
55
  activeTool: {
57
56
  lastActiveTool: import("../types").ActiveTool | null;
58
57
  locked: boolean;
@@ -91,7 +90,7 @@ export declare const actionToggleElementLock: {
91
90
  value: import("../types").NormalizedZoomValue;
92
91
  }>;
93
92
  openMenu: "canvas" | "shape" | null;
94
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
93
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
95
94
  openSidebar: {
96
95
  name: string;
97
96
  tab?: string | undefined;
@@ -100,7 +99,7 @@ export declare const actionToggleElementLock: {
100
99
  name: "imageExport" | "help" | "jsonExport";
101
100
  } | {
102
101
  name: "ttd";
103
- tab: "text-to-diagram" | "mermaid";
102
+ tab: "mermaid" | "text-to-diagram";
104
103
  } | {
105
104
  name: "commandPalette";
106
105
  } | {
@@ -166,8 +165,7 @@ export declare const actionToggleElementLock: {
166
165
  shown: true;
167
166
  data: import("../charts").Spreadsheet;
168
167
  };
169
- pendingImageElementId: string | null;
170
- showHyperlinkPopup: false | "info" | "editor";
168
+ showHyperlinkPopup: false | "editor" | "info";
171
169
  snapLines: readonly import("../snapping").SnapLine[];
172
170
  originSnapOffset: {
173
171
  x: number;
@@ -182,12 +180,13 @@ export declare const actionToggleElementLock: {
182
180
  focusedId: string | null;
183
181
  matches: readonly import("../types").SearchMatch[];
184
182
  }> | null;
183
+ stylesPanelMode: "compact" | "full";
185
184
  };
186
185
  captureUpdate: "IMMEDIATELY";
187
186
  };
188
- keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean;
187
+ keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState, elements: readonly ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean;
189
188
  } & {
190
- keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
189
+ keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState, elements: readonly ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
191
190
  };
192
191
  export declare const actionUnlockAllElements: {
193
192
  name: "unlockAllElements";
@@ -218,7 +217,7 @@ export declare const actionUnlockAllElements: {
218
217
  errorMessage: import("react").ReactNode;
219
218
  activeEmbeddable: {
220
219
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
221
- state: "hover" | "active";
220
+ state: "active" | "hover";
222
221
  } | null;
223
222
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
224
223
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
@@ -237,7 +236,6 @@ export declare const actionUnlockAllElements: {
237
236
  editingFrame: string | null;
238
237
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
239
238
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
240
- editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
241
239
  activeTool: {
242
240
  lastActiveTool: import("../types").ActiveTool | null;
243
241
  locked: boolean;
@@ -276,7 +274,7 @@ export declare const actionUnlockAllElements: {
276
274
  value: import("../types").NormalizedZoomValue;
277
275
  }>;
278
276
  openMenu: "canvas" | "shape" | null;
279
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
277
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
280
278
  openSidebar: {
281
279
  name: string;
282
280
  tab?: string | undefined;
@@ -285,7 +283,7 @@ export declare const actionUnlockAllElements: {
285
283
  name: "imageExport" | "help" | "jsonExport";
286
284
  } | {
287
285
  name: "ttd";
288
- tab: "text-to-diagram" | "mermaid";
286
+ tab: "mermaid" | "text-to-diagram";
289
287
  } | {
290
288
  name: "commandPalette";
291
289
  } | {
@@ -351,8 +349,7 @@ export declare const actionUnlockAllElements: {
351
349
  shown: true;
352
350
  data: import("../charts").Spreadsheet;
353
351
  };
354
- pendingImageElementId: string | null;
355
- showHyperlinkPopup: false | "info" | "editor";
352
+ showHyperlinkPopup: false | "editor" | "info";
356
353
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
357
354
  snapLines: readonly import("../snapping").SnapLine[];
358
355
  originSnapOffset: {
@@ -368,6 +365,7 @@ export declare const actionUnlockAllElements: {
368
365
  focusedId: string | null;
369
366
  matches: readonly import("../types").SearchMatch[];
370
367
  }> | null;
368
+ stylesPanelMode: "compact" | "full";
371
369
  };
372
370
  captureUpdate: "IMMEDIATELY";
373
371
  };
@@ -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;
@@ -77,7 +76,7 @@ export declare const actionSetEmbeddableAsActiveTool: {
77
76
  value: import("../types").NormalizedZoomValue;
78
77
  }>;
79
78
  openMenu: "canvas" | "shape" | null;
80
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
79
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
81
80
  openSidebar: {
82
81
  name: string;
83
82
  tab?: string | undefined;
@@ -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: {
@@ -179,6 +177,7 @@ export declare const actionSetEmbeddableAsActiveTool: {
179
177
  lockedMultiSelections: {
180
178
  [groupId: string]: true;
181
179
  };
180
+ stylesPanelMode: "compact" | "full";
182
181
  };
183
182
  captureUpdate: "EVENTUALLY";
184
183
  };