@zsviczian/excalidraw 0.17.6-3 → 0.17.6-31
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 +13100 -1540
- package/dist/excalidraw.production.min.js +1 -1
- package/dist/excalidraw.production.min.js.LICENSE.txt +21 -1
- package/dist/styles.development.css +490 -376
- package/dist/styles.production.css +10 -8
- package/package.json +5 -4
- package/types/excalidraw/actions/actionAddToLibrary.d.ts +27 -3
- package/types/excalidraw/actions/actionAlign.d.ts +7 -6
- package/types/excalidraw/actions/actionBoundText.d.ts +18 -2
- package/types/excalidraw/actions/actionCanvas.d.ts +126 -14
- package/types/excalidraw/actions/actionClipboard.d.ts +61 -9
- package/types/excalidraw/actions/actionCropEditor.d.ts +222 -0
- package/types/excalidraw/actions/actionDeleteSelected.d.ts +34 -6
- package/types/excalidraw/actions/actionElementLink.d.ts +244 -0
- package/types/excalidraw/actions/actionElementLock.d.ts +18 -2
- package/types/excalidraw/actions/actionExport.d.ts +77 -8
- package/types/excalidraw/actions/actionFinalize.d.ts +18 -2
- package/types/excalidraw/actions/actionFrame.d.ts +533 -4
- package/types/excalidraw/actions/actionGroup.d.ts +18 -2
- package/types/excalidraw/actions/actionLinearEditor.d.ts +9 -1
- package/types/excalidraw/actions/actionLink.d.ts +10 -2
- package/types/excalidraw/actions/actionMenu.d.ts +23 -2
- package/types/excalidraw/actions/actionNavigate.d.ts +18 -2
- package/types/excalidraw/actions/actionProperties.d.ts +135 -15
- package/types/excalidraw/actions/actionSelectAll.d.ts +9 -1
- package/types/excalidraw/actions/actionStyles.d.ts +9 -1
- package/types/excalidraw/actions/actionToggleGridMode.d.ts +9 -1
- package/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +9 -1
- package/types/excalidraw/actions/actionToggleSearchMenu.d.ts +14 -1
- package/types/excalidraw/actions/actionToggleStats.d.ts +9 -1
- package/types/excalidraw/actions/actionToggleViewMode.d.ts +9 -1
- package/types/excalidraw/actions/actionToggleZenMode.d.ts +9 -1
- package/types/excalidraw/actions/index.d.ts +1 -0
- package/types/excalidraw/actions/shortcuts.d.ts +1 -1
- package/types/excalidraw/actions/types.d.ts +1 -1
- package/types/excalidraw/align.d.ts +2 -1
- package/types/excalidraw/change.d.ts +2 -2
- package/types/excalidraw/clipboard.d.ts +27 -5
- package/types/excalidraw/components/Actions.d.ts +2 -1
- package/types/excalidraw/components/ActiveConfirmDialog.d.ts +1 -1
- package/types/excalidraw/components/App.d.ts +21 -5
- package/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -1
- package/types/excalidraw/components/ElementLinkDialog.d.ts +11 -0
- package/types/excalidraw/components/EyeDropper.d.ts +1 -1
- package/types/excalidraw/components/IconPicker.d.ts +2 -2
- package/types/excalidraw/components/LayerUI.d.ts +2 -1
- package/types/excalidraw/components/LibraryMenu.d.ts +1 -1
- package/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +1 -1
- package/types/excalidraw/components/Range.d.ts +8 -0
- package/types/excalidraw/components/SearchMenu.d.ts +1 -1
- package/types/excalidraw/components/Sidebar/Sidebar.d.ts +1 -1
- package/types/excalidraw/components/Stats/Collapsible.d.ts +2 -1
- package/types/excalidraw/components/Stats/utils.d.ts +1 -1
- package/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +1 -7
- package/types/excalidraw/components/TTDDialog/MermaidToExcalidrawLib.d.ts +10 -0
- package/types/excalidraw/components/TTDDialog/common.d.ts +2 -2
- package/types/excalidraw/components/hyperlink/Hyperlink.d.ts +1 -1
- package/types/excalidraw/components/hyperlink/helpers.d.ts +1 -0
- package/types/excalidraw/components/icons.d.ts +11 -0
- package/types/excalidraw/constants.d.ts +5 -1
- package/types/excalidraw/context/tunnels.d.ts +2 -1
- package/types/excalidraw/data/blob.d.ts +4 -0
- package/types/excalidraw/data/encode.d.ts +6 -5
- package/types/excalidraw/data/filesystem.d.ts +2 -1
- package/types/excalidraw/data/image.d.ts +0 -6
- package/types/excalidraw/data/library.d.ts +9 -3
- package/types/excalidraw/data/url.d.ts +0 -1
- package/types/excalidraw/dist/excalidraw.production.min.d.ts +3 -1
- package/types/excalidraw/editor-jotai.d.ts +56 -0
- package/types/excalidraw/element/binding.d.ts +10 -7
- package/types/excalidraw/element/cropElement.d.ts +19 -0
- package/types/excalidraw/element/elbowArrow.d.ts +16 -0
- package/types/excalidraw/element/elementLink.d.ts +13 -0
- package/types/excalidraw/element/embeddable.d.ts +9 -1
- package/types/excalidraw/element/flowchart.d.ts +1 -1
- package/types/excalidraw/element/heading.d.ts +5 -1
- package/types/excalidraw/element/image.d.ts +1 -1
- package/types/excalidraw/element/linearElementEditor.d.ts +9 -10
- package/types/excalidraw/element/mutateElement.d.ts +3 -1
- package/types/excalidraw/element/newElement.d.ts +9 -7
- package/types/excalidraw/element/resizeElements.d.ts +27 -5
- package/types/excalidraw/element/textElement.d.ts +14 -4
- package/types/excalidraw/element/textWrapping.d.ts +13 -0
- package/types/excalidraw/element/transformHandles.d.ts +1 -1
- package/types/excalidraw/element/types.d.ts +33 -1
- package/types/excalidraw/errors.d.ts +7 -0
- package/types/excalidraw/fonts/{woff2/Cascadia → Cascadia}/index.d.ts +1 -1
- package/types/excalidraw/fonts/ComicShanns/index.d.ts +2 -0
- package/types/excalidraw/fonts/{woff2/Emoji → Emoji}/index.d.ts +1 -1
- package/types/excalidraw/fonts/ExcalidrawFontFace.d.ts +2 -8
- package/types/excalidraw/fonts/{woff2/Excalifont → Excalifont}/index.d.ts +1 -1
- package/types/excalidraw/fonts/Fonts.d.ts +100 -0
- package/types/excalidraw/fonts/{woff2/Helvetica → Helvetica}/index.d.ts +1 -1
- package/types/excalidraw/fonts/{woff2/Liberation → Liberation}/index.d.ts +1 -1
- package/types/excalidraw/fonts/{woff2/Lilita → Lilita}/index.d.ts +1 -1
- package/types/excalidraw/fonts/{woff2/Nunito → Nunito}/index.d.ts +1 -1
- package/types/excalidraw/fonts/{woff2/Virgil → Virgil}/index.d.ts +1 -1
- package/types/excalidraw/fonts/{woff2/Xiaolai → Xiaolai}/index.d.ts +1 -1
- package/types/excalidraw/fonts/index.d.ts +1 -87
- package/types/excalidraw/frame.d.ts +11 -5
- package/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
- package/types/excalidraw/index.d.ts +4 -3
- package/types/excalidraw/keys.d.ts +107 -0
- package/types/excalidraw/obsidianUtils.d.ts +9 -4
- package/types/excalidraw/renderer/renderElement.d.ts +3 -2
- package/types/excalidraw/scene/Scene.d.ts +1 -0
- package/types/excalidraw/scene/comparisons.d.ts +1 -0
- package/types/excalidraw/scene/export.d.ts +8 -0
- package/types/excalidraw/scene/types.d.ts +7 -0
- package/types/excalidraw/types.d.ts +25 -1
- package/types/excalidraw/utils.d.ts +7 -1
- package/types/excalidraw/visualdebug.d.ts +8 -1
- package/types/math/line.d.ts +19 -0
- package/types/math/point.d.ts +10 -0
- package/types/math/utils.d.ts +1 -0
- package/types/math/vector.d.ts +4 -0
- package/types/utils/export.d.ts +6 -4
- package/types/excalidraw/components/MagicSettings.d.ts +0 -8
- package/types/excalidraw/components/Stats.d.ts +0 -11
- package/types/excalidraw/data/magic.d.ts +0 -23
- package/types/excalidraw/element/routing.d.ts +0 -12
- package/types/excalidraw/fonts/ExcalidrawFont.d.ts +0 -37
- package/types/excalidraw/fonts/wasm/hb-subset.bindings.d.ts +0 -45
- package/types/excalidraw/fonts/wasm/hb-subset.loader.d.ts +0 -5
- package/types/excalidraw/fonts/wasm/hb-subset.wasm.d.ts +0 -2
- package/types/excalidraw/fonts/wasm/woff2.bindings.d.ts +0 -31
- package/types/excalidraw/fonts/wasm/woff2.loader.d.ts +0 -6
- package/types/excalidraw/fonts/wasm/woff2.wasm.d.ts +0 -2
- package/types/excalidraw/fonts/woff2/Comic/index.d.ts +0 -2
- package/types/excalidraw/ga.d.ts +0 -63
- package/types/excalidraw/gadirections.d.ts +0 -8
- package/types/excalidraw/galines.d.ts +0 -22
- package/types/excalidraw/gapoints.d.ts +0 -7
- package/types/excalidraw/gatransforms.d.ts +0 -10
- package/types/excalidraw/jotai.d.ts +0 -34
- package/types/excalidraw/math.d.ts +0 -79
- package/types/excalidraw/scene/Fonts.d.ts +0 -19
- package/types/utils/geometry/geometry.d.ts +0 -89
- /package/types/excalidraw/fonts/{metadata.d.ts → FontMetadata.d.ts} +0 -0
- /package/types/excalidraw/{fonts/wasm/hb-subset-bindings.d.ts → subset/harfbuzz/harfbuzz-bindings.d.ts} +0 -0
- /package/types/excalidraw/{fonts/wasm/hb-subset-loader.d.ts → subset/harfbuzz/harfbuzz-loader.d.ts} +0 -0
- /package/types/excalidraw/{fonts/wasm/hb-subset-wasm.d.ts → subset/harfbuzz/harfbuzz-wasm.d.ts} +0 -0
- /package/types/excalidraw/{fonts/subset → subset}/subset-main.d.ts +0 -0
- /package/types/excalidraw/{fonts/subset → subset}/subset-shared.chunk.d.ts +0 -0
- /package/types/excalidraw/{fonts/subset → subset}/subset-worker.chunk.d.ts +0 -0
- /package/types/excalidraw/{fonts/wasm → subset/woff2}/woff2-bindings.d.ts +0 -0
- /package/types/excalidraw/{fonts/wasm → subset/woff2}/woff2-loader.d.ts +0 -0
- /package/types/excalidraw/{fonts/wasm → subset/woff2}/woff2-wasm.d.ts +0 -0
|
@@ -82,18 +82,24 @@ export declare const actionToggleSearchMenu: {
|
|
|
82
82
|
openMenu: "canvas" | "shape" | null;
|
|
83
83
|
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
84
84
|
openDialog: {
|
|
85
|
-
name: "
|
|
85
|
+
name: "help" | "imageExport" | "jsonExport";
|
|
86
86
|
} | {
|
|
87
87
|
name: "ttd";
|
|
88
88
|
tab: "mermaid" | "text-to-diagram";
|
|
89
89
|
} | {
|
|
90
90
|
name: "commandPalette";
|
|
91
|
+
} | {
|
|
92
|
+
name: "elementLinkSelector";
|
|
93
|
+
sourceElementId: string;
|
|
91
94
|
} | null;
|
|
92
95
|
defaultSidebarDockedPreference: boolean;
|
|
93
96
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
94
97
|
selectedElementIds: Readonly<{
|
|
95
98
|
[id: string]: true;
|
|
96
99
|
}>;
|
|
100
|
+
hoveredElementIds: Readonly<{
|
|
101
|
+
[id: string]: true;
|
|
102
|
+
}>;
|
|
97
103
|
previousSelectedElementIds: {
|
|
98
104
|
[id: string]: true;
|
|
99
105
|
};
|
|
@@ -194,6 +200,8 @@ export declare const actionToggleSearchMenu: {
|
|
|
194
200
|
objectsSnapModeEnabled: boolean;
|
|
195
201
|
userToFollow: import("../types").UserToFollow | null;
|
|
196
202
|
followedBy: Set<import("../types").SocketId>;
|
|
203
|
+
isCropping: boolean;
|
|
204
|
+
croppingElementId: string | null;
|
|
197
205
|
searchMatches: readonly {
|
|
198
206
|
id: string;
|
|
199
207
|
focus: boolean;
|
|
@@ -286,6 +294,9 @@ export declare const actionToggleSearchMenu: {
|
|
|
286
294
|
selectedElementIds: Readonly<{
|
|
287
295
|
[id: string]: true;
|
|
288
296
|
}>;
|
|
297
|
+
hoveredElementIds: Readonly<{
|
|
298
|
+
[id: string]: true;
|
|
299
|
+
}>;
|
|
289
300
|
previousSelectedElementIds: {
|
|
290
301
|
[id: string]: true;
|
|
291
302
|
};
|
|
@@ -386,6 +397,8 @@ export declare const actionToggleSearchMenu: {
|
|
|
386
397
|
objectsSnapModeEnabled: boolean;
|
|
387
398
|
userToFollow: import("../types").UserToFollow | null;
|
|
388
399
|
followedBy: Set<import("../types").SocketId>;
|
|
400
|
+
isCropping: boolean;
|
|
401
|
+
croppingElementId: string | null;
|
|
389
402
|
searchMatches: readonly {
|
|
390
403
|
id: string;
|
|
391
404
|
focus: boolean;
|
|
@@ -87,18 +87,24 @@ export declare const actionToggleStats: {
|
|
|
87
87
|
tab?: string | undefined;
|
|
88
88
|
} | null;
|
|
89
89
|
openDialog: {
|
|
90
|
-
name: "
|
|
90
|
+
name: "help" | "imageExport" | "jsonExport";
|
|
91
91
|
} | {
|
|
92
92
|
name: "ttd";
|
|
93
93
|
tab: "mermaid" | "text-to-diagram";
|
|
94
94
|
} | {
|
|
95
95
|
name: "commandPalette";
|
|
96
|
+
} | {
|
|
97
|
+
name: "elementLinkSelector";
|
|
98
|
+
sourceElementId: string;
|
|
96
99
|
} | null;
|
|
97
100
|
defaultSidebarDockedPreference: boolean;
|
|
98
101
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
99
102
|
selectedElementIds: Readonly<{
|
|
100
103
|
[id: string]: true;
|
|
101
104
|
}>;
|
|
105
|
+
hoveredElementIds: Readonly<{
|
|
106
|
+
[id: string]: true;
|
|
107
|
+
}>;
|
|
102
108
|
previousSelectedElementIds: {
|
|
103
109
|
[id: string]: true;
|
|
104
110
|
};
|
|
@@ -195,6 +201,8 @@ export declare const actionToggleStats: {
|
|
|
195
201
|
objectsSnapModeEnabled: boolean;
|
|
196
202
|
userToFollow: import("../types").UserToFollow | null;
|
|
197
203
|
followedBy: Set<import("../types").SocketId>;
|
|
204
|
+
isCropping: boolean;
|
|
205
|
+
croppingElementId: string | null;
|
|
198
206
|
searchMatches: readonly {
|
|
199
207
|
id: string;
|
|
200
208
|
focus: boolean;
|
|
@@ -84,18 +84,24 @@ export declare const actionToggleViewMode: {
|
|
|
84
84
|
tab?: string | undefined;
|
|
85
85
|
} | null;
|
|
86
86
|
openDialog: {
|
|
87
|
-
name: "
|
|
87
|
+
name: "help" | "imageExport" | "jsonExport";
|
|
88
88
|
} | {
|
|
89
89
|
name: "ttd";
|
|
90
90
|
tab: "mermaid" | "text-to-diagram";
|
|
91
91
|
} | {
|
|
92
92
|
name: "commandPalette";
|
|
93
|
+
} | {
|
|
94
|
+
name: "elementLinkSelector";
|
|
95
|
+
sourceElementId: string;
|
|
93
96
|
} | null;
|
|
94
97
|
defaultSidebarDockedPreference: boolean;
|
|
95
98
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
96
99
|
selectedElementIds: Readonly<{
|
|
97
100
|
[id: string]: true;
|
|
98
101
|
}>;
|
|
102
|
+
hoveredElementIds: Readonly<{
|
|
103
|
+
[id: string]: true;
|
|
104
|
+
}>;
|
|
99
105
|
previousSelectedElementIds: {
|
|
100
106
|
[id: string]: true;
|
|
101
107
|
};
|
|
@@ -195,6 +201,8 @@ export declare const actionToggleViewMode: {
|
|
|
195
201
|
objectsSnapModeEnabled: boolean;
|
|
196
202
|
userToFollow: import("../types").UserToFollow | null;
|
|
197
203
|
followedBy: Set<import("../types").SocketId>;
|
|
204
|
+
isCropping: boolean;
|
|
205
|
+
croppingElementId: string | null;
|
|
198
206
|
searchMatches: readonly {
|
|
199
207
|
id: string;
|
|
200
208
|
focus: boolean;
|
|
@@ -84,18 +84,24 @@ export declare const actionToggleZenMode: {
|
|
|
84
84
|
tab?: string | undefined;
|
|
85
85
|
} | null;
|
|
86
86
|
openDialog: {
|
|
87
|
-
name: "
|
|
87
|
+
name: "help" | "imageExport" | "jsonExport";
|
|
88
88
|
} | {
|
|
89
89
|
name: "ttd";
|
|
90
90
|
tab: "mermaid" | "text-to-diagram";
|
|
91
91
|
} | {
|
|
92
92
|
name: "commandPalette";
|
|
93
|
+
} | {
|
|
94
|
+
name: "elementLinkSelector";
|
|
95
|
+
sourceElementId: string;
|
|
93
96
|
} | null;
|
|
94
97
|
defaultSidebarDockedPreference: boolean;
|
|
95
98
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
96
99
|
selectedElementIds: Readonly<{
|
|
97
100
|
[id: string]: true;
|
|
98
101
|
}>;
|
|
102
|
+
hoveredElementIds: Readonly<{
|
|
103
|
+
[id: string]: true;
|
|
104
|
+
}>;
|
|
99
105
|
previousSelectedElementIds: {
|
|
100
106
|
[id: string]: true;
|
|
101
107
|
};
|
|
@@ -195,6 +201,8 @@ export declare const actionToggleZenMode: {
|
|
|
195
201
|
objectsSnapModeEnabled: boolean;
|
|
196
202
|
userToFollow: import("../types").UserToFollow | null;
|
|
197
203
|
followedBy: Set<import("../types").SocketId>;
|
|
204
|
+
isCropping: boolean;
|
|
205
|
+
croppingElementId: string | null;
|
|
198
206
|
searchMatches: readonly {
|
|
199
207
|
id: string;
|
|
200
208
|
focus: boolean;
|
|
@@ -24,3 +24,4 @@ export { actionLink } from "./actionLink";
|
|
|
24
24
|
export { actionToggleElementLock } from "./actionElementLock";
|
|
25
25
|
export { actionToggleLinearEditor } from "./actionLinearEditor";
|
|
26
26
|
export { actionToggleSearchMenu } from "./actionToggleSearchMenu";
|
|
27
|
+
export { actionToggleCropEditor } from "./actionCropEditor";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { SubtypeOf } from "../utility-types";
|
|
2
2
|
import type { ActionName } from "./types";
|
|
3
|
-
export type ShortcutName = SubtypeOf<ActionName, "toggleTheme" | "loadScene" | "clearCanvas" | "cut" | "copy" | "paste" | "copyStyles" | "pasteStyles" | "selectAll" | "deleteSelectedElements" | "duplicateSelection" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyAsPng" | "group" | "ungroup" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "addToLibrary" | "viewMode" | "flipHorizontal" | "flipVertical" | "hyperlink" | "toggleElementLock" | "toggleLaserPointerTool" | "resetZoom" | "zoomOut" | "zoomIn" | "zoomToFit" | "zoomToFitSelectionInViewport" | "zoomToFitSelection" | "toggleEraserTool" | "toggleHandTool" | "setFrameAsActiveTool" | "saveFileToDisk" | "saveToActiveFile" | "toggleShortcuts"> | "saveScene" | "imageExport" | "commandPalette" | "searchMenu";
|
|
3
|
+
export type ShortcutName = SubtypeOf<ActionName, "toggleTheme" | "loadScene" | "clearCanvas" | "cut" | "copy" | "paste" | "copyStyles" | "pasteStyles" | "selectAll" | "deleteSelectedElements" | "duplicateSelection" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyAsPng" | "group" | "ungroup" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "addToLibrary" | "viewMode" | "flipHorizontal" | "flipVertical" | "hyperlink" | "toggleElementLock" | "toggleLaserPointerTool" | "resetZoom" | "zoomOut" | "zoomIn" | "zoomToFit" | "zoomToFitSelectionInViewport" | "zoomToFitSelection" | "toggleEraserTool" | "toggleHandTool" | "setFrameAsActiveTool" | "saveFileToDisk" | "saveToActiveFile" | "toggleShortcuts" | "wrapSelectionInFrame"> | "saveScene" | "imageExport" | "commandPalette" | "searchMenu";
|
|
4
4
|
export declare const getShortcutFromShortcutName: (name: ShortcutName, idx?: number) => string;
|
|
@@ -14,7 +14,7 @@ export type ActionResult = {
|
|
|
14
14
|
type ActionFn = (elements: readonly OrderedExcalidrawElement[], appState: Readonly<AppState>, formData: any, 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" | "zenMode" | "objectsSnapMode" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeArrowType" | "changeOpacity" | "changeFontSize" | "toggleCanvasMenu" | "toggleEditMenu" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "clearCanvas" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "flipHorizontal" | "flipVertical" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "toggleEraserTool" | "toggleHandTool" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "setFrameAsActiveTool" | "setEmbeddableAsActiveTool" | "createContainerFromText" | "wrapTextInContainer" | "toggleLaserPointerTool" | "commandPalette" | "autoResize" | "elementStats" | "searchMenu";
|
|
17
|
+
export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeArrowType" | "changeOpacity" | "changeFontSize" | "toggleCanvasMenu" | "toggleEditMenu" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "clearCanvas" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "flipHorizontal" | "flipVertical" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "toggleEraserTool" | "toggleHandTool" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "setFrameAsActiveTool" | "setEmbeddableAsActiveTool" | "createContainerFromText" | "wrapTextInContainer" | "toggleLaserPointerTool" | "commandPalette" | "autoResize" | "elementStats" | "searchMenu" | "copyElementLink" | "linkToElement" | "cropEditor" | "wrapSelectionInFrame";
|
|
18
18
|
export type PanelComponentProps = {
|
|
19
19
|
elements: readonly ExcalidrawElement[];
|
|
20
20
|
appState: AppState;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ElementsMap, ExcalidrawElement } from "./element/types";
|
|
2
|
+
import type Scene from "./scene/Scene";
|
|
2
3
|
export interface Alignment {
|
|
3
4
|
position: "start" | "center" | "end";
|
|
4
5
|
axis: "x" | "y";
|
|
5
6
|
}
|
|
6
|
-
export declare const alignElements: (selectedElements: ExcalidrawElement[], elementsMap: ElementsMap, alignment: Alignment) => ExcalidrawElement[];
|
|
7
|
+
export declare const alignElements: (selectedElements: ExcalidrawElement[], elementsMap: ElementsMap, alignment: Alignment, scene: Scene) => ExcalidrawElement[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ElementUpdate } from "./element/mutateElement";
|
|
2
|
-
import type { OrderedExcalidrawElement, SceneElementsMap } from "./element/types";
|
|
2
|
+
import type { ExcalidrawElement, Ordered, OrderedExcalidrawElement, SceneElementsMap } from "./element/types";
|
|
3
3
|
import type { AppState, ObservedAppState } from "./types";
|
|
4
4
|
import type { ValueOf } from "./utility-types";
|
|
5
5
|
/**
|
|
@@ -116,7 +116,7 @@ export declare class AppStateChange implements Change<AppState> {
|
|
|
116
116
|
private static stripElementsProps;
|
|
117
117
|
private static stripStandaloneProps;
|
|
118
118
|
}
|
|
119
|
-
type ElementPartial = Omit<ElementUpdate<
|
|
119
|
+
type ElementPartial<T extends ExcalidrawElement = ExcalidrawElement> = Omit<ElementUpdate<Ordered<T>>, "seed">;
|
|
120
120
|
/**
|
|
121
121
|
* Elements change is a low level primitive to capture a change between two sets of elements.
|
|
122
122
|
* It does so by encapsulating forward and backward `Delta`s, allowing to time-travel in both directions.
|
|
@@ -21,8 +21,17 @@ export declare const probablySupportsClipboardWriteText: boolean;
|
|
|
21
21
|
export declare const probablySupportsClipboardBlob: boolean;
|
|
22
22
|
export declare const createPasteEvent: ({ types, files, }: {
|
|
23
23
|
types?: {
|
|
24
|
-
"text/
|
|
25
|
-
"text/
|
|
24
|
+
"text/plain"?: string | File | undefined;
|
|
25
|
+
"text/html"?: string | File | undefined;
|
|
26
|
+
"image/svg+xml"?: string | File | undefined;
|
|
27
|
+
"image/png"?: string | File | undefined;
|
|
28
|
+
"image/jpeg"?: string | File | undefined;
|
|
29
|
+
"image/gif"?: string | File | undefined;
|
|
30
|
+
"image/webp"?: string | File | undefined;
|
|
31
|
+
"image/bmp"?: string | File | undefined;
|
|
32
|
+
"image/x-icon"?: string | File | undefined;
|
|
33
|
+
"image/avif"?: string | File | undefined;
|
|
34
|
+
"image/jfif"?: string | File | undefined;
|
|
26
35
|
} | undefined;
|
|
27
36
|
files?: File[] | undefined;
|
|
28
37
|
}) => ClipboardEvent;
|
|
@@ -31,12 +40,25 @@ export declare const serializeAsClipboardJSON: ({ elements, files, }: {
|
|
|
31
40
|
files: BinaryFiles | null;
|
|
32
41
|
}) => string;
|
|
33
42
|
export declare const copyToClipboard: (elements: readonly NonDeletedExcalidrawElement[], files: BinaryFiles | null, clipboardEvent?: ClipboardEvent | null) => Promise<void>;
|
|
43
|
+
/**
|
|
44
|
+
* Reads OS clipboard programmatically. May not work on all browsers.
|
|
45
|
+
* Will prompt user for permission if not granted.
|
|
46
|
+
*/
|
|
34
47
|
export declare const readSystemClipboard: () => Promise<{
|
|
35
|
-
"text/
|
|
36
|
-
"text/
|
|
48
|
+
"text/plain"?: string | File | undefined;
|
|
49
|
+
"text/html"?: string | File | undefined;
|
|
50
|
+
"image/svg+xml"?: string | File | undefined;
|
|
51
|
+
"image/png"?: string | File | undefined;
|
|
52
|
+
"image/jpeg"?: string | File | undefined;
|
|
53
|
+
"image/gif"?: string | File | undefined;
|
|
54
|
+
"image/webp"?: string | File | undefined;
|
|
55
|
+
"image/bmp"?: string | File | undefined;
|
|
56
|
+
"image/x-icon"?: string | File | undefined;
|
|
57
|
+
"image/avif"?: string | File | undefined;
|
|
58
|
+
"image/jfif"?: string | File | undefined;
|
|
37
59
|
}>;
|
|
38
60
|
/**
|
|
39
|
-
* Attempts to parse clipboard
|
|
61
|
+
* Attempts to parse clipboard event.
|
|
40
62
|
*/
|
|
41
63
|
export declare const parseClipboard: (event: ClipboardEvent, isPlainPaste?: boolean) => Promise<ClipboardData>;
|
|
42
64
|
export declare const copyBlobToClipboardAsPng: (blob: Blob | Promise<Blob>) => Promise<void>;
|
|
@@ -4,10 +4,11 @@ import type { AppClassProperties, AppProps, UIAppState, Zoom } from "../types";
|
|
|
4
4
|
import "./Actions.scss";
|
|
5
5
|
export declare const canChangeStrokeColor: (appState: UIAppState, targetElements: ExcalidrawElement[]) => boolean;
|
|
6
6
|
export declare const canChangeBackgroundColor: (appState: UIAppState, targetElements: ExcalidrawElement[]) => boolean;
|
|
7
|
-
export declare const SelectedShapeActions: ({ appState, elementsMap, renderAction, }: {
|
|
7
|
+
export declare const SelectedShapeActions: ({ appState, elementsMap, renderAction, app, }: {
|
|
8
8
|
appState: UIAppState;
|
|
9
9
|
elementsMap: NonDeletedElementsMap | NonDeletedSceneElementsMap;
|
|
10
10
|
renderAction: ActionManager["renderAction"];
|
|
11
|
+
app: AppClassProperties;
|
|
11
12
|
}) => JSX.Element;
|
|
12
13
|
export declare const ShapesSwitcher: ({ activeTool, appState, app, UIOptions, }: {
|
|
13
14
|
activeTool: UIAppState["activeTool"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const activeConfirmDialogAtom: import("jotai").PrimitiveAtom<"clearCanvas" | null> & {
|
|
1
|
+
export declare const activeConfirmDialogAtom: import("jotai/vanilla/atom").PrimitiveAtom<"clearCanvas" | null> & {
|
|
2
2
|
init: "clearCanvas" | null;
|
|
3
3
|
};
|
|
4
4
|
export declare const ActiveConfirmDialog: () => JSX.Element | null;
|
|
@@ -5,7 +5,7 @@ import type { ActionResult } from "../actions/types";
|
|
|
5
5
|
import { type EXPORT_IMAGE_TYPES } from "../constants";
|
|
6
6
|
import type { ExportedElements } from "../data";
|
|
7
7
|
import { LinearElementEditor } from "../element/linearElementEditor";
|
|
8
|
-
import type { ExcalidrawElement, ExcalidrawLinearElement, NonDeleted, NonDeletedExcalidrawElement, ExcalidrawFrameLikeElement, ExcalidrawIframeElement, ExcalidrawEmbeddableElement, Ordered } from "../element/types";
|
|
8
|
+
import type { ExcalidrawElement, ExcalidrawLinearElement, NonDeleted, InitializedExcalidrawImageElement, ExcalidrawImageElement, NonDeletedExcalidrawElement, ExcalidrawFrameLikeElement, ExcalidrawIframeElement, ExcalidrawEmbeddableElement, Ordered } from "../element/types";
|
|
9
9
|
import { History } from "../history";
|
|
10
10
|
import Scene from "../scene/Scene";
|
|
11
11
|
import type { AppClassProperties, AppProps, AppState, ExcalidrawImperativeAPI, BinaryFiles, LibraryItems, SceneData, Device, FrameNameBoundsCache, SidebarName, SidebarTabName, ToolType, OnUserFollowedPayload, GenerateDiagramToCode, NullableGridSize, Offsets } from "../types";
|
|
@@ -86,6 +86,10 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
86
86
|
lastPointerDownEvent: React.PointerEvent<HTMLElement> | null;
|
|
87
87
|
lastPointerUpEvent: React.PointerEvent<HTMLElement> | PointerEvent | null;
|
|
88
88
|
lastPointerMoveEvent: PointerEvent | null;
|
|
89
|
+
lastPointerMoveCoords: {
|
|
90
|
+
x: number;
|
|
91
|
+
y: number;
|
|
92
|
+
} | null;
|
|
89
93
|
lastViewportPosition: {
|
|
90
94
|
x: number;
|
|
91
95
|
y: number;
|
|
@@ -245,6 +249,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
245
249
|
private renderEmbeddables;
|
|
246
250
|
private getFrameNameDOMId;
|
|
247
251
|
frameNameBoundsCache: FrameNameBoundsCache;
|
|
252
|
+
private resetEditingFrame;
|
|
248
253
|
private renderFrameNames;
|
|
249
254
|
private toggleOverscrollBehavior;
|
|
250
255
|
render(): JSX.Element;
|
|
@@ -328,7 +333,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
328
333
|
*/
|
|
329
334
|
zoomCanvas: (value: number) => void;
|
|
330
335
|
private cancelInProgressAnimation;
|
|
331
|
-
scrollToContent: (target?: ExcalidrawElement | readonly ExcalidrawElement[], opts?: ({
|
|
336
|
+
scrollToContent: (target?: string | ExcalidrawElement | readonly ExcalidrawElement[], opts?: ({
|
|
332
337
|
fitToContent?: boolean;
|
|
333
338
|
fitToViewport?: never;
|
|
334
339
|
viewportZoomFactor?: number;
|
|
@@ -352,6 +357,10 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
352
357
|
/** use when changing scrollX/scrollY/zoom based on user interaction */
|
|
353
358
|
private translateCanvas;
|
|
354
359
|
zoomToFit: (target?: readonly ExcalidrawElement[], maxZoom?: number, margin?: number) => void;
|
|
360
|
+
getColorAtScenePoint: ({ sceneX, sceneY, }: {
|
|
361
|
+
sceneX: number;
|
|
362
|
+
sceneY: number;
|
|
363
|
+
}) => string | null;
|
|
355
364
|
startLineEditor: (el: ExcalidrawLinearElement, selectedPointsIndices?: number[] | null) => void;
|
|
356
365
|
updateContainerSize: (containers: NonDeletedExcalidrawElement[]) => void;
|
|
357
366
|
setToast: (toast: {
|
|
@@ -360,7 +369,10 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
360
369
|
duration?: number;
|
|
361
370
|
} | null) => void;
|
|
362
371
|
restoreFileFromShare: () => Promise<void>;
|
|
363
|
-
/**
|
|
372
|
+
/**
|
|
373
|
+
* adds supplied files to existing files in the appState.
|
|
374
|
+
* NOTE if file already exists in editor state, the file data is not updated
|
|
375
|
+
* */
|
|
364
376
|
addFiles: ExcalidrawImperativeAPI["addFiles"];
|
|
365
377
|
setMobileModeAllowed: ExcalidrawImperativeAPI["setMobileModeAllowed"];
|
|
366
378
|
private debounceClearHighlightSearchResults;
|
|
@@ -369,6 +381,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
369
381
|
bringForward: ExcalidrawImperativeAPI["bringForward"];
|
|
370
382
|
sendToBack: ExcalidrawImperativeAPI["sendToBack"];
|
|
371
383
|
sendBackward: ExcalidrawImperativeAPI["sendBackward"];
|
|
384
|
+
private addMissingFiles;
|
|
372
385
|
updateScene: <K extends keyof AppState>(sceneData: {
|
|
373
386
|
elements?: SceneData["elements"];
|
|
374
387
|
appState?: Pick<AppState, K> | null | undefined;
|
|
@@ -426,6 +439,8 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
426
439
|
private getTextBindableContainerAtPosition;
|
|
427
440
|
private startTextEditing;
|
|
428
441
|
private debounceDoubleClickTimestamp;
|
|
442
|
+
private startImageCropping;
|
|
443
|
+
private finishImageCropping;
|
|
429
444
|
private handleCanvasDoubleClick;
|
|
430
445
|
private getElementLinkAtPosition;
|
|
431
446
|
private redirectToLink;
|
|
@@ -486,10 +501,10 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
486
501
|
/**
|
|
487
502
|
* inserts image into elements array and rerenders
|
|
488
503
|
*/
|
|
489
|
-
|
|
504
|
+
insertImageElement: (imageElement: ExcalidrawImageElement, imageFile: File, showCursorImagePreview?: boolean) => Promise<NonDeleted<InitializedExcalidrawImageElement> | null | undefined>;
|
|
490
505
|
private setImagePreviewCursor;
|
|
491
506
|
private onImageAction;
|
|
492
|
-
|
|
507
|
+
initializeImageDimensions: (imageElement: ExcalidrawImageElement, forceNaturalSize?: boolean) => void;
|
|
493
508
|
/** updates image cache, refreshing updated elements and/or setting status
|
|
494
509
|
to error for images that fail during <img> element creation */
|
|
495
510
|
private updateImageCache;
|
|
@@ -508,6 +523,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
508
523
|
loadFileToCanvas: (file: File, fileHandle: FileSystemHandle | null) => Promise<void>;
|
|
509
524
|
private handleCanvasContextMenu;
|
|
510
525
|
private maybeDragNewGenericElement;
|
|
526
|
+
private maybeHandleCrop;
|
|
511
527
|
private maybeHandleResize;
|
|
512
528
|
private getContextMenuItems;
|
|
513
529
|
private handleWheel;
|
|
@@ -14,7 +14,7 @@ export declare const isCustomColor: ({ color, palette, }: {
|
|
|
14
14
|
}) => boolean;
|
|
15
15
|
export declare const getMostUsedCustomColors: (elements: readonly ExcalidrawElement[], type: "elementBackground" | "elementStroke", palette: ColorPaletteCustom) => string[];
|
|
16
16
|
export type ActiveColorPickerSectionAtomType = "custom" | "baseColors" | "shades" | "hex" | null;
|
|
17
|
-
export declare const activeColorPickerSectionAtom: import("jotai").PrimitiveAtom<ActiveColorPickerSectionAtomType> & {
|
|
17
|
+
export declare const activeColorPickerSectionAtom: import("jotai/vanilla/atom").PrimitiveAtom<ActiveColorPickerSectionAtomType> & {
|
|
18
18
|
init: ActiveColorPickerSectionAtomType;
|
|
19
19
|
};
|
|
20
20
|
export declare const getContrastYIQ: (bgHex: string, isCustomColor: boolean) => "white" | "black";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AppProps, UIAppState } from "../types";
|
|
2
|
+
import type { ElementsMap, ExcalidrawElement } from "../element/types";
|
|
3
|
+
import "./ElementLinkDialog.scss";
|
|
4
|
+
declare const ElementLinkDialog: ({ sourceElementId, onClose, elementsMap, appState, generateLinkForSelection, }: {
|
|
5
|
+
sourceElementId: ExcalidrawElement["id"];
|
|
6
|
+
elementsMap: ElementsMap;
|
|
7
|
+
appState: UIAppState;
|
|
8
|
+
onClose?: (() => void) | undefined;
|
|
9
|
+
generateLinkForSelection: AppProps["generateLinkForSelection"];
|
|
10
|
+
}) => JSX.Element;
|
|
11
|
+
export default ElementLinkDialog;
|
|
@@ -13,7 +13,7 @@ export type EyeDropperProperties = {
|
|
|
13
13
|
**/
|
|
14
14
|
colorPickerType: ColorPickerType;
|
|
15
15
|
};
|
|
16
|
-
export declare const activeEyeDropperAtom: import("jotai").PrimitiveAtom<EyeDropperProperties | null> & {
|
|
16
|
+
export declare const activeEyeDropperAtom: import("jotai/vanilla/atom").PrimitiveAtom<EyeDropperProperties | null> & {
|
|
17
17
|
init: EyeDropperProperties | null;
|
|
18
18
|
};
|
|
19
19
|
export declare const EyeDropper: React.FC<{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./IconPicker.scss";
|
|
2
|
-
export declare function IconPicker<T>({ value, label, options, onChange, group, }: {
|
|
2
|
+
export declare function IconPicker<T>({ value, label, options, onChange, group, numberOfOptionsToAlwaysShow, }: {
|
|
3
3
|
label: string;
|
|
4
4
|
value: T;
|
|
5
5
|
options: readonly {
|
|
@@ -7,8 +7,8 @@ export declare function IconPicker<T>({ value, label, options, onChange, group,
|
|
|
7
7
|
text: string;
|
|
8
8
|
icon: JSX.Element;
|
|
9
9
|
keyBinding: string | null;
|
|
10
|
-
showInPicker?: boolean;
|
|
11
10
|
}[];
|
|
12
11
|
onChange: (value: T) => void;
|
|
12
|
+
numberOfOptionsToAlwaysShow?: number;
|
|
13
13
|
group?: string;
|
|
14
14
|
}): JSX.Element;
|
|
@@ -25,6 +25,7 @@ interface LayerUIProps {
|
|
|
25
25
|
children?: React.ReactNode;
|
|
26
26
|
app: AppClassProperties;
|
|
27
27
|
isCollaborating: boolean;
|
|
28
|
+
generateLinkForSelection?: AppProps["generateLinkForSelection"];
|
|
28
29
|
}
|
|
29
|
-
declare const _default: React.MemoExoticComponent<({ actionManager, appState, files, setAppState, elements, canvas, onLockToggle, onHandToolToggle, onPenModeToggle, showExitZenModeBtn, renderTopRightUI, renderCustomStats, UIOptions, onExportImage, renderWelcomeScreen, children, app, isCollaborating, }: LayerUIProps) => JSX.Element>;
|
|
30
|
+
declare const _default: React.MemoExoticComponent<({ actionManager, appState, files, setAppState, elements, canvas, onLockToggle, onHandToolToggle, onPenModeToggle, showExitZenModeBtn, renderTopRightUI, renderCustomStats, UIOptions, onExportImage, renderWelcomeScreen, children, app, isCollaborating, generateLinkForSelection, }: LayerUIProps) => JSX.Element>;
|
|
30
31
|
export default _default;
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import type Library from "../data/library";
|
|
3
3
|
import type { LibraryItems, LibraryItem, ExcalidrawProps, UIAppState } from "../types";
|
|
4
4
|
import "./LibraryMenu.scss";
|
|
5
|
-
export declare const isLibraryMenuOpenAtom: import("jotai").PrimitiveAtom<boolean> & {
|
|
5
|
+
export declare const isLibraryMenuOpenAtom: import("jotai/vanilla/atom").PrimitiveAtom<boolean> & {
|
|
6
6
|
init: boolean;
|
|
7
7
|
};
|
|
8
8
|
export declare const LibraryMenuContent: ({ onInsertLibraryItems, pendingElements, onAddToLibrary, setAppState, libraryReturnUrl, library, id, theme, selectedItems, onSelectItems, }: {
|
|
@@ -11,7 +11,7 @@ export type OverwriteConfirmState = {
|
|
|
11
11
|
} | {
|
|
12
12
|
active: false;
|
|
13
13
|
};
|
|
14
|
-
export declare const overwriteConfirmStateAtom: import("jotai").PrimitiveAtom<OverwriteConfirmState> & {
|
|
14
|
+
export declare const overwriteConfirmStateAtom: import("jotai/vanilla/atom").PrimitiveAtom<OverwriteConfirmState> & {
|
|
15
15
|
init: OverwriteConfirmState;
|
|
16
16
|
};
|
|
17
17
|
export declare function openConfirmModal({ title, description, actionLabel, color, }: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./SearchMenu.scss";
|
|
2
|
-
export declare const searchItemInFocusAtom: import("jotai").PrimitiveAtom<number | null> & {
|
|
2
|
+
export declare const searchItemInFocusAtom: import("jotai/vanilla/atom").PrimitiveAtom<number | null> & {
|
|
3
3
|
init: number | null;
|
|
4
4
|
};
|
|
5
5
|
export declare const SearchMenu: () => JSX.Element;
|
|
@@ -8,7 +8,7 @@ import "./Sidebar.scss";
|
|
|
8
8
|
*
|
|
9
9
|
* Since we can only render one Sidebar at a time, we can use a simple flag.
|
|
10
10
|
*/
|
|
11
|
-
export declare const isSidebarDockedAtom: import("jotai").PrimitiveAtom<boolean> & {
|
|
11
|
+
export declare const isSidebarDockedAtom: import("jotai/vanilla/atom").PrimitiveAtom<boolean> & {
|
|
12
12
|
init: boolean;
|
|
13
13
|
};
|
|
14
14
|
export declare const SidebarInner: React.ForwardRefExoticComponent<Omit<{
|
|
@@ -3,6 +3,7 @@ interface CollapsibleProps {
|
|
|
3
3
|
open: boolean;
|
|
4
4
|
openTrigger: () => void;
|
|
5
5
|
children: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
6
7
|
}
|
|
7
|
-
declare const Collapsible: ({ label, open, openTrigger, children, }: CollapsibleProps) => JSX.Element;
|
|
8
|
+
declare const Collapsible: ({ label, open, openTrigger, children, className, }: CollapsibleProps) => JSX.Element;
|
|
8
9
|
export default Collapsible;
|
|
@@ -14,7 +14,6 @@ export declare const newOrigin: (x1: number, y1: number, w1: number, h1: number,
|
|
|
14
14
|
x: number;
|
|
15
15
|
y: number;
|
|
16
16
|
};
|
|
17
|
-
export declare const resizeElement: (nextWidth: number, nextHeight: number, keepAspectRatio: boolean, origElement: ExcalidrawElement, elementsMap: NonDeletedSceneElementsMap, elements: readonly NonDeletedExcalidrawElement[], scene: Scene, shouldInformMutation?: boolean) => void;
|
|
18
17
|
export declare const moveElement: (newTopLeftX: number, newTopLeftY: number, originalElement: ExcalidrawElement, elementsMap: NonDeletedSceneElementsMap, elements: readonly NonDeletedExcalidrawElement[], scene: Scene, originalElementsMap: ElementsMap, shouldInformMutation?: boolean) => void;
|
|
19
18
|
export declare const getAtomicUnits: (targetElements: readonly ExcalidrawElement[], appState: AppState) => AtomicUnit[];
|
|
20
19
|
export declare const updateBindings: (latestElement: ExcalidrawElement, elementsMap: NonDeletedSceneElementsMap, elements: readonly NonDeletedExcalidrawElement[], scene: Scene, options?: {
|
|
@@ -23,4 +22,5 @@ export declare const updateBindings: (latestElement: ExcalidrawElement, elements
|
|
|
23
22
|
width: number;
|
|
24
23
|
height: number;
|
|
25
24
|
};
|
|
25
|
+
zoom?: AppState["zoom"];
|
|
26
26
|
}) => void;
|
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { NonDeletedExcalidrawElement } from "../../element/types";
|
|
2
2
|
import "./MermaidToExcalidraw.scss";
|
|
3
3
|
import type { MermaidToExcalidrawLibProps } from "./common";
|
|
4
|
-
import type { MermaidOptions } from "@zsviczian/mermaid-to-excalidraw";
|
|
5
4
|
declare const MermaidToExcalidraw: ({ mermaidToExcalidrawLib, selectedElements, }: {
|
|
6
5
|
mermaidToExcalidrawLib: MermaidToExcalidrawLibProps;
|
|
7
6
|
selectedElements: readonly NonDeletedExcalidrawElement[];
|
|
8
7
|
}) => JSX.Element;
|
|
9
8
|
export default MermaidToExcalidraw;
|
|
10
|
-
export declare const mermaidToExcalidraw: (mermaidDefinition: string, opts?: MermaidOptions, forceSVG?: boolean) => Promise<{
|
|
11
|
-
elements?: ExcalidrawElement[];
|
|
12
|
-
files?: any;
|
|
13
|
-
error?: string;
|
|
14
|
-
} | undefined>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { MermaidConfig } from "@zsviczian/mermaid-to-excalidraw";
|
|
2
|
+
import type { ExcalidrawElement } from "../../element/types";
|
|
3
|
+
import type { MermaidToExcalidrawLibProps } from "./common";
|
|
4
|
+
export declare const loadMermaidToExcalidrawLib: () => Promise<MermaidToExcalidrawLibProps>;
|
|
5
|
+
export declare const loadMermaidLib: () => Promise<MermaidToExcalidrawLibProps>;
|
|
6
|
+
export declare const mermaidToExcalidraw: (mermaidDefinition: string, opts: MermaidConfig, forceSVG?: boolean) => Promise<{
|
|
7
|
+
elements?: ExcalidrawElement[];
|
|
8
|
+
files?: any;
|
|
9
|
+
error?: string;
|
|
10
|
+
} | undefined>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { MermaidConfig } from "@zsviczian/mermaid-to-excalidraw";
|
|
2
2
|
import type { MermaidToExcalidrawResult } from "@zsviczian/mermaid-to-excalidraw/dist/interfaces";
|
|
3
3
|
import type { NonDeletedExcalidrawElement } from "../../element/types";
|
|
4
4
|
import type { AppClassProperties, BinaryFiles } from "../../types";
|
|
5
5
|
export interface MermaidToExcalidrawLibProps {
|
|
6
6
|
loaded: boolean;
|
|
7
7
|
api: Promise<{
|
|
8
|
-
parseMermaidToExcalidraw: (definition: string,
|
|
8
|
+
parseMermaidToExcalidraw: (definition: string, config?: MermaidConfig, forceSVG?: boolean) => Promise<MermaidToExcalidrawResult>;
|
|
9
9
|
}>;
|
|
10
10
|
}
|
|
11
11
|
interface ConvertMermaidToExcalidrawFormatProps {
|
|
@@ -13,6 +13,6 @@ export declare const Hyperlink: ({ element, elementsMap, setAppState, onLinkOpen
|
|
|
13
13
|
} | null) => void;
|
|
14
14
|
updateEmbedValidationStatus: (element: ExcalidrawEmbeddableElement, status: boolean) => void;
|
|
15
15
|
}) => JSX.Element | null;
|
|
16
|
-
export declare const getContextMenuLabel: (elements: readonly NonDeletedExcalidrawElement[], appState: UIAppState) => "labels.link.editEmbed" | "labels.link.edit" | "labels.link.
|
|
16
|
+
export declare const getContextMenuLabel: (elements: readonly NonDeletedExcalidrawElement[], appState: UIAppState) => "labels.link.editEmbed" | "labels.link.edit" | "labels.link.create";
|
|
17
17
|
export declare const showHyperlinkTooltip: (element: NonDeletedExcalidrawElement, appState: AppState, elementsMap: ElementsMap) => void;
|
|
18
18
|
export declare const hideHyperlinkToolip: () => void;
|
|
@@ -3,6 +3,7 @@ import type { Bounds } from "../../element/bounds";
|
|
|
3
3
|
import type { ElementsMap, NonDeletedExcalidrawElement } from "../../element/types";
|
|
4
4
|
import type { AppState, UIAppState } from "../../types";
|
|
5
5
|
export declare const EXTERNAL_LINK_IMG: HTMLImageElement;
|
|
6
|
+
export declare const ELEMENT_LINK_IMG: HTMLImageElement;
|
|
6
7
|
export declare const getLinkHandleFromCoords: ([x1, y1, x2, y2]: Bounds, angle: Radians, appState: Pick<UIAppState, "zoom">) => Bounds;
|
|
7
8
|
export declare const isPointHittingLinkIcon: (element: NonDeletedExcalidrawElement, elementsMap: ElementsMap, appState: AppState, [x, y]: GlobalPoint) => boolean;
|
|
8
9
|
export declare const isPointHittingLink: (element: NonDeletedExcalidrawElement, elementsMap: ElementsMap, appState: AppState, [x, y]: GlobalPoint, isMobile: boolean) => boolean;
|
|
@@ -136,6 +136,15 @@ export declare const ArrowheadDiamondIcon: React.MemoExoticComponent<({ flip }:
|
|
|
136
136
|
export declare const ArrowheadDiamondOutlineIcon: React.MemoExoticComponent<({ flip }: {
|
|
137
137
|
flip?: boolean | undefined;
|
|
138
138
|
}) => JSX.Element>;
|
|
139
|
+
export declare const ArrowheadCrowfootIcon: React.MemoExoticComponent<({ flip }: {
|
|
140
|
+
flip?: boolean | undefined;
|
|
141
|
+
}) => JSX.Element>;
|
|
142
|
+
export declare const ArrowheadCrowfootOneIcon: React.MemoExoticComponent<({ flip }: {
|
|
143
|
+
flip?: boolean | undefined;
|
|
144
|
+
}) => JSX.Element>;
|
|
145
|
+
export declare const ArrowheadCrowfootOneOrManyIcon: React.MemoExoticComponent<({ flip }: {
|
|
146
|
+
flip?: boolean | undefined;
|
|
147
|
+
}) => JSX.Element>;
|
|
139
148
|
export declare const FontSizeSmallIcon: JSX.Element;
|
|
140
149
|
export declare const FontSizeMediumIcon: JSX.Element;
|
|
141
150
|
export declare const FontSizeLargeIcon: JSX.Element;
|
|
@@ -209,4 +218,6 @@ export declare const roundArrowIcon: JSX.Element;
|
|
|
209
218
|
export declare const collapseDownIcon: JSX.Element;
|
|
210
219
|
export declare const collapseUpIcon: JSX.Element;
|
|
211
220
|
export declare const upIcon: JSX.Element;
|
|
221
|
+
export declare const cropIcon: JSX.Element;
|
|
222
|
+
export declare const elementLinkIcon: JSX.Element;
|
|
212
223
|
export {};
|