Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

import asset type from SDK

Sara Vieira1ca940f6422e
diff --git a/apps/designer/app/designer/designer.tsx b/apps/designer/app/designer/designer.tsx
index 2630806447..253dcfac76 100644
--- a/apps/designer/app/designer/designer.tsx
+++ b/apps/designer/app/designer/designer.tsx
@@ -3,6 +3,7 @@ import { DndProvider } from "react-dnd";
import { TouchBackend } from "react-dnd-touch-backend";
import {
type Project,
+ type Asset,
useSubscribe,
usePublish,
} from "@webstudio-is/react-sdk";
@@ -37,7 +38,6 @@ import { usePublishShortcuts } from "./shared/shortcuts";
import { type SyncStatus } from "~/shared/sync";
import { useIsPreviewMode, useRootInstance } from "~/shared/nano-states";
import { useSubscribeClientSetting } from "./shared/client-settings";
-import { Asset } from "@prisma/client";
export const links = () => {
return [
diff --git a/apps/designer/app/designer/features/sidebar-left/panels/image-upload.tsx b/apps/designer/app/designer/features/sidebar-left/panels/image-upload.tsx
index 22a5e68e4a..58b03d701f 100644
--- a/apps/designer/app/designer/features/sidebar-left/panels/image-upload.tsx
+++ b/apps/designer/app/designer/features/sidebar-left/panels/image-upload.tsx
@@ -2,7 +2,7 @@ import { ImageIcon } from "~/shared/icons";
import { Button, Flex, Grid, Heading } from "~/shared/design-system";
import { useRef } from "react";
import { Form } from "@remix-run/react";
-import { Asset } from "@prisma/client";
+import { type Asset } from "@webstudio-is/react-sdk";
import { Image } from "~/shared/design-system/components/image";
export const TabContent = ({ assets }: { assets: Array<Asset> }) => {
diff --git a/apps/designer/app/routes/designer/$id.tsx b/apps/designer/app/routes/designer/$id.tsx
index 22ca1c313e..35f561af53 100644
--- a/apps/designer/app/routes/designer/$id.tsx
+++ b/apps/designer/app/routes/designer/$id.tsx
@@ -10,7 +10,7 @@ import { Designer, links } from "~/designer";
import * as db from "~/shared/db";
import config from "~/config";
import env from "~/env.server";
-import { Asset } from "@prisma/client";
+import { type Asset } from "@webstudio-is/react-sdk";
export { links };
export const loader: LoaderFunction = async ({ params }) => {
diff --git a/packages/webstudio-react-sdk/src/db/types.ts b/packages/webstudio-react-sdk/src/db/types.ts
index bb60157308..ec8ea7db91 100644
--- a/packages/webstudio-react-sdk/src/db/types.ts
+++ b/packages/webstudio-react-sdk/src/db/types.ts
@@ -3,6 +3,7 @@ import type {
Project,
User,
Breakpoints,
+ Asset,
} from "@prisma/client";
import type { UserProp } from "../user-props";
import type { Instance } from "./instance";
@@ -16,4 +17,4 @@ export type InstanceProps = Omit<DbInstanceProps, "props"> & {
props: Array<UserProp>;
};
-export type { DbInstanceProps, Project, User, Breakpoints };
+export type { DbInstanceProps, Project, User, Breakpoints, Asset };