@builder.io/sdk-solid 3.0.6 → 3.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -39,7 +39,6 @@ interface BuilderBlock {
39
39
  large?: Partial<CSSStyleDeclaration>;
40
40
  medium?: Partial<CSSStyleDeclaration>;
41
41
  small?: Partial<CSSStyleDeclaration>;
42
- /** @deprecated */
43
42
  xsmall?: Partial<CSSStyleDeclaration>;
44
43
  };
45
44
  component?: {
@@ -243,6 +242,7 @@ type Dictionary<T> = {
243
242
  };
244
243
 
245
244
  interface Breakpoints {
245
+ xsmall?: number;
246
246
  small: number;
247
247
  medium: number;
248
248
  }
@@ -939,8 +939,13 @@ var provideBuilderContext = (block, context) => {
939
939
 
940
940
  // src/constants/device-sizes.ts
941
941
  var SIZES = {
942
+ xsmall: {
943
+ min: 0,
944
+ default: 160,
945
+ max: 320
946
+ },
942
947
  small: {
943
- min: 320,
948
+ min: 321,
944
949
  default: 321,
945
950
  max: 640
946
951
  },
@@ -956,15 +961,28 @@ var SIZES = {
956
961
  }
957
962
  };
958
963
  var getMaxWidthQueryForSize = (size, sizeValues = SIZES) => `@media (max-width: ${sizeValues[size].max}px)`;
959
- var getSizesForBreakpoints = ({
960
- small,
961
- medium
962
- }) => {
964
+ var getSizesForBreakpoints = (breakpoints) => {
963
965
  const newSizes = fastClone(SIZES);
966
+ if (!breakpoints) {
967
+ return newSizes;
968
+ }
969
+ const {
970
+ xsmall,
971
+ small,
972
+ medium
973
+ } = breakpoints;
974
+ if (xsmall) {
975
+ const xsmallMin = Math.floor(xsmall / 2);
976
+ newSizes.xsmall = {
977
+ max: xsmall,
978
+ min: xsmallMin,
979
+ default: xsmallMin + 1
980
+ };
981
+ }
964
982
  if (!small || !medium) {
965
983
  return newSizes;
966
984
  }
967
- const smallMin = Math.floor(small / 2);
985
+ const smallMin = xsmall ? newSizes.xsmall.max + 1 : Math.floor(small / 2);
968
986
  newSizes.small = {
969
987
  max: small,
970
988
  min: smallMin,
@@ -1022,9 +1040,11 @@ function BlockStyles(props) {
1022
1040
  const styles = processedBlock.responsiveStyles;
1023
1041
  const content = props.context.content;
1024
1042
  const sizesWithUpdatedBreakpoints = getSizesForBreakpoints(content?.meta?.breakpoints || {});
1043
+ const contentHasXSmallBreakpoint = Boolean(content?.meta?.breakpoints?.xsmall);
1025
1044
  const largeStyles = styles?.large;
1026
1045
  const mediumStyles = styles?.medium;
1027
1046
  const smallStyles = styles?.small;
1047
+ const xsmallStyles = styles?.xsmall;
1028
1048
  const className = processedBlock.id;
1029
1049
  if (!className) {
1030
1050
  return "";
@@ -1043,6 +1063,11 @@ function BlockStyles(props) {
1043
1063
  styles: smallStyles,
1044
1064
  mediaQuery: getMaxWidthQueryForSize("small", sizesWithUpdatedBreakpoints)
1045
1065
  }) : "";
1066
+ const xsmallStylesClass = xsmallStyles && contentHasXSmallBreakpoint ? createCssClass({
1067
+ className,
1068
+ styles: xsmallStyles,
1069
+ mediaQuery: getMaxWidthQueryForSize("xsmall", sizesWithUpdatedBreakpoints)
1070
+ }) : "";
1046
1071
  const hoverAnimation = processedBlock.animations && processedBlock.animations.find((item) => item.trigger === "hover");
1047
1072
  let hoverStylesClass = "";
1048
1073
  if (hoverAnimation) {
@@ -1056,7 +1081,7 @@ function BlockStyles(props) {
1056
1081
  }
1057
1082
  }) || "";
1058
1083
  }
1059
- return [largeStylesClass, mediumStylesClass, smallStylesClass, hoverStylesClass].join(" ");
1084
+ return [largeStylesClass, mediumStylesClass, smallStylesClass, xsmallStylesClass, hoverStylesClass].join(" ");
1060
1085
  });
1061
1086
  return createComponent(Show, {
1062
1087
  get when() {
@@ -5283,7 +5308,7 @@ function getPreviewContent(_searchParams) {
5283
5308
  }
5284
5309
 
5285
5310
  // src/constants/sdk-version.ts
5286
- var SDK_VERSION = "3.0.6";
5311
+ var SDK_VERSION = "3.0.7";
5287
5312
 
5288
5313
  // src/helpers/sdk-headers.ts
5289
5314
  var getSdkHeaders = () => ({
@@ -5907,6 +5932,7 @@ var setupBrowserForEditing = (options = {}) => {
5907
5932
  // scope our '+ add block' button styling
5908
5933
  supportsAddBlockScoping: true,
5909
5934
  supportsCustomBreakpoints: true,
5935
+ supportsXSmallBreakpoint: TARGET === "reactNative" ? false : true,
5910
5936
  blockLevelPersonalization: true
5911
5937
  }
5912
5938
  }, "*");
@@ -935,8 +935,13 @@ import { Show as Show2, createMemo } from "solid-js";
935
935
 
936
936
  // src/constants/device-sizes.ts
937
937
  var SIZES = {
938
+ xsmall: {
939
+ min: 0,
940
+ default: 160,
941
+ max: 320
942
+ },
938
943
  small: {
939
- min: 320,
944
+ min: 321,
940
945
  default: 321,
941
946
  max: 640
942
947
  },
@@ -952,15 +957,28 @@ var SIZES = {
952
957
  }
953
958
  };
954
959
  var getMaxWidthQueryForSize = (size, sizeValues = SIZES) => `@media (max-width: ${sizeValues[size].max}px)`;
955
- var getSizesForBreakpoints = ({
956
- small,
957
- medium
958
- }) => {
960
+ var getSizesForBreakpoints = (breakpoints) => {
959
961
  const newSizes = fastClone(SIZES);
962
+ if (!breakpoints) {
963
+ return newSizes;
964
+ }
965
+ const {
966
+ xsmall,
967
+ small,
968
+ medium
969
+ } = breakpoints;
970
+ if (xsmall) {
971
+ const xsmallMin = Math.floor(xsmall / 2);
972
+ newSizes.xsmall = {
973
+ max: xsmall,
974
+ min: xsmallMin,
975
+ default: xsmallMin + 1
976
+ };
977
+ }
960
978
  if (!small || !medium) {
961
979
  return newSizes;
962
980
  }
963
- const smallMin = Math.floor(small / 2);
981
+ const smallMin = xsmall ? newSizes.xsmall.max + 1 : Math.floor(small / 2);
964
982
  newSizes.small = {
965
983
  max: small,
966
984
  min: smallMin,
@@ -1011,9 +1029,13 @@ function BlockStyles(props) {
1011
1029
  const sizesWithUpdatedBreakpoints = getSizesForBreakpoints(
1012
1030
  content?.meta?.breakpoints || {}
1013
1031
  );
1032
+ const contentHasXSmallBreakpoint = Boolean(
1033
+ content?.meta?.breakpoints?.xsmall
1034
+ );
1014
1035
  const largeStyles = styles?.large;
1015
1036
  const mediumStyles = styles?.medium;
1016
1037
  const smallStyles = styles?.small;
1038
+ const xsmallStyles = styles?.xsmall;
1017
1039
  const className = processedBlock.id;
1018
1040
  if (!className) {
1019
1041
  return "";
@@ -1038,6 +1060,14 @@ function BlockStyles(props) {
1038
1060
  sizesWithUpdatedBreakpoints
1039
1061
  )
1040
1062
  }) : "";
1063
+ const xsmallStylesClass = xsmallStyles && contentHasXSmallBreakpoint ? createCssClass({
1064
+ className,
1065
+ styles: xsmallStyles,
1066
+ mediaQuery: getMaxWidthQueryForSize(
1067
+ "xsmall",
1068
+ sizesWithUpdatedBreakpoints
1069
+ )
1070
+ }) : "";
1041
1071
  const hoverAnimation = processedBlock.animations && processedBlock.animations.find((item) => item.trigger === "hover");
1042
1072
  let hoverStylesClass = "";
1043
1073
  if (hoverAnimation) {
@@ -1057,6 +1087,7 @@ function BlockStyles(props) {
1057
1087
  largeStylesClass,
1058
1088
  mediumStylesClass,
1059
1089
  smallStylesClass,
1090
+ xsmallStylesClass,
1060
1091
  hoverStylesClass
1061
1092
  ].join(" ");
1062
1093
  });
@@ -4768,7 +4799,7 @@ function getPreviewContent(_searchParams) {
4768
4799
  }
4769
4800
 
4770
4801
  // src/constants/sdk-version.ts
4771
- var SDK_VERSION = "3.0.6";
4802
+ var SDK_VERSION = "3.0.7";
4772
4803
 
4773
4804
  // src/helpers/sdk-headers.ts
4774
4805
  var getSdkHeaders = () => ({
@@ -5392,6 +5423,7 @@ var setupBrowserForEditing = (options = {}) => {
5392
5423
  // scope our '+ add block' button styling
5393
5424
  supportsAddBlockScoping: true,
5394
5425
  supportsCustomBreakpoints: true,
5426
+ supportsXSmallBreakpoint: TARGET === "reactNative" ? false : true,
5395
5427
  blockLevelPersonalization: true
5396
5428
  }
5397
5429
  }, "*");
@@ -930,8 +930,13 @@ var provideBuilderContext = (block, context) => {
930
930
 
931
931
  // src/constants/device-sizes.ts
932
932
  var SIZES = {
933
+ xsmall: {
934
+ min: 0,
935
+ default: 160,
936
+ max: 320
937
+ },
933
938
  small: {
934
- min: 320,
939
+ min: 321,
935
940
  default: 321,
936
941
  max: 640
937
942
  },
@@ -947,15 +952,28 @@ var SIZES = {
947
952
  }
948
953
  };
949
954
  var getMaxWidthQueryForSize = (size, sizeValues = SIZES) => `@media (max-width: ${sizeValues[size].max}px)`;
950
- var getSizesForBreakpoints = ({
951
- small,
952
- medium
953
- }) => {
955
+ var getSizesForBreakpoints = (breakpoints) => {
954
956
  const newSizes = fastClone(SIZES);
957
+ if (!breakpoints) {
958
+ return newSizes;
959
+ }
960
+ const {
961
+ xsmall,
962
+ small,
963
+ medium
964
+ } = breakpoints;
965
+ if (xsmall) {
966
+ const xsmallMin = Math.floor(xsmall / 2);
967
+ newSizes.xsmall = {
968
+ max: xsmall,
969
+ min: xsmallMin,
970
+ default: xsmallMin + 1
971
+ };
972
+ }
955
973
  if (!small || !medium) {
956
974
  return newSizes;
957
975
  }
958
- const smallMin = Math.floor(small / 2);
976
+ const smallMin = xsmall ? newSizes.xsmall.max + 1 : Math.floor(small / 2);
959
977
  newSizes.small = {
960
978
  max: small,
961
979
  min: smallMin,
@@ -1013,9 +1031,11 @@ function BlockStyles(props) {
1013
1031
  const styles = processedBlock.responsiveStyles;
1014
1032
  const content = props.context.content;
1015
1033
  const sizesWithUpdatedBreakpoints = getSizesForBreakpoints(content?.meta?.breakpoints || {});
1034
+ const contentHasXSmallBreakpoint = Boolean(content?.meta?.breakpoints?.xsmall);
1016
1035
  const largeStyles = styles?.large;
1017
1036
  const mediumStyles = styles?.medium;
1018
1037
  const smallStyles = styles?.small;
1038
+ const xsmallStyles = styles?.xsmall;
1019
1039
  const className = processedBlock.id;
1020
1040
  if (!className) {
1021
1041
  return "";
@@ -1034,6 +1054,11 @@ function BlockStyles(props) {
1034
1054
  styles: smallStyles,
1035
1055
  mediaQuery: getMaxWidthQueryForSize("small", sizesWithUpdatedBreakpoints)
1036
1056
  }) : "";
1057
+ const xsmallStylesClass = xsmallStyles && contentHasXSmallBreakpoint ? createCssClass({
1058
+ className,
1059
+ styles: xsmallStyles,
1060
+ mediaQuery: getMaxWidthQueryForSize("xsmall", sizesWithUpdatedBreakpoints)
1061
+ }) : "";
1037
1062
  const hoverAnimation = processedBlock.animations && processedBlock.animations.find((item) => item.trigger === "hover");
1038
1063
  let hoverStylesClass = "";
1039
1064
  if (hoverAnimation) {
@@ -1047,7 +1072,7 @@ function BlockStyles(props) {
1047
1072
  }
1048
1073
  }) || "";
1049
1074
  }
1050
- return [largeStylesClass, mediumStylesClass, smallStylesClass, hoverStylesClass].join(" ");
1075
+ return [largeStylesClass, mediumStylesClass, smallStylesClass, xsmallStylesClass, hoverStylesClass].join(" ");
1051
1076
  });
1052
1077
  return createComponent(Show, {
1053
1078
  get when() {
@@ -5270,7 +5295,7 @@ function getPreviewContent(_searchParams) {
5270
5295
  }
5271
5296
 
5272
5297
  // src/constants/sdk-version.ts
5273
- var SDK_VERSION = "3.0.6";
5298
+ var SDK_VERSION = "3.0.7";
5274
5299
 
5275
5300
  // src/helpers/sdk-headers.ts
5276
5301
  var getSdkHeaders = () => ({
@@ -5888,6 +5913,7 @@ var setupBrowserForEditing = (options = {}) => {
5888
5913
  // scope our '+ add block' button styling
5889
5914
  supportsAddBlockScoping: true,
5890
5915
  supportsCustomBreakpoints: true,
5916
+ supportsXSmallBreakpoint: TARGET === "reactNative" ? false : true,
5891
5917
  blockLevelPersonalization: true
5892
5918
  }
5893
5919
  }, "*");
@@ -928,8 +928,13 @@ import { Show as Show2, createMemo } from "solid-js";
928
928
 
929
929
  // src/constants/device-sizes.ts
930
930
  var SIZES = {
931
+ xsmall: {
932
+ min: 0,
933
+ default: 160,
934
+ max: 320
935
+ },
931
936
  small: {
932
- min: 320,
937
+ min: 321,
933
938
  default: 321,
934
939
  max: 640
935
940
  },
@@ -945,15 +950,28 @@ var SIZES = {
945
950
  }
946
951
  };
947
952
  var getMaxWidthQueryForSize = (size, sizeValues = SIZES) => `@media (max-width: ${sizeValues[size].max}px)`;
948
- var getSizesForBreakpoints = ({
949
- small,
950
- medium
951
- }) => {
953
+ var getSizesForBreakpoints = (breakpoints) => {
952
954
  const newSizes = fastClone(SIZES);
955
+ if (!breakpoints) {
956
+ return newSizes;
957
+ }
958
+ const {
959
+ xsmall,
960
+ small,
961
+ medium
962
+ } = breakpoints;
963
+ if (xsmall) {
964
+ const xsmallMin = Math.floor(xsmall / 2);
965
+ newSizes.xsmall = {
966
+ max: xsmall,
967
+ min: xsmallMin,
968
+ default: xsmallMin + 1
969
+ };
970
+ }
953
971
  if (!small || !medium) {
954
972
  return newSizes;
955
973
  }
956
- const smallMin = Math.floor(small / 2);
974
+ const smallMin = xsmall ? newSizes.xsmall.max + 1 : Math.floor(small / 2);
957
975
  newSizes.small = {
958
976
  max: small,
959
977
  min: smallMin,
@@ -1004,9 +1022,13 @@ function BlockStyles(props) {
1004
1022
  const sizesWithUpdatedBreakpoints = getSizesForBreakpoints(
1005
1023
  content?.meta?.breakpoints || {}
1006
1024
  );
1025
+ const contentHasXSmallBreakpoint = Boolean(
1026
+ content?.meta?.breakpoints?.xsmall
1027
+ );
1007
1028
  const largeStyles = styles?.large;
1008
1029
  const mediumStyles = styles?.medium;
1009
1030
  const smallStyles = styles?.small;
1031
+ const xsmallStyles = styles?.xsmall;
1010
1032
  const className = processedBlock.id;
1011
1033
  if (!className) {
1012
1034
  return "";
@@ -1031,6 +1053,14 @@ function BlockStyles(props) {
1031
1053
  sizesWithUpdatedBreakpoints
1032
1054
  )
1033
1055
  }) : "";
1056
+ const xsmallStylesClass = xsmallStyles && contentHasXSmallBreakpoint ? createCssClass({
1057
+ className,
1058
+ styles: xsmallStyles,
1059
+ mediaQuery: getMaxWidthQueryForSize(
1060
+ "xsmall",
1061
+ sizesWithUpdatedBreakpoints
1062
+ )
1063
+ }) : "";
1034
1064
  const hoverAnimation = processedBlock.animations && processedBlock.animations.find((item) => item.trigger === "hover");
1035
1065
  let hoverStylesClass = "";
1036
1066
  if (hoverAnimation) {
@@ -1050,6 +1080,7 @@ function BlockStyles(props) {
1050
1080
  largeStylesClass,
1051
1081
  mediumStylesClass,
1052
1082
  smallStylesClass,
1083
+ xsmallStylesClass,
1053
1084
  hoverStylesClass
1054
1085
  ].join(" ");
1055
1086
  });
@@ -4757,7 +4788,7 @@ function getPreviewContent(_searchParams) {
4757
4788
  }
4758
4789
 
4759
4790
  // src/constants/sdk-version.ts
4760
- var SDK_VERSION = "3.0.6";
4791
+ var SDK_VERSION = "3.0.7";
4761
4792
 
4762
4793
  // src/helpers/sdk-headers.ts
4763
4794
  var getSdkHeaders = () => ({
@@ -5375,6 +5406,7 @@ var setupBrowserForEditing = (options = {}) => {
5375
5406
  // scope our '+ add block' button styling
5376
5407
  supportsAddBlockScoping: true,
5377
5408
  supportsCustomBreakpoints: true,
5409
+ supportsXSmallBreakpoint: TARGET === "reactNative" ? false : true,
5378
5410
  blockLevelPersonalization: true
5379
5411
  }
5380
5412
  }, "*");
package/lib/edge/dev.js CHANGED
@@ -4120,8 +4120,13 @@ var provideBuilderContext = (block, context) => {
4120
4120
 
4121
4121
  // src/constants/device-sizes.ts
4122
4122
  var SIZES = {
4123
+ xsmall: {
4124
+ min: 0,
4125
+ default: 160,
4126
+ max: 320
4127
+ },
4123
4128
  small: {
4124
- min: 320,
4129
+ min: 321,
4125
4130
  default: 321,
4126
4131
  max: 640
4127
4132
  },
@@ -4137,15 +4142,28 @@ var SIZES = {
4137
4142
  }
4138
4143
  };
4139
4144
  var getMaxWidthQueryForSize = (size, sizeValues = SIZES) => `@media (max-width: ${sizeValues[size].max}px)`;
4140
- var getSizesForBreakpoints = ({
4141
- small,
4142
- medium
4143
- }) => {
4145
+ var getSizesForBreakpoints = (breakpoints) => {
4144
4146
  const newSizes = fastClone(SIZES);
4147
+ if (!breakpoints) {
4148
+ return newSizes;
4149
+ }
4150
+ const {
4151
+ xsmall,
4152
+ small,
4153
+ medium
4154
+ } = breakpoints;
4155
+ if (xsmall) {
4156
+ const xsmallMin = Math.floor(xsmall / 2);
4157
+ newSizes.xsmall = {
4158
+ max: xsmall,
4159
+ min: xsmallMin,
4160
+ default: xsmallMin + 1
4161
+ };
4162
+ }
4145
4163
  if (!small || !medium) {
4146
4164
  return newSizes;
4147
4165
  }
4148
- const smallMin = Math.floor(small / 2);
4166
+ const smallMin = xsmall ? newSizes.xsmall.max + 1 : Math.floor(small / 2);
4149
4167
  newSizes.small = {
4150
4168
  max: small,
4151
4169
  min: smallMin,
@@ -4203,9 +4221,11 @@ function BlockStyles(props) {
4203
4221
  const styles = processedBlock.responsiveStyles;
4204
4222
  const content = props.context.content;
4205
4223
  const sizesWithUpdatedBreakpoints = getSizesForBreakpoints(content?.meta?.breakpoints || {});
4224
+ const contentHasXSmallBreakpoint = Boolean(content?.meta?.breakpoints?.xsmall);
4206
4225
  const largeStyles = styles?.large;
4207
4226
  const mediumStyles = styles?.medium;
4208
4227
  const smallStyles = styles?.small;
4228
+ const xsmallStyles = styles?.xsmall;
4209
4229
  const className = processedBlock.id;
4210
4230
  if (!className) {
4211
4231
  return "";
@@ -4224,6 +4244,11 @@ function BlockStyles(props) {
4224
4244
  styles: smallStyles,
4225
4245
  mediaQuery: getMaxWidthQueryForSize("small", sizesWithUpdatedBreakpoints)
4226
4246
  }) : "";
4247
+ const xsmallStylesClass = xsmallStyles && contentHasXSmallBreakpoint ? createCssClass({
4248
+ className,
4249
+ styles: xsmallStyles,
4250
+ mediaQuery: getMaxWidthQueryForSize("xsmall", sizesWithUpdatedBreakpoints)
4251
+ }) : "";
4227
4252
  const hoverAnimation = processedBlock.animations && processedBlock.animations.find((item) => item.trigger === "hover");
4228
4253
  let hoverStylesClass = "";
4229
4254
  if (hoverAnimation) {
@@ -4237,7 +4262,7 @@ function BlockStyles(props) {
4237
4262
  }
4238
4263
  }) || "";
4239
4264
  }
4240
- return [largeStylesClass, mediumStylesClass, smallStylesClass, hoverStylesClass].join(" ");
4265
+ return [largeStylesClass, mediumStylesClass, smallStylesClass, xsmallStylesClass, hoverStylesClass].join(" ");
4241
4266
  });
4242
4267
  return createComponent(Show, {
4243
4268
  get when() {
@@ -8464,7 +8489,7 @@ function getPreviewContent(_searchParams) {
8464
8489
  }
8465
8490
 
8466
8491
  // src/constants/sdk-version.ts
8467
- var SDK_VERSION = "3.0.6";
8492
+ var SDK_VERSION = "3.0.7";
8468
8493
 
8469
8494
  // src/helpers/sdk-headers.ts
8470
8495
  var getSdkHeaders = () => ({
@@ -9088,6 +9113,7 @@ var setupBrowserForEditing = (options = {}) => {
9088
9113
  // scope our '+ add block' button styling
9089
9114
  supportsAddBlockScoping: true,
9090
9115
  supportsCustomBreakpoints: true,
9116
+ supportsXSmallBreakpoint: TARGET === "reactNative" ? false : true,
9091
9117
  blockLevelPersonalization: true
9092
9118
  }
9093
9119
  }, "*");
package/lib/edge/dev.jsx CHANGED
@@ -4118,8 +4118,13 @@ import { Show as Show2, createMemo } from "solid-js";
4118
4118
 
4119
4119
  // src/constants/device-sizes.ts
4120
4120
  var SIZES = {
4121
+ xsmall: {
4122
+ min: 0,
4123
+ default: 160,
4124
+ max: 320
4125
+ },
4121
4126
  small: {
4122
- min: 320,
4127
+ min: 321,
4123
4128
  default: 321,
4124
4129
  max: 640
4125
4130
  },
@@ -4135,15 +4140,28 @@ var SIZES = {
4135
4140
  }
4136
4141
  };
4137
4142
  var getMaxWidthQueryForSize = (size, sizeValues = SIZES) => `@media (max-width: ${sizeValues[size].max}px)`;
4138
- var getSizesForBreakpoints = ({
4139
- small,
4140
- medium
4141
- }) => {
4143
+ var getSizesForBreakpoints = (breakpoints) => {
4142
4144
  const newSizes = fastClone(SIZES);
4145
+ if (!breakpoints) {
4146
+ return newSizes;
4147
+ }
4148
+ const {
4149
+ xsmall,
4150
+ small,
4151
+ medium
4152
+ } = breakpoints;
4153
+ if (xsmall) {
4154
+ const xsmallMin = Math.floor(xsmall / 2);
4155
+ newSizes.xsmall = {
4156
+ max: xsmall,
4157
+ min: xsmallMin,
4158
+ default: xsmallMin + 1
4159
+ };
4160
+ }
4143
4161
  if (!small || !medium) {
4144
4162
  return newSizes;
4145
4163
  }
4146
- const smallMin = Math.floor(small / 2);
4164
+ const smallMin = xsmall ? newSizes.xsmall.max + 1 : Math.floor(small / 2);
4147
4165
  newSizes.small = {
4148
4166
  max: small,
4149
4167
  min: smallMin,
@@ -4194,9 +4212,13 @@ function BlockStyles(props) {
4194
4212
  const sizesWithUpdatedBreakpoints = getSizesForBreakpoints(
4195
4213
  content?.meta?.breakpoints || {}
4196
4214
  );
4215
+ const contentHasXSmallBreakpoint = Boolean(
4216
+ content?.meta?.breakpoints?.xsmall
4217
+ );
4197
4218
  const largeStyles = styles?.large;
4198
4219
  const mediumStyles = styles?.medium;
4199
4220
  const smallStyles = styles?.small;
4221
+ const xsmallStyles = styles?.xsmall;
4200
4222
  const className = processedBlock.id;
4201
4223
  if (!className) {
4202
4224
  return "";
@@ -4221,6 +4243,14 @@ function BlockStyles(props) {
4221
4243
  sizesWithUpdatedBreakpoints
4222
4244
  )
4223
4245
  }) : "";
4246
+ const xsmallStylesClass = xsmallStyles && contentHasXSmallBreakpoint ? createCssClass({
4247
+ className,
4248
+ styles: xsmallStyles,
4249
+ mediaQuery: getMaxWidthQueryForSize(
4250
+ "xsmall",
4251
+ sizesWithUpdatedBreakpoints
4252
+ )
4253
+ }) : "";
4224
4254
  const hoverAnimation = processedBlock.animations && processedBlock.animations.find((item) => item.trigger === "hover");
4225
4255
  let hoverStylesClass = "";
4226
4256
  if (hoverAnimation) {
@@ -4240,6 +4270,7 @@ function BlockStyles(props) {
4240
4270
  largeStylesClass,
4241
4271
  mediumStylesClass,
4242
4272
  smallStylesClass,
4273
+ xsmallStylesClass,
4243
4274
  hoverStylesClass
4244
4275
  ].join(" ");
4245
4276
  });
@@ -7951,7 +7982,7 @@ function getPreviewContent(_searchParams) {
7951
7982
  }
7952
7983
 
7953
7984
  // src/constants/sdk-version.ts
7954
- var SDK_VERSION = "3.0.6";
7985
+ var SDK_VERSION = "3.0.7";
7955
7986
 
7956
7987
  // src/helpers/sdk-headers.ts
7957
7988
  var getSdkHeaders = () => ({
@@ -8575,6 +8606,7 @@ var setupBrowserForEditing = (options = {}) => {
8575
8606
  // scope our '+ add block' button styling
8576
8607
  supportsAddBlockScoping: true,
8577
8608
  supportsCustomBreakpoints: true,
8609
+ supportsXSmallBreakpoint: TARGET === "reactNative" ? false : true,
8578
8610
  blockLevelPersonalization: true
8579
8611
  }
8580
8612
  }, "*");
package/lib/edge/index.js CHANGED
@@ -4111,8 +4111,13 @@ var provideBuilderContext = (block, context) => {
4111
4111
 
4112
4112
  // src/constants/device-sizes.ts
4113
4113
  var SIZES = {
4114
+ xsmall: {
4115
+ min: 0,
4116
+ default: 160,
4117
+ max: 320
4118
+ },
4114
4119
  small: {
4115
- min: 320,
4120
+ min: 321,
4116
4121
  default: 321,
4117
4122
  max: 640
4118
4123
  },
@@ -4128,15 +4133,28 @@ var SIZES = {
4128
4133
  }
4129
4134
  };
4130
4135
  var getMaxWidthQueryForSize = (size, sizeValues = SIZES) => `@media (max-width: ${sizeValues[size].max}px)`;
4131
- var getSizesForBreakpoints = ({
4132
- small,
4133
- medium
4134
- }) => {
4136
+ var getSizesForBreakpoints = (breakpoints) => {
4135
4137
  const newSizes = fastClone(SIZES);
4138
+ if (!breakpoints) {
4139
+ return newSizes;
4140
+ }
4141
+ const {
4142
+ xsmall,
4143
+ small,
4144
+ medium
4145
+ } = breakpoints;
4146
+ if (xsmall) {
4147
+ const xsmallMin = Math.floor(xsmall / 2);
4148
+ newSizes.xsmall = {
4149
+ max: xsmall,
4150
+ min: xsmallMin,
4151
+ default: xsmallMin + 1
4152
+ };
4153
+ }
4136
4154
  if (!small || !medium) {
4137
4155
  return newSizes;
4138
4156
  }
4139
- const smallMin = Math.floor(small / 2);
4157
+ const smallMin = xsmall ? newSizes.xsmall.max + 1 : Math.floor(small / 2);
4140
4158
  newSizes.small = {
4141
4159
  max: small,
4142
4160
  min: smallMin,
@@ -4194,9 +4212,11 @@ function BlockStyles(props) {
4194
4212
  const styles = processedBlock.responsiveStyles;
4195
4213
  const content = props.context.content;
4196
4214
  const sizesWithUpdatedBreakpoints = getSizesForBreakpoints(content?.meta?.breakpoints || {});
4215
+ const contentHasXSmallBreakpoint = Boolean(content?.meta?.breakpoints?.xsmall);
4197
4216
  const largeStyles = styles?.large;
4198
4217
  const mediumStyles = styles?.medium;
4199
4218
  const smallStyles = styles?.small;
4219
+ const xsmallStyles = styles?.xsmall;
4200
4220
  const className = processedBlock.id;
4201
4221
  if (!className) {
4202
4222
  return "";
@@ -4215,6 +4235,11 @@ function BlockStyles(props) {
4215
4235
  styles: smallStyles,
4216
4236
  mediaQuery: getMaxWidthQueryForSize("small", sizesWithUpdatedBreakpoints)
4217
4237
  }) : "";
4238
+ const xsmallStylesClass = xsmallStyles && contentHasXSmallBreakpoint ? createCssClass({
4239
+ className,
4240
+ styles: xsmallStyles,
4241
+ mediaQuery: getMaxWidthQueryForSize("xsmall", sizesWithUpdatedBreakpoints)
4242
+ }) : "";
4218
4243
  const hoverAnimation = processedBlock.animations && processedBlock.animations.find((item) => item.trigger === "hover");
4219
4244
  let hoverStylesClass = "";
4220
4245
  if (hoverAnimation) {
@@ -4228,7 +4253,7 @@ function BlockStyles(props) {
4228
4253
  }
4229
4254
  }) || "";
4230
4255
  }
4231
- return [largeStylesClass, mediumStylesClass, smallStylesClass, hoverStylesClass].join(" ");
4256
+ return [largeStylesClass, mediumStylesClass, smallStylesClass, xsmallStylesClass, hoverStylesClass].join(" ");
4232
4257
  });
4233
4258
  return createComponent(Show, {
4234
4259
  get when() {
@@ -8451,7 +8476,7 @@ function getPreviewContent(_searchParams) {
8451
8476
  }
8452
8477
 
8453
8478
  // src/constants/sdk-version.ts
8454
- var SDK_VERSION = "3.0.6";
8479
+ var SDK_VERSION = "3.0.7";
8455
8480
 
8456
8481
  // src/helpers/sdk-headers.ts
8457
8482
  var getSdkHeaders = () => ({
@@ -9069,6 +9094,7 @@ var setupBrowserForEditing = (options = {}) => {
9069
9094
  // scope our '+ add block' button styling
9070
9095
  supportsAddBlockScoping: true,
9071
9096
  supportsCustomBreakpoints: true,
9097
+ supportsXSmallBreakpoint: TARGET === "reactNative" ? false : true,
9072
9098
  blockLevelPersonalization: true
9073
9099
  }
9074
9100
  }, "*");
@@ -4111,8 +4111,13 @@ import { Show as Show2, createMemo } from "solid-js";
4111
4111
 
4112
4112
  // src/constants/device-sizes.ts
4113
4113
  var SIZES = {
4114
+ xsmall: {
4115
+ min: 0,
4116
+ default: 160,
4117
+ max: 320
4118
+ },
4114
4119
  small: {
4115
- min: 320,
4120
+ min: 321,
4116
4121
  default: 321,
4117
4122
  max: 640
4118
4123
  },
@@ -4128,15 +4133,28 @@ var SIZES = {
4128
4133
  }
4129
4134
  };
4130
4135
  var getMaxWidthQueryForSize = (size, sizeValues = SIZES) => `@media (max-width: ${sizeValues[size].max}px)`;
4131
- var getSizesForBreakpoints = ({
4132
- small,
4133
- medium
4134
- }) => {
4136
+ var getSizesForBreakpoints = (breakpoints) => {
4135
4137
  const newSizes = fastClone(SIZES);
4138
+ if (!breakpoints) {
4139
+ return newSizes;
4140
+ }
4141
+ const {
4142
+ xsmall,
4143
+ small,
4144
+ medium
4145
+ } = breakpoints;
4146
+ if (xsmall) {
4147
+ const xsmallMin = Math.floor(xsmall / 2);
4148
+ newSizes.xsmall = {
4149
+ max: xsmall,
4150
+ min: xsmallMin,
4151
+ default: xsmallMin + 1
4152
+ };
4153
+ }
4136
4154
  if (!small || !medium) {
4137
4155
  return newSizes;
4138
4156
  }
4139
- const smallMin = Math.floor(small / 2);
4157
+ const smallMin = xsmall ? newSizes.xsmall.max + 1 : Math.floor(small / 2);
4140
4158
  newSizes.small = {
4141
4159
  max: small,
4142
4160
  min: smallMin,
@@ -4187,9 +4205,13 @@ function BlockStyles(props) {
4187
4205
  const sizesWithUpdatedBreakpoints = getSizesForBreakpoints(
4188
4206
  content?.meta?.breakpoints || {}
4189
4207
  );
4208
+ const contentHasXSmallBreakpoint = Boolean(
4209
+ content?.meta?.breakpoints?.xsmall
4210
+ );
4190
4211
  const largeStyles = styles?.large;
4191
4212
  const mediumStyles = styles?.medium;
4192
4213
  const smallStyles = styles?.small;
4214
+ const xsmallStyles = styles?.xsmall;
4193
4215
  const className = processedBlock.id;
4194
4216
  if (!className) {
4195
4217
  return "";
@@ -4214,6 +4236,14 @@ function BlockStyles(props) {
4214
4236
  sizesWithUpdatedBreakpoints
4215
4237
  )
4216
4238
  }) : "";
4239
+ const xsmallStylesClass = xsmallStyles && contentHasXSmallBreakpoint ? createCssClass({
4240
+ className,
4241
+ styles: xsmallStyles,
4242
+ mediaQuery: getMaxWidthQueryForSize(
4243
+ "xsmall",
4244
+ sizesWithUpdatedBreakpoints
4245
+ )
4246
+ }) : "";
4217
4247
  const hoverAnimation = processedBlock.animations && processedBlock.animations.find((item) => item.trigger === "hover");
4218
4248
  let hoverStylesClass = "";
4219
4249
  if (hoverAnimation) {
@@ -4233,6 +4263,7 @@ function BlockStyles(props) {
4233
4263
  largeStylesClass,
4234
4264
  mediumStylesClass,
4235
4265
  smallStylesClass,
4266
+ xsmallStylesClass,
4236
4267
  hoverStylesClass
4237
4268
  ].join(" ");
4238
4269
  });
@@ -7940,7 +7971,7 @@ function getPreviewContent(_searchParams) {
7940
7971
  }
7941
7972
 
7942
7973
  // src/constants/sdk-version.ts
7943
- var SDK_VERSION = "3.0.6";
7974
+ var SDK_VERSION = "3.0.7";
7944
7975
 
7945
7976
  // src/helpers/sdk-headers.ts
7946
7977
  var getSdkHeaders = () => ({
@@ -8558,6 +8589,7 @@ var setupBrowserForEditing = (options = {}) => {
8558
8589
  // scope our '+ add block' button styling
8559
8590
  supportsAddBlockScoping: true,
8560
8591
  supportsCustomBreakpoints: true,
8592
+ supportsXSmallBreakpoint: TARGET === "reactNative" ? false : true,
8561
8593
  blockLevelPersonalization: true
8562
8594
  }
8563
8595
  }, "*");
package/lib/node/dev.js CHANGED
@@ -1108,8 +1108,13 @@ var provideBuilderContext = (block, context) => {
1108
1108
 
1109
1109
  // src/constants/device-sizes.ts
1110
1110
  var SIZES = {
1111
+ xsmall: {
1112
+ min: 0,
1113
+ default: 160,
1114
+ max: 320
1115
+ },
1111
1116
  small: {
1112
- min: 320,
1117
+ min: 321,
1113
1118
  default: 321,
1114
1119
  max: 640
1115
1120
  },
@@ -1125,15 +1130,28 @@ var SIZES = {
1125
1130
  }
1126
1131
  };
1127
1132
  var getMaxWidthQueryForSize = (size, sizeValues = SIZES) => `@media (max-width: ${sizeValues[size].max}px)`;
1128
- var getSizesForBreakpoints = ({
1129
- small,
1130
- medium
1131
- }) => {
1133
+ var getSizesForBreakpoints = (breakpoints) => {
1132
1134
  const newSizes = fastClone(SIZES);
1135
+ if (!breakpoints) {
1136
+ return newSizes;
1137
+ }
1138
+ const {
1139
+ xsmall,
1140
+ small,
1141
+ medium
1142
+ } = breakpoints;
1143
+ if (xsmall) {
1144
+ const xsmallMin = Math.floor(xsmall / 2);
1145
+ newSizes.xsmall = {
1146
+ max: xsmall,
1147
+ min: xsmallMin,
1148
+ default: xsmallMin + 1
1149
+ };
1150
+ }
1133
1151
  if (!small || !medium) {
1134
1152
  return newSizes;
1135
1153
  }
1136
- const smallMin = Math.floor(small / 2);
1154
+ const smallMin = xsmall ? newSizes.xsmall.max + 1 : Math.floor(small / 2);
1137
1155
  newSizes.small = {
1138
1156
  max: small,
1139
1157
  min: smallMin,
@@ -1191,9 +1209,11 @@ function BlockStyles(props) {
1191
1209
  const styles = processedBlock.responsiveStyles;
1192
1210
  const content = props.context.content;
1193
1211
  const sizesWithUpdatedBreakpoints = getSizesForBreakpoints(content?.meta?.breakpoints || {});
1212
+ const contentHasXSmallBreakpoint = Boolean(content?.meta?.breakpoints?.xsmall);
1194
1213
  const largeStyles = styles?.large;
1195
1214
  const mediumStyles = styles?.medium;
1196
1215
  const smallStyles = styles?.small;
1216
+ const xsmallStyles = styles?.xsmall;
1197
1217
  const className = processedBlock.id;
1198
1218
  if (!className) {
1199
1219
  return "";
@@ -1212,6 +1232,11 @@ function BlockStyles(props) {
1212
1232
  styles: smallStyles,
1213
1233
  mediaQuery: getMaxWidthQueryForSize("small", sizesWithUpdatedBreakpoints)
1214
1234
  }) : "";
1235
+ const xsmallStylesClass = xsmallStyles && contentHasXSmallBreakpoint ? createCssClass({
1236
+ className,
1237
+ styles: xsmallStyles,
1238
+ mediaQuery: getMaxWidthQueryForSize("xsmall", sizesWithUpdatedBreakpoints)
1239
+ }) : "";
1215
1240
  const hoverAnimation = processedBlock.animations && processedBlock.animations.find((item) => item.trigger === "hover");
1216
1241
  let hoverStylesClass = "";
1217
1242
  if (hoverAnimation) {
@@ -1225,7 +1250,7 @@ function BlockStyles(props) {
1225
1250
  }
1226
1251
  }) || "";
1227
1252
  }
1228
- return [largeStylesClass, mediumStylesClass, smallStylesClass, hoverStylesClass].join(" ");
1253
+ return [largeStylesClass, mediumStylesClass, smallStylesClass, xsmallStylesClass, hoverStylesClass].join(" ");
1229
1254
  });
1230
1255
  return createComponent(Show, {
1231
1256
  get when() {
@@ -5452,7 +5477,7 @@ function getPreviewContent(_searchParams) {
5452
5477
  }
5453
5478
 
5454
5479
  // src/constants/sdk-version.ts
5455
- var SDK_VERSION = "3.0.6";
5480
+ var SDK_VERSION = "3.0.7";
5456
5481
 
5457
5482
  // src/helpers/sdk-headers.ts
5458
5483
  var getSdkHeaders = () => ({
@@ -6076,6 +6101,7 @@ var setupBrowserForEditing = (options = {}) => {
6076
6101
  // scope our '+ add block' button styling
6077
6102
  supportsAddBlockScoping: true,
6078
6103
  supportsCustomBreakpoints: true,
6104
+ supportsXSmallBreakpoint: TARGET === "reactNative" ? false : true,
6079
6105
  blockLevelPersonalization: true
6080
6106
  }
6081
6107
  }, "*");
package/lib/node/dev.jsx CHANGED
@@ -1106,8 +1106,13 @@ import { Show as Show2, createMemo } from "solid-js";
1106
1106
 
1107
1107
  // src/constants/device-sizes.ts
1108
1108
  var SIZES = {
1109
+ xsmall: {
1110
+ min: 0,
1111
+ default: 160,
1112
+ max: 320
1113
+ },
1109
1114
  small: {
1110
- min: 320,
1115
+ min: 321,
1111
1116
  default: 321,
1112
1117
  max: 640
1113
1118
  },
@@ -1123,15 +1128,28 @@ var SIZES = {
1123
1128
  }
1124
1129
  };
1125
1130
  var getMaxWidthQueryForSize = (size, sizeValues = SIZES) => `@media (max-width: ${sizeValues[size].max}px)`;
1126
- var getSizesForBreakpoints = ({
1127
- small,
1128
- medium
1129
- }) => {
1131
+ var getSizesForBreakpoints = (breakpoints) => {
1130
1132
  const newSizes = fastClone(SIZES);
1133
+ if (!breakpoints) {
1134
+ return newSizes;
1135
+ }
1136
+ const {
1137
+ xsmall,
1138
+ small,
1139
+ medium
1140
+ } = breakpoints;
1141
+ if (xsmall) {
1142
+ const xsmallMin = Math.floor(xsmall / 2);
1143
+ newSizes.xsmall = {
1144
+ max: xsmall,
1145
+ min: xsmallMin,
1146
+ default: xsmallMin + 1
1147
+ };
1148
+ }
1131
1149
  if (!small || !medium) {
1132
1150
  return newSizes;
1133
1151
  }
1134
- const smallMin = Math.floor(small / 2);
1152
+ const smallMin = xsmall ? newSizes.xsmall.max + 1 : Math.floor(small / 2);
1135
1153
  newSizes.small = {
1136
1154
  max: small,
1137
1155
  min: smallMin,
@@ -1182,9 +1200,13 @@ function BlockStyles(props) {
1182
1200
  const sizesWithUpdatedBreakpoints = getSizesForBreakpoints(
1183
1201
  content?.meta?.breakpoints || {}
1184
1202
  );
1203
+ const contentHasXSmallBreakpoint = Boolean(
1204
+ content?.meta?.breakpoints?.xsmall
1205
+ );
1185
1206
  const largeStyles = styles?.large;
1186
1207
  const mediumStyles = styles?.medium;
1187
1208
  const smallStyles = styles?.small;
1209
+ const xsmallStyles = styles?.xsmall;
1188
1210
  const className = processedBlock.id;
1189
1211
  if (!className) {
1190
1212
  return "";
@@ -1209,6 +1231,14 @@ function BlockStyles(props) {
1209
1231
  sizesWithUpdatedBreakpoints
1210
1232
  )
1211
1233
  }) : "";
1234
+ const xsmallStylesClass = xsmallStyles && contentHasXSmallBreakpoint ? createCssClass({
1235
+ className,
1236
+ styles: xsmallStyles,
1237
+ mediaQuery: getMaxWidthQueryForSize(
1238
+ "xsmall",
1239
+ sizesWithUpdatedBreakpoints
1240
+ )
1241
+ }) : "";
1212
1242
  const hoverAnimation = processedBlock.animations && processedBlock.animations.find((item) => item.trigger === "hover");
1213
1243
  let hoverStylesClass = "";
1214
1244
  if (hoverAnimation) {
@@ -1228,6 +1258,7 @@ function BlockStyles(props) {
1228
1258
  largeStylesClass,
1229
1259
  mediumStylesClass,
1230
1260
  smallStylesClass,
1261
+ xsmallStylesClass,
1231
1262
  hoverStylesClass
1232
1263
  ].join(" ");
1233
1264
  });
@@ -4939,7 +4970,7 @@ function getPreviewContent(_searchParams) {
4939
4970
  }
4940
4971
 
4941
4972
  // src/constants/sdk-version.ts
4942
- var SDK_VERSION = "3.0.6";
4973
+ var SDK_VERSION = "3.0.7";
4943
4974
 
4944
4975
  // src/helpers/sdk-headers.ts
4945
4976
  var getSdkHeaders = () => ({
@@ -5563,6 +5594,7 @@ var setupBrowserForEditing = (options = {}) => {
5563
5594
  // scope our '+ add block' button styling
5564
5595
  supportsAddBlockScoping: true,
5565
5596
  supportsCustomBreakpoints: true,
5597
+ supportsXSmallBreakpoint: TARGET === "reactNative" ? false : true,
5566
5598
  blockLevelPersonalization: true
5567
5599
  }
5568
5600
  }, "*");
package/lib/node/index.js CHANGED
@@ -1099,8 +1099,13 @@ var provideBuilderContext = (block, context) => {
1099
1099
 
1100
1100
  // src/constants/device-sizes.ts
1101
1101
  var SIZES = {
1102
+ xsmall: {
1103
+ min: 0,
1104
+ default: 160,
1105
+ max: 320
1106
+ },
1102
1107
  small: {
1103
- min: 320,
1108
+ min: 321,
1104
1109
  default: 321,
1105
1110
  max: 640
1106
1111
  },
@@ -1116,15 +1121,28 @@ var SIZES = {
1116
1121
  }
1117
1122
  };
1118
1123
  var getMaxWidthQueryForSize = (size, sizeValues = SIZES) => `@media (max-width: ${sizeValues[size].max}px)`;
1119
- var getSizesForBreakpoints = ({
1120
- small,
1121
- medium
1122
- }) => {
1124
+ var getSizesForBreakpoints = (breakpoints) => {
1123
1125
  const newSizes = fastClone(SIZES);
1126
+ if (!breakpoints) {
1127
+ return newSizes;
1128
+ }
1129
+ const {
1130
+ xsmall,
1131
+ small,
1132
+ medium
1133
+ } = breakpoints;
1134
+ if (xsmall) {
1135
+ const xsmallMin = Math.floor(xsmall / 2);
1136
+ newSizes.xsmall = {
1137
+ max: xsmall,
1138
+ min: xsmallMin,
1139
+ default: xsmallMin + 1
1140
+ };
1141
+ }
1124
1142
  if (!small || !medium) {
1125
1143
  return newSizes;
1126
1144
  }
1127
- const smallMin = Math.floor(small / 2);
1145
+ const smallMin = xsmall ? newSizes.xsmall.max + 1 : Math.floor(small / 2);
1128
1146
  newSizes.small = {
1129
1147
  max: small,
1130
1148
  min: smallMin,
@@ -1182,9 +1200,11 @@ function BlockStyles(props) {
1182
1200
  const styles = processedBlock.responsiveStyles;
1183
1201
  const content = props.context.content;
1184
1202
  const sizesWithUpdatedBreakpoints = getSizesForBreakpoints(content?.meta?.breakpoints || {});
1203
+ const contentHasXSmallBreakpoint = Boolean(content?.meta?.breakpoints?.xsmall);
1185
1204
  const largeStyles = styles?.large;
1186
1205
  const mediumStyles = styles?.medium;
1187
1206
  const smallStyles = styles?.small;
1207
+ const xsmallStyles = styles?.xsmall;
1188
1208
  const className = processedBlock.id;
1189
1209
  if (!className) {
1190
1210
  return "";
@@ -1203,6 +1223,11 @@ function BlockStyles(props) {
1203
1223
  styles: smallStyles,
1204
1224
  mediaQuery: getMaxWidthQueryForSize("small", sizesWithUpdatedBreakpoints)
1205
1225
  }) : "";
1226
+ const xsmallStylesClass = xsmallStyles && contentHasXSmallBreakpoint ? createCssClass({
1227
+ className,
1228
+ styles: xsmallStyles,
1229
+ mediaQuery: getMaxWidthQueryForSize("xsmall", sizesWithUpdatedBreakpoints)
1230
+ }) : "";
1206
1231
  const hoverAnimation = processedBlock.animations && processedBlock.animations.find((item) => item.trigger === "hover");
1207
1232
  let hoverStylesClass = "";
1208
1233
  if (hoverAnimation) {
@@ -1216,7 +1241,7 @@ function BlockStyles(props) {
1216
1241
  }
1217
1242
  }) || "";
1218
1243
  }
1219
- return [largeStylesClass, mediumStylesClass, smallStylesClass, hoverStylesClass].join(" ");
1244
+ return [largeStylesClass, mediumStylesClass, smallStylesClass, xsmallStylesClass, hoverStylesClass].join(" ");
1220
1245
  });
1221
1246
  return createComponent(Show, {
1222
1247
  get when() {
@@ -5439,7 +5464,7 @@ function getPreviewContent(_searchParams) {
5439
5464
  }
5440
5465
 
5441
5466
  // src/constants/sdk-version.ts
5442
- var SDK_VERSION = "3.0.6";
5467
+ var SDK_VERSION = "3.0.7";
5443
5468
 
5444
5469
  // src/helpers/sdk-headers.ts
5445
5470
  var getSdkHeaders = () => ({
@@ -6057,6 +6082,7 @@ var setupBrowserForEditing = (options = {}) => {
6057
6082
  // scope our '+ add block' button styling
6058
6083
  supportsAddBlockScoping: true,
6059
6084
  supportsCustomBreakpoints: true,
6085
+ supportsXSmallBreakpoint: TARGET === "reactNative" ? false : true,
6060
6086
  blockLevelPersonalization: true
6061
6087
  }
6062
6088
  }, "*");
@@ -1099,8 +1099,13 @@ import { Show as Show2, createMemo } from "solid-js";
1099
1099
 
1100
1100
  // src/constants/device-sizes.ts
1101
1101
  var SIZES = {
1102
+ xsmall: {
1103
+ min: 0,
1104
+ default: 160,
1105
+ max: 320
1106
+ },
1102
1107
  small: {
1103
- min: 320,
1108
+ min: 321,
1104
1109
  default: 321,
1105
1110
  max: 640
1106
1111
  },
@@ -1116,15 +1121,28 @@ var SIZES = {
1116
1121
  }
1117
1122
  };
1118
1123
  var getMaxWidthQueryForSize = (size, sizeValues = SIZES) => `@media (max-width: ${sizeValues[size].max}px)`;
1119
- var getSizesForBreakpoints = ({
1120
- small,
1121
- medium
1122
- }) => {
1124
+ var getSizesForBreakpoints = (breakpoints) => {
1123
1125
  const newSizes = fastClone(SIZES);
1126
+ if (!breakpoints) {
1127
+ return newSizes;
1128
+ }
1129
+ const {
1130
+ xsmall,
1131
+ small,
1132
+ medium
1133
+ } = breakpoints;
1134
+ if (xsmall) {
1135
+ const xsmallMin = Math.floor(xsmall / 2);
1136
+ newSizes.xsmall = {
1137
+ max: xsmall,
1138
+ min: xsmallMin,
1139
+ default: xsmallMin + 1
1140
+ };
1141
+ }
1124
1142
  if (!small || !medium) {
1125
1143
  return newSizes;
1126
1144
  }
1127
- const smallMin = Math.floor(small / 2);
1145
+ const smallMin = xsmall ? newSizes.xsmall.max + 1 : Math.floor(small / 2);
1128
1146
  newSizes.small = {
1129
1147
  max: small,
1130
1148
  min: smallMin,
@@ -1175,9 +1193,13 @@ function BlockStyles(props) {
1175
1193
  const sizesWithUpdatedBreakpoints = getSizesForBreakpoints(
1176
1194
  content?.meta?.breakpoints || {}
1177
1195
  );
1196
+ const contentHasXSmallBreakpoint = Boolean(
1197
+ content?.meta?.breakpoints?.xsmall
1198
+ );
1178
1199
  const largeStyles = styles?.large;
1179
1200
  const mediumStyles = styles?.medium;
1180
1201
  const smallStyles = styles?.small;
1202
+ const xsmallStyles = styles?.xsmall;
1181
1203
  const className = processedBlock.id;
1182
1204
  if (!className) {
1183
1205
  return "";
@@ -1202,6 +1224,14 @@ function BlockStyles(props) {
1202
1224
  sizesWithUpdatedBreakpoints
1203
1225
  )
1204
1226
  }) : "";
1227
+ const xsmallStylesClass = xsmallStyles && contentHasXSmallBreakpoint ? createCssClass({
1228
+ className,
1229
+ styles: xsmallStyles,
1230
+ mediaQuery: getMaxWidthQueryForSize(
1231
+ "xsmall",
1232
+ sizesWithUpdatedBreakpoints
1233
+ )
1234
+ }) : "";
1205
1235
  const hoverAnimation = processedBlock.animations && processedBlock.animations.find((item) => item.trigger === "hover");
1206
1236
  let hoverStylesClass = "";
1207
1237
  if (hoverAnimation) {
@@ -1221,6 +1251,7 @@ function BlockStyles(props) {
1221
1251
  largeStylesClass,
1222
1252
  mediumStylesClass,
1223
1253
  smallStylesClass,
1254
+ xsmallStylesClass,
1224
1255
  hoverStylesClass
1225
1256
  ].join(" ");
1226
1257
  });
@@ -4928,7 +4959,7 @@ function getPreviewContent(_searchParams) {
4928
4959
  }
4929
4960
 
4930
4961
  // src/constants/sdk-version.ts
4931
- var SDK_VERSION = "3.0.6";
4962
+ var SDK_VERSION = "3.0.7";
4932
4963
 
4933
4964
  // src/helpers/sdk-headers.ts
4934
4965
  var getSdkHeaders = () => ({
@@ -5546,6 +5577,7 @@ var setupBrowserForEditing = (options = {}) => {
5546
5577
  // scope our '+ add block' button styling
5547
5578
  supportsAddBlockScoping: true,
5548
5579
  supportsCustomBreakpoints: true,
5580
+ supportsXSmallBreakpoint: TARGET === "reactNative" ? false : true,
5549
5581
  blockLevelPersonalization: true
5550
5582
  }
5551
5583
  }, "*");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@builder.io/sdk-solid",
3
- "version": "3.0.6",
3
+ "version": "3.0.7",
4
4
  "description": "",
5
5
  "files": [
6
6
  "dist",