@builder.io/sdk-solid 2.0.0 → 2.0.1
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 +6 -0
- package/lib/browser/dev.js +51 -9
- package/lib/browser/dev.jsx +33 -8
- package/lib/browser/index.js +51 -9
- package/lib/browser/index.jsx +33 -8
- package/lib/edge/dev.js +51 -9
- package/lib/edge/dev.jsx +33 -8
- package/lib/edge/index.js +51 -9
- package/lib/edge/index.jsx +33 -8
- package/lib/node/dev.js +51 -9
- package/lib/node/dev.jsx +33 -8
- package/lib/node/index.js +51 -9
- package/lib/node/index.jsx +33 -8
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -510,6 +510,7 @@ interface BuilderContextInterface extends Pick<BlocksWrapperProps, 'BlocksWrappe
|
|
|
510
510
|
apiVersion: ApiVersion | undefined;
|
|
511
511
|
componentInfos: Dictionary<ComponentInfo>;
|
|
512
512
|
inheritedStyles: Record<string, unknown>;
|
|
513
|
+
nonce: string;
|
|
513
514
|
canTrack?: boolean;
|
|
514
515
|
}
|
|
515
516
|
|
|
@@ -708,6 +709,10 @@ interface ContentVariantsPrps {
|
|
|
708
709
|
* List of hosts to allow editing content from.
|
|
709
710
|
*/
|
|
710
711
|
trustedHosts?: string[];
|
|
712
|
+
/**
|
|
713
|
+
* A CSP nonce to use for the SDK's inlined `<script>` and `<style>` tags.
|
|
714
|
+
*/
|
|
715
|
+
nonce?: string;
|
|
711
716
|
}
|
|
712
717
|
|
|
713
718
|
type VariantsProviderProps = ContentVariantsPrps & {
|
|
@@ -731,6 +736,7 @@ declare const _default: solid_js.Context<{
|
|
|
731
736
|
inheritedStyles: {};
|
|
732
737
|
BlocksWrapper: string;
|
|
733
738
|
BlocksWrapperProps: {};
|
|
739
|
+
nonce: string;
|
|
734
740
|
}>;
|
|
735
741
|
|
|
736
742
|
type QueryObject = Record<string, string | string[]>;
|
package/lib/browser/dev.js
CHANGED
|
@@ -113,7 +113,8 @@ var builder_context_default = createContext({
|
|
|
113
113
|
componentInfos: {},
|
|
114
114
|
inheritedStyles: {},
|
|
115
115
|
BlocksWrapper: "div",
|
|
116
|
-
BlocksWrapperProps: {}
|
|
116
|
+
BlocksWrapperProps: {},
|
|
117
|
+
nonce: ""
|
|
117
118
|
});
|
|
118
119
|
var components_context_default = createContext({ registeredComponents: {} });
|
|
119
120
|
|
|
@@ -866,13 +867,15 @@ function InlinedStyles(props) {
|
|
|
866
867
|
return (() => {
|
|
867
868
|
const _el$ = _tmpl$();
|
|
868
869
|
effect((_p$) => {
|
|
869
|
-
const _v$ = props.styles, _v$2 = props.id;
|
|
870
|
+
const _v$ = props.styles, _v$2 = props.id, _v$3 = props.nonce;
|
|
870
871
|
_v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
|
|
871
872
|
_v$2 !== _p$._v$2 && setAttribute(_el$, "data-id", _p$._v$2 = _v$2);
|
|
873
|
+
_v$3 !== _p$._v$3 && setAttribute(_el$, "nonce", _p$._v$3 = _v$3);
|
|
872
874
|
return _p$;
|
|
873
875
|
}, {
|
|
874
876
|
_v$: void 0,
|
|
875
|
-
_v$2: void 0
|
|
877
|
+
_v$2: void 0,
|
|
878
|
+
_v$3: void 0
|
|
876
879
|
});
|
|
877
880
|
return _el$;
|
|
878
881
|
})();
|
|
@@ -955,6 +958,9 @@ function BlockStyles(props) {
|
|
|
955
958
|
id: "builderio-block",
|
|
956
959
|
get styles() {
|
|
957
960
|
return css();
|
|
961
|
+
},
|
|
962
|
+
get nonce() {
|
|
963
|
+
return props.context.nonce;
|
|
958
964
|
}
|
|
959
965
|
});
|
|
960
966
|
}
|
|
@@ -1557,7 +1563,7 @@ var getColumnsClass = (id) => {
|
|
|
1557
1563
|
|
|
1558
1564
|
// src/blocks/columns/columns.tsx
|
|
1559
1565
|
var _tmpl$3 = /* @__PURE__ */ template(`<div>`);
|
|
1560
|
-
var _tmpl$22 = /* @__PURE__ */ template(`<style>.div-
|
|
1566
|
+
var _tmpl$22 = /* @__PURE__ */ template(`<style>.div-5b8fb3ac {
|
|
1561
1567
|
display: flex;
|
|
1562
1568
|
line-height: normal;
|
|
1563
1569
|
}`);
|
|
@@ -1677,7 +1683,7 @@ function Columns(props) {
|
|
|
1677
1683
|
const _el$ = _tmpl$3();
|
|
1678
1684
|
spread(_el$, mergeProps({
|
|
1679
1685
|
get ["class"]() {
|
|
1680
|
-
return getColumnsClass(props.builderBlock?.id) + " div-
|
|
1686
|
+
return getColumnsClass(props.builderBlock?.id) + " div-5b8fb3ac";
|
|
1681
1687
|
},
|
|
1682
1688
|
get style() {
|
|
1683
1689
|
return columnsCssVars();
|
|
@@ -1690,6 +1696,9 @@ function Columns(props) {
|
|
|
1690
1696
|
id: "builderio-columns",
|
|
1691
1697
|
get styles() {
|
|
1692
1698
|
return columnsStyles();
|
|
1699
|
+
},
|
|
1700
|
+
get nonce() {
|
|
1701
|
+
return props.builderContext.nonce;
|
|
1693
1702
|
}
|
|
1694
1703
|
});
|
|
1695
1704
|
}
|
|
@@ -4625,13 +4634,15 @@ function InlinedScript(props) {
|
|
|
4625
4634
|
return (() => {
|
|
4626
4635
|
const _el$ = _tmpl$20();
|
|
4627
4636
|
effect((_p$) => {
|
|
4628
|
-
const _v$ = props.scriptStr, _v$2 = props.id;
|
|
4637
|
+
const _v$ = props.scriptStr, _v$2 = props.id, _v$3 = props.nonce || "";
|
|
4629
4638
|
_v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
|
|
4630
4639
|
_v$2 !== _p$._v$2 && setAttribute(_el$, "data-id", _p$._v$2 = _v$2);
|
|
4640
|
+
_v$3 !== _p$._v$3 && setAttribute(_el$, "nonce", _p$._v$3 = _v$3);
|
|
4631
4641
|
return _p$;
|
|
4632
4642
|
}, {
|
|
4633
4643
|
_v$: void 0,
|
|
4634
|
-
_v$2: void 0
|
|
4644
|
+
_v$2: void 0,
|
|
4645
|
+
_v$3: void 0
|
|
4635
4646
|
});
|
|
4636
4647
|
return _el$;
|
|
4637
4648
|
})();
|
|
@@ -5137,7 +5148,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
5137
5148
|
}
|
|
5138
5149
|
|
|
5139
5150
|
// src/constants/sdk-version.ts
|
|
5140
|
-
var SDK_VERSION = "2.0.
|
|
5151
|
+
var SDK_VERSION = "2.0.1";
|
|
5141
5152
|
|
|
5142
5153
|
// src/functions/register.ts
|
|
5143
5154
|
var registry = {};
|
|
@@ -5720,6 +5731,9 @@ ${getDefaultStyles(props.isNestedRender)}
|
|
|
5720
5731
|
id: "builderio-content",
|
|
5721
5732
|
get styles() {
|
|
5722
5733
|
return injectedStyles();
|
|
5734
|
+
},
|
|
5735
|
+
get nonce() {
|
|
5736
|
+
return props.nonce;
|
|
5723
5737
|
}
|
|
5724
5738
|
});
|
|
5725
5739
|
}
|
|
@@ -5804,7 +5818,8 @@ function ContentComponent(props) {
|
|
|
5804
5818
|
}), {}),
|
|
5805
5819
|
inheritedStyles: {},
|
|
5806
5820
|
BlocksWrapper: props.blocksWrapper || "div",
|
|
5807
|
-
BlocksWrapperProps: props.blocksWrapperProps || {}
|
|
5821
|
+
BlocksWrapperProps: props.blocksWrapperProps || {},
|
|
5822
|
+
nonce: props.nonce || ""
|
|
5808
5823
|
});
|
|
5809
5824
|
function contentSetState(newRootState) {
|
|
5810
5825
|
setBuilderContextSignal((PREVIOUS_VALUE) => ({
|
|
@@ -5820,6 +5835,9 @@ function ContentComponent(props) {
|
|
|
5820
5835
|
},
|
|
5821
5836
|
get children() {
|
|
5822
5837
|
return createComponent(enable_editor_default, mergeProps({
|
|
5838
|
+
get nonce() {
|
|
5839
|
+
return props.nonce;
|
|
5840
|
+
},
|
|
5823
5841
|
get content() {
|
|
5824
5842
|
return props.content;
|
|
5825
5843
|
},
|
|
@@ -5872,6 +5890,9 @@ function ContentComponent(props) {
|
|
|
5872
5890
|
id: "builderio-variant-visibility",
|
|
5873
5891
|
get scriptStr() {
|
|
5874
5892
|
return scriptStr();
|
|
5893
|
+
},
|
|
5894
|
+
get nonce() {
|
|
5895
|
+
return props.nonce || "";
|
|
5875
5896
|
}
|
|
5876
5897
|
});
|
|
5877
5898
|
}
|
|
@@ -5879,6 +5900,9 @@ function ContentComponent(props) {
|
|
|
5879
5900
|
when: TARGET !== "reactNative",
|
|
5880
5901
|
get children() {
|
|
5881
5902
|
return createComponent(styles_default, {
|
|
5903
|
+
get nonce() {
|
|
5904
|
+
return props.nonce || "";
|
|
5905
|
+
},
|
|
5882
5906
|
get isNestedRender() {
|
|
5883
5907
|
return props.isNestedRender;
|
|
5884
5908
|
},
|
|
@@ -5950,6 +5974,9 @@ function ContentVariants(props) {
|
|
|
5950
5974
|
id: "builderio-init-variants-fns",
|
|
5951
5975
|
get scriptStr() {
|
|
5952
5976
|
return getInitVariantsFnsScriptString();
|
|
5977
|
+
},
|
|
5978
|
+
get nonce() {
|
|
5979
|
+
return props.nonce || "";
|
|
5953
5980
|
}
|
|
5954
5981
|
});
|
|
5955
5982
|
}
|
|
@@ -5962,11 +5989,17 @@ function ContentVariants(props) {
|
|
|
5962
5989
|
id: "builderio-variants",
|
|
5963
5990
|
get styles() {
|
|
5964
5991
|
return hideVariantsStyleString();
|
|
5992
|
+
},
|
|
5993
|
+
get nonce() {
|
|
5994
|
+
return props.nonce || "";
|
|
5965
5995
|
}
|
|
5966
5996
|
}), createComponent(inlined_script_default, {
|
|
5967
5997
|
id: "builderio-variants-visibility",
|
|
5968
5998
|
get scriptStr() {
|
|
5969
5999
|
return updateCookieAndStylesScriptStr();
|
|
6000
|
+
},
|
|
6001
|
+
get nonce() {
|
|
6002
|
+
return props.nonce || "";
|
|
5970
6003
|
}
|
|
5971
6004
|
}), createComponent(For, {
|
|
5972
6005
|
get each() {
|
|
@@ -5981,6 +6014,9 @@ function ContentVariants(props) {
|
|
|
5981
6014
|
get key() {
|
|
5982
6015
|
return variant.testVariationId;
|
|
5983
6016
|
},
|
|
6017
|
+
get nonce() {
|
|
6018
|
+
return props.nonce;
|
|
6019
|
+
},
|
|
5984
6020
|
content: variant,
|
|
5985
6021
|
showContent: false,
|
|
5986
6022
|
get model() {
|
|
@@ -6036,6 +6072,9 @@ function ContentVariants(props) {
|
|
|
6036
6072
|
})];
|
|
6037
6073
|
}
|
|
6038
6074
|
}), createComponent(content_default, mergeProps({
|
|
6075
|
+
get nonce() {
|
|
6076
|
+
return props.nonce;
|
|
6077
|
+
},
|
|
6039
6078
|
get isNestedRender() {
|
|
6040
6079
|
return props.isNestedRender;
|
|
6041
6080
|
}
|
|
@@ -6160,6 +6199,9 @@ function Symbol(props) {
|
|
|
6160
6199
|
}
|
|
6161
6200
|
}, {}, () => props.attributes, {}), false, true);
|
|
6162
6201
|
insert(_el$, createComponent(content_variants_default, {
|
|
6202
|
+
get nonce() {
|
|
6203
|
+
return props.builderContext.nonce;
|
|
6204
|
+
},
|
|
6163
6205
|
isNestedRender: true,
|
|
6164
6206
|
get apiVersion() {
|
|
6165
6207
|
return props.builderContext.apiVersion;
|
package/lib/browser/dev.jsx
CHANGED
|
@@ -94,7 +94,8 @@ var builder_context_default = createContext({
|
|
|
94
94
|
componentInfos: {},
|
|
95
95
|
inheritedStyles: {},
|
|
96
96
|
BlocksWrapper: "div",
|
|
97
|
-
BlocksWrapperProps: {}
|
|
97
|
+
BlocksWrapperProps: {},
|
|
98
|
+
nonce: ""
|
|
98
99
|
});
|
|
99
100
|
|
|
100
101
|
// src/context/components.context.ts
|
|
@@ -854,7 +855,11 @@ var getSizesForBreakpoints = ({
|
|
|
854
855
|
|
|
855
856
|
// src/components/inlined-styles.tsx
|
|
856
857
|
function InlinedStyles(props) {
|
|
857
|
-
return <><style
|
|
858
|
+
return <><style
|
|
859
|
+
innerHTML={props.styles}
|
|
860
|
+
data-id={props.id}
|
|
861
|
+
nonce={props.nonce}
|
|
862
|
+
/></>;
|
|
858
863
|
}
|
|
859
864
|
var Inlined_styles_default = InlinedStyles;
|
|
860
865
|
|
|
@@ -940,7 +945,11 @@ function BlockStyles(props) {
|
|
|
940
945
|
hoverStylesClass
|
|
941
946
|
].join(" ");
|
|
942
947
|
});
|
|
943
|
-
return <><Show2 when={TARGET !== "reactNative" && css() && canShowBlock()}><Inlined_styles_default
|
|
948
|
+
return <><Show2 when={TARGET !== "reactNative" && css() && canShowBlock()}><Inlined_styles_default
|
|
949
|
+
id="builderio-block"
|
|
950
|
+
styles={css()}
|
|
951
|
+
nonce={props.context.nonce}
|
|
952
|
+
/></Show2></>;
|
|
944
953
|
}
|
|
945
954
|
var Block_styles_default = BlockStyles;
|
|
946
955
|
|
|
@@ -1493,13 +1502,14 @@ function Columns(props) {
|
|
|
1493
1502
|
}
|
|
1494
1503
|
return <>
|
|
1495
1504
|
<div
|
|
1496
|
-
class={getColumnsClass(props.builderBlock?.id) + " div-
|
|
1505
|
+
class={getColumnsClass(props.builderBlock?.id) + " div-5b8fb3ac"}
|
|
1497
1506
|
style={columnsCssVars()}
|
|
1498
1507
|
{...{}}
|
|
1499
1508
|
>
|
|
1500
1509
|
<Show6 when={TARGET !== "reactNative"}><Inlined_styles_default
|
|
1501
1510
|
id="builderio-columns"
|
|
1502
1511
|
styles={columnsStyles()}
|
|
1512
|
+
nonce={props.builderContext.nonce}
|
|
1503
1513
|
/></Show6>
|
|
1504
1514
|
<For4 each={props.columns}>{(column, _index) => {
|
|
1505
1515
|
const index = _index();
|
|
@@ -1521,7 +1531,7 @@ function Columns(props) {
|
|
|
1521
1531
|
/></Dynamic_renderer_default>;
|
|
1522
1532
|
}}</For4>
|
|
1523
1533
|
</div>
|
|
1524
|
-
<style>{`.div-
|
|
1534
|
+
<style>{`.div-5b8fb3ac {
|
|
1525
1535
|
display: flex;
|
|
1526
1536
|
line-height: normal;
|
|
1527
1537
|
}`}</style>
|
|
@@ -4139,7 +4149,11 @@ var getUpdateVariantVisibilityScript = ({
|
|
|
4139
4149
|
|
|
4140
4150
|
// src/components/inlined-script.tsx
|
|
4141
4151
|
function InlinedScript(props) {
|
|
4142
|
-
return <><script
|
|
4152
|
+
return <><script
|
|
4153
|
+
innerHTML={props.scriptStr}
|
|
4154
|
+
data-id={props.id}
|
|
4155
|
+
nonce={props.nonce || ""}
|
|
4156
|
+
/></>;
|
|
4143
4157
|
}
|
|
4144
4158
|
var Inlined_script_default = InlinedScript;
|
|
4145
4159
|
|
|
@@ -4653,7 +4667,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
4653
4667
|
}
|
|
4654
4668
|
|
|
4655
4669
|
// src/constants/sdk-version.ts
|
|
4656
|
-
var SDK_VERSION = "2.0.
|
|
4670
|
+
var SDK_VERSION = "2.0.1";
|
|
4657
4671
|
|
|
4658
4672
|
// src/functions/register.ts
|
|
4659
4673
|
var registry = {};
|
|
@@ -5253,6 +5267,7 @@ ${getDefaultStyles(props.isNestedRender)}
|
|
|
5253
5267
|
return <><Inlined_styles_default
|
|
5254
5268
|
id="builderio-content"
|
|
5255
5269
|
styles={injectedStyles()}
|
|
5270
|
+
nonce={props.nonce}
|
|
5256
5271
|
/></>;
|
|
5257
5272
|
}
|
|
5258
5273
|
var Styles_default = ContentStyles;
|
|
@@ -5346,7 +5361,8 @@ function ContentComponent(props) {
|
|
|
5346
5361
|
),
|
|
5347
5362
|
inheritedStyles: {},
|
|
5348
5363
|
BlocksWrapper: props.blocksWrapper || "div",
|
|
5349
|
-
BlocksWrapperProps: props.blocksWrapperProps || {}
|
|
5364
|
+
BlocksWrapperProps: props.blocksWrapperProps || {},
|
|
5365
|
+
nonce: props.nonce || ""
|
|
5350
5366
|
});
|
|
5351
5367
|
function contentSetState(newRootState) {
|
|
5352
5368
|
setBuilderContextSignal((PREVIOUS_VALUE) => ({
|
|
@@ -5359,6 +5375,7 @@ function ContentComponent(props) {
|
|
|
5359
5375
|
registeredComponents: registeredComponents()
|
|
5360
5376
|
}}
|
|
5361
5377
|
><Enable_editor_default
|
|
5378
|
+
nonce={props.nonce}
|
|
5362
5379
|
content={props.content}
|
|
5363
5380
|
data={props.data}
|
|
5364
5381
|
model={props.model}
|
|
@@ -5379,8 +5396,10 @@ function ContentComponent(props) {
|
|
|
5379
5396
|
<Show13 when={props.isSsrAbTest}><Inlined_script_default
|
|
5380
5397
|
id="builderio-variant-visibility"
|
|
5381
5398
|
scriptStr={scriptStr()}
|
|
5399
|
+
nonce={props.nonce || ""}
|
|
5382
5400
|
/></Show13>
|
|
5383
5401
|
<Show13 when={TARGET !== "reactNative"}><Styles_default
|
|
5402
|
+
nonce={props.nonce || ""}
|
|
5384
5403
|
isNestedRender={props.isNestedRender}
|
|
5385
5404
|
contentId={builderContextSignal().content?.id}
|
|
5386
5405
|
cssCode={builderContextSignal().content?.data?.cssCode}
|
|
@@ -5432,21 +5451,25 @@ function ContentVariants(props) {
|
|
|
5432
5451
|
<Show14 when={!props.isNestedRender && TARGET !== "reactNative"}><Inlined_script_default
|
|
5433
5452
|
id="builderio-init-variants-fns"
|
|
5434
5453
|
scriptStr={getInitVariantsFnsScriptString()}
|
|
5454
|
+
nonce={props.nonce || ""}
|
|
5435
5455
|
/></Show14>
|
|
5436
5456
|
<Show14 when={shouldRenderVariants()}>
|
|
5437
5457
|
<Inlined_styles_default
|
|
5438
5458
|
id="builderio-variants"
|
|
5439
5459
|
styles={hideVariantsStyleString()}
|
|
5460
|
+
nonce={props.nonce || ""}
|
|
5440
5461
|
/>
|
|
5441
5462
|
<Inlined_script_default
|
|
5442
5463
|
id="builderio-variants-visibility"
|
|
5443
5464
|
scriptStr={updateCookieAndStylesScriptStr()}
|
|
5465
|
+
nonce={props.nonce || ""}
|
|
5444
5466
|
/>
|
|
5445
5467
|
<For9 each={getVariants(props.content)}>{(variant, _index) => {
|
|
5446
5468
|
const index = _index();
|
|
5447
5469
|
return <Content_default
|
|
5448
5470
|
isNestedRender={props.isNestedRender}
|
|
5449
5471
|
key={variant.testVariationId}
|
|
5472
|
+
nonce={props.nonce}
|
|
5450
5473
|
content={variant}
|
|
5451
5474
|
showContent={false}
|
|
5452
5475
|
model={props.model}
|
|
@@ -5469,6 +5492,7 @@ function ContentVariants(props) {
|
|
|
5469
5492
|
}}</For9>
|
|
5470
5493
|
</Show14>
|
|
5471
5494
|
<Content_default
|
|
5495
|
+
nonce={props.nonce}
|
|
5472
5496
|
isNestedRender={props.isNestedRender}
|
|
5473
5497
|
{...{}}
|
|
5474
5498
|
content={defaultContent()}
|
|
@@ -5555,6 +5579,7 @@ function Symbol(props) {
|
|
|
5555
5579
|
}
|
|
5556
5580
|
createEffect4(on4(() => [onUpdateFn_0_props_symbol()], onUpdateFn_0));
|
|
5557
5581
|
return <><div class={className()} {...{}} {...props.attributes} {...{}}><Content_variants_default
|
|
5582
|
+
nonce={props.builderContext.nonce}
|
|
5558
5583
|
isNestedRender={true}
|
|
5559
5584
|
apiVersion={props.builderContext.apiVersion}
|
|
5560
5585
|
apiKey={props.builderContext.apiKey}
|
package/lib/browser/index.js
CHANGED
|
@@ -113,7 +113,8 @@ var builder_context_default = createContext({
|
|
|
113
113
|
componentInfos: {},
|
|
114
114
|
inheritedStyles: {},
|
|
115
115
|
BlocksWrapper: "div",
|
|
116
|
-
BlocksWrapperProps: {}
|
|
116
|
+
BlocksWrapperProps: {},
|
|
117
|
+
nonce: ""
|
|
117
118
|
});
|
|
118
119
|
var components_context_default = createContext({ registeredComponents: {} });
|
|
119
120
|
|
|
@@ -860,13 +861,15 @@ function InlinedStyles(props) {
|
|
|
860
861
|
return (() => {
|
|
861
862
|
const _el$ = _tmpl$();
|
|
862
863
|
effect((_p$) => {
|
|
863
|
-
const _v$ = props.styles, _v$2 = props.id;
|
|
864
|
+
const _v$ = props.styles, _v$2 = props.id, _v$3 = props.nonce;
|
|
864
865
|
_v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
|
|
865
866
|
_v$2 !== _p$._v$2 && setAttribute(_el$, "data-id", _p$._v$2 = _v$2);
|
|
867
|
+
_v$3 !== _p$._v$3 && setAttribute(_el$, "nonce", _p$._v$3 = _v$3);
|
|
866
868
|
return _p$;
|
|
867
869
|
}, {
|
|
868
870
|
_v$: void 0,
|
|
869
|
-
_v$2: void 0
|
|
871
|
+
_v$2: void 0,
|
|
872
|
+
_v$3: void 0
|
|
870
873
|
});
|
|
871
874
|
return _el$;
|
|
872
875
|
})();
|
|
@@ -949,6 +952,9 @@ function BlockStyles(props) {
|
|
|
949
952
|
id: "builderio-block",
|
|
950
953
|
get styles() {
|
|
951
954
|
return css();
|
|
955
|
+
},
|
|
956
|
+
get nonce() {
|
|
957
|
+
return props.context.nonce;
|
|
952
958
|
}
|
|
953
959
|
});
|
|
954
960
|
}
|
|
@@ -1551,7 +1557,7 @@ var getColumnsClass = (id) => {
|
|
|
1551
1557
|
|
|
1552
1558
|
// src/blocks/columns/columns.tsx
|
|
1553
1559
|
var _tmpl$3 = /* @__PURE__ */ template(`<div>`);
|
|
1554
|
-
var _tmpl$22 = /* @__PURE__ */ template(`<style>.div-
|
|
1560
|
+
var _tmpl$22 = /* @__PURE__ */ template(`<style>.div-5b8fb3ac {
|
|
1555
1561
|
display: flex;
|
|
1556
1562
|
line-height: normal;
|
|
1557
1563
|
}`);
|
|
@@ -1671,7 +1677,7 @@ function Columns(props) {
|
|
|
1671
1677
|
const _el$ = _tmpl$3();
|
|
1672
1678
|
spread(_el$, mergeProps({
|
|
1673
1679
|
get ["class"]() {
|
|
1674
|
-
return getColumnsClass(props.builderBlock?.id) + " div-
|
|
1680
|
+
return getColumnsClass(props.builderBlock?.id) + " div-5b8fb3ac";
|
|
1675
1681
|
},
|
|
1676
1682
|
get style() {
|
|
1677
1683
|
return columnsCssVars();
|
|
@@ -1684,6 +1690,9 @@ function Columns(props) {
|
|
|
1684
1690
|
id: "builderio-columns",
|
|
1685
1691
|
get styles() {
|
|
1686
1692
|
return columnsStyles();
|
|
1693
|
+
},
|
|
1694
|
+
get nonce() {
|
|
1695
|
+
return props.builderContext.nonce;
|
|
1687
1696
|
}
|
|
1688
1697
|
});
|
|
1689
1698
|
}
|
|
@@ -4615,13 +4624,15 @@ function InlinedScript(props) {
|
|
|
4615
4624
|
return (() => {
|
|
4616
4625
|
const _el$ = _tmpl$20();
|
|
4617
4626
|
effect((_p$) => {
|
|
4618
|
-
const _v$ = props.scriptStr, _v$2 = props.id;
|
|
4627
|
+
const _v$ = props.scriptStr, _v$2 = props.id, _v$3 = props.nonce || "";
|
|
4619
4628
|
_v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
|
|
4620
4629
|
_v$2 !== _p$._v$2 && setAttribute(_el$, "data-id", _p$._v$2 = _v$2);
|
|
4630
|
+
_v$3 !== _p$._v$3 && setAttribute(_el$, "nonce", _p$._v$3 = _v$3);
|
|
4621
4631
|
return _p$;
|
|
4622
4632
|
}, {
|
|
4623
4633
|
_v$: void 0,
|
|
4624
|
-
_v$2: void 0
|
|
4634
|
+
_v$2: void 0,
|
|
4635
|
+
_v$3: void 0
|
|
4625
4636
|
});
|
|
4626
4637
|
return _el$;
|
|
4627
4638
|
})();
|
|
@@ -5122,7 +5133,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
5122
5133
|
}
|
|
5123
5134
|
|
|
5124
5135
|
// src/constants/sdk-version.ts
|
|
5125
|
-
var SDK_VERSION = "2.0.
|
|
5136
|
+
var SDK_VERSION = "2.0.1";
|
|
5126
5137
|
|
|
5127
5138
|
// src/functions/register.ts
|
|
5128
5139
|
var registry = {};
|
|
@@ -5703,6 +5714,9 @@ ${getDefaultStyles(props.isNestedRender)}
|
|
|
5703
5714
|
id: "builderio-content",
|
|
5704
5715
|
get styles() {
|
|
5705
5716
|
return injectedStyles();
|
|
5717
|
+
},
|
|
5718
|
+
get nonce() {
|
|
5719
|
+
return props.nonce;
|
|
5706
5720
|
}
|
|
5707
5721
|
});
|
|
5708
5722
|
}
|
|
@@ -5787,7 +5801,8 @@ function ContentComponent(props) {
|
|
|
5787
5801
|
}), {}),
|
|
5788
5802
|
inheritedStyles: {},
|
|
5789
5803
|
BlocksWrapper: props.blocksWrapper || "div",
|
|
5790
|
-
BlocksWrapperProps: props.blocksWrapperProps || {}
|
|
5804
|
+
BlocksWrapperProps: props.blocksWrapperProps || {},
|
|
5805
|
+
nonce: props.nonce || ""
|
|
5791
5806
|
});
|
|
5792
5807
|
function contentSetState(newRootState) {
|
|
5793
5808
|
setBuilderContextSignal((PREVIOUS_VALUE) => ({
|
|
@@ -5803,6 +5818,9 @@ function ContentComponent(props) {
|
|
|
5803
5818
|
},
|
|
5804
5819
|
get children() {
|
|
5805
5820
|
return createComponent(enable_editor_default, mergeProps({
|
|
5821
|
+
get nonce() {
|
|
5822
|
+
return props.nonce;
|
|
5823
|
+
},
|
|
5806
5824
|
get content() {
|
|
5807
5825
|
return props.content;
|
|
5808
5826
|
},
|
|
@@ -5855,6 +5873,9 @@ function ContentComponent(props) {
|
|
|
5855
5873
|
id: "builderio-variant-visibility",
|
|
5856
5874
|
get scriptStr() {
|
|
5857
5875
|
return scriptStr();
|
|
5876
|
+
},
|
|
5877
|
+
get nonce() {
|
|
5878
|
+
return props.nonce || "";
|
|
5858
5879
|
}
|
|
5859
5880
|
});
|
|
5860
5881
|
}
|
|
@@ -5862,6 +5883,9 @@ function ContentComponent(props) {
|
|
|
5862
5883
|
when: TARGET !== "reactNative",
|
|
5863
5884
|
get children() {
|
|
5864
5885
|
return createComponent(styles_default, {
|
|
5886
|
+
get nonce() {
|
|
5887
|
+
return props.nonce || "";
|
|
5888
|
+
},
|
|
5865
5889
|
get isNestedRender() {
|
|
5866
5890
|
return props.isNestedRender;
|
|
5867
5891
|
},
|
|
@@ -5933,6 +5957,9 @@ function ContentVariants(props) {
|
|
|
5933
5957
|
id: "builderio-init-variants-fns",
|
|
5934
5958
|
get scriptStr() {
|
|
5935
5959
|
return getInitVariantsFnsScriptString();
|
|
5960
|
+
},
|
|
5961
|
+
get nonce() {
|
|
5962
|
+
return props.nonce || "";
|
|
5936
5963
|
}
|
|
5937
5964
|
});
|
|
5938
5965
|
}
|
|
@@ -5945,11 +5972,17 @@ function ContentVariants(props) {
|
|
|
5945
5972
|
id: "builderio-variants",
|
|
5946
5973
|
get styles() {
|
|
5947
5974
|
return hideVariantsStyleString();
|
|
5975
|
+
},
|
|
5976
|
+
get nonce() {
|
|
5977
|
+
return props.nonce || "";
|
|
5948
5978
|
}
|
|
5949
5979
|
}), createComponent(inlined_script_default, {
|
|
5950
5980
|
id: "builderio-variants-visibility",
|
|
5951
5981
|
get scriptStr() {
|
|
5952
5982
|
return updateCookieAndStylesScriptStr();
|
|
5983
|
+
},
|
|
5984
|
+
get nonce() {
|
|
5985
|
+
return props.nonce || "";
|
|
5953
5986
|
}
|
|
5954
5987
|
}), createComponent(For, {
|
|
5955
5988
|
get each() {
|
|
@@ -5964,6 +5997,9 @@ function ContentVariants(props) {
|
|
|
5964
5997
|
get key() {
|
|
5965
5998
|
return variant.testVariationId;
|
|
5966
5999
|
},
|
|
6000
|
+
get nonce() {
|
|
6001
|
+
return props.nonce;
|
|
6002
|
+
},
|
|
5967
6003
|
content: variant,
|
|
5968
6004
|
showContent: false,
|
|
5969
6005
|
get model() {
|
|
@@ -6019,6 +6055,9 @@ function ContentVariants(props) {
|
|
|
6019
6055
|
})];
|
|
6020
6056
|
}
|
|
6021
6057
|
}), createComponent(content_default, mergeProps({
|
|
6058
|
+
get nonce() {
|
|
6059
|
+
return props.nonce;
|
|
6060
|
+
},
|
|
6022
6061
|
get isNestedRender() {
|
|
6023
6062
|
return props.isNestedRender;
|
|
6024
6063
|
}
|
|
@@ -6143,6 +6182,9 @@ function Symbol(props) {
|
|
|
6143
6182
|
}
|
|
6144
6183
|
}, {}, () => props.attributes, {}), false, true);
|
|
6145
6184
|
insert(_el$, createComponent(content_variants_default, {
|
|
6185
|
+
get nonce() {
|
|
6186
|
+
return props.builderContext.nonce;
|
|
6187
|
+
},
|
|
6146
6188
|
isNestedRender: true,
|
|
6147
6189
|
get apiVersion() {
|
|
6148
6190
|
return props.builderContext.apiVersion;
|