@myoc/excalidraw 0.19.537 → 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 -0
- package/dist/dev/{chunk-SZMFGT5M.js → chunk-2OVHIH4L.js} +3 -1
- package/dist/dev/chunk-2OVHIH4L.js.map +7 -0
- package/dist/dev/{chunk-7R7FDLAY.js → chunk-HJ2ALDN7.js} +30 -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-2QLYX6JM.js → image-2GHT4EI2.js} +3 -3
- package/dist/dev/index.js +387 -281
- package/dist/dev/index.js.map +4 -4
- package/dist/dev/locales/{en-FTXMBOG2.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-5FNQLKFO.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.js +13 -13
- package/dist/prod/locales/{en-S77ABPIF.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/excalidraw/actions/actionAlign.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +2 -0
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +6 -0
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +2 -0
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +3 -0
- package/dist/types/excalidraw/actions/actionDeselect.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +2 -0
- package/dist/types/excalidraw/actions/actionExport.d.ts +2 -0
- package/dist/types/excalidraw/actions/actionFlipViewpoint.d.ts +43 -0
- package/dist/types/excalidraw/actions/actionFrame.d.ts +3 -0
- package/dist/types/excalidraw/actions/actionGroup.d.ts +2 -0
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionLink.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionMenu.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionProperties.d.ts +2 -0
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionStyles.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +1 -0
- package/dist/types/excalidraw/actions/index.d.ts +1 -0
- package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
- package/dist/types/excalidraw/actions/types.d.ts +1 -1
- package/dist/types/excalidraw/data/blob.d.ts +1 -0
- package/dist/types/excalidraw/data/json.d.ts +1 -0
- package/dist/types/excalidraw/index.d.ts +1 -1
- package/dist/types/excalidraw/renderer/viewpoint.d.ts +8 -0
- package/dist/types/excalidraw/types.d.ts +5 -1
- package/dist/types/excalidraw/viewport.d.ts +1 -0
- package/package.json +4 -4
- package/dist/dev/chunk-7R7FDLAY.js.map +0 -7
- package/dist/dev/chunk-SZMFGT5M.js.map +0 -7
- package/dist/prod/chunk-C4BFS67G.js +0 -4
- package/dist/prod/data/image-3GEOMH65.js +0 -1
- /package/dist/dev/{chunk-GMDJS52C.js.map → chunk-IJ2BHUZB.js.map} +0 -0
- /package/dist/dev/data/{image-2QLYX6JM.js.map → image-2GHT4EI2.js.map} +0 -0
- /package/dist/dev/locales/{en-FTXMBOG2.js.map → en-JINXO2V2.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A,B,C,D,E,F,G,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../chunk-
|
|
1
|
+
import{A,B,C,D,E,F,G,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../chunk-KGIBYNMP.js";import"../chunk-SRAX5OIU.js";export{e as alerts,h as bucketfill,d as buttons,l as canvasError,t as clearCanvasDialog,A as colorPicker,y as colors,G as default,i as element,b as elementLink,v as encrypted,p as errorDialog,m as errorSplash,f as errors,r as exportDialog,D as fontList,j as headings,s as helpDialog,k as hints,u as imageExportDialog,F as keys,a as labels,B as overwriteConfirm,q as progressDialog,C as quickSearch,o as roomDialog,c as search,n as shareDialog,w as stats,x as toast,g as toolBar,E as userList,z as welcomeScreen};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d}from"./chunk-Z5NKEFVG.js";import"./chunk-
|
|
1
|
+
import{a,b,c,d}from"./chunk-Z5NKEFVG.js";import"./chunk-U2CW5GZO.js";import"./chunk-SRAX5OIU.js";export{a as Commands,b as subsetToBase64,c as subsetToBinary,d as toBase64};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r,c as t}from"./chunk-Z5NKEFVG.js";import"./chunk-
|
|
1
|
+
import{a as r,c as t}from"./chunk-Z5NKEFVG.js";import"./chunk-U2CW5GZO.js";import"./chunk-SRAX5OIU.js";var s=import.meta.url?new URL(import.meta.url):void 0;typeof window>"u"&&typeof self<"u"&&(self.onmessage=async e=>{switch(e.data.command){case r.Subset:let a=await t(e.data.arrayBuffer,e.data.codePoints);self.postMessage(a,{transfer:[a]});break}});export{s as WorkerUrl};
|
|
@@ -56,26 +56,29 @@ export declare const updateActiveTool: (appState: Pick<AppState, "activeTool">,
|
|
|
56
56
|
export declare const isFullScreen: () => boolean;
|
|
57
57
|
export declare const allowFullScreen: () => Promise<void>;
|
|
58
58
|
export declare const exitFullScreen: () => Promise<void>;
|
|
59
|
-
export
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
59
|
+
export type ViewpointFlip = Readonly<{
|
|
60
|
+
horizontal: boolean;
|
|
61
|
+
vertical: boolean;
|
|
62
|
+
}>;
|
|
63
|
+
export declare const getViewpointFlipSign: (flipped: boolean) => 1 | -1;
|
|
64
|
+
type ViewportTransformState = {
|
|
63
65
|
zoom: Zoom;
|
|
64
66
|
offsetLeft: number;
|
|
65
67
|
offsetTop: number;
|
|
66
68
|
scrollX: number;
|
|
67
69
|
scrollY: number;
|
|
68
|
-
|
|
70
|
+
width?: number;
|
|
71
|
+
height?: number;
|
|
72
|
+
viewpointFlip?: ViewpointFlip;
|
|
73
|
+
};
|
|
74
|
+
export declare const viewportCoordsToSceneCoords: ({ clientX, clientY }: {
|
|
75
|
+
clientX: number;
|
|
76
|
+
clientY: number;
|
|
77
|
+
}, { zoom, offsetLeft, offsetTop, scrollX, scrollY, width, height, viewpointFlip, }: ViewportTransformState) => GlobalCoord;
|
|
69
78
|
export declare const sceneCoordsToViewportCoords: ({ sceneX, sceneY }: {
|
|
70
79
|
sceneX: number;
|
|
71
80
|
sceneY: number;
|
|
72
|
-
}, { zoom, offsetLeft, offsetTop, scrollX, scrollY, }: {
|
|
73
|
-
zoom: Zoom;
|
|
74
|
-
offsetLeft: number;
|
|
75
|
-
offsetTop: number;
|
|
76
|
-
scrollX: number;
|
|
77
|
-
scrollY: number;
|
|
78
|
-
}) => {
|
|
81
|
+
}, { zoom, offsetLeft, offsetTop, scrollX, scrollY, width, height, viewpointFlip, }: ViewportTransformState) => {
|
|
79
82
|
x: number;
|
|
80
83
|
y: number;
|
|
81
84
|
};
|
|
@@ -24,6 +24,7 @@ export declare const actionToggleAlignStacking: {
|
|
|
24
24
|
dontResizeLimitMBs: number;
|
|
25
25
|
hideMainMenus: boolean;
|
|
26
26
|
wheelZoomsOnDefault?: boolean;
|
|
27
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
27
28
|
arrangeConfiguration: {
|
|
28
29
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
29
30
|
gap: number;
|
|
@@ -40,6 +40,7 @@ export declare const actionBindText: {
|
|
|
40
40
|
dontResizeLimitMBs: number;
|
|
41
41
|
hideMainMenus: boolean;
|
|
42
42
|
wheelZoomsOnDefault?: boolean;
|
|
43
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
43
44
|
alignConfiguration: {
|
|
44
45
|
stacking: boolean;
|
|
45
46
|
};
|
|
@@ -231,6 +232,7 @@ export declare const actionWrapTextInContainer: {
|
|
|
231
232
|
dontResizeLimitMBs: number;
|
|
232
233
|
hideMainMenus: boolean;
|
|
233
234
|
wheelZoomsOnDefault?: boolean;
|
|
235
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
234
236
|
alignConfiguration: {
|
|
235
237
|
stacking: boolean;
|
|
236
238
|
};
|
|
@@ -28,6 +28,7 @@ export declare const actionZoomIn: {
|
|
|
28
28
|
dontResizeLimitMBs: number;
|
|
29
29
|
hideMainMenus: boolean;
|
|
30
30
|
wheelZoomsOnDefault?: boolean;
|
|
31
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
31
32
|
alignConfiguration: {
|
|
32
33
|
stacking: boolean;
|
|
33
34
|
};
|
|
@@ -223,6 +224,7 @@ export declare const actionZoomOut: {
|
|
|
223
224
|
dontResizeLimitMBs: number;
|
|
224
225
|
hideMainMenus: boolean;
|
|
225
226
|
wheelZoomsOnDefault?: boolean;
|
|
227
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
226
228
|
alignConfiguration: {
|
|
227
229
|
stacking: boolean;
|
|
228
230
|
};
|
|
@@ -418,6 +420,7 @@ export declare const actionResetZoom: {
|
|
|
418
420
|
dontResizeLimitMBs: number;
|
|
419
421
|
hideMainMenus: boolean;
|
|
420
422
|
wheelZoomsOnDefault?: boolean;
|
|
423
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
421
424
|
alignConfiguration: {
|
|
422
425
|
stacking: boolean;
|
|
423
426
|
};
|
|
@@ -613,6 +616,7 @@ export declare const actionZoomToFitSelectionInViewport: {
|
|
|
613
616
|
dontResizeLimitMBs: number;
|
|
614
617
|
hideMainMenus: boolean;
|
|
615
618
|
wheelZoomsOnDefault?: boolean;
|
|
619
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
616
620
|
alignConfiguration: {
|
|
617
621
|
stacking: boolean;
|
|
618
622
|
};
|
|
@@ -807,6 +811,7 @@ export declare const actionZoomToFitSelection: {
|
|
|
807
811
|
dontResizeLimitMBs: number;
|
|
808
812
|
hideMainMenus: boolean;
|
|
809
813
|
wheelZoomsOnDefault?: boolean;
|
|
814
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
810
815
|
alignConfiguration: {
|
|
811
816
|
stacking: boolean;
|
|
812
817
|
};
|
|
@@ -1001,6 +1006,7 @@ export declare const actionZoomToFit: {
|
|
|
1001
1006
|
dontResizeLimitMBs: number;
|
|
1002
1007
|
hideMainMenus: boolean;
|
|
1003
1008
|
wheelZoomsOnDefault?: boolean;
|
|
1009
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
1004
1010
|
alignConfiguration: {
|
|
1005
1011
|
stacking: boolean;
|
|
1006
1012
|
};
|
|
@@ -22,6 +22,7 @@ export declare const actionPaste: {
|
|
|
22
22
|
dontResizeLimitMBs: number;
|
|
23
23
|
hideMainMenus: boolean;
|
|
24
24
|
wheelZoomsOnDefault?: boolean;
|
|
25
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
25
26
|
alignConfiguration: {
|
|
26
27
|
stacking: boolean;
|
|
27
28
|
};
|
|
@@ -251,6 +252,7 @@ export declare const actionCopyAsPng: {
|
|
|
251
252
|
dontResizeLimitMBs: number;
|
|
252
253
|
hideMainMenus: boolean;
|
|
253
254
|
wheelZoomsOnDefault?: boolean;
|
|
255
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
254
256
|
alignConfiguration: {
|
|
255
257
|
stacking: boolean;
|
|
256
258
|
};
|
|
@@ -23,6 +23,7 @@ export declare const actionDeleteSelected: {
|
|
|
23
23
|
dontResizeLimitMBs: number;
|
|
24
24
|
hideMainMenus: boolean;
|
|
25
25
|
wheelZoomsOnDefault?: boolean;
|
|
26
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
26
27
|
alignConfiguration: {
|
|
27
28
|
stacking: boolean;
|
|
28
29
|
};
|
|
@@ -236,6 +237,7 @@ export declare const actionDeleteSelected: {
|
|
|
236
237
|
dontResizeLimitMBs: number;
|
|
237
238
|
hideMainMenus: boolean;
|
|
238
239
|
wheelZoomsOnDefault?: boolean;
|
|
240
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
239
241
|
alignConfiguration: {
|
|
240
242
|
stacking: boolean;
|
|
241
243
|
};
|
|
@@ -427,6 +429,7 @@ export declare const actionDeleteSelected: {
|
|
|
427
429
|
dontResizeLimitMBs: number;
|
|
428
430
|
hideMainMenus: boolean;
|
|
429
431
|
wheelZoomsOnDefault?: boolean;
|
|
432
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
430
433
|
alignConfiguration: {
|
|
431
434
|
stacking: boolean;
|
|
432
435
|
};
|
|
@@ -33,6 +33,7 @@ export declare const actionToggleElementLock: {
|
|
|
33
33
|
dontResizeLimitMBs: number;
|
|
34
34
|
hideMainMenus: boolean;
|
|
35
35
|
wheelZoomsOnDefault?: boolean;
|
|
36
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
36
37
|
alignConfiguration: {
|
|
37
38
|
stacking: boolean;
|
|
38
39
|
};
|
|
@@ -223,6 +224,7 @@ export declare const actionUnlockAllElements: {
|
|
|
223
224
|
dontResizeLimitMBs: number;
|
|
224
225
|
hideMainMenus: boolean;
|
|
225
226
|
wheelZoomsOnDefault?: boolean;
|
|
227
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
226
228
|
alignConfiguration: {
|
|
227
229
|
stacking: boolean;
|
|
228
230
|
};
|
|
@@ -94,6 +94,7 @@ export declare const actionLoadScene: {
|
|
|
94
94
|
zoom: import("../types").Zoom;
|
|
95
95
|
scrollX: number;
|
|
96
96
|
scrollY: number;
|
|
97
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
97
98
|
viewModeEnabled: boolean;
|
|
98
99
|
openDialog: null | {
|
|
99
100
|
name: "imageExport" | "help" | "jsonExport";
|
|
@@ -271,6 +272,7 @@ export declare const actionLoadScene: {
|
|
|
271
272
|
dontResizeLimitMBs: number;
|
|
272
273
|
hideMainMenus: boolean;
|
|
273
274
|
wheelZoomsOnDefault?: boolean;
|
|
275
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
274
276
|
alignConfiguration: {
|
|
275
277
|
stacking: boolean;
|
|
276
278
|
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { AppState } from "../types";
|
|
2
|
+
export declare const actionFlipViewpointHorizontal: {
|
|
3
|
+
name: "flipViewpointHorizontal";
|
|
4
|
+
label: string;
|
|
5
|
+
viewMode: true;
|
|
6
|
+
trackEvent: {
|
|
7
|
+
category: "canvas";
|
|
8
|
+
};
|
|
9
|
+
perform: (_elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>) => {
|
|
10
|
+
appState: {
|
|
11
|
+
viewpointFlip: {
|
|
12
|
+
horizontal: boolean;
|
|
13
|
+
vertical: boolean;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
captureUpdate: "NEVER";
|
|
17
|
+
};
|
|
18
|
+
checked: (appState: Readonly<import("../types").UIAppState>) => boolean;
|
|
19
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
20
|
+
} & {
|
|
21
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
22
|
+
};
|
|
23
|
+
export declare const actionFlipViewpointVertical: {
|
|
24
|
+
name: "flipViewpointVertical";
|
|
25
|
+
label: string;
|
|
26
|
+
viewMode: true;
|
|
27
|
+
trackEvent: {
|
|
28
|
+
category: "canvas";
|
|
29
|
+
};
|
|
30
|
+
perform: (_elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>) => {
|
|
31
|
+
appState: {
|
|
32
|
+
viewpointFlip: {
|
|
33
|
+
horizontal: boolean;
|
|
34
|
+
vertical: boolean;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
captureUpdate: "NEVER";
|
|
38
|
+
};
|
|
39
|
+
checked: (appState: Readonly<import("../types").UIAppState>) => boolean;
|
|
40
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
41
|
+
} & {
|
|
42
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
43
|
+
};
|
|
@@ -21,6 +21,7 @@ export declare const actionSelectAllElementsInFrame: {
|
|
|
21
21
|
dontResizeLimitMBs: number;
|
|
22
22
|
hideMainMenus: boolean;
|
|
23
23
|
wheelZoomsOnDefault?: boolean;
|
|
24
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
24
25
|
alignConfiguration: {
|
|
25
26
|
stacking: boolean;
|
|
26
27
|
};
|
|
@@ -216,6 +217,7 @@ export declare const actionRemoveAllElementsFromFrame: {
|
|
|
216
217
|
dontResizeLimitMBs: number;
|
|
217
218
|
hideMainMenus: boolean;
|
|
218
219
|
wheelZoomsOnDefault?: boolean;
|
|
220
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
219
221
|
alignConfiguration: {
|
|
220
222
|
stacking: boolean;
|
|
221
223
|
};
|
|
@@ -415,6 +417,7 @@ export declare const actionupdateFrameRendering: {
|
|
|
415
417
|
dontResizeLimitMBs: number;
|
|
416
418
|
hideMainMenus: boolean;
|
|
417
419
|
wheelZoomsOnDefault?: boolean;
|
|
420
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
418
421
|
alignConfiguration: {
|
|
419
422
|
stacking: boolean;
|
|
420
423
|
};
|
|
@@ -27,6 +27,7 @@ export declare const actionGroup: {
|
|
|
27
27
|
dontResizeLimitMBs: number;
|
|
28
28
|
hideMainMenus: boolean;
|
|
29
29
|
wheelZoomsOnDefault?: boolean;
|
|
30
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
30
31
|
alignConfiguration: {
|
|
31
32
|
stacking: boolean;
|
|
32
33
|
};
|
|
@@ -221,6 +222,7 @@ export declare const actionUngroup: {
|
|
|
221
222
|
dontResizeLimitMBs: number;
|
|
222
223
|
hideMainMenus: boolean;
|
|
223
224
|
wheelZoomsOnDefault?: boolean;
|
|
225
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
224
226
|
alignConfiguration: {
|
|
225
227
|
stacking: boolean;
|
|
226
228
|
};
|
|
@@ -59,6 +59,7 @@ export declare const actionDecreaseFontSize: {
|
|
|
59
59
|
dontResizeLimitMBs: number;
|
|
60
60
|
hideMainMenus: boolean;
|
|
61
61
|
wheelZoomsOnDefault?: boolean;
|
|
62
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
62
63
|
alignConfiguration: {
|
|
63
64
|
stacking: boolean;
|
|
64
65
|
};
|
|
@@ -249,6 +250,7 @@ export declare const actionIncreaseFontSize: {
|
|
|
249
250
|
dontResizeLimitMBs: number;
|
|
250
251
|
hideMainMenus: boolean;
|
|
251
252
|
wheelZoomsOnDefault?: boolean;
|
|
253
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
252
254
|
alignConfiguration: {
|
|
253
255
|
stacking: boolean;
|
|
254
256
|
};
|
|
@@ -16,6 +16,7 @@ export { distributeHorizontally, distributeVertically, } from "./actionDistribut
|
|
|
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" | "toggleAlignStacking" | "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;
|
|
@@ -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";
|
|
@@ -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";
|
|
@@ -51,7 +51,7 @@ export { getDataURL } from "./data/blob";
|
|
|
51
51
|
export { isElementLink } from "@excalidraw/element";
|
|
52
52
|
export { Fonts } from "./fonts/Fonts";
|
|
53
53
|
export { setCustomTextMetricsProvider } from "@excalidraw/element";
|
|
54
|
-
export type { AlignPreferences, 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";
|
|
55
55
|
export type { DragImageMetadata, ParsedDataTranferList, ParsedDataTransferFile, DragDataSnapshot, RawDragData, } from "./clipboard";
|
|
56
56
|
export { renderSpreadsheet, tryParseSpreadsheet, isSpreadsheetValidForChartType, } from "./charts";
|
|
57
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"];
|
|
@@ -287,6 +289,7 @@ export interface AppState {
|
|
|
287
289
|
dontResizeLimitMBs: number;
|
|
288
290
|
hideMainMenus: boolean;
|
|
289
291
|
wheelZoomsOnDefault?: boolean;
|
|
292
|
+
viewpointFlip: ViewpointFlip;
|
|
290
293
|
alignConfiguration: {
|
|
291
294
|
stacking: boolean;
|
|
292
295
|
};
|
|
@@ -1172,6 +1175,7 @@ export type FrameNameBoundsCache = {
|
|
|
1172
1175
|
get: (frameElement: ExcalidrawFrameLikeElement | ExcalidrawMagicFrameElement) => FrameNameBounds | null;
|
|
1173
1176
|
_cache: Map<string, FrameNameBounds & {
|
|
1174
1177
|
zoom: AppState["zoom"]["value"];
|
|
1178
|
+
viewpointFlip: AppState["viewpointFlip"];
|
|
1175
1179
|
versionNonce: ExcalidrawFrameLikeElement["versionNonce"];
|
|
1176
1180
|
}>;
|
|
1177
1181
|
};
|
|
@@ -105,6 +105,7 @@ 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;
|
|
108
109
|
alignConfiguration: {
|
|
109
110
|
stacking: boolean;
|
|
110
111
|
};
|
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",
|