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

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':
@@ -7374,6 +7374,10 @@ type VariantSwatchesPresetControlType<T> = SharedControlType<T> & {
7374
7374
  id?: string;
7375
7375
  type: 'variant:presets';
7376
7376
  };
7377
+ type VariantSwatchesOnlyDefaultVariantControlType<T> = SharedControlType<T> & {
7378
+ id?: string;
7379
+ type: 'variant:default';
7380
+ };
7377
7381
 
7378
7382
  type LayoutControlType<T> = SharedControlType<T> & {
7379
7383
  type: 'layout';
@@ -7687,7 +7691,7 @@ type PostPurchaseTextareaControlType<T> = SharedControlType<T> & {
7687
7691
  }[];
7688
7692
  };
7689
7693
 
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>;
7694
+ 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
7695
  type ControlTriggerAction = {
7692
7696
  controlId: string;
7693
7697
  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.448",
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",