@builder.io/sdk-solid 0.5.6 → 0.5.8

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 CHANGED
@@ -1,3 +1,11 @@
1
+ ### 0.5.8
2
+
3
+ - Fix: properly serialize messages sent to visual editor.
4
+
5
+ ### 0.5.7
6
+
7
+ - No Changes.
8
+
1
9
  ### 0.5.6
2
10
 
3
11
  - No Changes.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@builder.io/sdk-solid",
3
- "version": "0.5.6",
3
+ "version": "0.5.8",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./solid-index.jsx",
@@ -17,6 +17,7 @@ import { logger } from "../../../helpers/logger.js";
17
17
  import { fetchOneEntry } from "../../../functions/get-content/index.js";
18
18
  import { isPreviewing } from "../../../functions/is-previewing.js";
19
19
  import { postPreviewContent } from "../../../helpers/preview-lru-cache/set.js";
20
+ import { fastClone } from "../../../functions/fast-clone.js";
20
21
 
21
22
  function EnableEditor(props) {
22
23
  const [canTrackToUse, setCanTrackToUse] = createSignal(
@@ -177,7 +178,7 @@ function EnableEditor(props) {
177
178
  window.dispatchEvent(
178
179
  new CustomEvent("builder:component:stateChange", {
179
180
  detail: {
180
- state: props.builderContextSignal.rootState,
181
+ state: fastClone(props.builderContextSignal.rootState),
181
182
  ref: {
182
183
  name: props.model,
183
184
  },
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.5.6"
1
+ export const SDK_VERSION = "0.5.8"
@@ -37,7 +37,7 @@ function registerComponent(component, info) {
37
37
  }
38
38
  const createRegisterComponentMessage = info => ({
39
39
  type: "builder.registerComponent",
40
- data: info
40
+ data: serializeComponentInfo(info)
41
41
  });
42
42
  const serializeFn = fnValue => {
43
43
  const fnStr = fnValue.toString().trim();