@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 actionSelectAll: {
9
9
  category: "canvas";
10
10
  };
11
11
  viewMode: false;
12
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: any, app: import("../types").AppClassProperties) => false | {
12
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: unknown, app: import("../types").AppClassProperties) => false | {
13
13
  appState: {
14
14
  selectedLinearElement: LinearElementEditor | null;
15
15
  editingGroupId: string | null;
@@ -37,7 +37,7 @@ export declare const actionSelectAll: {
37
37
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
38
38
  isBindingEnabled: boolean;
39
39
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
40
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
40
+ suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
41
41
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
42
42
  frameRendering: {
43
43
  enabled: boolean;
@@ -48,12 +48,15 @@ export declare const actionSelectAll: {
48
48
  editingFrame: string | null;
49
49
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
50
50
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
51
- editingLinearElement: LinearElementEditor | null;
52
51
  activeTool: {
53
52
  lastActiveTool: import("../types").ActiveTool | null;
54
53
  locked: boolean;
55
54
  fromSelection: boolean;
56
55
  } & import("../types").ActiveTool;
56
+ preferredSelectionTool: {
57
+ type: "selection" | "lasso";
58
+ initialized: boolean;
59
+ };
57
60
  penMode: boolean;
58
61
  penDetected: boolean;
59
62
  exportBackground: boolean;
@@ -86,8 +89,8 @@ export declare const actionSelectAll: {
86
89
  zoom: Readonly<{
87
90
  value: import("../types").NormalizedZoomValue;
88
91
  }>;
89
- openMenu: "canvas" | "shape" | null;
90
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
92
+ openMenu: "canvas" | null;
93
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
91
94
  openSidebar: {
92
95
  name: string;
93
96
  tab?: string | undefined;
@@ -99,6 +102,8 @@ export declare const actionSelectAll: {
99
102
  tab: "mermaid" | "text-to-diagram";
100
103
  } | {
101
104
  name: "commandPalette";
105
+ } | {
106
+ name: "settings";
102
107
  } | {
103
108
  name: "elementLinkSelector";
104
109
  sourceElementId: string;
@@ -161,7 +166,7 @@ export declare const actionSelectAll: {
161
166
  shown: true;
162
167
  data: import("../charts").Spreadsheet;
163
168
  };
164
- showHyperlinkPopup: false | "editor" | "info";
169
+ showHyperlinkPopup: false | "info" | "editor";
165
170
  snapLines: readonly import("../snapping").SnapLine[];
166
171
  originSnapOffset: {
167
172
  x: number;
@@ -180,6 +185,7 @@ export declare const actionSelectAll: {
180
185
  lockedMultiSelections: {
181
186
  [groupId: string]: true;
182
187
  };
188
+ bindMode: import("@excalidraw/element/types").BindMode;
183
189
  };
184
190
  captureUpdate: "IMMEDIATELY";
185
191
  };
@@ -7,7 +7,7 @@ export declare const actionCopyStyles: {
7
7
  trackEvent: {
8
8
  category: "element";
9
9
  };
10
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, formData: any, app: import("../types").AppClassProperties) => {
10
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, formData: unknown, app: import("../types").AppClassProperties) => {
11
11
  appState: {
12
12
  toast: {
13
13
  message: string;
@@ -30,7 +30,7 @@ export declare const actionCopyStyles: {
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").SuggestedBinding[];
33
+ suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
34
34
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
35
35
  frameRendering: {
36
36
  enabled: boolean;
@@ -41,12 +41,15 @@ export declare const actionCopyStyles: {
41
41
  editingFrame: string | null;
42
42
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
43
43
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
44
- editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
45
44
  activeTool: {
46
45
  lastActiveTool: import("../types").ActiveTool | null;
47
46
  locked: boolean;
48
47
  fromSelection: boolean;
49
48
  } & import("../types").ActiveTool;
49
+ preferredSelectionTool: {
50
+ type: "selection" | "lasso";
51
+ initialized: boolean;
52
+ };
50
53
  penMode: boolean;
51
54
  penDetected: boolean;
52
55
  exportBackground: boolean;
@@ -79,8 +82,8 @@ export declare const actionCopyStyles: {
79
82
  zoom: Readonly<{
80
83
  value: import("../types").NormalizedZoomValue;
81
84
  }>;
82
- openMenu: "canvas" | "shape" | null;
83
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
85
+ openMenu: "canvas" | null;
86
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
84
87
  openSidebar: {
85
88
  name: string;
86
89
  tab?: string | undefined;
@@ -92,6 +95,8 @@ export declare const actionCopyStyles: {
92
95
  tab: "mermaid" | "text-to-diagram";
93
96
  } | {
94
97
  name: "commandPalette";
98
+ } | {
99
+ name: "settings";
95
100
  } | {
96
101
  name: "elementLinkSelector";
97
102
  sourceElementId: string;
@@ -156,7 +161,7 @@ export declare const actionCopyStyles: {
156
161
  shown: true;
157
162
  data: import("../charts").Spreadsheet;
158
163
  };
159
- showHyperlinkPopup: false | "editor" | "info";
164
+ showHyperlinkPopup: false | "info" | "editor";
160
165
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
161
166
  snapLines: readonly import("../snapping").SnapLine[];
162
167
  originSnapOffset: {
@@ -176,6 +181,7 @@ export declare const actionCopyStyles: {
176
181
  lockedMultiSelections: {
177
182
  [groupId: string]: true;
178
183
  };
184
+ bindMode: import("@excalidraw/element/types").BindMode;
179
185
  };
180
186
  captureUpdate: "EVENTUALLY";
181
187
  };
@@ -190,7 +196,7 @@ export declare const actionPasteStyles: {
190
196
  trackEvent: {
191
197
  category: "element";
192
198
  };
193
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, formData: any, app: import("../types").AppClassProperties) => {
199
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, formData: unknown, app: import("../types").AppClassProperties) => {
194
200
  elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
195
201
  captureUpdate: "EVENTUALLY";
196
202
  } | {
@@ -7,7 +7,7 @@ export declare const actionTextAutoResize: {
7
7
  category: "element";
8
8
  };
9
9
  predicate: (elements: readonly import("../../element/src/types").ExcalidrawElement[], appState: import("../types").AppState, _: unknown, app: AppClassProperties) => boolean;
10
- perform: (elements: readonly import("../../element/src/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: AppClassProperties) => {
10
+ perform: (elements: readonly import("../../element/src/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: unknown, app: AppClassProperties) => {
11
11
  appState: Readonly<import("../types").AppState>;
12
12
  elements: import("../../element/src/types").OrderedExcalidrawElement[];
13
13
  captureUpdate: "IMMEDIATELY";
@@ -32,7 +32,7 @@ export declare const actionToggleGridMode: {
32
32
  selectionElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
33
33
  isBindingEnabled: boolean;
34
34
  startBoundElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawBindableElement> | null;
35
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
35
+ suggestedBinding: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawBindableElement> | null;
36
36
  frameToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawFrameLikeElement> | null;
37
37
  frameRendering: {
38
38
  enabled: boolean;
@@ -43,12 +43,15 @@ export declare const actionToggleGridMode: {
43
43
  editingFrame: string | null;
44
44
  elementsToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawElement>[] | null;
45
45
  editingTextElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
46
- editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
47
46
  activeTool: {
48
47
  lastActiveTool: import("../types").ActiveTool | null;
49
48
  locked: boolean;
50
49
  fromSelection: boolean;
51
50
  } & import("../types").ActiveTool;
51
+ preferredSelectionTool: {
52
+ type: "selection" | "lasso";
53
+ initialized: boolean;
54
+ };
52
55
  penMode: boolean;
53
56
  penDetected: boolean;
54
57
  exportBackground: boolean;
@@ -81,8 +84,8 @@ export declare const actionToggleGridMode: {
81
84
  zoom: Readonly<{
82
85
  value: import("../types").NormalizedZoomValue;
83
86
  }>;
84
- openMenu: "canvas" | "shape" | null;
85
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
87
+ openMenu: "canvas" | null;
88
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
86
89
  openSidebar: {
87
90
  name: string;
88
91
  tab?: string | undefined;
@@ -94,6 +97,8 @@ export declare const actionToggleGridMode: {
94
97
  tab: "mermaid" | "text-to-diagram";
95
98
  } | {
96
99
  name: "commandPalette";
100
+ } | {
101
+ name: "settings";
97
102
  } | {
98
103
  name: "elementLinkSelector";
99
104
  sourceElementId: string;
@@ -162,7 +167,7 @@ export declare const actionToggleGridMode: {
162
167
  shown: true;
163
168
  data: import("../charts").Spreadsheet;
164
169
  };
165
- showHyperlinkPopup: false | "editor" | "info";
170
+ showHyperlinkPopup: false | "info" | "editor";
166
171
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
167
172
  snapLines: readonly import("../snapping").SnapLine[];
168
173
  originSnapOffset: {
@@ -181,6 +186,7 @@ export declare const actionToggleGridMode: {
181
186
  lockedMultiSelections: {
182
187
  [groupId: string]: true;
183
188
  };
189
+ bindMode: import("../../element/src/types").BindMode;
184
190
  };
185
191
  captureUpdate: "EVENTUALLY";
186
192
  };
@@ -30,7 +30,7 @@ export declare const actionToggleObjectsSnapMode: {
30
30
  selectionElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
31
31
  isBindingEnabled: boolean;
32
32
  startBoundElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawBindableElement> | null;
33
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
33
+ suggestedBinding: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawBindableElement> | null;
34
34
  frameToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawFrameLikeElement> | null;
35
35
  frameRendering: {
36
36
  enabled: boolean;
@@ -41,12 +41,15 @@ export declare const actionToggleObjectsSnapMode: {
41
41
  editingFrame: string | null;
42
42
  elementsToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawElement>[] | null;
43
43
  editingTextElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
44
- editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
45
44
  activeTool: {
46
45
  lastActiveTool: import("../types").ActiveTool | null;
47
46
  locked: boolean;
48
47
  fromSelection: boolean;
49
48
  } & import("../types").ActiveTool;
49
+ preferredSelectionTool: {
50
+ type: "selection" | "lasso";
51
+ initialized: boolean;
52
+ };
50
53
  penMode: boolean;
51
54
  penDetected: boolean;
52
55
  exportBackground: boolean;
@@ -79,8 +82,8 @@ export declare const actionToggleObjectsSnapMode: {
79
82
  zoom: Readonly<{
80
83
  value: import("../types").NormalizedZoomValue;
81
84
  }>;
82
- openMenu: "canvas" | "shape" | null;
83
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
85
+ openMenu: "canvas" | null;
86
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
84
87
  openSidebar: {
85
88
  name: string;
86
89
  tab?: string | undefined;
@@ -92,6 +95,8 @@ export declare const actionToggleObjectsSnapMode: {
92
95
  tab: "mermaid" | "text-to-diagram";
93
96
  } | {
94
97
  name: "commandPalette";
98
+ } | {
99
+ name: "settings";
95
100
  } | {
96
101
  name: "elementLinkSelector";
97
102
  sourceElementId: string;
@@ -160,7 +165,7 @@ export declare const actionToggleObjectsSnapMode: {
160
165
  shown: true;
161
166
  data: import("../charts").Spreadsheet;
162
167
  };
163
- showHyperlinkPopup: false | "editor" | "info";
168
+ showHyperlinkPopup: false | "info" | "editor";
164
169
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
165
170
  snapLines: readonly import("../snapping").SnapLine[];
166
171
  originSnapOffset: {
@@ -179,6 +184,7 @@ export declare const actionToggleObjectsSnapMode: {
179
184
  lockedMultiSelections: {
180
185
  [groupId: string]: true;
181
186
  };
187
+ bindMode: import("../../element/src/types").BindMode;
182
188
  };
183
189
  captureUpdate: "EVENTUALLY";
184
190
  };
@@ -11,7 +11,7 @@ export declare const actionToggleSearchMenu: {
11
11
  action: string;
12
12
  predicate: (appState: Readonly<AppState>) => boolean;
13
13
  };
14
- perform(elements: readonly import("../../element/src/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties): false | {
14
+ perform(elements: readonly import("../../element/src/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties): false | {
15
15
  appState: {
16
16
  openSidebar: {
17
17
  name: "default";
@@ -36,7 +36,7 @@ export declare const actionToggleSearchMenu: {
36
36
  selectionElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
37
37
  isBindingEnabled: boolean;
38
38
  startBoundElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawBindableElement> | null;
39
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
39
+ suggestedBinding: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawBindableElement> | null;
40
40
  frameToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawFrameLikeElement> | null;
41
41
  frameRendering: {
42
42
  enabled: boolean;
@@ -47,12 +47,15 @@ export declare const actionToggleSearchMenu: {
47
47
  editingFrame: string | null;
48
48
  elementsToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawElement>[] | null;
49
49
  editingTextElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
50
- editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
51
50
  activeTool: {
52
51
  lastActiveTool: import("../types").ActiveTool | null;
53
52
  locked: boolean;
54
53
  fromSelection: boolean;
55
54
  } & import("../types").ActiveTool;
55
+ preferredSelectionTool: {
56
+ type: "selection" | "lasso";
57
+ initialized: boolean;
58
+ };
56
59
  penMode: boolean;
57
60
  penDetected: boolean;
58
61
  exportBackground: boolean;
@@ -85,8 +88,8 @@ export declare const actionToggleSearchMenu: {
85
88
  zoom: Readonly<{
86
89
  value: import("../types").NormalizedZoomValue;
87
90
  }>;
88
- openMenu: "canvas" | "shape" | null;
89
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
91
+ openMenu: "canvas" | null;
92
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
90
93
  defaultSidebarDockedPreference: boolean;
91
94
  lastPointerDownWith: import("../../element/src/types").PointerType;
92
95
  selectedElementIds: Readonly<{
@@ -152,7 +155,7 @@ export declare const actionToggleSearchMenu: {
152
155
  shown: true;
153
156
  data: import("../charts").Spreadsheet;
154
157
  };
155
- showHyperlinkPopup: false | "editor" | "info";
158
+ showHyperlinkPopup: false | "info" | "editor";
156
159
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
157
160
  snapLines: readonly import("../snapping").SnapLine[];
158
161
  originSnapOffset: {
@@ -172,6 +175,7 @@ export declare const actionToggleSearchMenu: {
172
175
  lockedMultiSelections: {
173
176
  [groupId: string]: true;
174
177
  };
178
+ bindMode: import("../../element/src/types").BindMode;
175
179
  };
176
180
  captureUpdate: "EVENTUALLY";
177
181
  };
@@ -9,7 +9,7 @@ export declare const actionToggleShapeSwitch: {
9
9
  action: string;
10
10
  };
11
11
  keywords: string[];
12
- perform(elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: import("../types").AppClassProperties): {
12
+ perform(elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: unknown, app: import("../types").AppClassProperties): {
13
13
  captureUpdate: "NEVER";
14
14
  };
15
15
  checked: (appState: Readonly<import("../types").AppState>) => boolean;
@@ -32,7 +32,7 @@ export declare const actionToggleStats: {
32
32
  selectionElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
33
33
  isBindingEnabled: boolean;
34
34
  startBoundElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawBindableElement> | null;
35
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
35
+ suggestedBinding: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawBindableElement> | null;
36
36
  frameToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawFrameLikeElement> | null;
37
37
  frameRendering: {
38
38
  enabled: boolean;
@@ -43,12 +43,15 @@ export declare const actionToggleStats: {
43
43
  editingFrame: string | null;
44
44
  elementsToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawElement>[] | null;
45
45
  editingTextElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
46
- editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
47
46
  activeTool: {
48
47
  lastActiveTool: import("../types").ActiveTool | null;
49
48
  locked: boolean;
50
49
  fromSelection: boolean;
51
50
  } & import("../types").ActiveTool;
51
+ preferredSelectionTool: {
52
+ type: "selection" | "lasso";
53
+ initialized: boolean;
54
+ };
52
55
  penMode: boolean;
53
56
  penDetected: boolean;
54
57
  exportBackground: boolean;
@@ -81,8 +84,8 @@ export declare const actionToggleStats: {
81
84
  zoom: Readonly<{
82
85
  value: import("../types").NormalizedZoomValue;
83
86
  }>;
84
- openMenu: "canvas" | "shape" | null;
85
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
87
+ openMenu: "canvas" | null;
88
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
86
89
  openSidebar: {
87
90
  name: string;
88
91
  tab?: string | undefined;
@@ -94,6 +97,8 @@ export declare const actionToggleStats: {
94
97
  tab: "mermaid" | "text-to-diagram";
95
98
  } | {
96
99
  name: "commandPalette";
100
+ } | {
101
+ name: "settings";
97
102
  } | {
98
103
  name: "elementLinkSelector";
99
104
  sourceElementId: string;
@@ -159,7 +164,7 @@ export declare const actionToggleStats: {
159
164
  shown: true;
160
165
  data: import("../charts").Spreadsheet;
161
166
  };
162
- showHyperlinkPopup: false | "editor" | "info";
167
+ showHyperlinkPopup: false | "info" | "editor";
163
168
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
164
169
  snapLines: readonly import("../snapping").SnapLine[];
165
170
  originSnapOffset: {
@@ -179,6 +184,7 @@ export declare const actionToggleStats: {
179
184
  lockedMultiSelections: {
180
185
  [groupId: string]: true;
181
186
  };
187
+ bindMode: import("../../element/src/types").BindMode;
182
188
  };
183
189
  captureUpdate: "EVENTUALLY";
184
190
  };
@@ -29,7 +29,7 @@ export declare const actionToggleViewMode: {
29
29
  selectionElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
30
30
  isBindingEnabled: boolean;
31
31
  startBoundElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawBindableElement> | null;
32
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
32
+ suggestedBinding: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawBindableElement> | null;
33
33
  frameToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawFrameLikeElement> | null;
34
34
  frameRendering: {
35
35
  enabled: boolean;
@@ -40,12 +40,15 @@ export declare const actionToggleViewMode: {
40
40
  editingFrame: string | null;
41
41
  elementsToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawElement>[] | null;
42
42
  editingTextElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
43
- editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
44
43
  activeTool: {
45
44
  lastActiveTool: import("../types").ActiveTool | null;
46
45
  locked: boolean;
47
46
  fromSelection: boolean;
48
47
  } & import("../types").ActiveTool;
48
+ preferredSelectionTool: {
49
+ type: "selection" | "lasso";
50
+ initialized: boolean;
51
+ };
49
52
  penMode: boolean;
50
53
  penDetected: boolean;
51
54
  exportBackground: boolean;
@@ -78,8 +81,8 @@ export declare const actionToggleViewMode: {
78
81
  zoom: Readonly<{
79
82
  value: import("../types").NormalizedZoomValue;
80
83
  }>;
81
- openMenu: "canvas" | "shape" | null;
82
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
84
+ openMenu: "canvas" | null;
85
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
83
86
  openSidebar: {
84
87
  name: string;
85
88
  tab?: string | undefined;
@@ -91,6 +94,8 @@ export declare const actionToggleViewMode: {
91
94
  tab: "mermaid" | "text-to-diagram";
92
95
  } | {
93
96
  name: "commandPalette";
97
+ } | {
98
+ name: "settings";
94
99
  } | {
95
100
  name: "elementLinkSelector";
96
101
  sourceElementId: string;
@@ -159,7 +164,7 @@ export declare const actionToggleViewMode: {
159
164
  shown: true;
160
165
  data: import("../charts").Spreadsheet;
161
166
  };
162
- showHyperlinkPopup: false | "editor" | "info";
167
+ showHyperlinkPopup: false | "info" | "editor";
163
168
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
164
169
  snapLines: readonly import("../snapping").SnapLine[];
165
170
  originSnapOffset: {
@@ -179,6 +184,7 @@ export declare const actionToggleViewMode: {
179
184
  lockedMultiSelections: {
180
185
  [groupId: string]: true;
181
186
  };
187
+ bindMode: import("../../element/src/types").BindMode;
182
188
  };
183
189
  captureUpdate: "EVENTUALLY";
184
190
  };
@@ -29,7 +29,7 @@ export declare const actionToggleZenMode: {
29
29
  selectionElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
30
30
  isBindingEnabled: boolean;
31
31
  startBoundElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawBindableElement> | null;
32
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
32
+ suggestedBinding: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawBindableElement> | null;
33
33
  frameToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawFrameLikeElement> | null;
34
34
  frameRendering: {
35
35
  enabled: boolean;
@@ -40,12 +40,15 @@ export declare const actionToggleZenMode: {
40
40
  editingFrame: string | null;
41
41
  elementsToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawElement>[] | null;
42
42
  editingTextElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
43
- editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
44
43
  activeTool: {
45
44
  lastActiveTool: import("../types").ActiveTool | null;
46
45
  locked: boolean;
47
46
  fromSelection: boolean;
48
47
  } & import("../types").ActiveTool;
48
+ preferredSelectionTool: {
49
+ type: "selection" | "lasso";
50
+ initialized: boolean;
51
+ };
49
52
  penMode: boolean;
50
53
  penDetected: boolean;
51
54
  exportBackground: boolean;
@@ -78,8 +81,8 @@ export declare const actionToggleZenMode: {
78
81
  zoom: Readonly<{
79
82
  value: import("../types").NormalizedZoomValue;
80
83
  }>;
81
- openMenu: "canvas" | "shape" | null;
82
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
84
+ openMenu: "canvas" | null;
85
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
83
86
  openSidebar: {
84
87
  name: string;
85
88
  tab?: string | undefined;
@@ -91,6 +94,8 @@ export declare const actionToggleZenMode: {
91
94
  tab: "mermaid" | "text-to-diagram";
92
95
  } | {
93
96
  name: "commandPalette";
97
+ } | {
98
+ name: "settings";
94
99
  } | {
95
100
  name: "elementLinkSelector";
96
101
  sourceElementId: string;
@@ -159,7 +164,7 @@ export declare const actionToggleZenMode: {
159
164
  shown: true;
160
165
  data: import("../charts").Spreadsheet;
161
166
  };
162
- showHyperlinkPopup: false | "editor" | "info";
167
+ showHyperlinkPopup: false | "info" | "editor";
163
168
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
164
169
  snapLines: readonly import("../snapping").SnapLine[];
165
170
  originSnapOffset: {
@@ -179,11 +184,12 @@ export declare const actionToggleZenMode: {
179
184
  lockedMultiSelections: {
180
185
  [groupId: string]: true;
181
186
  };
187
+ bindMode: import("../../element/src/types").BindMode;
182
188
  };
183
189
  captureUpdate: "EVENTUALLY";
184
190
  };
185
191
  checked: (appState: Readonly<import("../types").AppState>) => boolean;
186
- predicate: (elements: readonly import("../../element/src/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps) => boolean;
192
+ predicate: (elements: readonly import("../../element/src/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
187
193
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
188
194
  } & {
189
195
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
@@ -7,7 +7,7 @@ export declare const actionSendBackward: {
7
7
  trackEvent: {
8
8
  category: "element";
9
9
  };
10
- perform: (elements: readonly import("../../element/src/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: any, app: import("../types").AppClassProperties) => {
10
+ perform: (elements: readonly import("../../element/src/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: unknown, app: import("../types").AppClassProperties) => {
11
11
  elements: readonly import("../../element/src/types").ExcalidrawElement[];
12
12
  appState: Readonly<import("../types").AppState>;
13
13
  captureUpdate: "IMMEDIATELY";
@@ -26,7 +26,7 @@ export declare const actionBringForward: {
26
26
  trackEvent: {
27
27
  category: "element";
28
28
  };
29
- perform: (elements: readonly import("../../element/src/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: any, app: import("../types").AppClassProperties) => {
29
+ perform: (elements: readonly import("../../element/src/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: unknown, app: import("../types").AppClassProperties) => {
30
30
  elements: readonly import("../../element/src/types").ExcalidrawElement[];
31
31
  appState: Readonly<import("../types").AppState>;
32
32
  captureUpdate: "IMMEDIATELY";
@@ -2,13 +2,13 @@ export { actionDeleteSelected } from "./actionDeleteSelected";
2
2
  export { actionBringForward, actionBringToFront, actionSendBackward, actionSendToBack, } from "./actionZindex";
3
3
  export { actionSelectAll } from "./actionSelectAll";
4
4
  export { actionDuplicateSelection } from "./actionDuplicateSelection";
5
- export { actionChangeStrokeColor, actionChangeBackgroundColor, actionChangeStrokeWidth, actionChangeFillStyle, actionChangeSloppiness, actionChangeOpacity, actionChangeFontSize, actionChangeFontFamily, actionChangeTextAlign, actionChangeVerticalAlign, } from "./actionProperties";
5
+ export { actionChangeStrokeColor, actionChangeBackgroundColor, actionChangeStrokeWidth, actionChangeFillStyle, actionChangeSloppiness, actionChangeOpacity, actionChangeFontSize, actionChangeFontFamily, actionChangeTextAlign, actionChangeVerticalAlign, actionChangeArrowProperties, } from "./actionProperties";
6
6
  export { actionChangeViewBackgroundColor, actionClearCanvas, actionZoomIn, actionZoomOut, actionResetZoom, actionZoomToFit, actionToggleTheme, } from "./actionCanvas";
7
7
  export { actionSetEmbeddableAsActiveTool } from "./actionEmbeddable";
8
8
  export { actionFinalize } from "./actionFinalize";
9
9
  export { actionChangeProjectName, actionChangeExportBackground, actionSaveToActiveFile, actionSaveFileToDisk, actionLoadScene, } from "./actionExport";
10
10
  export { actionCopyStyles, actionPasteStyles } from "./actionStyles";
11
- export { actionToggleCanvasMenu, actionToggleEditMenu, actionShortcuts, } from "./actionMenu";
11
+ export { actionShortcuts } from "./actionMenu";
12
12
  export { actionGroup, actionUngroup } from "./actionGroup";
13
13
  export { actionGoToCollaborator } from "./actionNavigate";
14
14
  export { actionAddToLibrary } from "./actionAddToLibrary";
@@ -3,7 +3,7 @@ import type { OrderedExcalidrawElement } from "@excalidraw/element/types";
3
3
  import type { AppClassProperties, AppState } from "../types";
4
4
  import type { Action, UpdaterFn, ActionName, ActionResult, PanelComponentProps, ActionSource } from "./types";
5
5
  export declare class ActionManager {
6
- actions: Record<ActionName, Action>;
6
+ actions: Record<ActionName, Action<any>>;
7
7
  updater: (actionResult: ActionResult | Promise<ActionResult>) => void;
8
8
  getAppState: () => Readonly<AppState>;
9
9
  getElementsIncludingDeleted: () => readonly OrderedExcalidrawElement[];
@@ -1,5 +1,5 @@
1
1
  import type { Action } from "./types";
2
2
  export declare let actions: readonly Action[];
3
- export declare const register: <T extends Action>(action: T) => T & {
3
+ export declare const register: <TData extends unknown, T extends Action<TData> = Action<TData>>(action: T) => T & {
4
4
  keyTest?: (unknown extends T["keyTest"] ? never : T["keyTest"]) | undefined;
5
5
  };