@builder.io/sdk-solid 1.0.14 → 1.0.16
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/dist/index.d.ts +8 -0
- package/lib/browser/dev.js +15 -10
- package/lib/browser/dev.jsx +25 -11
- package/lib/browser/index.js +15 -10
- package/lib/browser/index.jsx +25 -11
- package/lib/edge/dev.js +15 -10
- package/lib/edge/dev.jsx +25 -11
- package/lib/edge/index.js +15 -10
- package/lib/edge/index.jsx +25 -11
- package/lib/node/dev.js +15 -10
- package/lib/node/dev.jsx +25 -11
- package/lib/node/index.js +15 -10
- package/lib/node/index.jsx +25 -11
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -921,6 +921,14 @@ interface GetContentOptions {
|
|
|
921
921
|
* draft mode and un-archived. Default is false.
|
|
922
922
|
*/
|
|
923
923
|
includeUnpublished?: boolean;
|
|
924
|
+
/**
|
|
925
|
+
* Optional override of the `fetch` function. (Defaults to global `fetch`)
|
|
926
|
+
*/
|
|
927
|
+
fetch?: typeof global.fetch;
|
|
928
|
+
/**
|
|
929
|
+
* Optional fetch options to be passed to the `fetch` function.
|
|
930
|
+
*/
|
|
931
|
+
fetchOptions?: RequestInit;
|
|
924
932
|
}
|
|
925
933
|
|
|
926
934
|
type GetBuilderPropsOptions = (Omit<GetContentOptions, 'model'> & {
|
package/lib/browser/dev.js
CHANGED
|
@@ -871,7 +871,7 @@ function InlinedStyles(props) {
|
|
|
871
871
|
effect((_p$) => {
|
|
872
872
|
const _v$ = props.styles, _v$2 = props.id;
|
|
873
873
|
_v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
|
|
874
|
-
_v$2 !== _p$._v$2 && setAttribute(_el$, "id", _p$._v$2 = _v$2);
|
|
874
|
+
_v$2 !== _p$._v$2 && setAttribute(_el$, "data-id", _p$._v$2 = _v$2);
|
|
875
875
|
return _p$;
|
|
876
876
|
}, {
|
|
877
877
|
_v$: void 0,
|
|
@@ -942,6 +942,7 @@ function BlockStyles(props) {
|
|
|
942
942
|
},
|
|
943
943
|
get children() {
|
|
944
944
|
return createComponent(inlined_styles_default, {
|
|
945
|
+
id: "builderio-block",
|
|
945
946
|
get styles() {
|
|
946
947
|
return css5();
|
|
947
948
|
}
|
|
@@ -1658,6 +1659,7 @@ function Columns(props) {
|
|
|
1658
1659
|
when: TARGET !== "reactNative",
|
|
1659
1660
|
get children() {
|
|
1660
1661
|
return createComponent(inlined_styles_default, {
|
|
1662
|
+
id: "builderio-columns",
|
|
1661
1663
|
get styles() {
|
|
1662
1664
|
return columnsStyles();
|
|
1663
1665
|
}
|
|
@@ -3929,7 +3931,7 @@ var checkShouldRenderVariants = ({
|
|
|
3929
3931
|
};
|
|
3930
3932
|
var getIsHydrationTarget = (target) => target === "react" || target === "reactNative";
|
|
3931
3933
|
var isHydrationTarget = getIsHydrationTarget(TARGET);
|
|
3932
|
-
var
|
|
3934
|
+
var getInitVariantsFnsScriptString = () => `
|
|
3933
3935
|
window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME} = ${UPDATE_COOKIES_AND_STYLES_SCRIPT}
|
|
3934
3936
|
window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME} = ${UPDATE_VARIANT_VISIBILITY_SCRIPT}
|
|
3935
3937
|
`;
|
|
@@ -3948,9 +3950,9 @@ function InlinedScript(props) {
|
|
|
3948
3950
|
return (() => {
|
|
3949
3951
|
const _el$ = _tmpl$16();
|
|
3950
3952
|
effect((_p$) => {
|
|
3951
|
-
const _v$ = props.scriptStr, _v$2 = props.id
|
|
3953
|
+
const _v$ = props.scriptStr, _v$2 = props.id;
|
|
3952
3954
|
_v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
|
|
3953
|
-
_v$2 !== _p$._v$2 && setAttribute(_el$, "id", _p$._v$2 = _v$2);
|
|
3955
|
+
_v$2 !== _p$._v$2 && setAttribute(_el$, "data-id", _p$._v$2 = _v$2);
|
|
3954
3956
|
return _p$;
|
|
3955
3957
|
}, {
|
|
3956
3958
|
_v$: void 0,
|
|
@@ -4135,7 +4137,8 @@ async function fetchOneEntry(options) {
|
|
|
4135
4137
|
}
|
|
4136
4138
|
var _fetchContent = async (options) => {
|
|
4137
4139
|
const url = generateContentUrl(options);
|
|
4138
|
-
const
|
|
4140
|
+
const _fetch = options.fetch ?? fetch2;
|
|
4141
|
+
const res = await _fetch(url.href, options.fetchOptions);
|
|
4139
4142
|
const content = await res.json();
|
|
4140
4143
|
return content;
|
|
4141
4144
|
};
|
|
@@ -4446,7 +4449,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
4446
4449
|
}
|
|
4447
4450
|
|
|
4448
4451
|
// src/constants/sdk-version.ts
|
|
4449
|
-
var SDK_VERSION = "1.0.
|
|
4452
|
+
var SDK_VERSION = "1.0.16";
|
|
4450
4453
|
|
|
4451
4454
|
// src/functions/register.ts
|
|
4452
4455
|
var registry = {};
|
|
@@ -5028,6 +5031,7 @@ ${getFontCss({
|
|
|
5028
5031
|
${getDefaultStyles(props.isNestedRender)}
|
|
5029
5032
|
`.trim());
|
|
5030
5033
|
return createComponent(inlined_styles_default, {
|
|
5034
|
+
id: "builderio-content",
|
|
5031
5035
|
get styles() {
|
|
5032
5036
|
return injectedStyles();
|
|
5033
5037
|
}
|
|
@@ -5181,6 +5185,7 @@ function ContentComponent(props) {
|
|
|
5181
5185
|
},
|
|
5182
5186
|
get children() {
|
|
5183
5187
|
return createComponent(inlined_script_default, {
|
|
5188
|
+
id: "builderio-variant-visibility",
|
|
5184
5189
|
get scriptStr() {
|
|
5185
5190
|
return scriptStr();
|
|
5186
5191
|
}
|
|
@@ -5258,8 +5263,9 @@ function ContentVariants(props) {
|
|
|
5258
5263
|
},
|
|
5259
5264
|
get children() {
|
|
5260
5265
|
return createComponent(inlined_script_default, {
|
|
5266
|
+
id: "builderio-init-variants-fns",
|
|
5261
5267
|
get scriptStr() {
|
|
5262
|
-
return
|
|
5268
|
+
return getInitVariantsFnsScriptString();
|
|
5263
5269
|
}
|
|
5264
5270
|
});
|
|
5265
5271
|
}
|
|
@@ -5269,13 +5275,12 @@ function ContentVariants(props) {
|
|
|
5269
5275
|
},
|
|
5270
5276
|
get children() {
|
|
5271
5277
|
return [createComponent(inlined_styles_default, {
|
|
5272
|
-
|
|
5273
|
-
return `variants-styles-${props.content?.id}`;
|
|
5274
|
-
},
|
|
5278
|
+
id: "builderio-variants",
|
|
5275
5279
|
get styles() {
|
|
5276
5280
|
return hideVariantsStyleString();
|
|
5277
5281
|
}
|
|
5278
5282
|
}), createComponent(inlined_script_default, {
|
|
5283
|
+
id: "builderio-variants-visibility",
|
|
5279
5284
|
get scriptStr() {
|
|
5280
5285
|
return updateCookieAndStylesScriptStr();
|
|
5281
5286
|
}
|
package/lib/browser/dev.jsx
CHANGED
|
@@ -857,7 +857,7 @@ var getSizesForBreakpoints = ({
|
|
|
857
857
|
|
|
858
858
|
// src/components/inlined-styles.tsx
|
|
859
859
|
function InlinedStyles(props) {
|
|
860
|
-
return <style innerHTML={props.styles} id={props.id} />;
|
|
860
|
+
return <style innerHTML={props.styles} data-id={props.id} />;
|
|
861
861
|
}
|
|
862
862
|
var Inlined_styles_default = InlinedStyles;
|
|
863
863
|
|
|
@@ -923,7 +923,7 @@ function BlockStyles(props) {
|
|
|
923
923
|
}) : "";
|
|
924
924
|
return [largeStylesClass, mediumStylesClass, smallStylesClass].join(" ");
|
|
925
925
|
});
|
|
926
|
-
return <Show2 when={TARGET !== "reactNative" && css5() && canShowBlock()}><Inlined_styles_default styles={css5()} /></Show2>;
|
|
926
|
+
return <Show2 when={TARGET !== "reactNative" && css5() && canShowBlock()}><Inlined_styles_default id="builderio-block" styles={css5()} /></Show2>;
|
|
927
927
|
}
|
|
928
928
|
var Block_styles_default = BlockStyles;
|
|
929
929
|
|
|
@@ -1458,7 +1458,10 @@ function Columns(props) {
|
|
|
1458
1458
|
style={columnsCssVars()}
|
|
1459
1459
|
{...{}}
|
|
1460
1460
|
>
|
|
1461
|
-
<Show6 when={TARGET !== "reactNative"}><Inlined_styles_default
|
|
1461
|
+
<Show6 when={TARGET !== "reactNative"}><Inlined_styles_default
|
|
1462
|
+
id="builderio-columns"
|
|
1463
|
+
styles={columnsStyles()}
|
|
1464
|
+
/></Show6>
|
|
1462
1465
|
<For4 each={props.columns}>{(column, _index) => {
|
|
1463
1466
|
const index = _index();
|
|
1464
1467
|
return <Dynamic_renderer_default
|
|
@@ -3512,7 +3515,7 @@ var checkShouldRenderVariants = ({
|
|
|
3512
3515
|
};
|
|
3513
3516
|
var getIsHydrationTarget = (target) => target === "react" || target === "reactNative";
|
|
3514
3517
|
var isHydrationTarget = getIsHydrationTarget(TARGET);
|
|
3515
|
-
var
|
|
3518
|
+
var getInitVariantsFnsScriptString = () => `
|
|
3516
3519
|
window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME} = ${UPDATE_COOKIES_AND_STYLES_SCRIPT}
|
|
3517
3520
|
window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME} = ${UPDATE_VARIANT_VISIBILITY_SCRIPT}
|
|
3518
3521
|
`;
|
|
@@ -3529,7 +3532,7 @@ var getUpdateVariantVisibilityScript = ({
|
|
|
3529
3532
|
|
|
3530
3533
|
// src/components/inlined-script.tsx
|
|
3531
3534
|
function InlinedScript(props) {
|
|
3532
|
-
return <script innerHTML={props.scriptStr} id={props.id
|
|
3535
|
+
return <script innerHTML={props.scriptStr} data-id={props.id} />;
|
|
3533
3536
|
}
|
|
3534
3537
|
var Inlined_script_default = InlinedScript;
|
|
3535
3538
|
|
|
@@ -3718,7 +3721,8 @@ async function fetchOneEntry(options) {
|
|
|
3718
3721
|
}
|
|
3719
3722
|
var _fetchContent = async (options) => {
|
|
3720
3723
|
const url = generateContentUrl(options);
|
|
3721
|
-
const
|
|
3724
|
+
const _fetch = options.fetch ?? fetch2;
|
|
3725
|
+
const res = await _fetch(url.href, options.fetchOptions);
|
|
3722
3726
|
const content = await res.json();
|
|
3723
3727
|
return content;
|
|
3724
3728
|
};
|
|
@@ -4029,7 +4033,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
4029
4033
|
}
|
|
4030
4034
|
|
|
4031
4035
|
// src/constants/sdk-version.ts
|
|
4032
|
-
var SDK_VERSION = "1.0.
|
|
4036
|
+
var SDK_VERSION = "1.0.16";
|
|
4033
4037
|
|
|
4034
4038
|
// src/functions/register.ts
|
|
4035
4039
|
var registry = {};
|
|
@@ -4623,7 +4627,10 @@ ${getFontCss({
|
|
|
4623
4627
|
${getDefaultStyles(props.isNestedRender)}
|
|
4624
4628
|
`.trim()
|
|
4625
4629
|
);
|
|
4626
|
-
return <Inlined_styles_default
|
|
4630
|
+
return <Inlined_styles_default
|
|
4631
|
+
id="builderio-content"
|
|
4632
|
+
styles={injectedStyles()}
|
|
4633
|
+
/>;
|
|
4627
4634
|
}
|
|
4628
4635
|
var Styles_default = ContentStyles;
|
|
4629
4636
|
|
|
@@ -4746,7 +4753,10 @@ function ContentComponent(props) {
|
|
|
4746
4753
|
setBuilderContextSignal
|
|
4747
4754
|
}}
|
|
4748
4755
|
>
|
|
4749
|
-
<Show11 when={props.isSsrAbTest}><Inlined_script_default
|
|
4756
|
+
<Show11 when={props.isSsrAbTest}><Inlined_script_default
|
|
4757
|
+
id="builderio-variant-visibility"
|
|
4758
|
+
scriptStr={scriptStr()}
|
|
4759
|
+
/></Show11>
|
|
4750
4760
|
<Show11 when={TARGET !== "reactNative"}><Styles_default
|
|
4751
4761
|
isNestedRender={props.isNestedRender}
|
|
4752
4762
|
contentId={builderContextSignal().content?.id}
|
|
@@ -4796,13 +4806,17 @@ function ContentVariants(props) {
|
|
|
4796
4806
|
setShouldRenderVariants(false);
|
|
4797
4807
|
});
|
|
4798
4808
|
return <>
|
|
4799
|
-
<Show12 when={!props.isNestedRender && TARGET !== "reactNative"}><Inlined_script_default
|
|
4809
|
+
<Show12 when={!props.isNestedRender && TARGET !== "reactNative"}><Inlined_script_default
|
|
4810
|
+
id="builderio-init-variants-fns"
|
|
4811
|
+
scriptStr={getInitVariantsFnsScriptString()}
|
|
4812
|
+
/></Show12>
|
|
4800
4813
|
<Show12 when={shouldRenderVariants()}>
|
|
4801
4814
|
<Inlined_styles_default
|
|
4802
|
-
id=
|
|
4815
|
+
id="builderio-variants"
|
|
4803
4816
|
styles={hideVariantsStyleString()}
|
|
4804
4817
|
/>
|
|
4805
4818
|
<Inlined_script_default
|
|
4819
|
+
id="builderio-variants-visibility"
|
|
4806
4820
|
scriptStr={updateCookieAndStylesScriptStr()}
|
|
4807
4821
|
/>
|
|
4808
4822
|
<For7 each={getVariants(props.content)}>{(variant, _index) => {
|
package/lib/browser/index.js
CHANGED
|
@@ -865,7 +865,7 @@ function InlinedStyles(props) {
|
|
|
865
865
|
effect((_p$) => {
|
|
866
866
|
const _v$ = props.styles, _v$2 = props.id;
|
|
867
867
|
_v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
|
|
868
|
-
_v$2 !== _p$._v$2 && setAttribute(_el$, "id", _p$._v$2 = _v$2);
|
|
868
|
+
_v$2 !== _p$._v$2 && setAttribute(_el$, "data-id", _p$._v$2 = _v$2);
|
|
869
869
|
return _p$;
|
|
870
870
|
}, {
|
|
871
871
|
_v$: void 0,
|
|
@@ -936,6 +936,7 @@ function BlockStyles(props) {
|
|
|
936
936
|
},
|
|
937
937
|
get children() {
|
|
938
938
|
return createComponent(inlined_styles_default, {
|
|
939
|
+
id: "builderio-block",
|
|
939
940
|
get styles() {
|
|
940
941
|
return css5();
|
|
941
942
|
}
|
|
@@ -1652,6 +1653,7 @@ function Columns(props) {
|
|
|
1652
1653
|
when: TARGET !== "reactNative",
|
|
1653
1654
|
get children() {
|
|
1654
1655
|
return createComponent(inlined_styles_default, {
|
|
1656
|
+
id: "builderio-columns",
|
|
1655
1657
|
get styles() {
|
|
1656
1658
|
return columnsStyles();
|
|
1657
1659
|
}
|
|
@@ -3919,7 +3921,7 @@ var checkShouldRenderVariants = ({
|
|
|
3919
3921
|
};
|
|
3920
3922
|
var getIsHydrationTarget = (target) => target === "react" || target === "reactNative";
|
|
3921
3923
|
var isHydrationTarget = getIsHydrationTarget(TARGET);
|
|
3922
|
-
var
|
|
3924
|
+
var getInitVariantsFnsScriptString = () => `
|
|
3923
3925
|
window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME} = ${UPDATE_COOKIES_AND_STYLES_SCRIPT}
|
|
3924
3926
|
window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME} = ${UPDATE_VARIANT_VISIBILITY_SCRIPT}
|
|
3925
3927
|
`;
|
|
@@ -3938,9 +3940,9 @@ function InlinedScript(props) {
|
|
|
3938
3940
|
return (() => {
|
|
3939
3941
|
const _el$ = _tmpl$16();
|
|
3940
3942
|
effect((_p$) => {
|
|
3941
|
-
const _v$ = props.scriptStr, _v$2 = props.id
|
|
3943
|
+
const _v$ = props.scriptStr, _v$2 = props.id;
|
|
3942
3944
|
_v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
|
|
3943
|
-
_v$2 !== _p$._v$2 && setAttribute(_el$, "id", _p$._v$2 = _v$2);
|
|
3945
|
+
_v$2 !== _p$._v$2 && setAttribute(_el$, "data-id", _p$._v$2 = _v$2);
|
|
3944
3946
|
return _p$;
|
|
3945
3947
|
}, {
|
|
3946
3948
|
_v$: void 0,
|
|
@@ -4123,7 +4125,8 @@ async function fetchOneEntry(options) {
|
|
|
4123
4125
|
}
|
|
4124
4126
|
var _fetchContent = async (options) => {
|
|
4125
4127
|
const url = generateContentUrl(options);
|
|
4126
|
-
const
|
|
4128
|
+
const _fetch = options.fetch ?? fetch2;
|
|
4129
|
+
const res = await _fetch(url.href, options.fetchOptions);
|
|
4127
4130
|
const content = await res.json();
|
|
4128
4131
|
return content;
|
|
4129
4132
|
};
|
|
@@ -4431,7 +4434,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
4431
4434
|
}
|
|
4432
4435
|
|
|
4433
4436
|
// src/constants/sdk-version.ts
|
|
4434
|
-
var SDK_VERSION = "1.0.
|
|
4437
|
+
var SDK_VERSION = "1.0.16";
|
|
4435
4438
|
|
|
4436
4439
|
// src/functions/register.ts
|
|
4437
4440
|
var registry = {};
|
|
@@ -5011,6 +5014,7 @@ ${getFontCss({
|
|
|
5011
5014
|
${getDefaultStyles(props.isNestedRender)}
|
|
5012
5015
|
`.trim());
|
|
5013
5016
|
return createComponent(inlined_styles_default, {
|
|
5017
|
+
id: "builderio-content",
|
|
5014
5018
|
get styles() {
|
|
5015
5019
|
return injectedStyles();
|
|
5016
5020
|
}
|
|
@@ -5164,6 +5168,7 @@ function ContentComponent(props) {
|
|
|
5164
5168
|
},
|
|
5165
5169
|
get children() {
|
|
5166
5170
|
return createComponent(inlined_script_default, {
|
|
5171
|
+
id: "builderio-variant-visibility",
|
|
5167
5172
|
get scriptStr() {
|
|
5168
5173
|
return scriptStr();
|
|
5169
5174
|
}
|
|
@@ -5241,8 +5246,9 @@ function ContentVariants(props) {
|
|
|
5241
5246
|
},
|
|
5242
5247
|
get children() {
|
|
5243
5248
|
return createComponent(inlined_script_default, {
|
|
5249
|
+
id: "builderio-init-variants-fns",
|
|
5244
5250
|
get scriptStr() {
|
|
5245
|
-
return
|
|
5251
|
+
return getInitVariantsFnsScriptString();
|
|
5246
5252
|
}
|
|
5247
5253
|
});
|
|
5248
5254
|
}
|
|
@@ -5252,13 +5258,12 @@ function ContentVariants(props) {
|
|
|
5252
5258
|
},
|
|
5253
5259
|
get children() {
|
|
5254
5260
|
return [createComponent(inlined_styles_default, {
|
|
5255
|
-
|
|
5256
|
-
return `variants-styles-${props.content?.id}`;
|
|
5257
|
-
},
|
|
5261
|
+
id: "builderio-variants",
|
|
5258
5262
|
get styles() {
|
|
5259
5263
|
return hideVariantsStyleString();
|
|
5260
5264
|
}
|
|
5261
5265
|
}), createComponent(inlined_script_default, {
|
|
5266
|
+
id: "builderio-variants-visibility",
|
|
5262
5267
|
get scriptStr() {
|
|
5263
5268
|
return updateCookieAndStylesScriptStr();
|
|
5264
5269
|
}
|
package/lib/browser/index.jsx
CHANGED
|
@@ -851,7 +851,7 @@ var getSizesForBreakpoints = ({
|
|
|
851
851
|
|
|
852
852
|
// src/components/inlined-styles.tsx
|
|
853
853
|
function InlinedStyles(props) {
|
|
854
|
-
return <style innerHTML={props.styles} id={props.id} />;
|
|
854
|
+
return <style innerHTML={props.styles} data-id={props.id} />;
|
|
855
855
|
}
|
|
856
856
|
var Inlined_styles_default = InlinedStyles;
|
|
857
857
|
|
|
@@ -917,7 +917,7 @@ function BlockStyles(props) {
|
|
|
917
917
|
}) : "";
|
|
918
918
|
return [largeStylesClass, mediumStylesClass, smallStylesClass].join(" ");
|
|
919
919
|
});
|
|
920
|
-
return <Show2 when={TARGET !== "reactNative" && css5() && canShowBlock()}><Inlined_styles_default styles={css5()} /></Show2>;
|
|
920
|
+
return <Show2 when={TARGET !== "reactNative" && css5() && canShowBlock()}><Inlined_styles_default id="builderio-block" styles={css5()} /></Show2>;
|
|
921
921
|
}
|
|
922
922
|
var Block_styles_default = BlockStyles;
|
|
923
923
|
|
|
@@ -1452,7 +1452,10 @@ function Columns(props) {
|
|
|
1452
1452
|
style={columnsCssVars()}
|
|
1453
1453
|
{...{}}
|
|
1454
1454
|
>
|
|
1455
|
-
<Show6 when={TARGET !== "reactNative"}><Inlined_styles_default
|
|
1455
|
+
<Show6 when={TARGET !== "reactNative"}><Inlined_styles_default
|
|
1456
|
+
id="builderio-columns"
|
|
1457
|
+
styles={columnsStyles()}
|
|
1458
|
+
/></Show6>
|
|
1456
1459
|
<For4 each={props.columns}>{(column, _index) => {
|
|
1457
1460
|
const index = _index();
|
|
1458
1461
|
return <Dynamic_renderer_default
|
|
@@ -3502,7 +3505,7 @@ var checkShouldRenderVariants = ({
|
|
|
3502
3505
|
};
|
|
3503
3506
|
var getIsHydrationTarget = (target) => target === "react" || target === "reactNative";
|
|
3504
3507
|
var isHydrationTarget = getIsHydrationTarget(TARGET);
|
|
3505
|
-
var
|
|
3508
|
+
var getInitVariantsFnsScriptString = () => `
|
|
3506
3509
|
window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME} = ${UPDATE_COOKIES_AND_STYLES_SCRIPT}
|
|
3507
3510
|
window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME} = ${UPDATE_VARIANT_VISIBILITY_SCRIPT}
|
|
3508
3511
|
`;
|
|
@@ -3519,7 +3522,7 @@ var getUpdateVariantVisibilityScript = ({
|
|
|
3519
3522
|
|
|
3520
3523
|
// src/components/inlined-script.tsx
|
|
3521
3524
|
function InlinedScript(props) {
|
|
3522
|
-
return <script innerHTML={props.scriptStr} id={props.id
|
|
3525
|
+
return <script innerHTML={props.scriptStr} data-id={props.id} />;
|
|
3523
3526
|
}
|
|
3524
3527
|
var Inlined_script_default = InlinedScript;
|
|
3525
3528
|
|
|
@@ -3706,7 +3709,8 @@ async function fetchOneEntry(options) {
|
|
|
3706
3709
|
}
|
|
3707
3710
|
var _fetchContent = async (options) => {
|
|
3708
3711
|
const url = generateContentUrl(options);
|
|
3709
|
-
const
|
|
3712
|
+
const _fetch = options.fetch ?? fetch2;
|
|
3713
|
+
const res = await _fetch(url.href, options.fetchOptions);
|
|
3710
3714
|
const content = await res.json();
|
|
3711
3715
|
return content;
|
|
3712
3716
|
};
|
|
@@ -4014,7 +4018,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
4014
4018
|
}
|
|
4015
4019
|
|
|
4016
4020
|
// src/constants/sdk-version.ts
|
|
4017
|
-
var SDK_VERSION = "1.0.
|
|
4021
|
+
var SDK_VERSION = "1.0.16";
|
|
4018
4022
|
|
|
4019
4023
|
// src/functions/register.ts
|
|
4020
4024
|
var registry = {};
|
|
@@ -4606,7 +4610,10 @@ ${getFontCss({
|
|
|
4606
4610
|
${getDefaultStyles(props.isNestedRender)}
|
|
4607
4611
|
`.trim()
|
|
4608
4612
|
);
|
|
4609
|
-
return <Inlined_styles_default
|
|
4613
|
+
return <Inlined_styles_default
|
|
4614
|
+
id="builderio-content"
|
|
4615
|
+
styles={injectedStyles()}
|
|
4616
|
+
/>;
|
|
4610
4617
|
}
|
|
4611
4618
|
var Styles_default = ContentStyles;
|
|
4612
4619
|
|
|
@@ -4729,7 +4736,10 @@ function ContentComponent(props) {
|
|
|
4729
4736
|
setBuilderContextSignal
|
|
4730
4737
|
}}
|
|
4731
4738
|
>
|
|
4732
|
-
<Show11 when={props.isSsrAbTest}><Inlined_script_default
|
|
4739
|
+
<Show11 when={props.isSsrAbTest}><Inlined_script_default
|
|
4740
|
+
id="builderio-variant-visibility"
|
|
4741
|
+
scriptStr={scriptStr()}
|
|
4742
|
+
/></Show11>
|
|
4733
4743
|
<Show11 when={TARGET !== "reactNative"}><Styles_default
|
|
4734
4744
|
isNestedRender={props.isNestedRender}
|
|
4735
4745
|
contentId={builderContextSignal().content?.id}
|
|
@@ -4779,13 +4789,17 @@ function ContentVariants(props) {
|
|
|
4779
4789
|
setShouldRenderVariants(false);
|
|
4780
4790
|
});
|
|
4781
4791
|
return <>
|
|
4782
|
-
<Show12 when={!props.isNestedRender && TARGET !== "reactNative"}><Inlined_script_default
|
|
4792
|
+
<Show12 when={!props.isNestedRender && TARGET !== "reactNative"}><Inlined_script_default
|
|
4793
|
+
id="builderio-init-variants-fns"
|
|
4794
|
+
scriptStr={getInitVariantsFnsScriptString()}
|
|
4795
|
+
/></Show12>
|
|
4783
4796
|
<Show12 when={shouldRenderVariants()}>
|
|
4784
4797
|
<Inlined_styles_default
|
|
4785
|
-
id=
|
|
4798
|
+
id="builderio-variants"
|
|
4786
4799
|
styles={hideVariantsStyleString()}
|
|
4787
4800
|
/>
|
|
4788
4801
|
<Inlined_script_default
|
|
4802
|
+
id="builderio-variants-visibility"
|
|
4789
4803
|
scriptStr={updateCookieAndStylesScriptStr()}
|
|
4790
4804
|
/>
|
|
4791
4805
|
<For7 each={getVariants(props.content)}>{(variant, _index) => {
|
package/lib/edge/dev.js
CHANGED
|
@@ -4024,7 +4024,7 @@ function InlinedStyles(props) {
|
|
|
4024
4024
|
effect((_p$) => {
|
|
4025
4025
|
const _v$ = props.styles, _v$2 = props.id;
|
|
4026
4026
|
_v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
|
|
4027
|
-
_v$2 !== _p$._v$2 && setAttribute(_el$, "id", _p$._v$2 = _v$2);
|
|
4027
|
+
_v$2 !== _p$._v$2 && setAttribute(_el$, "data-id", _p$._v$2 = _v$2);
|
|
4028
4028
|
return _p$;
|
|
4029
4029
|
}, {
|
|
4030
4030
|
_v$: void 0,
|
|
@@ -4095,6 +4095,7 @@ function BlockStyles(props) {
|
|
|
4095
4095
|
},
|
|
4096
4096
|
get children() {
|
|
4097
4097
|
return createComponent(inlined_styles_default, {
|
|
4098
|
+
id: "builderio-block",
|
|
4098
4099
|
get styles() {
|
|
4099
4100
|
return css5();
|
|
4100
4101
|
}
|
|
@@ -4811,6 +4812,7 @@ function Columns(props) {
|
|
|
4811
4812
|
when: TARGET !== "reactNative",
|
|
4812
4813
|
get children() {
|
|
4813
4814
|
return createComponent(inlined_styles_default, {
|
|
4815
|
+
id: "builderio-columns",
|
|
4814
4816
|
get styles() {
|
|
4815
4817
|
return columnsStyles();
|
|
4816
4818
|
}
|
|
@@ -7082,7 +7084,7 @@ var checkShouldRenderVariants = ({
|
|
|
7082
7084
|
};
|
|
7083
7085
|
var getIsHydrationTarget = (target) => target === "react" || target === "reactNative";
|
|
7084
7086
|
var isHydrationTarget = getIsHydrationTarget(TARGET);
|
|
7085
|
-
var
|
|
7087
|
+
var getInitVariantsFnsScriptString = () => `
|
|
7086
7088
|
window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME} = ${UPDATE_COOKIES_AND_STYLES_SCRIPT}
|
|
7087
7089
|
window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME} = ${UPDATE_VARIANT_VISIBILITY_SCRIPT}
|
|
7088
7090
|
`;
|
|
@@ -7101,9 +7103,9 @@ function InlinedScript(props) {
|
|
|
7101
7103
|
return (() => {
|
|
7102
7104
|
const _el$ = _tmpl$16();
|
|
7103
7105
|
effect((_p$) => {
|
|
7104
|
-
const _v$ = props.scriptStr, _v$2 = props.id
|
|
7106
|
+
const _v$ = props.scriptStr, _v$2 = props.id;
|
|
7105
7107
|
_v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
|
|
7106
|
-
_v$2 !== _p$._v$2 && setAttribute(_el$, "id", _p$._v$2 = _v$2);
|
|
7108
|
+
_v$2 !== _p$._v$2 && setAttribute(_el$, "data-id", _p$._v$2 = _v$2);
|
|
7107
7109
|
return _p$;
|
|
7108
7110
|
}, {
|
|
7109
7111
|
_v$: void 0,
|
|
@@ -7288,7 +7290,8 @@ async function fetchOneEntry(options) {
|
|
|
7288
7290
|
}
|
|
7289
7291
|
var _fetchContent = async (options) => {
|
|
7290
7292
|
const url = generateContentUrl(options);
|
|
7291
|
-
const
|
|
7293
|
+
const _fetch = options.fetch ?? fetch2;
|
|
7294
|
+
const res = await _fetch(url.href, options.fetchOptions);
|
|
7292
7295
|
const content = await res.json();
|
|
7293
7296
|
return content;
|
|
7294
7297
|
};
|
|
@@ -7599,7 +7602,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
7599
7602
|
}
|
|
7600
7603
|
|
|
7601
7604
|
// src/constants/sdk-version.ts
|
|
7602
|
-
var SDK_VERSION = "1.0.
|
|
7605
|
+
var SDK_VERSION = "1.0.16";
|
|
7603
7606
|
|
|
7604
7607
|
// src/functions/register.ts
|
|
7605
7608
|
var registry = {};
|
|
@@ -8181,6 +8184,7 @@ ${getFontCss({
|
|
|
8181
8184
|
${getDefaultStyles(props.isNestedRender)}
|
|
8182
8185
|
`.trim());
|
|
8183
8186
|
return createComponent(inlined_styles_default, {
|
|
8187
|
+
id: "builderio-content",
|
|
8184
8188
|
get styles() {
|
|
8185
8189
|
return injectedStyles();
|
|
8186
8190
|
}
|
|
@@ -8334,6 +8338,7 @@ function ContentComponent(props) {
|
|
|
8334
8338
|
},
|
|
8335
8339
|
get children() {
|
|
8336
8340
|
return createComponent(inlined_script_default, {
|
|
8341
|
+
id: "builderio-variant-visibility",
|
|
8337
8342
|
get scriptStr() {
|
|
8338
8343
|
return scriptStr();
|
|
8339
8344
|
}
|
|
@@ -8411,8 +8416,9 @@ function ContentVariants(props) {
|
|
|
8411
8416
|
},
|
|
8412
8417
|
get children() {
|
|
8413
8418
|
return createComponent(inlined_script_default, {
|
|
8419
|
+
id: "builderio-init-variants-fns",
|
|
8414
8420
|
get scriptStr() {
|
|
8415
|
-
return
|
|
8421
|
+
return getInitVariantsFnsScriptString();
|
|
8416
8422
|
}
|
|
8417
8423
|
});
|
|
8418
8424
|
}
|
|
@@ -8422,13 +8428,12 @@ function ContentVariants(props) {
|
|
|
8422
8428
|
},
|
|
8423
8429
|
get children() {
|
|
8424
8430
|
return [createComponent(inlined_styles_default, {
|
|
8425
|
-
|
|
8426
|
-
return `variants-styles-${props.content?.id}`;
|
|
8427
|
-
},
|
|
8431
|
+
id: "builderio-variants",
|
|
8428
8432
|
get styles() {
|
|
8429
8433
|
return hideVariantsStyleString();
|
|
8430
8434
|
}
|
|
8431
8435
|
}), createComponent(inlined_script_default, {
|
|
8436
|
+
id: "builderio-variants-visibility",
|
|
8432
8437
|
get scriptStr() {
|
|
8433
8438
|
return updateCookieAndStylesScriptStr();
|
|
8434
8439
|
}
|
package/lib/edge/dev.jsx
CHANGED
|
@@ -4012,7 +4012,7 @@ var getSizesForBreakpoints = ({
|
|
|
4012
4012
|
|
|
4013
4013
|
// src/components/inlined-styles.tsx
|
|
4014
4014
|
function InlinedStyles(props) {
|
|
4015
|
-
return <style innerHTML={props.styles} id={props.id} />;
|
|
4015
|
+
return <style innerHTML={props.styles} data-id={props.id} />;
|
|
4016
4016
|
}
|
|
4017
4017
|
var Inlined_styles_default = InlinedStyles;
|
|
4018
4018
|
|
|
@@ -4078,7 +4078,7 @@ function BlockStyles(props) {
|
|
|
4078
4078
|
}) : "";
|
|
4079
4079
|
return [largeStylesClass, mediumStylesClass, smallStylesClass].join(" ");
|
|
4080
4080
|
});
|
|
4081
|
-
return <Show2 when={TARGET !== "reactNative" && css5() && canShowBlock()}><Inlined_styles_default styles={css5()} /></Show2>;
|
|
4081
|
+
return <Show2 when={TARGET !== "reactNative" && css5() && canShowBlock()}><Inlined_styles_default id="builderio-block" styles={css5()} /></Show2>;
|
|
4082
4082
|
}
|
|
4083
4083
|
var Block_styles_default = BlockStyles;
|
|
4084
4084
|
|
|
@@ -4613,7 +4613,10 @@ function Columns(props) {
|
|
|
4613
4613
|
style={columnsCssVars()}
|
|
4614
4614
|
{...{}}
|
|
4615
4615
|
>
|
|
4616
|
-
<Show6 when={TARGET !== "reactNative"}><Inlined_styles_default
|
|
4616
|
+
<Show6 when={TARGET !== "reactNative"}><Inlined_styles_default
|
|
4617
|
+
id="builderio-columns"
|
|
4618
|
+
styles={columnsStyles()}
|
|
4619
|
+
/></Show6>
|
|
4617
4620
|
<For4 each={props.columns}>{(column, _index) => {
|
|
4618
4621
|
const index = _index();
|
|
4619
4622
|
return <Dynamic_renderer_default
|
|
@@ -6667,7 +6670,7 @@ var checkShouldRenderVariants = ({
|
|
|
6667
6670
|
};
|
|
6668
6671
|
var getIsHydrationTarget = (target) => target === "react" || target === "reactNative";
|
|
6669
6672
|
var isHydrationTarget = getIsHydrationTarget(TARGET);
|
|
6670
|
-
var
|
|
6673
|
+
var getInitVariantsFnsScriptString = () => `
|
|
6671
6674
|
window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME} = ${UPDATE_COOKIES_AND_STYLES_SCRIPT}
|
|
6672
6675
|
window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME} = ${UPDATE_VARIANT_VISIBILITY_SCRIPT}
|
|
6673
6676
|
`;
|
|
@@ -6684,7 +6687,7 @@ var getUpdateVariantVisibilityScript = ({
|
|
|
6684
6687
|
|
|
6685
6688
|
// src/components/inlined-script.tsx
|
|
6686
6689
|
function InlinedScript(props) {
|
|
6687
|
-
return <script innerHTML={props.scriptStr} id={props.id
|
|
6690
|
+
return <script innerHTML={props.scriptStr} data-id={props.id} />;
|
|
6688
6691
|
}
|
|
6689
6692
|
var Inlined_script_default = InlinedScript;
|
|
6690
6693
|
|
|
@@ -6873,7 +6876,8 @@ async function fetchOneEntry(options) {
|
|
|
6873
6876
|
}
|
|
6874
6877
|
var _fetchContent = async (options) => {
|
|
6875
6878
|
const url = generateContentUrl(options);
|
|
6876
|
-
const
|
|
6879
|
+
const _fetch = options.fetch ?? fetch2;
|
|
6880
|
+
const res = await _fetch(url.href, options.fetchOptions);
|
|
6877
6881
|
const content = await res.json();
|
|
6878
6882
|
return content;
|
|
6879
6883
|
};
|
|
@@ -7184,7 +7188,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
7184
7188
|
}
|
|
7185
7189
|
|
|
7186
7190
|
// src/constants/sdk-version.ts
|
|
7187
|
-
var SDK_VERSION = "1.0.
|
|
7191
|
+
var SDK_VERSION = "1.0.16";
|
|
7188
7192
|
|
|
7189
7193
|
// src/functions/register.ts
|
|
7190
7194
|
var registry = {};
|
|
@@ -7778,7 +7782,10 @@ ${getFontCss({
|
|
|
7778
7782
|
${getDefaultStyles(props.isNestedRender)}
|
|
7779
7783
|
`.trim()
|
|
7780
7784
|
);
|
|
7781
|
-
return <Inlined_styles_default
|
|
7785
|
+
return <Inlined_styles_default
|
|
7786
|
+
id="builderio-content"
|
|
7787
|
+
styles={injectedStyles()}
|
|
7788
|
+
/>;
|
|
7782
7789
|
}
|
|
7783
7790
|
var Styles_default = ContentStyles;
|
|
7784
7791
|
|
|
@@ -7901,7 +7908,10 @@ function ContentComponent(props) {
|
|
|
7901
7908
|
setBuilderContextSignal
|
|
7902
7909
|
}}
|
|
7903
7910
|
>
|
|
7904
|
-
<Show11 when={props.isSsrAbTest}><Inlined_script_default
|
|
7911
|
+
<Show11 when={props.isSsrAbTest}><Inlined_script_default
|
|
7912
|
+
id="builderio-variant-visibility"
|
|
7913
|
+
scriptStr={scriptStr()}
|
|
7914
|
+
/></Show11>
|
|
7905
7915
|
<Show11 when={TARGET !== "reactNative"}><Styles_default
|
|
7906
7916
|
isNestedRender={props.isNestedRender}
|
|
7907
7917
|
contentId={builderContextSignal().content?.id}
|
|
@@ -7951,13 +7961,17 @@ function ContentVariants(props) {
|
|
|
7951
7961
|
setShouldRenderVariants(false);
|
|
7952
7962
|
});
|
|
7953
7963
|
return <>
|
|
7954
|
-
<Show12 when={!props.isNestedRender && TARGET !== "reactNative"}><Inlined_script_default
|
|
7964
|
+
<Show12 when={!props.isNestedRender && TARGET !== "reactNative"}><Inlined_script_default
|
|
7965
|
+
id="builderio-init-variants-fns"
|
|
7966
|
+
scriptStr={getInitVariantsFnsScriptString()}
|
|
7967
|
+
/></Show12>
|
|
7955
7968
|
<Show12 when={shouldRenderVariants()}>
|
|
7956
7969
|
<Inlined_styles_default
|
|
7957
|
-
id=
|
|
7970
|
+
id="builderio-variants"
|
|
7958
7971
|
styles={hideVariantsStyleString()}
|
|
7959
7972
|
/>
|
|
7960
7973
|
<Inlined_script_default
|
|
7974
|
+
id="builderio-variants-visibility"
|
|
7961
7975
|
scriptStr={updateCookieAndStylesScriptStr()}
|
|
7962
7976
|
/>
|
|
7963
7977
|
<For7 each={getVariants(props.content)}>{(variant, _index) => {
|
package/lib/edge/index.js
CHANGED
|
@@ -4018,7 +4018,7 @@ function InlinedStyles(props) {
|
|
|
4018
4018
|
effect((_p$) => {
|
|
4019
4019
|
const _v$ = props.styles, _v$2 = props.id;
|
|
4020
4020
|
_v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
|
|
4021
|
-
_v$2 !== _p$._v$2 && setAttribute(_el$, "id", _p$._v$2 = _v$2);
|
|
4021
|
+
_v$2 !== _p$._v$2 && setAttribute(_el$, "data-id", _p$._v$2 = _v$2);
|
|
4022
4022
|
return _p$;
|
|
4023
4023
|
}, {
|
|
4024
4024
|
_v$: void 0,
|
|
@@ -4089,6 +4089,7 @@ function BlockStyles(props) {
|
|
|
4089
4089
|
},
|
|
4090
4090
|
get children() {
|
|
4091
4091
|
return createComponent(inlined_styles_default, {
|
|
4092
|
+
id: "builderio-block",
|
|
4092
4093
|
get styles() {
|
|
4093
4094
|
return css5();
|
|
4094
4095
|
}
|
|
@@ -4805,6 +4806,7 @@ function Columns(props) {
|
|
|
4805
4806
|
when: TARGET !== "reactNative",
|
|
4806
4807
|
get children() {
|
|
4807
4808
|
return createComponent(inlined_styles_default, {
|
|
4809
|
+
id: "builderio-columns",
|
|
4808
4810
|
get styles() {
|
|
4809
4811
|
return columnsStyles();
|
|
4810
4812
|
}
|
|
@@ -7072,7 +7074,7 @@ var checkShouldRenderVariants = ({
|
|
|
7072
7074
|
};
|
|
7073
7075
|
var getIsHydrationTarget = (target) => target === "react" || target === "reactNative";
|
|
7074
7076
|
var isHydrationTarget = getIsHydrationTarget(TARGET);
|
|
7075
|
-
var
|
|
7077
|
+
var getInitVariantsFnsScriptString = () => `
|
|
7076
7078
|
window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME} = ${UPDATE_COOKIES_AND_STYLES_SCRIPT}
|
|
7077
7079
|
window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME} = ${UPDATE_VARIANT_VISIBILITY_SCRIPT}
|
|
7078
7080
|
`;
|
|
@@ -7091,9 +7093,9 @@ function InlinedScript(props) {
|
|
|
7091
7093
|
return (() => {
|
|
7092
7094
|
const _el$ = _tmpl$16();
|
|
7093
7095
|
effect((_p$) => {
|
|
7094
|
-
const _v$ = props.scriptStr, _v$2 = props.id
|
|
7096
|
+
const _v$ = props.scriptStr, _v$2 = props.id;
|
|
7095
7097
|
_v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
|
|
7096
|
-
_v$2 !== _p$._v$2 && setAttribute(_el$, "id", _p$._v$2 = _v$2);
|
|
7098
|
+
_v$2 !== _p$._v$2 && setAttribute(_el$, "data-id", _p$._v$2 = _v$2);
|
|
7097
7099
|
return _p$;
|
|
7098
7100
|
}, {
|
|
7099
7101
|
_v$: void 0,
|
|
@@ -7276,7 +7278,8 @@ async function fetchOneEntry(options) {
|
|
|
7276
7278
|
}
|
|
7277
7279
|
var _fetchContent = async (options) => {
|
|
7278
7280
|
const url = generateContentUrl(options);
|
|
7279
|
-
const
|
|
7281
|
+
const _fetch = options.fetch ?? fetch2;
|
|
7282
|
+
const res = await _fetch(url.href, options.fetchOptions);
|
|
7280
7283
|
const content = await res.json();
|
|
7281
7284
|
return content;
|
|
7282
7285
|
};
|
|
@@ -7584,7 +7587,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
7584
7587
|
}
|
|
7585
7588
|
|
|
7586
7589
|
// src/constants/sdk-version.ts
|
|
7587
|
-
var SDK_VERSION = "1.0.
|
|
7590
|
+
var SDK_VERSION = "1.0.16";
|
|
7588
7591
|
|
|
7589
7592
|
// src/functions/register.ts
|
|
7590
7593
|
var registry = {};
|
|
@@ -8164,6 +8167,7 @@ ${getFontCss({
|
|
|
8164
8167
|
${getDefaultStyles(props.isNestedRender)}
|
|
8165
8168
|
`.trim());
|
|
8166
8169
|
return createComponent(inlined_styles_default, {
|
|
8170
|
+
id: "builderio-content",
|
|
8167
8171
|
get styles() {
|
|
8168
8172
|
return injectedStyles();
|
|
8169
8173
|
}
|
|
@@ -8317,6 +8321,7 @@ function ContentComponent(props) {
|
|
|
8317
8321
|
},
|
|
8318
8322
|
get children() {
|
|
8319
8323
|
return createComponent(inlined_script_default, {
|
|
8324
|
+
id: "builderio-variant-visibility",
|
|
8320
8325
|
get scriptStr() {
|
|
8321
8326
|
return scriptStr();
|
|
8322
8327
|
}
|
|
@@ -8394,8 +8399,9 @@ function ContentVariants(props) {
|
|
|
8394
8399
|
},
|
|
8395
8400
|
get children() {
|
|
8396
8401
|
return createComponent(inlined_script_default, {
|
|
8402
|
+
id: "builderio-init-variants-fns",
|
|
8397
8403
|
get scriptStr() {
|
|
8398
|
-
return
|
|
8404
|
+
return getInitVariantsFnsScriptString();
|
|
8399
8405
|
}
|
|
8400
8406
|
});
|
|
8401
8407
|
}
|
|
@@ -8405,13 +8411,12 @@ function ContentVariants(props) {
|
|
|
8405
8411
|
},
|
|
8406
8412
|
get children() {
|
|
8407
8413
|
return [createComponent(inlined_styles_default, {
|
|
8408
|
-
|
|
8409
|
-
return `variants-styles-${props.content?.id}`;
|
|
8410
|
-
},
|
|
8414
|
+
id: "builderio-variants",
|
|
8411
8415
|
get styles() {
|
|
8412
8416
|
return hideVariantsStyleString();
|
|
8413
8417
|
}
|
|
8414
8418
|
}), createComponent(inlined_script_default, {
|
|
8419
|
+
id: "builderio-variants-visibility",
|
|
8415
8420
|
get scriptStr() {
|
|
8416
8421
|
return updateCookieAndStylesScriptStr();
|
|
8417
8422
|
}
|
package/lib/edge/index.jsx
CHANGED
|
@@ -4006,7 +4006,7 @@ var getSizesForBreakpoints = ({
|
|
|
4006
4006
|
|
|
4007
4007
|
// src/components/inlined-styles.tsx
|
|
4008
4008
|
function InlinedStyles(props) {
|
|
4009
|
-
return <style innerHTML={props.styles} id={props.id} />;
|
|
4009
|
+
return <style innerHTML={props.styles} data-id={props.id} />;
|
|
4010
4010
|
}
|
|
4011
4011
|
var Inlined_styles_default = InlinedStyles;
|
|
4012
4012
|
|
|
@@ -4072,7 +4072,7 @@ function BlockStyles(props) {
|
|
|
4072
4072
|
}) : "";
|
|
4073
4073
|
return [largeStylesClass, mediumStylesClass, smallStylesClass].join(" ");
|
|
4074
4074
|
});
|
|
4075
|
-
return <Show2 when={TARGET !== "reactNative" && css5() && canShowBlock()}><Inlined_styles_default styles={css5()} /></Show2>;
|
|
4075
|
+
return <Show2 when={TARGET !== "reactNative" && css5() && canShowBlock()}><Inlined_styles_default id="builderio-block" styles={css5()} /></Show2>;
|
|
4076
4076
|
}
|
|
4077
4077
|
var Block_styles_default = BlockStyles;
|
|
4078
4078
|
|
|
@@ -4607,7 +4607,10 @@ function Columns(props) {
|
|
|
4607
4607
|
style={columnsCssVars()}
|
|
4608
4608
|
{...{}}
|
|
4609
4609
|
>
|
|
4610
|
-
<Show6 when={TARGET !== "reactNative"}><Inlined_styles_default
|
|
4610
|
+
<Show6 when={TARGET !== "reactNative"}><Inlined_styles_default
|
|
4611
|
+
id="builderio-columns"
|
|
4612
|
+
styles={columnsStyles()}
|
|
4613
|
+
/></Show6>
|
|
4611
4614
|
<For4 each={props.columns}>{(column, _index) => {
|
|
4612
4615
|
const index = _index();
|
|
4613
4616
|
return <Dynamic_renderer_default
|
|
@@ -6657,7 +6660,7 @@ var checkShouldRenderVariants = ({
|
|
|
6657
6660
|
};
|
|
6658
6661
|
var getIsHydrationTarget = (target) => target === "react" || target === "reactNative";
|
|
6659
6662
|
var isHydrationTarget = getIsHydrationTarget(TARGET);
|
|
6660
|
-
var
|
|
6663
|
+
var getInitVariantsFnsScriptString = () => `
|
|
6661
6664
|
window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME} = ${UPDATE_COOKIES_AND_STYLES_SCRIPT}
|
|
6662
6665
|
window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME} = ${UPDATE_VARIANT_VISIBILITY_SCRIPT}
|
|
6663
6666
|
`;
|
|
@@ -6674,7 +6677,7 @@ var getUpdateVariantVisibilityScript = ({
|
|
|
6674
6677
|
|
|
6675
6678
|
// src/components/inlined-script.tsx
|
|
6676
6679
|
function InlinedScript(props) {
|
|
6677
|
-
return <script innerHTML={props.scriptStr} id={props.id
|
|
6680
|
+
return <script innerHTML={props.scriptStr} data-id={props.id} />;
|
|
6678
6681
|
}
|
|
6679
6682
|
var Inlined_script_default = InlinedScript;
|
|
6680
6683
|
|
|
@@ -6861,7 +6864,8 @@ async function fetchOneEntry(options) {
|
|
|
6861
6864
|
}
|
|
6862
6865
|
var _fetchContent = async (options) => {
|
|
6863
6866
|
const url = generateContentUrl(options);
|
|
6864
|
-
const
|
|
6867
|
+
const _fetch = options.fetch ?? fetch2;
|
|
6868
|
+
const res = await _fetch(url.href, options.fetchOptions);
|
|
6865
6869
|
const content = await res.json();
|
|
6866
6870
|
return content;
|
|
6867
6871
|
};
|
|
@@ -7169,7 +7173,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
7169
7173
|
}
|
|
7170
7174
|
|
|
7171
7175
|
// src/constants/sdk-version.ts
|
|
7172
|
-
var SDK_VERSION = "1.0.
|
|
7176
|
+
var SDK_VERSION = "1.0.16";
|
|
7173
7177
|
|
|
7174
7178
|
// src/functions/register.ts
|
|
7175
7179
|
var registry = {};
|
|
@@ -7761,7 +7765,10 @@ ${getFontCss({
|
|
|
7761
7765
|
${getDefaultStyles(props.isNestedRender)}
|
|
7762
7766
|
`.trim()
|
|
7763
7767
|
);
|
|
7764
|
-
return <Inlined_styles_default
|
|
7768
|
+
return <Inlined_styles_default
|
|
7769
|
+
id="builderio-content"
|
|
7770
|
+
styles={injectedStyles()}
|
|
7771
|
+
/>;
|
|
7765
7772
|
}
|
|
7766
7773
|
var Styles_default = ContentStyles;
|
|
7767
7774
|
|
|
@@ -7884,7 +7891,10 @@ function ContentComponent(props) {
|
|
|
7884
7891
|
setBuilderContextSignal
|
|
7885
7892
|
}}
|
|
7886
7893
|
>
|
|
7887
|
-
<Show11 when={props.isSsrAbTest}><Inlined_script_default
|
|
7894
|
+
<Show11 when={props.isSsrAbTest}><Inlined_script_default
|
|
7895
|
+
id="builderio-variant-visibility"
|
|
7896
|
+
scriptStr={scriptStr()}
|
|
7897
|
+
/></Show11>
|
|
7888
7898
|
<Show11 when={TARGET !== "reactNative"}><Styles_default
|
|
7889
7899
|
isNestedRender={props.isNestedRender}
|
|
7890
7900
|
contentId={builderContextSignal().content?.id}
|
|
@@ -7934,13 +7944,17 @@ function ContentVariants(props) {
|
|
|
7934
7944
|
setShouldRenderVariants(false);
|
|
7935
7945
|
});
|
|
7936
7946
|
return <>
|
|
7937
|
-
<Show12 when={!props.isNestedRender && TARGET !== "reactNative"}><Inlined_script_default
|
|
7947
|
+
<Show12 when={!props.isNestedRender && TARGET !== "reactNative"}><Inlined_script_default
|
|
7948
|
+
id="builderio-init-variants-fns"
|
|
7949
|
+
scriptStr={getInitVariantsFnsScriptString()}
|
|
7950
|
+
/></Show12>
|
|
7938
7951
|
<Show12 when={shouldRenderVariants()}>
|
|
7939
7952
|
<Inlined_styles_default
|
|
7940
|
-
id=
|
|
7953
|
+
id="builderio-variants"
|
|
7941
7954
|
styles={hideVariantsStyleString()}
|
|
7942
7955
|
/>
|
|
7943
7956
|
<Inlined_script_default
|
|
7957
|
+
id="builderio-variants-visibility"
|
|
7944
7958
|
scriptStr={updateCookieAndStylesScriptStr()}
|
|
7945
7959
|
/>
|
|
7946
7960
|
<For7 each={getVariants(props.content)}>{(variant, _index) => {
|
package/lib/node/dev.js
CHANGED
|
@@ -996,7 +996,7 @@ function InlinedStyles(props) {
|
|
|
996
996
|
effect((_p$) => {
|
|
997
997
|
const _v$ = props.styles, _v$2 = props.id;
|
|
998
998
|
_v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
|
|
999
|
-
_v$2 !== _p$._v$2 && setAttribute(_el$, "id", _p$._v$2 = _v$2);
|
|
999
|
+
_v$2 !== _p$._v$2 && setAttribute(_el$, "data-id", _p$._v$2 = _v$2);
|
|
1000
1000
|
return _p$;
|
|
1001
1001
|
}, {
|
|
1002
1002
|
_v$: void 0,
|
|
@@ -1067,6 +1067,7 @@ function BlockStyles(props) {
|
|
|
1067
1067
|
},
|
|
1068
1068
|
get children() {
|
|
1069
1069
|
return createComponent(inlined_styles_default, {
|
|
1070
|
+
id: "builderio-block",
|
|
1070
1071
|
get styles() {
|
|
1071
1072
|
return css5();
|
|
1072
1073
|
}
|
|
@@ -1783,6 +1784,7 @@ function Columns(props) {
|
|
|
1783
1784
|
when: TARGET !== "reactNative",
|
|
1784
1785
|
get children() {
|
|
1785
1786
|
return createComponent(inlined_styles_default, {
|
|
1787
|
+
id: "builderio-columns",
|
|
1786
1788
|
get styles() {
|
|
1787
1789
|
return columnsStyles();
|
|
1788
1790
|
}
|
|
@@ -4054,7 +4056,7 @@ var checkShouldRenderVariants = ({
|
|
|
4054
4056
|
};
|
|
4055
4057
|
var getIsHydrationTarget = (target) => target === "react" || target === "reactNative";
|
|
4056
4058
|
var isHydrationTarget = getIsHydrationTarget(TARGET);
|
|
4057
|
-
var
|
|
4059
|
+
var getInitVariantsFnsScriptString = () => `
|
|
4058
4060
|
window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME} = ${UPDATE_COOKIES_AND_STYLES_SCRIPT}
|
|
4059
4061
|
window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME} = ${UPDATE_VARIANT_VISIBILITY_SCRIPT}
|
|
4060
4062
|
`;
|
|
@@ -4073,9 +4075,9 @@ function InlinedScript(props) {
|
|
|
4073
4075
|
return (() => {
|
|
4074
4076
|
const _el$ = _tmpl$16();
|
|
4075
4077
|
effect((_p$) => {
|
|
4076
|
-
const _v$ = props.scriptStr, _v$2 = props.id
|
|
4078
|
+
const _v$ = props.scriptStr, _v$2 = props.id;
|
|
4077
4079
|
_v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
|
|
4078
|
-
_v$2 !== _p$._v$2 && setAttribute(_el$, "id", _p$._v$2 = _v$2);
|
|
4080
|
+
_v$2 !== _p$._v$2 && setAttribute(_el$, "data-id", _p$._v$2 = _v$2);
|
|
4079
4081
|
return _p$;
|
|
4080
4082
|
}, {
|
|
4081
4083
|
_v$: void 0,
|
|
@@ -4260,7 +4262,8 @@ async function fetchOneEntry(options) {
|
|
|
4260
4262
|
}
|
|
4261
4263
|
var _fetchContent = async (options) => {
|
|
4262
4264
|
const url = generateContentUrl(options);
|
|
4263
|
-
const
|
|
4265
|
+
const _fetch = options.fetch ?? fetch2;
|
|
4266
|
+
const res = await _fetch(url.href, options.fetchOptions);
|
|
4264
4267
|
const content = await res.json();
|
|
4265
4268
|
return content;
|
|
4266
4269
|
};
|
|
@@ -4571,7 +4574,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
4571
4574
|
}
|
|
4572
4575
|
|
|
4573
4576
|
// src/constants/sdk-version.ts
|
|
4574
|
-
var SDK_VERSION = "1.0.
|
|
4577
|
+
var SDK_VERSION = "1.0.16";
|
|
4575
4578
|
|
|
4576
4579
|
// src/functions/register.ts
|
|
4577
4580
|
var registry = {};
|
|
@@ -5153,6 +5156,7 @@ ${getFontCss({
|
|
|
5153
5156
|
${getDefaultStyles(props.isNestedRender)}
|
|
5154
5157
|
`.trim());
|
|
5155
5158
|
return createComponent(inlined_styles_default, {
|
|
5159
|
+
id: "builderio-content",
|
|
5156
5160
|
get styles() {
|
|
5157
5161
|
return injectedStyles();
|
|
5158
5162
|
}
|
|
@@ -5306,6 +5310,7 @@ function ContentComponent(props) {
|
|
|
5306
5310
|
},
|
|
5307
5311
|
get children() {
|
|
5308
5312
|
return createComponent(inlined_script_default, {
|
|
5313
|
+
id: "builderio-variant-visibility",
|
|
5309
5314
|
get scriptStr() {
|
|
5310
5315
|
return scriptStr();
|
|
5311
5316
|
}
|
|
@@ -5383,8 +5388,9 @@ function ContentVariants(props) {
|
|
|
5383
5388
|
},
|
|
5384
5389
|
get children() {
|
|
5385
5390
|
return createComponent(inlined_script_default, {
|
|
5391
|
+
id: "builderio-init-variants-fns",
|
|
5386
5392
|
get scriptStr() {
|
|
5387
|
-
return
|
|
5393
|
+
return getInitVariantsFnsScriptString();
|
|
5388
5394
|
}
|
|
5389
5395
|
});
|
|
5390
5396
|
}
|
|
@@ -5394,13 +5400,12 @@ function ContentVariants(props) {
|
|
|
5394
5400
|
},
|
|
5395
5401
|
get children() {
|
|
5396
5402
|
return [createComponent(inlined_styles_default, {
|
|
5397
|
-
|
|
5398
|
-
return `variants-styles-${props.content?.id}`;
|
|
5399
|
-
},
|
|
5403
|
+
id: "builderio-variants",
|
|
5400
5404
|
get styles() {
|
|
5401
5405
|
return hideVariantsStyleString();
|
|
5402
5406
|
}
|
|
5403
5407
|
}), createComponent(inlined_script_default, {
|
|
5408
|
+
id: "builderio-variants-visibility",
|
|
5404
5409
|
get scriptStr() {
|
|
5405
5410
|
return updateCookieAndStylesScriptStr();
|
|
5406
5411
|
}
|
package/lib/node/dev.jsx
CHANGED
|
@@ -984,7 +984,7 @@ var getSizesForBreakpoints = ({
|
|
|
984
984
|
|
|
985
985
|
// src/components/inlined-styles.tsx
|
|
986
986
|
function InlinedStyles(props) {
|
|
987
|
-
return <style innerHTML={props.styles} id={props.id} />;
|
|
987
|
+
return <style innerHTML={props.styles} data-id={props.id} />;
|
|
988
988
|
}
|
|
989
989
|
var Inlined_styles_default = InlinedStyles;
|
|
990
990
|
|
|
@@ -1050,7 +1050,7 @@ function BlockStyles(props) {
|
|
|
1050
1050
|
}) : "";
|
|
1051
1051
|
return [largeStylesClass, mediumStylesClass, smallStylesClass].join(" ");
|
|
1052
1052
|
});
|
|
1053
|
-
return <Show2 when={TARGET !== "reactNative" && css5() && canShowBlock()}><Inlined_styles_default styles={css5()} /></Show2>;
|
|
1053
|
+
return <Show2 when={TARGET !== "reactNative" && css5() && canShowBlock()}><Inlined_styles_default id="builderio-block" styles={css5()} /></Show2>;
|
|
1054
1054
|
}
|
|
1055
1055
|
var Block_styles_default = BlockStyles;
|
|
1056
1056
|
|
|
@@ -1585,7 +1585,10 @@ function Columns(props) {
|
|
|
1585
1585
|
style={columnsCssVars()}
|
|
1586
1586
|
{...{}}
|
|
1587
1587
|
>
|
|
1588
|
-
<Show6 when={TARGET !== "reactNative"}><Inlined_styles_default
|
|
1588
|
+
<Show6 when={TARGET !== "reactNative"}><Inlined_styles_default
|
|
1589
|
+
id="builderio-columns"
|
|
1590
|
+
styles={columnsStyles()}
|
|
1591
|
+
/></Show6>
|
|
1589
1592
|
<For4 each={props.columns}>{(column, _index) => {
|
|
1590
1593
|
const index = _index();
|
|
1591
1594
|
return <Dynamic_renderer_default
|
|
@@ -3639,7 +3642,7 @@ var checkShouldRenderVariants = ({
|
|
|
3639
3642
|
};
|
|
3640
3643
|
var getIsHydrationTarget = (target) => target === "react" || target === "reactNative";
|
|
3641
3644
|
var isHydrationTarget = getIsHydrationTarget(TARGET);
|
|
3642
|
-
var
|
|
3645
|
+
var getInitVariantsFnsScriptString = () => `
|
|
3643
3646
|
window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME} = ${UPDATE_COOKIES_AND_STYLES_SCRIPT}
|
|
3644
3647
|
window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME} = ${UPDATE_VARIANT_VISIBILITY_SCRIPT}
|
|
3645
3648
|
`;
|
|
@@ -3656,7 +3659,7 @@ var getUpdateVariantVisibilityScript = ({
|
|
|
3656
3659
|
|
|
3657
3660
|
// src/components/inlined-script.tsx
|
|
3658
3661
|
function InlinedScript(props) {
|
|
3659
|
-
return <script innerHTML={props.scriptStr} id={props.id
|
|
3662
|
+
return <script innerHTML={props.scriptStr} data-id={props.id} />;
|
|
3660
3663
|
}
|
|
3661
3664
|
var Inlined_script_default = InlinedScript;
|
|
3662
3665
|
|
|
@@ -3845,7 +3848,8 @@ async function fetchOneEntry(options) {
|
|
|
3845
3848
|
}
|
|
3846
3849
|
var _fetchContent = async (options) => {
|
|
3847
3850
|
const url = generateContentUrl(options);
|
|
3848
|
-
const
|
|
3851
|
+
const _fetch = options.fetch ?? fetch2;
|
|
3852
|
+
const res = await _fetch(url.href, options.fetchOptions);
|
|
3849
3853
|
const content = await res.json();
|
|
3850
3854
|
return content;
|
|
3851
3855
|
};
|
|
@@ -4156,7 +4160,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
4156
4160
|
}
|
|
4157
4161
|
|
|
4158
4162
|
// src/constants/sdk-version.ts
|
|
4159
|
-
var SDK_VERSION = "1.0.
|
|
4163
|
+
var SDK_VERSION = "1.0.16";
|
|
4160
4164
|
|
|
4161
4165
|
// src/functions/register.ts
|
|
4162
4166
|
var registry = {};
|
|
@@ -4750,7 +4754,10 @@ ${getFontCss({
|
|
|
4750
4754
|
${getDefaultStyles(props.isNestedRender)}
|
|
4751
4755
|
`.trim()
|
|
4752
4756
|
);
|
|
4753
|
-
return <Inlined_styles_default
|
|
4757
|
+
return <Inlined_styles_default
|
|
4758
|
+
id="builderio-content"
|
|
4759
|
+
styles={injectedStyles()}
|
|
4760
|
+
/>;
|
|
4754
4761
|
}
|
|
4755
4762
|
var Styles_default = ContentStyles;
|
|
4756
4763
|
|
|
@@ -4873,7 +4880,10 @@ function ContentComponent(props) {
|
|
|
4873
4880
|
setBuilderContextSignal
|
|
4874
4881
|
}}
|
|
4875
4882
|
>
|
|
4876
|
-
<Show11 when={props.isSsrAbTest}><Inlined_script_default
|
|
4883
|
+
<Show11 when={props.isSsrAbTest}><Inlined_script_default
|
|
4884
|
+
id="builderio-variant-visibility"
|
|
4885
|
+
scriptStr={scriptStr()}
|
|
4886
|
+
/></Show11>
|
|
4877
4887
|
<Show11 when={TARGET !== "reactNative"}><Styles_default
|
|
4878
4888
|
isNestedRender={props.isNestedRender}
|
|
4879
4889
|
contentId={builderContextSignal().content?.id}
|
|
@@ -4923,13 +4933,17 @@ function ContentVariants(props) {
|
|
|
4923
4933
|
setShouldRenderVariants(false);
|
|
4924
4934
|
});
|
|
4925
4935
|
return <>
|
|
4926
|
-
<Show12 when={!props.isNestedRender && TARGET !== "reactNative"}><Inlined_script_default
|
|
4936
|
+
<Show12 when={!props.isNestedRender && TARGET !== "reactNative"}><Inlined_script_default
|
|
4937
|
+
id="builderio-init-variants-fns"
|
|
4938
|
+
scriptStr={getInitVariantsFnsScriptString()}
|
|
4939
|
+
/></Show12>
|
|
4927
4940
|
<Show12 when={shouldRenderVariants()}>
|
|
4928
4941
|
<Inlined_styles_default
|
|
4929
|
-
id=
|
|
4942
|
+
id="builderio-variants"
|
|
4930
4943
|
styles={hideVariantsStyleString()}
|
|
4931
4944
|
/>
|
|
4932
4945
|
<Inlined_script_default
|
|
4946
|
+
id="builderio-variants-visibility"
|
|
4933
4947
|
scriptStr={updateCookieAndStylesScriptStr()}
|
|
4934
4948
|
/>
|
|
4935
4949
|
<For7 each={getVariants(props.content)}>{(variant, _index) => {
|
package/lib/node/index.js
CHANGED
|
@@ -989,7 +989,7 @@ function InlinedStyles(props) {
|
|
|
989
989
|
effect((_p$) => {
|
|
990
990
|
const _v$ = props.styles, _v$2 = props.id;
|
|
991
991
|
_v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
|
|
992
|
-
_v$2 !== _p$._v$2 && setAttribute(_el$, "id", _p$._v$2 = _v$2);
|
|
992
|
+
_v$2 !== _p$._v$2 && setAttribute(_el$, "data-id", _p$._v$2 = _v$2);
|
|
993
993
|
return _p$;
|
|
994
994
|
}, {
|
|
995
995
|
_v$: void 0,
|
|
@@ -1060,6 +1060,7 @@ function BlockStyles(props) {
|
|
|
1060
1060
|
},
|
|
1061
1061
|
get children() {
|
|
1062
1062
|
return createComponent(inlined_styles_default, {
|
|
1063
|
+
id: "builderio-block",
|
|
1063
1064
|
get styles() {
|
|
1064
1065
|
return css5();
|
|
1065
1066
|
}
|
|
@@ -1776,6 +1777,7 @@ function Columns(props) {
|
|
|
1776
1777
|
when: TARGET !== "reactNative",
|
|
1777
1778
|
get children() {
|
|
1778
1779
|
return createComponent(inlined_styles_default, {
|
|
1780
|
+
id: "builderio-columns",
|
|
1779
1781
|
get styles() {
|
|
1780
1782
|
return columnsStyles();
|
|
1781
1783
|
}
|
|
@@ -4043,7 +4045,7 @@ var checkShouldRenderVariants = ({
|
|
|
4043
4045
|
};
|
|
4044
4046
|
var getIsHydrationTarget = (target) => target === "react" || target === "reactNative";
|
|
4045
4047
|
var isHydrationTarget = getIsHydrationTarget(TARGET);
|
|
4046
|
-
var
|
|
4048
|
+
var getInitVariantsFnsScriptString = () => `
|
|
4047
4049
|
window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME} = ${UPDATE_COOKIES_AND_STYLES_SCRIPT}
|
|
4048
4050
|
window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME} = ${UPDATE_VARIANT_VISIBILITY_SCRIPT}
|
|
4049
4051
|
`;
|
|
@@ -4062,9 +4064,9 @@ function InlinedScript(props) {
|
|
|
4062
4064
|
return (() => {
|
|
4063
4065
|
const _el$ = _tmpl$16();
|
|
4064
4066
|
effect((_p$) => {
|
|
4065
|
-
const _v$ = props.scriptStr, _v$2 = props.id
|
|
4067
|
+
const _v$ = props.scriptStr, _v$2 = props.id;
|
|
4066
4068
|
_v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
|
|
4067
|
-
_v$2 !== _p$._v$2 && setAttribute(_el$, "id", _p$._v$2 = _v$2);
|
|
4069
|
+
_v$2 !== _p$._v$2 && setAttribute(_el$, "data-id", _p$._v$2 = _v$2);
|
|
4068
4070
|
return _p$;
|
|
4069
4071
|
}, {
|
|
4070
4072
|
_v$: void 0,
|
|
@@ -4247,7 +4249,8 @@ async function fetchOneEntry(options) {
|
|
|
4247
4249
|
}
|
|
4248
4250
|
var _fetchContent = async (options) => {
|
|
4249
4251
|
const url = generateContentUrl(options);
|
|
4250
|
-
const
|
|
4252
|
+
const _fetch = options.fetch ?? fetch2;
|
|
4253
|
+
const res = await _fetch(url.href, options.fetchOptions);
|
|
4251
4254
|
const content = await res.json();
|
|
4252
4255
|
return content;
|
|
4253
4256
|
};
|
|
@@ -4555,7 +4558,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
4555
4558
|
}
|
|
4556
4559
|
|
|
4557
4560
|
// src/constants/sdk-version.ts
|
|
4558
|
-
var SDK_VERSION = "1.0.
|
|
4561
|
+
var SDK_VERSION = "1.0.16";
|
|
4559
4562
|
|
|
4560
4563
|
// src/functions/register.ts
|
|
4561
4564
|
var registry = {};
|
|
@@ -5135,6 +5138,7 @@ ${getFontCss({
|
|
|
5135
5138
|
${getDefaultStyles(props.isNestedRender)}
|
|
5136
5139
|
`.trim());
|
|
5137
5140
|
return createComponent(inlined_styles_default, {
|
|
5141
|
+
id: "builderio-content",
|
|
5138
5142
|
get styles() {
|
|
5139
5143
|
return injectedStyles();
|
|
5140
5144
|
}
|
|
@@ -5288,6 +5292,7 @@ function ContentComponent(props) {
|
|
|
5288
5292
|
},
|
|
5289
5293
|
get children() {
|
|
5290
5294
|
return createComponent(inlined_script_default, {
|
|
5295
|
+
id: "builderio-variant-visibility",
|
|
5291
5296
|
get scriptStr() {
|
|
5292
5297
|
return scriptStr();
|
|
5293
5298
|
}
|
|
@@ -5365,8 +5370,9 @@ function ContentVariants(props) {
|
|
|
5365
5370
|
},
|
|
5366
5371
|
get children() {
|
|
5367
5372
|
return createComponent(inlined_script_default, {
|
|
5373
|
+
id: "builderio-init-variants-fns",
|
|
5368
5374
|
get scriptStr() {
|
|
5369
|
-
return
|
|
5375
|
+
return getInitVariantsFnsScriptString();
|
|
5370
5376
|
}
|
|
5371
5377
|
});
|
|
5372
5378
|
}
|
|
@@ -5376,13 +5382,12 @@ function ContentVariants(props) {
|
|
|
5376
5382
|
},
|
|
5377
5383
|
get children() {
|
|
5378
5384
|
return [createComponent(inlined_styles_default, {
|
|
5379
|
-
|
|
5380
|
-
return `variants-styles-${props.content?.id}`;
|
|
5381
|
-
},
|
|
5385
|
+
id: "builderio-variants",
|
|
5382
5386
|
get styles() {
|
|
5383
5387
|
return hideVariantsStyleString();
|
|
5384
5388
|
}
|
|
5385
5389
|
}), createComponent(inlined_script_default, {
|
|
5390
|
+
id: "builderio-variants-visibility",
|
|
5386
5391
|
get scriptStr() {
|
|
5387
5392
|
return updateCookieAndStylesScriptStr();
|
|
5388
5393
|
}
|
package/lib/node/index.jsx
CHANGED
|
@@ -977,7 +977,7 @@ var getSizesForBreakpoints = ({
|
|
|
977
977
|
|
|
978
978
|
// src/components/inlined-styles.tsx
|
|
979
979
|
function InlinedStyles(props) {
|
|
980
|
-
return <style innerHTML={props.styles} id={props.id} />;
|
|
980
|
+
return <style innerHTML={props.styles} data-id={props.id} />;
|
|
981
981
|
}
|
|
982
982
|
var Inlined_styles_default = InlinedStyles;
|
|
983
983
|
|
|
@@ -1043,7 +1043,7 @@ function BlockStyles(props) {
|
|
|
1043
1043
|
}) : "";
|
|
1044
1044
|
return [largeStylesClass, mediumStylesClass, smallStylesClass].join(" ");
|
|
1045
1045
|
});
|
|
1046
|
-
return <Show2 when={TARGET !== "reactNative" && css5() && canShowBlock()}><Inlined_styles_default styles={css5()} /></Show2>;
|
|
1046
|
+
return <Show2 when={TARGET !== "reactNative" && css5() && canShowBlock()}><Inlined_styles_default id="builderio-block" styles={css5()} /></Show2>;
|
|
1047
1047
|
}
|
|
1048
1048
|
var Block_styles_default = BlockStyles;
|
|
1049
1049
|
|
|
@@ -1578,7 +1578,10 @@ function Columns(props) {
|
|
|
1578
1578
|
style={columnsCssVars()}
|
|
1579
1579
|
{...{}}
|
|
1580
1580
|
>
|
|
1581
|
-
<Show6 when={TARGET !== "reactNative"}><Inlined_styles_default
|
|
1581
|
+
<Show6 when={TARGET !== "reactNative"}><Inlined_styles_default
|
|
1582
|
+
id="builderio-columns"
|
|
1583
|
+
styles={columnsStyles()}
|
|
1584
|
+
/></Show6>
|
|
1582
1585
|
<For4 each={props.columns}>{(column, _index) => {
|
|
1583
1586
|
const index = _index();
|
|
1584
1587
|
return <Dynamic_renderer_default
|
|
@@ -3628,7 +3631,7 @@ var checkShouldRenderVariants = ({
|
|
|
3628
3631
|
};
|
|
3629
3632
|
var getIsHydrationTarget = (target) => target === "react" || target === "reactNative";
|
|
3630
3633
|
var isHydrationTarget = getIsHydrationTarget(TARGET);
|
|
3631
|
-
var
|
|
3634
|
+
var getInitVariantsFnsScriptString = () => `
|
|
3632
3635
|
window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME} = ${UPDATE_COOKIES_AND_STYLES_SCRIPT}
|
|
3633
3636
|
window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME} = ${UPDATE_VARIANT_VISIBILITY_SCRIPT}
|
|
3634
3637
|
`;
|
|
@@ -3645,7 +3648,7 @@ var getUpdateVariantVisibilityScript = ({
|
|
|
3645
3648
|
|
|
3646
3649
|
// src/components/inlined-script.tsx
|
|
3647
3650
|
function InlinedScript(props) {
|
|
3648
|
-
return <script innerHTML={props.scriptStr} id={props.id
|
|
3651
|
+
return <script innerHTML={props.scriptStr} data-id={props.id} />;
|
|
3649
3652
|
}
|
|
3650
3653
|
var Inlined_script_default = InlinedScript;
|
|
3651
3654
|
|
|
@@ -3832,7 +3835,8 @@ async function fetchOneEntry(options) {
|
|
|
3832
3835
|
}
|
|
3833
3836
|
var _fetchContent = async (options) => {
|
|
3834
3837
|
const url = generateContentUrl(options);
|
|
3835
|
-
const
|
|
3838
|
+
const _fetch = options.fetch ?? fetch2;
|
|
3839
|
+
const res = await _fetch(url.href, options.fetchOptions);
|
|
3836
3840
|
const content = await res.json();
|
|
3837
3841
|
return content;
|
|
3838
3842
|
};
|
|
@@ -4140,7 +4144,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
4140
4144
|
}
|
|
4141
4145
|
|
|
4142
4146
|
// src/constants/sdk-version.ts
|
|
4143
|
-
var SDK_VERSION = "1.0.
|
|
4147
|
+
var SDK_VERSION = "1.0.16";
|
|
4144
4148
|
|
|
4145
4149
|
// src/functions/register.ts
|
|
4146
4150
|
var registry = {};
|
|
@@ -4732,7 +4736,10 @@ ${getFontCss({
|
|
|
4732
4736
|
${getDefaultStyles(props.isNestedRender)}
|
|
4733
4737
|
`.trim()
|
|
4734
4738
|
);
|
|
4735
|
-
return <Inlined_styles_default
|
|
4739
|
+
return <Inlined_styles_default
|
|
4740
|
+
id="builderio-content"
|
|
4741
|
+
styles={injectedStyles()}
|
|
4742
|
+
/>;
|
|
4736
4743
|
}
|
|
4737
4744
|
var Styles_default = ContentStyles;
|
|
4738
4745
|
|
|
@@ -4855,7 +4862,10 @@ function ContentComponent(props) {
|
|
|
4855
4862
|
setBuilderContextSignal
|
|
4856
4863
|
}}
|
|
4857
4864
|
>
|
|
4858
|
-
<Show11 when={props.isSsrAbTest}><Inlined_script_default
|
|
4865
|
+
<Show11 when={props.isSsrAbTest}><Inlined_script_default
|
|
4866
|
+
id="builderio-variant-visibility"
|
|
4867
|
+
scriptStr={scriptStr()}
|
|
4868
|
+
/></Show11>
|
|
4859
4869
|
<Show11 when={TARGET !== "reactNative"}><Styles_default
|
|
4860
4870
|
isNestedRender={props.isNestedRender}
|
|
4861
4871
|
contentId={builderContextSignal().content?.id}
|
|
@@ -4905,13 +4915,17 @@ function ContentVariants(props) {
|
|
|
4905
4915
|
setShouldRenderVariants(false);
|
|
4906
4916
|
});
|
|
4907
4917
|
return <>
|
|
4908
|
-
<Show12 when={!props.isNestedRender && TARGET !== "reactNative"}><Inlined_script_default
|
|
4918
|
+
<Show12 when={!props.isNestedRender && TARGET !== "reactNative"}><Inlined_script_default
|
|
4919
|
+
id="builderio-init-variants-fns"
|
|
4920
|
+
scriptStr={getInitVariantsFnsScriptString()}
|
|
4921
|
+
/></Show12>
|
|
4909
4922
|
<Show12 when={shouldRenderVariants()}>
|
|
4910
4923
|
<Inlined_styles_default
|
|
4911
|
-
id=
|
|
4924
|
+
id="builderio-variants"
|
|
4912
4925
|
styles={hideVariantsStyleString()}
|
|
4913
4926
|
/>
|
|
4914
4927
|
<Inlined_script_default
|
|
4928
|
+
id="builderio-variants-visibility"
|
|
4915
4929
|
scriptStr={updateCookieAndStylesScriptStr()}
|
|
4916
4930
|
/>
|
|
4917
4931
|
<For7 each={getVariants(props.content)}>{(variant, _index) => {
|