@zsviczian/excalidraw 0.18.0-53 → 0.18.0-55

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 (67) hide show
  1. package/dist/excalidraw.development.js +56 -56
  2. package/dist/excalidraw.production.min.js +1 -1
  3. package/package.json +2 -2
  4. package/types/common/src/commonObsidianUtils.d.ts +6 -0
  5. package/types/common/src/constants.d.ts +1 -0
  6. package/types/common/src/editorInterface.d.ts +1 -1
  7. package/types/common/src/index.d.ts +1 -0
  8. package/types/common/src/utils.d.ts +7 -2
  9. package/types/common/src/visualdebug.d.ts +1 -1
  10. package/types/element/src/binding.d.ts +55 -44
  11. package/types/element/src/collision.d.ts +6 -2
  12. package/types/element/src/index.d.ts +0 -3
  13. package/types/element/src/linearElementEditor.d.ts +15 -18
  14. package/types/element/src/renderElement.d.ts +1 -1
  15. package/types/element/src/typeChecks.d.ts +2 -3
  16. package/types/element/src/types.d.ts +7 -11
  17. package/types/element/src/utils.d.ts +2 -1
  18. package/types/element/src/zindex.d.ts +7 -1
  19. package/types/excalidraw/actions/actionAddToLibrary.d.ts +16 -7
  20. package/types/excalidraw/actions/actionAlign.d.ts +6 -6
  21. package/types/excalidraw/actions/actionBoundText.d.ts +13 -7
  22. package/types/excalidraw/actions/actionCanvas.d.ts +91 -286
  23. package/types/excalidraw/actions/actionClipboard.d.ts +34 -941
  24. package/types/excalidraw/actions/actionCropEditor.d.ts +6 -3
  25. package/types/excalidraw/actions/actionDeleteSelected.d.ts +23 -16
  26. package/types/excalidraw/actions/actionDistribute.d.ts +2 -2
  27. package/types/excalidraw/actions/actionDuplicateSelection.d.ts +1 -1
  28. package/types/excalidraw/actions/actionElementLink.d.ts +4 -3
  29. package/types/excalidraw/actions/actionElementLock.d.ts +11 -5
  30. package/types/excalidraw/actions/actionEmbeddable.d.ts +6 -3
  31. package/types/excalidraw/actions/actionExport.d.ts +43 -1149
  32. package/types/excalidraw/actions/actionFinalize.d.ts +10 -688
  33. package/types/excalidraw/actions/actionFlip.d.ts +2 -2
  34. package/types/excalidraw/actions/actionFrame.d.ts +26 -16
  35. package/types/excalidraw/actions/actionGroup.d.ts +12 -6
  36. package/types/excalidraw/actions/actionLinearEditor.d.ts +15 -16
  37. package/types/excalidraw/actions/actionLink.d.ts +5 -2
  38. package/types/excalidraw/actions/actionMenu.d.ts +3 -2
  39. package/types/excalidraw/actions/actionNavigate.d.ts +21 -445
  40. package/types/excalidraw/actions/actionProperties.d.ts +79 -2968
  41. package/types/excalidraw/actions/actionSelectAll.d.ts +6 -3
  42. package/types/excalidraw/actions/actionStyles.d.ts +7 -4
  43. package/types/excalidraw/actions/actionTextAutoResize.d.ts +1 -1
  44. package/types/excalidraw/actions/actionToggleGridMode.d.ts +5 -2
  45. package/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +5 -2
  46. package/types/excalidraw/actions/actionToggleSearchMenu.d.ts +3 -2
  47. package/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +1 -1
  48. package/types/excalidraw/actions/actionToggleStats.d.ts +5 -2
  49. package/types/excalidraw/actions/actionToggleViewMode.d.ts +6 -3
  50. package/types/excalidraw/actions/actionToggleZenMode.d.ts +5 -2
  51. package/types/excalidraw/actions/actionTrayMenu.d.ts +5 -2
  52. package/types/excalidraw/actions/actionZindex.d.ts +2 -2
  53. package/types/excalidraw/actions/manager.d.ts +1 -1
  54. package/types/excalidraw/actions/register.d.ts +1 -1
  55. package/types/excalidraw/actions/types.d.ts +3 -3
  56. package/types/excalidraw/appState.d.ts +4 -3
  57. package/types/excalidraw/components/App.d.ts +7 -3
  58. package/types/excalidraw/components/CommandPalette/types.d.ts +1 -2
  59. package/types/excalidraw/components/Stats/utils.d.ts +1 -1
  60. package/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +1 -1
  61. package/types/excalidraw/data/restore.d.ts +3 -3
  62. package/types/excalidraw/index.d.ts +3 -3
  63. package/types/excalidraw/obsidianUtils.d.ts +0 -5
  64. package/types/excalidraw/renderer/helpers.d.ts +1 -5
  65. package/types/excalidraw/renderer/interactiveScene.d.ts +1 -1
  66. package/types/excalidraw/scene/types.d.ts +4 -0
  67. package/types/excalidraw/types.d.ts +15 -5
