webstudio 0.0.0-c575b54 → 0.0.0-ec9bae5

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/README.md CHANGED
@@ -129,13 +129,7 @@ You can configure the project to support netlify serverless/edge-functions respe
129
129
  You can manually change it using the `build` command. For serverless functions:
130
130
 
131
131
  ```bash
132
- webstudio build --template netlify-functions
133
- ```
134
-
135
- and for edge functions:
136
-
137
- ```bash
138
- webstudio build --template netlify-edge-functions
132
+ webstudio build --template netlify
139
133
  ```
140
134
 
141
135
  ## Important Notes
package/lib/cli.js CHANGED
@@ -91,16 +91,6 @@ const PROJECT_TEMPLATES = [
91
91
  label: "Netlify",
92
92
  expand: ["react-router", "react-router-netlify"]
93
93
  },
94
- {
95
- value: "netlify-functions",
96
- label: "Netlify Functions",
97
- expand: ["defaults", "netlify-functions"]
98
- },
99
- {
100
- value: "netlify-edge-functions",
101
- label: "Netlify Edge Functions",
102
- expand: ["defaults", "netlify-edge-functions"]
103
- },
104
94
  {
105
95
  value: "ssg",
106
96
  label: "Static Site Generation (SSG)"
@@ -746,19 +736,13 @@ const prefixStyles = (styleMap) => {
746
736
  if (property === "backdrop-filter") {
747
737
  newStyleMap.set("-webkit-backdrop-filter", value);
748
738
  }
739
+ if (property === "view-timeline-name" || property === "scroll-timeline-name") {
740
+ newStyleMap.set(`--${property}`, value);
741
+ }
749
742
  newStyleMap.set(property, value);
750
743
  }
751
744
  return newStyleMap;
752
745
  };
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
746
  const fallbackTransform = (styleValue) => {
763
747
  var _a;
764
748
  if (styleValue.type !== "fontFamily") {
@@ -850,7 +834,7 @@ const toValue = (styleValue, transformValue) => {
850
834
  if (value.type === "guaranteedInvalid") {
851
835
  return "";
852
836
  }
853
- return captureError(new Error("Unknown value type"), value);
837
+ return "";
854
838
  };
855
839
  const Unit = z.string();
856
840
  const UnitValue = z.object({
@@ -3451,7 +3435,7 @@ ${prop.name}={${propValue}}`;
3451
3435
  return "";
3452
3436
  }
3453
3437
  const indexVariable = scope.getName(`${instance.id}-index`, "index");
3454
- generatedElement += `{${collectionDataValue}?.map((${collectionItemValue}: any, ${indexVariable}: number) =>
3438
+ generatedElement += `{${collectionDataValue}?.map?.((${collectionItemValue}: any, ${indexVariable}: number) =>
3455
3439
  `;
3456
3440
  generatedElement += `<Fragment key={${indexVariable}}>
3457
3441
  `;
@@ -4611,7 +4595,7 @@ const meta$4 = {
4611
4595
  const meta$3 = {
4612
4596
  category: "hidden",
4613
4597
  icon: ResourceIcon,
4614
- type: "container",
4598
+ type: "embed",
4615
4599
  constraints: {
4616
4600
  relation: "parent",
4617
4601
  component: { $eq: "HeadSlot" }
@@ -4620,7 +4604,7 @@ const meta$3 = {
4620
4604
  const meta$2 = {
4621
4605
  category: "hidden",
4622
4606
  icon: WindowInfoIcon,
4623
- type: "container",
4607
+ type: "embed",
4624
4608
  constraints: {
4625
4609
  relation: "parent",
4626
4610
  component: { $eq: "HeadSlot" }
@@ -6000,7 +5984,7 @@ Please check webstudio --help for more details`
6000
5984
  assetsToDownload.push(
6001
5985
  limit(
6002
5986
  () => downloadAsset(
6003
- `${assetOrigin}/cgi/image/${asset.name}?format=auto`,
5987
+ `${assetOrigin}/cgi/image/${asset.name}?format=raw`,
6004
5988
  asset.name,
6005
5989
  assetBaseUrl
6006
5990
  )
@@ -6417,8 +6401,7 @@ const getDeploymentInstructions = (deployTarget) => {
6417
6401
  switch (deployTarget) {
6418
6402
  case "vercel":
6419
6403
  return `Run ${pc.dim("npx vercel")} to publish on Vercel.`;
6420
- case "netlify-functions":
6421
- case "netlify-edge-functions":
6404
+ case "netlify":
6422
6405
  return [
6423
6406
  `To deploy to Netlify, run the following commands: `,
6424
6407
  `Run ${pc.dim("npx netlify-cli login")} to login to Netlify.`,
@@ -6431,7 +6414,7 @@ const getDeploymentInstructions = (deployTarget) => {
6431
6414
  }
6432
6415
  };
6433
6416
  const name = "webstudio";
6434
- const version = "0.0.0-c575b54";
6417
+ const version = "0.0.0-ec9bae5";
6435
6418
  const description = "Webstudio CLI";
6436
6419
  const author = "Webstudio <github@webstudio.is>";
6437
6420
  const homepage = "https://webstudio.is";
@@ -6462,7 +6445,7 @@ const engines = {
6462
6445
  node: ">=20.12"
6463
6446
  };
6464
6447
  const dependencies = {
6465
- "@clack/prompts": "^0.9.1",
6448
+ "@clack/prompts": "^0.10.0",
6466
6449
  "@emotion/hash": "^0.9.2",
6467
6450
  acorn: "^8.14.0",
6468
6451
  "acorn-walk": "^8.3.4",
@@ -6479,11 +6462,9 @@ const dependencies = {
6479
6462
  zod: "^3.22.4"
6480
6463
  };
6481
6464
  const devDependencies = {
6482
- "@netlify/remix-adapter": "^2.5.1",
6483
- "@netlify/remix-edge-adapter": "3.4.2",
6484
6465
  "@netlify/vite-plugin-react-router": "^1.0.0",
6485
- "@react-router/dev": "^7.1.4",
6486
- "@react-router/fs-routes": "^7.1.4",
6466
+ "@react-router/dev": "^7.1.5",
6467
+ "@react-router/fs-routes": "^7.1.5",
6487
6468
  "@remix-run/cloudflare": "^2.15.2",
6488
6469
  "@remix-run/cloudflare-pages": "^2.15.2",
6489
6470
  "@remix-run/dev": "^2.15.2",
@@ -6509,11 +6490,11 @@ const devDependencies = {
6509
6490
  prettier: "3.4.2",
6510
6491
  react: "18.3.0-canary-14898b6a9-20240318",
6511
6492
  "react-dom": "18.3.0-canary-14898b6a9-20240318",
6512
- "react-router": "^7.1.4",
6493
+ "react-router": "^7.1.5",
6513
6494
  "ts-expect": "^1.3.0",
6514
6495
  vike: "^0.4.220",
6515
6496
  vite: "^5.4.11",
6516
- vitest: "^3.0.2",
6497
+ vitest: "^3.0.4",
6517
6498
  wrangler: "^3.63.2"
6518
6499
  };
6519
6500
  const packageJson = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webstudio",
3
- "version": "0.0.0-c575b54",
3
+ "version": "0.0.0-ec9bae5",
4
4
  "description": "Webstudio CLI",
5
5
  "author": "Webstudio <github@webstudio.is>",
6
6
  "homepage": "https://webstudio.is",
@@ -26,7 +26,7 @@
26
26
  "node": ">=20.12"
27
27
  },
28
28
  "dependencies": {
29
- "@clack/prompts": "^0.9.1",
29
+ "@clack/prompts": "^0.10.0",
30
30
  "@emotion/hash": "^0.9.2",
31
31
  "acorn": "^8.14.0",
32
32
  "acorn-walk": "^8.3.4",
@@ -43,11 +43,9 @@
43
43
  "zod": "^3.22.4"
44
44
  },
45
45
  "devDependencies": {
46
- "@netlify/remix-adapter": "^2.5.1",
47
- "@netlify/remix-edge-adapter": "3.4.2",
48
46
  "@netlify/vite-plugin-react-router": "^1.0.0",
49
- "@react-router/dev": "^7.1.4",
50
- "@react-router/fs-routes": "^7.1.4",
47
+ "@react-router/dev": "^7.1.5",
48
+ "@react-router/fs-routes": "^7.1.5",
51
49
  "@remix-run/cloudflare": "^2.15.2",
52
50
  "@remix-run/cloudflare-pages": "^2.15.2",
53
51
  "@remix-run/dev": "^2.15.2",
@@ -63,22 +61,22 @@
63
61
  "prettier": "3.4.2",
64
62
  "react": "18.3.0-canary-14898b6a9-20240318",
65
63
  "react-dom": "18.3.0-canary-14898b6a9-20240318",
66
- "react-router": "^7.1.4",
64
+ "react-router": "^7.1.5",
67
65
  "ts-expect": "^1.3.0",
68
66
  "vike": "^0.4.220",
69
67
  "vite": "^5.4.11",
70
- "vitest": "^3.0.2",
68
+ "vitest": "^3.0.4",
71
69
  "wrangler": "^3.63.2",
72
- "@webstudio-is/http-client": "0.0.0-c575b54",
73
- "@webstudio-is/react-sdk": "0.0.0-c575b54",
74
- "@webstudio-is/image": "0.0.0-c575b54",
75
- "@webstudio-is/sdk": "0.0.0-c575b54",
76
- "@webstudio-is/sdk-components-react": "0.0.0-c575b54",
77
- "@webstudio-is/sdk-components-animation": "0.0.0-c575b54",
78
- "@webstudio-is/sdk-components-react-radix": "0.0.0-c575b54",
79
- "@webstudio-is/sdk-components-react-remix": "0.0.0-c575b54",
80
- "@webstudio-is/sdk-components-react-router": "0.0.0-c575b54",
81
- "@webstudio-is/tsconfig": "1.0.7"
70
+ "@webstudio-is/http-client": "0.0.0-ec9bae5",
71
+ "@webstudio-is/react-sdk": "0.0.0-ec9bae5",
72
+ "@webstudio-is/sdk": "0.0.0-ec9bae5",
73
+ "@webstudio-is/sdk-components-animation": "0.0.0-ec9bae5",
74
+ "@webstudio-is/sdk-components-react": "0.0.0-ec9bae5",
75
+ "@webstudio-is/sdk-components-react-radix": "0.0.0-ec9bae5",
76
+ "@webstudio-is/sdk-components-react-remix": "0.0.0-ec9bae5",
77
+ "@webstudio-is/sdk-components-react-router": "0.0.0-ec9bae5",
78
+ "@webstudio-is/tsconfig": "1.0.7",
79
+ "@webstudio-is/image": "0.0.0-ec9bae5"
82
80
  },
83
81
  "scripts": {
84
82
  "typecheck": "tsc",
@@ -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-c575b54",
15
- "@webstudio-is/react-sdk": "0.0.0-c575b54",
16
- "@webstudio-is/sdk": "0.0.0-c575b54",
17
- "@webstudio-is/sdk-components-react": "0.0.0-c575b54",
18
- "@webstudio-is/sdk-components-animation": "0.0.0-c575b54",
19
- "@webstudio-is/sdk-components-react-radix": "0.0.0-c575b54",
20
- "@webstudio-is/sdk-components-react-remix": "0.0.0-c575b54",
14
+ "@webstudio-is/image": "0.0.0-ec9bae5",
15
+ "@webstudio-is/react-sdk": "0.0.0-ec9bae5",
16
+ "@webstudio-is/sdk": "0.0.0-ec9bae5",
17
+ "@webstudio-is/sdk-components-react": "0.0.0-ec9bae5",
18
+ "@webstudio-is/sdk-components-animation": "0.0.0-ec9bae5",
19
+ "@webstudio-is/sdk-components-react-radix": "0.0.0-ec9bae5",
20
+ "@webstudio-is/sdk-components-react-remix": "0.0.0-ec9bae5",
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-c575b54",
16
- "@webstudio-is/react-sdk": "0.0.0-c575b54",
17
- "@webstudio-is/sdk": "0.0.0-c575b54",
18
- "@webstudio-is/sdk-components-animation": "0.0.0-c575b54",
19
- "@webstudio-is/sdk-components-react-radix": "0.0.0-c575b54",
20
- "@webstudio-is/sdk-components-react-router": "0.0.0-c575b54",
21
- "@webstudio-is/sdk-components-react": "0.0.0-c575b54",
11
+ "@react-router/dev": "^7.1.5",
12
+ "@react-router/fs-routes": "^7.1.5",
13
+ "@webstudio-is/image": "0.0.0-ec9bae5",
14
+ "@webstudio-is/react-sdk": "0.0.0-ec9bae5",
15
+ "@webstudio-is/sdk": "0.0.0-ec9bae5",
16
+ "@webstudio-is/sdk-components-animation": "0.0.0-ec9bae5",
17
+ "@webstudio-is/sdk-components-react-radix": "0.0.0-ec9bae5",
18
+ "@webstudio-is/sdk-components-react-router": "0.0.0-ec9bae5",
19
+ "@webstudio-is/sdk-components-react": "0.0.0-ec9bae5",
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
  }
@@ -8,12 +8,12 @@
8
8
  "typecheck": "tsc"
9
9
  },
10
10
  "dependencies": {
11
- "@webstudio-is/image": "0.0.0-c575b54",
12
- "@webstudio-is/react-sdk": "0.0.0-c575b54",
13
- "@webstudio-is/sdk": "0.0.0-c575b54",
14
- "@webstudio-is/sdk-components-react": "0.0.0-c575b54",
15
- "@webstudio-is/sdk-components-animation": "0.0.0-c575b54",
16
- "@webstudio-is/sdk-components-react-radix": "0.0.0-c575b54",
11
+ "@webstudio-is/image": "0.0.0-ec9bae5",
12
+ "@webstudio-is/react-sdk": "0.0.0-ec9bae5",
13
+ "@webstudio-is/sdk": "0.0.0-ec9bae5",
14
+ "@webstudio-is/sdk-components-react": "0.0.0-ec9bae5",
15
+ "@webstudio-is/sdk-components-animation": "0.0.0-ec9bae5",
16
+ "@webstudio-is/sdk-components-react-radix": "0.0.0-ec9bae5",
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"
@@ -1,29 +0,0 @@
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://docs.netlify.com/image-cdn/overview/
20
- const searchParams = new URLSearchParams();
21
- searchParams.set("url", props.src);
22
- searchParams.set("w", props.width.toString());
23
- if (props.height) {
24
- searchParams.set("h", props.height.toString());
25
- }
26
- searchParams.set("q", props.quality.toString());
27
- // fit=contain by default
28
- return `/.netlify/images?${searchParams}`;
29
- };
@@ -1,21 +0,0 @@
1
- import type { EntryContext } from "@remix-run/node";
2
- import { RemixServer } from "@remix-run/react";
3
- import { renderToString } from "react-dom/server";
4
-
5
- export default function handleRequest(
6
- request: Request,
7
- responseStatusCode: number,
8
- responseHeaders: Headers,
9
- remixContext: EntryContext
10
- ) {
11
- const markup = renderToString(
12
- <RemixServer context={remixContext} url={request.url} />
13
- );
14
-
15
- responseHeaders.set("Content-Type", "text/html");
16
-
17
- return new Response("<!DOCTYPE html>" + markup, {
18
- headers: responseHeaders,
19
- status: responseStatusCode,
20
- });
21
- }
@@ -1,16 +0,0 @@
1
- [build]
2
- command = "npm run build"
3
- publish = "build/client"
4
-
5
- [dev]
6
- command = "npm run dev"
7
- framework = "vite"
8
-
9
- # Set immutable caching for static files, because they have fingerprinted filenames
10
-
11
- [[headers]]
12
- for = "/build/*"
13
-
14
- [headers.values]
15
-
16
- "Cache-Control" = "public, max-age=31560000, immutable"
@@ -1,9 +0,0 @@
1
- {
2
- "scripts": {
3
- "start": "netlify serve"
4
- },
5
- "dependencies": {
6
- "@netlify/edge-functions": "^2.11.1",
7
- "@netlify/remix-edge-adapter": "^3.4.2"
8
- }
9
- }
@@ -1,18 +0,0 @@
1
- import { vitePlugin as remix } from "@remix-run/dev";
2
- import { defineConfig } from "vite";
3
- import { netlifyPlugin } from "@netlify/remix-edge-adapter/plugin";
4
-
5
- export default defineConfig({
6
- plugins: [
7
- remix({
8
- future: {
9
- v3_lazyRouteDiscovery: false,
10
- v3_relativeSplatPath: false,
11
- v3_singleFetch: false,
12
- v3_fetcherPersist: false,
13
- v3_throwAbortReason: false,
14
- },
15
- }),
16
- netlifyPlugin(),
17
- ],
18
- });
@@ -1,29 +0,0 @@
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://docs.netlify.com/image-cdn/overview/
20
- const searchParams = new URLSearchParams();
21
- searchParams.set("url", props.src);
22
- searchParams.set("w", props.width.toString());
23
- if (props.height) {
24
- searchParams.set("h", props.height.toString());
25
- }
26
- searchParams.set("q", props.quality.toString());
27
- // fit=contain by default
28
- return `/.netlify/images?${searchParams}`;
29
- };
@@ -1 +0,0 @@
1
- export { handleRequest as default } from "@netlify/remix-adapter";
@@ -1,16 +0,0 @@
1
- [build]
2
- command = "npm run build"
3
- publish = "build/client"
4
-
5
- [dev]
6
- command = "npm run dev"
7
- framework = "vite"
8
-
9
- # Set immutable caching for static files, because they have fingerprinted filenames
10
-
11
- [[headers]]
12
- for = "/build/*"
13
-
14
- [headers.values]
15
-
16
- "Cache-Control" = "public, max-age=31560000, immutable"
@@ -1,9 +0,0 @@
1
- {
2
- "scripts": {
3
- "start": "npx netlify-cli serve"
4
- },
5
- "dependencies": {
6
- "@netlify/functions": "^2.8.2",
7
- "@netlify/remix-adapter": "^2.5.1"
8
- }
9
- }
@@ -1,18 +0,0 @@
1
- import { vitePlugin as remix } from "@remix-run/dev";
2
- import { defineConfig } from "vite";
3
- import { netlifyPlugin } from "@netlify/remix-adapter/plugin";
4
-
5
- export default defineConfig({
6
- plugins: [
7
- remix({
8
- future: {
9
- v3_lazyRouteDiscovery: false,
10
- v3_relativeSplatPath: false,
11
- v3_singleFetch: false,
12
- v3_fetcherPersist: false,
13
- v3_throwAbortReason: false,
14
- },
15
- }),
16
- netlifyPlugin(),
17
- ],
18
- });