@gem-sdk/core 1.40.1 → 1.40.2-staging.5

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.
@@ -134,8 +134,8 @@ const makeAspectRatio = (aspectRatio, aspectWidth, aspectHeight)=>{
134
134
  };
135
135
  const makeLineClamp = (lineClampValue, hasLineClampValue)=>{
136
136
  const getVal = (deviceValue, lineClampValue, hasLineClampValue)=>{
137
- const lineClamp = lineClampValue?.[deviceValue];
138
- const hasLineClamp = hasLineClampValue?.[deviceValue] || hasLineClampValue?.['desktop'];
137
+ const lineClamp = getResonsiveValue.getResponsiveValueByScreen(lineClampValue, deviceValue);
138
+ const hasLineClamp = getResonsiveValue.getResponsiveValueByScreen(hasLineClampValue, deviceValue);
139
139
  if (hasLineClamp || hasLineClamp === undefined) {
140
140
  return lineClamp;
141
141
  }
@@ -132,8 +132,8 @@ const makeAspectRatio = (aspectRatio, aspectWidth, aspectHeight)=>{
132
132
  };
133
133
  const makeLineClamp = (lineClampValue, hasLineClampValue)=>{
134
134
  const getVal = (deviceValue, lineClampValue, hasLineClampValue)=>{
135
- const lineClamp = lineClampValue?.[deviceValue];
136
- const hasLineClamp = hasLineClampValue?.[deviceValue] || hasLineClampValue?.['desktop'];
135
+ const lineClamp = getResponsiveValueByScreen(lineClampValue, deviceValue);
136
+ const hasLineClamp = getResponsiveValueByScreen(hasLineClampValue, deviceValue);
137
137
  if (hasLineClamp || hasLineClamp === undefined) {
138
138
  return lineClamp;
139
139
  }
@@ -7378,6 +7378,10 @@ type VariantSwatchesPresetControlType<T> = SharedControlType<T> & {
7378
7378
  id?: string;
7379
7379
  type: 'variant:presets';
7380
7380
  };
7381
+ type VariantSwatchesOnlyDefaultVariantControlType<T> = SharedControlType<T> & {
7382
+ id?: string;
7383
+ type: 'variant:default';
7384
+ };
7381
7385
 
7382
7386
  type LayoutControlType<T> = SharedControlType<T> & {
7383
7387
  type: 'layout';
@@ -7698,7 +7702,7 @@ type PostPurchaseTextareaControlType<T> = SharedControlType<T> & {
7698
7702
  }[];
7699
7703
  };
7700
7704
 
7701
- type ControlProp<T> = AngleControlType<T> | CheckboxControlType<T> | ColorPickerControlType<T> | GroupControlType<T> | IconControlType<T> | InputFixContentControlType<T> | InputNumberControlType<T> | InputUnitControlType<T> | InputUnitSpacingControlType<T> | InputUnitWidthControlType<T> | InputControlType<T> | MarginControlType<T> | PaddingControlType<T> | PositionControlType<T> | RadioGroupControlType | RangeControlType<T> | SegmentControlType<T> | SelectControlType<T> | TextareaControlType<T> | ToggleControlType<T> | ImageControlType<T> | ChildrensControlType | GridControlType<T> | FlexControlType<T> | TextEditorControlType<T> | ProductControlType<T> | TypographyControlType<T> | TypographyV2ControlType<T> | MenuControlType<T> | BehaviorStateControlType<T> | PickLinkControlType<T> | BoxShadowControlType<T> | TextShadowControlType<T> | BorderControlType<T> | BorderRadiusControlType<T> | RadiusPresetControlType<T> | SizeControlType<T> | ChildItemType<T> | PickMultiProductControlType<T> | CollectionControlType<T> | BackgroundControlType<T> | VisibilityControlType<T> | SelectVariantControlType | CountdownEvergreenType | Timezone<T> | CustomContentControlType<T> | DateTimePickerControlType | CountdownDailyType | KlaviyoCodes | YotpoLoyaltyCodes | InputWidthControlType<T> | LayoutSegmentControlType<T> | InputSpacing<T> | UniqueIdControlType<T> | PositionSquareControlType<T> | CustomCodeEditor | LayoutControlType<T> | LayoutBannerControlType<T> | SwatchesLinkControlType<T> | VariantSwatchesPresetControlType<T> | ProductListControlType<T> | CollectionBannerControlType<T> | Ratio<T> | StickyDisplayControlType<T> | SyncProductPropertiesControlType<T> | StepsGuide<T> | ImageShape<T> | GridArrange<T> | SizeSetting$1<T> | ChildIconType<T> | DropdownInput<T> | Dropdown<T> | AliPickSectionControlType<T> | ParallaxScrollingType<T> | BackgroundColorPickerType<T> | PlayPauseControlType<T> | LayoutCustomSegmentControlType<T> | SneakPeakRange<T> | SneakPeakTypeControlType<T> | SneakPeakControlType<T> | BackgroundColorPickerType<T> | ProductInputCurrencyUnitControlType<T> | TypographyPostPurchaseControlType<T> | ProductOffersControlType<T> | DiscountAndShippingFee<T> | SneakPeakControlType<T> | PostPurchaseTextareaControlType<T>;
7705
+ type ControlProp<T> = AngleControlType<T> | CheckboxControlType<T> | ColorPickerControlType<T> | GroupControlType<T> | IconControlType<T> | InputFixContentControlType<T> | InputNumberControlType<T> | InputUnitControlType<T> | InputUnitSpacingControlType<T> | InputUnitWidthControlType<T> | InputControlType<T> | MarginControlType<T> | PaddingControlType<T> | PositionControlType<T> | RadioGroupControlType | RangeControlType<T> | SegmentControlType<T> | SelectControlType<T> | TextareaControlType<T> | ToggleControlType<T> | ImageControlType<T> | ChildrensControlType | GridControlType<T> | FlexControlType<T> | TextEditorControlType<T> | ProductControlType<T> | TypographyControlType<T> | TypographyV2ControlType<T> | MenuControlType<T> | BehaviorStateControlType<T> | PickLinkControlType<T> | BoxShadowControlType<T> | TextShadowControlType<T> | BorderControlType<T> | BorderRadiusControlType<T> | RadiusPresetControlType<T> | SizeControlType<T> | ChildItemType<T> | PickMultiProductControlType<T> | CollectionControlType<T> | BackgroundControlType<T> | VisibilityControlType<T> | SelectVariantControlType | CountdownEvergreenType | Timezone<T> | CustomContentControlType<T> | DateTimePickerControlType | CountdownDailyType | KlaviyoCodes | YotpoLoyaltyCodes | InputWidthControlType<T> | LayoutSegmentControlType<T> | InputSpacing<T> | UniqueIdControlType<T> | PositionSquareControlType<T> | CustomCodeEditor | LayoutControlType<T> | LayoutBannerControlType<T> | SwatchesLinkControlType<T> | VariantSwatchesPresetControlType<T> | VariantSwatchesOnlyDefaultVariantControlType<T> | ProductListControlType<T> | CollectionBannerControlType<T> | Ratio<T> | StickyDisplayControlType<T> | SyncProductPropertiesControlType<T> | StepsGuide<T> | ImageShape<T> | GridArrange<T> | SizeSetting$1<T> | ChildIconType<T> | DropdownInput<T> | Dropdown<T> | AliPickSectionControlType<T> | ParallaxScrollingType<T> | BackgroundColorPickerType<T> | PlayPauseControlType<T> | LayoutCustomSegmentControlType<T> | SneakPeakRange<T> | SneakPeakTypeControlType<T> | SneakPeakControlType<T> | BackgroundColorPickerType<T> | ProductInputCurrencyUnitControlType<T> | TypographyPostPurchaseControlType<T> | ProductOffersControlType<T> | DiscountAndShippingFee<T> | SneakPeakControlType<T> | PostPurchaseTextareaControlType<T>;
7702
7706
  type ControlTriggerAction = {
7703
7707
  controlId: string;
7704
7708
  newValue?: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "1.40.1",
3
+ "version": "1.40.2-staging.5",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -27,8 +27,8 @@
27
27
  "type-check": "yarn tsc --noEmit"
28
28
  },
29
29
  "devDependencies": {
30
- "@gem-sdk/adapter-shopify": "1.40.0",
31
- "@gem-sdk/styles": "1.40.0"
30
+ "@gem-sdk/adapter-shopify": "1.40.2-staging.4",
31
+ "@gem-sdk/styles": "1.40.2-staging.5"
32
32
  },
33
33
  "dependencies": {
34
34
  "react-error-boundary": "4.0.10",