@builder.io/sdk-react 0.4.2 → 0.4.3
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.
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { useState } from "react";
|
|
4
|
-
/**
|
|
5
|
-
* We can't make this a generic `ProvideContext` function because Vue 2 won't support root slots, e.g.
|
|
6
|
-
*
|
|
7
|
-
* ```vue
|
|
8
|
-
* <template>
|
|
9
|
-
* <slot></slot>
|
|
10
|
-
* </template>
|
|
11
|
-
* ```
|
|
12
|
-
*/
|
|
13
4
|
import BuilderContext from "../../context/builder.context.js";
|
|
14
5
|
import RenderBlock from "./render-block";
|
|
15
6
|
function RenderRepeatedBlock(props) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TARGET } from '../../constants/target';
|
|
1
2
|
import { isBrowser } from '../../functions/is-browser';
|
|
2
3
|
export const getVariants = (content) => Object.values(content?.variations || {});
|
|
3
4
|
export const checkShouldRunVariants = ({ canTrack, content, }) => {
|
|
@@ -155,10 +156,11 @@ function bldrCntntScrpt(variantContentId, defaultContentId, isHydrationTarget) {
|
|
|
155
156
|
}
|
|
156
157
|
return;
|
|
157
158
|
}
|
|
158
|
-
const
|
|
159
|
+
const getIsHydrationTarget = (target) => target === 'react' ||
|
|
159
160
|
target === 'reactNative' ||
|
|
160
161
|
target === 'vue3' ||
|
|
161
162
|
target === 'vue2';
|
|
163
|
+
const isHydrationTarget = getIsHydrationTarget(TARGET);
|
|
162
164
|
/**
|
|
163
165
|
* We hardcode explicit function names here, because the `.toString()` of a function can change depending on the bundler.
|
|
164
166
|
* Some bundlers will minify the fn name, etc.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.4.
|
|
1
|
+
export declare const SDK_VERSION = "0.4.3";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.4.
|
|
1
|
+
export const SDK_VERSION = "0.4.3";
|