@zsviczian/excalidraw 0.18.0-13 → 0.18.0-15

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 (116) hide show
  1. package/dist/excalidraw.development.js +153 -153
  2. package/dist/excalidraw.production.min.js +1 -1
  3. package/dist/styles.development.css +38 -2
  4. package/dist/styles.production.css +2 -2
  5. package/package.json +1 -1
  6. package/types/common/src/constants.d.ts +1 -0
  7. package/types/{excalidraw → common/src}/emitter.d.ts +1 -1
  8. package/types/common/src/font-metadata.d.ts +4 -2
  9. package/types/common/src/index.d.ts +1 -0
  10. package/types/common/src/utility-types.d.ts +5 -0
  11. package/types/common/src/utils.d.ts +16 -4
  12. package/types/element/src/Scene.d.ts +4 -4
  13. package/types/element/src/ShapeCache.d.ts +1 -1
  14. package/types/element/src/align.d.ts +1 -1
  15. package/types/element/src/binding.d.ts +1 -1
  16. package/types/element/src/bounds.d.ts +1 -1
  17. package/types/{excalidraw/change.d.ts → element/src/delta.d.ts} +40 -35
  18. package/types/element/src/dragElements.d.ts +1 -1
  19. package/types/element/src/flowchart.d.ts +1 -1
  20. package/types/element/src/frame.d.ts +3 -2
  21. package/types/element/src/index.d.ts +45 -2
  22. package/types/element/src/linearElementEditor.d.ts +4 -8
  23. package/types/element/src/newElement.d.ts +1 -1
  24. package/types/element/src/resizeElements.d.ts +1 -1
  25. package/types/element/src/selection.d.ts +1 -6
  26. package/types/element/src/store.d.ts +227 -0
  27. package/types/element/src/textElement.d.ts +1 -1
  28. package/types/element/src/transformHandles.d.ts +4 -4
  29. package/types/element/src/typeChecks.d.ts +2 -1
  30. package/types/element/src/types.d.ts +6 -1
  31. package/types/element/src/zindex.d.ts +3 -3
  32. package/types/excalidraw/actions/actionAddToLibrary.d.ts +24 -42
  33. package/types/excalidraw/actions/actionAlign.d.ts +8 -8
  34. package/types/excalidraw/actions/actionBoundText.d.ts +16 -28
  35. package/types/excalidraw/actions/actionCanvas.d.ts +238 -328
  36. package/types/excalidraw/actions/actionClipboard.d.ts +50 -86
  37. package/types/excalidraw/actions/actionCropEditor.d.ts +8 -14
  38. package/types/excalidraw/actions/actionDeleteSelected.d.ts +22 -40
  39. package/types/excalidraw/actions/actionDistribute.d.ts +4 -4
  40. package/types/excalidraw/actions/actionDuplicateSelection.d.ts +2 -2
  41. package/types/excalidraw/actions/actionElementLink.d.ts +8 -14
  42. package/types/excalidraw/actions/actionElementLock.d.ts +18 -30
  43. package/types/excalidraw/actions/actionEmbeddable.d.ts +8 -14
  44. package/types/excalidraw/actions/actionExport.d.ts +173 -227
  45. package/types/excalidraw/actions/actionFinalize.d.ts +14 -26
  46. package/types/excalidraw/actions/actionFlip.d.ts +4 -4
  47. package/types/excalidraw/actions/actionFrame.d.ts +81 -105
  48. package/types/excalidraw/actions/actionGroup.d.ts +22 -34
  49. package/types/excalidraw/actions/actionHistory.d.ts +1 -2
  50. package/types/excalidraw/actions/actionLinearEditor.d.ts +7 -13
  51. package/types/excalidraw/actions/actionLink.d.ts +9 -15
  52. package/types/excalidraw/actions/actionMenu.d.ts +26 -44
  53. package/types/excalidraw/actions/actionNavigate.d.ts +16 -28
  54. package/types/excalidraw/actions/actionProperties.d.ts +106 -196
  55. package/types/excalidraw/actions/actionSelectAll.d.ts +10 -16
  56. package/types/excalidraw/actions/actionStyles.d.ts +12 -18
  57. package/types/excalidraw/actions/actionToggleGridMode.d.ts +10 -16
  58. package/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +10 -16
  59. package/types/excalidraw/actions/actionToggleSearchMenu.d.ts +10 -225
  60. package/types/excalidraw/actions/actionToggleStats.d.ts +10 -16
  61. package/types/excalidraw/actions/actionToggleViewMode.d.ts +10 -16
  62. package/types/excalidraw/actions/actionToggleZenMode.d.ts +10 -16
  63. package/types/excalidraw/actions/actionZindex.d.ts +10 -10
  64. package/types/excalidraw/actions/types.d.ts +1 -1
  65. package/types/excalidraw/appState.d.ts +23 -23
  66. package/types/excalidraw/clipboard.d.ts +4 -4
  67. package/types/excalidraw/components/App.d.ts +8 -8
  68. package/types/excalidraw/components/ColorPicker/ColorInput.d.ts +2 -1
  69. package/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +5 -1
  70. package/types/excalidraw/components/ColorPicker/CustomColorList.d.ts +1 -1
  71. package/types/excalidraw/components/ColorPicker/Picker.d.ts +2 -3
  72. package/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +2 -3
  73. package/types/excalidraw/components/ColorPicker/ShadeList.d.ts +2 -2
  74. package/types/excalidraw/components/ColorPicker/TopPicks.d.ts +1 -1
  75. package/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -1
  76. package/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +1 -1
  77. package/types/excalidraw/components/ConvertElementTypePopup.d.ts +2 -28
  78. package/types/excalidraw/components/ElementLinkDialog.d.ts +1 -1
  79. package/types/excalidraw/components/Range.d.ts +3 -3
  80. package/types/excalidraw/components/Stats/Angle.d.ts +1 -1
  81. package/types/excalidraw/components/Stats/CanvasGrid.d.ts +1 -1
  82. package/types/excalidraw/components/Stats/CanvasGridSize.d.ts +1 -1
  83. package/types/excalidraw/components/Stats/Collapsible.d.ts +2 -1
  84. package/types/excalidraw/components/Stats/Dimension.d.ts +1 -1
  85. package/types/excalidraw/components/Stats/DragInput.d.ts +1 -1
  86. package/types/excalidraw/components/Stats/FontSize.d.ts +1 -1
  87. package/types/excalidraw/components/Stats/MultiAngle.d.ts +1 -1
  88. package/types/excalidraw/components/Stats/MultiDimension.d.ts +1 -1
  89. package/types/excalidraw/components/Stats/MultiFontSize.d.ts +1 -1
  90. package/types/excalidraw/components/Stats/MultiPosition.d.ts +1 -1
  91. package/types/excalidraw/components/Stats/Position.d.ts +1 -1
  92. package/types/excalidraw/components/Stats/utils.d.ts +1 -1
  93. package/types/excalidraw/components/dropdownMenu/common.d.ts +1 -1
  94. package/types/excalidraw/components/hyperlink/Hyperlink.d.ts +1 -1
  95. package/types/excalidraw/components/hyperlink/helpers.d.ts +1 -1
  96. package/types/excalidraw/components/icons.d.ts +1 -0
  97. package/types/excalidraw/components/shapes.d.ts +1 -1
  98. package/types/excalidraw/data/blob.d.ts +1 -1
  99. package/types/excalidraw/data/library.d.ts +1 -1
  100. package/types/excalidraw/data/transform.d.ts +1 -1
  101. package/types/excalidraw/fonts/Fonts.d.ts +1 -1
  102. package/types/excalidraw/history.d.ts +14 -22
  103. package/types/excalidraw/hooks/useEmitter.d.ts +1 -1
  104. package/types/excalidraw/index.d.ts +9 -9
  105. package/types/excalidraw/renderer/helpers.d.ts +6 -1
  106. package/types/excalidraw/scene/Renderer.d.ts +1 -1
  107. package/types/excalidraw/scene/index.d.ts +2 -2
  108. package/types/excalidraw/snapping.d.ts +2 -2
  109. package/types/excalidraw/types.d.ts +13 -6
  110. package/types/excalidraw/visualdebug.d.ts +1 -1
  111. package/types/math/src/curve.d.ts +2 -0
  112. package/types/math/src/vector.d.ts +4 -0
  113. package/types/utils/src/bbox.d.ts +1 -1
  114. package/types/utils/src/index.d.ts +1 -1
  115. package/types/utils/src/withinBounds.d.ts +1 -1
  116. package/types/excalidraw/store.d.ts +0 -129
