@excalidraw/math 0.18.0-6135548 → 0.18.0-699826

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 (150) hide show
  1. package/dist/dev/index.js +150 -130
  2. package/dist/dev/index.js.map +4 -4
  3. package/dist/prod/index.js +1 -1
  4. package/dist/types/common/debug.d.ts +21 -0
  5. package/dist/types/common/src/appEventBus.d.ts +27 -0
  6. package/dist/types/common/src/colors.d.ts +2 -2
  7. package/dist/types/common/src/constants.d.ts +5 -2
  8. package/dist/types/common/src/index.d.ts +3 -0
  9. package/dist/types/common/src/utils.d.ts +4 -7
  10. package/dist/types/common/src/versionedSnapshotStore.d.ts +17 -0
  11. package/dist/types/element/src/Scene.d.ts +7 -3
  12. package/dist/types/element/src/arrowheads.d.ts +3 -0
  13. package/dist/types/element/src/arrows/focus.d.ts +27 -0
  14. package/dist/types/element/src/arrows/helpers.d.ts +5 -0
  15. package/dist/types/element/src/binding.d.ts +13 -8
  16. package/dist/types/element/src/bounds.d.ts +22 -3
  17. package/dist/types/element/src/collision.d.ts +4 -3
  18. package/dist/types/element/src/distribute.d.ts +2 -1
  19. package/dist/types/element/src/duplicate.d.ts +1 -0
  20. package/dist/types/element/src/elbowArrow.d.ts +2 -0
  21. package/dist/types/element/src/frame.d.ts +7 -6
  22. package/dist/types/element/src/index.d.ts +3 -0
  23. package/dist/types/element/src/linearElementEditor.d.ts +7 -2
  24. package/dist/types/element/src/mutateElement.d.ts +2 -0
  25. package/dist/types/element/src/selection.d.ts +7 -3
  26. package/dist/types/element/src/shape.d.ts +1 -1
  27. package/dist/types/element/src/textElement.d.ts +1 -1
  28. package/dist/types/element/src/textWrapping.d.ts +26 -0
  29. package/dist/types/element/src/typeChecks.d.ts +1 -0
  30. package/dist/types/element/src/types.d.ts +5 -2
  31. package/dist/types/element/src/utils.d.ts +6 -4
  32. package/dist/types/element/src/zindex.d.ts +1 -1
  33. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +41 -38
  34. package/dist/types/excalidraw/actions/actionBoundText.d.ts +29 -27
  35. package/dist/types/excalidraw/actions/actionCanvas.d.ts +169 -157
  36. package/dist/types/excalidraw/actions/actionClipboard.d.ts +28 -26
  37. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +14 -13
  38. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +44 -39
  39. package/dist/types/excalidraw/actions/actionDeselect.d.ts +159 -0
  40. package/dist/types/excalidraw/actions/actionElementLink.d.ts +10 -13
  41. package/dist/types/excalidraw/actions/actionElementLock.d.ts +28 -26
  42. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +14 -13
  43. package/dist/types/excalidraw/actions/actionExport.d.ts +77 -349
  44. package/dist/types/excalidraw/actions/actionFrame.d.ts +56 -52
  45. package/dist/types/excalidraw/actions/actionGroup.d.ts +29 -27
  46. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +16 -13
  47. package/dist/types/excalidraw/actions/actionLink.d.ts +14 -13
  48. package/dist/types/excalidraw/actions/actionMenu.d.ts +10 -13
  49. package/dist/types/excalidraw/actions/actionProperties.d.ts +30 -28
  50. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +14 -13
  51. package/dist/types/excalidraw/actions/actionStyles.d.ts +14 -12
  52. package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +3 -3
  53. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +172 -0
  54. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +14 -13
  55. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +172 -0
  56. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +14 -13
  57. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +10 -13
  58. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +14 -13
  59. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +14 -13
  60. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +14 -13
  61. package/dist/types/excalidraw/actions/index.d.ts +3 -0
  62. package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
  63. package/dist/types/excalidraw/actions/types.d.ts +1 -1
  64. package/dist/types/excalidraw/{animated-trail.d.ts → animatedTrail.d.ts} +4 -3
  65. package/dist/types/excalidraw/appState.d.ts +10 -7
  66. package/dist/types/excalidraw/charts/charts.bar.d.ts +2 -0
  67. package/dist/types/excalidraw/charts/charts.constants.d.ts +48 -0
  68. package/dist/types/excalidraw/charts/charts.helpers.d.ts +32 -0
  69. package/dist/types/excalidraw/charts/charts.line.d.ts +2 -0
  70. package/dist/types/excalidraw/charts/charts.parse.d.ts +10 -0
  71. package/dist/types/excalidraw/charts/charts.radar.d.ts +2 -0
  72. package/dist/types/excalidraw/charts/charts.types.d.ts +18 -0
  73. package/dist/types/excalidraw/charts/index.d.ts +7 -0
  74. package/dist/types/excalidraw/clipboard.d.ts +6 -7
  75. package/dist/types/excalidraw/components/App.d.ts +63 -16
  76. package/dist/types/excalidraw/components/AppStateObserver.d.ts +37 -0
  77. package/dist/types/excalidraw/components/CommandPalette/defaultCommandPaletteItems.d.ts +1 -2
  78. package/dist/types/excalidraw/components/CommandPalette/types.d.ts +1 -1
  79. package/dist/types/excalidraw/components/IconPicker.d.ts +14 -9
  80. package/dist/types/excalidraw/components/PasteChartDialog.d.ts +4 -5
  81. package/dist/types/excalidraw/components/PropertiesPopover.d.ts +1 -1
  82. package/dist/types/excalidraw/components/Range.d.ts +10 -4
  83. package/dist/types/excalidraw/components/SVGLayer.d.ts +1 -1
  84. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatInterface.d.ts +2 -6
  85. package/dist/types/excalidraw/components/TTDDialog/Chat/TTDChatPanel.d.ts +2 -1
  86. package/dist/types/excalidraw/components/TTDDialog/CodeMirrorEditor.d.ts +11 -0
  87. package/dist/types/excalidraw/components/TTDDialog/TTDDialog.d.ts +11 -7
  88. package/dist/types/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +3 -3
  89. package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +4 -1
  90. package/dist/types/excalidraw/components/TTDDialog/TTDWelcomeMessage.d.ts +1 -0
  91. package/dist/types/excalidraw/components/TTDDialog/TextToDiagram.d.ts +2 -1
  92. package/dist/types/excalidraw/components/TTDDialog/mermaid-lang-lite.d.ts +2 -0
  93. package/dist/types/excalidraw/components/TTDDialog/types.d.ts +4 -0
  94. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidAutoFix.d.ts +1 -0
  95. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidError.d.ts +10 -0
  96. package/dist/types/excalidraw/components/Toast.d.ts +8 -4
  97. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +2 -1
  98. package/dist/types/excalidraw/components/canvases/NewElementCanvas.d.ts +1 -0
  99. package/dist/types/excalidraw/components/canvases/StaticCanvas.d.ts +1 -1
  100. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +30 -17
  101. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +3 -2
  102. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +11 -13
  103. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCheckbox.d.ts +5 -0
  104. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +2 -1
  105. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSub.d.ts +23 -0
  106. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubContent.d.ts +8 -0
  107. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubTrigger.d.ts +12 -0
  108. package/dist/types/excalidraw/components/dropdownMenu/common.d.ts +1 -1
  109. package/dist/types/excalidraw/components/dropdownMenu/dropdownMenuUtils.d.ts +2 -0
  110. package/dist/types/excalidraw/components/icons.d.ts +23 -9
  111. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +24 -3
  112. package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +23 -13
  113. package/dist/types/excalidraw/components/shapes.d.ts +81 -1
  114. package/dist/types/excalidraw/data/blob.d.ts +47 -46
  115. package/dist/types/excalidraw/data/filesystem.d.ts +3 -5
  116. package/dist/types/excalidraw/data/index.d.ts +2 -3
  117. package/dist/types/excalidraw/data/json.d.ts +37 -28
  118. package/dist/types/excalidraw/data/resave.d.ts +7 -2
  119. package/dist/types/excalidraw/eraser/index.d.ts +2 -3
  120. package/dist/types/excalidraw/{laser-trails.d.ts → laserTrails.d.ts} +5 -7
  121. package/dist/types/excalidraw/lasso/index.d.ts +2 -3
  122. package/dist/types/excalidraw/renderer/animation.d.ts +4 -1
  123. package/dist/types/excalidraw/scene/Renderer.d.ts +425 -19
  124. package/dist/types/excalidraw/textAutoResizeHandle.d.ts +15 -0
  125. package/dist/types/excalidraw/types.d.ts +116 -18
  126. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +5 -1
  127. package/dist/types/fractional-indexing/src/index.d.ts +29 -0
  128. package/dist/types/math/src/constants.d.ts +0 -1
  129. package/dist/types/math/src/curve.d.ts +4 -1
  130. package/dist/types/math/src/point.d.ts +8 -2
  131. package/dist/types/math/src/types.d.ts +25 -1
  132. package/dist/types/utils/src/index.d.ts +1 -2
  133. package/package.json +2 -2
  134. package/dist/types/excalidraw/animation-frame-handler.d.ts +0 -16
  135. package/dist/types/excalidraw/charts.d.ts +0 -27
  136. package/dist/types/excalidraw/components/DiagramToCodePlugin/DiagramToCodePlugin.d.ts +0 -4
  137. package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +0 -15
  138. package/dist/types/excalidraw/components/InitializeApp.d.ts +0 -10
  139. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +0 -8
  140. package/dist/types/excalidraw/components/TTDDialog/utils/TTDStreamFetch.d.ts +0 -24
  141. package/dist/types/excalidraw/components/footer/FooterCenter.d.ts +0 -8
  142. package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -11
  143. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +0 -58
  144. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Hints.d.ts +0 -19
  145. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +0 -84
  146. package/dist/types/excalidraw/data/reconcile.d.ts +0 -7
  147. package/dist/types/excalidraw/index.d.ts +0 -46
  148. package/dist/types/excalidraw/polyfill.d.ts +0 -2
  149. package/dist/types/utils/src/bbox.d.ts +0 -9
  150. package/dist/types/utils/src/withinBounds.d.ts +0 -19
