@webstudio-is/sdk-components-react 0.100.0 → 0.100.1-c4ae8b2.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/components.js +2 -2
- package/lib/metas.js +3 -2
- package/lib/props.js +3 -2
- package/lib/types/html-embed.d.ts +1 -0
- package/package.json +8 -8
package/lib/components.js
CHANGED
|
@@ -74,11 +74,11 @@ var Placeholder = (props) => {
|
|
|
74
74
|
};
|
|
75
75
|
var HtmlEmbed = forwardRef3((props, ref) => {
|
|
76
76
|
const { renderer } = useContext(ReactSdkContext);
|
|
77
|
-
const { code, executeScriptOnCanvas, ...rest } = props;
|
|
77
|
+
const { code, executeScriptOnCanvas, clientOnly, ...rest } = props;
|
|
78
78
|
if (code === void 0 || code.trim().length === 0) {
|
|
79
79
|
return /* @__PURE__ */ jsx3(Placeholder, { innerRef: ref, ...rest });
|
|
80
80
|
}
|
|
81
|
-
if (renderer === "canvas" && executeScriptOnCanvas === true || renderer === "preview") {
|
|
81
|
+
if (renderer === "canvas" && executeScriptOnCanvas === true || renderer === "preview" || clientOnly) {
|
|
82
82
|
return /* @__PURE__ */ jsx3(ExecutableHtml, { innerRef: ref, code, ...rest });
|
|
83
83
|
}
|
|
84
84
|
return /* @__PURE__ */ jsx3(InnerHtml, { innerRef: ref, code, ...rest });
|
package/lib/metas.js
CHANGED
|
@@ -23,9 +23,10 @@ import { EmbedIcon } from "@webstudio-is/icons/svg";
|
|
|
23
23
|
|
|
24
24
|
// src/__generated__/html-embed.props.ts
|
|
25
25
|
var props = {
|
|
26
|
+
clientOnly: { required: false, control: "boolean", type: "boolean" },
|
|
26
27
|
code: { required: true, control: "text", type: "string" },
|
|
27
28
|
executeScriptOnCanvas: {
|
|
28
|
-
required:
|
|
29
|
+
required: false,
|
|
29
30
|
control: "boolean",
|
|
30
31
|
type: "boolean"
|
|
31
32
|
}
|
|
@@ -55,7 +56,7 @@ var propsMeta = {
|
|
|
55
56
|
rows: 10
|
|
56
57
|
}
|
|
57
58
|
},
|
|
58
|
-
initialProps: ["executeScriptOnCanvas"]
|
|
59
|
+
initialProps: ["clientOnly", "executeScriptOnCanvas"]
|
|
59
60
|
};
|
|
60
61
|
|
|
61
62
|
// src/body.ws.tsx
|
package/lib/props.js
CHANGED
|
@@ -14,9 +14,10 @@ import { EmbedIcon } from "@webstudio-is/icons/svg";
|
|
|
14
14
|
|
|
15
15
|
// src/__generated__/html-embed.props.ts
|
|
16
16
|
var props = {
|
|
17
|
+
clientOnly: { required: false, control: "boolean", type: "boolean" },
|
|
17
18
|
code: { required: true, control: "text", type: "string" },
|
|
18
19
|
executeScriptOnCanvas: {
|
|
19
|
-
required:
|
|
20
|
+
required: false,
|
|
20
21
|
control: "boolean",
|
|
21
22
|
type: "boolean"
|
|
22
23
|
}
|
|
@@ -37,7 +38,7 @@ var propsMeta3 = {
|
|
|
37
38
|
rows: 10
|
|
38
39
|
}
|
|
39
40
|
},
|
|
40
|
-
initialProps: ["executeScriptOnCanvas"]
|
|
41
|
+
initialProps: ["clientOnly", "executeScriptOnCanvas"]
|
|
41
42
|
};
|
|
42
43
|
|
|
43
44
|
// src/body.ws.tsx
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webstudio-is/sdk-components-react",
|
|
3
|
-
"version": "0.100.0",
|
|
3
|
+
"version": "0.100.1-c4ae8b2.0",
|
|
4
4
|
"description": "Webstudio default library for react",
|
|
5
5
|
"author": "Webstudio <github@webstudio.is>",
|
|
6
6
|
"homepage": "https://webstudio.is",
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"@react-aria/utils": "^3.19.0",
|
|
41
41
|
"colord": "^2.9.3",
|
|
42
42
|
"shallow-equal": "^3.1.0",
|
|
43
|
-
"@webstudio-is/css-vars": "0.100.0",
|
|
44
|
-
"@webstudio-is/icons": "0.100.0",
|
|
45
|
-
"@webstudio-is/image": "0.100.0",
|
|
46
|
-
"@webstudio-is/react-sdk": "0.100.0"
|
|
43
|
+
"@webstudio-is/css-vars": "0.100.1-c4ae8b2.0",
|
|
44
|
+
"@webstudio-is/icons": "0.100.1-c4ae8b2.0",
|
|
45
|
+
"@webstudio-is/image": "0.100.1-c4ae8b2.0",
|
|
46
|
+
"@webstudio-is/react-sdk": "0.100.1-c4ae8b2.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@storybook/react": "^7.4.0",
|
|
@@ -52,9 +52,9 @@
|
|
|
52
52
|
"react": "^18.2.0",
|
|
53
53
|
"react-dom": "^18.2.0",
|
|
54
54
|
"typescript": "5.2.2",
|
|
55
|
-
"@webstudio-is/generate-arg-types": "0.100.0",
|
|
56
|
-
"@webstudio-is/storybook-config": "0.0.0",
|
|
57
|
-
"@webstudio-is/tsconfig": "1.0.
|
|
55
|
+
"@webstudio-is/generate-arg-types": "0.100.1-c4ae8b2.0",
|
|
56
|
+
"@webstudio-is/storybook-config": "0.0.1-c4ae8b2.0",
|
|
57
|
+
"@webstudio-is/tsconfig": "1.0.8-c4ae8b2.0"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|
|
60
60
|
"dev": "rm -rf lib && esbuild 'src/**/*.ts' 'src/**/*.tsx' --outdir=lib --watch",
|