@builder.io/sdk-react 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.
|
@@ -14,6 +14,7 @@ import { getInteractionPropertiesForEvent } from "../../../functions/track/inter
|
|
|
14
14
|
import { logger } from "../../../helpers/logger.js";
|
|
15
15
|
import { fetchOneEntry } from "../../../functions/get-content/index.js";
|
|
16
16
|
import { isPreviewing } from "../../../functions/is-previewing.js";
|
|
17
|
+
import { fastClone } from "../../../functions/fast-clone.js";
|
|
17
18
|
function EnableEditor(props) {
|
|
18
19
|
const elementRef = useRef(null);
|
|
19
20
|
const [canTrackToUse, setCanTrackToUse] = useState(() => checkIsDefined(props.canTrack) ? props.canTrack : true);
|
|
@@ -150,7 +151,7 @@ function EnableEditor(props) {
|
|
|
150
151
|
if (isEditing()) {
|
|
151
152
|
window.dispatchEvent(new CustomEvent("builder:component:stateChange", {
|
|
152
153
|
detail: {
|
|
153
|
-
state: props.builderContextSignal.rootState,
|
|
154
|
+
state: fastClone(props.builderContextSignal.rootState),
|
|
154
155
|
ref: {
|
|
155
156
|
name: props.model,
|
|
156
157
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.5.
|
|
1
|
+
export declare const SDK_VERSION = "0.5.8";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.5.
|
|
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) => {
|