@zsviczian/excalidraw 0.18.0-11 → 0.18.0-12

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.
Files changed (63) hide show
  1. package/dist/excalidraw.development.js +61 -61
  2. package/dist/excalidraw.production.min.js +1 -1
  3. package/package.json +1 -1
  4. package/types/{excalidraw/scene → element/src}/Scene.d.ts +8 -11
  5. package/types/element/src/align.d.ts +3 -3
  6. package/types/element/src/binding.d.ts +9 -9
  7. package/types/element/src/dragElements.d.ts +3 -2
  8. package/types/element/src/elbowArrow.d.ts +1 -1
  9. package/types/element/src/flowchart.d.ts +3 -2
  10. package/types/element/src/fractionalIndex.d.ts +2 -2
  11. package/types/element/src/frame.d.ts +1 -1
  12. package/types/element/src/linearElementEditor.d.ts +13 -13
  13. package/types/element/src/mutateElement.d.ts +10 -2
  14. package/types/element/src/resizeElements.d.ts +5 -5
  15. package/types/element/src/sizeHelpers.d.ts +0 -1
  16. package/types/element/src/textElement.d.ts +4 -3
  17. package/types/element/src/zindex.d.ts +3 -3
  18. package/types/excalidraw/actions/actionAddToLibrary.d.ts +3 -3
  19. package/types/excalidraw/actions/actionBoundText.d.ts +2 -2
  20. package/types/excalidraw/actions/actionCanvas.d.ts +30 -30
  21. package/types/excalidraw/actions/actionClipboard.d.ts +6 -6
  22. package/types/excalidraw/actions/actionCropEditor.d.ts +1 -1
  23. package/types/excalidraw/actions/actionDeleteSelected.d.ts +3 -3
  24. package/types/excalidraw/actions/actionElementLink.d.ts +1 -1
  25. package/types/excalidraw/actions/actionElementLock.d.ts +2 -2
  26. package/types/excalidraw/actions/actionEmbeddable.d.ts +1 -1
  27. package/types/excalidraw/actions/actionExport.d.ts +32 -32
  28. package/types/excalidraw/actions/actionFinalize.d.ts +2 -2
  29. package/types/excalidraw/actions/actionFrame.d.ts +6 -6
  30. package/types/excalidraw/actions/actionGroup.d.ts +2 -2
  31. package/types/excalidraw/actions/actionLinearEditor.d.ts +1 -1
  32. package/types/excalidraw/actions/actionMenu.d.ts +1 -1
  33. package/types/excalidraw/actions/actionNavigate.d.ts +1 -1
  34. package/types/excalidraw/actions/actionProperties.d.ts +17 -17
  35. package/types/excalidraw/actions/actionSelectAll.d.ts +1 -1
  36. package/types/excalidraw/actions/actionStyles.d.ts +1 -1
  37. package/types/excalidraw/actions/actionToggleGridMode.d.ts +1 -1
  38. package/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +1 -1
  39. package/types/excalidraw/actions/actionToggleSearchMenu.d.ts +2 -2
  40. package/types/excalidraw/actions/actionToggleStats.d.ts +1 -1
  41. package/types/excalidraw/actions/actionToggleViewMode.d.ts +1 -1
  42. package/types/excalidraw/actions/actionToggleZenMode.d.ts +1 -1
  43. package/types/excalidraw/actions/actionZindex.d.ts +2 -2
  44. package/types/excalidraw/appState.d.ts +15 -15
  45. package/types/excalidraw/components/App.d.ts +4 -1
  46. package/types/excalidraw/components/ElementLinkDialog.d.ts +4 -3
  47. package/types/excalidraw/components/Stats/Angle.d.ts +1 -1
  48. package/types/excalidraw/components/Stats/CanvasGrid.d.ts +1 -1
  49. package/types/excalidraw/components/Stats/CanvasGridSize.d.ts +1 -1
  50. package/types/excalidraw/components/Stats/Dimension.d.ts +1 -1
  51. package/types/excalidraw/components/Stats/DragInput.d.ts +1 -1
  52. package/types/excalidraw/components/Stats/FontSize.d.ts +1 -1
  53. package/types/excalidraw/components/Stats/MultiAngle.d.ts +1 -1
  54. package/types/excalidraw/components/Stats/MultiDimension.d.ts +1 -1
  55. package/types/excalidraw/components/Stats/MultiFontSize.d.ts +1 -1
  56. package/types/excalidraw/components/Stats/MultiPosition.d.ts +1 -1
  57. package/types/excalidraw/components/Stats/Position.d.ts +1 -1
  58. package/types/excalidraw/components/Stats/utils.d.ts +4 -4
  59. package/types/excalidraw/components/hyperlink/Hyperlink.d.ts +3 -2
  60. package/types/excalidraw/fonts/Fonts.d.ts +1 -1
  61. package/types/excalidraw/scene/Renderer.d.ts +1 -1
  62. package/types/excalidraw/scene/types.d.ts +2 -0
  63. package/types/excalidraw/types.d.ts +1 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zsviczian/excalidraw",
3
- "version": "0.18.0-11",
3
+ "version": "0.18.0-12",
4
4
  "main": "main.js",
5
5
  "module": "./dist/prod/index.js",
6
6
  "types": "types/excalidraw/index.d.ts",
@@ -1,19 +1,11 @@
1
- import type { LinearElementEditor } from "@excalidraw/element/linearElementEditor";
1
+ import { type ElementUpdate } from "@excalidraw/element/mutateElement";
2
2
  import type { ExcalidrawElement, NonDeletedExcalidrawElement, NonDeleted, ExcalidrawFrameLikeElement, ElementsMapOrArray, OrderedExcalidrawElement, Ordered } from "@excalidraw/element/types";
3
- import type { AppState } from "../types";
4
- type ElementIdKey = InstanceType<typeof LinearElementEditor>["elementId"];
5
- type ElementKey = ExcalidrawElement | ElementIdKey;
3
+ import type { Mutable } from "@excalidraw/common/utility-types";
4
+ import type { AppState } from "../../excalidraw/types";
6
5
  type SceneStateCallback = () => void;
