@excalidraw/math 0.18.0-4e471c107 → 0.18.0-51ad895

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 (115) hide show
  1. package/dist/dev/index.js +58 -61
  2. package/dist/dev/index.js.map +3 -3
  3. package/dist/prod/index.js +1 -1
  4. package/dist/types/common/src/constants.d.ts +21 -15
  5. package/dist/types/common/src/editorInterface.d.ts +34 -0
  6. package/dist/types/common/src/index.d.ts +2 -0
  7. package/dist/types/common/src/utils.d.ts +9 -3
  8. package/dist/types/common/src/visualdebug.d.ts +41 -0
  9. package/dist/types/element/src/Scene.d.ts +6 -2
  10. package/dist/types/element/src/align.d.ts +2 -1
  11. package/dist/types/element/src/binding.d.ts +55 -43
  12. package/dist/types/element/src/bounds.d.ts +1 -1
  13. package/dist/types/element/src/collision.d.ts +6 -2
  14. package/dist/types/element/src/delta.d.ts +16 -4
  15. package/dist/types/element/src/distribute.d.ts +2 -1
  16. package/dist/types/element/src/groups.d.ts +1 -0
  17. package/dist/types/element/src/index.d.ts +1 -3
  18. package/dist/types/element/src/linearElementEditor.d.ts +17 -19
  19. package/dist/types/element/src/positionElementsOnGrid.d.ts +2 -0
  20. package/dist/types/element/src/renderElement.d.ts +5 -2
  21. package/dist/types/element/src/resizeTest.d.ts +5 -4
  22. package/dist/types/element/src/store.d.ts +6 -1
  23. package/dist/types/element/src/textElement.d.ts +1 -1
  24. package/dist/types/element/src/transformHandles.d.ts +5 -4
  25. package/dist/types/element/src/typeChecks.d.ts +2 -3
  26. package/dist/types/element/src/types.d.ts +7 -11
  27. package/dist/types/element/src/utils.d.ts +2 -1
  28. package/dist/types/element/src/zindex.d.ts +7 -1
  29. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +34 -16
  30. package/dist/types/excalidraw/actions/actionAlign.d.ts +6 -6
  31. package/dist/types/excalidraw/actions/actionBoundText.d.ts +25 -13
  32. package/dist/types/excalidraw/actions/actionCanvas.d.ts +153 -275
  33. package/dist/types/excalidraw/actions/actionClipboard.d.ts +45 -777
  34. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +12 -6
  35. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +45 -29
  36. package/dist/types/excalidraw/actions/actionDistribute.d.ts +2 -2
  37. package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +2 -2
  38. package/dist/types/excalidraw/actions/actionElementLink.d.ts +11 -7
  39. package/dist/types/excalidraw/actions/actionElementLock.d.ts +23 -11
  40. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +12 -6
  41. package/dist/types/excalidraw/actions/actionExport.d.ts +68 -952
  42. package/dist/types/excalidraw/actions/actionFinalize.d.ts +10 -394
  43. package/dist/types/excalidraw/actions/actionFlip.d.ts +2 -2
  44. package/dist/types/excalidraw/actions/actionFrame.d.ts +50 -28
  45. package/dist/types/excalidraw/actions/actionGroup.d.ts +24 -12
  46. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +47 -14
  47. package/dist/types/excalidraw/actions/actionLink.d.ts +9 -3
  48. package/dist/types/excalidraw/actions/actionMenu.d.ts +10 -374
  49. package/dist/types/excalidraw/actions/actionNavigate.d.ts +21 -361
  50. package/dist/types/excalidraw/actions/actionProperties.d.ts +87 -2418
  51. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +12 -6
  52. package/dist/types/excalidraw/actions/actionStyles.d.ts +13 -7
  53. package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +1 -1
  54. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +11 -5
  55. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +11 -5
  56. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +10 -6
  57. package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +1 -1
  58. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +11 -5
  59. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +11 -5
  60. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +12 -6
  61. package/dist/types/excalidraw/actions/actionZindex.d.ts +2 -2
  62. package/dist/types/excalidraw/actions/index.d.ts +2 -2
  63. package/dist/types/excalidraw/actions/manager.d.ts +1 -1
  64. package/dist/types/excalidraw/actions/register.d.ts +1 -1
  65. package/dist/types/excalidraw/actions/types.d.ts +4 -4
  66. package/dist/types/excalidraw/appState.d.ts +9 -4
  67. package/dist/types/excalidraw/clipboard.d.ts +64 -1
  68. package/dist/types/excalidraw/components/Actions.d.ts +20 -7
  69. package/dist/types/excalidraw/components/App.d.ts +35 -25
  70. package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +2 -0
  71. package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +2 -1
  72. package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +2 -1
  73. package/dist/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +1 -0
  74. package/dist/types/excalidraw/components/CommandPalette/types.d.ts +1 -2
  75. package/dist/types/excalidraw/components/Ellipsify.d.ts +4 -0
  76. package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +1 -1
  77. package/dist/types/excalidraw/components/FilledButton.d.ts +1 -1
  78. package/dist/types/excalidraw/components/FontPicker/FontPicker.d.ts +2 -1
  79. package/dist/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +3 -1
  80. package/dist/types/excalidraw/components/HintViewer.d.ts +4 -3
  81. package/dist/types/excalidraw/components/InlineIcon.d.ts +3 -1
  82. package/dist/types/excalidraw/components/LayerUI.d.ts +2 -1
  83. package/dist/types/excalidraw/components/LibraryMenuSection.d.ts +1 -1
  84. package/dist/types/excalidraw/components/MobileMenu.d.ts +3 -5
  85. package/dist/types/excalidraw/components/MobileToolBar.d.ts +11 -0
  86. package/dist/types/excalidraw/components/Popover.d.ts +2 -1
  87. package/dist/types/excalidraw/components/PropertiesPopover.d.ts +1 -0
  88. package/dist/types/excalidraw/components/Stats/utils.d.ts +1 -1
  89. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +1 -2
  90. package/dist/types/excalidraw/components/TextField.d.ts +1 -0
  91. package/dist/types/excalidraw/components/ToolPopover.d.ts +25 -0
  92. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +6 -3
  93. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +4 -2
  94. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +2 -1
  95. package/dist/types/excalidraw/components/icons.d.ts +10 -0
  96. package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +13 -1
  97. package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +0 -3
  98. package/dist/types/excalidraw/components/shapes.d.ts +129 -1
  99. package/dist/types/excalidraw/data/blob.d.ts +3 -7
  100. package/dist/types/excalidraw/data/reconcile.d.ts +1 -0
  101. package/dist/types/excalidraw/data/restore.d.ts +7 -2
  102. package/dist/types/excalidraw/data/types.d.ts +4 -1
  103. package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
  104. package/dist/types/excalidraw/hooks/useOutsideClick.d.ts +3 -1
  105. package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +14 -0
  106. package/dist/types/excalidraw/index.d.ts +4 -4
  107. package/dist/types/excalidraw/renderer/animation.d.ts +12 -0
  108. package/dist/types/excalidraw/renderer/helpers.d.ts +2 -6
  109. package/dist/types/excalidraw/renderer/interactiveScene.d.ts +5 -13
  110. package/dist/types/excalidraw/renderer/staticScene.d.ts +4 -1
  111. package/dist/types/excalidraw/scene/types.d.ts +15 -3
  112. package/dist/types/excalidraw/shortcut.d.ts +1 -0
  113. package/dist/types/excalidraw/types.d.ts +37 -24
  114. package/dist/types/math/src/segment.d.ts +1 -0
  115. package/package.json +2 -2
