@builder.io/sdk-react-nextjs 0.5.7 → 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.
@@ -13,6 +13,7 @@ import { checkIsDefined } from "../../../helpers/nullable.js";
13
13
  import { getInteractionPropertiesForEvent } from "../../../functions/track/interaction.js";
14
14
  import { logger } from "../../../helpers/logger.js";
15
15
  import { postPreviewContent } from "../../../helpers/preview-lru-cache/set.js";
16
+ import { fastClone } from "../../../functions/fast-clone.js";
16
17
  import { useRouter } from "next/navigation";
17
18
  function EnableEditor(props) {
18
19
  const elementRef = useRef(null);
@@ -154,7 +155,7 @@ function EnableEditor(props) {
154
155
  if (isEditing()) {
155
156
  window.dispatchEvent(new CustomEvent("builder:component:stateChange", {
156
157
  detail: {
157
- state: props.builderContextSignal.rootState,
158
+ state: fastClone(props.builderContextSignal.rootState),
158
159
  ref: {
159
160
  name: props.model,
160
161
  },
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.5.7";
1
+ export declare const SDK_VERSION = "0.5.8";
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.5.7";
1
+ export const SDK_VERSION = "0.5.8";
@@ -16,7 +16,7 @@ export function registerComponent(component, info) {
16
16
  }
17
17
  export const createRegisterComponentMessage = (info) => ({
18
18
  type: 'builder.registerComponent',
19
- data: info
19
+ data: serializeComponentInfo(info)
20
20
  });
21
21
  // eslint-disable-next-line @typescript-eslint/ban-types
22
22
  const serializeFn = (fnValue) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@builder.io/sdk-react-nextjs",
3
3
  "description": "Builder.io SDK for React",
4
- "version": "0.5.7",
4
+ "version": "0.5.8",
5
5
  "files": [
6
6
  "dist"
7
7
  ],