7
6
  type SceneStateCallbackRemover = () => void;
8
7
  export type ExcalidrawElementsIncludingDeleted = readonly ExcalidrawElement[];
9
8
  declare class Scene {
10
- private static sceneMapByElement;
11
- private static sceneMapById;
12
- static mapElementToScene(elementKey: ElementKey, scene: Scene): void;
13
- /**
14
- * @deprecated pass down `app.scene` and use it directly
15
- */
16
- static getScene(elementKey: ElementKey): Scene | null;
17
9
  private callbacks;
18
10
  private nonDeletedElements;
19
11
  private nonDeletedElementsMap;
@@ -35,6 +27,7 @@ declare class Scene {
35
27
  getElementsMapIncludingDeleted(): Map<string, Ordered<ExcalidrawElement>> & import("@excalidraw/common/utility-types").MakeBrand<"SceneElementsMap">;
36
28
  getNonDeletedElements(): readonly Ordered<NonDeletedExcalidrawElement>[];
37
29
  getFramesIncludingDeleted(): readonly ExcalidrawFrameLikeElement[];
30
+ constructor(elements?: ElementsMapOrArray | null);
38
31
  getSelectedElements(opts: {
39
32
  selectedElementIds: AppState["selectedElementIds"];
40
33
  /**
@@ -75,5 +68,9 @@ declare class Scene {
75
68
  containerId: ExcalidrawElement["id"] | null;
76
69
  }) | null) => import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement | null;
77
70
  getElementsFromId: (id: string) => ExcalidrawElement[];
71
+ mutateElement<TElement extends Mutable<ExcalidrawElement>>(element: TElement, updates: ElementUpdate<TElement>, options?: {
72
+ informMutation: boolean;
73
+ isDragging: boolean;
74
+ }): TElement;
78
75
  }
79
76
  export default Scene;
@@ -1,7 +1,7 @@
1
- import type Scene from "@excalidraw/excalidraw/scene/Scene";
2
- import type { ElementsMap, ExcalidrawElement } from "./types";
1
+ import type Scene from "./Scene";
2
+ import type { ExcalidrawElement } from "./types";
3
3
  export interface Alignment {
4
4
  position: "start" | "center" | "end";
5
5
  axis: "x" | "y";
6
6
  }
7
- export declare const alignElements: (selectedElements: ExcalidrawElement[], elementsMap: ElementsMap, alignment: Alignment, scene: Scene) => ExcalidrawElement[];
7
+ export declare const alignElements: (selectedElements: ExcalidrawElement[], alignment: Alignment, scene: Scene) => ExcalidrawElement[];
@@ -1,11 +1,11 @@
1
1
  import { type GlobalPoint } from "@excalidraw/math";
2
2
  import type { LocalPoint } from "@excalidraw/math";
3
- import type Scene from "@excalidraw/excalidraw/scene/Scene";
4
3
  import type { AppState } from "@excalidraw/excalidraw/types";
5
4
  import { type Heading } from "./heading";
5
+ import type Scene from "./Scene";
6
6
  import type { Bounds } from "./bounds";
7
7
  import type { ElementUpdate } from "./mutateElement";
8
- import type { ExcalidrawBindableElement, ExcalidrawElement, NonDeleted, ExcalidrawLinearElement, NonDeletedExcalidrawElement, ElementsMap, NonDeletedSceneElementsMap, OrderedExcalidrawElement, ExcalidrawElbowArrowElement, FixedPoint, SceneElementsMap } from "./types";
8
+ import type { ExcalidrawBindableElement, ExcalidrawElement, NonDeleted, ExcalidrawLinearElement, NonDeletedExcalidrawElement, ElementsMap, NonDeletedSceneElementsMap, OrderedExcalidrawElement, ExcalidrawElbowArrowElement, FixedPoint } from "./types";
9
9
  export type SuggestedBinding = NonDeleted<ExcalidrawBindableElement> | SuggestedPointBinding;
10
10
  export type SuggestedPointBinding = [
11
11
  NonDeleted<ExcalidrawLinearElement>,
@@ -17,20 +17,20 @@ export declare const isBindingEnabled: (appState: AppState) => boolean;
17
17
  export declare const FIXED_BINDING_DISTANCE = 5;
18
18
  export declare const BINDING_HIGHLIGHT_THICKNESS = 10;
19
19
  export declare const BINDING_HIGHLIGHT_OFFSET = 4;
20
- export declare const bindOrUnbindLinearElement: (linearElement: NonDeleted<ExcalidrawLinearElement>, startBindingElement: ExcalidrawBindableElement | null | "keep", endBindingElement: ExcalidrawBindableElement | null | "keep", elementsMap: NonDeletedSceneElementsMap, scene: Scene) => void;
21
- export declare const bindOrUnbindLinearElements: (selectedElements: NonDeleted<ExcalidrawLinearElement>[], elementsMap: NonDeletedSceneElementsMap, elements: readonly NonDeletedExcalidrawElement[], scene: Scene, isBindingEnabled: boolean, draggingPoints: readonly number[] | null, zoom?: AppState["zoom"]) => void;
20
+ export declare const bindOrUnbindLinearElement: (linearElement: NonDeleted<ExcalidrawLinearElement>, startBindingElement: ExcalidrawBindableElement | null | "keep", endBindingElement: ExcalidrawBindableElement | null | "keep", scene: Scene) => void;
21
+ export declare const bindOrUnbindLinearElements: (selectedElements: NonDeleted<ExcalidrawLinearElement>[], isBindingEnabled: boolean, draggingPoints: readonly number[] | null, scene: Scene, zoom?: AppState["zoom"]) => void;
22
22
  export declare const getSuggestedBindingsForArrows: (selectedElements: NonDeleted<ExcalidrawElement>[], elementsMap: NonDeletedSceneElementsMap, zoom: AppState["zoom"]) => SuggestedBinding[];
23
23
  export declare const maybeBindLinearElement: (linearElement: NonDeleted<ExcalidrawLinearElement>, appState: AppState, pointerCoords: {
24
24
  x: number;
25
25
  y: number;
26
- }, elementsMap: NonDeletedSceneElementsMap, elements: readonly NonDeletedExcalidrawElement[]) => void;
27
- export declare const bindLinearElement: (linearElement: NonDeleted<ExcalidrawLinearElement>, hoveredElement: ExcalidrawBindableElement, startOrEnd: "start" | "end", elementsMap: NonDeletedSceneElementsMap) => void;
26
+ }, scene: Scene) => void;
27
+ export declare const bindLinearElement: (linearElement: NonDeleted<ExcalidrawLinearElement>, hoveredElement: ExcalidrawBindableElement, startOrEnd: "start" | "end", scene: Scene) => void;
28
28
  export declare const isLinearElementSimpleAndAlreadyBound: (linearElement: NonDeleted<ExcalidrawLinearElement>, alreadyBoundToId: ExcalidrawBindableElement["id"] | undefined, bindableElement: ExcalidrawBindableElement) => boolean;
29
29
  export declare const getHoveredElementForBinding: (pointerCoords: {
30
30
  x: number;
31
31
  y: number;
32
32
  }, elements: readonly NonDeletedExcalidrawElement[], elementsMap: NonDeletedSceneElementsMap, zoom?: AppState["zoom"], fullShape?: boolean, considerAllElements?: boolean) => NonDeleted<ExcalidrawBindableElement> | null;
33
- export declare const updateBoundElements: (changedElement: NonDeletedExcalidrawElement, elementsMap: NonDeletedSceneElementsMap | SceneElementsMap, options?: {
33
+ export declare const updateBoundElements: (changedElement: NonDeletedExcalidrawElement, scene: Scene, options?: {
34
34
  simultaneouslyUpdated?: readonly ExcalidrawElement[];
35
35
  newSize?: {
36
36
  width: number;
@@ -38,11 +38,11 @@ export declare const updateBoundElements: (changedElement: NonDeletedExcalidrawE
38
38
  };
39
39
  changedElements?: Map<string, OrderedExcalidrawElement>;
40
40
  }) => void;
41
- export declare const getHeadingForElbowArrowSnap: (p: Readonly<GlobalPoint>, otherPoint: Readonly<GlobalPoint>, bindableElement: ExcalidrawBindableElement | undefined | null, aabb: Bounds | undefined | null, elementsMap: ElementsMap, origPoint: GlobalPoint, zoom?: AppState["zoom"]) => Heading;
41
+ export declare const getHeadingForElbowArrowSnap: (p: Readonly<GlobalPoint>, otherPoint: Readonly<GlobalPoint>, bindableElement: ExcalidrawBindableElement | undefined | null, aabb: Bounds | undefined | null, origPoint: GlobalPoint, zoom?: AppState["zoom"]) => Heading;
42
42
  export declare const bindPointToSnapToElementOutline: (arrow: ExcalidrawElbowArrowElement, bindableElement: ExcalidrawBindableElement, startOrEnd: "start" | "end") => GlobalPoint;
43
43
  export declare const avoidRectangularCorner: (element: ExcalidrawBindableElement, p: GlobalPoint) => GlobalPoint;
44
44
  export declare const snapToMid: (element: ExcalidrawBindableElement, p: GlobalPoint, tolerance?: number) => GlobalPoint;
45
- export declare const calculateFixedPointForElbowArrowBinding: (linearElement: NonDeleted<ExcalidrawElbowArrowElement>, hoveredElement: ExcalidrawBindableElement, startOrEnd: "start" | "end", elementsMap: ElementsMap) => {
45
+ export declare const calculateFixedPointForElbowArrowBinding: (linearElement: NonDeleted<ExcalidrawElbowArrowElement>, hoveredElement: ExcalidrawBindableElement, startOrEnd: "start" | "end") => {
46
46
  fixedPoint: FixedPoint;
47
47
  };
48
48
  export declare const fixDuplicatedBindingsAfterDuplication: (duplicatedElements: ExcalidrawElement[], origIdToDuplicateId: Map<ExcalidrawElement["id"], ExcalidrawElement["id"]>, duplicateElementsMap: NonDeletedSceneElementsMap) => void;
@@ -1,6 +1,6 @@
1
1
  import type { AppState, NormalizedZoomValue, NullableGridSize, PointerDownState } from "@excalidraw/excalidraw/types";
2
- import type Scene from "@excalidraw/excalidraw/scene/Scene";
3
2
  import type { NonDeletedExcalidrawElement } from "@excalidraw/element/types";
3
+ import type Scene from "./Scene";
4
4
  export declare const dragSelectedElements: (pointerDownState: PointerDownState, _selectedElements: NonDeletedExcalidrawElement[], offset: {
5
5
  x: number;
6
6
  y: number;
@@ -9,7 +9,7 @@ export declare const dragSelectedElements: (pointerDownState: PointerDownState,
9
9
  y: number;
10
10
  }, gridSize: NullableGridSize) => void;
11
11
  export declare const getDragOffsetXY: (selectedElements: NonDeletedExcalidrawElement[], x: number, y: number) => [number, number];
12
- export declare const dragNewElement: ({ newElement, elementType, originX, originY, x, y, width, height, shouldMaintainAspectRatio, shouldResizeFromCenter, zoom, widthAspectRatio, originOffset, informMutation, }: {
12
+ export declare const dragNewElement: ({ newElement, elementType, originX, originY, x, y, width, height, shouldMaintainAspectRatio, shouldResizeFromCenter, zoom, scene, widthAspectRatio, originOffset, informMutation, }: {
13
13
  newElement: NonDeletedExcalidrawElement;
14
14
  elementType: AppState["activeTool"]["type"];
15
15
  originX: number;
@@ -21,6 +21,7 @@ export declare const dragNewElement: ({ newElement, elementType, originX, origin
21
21
  shouldMaintainAspectRatio: boolean;
22
22
  shouldResizeFromCenter: boolean;
23
23
  zoom: NormalizedZoomValue;
24
+ scene: Scene;
24
25
  /** whether to keep given aspect ratio when `isResizeWithSidesSameLength` is
25
26
  true */
26
27
  widthAspectRatio?: number | null | undefined;
@@ -8,7 +8,7 @@ export declare const BASE_PADDING = 40;
8
8
  */
9
9
  export declare const updateElbowArrowPoints: (arrow: Readonly<ExcalidrawElbowArrowElement>, elementsMap: NonDeletedSceneElementsMap, updates: {
10
10
  points?: readonly LocalPoint[];
11
- fixedSegments?: FixedSegment[] | null;
11
+ fixedSegments?: readonly FixedSegment[] | null;
12
12
  startBinding?: FixedPointBinding | null;
13
13
  endBinding?: FixedPointBinding | null;
14
14
  }, options?: {
@@ -1,9 +1,10 @@
1
1
  import type { AppState, PendingExcalidrawElements } from "@excalidraw/excalidraw/types";
2
2
  import { type ElementsMap, type ExcalidrawBindableElement, type ExcalidrawElement, type ExcalidrawFlowchartNodeElement } from "./types";
3
+ import type Scene from "./Scene";
3
4
  type LinkDirection = "up" | "right" | "down" | "left";
4
5
  export declare const getLinkDirectionFromKey: (key: string) => LinkDirection;
5
6
  export declare const getPredecessors: (node: ExcalidrawBindableElement, elementsMap: ElementsMap, direction: LinkDirection) => ExcalidrawBindableElement[];
6
- export declare const addNewNodes: (startNode: ExcalidrawFlowchartNodeElement, elementsMap: ElementsMap, appState: AppState, direction: LinkDirection, numberOfNodes: number) => ExcalidrawElement[];
7
+ export declare const addNewNodes: (startNode: ExcalidrawFlowchartNodeElement, appState: AppState, direction: LinkDirection, scene: Scene, numberOfNodes: number) => ExcalidrawElement[];
7
8
  export declare class FlowChartNavigator {
8
9
  isExploring: boolean;
9
10
  private sameLevelNodes;
@@ -18,7 +19,7 @@ export declare class FlowChartCreator {
18
19
  private numberOfNodes;
19
20
  private direction;
20
21
  pendingNodes: PendingExcalidrawElements | null;
21
- createNodes(startNode: ExcalidrawFlowchartNodeElement, elementsMap: ElementsMap, appState: AppState, direction: LinkDirection): void;
22
+ createNodes(startNode: ExcalidrawFlowchartNodeElement, appState: AppState, direction: LinkDirection, scene: Scene): void;
22
23
  clear(): void;
23
24
  }
24
25
  export declare const isNodeInFlowchart: (element: ExcalidrawFlowchartNodeElement, elementsMap: ElementsMap) => boolean;
@@ -1,4 +1,4 @@
1
- import type { ExcalidrawElement, OrderedExcalidrawElement } from "./types";
1
+ import type { ElementsMap, ExcalidrawElement, OrderedExcalidrawElement } from "./types";
2
2
  export declare class InvalidFractionalIndexError extends Error {
3
3
  code: "ELEMENT_HAS_INVALID_INDEX";
4
4
  }
@@ -42,7 +42,7 @@ export declare const orderByFractionalIndex: (elements: OrderedExcalidrawElement
42
42
  * Synchronizes invalid fractional indices of moved elements with the array order by mutating passed elements.
43
43
  * If the synchronization fails or the result is invalid, it fallbacks to `syncInvalidIndices`.
44
44
  */
45
- export declare const syncMovedIndices: (elements: readonly ExcalidrawElement[], movedElements: Map<string, ExcalidrawElement>) => OrderedExcalidrawElement[];
45
+ export declare const syncMovedIndices: (elements: readonly ExcalidrawElement[], movedElements: ElementsMap) => OrderedExcalidrawElement[];
46
46
  /**
47
47
  * Synchronizes all invalid fractional indices with the array order by mutating passed elements.
48
48
  *
@@ -1,6 +1,6 @@
1
- import type { ExcalidrawElementsIncludingDeleted } from "@excalidraw/excalidraw/scene/Scene";
2
1
  import type { AppClassProperties, AppState, StaticCanvasAppState } from "@excalidraw/excalidraw/types";
3
2
  import type { ReadonlySetLike } from "@excalidraw/common/utility-types";
3
+ import type { ExcalidrawElementsIncludingDeleted } from "./Scene";
4
4
  import type { ElementsMap, ElementsMapOrArray, ExcalidrawElement, ExcalidrawFrameLikeElement, NonDeleted, NonDeletedExcalidrawElement } from "./types";
5
5
  export declare const bindElementsToFramesAfterDuplication: (nextElements: readonly ExcalidrawElement[], origElements: readonly ExcalidrawElement[], origIdToDuplicateId: Map<ExcalidrawElement["id"], ExcalidrawElement["id"]>) => void;
6
6
  export declare function isElementIntersectingFrame(element: ExcalidrawElement, frame: ExcalidrawFrameLikeElement, elementsMap: ElementsMap): boolean;
@@ -1,9 +1,9 @@
1
1
  import { type GlobalPoint, type LocalPoint } from "@excalidraw/math";
2
- import Scene from "@excalidraw/excalidraw/scene/Scene";
3
2
  import type { Store } from "@excalidraw/excalidraw/store";
4
3
  import type { AppState, PointerCoords, InteractiveCanvasAppState, AppClassProperties, NullableGridSize, Zoom } from "@excalidraw/excalidraw/types";
4
+ import type Scene from "./Scene";
5
5
  import type { Bounds } from "./bounds";
6
- import type { NonDeleted, ExcalidrawLinearElement, ExcalidrawElement, PointBinding, ExcalidrawBindableElement, ExcalidrawTextElementWithContainer, ElementsMap, NonDeletedSceneElementsMap, SceneElementsMap, ExcalidrawElbowArrowElement } from "./types";
6
+ import type { NonDeleted, ExcalidrawLinearElement, ExcalidrawElement, PointBinding, ExcalidrawBindableElement, ExcalidrawTextElementWithContainer, ElementsMap, NonDeletedSceneElementsMap, ExcalidrawElbowArrowElement } from "./types";
7
7
  declare const editorMidPointsCache: {
8
8
  version: number | null;
9
9
  points: (GlobalPoint | null)[];
@@ -42,7 +42,7 @@ export declare class LinearElementEditor {
42
42
  readonly hoverPointIndex: number;
43
43
  readonly segmentMidPointHoveredCoords: GlobalPoint | null;
44
44
  readonly elbowed: boolean;
45
- constructor(element: NonDeleted<ExcalidrawLinearElement>);
45
+ constructor(element: NonDeleted<ExcalidrawLinearElement>, elementsMap: ElementsMap);
46
46
  static POINT_HANDLE_SIZE: number;
47
47
  /**
48
48
  * @param id the `elementId` from the instance of this class (so that we can
@@ -76,7 +76,7 @@ export declare class LinearElementEditor {
76
76
  linearElementEditor: LinearElementEditor | null;
77
77
  };
78
78
  static arePointsEqual<Point extends LocalPoint | GlobalPoint>(point1: Point | null, point2: Point | null): boolean;
79
- static handlePointerMove(event: React.PointerEvent<HTMLCanvasElement>, scenePointerX: number, scenePointerY: number, app: AppClassProperties, elementsMap: NonDeletedSceneElementsMap | SceneElementsMap): LinearElementEditor | null;
79
+ static handlePointerMove(event: React.PointerEvent<HTMLCanvasElement>, scenePointerX: number, scenePointerY: number, app: AppClassProperties): LinearElementEditor | null;
80
80
  /** scene coords */
81
81
  static getPointGlobalCoordinates(element: NonDeleted<ExcalidrawLinearElement>, p: LocalPoint, elementsMap: ElementsMap): GlobalPoint;
82
82
  /** scene coords */
@@ -96,22 +96,22 @@ export declare class LinearElementEditor {
96
96
  x: number;
97
97
  y: number;
98
98
  };
99
- static normalizePoints(element: NonDeleted<ExcalidrawLinearElement>): void;
100
- static duplicateSelectedPoints(appState: AppState, elementsMap: NonDeletedSceneElementsMap | SceneElementsMap): AppState;
101
- static deletePoints(element: NonDeleted<ExcalidrawLinearElement>, pointIndices: readonly number[]): void;
102
- static addPoints(element: NonDeleted<ExcalidrawLinearElement>, targetPoints: {
99
+ static normalizePoints(element: NonDeleted<ExcalidrawLinearElement>, elementsMap: ElementsMap): void;
100
+ static duplicateSelectedPoints(appState: AppState, scene: Scene): AppState;
101
+ static deletePoints(element: NonDeleted<ExcalidrawLinearElement>, scene: Scene, pointIndices: readonly number[]): void;
102
+ static addPoints(element: NonDeleted<ExcalidrawLinearElement>, scene: Scene, targetPoints: {
103
103
  point: LocalPoint;
104
104
  }[]): void;
105
- static movePoints(element: NonDeleted<ExcalidrawLinearElement>, targetPoints: {
105
+ static movePoints(element: NonDeleted<ExcalidrawLinearElement>, scene: Scene, targetPoints: {
106
106
  index: number;
107
107
  point: LocalPoint;
108
108
  isDragging?: boolean;
109
109
  }[], otherUpdates?: {
110
110
  startBinding?: PointBinding | null;
111
111
  endBinding?: PointBinding | null;
112
- }, sceneElementsMap?: NonDeletedSceneElementsMap): void;
112
+ }): void;
113
113
  static shouldAddMidpoint(linearElementEditor: LinearElementEditor, pointerCoords: PointerCoords, appState: AppState, elementsMap: ElementsMap): boolean;
114
- static addMidpoint(linearElementEditor: LinearElementEditor, pointerCoords: PointerCoords, app: AppClassProperties, snapToGrid: boolean, elementsMap: ElementsMap): {
114
+ static addMidpoint(linearElementEditor: LinearElementEditor, pointerCoords: PointerCoords, app: AppClassProperties, snapToGrid: boolean, scene: Scene): {
115
115
  pointerDownState: LinearElementEditor["pointerDownState"];
116
116
  selectedPointsIndices: LinearElementEditor["selectedPointsIndices"];
117
117
  } | undefined;
@@ -123,7 +123,7 @@ export declare class LinearElementEditor {
123
123
  };
124
124
  static getMinMaxXYWithBoundText: (element: ExcalidrawLinearElement, elementsMap: ElementsMap, elementBounds: Bounds, boundTextElement: ExcalidrawTextElementWithContainer) => [number, number, number, number, number, number];
125
125
  static getElementAbsoluteCoords: (element: ExcalidrawLinearElement, elementsMap: ElementsMap, includeBoundText?: boolean) => [number, number, number, number, number, number];
126
- static moveFixedSegment(linearElement: LinearElementEditor, index: number, x: number, y: number, elementsMap: ElementsMap): LinearElementEditor;
127
- static deleteFixedSegment(element: ExcalidrawElbowArrowElement, index: number): void;
126
+ static moveFixedSegment(linearElement: LinearElementEditor, index: number, x: number, y: number, scene: Scene): LinearElementEditor;
127
+ static deleteFixedSegment(element: ExcalidrawElbowArrowElement, scene: Scene, index: number): void;
128
128
  }
129
129
  export {};
@@ -1,7 +1,15 @@
1
1
  import type { Mutable } from "@excalidraw/common/utility-types";
2
- import type { ExcalidrawElement } from "./types";
2
+ import type { ElementsMap, ExcalidrawElement } from "./types";
3
3
  export type ElementUpdate<TElement extends ExcalidrawElement> = Omit<Partial<TElement>, "id" | "version" | "versionNonce" | "updated">;
4
- export declare const mutateElement: <TElement extends Mutable<ExcalidrawElement>>(element: TElement, updates: ElementUpdate<TElement>, informMutation?: boolean, options?: {
4
+ /**
5
+ * This function tracks updates of text elements for the purposes for collaboration.
6
+ * The version is used to compare updates when more than one user is working in
7
+ * the same drawing.
8
+ *
9
+ * WARNING: this won't trigger the component to update, so if you need to trigger component update,
10
+ * use `scene.mutateElement` or `ExcalidrawImperativeAPI.mutateElement` instead.
11
+ */
12
+ export declare const mutateElement: <TElement extends Mutable<ExcalidrawElement>>(element: TElement, elementsMap: ElementsMap, updates: ElementUpdate<TElement>, options?: {
5
13
  isDragging?: boolean;
6
14
  }) => TElement;
7
15
  export declare const newElementWith: <TElement extends ExcalidrawElement>(element: TElement, updates: ElementUpdate<TElement>, force?: boolean) => TElement;
@@ -1,10 +1,10 @@
1
1
  import { type LocalPoint } from "@excalidraw/math";
2
- import type Scene from "@excalidraw/excalidraw/scene/Scene";
3
2
  import type { PointerDownState } from "@excalidraw/excalidraw/types";
3
+ import type Scene from "./Scene";
4
4
  import type { BoundingBox } from "./bounds";
5
5
  import type { MaybeTransformHandleType, TransformHandleDirection } from "./transformHandles";
6
- import type { ExcalidrawLinearElement, ExcalidrawTextElement, NonDeletedExcalidrawElement, NonDeleted, ExcalidrawElement, ElementsMap, SceneElementsMap } from "./types";
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;
6
+ import type { ExcalidrawLinearElement, ExcalidrawTextElement, NonDeletedExcalidrawElement, NonDeleted, ExcalidrawElement, ElementsMap } from "./types";
7
+ export declare const transformElements: (originalElements: PointerDownState["originalElements"], transformHandleType: MaybeTransformHandleType, selectedElements: readonly NonDeletedExcalidrawElement[], 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[];
10
10
  } | {
@@ -15,12 +15,12 @@ export declare const measureFontSizeFromWidth: (element: NonDeleted<ExcalidrawTe
15
15
  } | null;
16
16
  export declare const getResizeOffsetXY: (transformHandleType: MaybeTransformHandleType, selectedElements: NonDeletedExcalidrawElement[], elementsMap: ElementsMap, x: number, y: number) => [number, number];
17
17
  export declare const getResizeArrowDirection: (transformHandleType: MaybeTransformHandleType, element: NonDeleted<ExcalidrawLinearElement>) => "origin" | "end";
18
- export declare const resizeSingleElement: (nextWidth: number, nextHeight: number, latestElement: ExcalidrawElement, origElement: ExcalidrawElement, elementsMap: ElementsMap, originalElementsMap: ElementsMap, handleDirection: TransformHandleDirection, { shouldInformMutation, shouldMaintainAspectRatio, shouldResizeFromCenter, }?: {
18
+ export declare const resizeSingleElement: (nextWidth: number, nextHeight: number, latestElement: ExcalidrawElement, origElement: ExcalidrawElement, originalElementsMap: ElementsMap, scene: Scene, handleDirection: TransformHandleDirection, { shouldInformMutation, shouldMaintainAspectRatio, shouldResizeFromCenter, }?: {
19
19
  shouldMaintainAspectRatio?: boolean | undefined;
20
20
  shouldResizeFromCenter?: boolean | undefined;
21
21
  shouldInformMutation?: boolean | undefined;
22
22
  }) => void;
23
- export declare const getNextSingleWidthAndHeightFromPointer: (latestElement: ExcalidrawElement, origElement: ExcalidrawElement, elementsMap: ElementsMap, originalElementsMap: ElementsMap, handleDirection: TransformHandleDirection, pointerX: number, pointerY: number, { shouldMaintainAspectRatio, shouldResizeFromCenter, }?: {
23
+ export declare const getNextSingleWidthAndHeightFromPointer: (latestElement: ExcalidrawElement, origElement: ExcalidrawElement, handleDirection: TransformHandleDirection, pointerX: number, pointerY: number, { shouldMaintainAspectRatio, shouldResizeFromCenter, }?: {
24
24
  shouldMaintainAspectRatio?: boolean | undefined;
25
25
  shouldResizeFromCenter?: boolean | undefined;
26
26
  }) => {
@@ -26,7 +26,6 @@ export declare const getLockedLinearCursorAlignSize: (originX: number, originY:
26
26
  width: number;
27
27
  height: number;
28
28
  };
29
- export declare const resizePerfectLineForNWHandler: (element: ExcalidrawElement, x: number, y: number) => void;
30
29
  export declare const getNormalizedDimensions: (element: Pick<ExcalidrawElement, "width" | "height" | "x" | "y">) => {
31
30
  width: ExcalidrawElement["width"];
32
31
  height: ExcalidrawElement["height"];
@@ -1,10 +1,11 @@
1
1
  import type { AppState } from "@excalidraw/excalidraw/types";
2
2
  import type { ExtractSetType } from "@excalidraw/common/utility-types";
3
- import type { Radians } from "../../math/src";
3
+ import type { Radians } from "@excalidraw/math";
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, elementsMap: ElementsMap, informMutation?: boolean) => void;
7
- export declare const handleBindTextResize: (container: NonDeletedExcalidrawElement, elementsMap: ElementsMap, transformHandleType: MaybeTransformHandleType, shouldMaintainAspectRatio?: boolean) => void;
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,7 +1,7 @@
1
1
  import type { AppState } from "@excalidraw/excalidraw/types";
2
- import type Scene from "@excalidraw/excalidraw/scene/Scene";
2
+ import type Scene from "./Scene";
3
3
  import type { ExcalidrawElement } from "./types";
4
4
  export declare const moveOneLeft: (allElements: readonly ExcalidrawElement[], appState: AppState, scene: Scene) => readonly ExcalidrawElement[];
5
5
  export declare const moveOneRight: (allElements: readonly ExcalidrawElement[], appState: AppState, scene: Scene) => readonly ExcalidrawElement[];
6
- export declare const moveAllLeft: (allElements: readonly ExcalidrawElement[], appState: AppState) => readonly ExcalidrawElement[] | ExcalidrawElement[];
7
- export declare const moveAllRight: (allElements: readonly ExcalidrawElement[], appState: AppState) => readonly ExcalidrawElement[] | ExcalidrawElement[];
6
+ export declare const moveAllLeft: (allElements: readonly ExcalidrawElement[], appState: AppState) => ExcalidrawElement[] | readonly ExcalidrawElement[];
7
+ export declare const moveAllRight: (allElements: readonly ExcalidrawElement[], appState: AppState) => ExcalidrawElement[] | readonly ExcalidrawElement[];
@@ -76,7 +76,7 @@ export declare const actionAddToLibrary: {
76
76
  zoom: Readonly<{
77
77
  value: import("../types").NormalizedZoomValue;
78
78
  }>;
79
- openMenu: "shape" | "canvas" | null;
79
+ openMenu: "canvas" | "shape" | null;
80
80
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
81
81
  openSidebar: {
82
82
  name: string;
@@ -283,7 +283,7 @@ export declare const actionAddToLibrary: {
283
283
  zoom: Readonly<{
284
284
  value: import("../types").NormalizedZoomValue;
285
285
  }>;
286
- openMenu: "shape" | "canvas" | null;
286
+ openMenu: "canvas" | "shape" | null;
287
287
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
288
288
  openSidebar: {
289
289
  name: string;
@@ -495,7 +495,7 @@ export declare const actionAddToLibrary: {
495
495
  zoom: Readonly<{
496
496
  value: import("../types").NormalizedZoomValue;
497
497
  }>;
498
- openMenu: "shape" | "canvas" | null;
498
+ openMenu: "canvas" | "shape" | null;
499
499
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
500
500
  openSidebar: {
501
501
  name: string;
@@ -96,7 +96,7 @@ export declare const actionBindText: {
96
96
  zoom: Readonly<{
97
97
  value: import("../types").NormalizedZoomValue;
98
98
  }>;
99
- openMenu: "shape" | "canvas" | null;
99
+ openMenu: "canvas" | "shape" | null;
100
100
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
101
101
  openSidebar: {
102
102
  name: string;
@@ -320,7 +320,7 @@ export declare const actionWrapTextInContainer: {
320
320
  zoom: Readonly<{
321
321
  value: import("../types").NormalizedZoomValue;
322
322
  }>;
323
- openMenu: "shape" | "canvas" | null;
323
+ openMenu: "canvas" | "shape" | null;
324
324
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
325
325
  openSidebar: {
326
326
  name: string;
@@ -65,6 +65,12 @@ export declare const actionClearCanvas: {
65
65
  allowWheelZoom: boolean | undefined;
66
66
  pinnedScripts: string[] | undefined;
67
67
  customPens: any[] | undefined;
68
+ name: string | null;
69
+ zoom: Readonly<{
70
+ value: import("../types").NormalizedZoomValue;
71
+ }>;
72
+ scrollX: number;
73
+ scrollY: number;
68
74
  viewBackgroundColor: string;
69
75
  frameRendering: {
70
76
  enabled: boolean;
@@ -77,12 +83,6 @@ export declare const actionClearCanvas: {
77
83
  fill: string;
78
84
  nameColor: string;
79
85
  };
80
- name: string | null;
81
- zoom: Readonly<{
82
- value: import("../types").NormalizedZoomValue;
83
- }>;
84
- scrollX: number;
85
- scrollY: number;
86
86
  viewModeEnabled: boolean;
87
87
  openDialog: {
88
88
  name: "help" | "imageExport" | "jsonExport";
@@ -160,15 +160,6 @@ export declare const actionClearCanvas: {
160
160
  height: number;
161
161
  }[];
162
162
  }[];
163
- objectsSnapModeEnabled: boolean;
164
- shouldCacheIgnoreZoom: boolean;
165
- exportScale: number;
166
- selectedElementsAreBeingDragged: boolean;
167
- linkOpacity: number;
168
- currentHoveredFontFamily: number | null;
169
- hoveredElementIds: Readonly<{
170
- [id: string]: true;
171
- }>;
172
163
  contextMenu: {
173
164
  items: import("../components/ContextMenu").ContextMenuItems;
174
165
  top: number;
@@ -182,6 +173,7 @@ export declare const actionClearCanvas: {
182
173
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
183
174
  editingFrame: string | null;
184
175
  exportWithDarkMode: boolean;
176
+ exportScale: number;
185
177
  currentItemStrokeColor: string;
186
178
  currentItemBackgroundColor: string;
187
179
  currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
@@ -194,12 +186,13 @@ export declare const actionClearCanvas: {
194
186
  currentItemTextAlign: string;
195
187
  currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
196
188
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
189
+ currentHoveredFontFamily: number | null;
197
190
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
198
191
  currentItemArrowType: "round" | "sharp" | "elbow";
199
192
  cursorButton: "up" | "down";
200
193
  scrolledOutside: boolean;
201
194
  isResizing: boolean;
202
- openMenu: "shape" | "canvas" | null;
195
+ openMenu: "canvas" | "shape" | null;
203
196
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
204
197
  openSidebar: {
205
198
  name: string;
@@ -207,9 +200,14 @@ export declare const actionClearCanvas: {
207
200
  } | null;
208
201
  defaultSidebarDockedPreference: boolean;
209
202
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
203
+ hoveredElementIds: Readonly<{
204
+ [id: string]: true;
205
+ }>;
210
206
  previousSelectedElementIds: {
211
207
  [id: string]: true;
212
208
  };
209
+ selectedElementsAreBeingDragged: boolean;
210
+ shouldCacheIgnoreZoom: boolean;
213
211
  toast: {
214
212
  message: string;
215
213
  closable?: boolean | undefined;
@@ -218,6 +216,7 @@ export declare const actionClearCanvas: {
218
216
  fileHandle: import("browser-fs-access").FileSystemHandle | null;
219
217
  currentChartType: import("@excalidraw/element/types").ChartType;
220
218
  showHyperlinkPopup: false | "editor" | "info";
219
+ linkOpacity: number;
221
220
  currentStrokeOptions?: any;
222
221
  resetCustomPen?: any;
223
222
  dynamicStyle: {
@@ -228,6 +227,7 @@ export declare const actionClearCanvas: {
228
227
  x: number;
229
228
  y: number;
230
229
  } | null;
230
+ objectsSnapModeEnabled: boolean;
231
231
  userToFollow: import("../types").UserToFollow | null;
232
232
  followedBy: Set<import("../types").SocketId>;
233
233
  };
@@ -314,7 +314,7 @@ export declare const actionZoomIn: {
314
314
  name: string | null;
315
315
  isResizing: boolean;
316
316
  isRotating: boolean;
317
- openMenu: "shape" | "canvas" | null;
317
+ openMenu: "canvas" | "shape" | null;
318
318
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
319
319
  openSidebar: {
320
320
  name: string;
@@ -540,7 +540,7 @@ export declare const actionZoomOut: {
540
540
  name: string | null;
541
541
  isResizing: boolean;
542
542
  isRotating: boolean;
543
- openMenu: "shape" | "canvas" | null;
543
+ openMenu: "canvas" | "shape" | null;
544
544
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
545
545
  openSidebar: {
546
546
  name: string;
@@ -766,7 +766,7 @@ export declare const actionResetZoom: {
766
766
  name: string | null;
767
767
  isResizing: boolean;
768
768
  isRotating: boolean;
769
- openMenu: "shape" | "canvas" | null;
769
+ openMenu: "canvas" | "shape" | null;
770
770
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
771
771
  openSidebar: {
772
772
  name: string;
@@ -998,7 +998,7 @@ export declare const zoomToFitBounds: ({ bounds, appState, canvasOffsets, fitToV
998
998
  name: string | null;
999
999
  isResizing: boolean;
1000
1000
  isRotating: boolean;
1001
- openMenu: "shape" | "canvas" | null;
1001
+ openMenu: "canvas" | "shape" | null;
1002
1002
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
1003
1003
  openSidebar: {
1004
1004
  name: string;
@@ -1226,7 +1226,7 @@ export declare const zoomToFit: ({ canvasOffsets, targetElements, appState, fitT
1226
1226
  name: string | null;
1227
1227
  isResizing: boolean;
1228
1228
  isRotating: boolean;
1229
- openMenu: "shape" | "canvas" | null;
1229
+ openMenu: "canvas" | "shape" | null;
1230
1230
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
1231
1231
  openSidebar: {
1232
1232
  name: string;
@@ -1446,7 +1446,7 @@ export declare const actionZoomToFitSelectionInViewport: {
1446
1446
  name: string | null;
1447
1447
  isResizing: boolean;
1448
1448
  isRotating: boolean;
1449
- openMenu: "shape" | "canvas" | null;
1449
+ openMenu: "canvas" | "shape" | null;
1450
1450
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
1451
1451
  openSidebar: {
1452
1452
  name: string;
@@ -1670,7 +1670,7 @@ export declare const actionZoomToFitSelection: {
1670
1670
  name: string | null;
1671
1671
  isResizing: boolean;
1672
1672
  isRotating: boolean;
1673
- openMenu: "shape" | "canvas" | null;
1673
+ openMenu: "canvas" | "shape" | null;
1674
1674
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
1675
1675
  openSidebar: {
1676
1676
  name: string;
@@ -1895,7 +1895,7 @@ export declare const actionZoomToFit: {
1895
1895
  name: string | null;
1896
1896
  isResizing: boolean;
1897
1897
  isRotating: boolean;
1898
- openMenu: "shape" | "canvas" | null;
1898
+ openMenu: "canvas" | "shape" | null;
1899
1899
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
1900
1900
  openSidebar: {
1901
1901
  name: string;
@@ -2122,7 +2122,7 @@ export declare const actionToggleTheme: {
2122
2122
  zoom: Readonly<{
2123
2123
  value: import("../types").NormalizedZoomValue;
2124
2124
  }>;
2125
- openMenu: "shape" | "canvas" | null;
2125
+ openMenu: "canvas" | "shape" | null;
2126
2126
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
2127
2127
  openSidebar: {
2128
2128
  name: string;
@@ -2344,7 +2344,7 @@ export declare const actionToggleEraserTool: {
2344
2344
  zoom: Readonly<{
2345
2345
  value: import("../types").NormalizedZoomValue;
2346
2346
  }>;
2347
- openMenu: "shape" | "canvas" | null;
2347
+ openMenu: "canvas" | "shape" | null;
2348
2348
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
2349
2349
  openSidebar: {
2350
2350
  name: string;
@@ -2561,7 +2561,7 @@ export declare const actionToggleLassoTool: {
2561
2561
  zoom: Readonly<{
2562
2562
  value: import("../types").NormalizedZoomValue;
2563
2563
  }>;
2564
- openMenu: "shape" | "canvas" | null;
2564
+ openMenu: "canvas" | "shape" | null;
2565
2565
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
2566
2566
  openSidebar: {
2567
2567
  name: string;
@@ -2778,7 +2778,7 @@ export declare const actionToggleHandTool: {
2778
2778
  zoom: Readonly<{
2779
2779
  value: import("../types").NormalizedZoomValue;
2780
2780
  }>;
2781
- openMenu: "shape" | "canvas" | null;
2781
+ openMenu: "canvas" | "shape" | null;
2782
2782
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
2783
2783
  openSidebar: {
2784
2784
  name: string;
@@ -2994,7 +2994,7 @@ export declare const actionToggleLaserPointer: {
2994
2994
  zoom: Readonly<{
2995
2995
  value: import("../types").NormalizedZoomValue;
2996
2996
  }>;
2997
- openMenu: "shape" | "canvas" | null;
2997
+ openMenu: "canvas" | "shape" | null;
2998
2998
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
2999
2999
  openSidebar: {
3000
3000
  name: string;
@@ -3207,7 +3207,7 @@ export declare const zoomToFitElements: (elements: readonly ExcalidrawElement[],
3207
3207
  name: string | null;
3208
3208
  isResizing: boolean;
3209
3209
  isRotating: boolean;
3210
- openMenu: "shape" | "canvas" | null;
3210
+ openMenu: "canvas" | "shape" | null;
3211
3211
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
3212
3212
  openSidebar: {
3213
3213
  name: string;