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.
TypeScript accessibilityalternativecloudflarecloudflare-workersdesignfreefrontendopen-sourceradix-uireactremixweb-developmentwebflowwebsite-builderwebsite-developmentwebsiteswebstudio
refactor: generalize features fixture (#4820)
Bogdan Chadkine8de913a28dc
diff --git a/.github/workflows/fixtures-test.yml b/.github/workflows/fixtures-test.ymlindex e627224a96..10ddf497b6 100644--- a/.github/workflows/fixtures-test.yml+++ b/.github/workflows/fixtures-test.yml@@ -51,7 +51,7 @@ jobs:# Testing fixtures for vercel template- name: Test cli --help flag- working-directory: ./fixtures/webstudio-remix-vercel+ working-directory: ./fixtures/webstudio-featuresrun: pnpm cli --help- name: Testing cli link commanddiff --git a/.github/workflows/main.yml b/.github/workflows/main.ymlindex 10386ad160..b7cca1dc6c 100644--- a/.github/workflows/main.yml+++ b/.github/workflows/main.yml@@ -135,7 +135,7 @@ jobs:const results = [await assertSize('./fixtures/ssg/dist/client', 352),await assertSize('./fixtures/webstudio-remix-netlify-functions/build/client', 440),- await assertSize('./fixtures/webstudio-remix-vercel/build/client', 926),+ await assertSize('./fixtures/webstudio-features/build/client', 926),]for (const result of results) {if (result.passed) {diff --git a/fixtures/webstudio-features/.gitignore b/fixtures/webstudio-features/.gitignorenew file mode 100644index 0000000000..9b7c041f96--- /dev/null+++ b/fixtures/webstudio-features/.gitignore@@ -0,0 +1,6 @@+.DS_Store+/node_modules/++# React Router+/.react-router/+/build/diff --git a/fixtures/webstudio-remix-vercel/.npmrc b/fixtures/webstudio-features/.npmrcsimilarity index 100%rename from fixtures/webstudio-remix-vercel/.npmrcrename to fixtures/webstudio-features/.npmrcdiff --git a/fixtures/webstudio-features/.template/.npmrc b/fixtures/webstudio-features/.template/.npmrcnew file mode 100644index 0000000000..43ce02f127--- /dev/null+++ b/fixtures/webstudio-features/.template/.npmrc@@ -0,0 +1,3 @@+force=true+# to support using NODE_OPTIONS for windows tests+shell-emulator=truediff --git a/fixtures/webstudio-features/.template/app/constants.mjs b/fixtures/webstudio-features/.template/app/constants.mjsnew file mode 100644index 0000000000..8eea5a78ce--- /dev/null+++ b/fixtures/webstudio-features/.template/app/constants.mjs@@ -0,0 +1,12 @@+/**+ * We use mjs extension as constants in this file is shared with the build script+ * and we use `node --eval` to extract the constants.+ */+export const assetBaseUrl = "/assets/";++/**+ * @type {import("@webstudio-is/image").ImageLoader}+ */+export const imageLoader = ({ src }) => {+ return src;+};diff --git a/fixtures/webstudio-features/.template/package.json b/fixtures/webstudio-features/.template/package.jsonnew file mode 100644index 0000000000..b21dce86c9--- /dev/null+++ b/fixtures/webstudio-features/.template/package.json@@ -0,0 +1,12 @@+{+ "dependencies": {+ "@webstudio-is/image": "workspace:*",+ "@webstudio-is/react-sdk": "workspace:*",+ "@webstudio-is/sdk": "workspace:*",+ "@webstudio-is/sdk-components-animation": "workspace:*",+ "@webstudio-is/sdk-components-react": "workspace:*",+ "@webstudio-is/sdk-components-react-radix": "workspace:*",+ "@webstudio-is/sdk-components-react-router": "workspace:*",+ "webstudio": "workspace:*"+ }+}diff --git a/fixtures/webstudio-features/.template/tsconfig.json b/fixtures/webstudio-features/.template/tsconfig.jsonnew file mode 100644index 0000000000..75cac78946--- /dev/null+++ b/fixtures/webstudio-features/.template/tsconfig.json@@ -0,0 +1,5 @@+{+ "compilerOptions": {+ "customConditions": ["webstudio"]+ }+}diff --git a/fixtures/webstudio-features/.template/vite.config.ts b/fixtures/webstudio-features/.template/vite.config.tsnew file mode 100644index 0000000000..af40508cdc--- /dev/null+++ b/fixtures/webstudio-features/.template/vite.config.ts@@ -0,0 +1,9 @@+import { defineConfig } from "vite";+// @ts-ignore+import { reactRouter } from "@react-router/dev/vite";+// @ts-ignore+import { dedupeMeta } from "./proxy-emulator/dedupe-meta";++export default defineConfig({+ plugins: [reactRouter(), dedupeMeta],+});diff --git a/fixtures/webstudio-remix-vercel/.webstudio/config.json b/fixtures/webstudio-features/.webstudio/config.jsonsimilarity index 100%rename from fixtures/webstudio-remix-vercel/.webstudio/config.jsonrename to fixtures/webstudio-features/.webstudio/config.jsondiff --git a/fixtures/webstudio-remix-vercel/.webstudio/data.json b/fixtures/webstudio-features/.webstudio/data.jsonsimilarity index 100%rename from fixtures/webstudio-remix-vercel/.webstudio/data.jsonrename to fixtures/webstudio-features/.webstudio/data.jsondiff --git a/fixtures/webstudio-remix-vercel/README.md b/fixtures/webstudio-features/README.mdsimilarity index 100%rename from fixtures/webstudio-remix-vercel/README.mdrename to fixtures/webstudio-features/README.mddiff --git a/fixtures/webstudio-remix-vercel/app/__generated__/$resources.sitemap.xml.ts b/fixtures/webstudio-features/app/__generated__/$resources.sitemap.xml.tssimilarity index 100%rename from fixtures/webstudio-remix-vercel/app/__generated__/$resources.sitemap.xml.tsrename to fixtures/webstudio-features/app/__generated__/$resources.sitemap.xml.tsdiff --git a/fixtures/webstudio-remix-vercel/app/__generated__/[_route_with_symbols_]._index.server.tsx b/fixtures/webstudio-features/app/__generated__/[_route_with_symbols_]._index.server.tsxsimilarity index 100%rename from fixtures/webstudio-remix-vercel/app/__generated__/[_route_with_symbols_]._index.server.tsxrename to fixtures/webstudio-features/app/__generated__/[_route_with_symbols_]._index.server.tsxdiff --git a/fixtures/webstudio-remix-vercel/app/__generated__/[_route_with_symbols_]._index.tsx b/fixtures/webstudio-features/app/__generated__/[_route_with_symbols_]._index.tsxsimilarity index 99%rename from fixtures/webstudio-remix-vercel/app/__generated__/[_route_with_symbols_]._index.tsxrename to fixtures/webstudio-features/app/__generated__/[_route_with_symbols_]._index.tsxindex bd9821bc87..8be898bf8a 100644--- a/fixtures/webstudio-remix-vercel/app/__generated__/[_route_with_symbols_]._index.tsx+++ b/fixtures/webstudio-features/app/__generated__/[_route_with_symbols_]._index.tsx@@ -4,7 +4,7 @@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 { Body as Body } from "@webstudio-is/sdk-components-react-router";import { Image as Image } from "@webstudio-is/sdk-components-react";export const siteName = "KittyGuardedZone";diff --git a/fixtures/webstudio-remix-vercel/app/__generated__/[class-names]._index.server.tsx b/fixtures/webstudio-features/app/__generated__/[class-names]._index.server.tsxsimilarity index 100%rename from fixtures/webstudio-remix-vercel/app/__generated__/[class-names]._index.server.tsxrename to fixtures/webstudio-features/app/__generated__/[class-names]._index.server.tsxdiff --git a/fixtures/webstudio-remix-vercel/app/__generated__/[class-names]._index.tsx b/fixtures/webstudio-features/app/__generated__/[class-names]._index.tsxsimilarity index 99%rename from fixtures/webstudio-remix-vercel/app/__generated__/[class-names]._index.tsxrename to fixtures/webstudio-features/app/__generated__/[class-names]._index.tsxindex a6a334933d..87bfd2b5d3 100644--- a/fixtures/webstudio-remix-vercel/app/__generated__/[class-names]._index.tsx+++ b/fixtures/webstudio-features/app/__generated__/[class-names]._index.tsx@@ -4,7 +4,7 @@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 { Body as Body } from "@webstudio-is/sdk-components-react-router";import { Box as Box } from "@webstudio-is/sdk-components-react";export const siteName = "KittyGuardedZone";diff --git a/fixtures/webstudio-remix-vercel/app/__generated__/[content-block]._index.server.tsx b/fixtures/webstudio-features/app/__generated__/[content-block]._index.server.tsxsimilarity index 100%rename from fixtures/webstudio-remix-vercel/app/__generated__/[content-block]._index.server.tsxrename to fixtures/webstudio-features/app/__generated__/[content-block]._index.server.tsxdiff --git a/fixtures/webstudio-remix-vercel/app/__generated__/[content-block]._index.tsx b/fixtures/webstudio-features/app/__generated__/[content-block]._index.tsxsimilarity index 99%rename from fixtures/webstudio-remix-vercel/app/__generated__/[content-block]._index.tsxrename to fixtures/webstudio-features/app/__generated__/[content-block]._index.tsxindex 699270407f..915014f852 100644--- a/fixtures/webstudio-remix-vercel/app/__generated__/[content-block]._index.tsx+++ b/fixtures/webstudio-features/app/__generated__/[content-block]._index.tsx@@ -4,7 +4,7 @@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 { Body as Body } from "@webstudio-is/sdk-components-react-router";import {Box as Box,Heading as Heading,diff --git a/fixtures/webstudio-remix-vercel/app/__generated__/[expressions]._index.server.tsx b/fixtures/webstudio-features/app/__generated__/[expressions]._index.server.tsxsimilarity index 100%rename from fixtures/webstudio-remix-vercel/app/__generated__/[expressions]._index.server.tsxrename to fixtures/webstudio-features/app/__generated__/[expressions]._index.server.tsxdiff --git a/fixtures/webstudio-remix-vercel/app/__generated__/[expressions]._index.tsx b/fixtures/webstudio-features/app/__generated__/[expressions]._index.tsxsimilarity index 99%rename from fixtures/webstudio-remix-vercel/app/__generated__/[expressions]._index.tsxrename to fixtures/webstudio-features/app/__generated__/[expressions]._index.tsxindex 50067cdb7e..a0deb6d334 100644--- a/fixtures/webstudio-remix-vercel/app/__generated__/[expressions]._index.tsx+++ b/fixtures/webstudio-features/app/__generated__/[expressions]._index.tsx@@ -4,7 +4,7 @@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 { Body as Body } from "@webstudio-is/sdk-components-react-router";import {Heading as Heading,HtmlEmbed as HtmlEmbed,diff --git a/fixtures/webstudio-remix-vercel/app/__generated__/[form]._index.server.tsx b/fixtures/webstudio-features/app/__generated__/[form]._index.server.tsxsimilarity index 100%rename from fixtures/webstudio-remix-vercel/app/__generated__/[form]._index.server.tsxrename to fixtures/webstudio-features/app/__generated__/[form]._index.server.tsxdiff --git a/fixtures/webstudio-remix-vercel/app/__generated__/[form]._index.tsx b/fixtures/webstudio-features/app/__generated__/[form]._index.tsxsimilarity index 98%rename from fixtures/webstudio-remix-vercel/app/__generated__/[form]._index.tsxrename to fixtures/webstudio-features/app/__generated__/[form]._index.tsxindex 4505b50506..0f118431fa 100644--- a/fixtures/webstudio-remix-vercel/app/__generated__/[form]._index.tsx+++ b/fixtures/webstudio-features/app/__generated__/[form]._index.tsx@@ -7,7 +7,7 @@ import { useResource, useVariableState } from "@webstudio-is/react-sdk/runtime";import {Body as Body,Form as Form,-} from "@webstudio-is/sdk-components-react-remix";+} from "@webstudio-is/sdk-components-react-router";import {Box as Box,Label as Label,diff --git a/fixtures/webstudio-remix-vercel/app/__generated__/[head-tag]._index.server.tsx b/fixtures/webstudio-features/app/__generated__/[head-tag]._index.server.tsxsimilarity index 100%rename from fixtures/webstudio-remix-vercel/app/__generated__/[head-tag]._index.server.tsxrename to fixtures/webstudio-features/app/__generated__/[head-tag]._index.server.tsxdiff --git a/fixtures/webstudio-remix-vercel/app/__generated__/[head-tag]._index.tsx b/fixtures/webstudio-features/app/__generated__/[head-tag]._index.tsxsimilarity index 97%rename from fixtures/webstudio-remix-vercel/app/__generated__/[head-tag]._index.tsxrename to fixtures/webstudio-features/app/__generated__/[head-tag]._index.tsxindex ccea8747cf..f6e5a4b2dd 100644--- a/fixtures/webstudio-remix-vercel/app/__generated__/[head-tag]._index.tsx+++ b/fixtures/webstudio-features/app/__generated__/[head-tag]._index.tsx@@ -7,7 +7,7 @@ import { useResource, useVariableState } from "@webstudio-is/react-sdk/runtime";import {Body as Body,Link as Link,-} from "@webstudio-is/sdk-components-react-remix";+} from "@webstudio-is/sdk-components-react-router";import {HeadSlot as HeadSlot,HeadLink as HeadLink,diff --git a/fixtures/webstudio-remix-vercel/app/__generated__/[heading-with-id]._index.server.tsx b/fixtures/webstudio-features/app/__generated__/[heading-with-id]._index.server.tsxsimilarity index 100%rename from fixtures/webstudio-remix-vercel/app/__generated__/[heading-with-id]._index.server.tsxrename to fixtures/webstudio-features/app/__generated__/[heading-with-id]._index.server.tsxdiff --git a/fixtures/webstudio-remix-vercel/app/__generated__/[heading-with-id]._index.tsx b/fixtures/webstudio-features/app/__generated__/[heading-with-id]._index.tsxsimilarity index 99%rename from fixtures/webstudio-remix-vercel/app/__generated__/[heading-with-id]._index.tsxrename to fixtures/webstudio-features/app/__generated__/[heading-with-id]._index.tsxindex 3c268fbaca..d08d986842 100644--- a/fixtures/webstudio-remix-vercel/app/__generated__/[heading-with-id]._index.tsx+++ b/fixtures/webstudio-features/app/__generated__/[heading-with-id]._index.tsx@@ -4,7 +4,7 @@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 { Body as Body } from "@webstudio-is/sdk-components-react-router";import { Heading as Heading } from "@webstudio-is/sdk-components-react";export const siteName = "KittyGuardedZone";diff --git a/fixtures/webstudio-remix-vercel/app/__generated__/[nested].[nested-page]._index.server.tsx b/fixtures/webstudio-features/app/__generated__/[nested].[nested-page]._index.server.tsxsimilarity index 100%rename from fixtures/webstudio-remix-vercel/app/__generated__/[nested].[nested-page]._index.server.tsxrename to fixtures/webstudio-features/app/__generated__/[nested].[nested-page]._index.server.tsxdiff --git a/fixtures/webstudio-remix-vercel/app/__generated__/[nested].[nested-page]._index.tsx b/fixtures/webstudio-features/app/__generated__/[nested].[nested-page]._index.tsxsimilarity index 99%rename from fixtures/webstudio-remix-vercel/app/__generated__/[nested].[nested-page]._index.tsxrename to fixtures/webstudio-features/app/__generated__/[nested].[nested-page]._index.tsxindex 7db4b5ec49..e417451e98 100644--- a/fixtures/webstudio-remix-vercel/app/__generated__/[nested].[nested-page]._index.tsx+++ b/fixtures/webstudio-features/app/__generated__/[nested].[nested-page]._index.tsx@@ -4,7 +4,7 @@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 { Body as Body } from "@webstudio-is/sdk-components-react-router";import { Heading as Heading } from "@webstudio-is/sdk-components-react";export const siteName = "KittyGuardedZone";diff --git a/fixtures/webstudio-remix-vercel/app/__generated__/[radix]._index.server.tsx b/fixtures/webstudio-features/app/__generated__/[radix]._index.server.tsxsimilarity index 100%rename from fixtures/webstudio-remix-vercel/app/__generated__/[radix]._index.server.tsxrename to fixtures/webstudio-features/app/__generated__/[radix]._index.server.tsxdiff --git a/fixtures/webstudio-remix-vercel/app/__generated__/[radix]._index.tsx b/fixtures/webstudio-features/app/__generated__/[radix]._index.tsxsimilarity index 99%rename from fixtures/webstudio-remix-vercel/app/__generated__/[radix]._index.tsxrename to fixtures/webstudio-features/app/__generated__/[radix]._index.tsxindex fb53b840b4..9df7ab2ab5 100644--- a/fixtures/webstudio-remix-vercel/app/__generated__/[radix]._index.tsx+++ b/fixtures/webstudio-features/app/__generated__/[radix]._index.tsx@@ -4,7 +4,7 @@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 { Body as Body } from "@webstudio-is/sdk-components-react-router";import {Accordion as Accordion,AccordionItem as AccordionItem,diff --git a/fixtures/webstudio-remix-vercel/app/__generated__/[resources]._index.server.tsx b/fixtures/webstudio-features/app/__generated__/[resources]._index.server.tsxsimilarity index 100%rename from fixtures/webstudio-remix-vercel/app/__generated__/[resources]._index.server.tsxrename to fixtures/webstudio-features/app/__generated__/[resources]._index.server.tsxdiff --git a/fixtures/webstudio-remix-vercel/app/__generated__/[resources]._index.tsx b/fixtures/webstudio-features/app/__generated__/[resources]._index.tsxsimilarity index 99%rename from fixtures/webstudio-remix-vercel/app/__generated__/[resources]._index.tsxrename to fixtures/webstudio-features/app/__generated__/[resources]._index.tsxindex 192c01a3fb..5bc992e4e4 100644--- a/fixtures/webstudio-remix-vercel/app/__generated__/[resources]._index.tsx+++ b/fixtures/webstudio-features/app/__generated__/[resources]._index.tsx@@ -4,7 +4,7 @@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 { Body as Body } from "@webstudio-is/sdk-components-react-router";import {Box as Box,HtmlEmbed as HtmlEmbed,diff --git a/fixtures/webstudio-remix-vercel/app/__generated__/[sitemap.xml]._index.server.tsx b/fixtures/webstudio-features/app/__generated__/[sitemap.xml]._index.server.tsxsimilarity index 100%rename from fixtures/webstudio-remix-vercel/app/__generated__/[sitemap.xml]._index.server.tsxrename to fixtures/webstudio-features/app/__generated__/[sitemap.xml]._index.server.tsxdiff --git a/fixtures/webstudio-remix-vercel/app/__generated__/[sitemap.xml]._index.tsx b/fixtures/webstudio-features/app/__generated__/[sitemap.xml]._index.tsxsimilarity index 100%rename from fixtures/webstudio-remix-vercel/app/__generated__/[sitemap.xml]._index.tsxrename to fixtures/webstudio-features/app/__generated__/[sitemap.xml]._index.tsxdiff --git a/fixtures/webstudio-remix-vercel/app/__generated__/_index.server.tsx b/fixtures/webstudio-features/app/__generated__/_index.server.tsxsimilarity index 100%rename from fixtures/webstudio-remix-vercel/app/__generated__/_index.server.tsxrename to fixtures/webstudio-features/app/__generated__/_index.server.tsxdiff --git a/fixtures/webstudio-remix-vercel/app/__generated__/_index.tsx b/fixtures/webstudio-features/app/__generated__/_index.tsxsimilarity index 98%rename from fixtures/webstudio-remix-vercel/app/__generated__/_index.tsxrename to fixtures/webstudio-features/app/__generated__/_index.tsxindex ddee88589e..e86fe2db5f 100644--- a/fixtures/webstudio-remix-vercel/app/__generated__/_index.tsx+++ b/fixtures/webstudio-features/app/__generated__/_index.tsx@@ -7,7 +7,7 @@ import { useResource, useVariableState } from "@webstudio-is/react-sdk/runtime";import {Body as Body,Link as Link,-} from "@webstudio-is/sdk-components-react-remix";+} from "@webstudio-is/sdk-components-react-router";import {Heading as Heading,Box as Box,diff --git a/fixtures/webstudio-remix-vercel/app/__generated__/index.css b/fixtures/webstudio-features/app/__generated__/index.csssimilarity index 100%rename from fixtures/webstudio-remix-vercel/app/__generated__/index.cssrename to fixtures/webstudio-features/app/__generated__/index.cssdiff --git a/fixtures/webstudio-features/app/constants.mjs b/fixtures/webstudio-features/app/constants.mjsnew file mode 100644index 0000000000..8eea5a78ce--- /dev/null+++ b/fixtures/webstudio-features/app/constants.mjs@@ -0,0 +1,12 @@+/**+ * We use mjs extension as constants in this file is shared with the build script+ * and we use `node --eval` to extract the constants.+ */+export const assetBaseUrl = "/assets/";++/**+ * @type {import("@webstudio-is/image").ImageLoader}+ */+export const imageLoader = ({ src }) => {+ return src;+};diff --git a/fixtures/webstudio-remix-vercel/app/extension.ts b/fixtures/webstudio-features/app/extension.tssimilarity index 61%rename from fixtures/webstudio-remix-vercel/app/extension.tsrename to fixtures/webstudio-features/app/extension.tsindex 3345c28d98..bffd05d48e 100644--- a/fixtures/webstudio-remix-vercel/app/extension.ts+++ b/fixtures/webstudio-features/app/extension.ts@@ -1,9 +1,6 @@-// eslint-disable-next-line @typescript-eslint/ban-ts-comment-// @ts-ignore-import { AppLoadContext } from "@remix-run/server-runtime";import { ResourceRequest } from "@webstudio-is/sdk";-declare module "@remix-run/server-runtime" {+declare module "react-router" {interface AppLoadContext {EXCLUDE_FROM_SEARCH: boolean;getDefaultActionResource?: (options: {diff --git a/fixtures/webstudio-remix-vercel/app/root.tsx b/fixtures/webstudio-features/app/root.tsxsimilarity index 92%rename from fixtures/webstudio-remix-vercel/app/root.tsxrename to fixtures/webstudio-features/app/root.tsxindex 40cefeeec7..aa2a8c4164 100644--- a/fixtures/webstudio-remix-vercel/app/root.tsx+++ b/fixtures/webstudio-features/app/root.tsx@@ -1,6 +1,6 @@/* eslint-disable @typescript-eslint/ban-ts-comment */-import { Links, Meta, Outlet, useMatches } from "@remix-run/react";+import { Links, Meta, Outlet, useMatches } from "react-router";// @todo think about how to make __generated__ typeable// @ts-ignoreimport { CustomCode } from "./__generated__/_index";diff --git a/fixtures/webstudio-features/app/routes.ts b/fixtures/webstudio-features/app/routes.tsnew file mode 100644index 0000000000..4c05936cb6--- /dev/null+++ b/fixtures/webstudio-features/app/routes.ts@@ -0,0 +1,4 @@+import { type RouteConfig } from "@react-router/dev/routes";+import { flatRoutes } from "@react-router/fs-routes";++export default flatRoutes() satisfies RouteConfig;diff --git a/fixtures/webstudio-remix-vercel/app/routes/[_route_with_symbols_]._index.tsx b/fixtures/webstudio-features/app/routes/[_route_with_symbols_]._index.tsxsimilarity index 96%rename from fixtures/webstudio-remix-vercel/app/routes/[_route_with_symbols_]._index.tsxrename to fixtures/webstudio-features/app/routes/[_route_with_symbols_]._index.tsxindex b20c8d220b..c8f4a46b63 100644--- a/fixtures/webstudio-remix-vercel/app/routes/[_route_with_symbols_]._index.tsx+++ b/fixtures/webstudio-features/app/routes/[_route_with_symbols_]._index.tsx@@ -1,14 +1,14 @@import {- type ServerRuntimeMetaFunction as MetaFunction,+ type MetaFunction,type LinksFunction,type LinkDescriptor,type ActionFunctionArgs,type LoaderFunctionArgs,type HeadersFunction,- json,+ data,redirect,-} from "@remix-run/server-runtime";-import { useLoaderData } from "@remix-run/react";+ useLoaderData,+} from "react-router";import {isLocalResource,loadResource,@@ -20,7 +20,6 @@ import {ReactSdkContext,PageSettingsMeta,PageSettingsTitle,- PageSettingsCanonicalLink,} from "@webstudio-is/react-sdk/runtime";import {Page,@@ -82,7 +81,7 @@ export const loader = async (arg: LoaderFunctionArgs) => {pageMeta.status === 301 || pageMeta.status === 302? pageMeta.status: 302;- return redirect(pageMeta.redirect, status);+ throw redirect(pageMeta.redirect, status);}// typecheck@@ -92,7 +91,7 @@ export const loader = async (arg: LoaderFunctionArgs) => {pageMeta.excludePageFromSearch = arg.context.EXCLUDE_FROM_SEARCH;}- return json(+ return data({host,url: url.href,@@ -289,7 +288,6 @@ const Outlet = () => {imageLoader={imageLoader}/><PageSettingsTitle>{pageMeta.title}</PageSettingsTitle>- <PageSettingsCanonicalLink href={url} /></ReactSdkContext.Provider>);};diff --git a/fixtures/webstudio-remix-vercel/app/routes/[class-names]._index.tsx b/fixtures/webstudio-features/app/routes/[class-names]._index.tsxsimilarity index 96%rename from fixtures/webstudio-remix-vercel/app/routes/[class-names]._index.tsxrename to fixtures/webstudio-features/app/routes/[class-names]._index.tsxindex 6b1827cdcf..a63384caf7 100644--- a/fixtures/webstudio-remix-vercel/app/routes/[class-names]._index.tsx+++ b/fixtures/webstudio-features/app/routes/[class-names]._index.tsx@@ -1,14 +1,14 @@import {- type ServerRuntimeMetaFunction as MetaFunction,+ type MetaFunction,type LinksFunction,type LinkDescriptor,type ActionFunctionArgs,type LoaderFunctionArgs,type HeadersFunction,- json,+ data,redirect,-} from "@remix-run/server-runtime";-import { useLoaderData } from "@remix-run/react";+ useLoaderData,+} from "react-router";import {isLocalResource,loadResource,@@ -20,7 +20,6 @@ import {ReactSdkContext,PageSettingsMeta,PageSettingsTitle,- PageSettingsCanonicalLink,} from "@webstudio-is/react-sdk/runtime";import {Page,@@ -82,7 +81,7 @@ export const loader = async (arg: LoaderFunctionArgs) => {pageMeta.status === 301 || pageMeta.status === 302? pageMeta.status: 302;- return redirect(pageMeta.redirect, status);+ throw redirect(pageMeta.redirect, status);}// typecheck@@ -92,7 +91,7 @@ export const loader = async (arg: LoaderFunctionArgs) => {pageMeta.excludePageFromSearch = arg.context.EXCLUDE_FROM_SEARCH;}- return json(+ return data({host,url: url.href,@@ -289,7 +288,6 @@ const Outlet = () => {imageLoader={imageLoader}/><PageSettingsTitle>{pageMeta.title}</PageSettingsTitle>- <PageSettingsCanonicalLink href={url} /></ReactSdkContext.Provider>);};diff --git a/fixtures/webstudio-remix-vercel/app/routes/[content-block]._index.tsx b/fixtures/webstudio-features/app/routes/[content-block]._index.tsxsimilarity index 96%rename from fixtures/webstudio-remix-vercel/app/routes/[content-block]._index.tsxrename to fixtures/webstudio-features/app/routes/[content-block]._index.tsxindex 58f75037e5..b4733304c6 100644--- a/fixtures/webstudio-remix-vercel/app/routes/[content-block]._index.tsx+++ b/fixtures/webstudio-features/app/routes/[content-block]._index.tsx@@ -1,14 +1,14 @@import {- type ServerRuntimeMetaFunction as MetaFunction,+ type MetaFunction,type LinksFunction,type LinkDescriptor,type ActionFunctionArgs,type LoaderFunctionArgs,type HeadersFunction,- json,+ data,redirect,-} from "@remix-run/server-runtime";-import { useLoaderData } from "@remix-run/react";+ useLoaderData,+} from "react-router";import {isLocalResource,loadResource,@@ -20,7 +20,6 @@ import {ReactSdkContext,PageSettingsMeta,PageSettingsTitle,- PageSettingsCanonicalLink,} from "@webstudio-is/react-sdk/runtime";import {Page,@@ -82,7 +81,7 @@ export const loader = async (arg: LoaderFunctionArgs) => {pageMeta.status === 301 || pageMeta.status === 302? pageMeta.status: 302;- return redirect(pageMeta.redirect, status);+ throw redirect(pageMeta.redirect, status);}// typecheck@@ -92,7 +91,7 @@ export const loader = async (arg: LoaderFunctionArgs) => {pageMeta.excludePageFromSearch = arg.context.EXCLUDE_FROM_SEARCH;}- return json(+ return data({host,url: url.href,@@ -289,7 +288,6 @@ const Outlet = () => {imageLoader={imageLoader}/><PageSettingsTitle>{pageMeta.title}</PageSettingsTitle>- <PageSettingsCanonicalLink href={url} /></ReactSdkContext.Provider>);};diff --git a/fixtures/webstudio-remix-vercel/app/routes/[expressions]._index.tsx b/fixtures/webstudio-features/app/routes/[expressions]._index.tsxsimilarity index 96%rename from fixtures/webstudio-remix-vercel/app/routes/[expressions]._index.tsxrename to fixtures/webstudio-features/app/routes/[expressions]._index.tsxindex db50853602..d74fa5b1c3 100644--- a/fixtures/webstudio-remix-vercel/app/routes/[expressions]._index.tsx+++ b/fixtures/webstudio-features/app/routes/[expressions]._index.tsx@@ -1,14 +1,14 @@import {- type ServerRuntimeMetaFunction as MetaFunction,+ type MetaFunction,type LinksFunction,type LinkDescriptor,type ActionFunctionArgs,type LoaderFunctionArgs,type HeadersFunction,- json,+ data,redirect,-} from "@remix-run/server-runtime";-import { useLoaderData } from "@remix-run/react";+ useLoaderData,+} from "react-router";import {isLocalResource,loadResource,@@ -20,7 +20,6 @@ import {ReactSdkContext,PageSettingsMeta,PageSettingsTitle,- PageSettingsCanonicalLink,} from "@webstudio-is/react-sdk/runtime";import {Page,@@ -82,7 +81,7 @@ export const loader = async (arg: LoaderFunctionArgs) => {pageMeta.status === 301 || pageMeta.status === 302? pageMeta.status: 302;- return redirect(pageMeta.redirect, status);+ throw redirect(pageMeta.redirect, status);}// typecheck@@ -92,7 +91,7 @@ export const loader = async (arg: LoaderFunctionArgs) => {pageMeta.excludePageFromSearch = arg.context.EXCLUDE_FROM_SEARCH;}- return json(+ return data({host,url: url.href,@@ -289,7 +288,6 @@ const Outlet = () => {imageLoader={imageLoader}/><PageSettingsTitle>{pageMeta.title}</PageSettingsTitle>- <PageSettingsCanonicalLink href={url} /></ReactSdkContext.Provider>);};diff --git a/fixtures/webstudio-remix-vercel/app/routes/[form]._index.tsx b/fixtures/webstudio-features/app/routes/[form]._index.tsxsimilarity index 96%rename from fixtures/webstudio-remix-vercel/app/routes/[form]._index.tsxrename to fixtures/webstudio-features/app/routes/[form]._index.tsxindex 5b31450447..16fab5e22a 100644--- a/fixtures/webstudio-remix-vercel/app/routes/[form]._index.tsx+++ b/fixtures/webstudio-features/app/routes/[form]._index.tsx@@ -1,14 +1,14 @@import {- type ServerRuntimeMetaFunction as MetaFunction,+ type MetaFunction,type LinksFunction,type LinkDescriptor,type ActionFunctionArgs,type LoaderFunctionArgs,type HeadersFunction,- json,+ data,redirect,-} from "@remix-run/server-runtime";-import { useLoaderData } from "@remix-run/react";+ useLoaderData,+} from "react-router";import {isLocalResource,loadResource,@@ -20,7 +20,6 @@ import {ReactSdkContext,PageSettingsMeta,PageSettingsTitle,- PageSettingsCanonicalLink,} from "@webstudio-is/react-sdk/runtime";import {Page,@@ -82,7 +81,7 @@ export const loader = async (arg: LoaderFunctionArgs) => {pageMeta.status === 301 || pageMeta.status === 302? pageMeta.status: 302;- return redirect(pageMeta.redirect, status);+ throw redirect(pageMeta.redirect, status);}// typecheck@@ -92,7 +91,7 @@ export const loader = async (arg: LoaderFunctionArgs) => {pageMeta.excludePageFromSearch = arg.context.EXCLUDE_FROM_SEARCH;}- return json(+ return data({host,url: url.href,@@ -289,7 +288,6 @@ const Outlet = () => {imageLoader={imageLoader}/><PageSettingsTitle>{pageMeta.title}</PageSettingsTitle>- <PageSettingsCanonicalLink href={url} /></ReactSdkContext.Provider>);};diff --git a/fixtures/webstudio-remix-vercel/app/routes/[head-tag]._index.tsx b/fixtures/webstudio-features/app/routes/[head-tag]._index.tsxsimilarity index 96%rename from fixtures/webstudio-remix-vercel/app/routes/[head-tag]._index.tsxrename to fixtures/webstudio-features/app/routes/[head-tag]._index.tsxindex 62036aa81d..8192767960 100644--- a/fixtures/webstudio-remix-vercel/app/routes/[head-tag]._index.tsx+++ b/fixtures/webstudio-features/app/routes/[head-tag]._index.tsx@@ -1,14 +1,14 @@import {- type ServerRuntimeMetaFunction as MetaFunction,+ type MetaFunction,type LinksFunction,type LinkDescriptor,type ActionFunctionArgs,type LoaderFunctionArgs,type HeadersFunction,- json,+ data,redirect,-} from "@remix-run/server-runtime";-import { useLoaderData } from "@remix-run/react";+ useLoaderData,+} from "react-router";import {isLocalResource,loadResource,@@ -20,7 +20,6 @@ import {ReactSdkContext,PageSettingsMeta,PageSettingsTitle,- PageSettingsCanonicalLink,} from "@webstudio-is/react-sdk/runtime";import {Page,@@ -82,7 +81,7 @@ export const loader = async (arg: LoaderFunctionArgs) => {pageMeta.status === 301 || pageMeta.status === 302? pageMeta.status: 302;- return redirect(pageMeta.redirect, status);+ throw redirect(pageMeta.redirect, status);}// typecheck@@ -92,7 +91,7 @@ export const loader = async (arg: LoaderFunctionArgs) => {pageMeta.excludePageFromSearch = arg.context.EXCLUDE_FROM_SEARCH;}- return json(+ return data({host,url: url.href,@@ -289,7 +288,6 @@ const Outlet = () => {imageLoader={imageLoader}/><PageSettingsTitle>{pageMeta.title}</PageSettingsTitle>- <PageSettingsCanonicalLink href={url} /></ReactSdkContext.Provider>);};diff --git a/fixtures/webstudio-remix-vercel/app/routes/[heading-with-id]._index.tsx b/fixtures/webstudio-features/app/routes/[heading-with-id]._index.tsxsimilarity index 96%rename from fixtures/webstudio-remix-vercel/app/routes/[heading-with-id]._index.tsxrename to fixtures/webstudio-features/app/routes/[heading-with-id]._index.tsxindex cb7aa40b47..3b9d7a1bd9 100644--- a/fixtures/webstudio-remix-vercel/app/routes/[heading-with-id]._index.tsx+++ b/fixtures/webstudio-features/app/routes/[heading-with-id]._index.tsx@@ -1,14 +1,14 @@import {- type ServerRuntimeMetaFunction as MetaFunction,+ type MetaFunction,type LinksFunction,type LinkDescriptor,type ActionFunctionArgs,type LoaderFunctionArgs,type HeadersFunction,- json,+ data,redirect,-} from "@remix-run/server-runtime";-import { useLoaderData } from "@remix-run/react";+ useLoaderData,+} from "react-router";import {isLocalResource,loadResource,@@ -20,7 +20,6 @@ import {ReactSdkContext,PageSettingsMeta,PageSettingsTitle,- PageSettingsCanonicalLink,} from "@webstudio-is/react-sdk/runtime";import {Page,@@ -82,7 +81,7 @@ export const loader = async (arg: LoaderFunctionArgs) => {pageMeta.status === 301 || pageMeta.status === 302? pageMeta.status: 302;- return redirect(pageMeta.redirect, status);+ throw redirect(pageMeta.redirect, status);}// typecheck@@ -92,7 +91,7 @@ export const loader = async (arg: LoaderFunctionArgs) => {pageMeta.excludePageFromSearch = arg.context.EXCLUDE_FROM_SEARCH;}- return json(+ return data({host,url: url.href,@@ -289,7 +288,6 @@ const Outlet = () => {imageLoader={imageLoader}/><PageSettingsTitle>{pageMeta.title}</PageSettingsTitle>- <PageSettingsCanonicalLink href={url} /></ReactSdkContext.Provider>);};diff --git a/fixtures/webstudio-remix-vercel/app/routes/[nested].[nested-page]._index.tsx b/fixtures/webstudio-features/app/routes/[nested].[nested-page]._index.tsxsimilarity index 96%rename from fixtures/webstudio-remix-vercel/app/routes/[nested].[nested-page]._index.tsxrename to fixtures/webstudio-features/app/routes/[nested].[nested-page]._index.tsxindex da0ae18585..aab71db812 100644--- a/fixtures/webstudio-remix-vercel/app/routes/[nested].[nested-page]._index.tsx+++ b/fixtures/webstudio-features/app/routes/[nested].[nested-page]._index.tsx@@ -1,14 +1,14 @@import {- type ServerRuntimeMetaFunction as MetaFunction,+ type MetaFunction,type LinksFunction,type LinkDescriptor,type ActionFunctionArgs,type LoaderFunctionArgs,type HeadersFunction,- json,+ data,redirect,-} from "@remix-run/server-runtime";-import { useLoaderData } from "@remix-run/react";+ useLoaderData,+} from "react-router";import {isLocalResource,loadResource,@@ -20,7 +20,6 @@ import {ReactSdkContext,PageSettingsMeta,PageSettingsTitle,- PageSettingsCanonicalLink,} from "@webstudio-is/react-sdk/runtime";import {Page,@@ -82,7 +81,7 @@ export const loader = async (arg: LoaderFunctionArgs) => {pageMeta.status === 301 || pageMeta.status === 302? pageMeta.status: 302;- return redirect(pageMeta.redirect, status);+ throw redirect(pageMeta.redirect, status);}// typecheck@@ -92,7 +91,7 @@ export const loader = async (arg: LoaderFunctionArgs) => {pageMeta.excludePageFromSearch = arg.context.EXCLUDE_FROM_SEARCH;}- return json(+ return data({host,url: url.href,@@ -289,7 +288,6 @@ const Outlet = () => {imageLoader={imageLoader}/><PageSettingsTitle>{pageMeta.title}</PageSettingsTitle>- <PageSettingsCanonicalLink href={url} /></ReactSdkContext.Provider>);};diff --git a/fixtures/webstudio-remix-vercel/app/routes/[radix]._index.tsx b/fixtures/webstudio-features/app/routes/[radix]._index.tsxsimilarity index 96%rename from fixtures/webstudio-remix-vercel/app/routes/[radix]._index.tsxrename to fixtures/webstudio-features/app/routes/[radix]._index.tsxindex 46dcaf1bbe..e238fff71a 100644--- a/fixtures/webstudio-remix-vercel/app/routes/[radix]._index.tsx+++ b/fixtures/webstudio-features/app/routes/[radix]._index.tsx@@ -1,14 +1,14 @@import {- type ServerRuntimeMetaFunction as MetaFunction,+ type MetaFunction,type LinksFunction,type LinkDescriptor,type ActionFunctionArgs,type LoaderFunctionArgs,type HeadersFunction,- json,+ data,redirect,-} from "@remix-run/server-runtime";-import { useLoaderData } from "@remix-run/react";+ useLoaderData,+} from "react-router";import {isLocalResource,loadResource,@@ -20,7 +20,6 @@ import {ReactSdkContext,PageSettingsMeta,PageSettingsTitle,- PageSettingsCanonicalLink,} from "@webstudio-is/react-sdk/runtime";import {Page,@@ -82,7 +81,7 @@ export const loader = async (arg: LoaderFunctionArgs) => {pageMeta.status === 301 || pageMeta.status === 302? pageMeta.status: 302;- return redirect(pageMeta.redirect, status);+ throw redirect(pageMeta.redirect, status);}// typecheck@@ -92,7 +91,7 @@ export const loader = async (arg: LoaderFunctionArgs) => {pageMeta.excludePageFromSearch = arg.context.EXCLUDE_FROM_SEARCH;}- return json(+ return data({host,url: url.href,@@ -289,7 +288,6 @@ const Outlet = () => {imageLoader={imageLoader}/><PageSettingsTitle>{pageMeta.title}</PageSettingsTitle>- <PageSettingsCanonicalLink href={url} /></ReactSdkContext.Provider>);};diff --git a/fixtures/webstudio-remix-vercel/app/routes/[resources]._index.tsx b/fixtures/webstudio-features/app/routes/[resources]._index.tsxsimilarity index 96%rename from fixtures/webstudio-remix-vercel/app/routes/[resources]._index.tsxrename to fixtures/webstudio-features/app/routes/[resources]._index.tsxindex 2d6a14b080..450b879f7b 100644--- a/fixtures/webstudio-remix-vercel/app/routes/[resources]._index.tsx+++ b/fixtures/webstudio-features/app/routes/[resources]._index.tsx@@ -1,14 +1,14 @@import {- type ServerRuntimeMetaFunction as MetaFunction,+ type MetaFunction,type LinksFunction,type LinkDescriptor,type ActionFunctionArgs,type LoaderFunctionArgs,type HeadersFunction,- json,+ data,redirect,-} from "@remix-run/server-runtime";-import { useLoaderData } from "@remix-run/react";+ useLoaderData,+} from "react-router";import {isLocalResource,loadResource,@@ -20,7 +20,6 @@ import {ReactSdkContext,PageSettingsMeta,PageSettingsTitle,- PageSettingsCanonicalLink,} from "@webstudio-is/react-sdk/runtime";import {Page,@@ -82,7 +81,7 @@ export const loader = async (arg: LoaderFunctionArgs) => {pageMeta.status === 301 || pageMeta.status === 302? pageMeta.status: 302;- return redirect(pageMeta.redirect, status);+ throw redirect(pageMeta.redirect, status);}// typecheck@@ -92,7 +91,7 @@ export const loader = async (arg: LoaderFunctionArgs) => {pageMeta.excludePageFromSearch = arg.context.EXCLUDE_FROM_SEARCH;}- return json(+ return data({host,url: url.href,@@ -289,7 +288,6 @@ const Outlet = () => {imageLoader={imageLoader}/><PageSettingsTitle>{pageMeta.title}</PageSettingsTitle>- <PageSettingsCanonicalLink href={url} /></ReactSdkContext.Provider>);};diff --git a/fixtures/webstudio-remix-vercel/app/routes/[robots.txt].tsx b/fixtures/webstudio-features/app/routes/[robots.txt].tsxsimilarity index 84%rename from fixtures/webstudio-remix-vercel/app/routes/[robots.txt].tsxrename to fixtures/webstudio-features/app/routes/[robots.txt].tsxindex aad4a9b368..cb8fe07b8f 100644--- a/fixtures/webstudio-remix-vercel/app/routes/[robots.txt].tsx+++ b/fixtures/webstudio-features/app/routes/[robots.txt].tsx@@ -1,4 +1,4 @@-import type { LoaderFunctionArgs } from "@remix-run/server-runtime";+import type { LoaderFunctionArgs } from "react-router";export const loader = (arg: LoaderFunctionArgs) => {const host =diff --git a/fixtures/webstudio-remix-vercel/app/routes/[sitemap.xml]._index.tsx b/fixtures/webstudio-features/app/routes/[sitemap.xml]._index.tsxsimilarity index 97%rename from fixtures/webstudio-remix-vercel/app/routes/[sitemap.xml]._index.tsxrename to fixtures/webstudio-features/app/routes/[sitemap.xml]._index.tsxindex 942cf02983..862a0c3733 100644--- a/fixtures/webstudio-remix-vercel/app/routes/[sitemap.xml]._index.tsx+++ b/fixtures/webstudio-features/app/routes/[sitemap.xml]._index.tsx@@ -1,5 +1,5 @@import { renderToString } from "react-dom/server";-import { type LoaderFunctionArgs, redirect } from "@remix-run/server-runtime";+import { type LoaderFunctionArgs, redirect } from "react-router";import { isLocalResource, loadResources } from "@webstudio-is/sdk/runtime";import {ReactSdkContext,diff --git a/fixtures/webstudio-remix-vercel/app/routes/_index.tsx b/fixtures/webstudio-features/app/routes/_index.tsxsimilarity index 96%rename from fixtures/webstudio-remix-vercel/app/routes/_index.tsxrename to fixtures/webstudio-features/app/routes/_index.tsxindex 9bc280da9b..5ecd622ce9 100644--- a/fixtures/webstudio-remix-vercel/app/routes/_index.tsx+++ b/fixtures/webstudio-features/app/routes/_index.tsx@@ -1,14 +1,14 @@import {- type ServerRuntimeMetaFunction as MetaFunction,+ type MetaFunction,type LinksFunction,type LinkDescriptor,type ActionFunctionArgs,type LoaderFunctionArgs,type HeadersFunction,- json,+ data,redirect,-} from "@remix-run/server-runtime";-import { useLoaderData } from "@remix-run/react";+ useLoaderData,+} from "react-router";import {isLocalResource,loadResource,@@ -20,7 +20,6 @@ import {ReactSdkContext,PageSettingsMeta,PageSettingsTitle,- PageSettingsCanonicalLink,} from "@webstudio-is/react-sdk/runtime";import {Page,@@ -82,7 +81,7 @@ export const loader = async (arg: LoaderFunctionArgs) => {pageMeta.status === 301 || pageMeta.status === 302? pageMeta.status: 302;- return redirect(pageMeta.redirect, status);+ throw redirect(pageMeta.redirect, status);}// typecheck@@ -92,7 +91,7 @@ export const loader = async (arg: LoaderFunctionArgs) => {pageMeta.excludePageFromSearch = arg.context.EXCLUDE_FROM_SEARCH;}- return json(+ return data({host,url: url.href,@@ -289,7 +288,6 @@ const Outlet = () => {imageLoader={imageLoader}/><PageSettingsTitle>{pageMeta.title}</PageSettingsTitle>- <PageSettingsCanonicalLink href={url} /></ReactSdkContext.Provider>);};diff --git a/fixtures/webstudio-remix-vercel/package.json b/fixtures/webstudio-features/package.jsonsimilarity index 69%rename from fixtures/webstudio-remix-vercel/package.jsonrename to fixtures/webstudio-features/package.jsonindex 2ec7c3ddcf..bde13cfe17 100644--- a/fixtures/webstudio-remix-vercel/package.json+++ b/fixtures/webstudio-features/package.json@@ -1,44 +1,45 @@{"type": "module","scripts": {- "build": "remix vite:build",- "dev": "remix vite:dev","typecheck": "tsc",+ "build": "react-router build",+ "dev": "react-router dev","cli": "NODE_OPTIONS='--conditions=webstudio --import=tsx' webstudio","fixtures:link": "pnpm cli link --link https://p-cddc1d44-af37-4cb6-a430-d300cf6f932d-dot-${BUILDER_HOST:-main.development.webstudio.is}'?authToken=1cdc6026-dd5b-4624-b89b-9bd45e9bcc3d'","fixtures:sync": "pnpm cli sync --buildId 3173a7d8-1af3-4e23-87fd-94c3b0cb1018 && pnpm prettier --write ./.webstudio/",- "fixtures:build": "pnpm cli build --template vercel --template internal --template ./.template && pnpm prettier --write ./app/ ./package.json ./tsconfig.json"+ "fixtures:build": "pnpm cli build --template react-router --template ./.template && pnpm prettier --write ./app/ ./package.json ./tsconfig.json"},"private": true,"sideEffects": false,"dependencies": {- "@remix-run/node": "2.15.2",- "@remix-run/react": "2.15.2",- "@remix-run/server-runtime": "2.15.2",+ "@miniflare/html-rewriter": "^2.14.4",+ "@react-router/dev": "^7.1.5",+ "@react-router/fs-routes": "^7.1.5",+ "@react-router/node": "^7.1.5","@webstudio-is/image": "workspace:*","@webstudio-is/react-sdk": "workspace:*","@webstudio-is/sdk": "workspace:*","@webstudio-is/sdk-components-animation": "workspace:*",- "@webstudio-is/sdk-components-react": "workspace:*","@webstudio-is/sdk-components-react-radix": "workspace:*",- "@webstudio-is/sdk-components-react-remix": "workspace:*",+ "@webstudio-is/sdk-components-react-router": "workspace:*",+ "@webstudio-is/sdk-components-react": "workspace:*","isbot": "^5.1.22","react": "18.3.0-canary-14898b6a9-20240318",- "react-dom": "18.3.0-canary-14898b6a9-20240318"+ "react-dom": "18.3.0-canary-14898b6a9-20240318",+ "react-router": "^7.1.5",+ "vite": "^5.4.11",+ "webstudio": "workspace:*"},"devDependencies": {- "@miniflare/html-rewriter": "^2.14.4",- "@remix-run/dev": "2.15.2",+ "webstudio": "workspace:*","@types/react": "^18.2.70","@types/react-dom": "^18.2.25",- "typescript": "5.7.3",- "vite": "^5.4.11",- "webstudio": "workspace:*"+ "typescript": "5.7.3"},"engines": {"node": ">=20.0.0"},- "name": "webstudio-remix-vercel",+ "name": "webstudio-features","version": "0.0.1","description": "","main": "index.js",diff --git a/fixtures/webstudio-remix-vercel/proxy-emulator/dedupe-meta.ts b/fixtures/webstudio-features/proxy-emulator/dedupe-meta.tssimilarity index 100%rename from fixtures/webstudio-remix-vercel/proxy-emulator/dedupe-meta.tsrename to fixtures/webstudio-features/proxy-emulator/dedupe-meta.tsdiff --git a/fixtures/webstudio-remix-vercel/public/assets/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 b/fixtures/webstudio-features/public/assets/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.pngsimilarity index 100%rename from fixtures/webstudio-remix-vercel/public/assets/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.pngrename to fixtures/webstudio-features/public/assets/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.pngdiff --git a/fixtures/webstudio-features/public/assets/_937084ed-a798-49fe-8664-df93a2af605e_uiBk3o6UWdqolyakMvQJ9.jpeg b/fixtures/webstudio-features/public/assets/_937084ed-a798-49fe-8664-df93a2af605e_uiBk3o6UWdqolyakMvQJ9.jpegnew file mode 100644index 0000000000..1c8219b73bBinary files /dev/null and b/fixtures/webstudio-features/public/assets/_937084ed-a798-49fe-8664-df93a2af605e_uiBk3o6UWdqolyakMvQJ9.jpeg differdiff --git a/fixtures/webstudio-remix-vercel/public/assets/small-avif-kitty_FnabJsioMWpBtXZSGf4DR.webp b/fixtures/webstudio-features/public/assets/small-avif-kitty_FnabJsioMWpBtXZSGf4DR.webpsimilarity index 100%rename from fixtures/webstudio-remix-vercel/public/assets/small-avif-kitty_FnabJsioMWpBtXZSGf4DR.webprename to fixtures/webstudio-features/public/assets/small-avif-kitty_FnabJsioMWpBtXZSGf4DR.webpdiff --git a/fixtures/webstudio-remix-vercel/public/favicon.ico b/fixtures/webstudio-features/public/favicon.icosimilarity index 100%rename from fixtures/webstudio-remix-vercel/public/favicon.icorename to fixtures/webstudio-features/public/favicon.icodiff --git a/fixtures/webstudio-remix-vercel/tsconfig.json b/fixtures/webstudio-features/tsconfig.jsonsimilarity index 80%rename from fixtures/webstudio-remix-vercel/tsconfig.jsonrename to fixtures/webstudio-features/tsconfig.jsonindex 99e0e652cc..0744b14c56 100644--- a/fixtures/webstudio-remix-vercel/tsconfig.json+++ b/fixtures/webstudio-features/tsconfig.json@@ -2,11 +2,7 @@"include": ["**/*.ts", "**/*.tsx", "**/*.mjs"],"compilerOptions": {"lib": ["DOM", "DOM.Iterable", "ESNext"],- "types": [- "@remix-run/node",- "vite/client",- "@webstudio-is/react-sdk/placeholder"- ],+ "types": ["vite/client", "@webstudio-is/react-sdk/placeholder"],"isolatedModules": true,"esModuleInterop": true,"jsx": "react-jsx",diff --git a/fixtures/webstudio-features/vite.config.ts b/fixtures/webstudio-features/vite.config.tsnew file mode 100644index 0000000000..af40508cdc--- /dev/null+++ b/fixtures/webstudio-features/vite.config.ts@@ -0,0 +1,9 @@+import { defineConfig } from "vite";+// @ts-ignore+import { reactRouter } from "@react-router/dev/vite";+// @ts-ignore+import { dedupeMeta } from "./proxy-emulator/dedupe-meta";++export default defineConfig({+ plugins: [reactRouter(), dedupeMeta],+});diff --git a/fixtures/webstudio-remix-vercel/.template/vite.config.ts b/fixtures/webstudio-remix-vercel/.template/vite.config.tsdeleted file mode 100644index e057ea698c..0000000000--- a/fixtures/webstudio-remix-vercel/.template/vite.config.ts+++ /dev/null@@ -1,19 +0,0 @@-import { defineConfig } from "vite";-import { vitePlugin as remix } from "@remix-run/dev";-// @ts-ignore-import { dedupeMeta } from "./proxy-emulator/dedupe-meta";--export default defineConfig({- plugins: [- remix({- future: {- v3_lazyRouteDiscovery: false,- v3_relativeSplatPath: false,- v3_singleFetch: false,- v3_fetcherPersist: false,- v3_throwAbortReason: false,- },- }),- dedupeMeta,- ],-});diff --git a/fixtures/webstudio-remix-vercel/.vercelignore b/fixtures/webstudio-remix-vercel/.vercelignoredeleted file mode 100644index 6a0e67a2fb..0000000000--- a/fixtures/webstudio-remix-vercel/.vercelignore+++ /dev/null@@ -1,8 +0,0 @@-node_modules--.cache-.env-.vercel-.webstudio-build-public/builddiff --git a/fixtures/webstudio-remix-vercel/app/constants.mjs b/fixtures/webstudio-remix-vercel/app/constants.mjsdeleted file mode 100644index 8bfaf11067..0000000000--- a/fixtures/webstudio-remix-vercel/app/constants.mjs+++ /dev/null@@ -1,25 +0,0 @@-/**- * We use mjs extension as constants in this file is shared with the build script- * and we use `node --eval` to extract the constants.- */-export const assetBaseUrl = "/assets/";--/**- * @type {import("@webstudio-is/image").ImageLoader}- */-export const imageLoader = (props) => {- if (process.env.NODE_ENV !== "production") {- return props.src;- }-- if (props.format === "raw") {- return props.src;- }-- // https://vercel.com/blog/build-your-own-web-framework#automatic-image-optimization- const searchParams = new URLSearchParams();- searchParams.set("url", props.src);- searchParams.set("w", props.width.toString());- searchParams.set("q", props.quality.toString());- return `/_vercel/image?${searchParams}`;-};diff --git a/fixtures/webstudio-remix-vercel/public/assets/_937084ed-a798-49fe-8664-df93a2af605e_uiBk3o6UWdqolyakMvQJ9.jpeg b/fixtures/webstudio-remix-vercel/public/assets/_937084ed-a798-49fe-8664-df93a2af605e_uiBk3o6UWdqolyakMvQJ9.jpegdeleted file mode 100644index ba43ae9a7a..0000000000Binary files a/fixtures/webstudio-remix-vercel/public/assets/_937084ed-a798-49fe-8664-df93a2af605e_uiBk3o6UWdqolyakMvQJ9.jpeg and /dev/null differdiff --git a/fixtures/webstudio-remix-vercel/vercel.json b/fixtures/webstudio-remix-vercel/vercel.jsondeleted file mode 100644index 94ff3b2f35..0000000000--- a/fixtures/webstudio-remix-vercel/vercel.json+++ /dev/null@@ -1,11 +0,0 @@-{- "images": {- "domains": [],- "sizes": [- 16, 32, 48, 64, 96, 128, 144, 256, 384, 640, 750, 828, 1080, 1200, 1920,- 2048, 3840- ],- "minimumCacheTTL": 60,- "formats": ["image/webp", "image/avif"]- }-}diff --git a/fixtures/webstudio-remix-vercel/vite.config.ts b/fixtures/webstudio-remix-vercel/vite.config.tsdeleted file mode 100644index e057ea698c..0000000000--- a/fixtures/webstudio-remix-vercel/vite.config.ts+++ /dev/null@@ -1,19 +0,0 @@-import { defineConfig } from "vite";-import { vitePlugin as remix } from "@remix-run/dev";-// @ts-ignore-import { dedupeMeta } from "./proxy-emulator/dedupe-meta";--export default defineConfig({- plugins: [- remix({- future: {- v3_lazyRouteDiscovery: false,- v3_relativeSplatPath: false,- v3_singleFetch: false,- v3_fetcherPersist: false,- v3_throwAbortReason: false,- },- }),- dedupeMeta,- ],-});diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 5d5f5a9bb1..8637653806 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -861,23 +861,20 @@ importers:specifier: workspace:*version: link:../../packages/cli- fixtures/webstudio-remix-netlify-edge-functions:+ fixtures/webstudio-features:dependencies:- '@netlify/edge-functions':- specifier: ^2.11.1- version: 2.11.1- '@netlify/remix-edge-adapter':- specifier: ^3.4.2- version: 3.4.2(@remix-run/[email protected]([email protected]([email protected]))([email protected])([email protected]))(@remix-run/[email protected]([email protected]))(@remix-run/[email protected]([email protected]))(@types/[email protected])([email protected])([email protected](@types/[email protected]))([email protected](@cloudflare/[email protected]))- '@remix-run/node':- specifier: 2.15.2- version: 2.15.2([email protected])- '@remix-run/react':- specifier: 2.15.2- '@remix-run/server-runtime':- specifier: 2.15.2- version: 2.15.2([email protected])+ '@miniflare/html-rewriter':+ specifier: ^2.14.4+ version: 2.14.4+ '@react-router/dev':+ specifier: ^7.1.5+ version: 7.1.5(@react-router/[email protected]([email protected]([email protected]([email protected]))([email protected]))([email protected]))(@types/[email protected])([email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected](@types/[email protected]))([email protected](@cloudflare/[email protected]))+ '@react-router/fs-routes':+ specifier: ^7.1.5+ version: 7.1.5(@react-router/[email protected](@react-router/[email protected]([email protected]([email protected]([email protected]))([email protected]))([email protected]))(@types/[email protected])([email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected](@types/[email protected]))([email protected](@cloudflare/[email protected])))([email protected])+ '@react-router/node':+ specifier: ^7.1.5+ version: 7.1.5([email protected]([email protected]([email protected]))([email protected]))([email protected])'@webstudio-is/image':specifier: workspace:*version: link:../../packages/image@@ -896,9 +893,9 @@ importers:'@webstudio-is/sdk-components-react-radix':specifier: workspace:*version: link:../../packages/sdk-components-react-radix- '@webstudio-is/sdk-components-react-remix':+ '@webstudio-is/sdk-components-react-router':specifier: workspace:*- version: link:../../packages/sdk-components-react-remix+ version: link:../../packages/sdk-components-react-routerisbot:specifier: ^5.1.22version: 5.1.22@@ -908,10 +905,16 @@ importers:react-dom:specifier: 18.3.0-canary-14898b6a9-20240318version: 18.3.0-canary-14898b6a9-20240318([email protected])+ react-router:+ specifier: ^7.1.5+ vite:+ specifier: ^5.4.11+ version: 5.4.11(@types/[email protected])+ webstudio:+ specifier: workspace:*+ version: link:../../packages/clidevDependencies:- '@remix-run/dev':- specifier: 2.15.2- version: 2.15.2(patch_hash=yortwzoeu3uj2blmdikhhw5byy)(@remix-run/[email protected]([email protected]([email protected]))([email protected])([email protected]))(@remix-run/[email protected]([email protected]))(@types/[email protected])([email protected])([email protected](@types/[email protected]))([email protected](@cloudflare/[email protected]))'@types/react':specifier: ^18.2.70version: 18.2.79@@ -921,21 +924,15 @@ importers:typescript:specifier: 5.7.3version: 5.7.3- vite:- specifier: ^5.4.11- version: 5.4.11(@types/[email protected])- webstudio:- specifier: workspace:*- version: link:../../packages/cli- fixtures/webstudio-remix-netlify-functions:+ fixtures/webstudio-remix-netlify-edge-functions:dependencies:- '@netlify/functions':- specifier: ^2.8.2- version: 2.8.2- '@netlify/remix-adapter':- specifier: ^2.5.1- version: 2.5.1(@netlify/[email protected])([email protected])([email protected](@types/[email protected]))+ '@netlify/edge-functions':+ specifier: ^2.11.1+ version: 2.11.1+ '@netlify/remix-edge-adapter':+ specifier: ^3.4.2+ version: 3.4.2(@remix-run/[email protected]([email protected]([email protected]))([email protected])([email protected]))(@remix-run/[email protected]([email protected]))(@remix-run/[email protected]([email protected]))(@types/[email protected])([email protected])([email protected](@types/[email protected]))([email protected](@cloudflare/[email protected]))'@remix-run/node':specifier: 2.15.2version: 2.15.2([email protected])@@ -995,8 +992,14 @@ importers:specifier: workspace:*version: link:../../packages/cli- fixtures/webstudio-remix-vercel:+ fixtures/webstudio-remix-netlify-functions:dependencies:+ '@netlify/functions':+ specifier: ^2.8.2+ version: 2.8.2+ '@netlify/remix-adapter':+ specifier: ^2.5.1+ version: 2.5.1(@netlify/[email protected])([email protected])([email protected](@types/[email protected]))'@remix-run/node':specifier: 2.15.2version: 2.15.2([email protected])@@ -1037,9 +1040,6 @@ importers:specifier: 18.3.0-canary-14898b6a9-20240318version: 18.3.0-canary-14898b6a9-20240318([email protected])devDependencies:- '@miniflare/html-rewriter':- specifier: ^2.14.4- version: 2.14.4'@remix-run/dev':specifier: 2.15.2version: 2.15.2(patch_hash=yortwzoeu3uj2blmdikhhw5byy)(@remix-run/[email protected]([email protected]([email protected]))([email protected])([email protected]))(@remix-run/[email protected]([email protected]))(@types/[email protected])([email protected])([email protected](@types/[email protected]))([email protected](@cloudflare/[email protected]))