@@ -10,7 +10,7 @@ export declare const actionToggleElementLock: {
10
10
  perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: import("../types").AppClassProperties) => false | {
11
11
  elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
12
12
  appState: {
13
- selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
13
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
14
14
  contextMenu: {
15
15
  items: import("../components/ContextMenu").ContextMenuItems;
16
16
  top: number;
@@ -29,7 +29,7 @@ export declare const actionToggleElementLock: {
29
29
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
30
30
  isBindingEnabled: boolean;
31
31
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
32
- suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
32
+ suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
33
33
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
34
34
  frameRendering: {
35
35
  enabled: boolean;
@@ -40,7 +40,7 @@ export declare const actionToggleElementLock: {
40
40
  editingFrame: string | null;
41
41
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
42
42
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
43
- editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
43
+ editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
44
44
  activeTool: {
45
45
  lastActiveTool: import("../types").ActiveTool | null;
46
46
  locked: boolean;
@@ -161,7 +161,7 @@ export declare const actionToggleElementLock: {
161
161
  data: import("../charts").Spreadsheet;
162
162
  };
163
163
  pendingImageElementId: string | null;
164
- showHyperlinkPopup: false | "editor" | "info";
164
+ showHyperlinkPopup: false | "info" | "editor";
165
165
  linkOpacity: number;
166
166
  trayModeEnabled: boolean;
167
167
  colorPalette?: {
@@ -208,22 +208,16 @@ export declare const actionToggleElementLock: {
208
208
  followedBy: Set<import("../types").SocketId>;
209
209
  isCropping: boolean;
210
210
  croppingElementId: string | null;
211
- searchMatches: readonly {
212
- id: string;
213
- focus: boolean;
214
- matchedLines: {
215
- offsetX: number;
216
- offsetY: number;
217
- width: number;
218
- height: number;
219
- }[];
220
- }[];
211
+ searchMatches: Readonly<{
212
+ focusedId: string | null;
213
+ matches: readonly import("../types").SearchMatch[];
214
+ }> | null;
221
215
  };
222
216
  captureUpdate: "IMMEDIATELY";
223
217
  };
224
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: import("../types").AppState, elements: readonly ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean;
218
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent, appState: import("../types").AppState, elements: readonly ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean;
225
219
  } & {
226
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: import("../types").AppState, elements: readonly ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
220
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent, appState: import("../types").AppState, elements: readonly ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
227
221
  };
228
222
  export declare const actionUnlockAllElements: {
229
223
  name: "unlockAllElements";
@@ -257,7 +251,7 @@ export declare const actionUnlockAllElements: {
257
251
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
258
252
  isBindingEnabled: boolean;
259
253
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
260
- suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
254
+ suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
261
255
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
262
256
  frameRendering: {
263
257
  enabled: boolean;
@@ -268,7 +262,7 @@ export declare const actionUnlockAllElements: {
268
262
  editingFrame: string | null;
269
263
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
270
264
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
271
- editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
265
+ editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
272
266
  activeTool: {
273
267
  lastActiveTool: import("../types").ActiveTool | null;
274
268
  locked: boolean;
@@ -386,7 +380,7 @@ export declare const actionUnlockAllElements: {
386
380
  data: import("../charts").Spreadsheet;
387
381
  };
388
382
  pendingImageElementId: string | null;
389
- showHyperlinkPopup: false | "editor" | "info";
383
+ showHyperlinkPopup: false | "info" | "editor";
390
384
  linkOpacity: number;
391
385
  trayModeEnabled: boolean;
392
386
  colorPalette?: {
@@ -423,7 +417,7 @@ export declare const actionUnlockAllElements: {
423
417
  nameColor: string;
424
418
  };
425
419
  invertBindingBehaviour: boolean;
426
- selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
420
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
427
421
  snapLines: readonly import("../snapping").SnapLine[];
428
422
  originSnapOffset: {
429
423
  x: number;
@@ -434,16 +428,10 @@ export declare const actionUnlockAllElements: {
434
428
  followedBy: Set<import("../types").SocketId>;
435
429
  isCropping: boolean;
436
430
  croppingElementId: string | null;
437
- searchMatches: readonly {
438
- id: string;
439
- focus: boolean;
440
- matchedLines: {
441
- offsetX: number;
442
- offsetY: number;
443
- width: number;
444
- height: number;
445
- }[];
446
- }[];
431
+ searchMatches: Readonly<{
432
+ focusedId: string | null;
433
+ matches: readonly import("../types").SearchMatch[];
434
+ }> | null;
447
435
  };
448
436
  captureUpdate: "IMMEDIATELY";
449
437
  };
@@ -31,7 +31,7 @@ export declare const actionSetEmbeddableAsActiveTool: {
31
31
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
32
32
  isBindingEnabled: boolean;
33
33
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
34
- suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
34
+ suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
35
35
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
36
36
  frameRendering: {
37
37
  enabled: boolean;
@@ -42,7 +42,7 @@ export declare const actionSetEmbeddableAsActiveTool: {
42
42
  editingFrame: string | null;
43
43
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
44
44
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
45
- editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
45
+ editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
46
46
  penMode: boolean;
47
47
  penDetected: boolean;
48
48
  exportBackground: boolean;
@@ -158,7 +158,7 @@ export declare const actionSetEmbeddableAsActiveTool: {
158
158
  data: import("../charts").Spreadsheet;
159
159
  };
160
160
  pendingImageElementId: string | null;
161
- showHyperlinkPopup: false | "editor" | "info";
161
+ showHyperlinkPopup: false | "info" | "editor";
162
162
  linkOpacity: number;
163
163
  trayModeEnabled: boolean;
164
164
  colorPalette?: {
@@ -195,7 +195,7 @@ export declare const actionSetEmbeddableAsActiveTool: {
195
195
  nameColor: string;
196
196
  };
197
197
  invertBindingBehaviour: boolean;
198
- selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
198
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
199
199
  snapLines: readonly import("../snapping").SnapLine[];
200
200
  originSnapOffset: {
201
201
  x: number;
@@ -206,16 +206,10 @@ export declare const actionSetEmbeddableAsActiveTool: {
206
206
  followedBy: Set<import("../types").SocketId>;
207
207
  isCropping: boolean;
208
208
  croppingElementId: string | null;
209
- searchMatches: readonly {
210
- id: string;
211
- focus: boolean;
212
- matchedLines: {
213
- offsetX: number;
214
- offsetY: number;
215
- width: number;
216
- height: number;
217
- }[];
218
- }[];
209
+ searchMatches: Readonly<{
210
+ focusedId: string | null;
211
+ matches: readonly import("../types").SearchMatch[];
212
+ }> | null;
219
213
  };
220
214
  captureUpdate: "EVENTUALLY";
221
215
  };