@zsviczian/excalidraw 0.18.0-0 → 0.18.0-2

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 (125) hide show
  1. package/README.md +1 -1
  2. package/dist/excalidraw.development.js +415 -448
  3. package/dist/excalidraw.production.min.js +1 -1
  4. package/dist/excalidraw.production.min.js.LICENSE.txt +0 -42
  5. package/dist/styles.development.css +2976 -2982
  6. package/dist/styles.production.css +23 -23
  7. package/package.json +2 -1
  8. package/types/excalidraw/actions/actionCanvas.d.ts +7 -7
  9. package/types/excalidraw/actions/actionDeleteSelected.d.ts +1 -1
  10. package/types/excalidraw/actions/actionExport.d.ts +8 -8
  11. package/types/excalidraw/actions/actionFrame.d.ts +51 -51
  12. package/types/excalidraw/actions/actionHistory.d.ts +1 -1
  13. package/types/excalidraw/actions/actionProperties.d.ts +2 -2
  14. package/types/excalidraw/actions/actionSelectAll.d.ts +1 -1
  15. package/types/excalidraw/actions/manager.d.ts +1 -1
  16. package/types/excalidraw/actions/types.d.ts +2 -2
  17. package/types/excalidraw/animated-trail.d.ts +1 -1
  18. package/types/excalidraw/appState.d.ts +8 -8
  19. package/types/excalidraw/clipboard.d.ts +6 -6
  20. package/types/excalidraw/components/Actions.d.ts +2 -2
  21. package/types/excalidraw/components/App.d.ts +7 -7
  22. package/types/excalidraw/components/Avatar.d.ts +1 -1
  23. package/types/excalidraw/components/ButtonIcon.d.ts +1 -1
  24. package/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +3 -3
  25. package/types/excalidraw/components/ColorPicker/Picker.d.ts +1 -1
  26. package/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -1
  27. package/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +1 -1
  28. package/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +1 -1
  29. package/types/excalidraw/components/ConfirmDialog.d.ts +1 -1
  30. package/types/excalidraw/components/ContextMenu.d.ts +2 -2
  31. package/types/excalidraw/components/DefaultSidebar.d.ts +1 -1
  32. package/types/excalidraw/components/DialogActionButton.d.ts +1 -1
  33. package/types/excalidraw/components/ElementLinkDialog.d.ts +2 -2
  34. package/types/excalidraw/components/EyeDropper.d.ts +1 -1
  35. package/types/excalidraw/components/FixedSideContainer.d.ts +1 -1
  36. package/types/excalidraw/components/FollowMode/FollowMode.d.ts +1 -1
  37. package/types/excalidraw/components/FontPicker/FontPicker.d.ts +1 -1
  38. package/types/excalidraw/components/FontPicker/FontPickerList.d.ts +2 -2
  39. package/types/excalidraw/components/FontPicker/keyboardNavHandlers.d.ts +1 -1
  40. package/types/excalidraw/components/HintViewer.d.ts +1 -1
  41. package/types/excalidraw/components/IconPicker.d.ts +1 -1
  42. package/types/excalidraw/components/ImageExportDialog.d.ts +2 -2
  43. package/types/excalidraw/components/InitializeApp.d.ts +1 -1
  44. package/types/excalidraw/components/Island.d.ts +1 -1
  45. package/types/excalidraw/components/JSONExportDialog.d.ts +2 -2
  46. package/types/excalidraw/components/LayerUI.d.ts +2 -2
  47. package/types/excalidraw/components/LibraryMenuHeaderContent.d.ts +1 -1
  48. package/types/excalidraw/components/LibraryMenuItems.d.ts +1 -1
  49. package/types/excalidraw/components/LibraryMenuSection.d.ts +2 -2
  50. package/types/excalidraw/components/LibraryUnit.d.ts +1 -1
  51. package/types/excalidraw/components/MagicButton.d.ts +1 -1
  52. package/types/excalidraw/components/MobileMenu.d.ts +2 -2
  53. package/types/excalidraw/components/PasteChartDialog.d.ts +1 -1
  54. package/types/excalidraw/components/PropertiesPopover.d.ts +1 -1
  55. package/types/excalidraw/components/PublishLibrary.d.ts +1 -1
  56. package/types/excalidraw/components/SVGLayer.d.ts +1 -1
  57. package/types/excalidraw/components/Sidebar/SidebarTrigger.d.ts +1 -1
  58. package/types/excalidraw/components/Sidebar/common.d.ts +1 -1
  59. package/types/excalidraw/components/Stack.d.ts +1 -1
  60. package/types/excalidraw/components/Stats/DragInput.d.ts +2 -2
  61. package/types/excalidraw/components/Stats/MultiDimension.d.ts +1 -1
  62. package/types/excalidraw/components/Stats/MultiPosition.d.ts +1 -1
  63. package/types/excalidraw/components/Stats/index.d.ts +1 -1
  64. package/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +1 -1
  65. package/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +1 -1
  66. package/types/excalidraw/components/TTDDialog/common.d.ts +2 -2
  67. package/types/excalidraw/components/TextField.d.ts +1 -1
  68. package/types/excalidraw/components/Toast.d.ts +1 -1
  69. package/types/excalidraw/components/ToolButton.d.ts +2 -2
  70. package/types/excalidraw/components/Tooltip.d.ts +1 -1
  71. package/types/excalidraw/components/UserList.d.ts +1 -1
  72. package/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +3 -3
  73. package/types/excalidraw/components/canvases/NewElementCanvas.d.ts +1 -1
  74. package/types/excalidraw/components/canvases/StaticCanvas.d.ts +3 -3
  75. package/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +1 -1
  76. package/types/excalidraw/components/dropdownMenu/DropdownMenuItemLink.d.ts +1 -1
  77. package/types/excalidraw/components/hyperlink/Hyperlink.d.ts +2 -2
  78. package/types/excalidraw/components/main-menu/DefaultItems.d.ts +1 -1
  79. package/types/excalidraw/constants.d.ts +2 -2
  80. package/types/excalidraw/context/tunnels.d.ts +1 -1
  81. package/types/excalidraw/data/blob.d.ts +1 -1
  82. package/types/excalidraw/data/filesystem.d.ts +1 -1
  83. package/types/excalidraw/data/index.d.ts +1 -1
  84. package/types/excalidraw/data/library.d.ts +2 -2
  85. package/types/excalidraw/data/types.d.ts +2 -2
  86. package/types/excalidraw/dist/excalidraw.development.d.ts +2 -2
  87. package/types/excalidraw/element/ElementCanvasButtons.d.ts +1 -1
  88. package/types/excalidraw/element/binding.d.ts +5 -5
  89. package/types/excalidraw/element/bounds.d.ts +2 -2
  90. package/types/excalidraw/element/collision.d.ts +2 -2
  91. package/types/excalidraw/element/dragElements.d.ts +1 -1
  92. package/types/excalidraw/element/elbowArrow.d.ts +2 -2
  93. package/types/excalidraw/element/embeddable.d.ts +1 -1
  94. package/types/excalidraw/element/linearElementEditor.d.ts +4 -4
  95. package/types/excalidraw/element/resizeElements.d.ts +3 -3
  96. package/types/excalidraw/element/resizeTest.d.ts +3 -3
  97. package/types/excalidraw/element/showSelectedShapeActions.d.ts +1 -1
  98. package/types/excalidraw/element/textElement.d.ts +1 -1
  99. package/types/excalidraw/element/transformHandles.d.ts +5 -5
  100. package/types/excalidraw/element/utils.d.ts +1 -1
  101. package/types/excalidraw/frame.d.ts +3 -3
  102. package/types/excalidraw/history.d.ts +1 -1
  103. package/types/excalidraw/index.d.ts +4 -4
  104. package/types/excalidraw/laser-trails.d.ts +1 -1
  105. package/types/excalidraw/renderer/helpers.d.ts +1 -1
  106. package/types/excalidraw/renderer/renderElement.d.ts +1 -1
  107. package/types/excalidraw/renderer/staticSvgScene.d.ts +1 -1
  108. package/types/excalidraw/scene/Renderer.d.ts +1 -1
  109. package/types/excalidraw/scene/Scene.d.ts +2 -2
  110. package/types/excalidraw/scene/Shape.d.ts +2 -2
  111. package/types/excalidraw/scene/ShapeCache.d.ts +3 -3
  112. package/types/excalidraw/scene/scroll.d.ts +1 -1
  113. package/types/excalidraw/scene/scrollbars.d.ts +1 -1
  114. package/types/excalidraw/scene/types.d.ts +3 -3
  115. package/types/excalidraw/shapes.d.ts +1 -1
  116. package/types/excalidraw/snapping.d.ts +1 -1
  117. package/types/excalidraw/store.d.ts +1 -1
  118. package/types/excalidraw/types.d.ts +12 -12
  119. package/types/excalidraw/visualdebug.d.ts +1 -1
  120. package/types/excalidraw/webpack.dev.config.d.ts +26 -0
  121. package/types/excalidraw/webpack.prod.config.d.ts +24 -0
  122. package/types/utils/collision.d.ts +3 -3
  123. package/types/utils/export.d.ts +2 -2
  124. package/types/utils/geometry/shape.d.ts +1 -1
  125. package/types/utils/withinBounds.d.ts +1 -1
