@myoc/excalidraw 0.19.536 → 0.19.539
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/CHANGELOG.md +105 -1
- package/dist/dev/{chunk-SKCAT7JG.js → chunk-2OVHIH4L.js} +4 -1
- package/dist/dev/chunk-2OVHIH4L.js.map +7 -0
- package/dist/dev/{chunk-E5FRZJMM.js → chunk-HJ2ALDN7.js} +34 -6
- package/dist/dev/chunk-HJ2ALDN7.js.map +7 -0
- package/dist/dev/{chunk-GMDJS52C.js → chunk-IJ2BHUZB.js} +2 -2
- package/dist/dev/data/{image-ADOTOLKB.js → image-2GHT4EI2.js} +3 -3
- package/dist/dev/index.css +115 -93
- package/dist/dev/index.css.map +3 -3
- package/dist/dev/index.js +1302 -1241
- package/dist/dev/index.js.map +4 -4
- package/dist/dev/locales/{en-RETPDZ4S.js → en-JINXO2V2.js} +2 -2
- package/dist/dev/subset-shared.chunk.js +1 -1
- package/dist/dev/subset-worker.chunk.js +1 -1
- package/dist/prod/chunk-5VYFU2RO.js +4 -0
- package/dist/prod/{chunk-DARW3V66.js → chunk-KGIBYNMP.js} +3 -3
- package/dist/prod/{chunk-U2M5DXIZ.js → chunk-U2CW5GZO.js} +1 -1
- package/dist/prod/data/image-VJFP4SPS.js +1 -0
- package/dist/prod/index.css +1 -1
- package/dist/prod/index.js +16 -16
- package/dist/prod/locales/{en-RNZ7CUK6.js → en-2ZA2LKRK.js} +1 -1
- package/dist/prod/subset-shared.chunk.js +1 -1
- package/dist/prod/subset-worker.chunk.js +1 -1
- package/dist/types/common/src/utils.d.ts +15 -12
- package/dist/types/element/src/align.d.ts +5 -1
- package/dist/types/excalidraw/actions/actionAlign.d.ts +192 -0
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +8 -0
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +24 -0
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +8 -0
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +4 -0
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +12 -0
- package/dist/types/excalidraw/actions/actionDeselect.d.ts +4 -1
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +4 -0
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +8 -1
- package/dist/types/excalidraw/actions/actionExport.d.ts +8 -0
- package/dist/types/excalidraw/actions/actionFlipViewpoint.d.ts +43 -0
- package/dist/types/excalidraw/actions/actionFrame.d.ts +12 -0
- package/dist/types/excalidraw/actions/actionGroup.d.ts +8 -0
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +4 -0
- package/dist/types/excalidraw/actions/actionLink.d.ts +4 -0
- package/dist/types/excalidraw/actions/actionMenu.d.ts +4 -0
- package/dist/types/excalidraw/actions/actionProperties.d.ts +8 -0
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +4 -0
- package/dist/types/excalidraw/actions/actionStyles.d.ts +4 -0
- package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +4 -0
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +4 -0
- package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +4 -0
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +4 -0
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +4 -0
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +4 -0
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +4 -0
- package/dist/types/excalidraw/actions/index.d.ts +2 -1
- package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
- package/dist/types/excalidraw/actions/types.d.ts +1 -3
- package/dist/types/excalidraw/appState.d.ts +3 -0
- package/dist/types/excalidraw/components/App.d.ts +0 -1
- package/dist/types/excalidraw/components/Tools.d.ts +0 -1
- package/dist/types/excalidraw/data/blob.d.ts +4 -0
- package/dist/types/excalidraw/data/json.d.ts +4 -0
- package/dist/types/excalidraw/editorPreferences.d.ts +5 -2
- package/dist/types/excalidraw/index.d.ts +1 -2
- package/dist/types/excalidraw/renderer/viewpoint.d.ts +8 -0
- package/dist/types/excalidraw/types.d.ts +12 -7
- package/dist/types/excalidraw/viewport.d.ts +4 -0
- package/package.json +4 -4
- package/dist/dev/chunk-E5FRZJMM.js.map +0 -7
- package/dist/dev/chunk-SKCAT7JG.js.map +0 -7
- package/dist/prod/chunk-HIDXO6YX.js +0 -4
- package/dist/prod/data/image-PXICHQZX.js +0 -1
- package/dist/types/excalidraw/keyboardShortcuts.d.ts +0 -27
- /package/dist/dev/{chunk-GMDJS52C.js.map → chunk-IJ2BHUZB.js.map} +0 -0
- /package/dist/dev/data/{image-ADOTOLKB.js.map → image-2GHT4EI2.js.map} +0 -0
- /package/dist/dev/locales/{en-RETPDZ4S.js.map → en-JINXO2V2.js.map} +0 -0
|
@@ -59,6 +59,10 @@ export declare const actionDecreaseFontSize: {
|
|
|
59
59
|
dontResizeLimitMBs: number;
|
|
60
60
|
hideMainMenus: boolean;
|
|
61
61
|
wheelZoomsOnDefault?: boolean;
|
|
62
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
63
|
+
alignConfiguration: {
|
|
64
|
+
stacking: boolean;
|
|
65
|
+
};
|
|
62
66
|
arrangeConfiguration: {
|
|
63
67
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
64
68
|
gap: number;
|
|
@@ -246,6 +250,10 @@ export declare const actionIncreaseFontSize: {
|
|
|
246
250
|
dontResizeLimitMBs: number;
|
|
247
251
|
hideMainMenus: boolean;
|
|
248
252
|
wheelZoomsOnDefault?: boolean;
|
|
253
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
254
|
+
alignConfiguration: {
|
|
255
|
+
stacking: boolean;
|
|
256
|
+
};
|
|
249
257
|
arrangeConfiguration: {
|
|
250
258
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
251
259
|
gap: number;
|
|
@@ -25,6 +25,10 @@ export declare const actionSelectAll: {
|
|
|
25
25
|
dontResizeLimitMBs: number;
|
|
26
26
|
hideMainMenus: boolean;
|
|
27
27
|
wheelZoomsOnDefault?: boolean;
|
|
28
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
29
|
+
alignConfiguration: {
|
|
30
|
+
stacking: boolean;
|
|
31
|
+
};
|
|
28
32
|
arrangeConfiguration: {
|
|
29
33
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
30
34
|
gap: number;
|
|
@@ -23,6 +23,10 @@ export declare const actionCopyStyles: {
|
|
|
23
23
|
dontResizeLimitMBs: number;
|
|
24
24
|
hideMainMenus: boolean;
|
|
25
25
|
wheelZoomsOnDefault?: boolean;
|
|
26
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
27
|
+
alignConfiguration: {
|
|
28
|
+
stacking: boolean;
|
|
29
|
+
};
|
|
26
30
|
arrangeConfiguration: {
|
|
27
31
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
28
32
|
gap: number;
|
|
@@ -21,6 +21,10 @@ export declare const actionToggleArrowBinding: {
|
|
|
21
21
|
dontResizeLimitMBs: number;
|
|
22
22
|
hideMainMenus: boolean;
|
|
23
23
|
wheelZoomsOnDefault?: boolean;
|
|
24
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
25
|
+
alignConfiguration: {
|
|
26
|
+
stacking: boolean;
|
|
27
|
+
};
|
|
24
28
|
arrangeConfiguration: {
|
|
25
29
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
26
30
|
gap: number;
|
|
@@ -23,6 +23,10 @@ export declare const actionToggleGridMode: {
|
|
|
23
23
|
dontResizeLimitMBs: number;
|
|
24
24
|
hideMainMenus: boolean;
|
|
25
25
|
wheelZoomsOnDefault?: boolean;
|
|
26
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
27
|
+
alignConfiguration: {
|
|
28
|
+
stacking: boolean;
|
|
29
|
+
};
|
|
26
30
|
arrangeConfiguration: {
|
|
27
31
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
28
32
|
gap: number;
|
|
@@ -20,6 +20,10 @@ export declare const actionToggleMidpointSnapping: {
|
|
|
20
20
|
dontResizeLimitMBs: number;
|
|
21
21
|
hideMainMenus: boolean;
|
|
22
22
|
wheelZoomsOnDefault?: boolean;
|
|
23
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
24
|
+
alignConfiguration: {
|
|
25
|
+
stacking: boolean;
|
|
26
|
+
};
|
|
23
27
|
arrangeConfiguration: {
|
|
24
28
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
25
29
|
gap: number;
|
|
@@ -22,6 +22,10 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
22
22
|
dontResizeLimitMBs: number;
|
|
23
23
|
hideMainMenus: boolean;
|
|
24
24
|
wheelZoomsOnDefault?: boolean;
|
|
25
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
26
|
+
alignConfiguration: {
|
|
27
|
+
stacking: boolean;
|
|
28
|
+
};
|
|
25
29
|
arrangeConfiguration: {
|
|
26
30
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
27
31
|
gap: number;
|
|
@@ -27,6 +27,10 @@ export declare const actionToggleSearchMenu: {
|
|
|
27
27
|
dontResizeLimitMBs: number;
|
|
28
28
|
hideMainMenus: boolean;
|
|
29
29
|
wheelZoomsOnDefault?: boolean;
|
|
30
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
31
|
+
alignConfiguration: {
|
|
32
|
+
stacking: boolean;
|
|
33
|
+
};
|
|
30
34
|
arrangeConfiguration: {
|
|
31
35
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
32
36
|
gap: number;
|
|
@@ -24,6 +24,10 @@ export declare const actionToggleStats: {
|
|
|
24
24
|
dontResizeLimitMBs: number;
|
|
25
25
|
hideMainMenus: boolean;
|
|
26
26
|
wheelZoomsOnDefault?: boolean;
|
|
27
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
28
|
+
alignConfiguration: {
|
|
29
|
+
stacking: boolean;
|
|
30
|
+
};
|
|
27
31
|
arrangeConfiguration: {
|
|
28
32
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
29
33
|
gap: number;
|
|
@@ -21,6 +21,10 @@ export declare const actionToggleViewMode: {
|
|
|
21
21
|
dontResizeLimitMBs: number;
|
|
22
22
|
hideMainMenus: boolean;
|
|
23
23
|
wheelZoomsOnDefault?: boolean;
|
|
24
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
25
|
+
alignConfiguration: {
|
|
26
|
+
stacking: boolean;
|
|
27
|
+
};
|
|
24
28
|
arrangeConfiguration: {
|
|
25
29
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
26
30
|
gap: number;
|
|
@@ -11,11 +11,12 @@ export { actionCopyStyles, actionPasteStyles } from "./actionStyles";
|
|
|
11
11
|
export { actionShortcuts } from "./actionMenu";
|
|
12
12
|
export { actionGroup, actionUngroup } from "./actionGroup";
|
|
13
13
|
export { actionGoToCollaborator } from "./actionNavigate";
|
|
14
|
-
export { actionAlignTop, actionAlignBottom, actionAlignLeft, actionAlignRight, actionAlignVerticallyCentered, actionAlignHorizontallyCentered, } from "./actionAlign";
|
|
14
|
+
export { actionAlignTop, actionAlignBottom, actionAlignLeft, actionAlignRight, actionAlignVerticallyCentered, actionAlignHorizontallyCentered, actionToggleAlignStacking, } from "./actionAlign";
|
|
15
15
|
export { distributeHorizontally, distributeVertically, } from "./actionDistribute";
|
|
16
16
|
export { actionArrangeElements } from "./actionArrange";
|
|
17
17
|
export { actionNormaliseElements } from "./actionNormalise";
|
|
18
18
|
export { actionFlipHorizontal, actionFlipVertical } from "./actionFlip";
|
|
19
|
+
export { actionFlipViewpointHorizontal, actionFlipViewpointVertical, } from "./actionFlipViewpoint";
|
|
19
20
|
export { actionCopy, actionCut, actionCopyAsPng, actionCopyAsSvg, copyText, } from "./actionClipboard";
|
|
20
21
|
export { actionToggleGridMode } from "./actionToggleGridMode";
|
|
21
22
|
export { actionSmartZoom } from "./actionSmartZoom";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { SubtypeOf } from "@excalidraw/common/utility-types";
|
|
2
2
|
import type { ActionName } from "./types";
|
|
3
|
-
export type ShortcutName = SubtypeOf<ActionName, "toggleTheme" | "loadScene" | "cut" | "copy" | "paste" | "copyStyles" | "pasteStyles" | "selectAll" | "deleteSelectedElements" | "duplicateSelection" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyAsPng" | "group" | "ungroup" | "gridMode" | "objectsSnapMode" | "stats" | "viewMode" | "flipHorizontal" | "flipVertical" | "hyperlink" | "toggleElementLock" | "resetZoom" | "zoomOut" | "zoomIn" | "zoomToFit" | "zoomToFitSelectionInViewport" | "zoomToFitSelection" | "smartZoom" | "saveFileToDisk" | "saveToActiveFile" | "toggleShortcuts" | "wrapSelectionInFrame" | "arrangeElements"> | "saveScene" | "imageExport" | "searchMenu" | "toolLock";
|
|
3
|
+
export type ShortcutName = SubtypeOf<ActionName, "toggleTheme" | "loadScene" | "cut" | "copy" | "paste" | "copyStyles" | "pasteStyles" | "selectAll" | "deleteSelectedElements" | "duplicateSelection" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyAsPng" | "group" | "ungroup" | "gridMode" | "objectsSnapMode" | "stats" | "viewMode" | "flipHorizontal" | "flipVertical" | "flipViewpointHorizontal" | "flipViewpointVertical" | "hyperlink" | "toggleElementLock" | "resetZoom" | "zoomOut" | "zoomIn" | "zoomToFit" | "zoomToFitSelectionInViewport" | "zoomToFitSelection" | "smartZoom" | "saveFileToDisk" | "saveToActiveFile" | "toggleShortcuts" | "wrapSelectionInFrame" | "arrangeElements"> | "saveScene" | "imageExport" | "searchMenu" | "toolLock";
|
|
4
4
|
export declare const getShortcutFromShortcutName: (name: ShortcutName, idx?: number) => string;
|
|
@@ -14,7 +14,7 @@ export type ActionResult = {
|
|
|
14
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
|
-
export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "objectsSnapMode" | "arrowBinding" | "midpointSnapping" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeBucketFillBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeSloppiness" | "changeFreedrawMode" | "changeStrokeStyle" | "changeArrowhead" | "changeArrowType" | "changeArrowProperties" | "changeOpacity" | "changeFontSize" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "arrangeElements" | "normaliseElements" | "flipHorizontal" | "flipVertical" | "deselect" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "createContainerFromText" | "wrapTextInContainer" | "autoResize" | "elementStats" | "searchMenu" | "linkToElement" | "cropEditor" | "wrapSelectionInFrame" | "smartZoom" | "toggleLassoTool" | "toggleShapeSwitch" | "togglePolygon";
|
|
17
|
+
export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "objectsSnapMode" | "arrowBinding" | "midpointSnapping" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeBucketFillBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeSloppiness" | "changeFreedrawMode" | "changeStrokeStyle" | "changeArrowhead" | "changeArrowType" | "changeArrowProperties" | "changeOpacity" | "changeFontSize" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "toggleAlignStacking" | "distributeHorizontally" | "distributeVertically" | "arrangeElements" | "normaliseElements" | "flipHorizontal" | "flipVertical" | "flipViewpointHorizontal" | "flipViewpointVertical" | "deselect" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "createContainerFromText" | "wrapTextInContainer" | "autoResize" | "elementStats" | "searchMenu" | "linkToElement" | "cropEditor" | "wrapSelectionInFrame" | "smartZoom" | "toggleLassoTool" | "toggleShapeSwitch" | "togglePolygon";
|
|
18
18
|
export type PanelComponentProps = {
|
|
19
19
|
elements: readonly ExcalidrawElement[];
|
|
20
20
|
appState: UIAppState;
|
|
@@ -33,8 +33,6 @@ export interface Action<TData = any> {
|
|
|
33
33
|
perform: ActionFn<TData>;
|
|
34
34
|
keyPriority?: number;
|
|
35
35
|
keyTest?: (event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean;
|
|
36
|
-
/** Additional state guard retained when a host overrides `keyTest`'s keys. */
|
|
37
|
-
keyCondition?: (event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean;
|
|
38
36
|
predicate?: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
39
37
|
checked?: (appState: Readonly<UIAppState>) => boolean;
|
|
40
38
|
trackEvent: false | {
|
|
@@ -38,6 +38,9 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
38
38
|
myocSimplifiedMode?: boolean | undefined;
|
|
39
39
|
dontResizeLimitMBs?: number | undefined;
|
|
40
40
|
hideMainMenus?: boolean | undefined;
|
|
41
|
+
alignConfiguration?: {
|
|
42
|
+
stacking: boolean;
|
|
43
|
+
} | undefined;
|
|
41
44
|
arrangeConfiguration?: {
|
|
42
45
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
43
46
|
gap: number;
|
|
@@ -51,7 +51,6 @@ export declare const getToolLetter: (type: ToolbarToolType) => string | undefine
|
|
|
51
51
|
/** human-readable shortcut hint, e.g. "R", used in tooltips & aria */
|
|
52
52
|
export declare const getToolShortcut: (type: ToolbarToolType) => string | undefined;
|
|
53
53
|
export declare const findShapeByKey: (key: string, app: AppClassProperties, shiftKey?: boolean) => "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "lasso" | "eraser" | "hand" | "laser" | "autoshape" | "bucketfill" | null;
|
|
54
|
-
export declare const findShapeByKeyboardEvent: (event: KeyboardEvent | React.KeyboardEvent, app: AppClassProperties) => "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "lasso" | "eraser" | "hand" | "laser" | "autoshape" | "bucketfill" | null;
|
|
55
54
|
/**
|
|
56
55
|
* Whether a toolbar entry activating the given tool renders disabled — true
|
|
57
56
|
* when the active tool is host-controlled (`props.activeTool`) and the entry
|
|
@@ -29,6 +29,7 @@ fileHandle?: FileSystemFileHandle | null) => Promise<{
|
|
|
29
29
|
zoom: import("../types").Zoom;
|
|
30
30
|
scrollX: number;
|
|
31
31
|
scrollY: number;
|
|
32
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
32
33
|
viewModeEnabled: boolean;
|
|
33
34
|
openDialog: null | {
|
|
34
35
|
name: "imageExport" | "help" | "jsonExport";
|
|
@@ -111,6 +112,9 @@ fileHandle?: FileSystemFileHandle | null) => Promise<{
|
|
|
111
112
|
myocSimplifiedMode: boolean;
|
|
112
113
|
dontResizeLimitMBs: number;
|
|
113
114
|
hideMainMenus: boolean;
|
|
115
|
+
alignConfiguration: {
|
|
116
|
+
stacking: boolean;
|
|
117
|
+
};
|
|
114
118
|
arrangeConfiguration: {
|
|
115
119
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
116
120
|
gap: number;
|
|
@@ -30,6 +30,7 @@ export declare const loadFromJSON: (localAppState: AppState, localElements: read
|
|
|
30
30
|
zoom: import("../types").Zoom;
|
|
31
31
|
scrollX: number;
|
|
32
32
|
scrollY: number;
|
|
33
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
33
34
|
viewModeEnabled: boolean;
|
|
34
35
|
openDialog: null | {
|
|
35
36
|
name: "imageExport" | "help" | "jsonExport";
|
|
@@ -112,6 +113,9 @@ export declare const loadFromJSON: (localAppState: AppState, localElements: read
|
|
|
112
113
|
myocSimplifiedMode: boolean;
|
|
113
114
|
dontResizeLimitMBs: number;
|
|
114
115
|
hideMainMenus: boolean;
|
|
116
|
+
alignConfiguration: {
|
|
117
|
+
stacking: boolean;
|
|
118
|
+
};
|
|
115
119
|
arrangeConfiguration: {
|
|
116
120
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
117
121
|
gap: number;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import type { AppState, ArrangePreferences, EditorPreferences, NormalisePreferences, SmartZoomPreferences } from "./types";
|
|
1
|
+
import type { AlignPreferences, AppState, ArrangePreferences, EditorPreferences, NormalisePreferences, SmartZoomPreferences } from "./types";
|
|
2
2
|
export type ResolvedSmartZoomPreferences = Required<SmartZoomPreferences>;
|
|
3
|
+
export type ResolvedAlignPreferences = Required<AlignPreferences>;
|
|
3
4
|
export type ResolvedArrangePreferences = Required<ArrangePreferences>;
|
|
4
5
|
export type ResolvedNormalisePreferences = Required<NormalisePreferences>;
|
|
5
6
|
export type ResolvedEditorPreferences = {
|
|
6
7
|
smartZoom: ResolvedSmartZoomPreferences;
|
|
8
|
+
align: ResolvedAlignPreferences;
|
|
7
9
|
arrange: ResolvedArrangePreferences;
|
|
8
10
|
normalise: ResolvedNormalisePreferences;
|
|
9
11
|
};
|
|
12
|
+
export declare const DEFAULT_ALIGN_PREFERENCES: ResolvedAlignPreferences;
|
|
10
13
|
export declare const DEFAULT_SMART_ZOOM_PREFERENCES: ResolvedSmartZoomPreferences;
|
|
11
|
-
export declare const getEffectiveEditorPreferences: (appState: Readonly<Pick<AppState, "arrangeConfiguration" | "normaliseConfiguration"
|
|
14
|
+
export declare const getEffectiveEditorPreferences: (appState: Readonly<Pick<AppState, "arrangeConfiguration" | "normaliseConfiguration"> & Partial<Pick<AppState, "alignConfiguration">>>, editorPreferences?: EditorPreferences) => ResolvedEditorPreferences;
|
|
@@ -44,7 +44,6 @@ export { LiveCollaborationTrigger };
|
|
|
44
44
|
export { Stats } from "./components/Stats";
|
|
45
45
|
export { DefaultSidebar } from "./components/DefaultSidebar";
|
|
46
46
|
export type { ViewportStatusFrame } from "./types";
|
|
47
|
-
export type { KeyboardShortcut, KeyboardShortcutCommand, KeyboardShortcutOverrides, } from "./keyboardShortcuts";
|
|
48
47
|
export { zoomToFitBounds, DEFAULT_OVERSCROLL } from "./viewport";
|
|
49
48
|
export { getCommonBounds, getVisibleSceneBounds, convertToExcalidrawElements, } from "@excalidraw/element";
|
|
50
49
|
export { elementsOverlappingBBox } from "@excalidraw/element";
|
|
@@ -52,7 +51,7 @@ export { getDataURL } from "./data/blob";
|
|
|
52
51
|
export { isElementLink } from "@excalidraw/element";
|
|
53
52
|
export { Fonts } from "./fonts/Fonts";
|
|
54
53
|
export { setCustomTextMetricsProvider } from "@excalidraw/element";
|
|
55
|
-
export type { ArrangePreferences, CompressImageFile, CompressImageFileOpts, EditorPreferences, ImageContextMenuItem, ImageDownloadErrorStatus, ImageUploadProgressStatus, ImageStatus, ImageStatusStyle, NormalisePreferences, SmartZoomPreferences, } from "./types";
|
|
54
|
+
export type { AlignPreferences, ArrangePreferences, CompressImageFile, CompressImageFileOpts, EditorPreferences, ImageContextMenuItem, ImageDownloadErrorStatus, ImageUploadProgressStatus, ImageStatus, ImageStatusStyle, NormalisePreferences, SmartZoomPreferences, ViewpointFlip, } from "./types";
|
|
56
55
|
export type { DragImageMetadata, ParsedDataTranferList, ParsedDataTransferFile, DragDataSnapshot, RawDragData, } from "./clipboard";
|
|
57
56
|
export { renderSpreadsheet, tryParseSpreadsheet, isSpreadsheetValidForChartType, } from "./charts";
|
|
58
57
|
/**
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ViewpointFlip } from "@excalidraw/common";
|
|
2
|
+
import type { Zoom } from "../types";
|
|
3
|
+
export declare const applyZoomAndViewpointFlip: (context: CanvasRenderingContext2D, appState: {
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
zoom: Zoom;
|
|
7
|
+
viewpointFlip: ViewpointFlip;
|
|
8
|
+
}) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IMAGE_MIME_TYPES, UserIdleState, throttleRAF, MIME_TYPES, ColorTuple, EditorInterface, StrokeWidthKey } from "@excalidraw/common";
|
|
1
|
+
import type { IMAGE_MIME_TYPES, UserIdleState, throttleRAF, MIME_TYPES, ColorTuple, EditorInterface, StrokeWidthKey, ViewpointFlip } from "@excalidraw/common";
|
|
2
2
|
import type { LinearElementEditor } from "@excalidraw/element";
|
|
3
3
|
import type { MaybeTransformHandleType } from "@excalidraw/element";
|
|
4
4
|
import type { PointerType, ExcalidrawLinearElement, NonDeletedExcalidrawElement, NonDeleted, TextAlign, ExcalidrawElement, GroupId, ExcalidrawBindableElement, ExcalidrawArrowElement, Arrowhead, FontFamilyValues, FileId, Theme, StrokeRoundness, ExcalidrawEmbeddableElement, ExcalidrawMagicFrameElement, ExcalidrawFrameLikeElement, ExcalidrawElementType, ExcalidrawIframeLikeElement, OrderedExcalidrawElement, ExcalidrawNonSelectionElement, ArrangeAlgorithms, BindMode, ExcalidrawTextElement, StrokeVariability, ExcalidrawGifCache } from "@excalidraw/element/types";
|
|
@@ -18,6 +18,7 @@ import type { isOverScrollBars } from "./scene/scrollbars";
|
|
|
18
18
|
import type React from "react";
|
|
19
19
|
import type { JSX } from "react";
|
|
20
20
|
export type { App };
|
|
21
|
+
export type { ViewpointFlip } from "@excalidraw/common";
|
|
21
22
|
export type SocketId = string & {
|
|
22
23
|
_brand: "SocketId";
|
|
23
24
|
};
|
|
@@ -144,6 +145,7 @@ type _CommonCanvasAppState = {
|
|
|
144
145
|
scrollY: AppState["scrollY"];
|
|
145
146
|
width: AppState["width"];
|
|
146
147
|
height: AppState["height"];
|
|
148
|
+
viewpointFlip: AppState["viewpointFlip"];
|
|
147
149
|
viewModeEnabled: AppState["viewModeEnabled"];
|
|
148
150
|
openDialog: AppState["openDialog"];
|
|
149
151
|
editingGroupId: AppState["editingGroupId"];
|
|
@@ -226,12 +228,16 @@ export type ArrangePreferences = {
|
|
|
226
228
|
algorithm?: ArrangeAlgorithms;
|
|
227
229
|
gap?: number;
|
|
228
230
|
};
|
|
231
|
+
export type AlignPreferences = {
|
|
232
|
+
stacking?: boolean;
|
|
233
|
+
};
|
|
229
234
|
export type NormalisePreferences = {
|
|
230
235
|
mode?: NormaliseMode;
|
|
231
236
|
metric?: NormaliseMetric;
|
|
232
237
|
};
|
|
233
238
|
export type EditorPreferences = {
|
|
234
239
|
smartZoom?: SmartZoomPreferences;
|
|
240
|
+
align?: AlignPreferences;
|
|
235
241
|
arrange?: ArrangePreferences;
|
|
236
242
|
normalise?: NormalisePreferences;
|
|
237
243
|
};
|
|
@@ -283,6 +289,10 @@ export interface AppState {
|
|
|
283
289
|
dontResizeLimitMBs: number;
|
|
284
290
|
hideMainMenus: boolean;
|
|
285
291
|
wheelZoomsOnDefault?: boolean;
|
|
292
|
+
viewpointFlip: ViewpointFlip;
|
|
293
|
+
alignConfiguration: {
|
|
294
|
+
stacking: boolean;
|
|
295
|
+
};
|
|
286
296
|
arrangeConfiguration: {
|
|
287
297
|
algorithm: ArrangeAlgorithms;
|
|
288
298
|
gap: number;
|
|
@@ -687,12 +697,6 @@ export type UIConfig = {
|
|
|
687
697
|
};
|
|
688
698
|
export interface ExcalidrawProps {
|
|
689
699
|
className?: string;
|
|
690
|
-
/**
|
|
691
|
-
* Controlled keyboard shortcut overrides. Omitted commands retain their
|
|
692
|
-
* Excalidraw defaults; pass an empty array to disable a command. Excalidraw
|
|
693
|
-
* does not persist this value.
|
|
694
|
-
*/
|
|
695
|
-
keyboardShortcuts?: import("./keyboardShortcuts").KeyboardShortcutOverrides;
|
|
696
700
|
onChange?: (elements: readonly OrderedExcalidrawElement[], appState: AppState, files: BinaryFiles) => void;
|
|
697
701
|
onThemeChange?: (theme: Theme | "system") => void;
|
|
698
702
|
/**
|
|
@@ -1171,6 +1175,7 @@ export type FrameNameBoundsCache = {
|
|
|
1171
1175
|
get: (frameElement: ExcalidrawFrameLikeElement | ExcalidrawMagicFrameElement) => FrameNameBounds | null;
|
|
1172
1176
|
_cache: Map<string, FrameNameBounds & {
|
|
1173
1177
|
zoom: AppState["zoom"]["value"];
|
|
1178
|
+
viewpointFlip: AppState["viewpointFlip"];
|
|
1174
1179
|
versionNonce: ExcalidrawFrameLikeElement["versionNonce"];
|
|
1175
1180
|
}>;
|
|
1176
1181
|
};
|
|
@@ -105,6 +105,10 @@ export declare const zoomToFitBounds: ({ bounds, appState, canvasOffsets, fit, m
|
|
|
105
105
|
dontResizeLimitMBs: number;
|
|
106
106
|
hideMainMenus: boolean;
|
|
107
107
|
wheelZoomsOnDefault?: boolean;
|
|
108
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
109
|
+
alignConfiguration: {
|
|
110
|
+
stacking: boolean;
|
|
111
|
+
};
|
|
108
112
|
arrangeConfiguration: {
|
|
109
113
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
110
114
|
gap: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myoc/excalidraw",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.539",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./dist/types/excalidraw/index.d.ts",
|
|
6
6
|
"main": "./dist/prod/index.js",
|
|
@@ -82,10 +82,10 @@
|
|
|
82
82
|
},
|
|
83
83
|
"dependencies": {
|
|
84
84
|
"@braintree/sanitize-url": "6.0.2",
|
|
85
|
-
"@excalidraw/common": "npm:@myoc/common@0.19.
|
|
86
|
-
"@excalidraw/element": "npm:@myoc/element@0.19.
|
|
85
|
+
"@excalidraw/common": "npm:@myoc/common@0.19.539",
|
|
86
|
+
"@excalidraw/element": "npm:@myoc/element@0.19.539",
|
|
87
87
|
"@excalidraw/laser-pointer": "1.3.1",
|
|
88
|
-
"@excalidraw/math": "npm:@myoc/math@0.19.
|
|
88
|
+
"@excalidraw/math": "npm:@myoc/math@0.19.539",
|
|
89
89
|
"@excalidraw/random-username": "1.1.0",
|
|
90
90
|
"@lezer/highlight": "^1.0.0",
|
|
91
91
|
"browser-fs-access": "0.38.0",
|