diff --git a/docs/API/ExcalidrawAutomate.d.ts b/docs/API/ExcalidrawAutomate.d.ts index 1e9d30f..92448af 100644 --- a/docs/API/ExcalidrawAutomate.d.ts +++ b/docs/API/ExcalidrawAutomate.d.ts @@ -1,5 +1,5 @@ import ExcalidrawPlugin from "src/core/main"; -import { FillStyle, StrokeStyle, ExcalidrawElement, ExcalidrawBindableElement, FileId, NonDeletedExcalidrawElement, ExcalidrawImageElement, StrokeRoundness, RoundnessType } from "@zsviczian/excalidraw/types/excalidraw/element/types"; +import { FillStyle, StrokeStyle, ExcalidrawElement, ExcalidrawBindableElement, FileId, NonDeletedExcalidrawElement, ExcalidrawImageElement, StrokeRoundness, RoundnessType } from "@zsviczian/excalidraw/types/element/src/types"; import { ColorMap, MimeType } from "./EmbeddedFileLoader"; import { Editor, OpenViewState, RequestUrlResponse, TFile, TFolder, WorkspaceLeaf } from "obsidian"; import * as obsidian_module from "obsidian"; @@ -11,7 +11,7 @@ import { ColorMaster } from "@zsviczian/colormaster"; import { TInput } from "@zsviczian/colormaster/types"; import { ClipboardData } from "@zsviczian/excalidraw/types/excalidraw/clipboard"; import { PaneTarget } from "src/utils/modifierkeyHelper"; -import { Mutable } from "@zsviczian/excalidraw/types/excalidraw/utility-types"; +import { Mutable } from "@zsviczian/excalidraw/types/common/src/utility-types"; import { EmbeddableMDCustomProps } from "./Dialogs/EmbeddableSettings"; import { AIRequest } from "../utils/AIUtils"; import { AddImageOptions, ImageInfo, SVGColorInfo } from "src/types/excalidrawAutomateTypes"; diff --git a/docs/zh-cn/docs/API/ExcalidrawAutomate.d.ts b/docs/zh-cn/docs/API/ExcalidrawAutomate.d.ts index 1e9d30f..92448af 100644 --- a/docs/zh-cn/docs/API/ExcalidrawAutomate.d.ts +++ b/docs/zh-cn/docs/API/ExcalidrawAutomate.d.ts @@ -1,5 +1,5 @@ import ExcalidrawPlugin from "src/core/main"; -import { FillStyle, StrokeStyle, ExcalidrawElement, ExcalidrawBindableElement, FileId, NonDeletedExcalidrawElement, ExcalidrawImageElement, StrokeRoundness, RoundnessType } from "@zsviczian/excalidraw/types/excalidraw/element/types"; +import { FillStyle, StrokeStyle, ExcalidrawElement, ExcalidrawBindableElement, FileId, NonDeletedExcalidrawElement, ExcalidrawImageElement, StrokeRoundness, RoundnessType } from "@zsviczian/excalidraw/types/element/src/types"; import { ColorMap, MimeType } from "./EmbeddedFileLoader"; import { Editor, OpenViewState, RequestUrlResponse, TFile, TFolder, WorkspaceLeaf } from "obsidian"; import * as obsidian_module from "obsidian"; @@ -11,7 +11,7 @@ import { ColorMaster } from "@zsviczian/colormaster"; import { TInput } from "@zsviczian/colormaster/types"; import { ClipboardData } from "@zsviczian/excalidraw/types/excalidraw/clipboard"; import { PaneTarget } from "src/utils/modifierkeyHelper"; -import { Mutable } from "@zsviczian/excalidraw/types/excalidraw/utility-types"; +import { Mutable } from "@zsviczian/excalidraw/types/common/src/utility-types"; import { EmbeddableMDCustomProps } from "./Dialogs/EmbeddableSettings"; import { AIRequest } from "../utils/AIUtils"; import { AddImageOptions, ImageInfo, SVGColorInfo } from "src/types/excalidrawAutomateTypes"; diff --git a/package-lock.json b/package-lock.json index d26372c..4c299cb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,11 +11,12 @@ "dependencies": { "@popperjs/core": "^2.11.8", "@zsviczian/colormaster": "^1.2.2", - "@zsviczian/excalidraw": "0.18.0-2", + "@zsviczian/excalidraw": "0.18.0-9", "chroma-js": "^2.4.2", "clsx": "^2.0.0", "es6-promise-pool": "2.5.0", "gl-matrix": "^3.4.3", + "html2canvas": "^1.4.1", "js-yaml": "^4.1.0", "lucide-react": "^0.479.0", "mathjax-full": "^3.2.2", @@ -1543,6 +1544,7 @@ "version": "7.26.9", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.9.tgz", "integrity": "sha512-aA63XwOkcl4xxQa3HjPMqOP6LiK0ZDv3mUPYEFXkpHbaFjtGggE1A61FjFzJnB+p7/oy2gA8E+rcBNl/zC1tMg==", + "dev": true, "dependencies": { "regenerator-runtime": "^0.14.0" }, @@ -2128,66 +2130,28 @@ } }, "node_modules/@radix-ui/react-collection": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.0.1.tgz", - "integrity": "sha512-uuiFbs+YCKjn3X1DTSx9G7BHApu4GHbi3kgiwsnFUbOKCrwejAJv4eE4Vc8C0Oaxt9T0aV4ox0WCOdx+39Xo+g==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.1.2.tgz", + "integrity": "sha512-9z54IEKRxIa9VityapoEYMuByaG42iSy1ZXlY2KcuLSEtq8x4987/N6m15ppoMffgZX72gER2uHe1D9Y6Unlcw==", "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-compose-refs": "1.0.0", - "@radix-ui/react-context": "1.0.0", - "@radix-ui/react-primitive": "1.0.1", - "@radix-ui/react-slot": "1.0.1" + "@radix-ui/react-compose-refs": "1.1.1", + "@radix-ui/react-context": "1.1.1", + "@radix-ui/react-primitive": "2.0.2", + "@radix-ui/react-slot": "1.1.2" }, "peerDependencies": { - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" - } - }, - "node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-compose-refs": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.0.0.tgz", - "integrity": "sha512-0KaSv6sx787/hK3eF53iOkiSLwAGlFMx5lotrqD2pTjB18KbybKoEIgkNZTKC60YECDQTKGTRcDBILwZVqVKvA==", - "dependencies": { - "@babel/runtime": "^7.13.10" + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, - "peerDependencies": { - "react": "^16.8 || ^17.0 || ^18.0" - } - }, - "node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-context": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.0.0.tgz", - "integrity": "sha512-1pVM9RfOQ+n/N5PJK33kRSKsr1glNxomxONs5c49MliinBY6Yw2Q995qfBUUo0/Mbg05B/sGA0gkgPI7kmSHBg==", - "dependencies": { - "@babel/runtime": "^7.13.10" - }, - "peerDependencies": { - "react": "^16.8 || ^17.0 || ^18.0" - } - }, - "node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-primitive": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-1.0.1.tgz", - "integrity": "sha512-fHbmislWVkZaIdeF6GZxF0A/NH/3BjrGIYj+Ae6eTmTCr7EB0RQAAVEiqsXK6p3/JcRqVSBQoceZroj30Jj3XA==", - "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-slot": "1.0.1" - }, - "peerDependencies": { - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" - } - }, - "node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-slot": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.0.1.tgz", - "integrity": "sha512-avutXAFL1ehGvAXtPquu0YK5oz6ctS474iM3vNGQIkswrVhdrS52e3uoMQBzZhNRAIE0jBnUyXWNmSjGHhCFcw==", - "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-compose-refs": "1.0.0" - }, - "peerDependencies": { - "react": "^16.8 || ^17.0 || ^18.0" + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } } }, "node_modules/@radix-ui/react-compose-refs": { @@ -2219,14 +2183,17 @@ } }, "node_modules/@radix-ui/react-direction": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-direction/-/react-direction-1.0.0.tgz", - "integrity": "sha512-2HV05lGUgYcA6xgLQ4BKPDmtL+QbIZYH5fCOTAOOcJ5O0QbWS3i9lKaurLzliYUDhORI2Qr3pyjhJh44lKA3rQ==", - "dependencies": { - "@babel/runtime": "^7.13.10" - }, + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-direction/-/react-direction-1.1.0.tgz", + "integrity": "sha512-BUuBvgThEiAXh2DWu93XsT+a3aWrGqolGlqqw5VU1kG7p/ZH2cuDlM1sRLNnY3QcBS69UIz2mcKhMxDsdewhjg==", "peerDependencies": { - "react": "^16.8 || ^17.0 || ^18.0" + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } } }, "node_modules/@radix-ui/react-dismissable-layer": { @@ -2446,125 +2413,33 @@ } }, "node_modules/@radix-ui/react-roving-focus": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.0.2.tgz", - "integrity": "sha512-HLK+CqD/8pN6GfJm3U+cqpqhSKYAWiOJDe+A+8MfxBnOue39QEeMa43csUn2CXCHQT0/mewh1LrrG4tfkM9DMA==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.1.2.tgz", + "integrity": "sha512-zgMQWkNO169GtGqRvYrzb0Zf8NhMHS2DuEB/TiEmVnpr5OqPU3i8lfbxaAmC2J/KYuIQxyoQQ6DxepyXp61/xw==", "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/primitive": "1.0.0", - "@radix-ui/react-collection": "1.0.1", - "@radix-ui/react-compose-refs": "1.0.0", - "@radix-ui/react-context": "1.0.0", - "@radix-ui/react-direction": "1.0.0", - "@radix-ui/react-id": "1.0.0", - "@radix-ui/react-primitive": "1.0.1", - "@radix-ui/react-use-callback-ref": "1.0.0", - "@radix-ui/react-use-controllable-state": "1.0.0" + "@radix-ui/primitive": "1.1.1", + "@radix-ui/react-collection": "1.1.2", + "@radix-ui/react-compose-refs": "1.1.1", + "@radix-ui/react-context": "1.1.1", + "@radix-ui/react-direction": "1.1.0", + "@radix-ui/react-id": "1.1.0", + "@radix-ui/react-primitive": "2.0.2", + "@radix-ui/react-use-callback-ref": "1.1.0", + "@radix-ui/react-use-controllable-state": "1.1.0" }, "peerDependencies": { - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" - } - }, - "node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/primitive": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.0.0.tgz", - "integrity": "sha512-3e7rn8FDMin4CgeL7Z/49smCA3rFYY3Ha2rUQ7HRWFadS5iCRw08ZgVT1LaNTCNqgvrUiyczLflrVrF0SRQtNA==", - "dependencies": { - "@babel/runtime": "^7.13.10" - } - }, - "node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-compose-refs": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.0.0.tgz", - "integrity": "sha512-0KaSv6sx787/hK3eF53iOkiSLwAGlFMx5lotrqD2pTjB18KbybKoEIgkNZTKC60YECDQTKGTRcDBILwZVqVKvA==", - "dependencies": { - "@babel/runtime": "^7.13.10" + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, - "peerDependencies": { - "react": "^16.8 || ^17.0 || ^18.0" - } - }, - "node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-context": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.0.0.tgz", - "integrity": "sha512-1pVM9RfOQ+n/N5PJK33kRSKsr1glNxomxONs5c49MliinBY6Yw2Q995qfBUUo0/Mbg05B/sGA0gkgPI7kmSHBg==", - "dependencies": { - "@babel/runtime": "^7.13.10" - }, - "peerDependencies": { - "react": "^16.8 || ^17.0 || ^18.0" - } - }, - "node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-id": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.0.0.tgz", - "integrity": "sha512-Q6iAB/U7Tq3NTolBBQbHTgclPmGWE3OlktGGqrClPozSw4vkQ1DfQAOtzgRPecKsMdJINE05iaoDUG8tRzCBjw==", - "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-use-layout-effect": "1.0.0" - }, - "peerDependencies": { - "react": "^16.8 || ^17.0 || ^18.0" - } - }, - "node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-primitive": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-1.0.1.tgz", - "integrity": "sha512-fHbmislWVkZaIdeF6GZxF0A/NH/3BjrGIYj+Ae6eTmTCr7EB0RQAAVEiqsXK6p3/JcRqVSBQoceZroj30Jj3XA==", - "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-slot": "1.0.1" - }, - "peerDependencies": { - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" - } - }, - "node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-slot": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.0.1.tgz", - "integrity": "sha512-avutXAFL1ehGvAXtPquu0YK5oz6ctS474iM3vNGQIkswrVhdrS52e3uoMQBzZhNRAIE0jBnUyXWNmSjGHhCFcw==", - "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-compose-refs": "1.0.0" - }, - "peerDependencies": { - "react": "^16.8 || ^17.0 || ^18.0" - } - }, - "node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-use-callback-ref": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.0.tgz", - "integrity": "sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg==", - "dependencies": { - "@babel/runtime": "^7.13.10" - }, - "peerDependencies": { - "react": "^16.8 || ^17.0 || ^18.0" - } - }, - "node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-use-controllable-state": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.0.0.tgz", - "integrity": "sha512-FohDoZvk3mEXh9AWAVyRTYR4Sq7/gavuofglmiXB2g1aKyboUD4YtgWxKj8O5n+Uak52gXQ4wKz5IFST4vtJHg==", - "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-use-callback-ref": "1.0.0" - }, - "peerDependencies": { - "react": "^16.8 || ^17.0 || ^18.0" - } - }, - "node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-use-layout-effect": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.0.tgz", - "integrity": "sha512-6Tpkq+R6LOlmQb1R5NNETLG0B4YP0wc+klfXafpUCj6JGyaUc8il7/kUZ7m59rGbXGczE9Bs+iz2qloqsZBduQ==", - "dependencies": { - "@babel/runtime": "^7.13.10" - }, - "peerDependencies": { - "react": "^16.8 || ^17.0 || ^18.0" + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } } }, "node_modules/@radix-ui/react-slot": { @@ -2585,138 +2460,32 @@ } }, "node_modules/@radix-ui/react-tabs": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@radix-ui/react-tabs/-/react-tabs-1.0.2.tgz", - "integrity": "sha512-gOUwh+HbjCuL0UCo8kZ+kdUEG8QtpdO4sMQduJ34ZEz0r4922g9REOBM+vIsfwtGxSug4Yb1msJMJYN2Bk8TpQ==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@radix-ui/react-tabs/-/react-tabs-1.1.3.tgz", + "integrity": "sha512-9mFyI30cuRDImbmFF6O2KUJdgEOsGh9Vmx9x/Dh9tOhL7BngmQPQfwW4aejKm5OHpfWIdmeV6ySyuxoOGjtNng==", "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/primitive": "1.0.0", - "@radix-ui/react-context": "1.0.0", - "@radix-ui/react-direction": "1.0.0", - "@radix-ui/react-id": "1.0.0", - "@radix-ui/react-presence": "1.0.0", - "@radix-ui/react-primitive": "1.0.1", - "@radix-ui/react-roving-focus": "1.0.2", - "@radix-ui/react-use-controllable-state": "1.0.0" + "@radix-ui/primitive": "1.1.1", + "@radix-ui/react-context": "1.1.1", + "@radix-ui/react-direction": "1.1.0", + "@radix-ui/react-id": "1.1.0", + "@radix-ui/react-presence": "1.1.2", + "@radix-ui/react-primitive": "2.0.2", + "@radix-ui/react-roving-focus": "1.1.2", + "@radix-ui/react-use-controllable-state": "1.1.0" }, "peerDependencies": { - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" - } - }, - "node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/primitive": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.0.0.tgz", - "integrity": "sha512-3e7rn8FDMin4CgeL7Z/49smCA3rFYY3Ha2rUQ7HRWFadS5iCRw08ZgVT1LaNTCNqgvrUiyczLflrVrF0SRQtNA==", - "dependencies": { - "@babel/runtime": "^7.13.10" - } - }, - "node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-compose-refs": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.0.0.tgz", - "integrity": "sha512-0KaSv6sx787/hK3eF53iOkiSLwAGlFMx5lotrqD2pTjB18KbybKoEIgkNZTKC60YECDQTKGTRcDBILwZVqVKvA==", - "dependencies": { - "@babel/runtime": "^7.13.10" + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, - "peerDependencies": { - "react": "^16.8 || ^17.0 || ^18.0" - } - }, - "node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-context": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.0.0.tgz", - "integrity": "sha512-1pVM9RfOQ+n/N5PJK33kRSKsr1glNxomxONs5c49MliinBY6Yw2Q995qfBUUo0/Mbg05B/sGA0gkgPI7kmSHBg==", - "dependencies": { - "@babel/runtime": "^7.13.10" - }, - "peerDependencies": { - "react": "^16.8 || ^17.0 || ^18.0" - } - }, - "node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-id": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.0.0.tgz", - "integrity": "sha512-Q6iAB/U7Tq3NTolBBQbHTgclPmGWE3OlktGGqrClPozSw4vkQ1DfQAOtzgRPecKsMdJINE05iaoDUG8tRzCBjw==", - "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-use-layout-effect": "1.0.0" - }, - "peerDependencies": { - "react": "^16.8 || ^17.0 || ^18.0" - } - }, - "node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-presence": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.0.tgz", - "integrity": "sha512-A+6XEvN01NfVWiKu38ybawfHsBjWum42MRPnEuqPsBZ4eV7e/7K321B5VgYMPv3Xx5An6o1/l9ZuDBgmcmWK3w==", - "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-compose-refs": "1.0.0", - "@radix-ui/react-use-layout-effect": "1.0.0" - }, - "peerDependencies": { - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" - } - }, - "node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-primitive": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-1.0.1.tgz", - "integrity": "sha512-fHbmislWVkZaIdeF6GZxF0A/NH/3BjrGIYj+Ae6eTmTCr7EB0RQAAVEiqsXK6p3/JcRqVSBQoceZroj30Jj3XA==", - "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-slot": "1.0.1" - }, - "peerDependencies": { - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" - } - }, - "node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-slot": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.0.1.tgz", - "integrity": "sha512-avutXAFL1ehGvAXtPquu0YK5oz6ctS474iM3vNGQIkswrVhdrS52e3uoMQBzZhNRAIE0jBnUyXWNmSjGHhCFcw==", - "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-compose-refs": "1.0.0" - }, - "peerDependencies": { - "react": "^16.8 || ^17.0 || ^18.0" - } - }, - "node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-use-callback-ref": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.0.tgz", - "integrity": "sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg==", - "dependencies": { - "@babel/runtime": "^7.13.10" - }, - "peerDependencies": { - "react": "^16.8 || ^17.0 || ^18.0" - } - }, - "node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-use-controllable-state": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.0.0.tgz", - "integrity": "sha512-FohDoZvk3mEXh9AWAVyRTYR4Sq7/gavuofglmiXB2g1aKyboUD4YtgWxKj8O5n+Uak52gXQ4wKz5IFST4vtJHg==", - "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-use-callback-ref": "1.0.0" - }, - "peerDependencies": { - "react": "^16.8 || ^17.0 || ^18.0" - } - }, - "node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-use-layout-effect": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.0.tgz", - "integrity": "sha512-6Tpkq+R6LOlmQb1R5NNETLG0B4YP0wc+klfXafpUCj6JGyaUc8il7/kUZ7m59rGbXGczE9Bs+iz2qloqsZBduQ==", - "dependencies": { - "@babel/runtime": "^7.13.10" - }, - "peerDependencies": { - "react": "^16.8 || ^17.0 || ^18.0" + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } } }, "node_modules/@radix-ui/react-use-callback-ref": { @@ -3430,14 +3199,14 @@ "license": "MIT" }, "node_modules/@zsviczian/excalidraw": { - "version": "0.18.0-2", - "resolved": "https://registry.npmjs.org/@zsviczian/excalidraw/-/excalidraw-0.18.0-2.tgz", - "integrity": "sha512-Ge1Dnng9/4iEalNr3DvDfmzoYcccKtKFJREvfx9J2Nqzf6eX2xNOusMYmSYzkC5WWhYaTDGdGP6aUPWsRkc8HA==", + "version": "0.18.0-9", + "resolved": "https://registry.npmjs.org/@zsviczian/excalidraw/-/excalidraw-0.18.0-9.tgz", + "integrity": "sha512-Eao+ETW1TF5O7Lskh0rJfZRQcPoHgXbnKPVooZzhmWPp3K3N2opbGgJrgt6QsdmCB49LUo2QTllXDNpSJdB7iA==", "dependencies": { "@braintree/sanitize-url": "6.0.2", "@excalidraw/random-username": "1.1.0", "@radix-ui/react-popover": "1.1.6", - "@radix-ui/react-tabs": "1.0.2", + "@radix-ui/react-tabs": "1.1.3", "@zsviczian/laser-pointer": "1.3.1", "@zsviczian/mermaid-to-excalidraw": "1.1.2", "browser-fs-access": "0.29.1", @@ -3707,6 +3476,14 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, + "node_modules/base64-arraybuffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz", + "integrity": "sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ==", + "engines": { + "node": ">= 0.6.0" + } + }, "node_modules/binary-extensions": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", @@ -4034,6 +3811,14 @@ "postcss": "^8.0.9" } }, + "node_modules/css-line-break": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/css-line-break/-/css-line-break-2.1.0.tgz", + "integrity": "sha512-FHcKFCZcAha3LwfVBhCQbW2nCNbkZXn7KVUJcsT5/P8YmfsVja0FMPJr0B903j/E69HUphKiV9iQArX8SDYA4w==", + "dependencies": { + "utrie": "^1.0.2" + } + }, "node_modules/css-select": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", @@ -5558,6 +5343,18 @@ "node": ">= 0.4" } }, + "node_modules/html2canvas": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/html2canvas/-/html2canvas-1.4.1.tgz", + "integrity": "sha512-fPU6BHNpsyIhr8yyMpTLLxAbkaK8ArIBcmZIRiBLiDhjeqvXolaEmDGmELFuX9I4xDcaKKcJl+TKZLqruBbmWA==", + "dependencies": { + "css-line-break": "^2.1.0", + "text-segmentation": "^1.0.3" + }, + "engines": { + "node": ">=8.0.0" + } + }, "node_modules/iconv-lite": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", @@ -7784,7 +7581,8 @@ "node_modules/regenerator-runtime": { "version": "0.14.1", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", - "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", + "dev": true }, "node_modules/regenerator-transform": { "version": "0.15.2", @@ -8602,6 +8400,14 @@ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true }, + "node_modules/text-segmentation": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/text-segmentation/-/text-segmentation-1.0.3.tgz", + "integrity": "sha512-iOiPUo/BGnZ6+54OsWxZidGCsdU8YbE4PSpdPinp7DeMtUJNJBoJ/ouUSTJjHkh1KntHaltHl/gDs2FC4i5+Nw==", + "dependencies": { + "utrie": "^1.0.2" + } + }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -8930,6 +8736,14 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true }, + "node_modules/utrie": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/utrie/-/utrie-1.0.2.tgz", + "integrity": "sha512-1MLa5ouZiOmQzUbjbu9VmjLzn1QLXBhwpUa7kdLUQK+KQ5KA9I1vk5U4YHe/X2Ch7PYnJfWuWT+VbuxbGwljhw==", + "dependencies": { + "base64-arraybuffer": "^1.0.2" + } + }, "node_modules/uuid": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", diff --git a/src/core/index.ts b/src/core/index.ts index 9bd4dac..b8434cb 100644 --- a/src/core/index.ts +++ b/src/core/index.ts @@ -2,7 +2,7 @@ import "obsidian"; //import { ExcalidrawAutomate } from "./ExcalidrawAutomate"; //export ExcalidrawAutomate from "./ExcalidrawAutomate"; //export {ExcalidrawAutomate} from "./ExcaildrawAutomate"; -export type { ExcalidrawBindableElement, ExcalidrawElement, FileId, FillStyle, StrokeRoundness, StrokeStyle } from "@zsviczian/excalidraw/types/excalidraw/element/types"; +export type { ExcalidrawBindableElement, ExcalidrawElement, FileId, FillStyle, StrokeRoundness, StrokeStyle } from "@zsviczian/excalidraw/types/element/src/types"; export type { Point } from "src/types/types"; export const getEA = (view?:any): any => { try { diff --git a/src/core/main.ts b/src/core/main.ts index 9654cec..26f72c5 100644 --- a/src/core/main.ts +++ b/src/core/main.ts @@ -61,7 +61,7 @@ import { getFontMetrics, } from "../utils/utils"; import { foldExcalidrawSection, getExcalidrawViews, setExcalidrawView } from "../utils/obsidianUtils"; -import { FileId } from "@zsviczian/excalidraw/types/excalidraw/element/types"; +import { FileId } from "@zsviczian/excalidraw/types/element/src/types"; import { ScriptEngine } from "../shared/Scripts"; import { hoverEvent, initializeMarkdownPostProcessor, markdownPostProcessor, legacyExcalidrawPopoverObserver } from "./managers/MarkdownPostProcessor"; import { FieldSuggester } from "../shared/Suggesters/FieldSuggester"; diff --git a/src/core/managers/CommandManager.ts b/src/core/managers/CommandManager.ts index 1f5fb4e..bc29ae7 100644 --- a/src/core/managers/CommandManager.ts +++ b/src/core/managers/CommandManager.ts @@ -51,7 +51,7 @@ import { getImageSize, } from "../../utils/utils"; import { extractSVGPNGFileName, getActivePDFPageNumberFromPDFView, getAttachmentsFolderAndFilePath, isObsidianThemeDark, mergeMarkdownFiles, setExcalidrawView } from "../../utils/obsidianUtils"; -import { ExcalidrawElement, ExcalidrawEmbeddableElement, ExcalidrawImageElement, ExcalidrawTextElement, FileId } from "@zsviczian/excalidraw/types/excalidraw/element/types"; +import { ExcalidrawElement, ExcalidrawEmbeddableElement, ExcalidrawImageElement, ExcalidrawTextElement, FileId } from "@zsviczian/excalidraw/types/element/src/types"; import { ReleaseNotes } from "../../shared/Dialogs/ReleaseNotes"; import { ScriptInstallPrompt } from "../../shared/Dialogs/ScriptInstallPrompt"; import Taskbone from "../../shared/OCR/Taskbone"; @@ -64,7 +64,7 @@ import { EmbeddableSettings } from "../../shared/Dialogs/EmbeddableSettings"; import { processLinkText } from "../../utils/customEmbeddableUtils"; import { getEA } from "src/core"; import { ExcalidrawImperativeAPI } from "@zsviczian/excalidraw/types/excalidraw/types"; -import { Mutable } from "@zsviczian/excalidraw/types/excalidraw/utility-types"; +import { Mutable } from "@zsviczian/excalidraw/types/common/src/utility-types"; import { carveOutImage, carveOutPDF, createImageCropperFile } from "../../utils/carveout"; import { showFrameSettings } from "../../shared/Dialogs/FrameSettings"; import { insertImageToView } from "../../utils/excalidrawViewUtils"; diff --git a/src/core/managers/EventManager.ts b/src/core/managers/EventManager.ts index 47de271..19536d8 100644 --- a/src/core/managers/EventManager.ts +++ b/src/core/managers/EventManager.ts @@ -1,5 +1,5 @@ import { WorkspaceLeaf, TFile, Editor, MarkdownView, MarkdownFileInfo, MetadataCache, App, EventRef, Menu, FileView } from "obsidian"; -import { ExcalidrawElement } from "@zsviczian/excalidraw/types/excalidraw/element/types"; +import { ExcalidrawElement } from "@zsviczian/excalidraw/types/element/src/types"; import { getLink } from "../../utils/fileUtils"; import { editorInsertText, getExcalidrawViews, getParentOfClass, isUnwantedLeaf, setExcalidrawView } from "../../utils/obsidianUtils"; import ExcalidrawPlugin from "src/core/main"; diff --git a/src/shared/CropImage.ts b/src/shared/CropImage.ts index df0ed9e..13a0e3d 100644 --- a/src/shared/CropImage.ts +++ b/src/shared/CropImage.ts @@ -1,6 +1,6 @@ -import { ExcalidrawElement, FileId } from "@zsviczian/excalidraw/types/excalidraw/element/types"; +import { ExcalidrawElement, FileId } from "@zsviczian/excalidraw/types/element/src/types"; import { BinaryFileData } from "@zsviczian/excalidraw/types/excalidraw/types"; -import { Mutable } from "@zsviczian/excalidraw/types/excalidraw/utility-types"; +import { Mutable } from "@zsviczian/excalidraw/types/common/src/utility-types"; import { Notice } from "obsidian"; import { getEA } from "src/core"; diff --git a/src/shared/Dialogs/EmbeddableSettings.ts b/src/shared/Dialogs/EmbeddableSettings.ts index 97dd50b..a979c04 100644 --- a/src/shared/Dialogs/EmbeddableSettings.ts +++ b/src/shared/Dialogs/EmbeddableSettings.ts @@ -1,5 +1,5 @@ -import { ExcalidrawEmbeddableElement } from "@zsviczian/excalidraw/types/excalidraw/element/types"; -import { Mutable } from "@zsviczian/excalidraw/types/excalidraw/utility-types"; +import { ExcalidrawEmbeddableElement } from "@zsviczian/excalidraw/types/element/src/types"; +import { Mutable } from "@zsviczian/excalidraw/types/common/src/utility-types"; import { Modal, Notice, Setting, TFile, ToggleComponent } from "obsidian"; import { getEA } from "src/core"; import { ExcalidrawAutomate } from "src/shared/ExcalidrawAutomate"; diff --git a/src/shared/EmbeddedFileLoader.ts b/src/shared/EmbeddedFileLoader.ts index 5bffe45..204af38 100644 --- a/src/shared/EmbeddedFileLoader.ts +++ b/src/shared/EmbeddedFileLoader.ts @@ -1,7 +1,7 @@ //https://stackoverflow.com/questions/2068344/how-do-i-get-a-youtube-video-thumbnail-from-the-youtube-api //https://img.youtube.com/vi/uZz5MgzWXiM/maxresdefault.jpg -import { ExcalidrawElement, FileId } from "@zsviczian/excalidraw/types/excalidraw/element/types"; +import { ExcalidrawElement, FileId } from "@zsviczian/excalidraw/types/element/src/types"; import { BinaryFileData, DataURL } from "@zsviczian/excalidraw/types/excalidraw/types"; import { App, MarkdownRenderer, Notice, TFile } from "obsidian"; import { diff --git a/src/shared/ExcalidrawAutomate.ts b/src/shared/ExcalidrawAutomate.ts index b59b7d5..b71a36f 100644 --- a/src/shared/ExcalidrawAutomate.ts +++ b/src/shared/ExcalidrawAutomate.ts @@ -12,7 +12,7 @@ import { RoundnessType, ExcalidrawFrameElement, ExcalidrawTextContainer, -} from "@zsviczian/excalidraw/types/excalidraw/element/types"; +} from "@zsviczian/excalidraw/types/element/src/types"; import { ColorMap, MimeType } from "./EmbeddedFileLoader"; import { Editor, Notice, OpenViewState, RequestUrlResponse, TFile, TFolder, WorkspaceLeaf } from "obsidian"; import * as obsidian_module from "obsidian"; @@ -43,7 +43,6 @@ import { arrayToMap, addAppendUpdateCustomData, getSVG, - getWithBackground, } from "src/utils/utils"; import { getAttachmentsFolderAndFilePath, getExcalidrawViews, getLeaf, getNewOrAdjacentLeaf, isObsidianThemeDark, mergeMarkdownFiles, openLeaf } from "src/utils/obsidianUtils"; import { AppState, BinaryFileData, DataURL, ExcalidrawImperativeAPI, SceneData } from "@zsviczian/excalidraw/types/excalidraw/types"; @@ -70,7 +69,7 @@ import {ConversionResult, svgToExcalidraw} from "src/shared/svgToExcalidraw/pars import { ROUNDNESS } from "src/constants/constants"; import { ClipboardData } from "@zsviczian/excalidraw/types/excalidraw/clipboard"; import { emulateKeysForLinkClick, PaneTarget } from "src/utils/modifierkeyHelper"; -import { Mutable } from "@zsviczian/excalidraw/types/excalidraw/utility-types"; +import { Mutable } from "@zsviczian/excalidraw/types/common/src/utility-types"; import PolyBool from "polybooljs"; import { EmbeddableMDCustomProps } from "./Dialogs/EmbeddableSettings"; import { @@ -82,7 +81,7 @@ import { EXCALIDRAW_AUTOMATE_INFO, EXCALIDRAW_SCRIPTENGINE_INFO } from "./Dialog import { addBackOfTheNoteCard } from "../utils/excalidrawViewUtils"; import { log } from "../utils/debugHelper"; import { ExcalidrawLib } from "../types/excalidrawLib"; -import { GlobalPoint } from "@zsviczian/excalidraw/types/math/types"; +import { GlobalPoint } from "@zsviczian/excalidraw/types/math/src/types"; import { AddImageOptions, ImageInfo, SVGColorInfo } from "src/types/excalidrawAutomateTypes"; import { _measureText, cloneElement, createPNG, createSVG, errorMessage, filterColorMap, getEmbeddedFileForImageElment, getFontFamily, getLineBox, getTemplate, isColorStringTransparent, isSVGColorInfo, mergeColorMapIntoSVGColorInfo, normalizeLinePoints, repositionElementsToCursor, svgColorInfoToColorMap, updateOrAddSVGColorInfo, verifyMinimumPluginVersion } from "src/utils/excalidrawAutomateUtils"; import { exportToPDF, getMarginValue, getPageDimensions, PageDimensions, PageOrientation, PageSize, PDFExportScale, PDFPageProperties } from "src/utils/exportUtils"; diff --git a/src/shared/ExcalidrawData.ts b/src/shared/ExcalidrawData.ts index 6713ec7..7f99ccc 100644 --- a/src/shared/ExcalidrawData.ts +++ b/src/shared/ExcalidrawData.ts @@ -44,13 +44,13 @@ import { ExcalidrawImageElement, ExcalidrawTextElement, FileId, -} from "@zsviczian/excalidraw/types/excalidraw/element/types"; +} from "@zsviczian/excalidraw/types/element/src/types"; import { BinaryFiles, DataURL, SceneData } from "@zsviczian/excalidraw/types/excalidraw/types"; import { EmbeddedFile, MimeType } from "./EmbeddedFileLoader"; import { ConfirmationPrompt } from "./Dialogs/Prompt"; import { getMermaidImageElements, getMermaidText, shouldRenderMermaid } from "../utils/mermaidUtils"; import { DEBUGGING, debug } from "../utils/debugHelper"; -import { Mutable } from "@zsviczian/excalidraw/types/excalidraw/utility-types"; +import { Mutable } from "@zsviczian/excalidraw/types/common/src/utility-types"; import { updateElementIdsInScene } from "../utils/excalidrawSceneUtils"; import { checkAndCreateFolder, getNewUniqueFilepath, splitFolderAndFilename } from "../utils/fileUtils"; import { t } from "../lang/helpers"; diff --git a/src/shared/LaTeX.ts b/src/shared/LaTeX.ts index b94ffc5..9a51830 100644 --- a/src/shared/LaTeX.ts +++ b/src/shared/LaTeX.ts @@ -2,7 +2,7 @@ import { DataURL } from "@zsviczian/excalidraw/types/excalidraw/types"; import ExcalidrawView from "../view/ExcalidrawView"; import { FileData, MimeType } from "./EmbeddedFileLoader"; -import { FileId } from "@zsviczian/excalidraw/types/excalidraw/element/types"; +import { FileId } from "@zsviczian/excalidraw/types/element/src/types"; import ExcalidrawPlugin from "src/core/main"; declare const loadMathjaxToSVG: Function; diff --git a/src/shared/OCR/Taskbone.ts b/src/shared/OCR/Taskbone.ts index 958a34c..da65a76 100644 --- a/src/shared/OCR/Taskbone.ts +++ b/src/shared/OCR/Taskbone.ts @@ -3,7 +3,7 @@ import {Notice, requestUrl} from "obsidian" import ExcalidrawPlugin from "../../core/main" import ExcalidrawView, { ExportSettings } from "../../view/ExcalidrawView" import FrontmatterEditor from "src/shared/Frontmatter"; -import { ExcalidrawElement } from "@zsviczian/excalidraw/types/excalidraw/element/types"; +import { ExcalidrawElement } from "@zsviczian/excalidraw/types/element/src/types"; import { EmbeddedFilesLoader } from "../EmbeddedFileLoader"; import { blobToBase64 } from "src/utils/fileUtils"; import { getEA } from "src/core"; diff --git a/src/shared/svgToExcalidraw/elements/ExcalidrawElement.ts b/src/shared/svgToExcalidraw/elements/ExcalidrawElement.ts index 87af05a..84317f7 100644 --- a/src/shared/svgToExcalidraw/elements/ExcalidrawElement.ts +++ b/src/shared/svgToExcalidraw/elements/ExcalidrawElement.ts @@ -1,6 +1,6 @@ import { randomId, randomInteger } from "../utils"; -import { ExcalidrawLinearElement, FillStyle, GroupId, RoundnessType, StrokeStyle } from "@zsviczian/excalidraw/types/excalidraw/element/types"; +import { ExcalidrawLinearElement, FillStyle, GroupId, RoundnessType, StrokeStyle } from "@zsviczian/excalidraw/types/element/src/types"; export type Point = [number, number]; diff --git a/src/shared/svgToExcalidraw/types.ts b/src/shared/svgToExcalidraw/types.ts index 9301473..b2b9676 100644 --- a/src/shared/svgToExcalidraw/types.ts +++ b/src/shared/svgToExcalidraw/types.ts @@ -1,4 +1,4 @@ -import { ExcalidrawElement, ExcalidrawLinearElement, ExcalidrawTextElement, FillStyle, GroupId, RoundnessType, StrokeStyle } from "@zsviczian/excalidraw/types/excalidraw/element/types"; +import { ExcalidrawElement, ExcalidrawLinearElement, ExcalidrawTextElement, FillStyle, GroupId, RoundnessType, StrokeStyle } from "@zsviczian/excalidraw/types/element/src/types"; export type PathCommand = { type: string; diff --git a/src/types/excalidrawLib.d.ts b/src/types/excalidrawLib.d.ts index 0da2637..24307c4 100644 --- a/src/types/excalidrawLib.d.ts +++ b/src/types/excalidrawLib.d.ts @@ -1,11 +1,11 @@ import { RestoredDataState } from "@zsviczian/excalidraw/types/excalidraw/data/restore"; import { ImportedDataState } from "@zsviczian/excalidraw/types/excalidraw/data/types"; import { BoundingBox } from "@zsviczian/excalidraw/types/excalidraw/element/bounds"; -import { ElementsMap, ExcalidrawBindableElement, ExcalidrawElement, ExcalidrawFrameElement, ExcalidrawFrameLikeElement, ExcalidrawTextContainer, ExcalidrawTextElement, FontFamilyValues, FontString, NonDeleted, NonDeletedExcalidrawElement, Theme } from "@zsviczian/excalidraw/types/excalidraw/element/types"; +import { ElementsMap, ExcalidrawBindableElement, ExcalidrawElement, ExcalidrawFrameElement, ExcalidrawFrameLikeElement, ExcalidrawTextContainer, ExcalidrawTextElement, FontFamilyValues, FontString, NonDeleted, NonDeletedExcalidrawElement, Theme } from "@zsviczian/excalidraw/types/element/src/types"; import { FontMetadata } from "@zsviczian/excalidraw/types/excalidraw/fonts/FontMetadata"; import { AppState, BinaryFiles, DataURL, GenerateDiagramToCode, Zoom } from "@zsviczian/excalidraw/types/excalidraw/types"; -import { Mutable } from "@zsviczian/excalidraw/types/excalidraw/utility-types"; -import { GlobalPoint } from "@zsviczian/excalidraw/types/math/types"; +import { Mutable } from "@zsviczian/excalidraw/types/common/src/utility-types"; +import { GlobalPoint } from "@zsviczian/excalidraw/types/math/src/types"; interface MermaidConfig { /** diff --git a/src/types/excalidrawViewTypes.ts b/src/types/excalidrawViewTypes.ts index bd9e607..d3369ac 100644 --- a/src/types/excalidrawViewTypes.ts +++ b/src/types/excalidrawViewTypes.ts @@ -1,7 +1,7 @@ // src/types/ExcalidrawViewTypes.ts import { WorkspaceLeaf } from "obsidian"; -import { FileId } from "@zsviczian/excalidraw/types/excalidraw/element/types"; +import { FileId } from "@zsviczian/excalidraw/types/element/src/types"; import { ObsidianCanvasNode } from "../view/managers/CanvasNodeFactory"; export type Position = { x: number; y: number }; diff --git a/src/utils/PDFUtils.ts b/src/utils/PDFUtils.ts index 0c62897..32a452a 100644 --- a/src/utils/PDFUtils.ts +++ b/src/utils/PDFUtils.ts @@ -1,6 +1,6 @@ //for future use, not used currently -import { ImageCrop } from "@zsviczian/excalidraw/types/excalidraw/element/types"; +import { ImageCrop } from "@zsviczian/excalidraw/types/element/src/types"; import { PDFPageViewProps } from "src/shared/EmbeddedFileLoader"; export function getPDFCropRect (props: { diff --git a/src/utils/carveout.ts b/src/utils/carveout.ts index 826dab6..b1e90a4 100644 --- a/src/utils/carveout.ts +++ b/src/utils/carveout.ts @@ -1,10 +1,10 @@ -import { ExcalidrawEmbeddableElement, ExcalidrawFrameElement, ExcalidrawImageElement } from "@zsviczian/excalidraw/types/excalidraw/element/types"; -import { Mutable } from "@zsviczian/excalidraw/types/excalidraw/utility-types"; +import { ExcalidrawEmbeddableElement, ExcalidrawFrameElement, ExcalidrawImageElement } from "@zsviczian/excalidraw/types/element/src/types"; +import { Mutable } from "@zsviczian/excalidraw/types/common/src/utility-types"; import { getEA } from "src/core"; import { ExcalidrawAutomate } from "src/shared/ExcalidrawAutomate"; import { getCropFileNameAndFolder, getListOfTemplateFiles, splitFolderAndFilename } from "./fileUtils"; import { Notice, TFile } from "obsidian"; -import { Radians } from "@zsviczian/excalidraw/types/math"; +import { Radians } from "@zsviczian/excalidraw/types/math/src/types"; export const CROPPED_PREFIX = "cropped_"; export const ANNOTATED_PREFIX = "annotated_"; diff --git a/src/utils/customEmbeddableUtils.ts b/src/utils/customEmbeddableUtils.ts index 7fcac85..76e99bf 100644 --- a/src/utils/customEmbeddableUtils.ts +++ b/src/utils/customEmbeddableUtils.ts @@ -1,4 +1,4 @@ -import { NonDeletedExcalidrawElement } from "@zsviczian/excalidraw/types/excalidraw/element/types"; +import { NonDeletedExcalidrawElement } from "@zsviczian/excalidraw/types/element/src/types"; import { DEVICE, REG_LINKINDEX_INVALIDCHARS } from "src/constants/constants"; import { getParentOfClass } from "./obsidianUtils"; import { App, Notice, TFile, WorkspaceLeaf } from "obsidian"; diff --git a/src/utils/dynamicStyling.ts b/src/utils/dynamicStyling.ts index 83f00c1..bda4abb 100644 --- a/src/utils/dynamicStyling.ts +++ b/src/utils/dynamicStyling.ts @@ -4,7 +4,7 @@ import { ExcalidrawAutomate } from "src/shared/ExcalidrawAutomate"; import ExcalidrawView from "src/view/ExcalidrawView"; import { DynamicStyle } from "src/types/types"; import { cloneElement } from "./excalidrawAutomateUtils"; -import { ExcalidrawFrameElement } from "@zsviczian/excalidraw/types/excalidraw/element/types"; +import { ExcalidrawFrameElement } from "@zsviczian/excalidraw/types/element/src/types"; import { addAppendUpdateCustomData } from "./utils"; import { mutateElement } from "src/constants/constants"; import { CaptureUpdateAction } from "src/constants/constants"; diff --git a/src/utils/excalidrawAutomateUtils.ts b/src/utils/excalidrawAutomateUtils.ts index 5476995..a31987a 100644 --- a/src/utils/excalidrawAutomateUtils.ts +++ b/src/utils/excalidrawAutomateUtils.ts @@ -5,7 +5,7 @@ import { ExcalidrawElement, ExcalidrawImageElement, FileId, -} from "@zsviczian/excalidraw/types/excalidraw/element/types"; +} from "@zsviczian/excalidraw/types/element/src/types"; import { normalizePath, TFile } from "obsidian"; import ExcalidrawView, { ExportSettings, getTextMode } from "src/view/ExcalidrawView"; @@ -32,7 +32,7 @@ import { } from "src/utils/utils"; import { GenericInputPrompt, NewFileActions } from "src/shared/Dialogs/Prompt"; import { t } from "src/lang/helpers"; -import { Mutable } from "@zsviczian/excalidraw/types/excalidraw/utility-types"; +import { Mutable } from "@zsviczian/excalidraw/types/common/src/utility-types"; import { postOpenAI as _postOpenAI, extractCodeBlocks as _extractCodeBlocks, diff --git a/src/utils/excalidrawSceneUtils.ts b/src/utils/excalidrawSceneUtils.ts index b3c86c0..d13de2f 100644 --- a/src/utils/excalidrawSceneUtils.ts +++ b/src/utils/excalidrawSceneUtils.ts @@ -1,5 +1,5 @@ -import { ExcalidrawArrowElement, ExcalidrawElement, ExcalidrawTextElement } from "@zsviczian/excalidraw/types/excalidraw/element/types"; -import { Mutable } from "@zsviczian/excalidraw/types/excalidraw/utility-types"; +import { ExcalidrawArrowElement, ExcalidrawElement, ExcalidrawTextElement } from "@zsviczian/excalidraw/types/element/src/types"; +import { Mutable } from "@zsviczian/excalidraw/types/common/src/utility-types"; export function updateElementIdsInScene( diff --git a/src/utils/excalidrawViewUtils.ts b/src/utils/excalidrawViewUtils.ts index 89cb123..a032420 100644 --- a/src/utils/excalidrawViewUtils.ts +++ b/src/utils/excalidrawViewUtils.ts @@ -4,7 +4,7 @@ import { App, Modal, Notice, TFile, WorkspaceLeaf } from "obsidian"; import { ExcalidrawAutomate } from "src/shared/ExcalidrawAutomate"; import { REGEX_LINK, REG_LINKINDEX_HYPERLINK, getExcalidrawMarkdownHeaderSection, REGEX_TAGS } from "../shared/ExcalidrawData"; import ExcalidrawView from "src/view/ExcalidrawView"; -import { ExcalidrawElement, ExcalidrawFrameElement, ExcalidrawImageElement } from "@zsviczian/excalidraw/types/excalidraw/element/types"; +import { ExcalidrawElement, ExcalidrawFrameElement, ExcalidrawImageElement } from "@zsviczian/excalidraw/types/element/src/types"; import { getEmbeddedFilenameParts, getLinkParts, isImagePartRef } from "./utils"; import { cleanSectionHeading } from "./obsidianUtils"; import { getEA } from "src/core"; @@ -12,7 +12,7 @@ import { ExcalidrawImperativeAPI } from "@zsviczian/excalidraw/types/excalidraw/ import { EmbeddableMDCustomProps } from "src/shared/Dialogs/EmbeddableSettings"; import { nanoid } from "nanoid"; import { t } from "src/lang/helpers"; -import { Mutable } from "@zsviczian/excalidraw/types/excalidraw/utility-types"; +import { Mutable } from "@zsviczian/excalidraw/types/common/src/utility-types"; import { EmbeddedFile } from "src/shared/EmbeddedFileLoader"; import { CaptureUpdateAction } from "src/constants/constants"; diff --git a/src/utils/getElementAtPointer.ts b/src/utils/getElementAtPointer.ts index 6d63d09..1c1c42c 100644 --- a/src/utils/getElementAtPointer.ts +++ b/src/utils/getElementAtPointer.ts @@ -1,4 +1,4 @@ -import { ExcalidrawElement, ExcalidrawImageElement, ExcalidrawTextElement } from "@zsviczian/excalidraw/types/excalidraw/element/types"; +import { ExcalidrawElement, ExcalidrawImageElement, ExcalidrawTextElement } from "@zsviczian/excalidraw/types/element/src/types"; import { REGEX_LINK, REG_LINKINDEX_HYPERLINK } from "../shared/ExcalidrawData"; import ExcalidrawView, { TextMode } from "src/view/ExcalidrawView"; import { rotatedDimensions } from "./utils"; diff --git a/src/utils/matic.ts b/src/utils/matic.ts index 3adffee..ce44391 100644 --- a/src/utils/matic.ts +++ b/src/utils/matic.ts @@ -1,5 +1,5 @@ import { THEME } from "../constants/constants"; -import type { Theme } from "@zsviczian/excalidraw/types/excalidraw/element/types"; +import type { Theme } from "@zsviczian/excalidraw/types/element/src/types"; import type { DataURL } from "@zsviczian/excalidraw/types/excalidraw/types"; import type { OpenAIInput, OpenAIOutput } from "@zsviczian/excalidraw/types/excalidraw/data/ai/types"; diff --git a/src/utils/mermaidUtils.ts b/src/utils/mermaidUtils.ts index 2a1e84f..0496dce 100644 --- a/src/utils/mermaidUtils.ts +++ b/src/utils/mermaidUtils.ts @@ -1,4 +1,4 @@ -import { ExcalidrawElement, ExcalidrawImageElement } from "@zsviczian/excalidraw/types/excalidraw/element/types"; +import { ExcalidrawElement, ExcalidrawImageElement } from "@zsviczian/excalidraw/types/element/src/types"; import { requireApiVersion } from "obsidian"; export function getMermaidImageElements (elements: ExcalidrawElement[]):ExcalidrawImageElement[] { diff --git a/src/utils/utils.ts b/src/utils/utils.ts index 20ac069..8a6f7d2 100644 --- a/src/utils/utils.ts +++ b/src/utils/utils.ts @@ -18,12 +18,12 @@ import { getContainerElement, } from "../constants/constants"; import ExcalidrawPlugin from "../core/main"; -import { ExcalidrawElement, ExcalidrawImageElement, ExcalidrawTextElement, ImageCrop } from "@zsviczian/excalidraw/types/excalidraw/element/types"; +import { ExcalidrawElement, ExcalidrawImageElement, ExcalidrawTextElement, ImageCrop } from "@zsviczian/excalidraw/types/element/src/types"; import { ExportSettings } from "../view/ExcalidrawView"; import { getDataURLFromURL, getIMGFilename, getMimeType, getURLImageExtension } from "./fileUtils"; import { generateEmbeddableLink } from "./customEmbeddableUtils"; import { FILENAMEPARTS } from "../types/utilTypes"; -import { Mutable } from "@zsviczian/excalidraw/types/excalidraw/utility-types"; +import { Mutable } from "@zsviczian/excalidraw/types/common/src/utility-types"; import { cleanBlockRef, cleanSectionHeading, getFileCSSClasses } from "./obsidianUtils"; import { updateElementLinksToObsidianLinks } from "./excalidrawAutomateUtils"; import { CropImage } from "../shared/CropImage"; diff --git a/src/view/ExcalidrawView.ts b/src/view/ExcalidrawView.ts index c0895c1..32f33f8 100644 --- a/src/view/ExcalidrawView.ts +++ b/src/view/ExcalidrawView.ts @@ -22,7 +22,7 @@ import { ExcalidrawTextElement, FileId, NonDeletedExcalidrawElement, -} from "@zsviczian/excalidraw/types/excalidraw/element/types"; +} from "@zsviczian/excalidraw/types/element/src/types"; import { AppState, BinaryFileData, @@ -141,7 +141,7 @@ import { getMermaidText, shouldRenderMermaid } from "../utils/mermaidUtils"; import { nanoid } from "nanoid"; import { CustomMutationObserver, DEBUGGING, debug, log} from "../utils/debugHelper"; import { errorHTML, extractCodeBlocks, postOpenAI } from "../utils/AIUtils"; -import { Mutable } from "@zsviczian/excalidraw/types/excalidraw/utility-types"; +import { Mutable } from "@zsviczian/excalidraw/types/common/src/utility-types"; import { SelectCard } from "../shared/Dialogs/SelectCard"; import { Packages } from "../types/types"; import React from "react"; diff --git a/src/view/components/CustomEmbeddable.tsx b/src/view/components/CustomEmbeddable.tsx index eebea30..94a713d 100644 --- a/src/view/components/CustomEmbeddable.tsx +++ b/src/view/components/CustomEmbeddable.tsx @@ -1,4 +1,4 @@ -import { NonDeletedExcalidrawElement } from "@zsviczian/excalidraw/types/excalidraw/element/types"; +import { NonDeletedExcalidrawElement } from "@zsviczian/excalidraw/types/element/src/types"; import ExcalidrawView from "src/view/ExcalidrawView"; import { Notice, WorkspaceLeaf, WorkspaceSplit } from "obsidian"; import * as React from "react"; diff --git a/src/view/components/menu/EmbeddableActionsMenu.tsx b/src/view/components/menu/EmbeddableActionsMenu.tsx index 88cf7b8..fa27bd4 100644 --- a/src/view/components/menu/EmbeddableActionsMenu.tsx +++ b/src/view/components/menu/EmbeddableActionsMenu.tsx @@ -1,7 +1,7 @@ import { TFile } from "obsidian"; import * as React from "react"; import ExcalidrawView from "../../ExcalidrawView"; -import { ExcalidrawElement, ExcalidrawEmbeddableElement } from "@zsviczian/excalidraw/types/excalidraw/element/types"; +import { ExcalidrawElement, ExcalidrawEmbeddableElement } from "@zsviczian/excalidraw/types/element/src/types"; import { AppState, ExcalidrawImperativeAPI } from "@zsviczian/excalidraw/types/excalidraw/types"; import { ActionButton } from "./ActionButton"; import { ICONS } from "../../../constants/actionIcons";