@@ -1,58 +0,0 @@
1
- import type { JSX } from "react";
2
- declare const Center: {
3
- ({ children }: {
4
- children?: React.ReactNode;
5
- }): import("react/jsx-runtime").JSX.Element;
6
- displayName: string;
7
- Logo: {
8
- ({ children }: {
9
- children?: React.ReactNode;
10
- }): import("react/jsx-runtime").JSX.Element;
11
- displayName: string;
12
- };
13
- Heading: {
14
- ({ children }: {
15
- children: React.ReactNode;
16
- }): import("react/jsx-runtime").JSX.Element;
17
- displayName: string;
18
- };
19
- Menu: {
20
- ({ children }: {
21
- children?: React.ReactNode;
22
- }): import("react/jsx-runtime").JSX.Element;
23
- displayName: string;
24
- };
25
- MenuItem: {
26
- ({ onSelect, children, icon, shortcut, className, ...props }: {
27
- onSelect: () => void;
28
- children: React.ReactNode;
29
- icon?: JSX.Element;
30
- shortcut?: string | null;
31
- } & React.ButtonHTMLAttributes<HTMLButtonElement>): import("react/jsx-runtime").JSX.Element;
32
- displayName: string;
33
- };
34
- MenuItemLink: {
35
- ({ children, href, icon, shortcut, className, ...props }: {
36
- children: React.ReactNode;
37
- href: string;
38
- icon?: JSX.Element;
39
- shortcut?: string | null;
40
- } & React.AnchorHTMLAttributes<HTMLAnchorElement>): import("react/jsx-runtime").JSX.Element;
41
- displayName: string;
42
- };
43
- MenuItemHelp: {
44
- (): import("react/jsx-runtime").JSX.Element;
45
- displayName: string;
46
- };
47
- MenuItemLoadScene: {
48
- (): import("react/jsx-runtime").JSX.Element | null;
49
- displayName: string;
50
- };
51
- MenuItemLiveCollaborationTrigger: {
52
- ({ onSelect, }: {
53
- onSelect: () => any;
54
- }): import("react/jsx-runtime").JSX.Element;
55
- displayName: string;
56
- };
57
- };
58
- export { Center };
@@ -1,19 +0,0 @@
1
- declare const MenuHint: {
2
- ({ children }: {
3
- children?: React.ReactNode;
4
- }): import("react/jsx-runtime").JSX.Element;
5
- displayName: string;
6
- };
7
- declare const ToolbarHint: {
8
- ({ children }: {
9
- children?: React.ReactNode;
10
- }): import("react/jsx-runtime").JSX.Element;
11
- displayName: string;
12
- };
13
- declare const HelpHint: {
14
- ({ children }: {
15
- children?: React.ReactNode;
16
- }): import("react/jsx-runtime").JSX.Element;
17
- displayName: string;
18
- };
19
- export { HelpHint, MenuHint, ToolbarHint };
@@ -1,84 +0,0 @@
1
- import "./WelcomeScreen.scss";
2
- declare const WelcomeScreen: {
3
- (props: {
4
- children?: React.ReactNode;
5
- }): import("react/jsx-runtime").JSX.Element;
6
- displayName: string;
7
- Center: {
8
- ({ children }: {
9
- children?: React.ReactNode;
10
- }): import("react/jsx-runtime").JSX.Element;
11
- displayName: string;
12
- Logo: {
13
- ({ children }: {
14
- children?: React.ReactNode;
15
- }): import("react/jsx-runtime").JSX.Element;
16
- displayName: string;
17
- };
18
- Heading: {
19
- ({ children }: {
20
- children: React.ReactNode;
21
- }): import("react/jsx-runtime").JSX.Element;
22
- displayName: string;
23
- };
24
- Menu: {
25
- ({ children }: {
26
- children?: React.ReactNode;
27
- }): import("react/jsx-runtime").JSX.Element;
28
- displayName: string;
29
- };
30
- MenuItem: {
31
- ({ onSelect, children, icon, shortcut, className, ...props }: {
32
- onSelect: () => void;
33
- children: React.ReactNode;
34
- icon?: import("react").JSX.Element;
35
- shortcut?: string | null;
36
- } & React.ButtonHTMLAttributes<HTMLButtonElement>): import("react/jsx-runtime").JSX.Element;
37
- displayName: string;
38
- };
39
- MenuItemLink: {
40
- ({ children, href, icon, shortcut, className, ...props }: {
41
- children: React.ReactNode;
42
- href: string;
43
- icon?: import("react").JSX.Element;
44
- shortcut?: string | null;
45
- } & React.AnchorHTMLAttributes<HTMLAnchorElement>): import("react/jsx-runtime").JSX.Element;
46
- displayName: string;
47
- };
48
- MenuItemHelp: {
49
- (): import("react/jsx-runtime").JSX.Element;
50
- displayName: string;
51
- };
52
- MenuItemLoadScene: {
53
- (): import("react/jsx-runtime").JSX.Element | null;
54
- displayName: string;
55
- };
56
- MenuItemLiveCollaborationTrigger: {
57
- ({ onSelect, }: {
58
- onSelect: () => any;
59
- }): import("react/jsx-runtime").JSX.Element;
60
- displayName: string;
61
- };
62
- };
63
- Hints: {
64
- MenuHint: {
65
- ({ children }: {
66
- children?: React.ReactNode;
67
- }): import("react/jsx-runtime").JSX.Element;
68
- displayName: string;
69
- };
70
- ToolbarHint: {
71
- ({ children }: {
72
- children?: React.ReactNode;
73
- }): import("react/jsx-runtime").JSX.Element;
74
- displayName: string;
75
- };
76
- HelpHint: {
77
- ({ children }: {
78
- children?: React.ReactNode;
79
- }): import("react/jsx-runtime").JSX.Element;
80
- displayName: string;
81
- };
82
- };
83
- };
84
- export default WelcomeScreen;
@@ -1,7 +0,0 @@
1
- import type { OrderedExcalidrawElement } from "@excalidraw/element/types";
2
- import type { MakeBrand } from "@excalidraw/common/utility-types";
3
- import type { AppState } from "../types";
4
- export type ReconciledExcalidrawElement = OrderedExcalidrawElement & MakeBrand<"ReconciledElement">;
5
- export type RemoteExcalidrawElement = OrderedExcalidrawElement & MakeBrand<"RemoteExcalidrawElement">;
6
- export declare const shouldDiscardRemoteElement: (localAppState: AppState, local: OrderedExcalidrawElement | undefined, remote: RemoteExcalidrawElement) => boolean;
7
- export declare const reconcileElements: (localElements: readonly OrderedExcalidrawElement[], remoteElements: readonly RemoteExcalidrawElement[], localAppState: AppState) => ReconciledExcalidrawElement[];
@@ -1,46 +0,0 @@
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";
6
- import "./css/app.scss";
7
- import "./css/styles.scss";
8
- import "./fonts/fonts.css";
9
- import type { ExcalidrawProps } from "./types";
10
- export declare const Excalidraw: React.MemoExoticComponent<(props: ExcalidrawProps) => import("react/jsx-runtime").JSX.Element>;
11
- export { getSceneVersion, hashElementsVersion, hashString, getNonDeletedElements, } from "@excalidraw/element";
12
- export { getTextFromElements } from "@excalidraw/element";
13
- export { isInvisiblySmallElement } from "@excalidraw/element";
14
- export { defaultLang, useI18n, languages } from "./i18n";
15
- export { restoreAppState, restoreElement, restoreElements, restoreLibraryItems, } from "./data/restore";
16
- export { reconcileElements } from "./data/reconcile";
17
- export { exportToCanvas, exportToBlob, exportToSvg, exportToClipboard, } from "@excalidraw/utils/export";
18
- export { serializeAsJSON, serializeLibraryAsJSON } from "./data/json";
19
- export { loadFromBlob, loadSceneOrLibraryFromBlob, loadLibraryFromBlob, } from "./data/blob";
20
- export { mergeLibraryItems, getLibraryItemsHash } from "./data/library";
21
- export { isLinearElement } from "@excalidraw/element";
22
- export { FONT_FAMILY, THEME, MIME_TYPES, ROUNDNESS, DEFAULT_LASER_COLOR, UserIdleState, normalizeLink, sceneCoordsToViewportCoords, viewportCoordsToSceneCoords, getFormFactor, } from "@excalidraw/common";
23
- export { mutateElement, newElementWith, bumpVersion, } from "@excalidraw/element";
24
- export { CaptureUpdateAction } from "@excalidraw/element";
25
- export { parseLibraryTokensFromUrl, useHandleLibrary } from "./data/library";
26
- export { Sidebar } from "./components/Sidebar/Sidebar";
27
- export { Button } from "./components/Button";
28
- export { Footer };
29
- export { MainMenu };
30
- export { Ellipsify } from "./components/Ellipsify";
31
- export { useEditorInterface, useStylesPanelMode } from "./components/App";
32
- export { WelcomeScreen };
33
- export { LiveCollaborationTrigger };
34
- export { Stats } from "./components/Stats";
35
- export { DefaultSidebar } from "./components/DefaultSidebar";
36
- export { TTDDialog } from "./components/TTDDialog/TTDDialog";
37
- export { TTDDialogTrigger } from "./components/TTDDialog/TTDDialogTrigger";
38
- export { TTDStreamFetch } from "./components/TTDDialog/utils/TTDStreamFetch";
39
- export type { TTDPersistenceAdapter, SavedChat, SavedChats, } from "./components/TTDDialog/types";
40
- export { zoomToFitBounds } from "./actions/actionCanvas";
41
- export { getCommonBounds, getVisibleSceneBounds, convertToExcalidrawElements, } from "@excalidraw/element";
42
- export { elementsOverlappingBBox, isElementInsideBBox, elementPartiallyOverlapsWithOrContainsBBox, } from "@excalidraw/utils/withinBounds";
43
- export { DiagramToCodePlugin } from "./components/DiagramToCodePlugin/DiagramToCodePlugin";
44
- export { getDataURL } from "./data/blob";
45
- export { isElementLink } from "@excalidraw/element";
46
- export { setCustomTextMetricsProvider } from "@excalidraw/element";
@@ -1,2 +0,0 @@
1
- declare const polyfill: () => void;
2
- export default polyfill;
@@ -1,9 +0,0 @@
1
- import { type GlobalPoint, type LocalPoint } from "@excalidraw/math";
2
- import type { Bounds } from "@excalidraw/common";
3
- export type LineSegment<P extends LocalPoint | GlobalPoint> = [P, P];
4
- export declare function getBBox<P extends LocalPoint | GlobalPoint>(line: LineSegment<P>): Bounds;
5
- export declare function doBBoxesIntersect(a: Bounds, b: Bounds): boolean;
6
- export declare function isPointOnLine<P extends GlobalPoint | LocalPoint>(l: LineSegment<P>, p: P): boolean;
7
- export declare function isPointRightOfLine<P extends GlobalPoint | LocalPoint>(l: LineSegment<P>, p: P): boolean;
8
- export declare function isLineSegmentTouchingOrCrossingLine<P extends GlobalPoint | LocalPoint>(a: LineSegment<P>, b: LineSegment<P>): boolean;
9
- export declare function doLineSegmentsIntersect<P extends GlobalPoint | LocalPoint>(a: LineSegment<P>, b: LineSegment<P>): boolean;
@@ -1,19 +0,0 @@
1
- import { type Bounds } from "@excalidraw/common";
2
- import type { ExcalidrawElement, NonDeletedExcalidrawElement } from "@excalidraw/element/types";
3
- type Element = NonDeletedExcalidrawElement;
4
- type Elements = readonly NonDeletedExcalidrawElement[];
5
- export declare const isElementInsideBBox: (element: Element, bbox: Bounds, eitherDirection?: boolean) => boolean;
6
- export declare const elementPartiallyOverlapsWithOrContainsBBox: (element: Element, bbox: Bounds) => boolean;
7
- export declare const elementsOverlappingBBox: ({ elements, bounds, type, errorMargin, }: {
8
- elements: Elements;
9
- bounds: Bounds | ExcalidrawElement;
10
- /** safety offset. Defaults to 0. */
11
- errorMargin?: number;
12
- /**
13
- * - overlap: elements overlapping or inside bounds
14
- * - contain: elements inside bounds or bounds inside elements
15
- * - inside: elements inside bounds
16
- **/
17
- type: "overlap" | "contain" | "inside";
18
- }) => NonDeletedExcalidrawElement[];
19
- export {};