diff --git a/frontend/apps/editor3d/app/src/components/reusable/LightboxModal.tsx b/frontend/apps/editor3d/app/src/components/reusable/LightboxModal.tsx deleted file mode 100644 index 6ed68e8f89..0000000000 --- a/frontend/apps/editor3d/app/src/components/reusable/LightboxModal.tsx +++ /dev/null @@ -1,122 +0,0 @@ -import { CloseButton, Button } from "~/components"; -import { Transition } from "@headlessui/react"; -import { createPortal } from "react-dom"; -import dayjs from "dayjs"; -import { faDownToLine } from "@fortawesome/pro-solid-svg-icons"; - -interface LightboxModalProps { - isOpen: boolean; - onClose: () => void; - imageUrl?: string | null; - imageAlt?: string; - onImageError?: () => void; - title?: string; - createdAt?: string; - additionalInfo?: React.ReactNode; - downloadUrl?: string; -} - -export function LightboxModal({ - isOpen, - onClose, - imageUrl, - imageAlt = "", - onImageError, - title, - createdAt, - additionalInfo, - downloadUrl, -}: LightboxModalProps) { - return createPortal( - -
- -
- -
- -
e.stopPropagation()} - > - -
-
- {!imageUrl ? ( -
- Image not available -
- ) : ( - {imageAlt} - )} -
-
-
-
- {title || "Image Generation"} -
- {createdAt && ( -
- Created:{" "} - {dayjs(createdAt).format("MMM D, YYYY HH:mm:ss")} -
- )} - {additionalInfo} -
- {downloadUrl && ( - - )} -
-
-
-
-
-
- , - document.body, - ); -} diff --git a/frontend/apps/editor3d/app/src/pages/PageEnigma/comps/GenerateModals/CompletedCard.tsx b/frontend/apps/editor3d/app/src/pages/PageEnigma/comps/GenerateModals/CompletedCard.tsx index 3dec0d559f..816fa1f43d 100644 --- a/frontend/apps/editor3d/app/src/pages/PageEnigma/comps/GenerateModals/CompletedCard.tsx +++ b/frontend/apps/editor3d/app/src/pages/PageEnigma/comps/GenerateModals/CompletedCard.tsx @@ -2,7 +2,7 @@ import { useState } from "react"; import dayjs from "dayjs"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faDownToLine } from "@fortawesome/pro-solid-svg-icons"; -import { LightboxModal } from "~/components/reusable/LightboxModal"; +import { LightboxModal } from "@storyteller/ui-lightbox-modal"; import { GetCdnOrigin } from "~/api/GetCdnOrigin"; interface Props { diff --git a/frontend/apps/editor3d/app/src/pages/PageEnigma/comps/LibraryModal/LibraryModal.tsx b/frontend/apps/editor3d/app/src/pages/PageEnigma/comps/LibraryModal/LibraryModal.tsx index 10bf52f63a..5d535d5d5c 100644 --- a/frontend/apps/editor3d/app/src/pages/PageEnigma/comps/LibraryModal/LibraryModal.tsx +++ b/frontend/apps/editor3d/app/src/pages/PageEnigma/comps/LibraryModal/LibraryModal.tsx @@ -7,7 +7,7 @@ import React, { useState, useEffect, useCallback, useMemo } from "react"; import { LibraryModalApi } from "./LibraryModalApi"; import { FilterMediaClasses } from "../../../../enums"; import { twMerge } from "tailwind-merge"; -import { LightboxModal } from "~/components/reusable/LightboxModal"; +import { LightboxModal } from "@storyteller/ui-lightbox-modal"; import { GetCdnOrigin } from "~/api/GetCdnOrigin"; export interface LibraryItem { diff --git a/frontend/apps/editor3d/tsconfig.json b/frontend/apps/editor3d/tsconfig.json index 21c7827340..7b3e11171c 100644 --- a/frontend/apps/editor3d/tsconfig.json +++ b/frontend/apps/editor3d/tsconfig.json @@ -33,6 +33,9 @@ "noEmit": true }, "references": [ + { + "path": "../../libs/components/lightbox-modal" + }, { "path": "../../libs/components/input" }, @@ -59,6 +62,9 @@ }, { "path": "../../libs/components/gallery-modal" + }, + { + "path": "../../libs/tauri-utils" } ] } diff --git a/frontend/libs/api/tsconfig.json b/frontend/libs/api/tsconfig.json index 62ebbd9464..85fee3a884 100644 --- a/frontend/libs/api/tsconfig.json +++ b/frontend/libs/api/tsconfig.json @@ -3,6 +3,9 @@ "files": [], "include": [], "references": [ + { + "path": "../tauri-utils" + }, { "path": "./tsconfig.lib.json" }, diff --git a/frontend/libs/api/tsconfig.lib.json b/frontend/libs/api/tsconfig.lib.json index 638d84e290..c058661156 100644 --- a/frontend/libs/api/tsconfig.lib.json +++ b/frontend/libs/api/tsconfig.lib.json @@ -15,7 +15,11 @@ "types": ["node", "vite/client"] }, "include": ["src/**/*.ts"], - "references": [], + "references": [ + { + "path": "../tauri-utils/tsconfig.lib.json" + } + ], "exclude": [ "vite.config.ts", "vite.config.mts",