add @excalidraw/utils to external and fixes

This commit is contained in:
Aakansha Doshi 2024-05-03 17:08:07 +05:30
parent 6a1477a55c
commit 45ff9d1053
8 changed files with 9 additions and 9 deletions

View File

@ -63,7 +63,7 @@
"build:app:docker": "cross-env VITE_APP_DISABLE_SENTRY=true VITE_APP_DISABLE_TRACKING=true vite build", "build:app:docker": "cross-env VITE_APP_DISABLE_SENTRY=true VITE_APP_DISABLE_TRACKING=true vite build",
"build:app": "cross-env VITE_APP_GIT_SHA=$VERCEL_GIT_COMMIT_SHA vite build", "build:app": "cross-env VITE_APP_GIT_SHA=$VERCEL_GIT_COMMIT_SHA vite build",
"build:version": "node ./scripts/build-version.js", "build:version": "node ./scripts/build-version.js",
"build": "yarn --cwd ./excalidraw-app build", "build": "yarn workspace @excalidraw/utils build:esm && yarn --cwd ./excalidraw-app build",
"fix:code": "yarn test:code --fix", "fix:code": "yarn test:code --fix",
"fix:other": "yarn prettier --write", "fix:other": "yarn prettier --write",
"fix": "yarn fix:other && yarn fix:code", "fix": "yarn fix:other && yarn fix:code",

View File

@ -26,7 +26,7 @@ import {
import { getElementAbsoluteCoords } from "./bounds"; import { getElementAbsoluteCoords } from "./bounds";
import { AppClassProperties, AppState, Point } from "../types"; import { AppClassProperties, AppState, Point } from "../types";
import { isPointOnShape } from "../../utils/collision"; import { isPointOnShape } from "@excalidraw/utils";
import { getElementAtPosition } from "../scene"; import { getElementAtPosition } from "../scene";
import { import {
isArrowElement, isArrowElement,

View File

@ -13,7 +13,7 @@ import {
GeometricShape, GeometricShape,
getPolygonShape, getPolygonShape,
} from "../../utils/geometry/shape"; } from "../../utils/geometry/shape";
import { isPointInShape, isPointOnShape } from "../../utils/collision"; import { isPointInShape, isPointOnShape } from "@excalidraw/utils";
import { isTransparent } from "../utils"; import { isTransparent } from "../utils";
import { import {
hasBoundTextElement, hasBoundTextElement,

View File

@ -59,7 +59,7 @@
"@braintree/sanitize-url": "6.0.2", "@braintree/sanitize-url": "6.0.2",
"@excalidraw/laser-pointer": "1.3.1", "@excalidraw/laser-pointer": "1.3.1",
"@excalidraw/mermaid-to-excalidraw": "0.3.0", "@excalidraw/mermaid-to-excalidraw": "0.3.0",
"@excalidraw/utils": "workspace:^", "@excalidraw/utils": "*",
"@excalidraw/random-username": "1.1.0", "@excalidraw/random-username": "1.1.0",
"@radix-ui/react-popover": "1.0.3", "@radix-ui/react-popover": "1.0.3",
"@radix-ui/react-tabs": "1.0.2", "@radix-ui/react-tabs": "1.0.2",

View File

@ -171,6 +171,8 @@ export const exportToSvg = async ({
exportPadding?: number; exportPadding?: number;
renderEmbeddables?: boolean; renderEmbeddables?: boolean;
}): Promise<SVGSVGElement> => { }): Promise<SVGSVGElement> => {
console.log("HIIII TGEREE122");
const { elements: restoredElements, appState: restoredAppState } = restore( const { elements: restoredElements, appState: restoredAppState } = restore(
{ elements, appState }, { elements, appState },
null, null,

View File

@ -1,3 +1,4 @@
export * from "./export"; export * from "./export";
export * from "./withinBounds"; export * from "./withinBounds";
export * from "./bbox"; export * from "./bbox";
export * from "./collision";

View File

@ -8,6 +8,7 @@ const browserConfig = {
bundle: true, bundle: true,
format: "esm", format: "esm",
plugins: [sassPlugin()], plugins: [sassPlugin()],
external: ["@excalidraw/utils"],
}; };
// Will be used later for treeshaking // Will be used later for treeshaking
@ -80,6 +81,7 @@ const rawConfig = {
format: "esm", format: "esm",
packages: "external", packages: "external",
plugins: [sassPlugin()], plugins: [sassPlugin()],
external: ["@excalidraw/utils"],
}; };
// const BASE_PATH = `${path.resolve(`${__dirname}/..`)}`; // const BASE_PATH = `${path.resolve(`${__dirname}/..`)}`;

View File

@ -2022,11 +2022,6 @@
resolved "https://registry.npmjs.org/@excalidraw/random-username/-/random-username-1.1.0.tgz#6f388d6a9708cf655b8c9c6aa3fa569ee71ecf0f" resolved "https://registry.npmjs.org/@excalidraw/random-username/-/random-username-1.1.0.tgz#6f388d6a9708cf655b8c9c6aa3fa569ee71ecf0f"
integrity sha512-nULYsQxkWHnbmHvcs+efMkJ4/9TtvNyFeLyHdeGxW0zHs6P+jYVqcRff9A6Vq9w9JXeDRnRh2VKvTtS19GW2qA== integrity sha512-nULYsQxkWHnbmHvcs+efMkJ4/9TtvNyFeLyHdeGxW0zHs6P+jYVqcRff9A6Vq9w9JXeDRnRh2VKvTtS19GW2qA==
"@excalidraw/utils@workspace:^":
version "0.1.2"
resolved "https://registry.yarnpkg.com/@excalidraw/utils/-/utils-0.1.2.tgz#69b931772b5d06ea655743a85557f001b585c352"
integrity sha512-hypi3np+Do3e8Eb0Y1ug52EyJP4JAP3RPQRfAgiMN0ftag7M49vahiWVXd9yX4wsviCKYacTbBDs2mRqt3nyUQ==
"@firebase/analytics-types@0.4.0": "@firebase/analytics-types@0.4.0":
version "0.4.0" version "0.4.0"
resolved "https://registry.npmjs.org/@firebase/analytics-types/-/analytics-types-0.4.0.tgz#d6716f9fa36a6e340bc0ecfe68af325aa6f60508" resolved "https://registry.npmjs.org/@firebase/analytics-types/-/analytics-types-0.4.0.tgz#d6716f9fa36a6e340bc0ecfe68af325aa6f60508"