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
feat: add new vercel template based on react-router (#4825)
Bogdan Chadkin5fabe66c7fd3
diff --git a/fixtures/react-router-docker/package.json b/fixtures/react-router-docker/package.jsonindex 457abc5bcb..e63f7ced0b 100644--- a/fixtures/react-router-docker/package.json+++ b/fixtures/react-router-docker/package.json@@ -21,7 +21,7 @@"@webstudio-is/sdk-components-react": "workspace:*","@webstudio-is/sdk-components-react-radix": "workspace:*","@webstudio-is/sdk-components-react-router": "workspace:*",- "h3": "^1.14.0",+ "h3": "^1.15.0","ipx": "^3.0.1","isbot": "^5.1.22","react": "18.3.0-canary-14898b6a9-20240318",diff --git a/fixtures/react-router-vercel/.gitignore b/fixtures/react-router-vercel/.gitignorenew file mode 100644index 0000000000..9b7c041f96--- /dev/null+++ b/fixtures/react-router-vercel/.gitignore@@ -0,0 +1,6 @@+.DS_Store+/node_modules/++# React Router+/.react-router/+/build/diff --git a/fixtures/react-router-vercel/.npmrc b/fixtures/react-router-vercel/.npmrcnew file mode 100644index 0000000000..43ce02f127--- /dev/null+++ b/fixtures/react-router-vercel/.npmrc@@ -0,0 +1,3 @@+force=true+# to support using NODE_OPTIONS for windows tests+shell-emulator=truediff --git a/fixtures/react-router-vercel/.template/.npmrc b/fixtures/react-router-vercel/.template/.npmrcnew file mode 100644index 0000000000..43ce02f127--- /dev/null+++ b/fixtures/react-router-vercel/.template/.npmrc@@ -0,0 +1,3 @@+force=true+# to support using NODE_OPTIONS for windows tests+shell-emulator=truediff --git a/fixtures/react-router-vercel/.template/package.json b/fixtures/react-router-vercel/.template/package.jsonnew file mode 100644index 0000000000..b21dce86c9--- /dev/null+++ b/fixtures/react-router-vercel/.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/react-router-vercel/.template/tsconfig.json b/fixtures/react-router-vercel/.template/tsconfig.jsonnew file mode 100644index 0000000000..75cac78946--- /dev/null+++ b/fixtures/react-router-vercel/.template/tsconfig.json@@ -0,0 +1,5 @@+{+ "compilerOptions": {+ "customConditions": ["webstudio"]+ }+}diff --git a/fixtures/react-router-vercel/.webstudio/config.json b/fixtures/react-router-vercel/.webstudio/config.jsonnew file mode 100644index 0000000000..3bad791718--- /dev/null+++ b/fixtures/react-router-vercel/.webstudio/config.json@@ -0,0 +1,3 @@+{+ "projectId": "d845c167-ea07-4875-b08d-83e97c09dcce"+}diff --git a/fixtures/react-router-vercel/.webstudio/data.json b/fixtures/react-router-vercel/.webstudio/data.jsonnew file mode 100644index 0000000000..7dc933cfb6--- /dev/null+++ b/fixtures/react-router-vercel/.webstudio/data.json@@ -0,0 +1,500 @@+{+ "build": {+ "id": "f565d527-32e7-4731-bc71-aca9e9574587",+ "projectId": "d845c167-ea07-4875-b08d-83e97c09dcce",+ "version": 43,+ "createdAt": "2025-01-04T11:01:50.091+00:00",+ "updatedAt": "2025-01-04T11:01:50.091+00:00",+ "pages": {+ "meta": {+ "siteName": "",+ "faviconAssetId": "d0974db9300c1a3b0fb8b291dd9fabd45ad136478908394280af2f7087e3aecd",+ "code": ""+ },+ "homePage": {+ "id": "9di_L14CzctvSruIoKVvE",+ "name": "Home",+ "title": "\"Home\"",+ "rootInstanceId": "MMimeobf_zi4ZkRGXapju",+ "systemDataSourceId": "2KT4-bRzToj9cAGAN_woK",+ "meta": {},+ "path": ""+ },+ "pages": [+ {+ "id": "WPPAbLFyJD_02vhjRd8P4",+ "name": "Another page",+ "title": "\"Another page\"",+ "history": ["/another-page"],+ "rootInstanceId": "n_VBMr7klpx25buS0NV7R",+ "systemDataSourceId": "tdXe9gFf83hSo9BLWU6xl",+ "meta": {+ "description": "\"\"",+ "excludePageFromSearch": "true",+ "language": "\"\"",+ "socialImageUrl": "\"\"",+ "status": "200",+ "redirect": "\"\"",+ "documentType": "html",+ "custom": [+ {+ "property": "",+ "content": "\"\""+ }+ ]+ },+ "marketplace": {+ "include": false+ },+ "path": "/another-page"+ }+ ],+ "folders": [+ {+ "id": "root",+ "name": "Root",+ "slug": "",+ "children": ["9di_L14CzctvSruIoKVvE", "WPPAbLFyJD_02vhjRd8P4"]+ }+ ]+ },+ "breakpoints": [+ [+ "rKj-wYctg3-GnqL3WHN9I",+ {+ "id": "rKj-wYctg3-GnqL3WHN9I",+ "label": "Base"+ }+ ],+ [+ "yH9RXhqCyeaVkrOt8MzLc",+ {+ "id": "yH9RXhqCyeaVkrOt8MzLc",+ "label": "Tablet",+ "maxWidth": 991+ }+ ],+ [+ "8nSCZbeS002IVwkTdoIes",+ {+ "id": "8nSCZbeS002IVwkTdoIes",+ "label": "Mobile landscape",+ "maxWidth": 767+ }+ ],+ [+ "7gBD25KrrbBdJYNDlhPz7",+ {+ "id": "7gBD25KrrbBdJYNDlhPz7",+ "label": "Mobile portrait",+ "maxWidth": 479+ }+ ]+ ],+ "styles": [+ [+ "7_QL45cpvP-zG8Hkgf4cr:rKj-wYctg3-GnqL3WHN9I:display:",+ {+ "breakpointId": "rKj-wYctg3-GnqL3WHN9I",+ "styleSourceId": "7_QL45cpvP-zG8Hkgf4cr",+ "property": "display",+ "value": {+ "type": "keyword",+ "value": "flex"+ }+ }+ ],+ [+ "7_QL45cpvP-zG8Hkgf4cr:rKj-wYctg3-GnqL3WHN9I:alignItems:",+ {+ "breakpointId": "rKj-wYctg3-GnqL3WHN9I",+ "styleSourceId": "7_QL45cpvP-zG8Hkgf4cr",+ "property": "alignItems",+ "value": {+ "type": "keyword",+ "value": "center"+ }+ }+ ],+ [+ "7_QL45cpvP-zG8Hkgf4cr:rKj-wYctg3-GnqL3WHN9I:justifyContent:",+ {+ "breakpointId": "rKj-wYctg3-GnqL3WHN9I",+ "styleSourceId": "7_QL45cpvP-zG8Hkgf4cr",+ "property": "justifyContent",+ "value": {+ "type": "keyword",+ "value": "center"+ }+ }+ ],+ [+ "7_QL45cpvP-zG8Hkgf4cr:rKj-wYctg3-GnqL3WHN9I:flexDirection:",+ {+ "breakpointId": "rKj-wYctg3-GnqL3WHN9I",+ "styleSourceId": "7_QL45cpvP-zG8Hkgf4cr",+ "property": "flexDirection",+ "value": {+ "type": "keyword",+ "value": "column"+ }+ }+ ],+ [+ "0KA68BwP9gdTzE1ESO2Zp:rKj-wYctg3-GnqL3WHN9I:marginBottom:",+ {+ "breakpointId": "rKj-wYctg3-GnqL3WHN9I",+ "styleSourceId": "0KA68BwP9gdTzE1ESO2Zp",+ "property": "marginBottom",+ "value": {+ "type": "unit",+ "unit": "em",+ "value": 1+ }+ }+ ],+ [+ "mf2C07UBmGT7y_G4Du3yg:rKj-wYctg3-GnqL3WHN9I:width:",+ {+ "breakpointId": "rKj-wYctg3-GnqL3WHN9I",+ "styleSourceId": "mf2C07UBmGT7y_G4Du3yg",+ "property": "width",+ "value": {+ "type": "unit",+ "unit": "px",+ "value": 400+ }+ }+ ]+ ],+ "styleSources": [+ [+ "7_QL45cpvP-zG8Hkgf4cr",+ {+ "type": "local",+ "id": "7_QL45cpvP-zG8Hkgf4cr"+ }+ ],+ [+ "0KA68BwP9gdTzE1ESO2Zp",+ {+ "type": "local",+ "id": "0KA68BwP9gdTzE1ESO2Zp"+ }+ ],+ [+ "mf2C07UBmGT7y_G4Du3yg",+ {+ "type": "local",+ "id": "mf2C07UBmGT7y_G4Du3yg"+ }+ ]+ ],+ "styleSourceSelections": [+ [+ "MMimeobf_zi4ZkRGXapju",+ {+ "instanceId": "MMimeobf_zi4ZkRGXapju",+ "values": ["7_QL45cpvP-zG8Hkgf4cr"]+ }+ ],+ [+ "BMJfjOzunWs8XkQgvvx1e",+ {+ "instanceId": "BMJfjOzunWs8XkQgvvx1e",+ "values": ["0KA68BwP9gdTzE1ESO2Zp"]+ }+ ],+ [+ "uHB3Fjb7-NELG-bnH7bXB",+ {+ "instanceId": "uHB3Fjb7-NELG-bnH7bXB",+ "values": ["mf2C07UBmGT7y_G4Du3yg"]+ }+ ]+ ],+ "props": [+ [+ "1p34InvRgqoKVqeNZ1uBb",+ {+ "id": "1p34InvRgqoKVqeNZ1uBb",+ "instanceId": "pjkZo5EiBqaeUXBcyHf_O",+ "name": "href",+ "type": "page",+ "value": "WPPAbLFyJD_02vhjRd8P4"+ }+ ],+ [+ "su3ag3OxH9WTBjJg5eIyg",+ {+ "id": "su3ag3OxH9WTBjJg5eIyg",+ "instanceId": "uHB3Fjb7-NELG-bnH7bXB",+ "name": "src",+ "type": "asset",+ "value": "1d8bf4398f643f5333d415091507d778aaed62f28883642636cbed0be156a0ee"+ }+ ],+ [+ "vGCYpBBB1QUPIPPIdyexn",+ {+ "id": "vGCYpBBB1QUPIPPIdyexn",+ "instanceId": "uHB3Fjb7-NELG-bnH7bXB",+ "name": "width",+ "type": "asset",+ "value": "1d8bf4398f643f5333d415091507d778aaed62f28883642636cbed0be156a0ee"+ }+ ],+ [+ "JKAGY7DWpciEl0UdnWuKL",+ {+ "id": "JKAGY7DWpciEl0UdnWuKL",+ "instanceId": "uHB3Fjb7-NELG-bnH7bXB",+ "name": "height",+ "type": "asset",+ "value": "1d8bf4398f643f5333d415091507d778aaed62f28883642636cbed0be156a0ee"+ }+ ],+ [+ "CAkmmL8-JAgokmeopoFXh",+ {+ "id": "CAkmmL8-JAgokmeopoFXh",+ "instanceId": "2sIE8GxbKRBaav_zdhaZ1",+ "name": "src",+ "type": "string",+ "value": "https://picsum.photos/id/237/100/100.jpg?blur=4&grayscale"+ }+ ]+ ],+ "dataSources": [+ [+ "2KT4-bRzToj9cAGAN_woK",+ {+ "type": "parameter",+ "id": "2KT4-bRzToj9cAGAN_woK",+ "scopeInstanceId": "MMimeobf_zi4ZkRGXapju",+ "name": "system"+ }+ ],+ [+ "tdXe9gFf83hSo9BLWU6xl",+ {+ "type": "parameter",+ "id": "tdXe9gFf83hSo9BLWU6xl",+ "scopeInstanceId": "n_VBMr7klpx25buS0NV7R",+ "name": "system"+ }+ ]+ ],+ "resources": [],+ "instances": [+ [+ "MMimeobf_zi4ZkRGXapju",+ {+ "type": "instance",+ "id": "MMimeobf_zi4ZkRGXapju",+ "component": "Body",+ "children": [+ {+ "type": "id",+ "value": "MYDt0guk1-vzc7yzqyN6A"+ },+ {+ "type": "id",+ "value": "BMJfjOzunWs8XkQgvvx1e"+ },+ {+ "type": "id",+ "value": "pjkZo5EiBqaeUXBcyHf_O"+ },+ {+ "type": "id",+ "value": "uHB3Fjb7-NELG-bnH7bXB"+ },+ {+ "type": "id",+ "value": "2sIE8GxbKRBaav_zdhaZ1"+ }+ ]+ }+ ],+ [+ "MYDt0guk1-vzc7yzqyN6A",+ {+ "type": "instance",+ "id": "MYDt0guk1-vzc7yzqyN6A",+ "component": "Heading",+ "label": "xD",+ "children": [+ {+ "type": "text",+ "value": "Simple Project to test CLI"+ }+ ]+ }+ ],+ [+ "BMJfjOzunWs8XkQgvvx1e",+ {+ "type": "instance",+ "id": "BMJfjOzunWs8XkQgvvx1e",+ "component": "Text",+ "children": [+ {+ "type": "text",+ "value": "Please don't change directly in the fixture"+ }+ ]+ }+ ],+ [+ "pjkZo5EiBqaeUXBcyHf_O",+ {+ "type": "instance",+ "id": "pjkZo5EiBqaeUXBcyHf_O",+ "component": "Link",+ "children": [+ {+ "type": "text",+ "value": "Test another page link"+ }+ ]+ }+ ],+ [+ "n_VBMr7klpx25buS0NV7R",+ {+ "type": "instance",+ "id": "n_VBMr7klpx25buS0NV7R",+ "component": "Body",+ "children": [+ {+ "type": "id",+ "value": "wthNByqb3RPmheb-56VYI"+ }+ ]+ }+ ],+ [+ "wthNByqb3RPmheb-56VYI",+ {+ "type": "instance",+ "id": "wthNByqb3RPmheb-56VYI",+ "component": "Heading",+ "children": [+ {+ "type": "text",+ "value": "Another page"+ }+ ]+ }+ ],+ [+ "uHB3Fjb7-NELG-bnH7bXB",+ {+ "type": "instance",+ "id": "uHB3Fjb7-NELG-bnH7bXB",+ "component": "Image",+ "children": []+ }+ ],+ [+ "2sIE8GxbKRBaav_zdhaZ1",+ {+ "type": "instance",+ "id": "2sIE8GxbKRBaav_zdhaZ1",+ "component": "Image",+ "children": []+ }+ ]+ ],+ "deployment": {+ "destination": "saas",+ "domains": ["cli-basic-test-d0osr"],+ "assetsDomain": "cli-basic-test-d0osr",+ "excludeWstdDomainFromSearch": false+ }+ },+ "page": {+ "id": "9di_L14CzctvSruIoKVvE",+ "name": "Home",+ "title": "\"Home\"",+ "rootInstanceId": "MMimeobf_zi4ZkRGXapju",+ "systemDataSourceId": "2KT4-bRzToj9cAGAN_woK",+ "meta": {},+ "path": ""+ },+ "pages": [+ {+ "id": "9di_L14CzctvSruIoKVvE",+ "name": "Home",+ "title": "\"Home\"",+ "rootInstanceId": "MMimeobf_zi4ZkRGXapju",+ "systemDataSourceId": "2KT4-bRzToj9cAGAN_woK",+ "meta": {},+ "path": ""+ },+ {+ "id": "WPPAbLFyJD_02vhjRd8P4",+ "name": "Another page",+ "title": "\"Another page\"",+ "history": ["/another-page"],+ "rootInstanceId": "n_VBMr7klpx25buS0NV7R",+ "systemDataSourceId": "tdXe9gFf83hSo9BLWU6xl",+ "meta": {+ "description": "\"\"",+ "excludePageFromSearch": "true",+ "language": "\"\"",+ "socialImageUrl": "\"\"",+ "status": "200",+ "redirect": "\"\"",+ "documentType": "html",+ "custom": [+ {+ "property": "",+ "content": "\"\""+ }+ ]+ },+ "marketplace": {+ "include": false+ },+ "path": "/another-page"+ }+ ],+ "assets": [+ {+ "id": "1d8bf4398f643f5333d415091507d778aaed62f28883642636cbed0be156a0ee",+ "name": "iconly_svg_converted-converted_zMaMiAAutUl8XrITgz7d1.svg",+ "description": null,+ "projectId": "d845c167-ea07-4875-b08d-83e97c09dcce",+ "size": 999,+ "type": "image",+ "format": "svg",+ "createdAt": "2024-07-26T13:39:48.678+00:00",+ "meta": {+ "width": 14,+ "height": 16+ }+ },+ {+ "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+ }+ }+ ],+ "user": {+ "email": "[email protected]"+ },+ "projectDomain": "cli-basic-test-d0osr",+ "projectTitle": "cli-basic-test",+ "origin": "https://main.development.webstudio.is"+}diff --git a/fixtures/react-router-vercel/app/__generated__/$resources.sitemap.xml.ts b/fixtures/react-router-vercel/app/__generated__/$resources.sitemap.xml.tsnew file mode 100644index 0000000000..181eac4621--- /dev/null+++ b/fixtures/react-router-vercel/app/__generated__/$resources.sitemap.xml.ts@@ -0,0 +1,6 @@+export const sitemap = [+ {+ path: "/",+ lastModified: "2025-01-04",+ },+];diff --git a/fixtures/react-router-vercel/app/__generated__/[another-page]._index.server.tsx b/fixtures/react-router-vercel/app/__generated__/[another-page]._index.server.tsxnew file mode 100644index 0000000000..dc6510942c--- /dev/null+++ b/fixtures/react-router-vercel/app/__generated__/[another-page]._index.server.tsx@@ -0,0 +1,39 @@+/* eslint-disable */+/* This is a auto generated file for building the project */++import type { PageMeta } from "@webstudio-is/sdk";+import type { System, ResourceRequest } from "@webstudio-is/sdk";+export const getResources = (_props: { system: System }) => {+ const _data = new Map<string, ResourceRequest>([]);+ const _action = new Map<string, ResourceRequest>([]);+ return { data: _data, action: _action };+};++export const getPageMeta = ({+ system,+ resources,+}: {+ system: System;+ resources: Record<string, any>;+}): PageMeta => {+ return {+ title: "Another page",+ description: "",+ excludePageFromSearch: true,+ language: "",+ socialImageAssetName: undefined,+ socialImageUrl: "",+ status: 200,+ redirect: "",+ custom: [],+ };+};++type Params = Record<string, string | undefined>;+export const getRemixParams = ({ ...params }: Params): Params => {+ return params;+};++export const projectId = "d845c167-ea07-4875-b08d-83e97c09dcce";++export const contactEmail = "[email protected]";diff --git a/fixtures/react-router-vercel/app/__generated__/[another-page]._index.tsx b/fixtures/react-router-vercel/app/__generated__/[another-page]._index.tsxnew file mode 100644index 0000000000..0f11ceedef--- /dev/null+++ b/fixtures/react-router-vercel/app/__generated__/[another-page]._index.tsx@@ -0,0 +1,37 @@+/* eslint-disable */+/* 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 },+};++// Font assets on current page (can be preloaded)+export const pageFontAssets: FontAsset[] = [];++export const pageBackgroundImageAssets: ImageAsset[] = [];++const Page = ({}: { system: any }) => {+ return (+ <Body className={`w-body`}>+ <Heading className={`w-heading`}>{"Another page"}</Heading>+ </Body>+ );+};++export { Page };diff --git a/fixtures/react-router-vercel/app/__generated__/_index.server.tsx b/fixtures/react-router-vercel/app/__generated__/_index.server.tsxnew file mode 100644index 0000000000..83d760a977--- /dev/null+++ b/fixtures/react-router-vercel/app/__generated__/_index.server.tsx@@ -0,0 +1,39 @@+/* eslint-disable */+/* This is a auto generated file for building the project */++import type { PageMeta } from "@webstudio-is/sdk";+import type { System, ResourceRequest } from "@webstudio-is/sdk";+export const getResources = (_props: { system: System }) => {+ const _data = new Map<string, ResourceRequest>([]);+ const _action = new Map<string, ResourceRequest>([]);+ return { data: _data, action: _action };+};++export const getPageMeta = ({+ system,+ resources,+}: {+ system: System;+ resources: Record<string, any>;+}): PageMeta => {+ return {+ title: "Home",+ description: undefined,+ excludePageFromSearch: undefined,+ language: undefined,+ socialImageAssetName: undefined,+ socialImageUrl: undefined,+ status: undefined,+ redirect: undefined,+ custom: [],+ };+};++type Params = Record<string, string | undefined>;+export const getRemixParams = ({ ...params }: Params): Params => {+ return params;+};++export const projectId = "d845c167-ea07-4875-b08d-83e97c09dcce";++export const contactEmail = "[email protected]";diff --git a/fixtures/react-router-vercel/app/__generated__/_index.tsx b/fixtures/react-router-vercel/app/__generated__/_index.tsxnew file mode 100644index 0000000000..9c073984cf--- /dev/null+++ b/fixtures/react-router-vercel/app/__generated__/_index.tsx@@ -0,0 +1,64 @@+/* eslint-disable */+/* 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,+ Link as Link,+} from "@webstudio-is/sdk-components-react-router";+import {+ Heading as Heading,+ Text as Text,+ Image as Image,+} 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 },+};++// Font assets on current page (can be preloaded)+export const pageFontAssets: FontAsset[] = [];++export const pageBackgroundImageAssets: ImageAsset[] = [];++export const CustomCode = () => {+ return <></>;+};++const Page = ({}: { system: any }) => {+ return (+ <Body className={`w-body c1jaw2zx cbipm55 ctniqj4 ctgx88l`}>+ <Heading className={`w-heading`}>{"Simple Project to test CLI"}</Heading>+ <Text className={`w-text cn3rfux`}>+ {"Please don't change directly in the fixture"}+ </Text>+ <Link href={"/another-page"} className={`w-link`}>+ {"Test another page link"}+ </Link>+ <Image+ src={"/assets/iconly_svg_converted-converted_zMaMiAAutUl8XrITgz7d1.svg"}+ width={14}+ height={16}+ className={`w-image c161qeci`}+ />+ <Image+ src={"https://picsum.photos/id/237/100/100.jpg?blur=4&grayscale"}+ className={`w-image`}+ />+ </Body>+ );+};++export { Page };diff --git a/fixtures/react-router-vercel/app/__generated__/index.css b/fixtures/react-router-vercel/app/__generated__/index.cssnew file mode 100644index 0000000000..dd85fdf13b--- /dev/null+++ b/fixtures/react-router-vercel/app/__generated__/index.css@@ -0,0 +1,118 @@+@media all {+ :root {+ display: grid;+ min-height: 100%;+ font-family: Arial, Roboto, sans-serif;+ font-size: 16px;+ line-height: 1.2;+ white-space: pre-wrap;+ white-space-collapse: preserve;+ }+ :where(body.w-body) {+ box-sizing: border-box;+ border-top-width: 1px;+ border-right-width: 1px;+ border-bottom-width: 1px;+ border-left-width: 1px;+ -webkit-font-smoothing: antialiased;+ -moz-osx-font-smoothing: grayscale;+ margin: 0;+ }+ :where(h1.w-heading) {+ box-sizing: border-box;+ border-top-width: 1px;+ border-right-width: 1px;+ border-bottom-width: 1px;+ border-left-width: 1px;+ outline-width: 1px;+ }+ :where(h2.w-heading) {+ box-sizing: border-box;+ border-top-width: 1px;+ border-right-width: 1px;+ border-bottom-width: 1px;+ border-left-width: 1px;+ outline-width: 1px;+ }+ :where(h3.w-heading) {+ box-sizing: border-box;+ border-top-width: 1px;+ border-right-width: 1px;+ border-bottom-width: 1px;+ border-left-width: 1px;+ outline-width: 1px;+ }+ :where(h4.w-heading) {+ box-sizing: border-box;+ border-top-width: 1px;+ border-right-width: 1px;+ border-bottom-width: 1px;+ border-left-width: 1px;+ outline-width: 1px;+ }+ :where(h5.w-heading) {+ box-sizing: border-box;+ border-top-width: 1px;+ border-right-width: 1px;+ border-bottom-width: 1px;+ border-left-width: 1px;+ outline-width: 1px;+ }+ :where(h6.w-heading) {+ box-sizing: border-box;+ border-top-width: 1px;+ border-right-width: 1px;+ border-bottom-width: 1px;+ border-left-width: 1px;+ outline-width: 1px;+ }+ :where(div.w-text) {+ box-sizing: border-box;+ border-top-width: 1px;+ border-right-width: 1px;+ border-bottom-width: 1px;+ border-left-width: 1px;+ outline-width: 1px;+ min-height: 1em;+ }+ :where(a.w-link) {+ box-sizing: border-box;+ border-top-width: 1px;+ border-right-width: 1px;+ border-bottom-width: 1px;+ border-left-width: 1px;+ outline-width: 1px;+ display: inline-block;+ }+ :where(img.w-image) {+ box-sizing: border-box;+ border-top-width: 1px;+ border-right-width: 1px;+ border-bottom-width: 1px;+ border-left-width: 1px;+ outline-width: 1px;+ max-width: 100%;+ display: block;+ height: auto;+ }+}+@media all {+ .c1jaw2zx {+ display: flex;+ }+ .cbipm55 {+ align-items: center;+ }+ .ctniqj4 {+ justify-content: center;+ }+ .ctgx88l {+ flex-direction: column;+ }+ .cn3rfux {+ margin-bottom: 1em;+ }+ .c161qeci {+ width: 400px;+ }+}diff --git a/fixtures/react-router-vercel/app/constants.mjs b/fixtures/react-router-vercel/app/constants.mjsnew file mode 100644index 0000000000..5ebdad372c--- /dev/null+++ b/fixtures/react-router-vercel/app/constants.mjs@@ -0,0 +1,25 @@+/**+ * 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 (import.meta.env.DEV) {+ 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/react-router-vercel/app/extension.ts b/fixtures/react-router-vercel/app/extension.tsnew file mode 100644index 0000000000..bffd05d48e--- /dev/null+++ b/fixtures/react-router-vercel/app/extension.ts@@ -0,0 +1,13 @@+import { ResourceRequest } from "@webstudio-is/sdk";++declare module "react-router" {+ interface AppLoadContext {+ EXCLUDE_FROM_SEARCH: boolean;+ getDefaultActionResource?: (options: {+ url: URL;+ projectId: string;+ contactEmail: string;+ formData: FormData;+ }) => ResourceRequest;+ }+}diff --git a/fixtures/react-router-vercel/app/root.tsx b/fixtures/react-router-vercel/app/root.tsxnew file mode 100644index 0000000000..aa2a8c4164--- /dev/null+++ b/fixtures/react-router-vercel/app/root.tsx@@ -0,0 +1,35 @@+/* eslint-disable @typescript-eslint/ban-ts-comment */++import { Links, Meta, Outlet, useMatches } from "react-router";+// @todo think about how to make __generated__ typeable+// @ts-ignore+import { CustomCode } from "./__generated__/_index";++const Root = () => {+ // Get language from matches+ const matches = useMatches();++ const lastMatchWithLanguage = matches.findLast((match) => {+ // @ts-ignore+ const language = match?.data?.pageMeta?.language;+ return language != null;+ });++ // @ts-ignore+ const lang = lastMatchWithLanguage?.data?.pageMeta?.language ?? "en";++ return (+ <html lang={lang}>+ <head>+ <meta charSet="utf-8" />+ <meta name="viewport" content="width=device-width,initial-scale=1" />+ <Meta />+ <Links />+ <CustomCode />+ </head>+ <Outlet />+ </html>+ );+};++export default Root;diff --git a/fixtures/react-router-vercel/app/routes.ts b/fixtures/react-router-vercel/app/routes.tsnew file mode 100644index 0000000000..4c05936cb6--- /dev/null+++ b/fixtures/react-router-vercel/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/react-router-vercel/app/routes/[another-page]._index.tsx b/fixtures/react-router-vercel/app/routes/[another-page]._index.tsxnew file mode 100644index 0000000000..e9d062f923--- /dev/null+++ b/fixtures/react-router-vercel/app/routes/[another-page]._index.tsx@@ -0,0 +1,295 @@+import {+ type MetaFunction,+ type LinksFunction,+ type LinkDescriptor,+ type ActionFunctionArgs,+ type LoaderFunctionArgs,+ type HeadersFunction,+ data,+ redirect,+ useLoaderData,+} from "react-router";+import {+ isLocalResource,+ loadResource,+ loadResources,+ formIdFieldName,+ formBotFieldName,+} from "@webstudio-is/sdk/runtime";+import {+ ReactSdkContext,+ PageSettingsMeta,+ PageSettingsTitle,+} from "@webstudio-is/react-sdk/runtime";+import {+ Page,+ siteName,+ favIconAsset,+ pageFontAssets,+ pageBackgroundImageAssets,+} from "../__generated__/[another-page]._index";+import {+ getResources,+ getPageMeta,+ getRemixParams,+ projectId,+ contactEmail,+} from "../__generated__/[another-page]._index.server";+import { assetBaseUrl, imageLoader } from "../constants.mjs";+import css from "../__generated__/index.css?url";+import { sitemap } from "../__generated__/$resources.sitemap.xml";++const customFetch: typeof fetch = (input, init) => {+ if (typeof input !== "string") {+ return fetch(input, init);+ }++ if (isLocalResource(input, "sitemap.xml")) {+ // @todo: dynamic import sitemap ???+ const response = new Response(JSON.stringify(sitemap));+ response.headers.set("content-type", "application/json; charset=utf-8");+ return Promise.resolve(response);+ }++ return fetch(input, init);+};++export const loader = async (arg: LoaderFunctionArgs) => {+ const url = new URL(arg.request.url);+ const host =+ arg.request.headers.get("x-forwarded-host") ||+ arg.request.headers.get("host") ||+ "";+ url.host = host;+ url.protocol = "https";++ const params = getRemixParams(arg.params);+ const system = {+ params,+ search: Object.fromEntries(url.searchParams),+ origin: url.origin,+ };++ const resources = await loadResources(+ customFetch,+ getResources({ system }).data+ );+ const pageMeta = getPageMeta({ system, resources });++ if (pageMeta.redirect) {+ const status =+ pageMeta.status === 301 || pageMeta.status === 302+ ? pageMeta.status+ : 302;+ throw redirect(pageMeta.redirect, status);+ }++ // typecheck+ arg.context.EXCLUDE_FROM_SEARCH satisfies boolean;++ if (arg.context.EXCLUDE_FROM_SEARCH) {+ pageMeta.excludePageFromSearch = arg.context.EXCLUDE_FROM_SEARCH;+ }++ return data(+ {+ host,+ url: url.href,+ system,+ resources,+ pageMeta,+ },+ // No way for current information to change, so add cache for 10 minutes+ // In case of CRM Data, this should be set to 0+ {+ status: pageMeta.status,+ headers: {+ "Cache-Control": "public, max-age=600",+ },+ }+ );+};++export const headers: HeadersFunction = () => {+ return {+ "Cache-Control": "public, max-age=0, must-revalidate",+ };+};++export const meta: MetaFunction<typeof loader> = ({ data }) => {+ const metas: ReturnType<MetaFunction> = [];+ if (data === undefined) {+ return metas;+ }++ const origin = `https://${data.host}`;++ if (siteName) {+ metas.push({+ "script:ld+json": {+ "@context": "https://schema.org",+ "@type": "WebSite",+ name: siteName,+ url: origin,+ },+ });+ }++ return metas;+};++export const links: LinksFunction = () => {+ const result: LinkDescriptor[] = [];++ result.push({+ rel: "stylesheet",+ href: css,+ });++ if (favIconAsset) {+ result.push({+ rel: "icon",+ href: imageLoader({+ src: `${assetBaseUrl}${favIconAsset.name}`,+ // width,height must be multiple of 48 https://developers.google.com/search/docs/appearance/favicon-in-search+ width: 144,+ height: 144,+ fit: "pad",+ quality: 100,+ format: "auto",+ }),+ type: undefined,+ });+ }++ for (const asset of pageFontAssets) {+ result.push({+ rel: "preload",+ href: `${assetBaseUrl}${asset.name}`,+ as: "font",+ crossOrigin: "anonymous",+ });+ }++ for (const backgroundImageAsset of pageBackgroundImageAssets) {+ result.push({+ rel: "preload",+ href: `${assetBaseUrl}${backgroundImageAsset.name}`,+ as: "image",+ });+ }++ return result;+};++const getRequestHost = (request: Request): string =>+ request.headers.get("x-forwarded-host") || request.headers.get("host") || "";++export const action = async ({+ request,+ context,+}: ActionFunctionArgs): Promise<+ { success: true } | { success: false; errors: string[] }+> => {+ try {+ const url = new URL(request.url);+ url.host = getRequestHost(request);++ const formData = await request.formData();++ const system = {+ params: {},+ search: {},+ origin: url.origin,+ };++ const resourceName = formData.get(formIdFieldName);+ let resource =+ typeof resourceName === "string"+ ? getResources({ system }).action.get(resourceName)+ : undefined;++ const formBotValue = formData.get(formBotFieldName);++ if (formBotValue == null || typeof formBotValue !== "string") {+ throw new Error("Form bot field not found");+ }++ const submitTime = parseInt(formBotValue, 16);+ // Assumes that the difference between the server time and the form submission time,+ // including any client-server time drift, is within a 5-minute range.+ // Note: submitTime might be NaN because formBotValue can be any string used for logging purposes.+ // Example: `formBotValue: jsdom`, or `formBotValue: headless-env`+ if (+ Number.isNaN(submitTime) ||+ Math.abs(Date.now() - submitTime) > 1000 * 60 * 5+ ) {+ throw new Error(`Form bot value invalid ${formBotValue}`);+ }++ formData.delete(formIdFieldName);+ formData.delete(formBotFieldName);++ if (resource) {+ resource.headers.push({+ name: "Content-Type",+ value: "application/json",+ });+ resource.body = Object.fromEntries(formData);+ } else {+ if (contactEmail === undefined) {+ throw new Error("Contact email not found");+ }++ resource = context.getDefaultActionResource?.({+ url,+ projectId,+ contactEmail,+ formData,+ });+ }++ if (resource === undefined) {+ throw Error("Resource not found");+ }+ const { ok, statusText } = await loadResource(fetch, resource);+ if (ok) {+ return { success: true };+ }+ return { success: false, errors: [statusText] };+ } catch (error) {+ console.error(error);++ return {+ success: false,+ errors: [error instanceof Error ? error.message : "Unknown error"],+ };+ }+};++const Outlet = () => {+ const { system, resources, url, pageMeta, host } =+ useLoaderData<typeof loader>();+ return (+ <ReactSdkContext.Provider+ value={{+ imageLoader,+ assetBaseUrl,+ resources,+ }}+ >+ {/* Use the URL as the key to force scripts in HTML Embed to reload on dynamic pages */}+ <Page key={url} system={system} />+ <PageSettingsMeta+ url={url}+ pageMeta={pageMeta}+ host={host}+ siteName={siteName}+ imageLoader={imageLoader}+ />+ <PageSettingsTitle>{pageMeta.title}</PageSettingsTitle>+ </ReactSdkContext.Provider>+ );+};++export default Outlet;diff --git a/fixtures/react-router-vercel/app/routes/[robots.txt].tsx b/fixtures/react-router-vercel/app/routes/[robots.txt].tsxnew file mode 100644index 0000000000..cb8fe07b8f--- /dev/null+++ b/fixtures/react-router-vercel/app/routes/[robots.txt].tsx@@ -0,0 +1,24 @@+import type { LoaderFunctionArgs } from "react-router";++export const loader = (arg: LoaderFunctionArgs) => {+ const host =+ arg.request.headers.get("x-forwarded-host") ||+ arg.request.headers.get("host") ||+ "";++ return new Response(+ `+User-agent: *+Disallow: /api/++Sitemap: https://${host}/sitemap.xml++ `,+ {+ headers: {+ "Content-Type": "text/plain",+ },+ status: 200,+ }+ );+};diff --git a/fixtures/react-router-vercel/app/routes/[sitemap.xml]._index.tsx b/fixtures/react-router-vercel/app/routes/[sitemap.xml]._index.tsxnew file mode 100644index 0000000000..8362eebee7--- /dev/null+++ b/fixtures/react-router-vercel/app/routes/[sitemap.xml]._index.tsx@@ -0,0 +1,34 @@+import type { LoaderFunctionArgs } from "react-router";+import { sitemap } from "../__generated__/$resources.sitemap.xml";++export const loader = (arg: LoaderFunctionArgs) => {+ const host =+ arg.request.headers.get("x-forwarded-host") ||+ arg.request.headers.get("host") ||+ "";++ const urls = sitemap.map((page) => {+ const url = new URL(`https://${host}${page.path}`);++ return `+ <url>+ <loc>${url.href}</loc>+ <lastmod>${page.lastModified.split("T")[0]}</lastmod>+ </url>+ `;+ });++ return new Response(+ `<?xml version="1.0" encoding="UTF-8"?>+<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">+${urls.join("")}+</urlset>+ `,+ {+ headers: {+ "Content-Type": "application/xml",+ },+ status: 200,+ }+ );+};diff --git a/fixtures/react-router-vercel/app/routes/_index.tsx b/fixtures/react-router-vercel/app/routes/_index.tsxnew file mode 100644index 0000000000..5ecd622ce9--- /dev/null+++ b/fixtures/react-router-vercel/app/routes/_index.tsx@@ -0,0 +1,295 @@+import {+ type MetaFunction,+ type LinksFunction,+ type LinkDescriptor,+ type ActionFunctionArgs,+ type LoaderFunctionArgs,+ type HeadersFunction,+ data,+ redirect,+ useLoaderData,+} from "react-router";+import {+ isLocalResource,+ loadResource,+ loadResources,+ formIdFieldName,+ formBotFieldName,+} from "@webstudio-is/sdk/runtime";+import {+ ReactSdkContext,+ PageSettingsMeta,+ PageSettingsTitle,+} from "@webstudio-is/react-sdk/runtime";+import {+ Page,+ siteName,+ favIconAsset,+ pageFontAssets,+ pageBackgroundImageAssets,+} from "../__generated__/_index";+import {+ getResources,+ getPageMeta,+ getRemixParams,+ projectId,+ contactEmail,+} from "../__generated__/_index.server";+import { assetBaseUrl, imageLoader } from "../constants.mjs";+import css from "../__generated__/index.css?url";+import { sitemap } from "../__generated__/$resources.sitemap.xml";++const customFetch: typeof fetch = (input, init) => {+ if (typeof input !== "string") {+ return fetch(input, init);+ }++ if (isLocalResource(input, "sitemap.xml")) {+ // @todo: dynamic import sitemap ???+ const response = new Response(JSON.stringify(sitemap));+ response.headers.set("content-type", "application/json; charset=utf-8");+ return Promise.resolve(response);+ }++ return fetch(input, init);+};++export const loader = async (arg: LoaderFunctionArgs) => {+ const url = new URL(arg.request.url);+ const host =+ arg.request.headers.get("x-forwarded-host") ||+ arg.request.headers.get("host") ||+ "";+ url.host = host;+ url.protocol = "https";++ const params = getRemixParams(arg.params);+ const system = {+ params,+ search: Object.fromEntries(url.searchParams),+ origin: url.origin,+ };++ const resources = await loadResources(+ customFetch,+ getResources({ system }).data+ );+ const pageMeta = getPageMeta({ system, resources });++ if (pageMeta.redirect) {+ const status =+ pageMeta.status === 301 || pageMeta.status === 302+ ? pageMeta.status+ : 302;+ throw redirect(pageMeta.redirect, status);+ }++ // typecheck+ arg.context.EXCLUDE_FROM_SEARCH satisfies boolean;++ if (arg.context.EXCLUDE_FROM_SEARCH) {+ pageMeta.excludePageFromSearch = arg.context.EXCLUDE_FROM_SEARCH;+ }++ return data(+ {+ host,+ url: url.href,+ system,+ resources,+ pageMeta,+ },+ // No way for current information to change, so add cache for 10 minutes+ // In case of CRM Data, this should be set to 0+ {+ status: pageMeta.status,+ headers: {+ "Cache-Control": "public, max-age=600",+ },+ }+ );+};++export const headers: HeadersFunction = () => {+ return {+ "Cache-Control": "public, max-age=0, must-revalidate",+ };+};++export const meta: MetaFunction<typeof loader> = ({ data }) => {+ const metas: ReturnType<MetaFunction> = [];+ if (data === undefined) {+ return metas;+ }++ const origin = `https://${data.host}`;++ if (siteName) {+ metas.push({+ "script:ld+json": {+ "@context": "https://schema.org",+ "@type": "WebSite",+ name: siteName,+ url: origin,+ },+ });+ }++ return metas;+};++export const links: LinksFunction = () => {+ const result: LinkDescriptor[] = [];++ result.push({+ rel: "stylesheet",+ href: css,+ });++ if (favIconAsset) {+ result.push({+ rel: "icon",+ href: imageLoader({+ src: `${assetBaseUrl}${favIconAsset.name}`,+ // width,height must be multiple of 48 https://developers.google.com/search/docs/appearance/favicon-in-search+ width: 144,+ height: 144,+ fit: "pad",+ quality: 100,+ format: "auto",+ }),+ type: undefined,+ });+ }++ for (const asset of pageFontAssets) {+ result.push({+ rel: "preload",+ href: `${assetBaseUrl}${asset.name}`,+ as: "font",+ crossOrigin: "anonymous",+ });+ }++ for (const backgroundImageAsset of pageBackgroundImageAssets) {+ result.push({+ rel: "preload",+ href: `${assetBaseUrl}${backgroundImageAsset.name}`,+ as: "image",+ });+ }++ return result;+};++const getRequestHost = (request: Request): string =>+ request.headers.get("x-forwarded-host") || request.headers.get("host") || "";++export const action = async ({+ request,+ context,+}: ActionFunctionArgs): Promise<+ { success: true } | { success: false; errors: string[] }+> => {+ try {+ const url = new URL(request.url);+ url.host = getRequestHost(request);++ const formData = await request.formData();++ const system = {+ params: {},+ search: {},+ origin: url.origin,+ };++ const resourceName = formData.get(formIdFieldName);+ let resource =+ typeof resourceName === "string"+ ? getResources({ system }).action.get(resourceName)+ : undefined;++ const formBotValue = formData.get(formBotFieldName);++ if (formBotValue == null || typeof formBotValue !== "string") {+ throw new Error("Form bot field not found");+ }++ const submitTime = parseInt(formBotValue, 16);+ // Assumes that the difference between the server time and the form submission time,+ // including any client-server time drift, is within a 5-minute range.+ // Note: submitTime might be NaN because formBotValue can be any string used for logging purposes.+ // Example: `formBotValue: jsdom`, or `formBotValue: headless-env`+ if (+ Number.isNaN(submitTime) ||+ Math.abs(Date.now() - submitTime) > 1000 * 60 * 5+ ) {+ throw new Error(`Form bot value invalid ${formBotValue}`);+ }++ formData.delete(formIdFieldName);+ formData.delete(formBotFieldName);++ if (resource) {+ resource.headers.push({+ name: "Content-Type",+ value: "application/json",+ });+ resource.body = Object.fromEntries(formData);+ } else {+ if (contactEmail === undefined) {+ throw new Error("Contact email not found");+ }++ resource = context.getDefaultActionResource?.({+ url,+ projectId,+ contactEmail,+ formData,+ });+ }++ if (resource === undefined) {+ throw Error("Resource not found");+ }+ const { ok, statusText } = await loadResource(fetch, resource);+ if (ok) {+ return { success: true };+ }+ return { success: false, errors: [statusText] };+ } catch (error) {+ console.error(error);++ return {+ success: false,+ errors: [error instanceof Error ? error.message : "Unknown error"],+ };+ }+};++const Outlet = () => {+ const { system, resources, url, pageMeta, host } =+ useLoaderData<typeof loader>();+ return (+ <ReactSdkContext.Provider+ value={{+ imageLoader,+ assetBaseUrl,+ resources,+ }}+ >+ {/* Use the URL as the key to force scripts in HTML Embed to reload on dynamic pages */}+ <Page key={url} system={system} />+ <PageSettingsMeta+ url={url}+ pageMeta={pageMeta}+ host={host}+ siteName={siteName}+ imageLoader={imageLoader}+ />+ <PageSettingsTitle>{pageMeta.title}</PageSettingsTitle>+ </ReactSdkContext.Provider>+ );+};++export default Outlet;diff --git a/fixtures/react-router-vercel/package.json b/fixtures/react-router-vercel/package.jsonnew file mode 100644index 0000000000..177ccafba3--- /dev/null+++ b/fixtures/react-router-vercel/package.json@@ -0,0 +1,43 @@+{+ "name": "webstudio-react-router-vercel",+ "scripts": {+ "typecheck": "tsc",+ "cli": "NODE_OPTIONS='--conditions=webstudio --import=tsx' webstudio",+ "fixtures:link": "pnpm cli link --link https://p-d845c167-ea07-4875-b08d-83e97c09dcce-dot-${BUILDER_HOST:-main.development.webstudio.is}'?authToken=e9d1343f-9298-4fd3-a66e-f89a5af2dd93'",+ "fixtures:sync": "pnpm cli sync --buildId f565d527-32e7-4731-bc71-aca9e9574587 && pnpm prettier --write ./.webstudio/",+ "fixtures:build": "pnpm cli build --template vercel --template .template && pnpm prettier --write ./app/ ./package.json ./tsconfig.json",+ "build": "react-router build",+ "dev": "react-router dev",+ "deploy": "npx vercel deploy"+ },+ "dependencies": {+ "@react-router/dev": "^7.1.5",+ "@react-router/fs-routes": "^7.1.5",+ "@react-router/node": "^7.1.5",+ "@vercel/react-router": "^1.0.2",+ "@webstudio-is/image": "workspace:*",+ "@webstudio-is/react-sdk": "workspace:*",+ "@webstudio-is/sdk": "workspace:*",+ "@webstudio-is/sdk-components-animation": "workspace:*",+ "@webstudio-is/sdk-components-react-radix": "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-router": "^7.1.5",+ "vite": "^5.4.11",+ "webstudio": "workspace:*"+ },+ "private": true,+ "type": "module",+ "sideEffects": false,+ "devDependencies": {+ "@types/react": "^18.2.70",+ "@types/react-dom": "^18.2.25",+ "typescript": "5.7.3"+ },+ "engines": {+ "node": ">=20.0.0"+ }+}diff --git a/fixtures/react-router-vercel/public/assets/147-1478573_cat-icon-png-black-cat-png-icon.png_ZJ6-qJjk1RlFzuYwyCXdp.jpeg b/fixtures/react-router-vercel/public/assets/147-1478573_cat-icon-png-black-cat-png-icon.png_ZJ6-qJjk1RlFzuYwyCXdp.jpegnew file mode 100644index 0000000000..9d5e2b8843Binary files /dev/null and b/fixtures/react-router-vercel/public/assets/147-1478573_cat-icon-png-black-cat-png-icon.png_ZJ6-qJjk1RlFzuYwyCXdp.jpeg differdiff --git a/fixtures/react-router-vercel/public/assets/iconly_svg_converted-converted_zMaMiAAutUl8XrITgz7d1.svg b/fixtures/react-router-vercel/public/assets/iconly_svg_converted-converted_zMaMiAAutUl8XrITgz7d1.svgnew file mode 100644index 0000000000..bc70d3a453--- /dev/null+++ b/fixtures/react-router-vercel/public/assets/iconly_svg_converted-converted_zMaMiAAutUl8XrITgz7d1.svg@@ -0,0 +1 @@+<svg width="14" height="16" xmlns="http://www.w3.org/2000/svg"><path d="M4.203.702a.713.713 0 0 0-.366.213c-.124.148-.137.208-.15.672l-.012.431-.443.015c-.481.017-.686.041-.991.117-.651.161-1.273.668-1.586 1.29a2.834 2.834 0 0 0-.252.839c-.038.241-.041.553-.041 4.366 0 4.4-.002 4.323.117 4.784.107.412.325.79.639 1.106.422.426.865.64 1.536.742.255.038.554.041 4.346.041s4.091-.003 4.346-.041c.671-.102 1.114-.316 1.536-.742.314-.316.532-.694.639-1.106.119-.461.117-.384.117-4.784 0-3.813-.003-4.125-.041-4.366a2.834 2.834 0 0 0-.252-.839c-.313-.622-.935-1.129-1.586-1.29-.305-.076-.51-.1-.991-.117l-.443-.015-.012-.431c-.013-.488-.039-.581-.204-.726C9.91.687 9.61.64 9.39.75c-.132.066-.302.249-.339.366a3.432 3.432 0 0 0-.038.5l-.011.414H4.998l-.011-.414a3.432 3.432 0 0 0-.038-.5c-.036-.115-.207-.3-.332-.361a.689.689 0 0 0-.414-.053m2.139 9.442-.007.088-.038-.105a5.451 5.451 0 0 0-.054-.142c-.01-.025.003-.045.039-.061.049-.022.054-.018.06.054a1.15 1.15 0 0 1 0 .166" fill-rule="evenodd"/></svg>\ No newline at end of filediff --git a/fixtures/react-router-vercel/public/favicon.ico b/fixtures/react-router-vercel/public/favicon.iconew file mode 100644index 0000000000..9cb8c815dcBinary files /dev/null and b/fixtures/react-router-vercel/public/favicon.ico differdiff --git a/fixtures/react-router-vercel/react-router.config.ts b/fixtures/react-router-vercel/react-router.config.tsnew file mode 100644index 0000000000..e002b06a1f--- /dev/null+++ b/fixtures/react-router-vercel/react-router.config.ts@@ -0,0 +1,6 @@+import type { Config } from "@react-router/dev/config";+import { vercelPreset } from "@vercel/react-router/vite";++export default {+ presets: [vercelPreset()],+} satisfies Config;diff --git a/fixtures/react-router-vercel/tsconfig.json b/fixtures/react-router-vercel/tsconfig.jsonnew file mode 100644index 0000000000..0744b14c56--- /dev/null+++ b/fixtures/react-router-vercel/tsconfig.json@@ -0,0 +1,19 @@+{+ "include": ["**/*.ts", "**/*.tsx", "**/*.mjs"],+ "compilerOptions": {+ "lib": ["DOM", "DOM.Iterable", "ESNext"],+ "types": ["vite/client", "@webstudio-is/react-sdk/placeholder"],+ "isolatedModules": true,+ "esModuleInterop": true,+ "jsx": "react-jsx",+ "module": "ESNext",+ "moduleResolution": "bundler",+ "target": "ES2022",+ "strict": true,+ "allowJs": true,+ "forceConsistentCasingInFileNames": true,+ "noEmit": true,+ "skipLibCheck": true,+ "customConditions": ["webstudio"]+ }+}diff --git a/fixtures/react-router-vercel/vercel.json b/fixtures/react-router-vercel/vercel.jsonnew file mode 100644index 0000000000..3c2f705ae1--- /dev/null+++ b/fixtures/react-router-vercel/vercel.json@@ -0,0 +1,12 @@+{+ "framework": "react-router",+ "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/react-router-vercel/vite.config.ts b/fixtures/react-router-vercel/vite.config.tsnew file mode 100644index 0000000000..317d7dc0a1--- /dev/null+++ b/fixtures/react-router-vercel/vite.config.ts@@ -0,0 +1,6 @@+import { defineConfig } from "vite";+import { reactRouter } from "@react-router/dev/vite";++export default defineConfig({+ plugins: [reactRouter()],+});diff --git a/fixtures/ssg-netlify-by-project-id/package.json b/fixtures/ssg-netlify-by-project-id/package.jsonindex 19e24e3ed3..57e3576cf5 100644--- a/fixtures/ssg-netlify-by-project-id/package.json+++ b/fixtures/ssg-netlify-by-project-id/package.json@@ -40,6 +40,6 @@"@webstudio-is/sdk-components-react-remix": "workspace:*","react": "18.3.0-canary-14898b6a9-20240318","react-dom": "18.3.0-canary-14898b6a9-20240318",- "vike": "^0.4.220"+ "vike": "^0.4.222"}}diff --git a/fixtures/ssg/package.json b/fixtures/ssg/package.jsonindex 6c9ad4d36f..37cc0f9535 100644--- a/fixtures/ssg/package.json+++ b/fixtures/ssg/package.json@@ -40,6 +40,6 @@"@webstudio-is/sdk-components-react-remix": "workspace:*","react": "18.3.0-canary-14898b6a9-20240318","react-dom": "18.3.0-canary-14898b6a9-20240318",- "vike": "^0.4.220"+ "vike": "^0.4.222"}}diff --git a/packages/cli/package.json b/packages/cli/package.jsonindex a7e44b6ecd..3e945f7025 100644--- a/packages/cli/package.json+++ b/packages/cli/package.json@@ -60,6 +60,7 @@"@types/react": "^18.2.70","@types/react-dom": "^18.2.25","@types/yargs": "^17.0.33",+ "@vercel/react-router": "^1.0.2","@vitejs/plugin-react": "^4.3.4","@webstudio-is/http-client": "workspace:*","@webstudio-is/image": "workspace:*",@@ -71,14 +72,14 @@"@webstudio-is/sdk-components-react-remix": "workspace:*","@webstudio-is/sdk-components-react-router": "workspace:*","@webstudio-is/tsconfig": "workspace:*",- "h3": "^1.14.0",+ "h3": "^1.15.0","ipx": "^3.0.1","prettier": "3.4.2","react": "18.3.0-canary-14898b6a9-20240318","react-dom": "18.3.0-canary-14898b6a9-20240318","react-router": "^7.1.5","ts-expect": "^1.3.0",- "vike": "^0.4.220",+ "vike": "^0.4.222","vite": "^5.4.11","vitest": "^3.0.4","wrangler": "^3.63.2"diff --git a/packages/cli/src/config.ts b/packages/cli/src/config.tsindex 2b4fefbbd1..9570e2ac1f 100644--- a/packages/cli/src/config.ts+++ b/packages/cli/src/config.ts@@ -66,6 +66,11 @@ export const PROJECT_TEMPLATES = [{value: "vercel" as const,label: "Vercel",+ expand: ["react-router", "react-router-vercel"],+ },+ {+ value: "vercel-legacy" as const,+ label: "Vercel (legacy)",expand: ["defaults", "vercel"],},{diff --git a/packages/cli/templates/react-router-docker/package.json b/packages/cli/templates/react-router-docker/package.jsonindex b27445da84..d2b1b80f95 100644--- a/packages/cli/templates/react-router-docker/package.json+++ b/packages/cli/templates/react-router-docker/package.json@@ -5,7 +5,7 @@"dependencies": {"@react-router/node": "^7.1.5","@react-router/serve": "^7.1.5",- "h3": "^1.14.0",+ "h3": "^1.15.0","ipx": "^3.0.1"}}diff --git a/packages/cli/templates/react-router-vercel/app/constants.mjs b/packages/cli/templates/react-router-vercel/app/constants.mjsnew file mode 100644index 0000000000..5ebdad372c--- /dev/null+++ b/packages/cli/templates/react-router-vercel/app/constants.mjs@@ -0,0 +1,25 @@+/**+ * 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 (import.meta.env.DEV) {+ 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/packages/cli/templates/react-router-vercel/package.json b/packages/cli/templates/react-router-vercel/package.jsonnew file mode 100644index 0000000000..b2b785b22e--- /dev/null+++ b/packages/cli/templates/react-router-vercel/package.json@@ -0,0 +1,9 @@+{+ "scripts": {+ "deploy": "npx vercel deploy"+ },+ "dependencies": {+ "@react-router/node": "^7.1.5",+ "@vercel/react-router": "^1.0.2"+ }+}diff --git a/packages/cli/templates/react-router-vercel/react-router.config.ts b/packages/cli/templates/react-router-vercel/react-router.config.tsnew file mode 100644index 0000000000..e002b06a1f--- /dev/null+++ b/packages/cli/templates/react-router-vercel/react-router.config.ts@@ -0,0 +1,6 @@+import type { Config } from "@react-router/dev/config";+import { vercelPreset } from "@vercel/react-router/vite";++export default {+ presets: [vercelPreset()],+} satisfies Config;diff --git a/packages/cli/templates/react-router-vercel/vercel.json b/packages/cli/templates/react-router-vercel/vercel.jsonnew file mode 100644index 0000000000..3c2f705ae1--- /dev/null+++ b/packages/cli/templates/react-router-vercel/vercel.json@@ -0,0 +1,12 @@+{+ "framework": "react-router",+ "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/packages/cli/templates/ssg/package.json b/packages/cli/templates/ssg/package.jsonindex cf65a6b75c..0d2fa68ee9 100644--- a/packages/cli/templates/ssg/package.json+++ b/packages/cli/templates/ssg/package.json@@ -16,7 +16,7 @@"@webstudio-is/sdk-components-react-radix": "0.0.0-webstudio-version","react": "18.3.0-canary-14898b6a9-20240318","react-dom": "18.3.0-canary-14898b6a9-20240318",- "vike": "^0.4.220"+ "vike": "^0.4.222"},"devDependencies": {"@types/react": "^18.2.70",diff --git a/packages/sdk/src/schema/deployment.ts b/packages/sdk/src/schema/deployment.tsindex 42047fb857..fc99d78223 100644--- a/packages/sdk/src/schema/deployment.ts+++ b/packages/sdk/src/schema/deployment.ts@@ -4,6 +4,7 @@ export const Templates = z.enum(["vanilla","docker","vercel",+ "vercel-legacy","netlify","ssg","ssg-netlify",diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 7555ebd3ee..5036bc9fdc 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -510,8 +510,8 @@ importers:specifier: workspace:*version: link:../../packages/sdk-components-react-routerh3:- specifier: ^1.14.0- version: 1.14.0+ specifier: ^1.15.0+ version: 1.15.0ipx:specifier: ^3.0.1version: 3.0.1@@ -608,6 +608,70 @@ importers:specifier: 5.7.3version: 5.7.3+ fixtures/react-router-vercel:+ dependencies:+ '@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])+ '@vercel/react-router':+ specifier: ^1.0.2+ version: 1.0.2(@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])))(@react-router/[email protected]([email protected]([email protected]([email protected]))([email protected]))([email protected]))([email protected])([email protected]([email protected]))([email protected])+ '@webstudio-is/image':+ specifier: workspace:*+ version: link:../../packages/image+ '@webstudio-is/react-sdk':+ specifier: workspace:*+ version: link:../../packages/react-sdk+ '@webstudio-is/sdk':+ specifier: workspace:*+ version: link:../../packages/sdk+ '@webstudio-is/sdk-components-animation':+ specifier: workspace:*+ version: link:../../packages/sdk-components-animation+ '@webstudio-is/sdk-components-react':+ specifier: workspace:*+ version: link:../../packages/sdk-components-react+ '@webstudio-is/sdk-components-react-radix':+ specifier: workspace:*+ version: link:../../packages/sdk-components-react-radix+ '@webstudio-is/sdk-components-react-router':+ specifier: workspace:*+ version: link:../../packages/sdk-components-react-router+ isbot:+ specifier: ^5.1.22+ version: 5.1.22+ react:+ specifier: 18.3.0-canary-14898b6a9-20240318+ version: 18.3.0-canary-14898b6a9-20240318+ react-dom:+ specifier: 18.3.0-canary-14898b6a9-20240318+ version: 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/cli+ devDependencies:+ '@types/react':+ specifier: ^18.2.70+ version: 18.2.79+ '@types/react-dom':+ specifier: ^18.2.25+ version: 18.2.25+ typescript:+ specifier: 5.7.3+ version: 5.7.3+fixtures/ssg:dependencies:'@webstudio-is/image':@@ -638,8 +702,8 @@ importers:specifier: 18.3.0-canary-14898b6a9-20240318version: 18.3.0-canary-14898b6a9-20240318([email protected])vike:- specifier: ^0.4.220- version: 0.4.220([email protected]([email protected]([email protected]))([email protected]))([email protected](@types/[email protected]))+ specifier: ^0.4.222+ version: 0.4.222([email protected]([email protected]([email protected]))([email protected]))([email protected](@types/[email protected]))devDependencies:'@types/react':specifier: ^18.2.70@@ -693,8 +757,8 @@ importers:specifier: 18.3.0-canary-14898b6a9-20240318version: 18.3.0-canary-14898b6a9-20240318([email protected])vike:- specifier: ^0.4.220- version: 0.4.220([email protected]([email protected]([email protected]))([email protected]))([email protected](@types/[email protected]))+ specifier: ^0.4.222+ version: 0.4.222([email protected]([email protected]([email protected]))([email protected]))([email protected](@types/[email protected]))devDependencies:'@types/react':specifier: ^18.2.70@@ -1053,6 +1117,9 @@ importers:'@types/yargs':specifier: ^17.0.33version: 17.0.33+ '@vercel/react-router':+ specifier: ^1.0.2+ version: 1.0.2(@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])))(@react-router/[email protected]([email protected]([email protected]([email protected]))([email protected]))([email protected]))([email protected])([email protected]([email protected]))([email protected])'@vitejs/plugin-react':specifier: ^4.3.4version: 4.3.4([email protected](@types/[email protected]))@@ -1087,8 +1154,8 @@ importers:specifier: workspace:*version: link:../tsconfigh3:- specifier: ^1.14.0- version: 1.14.0+ specifier: ^1.15.0+ version: 1.15.0ipx:specifier: ^3.0.1version: 3.0.1@@ -1108,8 +1175,8 @@ importers:specifier: ^1.3.0version: 1.3.0vike:- specifier: ^0.4.220- version: 0.4.220([email protected]([email protected]([email protected]))([email protected]))([email protected](@types/[email protected]))+ specifier: ^0.4.222+ version: 0.4.222([email protected]([email protected]([email protected]))([email protected]))([email protected](@types/[email protected]))vite:specifier: ^5.4.11version: 5.4.11(@types/[email protected])@@ -2339,8 +2406,8 @@ packages:'@brillout/[email protected]':resolution: {integrity: sha512-3I4LRHnVZXoSAsEoni5mosq9l6eiJED58d9V954W4CIZ88AUfYBanWGBGbJG3NztaRTpFHEA6wB3Hn93BmmJdg==}- '@brillout/[email protected]':- resolution: {integrity: sha512-Ug8CobLfbKJf3udr9v2PkzRkr69gn1jdE9k7u8n2Gizs/FhEM9Uudn3AsXXAikb4PONSGTqgj3CnEVchziDJQg==}+ '@brillout/[email protected]':+ resolution: {integrity: sha512-ELqCpB3l4dCZviobZKcHcNvuSPG86ZfBAHUYQWnf3K28PToBrXEagwPBEU/63ITcdpK9m7DOamQPcShtitTx5g==}'@bundled-es-modules/[email protected]':resolution: {integrity: sha512-8o+5fRPLNbjbdGRRmJj3h6Hh1AQJf2dk3qQ/5ZFb+PXkRNiSoMGGUKlsgLfrxneb72axVJyIYji64E2+nNfYyw==}@@ -5206,6 +5273,15 @@ packages:'@vanilla-extract/[email protected]':resolution: {integrity: sha512-6YXeOEKYTA3UV+RC8DeAjFk+/okoNz/h88R+McnzA2zpaVqTR/Ep+vszkWYlGBcMNO7vEkqbq5nT/JMMvhi+tw==}+ '@vercel/[email protected]':+ resolution: {integrity: sha512-DydjsjWCYiFNR18/KzxiDM8uJzt6iJJ4nNpma49+fGN5wo09APm+866wHQ/xuvUPpT+/ET4UzIa9tPBupuWS7Q==}+ peerDependencies:+ '@react-router/dev': '7'+ '@react-router/node': '7'+ isbot: '5'+ react: 18.3.0-canary-14898b6a9-20240318+ react-dom: 18.3.0-canary-14898b6a9-20240318+'@vercel/[email protected]':resolution: {integrity: sha512-JZJmuM/pZl5zLACRHzq2uOamzTOeiKRnco0o07A+hUxTKemhS1tqc2R9PdQ6Mf/8ZcXY5ZxW5tah3zjBea6D4w==}engines: {node: '>=18.0.0'}@@ -5817,8 +5893,8 @@ packages:resolution: {integrity: sha512-HsZgeVYaG+b5zA+9PbIPGq4+J/CJynJuearykPsXx4V/eMhyQ5EDVg3Ak2FBZtVXCiOLu/U7IiwDHTr9MA+IKw==}- resolution: {integrity: sha512-S2PpQHRcgYABOS2465b34wqTOn5dbLL+iSvyweJYGGFLDsKq88xrjDXUiEhfYkhWZq1HuS6of3okRHILbkrqxw==}+ resolution: {integrity: sha512-uj0O1ETYX1Bh6uSgktfPvwDiPYGQ3aI4qVsaC/LWpkIzGj1nUYm5FK3K+t11oOlpN01lGbprFCH4wBlKdJjVgw==}resolution: {integrity: sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==}@@ -6543,8 +6619,8 @@ packages:resolution: {integrity: sha512-4haO1M4mLO91PW57BMsDFf75UmwoRX0GkdD+Faw+Lr+r/OZrOCS0pIBwOL1xCKQqnQzbNFGgK2V2CpBUPeFNTw==}hasBin: true- resolution: {integrity: sha512-ao22eiONdgelqcnknw0iD645qW0s9NnrJHr5OBz4WOMdBdycfSas1EQf1wXRsm+PcB2Yoj43pjBPwqIpJQTeWg==}+ resolution: {integrity: sha512-OsjX4JW8J4XGgCgEcad20pepFQWnuKH+OwkCJjogF3C+9AZ1iYdtB4hX6vAb5DskBiu5ljEXqApINjR8CqoCMQ==}resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==}@@ -7594,6 +7670,9 @@ packages:resolution: {integrity: sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==}engines: {node: '>= 6.13.0'}+ resolution: {integrity: sha512-0uGYQ1WQL1M5kKvGRXWQ3uZCHtLTO8hln3oBjIusM75WoesZ909uQJs/Hb946i2SS+Gsrhkaa6iAO17jRIv6DQ==}+resolution: {integrity: sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==}@@ -8906,9 +8985,6 @@ packages:resolution: {integrity: sha512-u3TfBX02WzbHTpaEfWEKwDijDSFAHcgXkayUZ+MVDrjhLFvgAJzFGTSTmwlEhwWi2exyRQey23ah9wELMM6etg==}- resolution: {integrity: sha512-wY5bskBQFL9n3Eca5XnhH6KbUo/tfvkwm9OpcdCvLaeA7piBNbavbOKJySEwQ1V0RH6HvNlSAFRTpvTqgKRQXQ==}-resolution: {integrity: sha512-CLjCCLQ6UuMxWnbIylkisbRj31qxHPAurvena/0iwSVbQ2G1VY5/HjV0IRabOEbDHlzZlRdCrD4NhB0JtU40Pg==}@@ -9153,8 +9229,8 @@ packages:resolution: {integrity: sha512-ADBsmerdGBs2WYckrLBEmuETSPyTD4TuLxTrw0DvjirxW1ra4ZwkbzG8ndsv3Q57smvHxo677MHaQrY9yxH8cA==}- resolution: {integrity: sha512-9gB/Kha2tnHUyJpcJWMoL86hgW8NVxZsfolbvorTWIKkNsY77VpEUgLXiFnJCGBmim2p3PZFPxqxuxT9+VRfeA==}+ resolution: {integrity: sha512-SeUvh/hDMUW0T0kAJIPmqfW3ijJwMa4KPJhB5sInOq5QjZQI4y0D67kYGm8kUE349NPsfw4hD7kV9TyYz7TT7w==}engines: {node: '>=18.0.0'}hasBin: truepeerDependencies:@@ -9747,7 +9823,7 @@ snapshots:'@brillout/[email protected]': {}- '@brillout/[email protected]':+ '@brillout/[email protected]':dependencies:'@brillout/import': 0.2.3'@brillout/picocolors': 1.0.15@@ -12573,6 +12649,16 @@ snapshots:'@vanilla-extract/[email protected]': {}+ '@vercel/[email protected](@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])))(@react-router/[email protected]([email protected]([email protected]([email protected]))([email protected]))([email protected]))([email protected])([email protected]([email protected]))([email protected])':+ dependencies:+ '@react-router/dev': 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/node': 7.1.5([email protected]([email protected]([email protected]))([email protected]))([email protected])+ '@vercel/static-config': 3.0.0+ isbot: 5.1.22+ react: 18.3.0-canary-14898b6a9-20240318+ react-dom: 18.3.0-canary-14898b6a9-20240318([email protected])+ ts-morph: 12.0.0+'@vercel/[email protected](@remix-run/[email protected](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])))(@remix-run/[email protected]([email protected]))(@remix-run/[email protected]([email protected]))([email protected]([email protected]))([email protected])':dependencies:'@remix-run/dev': 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]))@@ -13262,7 +13348,7 @@ snapshots:dependencies:uncrypto: 0.1.3dependencies:uncrypto: 0.1.3@@ -14189,18 +14275,18 @@ snapshots:pumpify: 1.5.1through2: 2.0.5dependencies:cookie-es: 1.2.2- crossws: 0.3.2+ crossws: 0.3.4defu: 6.1.4destr: 2.0.3iron-webcrypto: 1.2.1+ node-mock-http: 1.0.0ohash: 1.1.4radix3: 1.1.2ufo: 1.5.4uncrypto: 0.1.3- unenv: 1.10.0@@ -14372,7 +14458,7 @@ snapshots:defu: 6.1.4destr: 2.0.3etag: 1.8.1- h3: 1.14.0+ h3: 1.15.0image-meta: 0.2.1listhen: 1.9.0ofetch: 1.4.1@@ -14691,7 +14777,7 @@ snapshots:crossws: 0.3.1defu: 6.1.4get-port-please: 3.1.2- h3: 1.14.0+ h3: 1.15.0http-shutdown: 1.2.2jiti: 2.4.2mlly: 1.7.4@@ -15608,6 +15694,8 @@ snapshots:+ [email protected]: {}+@@ -16989,14 +17077,6 @@ snapshots:pathe: 1.1.2ufo: 1.5.4- dependencies:- consola: 3.2.3- defu: 6.1.4- mime: 3.0.0- node-fetch-native: 1.6.4- pathe: 1.1.2-dependencies:base64-js: 1.5.1@@ -17092,7 +17172,7 @@ snapshots:anymatch: 3.1.3chokidar: 3.6.0destr: 2.0.3- h3: 1.14.0+ h3: 1.15.0lru-cache: 10.4.3node-fetch-native: 1.6.4ofetch: 1.4.1@@ -17208,13 +17288,13 @@ snapshots:unist-util-stringify-position: 3.0.3vfile-message: 3.1.3- [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])):dependencies:'@brillout/import': 0.2.3'@brillout/json-serializer': 0.5.15'@brillout/picocolors': 1.0.15'@brillout/require-shim': 0.1.2- '@brillout/vite-plugin-server-entry': 0.5.8+ '@brillout/vite-plugin-server-entry': 0.6.0acorn: 8.14.0cac: 6.7.14es-module-lexer: 1.6.0