@gem-sdk/core 1.3.5 → 1.4.4

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.
@@ -4,6 +4,7 @@ const PublishedThemePageSelect = `
4
4
  fragment PublishedThemePageSelect on PublishedThemePage {
5
5
  id
6
6
  name
7
+ handle
7
8
  isMobile
8
9
  sectionPosition
9
10
  pageSections {
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ const PageViewUpDocument = `
4
+ mutation pageViewUp($pageHandle: String!, $userAgent: String!) {
5
+ pageViewUp(pageHandle: $pageHandle, userAgent: $userAgent)
6
+ }
7
+ `;
8
+
9
+ exports.PageViewUpDocument = PageViewUpDocument;
package/dist/cjs/index.js CHANGED
@@ -13,6 +13,7 @@ var ProductContext = require('./contexts/ProductContext.js');
13
13
  var SectionContext = require('./contexts/SectionContext.js');
14
14
  var ShopContext = require('./contexts/ShopContext.js');
15
15
  var CollectionContext = require('./contexts/CollectionContext.js');
16
+ var pageViewUp_generated = require('./graphql/mutations/page-view-up.generated.js');
16
17
  var collectionDetailFilter_generated = require('./graphql/queries/collection-detail-filter.generated.js');
17
18
  var collection_generated = require('./graphql/queries/collection.generated.js');
18
19
  var publishedThemePages_generated = require('./graphql/queries/published-theme-pages.generated.js');
@@ -106,6 +107,7 @@ exports.ShopProvider = ShopContext.ShopProvider;
106
107
  exports.useShopStore = ShopContext.useShopStore;
107
108
  exports.CollectionProvider = CollectionContext.CollectionProvider;
108
109
  exports.useCollectionStore = CollectionContext.useCollectionStore;
110
+ exports.PageViewUpDocument = pageViewUp_generated.PageViewUpDocument;
109
111
  exports.CollectionDetailFilterDocument = collectionDetailFilter_generated.CollectionDetailFilterDocument;
110
112
  exports.CollectionDocument = collection_generated.CollectionDocument;
111
113
  exports.PublishedThemePagesDocument = publishedThemePages_generated.PublishedThemePagesDocument;
@@ -2,6 +2,7 @@ const PublishedThemePageSelect = `
2
2
  fragment PublishedThemePageSelect on PublishedThemePage {
3
3
  id
4
4
  name
5
+ handle
5
6
  isMobile
6
7
  sectionPosition
7
8
  pageSections {
@@ -0,0 +1,7 @@
1
+ const PageViewUpDocument = `
2
+ mutation pageViewUp($pageHandle: String!, $userAgent: String!) {
3
+ pageViewUp(pageHandle: $pageHandle, userAgent: $userAgent)
4
+ }
5
+ `;
6
+
7
+ export { PageViewUpDocument };
package/dist/esm/index.js CHANGED
@@ -11,6 +11,7 @@ export { ProductProvider, useProductStore } from './contexts/ProductContext.js';
11
11
  export { SectionProvider, useSection, useSectionStore } from './contexts/SectionContext.js';
12
12
  export { ShopProvider, useShopStore } from './contexts/ShopContext.js';
13
13
  export { CollectionProvider, useCollectionStore } from './contexts/CollectionContext.js';
14
+ export { PageViewUpDocument } from './graphql/mutations/page-view-up.generated.js';
14
15
  export { CollectionDetailFilterDocument } from './graphql/queries/collection-detail-filter.generated.js';
15
16
  export { CollectionDocument } from './graphql/queries/collection.generated.js';
16
17
  export { PublishedThemePagesDocument } from './graphql/queries/published-theme-pages.generated.js';
@@ -580,6 +580,7 @@ type RadiusPresetControlType<T> = SharedControlType<T> & {
580
580
 
581
581
  type SizeControlType<T> = SharedControlType<T> & {
582
582
  type: 'size';
583
+ component?: 'tag' | string;
583
584
  };
584
585
 
585
586
  type ChildItemType<T> = SharedControlType<T> & {
@@ -681,7 +682,16 @@ type InputWidthControlType<T> = SharedControlType<T> & {
681
682
  readonly?: boolean;
682
683
  };
683
684
 
684
- type ControlProp<T> = AngleControlType<T> | CheckboxControlType<T> | ColorPickerControlType<T> | GroupControlType<T> | IconControlType<T> | InputFixContentControlType<T> | InputNumberControlType<T> | InputUnitControlType<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> | 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> | DateTimePickerControlType | CountdownDailyType | KlaviyoCodes | YotpoLoyaltyCodes | InputWidthControlType<T>;
685
+ type CustomContentControlType<T> = SharedControlType<T> & {
686
+ type: 'custom-content';
687
+ };
688
+
689
+ type CustomCodeEditor = {
690
+ type: 'customCodeEditor';
691
+ id: string;
692
+ };
693
+
694
+ type ControlProp<T> = AngleControlType<T> | CheckboxControlType<T> | ColorPickerControlType<T> | GroupControlType<T> | IconControlType<T> | InputFixContentControlType<T> | InputNumberControlType<T> | InputUnitControlType<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> | 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> | CustomCodeEditor;
685
695
  type Setting<P extends BaseProps> = {
686
696
  id: 'setting';
687
697
  controls?: ControlProp<NonNullable<P['setting']>>[];
@@ -692,6 +702,7 @@ type Setting<P extends BaseProps> = {
692
702
  type ComponentSetting<P extends BaseProps> = {
693
703
  tag: string;
694
704
  label: string;
705
+ customLabel?: string;
695
706
  title?: string;
696
707
  description?: string;
697
708
  image?: string;
@@ -3225,6 +3236,10 @@ type MutationCartNoteUpdateArgs = {
3225
3236
  note: Scalars['String'];
3226
3237
  platform: CartPlatform;
3227
3238
  };
3239
+ type MutationPageViewUpArgs = {
3240
+ pageHandle: Scalars['String'];
3241
+ userAgent: Scalars['String'];
3242
+ };
3228
3243
  type ObjectType = 'ARTICLE' | 'BLOG' | 'COLLECTION' | 'PAGE' | 'PRODUCT' | 'PRODUCT_VARIANT' | 'SHOP';
3229
3244
  type OrderDirection = 'ASC' | 'DESC';
3230
3245
  type Page = {
@@ -6178,6 +6193,7 @@ type shop_MutationCartLinesAddArgs = MutationCartLinesAddArgs;
6178
6193
  type shop_MutationCartLinesRemoveArgs = MutationCartLinesRemoveArgs;
6179
6194
  type shop_MutationCartLinesUpdateArgs = MutationCartLinesUpdateArgs;
6180
6195
  type shop_MutationCartNoteUpdateArgs = MutationCartNoteUpdateArgs;
6196
+ type shop_MutationPageViewUpArgs = MutationPageViewUpArgs;
6181
6197
  type shop_ObjectType = ObjectType;
6182
6198
  type shop_OrderDirection = OrderDirection;
6183
6199
  type shop_Page = Page;
@@ -6360,6 +6376,7 @@ declare namespace shop {
6360
6376
  shop_MutationCartLinesRemoveArgs as MutationCartLinesRemoveArgs,
6361
6377
  shop_MutationCartLinesUpdateArgs as MutationCartLinesUpdateArgs,
6362
6378
  shop_MutationCartNoteUpdateArgs as MutationCartNoteUpdateArgs,
6379
+ shop_MutationPageViewUpArgs as MutationPageViewUpArgs,
6363
6380
  shop_ObjectType as ObjectType,
6364
6381
  shop_OrderDirection as OrderDirection,
6365
6382
  shop_Page as Page,
@@ -6893,6 +6910,13 @@ type CollectionProviderProps = CollectionContextProps & {
6893
6910
  declare const CollectionProvider: React.FC<CollectionProviderProps>;
6894
6911
  declare const useCollectionStore: <U>(selector: (state: ExtractState<StoreApi<CollectionContextProps>>) => U, equalityFn?: ((a: U, b: U) => boolean) | undefined) => U;
6895
6912
 
6913
+ type PageViewUpMutationVariables = Exact<{
6914
+ pageHandle: Scalars['String'];
6915
+ userAgent: Scalars['String'];
6916
+ }>;
6917
+ type PageViewUpMutationResponse = Pick<Mutation, 'pageViewUp'>;
6918
+ declare const PageViewUpDocument = "\n mutation pageViewUp($pageHandle: String!, $userAgent: String!) {\n pageViewUp(pageHandle: $pageHandle, userAgent: $userAgent)\n}\n ";
6919
+
6896
6920
  type CollectionDetailFilterQueryVariables = Exact<{
6897
6921
  firstProduct?: InputMaybe<Scalars['Int']>;
6898
6922
  orderBy?: InputMaybe<CollectionOrder>;
@@ -6987,7 +7011,7 @@ type PublishedThemePagesQueryVariables = Exact<{
6987
7011
  slugType: PublishedThemePageType;
6988
7012
  }>;
6989
7013
  type PublishedThemePagesQueryResponse = {
6990
- publishedThemePages?: Maybe<Array<Maybe<Pick<PublishedThemePage, 'id' | 'name' | 'isMobile' | 'sectionPosition'> & {
7014
+ publishedThemePages?: Maybe<Array<Maybe<Pick<PublishedThemePage, 'id' | 'name' | 'handle' | 'isMobile' | 'sectionPosition'> & {
6991
7015
  pageSections?: Maybe<Array<Maybe<Pick<PublishedPageSection, 'cid' | 'component' | 'id'>>>>;
6992
7016
  themePageCustomSections?: Maybe<Array<Maybe<Pick<PublishedCustomSection, 'cid' | 'component' | 'id' | 'type'>>>>;
6993
7017
  themePageDataSEO?: Maybe<Array<Maybe<Pick<DataSeo, 'id' | 'key' | 'value'>>>>;
@@ -7051,7 +7075,7 @@ type PreviewPageQueryVariables = Exact<{
7051
7075
  pageType: PublishedThemePageType;
7052
7076
  }>;
7053
7077
  type PreviewPageQueryResponse = {
7054
- previewPage?: Maybe<Pick<PublishedThemePage, 'id' | 'name' | 'isMobile' | 'sectionPosition'> & {
7078
+ previewPage?: Maybe<Pick<PublishedThemePage, 'id' | 'name' | 'handle' | 'isMobile' | 'sectionPosition'> & {
7055
7079
  pageSections?: Maybe<Array<Maybe<Pick<PublishedPageSection, 'cid' | 'component' | 'id'>>>>;
7056
7080
  themePageCustomSections?: Maybe<Array<Maybe<Pick<PublishedCustomSection, 'cid' | 'component' | 'id' | 'type'>>>>;
7057
7081
  themePageDataSEO?: Maybe<Array<Maybe<Pick<DataSeo, 'id' | 'key' | 'value'>>>>;
@@ -7404,7 +7428,7 @@ declare const useSuspenseFetch: <T>(key: string | any[], promise: () => Promise<
7404
7428
 
7405
7429
  declare const useSwatchesOptions: (options?: ProductOption[]) => ProductOption[];
7406
7430
 
7407
- type PublishedThemePageSelectFragment = Pick<PublishedThemePage, 'id' | 'name' | 'isMobile' | 'sectionPosition'> & {
7431
+ type PublishedThemePageSelectFragment = Pick<PublishedThemePage, 'id' | 'name' | 'handle' | 'isMobile' | 'sectionPosition'> & {
7408
7432
  pageSections?: Maybe<Array<Maybe<Pick<PublishedPageSection, 'cid' | 'component' | 'id'>>>>;
7409
7433
  themePageCustomSections?: Maybe<Array<Maybe<Pick<PublishedCustomSection, 'cid' | 'component' | 'id' | 'type'>>>>;
7410
7434
  themePageDataSEO?: Maybe<Array<Maybe<Pick<DataSeo, 'id' | 'key' | 'value'>>>>;
@@ -7439,4 +7463,4 @@ declare const fetchMedias: (fetcher: FetchFunc, { id, isSample }: FetchParams) =
7439
7463
 
7440
7464
  declare const getProductBySlug: (fetcher: FetchFunc, slug?: string) => Promise<ProductSelectFragment>;
7441
7465
 
7442
- export { AddOn, AddonProvider, AddonProviderProps, AlignItemProp, AlignProp, Background, BaseProps, BasePropsWrap, BlockEntity, Border, BuilderComponentProvider, BuilderComponentProviderProps, BuilderEntity, BuilderEntityNested, BuilderPreviewProvider, BuilderPreviewProviderProps, BuilderProvider, BuilderProviderProps, BuilderState, Builtin, CartLineProvider, CartLineProviderProps, CollectionDetailFilterDocument, CollectionDetailFilterQueryResponse, CollectionDetailFilterQueryVariables, CollectionDocument, CollectionProvider, CollectionProviderProps, CollectionQueryResponse, CollectionQueryVariables, ColorKey, ColorType$1 as ColorType, ColorValueType, Component, ComponentSetting, ContainerProp, ControlProp, CornerRadius, CornerRadiusType, CustomComponentConfig, DeepPartial, ExtractState, FetchFunc, FlexDirectionProp, FontName, GlobalStyleConfig, GlobalStyleResponsiveConfig, GlobalSwatchesData, GraphQLConnection, GroupPropType, HSLAColorType, HSLColorType, HexColorType, InitComponentType, JudgeMeReviewsWidgetType, KlaviyoWidgetType, LooxReviewsWidgetType, NameDevices, NestedKeys, ObjectDeviceGlobalType, ObjectDevices, OptionNormalStyle, OptionSpecialStyle, PreviewPageDocument, PreviewPageQueryResponse, PreviewPageQueryVariables, Primitive, ProductInputAnalytic, ProductListProvider, ProductListProviderProps, ProductProvider, ProductProviderProps, ProductSelectFragment, ProductsDocument, ProductsQueryResponse, ProductsQueryVariables, PublishedThemePageSelectFragment, PublishedThemePagesDocument, PublishedThemePagesQueryResponse, PublishedThemePagesQueryVariables, RGBAColorType, RGBColorType, RenderMemo as Render, RenderMode, RenderPreviewMemo as RenderPreview, RequiredCursorEdge, ResponsiveStateProp, RoundedSize, SectionData, SectionEntity, SectionProvider, SectionProviderProps, ShadowProps, ShadowStyle, ShadowStyleApplied, ShadowType, ShopProvider, ShopProviderProps, shop as ShopType, SizeProps, SizeSetting, SizeType, SpacingType, StateProp, StateSelector, StateType, StoreConfig, StorePropertyDocument, StorePropertyQueryResponse, StorePropertyQueryVariables, SwatchesOptionType, SwatchesOptionValue, TransformProp, TypographyProps, TypographySetting, TypographyType, VariantSelectFragment, calculateFirstProduct, cls, composeRadius, composeSize, composeSpacing, fetchMedias, fetchVariants, flattenConnection, fpixel, genTypoClass, genVariable, getCollection, getCustomRadius, getGlobalColorCSSProp, getGlobalColorClass, getGlobalColorResponsiveClass, getGlobalColorResponsiveStyle, getGlobalColorStateClass, getGlobalColorStateResponsiveClass, getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle, getGlobalColorStyle, getProduct, getProductBySlug, getRadiusCSSFromGlobal, getRadiusStyleActiveState, getResponsiveStateValue, getResponsiveValue, getResponsiveValueByScreen, getSelectedVariant, getShortName, getSingleColorVariable, getSpacingVariable, getStyleBackgroundByDevice, getStyleShadow, getStyleShadowState, globalEvent, gtag, handleConvertBorderColor, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertClassColor, isBrowser, isColor, isDefined, isEmptyChildren, loadScript, makeAspectRatio, makeHeight, makeStyle, makeStyleResponsive, makeStyleResponsiveState, makeStyleState, makeWidth, normalizeBuilderData, optionLayoutStyle, parseSelectedOption, prefetchQueries, tiktokpixel, useAddToCart, useAddon, useAddons, useBuilderComponent, useBuilderPreviewStore, useBuilderStore, useCartData, useCartDiscountCodesUpdate, useCartId, useCartLine, useCartLineStore, useCartNoteUpdate, useCartUI, useCollection, useCollectionQuery, useCollectionStore, useConnectedShopify, useCreateCart, useCurrency, useCurrentDevice, useCurrentVariant, useCurrentVariantInStock, useEditorMode, useFeaturedImageGlobal, useFormatMoney, useIsSampleProduct, useIsomorphicLayoutEffect, useLazyVideo, useLoadScript, useLocale, useMatchMutate, useMobileOnly, useMoney, usePageType, usePluginEnable, usePrevious, useProduct, useProductList, useProductListProducts, useProductListSettings, useProductListStore, useProductListStyles, useProductProperties, useProductQuery, useProductStore, useProductsQuery, useQuantity, useRemoveCartItem, useSection, useSectionStore, useSelectedOption, useShopStore, useStoreFront, useSuspenseFetch, useSwatchesOptions, useUniqProductID, useUpdateCartItem, useVariant, useVariantOutStock, useVariants, validateEmail };
7466
+ export { AddOn, AddonProvider, AddonProviderProps, AlignItemProp, AlignProp, Background, BaseProps, BasePropsWrap, BlockEntity, Border, BuilderComponentProvider, BuilderComponentProviderProps, BuilderEntity, BuilderEntityNested, BuilderPreviewProvider, BuilderPreviewProviderProps, BuilderProvider, BuilderProviderProps, BuilderState, Builtin, CartLineProvider, CartLineProviderProps, CollectionDetailFilterDocument, CollectionDetailFilterQueryResponse, CollectionDetailFilterQueryVariables, CollectionDocument, CollectionProvider, CollectionProviderProps, CollectionQueryResponse, CollectionQueryVariables, ColorKey, ColorType$1 as ColorType, ColorValueType, Component, ComponentSetting, ContainerProp, ControlProp, CornerRadius, CornerRadiusType, CustomComponentConfig, DeepPartial, ExtractState, FetchFunc, FlexDirectionProp, FontName, GlobalStyleConfig, GlobalStyleResponsiveConfig, GlobalSwatchesData, GraphQLConnection, GroupPropType, HSLAColorType, HSLColorType, HexColorType, InitComponentType, JudgeMeReviewsWidgetType, KlaviyoWidgetType, LooxReviewsWidgetType, NameDevices, NestedKeys, ObjectDeviceGlobalType, ObjectDevices, OptionNormalStyle, OptionSpecialStyle, PageViewUpDocument, PageViewUpMutationResponse, PageViewUpMutationVariables, PreviewPageDocument, PreviewPageQueryResponse, PreviewPageQueryVariables, Primitive, ProductInputAnalytic, ProductListProvider, ProductListProviderProps, ProductProvider, ProductProviderProps, ProductSelectFragment, ProductsDocument, ProductsQueryResponse, ProductsQueryVariables, PublishedThemePageSelectFragment, PublishedThemePagesDocument, PublishedThemePagesQueryResponse, PublishedThemePagesQueryVariables, RGBAColorType, RGBColorType, RenderMemo as Render, RenderMode, RenderPreviewMemo as RenderPreview, RequiredCursorEdge, ResponsiveStateProp, RoundedSize, SectionData, SectionEntity, SectionProvider, SectionProviderProps, ShadowProps, ShadowStyle, ShadowStyleApplied, ShadowType, ShopProvider, ShopProviderProps, shop as ShopType, SizeProps, SizeSetting, SizeType, SpacingType, StateProp, StateSelector, StateType, StoreConfig, StorePropertyDocument, StorePropertyQueryResponse, StorePropertyQueryVariables, SwatchesOptionType, SwatchesOptionValue, TransformProp, TypographyProps, TypographySetting, TypographyType, VariantSelectFragment, calculateFirstProduct, cls, composeRadius, composeSize, composeSpacing, fetchMedias, fetchVariants, flattenConnection, fpixel, genTypoClass, genVariable, getCollection, getCustomRadius, getGlobalColorCSSProp, getGlobalColorClass, getGlobalColorResponsiveClass, getGlobalColorResponsiveStyle, getGlobalColorStateClass, getGlobalColorStateResponsiveClass, getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle, getGlobalColorStyle, getProduct, getProductBySlug, getRadiusCSSFromGlobal, getRadiusStyleActiveState, getResponsiveStateValue, getResponsiveValue, getResponsiveValueByScreen, getSelectedVariant, getShortName, getSingleColorVariable, getSpacingVariable, getStyleBackgroundByDevice, getStyleShadow, getStyleShadowState, globalEvent, gtag, handleConvertBorderColor, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertClassColor, isBrowser, isColor, isDefined, isEmptyChildren, loadScript, makeAspectRatio, makeHeight, makeStyle, makeStyleResponsive, makeStyleResponsiveState, makeStyleState, makeWidth, normalizeBuilderData, optionLayoutStyle, parseSelectedOption, prefetchQueries, tiktokpixel, useAddToCart, useAddon, useAddons, useBuilderComponent, useBuilderPreviewStore, useBuilderStore, useCartData, useCartDiscountCodesUpdate, useCartId, useCartLine, useCartLineStore, useCartNoteUpdate, useCartUI, useCollection, useCollectionQuery, useCollectionStore, useConnectedShopify, useCreateCart, useCurrency, useCurrentDevice, useCurrentVariant, useCurrentVariantInStock, useEditorMode, useFeaturedImageGlobal, useFormatMoney, useIsSampleProduct, useIsomorphicLayoutEffect, useLazyVideo, useLoadScript, useLocale, useMatchMutate, useMobileOnly, useMoney, usePageType, usePluginEnable, usePrevious, useProduct, useProductList, useProductListProducts, useProductListSettings, useProductListStore, useProductListStyles, useProductProperties, useProductQuery, useProductStore, useProductsQuery, useQuantity, useRemoveCartItem, useSection, useSectionStore, useSelectedOption, useShopStore, useStoreFront, useSuspenseFetch, useSwatchesOptions, useUniqProductID, useUpdateCartItem, useVariant, useVariantOutStock, useVariants, validateEmail };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "1.3.5",
3
+ "version": "1.4.4",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",