@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/edge/dev.jsx CHANGED
@@ -5165,10 +5165,10 @@ function SectionComponent(props) {
5165
5165
  var section_default = SectionComponent;
5166
5166
 
5167
5167
  // src/blocks/symbol/symbol.tsx
5168
- import { onMount as onMount10, on as on9, createEffect as createEffect9, createMemo as createMemo20, createSignal as createSignal20 } from "solid-js";
5168
+ import { onMount as onMount10, on as on9, createEffect as createEffect9, createMemo as createMemo21, createSignal as createSignal21 } from "solid-js";
5169
5169
 
5170
5170
  // src/components/content-variants/content-variants.tsx
5171
- import { Show as Show16, For as For9, onMount as onMount9, createSignal as createSignal19, createMemo as createMemo19 } from "solid-js";
5171
+ import { Show as Show16, For as For9, onMount as onMount9, createSignal as createSignal20, createMemo as createMemo20 } from "solid-js";
5172
5172
 
5173
5173
  // src/blocks/personalization-container/helpers/inlined-fns.ts
5174
5174
  function filterWithCustomTargeting(userAttributes, query, startDate, endDate) {
@@ -5591,7 +5591,7 @@ var getDefaultCanTrack = (canTrack) => {
5591
5591
  };
5592
5592
 
5593
5593
  // src/components/content/content.tsx
5594
- import { Show as Show15, createSignal as createSignal18 } from "solid-js";
5594
+ import { Show as Show15, createSignal as createSignal19 } from "solid-js";
5595
5595
 
5596
5596
  // src/blocks/accordion/component-info.ts
5597
5597
  var defaultTitle = {
@@ -7787,7 +7787,18 @@ var componentInfo19 = {
7787
7787
  };
7788
7788
 
7789
7789
  // src/blocks/img/img.tsx
7790
+ import { createMemo as createMemo15 } from "solid-js";
7790
7791
  function ImgComponent(props) {
7792
+ const srcSetToUse = createMemo15(() => {
7793
+ const url = props.imgSrc || props.image;
7794
+ if (!url || typeof url !== "string") {
7795
+ return void 0;
7796
+ }
7797
+ if (!url.match(/builder\.io/)) {
7798
+ return void 0;
7799
+ }
7800
+ return getSrcSet(url);
7801
+ });
7791
7802
  return <><img
7792
7803
  style={{
7793
7804
  "object-fit": props.backgroundSize || "cover",
@@ -7796,6 +7807,7 @@ function ImgComponent(props) {
7796
7807
  key={isEditing() && props.imgSrc || "default-key"}
7797
7808
  alt={props.altText}
7798
7809
  src={props.imgSrc || props.image}
7810
+ srcSet={srcSetToUse()}
7799
7811
  {...{}}
7800
7812
  {...props.attributes}
7801
7813
  /></>;
@@ -7890,10 +7902,10 @@ var componentInfo20 = {
7890
7902
  };
7891
7903
 
7892
7904
  // src/blocks/video/video.tsx
7893
- import { Show as Show13, onMount as onMount7, createSignal as createSignal15, createMemo as createMemo15 } from "solid-js";
7905
+ import { Show as Show13, onMount as onMount7, createSignal as createSignal16, createMemo as createMemo16 } from "solid-js";
7894
7906
  function Video(props) {
7895
- const [lazyVideoObserver, setLazyVideoObserver] = createSignal15(void 0);
7896
- const videoProps = createMemo15(() => {
7907
+ const [lazyVideoObserver, setLazyVideoObserver] = createSignal16(void 0);
7908
+ const videoProps = createMemo16(() => {
7897
7909
  return {
7898
7910
  ...props.autoPlay === true ? {
7899
7911
  autoPlay: true
@@ -7912,7 +7924,7 @@ function Video(props) {
7912
7924
  } : {}
7913
7925
  };
7914
7926
  });
7915
- const spreadProps = createMemo15(() => {
7927
+ const spreadProps = createMemo16(() => {
7916
7928
  return {
7917
7929
  ...videoProps()
7918
7930
  };
@@ -8152,8 +8164,8 @@ import {
8152
8164
  onMount as onMount8,
8153
8165
  on as on8,
8154
8166
  createEffect as createEffect8,
8155
- createMemo as createMemo16,
8156
- createSignal as createSignal16
8167
+ createMemo as createMemo17,
8168
+ createSignal as createSignal17
8157
8169
  } from "solid-js";
8158
8170
  import { Dynamic as Dynamic5 } from "solid-js/web";
8159
8171
 
@@ -8163,7 +8175,7 @@ function getPreviewContent(_searchParams) {
8163
8175
  }
8164
8176
 
8165
8177
  // src/constants/sdk-version.ts
8166
- var SDK_VERSION = "4.0.10";
8178
+ var SDK_VERSION = "4.1.0";
8167
8179
 
8168
8180
  // src/helpers/sdk-headers.ts
8169
8181
  var getSdkHeaders = () => ({
@@ -9024,13 +9036,13 @@ var getWrapperClassName = (variationId) => {
9024
9036
 
9025
9037
  // src/components/content/components/enable-editor.tsx
9026
9038
  function EnableEditor(props) {
9027
- const [hasExecuted, setHasExecuted] = createSignal16(false);
9028
- const [ContentWrapper, setContentWrapper] = createSignal16(
9039
+ const [hasExecuted, setHasExecuted] = createSignal17(false);
9040
+ const [ContentWrapper, setContentWrapper] = createSignal17(
9029
9041
  props.contentWrapper || "div"
9030
9042
  );
9031
- const [httpReqsData, setHttpReqsData] = createSignal16({});
9032
- const [httpReqsPending, setHttpReqsPending] = createSignal16({});
9033
- const [clicked, setClicked] = createSignal16(false);
9043
+ const [httpReqsData, setHttpReqsData] = createSignal17({});
9044
+ const [httpReqsPending, setHttpReqsPending] = createSignal17({});
9045
+ const [clicked, setClicked] = createSignal17(false);
9034
9046
  function mergeNewRootState(newData) {
9035
9047
  const combinedState = {
9036
9048
  ...props.builderContextSignal.rootState,
@@ -9064,7 +9076,7 @@ function EnableEditor(props) {
9064
9076
  content: newContentValue
9065
9077
  }));
9066
9078
  }
9067
- const showContentProps = createMemo16(() => {
9079
+ const showContentProps = createMemo17(() => {
9068
9080
  return props.showContent ? {} : {
9069
9081
  hidden: true,
9070
9082
  "aria-hidden": true
@@ -9249,14 +9261,14 @@ function EnableEditor(props) {
9249
9261
  }
9250
9262
  }
9251
9263
  });
9252
- const onUpdateFn_0_props_content = createMemo16(() => props.content);
9264
+ const onUpdateFn_0_props_content = createMemo17(() => props.content);
9253
9265
  function onUpdateFn_0() {
9254
9266
  if (props.content) {
9255
9267
  mergeNewContent(props.content);
9256
9268
  }
9257
9269
  }
9258
9270
  createEffect8(on8(() => [onUpdateFn_0_props_content()], onUpdateFn_0));
9259
- const onUpdateFn_1_props_builderContextSignal_rootState = createMemo16(
9271
+ const onUpdateFn_1_props_builderContextSignal_rootState = createMemo17(
9260
9272
  () => props.builderContextSignal.rootState
9261
9273
  );
9262
9274
  function onUpdateFn_1() {
@@ -9268,14 +9280,14 @@ function EnableEditor(props) {
9268
9280
  onUpdateFn_1
9269
9281
  )
9270
9282
  );
9271
- const onUpdateFn_2_props_data = createMemo16(() => props.data);
9283
+ const onUpdateFn_2_props_data = createMemo17(() => props.data);
9272
9284
  function onUpdateFn_2() {
9273
9285
  if (props.data) {
9274
9286
  mergeNewRootState(props.data);
9275
9287
  }
9276
9288
  }
9277
9289
  createEffect8(on8(() => [onUpdateFn_2_props_data()], onUpdateFn_2));
9278
- const onUpdateFn_3_props_locale = createMemo16(() => props.locale);
9290
+ const onUpdateFn_3_props_locale = createMemo17(() => props.locale);
9279
9291
  function onUpdateFn_3() {
9280
9292
  if (props.locale) {
9281
9293
  mergeNewRootState({
@@ -9307,9 +9319,9 @@ function EnableEditor(props) {
9307
9319
  var Enable_editor_default = EnableEditor;
9308
9320
 
9309
9321
  // src/components/content/components/styles.tsx
9310
- import { createSignal as createSignal17 } from "solid-js";
9322
+ import { createSignal as createSignal18 } from "solid-js";
9311
9323
  function ContentStyles(props) {
9312
- const [injectedStyles, setInjectedStyles] = createSignal17(
9324
+ const [injectedStyles, setInjectedStyles] = createSignal18(
9313
9325
  `
9314
9326
  ${getCss({
9315
9327
  cssCode: props.cssCode,
@@ -9367,7 +9379,7 @@ var getContentInitialValue = ({
9367
9379
 
9368
9380
  // src/components/content/content.tsx
9369
9381
  function ContentComponent(props) {
9370
- const [scriptStr, setScriptStr] = createSignal18(
9382
+ const [scriptStr, setScriptStr] = createSignal19(
9371
9383
  getUpdateVariantVisibilityScript({
9372
9384
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
9373
9385
  variationId: props.content?.testVariationId,
@@ -9375,7 +9387,7 @@ function ContentComponent(props) {
9375
9387
  contentId: props.content?.id
9376
9388
  })
9377
9389
  );
9378
- const [registeredComponents, setRegisteredComponents] = createSignal18(
9390
+ const [registeredComponents, setRegisteredComponents] = createSignal19(
9379
9391
  [
9380
9392
  ...getDefaultRegisteredComponents(),
9381
9393
  ...props.customComponents || []
@@ -9390,7 +9402,7 @@ function ContentComponent(props) {
9390
9402
  {}
9391
9403
  )
9392
9404
  );
9393
- const [builderContextSignal, setBuilderContextSignal] = createSignal18({
9405
+ const [builderContextSignal, setBuilderContextSignal] = createSignal19({
9394
9406
  content: getContentInitialValue({
9395
9407
  content: props.content,
9396
9408
  data: props.data
@@ -9498,13 +9510,13 @@ var Content_default = ContentComponent;
9498
9510
 
9499
9511
  // src/components/content-variants/content-variants.tsx
9500
9512
  function ContentVariants(props) {
9501
- const [shouldRenderVariants, setShouldRenderVariants] = createSignal19(
9513
+ const [shouldRenderVariants, setShouldRenderVariants] = createSignal20(
9502
9514
  checkShouldRenderVariants2({
9503
9515
  canTrack: getDefaultCanTrack(props.canTrack),
9504
9516
  content: props.content
9505
9517
  })
9506
9518
  );
9507
- const updateCookieAndStylesScriptStr = createMemo19(() => {
9519
+ const updateCookieAndStylesScriptStr = createMemo20(() => {
9508
9520
  return getUpdateCookieAndStylesScript(
9509
9521
  getVariants(props.content).map((value) => ({
9510
9522
  id: value.testVariationId,
@@ -9513,10 +9525,10 @@ function ContentVariants(props) {
9513
9525
  props.content?.id || ""
9514
9526
  );
9515
9527
  });
9516
- const hideVariantsStyleString = createMemo19(() => {
9528
+ const hideVariantsStyleString = createMemo20(() => {
9517
9529
  return getVariants(props.content).map((value) => `.variant-${value.testVariationId} { display: none; } `).join("");
9518
9530
  });
9519
- const defaultContent = createMemo19(() => {
9531
+ const defaultContent = createMemo20(() => {
9520
9532
  return shouldRenderVariants() ? {
9521
9533
  ...props.content,
9522
9534
  testVariationId: props.content?.id
@@ -9635,15 +9647,15 @@ var fetchSymbolContent = async ({
9635
9647
 
9636
9648
  // src/blocks/symbol/symbol.tsx
9637
9649
  function Symbol2(props) {
9638
- const [contentToUse, setContentToUse] = createSignal20(props.symbol?.content);
9639
- const [symbolEntry, setSymbolEntry] = createSignal20(props.symbol?.entry);
9640
- const blocksWrapper = createMemo20(() => {
9650
+ const [contentToUse, setContentToUse] = createSignal21(props.symbol?.content);
9651
+ const [symbolEntry, setSymbolEntry] = createSignal21(props.symbol?.entry);
9652
+ const blocksWrapper = createMemo21(() => {
9641
9653
  return "div";
9642
9654
  });
9643
- const contentWrapper = createMemo20(() => {
9655
+ const contentWrapper = createMemo21(() => {
9644
9656
  return "div";
9645
9657
  });
9646
- const className = createMemo20(() => {
9658
+ const className = createMemo21(() => {
9647
9659
  return [
9648
9660
  ...[props.attributes[getClassPropName()]],
9649
9661
  "builder-symbol",
@@ -9666,7 +9678,7 @@ function Symbol2(props) {
9666
9678
  }
9667
9679
  onMount10(() => {
9668
9680
  });
9669
- const onUpdateFn_0_props_symbol = createMemo20(() => props.symbol);
9681
+ const onUpdateFn_0_props_symbol = createMemo21(() => props.symbol);
9670
9682
  function onUpdateFn_0() {
9671
9683
  setContent();
9672
9684
  }
package/lib/edge/index.js CHANGED
@@ -8269,6 +8269,16 @@ var componentInfo19 = {
8269
8269
  };
8270
8270
  var _tmpl$20 = /* @__PURE__ */ template(`<img>`);
8271
8271
  function ImgComponent(props) {
8272
+ const srcSetToUse = createMemo(() => {
8273
+ const url = props.imgSrc || props.image;
8274
+ if (!url || typeof url !== "string") {
8275
+ return void 0;
8276
+ }
8277
+ if (!url.match(/builder\.io/)) {
8278
+ return void 0;
8279
+ }
8280
+ return getSrcSet(url);
8281
+ });
8272
8282
  return (() => {
8273
8283
  const _el$ = _tmpl$20();
8274
8284
  spread(_el$, mergeProps({
@@ -8286,6 +8296,9 @@ function ImgComponent(props) {
8286
8296
  },
8287
8297
  get src() {
8288
8298
  return props.imgSrc || props.image;
8299
+ },
8300
+ get srcSet() {
8301
+ return srcSetToUse();
8289
8302
  }
8290
8303
  }, {}, () => props.attributes), false, false);
8291
8304
  return _el$;
@@ -8656,7 +8669,7 @@ function getPreviewContent(_searchParams) {
8656
8669
  }
8657
8670
 
8658
8671
  // src/constants/sdk-version.ts
8659
- var SDK_VERSION = "4.0.10";
8672
+ var SDK_VERSION = "4.1.0";
8660
8673
 
8661
8674
  // src/helpers/sdk-headers.ts
8662
8675
  var getSdkHeaders = () => ({
@@ -5157,10 +5157,10 @@ function SectionComponent(props) {
5157
5157
  var section_default = SectionComponent;
5158
5158
 
5159
5159
  // src/blocks/symbol/symbol.tsx
5160
- import { onMount as onMount10, on as on9, createEffect as createEffect9, createMemo as createMemo20, createSignal as createSignal20 } from "solid-js";
5160
+ import { onMount as onMount10, on as on9, createEffect as createEffect9, createMemo as createMemo21, createSignal as createSignal21 } from "solid-js";
5161
5161
 
5162
5162
  // src/components/content-variants/content-variants.tsx
5163
- import { Show as Show16, For as For9, onMount as onMount9, createSignal as createSignal19, createMemo as createMemo19 } from "solid-js";
5163
+ import { Show as Show16, For as For9, onMount as onMount9, createSignal as createSignal20, createMemo as createMemo20 } from "solid-js";
5164
5164
 
5165
5165
  // src/blocks/personalization-container/helpers/inlined-fns.ts
5166
5166
  function filterWithCustomTargeting(userAttributes, query, startDate, endDate) {
@@ -5583,7 +5583,7 @@ var getDefaultCanTrack = (canTrack) => {
5583
5583
  };
5584
5584
 
5585
5585
  // src/components/content/content.tsx
5586
- import { Show as Show15, createSignal as createSignal18 } from "solid-js";
5586
+ import { Show as Show15, createSignal as createSignal19 } from "solid-js";
5587
5587
 
5588
5588
  // src/blocks/accordion/component-info.ts
5589
5589
  var defaultTitle = {
@@ -7777,7 +7777,18 @@ var componentInfo19 = {
7777
7777
  };
7778
7778
 
7779
7779
  // src/blocks/img/img.tsx
7780
+ import { createMemo as createMemo15 } from "solid-js";
7780
7781
  function ImgComponent(props) {
7782
+ const srcSetToUse = createMemo15(() => {
7783
+ const url = props.imgSrc || props.image;
7784
+ if (!url || typeof url !== "string") {
7785
+ return void 0;
7786
+ }
7787
+ if (!url.match(/builder\.io/)) {
7788
+ return void 0;
7789
+ }
7790
+ return getSrcSet(url);
7791
+ });
7781
7792
  return <><img
7782
7793
  style={{
7783
7794
  "object-fit": props.backgroundSize || "cover",
@@ -7786,6 +7797,7 @@ function ImgComponent(props) {
7786
7797
  key={isEditing() && props.imgSrc || "default-key"}
7787
7798
  alt={props.altText}
7788
7799
  src={props.imgSrc || props.image}
7800
+ srcSet={srcSetToUse()}
7789
7801
  {...{}}
7790
7802
  {...props.attributes}
7791
7803
  /></>;
@@ -7880,10 +7892,10 @@ var componentInfo20 = {
7880
7892
  };
7881
7893
 
7882
7894
  // src/blocks/video/video.tsx
7883
- import { Show as Show13, onMount as onMount7, createSignal as createSignal15, createMemo as createMemo15 } from "solid-js";
7895
+ import { Show as Show13, onMount as onMount7, createSignal as createSignal16, createMemo as createMemo16 } from "solid-js";
7884
7896
  function Video(props) {
7885
- const [lazyVideoObserver, setLazyVideoObserver] = createSignal15(void 0);
7886
- const videoProps = createMemo15(() => {
7897
+ const [lazyVideoObserver, setLazyVideoObserver] = createSignal16(void 0);
7898
+ const videoProps = createMemo16(() => {
7887
7899
  return {
7888
7900
  ...props.autoPlay === true ? {
7889
7901
  autoPlay: true
@@ -7902,7 +7914,7 @@ function Video(props) {
7902
7914
  } : {}
7903
7915
  };
7904
7916
  });
7905
- const spreadProps = createMemo15(() => {
7917
+ const spreadProps = createMemo16(() => {
7906
7918
  return {
7907
7919
  ...videoProps()
7908
7920
  };
@@ -8141,8 +8153,8 @@ import {
8141
8153
  onMount as onMount8,
8142
8154
  on as on8,
8143
8155
  createEffect as createEffect8,
8144
- createMemo as createMemo16,
8145
- createSignal as createSignal16
8156
+ createMemo as createMemo17,
8157
+ createSignal as createSignal17
8146
8158
  } from "solid-js";
8147
8159
  import { Dynamic as Dynamic5 } from "solid-js/web";
8148
8160
 
@@ -8152,7 +8164,7 @@ function getPreviewContent(_searchParams) {
8152
8164
  }
8153
8165
 
8154
8166
  // src/constants/sdk-version.ts
8155
- var SDK_VERSION = "4.0.10";
8167
+ var SDK_VERSION = "4.1.0";
8156
8168
 
8157
8169
  // src/helpers/sdk-headers.ts
8158
8170
  var getSdkHeaders = () => ({
@@ -9007,13 +9019,13 @@ var getWrapperClassName = (variationId) => {
9007
9019
 
9008
9020
  // src/components/content/components/enable-editor.tsx
9009
9021
  function EnableEditor(props) {
9010
- const [hasExecuted, setHasExecuted] = createSignal16(false);
9011
- const [ContentWrapper, setContentWrapper] = createSignal16(
9022
+ const [hasExecuted, setHasExecuted] = createSignal17(false);
9023
+ const [ContentWrapper, setContentWrapper] = createSignal17(
9012
9024
  props.contentWrapper || "div"
9013
9025
  );
9014
- const [httpReqsData, setHttpReqsData] = createSignal16({});
9015
- const [httpReqsPending, setHttpReqsPending] = createSignal16({});
9016
- const [clicked, setClicked] = createSignal16(false);
9026
+ const [httpReqsData, setHttpReqsData] = createSignal17({});
9027
+ const [httpReqsPending, setHttpReqsPending] = createSignal17({});
9028
+ const [clicked, setClicked] = createSignal17(false);
9017
9029
  function mergeNewRootState(newData) {
9018
9030
  const combinedState = {
9019
9031
  ...props.builderContextSignal.rootState,
@@ -9047,7 +9059,7 @@ function EnableEditor(props) {
9047
9059
  content: newContentValue
9048
9060
  }));
9049
9061
  }
9050
- const showContentProps = createMemo16(() => {
9062
+ const showContentProps = createMemo17(() => {
9051
9063
  return props.showContent ? {} : {
9052
9064
  hidden: true,
9053
9065
  "aria-hidden": true
@@ -9231,14 +9243,14 @@ function EnableEditor(props) {
9231
9243
  }
9232
9244
  }
9233
9245
  });
9234
- const onUpdateFn_0_props_content = createMemo16(() => props.content);
9246
+ const onUpdateFn_0_props_content = createMemo17(() => props.content);
9235
9247
  function onUpdateFn_0() {
9236
9248
  if (props.content) {
9237
9249
  mergeNewContent(props.content);
9238
9250
  }
9239
9251
  }
9240
9252
  createEffect8(on8(() => [onUpdateFn_0_props_content()], onUpdateFn_0));
9241
- const onUpdateFn_1_props_builderContextSignal_rootState = createMemo16(
9253
+ const onUpdateFn_1_props_builderContextSignal_rootState = createMemo17(
9242
9254
  () => props.builderContextSignal.rootState
9243
9255
  );
9244
9256
  function onUpdateFn_1() {
@@ -9250,14 +9262,14 @@ function EnableEditor(props) {
9250
9262
  onUpdateFn_1
9251
9263
  )
9252
9264
  );
9253
- const onUpdateFn_2_props_data = createMemo16(() => props.data);
9265
+ const onUpdateFn_2_props_data = createMemo17(() => props.data);
9254
9266
  function onUpdateFn_2() {
9255
9267
  if (props.data) {
9256
9268
  mergeNewRootState(props.data);
9257
9269
  }
9258
9270
  }
9259
9271
  createEffect8(on8(() => [onUpdateFn_2_props_data()], onUpdateFn_2));
9260
- const onUpdateFn_3_props_locale = createMemo16(() => props.locale);
9272
+ const onUpdateFn_3_props_locale = createMemo17(() => props.locale);
9261
9273
  function onUpdateFn_3() {
9262
9274
  if (props.locale) {
9263
9275
  mergeNewRootState({
@@ -9289,9 +9301,9 @@ function EnableEditor(props) {
9289
9301
  var Enable_editor_default = EnableEditor;
9290
9302
 
9291
9303
  // src/components/content/components/styles.tsx
9292
- import { createSignal as createSignal17 } from "solid-js";
9304
+ import { createSignal as createSignal18 } from "solid-js";
9293
9305
  function ContentStyles(props) {
9294
- const [injectedStyles, setInjectedStyles] = createSignal17(
9306
+ const [injectedStyles, setInjectedStyles] = createSignal18(
9295
9307
  `
9296
9308
  ${getCss({
9297
9309
  cssCode: props.cssCode,
@@ -9349,7 +9361,7 @@ var getContentInitialValue = ({
9349
9361
 
9350
9362
  // src/components/content/content.tsx
9351
9363
  function ContentComponent(props) {
9352
- const [scriptStr, setScriptStr] = createSignal18(
9364
+ const [scriptStr, setScriptStr] = createSignal19(
9353
9365
  getUpdateVariantVisibilityScript({
9354
9366
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
9355
9367
  variationId: props.content?.testVariationId,
@@ -9357,7 +9369,7 @@ function ContentComponent(props) {
9357
9369
  contentId: props.content?.id
9358
9370
  })
9359
9371
  );
9360
- const [registeredComponents, setRegisteredComponents] = createSignal18(
9372
+ const [registeredComponents, setRegisteredComponents] = createSignal19(
9361
9373
  [
9362
9374
  ...getDefaultRegisteredComponents(),
9363
9375
  ...props.customComponents || []
@@ -9372,7 +9384,7 @@ function ContentComponent(props) {
9372
9384
  {}
9373
9385
  )
9374
9386
  );
9375
- const [builderContextSignal, setBuilderContextSignal] = createSignal18({
9387
+ const [builderContextSignal, setBuilderContextSignal] = createSignal19({
9376
9388
  content: getContentInitialValue({
9377
9389
  content: props.content,
9378
9390
  data: props.data
@@ -9480,13 +9492,13 @@ var Content_default = ContentComponent;
9480
9492
 
9481
9493
  // src/components/content-variants/content-variants.tsx
9482
9494
  function ContentVariants(props) {
9483
- const [shouldRenderVariants, setShouldRenderVariants] = createSignal19(
9495
+ const [shouldRenderVariants, setShouldRenderVariants] = createSignal20(
9484
9496
  checkShouldRenderVariants2({
9485
9497
  canTrack: getDefaultCanTrack(props.canTrack),
9486
9498
  content: props.content
9487
9499
  })
9488
9500
  );
9489
- const updateCookieAndStylesScriptStr = createMemo19(() => {
9501
+ const updateCookieAndStylesScriptStr = createMemo20(() => {
9490
9502
  return getUpdateCookieAndStylesScript(
9491
9503
  getVariants(props.content).map((value) => ({
9492
9504
  id: value.testVariationId,
@@ -9495,10 +9507,10 @@ function ContentVariants(props) {
9495
9507
  props.content?.id || ""
9496
9508
  );
9497
9509
  });
9498
- const hideVariantsStyleString = createMemo19(() => {
9510
+ const hideVariantsStyleString = createMemo20(() => {
9499
9511
  return getVariants(props.content).map((value) => `.variant-${value.testVariationId} { display: none; } `).join("");
9500
9512
  });
9501
- const defaultContent = createMemo19(() => {
9513
+ const defaultContent = createMemo20(() => {
9502
9514
  return shouldRenderVariants() ? {
9503
9515
  ...props.content,
9504
9516
  testVariationId: props.content?.id
@@ -9617,15 +9629,15 @@ var fetchSymbolContent = async ({
9617
9629
 
9618
9630
  // src/blocks/symbol/symbol.tsx
9619
9631
  function Symbol2(props) {
9620
- const [contentToUse, setContentToUse] = createSignal20(props.symbol?.content);
9621
- const [symbolEntry, setSymbolEntry] = createSignal20(props.symbol?.entry);
9622
- const blocksWrapper = createMemo20(() => {
9632
+ const [contentToUse, setContentToUse] = createSignal21(props.symbol?.content);
9633
+ const [symbolEntry, setSymbolEntry] = createSignal21(props.symbol?.entry);
9634
+ const blocksWrapper = createMemo21(() => {
9623
9635
  return "div";
9624
9636
  });
9625
- const contentWrapper = createMemo20(() => {
9637
+ const contentWrapper = createMemo21(() => {
9626
9638
  return "div";
9627
9639
  });
9628
- const className = createMemo20(() => {
9640
+ const className = createMemo21(() => {
9629
9641
  return [
9630
9642
  ...[props.attributes[getClassPropName()]],
9631
9643
  "builder-symbol",
@@ -9648,7 +9660,7 @@ function Symbol2(props) {
9648
9660
  }
9649
9661
  onMount10(() => {
9650
9662
  });
9651
- const onUpdateFn_0_props_symbol = createMemo20(() => props.symbol);
9663
+ const onUpdateFn_0_props_symbol = createMemo21(() => props.symbol);
9652
9664
  function onUpdateFn_0() {
9653
9665
  setContent();
9654
9666
  }
package/lib/node/dev.js CHANGED
@@ -5269,6 +5269,16 @@ var componentInfo19 = {
5269
5269
  };
5270
5270
  var _tmpl$20 = /* @__PURE__ */ template(`<img>`);
5271
5271
  function ImgComponent(props) {
5272
+ const srcSetToUse = createMemo(() => {
5273
+ const url = props.imgSrc || props.image;
5274
+ if (!url || typeof url !== "string") {
5275
+ return void 0;
5276
+ }
5277
+ if (!url.match(/builder\.io/)) {
5278
+ return void 0;
5279
+ }
5280
+ return getSrcSet(url);
5281
+ });
5272
5282
  return (() => {
5273
5283
  const _el$ = _tmpl$20();
5274
5284
  spread(_el$, mergeProps({
@@ -5286,6 +5296,9 @@ function ImgComponent(props) {
5286
5296
  },
5287
5297
  get src() {
5288
5298
  return props.imgSrc || props.image;
5299
+ },
5300
+ get srcSet() {
5301
+ return srcSetToUse();
5289
5302
  }
5290
5303
  }, {}, () => props.attributes), false, false);
5291
5304
  return _el$;
@@ -5657,7 +5670,7 @@ function getPreviewContent(_searchParams) {
5657
5670
  }
5658
5671
 
5659
5672
  // src/constants/sdk-version.ts
5660
- var SDK_VERSION = "4.0.10";
5673
+ var SDK_VERSION = "4.1.0";
5661
5674
 
5662
5675
  // src/helpers/sdk-headers.ts
5663
5676
  var getSdkHeaders = () => ({