@myoc/excalidraw 0.18.1 → 0.18.3
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/dev/{chunk-IVKGBVG7.js → chunk-3K6YEH7O.js} +2 -2
- package/dist/dev/{chunk-IVKGBVG7.js.map → chunk-3K6YEH7O.js.map} +1 -1
- package/dist/dev/{chunk-DYSQNY2T.js → chunk-6MXLCRC3.js} +2 -1
- package/dist/dev/chunk-6MXLCRC3.js.map +7 -0
- package/dist/dev/{chunk-ND5KUA7P.js → chunk-S4MA4GYT.js} +16541 -21170
- package/dist/dev/chunk-S4MA4GYT.js.map +7 -0
- package/dist/dev/data/{image-ZD4HK457.js → image-I5I3FC2R.js} +3 -3
- package/dist/dev/index.css +44 -47
- package/dist/dev/index.css.map +3 -3
- package/dist/dev/index.js +6642 -1356
- package/dist/dev/index.js.map +4 -4
- package/dist/dev/locales/{en-IW3FTNXY.js → en-FBYNI7ML.js} +2 -2
- package/dist/dev/subset-shared.chunk.js +1 -1
- package/dist/dev/subset-worker.chunk.js +1 -1
- package/dist/prod/{chunk-Y5S6JYT2.js → chunk-6NO4X5TH.js} +1 -1
- package/dist/prod/chunk-7TL427PR.js +31 -0
- package/dist/prod/{chunk-SIW4TYTH.js → chunk-ECENQK44.js} +1 -1
- package/dist/prod/data/image-TMH4UP47.js +1 -0
- package/dist/prod/index.css +1 -1
- package/dist/prod/index.js +17 -14
- package/dist/prod/locales/{en-3JJA6ONK.js → en-RF5UZHGV.js} +1 -1
- package/dist/prod/subset-shared.chunk.js +1 -1
- package/dist/prod/subset-worker.chunk.js +1 -1
- package/dist/types/{excalidraw/binaryheap.d.ts → common/src/binary-heap.d.ts} +1 -1
- package/dist/types/{excalidraw → common/src}/colors.d.ts +1 -0
- package/dist/types/{excalidraw → common/src}/constants.d.ts +7 -6
- package/dist/types/{excalidraw/fonts/FontMetadata.d.ts → common/src/font-metadata.d.ts} +11 -3
- package/dist/types/common/src/index.d.ts +11 -0
- package/dist/types/{excalidraw → common/src}/points.d.ts +2 -0
- package/dist/types/common/src/promise-pool.d.ts +6 -0
- package/dist/types/{excalidraw → common/src}/utils.d.ts +9 -12
- package/dist/types/{excalidraw/scene → element/src}/Shape.d.ts +2 -2
- package/dist/types/{excalidraw/scene → element/src}/ShapeCache.d.ts +4 -4
- package/dist/types/{excalidraw → element/src}/align.d.ts +2 -2
- package/dist/types/{excalidraw/element → element/src}/binding.d.ts +5 -4
- package/dist/types/{excalidraw/element → element/src}/bounds.d.ts +6 -1
- package/dist/types/{excalidraw/element → element/src}/collision.d.ts +2 -2
- package/dist/types/{excalidraw/scene → element/src}/comparisons.d.ts +1 -1
- package/dist/types/{excalidraw → element/src}/distribute.d.ts +1 -1
- package/dist/types/{excalidraw/element → element/src}/dragElements.d.ts +3 -3
- package/dist/types/element/src/duplicate.d.ts +66 -0
- package/dist/types/{excalidraw/element → element/src}/elementLink.d.ts +1 -1
- package/dist/types/element/src/embeddable.d.ts +10 -0
- package/dist/types/{excalidraw/element → element/src}/flowchart.d.ts +1 -1
- package/dist/types/{excalidraw → element/src}/fractionalIndex.d.ts +4 -1
- package/dist/types/{excalidraw → element/src}/frame.d.ts +6 -6
- package/dist/types/{excalidraw → element/src}/groups.d.ts +5 -5
- package/dist/types/{excalidraw/element → element/src}/heading.d.ts +1 -2
- package/dist/types/{excalidraw/element → element/src}/image.d.ts +2 -2
- package/dist/types/{excalidraw/element → element/src}/index.d.ts +0 -10
- package/dist/types/{excalidraw/element → element/src}/linearElementEditor.d.ts +5 -5
- package/dist/types/{excalidraw/element → element/src}/mutateElement.d.ts +1 -1
- package/dist/types/{excalidraw/element → element/src}/newElement.d.ts +3 -43
- package/dist/types/{excalidraw/renderer → element/src}/renderElement.d.ts +3 -3
- package/dist/types/{excalidraw/element → element/src}/resizeElements.d.ts +2 -2
- package/dist/types/{excalidraw/element → element/src}/resizeTest.d.ts +1 -1
- package/dist/types/{excalidraw/scene → element/src}/selection.d.ts +2 -2
- package/dist/types/{excalidraw → element/src}/shapes.d.ts +6 -6
- package/dist/types/{excalidraw/element → element/src}/showSelectedShapeActions.d.ts +1 -1
- package/dist/types/{excalidraw/element → element/src}/sizeHelpers.d.ts +1 -1
- package/dist/types/{excalidraw/element → element/src}/textElement.d.ts +3 -4
- package/dist/types/{excalidraw/element → element/src}/transformHandles.d.ts +5 -5
- package/dist/types/{excalidraw/element → element/src}/typeChecks.d.ts +2 -2
- package/dist/types/{excalidraw/element → element/src}/types.d.ts +2 -2
- package/dist/types/{excalidraw → element/src}/zindex.d.ts +5 -4
- package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +73 -70
- package/dist/types/excalidraw/actions/actionAlign.d.ts +7 -7
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +54 -52
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +456 -264
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +155 -149
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +26 -25
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +73 -70
- package/dist/types/excalidraw/actions/actionDistribute.d.ts +3 -3
- package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +3 -7
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +30 -29
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +53 -52
- package/dist/types/excalidraw/{element/embeddable.d.ts → actions/actionEmbeddable.d.ts} +26 -35
- package/dist/types/excalidraw/actions/actionExport.d.ts +306 -297
- package/dist/types/excalidraw/actions/actionFinalize.d.ts +41 -39
- package/dist/types/excalidraw/actions/actionFlip.d.ts +3 -3
- package/dist/types/excalidraw/actions/actionFrame.d.ts +217 -213
- package/dist/types/excalidraw/actions/actionGroup.d.ts +51 -49
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +27 -26
- package/dist/types/excalidraw/actions/actionLink.d.ts +26 -25
- package/dist/types/excalidraw/actions/actionMenu.d.ts +73 -70
- package/dist/types/excalidraw/actions/actionNavigate.d.ts +48 -46
- package/dist/types/excalidraw/actions/actionProperties.d.ts +317 -302
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +26 -25
- package/dist/types/excalidraw/actions/actionSmartZoom.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionStyles.d.ts +28 -27
- package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +3 -3
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +26 -25
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +26 -25
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +50 -48
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +25 -25
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +26 -26
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +26 -26
- package/dist/types/excalidraw/actions/actionZindex.d.ts +8 -8
- package/dist/types/excalidraw/actions/index.d.ts +1 -0
- package/dist/types/excalidraw/actions/manager.d.ts +1 -1
- package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
- package/dist/types/excalidraw/actions/types.d.ts +2 -2
- package/dist/types/excalidraw/animated-trail.d.ts +7 -1
- package/dist/types/excalidraw/appState.d.ts +35 -34
- package/dist/types/excalidraw/change.d.ts +3 -3
- package/dist/types/excalidraw/charts.d.ts +1 -1
- package/dist/types/excalidraw/clipboard.d.ts +2 -2
- package/dist/types/excalidraw/components/Actions.d.ts +2 -2
- package/dist/types/excalidraw/components/App.d.ts +14 -9
- package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +2 -2
- package/dist/types/excalidraw/components/ColorPicker/HotkeyLabel.d.ts +1 -2
- package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +2 -2
- package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +1 -1
- package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +1 -1
- package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +3 -3
- package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +1 -1
- package/dist/types/excalidraw/components/DarkModeToggle.d.ts +1 -1
- package/dist/types/excalidraw/components/DefaultSidebar.d.ts +1 -1
- package/dist/types/excalidraw/{element → components}/ElementCanvasButtons.d.ts +1 -1
- package/dist/types/excalidraw/components/ElementLinkDialog.d.ts +1 -1
- package/dist/types/excalidraw/components/EyeDropper.d.ts +1 -1
- package/dist/types/excalidraw/components/FontPicker/FontPicker.d.ts +1 -1
- package/dist/types/excalidraw/components/FontPicker/FontPickerList.d.ts +2 -2
- package/dist/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +1 -1
- package/dist/types/excalidraw/components/FontPicker/keyboardNavHandlers.d.ts +1 -1
- package/dist/types/excalidraw/components/ImageExportDialog.d.ts +1 -1
- package/dist/types/excalidraw/components/InitializeApp.d.ts +1 -1
- package/dist/types/excalidraw/components/JSONExportDialog.d.ts +1 -1
- package/dist/types/excalidraw/components/LayerUI.d.ts +1 -1
- package/dist/types/excalidraw/components/LibraryMenuSection.d.ts +1 -1
- package/dist/types/excalidraw/components/LibraryUnit.d.ts +1 -1
- package/dist/types/excalidraw/components/LoadingMessage.d.ts +1 -1
- package/dist/types/excalidraw/components/MobileMenu.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/Angle.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/Dimension.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/DragInput.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/FontSize.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/MultiAngle.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/MultiDimension.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/MultiFontSize.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/MultiPosition.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/Position.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/index.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/utils.d.ts +1 -1
- package/dist/types/excalidraw/components/TTDDialog/common.d.ts +1 -1
- package/dist/types/excalidraw/components/ToolButton.d.ts +1 -1
- package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +1 -1
- package/dist/types/excalidraw/components/canvases/NewElementCanvas.d.ts +1 -1
- package/dist/types/excalidraw/components/canvases/StaticCanvas.d.ts +1 -1
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +1 -1
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +1 -1
- package/dist/types/excalidraw/components/dropdownMenu/common.d.ts +1 -1
- package/dist/types/excalidraw/components/hyperlink/Hyperlink.d.ts +1 -1
- package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +2 -2
- package/dist/types/excalidraw/components/icons.d.ts +2 -1
- package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +1 -1
- package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +4 -1
- package/dist/types/excalidraw/components/shapes.d.ts +62 -0
- package/dist/types/excalidraw/data/EditorLocalStorage.d.ts +1 -1
- package/dist/types/excalidraw/data/blob.d.ts +5 -5
- package/dist/types/excalidraw/data/filesystem.d.ts +1 -1
- package/dist/types/excalidraw/data/index.d.ts +1 -1
- package/dist/types/excalidraw/data/json.d.ts +1 -1
- package/dist/types/excalidraw/data/library.d.ts +2 -2
- package/dist/types/excalidraw/data/reconcile.d.ts +2 -2
- package/dist/types/excalidraw/data/resave.d.ts +1 -1
- package/dist/types/excalidraw/data/restore.d.ts +1 -1
- package/dist/types/excalidraw/data/transform.d.ts +4 -4
- package/dist/types/excalidraw/data/types.d.ts +2 -2
- package/dist/types/excalidraw/errors.d.ts +0 -3
- package/dist/types/excalidraw/fonts/Fonts.d.ts +2 -12
- package/dist/types/excalidraw/history.d.ts +1 -1
- package/dist/types/excalidraw/i18n.d.ts +1 -1
- package/dist/types/excalidraw/index.d.ts +11 -10
- package/dist/types/excalidraw/lasso/index.d.ts +15 -0
- package/dist/types/excalidraw/lasso/utils.d.ts +13 -0
- package/dist/types/excalidraw/renderer/helpers.d.ts +1 -1
- package/dist/types/excalidraw/renderer/staticSvgScene.d.ts +1 -1
- package/dist/types/excalidraw/scene/Renderer.d.ts +2 -2
- package/dist/types/excalidraw/scene/Scene.d.ts +5 -5
- package/dist/types/excalidraw/scene/export.d.ts +1 -1
- package/dist/types/excalidraw/scene/index.d.ts +2 -2
- package/dist/types/excalidraw/scene/scroll.d.ts +1 -1
- package/dist/types/excalidraw/scene/scrollbars.d.ts +1 -1
- package/dist/types/excalidraw/scene/types.d.ts +3 -3
- package/dist/types/excalidraw/snapping.d.ts +4 -5
- package/dist/types/excalidraw/store.d.ts +2 -2
- package/dist/types/excalidraw/types.d.ts +10 -9
- package/dist/types/excalidraw/visualdebug.d.ts +1 -1
- package/dist/types/excalidraw/{element → wysiwyg}/textWysiwyg.d.ts +1 -1
- package/dist/types/math/{point.d.ts → src/point.d.ts} +2 -2
- package/dist/types/math/{polygon.d.ts → src/polygon.d.ts} +1 -0
- package/dist/types/math/{segment.d.ts → src/segment.d.ts} +1 -1
- package/dist/types/utils/{bbox.d.ts → src/bbox.d.ts} +1 -1
- package/dist/types/utils/{collision.d.ts → src/collision.d.ts} +1 -2
- package/dist/types/utils/{export.d.ts → src/export.d.ts} +2 -2
- package/dist/types/utils/{index.d.ts → src/index.d.ts} +1 -1
- package/dist/types/utils/{geometry → src}/shape.d.ts +1 -14
- package/dist/types/utils/{withinBounds.d.ts → src/withinBounds.d.ts} +2 -2
- package/history.ts +2 -1
- package/package.json +14 -2
- package/dist/dev/chunk-DYSQNY2T.js.map +0 -7
- package/dist/dev/chunk-ND5KUA7P.js.map +0 -7
- package/dist/prod/chunk-45TA3AZW.js +0 -34
- package/dist/prod/data/image-YE6T6FOC.js +0 -1
- /package/dist/dev/data/{image-ZD4HK457.js.map → image-I5I3FC2R.js.map} +0 -0
- /package/dist/dev/locales/{en-IW3FTNXY.js.map → en-FBYNI7ML.js.map} +0 -0
- /package/dist/types/{excalidraw → common/src}/keys.d.ts +0 -0
- /package/dist/types/{excalidraw → common/src}/queue.d.ts +0 -0
- /package/dist/types/{excalidraw → common/src}/random.d.ts +0 -0
- /package/dist/types/{excalidraw/data → common/src}/url.d.ts +0 -0
- /package/dist/types/{excalidraw → common/src}/utility-types.d.ts +0 -0
- /package/dist/types/{excalidraw/element → element/src}/containerCache.d.ts +0 -0
- /package/dist/types/{excalidraw/element → element/src}/cropElement.d.ts +0 -0
- /package/dist/types/{excalidraw/element → element/src}/distance.d.ts +0 -0
- /package/dist/types/{excalidraw/element → element/src}/elbowArrow.d.ts +0 -0
- /package/dist/types/{excalidraw/element → element/src}/sortElements.d.ts +0 -0
- /package/dist/types/{excalidraw/element → element/src}/textMeasurements.d.ts +0 -0
- /package/dist/types/{excalidraw/element → element/src}/textWrapping.d.ts +0 -0
- /package/dist/types/{excalidraw/element → element/src}/utils.d.ts +0 -0
- /package/dist/types/math/{angle.d.ts → src/angle.d.ts} +0 -0
- /package/dist/types/math/{curve.d.ts → src/curve.d.ts} +0 -0
- /package/dist/types/math/{ellipse.d.ts → src/ellipse.d.ts} +0 -0
- /package/dist/types/math/{index.d.ts → src/index.d.ts} +0 -0
- /package/dist/types/math/{line.d.ts → src/line.d.ts} +0 -0
- /package/dist/types/math/{range.d.ts → src/range.d.ts} +0 -0
- /package/dist/types/math/{rectangle.d.ts → src/rectangle.d.ts} +0 -0
- /package/dist/types/math/{triangle.d.ts → src/triangle.d.ts} +0 -0
- /package/dist/types/math/{types.d.ts → src/types.d.ts} +0 -0
- /package/dist/types/math/{utils.d.ts → src/utils.d.ts} +0 -0
- /package/dist/types/math/{vector.d.ts → src/vector.d.ts} +0 -0
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type { MarkOptional, Mutable } from "../utility-types";
|
|
1
|
+
import type { MarkOptional } from "@excalidraw/common/utility-types";
|
|
2
|
+
import type { ExcalidrawImageElement, ExcalidrawTextElement, ExcalidrawLinearElement, ExcalidrawGenericElement, NonDeleted, TextAlign, VerticalAlign, Arrowhead, ExcalidrawFreeDrawElement, FontFamilyValues, ExcalidrawTextContainer, ExcalidrawFrameElement, ExcalidrawEmbeddableElement, ExcalidrawMagicFrameElement, ExcalidrawIframeElement, ElementsMap, ExcalidrawArrowElement, FixedSegment, ExcalidrawElbowArrowElement } from "./types";
|
|
4
3
|
export type ElementConstructorOpts = MarkOptional<Omit<ExcalidrawGenericElement, "id" | "type" | "isDeleted" | "updated">, "width" | "height" | "angle" | "groupIds" | "frameId" | "index" | "boundElements" | "seed" | "version" | "versionNonce" | "link" | "strokeStyle" | "fillStyle" | "strokeColor" | "backgroundColor" | "roughness" | "strokeWidth" | "roundness" | "locked" | "opacity" | "customData">;
|
|
5
4
|
export declare const newElement: (opts: {
|
|
6
5
|
type: ExcalidrawGenericElement["type"];
|
|
@@ -52,7 +51,7 @@ export declare const newArrowElement: <T extends boolean>(opts: {
|
|
|
52
51
|
points?: readonly import("@excalidraw/math").LocalPoint[] | undefined;
|
|
53
52
|
elbowed?: T | undefined;
|
|
54
53
|
fixedSegments?: FixedSegment[] | null | undefined;
|
|
55
|
-
} & Omit<Omit<ExcalidrawGenericElement, "id" | "isDeleted" | "updated" | "type">, "link" | "strokeColor" | "backgroundColor" | "fillStyle" | "strokeWidth" | "strokeStyle" | "roundness" | "roughness" | "opacity" | "width" | "height" | "
|
|
54
|
+
} & Omit<Omit<ExcalidrawGenericElement, "id" | "isDeleted" | "updated" | "type">, "link" | "angle" | "strokeColor" | "backgroundColor" | "fillStyle" | "strokeWidth" | "strokeStyle" | "roundness" | "roughness" | "opacity" | "width" | "height" | "seed" | "version" | "versionNonce" | "index" | "groupIds" | "frameId" | "boundElements" | "locked" | "customData"> & Partial<Pick<Omit<ExcalidrawGenericElement, "id" | "isDeleted" | "updated" | "type">, "link" | "angle" | "strokeColor" | "backgroundColor" | "fillStyle" | "strokeWidth" | "strokeStyle" | "roundness" | "roughness" | "opacity" | "width" | "height" | "seed" | "version" | "versionNonce" | "index" | "groupIds" | "frameId" | "boundElements" | "locked" | "customData">>) => T extends true ? NonDeleted<ExcalidrawElbowArrowElement> : NonDeleted<ExcalidrawArrowElement>;
|
|
56
55
|
export declare const newImageElement: (opts: {
|
|
57
56
|
type: ExcalidrawImageElement["type"];
|
|
58
57
|
status?: ExcalidrawImageElement["status"];
|
|
@@ -60,42 +59,3 @@ export declare const newImageElement: (opts: {
|
|
|
60
59
|
scale?: ExcalidrawImageElement["scale"];
|
|
61
60
|
crop?: ExcalidrawImageElement["crop"];
|
|
62
61
|
} & ElementConstructorOpts) => NonDeleted<ExcalidrawImageElement>;
|
|
63
|
-
/**
|
|
64
|
-
* Clones ExcalidrawElement data structure. Does not regenerate id, nonce, or
|
|
65
|
-
* any value. The purpose is to to break object references for immutability
|
|
66
|
-
* reasons, whenever we want to keep the original element, but ensure it's not
|
|
67
|
-
* mutated.
|
|
68
|
-
*
|
|
69
|
-
* Only clones plain objects and arrays. Doesn't clone Date, RegExp, Map, Set,
|
|
70
|
-
* Typed arrays and other non-null objects.
|
|
71
|
-
*/
|
|
72
|
-
export declare const deepCopyElement: <T extends ExcalidrawElement>(val: T) => Mutable<T>;
|
|
73
|
-
/**
|
|
74
|
-
* Duplicate an element, often used in the alt-drag operation.
|
|
75
|
-
* Note that this method has gotten a bit complicated since the
|
|
76
|
-
* introduction of gruoping/ungrouping elements.
|
|
77
|
-
* @param editingGroupId The current group being edited. The new
|
|
78
|
-
* element will inherit this group and its
|
|
79
|
-
* parents.
|
|
80
|
-
* @param groupIdMapForOperation A Map that maps old group IDs to
|
|
81
|
-
* duplicated ones. If you are duplicating
|
|
82
|
-
* multiple elements at once, share this map
|
|
83
|
-
* amongst all of them
|
|
84
|
-
* @param element Element to duplicate
|
|
85
|
-
* @param overrides Any element properties to override
|
|
86
|
-
*/
|
|
87
|
-
export declare const duplicateElement: <TElement extends ExcalidrawElement>(editingGroupId: AppState["editingGroupId"], groupIdMapForOperation: Map<GroupId, GroupId>, element: TElement, overrides?: Partial<TElement> | undefined) => Readonly<TElement>;
|
|
88
|
-
/**
|
|
89
|
-
* Clones elements, regenerating their ids (including bindings) and group ids.
|
|
90
|
-
*
|
|
91
|
-
* If bindings don't exist in the elements array, they are removed. Therefore,
|
|
92
|
-
* it's advised to supply the whole elements array, or sets of elements that
|
|
93
|
-
* are encapsulated (such as library items), if the purpose is to retain
|
|
94
|
-
* bindings to the cloned elements intact.
|
|
95
|
-
*
|
|
96
|
-
* NOTE by default does not randomize or regenerate anything except the id.
|
|
97
|
-
*/
|
|
98
|
-
export declare const duplicateElements: (elements: readonly ExcalidrawElement[], opts?: {
|
|
99
|
-
/** NOTE also updates version flags and `updated` */
|
|
100
|
-
randomizeSeed: boolean;
|
|
101
|
-
}) => ExcalidrawElement[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { StaticCanvasRenderConfig, RenderableElementsMap, InteractiveCanvasRenderConfig } from "
|
|
3
|
-
import type {
|
|
1
|
+
import type { AppState, StaticCanvasAppState, InteractiveCanvasAppState, ElementsPendingErasure, PendingExcalidrawElements } from "@excalidraw/excalidraw/types";
|
|
2
|
+
import type { StaticCanvasRenderConfig, RenderableElementsMap, InteractiveCanvasRenderConfig } from "@excalidraw/excalidraw/scene/types";
|
|
3
|
+
import type { ExcalidrawElement, ExcalidrawTextElement, NonDeletedExcalidrawElement, ExcalidrawFreeDrawElement, ExcalidrawImageElement, ExcalidrawFrameLikeElement, NonDeletedSceneElementsMap } from "./types";
|
|
4
4
|
import type { RoughCanvas } from "roughjs/bin/canvas";
|
|
5
5
|
export declare const IMAGE_INVERT_FILTER = "invert(100%) hue-rotate(180deg) saturate(1.25)";
|
|
6
6
|
export declare const getRenderOpacity: (element: ExcalidrawElement, containingFrame: ExcalidrawFrameLikeElement | null, elementsPendingErasure: ElementsPendingErasure, pendingNodes: Readonly<PendingExcalidrawElements> | null, globalAlpha?: number) => number;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type LocalPoint } from "@excalidraw/math";
|
|
2
|
+
import type Scene from "@excalidraw/excalidraw/scene/Scene";
|
|
3
|
+
import type { PointerDownState } from "@excalidraw/excalidraw/types";
|
|
2
4
|
import type { BoundingBox } from "./bounds";
|
|
3
5
|
import type { MaybeTransformHandleType, TransformHandleDirection } from "./transformHandles";
|
|
4
6
|
import type { ExcalidrawLinearElement, ExcalidrawTextElement, NonDeletedExcalidrawElement, NonDeleted, ExcalidrawElement, ElementsMap, SceneElementsMap } from "./types";
|
|
5
|
-
import type Scene from "../scene/Scene";
|
|
6
|
-
import type { PointerDownState } from "../types";
|
|
7
7
|
export declare const transformElements: (originalElements: PointerDownState["originalElements"], transformHandleType: MaybeTransformHandleType, selectedElements: readonly NonDeletedExcalidrawElement[], elementsMap: SceneElementsMap, scene: Scene, shouldRotateWithDiscreteAngle: boolean, shouldResizeFromCenter: boolean, shouldMaintainAspectRatio: boolean, pointerX: number, pointerY: number, centerX: number, centerY: number) => boolean;
|
|
8
8
|
export declare const rescalePointsInElement: (element: NonDeletedExcalidrawElement, width: number, height: number, normalizePoints: boolean) => {
|
|
9
9
|
points: LocalPoint[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { GlobalPoint, LocalPoint } from "@excalidraw/math";
|
|
2
|
-
import type { AppState, Device, Zoom } from "
|
|
2
|
+
import type { AppState, Device, Zoom } from "@excalidraw/excalidraw/types";
|
|
3
3
|
import type { Bounds } from "./bounds";
|
|
4
4
|
import type { MaybeTransformHandleType } from "./transformHandles";
|
|
5
5
|
import type { ExcalidrawElement, PointerType, NonDeletedExcalidrawElement, ElementsMap } from "./types";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { AppState, InteractiveCanvasAppState } from "@excalidraw/excalidraw/types";
|
|
2
|
+
import type { ElementsMap, ElementsMapOrArray, ExcalidrawElement, NonDeletedExcalidrawElement } from "./types";
|
|
3
3
|
/**
|
|
4
4
|
* Frames and their containing elements are not to be selected at the same time.
|
|
5
5
|
* Given an array of selected elements, if there are frames and their containing elements
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type GlobalPoint, type LocalPoint } from "@excalidraw/math";
|
|
2
|
-
import { type GeometricShape } from "@excalidraw/utils/
|
|
3
|
-
import type {
|
|
4
|
-
import
|
|
5
|
-
import type {
|
|
2
|
+
import { type GeometricShape } from "@excalidraw/utils/shape";
|
|
3
|
+
import type { Zoom } from "@excalidraw/excalidraw/types";
|
|
4
|
+
import { type Bounds } from "./bounds";
|
|
5
|
+
import type { ExcalidrawElement, ElementsMap, NonDeleted, ExcalidrawLinearElement } from "./types";
|
|
6
6
|
export type ToolCategory = "manipulation" | "elements";
|
|
7
7
|
export declare const SHAPES: readonly [{
|
|
8
8
|
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
@@ -75,9 +75,9 @@ export declare const SHAPES: readonly [{
|
|
|
75
75
|
readonly fillable: false;
|
|
76
76
|
readonly myocSimplifiedMode: true;
|
|
77
77
|
}];
|
|
78
|
-
export declare const findShapeByKey: (key: string) => "line" | "
|
|
78
|
+
export declare const findShapeByKey: (key: string) => "line" | "ellipse" | "text" | "rectangle" | "diamond" | "image" | "selection" | "arrow" | "freedraw" | "eraser" | null;
|
|
79
79
|
/**
|
|
80
|
-
* get the pure geometric shape of an excalidraw
|
|
80
|
+
* get the pure geometric shape of an excalidraw elementw
|
|
81
81
|
* which is then used for hit detection
|
|
82
82
|
*/
|
|
83
83
|
export declare const getElementShape: <Point extends GlobalPoint | LocalPoint>(element: ExcalidrawElement, elementsMap: ElementsMap) => GeometricShape<Point>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { UIAppState } from "
|
|
1
|
+
import type { UIAppState } from "@excalidraw/excalidraw/types";
|
|
2
2
|
import type { NonDeletedExcalidrawElement } from "./types";
|
|
3
3
|
export declare const showSelectedShapeActions: (appState: UIAppState, elements: readonly NonDeletedExcalidrawElement[]) => boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { AppState, Offsets, Zoom } from "@excalidraw/excalidraw/types";
|
|
1
2
|
import type { ElementsMap, ExcalidrawElement } from "./types";
|
|
2
|
-
import type { AppState, Offsets, Zoom } from "../types";
|
|
3
3
|
export declare const isInvisiblySmallElement: (element: ExcalidrawElement) => boolean;
|
|
4
4
|
export declare const isElementInViewport: (element: ExcalidrawElement, width: number, height: number, viewTransformations: {
|
|
5
5
|
zoom: Zoom;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
+
import type { AppState } from "@excalidraw/excalidraw/types";
|
|
2
|
+
import type { ExtractSetType } from "@excalidraw/common/utility-types";
|
|
1
3
|
import type { MaybeTransformHandleType } from "./transformHandles";
|
|
2
4
|
import type { ElementsMap, ExcalidrawElement, ExcalidrawElementType, ExcalidrawTextContainer, ExcalidrawTextElement, ExcalidrawTextElementWithContainer, NonDeletedExcalidrawElement } from "./types";
|
|
3
|
-
import type { AppState } from "../types";
|
|
4
|
-
import type { ExtractSetType } from "../utility-types";
|
|
5
5
|
export declare const redrawTextBoundingBox: (textElement: ExcalidrawTextElement, container: ExcalidrawElement | null, elementsMap: ElementsMap, informMutation?: boolean) => void;
|
|
6
|
-
export declare const bindTextToShapeAfterDuplication: (newElements: ExcalidrawElement[], oldElements: ExcalidrawElement[], oldIdToDuplicatedId: Map<ExcalidrawElement["id"], ExcalidrawElement["id"]>) => void;
|
|
7
6
|
export declare const handleBindTextResize: (container: NonDeletedExcalidrawElement, elementsMap: ElementsMap, transformHandleType: MaybeTransformHandleType, shouldMaintainAspectRatio?: boolean) => void;
|
|
8
7
|
export declare const computeBoundTextPosition: (container: ExcalidrawElement, boundTextElement: ExcalidrawTextElementWithContainer, elementsMap: ElementsMap) => {
|
|
9
8
|
x: number;
|
|
@@ -20,7 +19,7 @@ export declare const getContainerCoords: (container: NonDeletedExcalidrawElement
|
|
|
20
19
|
x: number;
|
|
21
20
|
y: number;
|
|
22
21
|
};
|
|
23
|
-
export declare const getTextElementAngle: (textElement: ExcalidrawTextElement, container: ExcalidrawTextContainer | null) => import("
|
|
22
|
+
export declare const getTextElementAngle: (textElement: ExcalidrawTextElement, container: ExcalidrawTextContainer | null) => import("../../math/src").Radians;
|
|
24
23
|
export declare const getBoundTextElementPosition: (container: ExcalidrawElement, boundTextElement: ExcalidrawTextElementWithContainer, elementsMap: ElementsMap) => {
|
|
25
24
|
x: number;
|
|
26
25
|
y: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Radians } from "@excalidraw/math";
|
|
2
|
-
import type { Device, InteractiveCanvasAppState, Zoom } from "
|
|
2
|
+
import type { Device, InteractiveCanvasAppState, Zoom } from "@excalidraw/excalidraw/types";
|
|
3
3
|
import type { Bounds } from "./bounds";
|
|
4
4
|
import type { ElementsMap, ExcalidrawElement, NonDeletedExcalidrawElement, PointerType } from "./types";
|
|
5
5
|
export type TransformHandleDirection = "n" | "s" | "w" | "e" | "nw" | "ne" | "sw" | "se";
|
|
@@ -31,10 +31,10 @@ export declare const OMIT_SIDES_FOR_FRAME: {
|
|
|
31
31
|
export declare const canResizeFromSides: (device: Device) => boolean;
|
|
32
32
|
export declare const getOmitSidesForDevice: (device: Device) => {};
|
|
33
33
|
export declare const getTransformHandlesFromCoords: ([x1, y1, x2, y2, cx, cy]: [number, number, number, number, number, number], angle: Radians, zoom: Zoom, pointerType: PointerType, omitSides?: {
|
|
34
|
-
e?: boolean | undefined;
|
|
35
34
|
s?: boolean | undefined;
|
|
36
|
-
w?: boolean | undefined;
|
|
37
35
|
n?: boolean | undefined;
|
|
36
|
+
w?: boolean | undefined;
|
|
37
|
+
e?: boolean | undefined;
|
|
38
38
|
nw?: boolean | undefined;
|
|
39
39
|
ne?: boolean | undefined;
|
|
40
40
|
sw?: boolean | undefined;
|
|
@@ -42,10 +42,10 @@ export declare const getTransformHandlesFromCoords: ([x1, y1, x2, y2, cx, cy]: [
|
|
|
42
42
|
rotation?: boolean | undefined;
|
|
43
43
|
}, margin?: number, spacing?: number) => TransformHandles;
|
|
44
44
|
export declare const getTransformHandles: (element: ExcalidrawElement, zoom: Zoom, elementsMap: ElementsMap, pointerType?: PointerType, omitSides?: {
|
|
45
|
-
e?: boolean | undefined;
|
|
46
45
|
s?: boolean | undefined;
|
|
47
|
-
w?: boolean | undefined;
|
|
48
46
|
n?: boolean | undefined;
|
|
47
|
+
w?: boolean | undefined;
|
|
48
|
+
e?: boolean | undefined;
|
|
49
49
|
nw?: boolean | undefined;
|
|
50
50
|
ne?: boolean | undefined;
|
|
51
51
|
sw?: boolean | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ElementOrToolType } from "
|
|
2
|
-
import type { MarkNonNullable } from "
|
|
1
|
+
import type { ElementOrToolType } from "@excalidraw/excalidraw/types";
|
|
2
|
+
import type { MarkNonNullable } from "@excalidraw/common/utility-types";
|
|
3
3
|
import type { Bounds } from "./bounds";
|
|
4
4
|
import type { ExcalidrawElement, ExcalidrawTextElement, ExcalidrawEmbeddableElement, ExcalidrawLinearElement, ExcalidrawBindableElement, ExcalidrawFreeDrawElement, InitializedExcalidrawImageElement, ExcalidrawImageElement, ExcalidrawTextElementWithContainer, ExcalidrawTextContainer, ExcalidrawFrameElement, RoundnessType, ExcalidrawFrameLikeElement, ExcalidrawElementType, ExcalidrawIframeElement, ExcalidrawIframeLikeElement, ExcalidrawMagicFrameElement, ExcalidrawArrowElement, ExcalidrawElbowArrowElement, PointBinding, FixedPointBinding, ExcalidrawFlowchartNodeElement } from "./types";
|
|
5
5
|
export declare const isInitializedImageElement: (element: ExcalidrawElement | null) => element is InitializedExcalidrawImageElement;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { LocalPoint, Radians } from "@excalidraw/math";
|
|
2
|
-
import type { FONT_FAMILY, ROUNDNESS, TEXT_ALIGN, THEME, VERTICAL_ALIGN } from "
|
|
3
|
-
import type { MakeBrand, MarkNonNullable, Merge, ValueOf } from "
|
|
2
|
+
import type { FONT_FAMILY, ROUNDNESS, TEXT_ALIGN, THEME, VERTICAL_ALIGN } from "@excalidraw/common";
|
|
3
|
+
import type { MakeBrand, MarkNonNullable, Merge, ValueOf } from "@excalidraw/common/utility-types";
|
|
4
4
|
export type ChartType = "bar" | "line";
|
|
5
5
|
export type FillStyle = "hachure" | "cross-hatch" | "solid" | "zigzag";
|
|
6
6
|
export type FontFamilyKeys = keyof typeof FONT_FAMILY;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type
|
|
3
|
-
|
|
4
|
-
export declare const
|
|
1
|
+
import type { AppState } from "@excalidraw/excalidraw/types";
|
|
2
|
+
import type Scene from "@excalidraw/excalidraw/scene/Scene";
|
|
3
|
+
import type { ExcalidrawElement } from "./types";
|
|
4
|
+
export declare const moveOneLeft: (allElements: readonly ExcalidrawElement[], appState: AppState, scene: Scene) => readonly ExcalidrawElement[];
|
|
5
|
+
export declare const moveOneRight: (allElements: readonly ExcalidrawElement[], appState: AppState, scene: Scene) => readonly ExcalidrawElement[];
|
|
5
6
|
export declare const moveAllLeft: (allElements: readonly ExcalidrawElement[], appState: AppState) => readonly ExcalidrawElement[] | ExcalidrawElement[];
|
|
6
7
|
export declare const moveAllRight: (allElements: readonly ExcalidrawElement[], appState: AppState) => readonly ExcalidrawElement[] | ExcalidrawElement[];
|
|
@@ -4,7 +4,7 @@ export declare const actionAddToLibrary: {
|
|
|
4
4
|
trackEvent: {
|
|
5
5
|
category: "element";
|
|
6
6
|
};
|
|
7
|
-
perform: (elements: readonly import("
|
|
7
|
+
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: import("../types").AppClassProperties) => Promise<{
|
|
8
8
|
captureUpdate: "EVENTUALLY";
|
|
9
9
|
appState: {
|
|
10
10
|
toast: {
|
|
@@ -22,17 +22,17 @@ export declare const actionAddToLibrary: {
|
|
|
22
22
|
wheelZoomsOnDefault?: boolean | undefined;
|
|
23
23
|
errorMessage: import("react").ReactNode;
|
|
24
24
|
activeEmbeddable: {
|
|
25
|
-
element: import("
|
|
25
|
+
element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
|
|
26
26
|
state: "hover" | "active";
|
|
27
27
|
} | null;
|
|
28
|
-
newElement: import("
|
|
29
|
-
resizingElement: import("
|
|
30
|
-
multiElement: import("
|
|
31
|
-
selectionElement: import("
|
|
28
|
+
newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
|
|
29
|
+
resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
30
|
+
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
31
|
+
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
32
32
|
isBindingEnabled: boolean;
|
|
33
|
-
startBoundElement: import("
|
|
34
|
-
suggestedBindings: import("
|
|
35
|
-
frameToHighlight: import("
|
|
33
|
+
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
34
|
+
suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
|
|
35
|
+
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
36
36
|
frameRendering: {
|
|
37
37
|
enabled: boolean;
|
|
38
38
|
name: boolean;
|
|
@@ -40,12 +40,13 @@ export declare const actionAddToLibrary: {
|
|
|
40
40
|
clip: boolean;
|
|
41
41
|
};
|
|
42
42
|
editingFrame: string | null;
|
|
43
|
-
elementsToHighlight: import("
|
|
44
|
-
editingTextElement: import("
|
|
45
|
-
editingLinearElement: import("
|
|
43
|
+
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
44
|
+
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
45
|
+
editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
|
|
46
46
|
activeTool: {
|
|
47
47
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
48
48
|
locked: boolean;
|
|
49
|
+
fromSelection: boolean;
|
|
49
50
|
} & import("../types").ActiveTool;
|
|
50
51
|
penMode: boolean;
|
|
51
52
|
penDetected: boolean;
|
|
@@ -55,18 +56,18 @@ export declare const actionAddToLibrary: {
|
|
|
55
56
|
exportScale: number;
|
|
56
57
|
currentItemStrokeColor: string;
|
|
57
58
|
currentItemBackgroundColor: string;
|
|
58
|
-
currentItemFillStyle: import("
|
|
59
|
+
currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
|
|
59
60
|
currentItemStrokeWidth: number;
|
|
60
|
-
currentItemStrokeStyle: import("
|
|
61
|
+
currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
|
|
61
62
|
currentItemRoughness: number;
|
|
62
63
|
currentItemOpacity: number;
|
|
63
64
|
currentItemFontFamily: number;
|
|
64
65
|
currentItemFontSize: number;
|
|
65
66
|
currentItemTextAlign: string;
|
|
66
|
-
currentItemStartArrowhead: import("
|
|
67
|
-
currentItemEndArrowhead: import("
|
|
67
|
+
currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
68
|
+
currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
68
69
|
currentHoveredFontFamily: number | null;
|
|
69
|
-
currentItemRoundness: import("
|
|
70
|
+
currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
|
|
70
71
|
currentItemArrowType: "round" | "sharp" | "elbow";
|
|
71
72
|
viewBackgroundColor: string;
|
|
72
73
|
scrollX: number;
|
|
@@ -79,7 +80,7 @@ export declare const actionAddToLibrary: {
|
|
|
79
80
|
zoom: Readonly<{
|
|
80
81
|
value: import("../types").NormalizedZoomValue;
|
|
81
82
|
}>;
|
|
82
|
-
openMenu: "
|
|
83
|
+
openMenu: "shape" | "canvas" | null;
|
|
83
84
|
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
84
85
|
openSidebar: {
|
|
85
86
|
name: string;
|
|
@@ -97,7 +98,7 @@ export declare const actionAddToLibrary: {
|
|
|
97
98
|
sourceElementId: string;
|
|
98
99
|
} | null;
|
|
99
100
|
defaultSidebarDockedPreference: boolean;
|
|
100
|
-
lastPointerDownWith: import("
|
|
101
|
+
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
101
102
|
selectedElementIds: Readonly<{
|
|
102
103
|
[id: string]: true;
|
|
103
104
|
}>;
|
|
@@ -110,7 +111,7 @@ export declare const actionAddToLibrary: {
|
|
|
110
111
|
selectedElementsAreBeingDragged: boolean;
|
|
111
112
|
shouldCacheIgnoreZoom: boolean;
|
|
112
113
|
zenModeEnabled: boolean;
|
|
113
|
-
theme: import("
|
|
114
|
+
theme: import("@excalidraw/element/types").Theme;
|
|
114
115
|
gridSize: number;
|
|
115
116
|
gridStep: number;
|
|
116
117
|
gridModeEnabled: boolean;
|
|
@@ -131,7 +132,7 @@ export declare const actionAddToLibrary: {
|
|
|
131
132
|
[id: string]: true;
|
|
132
133
|
}> | undefined;
|
|
133
134
|
username?: string | null | undefined;
|
|
134
|
-
userState?: import("
|
|
135
|
+
userState?: import("@excalidraw/common").UserIdleState | undefined;
|
|
135
136
|
color?: {
|
|
136
137
|
background: string;
|
|
137
138
|
stroke: string;
|
|
@@ -148,7 +149,7 @@ export declare const actionAddToLibrary: {
|
|
|
148
149
|
open: boolean;
|
|
149
150
|
panels: number;
|
|
150
151
|
};
|
|
151
|
-
currentChartType: import("
|
|
152
|
+
currentChartType: import("@excalidraw/element/types").ChartType;
|
|
152
153
|
pasteDialog: {
|
|
153
154
|
shown: false;
|
|
154
155
|
data: null;
|
|
@@ -157,8 +158,8 @@ export declare const actionAddToLibrary: {
|
|
|
157
158
|
data: import("../charts").Spreadsheet;
|
|
158
159
|
};
|
|
159
160
|
pendingImageElementId: string | null;
|
|
160
|
-
showHyperlinkPopup: false | "
|
|
161
|
-
selectedLinearElement: import("
|
|
161
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
162
|
+
selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
|
|
162
163
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
163
164
|
originSnapOffset: {
|
|
164
165
|
x: number;
|
|
@@ -195,17 +196,17 @@ export declare const actionAddToLibrary: {
|
|
|
195
196
|
hideMainMenus: boolean;
|
|
196
197
|
wheelZoomsOnDefault?: boolean | undefined;
|
|
197
198
|
activeEmbeddable: {
|
|
198
|
-
element: import("
|
|
199
|
+
element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
|
|
199
200
|
state: "hover" | "active";
|
|
200
201
|
} | null;
|
|
201
|
-
newElement: import("
|
|
202
|
-
resizingElement: import("
|
|
203
|
-
multiElement: import("
|
|
204
|
-
selectionElement: import("
|
|
202
|
+
newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
|
|
203
|
+
resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
204
|
+
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
205
|
+
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
205
206
|
isBindingEnabled: boolean;
|
|
206
|
-
startBoundElement: import("
|
|
207
|
-
suggestedBindings: import("
|
|
208
|
-
frameToHighlight: import("
|
|
207
|
+
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
208
|
+
suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
|
|
209
|
+
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
209
210
|
frameRendering: {
|
|
210
211
|
enabled: boolean;
|
|
211
212
|
name: boolean;
|
|
@@ -213,12 +214,13 @@ export declare const actionAddToLibrary: {
|
|
|
213
214
|
clip: boolean;
|
|
214
215
|
};
|
|
215
216
|
editingFrame: string | null;
|
|
216
|
-
elementsToHighlight: import("
|
|
217
|
-
editingTextElement: import("
|
|
218
|
-
editingLinearElement: import("
|
|
217
|
+
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
218
|
+
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
219
|
+
editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
|
|
219
220
|
activeTool: {
|
|
220
221
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
221
222
|
locked: boolean;
|
|
223
|
+
fromSelection: boolean;
|
|
222
224
|
} & import("../types").ActiveTool;
|
|
223
225
|
penMode: boolean;
|
|
224
226
|
penDetected: boolean;
|
|
@@ -228,18 +230,18 @@ export declare const actionAddToLibrary: {
|
|
|
228
230
|
exportScale: number;
|
|
229
231
|
currentItemStrokeColor: string;
|
|
230
232
|
currentItemBackgroundColor: string;
|
|
231
|
-
currentItemFillStyle: import("
|
|
233
|
+
currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
|
|
232
234
|
currentItemStrokeWidth: number;
|
|
233
|
-
currentItemStrokeStyle: import("
|
|
235
|
+
currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
|
|
234
236
|
currentItemRoughness: number;
|
|
235
237
|
currentItemOpacity: number;
|
|
236
238
|
currentItemFontFamily: number;
|
|
237
239
|
currentItemFontSize: number;
|
|
238
240
|
currentItemTextAlign: string;
|
|
239
|
-
currentItemStartArrowhead: import("
|
|
240
|
-
currentItemEndArrowhead: import("
|
|
241
|
+
currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
242
|
+
currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
241
243
|
currentHoveredFontFamily: number | null;
|
|
242
|
-
currentItemRoundness: import("
|
|
244
|
+
currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
|
|
243
245
|
currentItemArrowType: "round" | "sharp" | "elbow";
|
|
244
246
|
viewBackgroundColor: string;
|
|
245
247
|
scrollX: number;
|
|
@@ -252,7 +254,7 @@ export declare const actionAddToLibrary: {
|
|
|
252
254
|
zoom: Readonly<{
|
|
253
255
|
value: import("../types").NormalizedZoomValue;
|
|
254
256
|
}>;
|
|
255
|
-
openMenu: "
|
|
257
|
+
openMenu: "shape" | "canvas" | null;
|
|
256
258
|
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
257
259
|
openSidebar: {
|
|
258
260
|
name: string;
|
|
@@ -270,7 +272,7 @@ export declare const actionAddToLibrary: {
|
|
|
270
272
|
sourceElementId: string;
|
|
271
273
|
} | null;
|
|
272
274
|
defaultSidebarDockedPreference: boolean;
|
|
273
|
-
lastPointerDownWith: import("
|
|
275
|
+
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
274
276
|
selectedElementIds: Readonly<{
|
|
275
277
|
[id: string]: true;
|
|
276
278
|
}>;
|
|
@@ -288,7 +290,7 @@ export declare const actionAddToLibrary: {
|
|
|
288
290
|
duration?: number | undefined;
|
|
289
291
|
} | null;
|
|
290
292
|
zenModeEnabled: boolean;
|
|
291
|
-
theme: import("
|
|
293
|
+
theme: import("@excalidraw/element/types").Theme;
|
|
292
294
|
gridSize: number;
|
|
293
295
|
gridStep: number;
|
|
294
296
|
gridModeEnabled: boolean;
|
|
@@ -309,7 +311,7 @@ export declare const actionAddToLibrary: {
|
|
|
309
311
|
[id: string]: true;
|
|
310
312
|
}> | undefined;
|
|
311
313
|
username?: string | null | undefined;
|
|
312
|
-
userState?: import("
|
|
314
|
+
userState?: import("@excalidraw/common").UserIdleState | undefined;
|
|
313
315
|
color?: {
|
|
314
316
|
background: string;
|
|
315
317
|
stroke: string;
|
|
@@ -326,7 +328,7 @@ export declare const actionAddToLibrary: {
|
|
|
326
328
|
open: boolean;
|
|
327
329
|
panels: number;
|
|
328
330
|
};
|
|
329
|
-
currentChartType: import("
|
|
331
|
+
currentChartType: import("@excalidraw/element/types").ChartType;
|
|
330
332
|
pasteDialog: {
|
|
331
333
|
shown: false;
|
|
332
334
|
data: null;
|
|
@@ -335,8 +337,8 @@ export declare const actionAddToLibrary: {
|
|
|
335
337
|
data: import("../charts").Spreadsheet;
|
|
336
338
|
};
|
|
337
339
|
pendingImageElementId: string | null;
|
|
338
|
-
showHyperlinkPopup: false | "
|
|
339
|
-
selectedLinearElement: import("
|
|
340
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
341
|
+
selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
|
|
340
342
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
341
343
|
originSnapOffset: {
|
|
342
344
|
x: number;
|
|
@@ -373,17 +375,17 @@ export declare const actionAddToLibrary: {
|
|
|
373
375
|
hideMainMenus: boolean;
|
|
374
376
|
wheelZoomsOnDefault?: boolean | undefined;
|
|
375
377
|
activeEmbeddable: {
|
|
376
|
-
element: import("
|
|
378
|
+
element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
|
|
377
379
|
state: "hover" | "active";
|
|
378
380
|
} | null;
|
|
379
|
-
newElement: import("
|
|
380
|
-
resizingElement: import("
|
|
381
|
-
multiElement: import("
|
|
382
|
-
selectionElement: import("
|
|
381
|
+
newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
|
|
382
|
+
resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
383
|
+
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
384
|
+
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
383
385
|
isBindingEnabled: boolean;
|
|
384
|
-
startBoundElement: import("
|
|
385
|
-
suggestedBindings: import("
|
|
386
|
-
frameToHighlight: import("
|
|
386
|
+
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
387
|
+
suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
|
|
388
|
+
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
387
389
|
frameRendering: {
|
|
388
390
|
enabled: boolean;
|
|
389
391
|
name: boolean;
|
|
@@ -391,12 +393,13 @@ export declare const actionAddToLibrary: {
|
|
|
391
393
|
clip: boolean;
|
|
392
394
|
};
|
|
393
395
|
editingFrame: string | null;
|
|
394
|
-
elementsToHighlight: import("
|
|
395
|
-
editingTextElement: import("
|
|
396
|
-
editingLinearElement: import("
|
|
396
|
+
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
397
|
+
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
398
|
+
editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
|
|
397
399
|
activeTool: {
|
|
398
400
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
399
401
|
locked: boolean;
|
|
402
|
+
fromSelection: boolean;
|
|
400
403
|
} & import("../types").ActiveTool;
|
|
401
404
|
penMode: boolean;
|
|
402
405
|
penDetected: boolean;
|
|
@@ -406,18 +409,18 @@ export declare const actionAddToLibrary: {
|
|
|
406
409
|
exportScale: number;
|
|
407
410
|
currentItemStrokeColor: string;
|
|
408
411
|
currentItemBackgroundColor: string;
|
|
409
|
-
currentItemFillStyle: import("
|
|
412
|
+
currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
|
|
410
413
|
currentItemStrokeWidth: number;
|
|
411
|
-
currentItemStrokeStyle: import("
|
|
414
|
+
currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
|
|
412
415
|
currentItemRoughness: number;
|
|
413
416
|
currentItemOpacity: number;
|
|
414
417
|
currentItemFontFamily: number;
|
|
415
418
|
currentItemFontSize: number;
|
|
416
419
|
currentItemTextAlign: string;
|
|
417
|
-
currentItemStartArrowhead: import("
|
|
418
|
-
currentItemEndArrowhead: import("
|
|
420
|
+
currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
421
|
+
currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
419
422
|
currentHoveredFontFamily: number | null;
|
|
420
|
-
currentItemRoundness: import("
|
|
423
|
+
currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
|
|
421
424
|
currentItemArrowType: "round" | "sharp" | "elbow";
|
|
422
425
|
viewBackgroundColor: string;
|
|
423
426
|
scrollX: number;
|
|
@@ -430,7 +433,7 @@ export declare const actionAddToLibrary: {
|
|
|
430
433
|
zoom: Readonly<{
|
|
431
434
|
value: import("../types").NormalizedZoomValue;
|
|
432
435
|
}>;
|
|
433
|
-
openMenu: "
|
|
436
|
+
openMenu: "shape" | "canvas" | null;
|
|
434
437
|
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
435
438
|
openSidebar: {
|
|
436
439
|
name: string;
|
|
@@ -448,7 +451,7 @@ export declare const actionAddToLibrary: {
|
|
|
448
451
|
sourceElementId: string;
|
|
449
452
|
} | null;
|
|
450
453
|
defaultSidebarDockedPreference: boolean;
|
|
451
|
-
lastPointerDownWith: import("
|
|
454
|
+
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
452
455
|
selectedElementIds: Readonly<{
|
|
453
456
|
[id: string]: true;
|
|
454
457
|
}>;
|
|
@@ -466,7 +469,7 @@ export declare const actionAddToLibrary: {
|
|
|
466
469
|
duration?: number | undefined;
|
|
467
470
|
} | null;
|
|
468
471
|
zenModeEnabled: boolean;
|
|
469
|
-
theme: import("
|
|
472
|
+
theme: import("@excalidraw/element/types").Theme;
|
|
470
473
|
gridSize: number;
|
|
471
474
|
gridStep: number;
|
|
472
475
|
gridModeEnabled: boolean;
|
|
@@ -487,7 +490,7 @@ export declare const actionAddToLibrary: {
|
|
|
487
490
|
[id: string]: true;
|
|
488
491
|
}> | undefined;
|
|
489
492
|
username?: string | null | undefined;
|
|
490
|
-
userState?: import("
|
|
493
|
+
userState?: import("@excalidraw/common").UserIdleState | undefined;
|
|
491
494
|
color?: {
|
|
492
495
|
background: string;
|
|
493
496
|
stroke: string;
|
|
@@ -504,7 +507,7 @@ export declare const actionAddToLibrary: {
|
|
|
504
507
|
open: boolean;
|
|
505
508
|
panels: number;
|
|
506
509
|
};
|
|
507
|
-
currentChartType: import("
|
|
510
|
+
currentChartType: import("@excalidraw/element/types").ChartType;
|
|
508
511
|
pasteDialog: {
|
|
509
512
|
shown: false;
|
|
510
513
|
data: null;
|
|
@@ -513,8 +516,8 @@ export declare const actionAddToLibrary: {
|
|
|
513
516
|
data: import("../charts").Spreadsheet;
|
|
514
517
|
};
|
|
515
518
|
pendingImageElementId: string | null;
|
|
516
|
-
showHyperlinkPopup: false | "
|
|
517
|
-
selectedLinearElement: import("
|
|
519
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
520
|
+
selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
|
|
518
521
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
519
522
|
originSnapOffset: {
|
|
520
523
|
x: number;
|