@excalidraw/math 0.18.0-1118751 → 0.18.0-1440f2d

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 (127) hide show
  1. package/dist/types/common/src/constants.d.ts +4 -0
  2. package/dist/types/common/src/utils.d.ts +12 -1
  3. package/dist/types/element/src/align.d.ts +4 -1
  4. package/dist/types/element/src/binding.d.ts +70 -0
  5. package/dist/types/element/src/bounds.d.ts +10 -2
  6. package/dist/types/element/src/collision.d.ts +13 -0
  7. package/dist/types/element/src/cropElement.d.ts +36 -4
  8. package/dist/types/element/src/delta.d.ts +7 -1
  9. package/dist/types/element/src/distribute.d.ts +4 -1
  10. package/dist/types/element/src/dragElements.d.ts +8 -3
  11. package/dist/types/element/src/elbowArrow.d.ts +5 -0
  12. package/dist/types/element/src/embeddable.d.ts +2 -1
  13. package/dist/types/element/src/flowchart.d.ts +1 -7
  14. package/dist/types/element/src/frame.d.ts +19 -1
  15. package/dist/types/element/src/groups.d.ts +1 -6
  16. package/dist/types/element/src/image.d.ts +5 -2
  17. package/dist/types/element/src/index.d.ts +2 -0
  18. package/dist/types/element/src/linearElementEditor.d.ts +4 -1
  19. package/dist/types/element/src/listMarker.d.ts +39 -0
  20. package/dist/types/element/src/newElement.d.ts +17 -1
  21. package/dist/types/element/src/renderElement.d.ts +10 -0
  22. package/dist/types/element/src/renderEnvironment.d.ts +66 -0
  23. package/dist/types/element/src/resizeElements.d.ts +15 -5
  24. package/dist/types/element/src/selection.d.ts +1 -7
  25. package/dist/types/element/src/shape.d.ts +2 -0
  26. package/dist/types/element/src/stickyNote.d.ts +8 -0
  27. package/dist/types/element/src/textElement.d.ts +10 -2
  28. package/dist/types/element/src/textMeasurements.d.ts +15 -11
  29. package/dist/types/element/src/textWrapping.d.ts +3 -2
  30. package/dist/types/element/src/transform.d.ts +5 -1
  31. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +30 -3
  32. package/dist/types/excalidraw/actions/actionBoundText.d.ts +56 -214
  33. package/dist/types/excalidraw/actions/actionCanvas.d.ts +76 -16
  34. package/dist/types/excalidraw/actions/actionClipboard.d.ts +20 -2
  35. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +10 -1
  36. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +4 -564
  37. package/dist/types/excalidraw/actions/actionDeselect.d.ts +14 -2
  38. package/dist/types/excalidraw/actions/actionElementLink.d.ts +10 -1
  39. package/dist/types/excalidraw/actions/actionElementLock.d.ts +20 -2
  40. package/dist/types/excalidraw/actions/actionExport.d.ts +27 -9
  41. package/dist/types/excalidraw/actions/actionFrame.d.ts +71 -528
  42. package/dist/types/excalidraw/actions/actionGroup.d.ts +22 -4
  43. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +10 -1
  44. package/dist/types/excalidraw/actions/actionLink.d.ts +10 -1
  45. package/dist/types/excalidraw/actions/actionMenu.d.ts +10 -1
  46. package/dist/types/excalidraw/actions/actionProperties.d.ts +20 -2
  47. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +11 -2
  48. package/dist/types/excalidraw/actions/actionStyles.d.ts +10 -1
  49. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +10 -1
  50. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +10 -1
  51. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +10 -1
  52. package/dist/types/excalidraw/actions/actionToggleMinimap.d.ts +201 -0
  53. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +10 -1
  54. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +10 -1
  55. package/dist/types/excalidraw/actions/actionToggleShowHints.d.ts +198 -0
  56. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +10 -1
  57. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +10 -1
  58. package/dist/types/excalidraw/actions/actionToggleWrap.d.ts +12 -0
  59. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +10 -1
  60. package/dist/types/excalidraw/actions/index.d.ts +3 -0
  61. package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
  62. package/dist/types/excalidraw/actions/types.d.ts +1 -1
  63. package/dist/types/excalidraw/appState.d.ts +9 -7
  64. package/dist/types/excalidraw/charts/charts.bar.d.ts +2 -1
  65. package/dist/types/excalidraw/charts/charts.helpers.d.ts +6 -5
  66. package/dist/types/excalidraw/charts/charts.line.d.ts +2 -1
  67. package/dist/types/excalidraw/charts/charts.radar.d.ts +2 -1
  68. package/dist/types/excalidraw/charts/index.d.ts +2 -1
  69. package/dist/types/excalidraw/components/Actions.d.ts +9 -2
  70. package/dist/types/excalidraw/components/App.arrowText.d.ts +5 -39
  71. package/dist/types/excalidraw/components/App.clipboard.d.ts +31 -0
  72. package/dist/types/excalidraw/components/App.d.ts +79 -264
  73. package/dist/types/excalidraw/components/App.duplicate.d.ts +52 -2
  74. package/dist/types/excalidraw/components/App.host.d.ts +102 -0
  75. package/dist/types/excalidraw/components/App.modifiers.d.ts +38 -0
  76. package/dist/types/excalidraw/components/App.pan.d.ts +8 -0
  77. package/dist/types/excalidraw/components/App.selection.d.ts +265 -0
  78. package/dist/types/excalidraw/components/App.selectionTool.d.ts +93 -0
  79. package/dist/types/excalidraw/components/App.text.d.ts +146 -0
  80. package/dist/types/excalidraw/components/App.textTool.d.ts +140 -0
  81. package/dist/types/excalidraw/components/App.viewport.d.ts +64 -4
  82. package/dist/types/excalidraw/components/App.wheel.d.ts +6 -2
  83. package/dist/types/excalidraw/components/App.wrap.d.ts +31 -0
  84. package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +2 -1
  85. package/dist/types/excalidraw/components/FileDropOverlay.d.ts +2 -0
  86. package/dist/types/excalidraw/components/LibraryMenuSection.d.ts +6 -2
  87. package/dist/types/excalidraw/components/LibraryUnit.d.ts +7 -2
  88. package/dist/types/excalidraw/components/Minimap/Minimap.d.ts +15 -0
  89. package/dist/types/excalidraw/components/Minimap/MinimapAnnouncementDot.d.ts +10 -0
  90. package/dist/types/excalidraw/components/Minimap/minimap-controller.chunk.d.ts +90 -0
  91. package/dist/types/excalidraw/components/Minimap/minimap-shared.chunk.d.ts +122 -0
  92. package/dist/types/excalidraw/components/Minimap/minimap-worker.chunk.d.ts +12 -0
  93. package/dist/types/excalidraw/components/Stats/utils.d.ts +4 -2
  94. package/dist/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +2 -1
  95. package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +5 -2
  96. package/dist/types/excalidraw/components/TTDDialog/TTDPreviewPanel.d.ts +5 -2
  97. package/dist/types/excalidraw/components/TTDDialog/TextToDiagram.d.ts +2 -1
  98. package/dist/types/excalidraw/components/TTDDialog/common.d.ts +4 -1
  99. package/dist/types/excalidraw/components/TTDDialog/hooks/useTextGeneration.d.ts +3 -2
  100. package/dist/types/excalidraw/components/TTDDialog/types.d.ts +14 -1
  101. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidError.d.ts +16 -0
  102. package/dist/types/excalidraw/components/Tooltip.d.ts +26 -2
  103. package/dist/types/excalidraw/components/TopPicksDnD/topPicksDnD.d.ts +1 -1
  104. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +0 -1
  105. package/dist/types/excalidraw/components/footer/Footer.d.ts +3 -1
  106. package/dist/types/excalidraw/components/hyperlink/Hyperlink.d.ts +3 -2
  107. package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +13 -2
  108. package/dist/types/excalidraw/components/icons.d.ts +1 -0
  109. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +2 -0
  110. package/dist/types/excalidraw/data/blob.d.ts +34 -16
  111. package/dist/types/excalidraw/data/index.d.ts +3 -3
  112. package/dist/types/excalidraw/data/json.d.ts +17 -8
  113. package/dist/types/excalidraw/fonts/Fonts.d.ts +9 -6
  114. package/dist/types/excalidraw/history.d.ts +10 -4
  115. package/dist/types/excalidraw/mermaid.d.ts +7 -0
  116. package/dist/types/excalidraw/reactUtils.d.ts +1 -1
  117. package/dist/types/excalidraw/renderer/animation.d.ts +11 -4
  118. package/dist/types/excalidraw/renderer/staticScene.d.ts +11 -6
  119. package/dist/types/excalidraw/scene/Renderer.d.ts +1 -1
  120. package/dist/types/excalidraw/scene/export.d.ts +343 -20
  121. package/dist/types/excalidraw/scene/types.d.ts +23 -1
  122. package/dist/types/excalidraw/types.d.ts +83 -14
  123. package/dist/types/excalidraw/viewport.d.ts +23 -1
  124. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +12 -1
  125. package/dist/types/utils/src/index.d.ts +3 -1
  126. package/package.json +2 -2
  127. package/dist/types/utils/src/export.d.ts +0 -36
