@builder.io/sdk-solid 0.5.2 → 0.5.4
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/CHANGELOG.md +5 -0
- package/README.md +4 -0
- package/package.json +10 -3
- package/src/blocks/text/text.jsx +1 -0
- package/src/components/content-variants/content-variants.jsx +13 -8
- package/src/constants/sdk-version.js +2 -1
- package/src/functions/evaluate/acorn-interpreter.js +2876 -0
- package/src/functions/evaluate/evaluate.js +1 -1
- package/src/functions/evaluate/non-node-runtime/index.js +18 -0
- package/src/functions/evaluate/{non-node-runtime.js → non-node-runtime/non-node-runtime.js} +3 -3
- package/src/functions/evaluate/acorn.js +0 -1595
- package/src/functions/evaluate/interpreter.js +0 -2801
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -9,3 +9,7 @@ This SDK is generated by [Mitosis](https://github.com/BuilderIO/mitosis). To see
|
|
|
9
9
|
## Fetch
|
|
10
10
|
|
|
11
11
|
This Package uses fetch. See [these docs](https://github.com/BuilderIO/this-package-uses-fetch/blob/main/README.md) for more information.
|
|
12
|
+
|
|
13
|
+
## Non-Node.js Runtimes (Edge, Serverless)
|
|
14
|
+
|
|
15
|
+
If planning to deploy your app to a non-Node.js runtime (like Edge or Serverless functions), make sure to read the [Non-Node.js Runtimes](../../README.md#non-nodejs-runtimes-edge-serverless) section of the main README.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@builder.io/sdk-solid",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./solid-index.jsx",
|
|
@@ -18,11 +18,18 @@
|
|
|
18
18
|
"solid-styled-components": "^0.27.6"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
|
-
"solid-js": "
|
|
21
|
+
"solid-js": ">=1.5.7"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"
|
|
24
|
+
"nx": "^16.6.0",
|
|
25
|
+
"nx-cloud": "^16.2.0",
|
|
26
|
+
"solid-js": ">=1.5.7",
|
|
25
27
|
"vite": "^3.0.4",
|
|
26
28
|
"vite-plugin-solid": "^2.2.6"
|
|
29
|
+
},
|
|
30
|
+
"nx": {
|
|
31
|
+
"implicitDependencies": [
|
|
32
|
+
"@builder.io/sdks"
|
|
33
|
+
]
|
|
27
34
|
}
|
|
28
35
|
}
|
package/src/blocks/text/text.jsx
CHANGED
|
@@ -37,6 +37,18 @@ function ContentVariants(props) {
|
|
|
37
37
|
.join("");
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
function defaultContent() {
|
|
41
|
+
return shouldRenderVariants()
|
|
42
|
+
? {
|
|
43
|
+
...props.content,
|
|
44
|
+
testVariationId: props.content?.id,
|
|
45
|
+
}
|
|
46
|
+
: handleABTestingSync({
|
|
47
|
+
item: props.content,
|
|
48
|
+
canTrack: getDefaultCanTrack(props.canTrack),
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
|
|
40
52
|
onMount(() => {
|
|
41
53
|
/**
|
|
42
54
|
* We unmount the non-winning variants post-hydration in Vue.
|
|
@@ -81,14 +93,7 @@ function ContentVariants(props) {
|
|
|
81
93
|
</Show>
|
|
82
94
|
<ContentComponent
|
|
83
95
|
{...{}}
|
|
84
|
-
content={
|
|
85
|
-
shouldRenderVariants()
|
|
86
|
-
? props.content
|
|
87
|
-
: handleABTestingSync({
|
|
88
|
-
item: props.content,
|
|
89
|
-
canTrack: getDefaultCanTrack(props.canTrack),
|
|
90
|
-
})
|
|
91
|
-
}
|
|
96
|
+
content={defaultContent()}
|
|
92
97
|
classNameProp={`variant-${props.content?.id}`}
|
|
93
98
|
showContent={true}
|
|
94
99
|
model={props.model}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
const SDK_VERSION = "UNKNOWN_VERSION";
|
|
2
|
+
export { SDK_VERSION }
|