@excalidraw/excalidraw 0.18.0-195a743 → 0.18.0-298812e

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 (139) hide show
  1. package/dist/dev/{chunk-T3M44BFV.js → chunk-JCUIYZXF.js} +7 -3
  2. package/dist/dev/chunk-JCUIYZXF.js.map +7 -0
  3. package/dist/dev/{chunk-WMGEUIQQ.js → chunk-RQWTCZLD.js} +2 -2
  4. package/dist/dev/{chunk-H3EW23X2.js → chunk-ZPGIVNNG.js} +14840 -9652
  5. package/dist/dev/chunk-ZPGIVNNG.js.map +7 -0
  6. package/dist/dev/data/{image-TTQKTTOH.js → image-CB4ZYE3A.js} +3 -3
  7. package/dist/dev/index.css +38 -2
  8. package/dist/dev/index.css.map +2 -2
  9. package/dist/dev/index.js +857 -5250
  10. package/dist/dev/index.js.map +4 -4
  11. package/dist/dev/locales/{en-I23TB6DJ.js → en-ZDTPSZNL.js} +2 -2
  12. package/dist/dev/subset-shared.chunk.js +1 -1
  13. package/dist/dev/subset-worker.chunk.js +1 -1
  14. package/dist/prod/{chunk-GK4XUKZB.js → chunk-7TMLMBQX.js} +1 -1
  15. package/dist/prod/{chunk-2Z7RPVPO.js → chunk-GCFVWREF.js} +3 -3
  16. package/dist/prod/chunk-WFJFO6F4.js +33 -0
  17. package/dist/prod/data/image-XJI4SWH2.js +1 -0
  18. package/dist/prod/index.css +1 -1
  19. package/dist/prod/index.js +18 -18
  20. package/dist/prod/locales/{en-TC3OFDA6.js → en-MHZ26NAR.js} +1 -1
  21. package/dist/prod/subset-shared.chunk.js +1 -1
  22. package/dist/prod/subset-worker.chunk.js +1 -1
  23. package/dist/types/common/src/constants.d.ts +1 -0
  24. package/dist/types/{excalidraw → common/src}/emitter.d.ts +1 -1
  25. package/dist/types/common/src/font-metadata.d.ts +4 -2
  26. package/dist/types/common/src/index.d.ts +1 -0
  27. package/dist/types/common/src/utility-types.d.ts +5 -0
  28. package/dist/types/common/src/utils.d.ts +16 -4
  29. package/dist/types/element/src/Scene.d.ts +4 -4
  30. package/dist/types/element/src/ShapeCache.d.ts +1 -1
  31. package/dist/types/element/src/align.d.ts +1 -1
  32. package/dist/types/element/src/binding.d.ts +1 -1
  33. package/dist/types/element/src/bounds.d.ts +1 -1
  34. package/dist/types/{excalidraw/change.d.ts → element/src/delta.d.ts} +40 -35
  35. package/dist/types/element/src/dragElements.d.ts +1 -1
  36. package/dist/types/element/src/flowchart.d.ts +1 -1
  37. package/dist/types/element/src/frame.d.ts +3 -2
  38. package/dist/types/element/src/index.d.ts +45 -2
  39. package/dist/types/element/src/linearElementEditor.d.ts +4 -8
  40. package/dist/types/element/src/newElement.d.ts +1 -1
  41. package/dist/types/element/src/resizeElements.d.ts +1 -1
  42. package/dist/types/element/src/selection.d.ts +1 -6
  43. package/dist/types/element/src/store.d.ts +227 -0
  44. package/dist/types/element/src/textElement.d.ts +1 -1
  45. package/dist/types/element/src/transformHandles.d.ts +4 -4
  46. package/dist/types/element/src/typeChecks.d.ts +2 -1
  47. package/dist/types/element/src/types.d.ts +6 -1
  48. package/dist/types/element/src/zindex.d.ts +3 -3
  49. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +24 -42
  50. package/dist/types/excalidraw/actions/actionAlign.d.ts +8 -8
  51. package/dist/types/excalidraw/actions/actionBoundText.d.ts +16 -28
  52. package/dist/types/excalidraw/actions/actionCanvas.d.ts +194 -272
  53. package/dist/types/excalidraw/actions/actionClipboard.d.ts +50 -86
  54. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +8 -14
  55. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +22 -40
  56. package/dist/types/excalidraw/actions/actionDistribute.d.ts +4 -4
  57. package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +2 -2
  58. package/dist/types/excalidraw/actions/actionElementLink.d.ts +8 -14
  59. package/dist/types/excalidraw/actions/actionElementLock.d.ts +18 -30
  60. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +8 -14
  61. package/dist/types/excalidraw/actions/actionExport.d.ts +159 -213
  62. package/dist/types/excalidraw/actions/actionFinalize.d.ts +14 -26
  63. package/dist/types/excalidraw/actions/actionFlip.d.ts +4 -4
  64. package/dist/types/excalidraw/actions/actionFrame.d.ts +76 -100
  65. package/dist/types/excalidraw/actions/actionGroup.d.ts +22 -34
  66. package/dist/types/excalidraw/actions/actionHistory.d.ts +1 -2
  67. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +7 -13
  68. package/dist/types/excalidraw/actions/actionLink.d.ts +9 -15
  69. package/dist/types/excalidraw/actions/actionMenu.d.ts +26 -44
  70. package/dist/types/excalidraw/actions/actionNavigate.d.ts +16 -28
  71. package/dist/types/excalidraw/actions/actionProperties.d.ts +106 -196
  72. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +10 -16
  73. package/dist/types/excalidraw/actions/actionStyles.d.ts +12 -18
  74. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +10 -16
  75. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +10 -16
  76. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +10 -189
  77. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +10 -16
  78. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +10 -16
  79. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +10 -16
  80. package/dist/types/excalidraw/actions/actionZindex.d.ts +10 -10
  81. package/dist/types/excalidraw/actions/types.d.ts +1 -1
  82. package/dist/types/excalidraw/appState.d.ts +23 -23
  83. package/dist/types/excalidraw/components/App.d.ts +9 -9
  84. package/dist/types/excalidraw/components/ColorPicker/ColorInput.d.ts +2 -1
  85. package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +5 -1
  86. package/dist/types/excalidraw/components/ColorPicker/CustomColorList.d.ts +1 -1
  87. package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +2 -3
  88. package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +2 -3
  89. package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +2 -2
  90. package/dist/types/excalidraw/components/ColorPicker/TopPicks.d.ts +1 -1
  91. package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -1
  92. package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +1 -1
  93. package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +2 -28
  94. package/dist/types/excalidraw/components/ElementLinkDialog.d.ts +1 -1
  95. package/dist/types/excalidraw/components/Range.d.ts +3 -3
  96. package/dist/types/excalidraw/components/Stats/Angle.d.ts +1 -1
  97. package/dist/types/excalidraw/components/Stats/CanvasGrid.d.ts +1 -1
  98. package/dist/types/excalidraw/components/Stats/Collapsible.d.ts +2 -1
  99. package/dist/types/excalidraw/components/Stats/Dimension.d.ts +1 -1
  100. package/dist/types/excalidraw/components/Stats/DragInput.d.ts +1 -1
  101. package/dist/types/excalidraw/components/Stats/FontSize.d.ts +1 -1
  102. package/dist/types/excalidraw/components/Stats/MultiAngle.d.ts +1 -1
  103. package/dist/types/excalidraw/components/Stats/MultiDimension.d.ts +1 -1
  104. package/dist/types/excalidraw/components/Stats/MultiFontSize.d.ts +1 -1
  105. package/dist/types/excalidraw/components/Stats/MultiPosition.d.ts +1 -1
  106. package/dist/types/excalidraw/components/Stats/Position.d.ts +1 -1
  107. package/dist/types/excalidraw/components/Stats/utils.d.ts +2 -1
  108. package/dist/types/excalidraw/components/hyperlink/Hyperlink.d.ts +1 -1
  109. package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +1 -1
  110. package/dist/types/excalidraw/components/icons.d.ts +1 -0
  111. package/dist/types/excalidraw/components/shapes.d.ts +1 -1
  112. package/dist/types/excalidraw/data/blob.d.ts +1 -1
  113. package/dist/types/excalidraw/data/transform.d.ts +1 -1
  114. package/dist/types/excalidraw/fonts/Fonts.d.ts +1 -1
  115. package/dist/types/excalidraw/history.d.ts +14 -22
  116. package/dist/types/excalidraw/hooks/useEmitter.d.ts +1 -1
  117. package/dist/types/excalidraw/index.d.ts +9 -9
  118. package/dist/types/excalidraw/lasso/index.d.ts +1 -0
  119. package/dist/types/excalidraw/renderer/helpers.d.ts +6 -1
  120. package/dist/types/excalidraw/scene/Renderer.d.ts +1 -1
  121. package/dist/types/excalidraw/scene/index.d.ts +2 -2
  122. package/dist/types/excalidraw/snapping.d.ts +2 -2
  123. package/dist/types/excalidraw/types.d.ts +13 -6
  124. package/dist/types/excalidraw/visualdebug.d.ts +1 -1
  125. package/dist/types/math/src/curve.d.ts +2 -0
  126. package/dist/types/math/src/vector.d.ts +4 -0
  127. package/dist/types/utils/src/bbox.d.ts +1 -1
  128. package/dist/types/utils/src/index.d.ts +1 -1
  129. package/dist/types/utils/src/withinBounds.d.ts +1 -1
  130. package/history.ts +68 -94
  131. package/package.json +3 -3
  132. package/dist/dev/chunk-H3EW23X2.js.map +0 -7
  133. package/dist/dev/chunk-T3M44BFV.js.map +0 -7
  134. package/dist/prod/chunk-7M43VNIB.js +0 -33
  135. package/dist/prod/data/image-7YYIWLVQ.js +0 -1
  136. package/dist/types/excalidraw/store.d.ts +0 -129
  137. /package/dist/dev/{chunk-WMGEUIQQ.js.map → chunk-RQWTCZLD.js.map} +0 -0
  138. /package/dist/dev/data/{image-TTQKTTOH.js.map → image-CB4ZYE3A.js.map} +0 -0
  139. /package/dist/dev/locales/{en-I23TB6DJ.js.map → en-ZDTPSZNL.js.map} +0 -0
