@myoc/math 0.19.502-ff5a131b0 → 0.19.503

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 (104) hide show
  1. package/dist/dev/index.js +116 -125
  2. package/dist/dev/index.js.map +4 -4
  3. package/dist/prod/index.js +1 -1
  4. package/dist/types/common/debug.d.ts +21 -0
  5. package/dist/types/common/src/appEventBus.d.ts +27 -0
  6. package/dist/types/common/src/colors.d.ts +1 -1
  7. package/dist/types/common/src/constants.d.ts +3 -0
  8. package/dist/types/common/src/index.d.ts +3 -0
  9. package/dist/types/common/src/utils.d.ts +4 -7
  10. package/dist/types/common/src/versionedSnapshotStore.d.ts +17 -0
  11. package/dist/types/element/src/Scene.d.ts +2 -0
  12. package/dist/types/element/src/arrowheads.d.ts +3 -0
  13. package/dist/types/element/src/arrows/focus.d.ts +27 -0
  14. package/dist/types/element/src/arrows/helpers.d.ts +5 -0
  15. package/dist/types/element/src/binding.d.ts +13 -8
  16. package/dist/types/element/src/bounds.d.ts +1 -1
  17. package/dist/types/element/src/collision.d.ts +4 -3
  18. package/dist/types/element/src/distribute.d.ts +2 -1
  19. package/dist/types/element/src/elbowArrow.d.ts +2 -0
  20. package/dist/types/element/src/index.d.ts +4 -0
  21. package/dist/types/element/src/linearElementEditor.d.ts +5 -0
  22. package/dist/types/element/src/mutateElement.d.ts +2 -0
  23. package/dist/types/element/src/selection.d.ts +5 -1
  24. package/dist/types/element/src/shapes.d.ts +2 -22
  25. package/dist/types/element/src/textElement.d.ts +1 -1
  26. package/dist/types/element/src/textWrapping.d.ts +26 -0
  27. package/dist/types/element/src/types.d.ts +5 -2
  28. package/dist/types/element/src/utils.d.ts +5 -3
  29. package/dist/types/element/src/zindex.d.ts +1 -1
  30. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +38 -35
  31. package/dist/types/excalidraw/actions/actionBoundText.d.ts +27 -25
  32. package/dist/types/excalidraw/actions/actionCanvas.d.ts +143 -132
  33. package/dist/types/excalidraw/actions/actionClipboard.d.ts +26 -24
  34. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +13 -12
  35. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +41 -36
  36. package/dist/types/excalidraw/actions/actionElementLink.d.ts +9 -12
  37. package/dist/types/excalidraw/actions/actionElementLock.d.ts +26 -24
  38. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +13 -12
  39. package/dist/types/excalidraw/actions/actionExport.d.ts +75 -368
  40. package/dist/types/excalidraw/actions/actionFrame.d.ts +52 -48
  41. package/dist/types/excalidraw/actions/actionGroup.d.ts +27 -25
  42. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +15 -12
  43. package/dist/types/excalidraw/actions/actionLink.d.ts +13 -12
  44. package/dist/types/excalidraw/actions/actionMenu.d.ts +9 -12
  45. package/dist/types/excalidraw/actions/actionProperties.d.ts +28 -26
  46. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +13 -12
  47. package/dist/types/excalidraw/actions/actionStyles.d.ts +13 -11
  48. package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +3 -3
  49. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +181 -0
  50. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +13 -12
  51. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +181 -0
  52. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +13 -12
  53. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +9 -12
  54. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +13 -12
  55. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +13 -12
  56. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +13 -12
  57. package/dist/types/excalidraw/actions/index.d.ts +2 -0
  58. package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
  59. package/dist/types/excalidraw/actions/types.d.ts +1 -1
  60. package/dist/types/excalidraw/appState.d.ts +9 -7
  61. package/dist/types/excalidraw/charts/charts.bar.d.ts +2 -0
  62. package/dist/types/excalidraw/charts/charts.constants.d.ts +48 -0
  63. package/dist/types/excalidraw/charts/charts.helpers.d.ts +32 -0
  64. package/dist/types/excalidraw/charts/charts.line.d.ts +2 -0
  65. package/dist/types/excalidraw/charts/charts.parse.d.ts +10 -0
  66. package/dist/types/excalidraw/charts/charts.radar.d.ts +2 -0
  67. package/dist/types/excalidraw/charts/charts.types.d.ts +18 -0
  68. package/dist/types/excalidraw/charts/index.d.ts +7 -0
  69. package/dist/types/excalidraw/clipboard.d.ts +6 -7
  70. package/dist/types/excalidraw/components/App.d.ts +55 -13
  71. package/dist/types/excalidraw/components/AppStateObserver.d.ts +37 -0
  72. package/dist/types/excalidraw/components/CommandPalette/types.d.ts +1 -1
  73. package/dist/types/excalidraw/components/IconPicker.d.ts +14 -9
  74. package/dist/types/excalidraw/components/PasteChartDialog.d.ts +4 -5
  75. package/dist/types/excalidraw/components/PropertiesPopover.d.ts +1 -1
  76. package/dist/types/excalidraw/components/Range.d.ts +10 -4
  77. package/dist/types/excalidraw/components/Toast.d.ts +8 -4
  78. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +1 -0
  79. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +30 -17
  80. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +3 -2
  81. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +11 -13
  82. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCheckbox.d.ts +5 -0
  83. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSub.d.ts +23 -0
  84. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubContent.d.ts +8 -0
  85. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubTrigger.d.ts +12 -0
  86. package/dist/types/excalidraw/components/dropdownMenu/common.d.ts +1 -1
  87. package/dist/types/excalidraw/components/dropdownMenu/dropdownMenuUtils.d.ts +2 -0
  88. package/dist/types/excalidraw/components/icons.d.ts +23 -9
  89. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +17 -0
  90. package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +23 -13
  91. package/dist/types/excalidraw/data/blob.d.ts +45 -44
  92. package/dist/types/excalidraw/data/filesystem.d.ts +3 -5
  93. package/dist/types/excalidraw/data/index.d.ts +2 -3
  94. package/dist/types/excalidraw/data/json.d.ts +37 -28
  95. package/dist/types/excalidraw/data/resave.d.ts +7 -2
  96. package/dist/types/excalidraw/hooks/useAppStateValue.d.ts +29 -0
  97. package/dist/types/excalidraw/index.d.ts +25 -3
  98. package/dist/types/excalidraw/textAutoResizeHandle.d.ts +15 -0
  99. package/dist/types/excalidraw/types.d.ts +93 -16
  100. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +5 -1
  101. package/dist/types/math/src/point.d.ts +7 -2
  102. package/dist/types/math/src/types.d.ts +25 -1
  103. package/package.json +2 -2
  104. package/dist/types/excalidraw/charts.d.ts +0 -27
