webstudio 0.203.0 → 0.204.0
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 +1 -7
- package/lib/cli.js +8 -19
- package/package.json +12 -14
- package/templates/defaults/package.json +7 -7
- package/templates/react-router/package.json +7 -7
- package/templates/ssg/package.json +6 -6
- package/templates/netlify-edge-functions/app/constants.mjs +0 -29
- package/templates/netlify-edge-functions/app/entry.server.tsx +0 -21
- package/templates/netlify-edge-functions/netlify.toml +0 -16
- package/templates/netlify-edge-functions/package.json +0 -9
- package/templates/netlify-edge-functions/vite.config.ts +0 -18
- package/templates/netlify-functions/app/constants.mjs +0 -29
- package/templates/netlify-functions/app/entry.server.tsx +0 -1
- package/templates/netlify-functions/netlify.toml +0 -16
- package/templates/netlify-functions/package.json +0 -9
- package/templates/netlify-functions/vite.config.ts +0 -18
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
|
|
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,6 +736,9 @@ 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;
|
|
@@ -4602,7 +4595,7 @@ const meta$4 = {
|
|
|
4602
4595
|
const meta$3 = {
|
|
4603
4596
|
category: "hidden",
|
|
4604
4597
|
icon: ResourceIcon,
|
|
4605
|
-
type: "
|
|
4598
|
+
type: "embed",
|
|
4606
4599
|
constraints: {
|
|
4607
4600
|
relation: "parent",
|
|
4608
4601
|
component: { $eq: "HeadSlot" }
|
|
@@ -4611,7 +4604,7 @@ const meta$3 = {
|
|
|
4611
4604
|
const meta$2 = {
|
|
4612
4605
|
category: "hidden",
|
|
4613
4606
|
icon: WindowInfoIcon,
|
|
4614
|
-
type: "
|
|
4607
|
+
type: "embed",
|
|
4615
4608
|
constraints: {
|
|
4616
4609
|
relation: "parent",
|
|
4617
4610
|
component: { $eq: "HeadSlot" }
|
|
@@ -6409,8 +6402,6 @@ const getDeploymentInstructions = (deployTarget) => {
|
|
|
6409
6402
|
case "vercel":
|
|
6410
6403
|
return `Run ${pc.dim("npx vercel")} to publish on Vercel.`;
|
|
6411
6404
|
case "netlify":
|
|
6412
|
-
case "netlify-functions":
|
|
6413
|
-
case "netlify-edge-functions":
|
|
6414
6405
|
return [
|
|
6415
6406
|
`To deploy to Netlify, run the following commands: `,
|
|
6416
6407
|
`Run ${pc.dim("npx netlify-cli login")} to login to Netlify.`,
|
|
@@ -6423,7 +6414,7 @@ const getDeploymentInstructions = (deployTarget) => {
|
|
|
6423
6414
|
}
|
|
6424
6415
|
};
|
|
6425
6416
|
const name = "webstudio";
|
|
6426
|
-
const version = "0.
|
|
6417
|
+
const version = "0.204.0";
|
|
6427
6418
|
const description = "Webstudio CLI";
|
|
6428
6419
|
const author = "Webstudio <github@webstudio.is>";
|
|
6429
6420
|
const homepage = "https://webstudio.is";
|
|
@@ -6454,7 +6445,7 @@ const engines = {
|
|
|
6454
6445
|
node: ">=20.12"
|
|
6455
6446
|
};
|
|
6456
6447
|
const dependencies = {
|
|
6457
|
-
"@clack/prompts": "^0.
|
|
6448
|
+
"@clack/prompts": "^0.10.0",
|
|
6458
6449
|
"@emotion/hash": "^0.9.2",
|
|
6459
6450
|
acorn: "^8.14.0",
|
|
6460
6451
|
"acorn-walk": "^8.3.4",
|
|
@@ -6471,8 +6462,6 @@ const dependencies = {
|
|
|
6471
6462
|
zod: "^3.22.4"
|
|
6472
6463
|
};
|
|
6473
6464
|
const devDependencies = {
|
|
6474
|
-
"@netlify/remix-adapter": "^2.5.1",
|
|
6475
|
-
"@netlify/remix-edge-adapter": "3.4.2",
|
|
6476
6465
|
"@netlify/vite-plugin-react-router": "^1.0.0",
|
|
6477
6466
|
"@react-router/dev": "^7.1.5",
|
|
6478
6467
|
"@react-router/fs-routes": "^7.1.5",
|
|
@@ -6505,7 +6494,7 @@ const devDependencies = {
|
|
|
6505
6494
|
"ts-expect": "^1.3.0",
|
|
6506
6495
|
vike: "^0.4.220",
|
|
6507
6496
|
vite: "^5.4.11",
|
|
6508
|
-
vitest: "^3.0.
|
|
6497
|
+
vitest: "^3.0.4",
|
|
6509
6498
|
wrangler: "^3.63.2"
|
|
6510
6499
|
};
|
|
6511
6500
|
const packageJson = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webstudio",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.204.0",
|
|
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.
|
|
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,17 +65,17 @@
|
|
|
67
65
|
"ts-expect": "^1.3.0",
|
|
68
66
|
"vike": "^0.4.220",
|
|
69
67
|
"vite": "^5.4.11",
|
|
70
|
-
"vitest": "^3.0.
|
|
68
|
+
"vitest": "^3.0.4",
|
|
71
69
|
"wrangler": "^3.63.2",
|
|
72
|
-
"@webstudio-is/
|
|
73
|
-
"@webstudio-is/
|
|
74
|
-
"@webstudio-is/
|
|
75
|
-
"@webstudio-is/sdk": "0.
|
|
76
|
-
"@webstudio-is/sdk-components-animation": "0.
|
|
77
|
-
"@webstudio-is/sdk-components-react": "0.
|
|
78
|
-
"@webstudio-is/sdk-components-react-radix": "0.
|
|
79
|
-
"@webstudio-is/sdk-components-react-
|
|
80
|
-
"@webstudio-is/sdk-components-react-
|
|
70
|
+
"@webstudio-is/http-client": "0.204.0",
|
|
71
|
+
"@webstudio-is/image": "0.204.0",
|
|
72
|
+
"@webstudio-is/react-sdk": "0.204.0",
|
|
73
|
+
"@webstudio-is/sdk": "0.204.0",
|
|
74
|
+
"@webstudio-is/sdk-components-animation": "0.204.0",
|
|
75
|
+
"@webstudio-is/sdk-components-react": "0.204.0",
|
|
76
|
+
"@webstudio-is/sdk-components-react-radix": "0.204.0",
|
|
77
|
+
"@webstudio-is/sdk-components-react-router": "0.204.0",
|
|
78
|
+
"@webstudio-is/sdk-components-react-remix": "0.204.0",
|
|
81
79
|
"@webstudio-is/tsconfig": "1.0.7"
|
|
82
80
|
},
|
|
83
81
|
"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.
|
|
15
|
-
"@webstudio-is/react-sdk": "0.
|
|
16
|
-
"@webstudio-is/sdk": "0.
|
|
17
|
-
"@webstudio-is/sdk-components-react": "0.
|
|
18
|
-
"@webstudio-is/sdk-components-animation": "0.
|
|
19
|
-
"@webstudio-is/sdk-components-react-radix": "0.
|
|
20
|
-
"@webstudio-is/sdk-components-react-remix": "0.
|
|
14
|
+
"@webstudio-is/image": "0.204.0",
|
|
15
|
+
"@webstudio-is/react-sdk": "0.204.0",
|
|
16
|
+
"@webstudio-is/sdk": "0.204.0",
|
|
17
|
+
"@webstudio-is/sdk-components-react": "0.204.0",
|
|
18
|
+
"@webstudio-is/sdk-components-animation": "0.204.0",
|
|
19
|
+
"@webstudio-is/sdk-components-react-radix": "0.204.0",
|
|
20
|
+
"@webstudio-is/sdk-components-react-remix": "0.204.0",
|
|
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.
|
|
14
|
-
"@webstudio-is/react-sdk": "0.
|
|
15
|
-
"@webstudio-is/sdk": "0.
|
|
16
|
-
"@webstudio-is/sdk-components-animation": "0.
|
|
17
|
-
"@webstudio-is/sdk-components-react-radix": "0.
|
|
18
|
-
"@webstudio-is/sdk-components-react-router": "0.
|
|
19
|
-
"@webstudio-is/sdk-components-react": "0.
|
|
13
|
+
"@webstudio-is/image": "0.204.0",
|
|
14
|
+
"@webstudio-is/react-sdk": "0.204.0",
|
|
15
|
+
"@webstudio-is/sdk": "0.204.0",
|
|
16
|
+
"@webstudio-is/sdk-components-animation": "0.204.0",
|
|
17
|
+
"@webstudio-is/sdk-components-react-radix": "0.204.0",
|
|
18
|
+
"@webstudio-is/sdk-components-react-router": "0.204.0",
|
|
19
|
+
"@webstudio-is/sdk-components-react": "0.204.0",
|
|
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.
|
|
12
|
-
"@webstudio-is/react-sdk": "0.
|
|
13
|
-
"@webstudio-is/sdk": "0.
|
|
14
|
-
"@webstudio-is/sdk-components-react": "0.
|
|
15
|
-
"@webstudio-is/sdk-components-animation": "0.
|
|
16
|
-
"@webstudio-is/sdk-components-react-radix": "0.
|
|
11
|
+
"@webstudio-is/image": "0.204.0",
|
|
12
|
+
"@webstudio-is/react-sdk": "0.204.0",
|
|
13
|
+
"@webstudio-is/sdk": "0.204.0",
|
|
14
|
+
"@webstudio-is/sdk-components-react": "0.204.0",
|
|
15
|
+
"@webstudio-is/sdk-components-animation": "0.204.0",
|
|
16
|
+
"@webstudio-is/sdk-components-react-radix": "0.204.0",
|
|
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,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,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
|
-
});
|