@zsviczian/excalidraw 0.18.0-6 → 0.18.0-60
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 +757 -504
- package/dist/excalidraw.production.min.js +1 -1
- package/dist/excalidraw.production.min.js.LICENSE.txt +0 -2
- package/dist/styles.development.css +1080 -437
- package/dist/styles.production.css +26 -22
- package/package.json +15 -4
- package/types/common/src/commonObsidianUtils.d.ts +20 -0
- package/types/common/src/constants.d.ts +42 -18
- package/types/common/src/editorInterface.d.ts +35 -0
- package/types/{excalidraw → common/src}/emitter.d.ts +1 -1
- package/types/common/src/font-metadata.d.ts +4 -2
- package/types/common/src/index.d.ts +4 -0
- package/types/common/src/utility-types.d.ts +5 -0
- package/types/common/src/utils.d.ts +25 -6
- package/types/{excalidraw → common/src}/visualdebug.d.ts +2 -2
- package/types/{excalidraw/scene → element/src}/Scene.d.ts +16 -15
- package/types/element/src/align.d.ts +4 -3
- package/types/element/src/binding.d.ts +62 -41
- package/types/element/src/bounds.d.ts +14 -6
- package/types/element/src/collision.d.ts +23 -13
- package/types/element/src/cropElement.d.ts +1 -1
- package/types/{excalidraw/change.d.ts → element/src/delta.d.ts} +77 -40
- package/types/element/src/distance.d.ts +2 -2
- package/types/element/src/distribute.d.ts +2 -1
- package/types/element/src/dragElements.d.ts +3 -2
- package/types/element/src/duplicate.d.ts +10 -13
- package/types/element/src/elbowArrow.d.ts +1 -1
- package/types/element/src/flowchart.d.ts +3 -2
- package/types/element/src/fractionalIndex.d.ts +9 -3
- package/types/element/src/frame.d.ts +5 -4
- package/types/element/src/groups.d.ts +1 -0
- package/types/element/src/index.d.ts +44 -5
- package/types/element/src/linearElementEditor.d.ts +34 -50
- package/types/element/src/mutateElement.d.ts +11 -3
- package/types/element/src/newElement.d.ts +6 -4
- package/types/element/src/positionElementsOnGrid.d.ts +2 -0
- package/types/element/src/renderElement.d.ts +5 -2
- package/types/element/src/resizeElements.d.ts +6 -5
- package/types/element/src/resizeTest.d.ts +5 -4
- package/types/element/src/selection.d.ts +11 -5
- package/types/element/src/shape.d.ts +42 -0
- package/types/element/src/sizeHelpers.d.ts +2 -2
- package/types/element/src/store.d.ts +237 -0
- package/types/element/src/textElement.d.ts +4 -3
- package/types/element/src/transformHandles.d.ts +5 -4
- package/types/element/src/typeChecks.d.ts +20 -3
- package/types/element/src/types.d.ts +31 -12
- package/types/element/src/utils.d.ts +17 -6
- package/types/element/src/zindex.d.ts +8 -2
- package/types/excalidraw/actions/actionAddToLibrary.d.ts +88 -58
- package/types/excalidraw/actions/actionAlign.d.ts +6 -6
- package/types/excalidraw/actions/actionBoundText.d.ts +61 -41
- package/types/excalidraw/actions/actionCanvas.d.ts +430 -519
- package/types/excalidraw/actions/actionClipboard.d.ts +81 -944
- package/types/excalidraw/actions/actionCropEditor.d.ts +30 -20
- package/types/excalidraw/actions/actionDeleteSelected.d.ts +97 -68
- package/types/excalidraw/actions/actionDistribute.d.ts +2 -2
- package/types/excalidraw/actions/actionDuplicateSelection.d.ts +2 -2
- package/types/excalidraw/actions/actionElementLink.d.ts +28 -20
- package/types/excalidraw/actions/actionElementLock.d.ts +73 -54
- package/types/excalidraw/actions/actionEmbeddable.d.ts +30 -20
- package/types/excalidraw/actions/actionExport.d.ts +142 -1185
- package/types/excalidraw/actions/actionFinalize.d.ts +10 -424
- package/types/excalidraw/actions/actionFlip.d.ts +2 -2
- package/types/excalidraw/actions/actionFrame.d.ts +176 -129
- package/types/excalidraw/actions/actionGroup.d.ts +60 -40
- package/types/excalidraw/actions/actionHistory.d.ts +1 -2
- package/types/excalidraw/actions/actionLinearEditor.d.ts +564 -22
- package/types/excalidraw/actions/actionLink.d.ts +27 -17
- package/types/excalidraw/actions/actionMenu.d.ts +27 -457
- package/types/excalidraw/actions/actionNavigate.d.ts +21 -431
- package/types/excalidraw/actions/actionProperties.d.ts +169 -2702
- package/types/excalidraw/actions/actionSelectAll.d.ts +30 -20
- package/types/excalidraw/actions/actionStyles.d.ts +31 -21
- package/types/excalidraw/actions/actionTextAutoResize.d.ts +1 -1
- package/types/excalidraw/actions/actionToggleGridMode.d.ts +29 -19
- package/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +29 -19
- package/types/excalidraw/actions/actionToggleSearchMenu.d.ts +27 -224
- package/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +19 -0
- package/types/excalidraw/actions/actionToggleStats.d.ts +29 -19
- package/types/excalidraw/actions/actionToggleViewMode.d.ts +30 -20
- package/types/excalidraw/actions/actionToggleZenMode.d.ts +30 -20
- package/types/excalidraw/actions/actionTrayMenu.d.ts +229 -0
- package/types/excalidraw/actions/actionZindex.d.ts +2 -2
- package/types/excalidraw/actions/index.d.ts +4 -2
- package/types/excalidraw/actions/manager.d.ts +1 -1
- package/types/excalidraw/actions/register.d.ts +1 -1
- package/types/excalidraw/actions/types.d.ts +7 -6
- package/types/excalidraw/appState.d.ts +22 -7
- package/types/excalidraw/clipboard.d.ts +68 -5
- package/types/excalidraw/components/Actions.d.ts +20 -7
- package/types/excalidraw/components/App.d.ts +68 -46
- package/types/excalidraw/components/ButtonIcon.d.ts +1 -0
- package/types/excalidraw/components/ColorPicker/ColorInput.d.ts +2 -1
- package/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +5 -1
- package/types/excalidraw/components/ColorPicker/CustomColorList.d.ts +1 -1
- package/types/excalidraw/components/ColorPicker/Picker.d.ts +4 -3
- package/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +3 -3
- package/types/excalidraw/components/ColorPicker/ShadeList.d.ts +3 -2
- package/types/excalidraw/components/ColorPicker/TopPicks.d.ts +1 -1
- package/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -1
- package/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +1 -1
- package/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +1 -0
- package/types/excalidraw/components/CommandPalette/types.d.ts +1 -2
- package/types/excalidraw/components/ConvertElementTypePopup.d.ts +23 -0
- package/types/excalidraw/components/ElementLinkDialog.d.ts +4 -3
- package/types/excalidraw/components/Ellipsify.d.ts +3 -0
- package/types/excalidraw/components/ExcalidrawLogo.d.ts +1 -1
- package/types/excalidraw/components/FilledButton.d.ts +1 -1
- package/types/excalidraw/components/FixedSideContainer.d.ts +2 -1
- package/types/excalidraw/components/FontPicker/FontPicker.d.ts +2 -1
- package/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +3 -1
- package/types/excalidraw/components/HintViewer.d.ts +4 -3
- package/types/excalidraw/components/InlineIcon.d.ts +3 -1
- package/types/excalidraw/components/LayerUI.d.ts +2 -1
- package/types/excalidraw/components/LibraryMenuSection.d.ts +1 -1
- package/types/excalidraw/components/LinkButton.d.ts +4 -0
- package/types/excalidraw/components/MobileMenu.d.ts +4 -5
- package/types/excalidraw/components/MobileToolBar.d.ts +10 -0
- package/types/excalidraw/components/Popover.d.ts +2 -1
- package/types/excalidraw/components/PropertiesPopover.d.ts +1 -0
- package/types/excalidraw/components/{ButtonIconSelect.d.ts → RadioSelection.d.ts} +1 -1
- package/types/excalidraw/components/Range.d.ts +3 -3
- package/types/excalidraw/components/Section.d.ts +1 -0
- package/types/excalidraw/components/Stats/Angle.d.ts +1 -1
- package/types/excalidraw/components/Stats/CanvasGrid.d.ts +1 -1
- package/types/excalidraw/components/Stats/CanvasGridSize.d.ts +1 -1
- package/types/excalidraw/components/Stats/Collapsible.d.ts +2 -1
- package/types/excalidraw/components/Stats/Dimension.d.ts +1 -1
- package/types/excalidraw/components/Stats/DragInput.d.ts +12 -2
- package/types/excalidraw/components/Stats/FontSize.d.ts +1 -1
- package/types/excalidraw/components/Stats/MultiAngle.d.ts +1 -1
- package/types/excalidraw/components/Stats/MultiDimension.d.ts +1 -1
- package/types/excalidraw/components/Stats/MultiFontSize.d.ts +1 -1
- package/types/excalidraw/components/Stats/MultiPosition.d.ts +1 -1
- package/types/excalidraw/components/Stats/Position.d.ts +1 -1
- package/types/excalidraw/components/Stats/utils.d.ts +4 -11
- package/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +1 -2
- package/types/excalidraw/components/TextField.d.ts +1 -0
- package/types/excalidraw/components/ToolPopover.d.ts +25 -0
- package/types/excalidraw/components/TrayMenu.d.ts +26 -0
- package/types/excalidraw/components/UnlockPopup.d.ts +8 -0
- package/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +7 -3
- package/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +4 -2
- package/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +2 -1
- package/types/excalidraw/components/hyperlink/Hyperlink.d.ts +3 -2
- package/types/excalidraw/components/hyperlink/helpers.d.ts +2 -1
- package/types/excalidraw/components/icons.d.ts +17 -0
- package/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +14 -1
- package/types/excalidraw/components/main-menu/MainMenu.d.ts +0 -3
- package/types/excalidraw/components/shapes.d.ts +115 -5
- package/types/excalidraw/data/blob.d.ts +3 -7
- package/types/excalidraw/data/reconcile.d.ts +1 -0
- package/types/excalidraw/data/restore.d.ts +7 -2
- package/types/excalidraw/data/transform.d.ts +1 -1
- package/types/excalidraw/data/types.d.ts +4 -1
- package/types/excalidraw/editor-jotai.d.ts +6 -6
- package/types/excalidraw/eraser/index.d.ts +0 -2
- package/types/excalidraw/fonts/Fonts.d.ts +1 -1
- package/types/excalidraw/history.d.ts +30 -22
- package/types/excalidraw/hooks/useEmitter.d.ts +1 -1
- package/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
- package/types/excalidraw/hooks/useOutsideClick.d.ts +3 -1
- package/types/excalidraw/hooks/useTextEditorFocus.d.ts +14 -0
- package/types/excalidraw/index.d.ts +16 -15
- package/types/excalidraw/lasso/index.d.ts +1 -0
- package/types/excalidraw/lasso/utils.d.ts +2 -1
- package/types/excalidraw/obsidianUtils.d.ts +22 -9
- package/types/excalidraw/renderer/animation.d.ts +12 -0
- package/types/excalidraw/renderer/helpers.d.ts +3 -2
- package/types/excalidraw/renderer/interactiveScene.d.ts +5 -13
- package/types/excalidraw/renderer/staticScene.d.ts +4 -1
- package/types/excalidraw/scene/Renderer.d.ts +1 -2
- package/types/excalidraw/scene/index.d.ts +2 -2
- package/types/excalidraw/scene/scrollbars.d.ts +2 -3
- package/types/excalidraw/scene/types.d.ts +17 -3
- package/types/excalidraw/shortcut.d.ts +1 -0
- package/types/excalidraw/snapping.d.ts +2 -2
- package/types/excalidraw/types.d.ts +83 -33
- package/types/excalidraw/webpack.dev.config.d.ts +2 -0
- package/types/excalidraw/webpack.prod.config.d.ts +2 -0
- package/types/excalidraw/wysiwyg/textWysiwyg.d.ts +3 -1
- package/types/math/src/angle.d.ts +2 -0
- package/types/math/src/constants.d.ts +3 -0
- package/types/math/src/curve.d.ts +34 -0
- package/types/math/src/index.d.ts +1 -0
- package/types/math/src/point.d.ts +1 -1
- package/types/math/src/rectangle.d.ts +2 -0
- package/types/math/src/segment.d.ts +1 -0
- package/types/math/src/vector.d.ts +8 -2
- package/types/utils/src/bbox.d.ts +1 -1
- package/types/utils/src/index.d.ts +1 -1
- package/types/utils/src/withinBounds.d.ts +1 -1
- package/types/element/src/Shape.d.ts +0 -17
- package/types/element/src/ShapeCache.d.ts +0 -25
- package/types/element/src/shapes.d.ts +0 -23
- package/types/excalidraw/components/ButtonSelect.d.ts +0 -9
- package/types/excalidraw/store.d.ts +0 -129
- package/types/utils/src/collision.d.ts +0 -8
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { type Radians } from "@excalidraw/math";
|
|
1
2
|
import type { AppState } from "@excalidraw/excalidraw/types";
|
|
2
3
|
import type { ExtractSetType } from "@excalidraw/common/utility-types";
|
|
3
|
-
import type {
|
|
4
|
+
import type { Scene } from "./Scene";
|
|
4
5
|
import type { MaybeTransformHandleType } from "./transformHandles";
|
|
5
6
|
import type { ElementsMap, ExcalidrawElement, ExcalidrawElementType, ExcalidrawTextContainer, ExcalidrawTextElement, ExcalidrawTextElementWithContainer, NonDeletedExcalidrawElement } from "./types";
|
|
6
|
-
export declare const redrawTextBoundingBox: (textElement: ExcalidrawTextElement, container: ExcalidrawElement | null,
|
|
7
|
-
export declare const handleBindTextResize: (container: NonDeletedExcalidrawElement,
|
|
7
|
+
export declare const redrawTextBoundingBox: (textElement: ExcalidrawTextElement, container: ExcalidrawElement | null, scene: Scene) => void;
|
|
8
|
+
export declare const handleBindTextResize: (container: NonDeletedExcalidrawElement, scene: Scene, transformHandleType: MaybeTransformHandleType, shouldMaintainAspectRatio?: boolean) => void;
|
|
8
9
|
export declare const computeBoundTextPosition: (container: ExcalidrawElement, boundTextElement: ExcalidrawTextElementWithContainer, elementsMap: ElementsMap) => {
|
|
9
10
|
x: number;
|
|
10
11
|
y: number;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { type EditorInterface } from "@excalidraw/common";
|
|
1
2
|
import type { Radians } from "@excalidraw/math";
|
|
2
|
-
import type {
|
|
3
|
+
import type { InteractiveCanvasAppState, Zoom } from "@excalidraw/excalidraw/types";
|
|
3
4
|
import type { Bounds } from "./bounds";
|
|
4
5
|
import type { ElementsMap, ExcalidrawElement, NonDeletedExcalidrawElement, PointerType } from "./types";
|
|
5
6
|
export type TransformHandleDirection = "n" | "s" | "w" | "e" | "nw" | "ne" | "sw" | "se";
|
|
@@ -28,8 +29,8 @@ export declare const OMIT_SIDES_FOR_FRAME: {
|
|
|
28
29
|
w: boolean;
|
|
29
30
|
rotation: boolean;
|
|
30
31
|
};
|
|
31
|
-
export declare const canResizeFromSides: (
|
|
32
|
-
export declare const
|
|
32
|
+
export declare const canResizeFromSides: (editorInterface: EditorInterface) => boolean;
|
|
33
|
+
export declare const getOmitSidesForEditorInterface: (editorInterface: EditorInterface) => {};
|
|
33
34
|
export declare const getTransformHandlesFromCoords: ([x1, y1, x2, y2, cx, cy]: [number, number, number, number, number, number], angle: Radians, zoom: Zoom, pointerType: PointerType, omitSides?: {
|
|
34
35
|
s?: boolean | undefined;
|
|
35
36
|
n?: boolean | undefined;
|
|
@@ -52,4 +53,4 @@ export declare const getTransformHandles: (element: ExcalidrawElement, zoom: Zoo
|
|
|
52
53
|
se?: boolean | undefined;
|
|
53
54
|
rotation?: boolean | undefined;
|
|
54
55
|
}) => TransformHandles;
|
|
55
|
-
export declare const
|
|
56
|
+
export declare const hasBoundingBox: (elements: readonly NonDeletedExcalidrawElement[], appState: InteractiveCanvasAppState, editorInterface: EditorInterface) => boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ElementOrToolType } from "@excalidraw/excalidraw/types";
|
|
2
2
|
import type { MarkNonNullable } from "@excalidraw/common/utility-types";
|
|
3
3
|
import type { Bounds } from "./bounds";
|
|
4
|
-
import type { ExcalidrawElement, ExcalidrawTextElement, ExcalidrawEmbeddableElement, ExcalidrawLinearElement, ExcalidrawBindableElement, ExcalidrawFreeDrawElement, InitializedExcalidrawImageElement, ExcalidrawImageElement, ExcalidrawTextElementWithContainer, ExcalidrawTextContainer, ExcalidrawFrameElement, RoundnessType, ExcalidrawFrameLikeElement, ExcalidrawElementType, ExcalidrawIframeElement, ExcalidrawIframeLikeElement, ExcalidrawMagicFrameElement, ExcalidrawArrowElement, ExcalidrawElbowArrowElement,
|
|
4
|
+
import type { ExcalidrawElement, ExcalidrawTextElement, ExcalidrawEmbeddableElement, ExcalidrawLinearElement, ExcalidrawBindableElement, ExcalidrawFreeDrawElement, InitializedExcalidrawImageElement, ExcalidrawImageElement, ExcalidrawTextElementWithContainer, ExcalidrawTextContainer, ExcalidrawFrameElement, RoundnessType, ExcalidrawFrameLikeElement, ExcalidrawElementType, ExcalidrawIframeElement, ExcalidrawIframeLikeElement, ExcalidrawMagicFrameElement, ExcalidrawArrowElement, ExcalidrawElbowArrowElement, ExcalidrawLineElement, ExcalidrawFlowchartNodeElement, ExcalidrawLinearElementSubType } from "./types";
|
|
5
5
|
export declare const isInitializedImageElement: (element: ExcalidrawElement | null) => element is InitializedExcalidrawImageElement;
|
|
6
6
|
export declare const isImageElement: (element: ExcalidrawElement | null) => element is ExcalidrawImageElement;
|
|
7
7
|
export declare const isEmbeddableElement: (element: ExcalidrawElement | null | undefined) => element is ExcalidrawEmbeddableElement;
|
|
@@ -14,10 +14,17 @@ export declare const isFrameLikeElement: (element: ExcalidrawElement | null) =>
|
|
|
14
14
|
export declare const isFreeDrawElement: (element?: ExcalidrawElement | null) => element is ExcalidrawFreeDrawElement;
|
|
15
15
|
export declare const isFreeDrawElementType: (elementType: ExcalidrawElementType) => boolean;
|
|
16
16
|
export declare const isLinearElement: (element?: ExcalidrawElement | null) => element is ExcalidrawLinearElement;
|
|
17
|
+
export declare const isLineElement: (element?: ExcalidrawElement | null) => element is ExcalidrawLineElement;
|
|
17
18
|
export declare const isArrowElement: (element?: ExcalidrawElement | null) => element is ExcalidrawArrowElement;
|
|
18
19
|
export declare const isElbowArrow: (element?: ExcalidrawElement) => element is ExcalidrawElbowArrowElement;
|
|
20
|
+
/**
|
|
21
|
+
* sharp or curved arrow, but not elbow
|
|
22
|
+
*/
|
|
23
|
+
export declare const isSimpleArrow: (element?: ExcalidrawElement) => element is ExcalidrawArrowElement;
|
|
24
|
+
export declare const isSharpArrow: (element?: ExcalidrawElement) => element is ExcalidrawArrowElement;
|
|
25
|
+
export declare const isCurvedArrow: (element?: ExcalidrawElement) => element is ExcalidrawArrowElement;
|
|
19
26
|
export declare const isLinearElementType: (elementType: ElementOrToolType) => boolean;
|
|
20
|
-
export declare const isBindingElement: (element?: ExcalidrawElement | null, includeLocked?: boolean) => element is
|
|
27
|
+
export declare const isBindingElement: (element?: ExcalidrawElement | null, includeLocked?: boolean) => element is ExcalidrawArrowElement;
|
|
21
28
|
export declare const isBindingElementType: (elementType: ElementOrToolType) => boolean;
|
|
22
29
|
export declare const isBindableElement: (element: ExcalidrawElement | null | undefined, includeLocked?: boolean) => element is ExcalidrawBindableElement;
|
|
23
30
|
export declare const isRectanguloidElement: (element?: ExcalidrawElement | null) => element is ExcalidrawBindableElement;
|
|
@@ -27,6 +34,7 @@ export declare const isExcalidrawElement: (element: any) => element is Excalidra
|
|
|
27
34
|
export declare const isFlowchartNodeElement: (element: ExcalidrawElement) => element is ExcalidrawFlowchartNodeElement;
|
|
28
35
|
export declare const hasBoundTextElement: (element: ExcalidrawElement | null) => element is MarkNonNullable<ExcalidrawBindableElement, "boundElements">;
|
|
29
36
|
export declare const isBoundToContainer: (element: ExcalidrawElement | null) => element is ExcalidrawTextElementWithContainer;
|
|
37
|
+
export declare const isArrowBoundToElement: (element: ExcalidrawArrowElement) => boolean;
|
|
30
38
|
export declare const isUsingAdaptiveRadius: (type: string) => boolean;
|
|
31
39
|
export declare const isUsingProportionalRadius: (type: string) => boolean;
|
|
32
40
|
export declare const canApplyRoundnessTypeToElement: (roundnessType: RoundnessType, element: ExcalidrawElement) => boolean;
|
|
@@ -35,5 +43,14 @@ export declare const getDefaultRoundnessTypeForElement: (element: ExcalidrawElem
|
|
|
35
43
|
} | {
|
|
36
44
|
type: 3;
|
|
37
45
|
} | null;
|
|
38
|
-
export declare const isFixedPointBinding: (binding: PointBinding | FixedPointBinding) => binding is FixedPointBinding;
|
|
39
46
|
export declare const isBounds: (box: unknown) => box is Bounds;
|
|
47
|
+
export declare const getLinearElementSubType: (element: ExcalidrawLinearElement) => ExcalidrawLinearElementSubType;
|
|
48
|
+
/**
|
|
49
|
+
* Checks if current element points meet all the conditions for polygon=true
|
|
50
|
+
* (this isn't a element type check, for that use isLineElement).
|
|
51
|
+
*
|
|
52
|
+
* If you want to check if points *can* be turned into a polygon, use
|
|
53
|
+
* canBecomePolygon(points).
|
|
54
|
+
*/
|
|
55
|
+
export declare const isValidPolygon: (points: ExcalidrawLineElement["points"]) => boolean;
|
|
56
|
+
export declare const canBecomePolygon: (points: ExcalidrawLineElement["points"]) => boolean;
|
|
@@ -139,13 +139,23 @@ export type ExcalidrawImageElement = _ExcalidrawElementBase & Readonly<{
|
|
|
139
139
|
crop: ImageCrop | null;
|
|
140
140
|
}>;
|
|
141
141
|
export type InitializedExcalidrawImageElement = MarkNonNullable<ExcalidrawImageElement, "fileId">;
|
|
142
|
+
type FrameRole = null | "marker";
|
|
142
143
|
export type ExcalidrawFrameElement = _ExcalidrawElementBase & {
|
|
143
144
|
type: "frame";
|
|
144
145
|
name: string | null;
|
|
146
|
+
frameRole?: FrameRole;
|
|
147
|
+
customData?: {
|
|
148
|
+
frameColor?: {
|
|
149
|
+
fill: string;
|
|
150
|
+
stroke: string;
|
|
151
|
+
nameColor: string;
|
|
152
|
+
};
|
|
153
|
+
};
|
|
145
154
|
};
|
|
146
155
|
export type ExcalidrawMagicFrameElement = _ExcalidrawElementBase & {
|
|
147
156
|
type: "magicframe";
|
|
148
157
|
name: string | null;
|
|
158
|
+
frameRole?: FrameRole;
|
|
149
159
|
};
|
|
150
160
|
export type ExcalidrawFrameLikeElement = ExcalidrawFrameElement | ExcalidrawMagicFrameElement;
|
|
151
161
|
/**
|
|
@@ -153,7 +163,7 @@ export type ExcalidrawFrameLikeElement = ExcalidrawFrameElement | ExcalidrawMagi
|
|
|
153
163
|
*/
|
|
154
164
|
export type ExcalidrawGenericElement = ExcalidrawSelectionElement | ExcalidrawRectangleElement | ExcalidrawDiamondElement | ExcalidrawEllipseElement;
|
|
155
165
|
export type ExcalidrawFlowchartNodeElement = ExcalidrawRectangleElement | ExcalidrawDiamondElement | ExcalidrawEllipseElement;
|
|
156
|
-
export type ExcalidrawRectanguloidElement = ExcalidrawRectangleElement | ExcalidrawImageElement | ExcalidrawTextElement | ExcalidrawFreeDrawElement | ExcalidrawIframeLikeElement | ExcalidrawFrameLikeElement | ExcalidrawEmbeddableElement;
|
|
166
|
+
export type ExcalidrawRectanguloidElement = ExcalidrawRectangleElement | ExcalidrawImageElement | ExcalidrawTextElement | ExcalidrawFreeDrawElement | ExcalidrawIframeLikeElement | ExcalidrawFrameLikeElement | ExcalidrawEmbeddableElement | ExcalidrawSelectionElement;
|
|
157
167
|
/**
|
|
158
168
|
* ExcalidrawElement should be JSON serializable and (eventually) contain
|
|
159
169
|
* no computed data. The list of all ExcalidrawElements should be shareable
|
|
@@ -200,28 +210,34 @@ export type ExcalidrawTextElementWithContainer = {
|
|
|
200
210
|
containerId: ExcalidrawTextContainer["id"];
|
|
201
211
|
} & ExcalidrawTextElement;
|
|
202
212
|
export type FixedPoint = [number, number];
|
|
203
|
-
export type
|
|
213
|
+
export type BindMode = "inside" | "orbit" | "skip";
|
|
214
|
+
export type FixedPointBinding = {
|
|
204
215
|
elementId: ExcalidrawBindableElement["id"];
|
|
205
|
-
focus: number;
|
|
206
|
-
gap: number;
|
|
207
|
-
};
|
|
208
|
-
export type FixedPointBinding = Merge<PointBinding, {
|
|
209
216
|
fixedPoint: FixedPoint;
|
|
217
|
+
mode: BindMode;
|
|
218
|
+
};
|
|
219
|
+
type Index = number;
|
|
220
|
+
export type PointsPositionUpdates = Map<Index, {
|
|
221
|
+
point: LocalPoint;
|
|
222
|
+
isDragging?: boolean;
|
|
210
223
|
}>;
|
|
211
224
|
export type Arrowhead = "arrow" | "bar" | "dot" | "circle" | "circle_outline" | "triangle" | "triangle_outline" | "diamond" | "diamond_outline" | "crowfoot_one" | "crowfoot_many" | "crowfoot_one_or_many";
|
|
212
225
|
export type ExcalidrawLinearElement = _ExcalidrawElementBase & Readonly<{
|
|
213
226
|
type: "line" | "arrow";
|
|
214
227
|
points: readonly LocalPoint[];
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
endBinding: PointBinding | null;
|
|
228
|
+
startBinding: FixedPointBinding | null;
|
|
229
|
+
endBinding: FixedPointBinding | null;
|
|
218
230
|
startArrowhead: Arrowhead | null;
|
|
219
231
|
endArrowhead: Arrowhead | null;
|
|
220
232
|
}>;
|
|
233
|
+
export type ExcalidrawLineElement = ExcalidrawLinearElement & Readonly<{
|
|
234
|
+
type: "line";
|
|
235
|
+
polygon: boolean;
|
|
236
|
+
}>;
|
|
221
237
|
export type FixedSegment = {
|
|
222
238
|
start: LocalPoint;
|
|
223
239
|
end: LocalPoint;
|
|
224
|
-
index:
|
|
240
|
+
index: Index;
|
|
225
241
|
};
|
|
226
242
|
export type ExcalidrawArrowElement = ExcalidrawLinearElement & Readonly<{
|
|
227
243
|
type: "arrow";
|
|
@@ -229,9 +245,9 @@ export type ExcalidrawArrowElement = ExcalidrawLinearElement & Readonly<{
|
|
|
229
245
|
}>;
|
|
230
246
|
export type ExcalidrawElbowArrowElement = Merge<ExcalidrawArrowElement, {
|
|
231
247
|
elbowed: true;
|
|
248
|
+
fixedSegments: readonly FixedSegment[] | null;
|
|
232
249
|
startBinding: FixedPointBinding | null;
|
|
233
250
|
endBinding: FixedPointBinding | null;
|
|
234
|
-
fixedSegments: readonly FixedSegment[] | null;
|
|
235
251
|
/**
|
|
236
252
|
* Marks that the 3rd point should be used as the 2nd point of the arrow in
|
|
237
253
|
* order to temporarily hide the first segment of the arrow without losing
|
|
@@ -254,7 +270,6 @@ export type ExcalidrawFreeDrawElement = _ExcalidrawElementBase & Readonly<{
|
|
|
254
270
|
points: readonly LocalPoint[];
|
|
255
271
|
pressures: readonly number[];
|
|
256
272
|
simulatePressure: boolean;
|
|
257
|
-
lastCommittedPoint: LocalPoint | null;
|
|
258
273
|
}>;
|
|
259
274
|
export type FileId = string & {
|
|
260
275
|
_brand: "FileId";
|
|
@@ -282,4 +297,8 @@ export type SceneElementsMap = Map<ExcalidrawElement["id"], Ordered<ExcalidrawEl
|
|
|
282
297
|
*/
|
|
283
298
|
export type NonDeletedSceneElementsMap = Map<ExcalidrawElement["id"], Ordered<NonDeletedExcalidrawElement>> & MakeBrand<"NonDeletedSceneElementsMap">;
|
|
284
299
|
export type ElementsMapOrArray = readonly ExcalidrawElement[] | Readonly<ElementsMap>;
|
|
300
|
+
export type ExcalidrawLinearElementSubType = "line" | "sharpArrow" | "curvedArrow" | "elbowArrow";
|
|
301
|
+
export type ConvertibleGenericTypes = "rectangle" | "diamond" | "ellipse";
|
|
302
|
+
export type ConvertibleLinearTypes = ExcalidrawLinearElementSubType;
|
|
303
|
+
export type ConvertibleTypes = ConvertibleGenericTypes | ConvertibleLinearTypes;
|
|
285
304
|
export {};
|
|
@@ -1,21 +1,32 @@
|
|
|
1
1
|
import { type GlobalPoint } from "@excalidraw/math";
|
|
2
2
|
import type { Curve, LineSegment } from "@excalidraw/math";
|
|
3
|
-
import type {
|
|
3
|
+
import type { Zoom } from "@excalidraw/excalidraw/types";
|
|
4
|
+
import type { ElementsMap, ExcalidrawArrowElement, ExcalidrawDiamondElement, ExcalidrawElement, ExcalidrawFreeDrawElement, ExcalidrawLinearElement, ExcalidrawRectanguloidElement } from "./types";
|
|
5
|
+
/**
|
|
6
|
+
* Returns the **rotated** components of freedraw, line or arrow elements.
|
|
7
|
+
*
|
|
8
|
+
* @param element The linear element to deconstruct
|
|
9
|
+
* @returns The rotated in components.
|
|
10
|
+
*/
|
|
11
|
+
export declare function deconstructLinearOrFreeDrawElement(element: ExcalidrawLinearElement | ExcalidrawFreeDrawElement): [LineSegment<GlobalPoint>[], Curve<GlobalPoint>[]];
|
|
4
12
|
/**
|
|
5
13
|
* Get the building components of a rectanguloid element in the form of
|
|
6
|
-
* line segments and curves
|
|
14
|
+
* line segments and curves **unrotated**.
|
|
7
15
|
*
|
|
8
16
|
* @param element Target rectanguloid element
|
|
9
17
|
* @param offset Optional offset to expand the rectanguloid shape
|
|
10
|
-
* @returns Tuple of line segments (0) and curves (1)
|
|
18
|
+
* @returns Tuple of **unrotated** line segments (0) and curves (1)
|
|
11
19
|
*/
|
|
12
20
|
export declare function deconstructRectanguloidElement(element: ExcalidrawRectanguloidElement, offset?: number): [LineSegment<GlobalPoint>[], Curve<GlobalPoint>[]];
|
|
13
21
|
/**
|
|
14
|
-
* Get the building components of a diamond element
|
|
15
|
-
* line segments and curves as a tuple, in this order.
|
|
22
|
+
* Get the **unrotated** building components of a diamond element
|
|
23
|
+
* in the form of line segments and curves as a tuple, in this order.
|
|
16
24
|
*
|
|
17
25
|
* @param element The element to deconstruct
|
|
18
26
|
* @param offset An optional offset
|
|
19
|
-
* @returns Tuple of line segments (0) and curves (1)
|
|
27
|
+
* @returns Tuple of line **unrotated** segments (0) and curves (1)
|
|
20
28
|
*/
|
|
21
29
|
export declare function deconstructDiamondElement(element: ExcalidrawDiamondElement, offset?: number): [LineSegment<GlobalPoint>[], Curve<GlobalPoint>[]];
|
|
30
|
+
export declare const isPathALoop: (points: ExcalidrawLinearElement["points"], zoomValue?: Zoom["value"]) => boolean;
|
|
31
|
+
export declare const getCornerRadius: (x: number, element: ExcalidrawElement) => number;
|
|
32
|
+
export declare const projectFixedPointOntoDiagonal: (arrow: ExcalidrawArrowElement, point: GlobalPoint, element: ExcalidrawElement, startOrEnd: "start" | "end", elementsMap: ElementsMap) => GlobalPoint | null;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import type { AppState } from "@excalidraw/excalidraw/types";
|
|
2
|
-
import type
|
|
3
|
-
import type {
|
|
2
|
+
import type { GlobalPoint } from "@excalidraw/math";
|
|
3
|
+
import type { Scene } from "./Scene";
|
|
4
|
+
import type { ExcalidrawArrowElement, ExcalidrawElement, NonDeletedExcalidrawElement, NonDeletedSceneElementsMap, Ordered, OrderedExcalidrawElement } from "./types";
|
|
5
|
+
/**
|
|
6
|
+
* Moves the arrow element above any bindable elements it intersects with or
|
|
7
|
+
* hovers over.
|
|
8
|
+
*/
|
|
9
|
+
export declare const moveArrowAboveBindable: (point: GlobalPoint, arrow: ExcalidrawArrowElement, elements: readonly Ordered<NonDeletedExcalidrawElement>[], elementsMap: NonDeletedSceneElementsMap, scene: Scene) => readonly OrderedExcalidrawElement[];
|
|
4
10
|
export declare const moveOneLeft: (allElements: readonly ExcalidrawElement[], appState: AppState, scene: Scene) => readonly ExcalidrawElement[];
|
|
5
11
|
export declare const moveOneRight: (allElements: readonly ExcalidrawElement[], appState: AppState, scene: Scene) => readonly ExcalidrawElement[];
|
|
6
12
|
export declare const moveAllLeft: (allElements: readonly ExcalidrawElement[], appState: AppState) => readonly ExcalidrawElement[] | ExcalidrawElement[];
|
|
@@ -3,7 +3,7 @@ export declare const actionAddToLibrary: {
|
|
|
3
3
|
trackEvent: {
|
|
4
4
|
category: "element";
|
|
5
5
|
};
|
|
6
|
-
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _:
|
|
6
|
+
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: unknown, app: import("../types").AppClassProperties) => Promise<{
|
|
7
7
|
captureUpdate: "EVENTUALLY";
|
|
8
8
|
appState: {
|
|
9
9
|
toast: {
|
|
@@ -27,23 +27,28 @@ export declare const actionAddToLibrary: {
|
|
|
27
27
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
28
28
|
isBindingEnabled: boolean;
|
|
29
29
|
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
30
|
-
|
|
30
|
+
suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
31
31
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
32
32
|
frameRendering: {
|
|
33
33
|
enabled: boolean;
|
|
34
34
|
name: boolean;
|
|
35
35
|
outline: boolean;
|
|
36
36
|
clip: boolean;
|
|
37
|
+
markerName: boolean;
|
|
38
|
+
markerEnabled: boolean;
|
|
37
39
|
};
|
|
38
40
|
editingFrame: string | null;
|
|
39
41
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
40
42
|
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
41
|
-
editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
|
|
42
43
|
activeTool: {
|
|
43
44
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
44
45
|
locked: boolean;
|
|
45
46
|
fromSelection: boolean;
|
|
46
47
|
} & import("../types").ActiveTool;
|
|
48
|
+
preferredSelectionTool: {
|
|
49
|
+
type: "selection" | "lasso";
|
|
50
|
+
initialized: boolean;
|
|
51
|
+
};
|
|
47
52
|
penMode: boolean;
|
|
48
53
|
penDetected: boolean;
|
|
49
54
|
exportBackground: boolean;
|
|
@@ -65,6 +70,7 @@ export declare const actionAddToLibrary: {
|
|
|
65
70
|
currentHoveredFontFamily: number | null;
|
|
66
71
|
currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
|
|
67
72
|
currentItemArrowType: "round" | "sharp" | "elbow";
|
|
73
|
+
currentItemFrameRole: ("marker" | null) | undefined;
|
|
68
74
|
viewBackgroundColor: string;
|
|
69
75
|
scrollX: number;
|
|
70
76
|
scrollY: number;
|
|
@@ -76,19 +82,21 @@ export declare const actionAddToLibrary: {
|
|
|
76
82
|
zoom: Readonly<{
|
|
77
83
|
value: import("../types").NormalizedZoomValue;
|
|
78
84
|
}>;
|
|
79
|
-
openMenu: "
|
|
80
|
-
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
85
|
+
openMenu: "canvas" | "shape" | null;
|
|
86
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
81
87
|
openSidebar: {
|
|
82
88
|
name: string;
|
|
83
89
|
tab?: string | undefined;
|
|
84
90
|
} | null;
|
|
85
91
|
openDialog: {
|
|
86
|
-
name: "
|
|
92
|
+
name: "imageExport" | "help" | "jsonExport";
|
|
87
93
|
} | {
|
|
88
94
|
name: "ttd";
|
|
89
95
|
tab: "mermaid" | "text-to-diagram";
|
|
90
96
|
} | {
|
|
91
97
|
name: "commandPalette";
|
|
98
|
+
} | {
|
|
99
|
+
name: "settings";
|
|
92
100
|
} | {
|
|
93
101
|
name: "elementLinkSelector";
|
|
94
102
|
sourceElementId: string;
|
|
@@ -153,10 +161,8 @@ export declare const actionAddToLibrary: {
|
|
|
153
161
|
shown: true;
|
|
154
162
|
data: import("../charts").Spreadsheet;
|
|
155
163
|
};
|
|
156
|
-
|
|
157
|
-
showHyperlinkPopup: false | "editor" | "info";
|
|
164
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
158
165
|
linkOpacity: number;
|
|
159
|
-
trayModeEnabled: boolean;
|
|
160
166
|
colorPalette?: {
|
|
161
167
|
canvasBackground: import("@excalidraw/common").ColorPaletteCustom;
|
|
162
168
|
elementBackground: import("@excalidraw/common").ColorPaletteCustom;
|
|
@@ -169,6 +175,7 @@ export declare const actionAddToLibrary: {
|
|
|
169
175
|
} | undefined;
|
|
170
176
|
allowWheelZoom?: boolean | undefined;
|
|
171
177
|
allowPinchZoom?: boolean | undefined;
|
|
178
|
+
disableContextMenu: boolean;
|
|
172
179
|
pinnedScripts?: string[] | undefined;
|
|
173
180
|
customPens?: any[] | undefined;
|
|
174
181
|
currentStrokeOptions?: any;
|
|
@@ -177,6 +184,10 @@ export declare const actionAddToLibrary: {
|
|
|
177
184
|
Bold: string;
|
|
178
185
|
Regular: string;
|
|
179
186
|
};
|
|
187
|
+
gridDirection: {
|
|
188
|
+
horizontal: boolean;
|
|
189
|
+
vertical: boolean;
|
|
190
|
+
};
|
|
180
191
|
highlightSearchResult: boolean;
|
|
181
192
|
dynamicStyle: {
|
|
182
193
|
[x: string]: string;
|
|
@@ -187,7 +198,7 @@ export declare const actionAddToLibrary: {
|
|
|
187
198
|
nameColor: string;
|
|
188
199
|
};
|
|
189
200
|
invertBindingBehaviour: boolean;
|
|
190
|
-
selectedLinearElement: import("@excalidraw/element
|
|
201
|
+
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
191
202
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
192
203
|
originSnapOffset: {
|
|
193
204
|
x: number;
|
|
@@ -198,16 +209,15 @@ export declare const actionAddToLibrary: {
|
|
|
198
209
|
followedBy: Set<import("../types").SocketId>;
|
|
199
210
|
isCropping: boolean;
|
|
200
211
|
croppingElementId: string | null;
|
|
201
|
-
searchMatches:
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
}[];
|
|
212
|
+
searchMatches: Readonly<{
|
|
213
|
+
focusedId: string | null;
|
|
214
|
+
matches: readonly import("../types").SearchMatch[];
|
|
215
|
+
}> | null;
|
|
216
|
+
activeLockedId: string | null;
|
|
217
|
+
lockedMultiSelections: {
|
|
218
|
+
[groupId: string]: true;
|
|
219
|
+
};
|
|
220
|
+
bindMode: import("@excalidraw/element/types").BindMode;
|
|
211
221
|
};
|
|
212
222
|
} | {
|
|
213
223
|
captureUpdate: "EVENTUALLY";
|
|
@@ -230,23 +240,28 @@ export declare const actionAddToLibrary: {
|
|
|
230
240
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
231
241
|
isBindingEnabled: boolean;
|
|
232
242
|
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
233
|
-
|
|
243
|
+
suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
234
244
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
235
245
|
frameRendering: {
|
|
236
246
|
enabled: boolean;
|
|
237
247
|
name: boolean;
|
|
238
248
|
outline: boolean;
|
|
239
249
|
clip: boolean;
|
|
250
|
+
markerName: boolean;
|
|
251
|
+
markerEnabled: boolean;
|
|
240
252
|
};
|
|
241
253
|
editingFrame: string | null;
|
|
242
254
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
243
255
|
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
244
|
-
editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
|
|
245
256
|
activeTool: {
|
|
246
257
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
247
258
|
locked: boolean;
|
|
248
259
|
fromSelection: boolean;
|
|
249
260
|
} & import("../types").ActiveTool;
|
|
261
|
+
preferredSelectionTool: {
|
|
262
|
+
type: "selection" | "lasso";
|
|
263
|
+
initialized: boolean;
|
|
264
|
+
};
|
|
250
265
|
penMode: boolean;
|
|
251
266
|
penDetected: boolean;
|
|
252
267
|
exportBackground: boolean;
|
|
@@ -268,6 +283,7 @@ export declare const actionAddToLibrary: {
|
|
|
268
283
|
currentHoveredFontFamily: number | null;
|
|
269
284
|
currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
|
|
270
285
|
currentItemArrowType: "round" | "sharp" | "elbow";
|
|
286
|
+
currentItemFrameRole: ("marker" | null) | undefined;
|
|
271
287
|
viewBackgroundColor: string;
|
|
272
288
|
scrollX: number;
|
|
273
289
|
scrollY: number;
|
|
@@ -279,19 +295,21 @@ export declare const actionAddToLibrary: {
|
|
|
279
295
|
zoom: Readonly<{
|
|
280
296
|
value: import("../types").NormalizedZoomValue;
|
|
281
297
|
}>;
|
|
282
|
-
openMenu: "
|
|
283
|
-
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
298
|
+
openMenu: "canvas" | "shape" | null;
|
|
299
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
284
300
|
openSidebar: {
|
|
285
301
|
name: string;
|
|
286
302
|
tab?: string | undefined;
|
|
287
303
|
} | null;
|
|
288
304
|
openDialog: {
|
|
289
|
-
name: "
|
|
305
|
+
name: "imageExport" | "help" | "jsonExport";
|
|
290
306
|
} | {
|
|
291
307
|
name: "ttd";
|
|
292
308
|
tab: "mermaid" | "text-to-diagram";
|
|
293
309
|
} | {
|
|
294
310
|
name: "commandPalette";
|
|
311
|
+
} | {
|
|
312
|
+
name: "settings";
|
|
295
313
|
} | {
|
|
296
314
|
name: "elementLinkSelector";
|
|
297
315
|
sourceElementId: string;
|
|
@@ -361,10 +379,8 @@ export declare const actionAddToLibrary: {
|
|
|
361
379
|
shown: true;
|
|
362
380
|
data: import("../charts").Spreadsheet;
|
|
363
381
|
};
|
|
364
|
-
|
|
365
|
-
showHyperlinkPopup: false | "editor" | "info";
|
|
382
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
366
383
|
linkOpacity: number;
|
|
367
|
-
trayModeEnabled: boolean;
|
|
368
384
|
colorPalette?: {
|
|
369
385
|
canvasBackground: import("@excalidraw/common").ColorPaletteCustom;
|
|
370
386
|
elementBackground: import("@excalidraw/common").ColorPaletteCustom;
|
|
@@ -377,6 +393,7 @@ export declare const actionAddToLibrary: {
|
|
|
377
393
|
} | undefined;
|
|
378
394
|
allowWheelZoom?: boolean | undefined;
|
|
379
395
|
allowPinchZoom?: boolean | undefined;
|
|
396
|
+
disableContextMenu: boolean;
|
|
380
397
|
pinnedScripts?: string[] | undefined;
|
|
381
398
|
customPens?: any[] | undefined;
|
|
382
399
|
currentStrokeOptions?: any;
|
|
@@ -385,6 +402,10 @@ export declare const actionAddToLibrary: {
|
|
|
385
402
|
Bold: string;
|
|
386
403
|
Regular: string;
|
|
387
404
|
};
|
|
405
|
+
gridDirection: {
|
|
406
|
+
horizontal: boolean;
|
|
407
|
+
vertical: boolean;
|
|
408
|
+
};
|
|
388
409
|
highlightSearchResult: boolean;
|
|
389
410
|
dynamicStyle: {
|
|
390
411
|
[x: string]: string;
|
|
@@ -395,7 +416,7 @@ export declare const actionAddToLibrary: {
|
|
|
395
416
|
nameColor: string;
|
|
396
417
|
};
|
|
397
418
|
invertBindingBehaviour: boolean;
|
|
398
|
-
selectedLinearElement: import("@excalidraw/element
|
|
419
|
+
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
399
420
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
400
421
|
originSnapOffset: {
|
|
401
422
|
x: number;
|
|
@@ -406,16 +427,15 @@ export declare const actionAddToLibrary: {
|
|
|
406
427
|
followedBy: Set<import("../types").SocketId>;
|
|
407
428
|
isCropping: boolean;
|
|
408
429
|
croppingElementId: string | null;
|
|
409
|
-
searchMatches:
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
}[];
|
|
430
|
+
searchMatches: Readonly<{
|
|
431
|
+
focusedId: string | null;
|
|
432
|
+
matches: readonly import("../types").SearchMatch[];
|
|
433
|
+
}> | null;
|
|
434
|
+
activeLockedId: string | null;
|
|
435
|
+
lockedMultiSelections: {
|
|
436
|
+
[groupId: string]: true;
|
|
437
|
+
};
|
|
438
|
+
bindMode: import("@excalidraw/element/types").BindMode;
|
|
419
439
|
};
|
|
420
440
|
}> | {
|
|
421
441
|
captureUpdate: "EVENTUALLY";
|
|
@@ -438,23 +458,28 @@ export declare const actionAddToLibrary: {
|
|
|
438
458
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
439
459
|
isBindingEnabled: boolean;
|
|
440
460
|
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
441
|
-
|
|
461
|
+
suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
442
462
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
443
463
|
frameRendering: {
|
|
444
464
|
enabled: boolean;
|
|
445
465
|
name: boolean;
|
|
446
466
|
outline: boolean;
|
|
447
467
|
clip: boolean;
|
|
468
|
+
markerName: boolean;
|
|
469
|
+
markerEnabled: boolean;
|
|
448
470
|
};
|
|
449
471
|
editingFrame: string | null;
|
|
450
472
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
451
473
|
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
452
|
-
editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
|
|
453
474
|
activeTool: {
|
|
454
475
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
455
476
|
locked: boolean;
|
|
456
477
|
fromSelection: boolean;
|
|
457
478
|
} & import("../types").ActiveTool;
|
|
479
|
+
preferredSelectionTool: {
|
|
480
|
+
type: "selection" | "lasso";
|
|
481
|
+
initialized: boolean;
|
|
482
|
+
};
|
|
458
483
|
penMode: boolean;
|
|
459
484
|
penDetected: boolean;
|
|
460
485
|
exportBackground: boolean;
|
|
@@ -476,6 +501,7 @@ export declare const actionAddToLibrary: {
|
|
|
476
501
|
currentHoveredFontFamily: number | null;
|
|
477
502
|
currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
|
|
478
503
|
currentItemArrowType: "round" | "sharp" | "elbow";
|
|
504
|
+
currentItemFrameRole: ("marker" | null) | undefined;
|
|
479
505
|
viewBackgroundColor: string;
|
|
480
506
|
scrollX: number;
|
|
481
507
|
scrollY: number;
|
|
@@ -487,19 +513,21 @@ export declare const actionAddToLibrary: {
|
|
|
487
513
|
zoom: Readonly<{
|
|
488
514
|
value: import("../types").NormalizedZoomValue;
|
|
489
515
|
}>;
|
|
490
|
-
openMenu: "
|
|
491
|
-
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
516
|
+
openMenu: "canvas" | "shape" | null;
|
|
517
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
492
518
|
openSidebar: {
|
|
493
519
|
name: string;
|
|
494
520
|
tab?: string | undefined;
|
|
495
521
|
} | null;
|
|
496
522
|
openDialog: {
|
|
497
|
-
name: "
|
|
523
|
+
name: "imageExport" | "help" | "jsonExport";
|
|
498
524
|
} | {
|
|
499
525
|
name: "ttd";
|
|
500
526
|
tab: "mermaid" | "text-to-diagram";
|
|
501
527
|
} | {
|
|
502
528
|
name: "commandPalette";
|
|
529
|
+
} | {
|
|
530
|
+
name: "settings";
|
|
503
531
|
} | {
|
|
504
532
|
name: "elementLinkSelector";
|
|
505
533
|
sourceElementId: string;
|
|
@@ -569,10 +597,8 @@ export declare const actionAddToLibrary: {
|
|
|
569
597
|
shown: true;
|
|
570
598
|
data: import("../charts").Spreadsheet;
|
|
571
599
|
};
|
|
572
|
-
|
|
573
|
-
showHyperlinkPopup: false | "editor" | "info";
|
|
600
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
574
601
|
linkOpacity: number;
|
|
575
|
-
trayModeEnabled: boolean;
|
|
576
602
|
colorPalette?: {
|
|
577
603
|
canvasBackground: import("@excalidraw/common").ColorPaletteCustom;
|
|
578
604
|
elementBackground: import("@excalidraw/common").ColorPaletteCustom;
|
|
@@ -585,6 +611,7 @@ export declare const actionAddToLibrary: {
|
|
|
585
611
|
} | undefined;
|
|
586
612
|
allowWheelZoom?: boolean | undefined;
|
|
587
613
|
allowPinchZoom?: boolean | undefined;
|
|
614
|
+
disableContextMenu: boolean;
|
|
588
615
|
pinnedScripts?: string[] | undefined;
|
|
589
616
|
customPens?: any[] | undefined;
|
|
590
617
|
currentStrokeOptions?: any;
|
|
@@ -593,6 +620,10 @@ export declare const actionAddToLibrary: {
|
|
|
593
620
|
Bold: string;
|
|
594
621
|
Regular: string;
|
|
595
622
|
};
|
|
623
|
+
gridDirection: {
|
|
624
|
+
horizontal: boolean;
|
|
625
|
+
vertical: boolean;
|
|
626
|
+
};
|
|
596
627
|
highlightSearchResult: boolean;
|
|
597
628
|
dynamicStyle: {
|
|
598
629
|
[x: string]: string;
|
|
@@ -603,7 +634,7 @@ export declare const actionAddToLibrary: {
|
|
|
603
634
|
nameColor: string;
|
|
604
635
|
};
|
|
605
636
|
invertBindingBehaviour: boolean;
|
|
606
|
-
selectedLinearElement: import("@excalidraw/element
|
|
637
|
+
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
607
638
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
608
639
|
originSnapOffset: {
|
|
609
640
|
x: number;
|
|
@@ -614,16 +645,15 @@ export declare const actionAddToLibrary: {
|
|
|
614
645
|
followedBy: Set<import("../types").SocketId>;
|
|
615
646
|
isCropping: boolean;
|
|
616
647
|
croppingElementId: string | null;
|
|
617
|
-
searchMatches:
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
}[];
|
|
648
|
+
searchMatches: Readonly<{
|
|
649
|
+
focusedId: string | null;
|
|
650
|
+
matches: readonly import("../types").SearchMatch[];
|
|
651
|
+
}> | null;
|
|
652
|
+
activeLockedId: string | null;
|
|
653
|
+
lockedMultiSelections: {
|
|
654
|
+
[groupId: string]: true;
|
|
655
|
+
};
|
|
656
|
+
bindMode: import("@excalidraw/element/types").BindMode;
|
|
627
657
|
};
|
|
628
658
|
};
|
|
629
659
|
label: string;
|