@@ -15,10 +15,9 @@ export declare const actionDeselect: {
15
15
  selectionElement: null;
16
16
  showHyperlinkPopup: false;
17
17
  suggestedBinding: null;
18
- hoveredArrowTextAnchor: null;
19
18
  frameToHighlight: null;
20
- editingGroupId: AppState["editingGroupId"];
21
19
  selectedElementIds: AppState["selectedElementIds"];
20
+ editingGroupId: AppState["editingGroupId"];
22
21
  selectedGroupIds: AppState["selectedGroupIds"];
23
22
  contextMenu: {
24
23
  items: import("../components/ContextMenu").ContextMenuItems;
@@ -35,7 +34,19 @@ export declare const actionDeselect: {
35
34
  boxSelectionMode: import("../types").BoxSelectionMode;
36
35
  bindingPreference: "enabled" | "disabled";
37
36
  isMidpointSnappingEnabled: boolean;
37
+ showHints: boolean;
38
38
  inputDevice: import("../types").InputDevice;
39
+ textToolHover: {
40
+ type: "text";
41
+ elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
42
+ } | {
43
+ type: "container";
44
+ elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
45
+ } | {
46
+ type: "arrow";
47
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
48
+ anchor: "start" | "end" | "label";
49
+ } | null;
39
50
  frameRendering: {
40
51
  enabled: boolean;
41
52
  name: boolean;
@@ -122,6 +133,7 @@ export declare const actionDeselect: {
122
133
  duration?: number;
123
134
  } | null;
124
135
  zenModeEnabled: boolean;
136
+ minimapEnabled: boolean;
125
137
  theme: import("@excalidraw/element/types").Theme;
126
138
  gridSize: number;
127
139
  gridStep: number;
@@ -60,12 +60,20 @@ export declare const actionLinkToElement: {
60
60
  boxSelectionMode: import("../types").BoxSelectionMode;
61
61
  bindingPreference: "enabled" | "disabled";
62
62
  isMidpointSnappingEnabled: boolean;
63
+ showHints: boolean;
63
64
  inputDevice: import("../types").InputDevice;
64
65
  suggestedBinding: {
65
66
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
66
67
  midPoint?: import("@excalidraw/math").GlobalPoint;
67
68
  } | null;
68
- hoveredArrowTextAnchor: {
69
+ textToolHover: {
70
+ type: "text";
71
+ elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
72
+ } | {
73
+ type: "container";
74
+ elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
75
+ } | {
76
+ type: "arrow";
69
77
  elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
70
78
  anchor: "start" | "end" | "label";
71
79
  } | null;
@@ -147,6 +155,7 @@ export declare const actionLinkToElement: {
147
155
  duration?: number;
148
156
  } | null;
149
157
  zenModeEnabled: boolean;
158
+ minimapEnabled: boolean;
150
159
  theme: import("@excalidraw/element/types").Theme;
151
160
  gridSize: number;
152
161
  gridStep: number;
@@ -42,12 +42,20 @@ export declare const actionToggleElementLock: {
42
42
  boxSelectionMode: import("../types").BoxSelectionMode;
43
43
  bindingPreference: "enabled" | "disabled";
44
44
  isMidpointSnappingEnabled: boolean;
45
+ showHints: boolean;
45
46
  inputDevice: import("../types").InputDevice;
46
47
  suggestedBinding: {
47
48
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
48
49
  midPoint?: import("@excalidraw/math").GlobalPoint;
49
50
  } | null;
50
- hoveredArrowTextAnchor: {
51
+ textToolHover: {
52
+ type: "text";
53
+ elementId: ExcalidrawElement["id"];
54
+ } | {
55
+ type: "container";
56
+ elementId: ExcalidrawElement["id"];
57
+ } | {
58
+ type: "arrow";
51
59
  elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
52
60
  anchor: "start" | "end" | "label";
53
61
  } | null;
@@ -143,6 +151,7 @@ export declare const actionToggleElementLock: {
143
151
  duration?: number;
144
152
  } | null;
145
153
  zenModeEnabled: boolean;
154
+ minimapEnabled: boolean;
146
155
  theme: import("@excalidraw/element/types").Theme;
147
156
  gridSize: number;
148
157
  gridStep: number;
@@ -227,12 +236,20 @@ export declare const actionUnlockAllElements: {
227
236
  boxSelectionMode: import("../types").BoxSelectionMode;
228
237
  bindingPreference: "enabled" | "disabled";
229
238
  isMidpointSnappingEnabled: boolean;
239
+ showHints: boolean;
230
240
  inputDevice: import("../types").InputDevice;
231
241
  suggestedBinding: {
232
242
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
233
243
  midPoint?: import("@excalidraw/math").GlobalPoint;
234
244
  } | null;
235
- hoveredArrowTextAnchor: {
245
+ textToolHover: {
246
+ type: "text";
247
+ elementId: ExcalidrawElement["id"];
248
+ } | {
249
+ type: "container";
250
+ elementId: ExcalidrawElement["id"];
251
+ } | {
252
+ type: "arrow";
236
253
  elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
237
254
  anchor: "start" | "end" | "label";
238
255
  } | null;
@@ -328,6 +345,7 @@ export declare const actionUnlockAllElements: {
328
345
  duration?: number;
329
346
  } | null;
330
347
  zenModeEnabled: boolean;
348
+ minimapEnabled: boolean;
331
349
  theme: import("@excalidraw/element/types").Theme;
332
350
  gridSize: number;
333
351
  gridStep: number;
@@ -92,6 +92,11 @@ export declare const actionLoadScene: {
92
92
  };
93
93
  name: string | null;
94
94
  zoom: import("../types").Zoom;
95
+ isBindingEnabled: boolean;
96
+ isMidpointSnappingEnabled: boolean;
97
+ selectedElementIds: Readonly<{
98
+ [id: string]: true;
99
+ }>;
95
100
  scrollX: number;
96
101
  scrollY: number;
97
102
  viewModeEnabled: boolean;
@@ -113,9 +118,6 @@ export declare const actionLoadScene: {
113
118
  rawText: string;
114
119
  };
115
120
  editingGroupId: import("@excalidraw/element/types").GroupId | null;
116
- selectedElementIds: Readonly<{
117
- [id: string]: true;
118
- }>;
119
121
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
120
122
  activeTool: {
121
123
  lastActiveTool: import("../types").ActiveTool | null;
@@ -133,14 +135,19 @@ export declare const actionLoadScene: {
133
135
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
134
136
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
135
137
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
136
- isBindingEnabled: boolean;
137
- isMidpointSnappingEnabled: boolean;
138
138
  gridModeEnabled: boolean;
139
139
  suggestedBinding: {
140
140
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
141
141
  midPoint?: import("@excalidraw/math").GlobalPoint;
142
142
  } | null;
143
- hoveredArrowTextAnchor: {
143
+ textToolHover: {
144
+ type: "text";
145
+ elementId: ExcalidrawElement["id"];
146
+ } | {
147
+ type: "container";
148
+ elementId: ExcalidrawElement["id"];
149
+ } | {
150
+ type: "arrow";
144
151
  elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
145
152
  anchor: "start" | "end" | "label";
146
153
  } | null;
@@ -163,8 +170,6 @@ export declare const actionLoadScene: {
163
170
  shouldCacheIgnoreZoom: boolean;
164
171
  exportScale: number;
165
172
  currentItemArrowType: "sharp" | "round" | "elbow";
166
- gridSize: number;
167
- bindMode: import("@excalidraw/element/types").BindMode;
168
173
  contextMenu: {
169
174
  items: import("../components/ContextMenu").ContextMenuItems;
170
175
  top: number;
@@ -176,6 +181,7 @@ export declare const actionLoadScene: {
176
181
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
177
182
  boxSelectionMode: import("../types").BoxSelectionMode;
178
183
  bindingPreference: "enabled" | "disabled";
184
+ showHints: boolean;
179
185
  inputDevice: import("../types").InputDevice;
180
186
  editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
181
187
  preferredSelectionTool: {
@@ -225,6 +231,8 @@ export declare const actionLoadScene: {
225
231
  closable?: boolean;
226
232
  duration?: number;
227
233
  } | null;
234
+ minimapEnabled: boolean;
235
+ gridSize: number;
228
236
  gridStep: number;
229
237
  fileHandle: FileSystemFileHandle | null;
230
238
  stats: {
@@ -240,6 +248,7 @@ export declare const actionLoadScene: {
240
248
  lockedMultiSelections: {
241
249
  [groupId: string]: true;
242
250
  };
251
+ bindMode: import("@excalidraw/element/types").BindMode;
243
252
  colorTopPicks: {
244
253
  elementStroke: readonly string[] | null;
245
254
  elementBackground: readonly string[] | null;
@@ -274,12 +283,20 @@ export declare const actionLoadScene: {
274
283
  boxSelectionMode: import("../types").BoxSelectionMode;
275
284
  bindingPreference: "enabled" | "disabled";
276
285
  isMidpointSnappingEnabled: boolean;
286
+ showHints: boolean;
277
287
  inputDevice: import("../types").InputDevice;
278
288
  suggestedBinding: {
279
289
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
280
290
  midPoint?: import("@excalidraw/math").GlobalPoint;
281
291
  } | null;
282
- hoveredArrowTextAnchor: {
292
+ textToolHover: {
293
+ type: "text";
294
+ elementId: ExcalidrawElement["id"];
295
+ } | {
296
+ type: "container";
297
+ elementId: ExcalidrawElement["id"];
298
+ } | {
299
+ type: "arrow";
283
300
  elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
284
301
  anchor: "start" | "end" | "label";
285
302
  } | null;
@@ -378,6 +395,7 @@ export declare const actionLoadScene: {
378
395
  duration?: number;
379
396
  } | null;
380
397
  zenModeEnabled: boolean;
398
+ minimapEnabled: boolean;
381
399
  theme: Theme;
382
400
  gridSize: number;
383
401
  gridStep: number;