mirror of
https://github.com/excalidraw/excalidraw.git
synced 2024-11-02 03:25:53 +01:00
fix: export utils from excalidraw package in excalidraw library (#7731)
* fix: export utils from excalidraw package in excalidraw library * don't export utils utilities * fix import path * fix export * don't export export utilites * fix export paths * reexport utils from excalidraw package * add exports from withinBounds * fix path
This commit is contained in:
parent
36e56267c9
commit
af1a3d5b76
@ -23,10 +23,7 @@ import { getElementsWithinSelection, getSelectedElements } from "./scene";
|
|||||||
import { getElementsInGroup, selectGroupsFromGivenElements } from "./groups";
|
import { getElementsInGroup, selectGroupsFromGivenElements } from "./groups";
|
||||||
import type { ExcalidrawElementsIncludingDeleted } from "./scene/Scene";
|
import type { ExcalidrawElementsIncludingDeleted } from "./scene/Scene";
|
||||||
import { getElementLineSegments } from "./element/bounds";
|
import { getElementLineSegments } from "./element/bounds";
|
||||||
import {
|
import { doLineSegmentsIntersect, elementsOverlappingBBox } from "../utils/";
|
||||||
doLineSegmentsIntersect,
|
|
||||||
elementsOverlappingBBox,
|
|
||||||
} from "../utils/export";
|
|
||||||
import { isFrameElement, isFrameLikeElement } from "./element/typeChecks";
|
import { isFrameElement, isFrameLikeElement } from "./element/typeChecks";
|
||||||
import { ReadonlySetLike } from "./utility-types";
|
import { ReadonlySetLike } from "./utility-types";
|
||||||
|
|
||||||
|
@ -217,19 +217,22 @@ export {
|
|||||||
restoreElements,
|
restoreElements,
|
||||||
restoreLibraryItems,
|
restoreLibraryItems,
|
||||||
} from "./data/restore";
|
} from "./data/restore";
|
||||||
|
|
||||||
export {
|
export {
|
||||||
exportToCanvas,
|
exportToCanvas,
|
||||||
exportToBlob,
|
exportToBlob,
|
||||||
exportToSvg,
|
exportToSvg,
|
||||||
serializeAsJSON,
|
exportToClipboard,
|
||||||
serializeLibraryAsJSON,
|
} from "../utils/export";
|
||||||
loadLibraryFromBlob,
|
|
||||||
|
export { serializeAsJSON, serializeLibraryAsJSON } from "./data/json";
|
||||||
|
export {
|
||||||
loadFromBlob,
|
loadFromBlob,
|
||||||
loadSceneOrLibraryFromBlob,
|
loadSceneOrLibraryFromBlob,
|
||||||
getFreeDrawSvgPath,
|
loadLibraryFromBlob,
|
||||||
exportToClipboard,
|
} from "./data/blob";
|
||||||
mergeLibraryItems,
|
export { getFreeDrawSvgPath } from "./renderer/renderElement";
|
||||||
} from "../utils/export";
|
export { mergeLibraryItems } from "./data/library";
|
||||||
export { isLinearElement } from "./element/typeChecks";
|
export { isLinearElement } from "./element/typeChecks";
|
||||||
|
|
||||||
export { FONT_FAMILY, THEME, MIME_TYPES, ROUNDNESS } from "./constants";
|
export { FONT_FAMILY, THEME, MIME_TYPES, ROUNDNESS } from "./constants";
|
||||||
@ -268,4 +271,4 @@ export {
|
|||||||
elementsOverlappingBBox,
|
elementsOverlappingBBox,
|
||||||
isElementInsideBBox,
|
isElementInsideBBox,
|
||||||
elementPartiallyOverlapsWithOrContainsBBox,
|
elementPartiallyOverlapsWithOrContainsBBox,
|
||||||
} from "../utils/export";
|
} from "../utils/withinBounds";
|
||||||
|
@ -205,21 +205,3 @@ export const exportToClipboard = async (
|
|||||||
throw new Error("Invalid export type");
|
throw new Error("Invalid export type");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export * from "./bbox";
|
|
||||||
export {
|
|
||||||
elementsOverlappingBBox,
|
|
||||||
isElementInsideBBox,
|
|
||||||
elementPartiallyOverlapsWithOrContainsBBox,
|
|
||||||
} from "./withinBounds";
|
|
||||||
export {
|
|
||||||
serializeAsJSON,
|
|
||||||
serializeLibraryAsJSON,
|
|
||||||
} from "../excalidraw/data/json";
|
|
||||||
export {
|
|
||||||
loadFromBlob,
|
|
||||||
loadSceneOrLibraryFromBlob,
|
|
||||||
loadLibraryFromBlob,
|
|
||||||
} from "../excalidraw/data/blob";
|
|
||||||
export { getFreeDrawSvgPath } from "../excalidraw/renderer/renderElement";
|
|
||||||
export { mergeLibraryItems } from "../excalidraw/data/library";
|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
export * from "./export";
|
|
3
packages/utils/index.ts
Normal file
3
packages/utils/index.ts
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export * from "./export";
|
||||||
|
export * from "./withinBounds";
|
||||||
|
export * from "./bbox";
|
Loading…
Reference in New Issue
Block a user