@@ -11,7 +11,7 @@ export declare const actionToggleElementLock: {
11
11
  perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: import("../types").AppClassProperties) => false | {
12
12
  elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
13
13
  appState: {
14
- selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
14
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
15
15
  contextMenu: {
16
16
  items: import("../components/ContextMenu").ContextMenuItems;
17
17
  top: number;
@@ -30,7 +30,7 @@ export declare const actionToggleElementLock: {
30
30
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
31
31
  isBindingEnabled: boolean;
32
32
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
33
- suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
33
+ suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
34
34
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
35
35
  frameRendering: {
36
36
  enabled: boolean;
@@ -41,7 +41,7 @@ export declare const actionToggleElementLock: {
41
41
  editingFrame: string | null;
42
42
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
43
43
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
44
- editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
44
+ editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
45
45
  activeTool: {
46
46
  lastActiveTool: import("../types").ActiveTool | null;
47
47
  locked: boolean;
@@ -162,7 +162,7 @@ export declare const actionToggleElementLock: {
162
162
  data: import("../charts").Spreadsheet;
163
163
  };
164
164
  pendingImageElementId: string | null;
165
- showHyperlinkPopup: false | "editor" | "info";
165
+ showHyperlinkPopup: false | "info" | "editor";
166
166
  snapLines: readonly import("../snapping").SnapLine[];
167
167
  originSnapOffset: {
168
168
  x: number;
@@ -173,22 +173,16 @@ export declare const actionToggleElementLock: {
173
173
  followedBy: Set<import("../types").SocketId>;
174
174
  isCropping: boolean;
175
175
  croppingElementId: string | null;
176
- searchMatches: readonly {
177
- id: string;
178
- focus: boolean;
179
- matchedLines: {
180
- offsetX: number;
181
- offsetY: number;
182
- width: number;
183
- height: number;
184
- }[];
185
- }[];
176
+ searchMatches: Readonly<{
177
+ focusedId: string | null;
178
+ matches: readonly import("../types").SearchMatch[];
179
+ }> | null;
186
180
  };
187
181
  captureUpdate: "IMMEDIATELY";
188
182
  };
189
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: import("../types").AppState, elements: readonly ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean;
183
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent, appState: import("../types").AppState, elements: readonly ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean;
190
184
  } & {
191
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: import("../types").AppState, elements: readonly ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
185
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent, appState: import("../types").AppState, elements: readonly ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
192
186
  };
193
187
  export declare const actionUnlockAllElements: {
194
188
  name: "unlockAllElements";
@@ -222,7 +216,7 @@ export declare const actionUnlockAllElements: {
222
216
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
223
217
  isBindingEnabled: boolean;
224
218
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
225
- suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
219
+ suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
226
220
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
227
221
  frameRendering: {
228
222
  enabled: boolean;
@@ -233,7 +227,7 @@ export declare const actionUnlockAllElements: {
233
227
  editingFrame: string | null;
234
228
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
235
229
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
236
- editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
230
+ editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
237
231
  activeTool: {
238
232
  lastActiveTool: import("../types").ActiveTool | null;
239
233
  locked: boolean;
@@ -351,8 +345,8 @@ export declare const actionUnlockAllElements: {
351
345
  data: import("../charts").Spreadsheet;
352
346
  };
353
347
  pendingImageElementId: string | null;
354
- showHyperlinkPopup: false | "editor" | "info";
355
- selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
348
+ showHyperlinkPopup: false | "info" | "editor";
349
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
356
350
  snapLines: readonly import("../snapping").SnapLine[];
357
351
  originSnapOffset: {
358
352
  x: number;
@@ -363,16 +357,10 @@ export declare const actionUnlockAllElements: {
363
357
  followedBy: Set<import("../types").SocketId>;
364
358
  isCropping: boolean;
365
359
  croppingElementId: string | null;
366
- searchMatches: readonly {
367
- id: string;
368
- focus: boolean;
369
- matchedLines: {
370
- offsetX: number;
371
- offsetY: number;
372
- width: number;
373
- height: number;
374
- }[];
375
- }[];
360
+ searchMatches: Readonly<{
361
+ focusedId: string | null;
362
+ matches: readonly import("../types").SearchMatch[];
363
+ }> | null;
376
364
  };
377
365
  captureUpdate: "IMMEDIATELY";
378
366
  };
@@ -32,7 +32,7 @@ export declare const actionSetEmbeddableAsActiveTool: {
32
32
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
33
33
  isBindingEnabled: boolean;
34
34
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
35
- suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
35
+ suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
36
36
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
37
37
  frameRendering: {
38
38
  enabled: boolean;
@@ -43,7 +43,7 @@ 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").LinearElementEditor | null;
46
+ editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
47
47
  penMode: boolean;
48
48
  penDetected: boolean;
49
49
  exportBackground: boolean;
@@ -159,8 +159,8 @@ export declare const actionSetEmbeddableAsActiveTool: {
159
159
  data: import("../charts").Spreadsheet;
160
160
  };
161
161
  pendingImageElementId: string | null;
162
- showHyperlinkPopup: false | "editor" | "info";
163
- selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
162
+ showHyperlinkPopup: false | "info" | "editor";
163
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
164
164
  snapLines: readonly import("../snapping").SnapLine[];
165
165
  originSnapOffset: {
166
166
  x: number;
@@ -171,16 +171,10 @@ export declare const actionSetEmbeddableAsActiveTool: {
171
171
  followedBy: Set<import("../types").SocketId>;
172
172
  isCropping: boolean;
173
173
  croppingElementId: string | null;
174
- searchMatches: readonly {
175
- id: string;
176
- focus: boolean;
177
- matchedLines: {
178
- offsetX: number;
179
- offsetY: number;
180
- width: number;
181
- height: number;
182
- }[];
183
- }[];
174
+ searchMatches: Readonly<{
175
+ focusedId: string | null;
176
+ matches: readonly import("../types").SearchMatch[];
177
+ }> | null;
184
178
  };
185
179
  captureUpdate: "EVENTUALLY";
186
180
  };