@@ -8,7 +8,7 @@ export declare const actionSelectAll: {
8
8
  category: "canvas";
9
9
  };
10
10
  viewMode: false;
11
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: any, app: import("../types").AppClassProperties) => false | {
11
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: unknown, app: import("../types").AppClassProperties) => false | {
12
12
  appState: {
13
13
  selectedLinearElement: LinearElementEditor | null;
14
14
  editingGroupId: string | null;
@@ -36,7 +36,7 @@ export declare const actionSelectAll: {
36
36
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
37
37
  isBindingEnabled: boolean;
38
38
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
39
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
39
+ suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
40
40
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
41
41
  frameRendering: {
42
42
  enabled: boolean;
@@ -98,12 +98,14 @@ export declare const actionSelectAll: {
98
98
  tab?: string | undefined;
99
99
  } | null;
100
100
  openDialog: {
101
- name: "help" | "imageExport" | "jsonExport";
101
+ name: "imageExport" | "help" | "jsonExport";
102
102
  } | {
103
103
  name: "ttd";
104
104
  tab: "mermaid" | "text-to-diagram";
105
105
  } | {
106
106
  name: "commandPalette";
107
+ } | {
108
+ name: "settings";
107
109
  } | {
108
110
  name: "elementLinkSelector";
109
111
  sourceElementId: string;
@@ -221,6 +223,7 @@ export declare const actionSelectAll: {
221
223
  lockedMultiSelections: {
222
224
  [groupId: string]: true;
223
225
  };
226
+ bindMode: import("@excalidraw/element/types").BindMode;
224
227
  };
225
228
  captureUpdate: "IMMEDIATELY";
226
229
  };
@@ -6,7 +6,7 @@ export declare const actionCopyStyles: {
6
6
  trackEvent: {
7
7
  category: "element";
8
8
  };
9
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, formData: any, app: import("../types").AppClassProperties) => {
9
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, formData: unknown, app: import("../types").AppClassProperties) => {
10
10
  appState: {
11
11
  toast: {
12
12
  message: string;
@@ -29,7 +29,7 @@ export declare const actionCopyStyles: {
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").SuggestedBinding[];
32
+ suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
33
33
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
34
34
  frameRendering: {
35
35
  enabled: boolean;
@@ -91,12 +91,14 @@ export declare const actionCopyStyles: {
91
91
  tab?: string | undefined;
92
92
  } | null;
93
93
  openDialog: {
94
- name: "help" | "imageExport" | "jsonExport";
94
+ name: "imageExport" | "help" | "jsonExport";
95
95
  } | {
96
96
  name: "ttd";
97
97
  tab: "mermaid" | "text-to-diagram";
98
98
  } | {
99
99
  name: "commandPalette";
100
+ } | {
101
+ name: "settings";
100
102
  } | {
101
103
  name: "elementLinkSelector";
102
104
  sourceElementId: string;
@@ -217,6 +219,7 @@ export declare const actionCopyStyles: {
217
219
  lockedMultiSelections: {
218
220
  [groupId: string]: true;
219
221
  };
222
+ bindMode: import("@excalidraw/element/types").BindMode;
220
223
  };
221
224
  captureUpdate: "EVENTUALLY";
222
225
  };
@@ -231,7 +234,7 @@ export declare const actionPasteStyles: {
231
234
  trackEvent: {
232
235
  category: "element";
233
236
  };
234
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, formData: any, app: import("../types").AppClassProperties) => {
237
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, formData: unknown, app: import("../types").AppClassProperties) => {
235
238
  elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
236
239
  captureUpdate: "EVENTUALLY";
237
240
  } | {
@@ -7,7 +7,7 @@ export declare const actionTextAutoResize: {
7
7
  category: "element";
8
8
  };
9
9
  predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, _: unknown, app: AppClassProperties) => boolean;
10
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: AppClassProperties) => {
10
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: unknown, app: AppClassProperties) => {
11
11
  appState: Readonly<import("../types").AppState>;
12
12
  elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
13
13
  captureUpdate: "IMMEDIATELY";
@@ -31,7 +31,7 @@ export declare const actionToggleGridMode: {
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").SuggestedBinding[];
34
+ suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
35
35
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
36
36
  frameRendering: {
37
37
  enabled: boolean;
@@ -93,12 +93,14 @@ export declare const actionToggleGridMode: {
93
93
  tab?: string | undefined;
94
94
  } | null;
95
95
  openDialog: {
96
- name: "help" | "imageExport" | "jsonExport";
96
+ name: "imageExport" | "help" | "jsonExport";
97
97
  } | {
98
98
  name: "ttd";
99
99
  tab: "mermaid" | "text-to-diagram";
100
100
  } | {
101
101
  name: "commandPalette";
102
+ } | {
103
+ name: "settings";
102
104
  } | {
103
105
  name: "elementLinkSelector";
104
106
  sourceElementId: string;
@@ -222,6 +224,7 @@ export declare const actionToggleGridMode: {
222
224
  lockedMultiSelections: {
223
225
  [groupId: string]: true;
224
226
  };
227
+ bindMode: import("@excalidraw/element/types").BindMode;
225
228
  };
226
229
  captureUpdate: "EVENTUALLY";
227
230
  };
@@ -29,7 +29,7 @@ export declare const actionToggleObjectsSnapMode: {
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").SuggestedBinding[];
32
+ suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
33
33
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
34
34
  frameRendering: {
35
35
  enabled: boolean;
@@ -91,12 +91,14 @@ export declare const actionToggleObjectsSnapMode: {
91
91
  tab?: string | undefined;
92
92
  } | null;
93
93
  openDialog: {
94
- name: "help" | "imageExport" | "jsonExport";
94
+ name: "imageExport" | "help" | "jsonExport";
95
95
  } | {
96
96
  name: "ttd";
97
97
  tab: "mermaid" | "text-to-diagram";
98
98
  } | {
99
99
  name: "commandPalette";
100
+ } | {
101
+ name: "settings";
100
102
  } | {
101
103
  name: "elementLinkSelector";
102
104
  sourceElementId: string;
@@ -220,6 +222,7 @@ export declare const actionToggleObjectsSnapMode: {
220
222
  lockedMultiSelections: {
221
223
  [groupId: string]: true;
222
224
  };
225
+ bindMode: import("@excalidraw/element/types").BindMode;
223
226
  };
224
227
  captureUpdate: "EVENTUALLY";
225
228
  };
@@ -10,7 +10,7 @@ export declare const actionToggleSearchMenu: {
10
10
  action: string;
11
11
  predicate: (appState: Readonly<AppState>) => boolean;
12
12
  };
13
- perform(elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties): false | {
13
+ perform(elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties): false | {
14
14
  appState: {
15
15
  openSidebar: {
16
16
  name: "default";
@@ -35,7 +35,7 @@ export declare const actionToggleSearchMenu: {
35
35
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
36
36
  isBindingEnabled: boolean;
37
37
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
38
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
38
+ suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
39
39
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
40
40
  frameRendering: {
41
41
  enabled: boolean;
@@ -213,6 +213,7 @@ export declare const actionToggleSearchMenu: {
213
213
  lockedMultiSelections: {
214
214
  [groupId: string]: true;
215
215
  };
216
+ bindMode: import("@excalidraw/element/types").BindMode;
216
217
  };
217
218
  captureUpdate: "EVENTUALLY";
218
219
  };
@@ -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;
@@ -31,7 +31,7 @@ export declare const actionToggleStats: {
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").SuggestedBinding[];
34
+ suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
35
35
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
36
36
  frameRendering: {
37
37
  enabled: boolean;
@@ -93,12 +93,14 @@ export declare const actionToggleStats: {
93
93
  tab?: string | undefined;
94
94
  } | null;
95
95
  openDialog: {
96
- name: "help" | "imageExport" | "jsonExport";
96
+ name: "imageExport" | "help" | "jsonExport";
97
97
  } | {
98
98
  name: "ttd";
99
99
  tab: "mermaid" | "text-to-diagram";
100
100
  } | {
101
101
  name: "commandPalette";
102
+ } | {
103
+ name: "settings";
102
104
  } | {
103
105
  name: "elementLinkSelector";
104
106
  sourceElementId: string;
@@ -220,6 +222,7 @@ export declare const actionToggleStats: {
220
222
  lockedMultiSelections: {
221
223
  [groupId: string]: true;
222
224
  };
225
+ bindMode: import("@excalidraw/element/types").BindMode;
223
226
  };
224
227
  captureUpdate: "EVENTUALLY";
225
228
  };
@@ -7,7 +7,7 @@ export declare const actionToggleViewMode: {
7
7
  category: "canvas";
8
8
  predicate: (appState: Readonly<import("../types").AppState>) => boolean;
9
9
  };
10
- perform(elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: import("../types").AppClassProperties): {
10
+ perform(elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: unknown, app: import("../types").AppClassProperties): {
11
11
  appState: {
12
12
  viewModeEnabled: boolean;
13
13
  contextMenu: {
@@ -28,7 +28,7 @@ export declare const actionToggleViewMode: {
28
28
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
29
29
  isBindingEnabled: boolean;
30
30
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
31
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
31
+ suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
32
32
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
33
33
  frameRendering: {
34
34
  enabled: boolean;
@@ -90,12 +90,14 @@ export declare const actionToggleViewMode: {
90
90
  tab?: string | undefined;
91
91
  } | null;
92
92
  openDialog: {
93
- name: "help" | "imageExport" | "jsonExport";
93
+ name: "imageExport" | "help" | "jsonExport";
94
94
  } | {
95
95
  name: "ttd";
96
96
  tab: "mermaid" | "text-to-diagram";
97
97
  } | {
98
98
  name: "commandPalette";
99
+ } | {
100
+ name: "settings";
99
101
  } | {
100
102
  name: "elementLinkSelector";
101
103
  sourceElementId: string;
@@ -220,6 +222,7 @@ export declare const actionToggleViewMode: {
220
222
  lockedMultiSelections: {
221
223
  [groupId: string]: true;
222
224
  };
225
+ bindMode: import("@excalidraw/element/types").BindMode;
223
226
  };
224
227
  captureUpdate: "EVENTUALLY";
225
228
  };
@@ -28,7 +28,7 @@ export declare const actionToggleZenMode: {
28
28
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
29
29
  isBindingEnabled: boolean;
30
30
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
31
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
31
+ suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
32
32
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
33
33
  frameRendering: {
34
34
  enabled: boolean;
@@ -90,12 +90,14 @@ export declare const actionToggleZenMode: {
90
90
  tab?: string | undefined;
91
91
  } | null;
92
92
  openDialog: {
93
- name: "help" | "imageExport" | "jsonExport";
93
+ name: "imageExport" | "help" | "jsonExport";
94
94
  } | {
95
95
  name: "ttd";
96
96
  tab: "mermaid" | "text-to-diagram";
97
97
  } | {
98
98
  name: "commandPalette";
99
+ } | {
100
+ name: "settings";
99
101
  } | {
100
102
  name: "elementLinkSelector";
101
103
  sourceElementId: string;
@@ -220,6 +222,7 @@ export declare const actionToggleZenMode: {
220
222
  lockedMultiSelections: {
221
223
  [groupId: string]: true;
222
224
  };
225
+ bindMode: import("@excalidraw/element/types").BindMode;
223
226
  };
224
227
  captureUpdate: "EVENTUALLY";
225
228
  };
@@ -25,7 +25,7 @@ export declare const actionToggleTrayEditMenu: {
25
25
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
26
26
  isBindingEnabled: boolean;
27
27
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
28
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
28
+ suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
29
29
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
30
30
  frameRendering: {
31
31
  enabled: boolean;
@@ -86,12 +86,14 @@ export declare const actionToggleTrayEditMenu: {
86
86
  tab?: string | undefined;
87
87
  } | null;
88
88
  openDialog: {
89
- name: "help" | "imageExport" | "jsonExport";
89
+ name: "imageExport" | "help" | "jsonExport";
90
90
  } | {
91
91
  name: "ttd";
92
92
  tab: "mermaid" | "text-to-diagram";
93
93
  } | {
94
94
  name: "commandPalette";
95
+ } | {
96
+ name: "settings";
95
97
  } | {
96
98
  name: "elementLinkSelector";
97
99
  sourceElementId: string;
@@ -217,6 +219,7 @@ export declare const actionToggleTrayEditMenu: {
217
219
  lockedMultiSelections: {
218
220
  [groupId: string]: true;
219
221
  };
222
+ bindMode: import("@excalidraw/element/types").BindMode;
220
223
  };
221
224
  captureUpdate: "EVENTUALLY";
222
225
  };
@@ -6,7 +6,7 @@ export declare const actionSendBackward: {
6
6
  trackEvent: {
7
7
  category: "element";
8
8
  };
9
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: any, app: import("../types").AppClassProperties) => {
9
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: unknown, app: import("../types").AppClassProperties) => {
10
10
  elements: readonly import("@excalidraw/element/types").ExcalidrawElement[];
11
11
  appState: Readonly<import("../types").AppState>;
12
12
  captureUpdate: "IMMEDIATELY";
@@ -25,7 +25,7 @@ export declare const actionBringForward: {
25
25
  trackEvent: {
26
26
  category: "element";
27
27
  };
28
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: any, app: import("../types").AppClassProperties) => {
28
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: unknown, app: import("../types").AppClassProperties) => {
29
29
  elements: readonly import("@excalidraw/element/types").ExcalidrawElement[];
30
30
  appState: Readonly<import("../types").AppState>;
31
31
  captureUpdate: "IMMEDIATELY";
@@ -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
  };
@@ -11,7 +11,7 @@ export type ActionResult = {
11
11
  captureUpdate: CaptureUpdateActionType;
12
12
  replaceFiles?: boolean;
13
13
  } | false;
14
- type ActionFn = (elements: readonly OrderedExcalidrawElement[], appState: Readonly<AppState>, formData: any, app: AppClassProperties) => ActionResult | Promise<ActionResult>;
14
+ type ActionFn<TData = any> = (elements: readonly OrderedExcalidrawElement[], appState: Readonly<AppState>, formData: TData | undefined, app: AppClassProperties) => ActionResult | Promise<ActionResult>;
15
15
  export type UpdaterFn = (res: ActionResult) => void;
16
16
  export type ActionFilterFn = (action: Action) => void;
17
17
  export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeArrowType" | "changeArrowProperties" | "changeOpacity" | "changeFontSize" | "toggleTrayEditMenu" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "clearCanvas" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "flipHorizontal" | "flipVertical" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "toggleEraserTool" | "toggleHandTool" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "setFrameAsActiveTool" | "setEmbeddableAsActiveTool" | "createContainerFromText" | "wrapTextInContainer" | "toggleLaserPointerTool" | "toggleFrameRole" | "commandPalette" | "autoResize" | "elementStats" | "searchMenu" | "copyElementLink" | "linkToElement" | "cropEditor" | "wrapSelectionInFrame" | "toggleLassoTool" | "toggleShapeSwitch" | "togglePolygon";
@@ -24,13 +24,13 @@ export type PanelComponentProps = {
24
24
  app: AppClassProperties;
25
25
  renderAction: (name: ActionName, data?: PanelComponentProps["data"]) => React.JSX.Element | null;
26
26
  };
27
- export interface Action {
27
+ export interface Action<TData = any> {
28
28
  name: ActionName;
29
29
  label: string | ((elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, app: AppClassProperties) => string);
30
30
  keywords?: string[];
31
31
  icon?: React.ReactNode | ((appState: UIAppState, elements: readonly ExcalidrawElement[]) => React.ReactNode);
32
32
  PanelComponent?: React.FC<PanelComponentProps>;
33
- perform: ActionFn;
33
+ perform: ActionFn<TData>;
34
34
  keyPriority?: number;
35
35
  keyTest?: (event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean;
36
36
  predicate?: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: ExcalidrawProps, app: AppClassProperties) => boolean;
@@ -18,6 +18,10 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
18
18
  } | undefined;
19
19
  selectedLinearElement?: import("@excalidraw/element").LinearElementEditor | null | undefined;
20
20
  zenModeEnabled?: boolean | undefined;
21
+ shouldCacheIgnoreZoom?: boolean | undefined;
22
+ exportScale?: number | undefined;
23
+ bindMode?: import("@excalidraw/element/types").BindMode | undefined;
24
+ gridSize?: number | undefined;
21
25
  showWelcomeScreen?: boolean | undefined;
22
26
  activeTool?: ({
23
27
  lastActiveTool: import("./types").ActiveTool | null;
@@ -33,7 +37,6 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
33
37
  exportBackground?: boolean | undefined;
34
38
  exportEmbedScene?: boolean | undefined;
35
39
  exportWithDarkMode?: boolean | undefined;
36
- exportScale?: number | undefined;
37
40
  currentItemStrokeColor?: string | undefined;
38
41
  currentItemBackgroundColor?: string | undefined;
39
42
  currentItemFillStyle?: import("@excalidraw/element/types").FillStyle | undefined;
@@ -61,8 +64,6 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
61
64
  previousSelectedElementIds?: {
62
65
  [id: string]: true;
63
66
  } | undefined;
64
- shouldCacheIgnoreZoom?: boolean | undefined;
65
- gridSize?: number | undefined;
66
67
  gridStep?: number | undefined;
67
68
  gridModeEnabled?: boolean | undefined;
68
69
  stats?: {
@@ -24,7 +24,7 @@ export declare const useApp: () => AppClassProperties;
24
24
  export declare const useAppProps: () => AppProps;
25
25
  export declare const useEditorInterface: () => Readonly<{
26
26
  formFactor: "phone" | "tablet" | "desktop";
27
- desktopUIMode: "compact" | "full" | "tray";
27
+ desktopUIMode: "tray" | "full" | "compact";
28
28
  userAgent: Readonly<{
29
29
  isMobileDevice: boolean;
30
30
  platform: "other" | "unknown" | "ios" | "android";
@@ -57,7 +57,6 @@ declare class App extends React.Component<AppProps, AppState> {
57
57
  renderer: Renderer;
58
58
  visibleElements: readonly NonDeletedExcalidrawElement[];
59
59
  private resizeObserver;
60
- private nearestScrollableContainer;
61
60
  library: AppClassProperties["library"];
62
61
  libraryItemsFromStorage: LibraryItems | undefined;
63
62
  id: string;
@@ -85,6 +84,7 @@ declare class App extends React.Component<AppProps, AppState> {
85
84
  private elementsPendingErasure;
86
85
  flowChartCreator: FlowChartCreator;
87
86
  private flowChartNavigator;
87
+ bindModeHandler: ReturnType<typeof setTimeout> | null;
88
88
  hitLinkElement?: NonDeletedExcalidrawElement;
89
89
  lastPointerDownEvent: React.PointerEvent<HTMLElement> | null;
90
90
  lastPointerUpEvent: React.PointerEvent<HTMLElement> | PointerEvent | null;
@@ -252,6 +252,10 @@ declare class App extends React.Component<AppProps, AppState> {
252
252
  constructor(props: AppProps);
253
253
  updateEditorAtom: <Value, Args extends unknown[], Result>(atom: WritableAtom<Value, Args, Result>, ...args: Args) => Result;
254
254
  private onWindowMessage;
255
+ private handleSkipBindMode;
256
+ private resetDelayedBindMode;
257
+ private previousHoveredBindableElement;
258
+ private handleDelayedBindModeChange;
255
259
  private cacheEmbeddableRef;
256
260
  /**
257
261
  * Returns gridSize taking into account `gridModeEnabled`.
@@ -553,7 +557,6 @@ declare class App extends React.Component<AppProps, AppState> {
553
557
  * to render new images. This is just a failsafe */
554
558
  private scheduleImageRefresh;
555
559
  private updateBindingEnabledOnPointerMove;
556
- private maybeSuggestBindingAtCursor;
557
560
  setSelection(elements: readonly NonDeletedExcalidrawElement[]): void;
558
561
  private clearSelection;
559
562
  private handleInteractiveCanvasRef;
@@ -572,6 +575,7 @@ declare class App extends React.Component<AppProps, AppState> {
572
575
  private updateDOMRect;
573
576
  refresh: () => void;
574
577
  private getCanvasOffsets;
578
+ watchState: () => void;
575
579
  private updateLanguage;
576
580
  }
577
581
  export default App;
@@ -1,6 +1,5 @@
1
1
  import type { ActionManager } from "../../actions/manager";
2
2
  import type { Action } from "../../actions/types";
3
- import type { UIAppState } from "../../types";
4
3
  export type CommandPaletteItem = {
5
4
  label: string;
6
5
  /** additional keywords to match against
@@ -11,7 +10,7 @@ export type CommandPaletteItem = {
11
10
  * (deburred name + keywords)
12
11
  */
13
12
  haystack?: string;
14
- icon?: React.ReactNode | ((appState: UIAppState) => React.ReactNode);
13
+ icon?: Action["icon"];
15
14
  category: string;
16
15
  order?: number;
17
16
  predicate?: boolean | Action["predicate"];
@@ -15,5 +15,5 @@ export declare const newOrigin: (x1: number, y1: number, w1: number, h1: number,
15
15
  x: number;
16
16
  y: number;
17
17
  };
18
- export declare const moveElement: (newTopLeftX: number, newTopLeftY: number, originalElement: ExcalidrawElement, scene: Scene, originalElementsMap: ElementsMap, shouldInformMutation?: boolean) => void;
18
+ export declare const moveElement: (newTopLeftX: number, newTopLeftY: number, originalElement: ExcalidrawElement, scene: Scene, appState: AppState, originalElementsMap: ElementsMap, shouldInformMutation?: boolean) => void;
19
19
  export declare const getAtomicUnits: (targetElements: readonly ExcalidrawElement[], appState: AppState) => AtomicUnit[];
@@ -6,7 +6,7 @@ declare const LiveCollaborationTrigger: {
6
6
  onSelect: () => void;
7
7
  editorInterface?: Readonly<{
8
8
  formFactor: "phone" | "tablet" | "desktop";
9
- desktopUIMode: "compact" | "full" | "tray";
9
+ desktopUIMode: "tray" | "full" | "compact";
10
10
  userAgent: Readonly<{
11
11
  isMobileDevice: boolean;
12
12
  platform: "other" | "unknown" | "ios" | "android";
@@ -1,4 +1,4 @@
1
- import type { ExcalidrawArrowElement, ExcalidrawElement, ExcalidrawLinearElement, ExcalidrawSelectionElement, ExcalidrawTextElement, OrderedExcalidrawElement } from "@excalidraw/element/types";
1
+ import type { ElementsMap, ExcalidrawArrowElement, ExcalidrawElement, ExcalidrawLinearElement, ExcalidrawSelectionElement, ExcalidrawTextElement, OrderedExcalidrawElement } from "@excalidraw/element/types";
2
2
  import type { AppState, BinaryFiles, LibraryItem } from "../types";
3
3
  import type { ImportedDataState } from "./types";
4
4
  type RestoredAppState = Omit<AppState, "offsetTop" | "offsetLeft" | "width" | "height">;
@@ -8,10 +8,10 @@ export type RestoredDataState = {
8
8
  appState: RestoredAppState;
9
9
  files: BinaryFiles;
10
10
  };
11
- export declare const restoreElement: (element: Exclude<ExcalidrawElement, ExcalidrawSelectionElement>, opts?: {
11
+ export declare const restoreElement: (element: Exclude<ExcalidrawElement, ExcalidrawSelectionElement>, elementsMap: Readonly<ElementsMap>, opts?: {
12
12
  deleteInvisibleElements?: boolean;
13
13
  }) => ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement | ExcalidrawArrowElement | null;
14
- export declare const restoreElements: (elements: ImportedDataState["elements"], localElements: readonly ExcalidrawElement[] | null | undefined, opts?: {
14
+ export declare const restoreElements: (targetElements: ImportedDataState["elements"], localElements: readonly ExcalidrawElement[] | null | undefined, opts?: {
15
15
  refreshDimensions?: boolean;
16
16
  repairBindings?: boolean;
17
17
  deleteInvisibleElements?: boolean;
@@ -17,14 +17,13 @@ export { reconcileElements } from "./data/reconcile";
17
17
  export { exportToCanvas, exportToBlob, exportToSvg, exportToClipboard, } from "@excalidraw/utils/export";
18
18
  export { getCommonBoundingBox } from "@excalidraw/element/bounds";
19
19
  export { getMaximumGroups } from "@excalidraw/element/groups";
20
- export { determineFocusDistance } from "@excalidraw/element/binding";
21
20
  export { measureText } from "@excalidraw/element/textMeasurements";
22
21
  export { wrapText } from "@excalidraw/element/textWrapping";
23
22
  export { getLineHeight } from "@excalidraw/common";
24
23
  export { getFontString, getFontFamilyString } from "@excalidraw/common";
25
24
  export { getBoundTextMaxWidth } from "@excalidraw/element/textElement";
26
25
  export { mermaidToExcalidraw } from "./components/TTDDialog/MermaidToExcalidrawLib";
27
- export { destroyObsidianUtils, registerLocalFont, getFontMetrics, getFontFamilies, registerFontsInCSS, getCSSFontDefinition, loadSceneFonts, getSharedMermaidInstance, loadMermaid, intersectElementWithLine, } from "../excalidraw/obsidianUtils";
26
+ export { registerLocalFont, getFontMetrics, getFontFamilies, registerFontsInCSS, getCSSFontDefinition, loadSceneFonts, getSharedMermaidInstance, loadMermaid, intersectElementWithLine, } from "../excalidraw/obsidianUtils";
28
27
  export { refreshTextDimensions } from "@excalidraw/element/newElement";
29
28
  export { syncMovedIndices, syncInvalidIndices } from "@excalidraw/element";
30
29
  export { getContainerElement } from "@excalidraw/element/textElement";
@@ -33,7 +32,8 @@ export { loadFromBlob, loadSceneOrLibraryFromBlob, loadLibraryFromBlob, } from "
33
32
  export { getFreeDrawSvgPath } from "@excalidraw/element";
34
33
  export { mergeLibraryItems, getLibraryItemsHash } from "./data/library";
35
34
  export { isLinearElement } from "@excalidraw/element";
36
- export { FONT_FAMILY, THEME, MIME_TYPES, ROUNDNESS, DEFAULT_LASER_COLOR, UserIdleState, normalizeLink, sceneCoordsToViewportCoords, viewportCoordsToSceneCoords, getFormFactor, safelyParseJSON, } from "@excalidraw/common";
35
+ export { FONT_FAMILY, THEME, MIME_TYPES, ROUNDNESS, DEFAULT_LASER_COLOR, UserIdleState, normalizeLink, sceneCoordsToViewportCoords, viewportCoordsToSceneCoords, getFormFactor, safelyParseJSON, //zsviczian
36
+ destroyObsidianUtils, } from "@excalidraw/common";
37
37
  export { mutateElement, newElementWith, bumpVersion, } from "@excalidraw/element";
38
38
  export { CaptureUpdateAction } from "@excalidraw/element";
39
39
  export { parseLibraryTokensFromUrl, useHandleLibrary } from "./data/library";
@@ -3,11 +3,6 @@ import type { FontMetadata } from "@excalidraw/common";
3
3
  import type { ElementsMap, ExcalidrawElement, ExcalidrawTextElement, NonDeletedExcalidrawElement } from "@excalidraw/element/types";
4
4
  import type { AppClassProperties, AppState } from "./types";
5
5
  import type { MermaidToExcalidrawLibProps } from "./components/TTDDialog/common";
6
- export declare let hostPlugin: any;
7
- export declare function destroyObsidianUtils(): void;
8
- export declare function initializeObsidianUtils(): void;
9
- export declare function getAreaLimit(): any;
10
- export declare function getWidthHeightLimit(): any;
11
6
  export declare function allowDoubleTapEraser(): any;
12
7
  export declare function isPanWithRightMouseEnabled(): boolean;
13
8
  export declare function getMaxZoom(): number;
@@ -1,4 +1,3 @@
1
- import type { ElementsMap, ExcalidrawDiamondElement, ExcalidrawRectanguloidElement } from "@excalidraw/element/types";
2
1
  import type { StaticCanvasRenderConfig } from "../scene/types";
3
2
  import type { AppState, StaticCanvasAppState } from "../types";
4
3
  export declare const fillCircle: (context: CanvasRenderingContext2D, cx: number, cy: number, radius: number, stroke: boolean, fill?: boolean) => void;
@@ -12,7 +11,4 @@ export declare const bootstrapCanvas: ({ canvas, scale, normalizedWidth, normali
12
11
  isExporting?: boolean | undefined;
13
12
  viewBackgroundColor?: string | null | undefined;
14
13
  }) => CanvasRenderingContext2D;
15
- export declare const drawHighlightForRectWithRotation: (context: CanvasRenderingContext2D, element: ExcalidrawRectanguloidElement, elementsMap: ElementsMap, padding: number) => void;
16
- export declare const strokeEllipseWithRotation: (context: CanvasRenderingContext2D, width: number, height: number, cx: number, cy: number, angle: number) => void;
17
- export declare const strokeRectWithRotation: (context: CanvasRenderingContext2D, x: number, y: number, width: number, height: number, cx: number, cy: number, angle: number, fill?: boolean, radius?: number) => void;
18
- export declare const drawHighlightForDiamondWithRotation: (context: CanvasRenderingContext2D, padding: number, element: ExcalidrawDiamondElement, elementsMap: ElementsMap) => void;
14
+ export declare const strokeRectWithRotation_simple: (context: CanvasRenderingContext2D, x: number, y: number, width: number, height: number, cx: number, cy: number, angle: number, fill?: boolean, radius?: number) => void;
@@ -4,7 +4,7 @@ import type { InteractiveSceneRenderConfig, RenderableElementsMap } from "../sce
4
4
  * Interactive scene is the ui-canvas where we render bounding boxes, selections
5
5
  * and other ui stuff.
6
6
  */
7
- export declare const renderInteractiveScene: <U extends ({ canvas, elementsMap, visibleElements, selectedElements, allElementsMap, scale, appState, renderConfig, editorInterface, animationState, deltaTime, }: InteractiveSceneRenderConfig) => {
7
+ export declare const renderInteractiveScene: <U extends ({ app, canvas, elementsMap, visibleElements, selectedElements, allElementsMap, scale, appState, renderConfig, editorInterface, animationState, deltaTime, }: InteractiveSceneRenderConfig) => {
8
8
  scrollBars?: import("../scene/types").ScrollBars | undefined;
9
9
  atLeastOneVisibleElement: boolean;
10
10
  elementsMap: RenderableElementsMap;