@builder.io/sdk-solid 4.0.10 → 4.1.0
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/dev.js +14 -1
- package/lib/browser/dev.jsx +47 -35
- package/lib/browser/index.js +14 -1
- package/lib/browser/index.jsx +47 -35
- package/lib/edge/dev.js +14 -1
- package/lib/edge/dev.jsx +47 -35
- package/lib/edge/index.js +14 -1
- package/lib/edge/index.jsx +47 -35
- package/lib/node/dev.js +14 -1
- package/lib/node/dev.jsx +47 -35
- package/lib/node/index.js +14 -1
- package/lib/node/index.jsx +47 -35
- package/package.json +1 -1
package/lib/browser/dev.js
CHANGED
|
@@ -5100,6 +5100,16 @@ var componentInfo19 = {
|
|
|
5100
5100
|
};
|
|
5101
5101
|
var _tmpl$20 = /* @__PURE__ */ template(`<img>`);
|
|
5102
5102
|
function ImgComponent(props) {
|
|
5103
|
+
const srcSetToUse = createMemo(() => {
|
|
5104
|
+
const url = props.imgSrc || props.image;
|
|
5105
|
+
if (!url || typeof url !== "string") {
|
|
5106
|
+
return void 0;
|
|
5107
|
+
}
|
|
5108
|
+
if (!url.match(/builder\.io/)) {
|
|
5109
|
+
return void 0;
|
|
5110
|
+
}
|
|
5111
|
+
return getSrcSet(url);
|
|
5112
|
+
});
|
|
5103
5113
|
return (() => {
|
|
5104
5114
|
const _el$ = _tmpl$20();
|
|
5105
5115
|
spread(_el$, mergeProps({
|
|
@@ -5117,6 +5127,9 @@ function ImgComponent(props) {
|
|
|
5117
5127
|
},
|
|
5118
5128
|
get src() {
|
|
5119
5129
|
return props.imgSrc || props.image;
|
|
5130
|
+
},
|
|
5131
|
+
get srcSet() {
|
|
5132
|
+
return srcSetToUse();
|
|
5120
5133
|
}
|
|
5121
5134
|
}, {}, () => props.attributes), false, false);
|
|
5122
5135
|
return _el$;
|
|
@@ -5488,7 +5501,7 @@ function getPreviewContent(_searchParams) {
|
|
|
5488
5501
|
}
|
|
5489
5502
|
|
|
5490
5503
|
// src/constants/sdk-version.ts
|
|
5491
|
-
var SDK_VERSION = "4.0
|
|
5504
|
+
var SDK_VERSION = "4.1.0";
|
|
5492
5505
|
|
|
5493
5506
|
// src/helpers/sdk-headers.ts
|
|
5494
5507
|
var getSdkHeaders = () => ({
|
package/lib/browser/dev.jsx
CHANGED
|
@@ -1982,10 +1982,10 @@ function SectionComponent(props) {
|
|
|
1982
1982
|
var section_default = SectionComponent;
|
|
1983
1983
|
|
|
1984
1984
|
// src/blocks/symbol/symbol.tsx
|
|
1985
|
-
import { onMount as onMount10, on as on9, createEffect as createEffect9, createMemo as
|
|
1985
|
+
import { onMount as onMount10, on as on9, createEffect as createEffect9, createMemo as createMemo21, createSignal as createSignal21 } from "solid-js";
|
|
1986
1986
|
|
|
1987
1987
|
// src/components/content-variants/content-variants.tsx
|
|
1988
|
-
import { Show as Show16, For as For9, onMount as onMount9, createSignal as
|
|
1988
|
+
import { Show as Show16, For as For9, onMount as onMount9, createSignal as createSignal20, createMemo as createMemo20 } from "solid-js";
|
|
1989
1989
|
|
|
1990
1990
|
// src/blocks/personalization-container/helpers/inlined-fns.ts
|
|
1991
1991
|
function filterWithCustomTargeting(userAttributes, query, startDate, endDate) {
|
|
@@ -2408,7 +2408,7 @@ var getDefaultCanTrack = (canTrack) => {
|
|
|
2408
2408
|
};
|
|
2409
2409
|
|
|
2410
2410
|
// src/components/content/content.tsx
|
|
2411
|
-
import { Show as Show15, createSignal as
|
|
2411
|
+
import { Show as Show15, createSignal as createSignal19 } from "solid-js";
|
|
2412
2412
|
|
|
2413
2413
|
// src/blocks/accordion/component-info.ts
|
|
2414
2414
|
var defaultTitle = {
|
|
@@ -4604,7 +4604,18 @@ var componentInfo19 = {
|
|
|
4604
4604
|
};
|
|
4605
4605
|
|
|
4606
4606
|
// src/blocks/img/img.tsx
|
|
4607
|
+
import { createMemo as createMemo15 } from "solid-js";
|
|
4607
4608
|
function ImgComponent(props) {
|
|
4609
|
+
const srcSetToUse = createMemo15(() => {
|
|
4610
|
+
const url = props.imgSrc || props.image;
|
|
4611
|
+
if (!url || typeof url !== "string") {
|
|
4612
|
+
return void 0;
|
|
4613
|
+
}
|
|
4614
|
+
if (!url.match(/builder\.io/)) {
|
|
4615
|
+
return void 0;
|
|
4616
|
+
}
|
|
4617
|
+
return getSrcSet(url);
|
|
4618
|
+
});
|
|
4608
4619
|
return <><img
|
|
4609
4620
|
style={{
|
|
4610
4621
|
"object-fit": props.backgroundSize || "cover",
|
|
@@ -4613,6 +4624,7 @@ function ImgComponent(props) {
|
|
|
4613
4624
|
key={isEditing() && props.imgSrc || "default-key"}
|
|
4614
4625
|
alt={props.altText}
|
|
4615
4626
|
src={props.imgSrc || props.image}
|
|
4627
|
+
srcSet={srcSetToUse()}
|
|
4616
4628
|
{...{}}
|
|
4617
4629
|
{...props.attributes}
|
|
4618
4630
|
/></>;
|
|
@@ -4707,10 +4719,10 @@ var componentInfo20 = {
|
|
|
4707
4719
|
};
|
|
4708
4720
|
|
|
4709
4721
|
// src/blocks/video/video.tsx
|
|
4710
|
-
import { Show as Show13, onMount as onMount7, createSignal as
|
|
4722
|
+
import { Show as Show13, onMount as onMount7, createSignal as createSignal16, createMemo as createMemo16 } from "solid-js";
|
|
4711
4723
|
function Video(props) {
|
|
4712
|
-
const [lazyVideoObserver, setLazyVideoObserver] =
|
|
4713
|
-
const videoProps =
|
|
4724
|
+
const [lazyVideoObserver, setLazyVideoObserver] = createSignal16(void 0);
|
|
4725
|
+
const videoProps = createMemo16(() => {
|
|
4714
4726
|
return {
|
|
4715
4727
|
...props.autoPlay === true ? {
|
|
4716
4728
|
autoPlay: true
|
|
@@ -4729,7 +4741,7 @@ function Video(props) {
|
|
|
4729
4741
|
} : {}
|
|
4730
4742
|
};
|
|
4731
4743
|
});
|
|
4732
|
-
const spreadProps =
|
|
4744
|
+
const spreadProps = createMemo16(() => {
|
|
4733
4745
|
return {
|
|
4734
4746
|
...videoProps()
|
|
4735
4747
|
};
|
|
@@ -4969,8 +4981,8 @@ import {
|
|
|
4969
4981
|
onMount as onMount8,
|
|
4970
4982
|
on as on8,
|
|
4971
4983
|
createEffect as createEffect8,
|
|
4972
|
-
createMemo as
|
|
4973
|
-
createSignal as
|
|
4984
|
+
createMemo as createMemo17,
|
|
4985
|
+
createSignal as createSignal17
|
|
4974
4986
|
} from "solid-js";
|
|
4975
4987
|
import { Dynamic as Dynamic5 } from "solid-js/web";
|
|
4976
4988
|
|
|
@@ -4980,7 +4992,7 @@ function getPreviewContent(_searchParams) {
|
|
|
4980
4992
|
}
|
|
4981
4993
|
|
|
4982
4994
|
// src/constants/sdk-version.ts
|
|
4983
|
-
var SDK_VERSION = "4.0
|
|
4995
|
+
var SDK_VERSION = "4.1.0";
|
|
4984
4996
|
|
|
4985
4997
|
// src/helpers/sdk-headers.ts
|
|
4986
4998
|
var getSdkHeaders = () => ({
|
|
@@ -5841,13 +5853,13 @@ var getWrapperClassName = (variationId) => {
|
|
|
5841
5853
|
|
|
5842
5854
|
// src/components/content/components/enable-editor.tsx
|
|
5843
5855
|
function EnableEditor(props) {
|
|
5844
|
-
const [hasExecuted, setHasExecuted] =
|
|
5845
|
-
const [ContentWrapper, setContentWrapper] =
|
|
5856
|
+
const [hasExecuted, setHasExecuted] = createSignal17(false);
|
|
5857
|
+
const [ContentWrapper, setContentWrapper] = createSignal17(
|
|
5846
5858
|
props.contentWrapper || "div"
|
|
5847
5859
|
);
|
|
5848
|
-
const [httpReqsData, setHttpReqsData] =
|
|
5849
|
-
const [httpReqsPending, setHttpReqsPending] =
|
|
5850
|
-
const [clicked, setClicked] =
|
|
5860
|
+
const [httpReqsData, setHttpReqsData] = createSignal17({});
|
|
5861
|
+
const [httpReqsPending, setHttpReqsPending] = createSignal17({});
|
|
5862
|
+
const [clicked, setClicked] = createSignal17(false);
|
|
5851
5863
|
function mergeNewRootState(newData) {
|
|
5852
5864
|
const combinedState = {
|
|
5853
5865
|
...props.builderContextSignal.rootState,
|
|
@@ -5881,7 +5893,7 @@ function EnableEditor(props) {
|
|
|
5881
5893
|
content: newContentValue
|
|
5882
5894
|
}));
|
|
5883
5895
|
}
|
|
5884
|
-
const showContentProps =
|
|
5896
|
+
const showContentProps = createMemo17(() => {
|
|
5885
5897
|
return props.showContent ? {} : {
|
|
5886
5898
|
hidden: true,
|
|
5887
5899
|
"aria-hidden": true
|
|
@@ -6066,14 +6078,14 @@ function EnableEditor(props) {
|
|
|
6066
6078
|
}
|
|
6067
6079
|
}
|
|
6068
6080
|
});
|
|
6069
|
-
const onUpdateFn_0_props_content =
|
|
6081
|
+
const onUpdateFn_0_props_content = createMemo17(() => props.content);
|
|
6070
6082
|
function onUpdateFn_0() {
|
|
6071
6083
|
if (props.content) {
|
|
6072
6084
|
mergeNewContent(props.content);
|
|
6073
6085
|
}
|
|
6074
6086
|
}
|
|
6075
6087
|
createEffect8(on8(() => [onUpdateFn_0_props_content()], onUpdateFn_0));
|
|
6076
|
-
const onUpdateFn_1_props_builderContextSignal_rootState =
|
|
6088
|
+
const onUpdateFn_1_props_builderContextSignal_rootState = createMemo17(
|
|
6077
6089
|
() => props.builderContextSignal.rootState
|
|
6078
6090
|
);
|
|
6079
6091
|
function onUpdateFn_1() {
|
|
@@ -6085,14 +6097,14 @@ function EnableEditor(props) {
|
|
|
6085
6097
|
onUpdateFn_1
|
|
6086
6098
|
)
|
|
6087
6099
|
);
|
|
6088
|
-
const onUpdateFn_2_props_data =
|
|
6100
|
+
const onUpdateFn_2_props_data = createMemo17(() => props.data);
|
|
6089
6101
|
function onUpdateFn_2() {
|
|
6090
6102
|
if (props.data) {
|
|
6091
6103
|
mergeNewRootState(props.data);
|
|
6092
6104
|
}
|
|
6093
6105
|
}
|
|
6094
6106
|
createEffect8(on8(() => [onUpdateFn_2_props_data()], onUpdateFn_2));
|
|
6095
|
-
const onUpdateFn_3_props_locale =
|
|
6107
|
+
const onUpdateFn_3_props_locale = createMemo17(() => props.locale);
|
|
6096
6108
|
function onUpdateFn_3() {
|
|
6097
6109
|
if (props.locale) {
|
|
6098
6110
|
mergeNewRootState({
|
|
@@ -6124,9 +6136,9 @@ function EnableEditor(props) {
|
|
|
6124
6136
|
var Enable_editor_default = EnableEditor;
|
|
6125
6137
|
|
|
6126
6138
|
// src/components/content/components/styles.tsx
|
|
6127
|
-
import { createSignal as
|
|
6139
|
+
import { createSignal as createSignal18 } from "solid-js";
|
|
6128
6140
|
function ContentStyles(props) {
|
|
6129
|
-
const [injectedStyles, setInjectedStyles] =
|
|
6141
|
+
const [injectedStyles, setInjectedStyles] = createSignal18(
|
|
6130
6142
|
`
|
|
6131
6143
|
${getCss({
|
|
6132
6144
|
cssCode: props.cssCode,
|
|
@@ -6184,7 +6196,7 @@ var getContentInitialValue = ({
|
|
|
6184
6196
|
|
|
6185
6197
|
// src/components/content/content.tsx
|
|
6186
6198
|
function ContentComponent(props) {
|
|
6187
|
-
const [scriptStr, setScriptStr] =
|
|
6199
|
+
const [scriptStr, setScriptStr] = createSignal19(
|
|
6188
6200
|
getUpdateVariantVisibilityScript({
|
|
6189
6201
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
6190
6202
|
variationId: props.content?.testVariationId,
|
|
@@ -6192,7 +6204,7 @@ function ContentComponent(props) {
|
|
|
6192
6204
|
contentId: props.content?.id
|
|
6193
6205
|
})
|
|
6194
6206
|
);
|
|
6195
|
-
const [registeredComponents, setRegisteredComponents] =
|
|
6207
|
+
const [registeredComponents, setRegisteredComponents] = createSignal19(
|
|
6196
6208
|
[
|
|
6197
6209
|
...getDefaultRegisteredComponents(),
|
|
6198
6210
|
...props.customComponents || []
|
|
@@ -6207,7 +6219,7 @@ function ContentComponent(props) {
|
|
|
6207
6219
|
{}
|
|
6208
6220
|
)
|
|
6209
6221
|
);
|
|
6210
|
-
const [builderContextSignal, setBuilderContextSignal] =
|
|
6222
|
+
const [builderContextSignal, setBuilderContextSignal] = createSignal19({
|
|
6211
6223
|
content: getContentInitialValue({
|
|
6212
6224
|
content: props.content,
|
|
6213
6225
|
data: props.data
|
|
@@ -6315,13 +6327,13 @@ var Content_default = ContentComponent;
|
|
|
6315
6327
|
|
|
6316
6328
|
// src/components/content-variants/content-variants.tsx
|
|
6317
6329
|
function ContentVariants(props) {
|
|
6318
|
-
const [shouldRenderVariants, setShouldRenderVariants] =
|
|
6330
|
+
const [shouldRenderVariants, setShouldRenderVariants] = createSignal20(
|
|
6319
6331
|
checkShouldRenderVariants2({
|
|
6320
6332
|
canTrack: getDefaultCanTrack(props.canTrack),
|
|
6321
6333
|
content: props.content
|
|
6322
6334
|
})
|
|
6323
6335
|
);
|
|
6324
|
-
const updateCookieAndStylesScriptStr =
|
|
6336
|
+
const updateCookieAndStylesScriptStr = createMemo20(() => {
|
|
6325
6337
|
return getUpdateCookieAndStylesScript(
|
|
6326
6338
|
getVariants(props.content).map((value) => ({
|
|
6327
6339
|
id: value.testVariationId,
|
|
@@ -6330,10 +6342,10 @@ function ContentVariants(props) {
|
|
|
6330
6342
|
props.content?.id || ""
|
|
6331
6343
|
);
|
|
6332
6344
|
});
|
|
6333
|
-
const hideVariantsStyleString =
|
|
6345
|
+
const hideVariantsStyleString = createMemo20(() => {
|
|
6334
6346
|
return getVariants(props.content).map((value) => `.variant-${value.testVariationId} { display: none; } `).join("");
|
|
6335
6347
|
});
|
|
6336
|
-
const defaultContent =
|
|
6348
|
+
const defaultContent = createMemo20(() => {
|
|
6337
6349
|
return shouldRenderVariants() ? {
|
|
6338
6350
|
...props.content,
|
|
6339
6351
|
testVariationId: props.content?.id
|
|
@@ -6452,15 +6464,15 @@ var fetchSymbolContent = async ({
|
|
|
6452
6464
|
|
|
6453
6465
|
// src/blocks/symbol/symbol.tsx
|
|
6454
6466
|
function Symbol(props) {
|
|
6455
|
-
const [contentToUse, setContentToUse] =
|
|
6456
|
-
const [symbolEntry, setSymbolEntry] =
|
|
6457
|
-
const blocksWrapper =
|
|
6467
|
+
const [contentToUse, setContentToUse] = createSignal21(props.symbol?.content);
|
|
6468
|
+
const [symbolEntry, setSymbolEntry] = createSignal21(props.symbol?.entry);
|
|
6469
|
+
const blocksWrapper = createMemo21(() => {
|
|
6458
6470
|
return "div";
|
|
6459
6471
|
});
|
|
6460
|
-
const contentWrapper =
|
|
6472
|
+
const contentWrapper = createMemo21(() => {
|
|
6461
6473
|
return "div";
|
|
6462
6474
|
});
|
|
6463
|
-
const className =
|
|
6475
|
+
const className = createMemo21(() => {
|
|
6464
6476
|
return [
|
|
6465
6477
|
...[props.attributes[getClassPropName()]],
|
|
6466
6478
|
"builder-symbol",
|
|
@@ -6483,7 +6495,7 @@ function Symbol(props) {
|
|
|
6483
6495
|
}
|
|
6484
6496
|
onMount10(() => {
|
|
6485
6497
|
});
|
|
6486
|
-
const onUpdateFn_0_props_symbol =
|
|
6498
|
+
const onUpdateFn_0_props_symbol = createMemo21(() => props.symbol);
|
|
6487
6499
|
function onUpdateFn_0() {
|
|
6488
6500
|
setContent();
|
|
6489
6501
|
}
|
package/lib/browser/index.js
CHANGED
|
@@ -5088,6 +5088,16 @@ var componentInfo19 = {
|
|
|
5088
5088
|
};
|
|
5089
5089
|
var _tmpl$20 = /* @__PURE__ */ template(`<img>`);
|
|
5090
5090
|
function ImgComponent(props) {
|
|
5091
|
+
const srcSetToUse = createMemo(() => {
|
|
5092
|
+
const url = props.imgSrc || props.image;
|
|
5093
|
+
if (!url || typeof url !== "string") {
|
|
5094
|
+
return void 0;
|
|
5095
|
+
}
|
|
5096
|
+
if (!url.match(/builder\.io/)) {
|
|
5097
|
+
return void 0;
|
|
5098
|
+
}
|
|
5099
|
+
return getSrcSet(url);
|
|
5100
|
+
});
|
|
5091
5101
|
return (() => {
|
|
5092
5102
|
const _el$ = _tmpl$20();
|
|
5093
5103
|
spread(_el$, mergeProps({
|
|
@@ -5105,6 +5115,9 @@ function ImgComponent(props) {
|
|
|
5105
5115
|
},
|
|
5106
5116
|
get src() {
|
|
5107
5117
|
return props.imgSrc || props.image;
|
|
5118
|
+
},
|
|
5119
|
+
get srcSet() {
|
|
5120
|
+
return srcSetToUse();
|
|
5108
5121
|
}
|
|
5109
5122
|
}, {}, () => props.attributes), false, false);
|
|
5110
5123
|
return _el$;
|
|
@@ -5475,7 +5488,7 @@ function getPreviewContent(_searchParams) {
|
|
|
5475
5488
|
}
|
|
5476
5489
|
|
|
5477
5490
|
// src/constants/sdk-version.ts
|
|
5478
|
-
var SDK_VERSION = "4.0
|
|
5491
|
+
var SDK_VERSION = "4.1.0";
|
|
5479
5492
|
|
|
5480
5493
|
// src/helpers/sdk-headers.ts
|
|
5481
5494
|
var getSdkHeaders = () => ({
|
package/lib/browser/index.jsx
CHANGED
|
@@ -1974,10 +1974,10 @@ function SectionComponent(props) {
|
|
|
1974
1974
|
var section_default = SectionComponent;
|
|
1975
1975
|
|
|
1976
1976
|
// src/blocks/symbol/symbol.tsx
|
|
1977
|
-
import { onMount as onMount10, on as on9, createEffect as createEffect9, createMemo as
|
|
1977
|
+
import { onMount as onMount10, on as on9, createEffect as createEffect9, createMemo as createMemo21, createSignal as createSignal21 } from "solid-js";
|
|
1978
1978
|
|
|
1979
1979
|
// src/components/content-variants/content-variants.tsx
|
|
1980
|
-
import { Show as Show16, For as For9, onMount as onMount9, createSignal as
|
|
1980
|
+
import { Show as Show16, For as For9, onMount as onMount9, createSignal as createSignal20, createMemo as createMemo20 } from "solid-js";
|
|
1981
1981
|
|
|
1982
1982
|
// src/blocks/personalization-container/helpers/inlined-fns.ts
|
|
1983
1983
|
function filterWithCustomTargeting(userAttributes, query, startDate, endDate) {
|
|
@@ -2400,7 +2400,7 @@ var getDefaultCanTrack = (canTrack) => {
|
|
|
2400
2400
|
};
|
|
2401
2401
|
|
|
2402
2402
|
// src/components/content/content.tsx
|
|
2403
|
-
import { Show as Show15, createSignal as
|
|
2403
|
+
import { Show as Show15, createSignal as createSignal19 } from "solid-js";
|
|
2404
2404
|
|
|
2405
2405
|
// src/blocks/accordion/component-info.ts
|
|
2406
2406
|
var defaultTitle = {
|
|
@@ -4594,7 +4594,18 @@ var componentInfo19 = {
|
|
|
4594
4594
|
};
|
|
4595
4595
|
|
|
4596
4596
|
// src/blocks/img/img.tsx
|
|
4597
|
+
import { createMemo as createMemo15 } from "solid-js";
|
|
4597
4598
|
function ImgComponent(props) {
|
|
4599
|
+
const srcSetToUse = createMemo15(() => {
|
|
4600
|
+
const url = props.imgSrc || props.image;
|
|
4601
|
+
if (!url || typeof url !== "string") {
|
|
4602
|
+
return void 0;
|
|
4603
|
+
}
|
|
4604
|
+
if (!url.match(/builder\.io/)) {
|
|
4605
|
+
return void 0;
|
|
4606
|
+
}
|
|
4607
|
+
return getSrcSet(url);
|
|
4608
|
+
});
|
|
4598
4609
|
return <><img
|
|
4599
4610
|
style={{
|
|
4600
4611
|
"object-fit": props.backgroundSize || "cover",
|
|
@@ -4603,6 +4614,7 @@ function ImgComponent(props) {
|
|
|
4603
4614
|
key={isEditing() && props.imgSrc || "default-key"}
|
|
4604
4615
|
alt={props.altText}
|
|
4605
4616
|
src={props.imgSrc || props.image}
|
|
4617
|
+
srcSet={srcSetToUse()}
|
|
4606
4618
|
{...{}}
|
|
4607
4619
|
{...props.attributes}
|
|
4608
4620
|
/></>;
|
|
@@ -4697,10 +4709,10 @@ var componentInfo20 = {
|
|
|
4697
4709
|
};
|
|
4698
4710
|
|
|
4699
4711
|
// src/blocks/video/video.tsx
|
|
4700
|
-
import { Show as Show13, onMount as onMount7, createSignal as
|
|
4712
|
+
import { Show as Show13, onMount as onMount7, createSignal as createSignal16, createMemo as createMemo16 } from "solid-js";
|
|
4701
4713
|
function Video(props) {
|
|
4702
|
-
const [lazyVideoObserver, setLazyVideoObserver] =
|
|
4703
|
-
const videoProps =
|
|
4714
|
+
const [lazyVideoObserver, setLazyVideoObserver] = createSignal16(void 0);
|
|
4715
|
+
const videoProps = createMemo16(() => {
|
|
4704
4716
|
return {
|
|
4705
4717
|
...props.autoPlay === true ? {
|
|
4706
4718
|
autoPlay: true
|
|
@@ -4719,7 +4731,7 @@ function Video(props) {
|
|
|
4719
4731
|
} : {}
|
|
4720
4732
|
};
|
|
4721
4733
|
});
|
|
4722
|
-
const spreadProps =
|
|
4734
|
+
const spreadProps = createMemo16(() => {
|
|
4723
4735
|
return {
|
|
4724
4736
|
...videoProps()
|
|
4725
4737
|
};
|
|
@@ -4958,8 +4970,8 @@ import {
|
|
|
4958
4970
|
onMount as onMount8,
|
|
4959
4971
|
on as on8,
|
|
4960
4972
|
createEffect as createEffect8,
|
|
4961
|
-
createMemo as
|
|
4962
|
-
createSignal as
|
|
4973
|
+
createMemo as createMemo17,
|
|
4974
|
+
createSignal as createSignal17
|
|
4963
4975
|
} from "solid-js";
|
|
4964
4976
|
import { Dynamic as Dynamic5 } from "solid-js/web";
|
|
4965
4977
|
|
|
@@ -4969,7 +4981,7 @@ function getPreviewContent(_searchParams) {
|
|
|
4969
4981
|
}
|
|
4970
4982
|
|
|
4971
4983
|
// src/constants/sdk-version.ts
|
|
4972
|
-
var SDK_VERSION = "4.0
|
|
4984
|
+
var SDK_VERSION = "4.1.0";
|
|
4973
4985
|
|
|
4974
4986
|
// src/helpers/sdk-headers.ts
|
|
4975
4987
|
var getSdkHeaders = () => ({
|
|
@@ -5824,13 +5836,13 @@ var getWrapperClassName = (variationId) => {
|
|
|
5824
5836
|
|
|
5825
5837
|
// src/components/content/components/enable-editor.tsx
|
|
5826
5838
|
function EnableEditor(props) {
|
|
5827
|
-
const [hasExecuted, setHasExecuted] =
|
|
5828
|
-
const [ContentWrapper, setContentWrapper] =
|
|
5839
|
+
const [hasExecuted, setHasExecuted] = createSignal17(false);
|
|
5840
|
+
const [ContentWrapper, setContentWrapper] = createSignal17(
|
|
5829
5841
|
props.contentWrapper || "div"
|
|
5830
5842
|
);
|
|
5831
|
-
const [httpReqsData, setHttpReqsData] =
|
|
5832
|
-
const [httpReqsPending, setHttpReqsPending] =
|
|
5833
|
-
const [clicked, setClicked] =
|
|
5843
|
+
const [httpReqsData, setHttpReqsData] = createSignal17({});
|
|
5844
|
+
const [httpReqsPending, setHttpReqsPending] = createSignal17({});
|
|
5845
|
+
const [clicked, setClicked] = createSignal17(false);
|
|
5834
5846
|
function mergeNewRootState(newData) {
|
|
5835
5847
|
const combinedState = {
|
|
5836
5848
|
...props.builderContextSignal.rootState,
|
|
@@ -5864,7 +5876,7 @@ function EnableEditor(props) {
|
|
|
5864
5876
|
content: newContentValue
|
|
5865
5877
|
}));
|
|
5866
5878
|
}
|
|
5867
|
-
const showContentProps =
|
|
5879
|
+
const showContentProps = createMemo17(() => {
|
|
5868
5880
|
return props.showContent ? {} : {
|
|
5869
5881
|
hidden: true,
|
|
5870
5882
|
"aria-hidden": true
|
|
@@ -6048,14 +6060,14 @@ function EnableEditor(props) {
|
|
|
6048
6060
|
}
|
|
6049
6061
|
}
|
|
6050
6062
|
});
|
|
6051
|
-
const onUpdateFn_0_props_content =
|
|
6063
|
+
const onUpdateFn_0_props_content = createMemo17(() => props.content);
|
|
6052
6064
|
function onUpdateFn_0() {
|
|
6053
6065
|
if (props.content) {
|
|
6054
6066
|
mergeNewContent(props.content);
|
|
6055
6067
|
}
|
|
6056
6068
|
}
|
|
6057
6069
|
createEffect8(on8(() => [onUpdateFn_0_props_content()], onUpdateFn_0));
|
|
6058
|
-
const onUpdateFn_1_props_builderContextSignal_rootState =
|
|
6070
|
+
const onUpdateFn_1_props_builderContextSignal_rootState = createMemo17(
|
|
6059
6071
|
() => props.builderContextSignal.rootState
|
|
6060
6072
|
);
|
|
6061
6073
|
function onUpdateFn_1() {
|
|
@@ -6067,14 +6079,14 @@ function EnableEditor(props) {
|
|
|
6067
6079
|
onUpdateFn_1
|
|
6068
6080
|
)
|
|
6069
6081
|
);
|
|
6070
|
-
const onUpdateFn_2_props_data =
|
|
6082
|
+
const onUpdateFn_2_props_data = createMemo17(() => props.data);
|
|
6071
6083
|
function onUpdateFn_2() {
|
|
6072
6084
|
if (props.data) {
|
|
6073
6085
|
mergeNewRootState(props.data);
|
|
6074
6086
|
}
|
|
6075
6087
|
}
|
|
6076
6088
|
createEffect8(on8(() => [onUpdateFn_2_props_data()], onUpdateFn_2));
|
|
6077
|
-
const onUpdateFn_3_props_locale =
|
|
6089
|
+
const onUpdateFn_3_props_locale = createMemo17(() => props.locale);
|
|
6078
6090
|
function onUpdateFn_3() {
|
|
6079
6091
|
if (props.locale) {
|
|
6080
6092
|
mergeNewRootState({
|
|
@@ -6106,9 +6118,9 @@ function EnableEditor(props) {
|
|
|
6106
6118
|
var Enable_editor_default = EnableEditor;
|
|
6107
6119
|
|
|
6108
6120
|
// src/components/content/components/styles.tsx
|
|
6109
|
-
import { createSignal as
|
|
6121
|
+
import { createSignal as createSignal18 } from "solid-js";
|
|
6110
6122
|
function ContentStyles(props) {
|
|
6111
|
-
const [injectedStyles, setInjectedStyles] =
|
|
6123
|
+
const [injectedStyles, setInjectedStyles] = createSignal18(
|
|
6112
6124
|
`
|
|
6113
6125
|
${getCss({
|
|
6114
6126
|
cssCode: props.cssCode,
|
|
@@ -6166,7 +6178,7 @@ var getContentInitialValue = ({
|
|
|
6166
6178
|
|
|
6167
6179
|
// src/components/content/content.tsx
|
|
6168
6180
|
function ContentComponent(props) {
|
|
6169
|
-
const [scriptStr, setScriptStr] =
|
|
6181
|
+
const [scriptStr, setScriptStr] = createSignal19(
|
|
6170
6182
|
getUpdateVariantVisibilityScript({
|
|
6171
6183
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
6172
6184
|
variationId: props.content?.testVariationId,
|
|
@@ -6174,7 +6186,7 @@ function ContentComponent(props) {
|
|
|
6174
6186
|
contentId: props.content?.id
|
|
6175
6187
|
})
|
|
6176
6188
|
);
|
|
6177
|
-
const [registeredComponents, setRegisteredComponents] =
|
|
6189
|
+
const [registeredComponents, setRegisteredComponents] = createSignal19(
|
|
6178
6190
|
[
|
|
6179
6191
|
...getDefaultRegisteredComponents(),
|
|
6180
6192
|
...props.customComponents || []
|
|
@@ -6189,7 +6201,7 @@ function ContentComponent(props) {
|
|
|
6189
6201
|
{}
|
|
6190
6202
|
)
|
|
6191
6203
|
);
|
|
6192
|
-
const [builderContextSignal, setBuilderContextSignal] =
|
|
6204
|
+
const [builderContextSignal, setBuilderContextSignal] = createSignal19({
|
|
6193
6205
|
content: getContentInitialValue({
|
|
6194
6206
|
content: props.content,
|
|
6195
6207
|
data: props.data
|
|
@@ -6297,13 +6309,13 @@ var Content_default = ContentComponent;
|
|
|
6297
6309
|
|
|
6298
6310
|
// src/components/content-variants/content-variants.tsx
|
|
6299
6311
|
function ContentVariants(props) {
|
|
6300
|
-
const [shouldRenderVariants, setShouldRenderVariants] =
|
|
6312
|
+
const [shouldRenderVariants, setShouldRenderVariants] = createSignal20(
|
|
6301
6313
|
checkShouldRenderVariants2({
|
|
6302
6314
|
canTrack: getDefaultCanTrack(props.canTrack),
|
|
6303
6315
|
content: props.content
|
|
6304
6316
|
})
|
|
6305
6317
|
);
|
|
6306
|
-
const updateCookieAndStylesScriptStr =
|
|
6318
|
+
const updateCookieAndStylesScriptStr = createMemo20(() => {
|
|
6307
6319
|
return getUpdateCookieAndStylesScript(
|
|
6308
6320
|
getVariants(props.content).map((value) => ({
|
|
6309
6321
|
id: value.testVariationId,
|
|
@@ -6312,10 +6324,10 @@ function ContentVariants(props) {
|
|
|
6312
6324
|
props.content?.id || ""
|
|
6313
6325
|
);
|
|
6314
6326
|
});
|
|
6315
|
-
const hideVariantsStyleString =
|
|
6327
|
+
const hideVariantsStyleString = createMemo20(() => {
|
|
6316
6328
|
return getVariants(props.content).map((value) => `.variant-${value.testVariationId} { display: none; } `).join("");
|
|
6317
6329
|
});
|
|
6318
|
-
const defaultContent =
|
|
6330
|
+
const defaultContent = createMemo20(() => {
|
|
6319
6331
|
return shouldRenderVariants() ? {
|
|
6320
6332
|
...props.content,
|
|
6321
6333
|
testVariationId: props.content?.id
|
|
@@ -6434,15 +6446,15 @@ var fetchSymbolContent = async ({
|
|
|
6434
6446
|
|
|
6435
6447
|
// src/blocks/symbol/symbol.tsx
|
|
6436
6448
|
function Symbol(props) {
|
|
6437
|
-
const [contentToUse, setContentToUse] =
|
|
6438
|
-
const [symbolEntry, setSymbolEntry] =
|
|
6439
|
-
const blocksWrapper =
|
|
6449
|
+
const [contentToUse, setContentToUse] = createSignal21(props.symbol?.content);
|
|
6450
|
+
const [symbolEntry, setSymbolEntry] = createSignal21(props.symbol?.entry);
|
|
6451
|
+
const blocksWrapper = createMemo21(() => {
|
|
6440
6452
|
return "div";
|
|
6441
6453
|
});
|
|
6442
|
-
const contentWrapper =
|
|
6454
|
+
const contentWrapper = createMemo21(() => {
|
|
6443
6455
|
return "div";
|
|
6444
6456
|
});
|
|
6445
|
-
const className =
|
|
6457
|
+
const className = createMemo21(() => {
|
|
6446
6458
|
return [
|
|
6447
6459
|
...[props.attributes[getClassPropName()]],
|
|
6448
6460
|
"builder-symbol",
|
|
@@ -6465,7 +6477,7 @@ function Symbol(props) {
|
|
|
6465
6477
|
}
|
|
6466
6478
|
onMount10(() => {
|
|
6467
6479
|
});
|
|
6468
|
-
const onUpdateFn_0_props_symbol =
|
|
6480
|
+
const onUpdateFn_0_props_symbol = createMemo21(() => props.symbol);
|
|
6469
6481
|
function onUpdateFn_0() {
|
|
6470
6482
|
setContent();
|
|
6471
6483
|
}
|
package/lib/edge/dev.js
CHANGED
|
@@ -8281,6 +8281,16 @@ var componentInfo19 = {
|
|
|
8281
8281
|
};
|
|
8282
8282
|
var _tmpl$20 = /* @__PURE__ */ template(`<img>`);
|
|
8283
8283
|
function ImgComponent(props) {
|
|
8284
|
+
const srcSetToUse = createMemo(() => {
|
|
8285
|
+
const url = props.imgSrc || props.image;
|
|
8286
|
+
if (!url || typeof url !== "string") {
|
|
8287
|
+
return void 0;
|
|
8288
|
+
}
|
|
8289
|
+
if (!url.match(/builder\.io/)) {
|
|
8290
|
+
return void 0;
|
|
8291
|
+
}
|
|
8292
|
+
return getSrcSet(url);
|
|
8293
|
+
});
|
|
8284
8294
|
return (() => {
|
|
8285
8295
|
const _el$ = _tmpl$20();
|
|
8286
8296
|
spread(_el$, mergeProps({
|
|
@@ -8298,6 +8308,9 @@ function ImgComponent(props) {
|
|
|
8298
8308
|
},
|
|
8299
8309
|
get src() {
|
|
8300
8310
|
return props.imgSrc || props.image;
|
|
8311
|
+
},
|
|
8312
|
+
get srcSet() {
|
|
8313
|
+
return srcSetToUse();
|
|
8301
8314
|
}
|
|
8302
8315
|
}, {}, () => props.attributes), false, false);
|
|
8303
8316
|
return _el$;
|
|
@@ -8669,7 +8682,7 @@ function getPreviewContent(_searchParams) {
|
|
|
8669
8682
|
}
|
|
8670
8683
|
|
|
8671
8684
|
// src/constants/sdk-version.ts
|
|
8672
|
-
var SDK_VERSION = "4.0
|
|
8685
|
+
var SDK_VERSION = "4.1.0";
|
|
8673
8686
|
|
|
8674
8687
|
// src/helpers/sdk-headers.ts
|
|
8675
8688
|
var getSdkHeaders = () => ({
|