@myoc/math 0.19.502-ff5a131b0 → 0.19.504

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 (122) 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/arrange-algorithms/maxRects.d.ts +16 -0
  13. package/dist/types/element/src/arrowheads.d.ts +3 -0
  14. package/dist/types/element/src/arrows/focus.d.ts +27 -0
  15. package/dist/types/element/src/arrows/helpers.d.ts +5 -0
  16. package/dist/types/element/src/binding.d.ts +13 -8
  17. package/dist/types/element/src/bounds.d.ts +1 -1
  18. package/dist/types/element/src/collision.d.ts +4 -3
  19. package/dist/types/element/src/distribute.d.ts +2 -1
  20. package/dist/types/element/src/elbowArrow.d.ts +2 -0
  21. package/dist/types/element/src/index.d.ts +4 -0
  22. package/dist/types/element/src/linearElementEditor.d.ts +6 -1
  23. package/dist/types/element/src/mutateElement.d.ts +2 -0
  24. package/dist/types/element/src/selection.d.ts +5 -1
  25. package/dist/types/element/src/shapes.d.ts +2 -22
  26. package/dist/types/element/src/textElement.d.ts +1 -1
  27. package/dist/types/element/src/textWrapping.d.ts +26 -0
  28. package/dist/types/element/src/types.d.ts +6 -3
  29. package/dist/types/element/src/utils.d.ts +5 -3
  30. package/dist/types/element/src/zindex.d.ts +1 -1
  31. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +38 -35
  32. package/dist/types/excalidraw/actions/actionAlign.d.ts +8 -8
  33. package/dist/types/excalidraw/actions/actionArrange.d.ts +2 -2
  34. package/dist/types/excalidraw/actions/actionBoundText.d.ts +27 -25
  35. package/dist/types/excalidraw/actions/actionCanvas.d.ts +159 -148
  36. package/dist/types/excalidraw/actions/actionClipboard.d.ts +28 -26
  37. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +13 -12
  38. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +43 -38
  39. package/dist/types/excalidraw/actions/actionDistribute.d.ts +4 -4
  40. package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +2 -2
  41. package/dist/types/excalidraw/actions/actionElementLink.d.ts +9 -12
  42. package/dist/types/excalidraw/actions/actionElementLock.d.ts +28 -26
  43. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +13 -12
  44. package/dist/types/excalidraw/actions/actionExport.d.ts +87 -380
  45. package/dist/types/excalidraw/actions/actionFlip.d.ts +4 -4
  46. package/dist/types/excalidraw/actions/actionFrame.d.ts +54 -50
  47. package/dist/types/excalidraw/actions/actionGroup.d.ts +31 -29
  48. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +15 -12
  49. package/dist/types/excalidraw/actions/actionLink.d.ts +15 -14
  50. package/dist/types/excalidraw/actions/actionMenu.d.ts +11 -14
  51. package/dist/types/excalidraw/actions/actionProperties.d.ts +33 -31
  52. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +16 -15
  53. package/dist/types/excalidraw/actions/actionSmartZoom.d.ts +2 -2
  54. package/dist/types/excalidraw/actions/actionStyles.d.ts +17 -15
  55. package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +3 -3
  56. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +181 -0
  57. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +15 -14
  58. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +181 -0
  59. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +15 -14
  60. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +11 -14
  61. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +15 -14
  62. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +15 -14
  63. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +15 -14
  64. package/dist/types/excalidraw/actions/actionZindex.d.ts +8 -8
  65. package/dist/types/excalidraw/actions/index.d.ts +2 -0
  66. package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
  67. package/dist/types/excalidraw/actions/types.d.ts +1 -1
  68. package/dist/types/excalidraw/appState.d.ts +15 -13
  69. package/dist/types/excalidraw/charts/charts.bar.d.ts +2 -0
  70. package/dist/types/excalidraw/charts/charts.constants.d.ts +48 -0
  71. package/dist/types/excalidraw/charts/charts.helpers.d.ts +32 -0
  72. package/dist/types/excalidraw/charts/charts.line.d.ts +2 -0
  73. package/dist/types/excalidraw/charts/charts.parse.d.ts +10 -0
  74. package/dist/types/excalidraw/charts/charts.radar.d.ts +2 -0
  75. package/dist/types/excalidraw/charts/charts.types.d.ts +18 -0
  76. package/dist/types/excalidraw/charts/index.d.ts +7 -0
  77. package/dist/types/excalidraw/clipboard.d.ts +6 -7
  78. package/dist/types/excalidraw/components/App.d.ts +57 -14
  79. package/dist/types/excalidraw/components/AppStateObserver.d.ts +37 -0
  80. package/dist/types/excalidraw/components/CommandPalette/types.d.ts +1 -1
  81. package/dist/types/excalidraw/components/IconPicker.d.ts +14 -9
  82. package/dist/types/excalidraw/components/PasteChartDialog.d.ts +4 -5
  83. package/dist/types/excalidraw/components/PropertiesPopover.d.ts +1 -1
  84. package/dist/types/excalidraw/components/Range.d.ts +10 -4
  85. package/dist/types/excalidraw/components/Toast.d.ts +8 -4
  86. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +1 -0
  87. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +30 -17
  88. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +3 -2
  89. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +11 -13
  90. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCheckbox.d.ts +5 -0
  91. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSub.d.ts +23 -0
  92. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubContent.d.ts +8 -0
  93. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubTrigger.d.ts +12 -0
  94. package/dist/types/excalidraw/components/dropdownMenu/common.d.ts +1 -1
  95. package/dist/types/excalidraw/components/dropdownMenu/dropdownMenuUtils.d.ts +2 -0
  96. package/dist/types/excalidraw/components/icons.d.ts +23 -9
  97. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +17 -0
  98. package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +23 -13
  99. package/dist/types/excalidraw/data/blob.d.ts +57 -56
  100. package/dist/types/excalidraw/data/filesystem.d.ts +3 -5
  101. package/dist/types/excalidraw/data/index.d.ts +2 -3
  102. package/dist/types/excalidraw/data/json.d.ts +43 -34
  103. package/dist/types/excalidraw/data/resave.d.ts +7 -2
  104. package/dist/types/excalidraw/editorPreferences.d.ts +11 -0
  105. package/dist/types/excalidraw/textAutoResizeHandle.d.ts +15 -0
  106. package/dist/types/excalidraw/types.d.ts +114 -16
  107. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +5 -1
  108. package/dist/types/math/src/point.d.ts +7 -2
  109. package/dist/types/math/src/types.d.ts +25 -1
  110. package/package.json +2 -2
  111. package/dist/types/excalidraw/charts.d.ts +0 -27
  112. package/dist/types/excalidraw/components/DiagramToCodePlugin/DiagramToCodePlugin.d.ts +0 -4
  113. package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +0 -15
  114. package/dist/types/excalidraw/components/InitializeApp.d.ts +0 -10
  115. package/dist/types/excalidraw/components/footer/FooterCenter.d.ts +0 -8
  116. package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -11
  117. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +0 -58
  118. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Hints.d.ts +0 -19
  119. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +0 -84
  120. package/dist/types/excalidraw/data/reconcile.d.ts +0 -7
  121. package/dist/types/excalidraw/index.d.ts +0 -42
  122. package/dist/types/excalidraw/polyfill.d.ts +0 -2