@@ -9,7 +9,7 @@ export declare const actionUnbindText: {
9
9
  category: "element";
10
10
  };
11
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) => {
12
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
13
13
  elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
14
14
  appState: Readonly<AppState>;
15
15
  captureUpdate: "IMMEDIATELY";
@@ -24,7 +24,7 @@ export declare const actionBindText: {
24
24
  category: "element";
25
25
  };
26
26
  predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
27
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
27
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
28
28
  elements: ExcalidrawElement[];
29
29
  appState: {
30
30
  selectedElementIds: {
@@ -48,7 +48,7 @@ export declare const actionBindText: {
48
48
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
49
49
  isBindingEnabled: boolean;
50
50
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
51
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
51
+ suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
52
52
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
53
53
  frameRendering: {
54
54
  enabled: boolean;
@@ -59,12 +59,15 @@ export declare const actionBindText: {
59
59
  editingFrame: string | null;
60
60
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
61
61
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
62
- editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
63
62
  activeTool: {
64
63
  lastActiveTool: import("../types").ActiveTool | null;
65
64
  locked: boolean;
66
65
  fromSelection: boolean;
67
66
  } & import("../types").ActiveTool;
67
+ preferredSelectionTool: {
68
+ type: "selection" | "lasso";
69
+ initialized: boolean;
70
+ };
68
71
  penMode: boolean;
69
72
  penDetected: boolean;
70
73
  exportBackground: boolean;
@@ -97,8 +100,8 @@ export declare const actionBindText: {
97
100
  zoom: Readonly<{
98
101
  value: import("../types").NormalizedZoomValue;
99
102
  }>;
100
- openMenu: "canvas" | "shape" | null;
101
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
103
+ openMenu: "canvas" | null;
104
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
102
105
  openSidebar: {
103
106
  name: string;
104
107
  tab?: string | undefined;
@@ -110,6 +113,8 @@ export declare const actionBindText: {
110
113
  tab: "mermaid" | "text-to-diagram";
111
114
  } | {
112
115
  name: "commandPalette";
116
+ } | {
117
+ name: "settings";
113
118
  } | {
114
119
  name: "elementLinkSelector";
115
120
  sourceElementId: string;
@@ -176,7 +181,7 @@ export declare const actionBindText: {
176
181
  shown: true;
177
182
  data: import("../charts").Spreadsheet;
178
183
  };
179
- showHyperlinkPopup: false | "editor" | "info";
184
+ showHyperlinkPopup: false | "info" | "editor";
180
185
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
181
186
  snapLines: readonly import("../snapping").SnapLine[];
182
187
  originSnapOffset: {
@@ -196,6 +201,7 @@ export declare const actionBindText: {
196
201
  lockedMultiSelections: {
197
202
  [groupId: string]: true;
198
203
  };
204
+ bindMode: import("@excalidraw/element/types").BindMode;
199
205
  };
200
206
  captureUpdate: "IMMEDIATELY";
201
207
  };
@@ -209,7 +215,7 @@ export declare const actionWrapTextInContainer: {
209
215
  category: "element";
210
216
  };
211
217
  predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
212
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
218
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
213
219
  elements: readonly ExcalidrawElement[];
214
220
  appState: {
215
221
  selectedElementIds: Mutable<Readonly<{
@@ -233,7 +239,7 @@ export declare const actionWrapTextInContainer: {
233
239
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
234
240
  isBindingEnabled: boolean;
235
241
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
236
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
242
+ suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
237
243
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
238
244
  frameRendering: {
239
245
  enabled: boolean;
@@ -244,12 +250,15 @@ export declare const actionWrapTextInContainer: {
244
250
  editingFrame: string | null;
245
251
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
246
252
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
247
- editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
248
253
  activeTool: {
249
254
  lastActiveTool: import("../types").ActiveTool | null;
250
255
  locked: boolean;
251
256
  fromSelection: boolean;
252
257
  } & import("../types").ActiveTool;
258
+ preferredSelectionTool: {
259
+ type: "selection" | "lasso";
260
+ initialized: boolean;
261
+ };
253
262
  penMode: boolean;
254
263
  penDetected: boolean;
255
264
  exportBackground: boolean;
@@ -282,8 +291,8 @@ export declare const actionWrapTextInContainer: {
282
291
  zoom: Readonly<{
283
292
  value: import("../types").NormalizedZoomValue;
284
293
  }>;
285
- openMenu: "canvas" | "shape" | null;
286
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
294
+ openMenu: "canvas" | null;
295
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
287
296
  openSidebar: {
288
297
  name: string;
289
298
  tab?: string | undefined;
@@ -295,6 +304,8 @@ export declare const actionWrapTextInContainer: {
295
304
  tab: "mermaid" | "text-to-diagram";
296
305
  } | {
297
306
  name: "commandPalette";
307
+ } | {
308
+ name: "settings";
298
309
  } | {
299
310
  name: "elementLinkSelector";
300
311
  sourceElementId: string;
@@ -361,7 +372,7 @@ export declare const actionWrapTextInContainer: {
361
372
  shown: true;
362
373
  data: import("../charts").Spreadsheet;
363
374
  };
364
- showHyperlinkPopup: false | "editor" | "info";
375
+ showHyperlinkPopup: false | "info" | "editor";
365
376
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
366
377
  snapLines: readonly import("../snapping").SnapLine[];
367
378
  originSnapOffset: {
@@ -381,6 +392,7 @@ export declare const actionWrapTextInContainer: {
381
392
  lockedMultiSelections: {
382
393
  [groupId: string]: true;
383
394
  };
395
+ bindMode: import("@excalidraw/element/types").BindMode;
384
396
  };
385
397
  captureUpdate: "IMMEDIATELY";
386
398
  };