webstudio 0.0.0-c1d6247 → 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" }
@@ -6418,8 +6402,6 @@ const getDeploymentInstructions = (deployTarget) => {
6418
6402
  case "vercel":
6419
6403
  return `Run ${pc.dim("npx vercel")} to publish on Vercel.`;
6420
6404
  case "netlify":
6421
- case "netlify-functions":
6422
- case "netlify-edge-functions":
6423
6405
  return [
6424
6406
  `To deploy to Netlify, run the following commands: `,
6425
6407
  `Run ${pc.dim("npx netlify-cli login")} to login to Netlify.`,
@@ -6432,7 +6414,7 @@ const getDeploymentInstructions = (deployTarget) => {
6432
6414
  }
6433
6415
  };
6434
6416
  const name = "webstudio";
6435
- const version = "0.0.0-c1d6247";
6417
+ const version = "0.0.0-ec9bae5";
6436
6418
  const description = "Webstudio CLI";
6437
6419
  const author = "Webstudio <github@webstudio.is>";
6438
6420
  const homepage = "https://webstudio.is";
@@ -6463,7 +6445,7 @@ const engines = {
6463
6445
  node: ">=20.12"
6464
6446
  };
6465
6447
  const dependencies = {
6466
- "@clack/prompts": "^0.9.1",
6448
+ "@clack/prompts": "^0.10.0",
6467
6449
  "@emotion/hash": "^0.9.2",
6468
6450
  acorn: "^8.14.0",
6469
6451
  "acorn-walk": "^8.3.4",
@@ -6480,8 +6462,6 @@ const dependencies = {
6480
6462
  zod: "^3.22.4"
6481
6463
  };
6482
6464
  const devDependencies = {
6483
- "@netlify/remix-adapter": "^2.5.1",
6484
- "@netlify/remix-edge-adapter": "3.4.2",
6485
6465
  "@netlify/vite-plugin-react-router": "^1.0.0",
6486
6466
  "@react-router/dev": "^7.1.5",
6487
6467
  "@react-router/fs-routes": "^7.1.5",
@@ -6514,7 +6494,7 @@ const devDependencies = {
6514
6494
  "ts-expect": "^1.3.0",
6515
6495
  vike: "^0.4.220",
6516
6496
  vite: "^5.4.11",
6517
- vitest: "^3.0.2",
6497
+ vitest: "^3.0.4",
6518
6498
  wrangler: "^3.63.2"
6519
6499
  };
6520
6500
  const packageJson = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webstudio",
3
- "version": "0.0.0-c1d6247",
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,8 +43,6 @@
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
47
  "@react-router/dev": "^7.1.5",
50
48
  "@react-router/fs-routes": "^7.1.5",
@@ -67,18 +65,18 @@
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-c1d6247",
73
- "@webstudio-is/image": "0.0.0-c1d6247",
74
- "@webstudio-is/react-sdk": "0.0.0-c1d6247",
75
- "@webstudio-is/sdk": "0.0.0-c1d6247",
76
- "@webstudio-is/sdk-components-animation": "0.0.0-c1d6247",
77
- "@webstudio-is/sdk-components-react": "0.0.0-c1d6247",
78
- "@webstudio-is/sdk-components-react-remix": "0.0.0-c1d6247",
79
- "@webstudio-is/sdk-components-react-radix": "0.0.0-c1d6247",
80
- "@webstudio-is/sdk-components-react-router": "0.0.0-c1d6247",
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-c1d6247",
15
- "@webstudio-is/react-sdk": "0.0.0-c1d6247",
16
- "@webstudio-is/sdk": "0.0.0-c1d6247",
17
- "@webstudio-is/sdk-components-react": "0.0.0-c1d6247",
18
- "@webstudio-is/sdk-components-animation": "0.0.0-c1d6247",
19
- "@webstudio-is/sdk-components-react-radix": "0.0.0-c1d6247",
20
- "@webstudio-is/sdk-components-react-remix": "0.0.0-c1d6247",
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"
@@ -10,13 +10,13 @@
10
10
  "dependencies": {
11
11
  "@react-router/dev": "^7.1.5",
12
12
  "@react-router/fs-routes": "^7.1.5",
13
- "@webstudio-is/image": "0.0.0-c1d6247",
14
- "@webstudio-is/react-sdk": "0.0.0-c1d6247",
15
- "@webstudio-is/sdk": "0.0.0-c1d6247",
16
- "@webstudio-is/sdk-components-animation": "0.0.0-c1d6247",
17
- "@webstudio-is/sdk-components-react-radix": "0.0.0-c1d6247",
18
- "@webstudio-is/sdk-components-react-router": "0.0.0-c1d6247",
19
- "@webstudio-is/sdk-components-react": "0.0.0-c1d6247",
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",
20
20
  "isbot": "^5.1.22",
21
21
  "react": "18.3.0-canary-14898b6a9-20240318",
22
22
  "react-dom": "18.3.0-canary-14898b6a9-20240318",
@@ -8,12 +8,12 @@
8
8
  "typecheck": "tsc"
9
9
  },
10
10
  "dependencies": {
11
- "@webstudio-is/image": "0.0.0-c1d6247",
12
- "@webstudio-is/react-sdk": "0.0.0-c1d6247",
13
- "@webstudio-is/sdk": "0.0.0-c1d6247",
14
- "@webstudio-is/sdk-components-react": "0.0.0-c1d6247",
15
- "@webstudio-is/sdk-components-animation": "0.0.0-c1d6247",
16
- "@webstudio-is/sdk-components-react-radix": "0.0.0-c1d6247",
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
- });