@gem-sdk/core 1.23.0-staging.436 → 1.23.0-staging.450

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.
@@ -3,7 +3,7 @@
3
3
  var react = require('react');
4
4
  var useAnimationConfig = require('./useAnimationConfig.js');
5
5
 
6
- const SPACING_ACTIVE_ATTRIBUTE = 'data-spacing';
6
+ const SPACING_ACTIVE_ATTRIBUTE = 'data-spacing-margin-bottom-active';
7
7
  const TOOLBAR_ACTIVE_ATTRIBUTE = 'data-toolbar-active';
8
8
  const OUTLINE_ACTIVE_ATTRIBUTE = 'data-outline-active';
9
9
  const TOOLBAR_ADD_SECTION_ACTIVE_ATTRIBUTE = 'data-toolbar-add-active';
@@ -51,8 +51,7 @@ const useAnimationTarget = (props)=>{
51
51
  let target = $rootTarget;
52
52
  let toolbar = $rootTarget.querySelector('[data-toolbar][data-toolbar-active]');
53
53
  let outline = $rootTarget.querySelector('[data-outline][data-outline-active]');
54
- const targetChild = Array.from(target.children);
55
- const spacing = targetChild.find((child)=>child.getAttribute('data-spacing') !== null);
54
+ const spacing = $rootTarget.querySelector('[data-spacing] [data-spacing-margin-bottom]');
56
55
  switch(componentTag){
57
56
  case 'Button':
58
57
  case 'SubmitButton':
@@ -1,7 +1,7 @@
1
1
  import { useRef, useCallback } from 'react';
2
2
  import { useAnimationConfig } from './useAnimationConfig.js';
3
3
 
4
- const SPACING_ACTIVE_ATTRIBUTE = 'data-spacing';
4
+ const SPACING_ACTIVE_ATTRIBUTE = 'data-spacing-margin-bottom-active';
5
5
  const TOOLBAR_ACTIVE_ATTRIBUTE = 'data-toolbar-active';
6
6
  const OUTLINE_ACTIVE_ATTRIBUTE = 'data-outline-active';
7
7
  const TOOLBAR_ADD_SECTION_ACTIVE_ATTRIBUTE = 'data-toolbar-add-active';
@@ -49,8 +49,7 @@ const useAnimationTarget = (props)=>{
49
49
  let target = $rootTarget;
50
50
  let toolbar = $rootTarget.querySelector('[data-toolbar][data-toolbar-active]');
51
51
  let outline = $rootTarget.querySelector('[data-outline][data-outline-active]');
52
- const targetChild = Array.from(target.children);
53
- const spacing = targetChild.find((child)=>child.getAttribute('data-spacing') !== null);
52
+ const spacing = $rootTarget.querySelector('[data-spacing] [data-spacing-margin-bottom]');
54
53
  switch(componentTag){
55
54
  case 'Button':
56
55
  case 'SubmitButton':
@@ -6928,7 +6928,7 @@ type InputNumberControlType<T> = SharedControlType<T> & {
6928
6928
  readonly?: boolean;
6929
6929
  };
6930
6930
 
6931
- type SizeUnit$2 = 's' | '%' | 'cm' | 'mm' | 'Q' | 'in' | 'pc' | 'pt' | 'px' | 'em' | 'cap' | 'ex' | 'ch' | 'ic' | 'rem' | 'lh' | 'rlh' | 'vw' | 'vh' | 'vi' | 'vb' | 'vmin' | 'vmax' | 'ms';
6931
+ type SizeUnit$2 = 's' | '%' | 'cm' | 'mm' | 'Q' | 'in' | 'pc' | 'pt' | 'px' | 'em' | 'cap' | 'ex' | 'ch' | 'ic' | 'rem' | 'lh' | 'rlh' | 'vw' | 'vh' | 'vi' | 'vb' | 'vmin' | 'vmax' | 'ms' | 'min';
6932
6932
  type InputUnitControlType<T> = SharedControlType<T> & {
6933
6933
  type: 'input:unit';
6934
6934
  placeholder?: string;
@@ -7036,6 +7036,7 @@ type Option$2<T> = {
7036
7036
  flowTag?: string[];
7037
7037
  condition?: 'and' | 'or';
7038
7038
  icon?: string;
7039
+ svgIcon?: string;
7039
7040
  tooltip?: string;
7040
7041
  type?: string;
7041
7042
  };
@@ -7374,6 +7375,10 @@ type VariantSwatchesPresetControlType<T> = SharedControlType<T> & {
7374
7375
  id?: string;
7375
7376
  type: 'variant:presets';
7376
7377
  };
7378
+ type VariantSwatchesOnlyDefaultVariantControlType<T> = SharedControlType<T> & {
7379
+ id?: string;
7380
+ type: 'variant:default';
7381
+ };
7377
7382
 
7378
7383
  type LayoutControlType<T> = SharedControlType<T> & {
7379
7384
  type: 'layout';
@@ -7656,11 +7661,18 @@ type PostPurchaseTypo = {
7656
7661
  textTransform?: PostPurchaseTextTransform;
7657
7662
  textColor?: PostPurchaseTextColor;
7658
7663
  };
7664
+ type PostPurchaseTypoLabel = {
7665
+ fontSize?: string;
7666
+ fontWeight?: string;
7667
+ textTransform?: string;
7668
+ textColor?: string;
7669
+ };
7659
7670
  type SettingIDType = keyof PostPurchaseTypo;
7660
7671
  type TypographyPostPurchaseControlType<T> = SharedControlType<T> & {
7661
7672
  type: 'typography-post-purchase';
7662
7673
  default?: PostPurchaseTypo;
7663
7674
  hiddenSetting?: SettingIDType[];
7675
+ configLabel?: PostPurchaseTypoLabel;
7664
7676
  };
7665
7677
 
7666
7678
  type ProductOffersControlType<T> = SharedControlType<T> & {
@@ -7687,7 +7699,7 @@ type PostPurchaseTextareaControlType<T> = SharedControlType<T> & {
7687
7699
  }[];
7688
7700
  };
7689
7701
 
7690
- 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>;
7702
+ 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>;
7691
7703
  type ControlTriggerAction = {
7692
7704
  controlId: string;
7693
7705
  newValue?: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "1.23.0-staging.436",
3
+ "version": "1.23.0-staging.450",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "devDependencies": {
30
30
  "@gem-sdk/adapter-shopify": "1.23.0-staging.383",
31
- "@gem-sdk/styles": "1.23.0-staging.415"
31
+ "@gem-sdk/styles": "1.23.0-staging.447"
32
32
  },
33
33
  "dependencies": {
34
34
  "react-error-boundary": "4.0.10",