@@ -1,8 +1,8 @@
1
1
  import { LinearElementEditor } from "@excalidraw/element";
2
- import type { Arrowhead, ExcalidrawBindableElement, ExcalidrawElement, ExcalidrawLinearElement, FontFamilyValues, TextAlign } from "@excalidraw/element/types";
2
+ import type { Arrowhead, ExcalidrawBindableElement, ExcalidrawElement, ExcalidrawLinearElement, ExcalidrawTextElement, FontFamilyValues, TextAlign } from "@excalidraw/element/types";
3
3
  import type { AppClassProperties, AppState, Primitive } from "../types";
4
4
  export declare const changeProperty: (elements: readonly ExcalidrawElement[], appState: AppState, callback: (element: ExcalidrawElement) => ExcalidrawElement, includeBoundText?: boolean) => ExcalidrawElement[];
5
- export declare const getFormValue: <T extends Primitive>(elements: readonly ExcalidrawElement[], app: AppClassProperties, getAttribute: (element: ExcalidrawElement) => T, isRelevantElement: true | ((element: ExcalidrawElement) => boolean), defaultValue: T | ((isSomeElementSelected: boolean) => T)) => T;
5
+ export declare const getFormValue: <T extends Primitive>(elements: readonly ExcalidrawElement[], app: AppClassProperties, getAttribute: (element: ExcalidrawElement) => T, elementPredicate: true | ((element: ExcalidrawElement) => boolean), defaultValue: T | ((isSomeElementSelected: boolean) => T)) => T;
6
6
  export declare const actionChangeStrokeColor: import("./types").Action<Pick<AppState, "currentItemStrokeColor">> & {
7
7
  keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
8
8
  };
