@zsviczian/excalidraw 0.18.0-53 → 0.18.0-54
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/excalidraw.development.js +50 -50
- package/dist/excalidraw.production.min.js +1 -1
- package/package.json +2 -2
- package/types/common/src/commonObsidianUtils.d.ts +6 -0
- package/types/common/src/constants.d.ts +1 -0
- package/types/common/src/editorInterface.d.ts +1 -1
- package/types/common/src/index.d.ts +1 -0
- package/types/common/src/utils.d.ts +7 -2
- package/types/common/src/visualdebug.d.ts +1 -1
- package/types/element/src/binding.d.ts +55 -44
- package/types/element/src/collision.d.ts +6 -2
- package/types/element/src/index.d.ts +0 -3
- package/types/element/src/linearElementEditor.d.ts +15 -18
- package/types/element/src/renderElement.d.ts +1 -1
- package/types/element/src/typeChecks.d.ts +2 -3
- package/types/element/src/types.d.ts +7 -11
- package/types/element/src/utils.d.ts +2 -1
- package/types/element/src/zindex.d.ts +7 -1
- package/types/excalidraw/actions/actionAddToLibrary.d.ts +16 -7
- package/types/excalidraw/actions/actionAlign.d.ts +6 -6
- package/types/excalidraw/actions/actionBoundText.d.ts +13 -7
- package/types/excalidraw/actions/actionCanvas.d.ts +91 -286
- package/types/excalidraw/actions/actionClipboard.d.ts +34 -941
- package/types/excalidraw/actions/actionCropEditor.d.ts +6 -3
- package/types/excalidraw/actions/actionDeleteSelected.d.ts +23 -16
- package/types/excalidraw/actions/actionDistribute.d.ts +2 -2
- package/types/excalidraw/actions/actionDuplicateSelection.d.ts +1 -1
- package/types/excalidraw/actions/actionElementLink.d.ts +4 -3
- package/types/excalidraw/actions/actionElementLock.d.ts +11 -5
- package/types/excalidraw/actions/actionEmbeddable.d.ts +6 -3
- package/types/excalidraw/actions/actionExport.d.ts +43 -1149
- package/types/excalidraw/actions/actionFinalize.d.ts +10 -688
- package/types/excalidraw/actions/actionFlip.d.ts +2 -2
- package/types/excalidraw/actions/actionFrame.d.ts +26 -16
- package/types/excalidraw/actions/actionGroup.d.ts +12 -6
- package/types/excalidraw/actions/actionLinearEditor.d.ts +15 -16
- package/types/excalidraw/actions/actionLink.d.ts +5 -2
- package/types/excalidraw/actions/actionMenu.d.ts +3 -2
- package/types/excalidraw/actions/actionNavigate.d.ts +21 -445
- package/types/excalidraw/actions/actionProperties.d.ts +79 -2968
- package/types/excalidraw/actions/actionSelectAll.d.ts +6 -3
- package/types/excalidraw/actions/actionStyles.d.ts +7 -4
- package/types/excalidraw/actions/actionTextAutoResize.d.ts +1 -1
- package/types/excalidraw/actions/actionToggleGridMode.d.ts +5 -2
- package/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +5 -2
- package/types/excalidraw/actions/actionToggleSearchMenu.d.ts +3 -2
- package/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +1 -1
- package/types/excalidraw/actions/actionToggleStats.d.ts +5 -2
- package/types/excalidraw/actions/actionToggleViewMode.d.ts +6 -3
- package/types/excalidraw/actions/actionToggleZenMode.d.ts +5 -2
- package/types/excalidraw/actions/actionTrayMenu.d.ts +5 -2
- package/types/excalidraw/actions/actionZindex.d.ts +2 -2
- package/types/excalidraw/actions/manager.d.ts +1 -1
- package/types/excalidraw/actions/register.d.ts +1 -1
- package/types/excalidraw/actions/types.d.ts +3 -3
- package/types/excalidraw/appState.d.ts +4 -3
- package/types/excalidraw/components/App.d.ts +7 -3
- package/types/excalidraw/components/CommandPalette/types.d.ts +1 -2
- package/types/excalidraw/components/Stats/utils.d.ts +1 -1
- package/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +1 -1
- package/types/excalidraw/data/restore.d.ts +3 -3
- package/types/excalidraw/index.d.ts +3 -3
- package/types/excalidraw/obsidianUtils.d.ts +0 -5
- package/types/excalidraw/renderer/helpers.d.ts +1 -5
- package/types/excalidraw/renderer/interactiveScene.d.ts +1 -1
- package/types/excalidraw/scene/types.d.ts +4 -0
- package/types/excalidraw/types.d.ts +15 -5
|
@@ -45,6 +45,10 @@ export type InteractiveCanvasRenderConfig = {
|
|
|
45
45
|
remotePointerUsernames: Map<SocketId, string>;
|
|
46
46
|
remotePointerButton: Map<SocketId, string | undefined>;
|
|
47
47
|
selectionColor: string;
|
|
48
|
+
lastViewportPosition: {
|
|
49
|
+
x: number;
|
|
50
|
+
y: number;
|
|
51
|
+
};
|
|
48
52
|
renderScrollbars?: boolean;
|
|
49
53
|
};
|
|
50
54
|
export type RenderInteractiveSceneCallback = {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { IMAGE_MIME_TYPES, UserIdleState, throttleRAF, MIME_TYPES, ColorPaletteCustom, EditorInterface } from "@excalidraw/common";
|
|
2
|
-
import type { SuggestedBinding } from "@excalidraw/element";
|
|
3
2
|
import type { LinearElementEditor } from "@excalidraw/element";
|
|
4
3
|
import type { MaybeTransformHandleType } from "@excalidraw/element";
|
|
5
|
-
import type { PointerType, ExcalidrawLinearElement, NonDeletedExcalidrawElement, NonDeleted, TextAlign, ExcalidrawElement, GroupId, ExcalidrawBindableElement, Arrowhead, ChartType, FontFamilyValues, ExcalidrawTextElement, FileId, Theme, StrokeRoundness, ExcalidrawEmbeddableElement, ExcalidrawMagicFrameElement, ExcalidrawFrameLikeElement, ExcalidrawElementType, ExcalidrawIframeLikeElement, OrderedExcalidrawElement, ExcalidrawNonSelectionElement } from "@excalidraw/element/types";
|
|
4
|
+
import type { PointerType, ExcalidrawLinearElement, NonDeletedExcalidrawElement, NonDeleted, TextAlign, ExcalidrawElement, GroupId, ExcalidrawBindableElement, Arrowhead, ChartType, FontFamilyValues, ExcalidrawTextElement, FileId, Theme, StrokeRoundness, ExcalidrawEmbeddableElement, ExcalidrawMagicFrameElement, ExcalidrawFrameLikeElement, ExcalidrawElementType, ExcalidrawIframeLikeElement, OrderedExcalidrawElement, ExcalidrawNonSelectionElement, BindMode } from "@excalidraw/element/types";
|
|
6
5
|
import type { Merge, MaybePromise, ValueOf, MakeBrand } from "@excalidraw/common/utility-types";
|
|
7
6
|
import type { CaptureUpdateActionType, DurableIncrement, EphemeralIncrement } from "@excalidraw/element";
|
|
8
7
|
import type { Action } from "./actions/types";
|
|
@@ -129,6 +128,7 @@ export type StaticCanvasAppState = Readonly<_CommonCanvasAppState & {
|
|
|
129
128
|
frameColor: AppState["frameColor"];
|
|
130
129
|
currentHoveredFontFamily: AppState["currentHoveredFontFamily"];
|
|
131
130
|
hoveredElementIds: AppState["hoveredElementIds"];
|
|
131
|
+
suggestedBinding: AppState["suggestedBinding"];
|
|
132
132
|
croppingElementId: AppState["croppingElementId"];
|
|
133
133
|
}>;
|
|
134
134
|
export type InteractiveCanvasAppState = Readonly<_CommonCanvasAppState & {
|
|
@@ -137,8 +137,9 @@ export type InteractiveCanvasAppState = Readonly<_CommonCanvasAppState & {
|
|
|
137
137
|
selectedGroupIds: AppState["selectedGroupIds"];
|
|
138
138
|
selectedLinearElement: AppState["selectedLinearElement"];
|
|
139
139
|
multiElement: AppState["multiElement"];
|
|
140
|
+
newElement: AppState["newElement"];
|
|
140
141
|
isBindingEnabled: AppState["isBindingEnabled"];
|
|
141
|
-
|
|
142
|
+
suggestedBinding: AppState["suggestedBinding"];
|
|
142
143
|
isRotating: AppState["isRotating"];
|
|
143
144
|
elementsToHighlight: AppState["elementsToHighlight"];
|
|
144
145
|
collaborators: AppState["collaborators"];
|
|
@@ -152,6 +153,11 @@ export type InteractiveCanvasAppState = Readonly<_CommonCanvasAppState & {
|
|
|
152
153
|
croppingElementId: AppState["croppingElementId"];
|
|
153
154
|
searchMatches: AppState["searchMatches"];
|
|
154
155
|
activeLockedId: AppState["activeLockedId"];
|
|
156
|
+
hoveredElementIds: AppState["hoveredElementIds"];
|
|
157
|
+
frameRendering: AppState["frameRendering"];
|
|
158
|
+
frameColor: AppState["frameColor"];
|
|
159
|
+
shouldCacheIgnoreZoom: AppState["shouldCacheIgnoreZoom"];
|
|
160
|
+
exportScale: AppState["exportScale"];
|
|
155
161
|
}>;
|
|
156
162
|
export type ObservedAppState = ObservedStandaloneAppState & ObservedElementsAppState;
|
|
157
163
|
export type ObservedStandaloneAppState = {
|
|
@@ -205,7 +211,7 @@ export interface AppState {
|
|
|
205
211
|
selectionElement: NonDeletedExcalidrawElement | null;
|
|
206
212
|
isBindingEnabled: boolean;
|
|
207
213
|
startBoundElement: NonDeleted<ExcalidrawBindableElement> | null;
|
|
208
|
-
|
|
214
|
+
suggestedBinding: NonDeleted<ExcalidrawBindableElement> | null;
|
|
209
215
|
frameToHighlight: NonDeleted<ExcalidrawFrameLikeElement> | null;
|
|
210
216
|
frameRendering: {
|
|
211
217
|
enabled: boolean;
|
|
@@ -278,6 +284,8 @@ export interface AppState {
|
|
|
278
284
|
tab: "text-to-diagram" | "mermaid";
|
|
279
285
|
} | {
|
|
280
286
|
name: "commandPalette";
|
|
287
|
+
} | {
|
|
288
|
+
name: "settings";
|
|
281
289
|
} | {
|
|
282
290
|
name: "elementLinkSelector";
|
|
283
291
|
sourceElementId: ExcalidrawElement["id"];
|
|
@@ -401,6 +409,7 @@ export interface AppState {
|
|
|
401
409
|
lockedMultiSelections: {
|
|
402
410
|
[groupId: string]: true;
|
|
403
411
|
};
|
|
412
|
+
bindMode: BindMode;
|
|
404
413
|
}
|
|
405
414
|
export type SearchMatch = {
|
|
406
415
|
id: string;
|
|
@@ -413,7 +422,7 @@ export type SearchMatch = {
|
|
|
413
422
|
showOnCanvas: boolean;
|
|
414
423
|
}[];
|
|
415
424
|
};
|
|
416
|
-
export type UIAppState = Omit<AppState, "
|
|
425
|
+
export type UIAppState = Omit<AppState, "suggestedBinding" | "startBoundElement" | "cursorButton" | "scrollX" | "scrollY">;
|
|
417
426
|
export type NormalizedZoomValue = number & {
|
|
418
427
|
_brand: "normalizedZoom";
|
|
419
428
|
};
|
|
@@ -632,6 +641,7 @@ export type AppClassProperties = {
|
|
|
632
641
|
onPointerUpEmitter: App["onPointerUpEmitter"];
|
|
633
642
|
updateEditorAtom: App["updateEditorAtom"];
|
|
634
643
|
onPointerDownEmitter: App["onPointerDownEmitter"];
|
|
644
|
+
bindModeHandler: App["bindModeHandler"];
|
|
635
645
|
};
|
|
636
646
|
export type PointerDownState = Readonly<{
|
|
637
647
|
origin: Readonly<{
|