webstudio 0.0.0-2738e1e → 0.0.0-5558cd0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cli.js CHANGED
@@ -84,6 +84,11 @@ const PROJECT_TEMPLATES = [
84
84
  {
85
85
  value: "vercel",
86
86
  label: "Vercel",
87
+ expand: ["react-router", "react-router-vercel"]
88
+ },
89
+ {
90
+ value: "vercel-legacy",
91
+ label: "Vercel (legacy)",
87
92
  expand: ["defaults", "vercel"]
88
93
  },
89
94
  {
@@ -93,12 +98,12 @@ const PROJECT_TEMPLATES = [
93
98
  },
94
99
  {
95
100
  value: "netlify-functions",
96
- label: "Netlify Functions",
101
+ label: "Netlify Functions (legacy)",
97
102
  expand: ["defaults", "netlify-functions"]
98
103
  },
99
104
  {
100
105
  value: "netlify-edge-functions",
101
- label: "Netlify Edge Functions",
106
+ label: "Netlify Edge Functions (legacy)",
102
107
  expand: ["defaults", "netlify-edge-functions"]
103
108
  },
104
109
  {
@@ -746,19 +751,13 @@ const prefixStyles = (styleMap) => {
746
751
  if (property === "backdrop-filter") {
747
752
  newStyleMap.set("-webkit-backdrop-filter", value);
748
753
  }
754
+ if (property === "view-timeline-name" || property === "scroll-timeline-name") {
755
+ newStyleMap.set(`--${property}`, value);
756
+ }
749
757
  newStyleMap.set(property, value);
750
758
  }
751
759
  return newStyleMap;
752
760
  };
753
- const captureError = (error, value) => {
754
- if (process.env.NODE_ENV === "development") {
755
- throw error;
756
- }
757
- setTimeout(() => {
758
- throw error;
759
- });
760
- return value;
761
- };
762
761
  const fallbackTransform = (styleValue) => {
763
762
  var _a;
764
763
  if (styleValue.type !== "fontFamily") {
@@ -850,7 +849,7 @@ const toValue = (styleValue, transformValue) => {
850
849
  if (value.type === "guaranteedInvalid") {
851
850
  return "";
852
851
  }
853
- return captureError(new Error("Unknown value type"), value);
852
+ return "";
854
853
  };
855
854
  const Unit = z.string();
856
855
  const UnitValue = z.object({
@@ -3451,7 +3450,7 @@ ${prop.name}={${propValue}}`;
3451
3450
  return "";
3452
3451
  }
3453
3452
  const indexVariable = scope.getName(`${instance.id}-index`, "index");
3454
- generatedElement += `{${collectionDataValue}?.map((${collectionItemValue}: any, ${indexVariable}: number) =>
3453
+ generatedElement += `{${collectionDataValue}?.map?.((${collectionItemValue}: any, ${indexVariable}: number) =>
3455
3454
  `;
3456
3455
  generatedElement += `<Fragment key={${indexVariable}}>
3457
3456
  `;
@@ -6000,7 +5999,7 @@ Please check webstudio --help for more details`
6000
5999
  assetsToDownload.push(
6001
6000
  limit(
6002
6001
  () => downloadAsset(
6003
- `${assetOrigin}/cgi/image/${asset.name}`,
6002
+ `${assetOrigin}/cgi/image/${asset.name}?format=raw`,
6004
6003
  asset.name,
6005
6004
  assetBaseUrl
6006
6005
  )
@@ -6417,6 +6416,7 @@ const getDeploymentInstructions = (deployTarget) => {
6417
6416
  switch (deployTarget) {
6418
6417
  case "vercel":
6419
6418
  return `Run ${pc.dim("npx vercel")} to publish on Vercel.`;
6419
+ case "netlify":
6420
6420
  case "netlify-functions":
6421
6421
  case "netlify-edge-functions":
6422
6422
  return [
@@ -6431,7 +6431,7 @@ const getDeploymentInstructions = (deployTarget) => {
6431
6431
  }
6432
6432
  };
6433
6433
  const name = "webstudio";
6434
- const version = "0.0.0-2738e1e";
6434
+ const version = "0.0.0-5558cd0";
6435
6435
  const description = "Webstudio CLI";
6436
6436
  const author = "Webstudio <github@webstudio.is>";
6437
6437
  const homepage = "https://webstudio.is";
@@ -6482,8 +6482,8 @@ const devDependencies = {
6482
6482
  "@netlify/remix-adapter": "^2.5.1",
6483
6483
  "@netlify/remix-edge-adapter": "3.4.2",
6484
6484
  "@netlify/vite-plugin-react-router": "^1.0.0",
6485
- "@react-router/dev": "^7.1.4",
6486
- "@react-router/fs-routes": "^7.1.4",
6485
+ "@react-router/dev": "^7.1.5",
6486
+ "@react-router/fs-routes": "^7.1.5",
6487
6487
  "@remix-run/cloudflare": "^2.15.2",
6488
6488
  "@remix-run/cloudflare-pages": "^2.15.2",
6489
6489
  "@remix-run/dev": "^2.15.2",
@@ -6509,11 +6509,11 @@ const devDependencies = {
6509
6509
  prettier: "3.4.2",
6510
6510
  react: "18.3.0-canary-14898b6a9-20240318",
6511
6511
  "react-dom": "18.3.0-canary-14898b6a9-20240318",
6512
- "react-router": "^7.1.4",
6512
+ "react-router": "^7.1.5",
6513
6513
  "ts-expect": "^1.3.0",
6514
6514
  vike: "^0.4.220",
6515
6515
  vite: "^5.4.11",
6516
- vitest: "^3.0.2",
6516
+ vitest: "^3.0.4",
6517
6517
  wrangler: "^3.63.2"
6518
6518
  };
6519
6519
  const packageJson = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webstudio",
3
- "version": "0.0.0-2738e1e",
3
+ "version": "0.0.0-5558cd0",
4
4
  "description": "Webstudio CLI",
5
5
  "author": "Webstudio <github@webstudio.is>",
6
6
  "homepage": "https://webstudio.is",
@@ -46,8 +46,8 @@
46
46
  "@netlify/remix-adapter": "^2.5.1",
47
47
  "@netlify/remix-edge-adapter": "3.4.2",
48
48
  "@netlify/vite-plugin-react-router": "^1.0.0",
49
- "@react-router/dev": "^7.1.4",
50
- "@react-router/fs-routes": "^7.1.4",
49
+ "@react-router/dev": "^7.1.5",
50
+ "@react-router/fs-routes": "^7.1.5",
51
51
  "@remix-run/cloudflare": "^2.15.2",
52
52
  "@remix-run/cloudflare-pages": "^2.15.2",
53
53
  "@remix-run/dev": "^2.15.2",
@@ -63,21 +63,21 @@
63
63
  "prettier": "3.4.2",
64
64
  "react": "18.3.0-canary-14898b6a9-20240318",
65
65
  "react-dom": "18.3.0-canary-14898b6a9-20240318",
66
- "react-router": "^7.1.4",
66
+ "react-router": "^7.1.5",
67
67
  "ts-expect": "^1.3.0",
68
68
  "vike": "^0.4.220",
69
69
  "vite": "^5.4.11",
70
- "vitest": "^3.0.2",
70
+ "vitest": "^3.0.4",
71
71
  "wrangler": "^3.63.2",
72
- "@webstudio-is/image": "0.0.0-2738e1e",
73
- "@webstudio-is/http-client": "0.0.0-2738e1e",
74
- "@webstudio-is/react-sdk": "0.0.0-2738e1e",
75
- "@webstudio-is/sdk": "0.0.0-2738e1e",
76
- "@webstudio-is/sdk-components-react": "0.0.0-2738e1e",
77
- "@webstudio-is/sdk-components-react-radix": "0.0.0-2738e1e",
78
- "@webstudio-is/sdk-components-react-remix": "0.0.0-2738e1e",
79
- "@webstudio-is/sdk-components-animation": "0.0.0-2738e1e",
80
- "@webstudio-is/sdk-components-react-router": "0.0.0-2738e1e",
72
+ "@webstudio-is/http-client": "0.0.0-5558cd0",
73
+ "@webstudio-is/image": "0.0.0-5558cd0",
74
+ "@webstudio-is/react-sdk": "0.0.0-5558cd0",
75
+ "@webstudio-is/sdk": "0.0.0-5558cd0",
76
+ "@webstudio-is/sdk-components-animation": "0.0.0-5558cd0",
77
+ "@webstudio-is/sdk-components-react": "0.0.0-5558cd0",
78
+ "@webstudio-is/sdk-components-react-remix": "0.0.0-5558cd0",
79
+ "@webstudio-is/sdk-components-react-radix": "0.0.0-5558cd0",
80
+ "@webstudio-is/sdk-components-react-router": "0.0.0-5558cd0",
81
81
  "@webstudio-is/tsconfig": "1.0.7"
82
82
  },
83
83
  "scripts": {
@@ -11,13 +11,13 @@
11
11
  "@remix-run/node": "2.15.2",
12
12
  "@remix-run/react": "2.15.2",
13
13
  "@remix-run/server-runtime": "2.15.2",
14
- "@webstudio-is/image": "0.0.0-2738e1e",
15
- "@webstudio-is/react-sdk": "0.0.0-2738e1e",
16
- "@webstudio-is/sdk": "0.0.0-2738e1e",
17
- "@webstudio-is/sdk-components-react": "0.0.0-2738e1e",
18
- "@webstudio-is/sdk-components-animation": "0.0.0-2738e1e",
19
- "@webstudio-is/sdk-components-react-radix": "0.0.0-2738e1e",
20
- "@webstudio-is/sdk-components-react-remix": "0.0.0-2738e1e",
14
+ "@webstudio-is/image": "0.0.0-5558cd0",
15
+ "@webstudio-is/react-sdk": "0.0.0-5558cd0",
16
+ "@webstudio-is/sdk": "0.0.0-5558cd0",
17
+ "@webstudio-is/sdk-components-react": "0.0.0-5558cd0",
18
+ "@webstudio-is/sdk-components-animation": "0.0.0-5558cd0",
19
+ "@webstudio-is/sdk-components-react-radix": "0.0.0-5558cd0",
20
+ "@webstudio-is/sdk-components-react-remix": "0.0.0-5558cd0",
21
21
  "isbot": "^5.1.22",
22
22
  "react": "18.3.0-canary-14898b6a9-20240318",
23
23
  "react-dom": "18.3.0-canary-14898b6a9-20240318"
@@ -5,24 +5,22 @@
5
5
  "scripts": {
6
6
  "build": "react-router build",
7
7
  "dev": "react-router dev",
8
- "start": "react-router-serve ./build/server/index.js",
9
8
  "typecheck": "tsc"
10
9
  },
11
10
  "dependencies": {
12
- "@react-router/dev": "^7.1.4",
13
- "@react-router/fs-routes": "^7.1.4",
14
- "@react-router/serve": "^7.1.4",
15
- "@webstudio-is/image": "0.0.0-2738e1e",
16
- "@webstudio-is/react-sdk": "0.0.0-2738e1e",
17
- "@webstudio-is/sdk": "0.0.0-2738e1e",
18
- "@webstudio-is/sdk-components-animation": "0.0.0-2738e1e",
19
- "@webstudio-is/sdk-components-react-radix": "0.0.0-2738e1e",
20
- "@webstudio-is/sdk-components-react-router": "0.0.0-2738e1e",
21
- "@webstudio-is/sdk-components-react": "0.0.0-2738e1e",
11
+ "@react-router/dev": "^7.1.5",
12
+ "@react-router/fs-routes": "^7.1.5",
13
+ "@webstudio-is/image": "0.0.0-5558cd0",
14
+ "@webstudio-is/react-sdk": "0.0.0-5558cd0",
15
+ "@webstudio-is/sdk": "0.0.0-5558cd0",
16
+ "@webstudio-is/sdk-components-animation": "0.0.0-5558cd0",
17
+ "@webstudio-is/sdk-components-react-radix": "0.0.0-5558cd0",
18
+ "@webstudio-is/sdk-components-react-router": "0.0.0-5558cd0",
19
+ "@webstudio-is/sdk-components-react": "0.0.0-5558cd0",
22
20
  "isbot": "^5.1.22",
23
21
  "react": "18.3.0-canary-14898b6a9-20240318",
24
22
  "react-dom": "18.3.0-canary-14898b6a9-20240318",
25
- "react-router": "^7.1.4",
23
+ "react-router": "^7.1.5",
26
24
  "vite": "^5.4.11"
27
25
  },
28
26
  "devDependencies": {
@@ -1,6 +1,10 @@
1
1
  {
2
+ "scripts": {
3
+ "start": "react-router-serve ./build/server/index.js"
4
+ },
2
5
  "dependencies": {
3
- "@react-router/node": "^7.1.4",
6
+ "@react-router/node": "^7.1.5",
7
+ "@react-router/serve": "^7.1.5",
4
8
  "h3": "^1.14.0",
5
9
  "ipx": "^3.0.1"
6
10
  }
@@ -8,7 +8,7 @@ export const assetBaseUrl = "/assets/";
8
8
  * @type {import("@webstudio-is/image").ImageLoader}
9
9
  */
10
10
  export const imageLoader = (props) => {
11
- if (process.env.NODE_ENV !== "production") {
11
+ if (import.meta.env.DEV) {
12
12
  return props.src;
13
13
  }
14
14
 
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "scripts": {
3
- "start": "npx netlify-cli serve"
3
+ "start": "npx netlify-cli serve",
4
+ "deploy": "npx netlify-cli deploy --build --prod"
4
5
  },
5
6
  "dependencies": {
6
7
  "@netlify/vite-plugin-react-router": "^1.0.0",
7
- "@react-router/node": "^7.1.4"
8
+ "@react-router/node": "^7.1.5"
8
9
  }
9
10
  }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * We use mjs extension as constants in this file is shared with the build script
3
+ * and we use `node --eval` to extract the constants.
4
+ */
5
+ export const assetBaseUrl = "/assets/";
6
+
7
+ /**
8
+ * @type {import("@webstudio-is/image").ImageLoader}
9
+ */
10
+ export const imageLoader = (props) => {
11
+ if (process.env.NODE_ENV !== "production") {
12
+ return props.src;
13
+ }
14
+
15
+ if (props.format === "raw") {
16
+ return props.src;
17
+ }
18
+
19
+ // https://vercel.com/blog/build-your-own-web-framework#automatic-image-optimization
20
+ const searchParams = new URLSearchParams();
21
+ searchParams.set("url", props.src);
22
+ searchParams.set("w", props.width.toString());
23
+ searchParams.set("q", props.quality.toString());
24
+ return `/_vercel/image?${searchParams}`;
25
+ };
@@ -0,0 +1,9 @@
1
+ {
2
+ "scripts": {
3
+ "start": "npx vercel dev",
4
+ "deploy": "npx vercel deploy"
5
+ },
6
+ "dependencies": {
7
+ "@react-router/node": "^7.1.5"
8
+ }
9
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "images": {
3
+ "domains": [],
4
+ "sizes": [
5
+ 16, 32, 48, 64, 96, 128, 144, 256, 384, 640, 750, 828, 1080, 1200, 1920,
6
+ 2048, 3840
7
+ ],
8
+ "minimumCacheTTL": 60,
9
+ "formats": ["image/webp", "image/avif"]
10
+ }
11
+ }
@@ -8,12 +8,12 @@
8
8
  "typecheck": "tsc"
9
9
  },
10
10
  "dependencies": {
11
- "@webstudio-is/image": "0.0.0-2738e1e",
12
- "@webstudio-is/react-sdk": "0.0.0-2738e1e",
13
- "@webstudio-is/sdk": "0.0.0-2738e1e",
14
- "@webstudio-is/sdk-components-react": "0.0.0-2738e1e",
15
- "@webstudio-is/sdk-components-animation": "0.0.0-2738e1e",
16
- "@webstudio-is/sdk-components-react-radix": "0.0.0-2738e1e",
11
+ "@webstudio-is/image": "0.0.0-5558cd0",
12
+ "@webstudio-is/react-sdk": "0.0.0-5558cd0",
13
+ "@webstudio-is/sdk": "0.0.0-5558cd0",
14
+ "@webstudio-is/sdk-components-react": "0.0.0-5558cd0",
15
+ "@webstudio-is/sdk-components-animation": "0.0.0-5558cd0",
16
+ "@webstudio-is/sdk-components-react-radix": "0.0.0-5558cd0",
17
17
  "react": "18.3.0-canary-14898b6a9-20240318",
18
18
  "react-dom": "18.3.0-canary-14898b6a9-20240318",
19
19
  "vike": "^0.4.220"