@@ -1,6 +1,6 @@
1
1
  import type { NonDeletedExcalidrawElement } from "./types";
2
- import type { AppState, NormalizedZoomValue, NullableGridSize, PointerDownState } from "../types";
3
2
  import type Scene from "../scene/Scene";
3
+ import type { AppState, NormalizedZoomValue, NullableGridSize, PointerDownState } from "../types";
4
4
  export declare const dragSelectedElements: (pointerDownState: PointerDownState, _selectedElements: NonDeletedExcalidrawElement[], offset: {
5
5
  x: number;
6
6
  y: number;
@@ -1,12 +1,12 @@
1
1
  import { type GlobalPoint, type LocalPoint } from "@excalidraw/math";
2
2
  import { type ElementUpdate } from "./mutateElement";
3
- import { type ExcalidrawElbowArrowElement, type NonDeletedSceneElementsMap, type SceneElementsMap } from "./types";
3
+ import { type ExcalidrawElbowArrowElement, type NonDeletedSceneElementsMap } from "./types";
4
4
  import type { FixedPointBinding, FixedSegment } from "./types";
5
5
  export declare const BASE_PADDING = 40;
6
6
  /**
7
7
  *
8
8
  */
9
- export declare const updateElbowArrowPoints: (arrow: Readonly<ExcalidrawElbowArrowElement>, elementsMap: NonDeletedSceneElementsMap | SceneElementsMap, updates: {
9
+ export declare const updateElbowArrowPoints: (arrow: Readonly<ExcalidrawElbowArrowElement>, elementsMap: NonDeletedSceneElementsMap, updates: {
10
10
  points?: readonly LocalPoint[];
11
11
  fixedSegments?: FixedSegment[] | null;
12
12
  startBinding?: FixedPointBinding | null;
@@ -1,6 +1,6 @@
1
1
  import type { ExcalidrawProps } from "../types";
2
- import type { ExcalidrawElement, ExcalidrawIframeLikeElement, IframeData } from "./types";
3
2
  import type { MarkRequired } from "../utility-types";
3
+ import type { ExcalidrawElement, ExcalidrawIframeLikeElement, IframeData } from "./types";
4
4
  type IframeDataWithSandbox = MarkRequired<IframeData, "sandbox">;
5
5
  export declare const createSrcDoc: (body: string) => string;
6
6
  export declare const getEmbedLink: (link: string | null | undefined) => IframeDataWithSandbox | null;
@@ -1,9 +1,9 @@
1
- import type { NonDeleted, ExcalidrawLinearElement, ExcalidrawElement, PointBinding, ExcalidrawBindableElement, ExcalidrawTextElementWithContainer, ElementsMap, NonDeletedSceneElementsMap, SceneElementsMap, ExcalidrawElbowArrowElement } from "./types";
1
+ import { type GlobalPoint, type LocalPoint } from "@excalidraw/math";
2
2
  import type { Bounds } from "./bounds";
3
- import type { AppState, PointerCoords, InteractiveCanvasAppState, AppClassProperties, NullableGridSize, Zoom } from "../types";
4
- import type { Store } from "../store";
3
+ import type { NonDeleted, ExcalidrawLinearElement, ExcalidrawElement, PointBinding, ExcalidrawBindableElement, ExcalidrawTextElementWithContainer, ElementsMap, NonDeletedSceneElementsMap, SceneElementsMap, ExcalidrawElbowArrowElement } from "./types";
5
4
  import type Scene from "../scene/Scene";
6
- import { type GlobalPoint, type LocalPoint } from "@excalidraw/math";
5
+ import type { Store } from "../store";
6
+ import type { AppState, PointerCoords, InteractiveCanvasAppState, AppClassProperties, NullableGridSize, Zoom } from "../types";
7
7
  declare const editorMidPointsCache: {
8
8
  version: number | null;
9
9
  points: (GlobalPoint | null)[];
@@ -1,9 +1,9 @@
1
- import type { ExcalidrawLinearElement, ExcalidrawTextElement, NonDeletedExcalidrawElement, NonDeleted, ExcalidrawElement, ElementsMap, SceneElementsMap } from "./types";
1
+ import { type LocalPoint } from "@excalidraw/math";
2
2
  import type { BoundingBox } from "./bounds";
3
3
  import type { MaybeTransformHandleType, TransformHandleDirection } from "./transformHandles";
4
- import type { PointerDownState } from "../types";
4
+ import type { ExcalidrawLinearElement, ExcalidrawTextElement, NonDeletedExcalidrawElement, NonDeleted, ExcalidrawElement, ElementsMap, SceneElementsMap } from "./types";
5
5
  import type Scene from "../scene/Scene";
6
- import { type LocalPoint } from "@excalidraw/math";
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,8 +1,8 @@
1
- import type { ExcalidrawElement, PointerType, NonDeletedExcalidrawElement, ElementsMap } from "./types";
2
- import type { MaybeTransformHandleType } from "./transformHandles";
1
+ import type { GlobalPoint, LocalPoint } from "@excalidraw/math";
3
2
  import type { AppState, Device, Zoom } from "../types";
4
3
  import type { Bounds } from "./bounds";
5
- import type { GlobalPoint, LocalPoint } from "@excalidraw/math";
4
+ import type { MaybeTransformHandleType } from "./transformHandles";
5
+ import type { ExcalidrawElement, PointerType, NonDeletedExcalidrawElement, ElementsMap } from "./types";
6
6
  export declare const resizeTest: <Point extends GlobalPoint | LocalPoint>(element: NonDeletedExcalidrawElement, elementsMap: ElementsMap, appState: AppState, x: number, y: number, zoom: Zoom, pointerType: PointerType, device: Device) => MaybeTransformHandleType;
7
7
  export declare const getElementWithTransformHandleType: (elements: readonly NonDeletedExcalidrawElement[], appState: AppState, scenePointerX: number, scenePointerY: number, zoom: Zoom, pointerType: PointerType, elementsMap: ElementsMap, device: Device) => {
8
8
  element: NonDeletedExcalidrawElement;
@@ -1,3 +1,3 @@
1
- import type { NonDeletedExcalidrawElement } from "./types";
2
1
  import type { UIAppState } from "../types";
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 { ElementsMap, ExcalidrawElement, ExcalidrawElementType, ExcalidrawTextContainer, ExcalidrawTextElement, ExcalidrawTextElementWithContainer, NonDeletedExcalidrawElement } from "./types";
2
1
  import type { MaybeTransformHandleType } from "./transformHandles";
2
+ import type { ElementsMap, ExcalidrawElement, ExcalidrawElementType, ExcalidrawTextContainer, ExcalidrawTextElement, ExcalidrawTextElementWithContainer, NonDeletedExcalidrawElement } from "./types";
3
3
  import type { AppState } from "../types";
4
4
  import type { ExtractSetType } from "../utility-types";
5
5
  export declare const redrawTextBoundingBox: (textElement: ExcalidrawTextElement, container: ExcalidrawElement | null, elementsMap: ElementsMap, informMutation?: boolean) => void;
@@ -1,7 +1,7 @@
1
- import type { ElementsMap, ExcalidrawElement, NonDeletedExcalidrawElement, PointerType } from "./types";
2
- import type { Bounds } from "./bounds";
3
- import type { Device, InteractiveCanvasAppState, Zoom } from "../types";
4
1
  import type { Radians } from "@excalidraw/math";
2
+ import type { Device, InteractiveCanvasAppState, Zoom } from "../types";
3
+ import type { Bounds } from "./bounds";
4
+ import type { ElementsMap, ExcalidrawElement, NonDeletedExcalidrawElement, PointerType } from "./types";
5
5
  export type TransformHandleDirection = "n" | "s" | "w" | "e" | "nw" | "ne" | "sw" | "se";
6
6
  export type TransformHandleType = TransformHandleDirection | "rotation";
7
7
  export type TransformHandle = Bounds;
@@ -31,8 +31,8 @@ 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
- s?: boolean | undefined;
35
34
  e?: boolean | undefined;
35
+ s?: boolean | undefined;
36
36
  w?: boolean | undefined;
37
37
  n?: boolean | undefined;
38
38
  nw?: boolean | undefined;
@@ -42,8 +42,8 @@ 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
- s?: boolean | undefined;
46
45
  e?: boolean | undefined;
46
+ s?: boolean | undefined;
47
47
  w?: boolean | undefined;
48
48
  n?: boolean | undefined;
49
49
  nw?: boolean | undefined;
@@ -1,5 +1,5 @@
1
- import type { Curve, LineSegment } from "@excalidraw/math";
2
1
  import { type GlobalPoint } from "@excalidraw/math";
2
+ import type { Curve, LineSegment } from "@excalidraw/math";
3
3
  import type { ExcalidrawDiamondElement, ExcalidrawRectanguloidElement } from "./types";
4
4
  /**
5
5
  * Get the building components of a rectanguloid element in the form of
@@ -1,6 +1,6 @@
1
1
  import type { ElementsMap, ElementsMapOrArray, ExcalidrawElement, ExcalidrawFrameLikeElement, NonDeleted, NonDeletedExcalidrawElement } from "./element/types";
2
- import type { AppClassProperties, AppState, StaticCanvasAppState } from "./types";
3
2
  import type { ExcalidrawElementsIncludingDeleted } from "./scene/Scene";
3
+ import type { AppClassProperties, AppState, StaticCanvasAppState } from "./types";
4
4
  import type { ReadonlySetLike } from "./utility-types";
5
5
  export declare const bindElementsToFramesAfterDuplication: (nextElements: readonly ExcalidrawElement[], oldElements: readonly ExcalidrawElement[], oldIdToDuplicatedId: Map<ExcalidrawElement["id"], ExcalidrawElement["id"]>) => void;
6
6
  export declare function isElementIntersectingFrame(element: ExcalidrawElement, frame: ExcalidrawFrameLikeElement, elementsMap: ElementsMap): boolean;
@@ -31,8 +31,8 @@ export declare const getFrameLikeElements: (allElements: ExcalidrawElementsInclu
31
31
  */
32
32
  export declare const getRootElements: (allElements: ExcalidrawElementsIncludingDeleted) => ExcalidrawElement[];
33
33
  export declare const getElementsInResizingFrame: (allElements: ExcalidrawElementsIncludingDeleted, frame: ExcalidrawFrameLikeElement, appState: AppState, elementsMap: ElementsMap) => ExcalidrawElement[];
34
- export declare const getElementsInNewFrame: (elements: ExcalidrawElementsIncludingDeleted, frame: ExcalidrawFrameLikeElement, elementsMap: ElementsMap) => (import("./element/types").ExcalidrawSelectionElement | import("./element/types").ExcalidrawRectangleElement | import("./element/types").ExcalidrawDiamondElement | import("./element/types").ExcalidrawEllipseElement | import("./element/types").ExcalidrawTextElement | import("./element/types").ExcalidrawLinearElement | import("./element/types").ExcalidrawFreeDrawElement | import("./element/types").ExcalidrawImageElement | import("./element/types").ExcalidrawFrameElement | import("./element/types").ExcalidrawMagicFrameElement | import("./element/types").ExcalidrawIframeElement | import("./element/types").ExcalidrawEmbeddableElement)[];
35
- export declare const omitPartialGroups: (elements: ExcalidrawElement[], frame: ExcalidrawFrameLikeElement, allElementsMap: ElementsMap) => (import("./element/types").ExcalidrawSelectionElement | import("./element/types").ExcalidrawRectangleElement | import("./element/types").ExcalidrawDiamondElement | import("./element/types").ExcalidrawEllipseElement | import("./element/types").ExcalidrawTextElement | import("./element/types").ExcalidrawLinearElement | import("./element/types").ExcalidrawFreeDrawElement | import("./element/types").ExcalidrawImageElement | import("./element/types").ExcalidrawFrameElement | import("./element/types").ExcalidrawMagicFrameElement | import("./element/types").ExcalidrawIframeElement | import("./element/types").ExcalidrawEmbeddableElement)[];
34
+ export declare const getElementsInNewFrame: (elements: ExcalidrawElementsIncludingDeleted, frame: ExcalidrawFrameLikeElement, elementsMap: ElementsMap) => (import("./element/types").ExcalidrawLinearElement | import("./element/types").ExcalidrawSelectionElement | import("./element/types").ExcalidrawRectangleElement | import("./element/types").ExcalidrawDiamondElement | import("./element/types").ExcalidrawEllipseElement | import("./element/types").ExcalidrawEmbeddableElement | import("./element/types").ExcalidrawIframeElement | import("./element/types").ExcalidrawImageElement | import("./element/types").ExcalidrawFrameElement | import("./element/types").ExcalidrawMagicFrameElement | import("./element/types").ExcalidrawTextElement | import("./element/types").ExcalidrawFreeDrawElement)[];
35
+ export declare const omitPartialGroups: (elements: ExcalidrawElement[], frame: ExcalidrawFrameLikeElement, allElementsMap: ElementsMap) => (import("./element/types").ExcalidrawLinearElement | import("./element/types").ExcalidrawSelectionElement | import("./element/types").ExcalidrawRectangleElement | import("./element/types").ExcalidrawDiamondElement | import("./element/types").ExcalidrawEllipseElement | import("./element/types").ExcalidrawEmbeddableElement | import("./element/types").ExcalidrawIframeElement | import("./element/types").ExcalidrawImageElement | import("./element/types").ExcalidrawFrameElement | import("./element/types").ExcalidrawMagicFrameElement | import("./element/types").ExcalidrawTextElement | import("./element/types").ExcalidrawFreeDrawElement)[];
36
36
  export declare const getContainingFrame: (element: ExcalidrawElement, elementsMap: ElementsMap) => ExcalidrawFrameLikeElement | null;
37
37
  /** */
38
38
  export declare const filterElementsEligibleAsFrameChildren: (elements: readonly ExcalidrawElement[], frame: ExcalidrawFrameLikeElement) => ExcalidrawElement[];
@@ -1,6 +1,6 @@
1
+ import { Emitter } from "./emitter";
1
2
  import type { AppStateChange, ElementsChange } from "./change";
2
3
  import type { SceneElementsMap } from "./element/types";
3
- import { Emitter } from "./emitter";
4
4
  import type { Snapshot } from "./store";
5
5
  import type { AppState } from "./types";
6
6
  export declare class HistoryChangedEvent {
@@ -1,12 +1,12 @@
1
1
  import React from "react";
2
+ import Footer from "./components/footer/FooterCenter";
3
+ import LiveCollaborationTrigger from "./components/live-collaboration/LiveCollaborationTrigger";
4
+ import MainMenu from "./components/main-menu/MainMenu";
5
+ import WelcomeScreen from "./components/welcome-screen/WelcomeScreen";
2
6
  import "./css/app.scss";
3
7
  import "./css/styles.scss";
4
8
  import "./fonts/fonts.css";
5
9
  import type { ExcalidrawProps } from "./types";
6
- import Footer from "./components/footer/FooterCenter";
7
- import MainMenu from "./components/main-menu/MainMenu";
8
- import WelcomeScreen from "./components/welcome-screen/WelcomeScreen";
9
- import LiveCollaborationTrigger from "./components/live-collaboration/LiveCollaborationTrigger";
10
10
  export declare const Excalidraw: React.MemoExoticComponent<(props: ExcalidrawProps) => import("react/jsx-runtime").JSX.Element>;
11
11
  export { getSceneVersion, hashElementsVersion, hashString, isInvisiblySmallElement, getNonDeletedElements, getTextFromElements, } from "./element";
12
12
  export { defaultLang, useI18n, languages } from "./i18n";
@@ -1,5 +1,5 @@
1
- import type { Trail } from "./animated-trail";
2
1
  import { AnimatedTrail } from "./animated-trail";
2
+ import type { Trail } from "./animated-trail";
3
3
  import type { AnimationFrameHandler } from "./animation-frame-handler";
4
4
  import type App from "./components/App";
5
5
  export declare class LaserTrails implements Trail {
@@ -1,5 +1,5 @@
1
- import type { StaticCanvasAppState, AppState } from "../types";
2
1
  import type { StaticCanvasRenderConfig } from "../scene/types";
2
+ import type { StaticCanvasAppState, AppState } from "../types";
3
3
  export declare const fillCircle: (context: CanvasRenderingContext2D, cx: number, cy: number, radius: number, stroke?: boolean) => void;
4
4
  export declare const getNormalizedCanvasDimensions: (canvas: HTMLCanvasElement, scale: number) => [number, number];
5
5
  export declare const bootstrapCanvas: ({ canvas, scale, normalizedWidth, normalizedHeight, theme, isExporting, viewBackgroundColor, }: {
@@ -1,7 +1,7 @@
1
1
  import type { ExcalidrawElement, ExcalidrawTextElement, NonDeletedExcalidrawElement, ExcalidrawFreeDrawElement, ExcalidrawImageElement, ExcalidrawFrameLikeElement, NonDeletedSceneElementsMap } from "../element/types";
2
- import type { RoughCanvas } from "roughjs/bin/canvas";
3
2
  import type { StaticCanvasRenderConfig, RenderableElementsMap, InteractiveCanvasRenderConfig } from "../scene/types";
4
3
  import type { AppState, StaticCanvasAppState, InteractiveCanvasAppState, ElementsPendingErasure, PendingExcalidrawElements } from "../types";
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;
7
7
  export interface ExcalidrawElementWithCanvas {
@@ -1,5 +1,5 @@
1
- import type { RoughSVG } from "roughjs/bin/svg";
2
1
  import type { NonDeletedExcalidrawElement } from "../element/types";
3
2
  import type { RenderableElementsMap, SVGRenderConfig } from "../scene/types";
4
3
  import type { BinaryFiles } from "../types";
4
+ import type { RoughSVG } from "roughjs/bin/svg";
5
5
  export declare const renderSceneToSvg: (elements: readonly NonDeletedExcalidrawElement[], elementsMap: RenderableElementsMap, rsvg: RoughSVG, svgRoot: SVGElement, files: BinaryFiles, renderConfig: SVGRenderConfig) => void;
@@ -1,6 +1,6 @@
1
+ import type Scene from "./Scene";
1
2
  import type { ExcalidrawElement, NonDeletedExcalidrawElement } from "../element/types";
2
3
  import type { AppState } from "../types";
3
- import type Scene from "./Scene";
4
4
  export declare class Renderer {
5
5
  private scene;
6
6
  constructor(scene: Scene);
@@ -1,5 +1,5 @@
1
- import type { ExcalidrawElement, NonDeletedExcalidrawElement, NonDeleted, ExcalidrawFrameLikeElement, ElementsMapOrArray, OrderedExcalidrawElement, Ordered } from "../element/types";
2
1
  import type { LinearElementEditor } from "../element/linearElementEditor";
2
+ import type { ExcalidrawElement, NonDeletedExcalidrawElement, NonDeleted, ExcalidrawFrameLikeElement, ElementsMapOrArray, OrderedExcalidrawElement, Ordered } from "../element/types";
3
3
  import type { AppState } from "../types";
4
4
  type ElementIdKey = InstanceType<typeof LinearElementEditor>["elementId"];
5
5
  type ElementKey = ExcalidrawElement | ElementIdKey;
@@ -73,7 +73,7 @@ declare class Scene {
73
73
  getElementIndex(elementId: string): number;
74
74
  getContainerElement: (element: (ExcalidrawElement & {
75
75
  containerId: ExcalidrawElement["id"] | null;
76
- }) | null) => import("../element/types").ExcalidrawSelectionElement | import("../element/types").ExcalidrawRectangleElement | import("../element/types").ExcalidrawDiamondElement | import("../element/types").ExcalidrawEllipseElement | import("../element/types").ExcalidrawTextElement | import("../element/types").ExcalidrawLinearElement | import("../element/types").ExcalidrawFreeDrawElement | import("../element/types").ExcalidrawImageElement | import("../element/types").ExcalidrawFrameElement | import("../element/types").ExcalidrawMagicFrameElement | import("../element/types").ExcalidrawIframeElement | import("../element/types").ExcalidrawEmbeddableElement | null;
76
+ }) | null) => import("../element/types").ExcalidrawLinearElement | import("../element/types").ExcalidrawSelectionElement | import("../element/types").ExcalidrawRectangleElement | import("../element/types").ExcalidrawDiamondElement | import("../element/types").ExcalidrawEllipseElement | import("../element/types").ExcalidrawEmbeddableElement | import("../element/types").ExcalidrawIframeElement | import("../element/types").ExcalidrawImageElement | import("../element/types").ExcalidrawFrameElement | import("../element/types").ExcalidrawMagicFrameElement | import("../element/types").ExcalidrawTextElement | import("../element/types").ExcalidrawFreeDrawElement | null;
77
77
  getElementsFromId: (id: string) => ExcalidrawElement[];
78
78
  }
79
79
  export default Scene;
@@ -1,7 +1,7 @@
1
- import type { Drawable, Options } from "roughjs/bin/core";
2
- import type { RoughGenerator } from "roughjs/bin/generator";
3
1
  import type { ExcalidrawElement, NonDeletedExcalidrawElement, ExcalidrawSelectionElement } from "../element/types";
4
2
  import type { EmbedsValidationStatus } from "../types";
3
+ import type { Drawable, Options } from "roughjs/bin/core";
4
+ import type { RoughGenerator } from "roughjs/bin/generator";
5
5
  export declare const generateRoughOptions: (element: ExcalidrawElement, continuousPath?: boolean) => Options;
6
6
  /**
7
7
  * Generates the roughjs shape for given element.
@@ -1,7 +1,7 @@
1
- import type { Drawable } from "roughjs/bin/core";
2
1
  import type { ExcalidrawElement } from "../element/types";
3
- import type { ElementShape, ElementShapes } from "./types";
4
2
  import type { AppState, EmbedsValidationStatus } from "../types";
3
+ import type { ElementShape, ElementShapes } from "./types";
4
+ import type { Drawable } from "roughjs/bin/core";
5
5
  export declare class ShapeCache {
6
6
  private static rg;
7
7
  private static cache;
@@ -17,7 +17,7 @@ export declare class ShapeCache {
17
17
  * Generates & caches shape for element if not already cached, otherwise
18
18
  * returns cached shape.
19
19
  */
20
- static generateElementShape: <T extends import("../element/types").ExcalidrawRectangleElement | import("../element/types").ExcalidrawDiamondElement | import("../element/types").ExcalidrawEllipseElement | import("../element/types").ExcalidrawTextElement | import("../element/types").ExcalidrawLinearElement | import("../element/types").ExcalidrawArrowElement | import("../element/types").ExcalidrawFreeDrawElement | import("../element/types").ExcalidrawImageElement | import("../element/types").ExcalidrawFrameElement | import("../element/types").ExcalidrawMagicFrameElement | import("../element/types").ExcalidrawIframeElement | import("../element/types").ExcalidrawEmbeddableElement>(element: T, renderConfig: {
20
+ static generateElementShape: <T extends import("../element/types").ExcalidrawLinearElement | import("../element/types").ExcalidrawRectangleElement | import("../element/types").ExcalidrawDiamondElement | import("../element/types").ExcalidrawEllipseElement | import("../element/types").ExcalidrawEmbeddableElement | import("../element/types").ExcalidrawIframeElement | import("../element/types").ExcalidrawImageElement | import("../element/types").ExcalidrawFrameElement | import("../element/types").ExcalidrawMagicFrameElement | import("../element/types").ExcalidrawTextElement | import("../element/types").ExcalidrawFreeDrawElement | import("../element/types").ExcalidrawArrowElement>(element: T, renderConfig: {
21
21
  isExporting: boolean;
22
22
  canvasBackgroundColor: AppState["viewBackgroundColor"];
23
23
  embedsValidationStatus: EmbedsValidationStatus;
@@ -1,5 +1,5 @@
1
- import type { AppState, Offsets, PointerCoords, Zoom } from "../types";
2
1
  import type { ExcalidrawElement } from "../element/types";
2
+ import type { AppState, Offsets, PointerCoords, Zoom } from "../types";
3
3
  export declare const centerScrollOn: ({ scenePoint, viewportDimensions, zoom, offsets, }: {
4
4
  scenePoint: PointerCoords;
5
5
  viewportDimensions: {
@@ -1,6 +1,6 @@
1
+ import type { ExcalidrawElement } from "../element/types";
1
2
  import type { InteractiveCanvasAppState } from "../types";
2
3
  import type { ScrollBars } from "./types";
3
- import type { ExcalidrawElement } from "../element/types";
4
4
  export declare const SCROLLBAR_MARGIN = 4;
5
5
  export declare const SCROLLBAR_WIDTH = 6;
6
6
  export declare const SCROLLBAR_COLOR = "rgba(128,128,128,0.3)";
@@ -1,9 +1,9 @@
1
- import type { RoughCanvas } from "roughjs/bin/canvas";
2
- import type { Drawable } from "roughjs/bin/core";
1
+ import type { UserIdleState } from "../constants";
3
2
  import type { ExcalidrawElement, NonDeletedElementsMap, NonDeletedExcalidrawElement, NonDeletedSceneElementsMap } from "../element/types";
4
3
  import type { AppClassProperties, AppState, EmbedsValidationStatus, ElementsPendingErasure, InteractiveCanvasAppState, StaticCanvasAppState, SocketId, Device, PendingExcalidrawElements } from "../types";
5
4
  import type { MakeBrand } from "../utility-types";
6
- import type { UserIdleState } from "../constants";
5
+ import type { RoughCanvas } from "roughjs/bin/canvas";
6
+ import type { Drawable } from "roughjs/bin/core";
7
7
  export type RenderableElementsMap = NonDeletedElementsMap & MakeBrand<"RenderableElementsMap">;
8
8
  export type StaticCanvasRenderConfig = {
9
9
  canvasBackgroundColor: AppState["viewBackgroundColor"];
@@ -64,7 +64,7 @@ export declare const SHAPES: readonly [{
64
64
  readonly numericKey: "0";
65
65
  readonly fillable: false;
66
66
  }];
67
- export declare const findShapeByKey: (key: string) => "text" | "line" | "arrow" | "image" | "selection" | "rectangle" | "diamond" | "ellipse" | "freedraw" | "eraser" | null;
67
+ export declare const findShapeByKey: (key: string) => "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | null;
68
68
  /**
69
69
  * get the pure geometric shape of an excalidraw element
70
70
  * which is then used for hit detection
@@ -1,5 +1,5 @@
1
- import type { InclusiveRange } from "@excalidraw/math";
2
1
  import { type GlobalPoint } from "@excalidraw/math";
2
+ import type { InclusiveRange } from "@excalidraw/math";
3
3
  import type { Bounds } from "./element/bounds";
4
4
  import type { MaybeTransformHandleType } from "./element/transformHandles";
5
5
  import type { ElementsMap, ExcalidrawElement, NonDeletedExcalidrawElement } from "./element/types";
@@ -1,6 +1,6 @@
1
1
  import { AppStateChange, ElementsChange } from "./change";
2
- import type { OrderedExcalidrawElement } from "./element/types";
3
2
  import { Emitter } from "./emitter";
3
+ import type { OrderedExcalidrawElement } from "./element/types";
4
4
  import type { AppState, ObservedAppState } from "./types";
5
5
  import type { ValueOf } from "./utility-types";
6
6
  export declare const getObservedAppState: (appState: AppState) => ObservedAppState;
@@ -1,26 +1,26 @@
1
- import type { JSX } from "react";
2
- import type React from "react";
3
- import type { PointerType, ExcalidrawLinearElement, NonDeletedExcalidrawElement, NonDeleted, TextAlign, ExcalidrawElement, GroupId, ExcalidrawBindableElement, Arrowhead, ChartType, FontFamilyValues, ExcalidrawTextElement, FileId, ExcalidrawImageElement, Theme, StrokeRoundness, ExcalidrawEmbeddableElement, ExcalidrawMagicFrameElement, ExcalidrawFrameLikeElement, ExcalidrawElementType, ExcalidrawIframeLikeElement, OrderedExcalidrawElement, ExcalidrawNonSelectionElement } from "./element/types";
4
1
  import type { Action } from "./actions/types";
5
- import type { LinearElementEditor } from "./element/linearElementEditor";
6
- import type { SuggestedBinding } from "./element/binding";
7
- import type { ImportedDataState } from "./data/types";
8
- import type App from "./components/App";
9
- import type { throttleRAF } from "./utils";
10
2
  import type { Spreadsheet } from "./charts";
11
- import type { Language } from "./i18n";
12
3
  import type { ClipboardData } from "./clipboard";
13
- import type { isOverScrollBars } from "./scene/scrollbars";
14
- import type { MaybeTransformHandleType } from "./element/transformHandles";
4
+ import type App from "./components/App";
15
5
  import type Library from "./data/library";
16
6
  import type { FileSystemHandle } from "./data/filesystem";
17
7
  import type { IMAGE_MIME_TYPES, MIME_TYPES } from "./constants";
18
8
  import type { ContextMenuItems } from "./components/ContextMenu";
19
9
  import type { SnapLine } from "./snapping";
20
10
  import type { Merge, MaybePromise, ValueOf, MakeBrand } from "./utility-types";
21
- import type { ColorPaletteCustom } from "./colors";
22
11
  import type { CaptureUpdateActionType } from "./store";
12
+ import type { ColorPaletteCustom } from "./colors";
23
13
  import type { UserIdleState } from "./constants";
14
+ import type { ImportedDataState } from "./data/types";
15
+ import type { SuggestedBinding } from "./element/binding";
16
+ import type { LinearElementEditor } from "./element/linearElementEditor";
17
+ import type { MaybeTransformHandleType } from "./element/transformHandles";
18
+ import type { PointerType, ExcalidrawLinearElement, NonDeletedExcalidrawElement, NonDeleted, TextAlign, ExcalidrawElement, GroupId, ExcalidrawBindableElement, Arrowhead, ChartType, FontFamilyValues, ExcalidrawTextElement, FileId, ExcalidrawImageElement, Theme, StrokeRoundness, ExcalidrawEmbeddableElement, ExcalidrawMagicFrameElement, ExcalidrawFrameLikeElement, ExcalidrawElementType, ExcalidrawIframeLikeElement, OrderedExcalidrawElement, ExcalidrawNonSelectionElement } from "./element/types";
19
+ import type { Language } from "./i18n";
20
+ import type { isOverScrollBars } from "./scene/scrollbars";
21
+ import type { throttleRAF } from "./utils";
22
+ import type React from "react";
23
+ import type { JSX } from "react";
24
24
  export type SocketId = string & {
25
25
  _brand: "SocketId";
26
26
  };
@@ -1,5 +1,5 @@
1
- import type { Curve } from "@excalidraw/math";
2
1
  import { type GlobalPoint, type LocalPoint } from "@excalidraw/math";
2
+ import type { Curve } from "@excalidraw/math";
3
3
  import type { LineSegment } from "@excalidraw/utils";
4
4
  import type { Bounds } from "./element/bounds";
5
5
  declare global {
@@ -51,11 +51,25 @@ export namespace module {
51
51
  use: ({
52
52
  loader: string;
53
53
  options?: undefined;
54
+ } | {
55
+ loader: string;
56
+ options: {
57
+ presets: (string | (string | {
58
+ runtime: string;
59
+ pragma: string;
60
+ pragmaFrag: string;
61
+ })[])[];
62
+ plugins: string[];
63
+ transpileOnly?: undefined;
64
+ configFile?: undefined;
65
+ };
54
66
  } | {
55
67
  loader: string;
56
68
  options: {
57
69
  transpileOnly: boolean;
58
70
  configFile: string;
71
+ presets?: undefined;
72
+ plugins?: undefined;
59
73
  };
60
74
  })[];
61
75
  resolve?: undefined;
@@ -83,4 +97,16 @@ export const externals: {
83
97
  commonjs: string;
84
98
  amd: string;
85
99
  };
100
+ 'react/jsx-runtime': {
101
+ root: string[];
102
+ commonjs2: string;
103
+ commonjs: string;
104
+ amd: string;
105
+ };
106
+ 'react/jsx-dev-runtime': {
107
+ root: string[];
108
+ commonjs2: string;
109
+ commonjs: string;
110
+ amd: string;
111
+ };
86
112
  };
@@ -52,6 +52,18 @@ export namespace module {
52
52
  use: ({
53
53
  loader: string;
54
54
  options?: undefined;
55
+ } | {
56
+ loader: string;
57
+ options: {
58
+ presets: (string | (string | {
59
+ runtime: string;
60
+ pragma: string;
61
+ pragmaFrag: string;
62
+ })[])[];
63
+ plugins: string[];
64
+ transpileOnly?: undefined;
65
+ configFile?: undefined;
66
+ };
55
67
  } | {
56
68
  loader: string;
57
69
  options: {
@@ -99,4 +111,16 @@ export const externals: {
99
111
  commonjs: string;
100
112
  amd: string;
101
113
  };
114
+ 'react/jsx-runtime': {
115
+ root: string[];
116
+ commonjs2: string;
117
+ commonjs: string;
118
+ amd: string;
119
+ };
120
+ 'react/jsx-dev-runtime': {
121
+ root: string[];
122
+ commonjs2: string;
123
+ commonjs: string;
124
+ amd: string;
125
+ };
102
126
  };
@@ -1,7 +1,7 @@
1
- import type { Polyline } from "./geometry/shape";
2
- import { type GeometricShape } from "./geometry/shape";
3
- import type { Curve } from "@excalidraw/math";
4
1
  import { type GlobalPoint, type LocalPoint, type Polygon } from "@excalidraw/math";
2
+ import type { Curve } from "@excalidraw/math";
3
+ import { type GeometricShape } from "./geometry/shape";
4
+ import type { Polyline } from "./geometry/shape";
5
5
  export declare const isPointOnShape: <Point extends GlobalPoint | LocalPoint>(point: Point, shape: GeometricShape<Point>, tolerance?: number) => boolean;
6
6
  export declare const isPointInShape: <Point extends GlobalPoint | LocalPoint>(point: Point, shape: GeometricShape<Point>) => boolean;
7
7
  export declare const isPointInBounds: <Point extends GlobalPoint | LocalPoint>(point: Point, bounds: Polygon<Point>) => boolean;
@@ -1,6 +1,6 @@
1
- import type { AppState, BinaryFiles } from "@excalidraw/excalidraw/types";
2
- import type { ExcalidrawElement, ExcalidrawFrameLikeElement, NonDeleted } from "@excalidraw/excalidraw/element/types";
3
1
  import { MIME_TYPES } from "@excalidraw/excalidraw/constants";
2
+ import type { ExcalidrawElement, ExcalidrawFrameLikeElement, NonDeleted } from "@excalidraw/excalidraw/element/types";
3
+ import type { AppState, BinaryFiles } from "@excalidraw/excalidraw/types";
4
4
  export { MIME_TYPES };
5
5
  type ExportOpts = {
6
6
  elements: readonly NonDeleted<ExcalidrawElement>[];
@@ -11,9 +11,9 @@
11
11
  * also included in this file are methods for converting an Excalidraw element or a Drawable from roughjs
12
12
  * to pure shapes
13
13
  */
14
- import type { Curve, LineSegment, Polygon, Radians } from "@excalidraw/math";
15
14
  import { type GlobalPoint, type LocalPoint } from "@excalidraw/math";
16
15
  import type { ElementsMap, ExcalidrawBindableElement, ExcalidrawDiamondElement, ExcalidrawElement, ExcalidrawEllipseElement, ExcalidrawEmbeddableElement, ExcalidrawFrameLikeElement, ExcalidrawFreeDrawElement, ExcalidrawIframeElement, ExcalidrawImageElement, ExcalidrawLinearElement, ExcalidrawRectangleElement, ExcalidrawSelectionElement, ExcalidrawTextElement } from "@excalidraw/excalidraw/element/types";
16
+ import type { Curve, LineSegment, Polygon, Radians } from "@excalidraw/math";
17
17
  import type { Drawable, Op } from "roughjs/bin/core";
18
18
  export type Polyline<Point extends GlobalPoint | LocalPoint> = LineSegment<Point>[];
19
19
  export type Polycurve<Point extends GlobalPoint | LocalPoint> = Curve<Point>[];
@@ -1,5 +1,5 @@
1
- import type { ExcalidrawElement, NonDeletedExcalidrawElement } from "@excalidraw/excalidraw/element/types";
2
1
  import type { Bounds } from "@excalidraw/excalidraw/element/bounds";
2
+ import type { ExcalidrawElement, NonDeletedExcalidrawElement } from "@excalidraw/excalidraw/element/types";
3
3
  type Element = NonDeletedExcalidrawElement;
4
4
  type Elements = readonly NonDeletedExcalidrawElement[];
5
5
  export declare const isElementInsideBBox: (element: Element, bbox: Bounds, eitherDirection?: boolean) => boolean;