webstudio 0.185.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
CHANGED
|
@@ -922,7 +922,15 @@ Please check webstudio --help for more details`
|
|
|
922
922
|
xmlPresentationComponents += Array.from(componentsSet).map(
|
|
923
923
|
([shortName, component]) => scope.getName(component, shortName)
|
|
924
924
|
).filter((scopedName) => scopedName !== "XmlNode").map(
|
|
925
|
-
(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
|
+
)
|
|
926
934
|
).join("\n");
|
|
927
935
|
}
|
|
928
936
|
break;
|
|
@@ -1294,7 +1302,7 @@ import makeCLI from "yargs";
|
|
|
1294
1302
|
// package.json
|
|
1295
1303
|
var package_default = {
|
|
1296
1304
|
name: "webstudio",
|
|
1297
|
-
version: "0.
|
|
1305
|
+
version: "0.189.0",
|
|
1298
1306
|
description: "Webstudio CLI",
|
|
1299
1307
|
author: "Webstudio <github@webstudio.is>",
|
|
1300
1308
|
homepage: "https://webstudio.is",
|
|
@@ -1354,19 +1362,19 @@ var package_default = {
|
|
|
1354
1362
|
"@remix-run/node": "^2.12.1",
|
|
1355
1363
|
"@remix-run/react": "^2.12.1",
|
|
1356
1364
|
"@remix-run/server-runtime": "^2.12.1",
|
|
1357
|
-
"@types/node": "^22.
|
|
1365
|
+
"@types/node": "^22.8.1",
|
|
1358
1366
|
"@types/react": "^18.2.70",
|
|
1359
1367
|
"@types/react-dom": "^18.2.25",
|
|
1360
|
-
"@types/yargs": "^17.0.
|
|
1361
|
-
"@vitejs/plugin-react": "^4.3.
|
|
1368
|
+
"@types/yargs": "^17.0.33",
|
|
1369
|
+
"@vitejs/plugin-react": "^4.3.3",
|
|
1362
1370
|
"@webstudio-is/jest-config": "workspace:*",
|
|
1363
1371
|
"@webstudio-is/tsconfig": "workspace:*",
|
|
1364
1372
|
react: "18.3.0-canary-14898b6a9-20240318",
|
|
1365
1373
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
1366
1374
|
"ts-expect": "^1.3.0",
|
|
1367
|
-
typescript: "5.
|
|
1375
|
+
typescript: "5.6.3",
|
|
1368
1376
|
vike: "^0.4.182",
|
|
1369
|
-
vite: "^5.4.
|
|
1377
|
+
vite: "^5.4.10",
|
|
1370
1378
|
wrangler: "^3.63.2"
|
|
1371
1379
|
}
|
|
1372
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",
|
|
@@ -37,13 +37,13 @@
|
|
|
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
|
|
44
|
-
"@webstudio-is/sdk": "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",
|
|
@@ -55,20 +55,20 @@
|
|
|
55
55
|
"@remix-run/node": "^2.12.1",
|
|
56
56
|
"@remix-run/react": "^2.12.1",
|
|
57
57
|
"@remix-run/server-runtime": "^2.12.1",
|
|
58
|
-
"@types/node": "^22.
|
|
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",
|
|
@@ -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
|
});
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
"@remix-run/node": "2.12.1",
|
|
12
12
|
"@remix-run/react": "2.12.1",
|
|
13
13
|
"@remix-run/server-runtime": "2.12.1",
|
|
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.
|
|
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"
|
|
@@ -25,8 +25,8 @@
|
|
|
25
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"
|