@builder.io/sdk-qwik 0.14.7 → 0.14.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.
- package/lib/browser/index.qwik.cjs +39 -14
- package/lib/browser/index.qwik.mjs +39 -14
- package/lib/edge/index.qwik.cjs +39 -14
- package/lib/edge/index.qwik.mjs +39 -14
- package/lib/node/index.qwik.cjs +39 -14
- package/lib/node/index.qwik.mjs +39 -14
- package/package.json +1 -1
- package/types/src/components/content/components/enable-editor.d.ts +1 -1
- package/types/src/components/content/components/styles.d.ts +1 -0
- package/types/src/components/content/components/styles.helpers.d.ts +1 -0
- package/types/src/components/content/contentProps.types.d.ts +6 -1
- package/types/src/components/content-variants/content-variants.d.ts +1 -1
- package/types/src/constants/sdk-version.d.ts +1 -1
|
@@ -4394,7 +4394,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
4394
4394
|
const url = new URL(e.origin), hostname = url.hostname;
|
|
4395
4395
|
return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
|
|
4396
4396
|
}
|
|
4397
|
-
const SDK_VERSION = "0.14.
|
|
4397
|
+
const SDK_VERSION = "0.14.8";
|
|
4398
4398
|
const registry = {};
|
|
4399
4399
|
function register(type, info) {
|
|
4400
4400
|
let typeList = registry[type];
|
|
@@ -4958,17 +4958,7 @@ const getCss = ({ cssCode, contentId }) => {
|
|
|
4958
4958
|
return cssCode;
|
|
4959
4959
|
return (cssCode == null ? void 0 : cssCode.replace(/&/g, `div[builder-content-id="${contentId}"]`)) || "";
|
|
4960
4960
|
};
|
|
4961
|
-
const
|
|
4962
|
-
const state = qwik.useStore({
|
|
4963
|
-
injectedStyles: `
|
|
4964
|
-
${getCss({
|
|
4965
|
-
cssCode: props.cssCode,
|
|
4966
|
-
contentId: props.contentId
|
|
4967
|
-
})}
|
|
4968
|
-
${getFontCss({
|
|
4969
|
-
customFonts: props.customFonts
|
|
4970
|
-
})}
|
|
4971
|
-
|
|
4961
|
+
const DEFAULT_STYLES = `
|
|
4972
4962
|
.builder-button {
|
|
4973
4963
|
all: unset;
|
|
4974
4964
|
}
|
|
@@ -4985,6 +4975,21 @@ ${getFontCss({
|
|
|
4985
4975
|
text-align: inherit;
|
|
4986
4976
|
font-family: inherit;
|
|
4987
4977
|
}
|
|
4978
|
+
`;
|
|
4979
|
+
const getDefaultStyles = (isNested) => {
|
|
4980
|
+
return !isNested ? DEFAULT_STYLES : "";
|
|
4981
|
+
};
|
|
4982
|
+
const ContentStyles = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
4983
|
+
const state = qwik.useStore({
|
|
4984
|
+
injectedStyles: `
|
|
4985
|
+
${getCss({
|
|
4986
|
+
cssCode: props.cssCode,
|
|
4987
|
+
contentId: props.contentId
|
|
4988
|
+
})}
|
|
4989
|
+
${getFontCss({
|
|
4990
|
+
customFonts: props.customFonts
|
|
4991
|
+
})}
|
|
4992
|
+
${getDefaultStyles(props.isNestedRender)}
|
|
4988
4993
|
`.trim()
|
|
4989
4994
|
});
|
|
4990
4995
|
return /* @__PURE__ */ qwik._jsxC(InlinedStyles, {
|
|
@@ -5132,6 +5137,9 @@ const ContentComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.
|
|
|
5132
5137
|
}
|
|
5133
5138
|
}, 3, "LQ_0") : null,
|
|
5134
5139
|
/* @__PURE__ */ qwik._jsxC(ContentStyles, {
|
|
5140
|
+
get isNestedRender() {
|
|
5141
|
+
return props.isNestedRender;
|
|
5142
|
+
},
|
|
5135
5143
|
get contentId() {
|
|
5136
5144
|
var _a2;
|
|
5137
5145
|
return (_a2 = state.builderContextSignal.content) == null ? void 0 : _a2.id;
|
|
@@ -5162,7 +5170,10 @@ const ContentComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.
|
|
|
5162
5170
|
return (_b2 = (_a2 = p0.builderContextSignal.content) == null ? void 0 : _a2.data) == null ? void 0 : _b2.customFonts;
|
|
5163
5171
|
}, [
|
|
5164
5172
|
state
|
|
5165
|
-
], "p0.builderContextSignal.content?.data?.customFonts")
|
|
5173
|
+
], "p0.builderContextSignal.content?.data?.customFonts"),
|
|
5174
|
+
isNestedRender: qwik._fnSignal((p0) => p0.isNestedRender, [
|
|
5175
|
+
props
|
|
5176
|
+
], "p0.isNestedRender")
|
|
5166
5177
|
}
|
|
5167
5178
|
}, 3, "LQ_1"),
|
|
5168
5179
|
/* @__PURE__ */ qwik._jsxC(Blocks, {
|
|
@@ -5284,7 +5295,7 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
5284
5295
|
]));
|
|
5285
5296
|
return /* @__PURE__ */ qwik._jsxC(qwik.Fragment, {
|
|
5286
5297
|
children: [
|
|
5287
|
-
!props.
|
|
5298
|
+
!props.isNestedRender && TARGET !== "reactNative" ? /* @__PURE__ */ qwik._jsxC(InlinedScript, {
|
|
5288
5299
|
get scriptStr() {
|
|
5289
5300
|
return getScriptString();
|
|
5290
5301
|
},
|
|
@@ -5326,6 +5337,9 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
5326
5337
|
}, 3, "XM_2"),
|
|
5327
5338
|
(getVariants(props.content) || []).map((variant) => {
|
|
5328
5339
|
return /* @__PURE__ */ qwik._jsxC(ContentComponent, {
|
|
5340
|
+
get isNestedRender() {
|
|
5341
|
+
return props.isNestedRender;
|
|
5342
|
+
},
|
|
5329
5343
|
content: variant,
|
|
5330
5344
|
showContent: false,
|
|
5331
5345
|
get model() {
|
|
@@ -5410,6 +5424,9 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
5410
5424
|
enrich: qwik._fnSignal((p0) => p0.enrich, [
|
|
5411
5425
|
props
|
|
5412
5426
|
], "p0.enrich"),
|
|
5427
|
+
isNestedRender: qwik._fnSignal((p0) => p0.isNestedRender, [
|
|
5428
|
+
props
|
|
5429
|
+
], "p0.isNestedRender"),
|
|
5413
5430
|
isSsrAbTest: qwik._fnSignal((p0) => p0.shouldRenderVariants, [
|
|
5414
5431
|
state
|
|
5415
5432
|
], "p0.shouldRenderVariants"),
|
|
@@ -5432,6 +5449,9 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
5432
5449
|
]
|
|
5433
5450
|
}, 1, "XM_3") : null,
|
|
5434
5451
|
/* @__PURE__ */ qwik._jsxC(ContentComponent, {
|
|
5452
|
+
get isNestedRender() {
|
|
5453
|
+
return props.isNestedRender;
|
|
5454
|
+
},
|
|
5435
5455
|
get content() {
|
|
5436
5456
|
return defaultContent.value;
|
|
5437
5457
|
},
|
|
@@ -5521,6 +5541,9 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
5521
5541
|
enrich: qwik._fnSignal((p0) => p0.enrich, [
|
|
5522
5542
|
props
|
|
5523
5543
|
], "p0.enrich"),
|
|
5544
|
+
isNestedRender: qwik._fnSignal((p0) => p0.isNestedRender, [
|
|
5545
|
+
props
|
|
5546
|
+
], "p0.isNestedRender"),
|
|
5524
5547
|
isSsrAbTest: qwik._fnSignal((p0) => p0.shouldRenderVariants, [
|
|
5525
5548
|
state
|
|
5526
5549
|
], "p0.shouldRenderVariants"),
|
|
@@ -5599,6 +5622,7 @@ const Symbol$1 = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQ
|
|
|
5599
5622
|
return /* @__PURE__ */ qwik._jsxS("div", {
|
|
5600
5623
|
...props.attributes,
|
|
5601
5624
|
children: /* @__PURE__ */ qwik._jsxC(ContentVariants, {
|
|
5625
|
+
isNestedRender: true,
|
|
5602
5626
|
get apiVersion() {
|
|
5603
5627
|
return props.builderContext.apiVersion;
|
|
5604
5628
|
},
|
|
@@ -5670,6 +5694,7 @@ const Symbol$1 = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQ
|
|
|
5670
5694
|
props,
|
|
5671
5695
|
state
|
|
5672
5696
|
], "{...p0.symbol?.data,...p0.builderContext.localState,...p1.contentToUse?.data?.state}"),
|
|
5697
|
+
isNestedRender: qwik._IMMUTABLE,
|
|
5673
5698
|
linkComponent: qwik._fnSignal((p0) => p0.builderLinkComponent, [
|
|
5674
5699
|
props
|
|
5675
5700
|
], "p0.builderLinkComponent"),
|
|
@@ -4392,7 +4392,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
4392
4392
|
const url = new URL(e.origin), hostname = url.hostname;
|
|
4393
4393
|
return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
|
|
4394
4394
|
}
|
|
4395
|
-
const SDK_VERSION = "0.14.
|
|
4395
|
+
const SDK_VERSION = "0.14.8";
|
|
4396
4396
|
const registry = {};
|
|
4397
4397
|
function register(type, info) {
|
|
4398
4398
|
let typeList = registry[type];
|
|
@@ -4956,17 +4956,7 @@ const getCss = ({ cssCode, contentId }) => {
|
|
|
4956
4956
|
return cssCode;
|
|
4957
4957
|
return (cssCode == null ? void 0 : cssCode.replace(/&/g, `div[builder-content-id="${contentId}"]`)) || "";
|
|
4958
4958
|
};
|
|
4959
|
-
const
|
|
4960
|
-
const state = useStore({
|
|
4961
|
-
injectedStyles: `
|
|
4962
|
-
${getCss({
|
|
4963
|
-
cssCode: props.cssCode,
|
|
4964
|
-
contentId: props.contentId
|
|
4965
|
-
})}
|
|
4966
|
-
${getFontCss({
|
|
4967
|
-
customFonts: props.customFonts
|
|
4968
|
-
})}
|
|
4969
|
-
|
|
4959
|
+
const DEFAULT_STYLES = `
|
|
4970
4960
|
.builder-button {
|
|
4971
4961
|
all: unset;
|
|
4972
4962
|
}
|
|
@@ -4983,6 +4973,21 @@ ${getFontCss({
|
|
|
4983
4973
|
text-align: inherit;
|
|
4984
4974
|
font-family: inherit;
|
|
4985
4975
|
}
|
|
4976
|
+
`;
|
|
4977
|
+
const getDefaultStyles = (isNested) => {
|
|
4978
|
+
return !isNested ? DEFAULT_STYLES : "";
|
|
4979
|
+
};
|
|
4980
|
+
const ContentStyles = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
4981
|
+
const state = useStore({
|
|
4982
|
+
injectedStyles: `
|
|
4983
|
+
${getCss({
|
|
4984
|
+
cssCode: props.cssCode,
|
|
4985
|
+
contentId: props.contentId
|
|
4986
|
+
})}
|
|
4987
|
+
${getFontCss({
|
|
4988
|
+
customFonts: props.customFonts
|
|
4989
|
+
})}
|
|
4990
|
+
${getDefaultStyles(props.isNestedRender)}
|
|
4986
4991
|
`.trim()
|
|
4987
4992
|
});
|
|
4988
4993
|
return /* @__PURE__ */ _jsxC(InlinedStyles, {
|
|
@@ -5130,6 +5135,9 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
|
|
|
5130
5135
|
}
|
|
5131
5136
|
}, 3, "LQ_0") : null,
|
|
5132
5137
|
/* @__PURE__ */ _jsxC(ContentStyles, {
|
|
5138
|
+
get isNestedRender() {
|
|
5139
|
+
return props.isNestedRender;
|
|
5140
|
+
},
|
|
5133
5141
|
get contentId() {
|
|
5134
5142
|
var _a2;
|
|
5135
5143
|
return (_a2 = state.builderContextSignal.content) == null ? void 0 : _a2.id;
|
|
@@ -5160,7 +5168,10 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
|
|
|
5160
5168
|
return (_b2 = (_a2 = p0.builderContextSignal.content) == null ? void 0 : _a2.data) == null ? void 0 : _b2.customFonts;
|
|
5161
5169
|
}, [
|
|
5162
5170
|
state
|
|
5163
|
-
], "p0.builderContextSignal.content?.data?.customFonts")
|
|
5171
|
+
], "p0.builderContextSignal.content?.data?.customFonts"),
|
|
5172
|
+
isNestedRender: _fnSignal((p0) => p0.isNestedRender, [
|
|
5173
|
+
props
|
|
5174
|
+
], "p0.isNestedRender")
|
|
5164
5175
|
}
|
|
5165
5176
|
}, 3, "LQ_1"),
|
|
5166
5177
|
/* @__PURE__ */ _jsxC(Blocks, {
|
|
@@ -5282,7 +5293,7 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
5282
5293
|
]));
|
|
5283
5294
|
return /* @__PURE__ */ _jsxC(Fragment$1, {
|
|
5284
5295
|
children: [
|
|
5285
|
-
!props.
|
|
5296
|
+
!props.isNestedRender && TARGET !== "reactNative" ? /* @__PURE__ */ _jsxC(InlinedScript, {
|
|
5286
5297
|
get scriptStr() {
|
|
5287
5298
|
return getScriptString();
|
|
5288
5299
|
},
|
|
@@ -5324,6 +5335,9 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
5324
5335
|
}, 3, "XM_2"),
|
|
5325
5336
|
(getVariants(props.content) || []).map((variant) => {
|
|
5326
5337
|
return /* @__PURE__ */ _jsxC(ContentComponent, {
|
|
5338
|
+
get isNestedRender() {
|
|
5339
|
+
return props.isNestedRender;
|
|
5340
|
+
},
|
|
5327
5341
|
content: variant,
|
|
5328
5342
|
showContent: false,
|
|
5329
5343
|
get model() {
|
|
@@ -5408,6 +5422,9 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
5408
5422
|
enrich: _fnSignal((p0) => p0.enrich, [
|
|
5409
5423
|
props
|
|
5410
5424
|
], "p0.enrich"),
|
|
5425
|
+
isNestedRender: _fnSignal((p0) => p0.isNestedRender, [
|
|
5426
|
+
props
|
|
5427
|
+
], "p0.isNestedRender"),
|
|
5411
5428
|
isSsrAbTest: _fnSignal((p0) => p0.shouldRenderVariants, [
|
|
5412
5429
|
state
|
|
5413
5430
|
], "p0.shouldRenderVariants"),
|
|
@@ -5430,6 +5447,9 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
5430
5447
|
]
|
|
5431
5448
|
}, 1, "XM_3") : null,
|
|
5432
5449
|
/* @__PURE__ */ _jsxC(ContentComponent, {
|
|
5450
|
+
get isNestedRender() {
|
|
5451
|
+
return props.isNestedRender;
|
|
5452
|
+
},
|
|
5433
5453
|
get content() {
|
|
5434
5454
|
return defaultContent.value;
|
|
5435
5455
|
},
|
|
@@ -5519,6 +5539,9 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
5519
5539
|
enrich: _fnSignal((p0) => p0.enrich, [
|
|
5520
5540
|
props
|
|
5521
5541
|
], "p0.enrich"),
|
|
5542
|
+
isNestedRender: _fnSignal((p0) => p0.isNestedRender, [
|
|
5543
|
+
props
|
|
5544
|
+
], "p0.isNestedRender"),
|
|
5522
5545
|
isSsrAbTest: _fnSignal((p0) => p0.shouldRenderVariants, [
|
|
5523
5546
|
state
|
|
5524
5547
|
], "p0.shouldRenderVariants"),
|
|
@@ -5597,6 +5620,7 @@ const Symbol$1 = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props)
|
|
|
5597
5620
|
return /* @__PURE__ */ _jsxS("div", {
|
|
5598
5621
|
...props.attributes,
|
|
5599
5622
|
children: /* @__PURE__ */ _jsxC(ContentVariants, {
|
|
5623
|
+
isNestedRender: true,
|
|
5600
5624
|
get apiVersion() {
|
|
5601
5625
|
return props.builderContext.apiVersion;
|
|
5602
5626
|
},
|
|
@@ -5668,6 +5692,7 @@ const Symbol$1 = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props)
|
|
|
5668
5692
|
props,
|
|
5669
5693
|
state
|
|
5670
5694
|
], "{...p0.symbol?.data,...p0.builderContext.localState,...p1.contentToUse?.data?.state}"),
|
|
5695
|
+
isNestedRender: _IMMUTABLE,
|
|
5671
5696
|
linkComponent: _fnSignal((p0) => p0.builderLinkComponent, [
|
|
5672
5697
|
props
|
|
5673
5698
|
], "p0.builderLinkComponent"),
|
package/lib/edge/index.qwik.cjs
CHANGED
|
@@ -7625,7 +7625,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
7625
7625
|
const url = new URL(e.origin), hostname = url.hostname;
|
|
7626
7626
|
return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
|
|
7627
7627
|
}
|
|
7628
|
-
const SDK_VERSION = "0.14.
|
|
7628
|
+
const SDK_VERSION = "0.14.8";
|
|
7629
7629
|
const registry = {};
|
|
7630
7630
|
function register(type, info) {
|
|
7631
7631
|
let typeList = registry[type];
|
|
@@ -8189,17 +8189,7 @@ const getCss = ({ cssCode, contentId }) => {
|
|
|
8189
8189
|
return cssCode;
|
|
8190
8190
|
return (cssCode == null ? void 0 : cssCode.replace(/&/g, `div[builder-content-id="${contentId}"]`)) || "";
|
|
8191
8191
|
};
|
|
8192
|
-
const
|
|
8193
|
-
const state = qwik.useStore({
|
|
8194
|
-
injectedStyles: `
|
|
8195
|
-
${getCss({
|
|
8196
|
-
cssCode: props.cssCode,
|
|
8197
|
-
contentId: props.contentId
|
|
8198
|
-
})}
|
|
8199
|
-
${getFontCss({
|
|
8200
|
-
customFonts: props.customFonts
|
|
8201
|
-
})}
|
|
8202
|
-
|
|
8192
|
+
const DEFAULT_STYLES = `
|
|
8203
8193
|
.builder-button {
|
|
8204
8194
|
all: unset;
|
|
8205
8195
|
}
|
|
@@ -8216,6 +8206,21 @@ ${getFontCss({
|
|
|
8216
8206
|
text-align: inherit;
|
|
8217
8207
|
font-family: inherit;
|
|
8218
8208
|
}
|
|
8209
|
+
`;
|
|
8210
|
+
const getDefaultStyles = (isNested) => {
|
|
8211
|
+
return !isNested ? DEFAULT_STYLES : "";
|
|
8212
|
+
};
|
|
8213
|
+
const ContentStyles = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
8214
|
+
const state = qwik.useStore({
|
|
8215
|
+
injectedStyles: `
|
|
8216
|
+
${getCss({
|
|
8217
|
+
cssCode: props.cssCode,
|
|
8218
|
+
contentId: props.contentId
|
|
8219
|
+
})}
|
|
8220
|
+
${getFontCss({
|
|
8221
|
+
customFonts: props.customFonts
|
|
8222
|
+
})}
|
|
8223
|
+
${getDefaultStyles(props.isNestedRender)}
|
|
8219
8224
|
`.trim()
|
|
8220
8225
|
});
|
|
8221
8226
|
return /* @__PURE__ */ qwik._jsxC(InlinedStyles, {
|
|
@@ -8363,6 +8368,9 @@ const ContentComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.
|
|
|
8363
8368
|
}
|
|
8364
8369
|
}, 3, "LQ_0") : null,
|
|
8365
8370
|
/* @__PURE__ */ qwik._jsxC(ContentStyles, {
|
|
8371
|
+
get isNestedRender() {
|
|
8372
|
+
return props.isNestedRender;
|
|
8373
|
+
},
|
|
8366
8374
|
get contentId() {
|
|
8367
8375
|
var _a2;
|
|
8368
8376
|
return (_a2 = state.builderContextSignal.content) == null ? void 0 : _a2.id;
|
|
@@ -8393,7 +8401,10 @@ const ContentComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.
|
|
|
8393
8401
|
return (_b2 = (_a2 = p0.builderContextSignal.content) == null ? void 0 : _a2.data) == null ? void 0 : _b2.customFonts;
|
|
8394
8402
|
}, [
|
|
8395
8403
|
state
|
|
8396
|
-
], "p0.builderContextSignal.content?.data?.customFonts")
|
|
8404
|
+
], "p0.builderContextSignal.content?.data?.customFonts"),
|
|
8405
|
+
isNestedRender: qwik._fnSignal((p0) => p0.isNestedRender, [
|
|
8406
|
+
props
|
|
8407
|
+
], "p0.isNestedRender")
|
|
8397
8408
|
}
|
|
8398
8409
|
}, 3, "LQ_1"),
|
|
8399
8410
|
/* @__PURE__ */ qwik._jsxC(Blocks, {
|
|
@@ -8515,7 +8526,7 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
8515
8526
|
]));
|
|
8516
8527
|
return /* @__PURE__ */ qwik._jsxC(qwik.Fragment, {
|
|
8517
8528
|
children: [
|
|
8518
|
-
!props.
|
|
8529
|
+
!props.isNestedRender && TARGET !== "reactNative" ? /* @__PURE__ */ qwik._jsxC(InlinedScript, {
|
|
8519
8530
|
get scriptStr() {
|
|
8520
8531
|
return getScriptString();
|
|
8521
8532
|
},
|
|
@@ -8557,6 +8568,9 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
8557
8568
|
}, 3, "XM_2"),
|
|
8558
8569
|
(getVariants(props.content) || []).map((variant) => {
|
|
8559
8570
|
return /* @__PURE__ */ qwik._jsxC(ContentComponent, {
|
|
8571
|
+
get isNestedRender() {
|
|
8572
|
+
return props.isNestedRender;
|
|
8573
|
+
},
|
|
8560
8574
|
content: variant,
|
|
8561
8575
|
showContent: false,
|
|
8562
8576
|
get model() {
|
|
@@ -8641,6 +8655,9 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
8641
8655
|
enrich: qwik._fnSignal((p0) => p0.enrich, [
|
|
8642
8656
|
props
|
|
8643
8657
|
], "p0.enrich"),
|
|
8658
|
+
isNestedRender: qwik._fnSignal((p0) => p0.isNestedRender, [
|
|
8659
|
+
props
|
|
8660
|
+
], "p0.isNestedRender"),
|
|
8644
8661
|
isSsrAbTest: qwik._fnSignal((p0) => p0.shouldRenderVariants, [
|
|
8645
8662
|
state
|
|
8646
8663
|
], "p0.shouldRenderVariants"),
|
|
@@ -8663,6 +8680,9 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
8663
8680
|
]
|
|
8664
8681
|
}, 1, "XM_3") : null,
|
|
8665
8682
|
/* @__PURE__ */ qwik._jsxC(ContentComponent, {
|
|
8683
|
+
get isNestedRender() {
|
|
8684
|
+
return props.isNestedRender;
|
|
8685
|
+
},
|
|
8666
8686
|
get content() {
|
|
8667
8687
|
return defaultContent.value;
|
|
8668
8688
|
},
|
|
@@ -8752,6 +8772,9 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
8752
8772
|
enrich: qwik._fnSignal((p0) => p0.enrich, [
|
|
8753
8773
|
props
|
|
8754
8774
|
], "p0.enrich"),
|
|
8775
|
+
isNestedRender: qwik._fnSignal((p0) => p0.isNestedRender, [
|
|
8776
|
+
props
|
|
8777
|
+
], "p0.isNestedRender"),
|
|
8755
8778
|
isSsrAbTest: qwik._fnSignal((p0) => p0.shouldRenderVariants, [
|
|
8756
8779
|
state
|
|
8757
8780
|
], "p0.shouldRenderVariants"),
|
|
@@ -8830,6 +8853,7 @@ const Symbol$1 = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQ
|
|
|
8830
8853
|
return /* @__PURE__ */ qwik._jsxS("div", {
|
|
8831
8854
|
...props.attributes,
|
|
8832
8855
|
children: /* @__PURE__ */ qwik._jsxC(ContentVariants, {
|
|
8856
|
+
isNestedRender: true,
|
|
8833
8857
|
get apiVersion() {
|
|
8834
8858
|
return props.builderContext.apiVersion;
|
|
8835
8859
|
},
|
|
@@ -8901,6 +8925,7 @@ const Symbol$1 = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQ
|
|
|
8901
8925
|
props,
|
|
8902
8926
|
state
|
|
8903
8927
|
], "{...p0.symbol?.data,...p0.builderContext.localState,...p1.contentToUse?.data?.state}"),
|
|
8928
|
+
isNestedRender: qwik._IMMUTABLE,
|
|
8904
8929
|
linkComponent: qwik._fnSignal((p0) => p0.builderLinkComponent, [
|
|
8905
8930
|
props
|
|
8906
8931
|
], "p0.builderLinkComponent"),
|
package/lib/edge/index.qwik.mjs
CHANGED
|
@@ -7623,7 +7623,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
7623
7623
|
const url = new URL(e.origin), hostname = url.hostname;
|
|
7624
7624
|
return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
|
|
7625
7625
|
}
|
|
7626
|
-
const SDK_VERSION = "0.14.
|
|
7626
|
+
const SDK_VERSION = "0.14.8";
|
|
7627
7627
|
const registry = {};
|
|
7628
7628
|
function register(type, info) {
|
|
7629
7629
|
let typeList = registry[type];
|
|
@@ -8187,17 +8187,7 @@ const getCss = ({ cssCode, contentId }) => {
|
|
|
8187
8187
|
return cssCode;
|
|
8188
8188
|
return (cssCode == null ? void 0 : cssCode.replace(/&/g, `div[builder-content-id="${contentId}"]`)) || "";
|
|
8189
8189
|
};
|
|
8190
|
-
const
|
|
8191
|
-
const state = useStore({
|
|
8192
|
-
injectedStyles: `
|
|
8193
|
-
${getCss({
|
|
8194
|
-
cssCode: props.cssCode,
|
|
8195
|
-
contentId: props.contentId
|
|
8196
|
-
})}
|
|
8197
|
-
${getFontCss({
|
|
8198
|
-
customFonts: props.customFonts
|
|
8199
|
-
})}
|
|
8200
|
-
|
|
8190
|
+
const DEFAULT_STYLES = `
|
|
8201
8191
|
.builder-button {
|
|
8202
8192
|
all: unset;
|
|
8203
8193
|
}
|
|
@@ -8214,6 +8204,21 @@ ${getFontCss({
|
|
|
8214
8204
|
text-align: inherit;
|
|
8215
8205
|
font-family: inherit;
|
|
8216
8206
|
}
|
|
8207
|
+
`;
|
|
8208
|
+
const getDefaultStyles = (isNested) => {
|
|
8209
|
+
return !isNested ? DEFAULT_STYLES : "";
|
|
8210
|
+
};
|
|
8211
|
+
const ContentStyles = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
8212
|
+
const state = useStore({
|
|
8213
|
+
injectedStyles: `
|
|
8214
|
+
${getCss({
|
|
8215
|
+
cssCode: props.cssCode,
|
|
8216
|
+
contentId: props.contentId
|
|
8217
|
+
})}
|
|
8218
|
+
${getFontCss({
|
|
8219
|
+
customFonts: props.customFonts
|
|
8220
|
+
})}
|
|
8221
|
+
${getDefaultStyles(props.isNestedRender)}
|
|
8217
8222
|
`.trim()
|
|
8218
8223
|
});
|
|
8219
8224
|
return /* @__PURE__ */ _jsxC(InlinedStyles, {
|
|
@@ -8361,6 +8366,9 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
|
|
|
8361
8366
|
}
|
|
8362
8367
|
}, 3, "LQ_0") : null,
|
|
8363
8368
|
/* @__PURE__ */ _jsxC(ContentStyles, {
|
|
8369
|
+
get isNestedRender() {
|
|
8370
|
+
return props.isNestedRender;
|
|
8371
|
+
},
|
|
8364
8372
|
get contentId() {
|
|
8365
8373
|
var _a2;
|
|
8366
8374
|
return (_a2 = state.builderContextSignal.content) == null ? void 0 : _a2.id;
|
|
@@ -8391,7 +8399,10 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
|
|
|
8391
8399
|
return (_b2 = (_a2 = p0.builderContextSignal.content) == null ? void 0 : _a2.data) == null ? void 0 : _b2.customFonts;
|
|
8392
8400
|
}, [
|
|
8393
8401
|
state
|
|
8394
|
-
], "p0.builderContextSignal.content?.data?.customFonts")
|
|
8402
|
+
], "p0.builderContextSignal.content?.data?.customFonts"),
|
|
8403
|
+
isNestedRender: _fnSignal((p0) => p0.isNestedRender, [
|
|
8404
|
+
props
|
|
8405
|
+
], "p0.isNestedRender")
|
|
8395
8406
|
}
|
|
8396
8407
|
}, 3, "LQ_1"),
|
|
8397
8408
|
/* @__PURE__ */ _jsxC(Blocks, {
|
|
@@ -8513,7 +8524,7 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
8513
8524
|
]));
|
|
8514
8525
|
return /* @__PURE__ */ _jsxC(Fragment$1, {
|
|
8515
8526
|
children: [
|
|
8516
|
-
!props.
|
|
8527
|
+
!props.isNestedRender && TARGET !== "reactNative" ? /* @__PURE__ */ _jsxC(InlinedScript, {
|
|
8517
8528
|
get scriptStr() {
|
|
8518
8529
|
return getScriptString();
|
|
8519
8530
|
},
|
|
@@ -8555,6 +8566,9 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
8555
8566
|
}, 3, "XM_2"),
|
|
8556
8567
|
(getVariants(props.content) || []).map((variant) => {
|
|
8557
8568
|
return /* @__PURE__ */ _jsxC(ContentComponent, {
|
|
8569
|
+
get isNestedRender() {
|
|
8570
|
+
return props.isNestedRender;
|
|
8571
|
+
},
|
|
8558
8572
|
content: variant,
|
|
8559
8573
|
showContent: false,
|
|
8560
8574
|
get model() {
|
|
@@ -8639,6 +8653,9 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
8639
8653
|
enrich: _fnSignal((p0) => p0.enrich, [
|
|
8640
8654
|
props
|
|
8641
8655
|
], "p0.enrich"),
|
|
8656
|
+
isNestedRender: _fnSignal((p0) => p0.isNestedRender, [
|
|
8657
|
+
props
|
|
8658
|
+
], "p0.isNestedRender"),
|
|
8642
8659
|
isSsrAbTest: _fnSignal((p0) => p0.shouldRenderVariants, [
|
|
8643
8660
|
state
|
|
8644
8661
|
], "p0.shouldRenderVariants"),
|
|
@@ -8661,6 +8678,9 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
8661
8678
|
]
|
|
8662
8679
|
}, 1, "XM_3") : null,
|
|
8663
8680
|
/* @__PURE__ */ _jsxC(ContentComponent, {
|
|
8681
|
+
get isNestedRender() {
|
|
8682
|
+
return props.isNestedRender;
|
|
8683
|
+
},
|
|
8664
8684
|
get content() {
|
|
8665
8685
|
return defaultContent.value;
|
|
8666
8686
|
},
|
|
@@ -8750,6 +8770,9 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
8750
8770
|
enrich: _fnSignal((p0) => p0.enrich, [
|
|
8751
8771
|
props
|
|
8752
8772
|
], "p0.enrich"),
|
|
8773
|
+
isNestedRender: _fnSignal((p0) => p0.isNestedRender, [
|
|
8774
|
+
props
|
|
8775
|
+
], "p0.isNestedRender"),
|
|
8753
8776
|
isSsrAbTest: _fnSignal((p0) => p0.shouldRenderVariants, [
|
|
8754
8777
|
state
|
|
8755
8778
|
], "p0.shouldRenderVariants"),
|
|
@@ -8828,6 +8851,7 @@ const Symbol$1 = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props)
|
|
|
8828
8851
|
return /* @__PURE__ */ _jsxS("div", {
|
|
8829
8852
|
...props.attributes,
|
|
8830
8853
|
children: /* @__PURE__ */ _jsxC(ContentVariants, {
|
|
8854
|
+
isNestedRender: true,
|
|
8831
8855
|
get apiVersion() {
|
|
8832
8856
|
return props.builderContext.apiVersion;
|
|
8833
8857
|
},
|
|
@@ -8899,6 +8923,7 @@ const Symbol$1 = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props)
|
|
|
8899
8923
|
props,
|
|
8900
8924
|
state
|
|
8901
8925
|
], "{...p0.symbol?.data,...p0.builderContext.localState,...p1.contentToUse?.data?.state}"),
|
|
8926
|
+
isNestedRender: _IMMUTABLE,
|
|
8902
8927
|
linkComponent: _fnSignal((p0) => p0.builderLinkComponent, [
|
|
8903
8928
|
props
|
|
8904
8929
|
], "p0.builderLinkComponent"),
|
package/lib/node/index.qwik.cjs
CHANGED
|
@@ -4496,7 +4496,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
4496
4496
|
const url = new URL(e.origin), hostname = url.hostname;
|
|
4497
4497
|
return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
|
|
4498
4498
|
}
|
|
4499
|
-
const SDK_VERSION = "0.14.
|
|
4499
|
+
const SDK_VERSION = "0.14.8";
|
|
4500
4500
|
const registry = {};
|
|
4501
4501
|
function register(type, info) {
|
|
4502
4502
|
let typeList = registry[type];
|
|
@@ -5060,17 +5060,7 @@ const getCss = ({ cssCode, contentId }) => {
|
|
|
5060
5060
|
return cssCode;
|
|
5061
5061
|
return (cssCode == null ? void 0 : cssCode.replace(/&/g, `div[builder-content-id="${contentId}"]`)) || "";
|
|
5062
5062
|
};
|
|
5063
|
-
const
|
|
5064
|
-
const state = qwik.useStore({
|
|
5065
|
-
injectedStyles: `
|
|
5066
|
-
${getCss({
|
|
5067
|
-
cssCode: props.cssCode,
|
|
5068
|
-
contentId: props.contentId
|
|
5069
|
-
})}
|
|
5070
|
-
${getFontCss({
|
|
5071
|
-
customFonts: props.customFonts
|
|
5072
|
-
})}
|
|
5073
|
-
|
|
5063
|
+
const DEFAULT_STYLES = `
|
|
5074
5064
|
.builder-button {
|
|
5075
5065
|
all: unset;
|
|
5076
5066
|
}
|
|
@@ -5087,6 +5077,21 @@ ${getFontCss({
|
|
|
5087
5077
|
text-align: inherit;
|
|
5088
5078
|
font-family: inherit;
|
|
5089
5079
|
}
|
|
5080
|
+
`;
|
|
5081
|
+
const getDefaultStyles = (isNested) => {
|
|
5082
|
+
return !isNested ? DEFAULT_STYLES : "";
|
|
5083
|
+
};
|
|
5084
|
+
const ContentStyles = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
5085
|
+
const state = qwik.useStore({
|
|
5086
|
+
injectedStyles: `
|
|
5087
|
+
${getCss({
|
|
5088
|
+
cssCode: props.cssCode,
|
|
5089
|
+
contentId: props.contentId
|
|
5090
|
+
})}
|
|
5091
|
+
${getFontCss({
|
|
5092
|
+
customFonts: props.customFonts
|
|
5093
|
+
})}
|
|
5094
|
+
${getDefaultStyles(props.isNestedRender)}
|
|
5090
5095
|
`.trim()
|
|
5091
5096
|
});
|
|
5092
5097
|
return /* @__PURE__ */ qwik._jsxC(InlinedStyles, {
|
|
@@ -5234,6 +5239,9 @@ const ContentComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.
|
|
|
5234
5239
|
}
|
|
5235
5240
|
}, 3, "LQ_0") : null,
|
|
5236
5241
|
/* @__PURE__ */ qwik._jsxC(ContentStyles, {
|
|
5242
|
+
get isNestedRender() {
|
|
5243
|
+
return props.isNestedRender;
|
|
5244
|
+
},
|
|
5237
5245
|
get contentId() {
|
|
5238
5246
|
var _a2;
|
|
5239
5247
|
return (_a2 = state.builderContextSignal.content) == null ? void 0 : _a2.id;
|
|
@@ -5264,7 +5272,10 @@ const ContentComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.
|
|
|
5264
5272
|
return (_b2 = (_a2 = p0.builderContextSignal.content) == null ? void 0 : _a2.data) == null ? void 0 : _b2.customFonts;
|
|
5265
5273
|
}, [
|
|
5266
5274
|
state
|
|
5267
|
-
], "p0.builderContextSignal.content?.data?.customFonts")
|
|
5275
|
+
], "p0.builderContextSignal.content?.data?.customFonts"),
|
|
5276
|
+
isNestedRender: qwik._fnSignal((p0) => p0.isNestedRender, [
|
|
5277
|
+
props
|
|
5278
|
+
], "p0.isNestedRender")
|
|
5268
5279
|
}
|
|
5269
5280
|
}, 3, "LQ_1"),
|
|
5270
5281
|
/* @__PURE__ */ qwik._jsxC(Blocks, {
|
|
@@ -5386,7 +5397,7 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
5386
5397
|
]));
|
|
5387
5398
|
return /* @__PURE__ */ qwik._jsxC(qwik.Fragment, {
|
|
5388
5399
|
children: [
|
|
5389
|
-
!props.
|
|
5400
|
+
!props.isNestedRender && TARGET !== "reactNative" ? /* @__PURE__ */ qwik._jsxC(InlinedScript, {
|
|
5390
5401
|
get scriptStr() {
|
|
5391
5402
|
return getScriptString();
|
|
5392
5403
|
},
|
|
@@ -5428,6 +5439,9 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
5428
5439
|
}, 3, "XM_2"),
|
|
5429
5440
|
(getVariants(props.content) || []).map((variant) => {
|
|
5430
5441
|
return /* @__PURE__ */ qwik._jsxC(ContentComponent, {
|
|
5442
|
+
get isNestedRender() {
|
|
5443
|
+
return props.isNestedRender;
|
|
5444
|
+
},
|
|
5431
5445
|
content: variant,
|
|
5432
5446
|
showContent: false,
|
|
5433
5447
|
get model() {
|
|
@@ -5512,6 +5526,9 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
5512
5526
|
enrich: qwik._fnSignal((p0) => p0.enrich, [
|
|
5513
5527
|
props
|
|
5514
5528
|
], "p0.enrich"),
|
|
5529
|
+
isNestedRender: qwik._fnSignal((p0) => p0.isNestedRender, [
|
|
5530
|
+
props
|
|
5531
|
+
], "p0.isNestedRender"),
|
|
5515
5532
|
isSsrAbTest: qwik._fnSignal((p0) => p0.shouldRenderVariants, [
|
|
5516
5533
|
state
|
|
5517
5534
|
], "p0.shouldRenderVariants"),
|
|
@@ -5534,6 +5551,9 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
5534
5551
|
]
|
|
5535
5552
|
}, 1, "XM_3") : null,
|
|
5536
5553
|
/* @__PURE__ */ qwik._jsxC(ContentComponent, {
|
|
5554
|
+
get isNestedRender() {
|
|
5555
|
+
return props.isNestedRender;
|
|
5556
|
+
},
|
|
5537
5557
|
get content() {
|
|
5538
5558
|
return defaultContent.value;
|
|
5539
5559
|
},
|
|
@@ -5623,6 +5643,9 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
5623
5643
|
enrich: qwik._fnSignal((p0) => p0.enrich, [
|
|
5624
5644
|
props
|
|
5625
5645
|
], "p0.enrich"),
|
|
5646
|
+
isNestedRender: qwik._fnSignal((p0) => p0.isNestedRender, [
|
|
5647
|
+
props
|
|
5648
|
+
], "p0.isNestedRender"),
|
|
5626
5649
|
isSsrAbTest: qwik._fnSignal((p0) => p0.shouldRenderVariants, [
|
|
5627
5650
|
state
|
|
5628
5651
|
], "p0.shouldRenderVariants"),
|
|
@@ -5701,6 +5724,7 @@ const Symbol$1 = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQ
|
|
|
5701
5724
|
return /* @__PURE__ */ qwik._jsxS("div", {
|
|
5702
5725
|
...props.attributes,
|
|
5703
5726
|
children: /* @__PURE__ */ qwik._jsxC(ContentVariants, {
|
|
5727
|
+
isNestedRender: true,
|
|
5704
5728
|
get apiVersion() {
|
|
5705
5729
|
return props.builderContext.apiVersion;
|
|
5706
5730
|
},
|
|
@@ -5772,6 +5796,7 @@ const Symbol$1 = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQ
|
|
|
5772
5796
|
props,
|
|
5773
5797
|
state
|
|
5774
5798
|
], "{...p0.symbol?.data,...p0.builderContext.localState,...p1.contentToUse?.data?.state}"),
|
|
5799
|
+
isNestedRender: qwik._IMMUTABLE,
|
|
5775
5800
|
linkComponent: qwik._fnSignal((p0) => p0.builderLinkComponent, [
|
|
5776
5801
|
props
|
|
5777
5802
|
], "p0.builderLinkComponent"),
|
package/lib/node/index.qwik.mjs
CHANGED
|
@@ -4494,7 +4494,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
4494
4494
|
const url = new URL(e.origin), hostname = url.hostname;
|
|
4495
4495
|
return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
|
|
4496
4496
|
}
|
|
4497
|
-
const SDK_VERSION = "0.14.
|
|
4497
|
+
const SDK_VERSION = "0.14.8";
|
|
4498
4498
|
const registry = {};
|
|
4499
4499
|
function register(type, info) {
|
|
4500
4500
|
let typeList = registry[type];
|
|
@@ -5058,17 +5058,7 @@ const getCss = ({ cssCode, contentId }) => {
|
|
|
5058
5058
|
return cssCode;
|
|
5059
5059
|
return (cssCode == null ? void 0 : cssCode.replace(/&/g, `div[builder-content-id="${contentId}"]`)) || "";
|
|
5060
5060
|
};
|
|
5061
|
-
const
|
|
5062
|
-
const state = useStore({
|
|
5063
|
-
injectedStyles: `
|
|
5064
|
-
${getCss({
|
|
5065
|
-
cssCode: props.cssCode,
|
|
5066
|
-
contentId: props.contentId
|
|
5067
|
-
})}
|
|
5068
|
-
${getFontCss({
|
|
5069
|
-
customFonts: props.customFonts
|
|
5070
|
-
})}
|
|
5071
|
-
|
|
5061
|
+
const DEFAULT_STYLES = `
|
|
5072
5062
|
.builder-button {
|
|
5073
5063
|
all: unset;
|
|
5074
5064
|
}
|
|
@@ -5085,6 +5075,21 @@ ${getFontCss({
|
|
|
5085
5075
|
text-align: inherit;
|
|
5086
5076
|
font-family: inherit;
|
|
5087
5077
|
}
|
|
5078
|
+
`;
|
|
5079
|
+
const getDefaultStyles = (isNested) => {
|
|
5080
|
+
return !isNested ? DEFAULT_STYLES : "";
|
|
5081
|
+
};
|
|
5082
|
+
const ContentStyles = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
5083
|
+
const state = useStore({
|
|
5084
|
+
injectedStyles: `
|
|
5085
|
+
${getCss({
|
|
5086
|
+
cssCode: props.cssCode,
|
|
5087
|
+
contentId: props.contentId
|
|
5088
|
+
})}
|
|
5089
|
+
${getFontCss({
|
|
5090
|
+
customFonts: props.customFonts
|
|
5091
|
+
})}
|
|
5092
|
+
${getDefaultStyles(props.isNestedRender)}
|
|
5088
5093
|
`.trim()
|
|
5089
5094
|
});
|
|
5090
5095
|
return /* @__PURE__ */ _jsxC(InlinedStyles, {
|
|
@@ -5232,6 +5237,9 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
|
|
|
5232
5237
|
}
|
|
5233
5238
|
}, 3, "LQ_0") : null,
|
|
5234
5239
|
/* @__PURE__ */ _jsxC(ContentStyles, {
|
|
5240
|
+
get isNestedRender() {
|
|
5241
|
+
return props.isNestedRender;
|
|
5242
|
+
},
|
|
5235
5243
|
get contentId() {
|
|
5236
5244
|
var _a2;
|
|
5237
5245
|
return (_a2 = state.builderContextSignal.content) == null ? void 0 : _a2.id;
|
|
@@ -5262,7 +5270,10 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
|
|
|
5262
5270
|
return (_b2 = (_a2 = p0.builderContextSignal.content) == null ? void 0 : _a2.data) == null ? void 0 : _b2.customFonts;
|
|
5263
5271
|
}, [
|
|
5264
5272
|
state
|
|
5265
|
-
], "p0.builderContextSignal.content?.data?.customFonts")
|
|
5273
|
+
], "p0.builderContextSignal.content?.data?.customFonts"),
|
|
5274
|
+
isNestedRender: _fnSignal((p0) => p0.isNestedRender, [
|
|
5275
|
+
props
|
|
5276
|
+
], "p0.isNestedRender")
|
|
5266
5277
|
}
|
|
5267
5278
|
}, 3, "LQ_1"),
|
|
5268
5279
|
/* @__PURE__ */ _jsxC(Blocks, {
|
|
@@ -5384,7 +5395,7 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
5384
5395
|
]));
|
|
5385
5396
|
return /* @__PURE__ */ _jsxC(Fragment$1, {
|
|
5386
5397
|
children: [
|
|
5387
|
-
!props.
|
|
5398
|
+
!props.isNestedRender && TARGET !== "reactNative" ? /* @__PURE__ */ _jsxC(InlinedScript, {
|
|
5388
5399
|
get scriptStr() {
|
|
5389
5400
|
return getScriptString();
|
|
5390
5401
|
},
|
|
@@ -5426,6 +5437,9 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
5426
5437
|
}, 3, "XM_2"),
|
|
5427
5438
|
(getVariants(props.content) || []).map((variant) => {
|
|
5428
5439
|
return /* @__PURE__ */ _jsxC(ContentComponent, {
|
|
5440
|
+
get isNestedRender() {
|
|
5441
|
+
return props.isNestedRender;
|
|
5442
|
+
},
|
|
5429
5443
|
content: variant,
|
|
5430
5444
|
showContent: false,
|
|
5431
5445
|
get model() {
|
|
@@ -5510,6 +5524,9 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
5510
5524
|
enrich: _fnSignal((p0) => p0.enrich, [
|
|
5511
5525
|
props
|
|
5512
5526
|
], "p0.enrich"),
|
|
5527
|
+
isNestedRender: _fnSignal((p0) => p0.isNestedRender, [
|
|
5528
|
+
props
|
|
5529
|
+
], "p0.isNestedRender"),
|
|
5513
5530
|
isSsrAbTest: _fnSignal((p0) => p0.shouldRenderVariants, [
|
|
5514
5531
|
state
|
|
5515
5532
|
], "p0.shouldRenderVariants"),
|
|
@@ -5532,6 +5549,9 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
5532
5549
|
]
|
|
5533
5550
|
}, 1, "XM_3") : null,
|
|
5534
5551
|
/* @__PURE__ */ _jsxC(ContentComponent, {
|
|
5552
|
+
get isNestedRender() {
|
|
5553
|
+
return props.isNestedRender;
|
|
5554
|
+
},
|
|
5535
5555
|
get content() {
|
|
5536
5556
|
return defaultContent.value;
|
|
5537
5557
|
},
|
|
@@ -5621,6 +5641,9 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
5621
5641
|
enrich: _fnSignal((p0) => p0.enrich, [
|
|
5622
5642
|
props
|
|
5623
5643
|
], "p0.enrich"),
|
|
5644
|
+
isNestedRender: _fnSignal((p0) => p0.isNestedRender, [
|
|
5645
|
+
props
|
|
5646
|
+
], "p0.isNestedRender"),
|
|
5624
5647
|
isSsrAbTest: _fnSignal((p0) => p0.shouldRenderVariants, [
|
|
5625
5648
|
state
|
|
5626
5649
|
], "p0.shouldRenderVariants"),
|
|
@@ -5699,6 +5722,7 @@ const Symbol$1 = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props)
|
|
|
5699
5722
|
return /* @__PURE__ */ _jsxS("div", {
|
|
5700
5723
|
...props.attributes,
|
|
5701
5724
|
children: /* @__PURE__ */ _jsxC(ContentVariants, {
|
|
5725
|
+
isNestedRender: true,
|
|
5702
5726
|
get apiVersion() {
|
|
5703
5727
|
return props.builderContext.apiVersion;
|
|
5704
5728
|
},
|
|
@@ -5770,6 +5794,7 @@ const Symbol$1 = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props)
|
|
|
5770
5794
|
props,
|
|
5771
5795
|
state
|
|
5772
5796
|
], "{...p0.symbol?.data,...p0.builderContext.localState,...p1.contentToUse?.data?.state}"),
|
|
5797
|
+
isNestedRender: _IMMUTABLE,
|
|
5773
5798
|
linkComponent: _fnSignal((p0) => p0.builderLinkComponent, [
|
|
5774
5799
|
props
|
|
5775
5800
|
], "p0.builderLinkComponent"),
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@ import { BuilderContextInterface } from "../../../context/types.js";
|
|
|
2
2
|
import { BuilderContent } from "../../../types/builder-content.js";
|
|
3
3
|
import { Dictionary } from "../../../types/typescript.js";
|
|
4
4
|
import { ContentProps } from "../content.types.js";
|
|
5
|
-
type BuilderEditorProps = Omit<ContentProps, "customComponents" | "apiVersion" | "isSsrAbTest" | "blocksWrapper" | "blocksWrapperProps"> & {
|
|
5
|
+
type BuilderEditorProps = Omit<ContentProps, "customComponents" | "apiVersion" | "isSsrAbTest" | "blocksWrapper" | "blocksWrapperProps" | "isNestedRender"> & {
|
|
6
6
|
builderContextSignal: BuilderContextInterface;
|
|
7
7
|
setBuilderContextSignal?: (signal: any) => any;
|
|
8
8
|
children?: any;
|
|
@@ -13,3 +13,4 @@ export declare const getCss: ({ cssCode, contentId }: {
|
|
|
13
13
|
cssCode?: string | undefined;
|
|
14
14
|
contentId?: string | undefined;
|
|
15
15
|
}) => string;
|
|
16
|
+
export declare const getDefaultStyles: (isNested: boolean | undefined) => "" | "\n.builder-button {\n all: unset;\n}\n\n.builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {\n margin: 0;\n}\n.builder-text > p, .builder-text > .builder-paragraph {\n color: inherit;\n line-height: inherit;\n letter-spacing: inherit;\n font-weight: inherit;\n font-size: inherit;\n text-align: inherit;\n font-family: inherit;\n}\n";
|
|
@@ -8,5 +8,10 @@ interface InternalRenderProps {
|
|
|
8
8
|
* This is in a separate file so that we can override it (most notably in Vue,
|
|
9
9
|
* where prop types cannot be wrapped by generics like `EnforcePartials`).
|
|
10
10
|
*/
|
|
11
|
-
export type ContentProps = InternalRenderProps & EnforcePartials<ContentVariantsPrps
|
|
11
|
+
export type ContentProps = InternalRenderProps & EnforcePartials<ContentVariantsPrps> & {
|
|
12
|
+
/**
|
|
13
|
+
* For internal use only. Do not provide this prop.
|
|
14
|
+
*/
|
|
15
|
+
isNestedRender?: boolean;
|
|
16
|
+
};
|
|
12
17
|
export {};
|
|
@@ -3,7 +3,7 @@ type VariantsProviderProps = ContentVariantsPrps & {
|
|
|
3
3
|
/**
|
|
4
4
|
* For internal use only. Do not provide this prop.
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
isNestedRender?: boolean;
|
|
7
7
|
};
|
|
8
8
|
export declare const ContentVariants: import("@builder.io/qwik").Component<VariantsProviderProps>;
|
|
9
9
|
export default ContentVariants;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.14.
|
|
1
|
+
export declare const SDK_VERSION = "0.14.8";
|