webstudio 0.182.0 → 0.189.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/lib/cli.js +33 -18
- package/package.json +24 -24
- package/templates/cloudflare/package.json +2 -2
- package/templates/defaults/app/route-templates/xml.tsx +5 -1
- package/templates/defaults/package.json +12 -12
- package/templates/netlify-edge-functions/package.json +2 -2
- package/templates/netlify-functions/package.json +1 -1
- package/templates/ssg/package.json +8 -8
package/lib/cli.js
CHANGED
|
@@ -312,7 +312,8 @@ import {
|
|
|
312
312
|
normalizeProps,
|
|
313
313
|
generateRemixRoute as generateRemixRoute2,
|
|
314
314
|
generateRemixParams,
|
|
315
|
-
isCoreComponent
|
|
315
|
+
isCoreComponent,
|
|
316
|
+
coreMetas
|
|
316
317
|
} from "@webstudio-is/react-sdk";
|
|
317
318
|
import {
|
|
318
319
|
createScope,
|
|
@@ -423,6 +424,10 @@ var htmlToJsx = (html) => {
|
|
|
423
424
|
switch (walkNode.type) {
|
|
424
425
|
case "text": {
|
|
425
426
|
const escapedValue = escape(walkNode.value);
|
|
427
|
+
const re = /^\s$/g;
|
|
428
|
+
if (re.test(walkNode.value)) {
|
|
429
|
+
break;
|
|
430
|
+
}
|
|
426
431
|
result += escapedValue ? "{" + escapedValue + "}" : "";
|
|
427
432
|
break;
|
|
428
433
|
}
|
|
@@ -731,7 +736,9 @@ Please check webstudio --help for more details`
|
|
|
731
736
|
componentSources.set(componentName, entry.source);
|
|
732
737
|
}
|
|
733
738
|
}
|
|
734
|
-
const projectMetas =
|
|
739
|
+
const projectMetas = new Map(
|
|
740
|
+
Object.entries(coreMetas)
|
|
741
|
+
);
|
|
735
742
|
const componentsByPage = {};
|
|
736
743
|
const siteDataByPage = {};
|
|
737
744
|
const fontAssetsByPage = {};
|
|
@@ -915,7 +922,15 @@ Please check webstudio --help for more details`
|
|
|
915
922
|
xmlPresentationComponents += Array.from(componentsSet).map(
|
|
916
923
|
([shortName, component]) => scope.getName(component, shortName)
|
|
917
924
|
).filter((scopedName) => scopedName !== "XmlNode").map(
|
|
918
|
-
(scopedName) => scopedName === "Body" ?
|
|
925
|
+
(scopedName) => scopedName === "Body" ? (
|
|
926
|
+
// Using <svg> prevents React from hoisting elements like <title>, <meta>, and <link>
|
|
927
|
+
// out of their intended scope during rendering.
|
|
928
|
+
// More details: https://github.com/facebook/react/blob/7c8e5e7ab8bb63de911637892392c5efd8ce1d0f/packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js#L3083
|
|
929
|
+
`const ${scopedName} = (props: any) => <svg>{props.children}</svg>;`
|
|
930
|
+
) : (
|
|
931
|
+
// Do not render all other components
|
|
932
|
+
`const ${scopedName} = (props: any) => null;`
|
|
933
|
+
)
|
|
919
934
|
).join("\n");
|
|
920
935
|
}
|
|
921
936
|
break;
|
|
@@ -1287,7 +1302,7 @@ import makeCLI from "yargs";
|
|
|
1287
1302
|
// package.json
|
|
1288
1303
|
var package_default = {
|
|
1289
1304
|
name: "webstudio",
|
|
1290
|
-
version: "0.
|
|
1305
|
+
version: "0.189.0",
|
|
1291
1306
|
description: "Webstudio CLI",
|
|
1292
1307
|
author: "Webstudio <github@webstudio.is>",
|
|
1293
1308
|
homepage: "https://webstudio.is",
|
|
@@ -1332,34 +1347,34 @@ var package_default = {
|
|
|
1332
1347
|
execa: "^7.2.0",
|
|
1333
1348
|
"p-limit": "^4.0.0",
|
|
1334
1349
|
parse5: "7.1.2",
|
|
1335
|
-
picocolors: "^1.0
|
|
1350
|
+
picocolors: "^1.1.0",
|
|
1336
1351
|
"strip-indent": "^4.0.0",
|
|
1337
1352
|
yargs: "^17.7.2",
|
|
1338
1353
|
zod: "^3.22.4"
|
|
1339
1354
|
},
|
|
1340
1355
|
devDependencies: {
|
|
1341
1356
|
"@jest/globals": "^29.7.0",
|
|
1342
|
-
"@netlify/remix-adapter": "^2.
|
|
1343
|
-
"@netlify/remix-edge-adapter": "3.
|
|
1344
|
-
"@remix-run/cloudflare": "^2.
|
|
1345
|
-
"@remix-run/cloudflare-pages": "^2.
|
|
1346
|
-
"@remix-run/dev": "^2.
|
|
1347
|
-
"@remix-run/node": "^2.
|
|
1348
|
-
"@remix-run/react": "^2.
|
|
1349
|
-
"@remix-run/server-runtime": "^2.
|
|
1350
|
-
"@types/node": "^22.
|
|
1357
|
+
"@netlify/remix-adapter": "^2.5.1",
|
|
1358
|
+
"@netlify/remix-edge-adapter": "3.4.2",
|
|
1359
|
+
"@remix-run/cloudflare": "^2.12.1",
|
|
1360
|
+
"@remix-run/cloudflare-pages": "^2.12.1",
|
|
1361
|
+
"@remix-run/dev": "^2.12.1",
|
|
1362
|
+
"@remix-run/node": "^2.12.1",
|
|
1363
|
+
"@remix-run/react": "^2.12.1",
|
|
1364
|
+
"@remix-run/server-runtime": "^2.12.1",
|
|
1365
|
+
"@types/node": "^22.8.1",
|
|
1351
1366
|
"@types/react": "^18.2.70",
|
|
1352
1367
|
"@types/react-dom": "^18.2.25",
|
|
1353
|
-
"@types/yargs": "^17.0.
|
|
1354
|
-
"@vitejs/plugin-react": "^4.3.
|
|
1368
|
+
"@types/yargs": "^17.0.33",
|
|
1369
|
+
"@vitejs/plugin-react": "^4.3.3",
|
|
1355
1370
|
"@webstudio-is/jest-config": "workspace:*",
|
|
1356
1371
|
"@webstudio-is/tsconfig": "workspace:*",
|
|
1357
1372
|
react: "18.3.0-canary-14898b6a9-20240318",
|
|
1358
1373
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
1359
1374
|
"ts-expect": "^1.3.0",
|
|
1360
|
-
typescript: "5.
|
|
1375
|
+
typescript: "5.6.3",
|
|
1361
1376
|
vike: "^0.4.182",
|
|
1362
|
-
vite: "^5.4.
|
|
1377
|
+
vite: "^5.4.10",
|
|
1363
1378
|
wrangler: "^3.63.2"
|
|
1364
1379
|
}
|
|
1365
1380
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webstudio",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.189.0",
|
|
4
4
|
"description": "Webstudio CLI",
|
|
5
5
|
"author": "Webstudio <github@webstudio.is>",
|
|
6
6
|
"homepage": "https://webstudio.is",
|
|
@@ -33,42 +33,42 @@
|
|
|
33
33
|
"execa": "^7.2.0",
|
|
34
34
|
"p-limit": "^4.0.0",
|
|
35
35
|
"parse5": "7.1.2",
|
|
36
|
-
"picocolors": "^1.0
|
|
36
|
+
"picocolors": "^1.1.0",
|
|
37
37
|
"strip-indent": "^4.0.0",
|
|
38
38
|
"yargs": "^17.7.2",
|
|
39
39
|
"zod": "^3.22.4",
|
|
40
|
-
"@webstudio-is/http-client": "0.
|
|
41
|
-
"@webstudio-is/image": "0.
|
|
42
|
-
"@webstudio-is/react-sdk": "0.
|
|
43
|
-
"@webstudio-is/sdk": "0.
|
|
44
|
-
"@webstudio-is/sdk-components-react": "0.
|
|
45
|
-
"@webstudio-is/sdk-components-react-
|
|
46
|
-
"@webstudio-is/sdk-components-react
|
|
40
|
+
"@webstudio-is/http-client": "0.189.0",
|
|
41
|
+
"@webstudio-is/image": "0.189.0",
|
|
42
|
+
"@webstudio-is/react-sdk": "0.189.0",
|
|
43
|
+
"@webstudio-is/sdk": "0.189.0",
|
|
44
|
+
"@webstudio-is/sdk-components-react-radix": "0.189.0",
|
|
45
|
+
"@webstudio-is/sdk-components-react-remix": "0.189.0",
|
|
46
|
+
"@webstudio-is/sdk-components-react": "0.189.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@jest/globals": "^29.7.0",
|
|
50
|
-
"@netlify/remix-adapter": "^2.
|
|
51
|
-
"@netlify/remix-edge-adapter": "3.
|
|
52
|
-
"@remix-run/cloudflare": "^2.
|
|
53
|
-
"@remix-run/cloudflare-pages": "^2.
|
|
54
|
-
"@remix-run/dev": "^2.
|
|
55
|
-
"@remix-run/node": "^2.
|
|
56
|
-
"@remix-run/react": "^2.
|
|
57
|
-
"@remix-run/server-runtime": "^2.
|
|
58
|
-
"@types/node": "^22.
|
|
50
|
+
"@netlify/remix-adapter": "^2.5.1",
|
|
51
|
+
"@netlify/remix-edge-adapter": "3.4.2",
|
|
52
|
+
"@remix-run/cloudflare": "^2.12.1",
|
|
53
|
+
"@remix-run/cloudflare-pages": "^2.12.1",
|
|
54
|
+
"@remix-run/dev": "^2.12.1",
|
|
55
|
+
"@remix-run/node": "^2.12.1",
|
|
56
|
+
"@remix-run/react": "^2.12.1",
|
|
57
|
+
"@remix-run/server-runtime": "^2.12.1",
|
|
58
|
+
"@types/node": "^22.8.1",
|
|
59
59
|
"@types/react": "^18.2.70",
|
|
60
60
|
"@types/react-dom": "^18.2.25",
|
|
61
|
-
"@types/yargs": "^17.0.
|
|
62
|
-
"@vitejs/plugin-react": "^4.3.
|
|
61
|
+
"@types/yargs": "^17.0.33",
|
|
62
|
+
"@vitejs/plugin-react": "^4.3.3",
|
|
63
63
|
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
64
64
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
65
65
|
"ts-expect": "^1.3.0",
|
|
66
|
-
"typescript": "5.
|
|
66
|
+
"typescript": "5.6.3",
|
|
67
67
|
"vike": "^0.4.182",
|
|
68
|
-
"vite": "^5.4.
|
|
68
|
+
"vite": "^5.4.10",
|
|
69
69
|
"wrangler": "^3.63.2",
|
|
70
|
-
"@webstudio-is/
|
|
71
|
-
"@webstudio-is/
|
|
70
|
+
"@webstudio-is/tsconfig": "1.0.7",
|
|
71
|
+
"@webstudio-is/jest-config": "1.0.7"
|
|
72
72
|
},
|
|
73
73
|
"scripts": {
|
|
74
74
|
"typecheck": "tsc",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"build-cf-types": "wrangler types"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@remix-run/cloudflare": "2.
|
|
16
|
-
"@remix-run/cloudflare-pages": "2.
|
|
15
|
+
"@remix-run/cloudflare": "2.12.1",
|
|
16
|
+
"@remix-run/cloudflare-pages": "2.12.1"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@cloudflare/workers-types": "^4.20240620.0",
|
|
@@ -56,7 +56,7 @@ export const loader = async (arg: LoaderFunctionArgs) => {
|
|
|
56
56
|
// typecheck
|
|
57
57
|
arg.context.EXCLUDE_FROM_SEARCH satisfies boolean;
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
let text = renderToString(
|
|
60
60
|
<ReactSdkContext.Provider
|
|
61
61
|
value={{
|
|
62
62
|
imageLoader,
|
|
@@ -69,6 +69,10 @@ export const loader = async (arg: LoaderFunctionArgs) => {
|
|
|
69
69
|
</ReactSdkContext.Provider>
|
|
70
70
|
);
|
|
71
71
|
|
|
72
|
+
// Xml is wrapped with <svg> to prevent React from hoisting elements like <title>, <meta>, and <link> out of their intended scope during rendering.
|
|
73
|
+
// More details: https://github.com/facebook/react/blob/7c8e5e7ab8bb63de911637892392c5efd8ce1d0f/packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js#L3083
|
|
74
|
+
text = text.replace(/^<svg>/g, "").replace(/<\/svg>$/g, "");
|
|
75
|
+
|
|
72
76
|
return new Response(`<?xml version="1.0" encoding="UTF-8"?>\n${text}`, {
|
|
73
77
|
headers: { "Content-Type": "application/xml" },
|
|
74
78
|
});
|
|
@@ -8,25 +8,25 @@
|
|
|
8
8
|
"typecheck": "tsc"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@remix-run/node": "2.
|
|
12
|
-
"@remix-run/react": "2.
|
|
13
|
-
"@remix-run/server-runtime": "2.
|
|
14
|
-
"@webstudio-is/react-sdk": "0.
|
|
15
|
-
"@webstudio-is/sdk-components-react-radix": "0.
|
|
16
|
-
"@webstudio-is/sdk-components-react-remix": "0.
|
|
17
|
-
"@webstudio-is/sdk-components-react": "0.
|
|
18
|
-
"@webstudio-is/image": "0.
|
|
19
|
-
"@webstudio-is/sdk": "0.
|
|
11
|
+
"@remix-run/node": "2.12.1",
|
|
12
|
+
"@remix-run/react": "2.12.1",
|
|
13
|
+
"@remix-run/server-runtime": "2.12.1",
|
|
14
|
+
"@webstudio-is/react-sdk": "0.189.0",
|
|
15
|
+
"@webstudio-is/sdk-components-react-radix": "0.189.0",
|
|
16
|
+
"@webstudio-is/sdk-components-react-remix": "0.189.0",
|
|
17
|
+
"@webstudio-is/sdk-components-react": "0.189.0",
|
|
18
|
+
"@webstudio-is/image": "0.189.0",
|
|
19
|
+
"@webstudio-is/sdk": "0.189.0",
|
|
20
20
|
"isbot": "^5.1.17",
|
|
21
21
|
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
22
22
|
"react-dom": "18.3.0-canary-14898b6a9-20240318"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@remix-run/dev": "2.
|
|
25
|
+
"@remix-run/dev": "2.12.1",
|
|
26
26
|
"@types/react": "^18.2.70",
|
|
27
27
|
"@types/react-dom": "^18.2.25",
|
|
28
|
-
"typescript": "5.
|
|
29
|
-
"vite": "^5.4.
|
|
28
|
+
"typescript": "5.6.3",
|
|
29
|
+
"vite": "^5.4.10"
|
|
30
30
|
},
|
|
31
31
|
"engines": {
|
|
32
32
|
"node": ">=20.0.0"
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
"typecheck": "tsc"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@webstudio-is/react-sdk": "0.
|
|
12
|
-
"@webstudio-is/sdk-components-react-radix": "0.
|
|
13
|
-
"@webstudio-is/sdk-components-react": "0.
|
|
14
|
-
"@webstudio-is/image": "0.
|
|
15
|
-
"@webstudio-is/sdk": "0.
|
|
11
|
+
"@webstudio-is/react-sdk": "0.189.0",
|
|
12
|
+
"@webstudio-is/sdk-components-react-radix": "0.189.0",
|
|
13
|
+
"@webstudio-is/sdk-components-react": "0.189.0",
|
|
14
|
+
"@webstudio-is/image": "0.189.0",
|
|
15
|
+
"@webstudio-is/sdk": "0.189.0",
|
|
16
16
|
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
17
17
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
18
18
|
"vike": "^0.4.182"
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@types/react": "^18.2.70",
|
|
22
22
|
"@types/react-dom": "^18.2.25",
|
|
23
|
-
"@vitejs/plugin-react": "^4.3.
|
|
24
|
-
"typescript": "5.
|
|
25
|
-
"vite": "^5.4.
|
|
23
|
+
"@vitejs/plugin-react": "^4.3.3",
|
|
24
|
+
"typescript": "5.6.3",
|
|
25
|
+
"vite": "^5.4.10"
|
|
26
26
|
},
|
|
27
27
|
"engines": {
|
|
28
28
|
"node": ">=20.0.0"
|