@@ -51,8 +51,13 @@ export declare const actionToggleElementLock: {
51
51
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
52
52
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
53
53
  isBindingEnabled: boolean;
54
+ bindingPreference: "enabled" | "disabled";
55
+ isMidpointSnappingEnabled: boolean;
54
56
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
55
- suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
57
+ suggestedBinding: {
58
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
59
+ midPoint?: import("@excalidraw/math").GlobalPoint;
60
+ } | null;
56
61
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
57
62
  frameRendering: {
58
63
  enabled: boolean;
@@ -62,7 +67,7 @@ export declare const actionToggleElementLock: {
62
67
  };
63
68
  editingFrame: string | null;
64
69
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
65
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
70
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
66
71
  activeTool: {
67
72
  lastActiveTool: import("../types").ActiveTool | null;
68
73
  locked: boolean;
@@ -117,6 +122,10 @@ export declare const actionToggleElementLock: {
117
122
  } | {
118
123
  name: "elementLinkSelector";
119
124
  sourceElementId: ExcalidrawElement["id"];
125
+ } | {
126
+ name: "charts";
127
+ data: import("../charts").Spreadsheet;
128
+ rawText: string;
120
129
  };
121
130
  defaultSidebarDockedPreference: boolean;
122
131
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
@@ -129,7 +138,7 @@ export declare const actionToggleElementLock: {
129
138
  selectedElementsAreBeingDragged: boolean;
130
139
  shouldCacheIgnoreZoom: boolean;
131
140
  toast: {
132
- message: string;
141
+ message: React.ReactNode;
133
142
  closable?: boolean;
134
143
  duration?: number;
135
144
  } | null;
@@ -144,20 +153,12 @@ export declare const actionToggleElementLock: {
144
153
  height: number;
145
154
  offsetTop: number;
146
155
  offsetLeft: number;
147
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
156
+ fileHandle: FileSystemFileHandle | null;
148
157
  collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
149
158
  stats: {
150
159
  open: boolean;
151
160
  panels: number;
152
161
  };
153
- currentChartType: import("@excalidraw/element/types").ChartType;
154
- pasteDialog: {
155
- shown: false;
156
- data: null;
157
- } | {
158
- shown: true;
159
- data: import("../charts").Spreadsheet;
160
- };
161
162
  showHyperlinkPopup: false | "info" | "editor";
162
163
  snapLines: readonly import("../snapping").SnapLine[];
163
164
  originSnapOffset: {
@@ -177,9 +178,9 @@ export declare const actionToggleElementLock: {
177
178
  };
178
179
  captureUpdate: "IMMEDIATELY";
179
180
  };
180
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState, elements: readonly ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean;
181
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean;
181
182
  } & {
182
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState, elements: readonly ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
183
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
183
184
  };
184
185
  export declare const actionUnlockAllElements: {
185
186
  name: "unlockAllElements";
@@ -229,8 +230,13 @@ export declare const actionUnlockAllElements: {
229
230
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
230
231
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
231
232
  isBindingEnabled: boolean;
233
+ bindingPreference: "enabled" | "disabled";
234
+ isMidpointSnappingEnabled: boolean;
232
235
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
233
- suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
236
+ suggestedBinding: {
237
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
238
+ midPoint?: import("@excalidraw/math").GlobalPoint;
239
+ } | null;
234
240
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
235
241
  frameRendering: {
236
242
  enabled: boolean;
@@ -240,7 +246,7 @@ export declare const actionUnlockAllElements: {
240
246
  };
241
247
  editingFrame: string | null;
242
248
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
243
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
249
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
244
250
  activeTool: {
245
251
  lastActiveTool: import("../types").ActiveTool | null;
246
252
  locked: boolean;
@@ -295,6 +301,10 @@ export declare const actionUnlockAllElements: {
295
301
  } | {
296
302
  name: "elementLinkSelector";
297
303
  sourceElementId: ExcalidrawElement["id"];
304
+ } | {
305
+ name: "charts";
306
+ data: import("../charts").Spreadsheet;
307
+ rawText: string;
298
308
  };
299
309
  defaultSidebarDockedPreference: boolean;
300
310
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
@@ -307,7 +317,7 @@ export declare const actionUnlockAllElements: {
307
317
  selectedElementsAreBeingDragged: boolean;
308
318
  shouldCacheIgnoreZoom: boolean;
309
319
  toast: {
310
- message: string;
320
+ message: React.ReactNode;
311
321
  closable?: boolean;
312
322
  duration?: number;
313
323
  } | null;
@@ -322,20 +332,12 @@ export declare const actionUnlockAllElements: {
322
332
  height: number;
323
333
  offsetTop: number;
324
334
  offsetLeft: number;
325
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
335
+ fileHandle: FileSystemFileHandle | null;
326
336
  collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
327
337
  stats: {
328
338
  open: boolean;
329
339
  panels: number;
330
340
  };
331
- currentChartType: import("@excalidraw/element/types").ChartType;
332
- pasteDialog: {
333
- shown: false;
334
- data: null;
335
- } | {
336
- shown: true;
337
- data: import("../charts").Spreadsheet;
338
- };
339
341
  showHyperlinkPopup: false | "info" | "editor";
340
342
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
341
343
  snapLines: readonly import("../snapping").SnapLine[];
@@ -42,8 +42,13 @@ export declare const actionSetEmbeddableAsActiveTool: {
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 actionSetEmbeddableAsActiveTool: {
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
  preferredSelectionTool: {
58
63
  type: "selection" | "lasso";
59
64
  initialized: boolean;
@@ -103,6 +108,10 @@ export declare const actionSetEmbeddableAsActiveTool: {
103
108
  } | {
104
109
  name: "elementLinkSelector";
105
110
  sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
111
+ } | {
112
+ name: "charts";
113
+ data: import("../charts").Spreadsheet;
114
+ rawText: string;
106
115
  };
107
116
  defaultSidebarDockedPreference: boolean;
108
117
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
@@ -118,7 +127,7 @@ export declare const actionSetEmbeddableAsActiveTool: {
118
127
  selectedElementsAreBeingDragged: boolean;
119
128
  shouldCacheIgnoreZoom: boolean;
120
129
  toast: {
121
- message: string;
130
+ message: React.ReactNode;
122
131
  closable?: boolean;
123
132
  duration?: number;
124
133
  } | null;
@@ -136,20 +145,12 @@ export declare const actionSetEmbeddableAsActiveTool: {
136
145
  height: number;
137
146
  offsetTop: number;
138
147
  offsetLeft: number;
139
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
148
+ fileHandle: FileSystemFileHandle | null;
140
149
  collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
141
150
  stats: {
142
151
  open: boolean;
143
152
  panels: number;
144
153
  };
145
- currentChartType: import("@excalidraw/element/types").ChartType;
146
- pasteDialog: {
147
- shown: false;
148
- data: null;
149
- } | {
150
- shown: true;
151
- data: import("../charts").Spreadsheet;
152
- };
153
154
  showHyperlinkPopup: false | "info" | "editor";
154
155
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
155
156
  snapLines: readonly import("../snapping").SnapLine[];