@excalidraw/math 0.18.0-2874f9e → 0.18.0-2a82821
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.
- package/dist/dev/index.js +42 -8
- package/dist/dev/index.js.map +2 -2
- package/dist/prod/index.js +1 -1
- package/dist/types/common/src/appEventBus.d.ts +27 -0
- package/dist/types/common/src/colors.d.ts +2 -2
- package/dist/types/common/src/constants.d.ts +9 -7
- package/dist/types/common/src/index.d.ts +2 -0
- package/dist/types/common/src/utils.d.ts +1 -3
- package/dist/types/common/src/versionedSnapshotStore.d.ts +17 -0
- package/dist/types/element/src/Scene.d.ts +7 -3
- package/dist/types/element/src/arrowheads.d.ts +3 -0
- package/dist/types/element/src/binding.d.ts +3 -4
- package/dist/types/element/src/bounds.d.ts +22 -3
- package/dist/types/element/src/comparisons.d.ts +1 -0
- package/dist/types/element/src/duplicate.d.ts +1 -0
- package/dist/types/element/src/elbowArrow.d.ts +2 -0
- package/dist/types/element/src/frame.d.ts +7 -6
- package/dist/types/element/src/index.d.ts +1 -0
- package/dist/types/element/src/linearElementEditor.d.ts +5 -2
- package/dist/types/element/src/mutateElement.d.ts +2 -0
- package/dist/types/element/src/newElement.d.ts +1 -0
- package/dist/types/element/src/selection.d.ts +7 -3
- package/dist/types/element/src/shape.d.ts +1 -1
- package/dist/types/element/src/textElement.d.ts +1 -1
- package/dist/types/element/src/textWrapping.d.ts +26 -0
- package/dist/types/element/src/typeChecks.d.ts +1 -0
- package/dist/types/element/src/types.d.ts +11 -2
- package/dist/types/element/src/utils.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +35 -38
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +25 -27
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +144 -156
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +24 -26
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +12 -13
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +36 -39
- package/dist/types/excalidraw/actions/actionDeselect.d.ts +160 -0
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +8 -13
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +24 -26
- package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +12 -13
- package/dist/types/excalidraw/actions/actionExport.d.ts +67 -349
- package/dist/types/excalidraw/actions/actionFrame.d.ts +49 -52
- package/dist/types/excalidraw/actions/actionGroup.d.ts +25 -27
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +13 -13
- package/dist/types/excalidraw/actions/actionLink.d.ts +12 -13
- package/dist/types/excalidraw/actions/actionMenu.d.ts +8 -13
- package/dist/types/excalidraw/actions/actionProperties.d.ts +36 -29
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +12 -13
- package/dist/types/excalidraw/actions/actionStyles.d.ts +12 -12
- package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +3 -3
- package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +173 -0
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +12 -13
- package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +173 -0
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +12 -13
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +8 -13
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +12 -13
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +12 -13
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +12 -13
- package/dist/types/excalidraw/actions/index.d.ts +4 -1
- package/dist/types/excalidraw/actions/types.d.ts +1 -1
- package/dist/types/excalidraw/{animated-trail.d.ts → animatedTrail.d.ts} +4 -3
- package/dist/types/excalidraw/appState.d.ts +6 -2
- package/dist/types/excalidraw/charts/charts.bar.d.ts +2 -0
- package/dist/types/excalidraw/charts/charts.constants.d.ts +48 -0
- package/dist/types/excalidraw/charts/charts.helpers.d.ts +32 -0
- package/dist/types/excalidraw/charts/charts.line.d.ts +2 -0
- package/dist/types/excalidraw/charts/charts.parse.d.ts +10 -0
- package/dist/types/excalidraw/charts/charts.radar.d.ts +2 -0
- package/dist/types/excalidraw/charts/charts.types.d.ts +18 -0
- package/dist/types/excalidraw/charts/index.d.ts +7 -0
- package/dist/types/excalidraw/clipboard.d.ts +2 -5
- package/dist/types/excalidraw/components/ActiveConfirmDialog.d.ts +1 -1
- package/dist/types/excalidraw/components/App.d.ts +54 -14
- package/dist/types/excalidraw/components/AppStateObserver.d.ts +37 -0
- package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -1
- package/dist/types/excalidraw/components/CommandPalette/defaultCommandPaletteItems.d.ts +1 -2
- package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +1 -1
- package/dist/types/excalidraw/components/EyeDropper.d.ts +1 -1
- package/dist/types/excalidraw/components/IconPicker.d.ts +14 -9
- package/dist/types/excalidraw/components/LibraryMenu.d.ts +1 -1
- package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +1 -1
- package/dist/types/excalidraw/components/PasteChartDialog.d.ts +4 -5
- package/dist/types/excalidraw/components/Range.d.ts +10 -4
- package/dist/types/excalidraw/components/SVGLayer.d.ts +1 -1
- package/dist/types/excalidraw/components/SearchMenu.d.ts +1 -1
- package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +1 -1
- package/dist/types/excalidraw/components/TTDDialog/CodeMirrorEditor.d.ts +11 -0
- package/dist/types/excalidraw/components/TTDDialog/TTDContext.d.ts +4 -4
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +3 -3
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +4 -1
- package/dist/types/excalidraw/components/TTDDialog/mermaid-lang-lite.d.ts +2 -0
- package/dist/types/excalidraw/components/TTDDialog/useTTDChatStorage.d.ts +3 -3
- package/dist/types/excalidraw/components/TTDDialog/utils/mermaidAutoFix.d.ts +1 -0
- package/dist/types/excalidraw/components/TTDDialog/utils/mermaidError.d.ts +10 -0
- package/dist/types/excalidraw/components/Toast.d.ts +8 -4
- package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +2 -1
- package/dist/types/excalidraw/components/canvases/NewElementCanvas.d.ts +1 -0
- package/dist/types/excalidraw/components/canvases/StaticCanvas.d.ts +1 -1
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +2 -1
- package/dist/types/excalidraw/components/icons.d.ts +19 -8
- package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +9 -3
- package/dist/types/excalidraw/components/shapes.d.ts +7 -0
- package/dist/types/excalidraw/data/blob.d.ts +31 -34
- package/dist/types/excalidraw/data/filesystem.d.ts +3 -5
- package/dist/types/excalidraw/data/index.d.ts +2 -3
- package/dist/types/excalidraw/data/json.d.ts +30 -23
- package/dist/types/excalidraw/data/library.d.ts +1 -1
- package/dist/types/excalidraw/data/resave.d.ts +7 -2
- package/dist/types/excalidraw/eraser/index.d.ts +2 -3
- package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
- package/dist/types/excalidraw/{laser-trails.d.ts → laserTrails.d.ts} +5 -7
- package/dist/types/excalidraw/lasso/index.d.ts +2 -3
- package/dist/types/excalidraw/renderer/animation.d.ts +4 -1
- package/dist/types/excalidraw/scene/Renderer.d.ts +426 -19
- package/dist/types/excalidraw/scene/index.d.ts +1 -1
- package/dist/types/excalidraw/textAutoResizeHandle.d.ts +15 -0
- package/dist/types/excalidraw/types.d.ts +110 -18
- package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +5 -1
- package/dist/types/fractional-indexing/src/index.d.ts +29 -0
- package/dist/types/laser-pointer/src/index.d.ts +2 -0
- package/dist/types/laser-pointer/src/math.d.ts +16 -0
- package/dist/types/laser-pointer/src/simplify.d.ts +2 -0
- package/dist/types/laser-pointer/src/state.d.ts +35 -0
- package/dist/types/math/src/constants.d.ts +0 -1
- package/dist/types/math/src/curve.d.ts +4 -1
- package/dist/types/math/src/point.d.ts +2 -1
- package/dist/types/utils/src/index.d.ts +1 -2
- package/package.json +2 -2
- package/dist/types/excalidraw/animation-frame-handler.d.ts +0 -16
- package/dist/types/excalidraw/charts.d.ts +0 -27
- package/dist/types/excalidraw/components/DiagramToCodePlugin/DiagramToCodePlugin.d.ts +0 -4
- package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +0 -15
- package/dist/types/excalidraw/components/InitializeApp.d.ts +0 -10
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +0 -8
- package/dist/types/excalidraw/components/TTDDialog/utils/TTDStreamFetch.d.ts +0 -24
- package/dist/types/excalidraw/components/footer/FooterCenter.d.ts +0 -8
- package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -11
- package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +0 -58
- package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Hints.d.ts +0 -19
- package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +0 -84
- package/dist/types/excalidraw/data/reconcile.d.ts +0 -7
- package/dist/types/excalidraw/index.d.ts +0 -47
- package/dist/types/excalidraw/polyfill.d.ts +0 -2
- package/dist/types/utils/src/bbox.d.ts +0 -9
- package/dist/types/utils/src/withinBounds.d.ts +0 -19
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ExcalidrawElement, ExcalidrawLinearElement } from "@excalidraw/element/types";
|
|
1
|
+
import type { ExcalidrawElement, ExcalidrawLinearElement, ExcalidrawTextElement } from "@excalidraw/element/types";
|
|
2
2
|
import type { Mutable } from "@excalidraw/common/utility-types";
|
|
3
3
|
import type { AppState } from "../types";
|
|
4
4
|
export declare const actionUnbindText: {
|
|
@@ -46,7 +46,9 @@ export declare const actionBindText: {
|
|
|
46
46
|
multiElement: import("@excalidraw/element/types").NonDeleted<ExcalidrawLinearElement> | null;
|
|
47
47
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
48
48
|
isBindingEnabled: boolean;
|
|
49
|
-
|
|
49
|
+
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
50
|
+
bindingPreference: "enabled" | "disabled";
|
|
51
|
+
isMidpointSnappingEnabled: boolean;
|
|
50
52
|
suggestedBinding: {
|
|
51
53
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
52
54
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
@@ -60,7 +62,7 @@ export declare const actionBindText: {
|
|
|
60
62
|
};
|
|
61
63
|
editingFrame: string | null;
|
|
62
64
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
63
|
-
editingTextElement:
|
|
65
|
+
editingTextElement: ExcalidrawTextElement | null;
|
|
64
66
|
activeTool: {
|
|
65
67
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
66
68
|
locked: boolean;
|
|
@@ -79,9 +81,10 @@ export declare const actionBindText: {
|
|
|
79
81
|
currentItemStrokeColor: string;
|
|
80
82
|
currentItemBackgroundColor: string;
|
|
81
83
|
currentItemFillStyle: ExcalidrawElement["fillStyle"];
|
|
82
|
-
|
|
84
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
83
85
|
currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
|
|
84
86
|
currentItemRoughness: number;
|
|
87
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
85
88
|
currentItemOpacity: number;
|
|
86
89
|
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
87
90
|
currentItemFontSize: number;
|
|
@@ -118,6 +121,10 @@ export declare const actionBindText: {
|
|
|
118
121
|
} | {
|
|
119
122
|
name: "elementLinkSelector";
|
|
120
123
|
sourceElementId: ExcalidrawElement["id"];
|
|
124
|
+
} | {
|
|
125
|
+
name: "charts";
|
|
126
|
+
data: import("../charts").Spreadsheet;
|
|
127
|
+
rawText: string;
|
|
121
128
|
};
|
|
122
129
|
defaultSidebarDockedPreference: boolean;
|
|
123
130
|
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
@@ -130,7 +137,7 @@ export declare const actionBindText: {
|
|
|
130
137
|
selectedElementsAreBeingDragged: boolean;
|
|
131
138
|
shouldCacheIgnoreZoom: boolean;
|
|
132
139
|
toast: {
|
|
133
|
-
message:
|
|
140
|
+
message: React.ReactNode;
|
|
134
141
|
closable?: boolean;
|
|
135
142
|
duration?: number;
|
|
136
143
|
} | null;
|
|
@@ -148,20 +155,12 @@ export declare const actionBindText: {
|
|
|
148
155
|
height: number;
|
|
149
156
|
offsetTop: number;
|
|
150
157
|
offsetLeft: number;
|
|
151
|
-
fileHandle:
|
|
158
|
+
fileHandle: FileSystemFileHandle | null;
|
|
152
159
|
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
153
160
|
stats: {
|
|
154
161
|
open: boolean;
|
|
155
162
|
panels: number;
|
|
156
163
|
};
|
|
157
|
-
currentChartType: import("@excalidraw/element/types").ChartType;
|
|
158
|
-
pasteDialog: {
|
|
159
|
-
shown: false;
|
|
160
|
-
data: null;
|
|
161
|
-
} | {
|
|
162
|
-
shown: true;
|
|
163
|
-
data: import("../charts").Spreadsheet;
|
|
164
|
-
};
|
|
165
164
|
showHyperlinkPopup: false | "info" | "editor";
|
|
166
165
|
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
167
166
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
@@ -219,7 +218,9 @@ export declare const actionWrapTextInContainer: {
|
|
|
219
218
|
multiElement: import("@excalidraw/element/types").NonDeleted<ExcalidrawLinearElement> | null;
|
|
220
219
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
221
220
|
isBindingEnabled: boolean;
|
|
222
|
-
|
|
221
|
+
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
222
|
+
bindingPreference: "enabled" | "disabled";
|
|
223
|
+
isMidpointSnappingEnabled: boolean;
|
|
223
224
|
suggestedBinding: {
|
|
224
225
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
225
226
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
@@ -233,7 +234,7 @@ export declare const actionWrapTextInContainer: {
|
|
|
233
234
|
};
|
|
234
235
|
editingFrame: string | null;
|
|
235
236
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
236
|
-
editingTextElement:
|
|
237
|
+
editingTextElement: ExcalidrawTextElement | null;
|
|
237
238
|
activeTool: {
|
|
238
239
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
239
240
|
locked: boolean;
|
|
@@ -252,9 +253,10 @@ export declare const actionWrapTextInContainer: {
|
|
|
252
253
|
currentItemStrokeColor: string;
|
|
253
254
|
currentItemBackgroundColor: string;
|
|
254
255
|
currentItemFillStyle: ExcalidrawElement["fillStyle"];
|
|
255
|
-
|
|
256
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
256
257
|
currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
|
|
257
258
|
currentItemRoughness: number;
|
|
259
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
258
260
|
currentItemOpacity: number;
|
|
259
261
|
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
260
262
|
currentItemFontSize: number;
|
|
@@ -291,6 +293,10 @@ export declare const actionWrapTextInContainer: {
|
|
|
291
293
|
} | {
|
|
292
294
|
name: "elementLinkSelector";
|
|
293
295
|
sourceElementId: ExcalidrawElement["id"];
|
|
296
|
+
} | {
|
|
297
|
+
name: "charts";
|
|
298
|
+
data: import("../charts").Spreadsheet;
|
|
299
|
+
rawText: string;
|
|
294
300
|
};
|
|
295
301
|
defaultSidebarDockedPreference: boolean;
|
|
296
302
|
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
@@ -303,7 +309,7 @@ export declare const actionWrapTextInContainer: {
|
|
|
303
309
|
selectedElementsAreBeingDragged: boolean;
|
|
304
310
|
shouldCacheIgnoreZoom: boolean;
|
|
305
311
|
toast: {
|
|
306
|
-
message:
|
|
312
|
+
message: React.ReactNode;
|
|
307
313
|
closable?: boolean;
|
|
308
314
|
duration?: number;
|
|
309
315
|
} | null;
|
|
@@ -321,20 +327,12 @@ export declare const actionWrapTextInContainer: {
|
|
|
321
327
|
height: number;
|
|
322
328
|
offsetTop: number;
|
|
323
329
|
offsetLeft: number;
|
|
324
|
-
fileHandle:
|
|
330
|
+
fileHandle: FileSystemFileHandle | null;
|
|
325
331
|
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
326
332
|
stats: {
|
|
327
333
|
open: boolean;
|
|
328
334
|
panels: number;
|
|
329
335
|
};
|
|
330
|
-
currentChartType: import("@excalidraw/element/types").ChartType;
|
|
331
|
-
pasteDialog: {
|
|
332
|
-
shown: false;
|
|
333
|
-
data: null;
|
|
334
|
-
} | {
|
|
335
|
-
shown: true;
|
|
336
|
-
data: import("../charts").Spreadsheet;
|
|
337
|
-
};
|
|
338
336
|
showHyperlinkPopup: false | "info" | "editor";
|
|
339
337
|
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
340
338
|
snapLines: readonly import("../snapping").SnapLine[];
|