diff --git a/fixtures/react-router-docker/app/__generated__/[another-page]._index.tsx b/fixtures/react-router-docker/app/__generated__/[another-page]._index.tsx index be01fcf76af3..f089b02f4cd5 100644 --- a/fixtures/react-router-docker/app/__generated__/[another-page]._index.tsx +++ b/fixtures/react-router-docker/app/__generated__/[another-page]._index.tsx @@ -2,29 +2,19 @@ /* This is a auto generated file for building the project */ import { Fragment, useState } from "react"; -import type { FontAsset, ImageAsset } from "@webstudio-is/sdk"; import { useResource, useVariableState } from "@webstudio-is/react-sdk/runtime"; import { Body as Body } from "@webstudio-is/sdk-components-react-router"; import { Heading as Heading } from "@webstudio-is/sdk-components-react"; export const siteName = ""; -export const favIconAsset: ImageAsset | undefined = { - id: "d0974db9300c1a3b0fb8b291dd9fabd45ad136478908394280af2f7087e3aecd", - name: "147-1478573_cat-icon-png-black-cat-png-icon.png_ZJ6-qJjk1RlFzuYwyCXdp.jpeg", - description: null, - projectId: "d845c167-ea07-4875-b08d-83e97c09dcce", - size: 64701, - type: "image", - format: "jpg", - createdAt: "2024-12-06T14:36:07.046+00:00", - meta: { width: 820, height: 985 }, -}; +export const favIconAsset: string | undefined = + "147-1478573_cat-icon-png-black-cat-png-icon.png_ZJ6-qJjk1RlFzuYwyCXdp.jpeg"; // Font assets on current page (can be preloaded) -export const pageFontAssets: FontAsset[] = []; +export const pageFontAssets: string[] = []; -export const pageBackgroundImageAssets: ImageAsset[] = []; +export const pageBackgroundImageAssets: string[] = []; const Page = (_props: { system: any }) => { return ( diff --git a/fixtures/react-router-docker/app/__generated__/_index.tsx b/fixtures/react-router-docker/app/__generated__/_index.tsx index 0dee4dc4bbc6..a4a0a49620a8 100644 --- a/fixtures/react-router-docker/app/__generated__/_index.tsx +++ b/fixtures/react-router-docker/app/__generated__/_index.tsx @@ -2,7 +2,6 @@ /* This is a auto generated file for building the project */ import { Fragment, useState } from "react"; -import type { FontAsset, ImageAsset } from "@webstudio-is/sdk"; import { useResource, useVariableState } from "@webstudio-is/react-sdk/runtime"; import { Body as Body, @@ -16,22 +15,13 @@ import { export const siteName = ""; -export const favIconAsset: ImageAsset | undefined = { - id: "d0974db9300c1a3b0fb8b291dd9fabd45ad136478908394280af2f7087e3aecd", - name: "147-1478573_cat-icon-png-black-cat-png-icon.png_ZJ6-qJjk1RlFzuYwyCXdp.jpeg", - description: null, - projectId: "d845c167-ea07-4875-b08d-83e97c09dcce", - size: 64701, - type: "image", - format: "jpg", - createdAt: "2024-12-06T14:36:07.046+00:00", - meta: { width: 820, height: 985 }, -}; +export const favIconAsset: string | undefined = + "147-1478573_cat-icon-png-black-cat-png-icon.png_ZJ6-qJjk1RlFzuYwyCXdp.jpeg"; // Font assets on current page (can be preloaded) -export const pageFontAssets: FontAsset[] = []; +export const pageFontAssets: string[] = []; -export const pageBackgroundImageAssets: ImageAsset[] = []; +export const pageBackgroundImageAssets: string[] = []; export const CustomCode = () => { return <>; diff --git a/fixtures/react-router-docker/app/routes/[another-page]._index.tsx b/fixtures/react-router-docker/app/routes/[another-page]._index.tsx index e9d062f92306..5525a2b19c93 100644 --- a/fixtures/react-router-docker/app/routes/[another-page]._index.tsx +++ b/fixtures/react-router-docker/app/routes/[another-page]._index.tsx @@ -150,7 +150,7 @@ export const links: LinksFunction = () => { result.push({ rel: "icon", href: imageLoader({ - src: `${assetBaseUrl}${favIconAsset.name}`, + src: `${assetBaseUrl}${favIconAsset}`, // width,height must be multiple of 48 https://developers.google.com/search/docs/appearance/favicon-in-search width: 144, height: 144, @@ -165,7 +165,7 @@ export const links: LinksFunction = () => { for (const asset of pageFontAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${asset.name}`, + href: `${assetBaseUrl}${asset}`, as: "font", crossOrigin: "anonymous", }); @@ -174,7 +174,7 @@ export const links: LinksFunction = () => { for (const backgroundImageAsset of pageBackgroundImageAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${backgroundImageAsset.name}`, + href: `${assetBaseUrl}${backgroundImageAsset}`, as: "image", }); } diff --git a/fixtures/react-router-docker/app/routes/_index.tsx b/fixtures/react-router-docker/app/routes/_index.tsx index 5ecd622ce95e..03d6d801da47 100644 --- a/fixtures/react-router-docker/app/routes/_index.tsx +++ b/fixtures/react-router-docker/app/routes/_index.tsx @@ -150,7 +150,7 @@ export const links: LinksFunction = () => { result.push({ rel: "icon", href: imageLoader({ - src: `${assetBaseUrl}${favIconAsset.name}`, + src: `${assetBaseUrl}${favIconAsset}`, // width,height must be multiple of 48 https://developers.google.com/search/docs/appearance/favicon-in-search width: 144, height: 144, @@ -165,7 +165,7 @@ export const links: LinksFunction = () => { for (const asset of pageFontAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${asset.name}`, + href: `${assetBaseUrl}${asset}`, as: "font", crossOrigin: "anonymous", }); @@ -174,7 +174,7 @@ export const links: LinksFunction = () => { for (const backgroundImageAsset of pageBackgroundImageAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${backgroundImageAsset.name}`, + href: `${assetBaseUrl}${backgroundImageAsset}`, as: "image", }); } diff --git a/fixtures/react-router-netlify/app/__generated__/[another-page]._index.tsx b/fixtures/react-router-netlify/app/__generated__/[another-page]._index.tsx index be01fcf76af3..f089b02f4cd5 100644 --- a/fixtures/react-router-netlify/app/__generated__/[another-page]._index.tsx +++ b/fixtures/react-router-netlify/app/__generated__/[another-page]._index.tsx @@ -2,29 +2,19 @@ /* This is a auto generated file for building the project */ import { Fragment, useState } from "react"; -import type { FontAsset, ImageAsset } from "@webstudio-is/sdk"; import { useResource, useVariableState } from "@webstudio-is/react-sdk/runtime"; import { Body as Body } from "@webstudio-is/sdk-components-react-router"; import { Heading as Heading } from "@webstudio-is/sdk-components-react"; export const siteName = ""; -export const favIconAsset: ImageAsset | undefined = { - id: "d0974db9300c1a3b0fb8b291dd9fabd45ad136478908394280af2f7087e3aecd", - name: "147-1478573_cat-icon-png-black-cat-png-icon.png_ZJ6-qJjk1RlFzuYwyCXdp.jpeg", - description: null, - projectId: "d845c167-ea07-4875-b08d-83e97c09dcce", - size: 64701, - type: "image", - format: "jpg", - createdAt: "2024-12-06T14:36:07.046+00:00", - meta: { width: 820, height: 985 }, -}; +export const favIconAsset: string | undefined = + "147-1478573_cat-icon-png-black-cat-png-icon.png_ZJ6-qJjk1RlFzuYwyCXdp.jpeg"; // Font assets on current page (can be preloaded) -export const pageFontAssets: FontAsset[] = []; +export const pageFontAssets: string[] = []; -export const pageBackgroundImageAssets: ImageAsset[] = []; +export const pageBackgroundImageAssets: string[] = []; const Page = (_props: { system: any }) => { return ( diff --git a/fixtures/react-router-netlify/app/__generated__/_index.tsx b/fixtures/react-router-netlify/app/__generated__/_index.tsx index 0dee4dc4bbc6..a4a0a49620a8 100644 --- a/fixtures/react-router-netlify/app/__generated__/_index.tsx +++ b/fixtures/react-router-netlify/app/__generated__/_index.tsx @@ -2,7 +2,6 @@ /* This is a auto generated file for building the project */ import { Fragment, useState } from "react"; -import type { FontAsset, ImageAsset } from "@webstudio-is/sdk"; import { useResource, useVariableState } from "@webstudio-is/react-sdk/runtime"; import { Body as Body, @@ -16,22 +15,13 @@ import { export const siteName = ""; -export const favIconAsset: ImageAsset | undefined = { - id: "d0974db9300c1a3b0fb8b291dd9fabd45ad136478908394280af2f7087e3aecd", - name: "147-1478573_cat-icon-png-black-cat-png-icon.png_ZJ6-qJjk1RlFzuYwyCXdp.jpeg", - description: null, - projectId: "d845c167-ea07-4875-b08d-83e97c09dcce", - size: 64701, - type: "image", - format: "jpg", - createdAt: "2024-12-06T14:36:07.046+00:00", - meta: { width: 820, height: 985 }, -}; +export const favIconAsset: string | undefined = + "147-1478573_cat-icon-png-black-cat-png-icon.png_ZJ6-qJjk1RlFzuYwyCXdp.jpeg"; // Font assets on current page (can be preloaded) -export const pageFontAssets: FontAsset[] = []; +export const pageFontAssets: string[] = []; -export const pageBackgroundImageAssets: ImageAsset[] = []; +export const pageBackgroundImageAssets: string[] = []; export const CustomCode = () => { return <>; diff --git a/fixtures/react-router-netlify/app/routes/[another-page]._index.tsx b/fixtures/react-router-netlify/app/routes/[another-page]._index.tsx index e9d062f92306..5525a2b19c93 100644 --- a/fixtures/react-router-netlify/app/routes/[another-page]._index.tsx +++ b/fixtures/react-router-netlify/app/routes/[another-page]._index.tsx @@ -150,7 +150,7 @@ export const links: LinksFunction = () => { result.push({ rel: "icon", href: imageLoader({ - src: `${assetBaseUrl}${favIconAsset.name}`, + src: `${assetBaseUrl}${favIconAsset}`, // width,height must be multiple of 48 https://developers.google.com/search/docs/appearance/favicon-in-search width: 144, height: 144, @@ -165,7 +165,7 @@ export const links: LinksFunction = () => { for (const asset of pageFontAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${asset.name}`, + href: `${assetBaseUrl}${asset}`, as: "font", crossOrigin: "anonymous", }); @@ -174,7 +174,7 @@ export const links: LinksFunction = () => { for (const backgroundImageAsset of pageBackgroundImageAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${backgroundImageAsset.name}`, + href: `${assetBaseUrl}${backgroundImageAsset}`, as: "image", }); } diff --git a/fixtures/react-router-netlify/app/routes/_index.tsx b/fixtures/react-router-netlify/app/routes/_index.tsx index 5ecd622ce95e..03d6d801da47 100644 --- a/fixtures/react-router-netlify/app/routes/_index.tsx +++ b/fixtures/react-router-netlify/app/routes/_index.tsx @@ -150,7 +150,7 @@ export const links: LinksFunction = () => { result.push({ rel: "icon", href: imageLoader({ - src: `${assetBaseUrl}${favIconAsset.name}`, + src: `${assetBaseUrl}${favIconAsset}`, // width,height must be multiple of 48 https://developers.google.com/search/docs/appearance/favicon-in-search width: 144, height: 144, @@ -165,7 +165,7 @@ export const links: LinksFunction = () => { for (const asset of pageFontAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${asset.name}`, + href: `${assetBaseUrl}${asset}`, as: "font", crossOrigin: "anonymous", }); @@ -174,7 +174,7 @@ export const links: LinksFunction = () => { for (const backgroundImageAsset of pageBackgroundImageAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${backgroundImageAsset.name}`, + href: `${assetBaseUrl}${backgroundImageAsset}`, as: "image", }); } diff --git a/fixtures/react-router-vercel/app/__generated__/[another-page]._index.tsx b/fixtures/react-router-vercel/app/__generated__/[another-page]._index.tsx index be01fcf76af3..f089b02f4cd5 100644 --- a/fixtures/react-router-vercel/app/__generated__/[another-page]._index.tsx +++ b/fixtures/react-router-vercel/app/__generated__/[another-page]._index.tsx @@ -2,29 +2,19 @@ /* This is a auto generated file for building the project */ import { Fragment, useState } from "react"; -import type { FontAsset, ImageAsset } from "@webstudio-is/sdk"; import { useResource, useVariableState } from "@webstudio-is/react-sdk/runtime"; import { Body as Body } from "@webstudio-is/sdk-components-react-router"; import { Heading as Heading } from "@webstudio-is/sdk-components-react"; export const siteName = ""; -export const favIconAsset: ImageAsset | undefined = { - id: "d0974db9300c1a3b0fb8b291dd9fabd45ad136478908394280af2f7087e3aecd", - name: "147-1478573_cat-icon-png-black-cat-png-icon.png_ZJ6-qJjk1RlFzuYwyCXdp.jpeg", - description: null, - projectId: "d845c167-ea07-4875-b08d-83e97c09dcce", - size: 64701, - type: "image", - format: "jpg", - createdAt: "2024-12-06T14:36:07.046+00:00", - meta: { width: 820, height: 985 }, -}; +export const favIconAsset: string | undefined = + "147-1478573_cat-icon-png-black-cat-png-icon.png_ZJ6-qJjk1RlFzuYwyCXdp.jpeg"; // Font assets on current page (can be preloaded) -export const pageFontAssets: FontAsset[] = []; +export const pageFontAssets: string[] = []; -export const pageBackgroundImageAssets: ImageAsset[] = []; +export const pageBackgroundImageAssets: string[] = []; const Page = (_props: { system: any }) => { return ( diff --git a/fixtures/react-router-vercel/app/__generated__/_index.tsx b/fixtures/react-router-vercel/app/__generated__/_index.tsx index 0dee4dc4bbc6..a4a0a49620a8 100644 --- a/fixtures/react-router-vercel/app/__generated__/_index.tsx +++ b/fixtures/react-router-vercel/app/__generated__/_index.tsx @@ -2,7 +2,6 @@ /* This is a auto generated file for building the project */ import { Fragment, useState } from "react"; -import type { FontAsset, ImageAsset } from "@webstudio-is/sdk"; import { useResource, useVariableState } from "@webstudio-is/react-sdk/runtime"; import { Body as Body, @@ -16,22 +15,13 @@ import { export const siteName = ""; -export const favIconAsset: ImageAsset | undefined = { - id: "d0974db9300c1a3b0fb8b291dd9fabd45ad136478908394280af2f7087e3aecd", - name: "147-1478573_cat-icon-png-black-cat-png-icon.png_ZJ6-qJjk1RlFzuYwyCXdp.jpeg", - description: null, - projectId: "d845c167-ea07-4875-b08d-83e97c09dcce", - size: 64701, - type: "image", - format: "jpg", - createdAt: "2024-12-06T14:36:07.046+00:00", - meta: { width: 820, height: 985 }, -}; +export const favIconAsset: string | undefined = + "147-1478573_cat-icon-png-black-cat-png-icon.png_ZJ6-qJjk1RlFzuYwyCXdp.jpeg"; // Font assets on current page (can be preloaded) -export const pageFontAssets: FontAsset[] = []; +export const pageFontAssets: string[] = []; -export const pageBackgroundImageAssets: ImageAsset[] = []; +export const pageBackgroundImageAssets: string[] = []; export const CustomCode = () => { return <>; diff --git a/fixtures/react-router-vercel/app/routes/[another-page]._index.tsx b/fixtures/react-router-vercel/app/routes/[another-page]._index.tsx index e9d062f92306..5525a2b19c93 100644 --- a/fixtures/react-router-vercel/app/routes/[another-page]._index.tsx +++ b/fixtures/react-router-vercel/app/routes/[another-page]._index.tsx @@ -150,7 +150,7 @@ export const links: LinksFunction = () => { result.push({ rel: "icon", href: imageLoader({ - src: `${assetBaseUrl}${favIconAsset.name}`, + src: `${assetBaseUrl}${favIconAsset}`, // width,height must be multiple of 48 https://developers.google.com/search/docs/appearance/favicon-in-search width: 144, height: 144, @@ -165,7 +165,7 @@ export const links: LinksFunction = () => { for (const asset of pageFontAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${asset.name}`, + href: `${assetBaseUrl}${asset}`, as: "font", crossOrigin: "anonymous", }); @@ -174,7 +174,7 @@ export const links: LinksFunction = () => { for (const backgroundImageAsset of pageBackgroundImageAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${backgroundImageAsset.name}`, + href: `${assetBaseUrl}${backgroundImageAsset}`, as: "image", }); } diff --git a/fixtures/react-router-vercel/app/routes/_index.tsx b/fixtures/react-router-vercel/app/routes/_index.tsx index 5ecd622ce95e..03d6d801da47 100644 --- a/fixtures/react-router-vercel/app/routes/_index.tsx +++ b/fixtures/react-router-vercel/app/routes/_index.tsx @@ -150,7 +150,7 @@ export const links: LinksFunction = () => { result.push({ rel: "icon", href: imageLoader({ - src: `${assetBaseUrl}${favIconAsset.name}`, + src: `${assetBaseUrl}${favIconAsset}`, // width,height must be multiple of 48 https://developers.google.com/search/docs/appearance/favicon-in-search width: 144, height: 144, @@ -165,7 +165,7 @@ export const links: LinksFunction = () => { for (const asset of pageFontAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${asset.name}`, + href: `${assetBaseUrl}${asset}`, as: "font", crossOrigin: "anonymous", }); @@ -174,7 +174,7 @@ export const links: LinksFunction = () => { for (const backgroundImageAsset of pageBackgroundImageAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${backgroundImageAsset.name}`, + href: `${assetBaseUrl}${backgroundImageAsset}`, as: "image", }); } diff --git a/fixtures/ssg-netlify-by-project-id/app/__generated__/_index.tsx b/fixtures/ssg-netlify-by-project-id/app/__generated__/_index.tsx index dd9671191290..c0b466c44341 100644 --- a/fixtures/ssg-netlify-by-project-id/app/__generated__/_index.tsx +++ b/fixtures/ssg-netlify-by-project-id/app/__generated__/_index.tsx @@ -2,7 +2,6 @@ /* This is a auto generated file for building the project */ import { Fragment, useState } from "react"; -import type { FontAsset, ImageAsset } from "@webstudio-is/sdk"; import { useResource, useVariableState } from "@webstudio-is/react-sdk/runtime"; import { Body as Body, @@ -11,12 +10,12 @@ import { export const siteName = undefined; -export const favIconAsset: ImageAsset | undefined = undefined; +export const favIconAsset: string | undefined = undefined; // Font assets on current page (can be preloaded) -export const pageFontAssets: FontAsset[] = []; +export const pageFontAssets: string[] = []; -export const pageBackgroundImageAssets: ImageAsset[] = []; +export const pageBackgroundImageAssets: string[] = []; export const CustomCode = () => { return <>; diff --git a/fixtures/ssg-netlify-by-project-id/pages/index/+Head.tsx b/fixtures/ssg-netlify-by-project-id/pages/index/+Head.tsx index 99f78d65edd3..4357741b6b37 100644 --- a/fixtures/ssg-netlify-by-project-id/pages/index/+Head.tsx +++ b/fixtures/ssg-netlify-by-project-id/pages/index/+Head.tsx @@ -60,7 +60,7 @@ export const Head = ({ data }: { data: PageContext["data"] }) => { { )} {pageFontAssets.map((asset) => ( ))} {pageBackgroundImageAssets.map((asset) => ( ))} diff --git a/fixtures/ssg/app/__generated__/[another-page]._index.tsx b/fixtures/ssg/app/__generated__/[another-page]._index.tsx index dfaed7865a22..860f58b817c8 100644 --- a/fixtures/ssg/app/__generated__/[another-page]._index.tsx +++ b/fixtures/ssg/app/__generated__/[another-page]._index.tsx @@ -2,7 +2,6 @@ /* This is a auto generated file for building the project */ import { Fragment, useState } from "react"; -import type { FontAsset, ImageAsset } from "@webstudio-is/sdk"; import { useResource, useVariableState } from "@webstudio-is/react-sdk/runtime"; import { Body as Body, @@ -11,12 +10,12 @@ import { export const siteName = ""; -export const favIconAsset: ImageAsset | undefined = undefined; +export const favIconAsset: string | undefined = undefined; // Font assets on current page (can be preloaded) -export const pageFontAssets: FontAsset[] = []; +export const pageFontAssets: string[] = []; -export const pageBackgroundImageAssets: ImageAsset[] = []; +export const pageBackgroundImageAssets: string[] = []; const Page = (_props: { system: any }) => { return ( diff --git a/fixtures/ssg/app/__generated__/_index.tsx b/fixtures/ssg/app/__generated__/_index.tsx index 0175191fe652..e275514d9788 100644 --- a/fixtures/ssg/app/__generated__/_index.tsx +++ b/fixtures/ssg/app/__generated__/_index.tsx @@ -2,7 +2,6 @@ /* This is a auto generated file for building the project */ import { Fragment, useState } from "react"; -import type { FontAsset, ImageAsset } from "@webstudio-is/sdk"; import { useResource, useVariableState } from "@webstudio-is/react-sdk/runtime"; import { Body as Body, @@ -14,12 +13,12 @@ import { export const siteName = ""; -export const favIconAsset: ImageAsset | undefined = undefined; +export const favIconAsset: string | undefined = undefined; // Font assets on current page (can be preloaded) -export const pageFontAssets: FontAsset[] = []; +export const pageFontAssets: string[] = []; -export const pageBackgroundImageAssets: ImageAsset[] = []; +export const pageBackgroundImageAssets: string[] = []; export const CustomCode = () => { return <>; diff --git a/fixtures/ssg/pages/another-page/+Head.tsx b/fixtures/ssg/pages/another-page/+Head.tsx index cb2e16198550..3f18b4cd0a06 100644 --- a/fixtures/ssg/pages/another-page/+Head.tsx +++ b/fixtures/ssg/pages/another-page/+Head.tsx @@ -60,7 +60,7 @@ export const Head = ({ data }: { data: PageContext["data"] }) => { { )} {pageFontAssets.map((asset) => ( ))} {pageBackgroundImageAssets.map((asset) => ( ))} diff --git a/fixtures/ssg/pages/index/+Head.tsx b/fixtures/ssg/pages/index/+Head.tsx index 99f78d65edd3..4357741b6b37 100644 --- a/fixtures/ssg/pages/index/+Head.tsx +++ b/fixtures/ssg/pages/index/+Head.tsx @@ -60,7 +60,7 @@ export const Head = ({ data }: { data: PageContext["data"] }) => { { )} {pageFontAssets.map((asset) => ( ))} {pageBackgroundImageAssets.map((asset) => ( ))} diff --git a/fixtures/webstudio-cloudflare-template/app/__generated__/[another-page]._index.tsx b/fixtures/webstudio-cloudflare-template/app/__generated__/[another-page]._index.tsx index 4eaf37dd40c6..5951a23e06a5 100644 --- a/fixtures/webstudio-cloudflare-template/app/__generated__/[another-page]._index.tsx +++ b/fixtures/webstudio-cloudflare-template/app/__generated__/[another-page]._index.tsx @@ -2,19 +2,18 @@ /* This is a auto generated file for building the project */ import { Fragment, useState } from "react"; -import type { FontAsset, ImageAsset } from "@webstudio-is/sdk"; import { useResource, useVariableState } from "@webstudio-is/react-sdk/runtime"; import { Body as Body } from "@webstudio-is/sdk-components-react-remix"; import { Heading as Heading } from "@webstudio-is/sdk-components-react"; export const siteName = ""; -export const favIconAsset: ImageAsset | undefined = undefined; +export const favIconAsset: string | undefined = undefined; // Font assets on current page (can be preloaded) -export const pageFontAssets: FontAsset[] = []; +export const pageFontAssets: string[] = []; -export const pageBackgroundImageAssets: ImageAsset[] = []; +export const pageBackgroundImageAssets: string[] = []; const Page = (_props: { system: any }) => { return ( diff --git a/fixtures/webstudio-cloudflare-template/app/__generated__/_index.tsx b/fixtures/webstudio-cloudflare-template/app/__generated__/_index.tsx index 54ff3fb3dbcc..84dac82e939f 100644 --- a/fixtures/webstudio-cloudflare-template/app/__generated__/_index.tsx +++ b/fixtures/webstudio-cloudflare-template/app/__generated__/_index.tsx @@ -2,7 +2,6 @@ /* This is a auto generated file for building the project */ import { Fragment, useState } from "react"; -import type { FontAsset, ImageAsset } from "@webstudio-is/sdk"; import { useResource, useVariableState } from "@webstudio-is/react-sdk/runtime"; import { Body as Body, @@ -16,12 +15,12 @@ import { export const siteName = ""; -export const favIconAsset: ImageAsset | undefined = undefined; +export const favIconAsset: string | undefined = undefined; // Font assets on current page (can be preloaded) -export const pageFontAssets: FontAsset[] = []; +export const pageFontAssets: string[] = []; -export const pageBackgroundImageAssets: ImageAsset[] = []; +export const pageBackgroundImageAssets: string[] = []; export const CustomCode = () => { return <>; diff --git a/fixtures/webstudio-cloudflare-template/app/routes/[another-page]._index.tsx b/fixtures/webstudio-cloudflare-template/app/routes/[another-page]._index.tsx index 63ab5675f96d..aebd63e3d9c8 100644 --- a/fixtures/webstudio-cloudflare-template/app/routes/[another-page]._index.tsx +++ b/fixtures/webstudio-cloudflare-template/app/routes/[another-page]._index.tsx @@ -151,7 +151,7 @@ export const links: LinksFunction = () => { result.push({ rel: "icon", href: imageLoader({ - src: `${assetBaseUrl}${favIconAsset.name}`, + src: `${assetBaseUrl}${favIconAsset}`, // width,height must be multiple of 48 https://developers.google.com/search/docs/appearance/favicon-in-search width: 144, height: 144, @@ -166,7 +166,7 @@ export const links: LinksFunction = () => { for (const asset of pageFontAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${asset.name}`, + href: `${assetBaseUrl}${asset}`, as: "font", crossOrigin: "anonymous", }); @@ -175,7 +175,7 @@ export const links: LinksFunction = () => { for (const backgroundImageAsset of pageBackgroundImageAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${backgroundImageAsset.name}`, + href: `${assetBaseUrl}${backgroundImageAsset}`, as: "image", }); } diff --git a/fixtures/webstudio-cloudflare-template/app/routes/_index.tsx b/fixtures/webstudio-cloudflare-template/app/routes/_index.tsx index 9bc280da9b7a..9924147fb41a 100644 --- a/fixtures/webstudio-cloudflare-template/app/routes/_index.tsx +++ b/fixtures/webstudio-cloudflare-template/app/routes/_index.tsx @@ -151,7 +151,7 @@ export const links: LinksFunction = () => { result.push({ rel: "icon", href: imageLoader({ - src: `${assetBaseUrl}${favIconAsset.name}`, + src: `${assetBaseUrl}${favIconAsset}`, // width,height must be multiple of 48 https://developers.google.com/search/docs/appearance/favicon-in-search width: 144, height: 144, @@ -166,7 +166,7 @@ export const links: LinksFunction = () => { for (const asset of pageFontAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${asset.name}`, + href: `${assetBaseUrl}${asset}`, as: "font", crossOrigin: "anonymous", }); @@ -175,7 +175,7 @@ export const links: LinksFunction = () => { for (const backgroundImageAsset of pageBackgroundImageAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${backgroundImageAsset.name}`, + href: `${assetBaseUrl}${backgroundImageAsset}`, as: "image", }); } diff --git a/fixtures/webstudio-features/app/__generated__/[_route_with_symbols_]._index.tsx b/fixtures/webstudio-features/app/__generated__/[_route_with_symbols_]._index.tsx index c046b8d0b655..2d0e9eae177d 100644 --- a/fixtures/webstudio-features/app/__generated__/[_route_with_symbols_]._index.tsx +++ b/fixtures/webstudio-features/app/__generated__/[_route_with_symbols_]._index.tsx @@ -2,29 +2,19 @@ /* This is a auto generated file for building the project */ import { Fragment, useState } from "react"; -import type { FontAsset, ImageAsset } from "@webstudio-is/sdk"; import { useResource, useVariableState } from "@webstudio-is/react-sdk/runtime"; import { Body as Body } from "@webstudio-is/sdk-components-react-router"; import { Image as Image } from "@webstudio-is/sdk-components-react"; export const siteName = "KittyGuardedZone"; -export const favIconAsset: ImageAsset | undefined = { - id: "88d5e2ff-b8f2-4899-aaf8-dde4ade6da10", - name: "DALL_E_2023-10-30_12.39.46_-_Photo_logo_with_a_bold_cat_silhouette_centered_on_a_contrasting_background_designed_for_clarity_at_small_32x32_favicon_resolution_00h6cEA8u2pJRvVJv7hRe.png", - description: null, - projectId: "cddc1d44-af37-4cb6-a430-d300cf6f932d", - size: 268326, - type: "image", - format: "png", - createdAt: "2023-10-30T13:51:08.416+00:00", - meta: { width: 790, height: 786 }, -}; +export const favIconAsset: string | undefined = + "DALL_E_2023-10-30_12.39.46_-_Photo_logo_with_a_bold_cat_silhouette_centered_on_a_contrasting_background_designed_for_clarity_at_small_32x32_favicon_resolution_00h6cEA8u2pJRvVJv7hRe.png"; // Font assets on current page (can be preloaded) -export const pageFontAssets: FontAsset[] = []; +export const pageFontAssets: string[] = []; -export const pageBackgroundImageAssets: ImageAsset[] = []; +export const pageBackgroundImageAssets: string[] = []; const Page = (_props: { system: any }) => { return ( diff --git a/fixtures/webstudio-features/app/__generated__/[class-names]._index.tsx b/fixtures/webstudio-features/app/__generated__/[class-names]._index.tsx index 70e7f84ca87f..5bb7bd10faa2 100644 --- a/fixtures/webstudio-features/app/__generated__/[class-names]._index.tsx +++ b/fixtures/webstudio-features/app/__generated__/[class-names]._index.tsx @@ -2,29 +2,19 @@ /* This is a auto generated file for building the project */ import { Fragment, useState } from "react"; -import type { FontAsset, ImageAsset } from "@webstudio-is/sdk"; import { useResource, useVariableState } from "@webstudio-is/react-sdk/runtime"; import { Body as Body } from "@webstudio-is/sdk-components-react-router"; import { Box as Box } from "@webstudio-is/sdk-components-react"; export const siteName = "KittyGuardedZone"; -export const favIconAsset: ImageAsset | undefined = { - id: "88d5e2ff-b8f2-4899-aaf8-dde4ade6da10", - name: "DALL_E_2023-10-30_12.39.46_-_Photo_logo_with_a_bold_cat_silhouette_centered_on_a_contrasting_background_designed_for_clarity_at_small_32x32_favicon_resolution_00h6cEA8u2pJRvVJv7hRe.png", - description: null, - projectId: "cddc1d44-af37-4cb6-a430-d300cf6f932d", - size: 268326, - type: "image", - format: "png", - createdAt: "2023-10-30T13:51:08.416+00:00", - meta: { width: 790, height: 786 }, -}; +export const favIconAsset: string | undefined = + "DALL_E_2023-10-30_12.39.46_-_Photo_logo_with_a_bold_cat_silhouette_centered_on_a_contrasting_background_designed_for_clarity_at_small_32x32_favicon_resolution_00h6cEA8u2pJRvVJv7hRe.png"; // Font assets on current page (can be preloaded) -export const pageFontAssets: FontAsset[] = []; +export const pageFontAssets: string[] = []; -export const pageBackgroundImageAssets: ImageAsset[] = []; +export const pageBackgroundImageAssets: string[] = []; const Page = (_props: { system: any }) => { let [classVar, set$classVar] = useVariableState("varClass"); diff --git a/fixtures/webstudio-features/app/__generated__/[content-block]._index.tsx b/fixtures/webstudio-features/app/__generated__/[content-block]._index.tsx index 6bbe13ef889a..eba6a758c3b3 100644 --- a/fixtures/webstudio-features/app/__generated__/[content-block]._index.tsx +++ b/fixtures/webstudio-features/app/__generated__/[content-block]._index.tsx @@ -2,7 +2,6 @@ /* This is a auto generated file for building the project */ import { Fragment, useState } from "react"; -import type { FontAsset, ImageAsset } from "@webstudio-is/sdk"; import { useResource, useVariableState } from "@webstudio-is/react-sdk/runtime"; import { Body as Body } from "@webstudio-is/sdk-components-react-router"; import { @@ -13,22 +12,13 @@ import { export const siteName = "KittyGuardedZone"; -export const favIconAsset: ImageAsset | undefined = { - id: "88d5e2ff-b8f2-4899-aaf8-dde4ade6da10", - name: "DALL_E_2023-10-30_12.39.46_-_Photo_logo_with_a_bold_cat_silhouette_centered_on_a_contrasting_background_designed_for_clarity_at_small_32x32_favicon_resolution_00h6cEA8u2pJRvVJv7hRe.png", - description: null, - projectId: "cddc1d44-af37-4cb6-a430-d300cf6f932d", - size: 268326, - type: "image", - format: "png", - createdAt: "2023-10-30T13:51:08.416+00:00", - meta: { width: 790, height: 786 }, -}; +export const favIconAsset: string | undefined = + "DALL_E_2023-10-30_12.39.46_-_Photo_logo_with_a_bold_cat_silhouette_centered_on_a_contrasting_background_designed_for_clarity_at_small_32x32_favicon_resolution_00h6cEA8u2pJRvVJv7hRe.png"; // Font assets on current page (can be preloaded) -export const pageFontAssets: FontAsset[] = []; +export const pageFontAssets: string[] = []; -export const pageBackgroundImageAssets: ImageAsset[] = []; +export const pageBackgroundImageAssets: string[] = []; const Page = (_props: { system: any }) => { return ( diff --git a/fixtures/webstudio-features/app/__generated__/[expressions]._index.tsx b/fixtures/webstudio-features/app/__generated__/[expressions]._index.tsx index c392f49818c4..a3ba855f71c5 100644 --- a/fixtures/webstudio-features/app/__generated__/[expressions]._index.tsx +++ b/fixtures/webstudio-features/app/__generated__/[expressions]._index.tsx @@ -2,7 +2,6 @@ /* This is a auto generated file for building the project */ import { Fragment, useState } from "react"; -import type { FontAsset, ImageAsset } from "@webstudio-is/sdk"; import { useResource, useVariableState } from "@webstudio-is/react-sdk/runtime"; import { Body as Body } from "@webstudio-is/sdk-components-react-router"; import { @@ -13,22 +12,13 @@ import { export const siteName = "KittyGuardedZone"; -export const favIconAsset: ImageAsset | undefined = { - id: "88d5e2ff-b8f2-4899-aaf8-dde4ade6da10", - name: "DALL_E_2023-10-30_12.39.46_-_Photo_logo_with_a_bold_cat_silhouette_centered_on_a_contrasting_background_designed_for_clarity_at_small_32x32_favicon_resolution_00h6cEA8u2pJRvVJv7hRe.png", - description: null, - projectId: "cddc1d44-af37-4cb6-a430-d300cf6f932d", - size: 268326, - type: "image", - format: "png", - createdAt: "2023-10-30T13:51:08.416+00:00", - meta: { width: 790, height: 786 }, -}; +export const favIconAsset: string | undefined = + "DALL_E_2023-10-30_12.39.46_-_Photo_logo_with_a_bold_cat_silhouette_centered_on_a_contrasting_background_designed_for_clarity_at_small_32x32_favicon_resolution_00h6cEA8u2pJRvVJv7hRe.png"; // Font assets on current page (can be preloaded) -export const pageFontAssets: FontAsset[] = []; +export const pageFontAssets: string[] = []; -export const pageBackgroundImageAssets: ImageAsset[] = []; +export const pageBackgroundImageAssets: string[] = []; const Page = (_props: { system: any }) => { let jsonResourceVariable = useResource("jsonResourceVariable_1"); diff --git a/fixtures/webstudio-features/app/__generated__/[form]._index.tsx b/fixtures/webstudio-features/app/__generated__/[form]._index.tsx index 217d0371941f..12c8d0c3cc17 100644 --- a/fixtures/webstudio-features/app/__generated__/[form]._index.tsx +++ b/fixtures/webstudio-features/app/__generated__/[form]._index.tsx @@ -2,7 +2,6 @@ /* This is a auto generated file for building the project */ import { Fragment, useState } from "react"; -import type { FontAsset, ImageAsset } from "@webstudio-is/sdk"; import { useResource, useVariableState } from "@webstudio-is/react-sdk/runtime"; import { Body as Body, @@ -18,22 +17,13 @@ import { export const siteName = "KittyGuardedZone"; -export const favIconAsset: ImageAsset | undefined = { - id: "88d5e2ff-b8f2-4899-aaf8-dde4ade6da10", - name: "DALL_E_2023-10-30_12.39.46_-_Photo_logo_with_a_bold_cat_silhouette_centered_on_a_contrasting_background_designed_for_clarity_at_small_32x32_favicon_resolution_00h6cEA8u2pJRvVJv7hRe.png", - description: null, - projectId: "cddc1d44-af37-4cb6-a430-d300cf6f932d", - size: 268326, - type: "image", - format: "png", - createdAt: "2023-10-30T13:51:08.416+00:00", - meta: { width: 790, height: 786 }, -}; +export const favIconAsset: string | undefined = + "DALL_E_2023-10-30_12.39.46_-_Photo_logo_with_a_bold_cat_silhouette_centered_on_a_contrasting_background_designed_for_clarity_at_small_32x32_favicon_resolution_00h6cEA8u2pJRvVJv7hRe.png"; // Font assets on current page (can be preloaded) -export const pageFontAssets: FontAsset[] = []; +export const pageFontAssets: string[] = []; -export const pageBackgroundImageAssets: ImageAsset[] = []; +export const pageBackgroundImageAssets: string[] = []; const Page = (_props: { system: any }) => { let [formState, set$formState] = useVariableState("initial"); diff --git a/fixtures/webstudio-features/app/__generated__/[head-tag]._index.tsx b/fixtures/webstudio-features/app/__generated__/[head-tag]._index.tsx index da3b068b14eb..340264fb4b14 100644 --- a/fixtures/webstudio-features/app/__generated__/[head-tag]._index.tsx +++ b/fixtures/webstudio-features/app/__generated__/[head-tag]._index.tsx @@ -2,7 +2,6 @@ /* This is a auto generated file for building the project */ import { Fragment, useState } from "react"; -import type { FontAsset, ImageAsset } from "@webstudio-is/sdk"; import { useResource, useVariableState } from "@webstudio-is/react-sdk/runtime"; import { Body as Body, @@ -18,22 +17,13 @@ import { export const siteName = "KittyGuardedZone"; -export const favIconAsset: ImageAsset | undefined = { - id: "88d5e2ff-b8f2-4899-aaf8-dde4ade6da10", - name: "DALL_E_2023-10-30_12.39.46_-_Photo_logo_with_a_bold_cat_silhouette_centered_on_a_contrasting_background_designed_for_clarity_at_small_32x32_favicon_resolution_00h6cEA8u2pJRvVJv7hRe.png", - description: null, - projectId: "cddc1d44-af37-4cb6-a430-d300cf6f932d", - size: 268326, - type: "image", - format: "png", - createdAt: "2023-10-30T13:51:08.416+00:00", - meta: { width: 790, height: 786 }, -}; +export const favIconAsset: string | undefined = + "DALL_E_2023-10-30_12.39.46_-_Photo_logo_with_a_bold_cat_silhouette_centered_on_a_contrasting_background_designed_for_clarity_at_small_32x32_favicon_resolution_00h6cEA8u2pJRvVJv7hRe.png"; // Font assets on current page (can be preloaded) -export const pageFontAssets: FontAsset[] = []; +export const pageFontAssets: string[] = []; -export const pageBackgroundImageAssets: ImageAsset[] = []; +export const pageBackgroundImageAssets: string[] = []; const Page = (_props: { system: any }) => { return ( diff --git a/fixtures/webstudio-features/app/__generated__/[heading-with-id]._index.tsx b/fixtures/webstudio-features/app/__generated__/[heading-with-id]._index.tsx index 8c9b206ecad0..93cddfc1fe70 100644 --- a/fixtures/webstudio-features/app/__generated__/[heading-with-id]._index.tsx +++ b/fixtures/webstudio-features/app/__generated__/[heading-with-id]._index.tsx @@ -2,29 +2,19 @@ /* This is a auto generated file for building the project */ import { Fragment, useState } from "react"; -import type { FontAsset, ImageAsset } from "@webstudio-is/sdk"; import { useResource, useVariableState } from "@webstudio-is/react-sdk/runtime"; import { Body as Body } from "@webstudio-is/sdk-components-react-router"; import { Heading as Heading } from "@webstudio-is/sdk-components-react"; export const siteName = "KittyGuardedZone"; -export const favIconAsset: ImageAsset | undefined = { - id: "88d5e2ff-b8f2-4899-aaf8-dde4ade6da10", - name: "DALL_E_2023-10-30_12.39.46_-_Photo_logo_with_a_bold_cat_silhouette_centered_on_a_contrasting_background_designed_for_clarity_at_small_32x32_favicon_resolution_00h6cEA8u2pJRvVJv7hRe.png", - description: null, - projectId: "cddc1d44-af37-4cb6-a430-d300cf6f932d", - size: 268326, - type: "image", - format: "png", - createdAt: "2023-10-30T13:51:08.416+00:00", - meta: { width: 790, height: 786 }, -}; +export const favIconAsset: string | undefined = + "DALL_E_2023-10-30_12.39.46_-_Photo_logo_with_a_bold_cat_silhouette_centered_on_a_contrasting_background_designed_for_clarity_at_small_32x32_favicon_resolution_00h6cEA8u2pJRvVJv7hRe.png"; // Font assets on current page (can be preloaded) -export const pageFontAssets: FontAsset[] = []; +export const pageFontAssets: string[] = []; -export const pageBackgroundImageAssets: ImageAsset[] = []; +export const pageBackgroundImageAssets: string[] = []; const Page = (_props: { system: any }) => { return ( diff --git a/fixtures/webstudio-features/app/__generated__/[nested].[nested-page]._index.tsx b/fixtures/webstudio-features/app/__generated__/[nested].[nested-page]._index.tsx index ff94679534ad..f636f4c6d887 100644 --- a/fixtures/webstudio-features/app/__generated__/[nested].[nested-page]._index.tsx +++ b/fixtures/webstudio-features/app/__generated__/[nested].[nested-page]._index.tsx @@ -2,29 +2,19 @@ /* This is a auto generated file for building the project */ import { Fragment, useState } from "react"; -import type { FontAsset, ImageAsset } from "@webstudio-is/sdk"; import { useResource, useVariableState } from "@webstudio-is/react-sdk/runtime"; import { Body as Body } from "@webstudio-is/sdk-components-react-router"; import { Heading as Heading } from "@webstudio-is/sdk-components-react"; export const siteName = "KittyGuardedZone"; -export const favIconAsset: ImageAsset | undefined = { - id: "88d5e2ff-b8f2-4899-aaf8-dde4ade6da10", - name: "DALL_E_2023-10-30_12.39.46_-_Photo_logo_with_a_bold_cat_silhouette_centered_on_a_contrasting_background_designed_for_clarity_at_small_32x32_favicon_resolution_00h6cEA8u2pJRvVJv7hRe.png", - description: null, - projectId: "cddc1d44-af37-4cb6-a430-d300cf6f932d", - size: 268326, - type: "image", - format: "png", - createdAt: "2023-10-30T13:51:08.416+00:00", - meta: { width: 790, height: 786 }, -}; +export const favIconAsset: string | undefined = + "DALL_E_2023-10-30_12.39.46_-_Photo_logo_with_a_bold_cat_silhouette_centered_on_a_contrasting_background_designed_for_clarity_at_small_32x32_favicon_resolution_00h6cEA8u2pJRvVJv7hRe.png"; // Font assets on current page (can be preloaded) -export const pageFontAssets: FontAsset[] = []; +export const pageFontAssets: string[] = []; -export const pageBackgroundImageAssets: ImageAsset[] = []; +export const pageBackgroundImageAssets: string[] = []; const Page = (_props: { system: any }) => { return ( diff --git a/fixtures/webstudio-features/app/__generated__/[radix]._index.tsx b/fixtures/webstudio-features/app/__generated__/[radix]._index.tsx index e6ec472b2d7c..4f37dcd3cffe 100644 --- a/fixtures/webstudio-features/app/__generated__/[radix]._index.tsx +++ b/fixtures/webstudio-features/app/__generated__/[radix]._index.tsx @@ -2,7 +2,6 @@ /* This is a auto generated file for building the project */ import { Fragment, useState } from "react"; -import type { FontAsset, ImageAsset } from "@webstudio-is/sdk"; import { useResource, useVariableState } from "@webstudio-is/react-sdk/runtime"; import { Body as Body } from "@webstudio-is/sdk-components-react-router"; import { @@ -20,22 +19,13 @@ import { export const siteName = "KittyGuardedZone"; -export const favIconAsset: ImageAsset | undefined = { - id: "88d5e2ff-b8f2-4899-aaf8-dde4ade6da10", - name: "DALL_E_2023-10-30_12.39.46_-_Photo_logo_with_a_bold_cat_silhouette_centered_on_a_contrasting_background_designed_for_clarity_at_small_32x32_favicon_resolution_00h6cEA8u2pJRvVJv7hRe.png", - description: null, - projectId: "cddc1d44-af37-4cb6-a430-d300cf6f932d", - size: 268326, - type: "image", - format: "png", - createdAt: "2023-10-30T13:51:08.416+00:00", - meta: { width: 790, height: 786 }, -}; +export const favIconAsset: string | undefined = + "DALL_E_2023-10-30_12.39.46_-_Photo_logo_with_a_bold_cat_silhouette_centered_on_a_contrasting_background_designed_for_clarity_at_small_32x32_favicon_resolution_00h6cEA8u2pJRvVJv7hRe.png"; // Font assets on current page (can be preloaded) -export const pageFontAssets: FontAsset[] = []; +export const pageFontAssets: string[] = []; -export const pageBackgroundImageAssets: ImageAsset[] = []; +export const pageBackgroundImageAssets: string[] = []; const Page = (_props: { system: any }) => { let [accordionValue, set$accordionValue] = useVariableState("0"); diff --git a/fixtures/webstudio-features/app/__generated__/[resources]._index.tsx b/fixtures/webstudio-features/app/__generated__/[resources]._index.tsx index 8b5600c938e0..4713f03c76c3 100644 --- a/fixtures/webstudio-features/app/__generated__/[resources]._index.tsx +++ b/fixtures/webstudio-features/app/__generated__/[resources]._index.tsx @@ -2,7 +2,6 @@ /* This is a auto generated file for building the project */ import { Fragment, useState } from "react"; -import type { FontAsset, ImageAsset } from "@webstudio-is/sdk"; import { useResource, useVariableState } from "@webstudio-is/react-sdk/runtime"; import { Body as Body } from "@webstudio-is/sdk-components-react-router"; import { @@ -12,22 +11,13 @@ import { export const siteName = "KittyGuardedZone"; -export const favIconAsset: ImageAsset | undefined = { - id: "88d5e2ff-b8f2-4899-aaf8-dde4ade6da10", - name: "DALL_E_2023-10-30_12.39.46_-_Photo_logo_with_a_bold_cat_silhouette_centered_on_a_contrasting_background_designed_for_clarity_at_small_32x32_favicon_resolution_00h6cEA8u2pJRvVJv7hRe.png", - description: null, - projectId: "cddc1d44-af37-4cb6-a430-d300cf6f932d", - size: 268326, - type: "image", - format: "png", - createdAt: "2023-10-30T13:51:08.416+00:00", - meta: { width: 790, height: 786 }, -}; +export const favIconAsset: string | undefined = + "DALL_E_2023-10-30_12.39.46_-_Photo_logo_with_a_bold_cat_silhouette_centered_on_a_contrasting_background_designed_for_clarity_at_small_32x32_favicon_resolution_00h6cEA8u2pJRvVJv7hRe.png"; // Font assets on current page (can be preloaded) -export const pageFontAssets: FontAsset[] = []; +export const pageFontAssets: string[] = []; -export const pageBackgroundImageAssets: ImageAsset[] = []; +export const pageBackgroundImageAssets: string[] = []; const Page = (_props: { system: any }) => { let list = useResource("list_1"); diff --git a/fixtures/webstudio-features/app/__generated__/[sitemap.xml]._index.tsx b/fixtures/webstudio-features/app/__generated__/[sitemap.xml]._index.tsx index bf4b5c88d034..e7d6aba737d1 100644 --- a/fixtures/webstudio-features/app/__generated__/[sitemap.xml]._index.tsx +++ b/fixtures/webstudio-features/app/__generated__/[sitemap.xml]._index.tsx @@ -2,7 +2,6 @@ /* This is a auto generated file for building the project */ import { Fragment, useState } from "react"; -import type { FontAsset, ImageAsset } from "@webstudio-is/sdk"; import { useResource, useVariableState } from "@webstudio-is/react-sdk/runtime"; import { XmlNode as XmlNode, @@ -11,22 +10,13 @@ import { export const siteName = "KittyGuardedZone"; -export const favIconAsset: ImageAsset | undefined = { - id: "88d5e2ff-b8f2-4899-aaf8-dde4ade6da10", - name: "DALL_E_2023-10-30_12.39.46_-_Photo_logo_with_a_bold_cat_silhouette_centered_on_a_contrasting_background_designed_for_clarity_at_small_32x32_favicon_resolution_00h6cEA8u2pJRvVJv7hRe.png", - description: null, - projectId: "cddc1d44-af37-4cb6-a430-d300cf6f932d", - size: 268326, - type: "image", - format: "png", - createdAt: "2023-10-30T13:51:08.416+00:00", - meta: { width: 790, height: 786 }, -}; +export const favIconAsset: string | undefined = + "DALL_E_2023-10-30_12.39.46_-_Photo_logo_with_a_bold_cat_silhouette_centered_on_a_contrasting_background_designed_for_clarity_at_small_32x32_favicon_resolution_00h6cEA8u2pJRvVJv7hRe.png"; // Font assets on current page (can be preloaded) -export const pageFontAssets: FontAsset[] = []; +export const pageFontAssets: string[] = []; -export const pageBackgroundImageAssets: ImageAsset[] = []; +export const pageBackgroundImageAssets: string[] = []; const Page = (_props: { system: any }) => { const system = _props.system; diff --git a/fixtures/webstudio-features/app/__generated__/_index.tsx b/fixtures/webstudio-features/app/__generated__/_index.tsx index ce2e08d7ab32..e49be5e632a6 100644 --- a/fixtures/webstudio-features/app/__generated__/_index.tsx +++ b/fixtures/webstudio-features/app/__generated__/_index.tsx @@ -2,7 +2,6 @@ /* This is a auto generated file for building the project */ import { Fragment, useState } from "react"; -import type { FontAsset, ImageAsset } from "@webstudio-is/sdk"; import { useResource, useVariableState } from "@webstudio-is/react-sdk/runtime"; import { Body as Body, @@ -18,22 +17,13 @@ import { export const siteName = "KittyGuardedZone"; -export const favIconAsset: ImageAsset | undefined = { - id: "88d5e2ff-b8f2-4899-aaf8-dde4ade6da10", - name: "DALL_E_2023-10-30_12.39.46_-_Photo_logo_with_a_bold_cat_silhouette_centered_on_a_contrasting_background_designed_for_clarity_at_small_32x32_favicon_resolution_00h6cEA8u2pJRvVJv7hRe.png", - description: null, - projectId: "cddc1d44-af37-4cb6-a430-d300cf6f932d", - size: 268326, - type: "image", - format: "png", - createdAt: "2023-10-30T13:51:08.416+00:00", - meta: { width: 790, height: 786 }, -}; +export const favIconAsset: string | undefined = + "DALL_E_2023-10-30_12.39.46_-_Photo_logo_with_a_bold_cat_silhouette_centered_on_a_contrasting_background_designed_for_clarity_at_small_32x32_favicon_resolution_00h6cEA8u2pJRvVJv7hRe.png"; // Font assets on current page (can be preloaded) -export const pageFontAssets: FontAsset[] = []; +export const pageFontAssets: string[] = []; -export const pageBackgroundImageAssets: ImageAsset[] = []; +export const pageBackgroundImageAssets: string[] = []; const Script = ({ children, ...props }: Record) => { if (children == null) { diff --git a/fixtures/webstudio-features/app/routes/[_route_with_symbols_]._index.tsx b/fixtures/webstudio-features/app/routes/[_route_with_symbols_]._index.tsx index c8f4a46b6340..92e76fe48174 100644 --- a/fixtures/webstudio-features/app/routes/[_route_with_symbols_]._index.tsx +++ b/fixtures/webstudio-features/app/routes/[_route_with_symbols_]._index.tsx @@ -150,7 +150,7 @@ export const links: LinksFunction = () => { result.push({ rel: "icon", href: imageLoader({ - src: `${assetBaseUrl}${favIconAsset.name}`, + src: `${assetBaseUrl}${favIconAsset}`, // width,height must be multiple of 48 https://developers.google.com/search/docs/appearance/favicon-in-search width: 144, height: 144, @@ -165,7 +165,7 @@ export const links: LinksFunction = () => { for (const asset of pageFontAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${asset.name}`, + href: `${assetBaseUrl}${asset}`, as: "font", crossOrigin: "anonymous", }); @@ -174,7 +174,7 @@ export const links: LinksFunction = () => { for (const backgroundImageAsset of pageBackgroundImageAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${backgroundImageAsset.name}`, + href: `${assetBaseUrl}${backgroundImageAsset}`, as: "image", }); } diff --git a/fixtures/webstudio-features/app/routes/[class-names]._index.tsx b/fixtures/webstudio-features/app/routes/[class-names]._index.tsx index a63384caf796..e7507b87584a 100644 --- a/fixtures/webstudio-features/app/routes/[class-names]._index.tsx +++ b/fixtures/webstudio-features/app/routes/[class-names]._index.tsx @@ -150,7 +150,7 @@ export const links: LinksFunction = () => { result.push({ rel: "icon", href: imageLoader({ - src: `${assetBaseUrl}${favIconAsset.name}`, + src: `${assetBaseUrl}${favIconAsset}`, // width,height must be multiple of 48 https://developers.google.com/search/docs/appearance/favicon-in-search width: 144, height: 144, @@ -165,7 +165,7 @@ export const links: LinksFunction = () => { for (const asset of pageFontAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${asset.name}`, + href: `${assetBaseUrl}${asset}`, as: "font", crossOrigin: "anonymous", }); @@ -174,7 +174,7 @@ export const links: LinksFunction = () => { for (const backgroundImageAsset of pageBackgroundImageAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${backgroundImageAsset.name}`, + href: `${assetBaseUrl}${backgroundImageAsset}`, as: "image", }); } diff --git a/fixtures/webstudio-features/app/routes/[content-block]._index.tsx b/fixtures/webstudio-features/app/routes/[content-block]._index.tsx index b4733304c6f2..59e1f4fdf78c 100644 --- a/fixtures/webstudio-features/app/routes/[content-block]._index.tsx +++ b/fixtures/webstudio-features/app/routes/[content-block]._index.tsx @@ -150,7 +150,7 @@ export const links: LinksFunction = () => { result.push({ rel: "icon", href: imageLoader({ - src: `${assetBaseUrl}${favIconAsset.name}`, + src: `${assetBaseUrl}${favIconAsset}`, // width,height must be multiple of 48 https://developers.google.com/search/docs/appearance/favicon-in-search width: 144, height: 144, @@ -165,7 +165,7 @@ export const links: LinksFunction = () => { for (const asset of pageFontAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${asset.name}`, + href: `${assetBaseUrl}${asset}`, as: "font", crossOrigin: "anonymous", }); @@ -174,7 +174,7 @@ export const links: LinksFunction = () => { for (const backgroundImageAsset of pageBackgroundImageAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${backgroundImageAsset.name}`, + href: `${assetBaseUrl}${backgroundImageAsset}`, as: "image", }); } diff --git a/fixtures/webstudio-features/app/routes/[expressions]._index.tsx b/fixtures/webstudio-features/app/routes/[expressions]._index.tsx index d74fa5b1c339..ae5fd429f61f 100644 --- a/fixtures/webstudio-features/app/routes/[expressions]._index.tsx +++ b/fixtures/webstudio-features/app/routes/[expressions]._index.tsx @@ -150,7 +150,7 @@ export const links: LinksFunction = () => { result.push({ rel: "icon", href: imageLoader({ - src: `${assetBaseUrl}${favIconAsset.name}`, + src: `${assetBaseUrl}${favIconAsset}`, // width,height must be multiple of 48 https://developers.google.com/search/docs/appearance/favicon-in-search width: 144, height: 144, @@ -165,7 +165,7 @@ export const links: LinksFunction = () => { for (const asset of pageFontAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${asset.name}`, + href: `${assetBaseUrl}${asset}`, as: "font", crossOrigin: "anonymous", }); @@ -174,7 +174,7 @@ export const links: LinksFunction = () => { for (const backgroundImageAsset of pageBackgroundImageAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${backgroundImageAsset.name}`, + href: `${assetBaseUrl}${backgroundImageAsset}`, as: "image", }); } diff --git a/fixtures/webstudio-features/app/routes/[form]._index.tsx b/fixtures/webstudio-features/app/routes/[form]._index.tsx index 16fab5e22a8b..8d5d1b476683 100644 --- a/fixtures/webstudio-features/app/routes/[form]._index.tsx +++ b/fixtures/webstudio-features/app/routes/[form]._index.tsx @@ -150,7 +150,7 @@ export const links: LinksFunction = () => { result.push({ rel: "icon", href: imageLoader({ - src: `${assetBaseUrl}${favIconAsset.name}`, + src: `${assetBaseUrl}${favIconAsset}`, // width,height must be multiple of 48 https://developers.google.com/search/docs/appearance/favicon-in-search width: 144, height: 144, @@ -165,7 +165,7 @@ export const links: LinksFunction = () => { for (const asset of pageFontAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${asset.name}`, + href: `${assetBaseUrl}${asset}`, as: "font", crossOrigin: "anonymous", }); @@ -174,7 +174,7 @@ export const links: LinksFunction = () => { for (const backgroundImageAsset of pageBackgroundImageAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${backgroundImageAsset.name}`, + href: `${assetBaseUrl}${backgroundImageAsset}`, as: "image", }); } diff --git a/fixtures/webstudio-features/app/routes/[head-tag]._index.tsx b/fixtures/webstudio-features/app/routes/[head-tag]._index.tsx index 8192767960e7..549111e7bc9c 100644 --- a/fixtures/webstudio-features/app/routes/[head-tag]._index.tsx +++ b/fixtures/webstudio-features/app/routes/[head-tag]._index.tsx @@ -150,7 +150,7 @@ export const links: LinksFunction = () => { result.push({ rel: "icon", href: imageLoader({ - src: `${assetBaseUrl}${favIconAsset.name}`, + src: `${assetBaseUrl}${favIconAsset}`, // width,height must be multiple of 48 https://developers.google.com/search/docs/appearance/favicon-in-search width: 144, height: 144, @@ -165,7 +165,7 @@ export const links: LinksFunction = () => { for (const asset of pageFontAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${asset.name}`, + href: `${assetBaseUrl}${asset}`, as: "font", crossOrigin: "anonymous", }); @@ -174,7 +174,7 @@ export const links: LinksFunction = () => { for (const backgroundImageAsset of pageBackgroundImageAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${backgroundImageAsset.name}`, + href: `${assetBaseUrl}${backgroundImageAsset}`, as: "image", }); } diff --git a/fixtures/webstudio-features/app/routes/[heading-with-id]._index.tsx b/fixtures/webstudio-features/app/routes/[heading-with-id]._index.tsx index 3b9d7a1bd913..5b3213fab3a2 100644 --- a/fixtures/webstudio-features/app/routes/[heading-with-id]._index.tsx +++ b/fixtures/webstudio-features/app/routes/[heading-with-id]._index.tsx @@ -150,7 +150,7 @@ export const links: LinksFunction = () => { result.push({ rel: "icon", href: imageLoader({ - src: `${assetBaseUrl}${favIconAsset.name}`, + src: `${assetBaseUrl}${favIconAsset}`, // width,height must be multiple of 48 https://developers.google.com/search/docs/appearance/favicon-in-search width: 144, height: 144, @@ -165,7 +165,7 @@ export const links: LinksFunction = () => { for (const asset of pageFontAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${asset.name}`, + href: `${assetBaseUrl}${asset}`, as: "font", crossOrigin: "anonymous", }); @@ -174,7 +174,7 @@ export const links: LinksFunction = () => { for (const backgroundImageAsset of pageBackgroundImageAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${backgroundImageAsset.name}`, + href: `${assetBaseUrl}${backgroundImageAsset}`, as: "image", }); } diff --git a/fixtures/webstudio-features/app/routes/[nested].[nested-page]._index.tsx b/fixtures/webstudio-features/app/routes/[nested].[nested-page]._index.tsx index aab71db81206..45b1b01cd10f 100644 --- a/fixtures/webstudio-features/app/routes/[nested].[nested-page]._index.tsx +++ b/fixtures/webstudio-features/app/routes/[nested].[nested-page]._index.tsx @@ -150,7 +150,7 @@ export const links: LinksFunction = () => { result.push({ rel: "icon", href: imageLoader({ - src: `${assetBaseUrl}${favIconAsset.name}`, + src: `${assetBaseUrl}${favIconAsset}`, // width,height must be multiple of 48 https://developers.google.com/search/docs/appearance/favicon-in-search width: 144, height: 144, @@ -165,7 +165,7 @@ export const links: LinksFunction = () => { for (const asset of pageFontAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${asset.name}`, + href: `${assetBaseUrl}${asset}`, as: "font", crossOrigin: "anonymous", }); @@ -174,7 +174,7 @@ export const links: LinksFunction = () => { for (const backgroundImageAsset of pageBackgroundImageAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${backgroundImageAsset.name}`, + href: `${assetBaseUrl}${backgroundImageAsset}`, as: "image", }); } diff --git a/fixtures/webstudio-features/app/routes/[radix]._index.tsx b/fixtures/webstudio-features/app/routes/[radix]._index.tsx index e238fff71afb..34c258382771 100644 --- a/fixtures/webstudio-features/app/routes/[radix]._index.tsx +++ b/fixtures/webstudio-features/app/routes/[radix]._index.tsx @@ -150,7 +150,7 @@ export const links: LinksFunction = () => { result.push({ rel: "icon", href: imageLoader({ - src: `${assetBaseUrl}${favIconAsset.name}`, + src: `${assetBaseUrl}${favIconAsset}`, // width,height must be multiple of 48 https://developers.google.com/search/docs/appearance/favicon-in-search width: 144, height: 144, @@ -165,7 +165,7 @@ export const links: LinksFunction = () => { for (const asset of pageFontAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${asset.name}`, + href: `${assetBaseUrl}${asset}`, as: "font", crossOrigin: "anonymous", }); @@ -174,7 +174,7 @@ export const links: LinksFunction = () => { for (const backgroundImageAsset of pageBackgroundImageAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${backgroundImageAsset.name}`, + href: `${assetBaseUrl}${backgroundImageAsset}`, as: "image", }); } diff --git a/fixtures/webstudio-features/app/routes/[resources]._index.tsx b/fixtures/webstudio-features/app/routes/[resources]._index.tsx index 450b879f7b81..0fbb97f533fa 100644 --- a/fixtures/webstudio-features/app/routes/[resources]._index.tsx +++ b/fixtures/webstudio-features/app/routes/[resources]._index.tsx @@ -150,7 +150,7 @@ export const links: LinksFunction = () => { result.push({ rel: "icon", href: imageLoader({ - src: `${assetBaseUrl}${favIconAsset.name}`, + src: `${assetBaseUrl}${favIconAsset}`, // width,height must be multiple of 48 https://developers.google.com/search/docs/appearance/favicon-in-search width: 144, height: 144, @@ -165,7 +165,7 @@ export const links: LinksFunction = () => { for (const asset of pageFontAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${asset.name}`, + href: `${assetBaseUrl}${asset}`, as: "font", crossOrigin: "anonymous", }); @@ -174,7 +174,7 @@ export const links: LinksFunction = () => { for (const backgroundImageAsset of pageBackgroundImageAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${backgroundImageAsset.name}`, + href: `${assetBaseUrl}${backgroundImageAsset}`, as: "image", }); } diff --git a/fixtures/webstudio-features/app/routes/_index.tsx b/fixtures/webstudio-features/app/routes/_index.tsx index 5ecd622ce95e..03d6d801da47 100644 --- a/fixtures/webstudio-features/app/routes/_index.tsx +++ b/fixtures/webstudio-features/app/routes/_index.tsx @@ -150,7 +150,7 @@ export const links: LinksFunction = () => { result.push({ rel: "icon", href: imageLoader({ - src: `${assetBaseUrl}${favIconAsset.name}`, + src: `${assetBaseUrl}${favIconAsset}`, // width,height must be multiple of 48 https://developers.google.com/search/docs/appearance/favicon-in-search width: 144, height: 144, @@ -165,7 +165,7 @@ export const links: LinksFunction = () => { for (const asset of pageFontAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${asset.name}`, + href: `${assetBaseUrl}${asset}`, as: "font", crossOrigin: "anonymous", }); @@ -174,7 +174,7 @@ export const links: LinksFunction = () => { for (const backgroundImageAsset of pageBackgroundImageAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${backgroundImageAsset.name}`, + href: `${assetBaseUrl}${backgroundImageAsset}`, as: "image", }); } diff --git a/packages/cli/src/prebuild.ts b/packages/cli/src/prebuild.ts index d12b65dc79d8..df4679e1b999 100644 --- a/packages/cli/src/prebuild.ts +++ b/packages/cli/src/prebuild.ts @@ -29,8 +29,6 @@ import type { DataSource, Deployment, Asset, - FontAsset, - ImageAsset, Resource, WsComponentMeta, } from "@webstudio-is/sdk"; @@ -300,8 +298,8 @@ export const prebuild = async (options: { Object.entries(coreMetas) ); const siteDataByPage: SiteDataByPage = {}; - const fontAssetsByPage: Record = {}; - const backgroundImageAssetsByPage: Record = {}; + const fontAssetsByPage: Record = {}; + const backgroundImageAssetsByPage: Record = {}; for (const page of Object.values(siteData.pages)) { const instanceMap = new Map(siteData.build.instances); @@ -396,8 +394,9 @@ export const prebuild = async (options: { ); const pageFontAssets = siteData.assets - .filter((asset): asset is FontAsset => asset.type === "font") - .filter((fontAsset) => pageFontFamilySet.has(fontAsset.meta.family)); + .filter((asset) => asset.type === "font") + .filter((fontAsset) => pageFontFamilySet.has(fontAsset.meta.family)) + .map((asset) => asset.name); fontAssetsByPage[page.id] = pageFontAssets; @@ -422,8 +421,9 @@ export const prebuild = async (options: { ); const backgroundImageAssets = siteData.assets - .filter((asset): asset is ImageAsset => asset.type === "image") - .filter((imageAsset) => backgroundImageAssetIdSet.has(imageAsset.id)); + .filter((asset) => asset.type === "image") + .filter((imageAsset) => backgroundImageAssetIdSet.has(imageAsset.id)) + .map((asset) => asset.name); backgroundImageAssetsByPage[page.id] = backgroundImageAssets; } @@ -588,7 +588,7 @@ export const prebuild = async (options: { const contactEmail: undefined | string = // fallback to user email when contact email is empty string projectMeta?.contactEmail || siteData.user?.email || undefined; - const favIconAsset = assets.get(projectMeta?.faviconAssetId ?? ""); + const favIconAsset = assets.get(projectMeta?.faviconAssetId ?? "")?.name; const pagePath = getPagePath(page.id, siteData.build.pages); @@ -597,20 +597,19 @@ export const prebuild = async (options: { /* This is a auto generated file for building the project */ \n import { Fragment, useState } from "react"; - import type { FontAsset, ImageAsset } from "@webstudio-is/sdk"; import { useResource, useVariableState } from "@webstudio-is/react-sdk/runtime"; ${componentImports} export const siteName = ${JSON.stringify(projectMeta?.siteName)}; - export const favIconAsset: ImageAsset | undefined = + export const favIconAsset: string | undefined = ${JSON.stringify(favIconAsset)}; // Font assets on current page (can be preloaded) - export const pageFontAssets: FontAsset[] = + export const pageFontAssets: string[] = ${JSON.stringify(pageFontAssets)} - export const pageBackgroundImageAssets: ImageAsset[] = + export const pageBackgroundImageAssets: string[] = ${JSON.stringify(pageBackgroundImageAssets)} ${ diff --git a/packages/cli/templates/defaults/app/route-templates/html.tsx b/packages/cli/templates/defaults/app/route-templates/html.tsx index e79b74a6d9ff..f7e85bb18b7f 100644 --- a/packages/cli/templates/defaults/app/route-templates/html.tsx +++ b/packages/cli/templates/defaults/app/route-templates/html.tsx @@ -151,7 +151,7 @@ export const links: LinksFunction = () => { result.push({ rel: "icon", href: imageLoader({ - src: `${assetBaseUrl}${favIconAsset.name}`, + src: `${assetBaseUrl}${favIconAsset}`, // width,height must be multiple of 48 https://developers.google.com/search/docs/appearance/favicon-in-search width: 144, height: 144, @@ -166,7 +166,7 @@ export const links: LinksFunction = () => { for (const asset of pageFontAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${asset.name}`, + href: `${assetBaseUrl}${asset}`, as: "font", crossOrigin: "anonymous", }); @@ -175,7 +175,7 @@ export const links: LinksFunction = () => { for (const backgroundImageAsset of pageBackgroundImageAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${backgroundImageAsset.name}`, + href: `${assetBaseUrl}${backgroundImageAsset}`, as: "image", }); } diff --git a/packages/cli/templates/react-router/app/route-templates/html.tsx b/packages/cli/templates/react-router/app/route-templates/html.tsx index db13bf4a630a..73b2cc3b11ef 100644 --- a/packages/cli/templates/react-router/app/route-templates/html.tsx +++ b/packages/cli/templates/react-router/app/route-templates/html.tsx @@ -150,7 +150,7 @@ export const links: LinksFunction = () => { result.push({ rel: "icon", href: imageLoader({ - src: `${assetBaseUrl}${favIconAsset.name}`, + src: `${assetBaseUrl}${favIconAsset}`, // width,height must be multiple of 48 https://developers.google.com/search/docs/appearance/favicon-in-search width: 144, height: 144, @@ -165,7 +165,7 @@ export const links: LinksFunction = () => { for (const asset of pageFontAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${asset.name}`, + href: `${assetBaseUrl}${asset}`, as: "font", crossOrigin: "anonymous", }); @@ -174,7 +174,7 @@ export const links: LinksFunction = () => { for (const backgroundImageAsset of pageBackgroundImageAssets) { result.push({ rel: "preload", - href: `${assetBaseUrl}${backgroundImageAsset.name}`, + href: `${assetBaseUrl}${backgroundImageAsset}`, as: "image", }); } diff --git a/packages/cli/templates/ssg/app/route-templates/html/+Head.tsx b/packages/cli/templates/ssg/app/route-templates/html/+Head.tsx index 1b0f4f18774b..14b16173ec48 100644 --- a/packages/cli/templates/ssg/app/route-templates/html/+Head.tsx +++ b/packages/cli/templates/ssg/app/route-templates/html/+Head.tsx @@ -60,7 +60,7 @@ export const Head = ({ data }: { data: PageContext["data"] }) => { { )} {pageFontAssets.map((asset) => ( ))} {pageBackgroundImageAssets.map((asset) => ( ))} diff --git a/packages/react-sdk/placeholder.d.ts b/packages/react-sdk/placeholder.d.ts index 90359ef0d26d..3bd6ab01102a 100644 --- a/packages/react-sdk/placeholder.d.ts +++ b/packages/react-sdk/placeholder.d.ts @@ -5,21 +5,16 @@ declare module "__CONSTANTS__" { } declare module "__CLIENT__" { - import type { - FontAsset, - ImageAsset, - ResourceRequest, - System, - } from "@webstudio-is/sdk"; + import type { ResourceRequest, System } from "@webstudio-is/sdk"; export const siteName: string; - export const favIconAsset: ImageAsset | undefined; + export const favIconAsset: string | undefined; // Font assets on current page (can be preloaded) - export const pageFontAssets: FontAsset[]; + export const pageFontAssets: string[]; - export const pageBackgroundImageAssets: ImageAsset[]; + export const pageBackgroundImageAssets: string[]; export const CustomCode: () => ReactNode;