@@ -65,8 +65,13 @@ export declare const actionDecreaseFontSize: {
65
65
  multiElement: import("@excalidraw/element/types").NonDeleted<ExcalidrawLinearElement> | null;
66
66
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
67
67
  isBindingEnabled: boolean;
68
+ bindingPreference: "enabled" | "disabled";
69
+ isMidpointSnappingEnabled: boolean;
68
70
  startBoundElement: import("@excalidraw/element/types").NonDeleted<ExcalidrawBindableElement> | null;
69
- suggestedBinding: import("@excalidraw/element/types").NonDeleted<ExcalidrawBindableElement> | null;
71
+ suggestedBinding: {
72
+ element: import("@excalidraw/element/types").NonDeleted<ExcalidrawBindableElement>;
73
+ midPoint?: import("@excalidraw/math").GlobalPoint;
74
+ } | null;
70
75
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
71
76
  frameRendering: {
72
77
  enabled: boolean;
@@ -76,7 +81,7 @@ export declare const actionDecreaseFontSize: {
76
81
  };
77
82
  editingFrame: string | null;
78
83
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
79
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
84
+ editingTextElement: ExcalidrawTextElement | null;
80
85
  activeTool: {
81
86
  lastActiveTool: import("../types").ActiveTool | null;
82
87
  locked: boolean;
@@ -130,6 +135,10 @@ export declare const actionDecreaseFontSize: {
130
135
  } | {
131
136
  name: "elementLinkSelector";
132
137
  sourceElementId: ExcalidrawElement["id"];
138
+ } | {
139
+ name: "charts";
140
+ data: import("../charts").Spreadsheet;
141
+ rawText: string;
133
142
  };
134
143
  defaultSidebarDockedPreference: boolean;
135
144
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
@@ -145,7 +154,7 @@ export declare const actionDecreaseFontSize: {
145
154
  selectedElementsAreBeingDragged: boolean;
146
155
  shouldCacheIgnoreZoom: boolean;
147
156
  toast: {
148
- message: string;
157
+ message: React.ReactNode;
149
158
  closable?: boolean;
150
159
  duration?: number;
151
160
  } | null;
@@ -163,20 +172,12 @@ export declare const actionDecreaseFontSize: {
163
172
  height: number;
164
173
  offsetTop: number;
165
174
  offsetLeft: number;
166
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
175
+ fileHandle: FileSystemFileHandle | null;
167
176
  collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
168
177
  stats: {
169
178
  open: boolean;
170
179
  panels: number;
171
180
  };
172
- currentChartType: import("@excalidraw/element/types").ChartType;
173
- pasteDialog: {
174
- shown: false;
175
- data: null;
176
- } | {
177
- shown: true;
178
- data: import("../charts").Spreadsheet;
179
- };
180
181
  showHyperlinkPopup: false | "info" | "editor";
181
182
  selectedLinearElement: LinearElementEditor | null;
182
183
  snapLines: readonly import("../snapping").SnapLine[];
@@ -243,8 +244,13 @@ export declare const actionIncreaseFontSize: {
243
244
  multiElement: import("@excalidraw/element/types").NonDeleted<ExcalidrawLinearElement> | null;
244
245
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
245
246
  isBindingEnabled: boolean;
247
+ bindingPreference: "enabled" | "disabled";
248
+ isMidpointSnappingEnabled: boolean;
246
249
  startBoundElement: import("@excalidraw/element/types").NonDeleted<ExcalidrawBindableElement> | null;
247
- suggestedBinding: import("@excalidraw/element/types").NonDeleted<ExcalidrawBindableElement> | null;
250
+ suggestedBinding: {
251
+ element: import("@excalidraw/element/types").NonDeleted<ExcalidrawBindableElement>;
252
+ midPoint?: import("@excalidraw/math").GlobalPoint;
253
+ } | null;
248
254
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
249
255
  frameRendering: {
250
256
  enabled: boolean;
@@ -254,7 +260,7 @@ export declare const actionIncreaseFontSize: {
254
260
  };
255
261
  editingFrame: string | null;
256
262
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
257
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
263
+ editingTextElement: ExcalidrawTextElement | null;
258
264
  activeTool: {
259
265
  lastActiveTool: import("../types").ActiveTool | null;
260
266
  locked: boolean;
@@ -308,6 +314,10 @@ export declare const actionIncreaseFontSize: {
308
314
  } | {
309
315
  name: "elementLinkSelector";
310
316
  sourceElementId: ExcalidrawElement["id"];
317
+ } | {
318
+ name: "charts";
319
+ data: import("../charts").Spreadsheet;
320
+ rawText: string;
311
321
  };
312
322
  defaultSidebarDockedPreference: boolean;
313
323
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
@@ -323,7 +333,7 @@ export declare const actionIncreaseFontSize: {
323
333
  selectedElementsAreBeingDragged: boolean;
324
334
  shouldCacheIgnoreZoom: boolean;
325
335
  toast: {
326
- message: string;
336
+ message: React.ReactNode;
327
337
  closable?: boolean;
328
338
  duration?: number;
329
339
  } | null;
@@ -341,20 +351,12 @@ export declare const actionIncreaseFontSize: {
341
351
  height: number;
342
352
  offsetTop: number;
343
353
  offsetLeft: number;
344
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
354
+ fileHandle: FileSystemFileHandle | null;
345
355
  collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
346
356
  stats: {
347
357
  open: boolean;
348
358
  panels: number;
349
359
  };
350
- currentChartType: import("@excalidraw/element/types").ChartType;
351
- pasteDialog: {
352
- shown: false;
353
- data: null;
354
- } | {
355
- shown: true;
356
- data: import("../charts").Spreadsheet;
357
- };
358
360
  showHyperlinkPopup: false | "info" | "editor";
359
361
  selectedLinearElement: LinearElementEditor | null;
360
362
  snapLines: readonly import("../snapping").SnapLine[];
@@ -43,8 +43,13 @@ export declare const actionSelectAll: {
43
43
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
44
44
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
45
45
  isBindingEnabled: boolean;
46
+ bindingPreference: "enabled" | "disabled";
47
+ isMidpointSnappingEnabled: boolean;
46
48
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
47
- suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
49
+ suggestedBinding: {
50
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
51
+ midPoint?: import("@excalidraw/math").GlobalPoint;
52
+ } | null;
48
53
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
49
54
  frameRendering: {
50
55
  enabled: boolean;
@@ -54,7 +59,7 @@ export declare const actionSelectAll: {
54
59
  };
55
60
  editingFrame: string | null;
56
61
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
57
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
62
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
58
63
  activeTool: {
59
64
  lastActiveTool: import("../types").ActiveTool | null;
60
65
  locked: boolean;
@@ -109,6 +114,10 @@ export declare const actionSelectAll: {
109
114
  } | {
110
115
  name: "elementLinkSelector";
111
116
  sourceElementId: ExcalidrawElement["id"];
117
+ } | {
118
+ name: "charts";
119
+ data: import("../charts").Spreadsheet;
120
+ rawText: string;
112
121
  };
113
122
  defaultSidebarDockedPreference: boolean;
114
123
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
@@ -121,7 +130,7 @@ export declare const actionSelectAll: {
121
130
  selectedElementsAreBeingDragged: boolean;
122
131
  shouldCacheIgnoreZoom: boolean;
123
132
  toast: {
124
- message: string;
133
+ message: React.ReactNode;
125
134
  closable?: boolean;
126
135
  duration?: number;
127
136
  } | null;
@@ -135,20 +144,12 @@ export declare const actionSelectAll: {
135
144
  height: number;
136
145
  offsetTop: number;
137
146
  offsetLeft: number;
138
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
147
+ fileHandle: FileSystemFileHandle | null;
139
148
  collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
140
149
  stats: {
141
150
  open: boolean;
142
151
  panels: number;
143
152
  };
144
- currentChartType: import("@excalidraw/element/types").ChartType;
145
- pasteDialog: {
146
- shown: false;
147
- data: null;
148
- } | {
149
- shown: true;
150
- data: import("../charts").Spreadsheet;
151
- };
152
153
  showHyperlinkPopup: false | "info" | "editor";
153
154
  snapLines: readonly import("../snapping").SnapLine[];
154
155
  originSnapOffset: {
@@ -1,3 +1,4 @@
1
+ import type { ExcalidrawTextElement } from "@excalidraw/element/types";
1
2
  export declare let copiedStyles: string;
2
3
  export declare const actionCopyStyles: {
3
4
  name: "copyStyles";
@@ -40,8 +41,13 @@ export declare const actionCopyStyles: {
40
41
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
41
42
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
42
43
  isBindingEnabled: boolean;
44
+ bindingPreference: "enabled" | "disabled";
45
+ isMidpointSnappingEnabled: boolean;
43
46
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
44
- suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
47
+ suggestedBinding: {
48
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
49
+ midPoint?: import("@excalidraw/math").GlobalPoint;
50
+ } | null;
45
51
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
46
52
  frameRendering: {
47
53
  enabled: boolean;
@@ -51,7 +57,7 @@ export declare const actionCopyStyles: {
51
57
  };
52
58
  editingFrame: string | null;
53
59
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
54
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
60
+ editingTextElement: ExcalidrawTextElement | null;
55
61
  activeTool: {
56
62
  lastActiveTool: import("../types").ActiveTool | null;
57
63
  locked: boolean;
@@ -106,6 +112,10 @@ export declare const actionCopyStyles: {
106
112
  } | {
107
113
  name: "elementLinkSelector";
108
114
  sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
115
+ } | {
116
+ name: "charts";
117
+ data: import("../charts").Spreadsheet;
118
+ rawText: string;
109
119
  };
110
120
  defaultSidebarDockedPreference: boolean;
111
121
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
@@ -134,20 +144,12 @@ export declare const actionCopyStyles: {
134
144
  height: number;
135
145
  offsetTop: number;
136
146
  offsetLeft: number;
137
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
147
+ fileHandle: FileSystemFileHandle | null;
138
148
  collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
139
149
  stats: {
140
150
  open: boolean;
141
151
  panels: number;
142
152
  };
143
- currentChartType: import("@excalidraw/element/types").ChartType;
144
- pasteDialog: {
145
- shown: false;
146
- data: null;
147
- } | {
148
- shown: true;
149
- data: import("../charts").Spreadsheet;
150
- };
151
153
  showHyperlinkPopup: false | "info" | "editor";
152
154
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
153
155
  snapLines: readonly import("../snapping").SnapLine[];
@@ -1,4 +1,4 @@
1
- import type { AppClassProperties } from "../types";
1
+ import type { ExcalidrawElement } from "@excalidraw/element/types";
2
2
  export declare const actionTextAutoResize: {
3
3
  name: "autoResize";
4
4
  label: string;
@@ -6,8 +6,8 @@ export declare const actionTextAutoResize: {
6
6
  trackEvent: {
7
7
  category: "element";
8
8
  };
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>, _: unknown, app: AppClassProperties) => {
9
+ predicate: (elements: readonly ExcalidrawElement[], appState: import("../types").AppState, _: unknown) => boolean;
10
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, targetElement: unknown) => {
11
11
  appState: Readonly<import("../types").AppState>;
12
12
  elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
13
13
  captureUpdate: "IMMEDIATELY";
@@ -0,0 +1,181 @@
1
+ export declare const actionToggleArrowBinding: {
2
+ name: "arrowBinding";
3
+ label: string;
4
+ viewMode: false;
5
+ trackEvent: {
6
+ category: "canvas";
7
+ predicate: (appState: Readonly<import("../types").AppState>) => boolean;
8
+ };
9
+ perform(elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>): {
10
+ appState: {
11
+ bindingPreference: "enabled" | "disabled";
12
+ isBindingEnabled: boolean;
13
+ contextMenu: {
14
+ items: import("../components/ContextMenu").ContextMenuItems;
15
+ top: number;
16
+ left: number;
17
+ } | null;
18
+ showWelcomeScreen: boolean;
19
+ isLoading: boolean;
20
+ myocSimplifiedMode: boolean;
21
+ dontResizeLimitMBs: number;
22
+ hideMainMenus: boolean;
23
+ wheelZoomsOnDefault?: boolean;
24
+ arrangeConfiguration: {
25
+ algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
26
+ gap: number;
27
+ };
28
+ normaliseConfiguration: {
29
+ mode: import("../types").NormaliseMode;
30
+ metric: import("../types").NormaliseMetric;
31
+ };
32
+ errorMessage: React.ReactNode;
33
+ activeEmbeddable: {
34
+ element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
35
+ state: "hover" | "active";
36
+ } | null;
37
+ newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
38
+ resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
39
+ multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
40
+ selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
41
+ isMidpointSnappingEnabled: boolean;
42
+ startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
43
+ suggestedBinding: {
44
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
45
+ midPoint?: import("@excalidraw/math").GlobalPoint;
46
+ } | null;
47
+ frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
48
+ frameRendering: {
49
+ enabled: boolean;
50
+ name: boolean;
51
+ outline: boolean;
52
+ clip: boolean;
53
+ };
54
+ editingFrame: string | null;
55
+ elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
56
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
57
+ activeTool: {
58
+ lastActiveTool: import("../types").ActiveTool | null;
59
+ locked: boolean;
60
+ fromSelection: boolean;
61
+ } & import("../types").ActiveTool;
62
+ preferredSelectionTool: {
63
+ type: "selection" | "lasso";
64
+ initialized: boolean;
65
+ };
66
+ penMode: boolean;
67
+ penDetected: boolean;
68
+ exportBackground: boolean;
69
+ exportEmbedScene: boolean;
70
+ exportWithDarkMode: boolean;
71
+ exportScale: number;
72
+ currentItemStrokeColor: string;
73
+ currentItemBackgroundColor: string;
74
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
75
+ currentItemStrokeWidth: number;
76
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
77
+ currentItemRoughness: number;
78
+ currentItemOpacity: number;
79
+ currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
80
+ currentItemFontSize: number;
81
+ currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
82
+ currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
83
+ currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
84
+ currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
85
+ currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
86
+ currentItemArrowType: "sharp" | "round" | "elbow";
87
+ viewBackgroundColor: string;
88
+ scrollX: number;
89
+ scrollY: number;
90
+ cursorButton: "up" | "down";
91
+ scrolledOutside: boolean;
92
+ name: string | null;
93
+ isResizing: boolean;
94
+ isRotating: boolean;
95
+ zoom: import("../types").Zoom;
96
+ openMenu: "canvas" | null;
97
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
98
+ openSidebar: {
99
+ name: import("../types").SidebarName;
100
+ tab?: import("../types").SidebarTabName;
101
+ } | null;
102
+ openDialog: null | {
103
+ name: "imageExport" | "help" | "jsonExport";
104
+ } | {
105
+ name: "commandPalette";
106
+ } | {
107
+ name: "settings";
108
+ } | {
109
+ name: "elementLinkSelector";
110
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
111
+ } | {
112
+ name: "charts";
113
+ data: import("../charts").Spreadsheet;
114
+ rawText: string;
115
+ };
116
+ defaultSidebarDockedPreference: boolean;
117
+ lastPointerDownWith: import("@excalidraw/element/types").PointerType;
118
+ selectedElementIds: Readonly<{
119
+ [id: string]: true;
120
+ }>;
121
+ hoveredElementIds: Readonly<{
122
+ [id: string]: true;
123
+ }>;
124
+ previousSelectedElementIds: {
125
+ [id: string]: true;
126
+ };
127
+ selectedElementsAreBeingDragged: boolean;
128
+ shouldCacheIgnoreZoom: boolean;
129
+ toast: {
130
+ message: React.ReactNode;
131
+ closable?: boolean;
132
+ duration?: number;
133
+ } | null;
134
+ zenModeEnabled: boolean;
135
+ theme: import("@excalidraw/element/types").Theme;
136
+ gridSize: number;
137
+ gridStep: number;
138
+ gridModeEnabled: boolean;
139
+ viewModeEnabled: boolean;
140
+ selectedGroupIds: {
141
+ [groupId: string]: boolean;
142
+ };
143
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
144
+ width: number;
145
+ height: number;
146
+ offsetTop: number;
147
+ offsetLeft: number;
148
+ fileHandle: FileSystemFileHandle | null;
149
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
150
+ stats: {
151
+ open: boolean;
152
+ panels: number;
153
+ };
154
+ showHyperlinkPopup: false | "info" | "editor";
155
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
156
+ snapLines: readonly import("../snapping").SnapLine[];
157
+ originSnapOffset: {
158
+ x: number;
159
+ y: number;
160
+ } | null;
161
+ objectsSnapModeEnabled: boolean;
162
+ userToFollow: import("../types").UserToFollow | null;
163
+ followedBy: Set<import("../types").SocketId>;
164
+ isCropping: boolean;
165
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
166
+ searchMatches: Readonly<{
167
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
168
+ matches: readonly import("../types").SearchMatch[];
169
+ }> | null;
170
+ activeLockedId: string | null;
171
+ lockedMultiSelections: {
172
+ [groupId: string]: true;
173
+ };
174
+ bindMode: import("@excalidraw/element/types").BindMode;
175
+ };
176
+ captureUpdate: "NEVER";
177
+ };
178
+ checked: (appState: Readonly<import("../types").AppState>) => boolean;
179
+ } & {
180
+ keyTest?: undefined;
181
+ };
@@ -42,8 +42,13 @@ export declare const actionToggleGridMode: {
42
42
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
43
43
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
44
44
  isBindingEnabled: boolean;
45
+ bindingPreference: "enabled" | "disabled";
46
+ isMidpointSnappingEnabled: boolean;
45
47
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
46
- suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
48
+ suggestedBinding: {
49
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
50
+ midPoint?: import("@excalidraw/math").GlobalPoint;
51
+ } | null;
47
52
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
48
53
  frameRendering: {
49
54
  enabled: boolean;
@@ -53,7 +58,7 @@ export declare const actionToggleGridMode: {
53
58
  };
54
59
  editingFrame: string | null;
55
60
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
56
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
61
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
57
62
  activeTool: {
58
63
  lastActiveTool: import("../types").ActiveTool | null;
59
64
  locked: boolean;
@@ -108,6 +113,10 @@ export declare const actionToggleGridMode: {
108
113
  } | {
109
114
  name: "elementLinkSelector";
110
115
  sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
116
+ } | {
117
+ name: "charts";
118
+ data: import("../charts").Spreadsheet;
119
+ rawText: string;
111
120
  };
112
121
  defaultSidebarDockedPreference: boolean;
113
122
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
@@ -123,7 +132,7 @@ export declare const actionToggleGridMode: {
123
132
  selectedElementsAreBeingDragged: boolean;
124
133
  shouldCacheIgnoreZoom: boolean;
125
134
  toast: {
126
- message: string;
135
+ message: React.ReactNode;
127
136
  closable?: boolean;
128
137
  duration?: number;
129
138
  } | null;
@@ -140,20 +149,12 @@ export declare const actionToggleGridMode: {
140
149
  height: number;
141
150
  offsetTop: number;
142
151
  offsetLeft: number;
143
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
152
+ fileHandle: FileSystemFileHandle | null;
144
153
  collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
145
154
  stats: {
146
155
  open: boolean;
147
156
  panels: number;
148
157
  };
149
- currentChartType: import("@excalidraw/element/types").ChartType;
150
- pasteDialog: {
151
- shown: false;
152
- data: null;
153
- } | {
154
- shown: true;
155
- data: import("../charts").Spreadsheet;
156
- };
157
158
  showHyperlinkPopup: false | "info" | "editor";
158
159
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
159
160
  snapLines: readonly import("../snapping").SnapLine[];