@gem-sdk/core 1.17.9 → 1.17.10

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 @@
4
4
  fragment MediaSelect on Media {
5
5
  id
6
6
  contentType
7
+ previewImage
7
8
  src
8
9
  width
9
10
  height
@@ -2,6 +2,7 @@
2
2
  fragment MediaSelect on Media {
3
3
  id
4
4
  contentType
5
+ previewImage
5
6
  src
6
7
  width
7
8
  height
@@ -7271,7 +7271,7 @@ type CollectionProductSelectFragment = Pick<Collection, 'id' | 'createdAt' | 'up
7271
7271
  node?: Maybe<Pick<Product, 'id' | 'title' | 'description' | 'descriptionHtml' | 'handle' | 'averageRating' | 'isStorefront' | 'isSample' | 'baseID' | 'sku' | 'vendor'> & {
7272
7272
  medias?: Maybe<{
7273
7273
  edges: Array<Pick<MediaEdge, 'cursor'> & {
7274
- node?: Maybe<Pick<Media, 'id' | 'contentType' | 'src' | 'width' | 'height' | 'alt'>>;
7274
+ node?: Maybe<Pick<Media, 'id' | 'contentType' | 'previewImage' | 'src' | 'width' | 'height' | 'alt'>>;
7275
7275
  }>;
7276
7276
  pageInfo?: Maybe<Pick<PageInfo, 'endCursor' | 'hasNextPage'>>;
7277
7277
  }>;
@@ -7279,7 +7279,7 @@ type CollectionProductSelectFragment = Pick<Collection, 'id' | 'createdAt' | 'up
7279
7279
  edges: Array<Pick<ProductVariantEdge, 'cursor'> & {
7280
7280
  node?: Maybe<Pick<ProductVariant, 'id' | 'title' | 'barcode' | 'baseID' | 'costPrice' | 'height' | 'inventoryPolicy' | 'inventoryQuantity' | 'inventoryStatus' | 'isDigital' | 'length' | 'lowInventoryAmount' | 'manageInventory' | 'mediaId' | 'platform' | 'price' | 'salePrice' | 'sku' | 'soldIndividually' | 'weight' | 'width'> & {
7281
7281
  selectedOptions: Array<Pick<SelectedOption, 'name' | 'value' | 'optionType'>>;
7282
- media?: Maybe<Pick<Media, 'id' | 'contentType' | 'src' | 'width' | 'height' | 'alt'>>;
7282
+ media?: Maybe<Pick<Media, 'id' | 'contentType' | 'previewImage' | 'src' | 'width' | 'height' | 'alt'>>;
7283
7283
  }>;
7284
7284
  }>;
7285
7285
  pageInfo?: Maybe<Pick<PageInfo, 'hasNextPage' | 'endCursor'>>;
@@ -7287,7 +7287,7 @@ type CollectionProductSelectFragment = Pick<Collection, 'id' | 'createdAt' | 'up
7287
7287
  options?: Maybe<Array<Pick<ProductOption, 'id' | 'name' | 'optionType'> & {
7288
7288
  values: Array<Pick<ProductOptionValue, 'id' | 'label' | 'isDefault' | 'baseID'>>;
7289
7289
  }>>;
7290
- featuredImage?: Maybe<Pick<Media, 'id' | 'contentType' | 'src' | 'width' | 'height' | 'alt'>>;
7290
+ featuredImage?: Maybe<Pick<Media, 'id' | 'contentType' | 'previewImage' | 'src' | 'width' | 'height' | 'alt'>>;
7291
7291
  }>;
7292
7292
  }>;
7293
7293
  pageInfo?: Maybe<Pick<PageInfo, 'endCursor' | 'hasNextPage'>>;
@@ -7296,7 +7296,7 @@ type CollectionProductSelectFragment = Pick<Collection, 'id' | 'createdAt' | 'up
7296
7296
  };
7297
7297
 
7298
7298
  type ProductQuickSelectFragment = Pick<Product, 'id' | 'title' | 'handle' | 'averageRating' | 'baseID' | 'description' | 'sku' | 'vendor'> & {
7299
- featuredImage?: Maybe<Pick<Media, 'id' | 'contentType' | 'src' | 'width' | 'height' | 'alt'>>;
7299
+ featuredImage?: Maybe<Pick<Media, 'id' | 'contentType' | 'previewImage' | 'src' | 'width' | 'height' | 'alt'>>;
7300
7300
  options?: Maybe<Array<Pick<ProductOption, 'id' | 'name' | 'optionType'> & {
7301
7301
  values: Array<Pick<ProductOptionValue, 'id' | 'label' | 'isDefault' | 'baseID'>>;
7302
7302
  }>>;
@@ -7304,7 +7304,7 @@ type ProductQuickSelectFragment = Pick<Product, 'id' | 'title' | 'handle' | 'ave
7304
7304
  edges: Array<{
7305
7305
  node?: Maybe<Pick<ProductVariant, 'id' | 'title' | 'barcode' | 'costPrice' | 'height' | 'inventoryQuantity' | 'inventoryStatus' | 'length' | 'price' | 'salePrice' | 'sku' | 'baseID' | 'weight' | 'width'> & {
7306
7306
  selectedOptions: Array<Pick<SelectedOption, 'name' | 'value' | 'optionType'>>;
7307
- media?: Maybe<Pick<Media, 'id' | 'contentType' | 'src' | 'width' | 'height' | 'alt'>>;
7307
+ media?: Maybe<Pick<Media, 'id' | 'contentType' | 'previewImage' | 'src' | 'width' | 'height' | 'alt'>>;
7308
7308
  }>;
7309
7309
  }>;
7310
7310
  }>;
@@ -7343,7 +7343,7 @@ declare const useProductListStore: <U>(selector: (state: ExtractState<StoreApi<P
7343
7343
  type ProductSelectFragment = Pick<Product, 'id' | 'title' | 'description' | 'descriptionHtml' | 'handle' | 'averageRating' | 'isStorefront' | 'isSample' | 'baseID' | 'sku' | 'vendor'> & {
7344
7344
  medias?: Maybe<{
7345
7345
  edges: Array<Pick<MediaEdge, 'cursor'> & {
7346
- node?: Maybe<Pick<Media, 'id' | 'contentType' | 'src' | 'width' | 'height' | 'alt'>>;
7346
+ node?: Maybe<Pick<Media, 'id' | 'contentType' | 'previewImage' | 'src' | 'width' | 'height' | 'alt'>>;
7347
7347
  }>;
7348
7348
  pageInfo?: Maybe<Pick<PageInfo, 'endCursor' | 'hasNextPage'>>;
7349
7349
  }>;
@@ -7351,7 +7351,7 @@ type ProductSelectFragment = Pick<Product, 'id' | 'title' | 'description' | 'des
7351
7351
  edges: Array<Pick<ProductVariantEdge, 'cursor'> & {
7352
7352
  node?: Maybe<Pick<ProductVariant, 'id' | 'title' | 'barcode' | 'baseID' | 'costPrice' | 'height' | 'inventoryPolicy' | 'inventoryQuantity' | 'inventoryStatus' | 'isDigital' | 'length' | 'lowInventoryAmount' | 'manageInventory' | 'mediaId' | 'platform' | 'price' | 'salePrice' | 'sku' | 'soldIndividually' | 'weight' | 'width'> & {
7353
7353
  selectedOptions: Array<Pick<SelectedOption, 'name' | 'value' | 'optionType'>>;
7354
- media?: Maybe<Pick<Media, 'id' | 'contentType' | 'src' | 'width' | 'height' | 'alt'>>;
7354
+ media?: Maybe<Pick<Media, 'id' | 'contentType' | 'previewImage' | 'src' | 'width' | 'height' | 'alt'>>;
7355
7355
  }>;
7356
7356
  }>;
7357
7357
  pageInfo?: Maybe<Pick<PageInfo, 'hasNextPage' | 'endCursor'>>;
@@ -7359,10 +7359,10 @@ type ProductSelectFragment = Pick<Product, 'id' | 'title' | 'description' | 'des
7359
7359
  options?: Maybe<Array<Pick<ProductOption, 'id' | 'name' | 'optionType'> & {
7360
7360
  values: Array<Pick<ProductOptionValue, 'id' | 'label' | 'isDefault' | 'baseID'>>;
7361
7361
  }>>;
7362
- featuredImage?: Maybe<Pick<Media, 'id' | 'contentType' | 'src' | 'width' | 'height' | 'alt'>>;
7362
+ featuredImage?: Maybe<Pick<Media, 'id' | 'contentType' | 'previewImage' | 'src' | 'width' | 'height' | 'alt'>>;
7363
7363
  };
7364
7364
 
7365
- type MediaSelectFragment = Pick<Media, 'id' | 'contentType' | 'src' | 'width' | 'height' | 'alt'>;
7365
+ type MediaSelectFragment = Pick<Media, 'id' | 'contentType' | 'previewImage' | 'src' | 'width' | 'height' | 'alt'>;
7366
7366
 
7367
7367
  type AttributeProp = {
7368
7368
  key: string;
@@ -7514,7 +7514,7 @@ type CollectionDetailFilterQueryResponse = {
7514
7514
  node?: Maybe<Pick<Product, 'id' | 'title' | 'description' | 'descriptionHtml' | 'handle' | 'averageRating' | 'isStorefront' | 'isSample' | 'baseID' | 'sku' | 'vendor'> & {
7515
7515
  medias?: Maybe<{
7516
7516
  edges: Array<Pick<MediaEdge, 'cursor'> & {
7517
- node?: Maybe<Pick<Media, 'id' | 'contentType' | 'src' | 'width' | 'height' | 'alt'>>;
7517
+ node?: Maybe<Pick<Media, 'id' | 'contentType' | 'previewImage' | 'src' | 'width' | 'height' | 'alt'>>;
7518
7518
  }>;
7519
7519
  pageInfo?: Maybe<Pick<PageInfo, 'endCursor' | 'hasNextPage'>>;
7520
7520
  }>;
@@ -7522,7 +7522,7 @@ type CollectionDetailFilterQueryResponse = {
7522
7522
  edges: Array<Pick<ProductVariantEdge, 'cursor'> & {
7523
7523
  node?: Maybe<Pick<ProductVariant, 'id' | 'title' | 'barcode' | 'baseID' | 'costPrice' | 'height' | 'inventoryPolicy' | 'inventoryQuantity' | 'inventoryStatus' | 'isDigital' | 'length' | 'lowInventoryAmount' | 'manageInventory' | 'mediaId' | 'platform' | 'price' | 'salePrice' | 'sku' | 'soldIndividually' | 'weight' | 'width'> & {
7524
7524
  selectedOptions: Array<Pick<SelectedOption, 'name' | 'value' | 'optionType'>>;
7525
- media?: Maybe<Pick<Media, 'id' | 'contentType' | 'src' | 'width' | 'height' | 'alt'>>;
7525
+ media?: Maybe<Pick<Media, 'id' | 'contentType' | 'previewImage' | 'src' | 'width' | 'height' | 'alt'>>;
7526
7526
  }>;
7527
7527
  }>;
7528
7528
  pageInfo?: Maybe<Pick<PageInfo, 'hasNextPage' | 'endCursor'>>;
@@ -7530,7 +7530,7 @@ type CollectionDetailFilterQueryResponse = {
7530
7530
  options?: Maybe<Array<Pick<ProductOption, 'id' | 'name' | 'optionType'> & {
7531
7531
  values: Array<Pick<ProductOptionValue, 'id' | 'label' | 'isDefault' | 'baseID'>>;
7532
7532
  }>>;
7533
- featuredImage?: Maybe<Pick<Media, 'id' | 'contentType' | 'src' | 'width' | 'height' | 'alt'>>;
7533
+ featuredImage?: Maybe<Pick<Media, 'id' | 'contentType' | 'previewImage' | 'src' | 'width' | 'height' | 'alt'>>;
7534
7534
  }>;
7535
7535
  }>;
7536
7536
  pageInfo?: Maybe<Pick<PageInfo, 'endCursor' | 'hasNextPage'>>;
@@ -7559,7 +7559,7 @@ type CollectionQueryResponse = {
7559
7559
  node?: Maybe<Pick<Product, 'id' | 'title' | 'description' | 'descriptionHtml' | 'handle' | 'averageRating' | 'isStorefront' | 'isSample' | 'baseID' | 'sku' | 'vendor'> & {
7560
7560
  medias?: Maybe<{
7561
7561
  edges: Array<Pick<MediaEdge, 'cursor'> & {
7562
- node?: Maybe<Pick<Media, 'id' | 'contentType' | 'src' | 'width' | 'height' | 'alt'>>;
7562
+ node?: Maybe<Pick<Media, 'id' | 'contentType' | 'previewImage' | 'src' | 'width' | 'height' | 'alt'>>;
7563
7563
  }>;
7564
7564
  pageInfo?: Maybe<Pick<PageInfo, 'endCursor' | 'hasNextPage'>>;
7565
7565
  }>;
@@ -7567,7 +7567,7 @@ type CollectionQueryResponse = {
7567
7567
  edges: Array<Pick<ProductVariantEdge, 'cursor'> & {
7568
7568
  node?: Maybe<Pick<ProductVariant, 'id' | 'title' | 'barcode' | 'baseID' | 'costPrice' | 'height' | 'inventoryPolicy' | 'inventoryQuantity' | 'inventoryStatus' | 'isDigital' | 'length' | 'lowInventoryAmount' | 'manageInventory' | 'mediaId' | 'platform' | 'price' | 'salePrice' | 'sku' | 'soldIndividually' | 'weight' | 'width'> & {
7569
7569
  selectedOptions: Array<Pick<SelectedOption, 'name' | 'value' | 'optionType'>>;
7570
- media?: Maybe<Pick<Media, 'id' | 'contentType' | 'src' | 'width' | 'height' | 'alt'>>;
7570
+ media?: Maybe<Pick<Media, 'id' | 'contentType' | 'previewImage' | 'src' | 'width' | 'height' | 'alt'>>;
7571
7571
  }>;
7572
7572
  }>;
7573
7573
  pageInfo?: Maybe<Pick<PageInfo, 'hasNextPage' | 'endCursor'>>;
@@ -7575,7 +7575,7 @@ type CollectionQueryResponse = {
7575
7575
  options?: Maybe<Array<Pick<ProductOption, 'id' | 'name' | 'optionType'> & {
7576
7576
  values: Array<Pick<ProductOptionValue, 'id' | 'label' | 'isDefault' | 'baseID'>>;
7577
7577
  }>>;
7578
- featuredImage?: Maybe<Pick<Media, 'id' | 'contentType' | 'src' | 'width' | 'height' | 'alt'>>;
7578
+ featuredImage?: Maybe<Pick<Media, 'id' | 'contentType' | 'previewImage' | 'src' | 'width' | 'height' | 'alt'>>;
7579
7579
  }>;
7580
7580
  }>;
7581
7581
  pageInfo?: Maybe<Pick<PageInfo, 'endCursor' | 'hasNextPage' | 'hasPreviousPage' | 'startCursor'>>;
@@ -7643,7 +7643,7 @@ type ProductsQueryResponse = {
7643
7643
  node?: Maybe<Pick<Product, 'id' | 'title' | 'description' | 'descriptionHtml' | 'handle' | 'averageRating' | 'isStorefront' | 'isSample' | 'baseID' | 'sku' | 'vendor'> & {
7644
7644
  medias?: Maybe<{
7645
7645
  edges: Array<Pick<MediaEdge, 'cursor'> & {
7646
- node?: Maybe<Pick<Media, 'id' | 'contentType' | 'src' | 'width' | 'height' | 'alt'>>;
7646
+ node?: Maybe<Pick<Media, 'id' | 'contentType' | 'previewImage' | 'src' | 'width' | 'height' | 'alt'>>;
7647
7647
  }>;
7648
7648
  pageInfo?: Maybe<Pick<PageInfo, 'endCursor' | 'hasNextPage'>>;
7649
7649
  }>;
@@ -7651,7 +7651,7 @@ type ProductsQueryResponse = {
7651
7651
  edges: Array<Pick<ProductVariantEdge, 'cursor'> & {
7652
7652
  node?: Maybe<Pick<ProductVariant, 'id' | 'title' | 'barcode' | 'baseID' | 'costPrice' | 'height' | 'inventoryPolicy' | 'inventoryQuantity' | 'inventoryStatus' | 'isDigital' | 'length' | 'lowInventoryAmount' | 'manageInventory' | 'mediaId' | 'platform' | 'price' | 'salePrice' | 'sku' | 'soldIndividually' | 'weight' | 'width'> & {
7653
7653
  selectedOptions: Array<Pick<SelectedOption, 'name' | 'value' | 'optionType'>>;
7654
- media?: Maybe<Pick<Media, 'id' | 'contentType' | 'src' | 'width' | 'height' | 'alt'>>;
7654
+ media?: Maybe<Pick<Media, 'id' | 'contentType' | 'previewImage' | 'src' | 'width' | 'height' | 'alt'>>;
7655
7655
  }>;
7656
7656
  }>;
7657
7657
  pageInfo?: Maybe<Pick<PageInfo, 'hasNextPage' | 'endCursor'>>;
@@ -7659,7 +7659,7 @@ type ProductsQueryResponse = {
7659
7659
  options?: Maybe<Array<Pick<ProductOption, 'id' | 'name' | 'optionType'> & {
7660
7660
  values: Array<Pick<ProductOptionValue, 'id' | 'label' | 'isDefault' | 'baseID'>>;
7661
7661
  }>>;
7662
- featuredImage?: Maybe<Pick<Media, 'id' | 'contentType' | 'src' | 'width' | 'height' | 'alt'>>;
7662
+ featuredImage?: Maybe<Pick<Media, 'id' | 'contentType' | 'previewImage' | 'src' | 'width' | 'height' | 'alt'>>;
7663
7663
  }>;
7664
7664
  }>;
7665
7665
  pageInfo?: Maybe<Pick<PageInfo, 'endCursor' | 'hasNextPage'>>;
@@ -7693,7 +7693,7 @@ declare const PreviewPageDocument: string;
7693
7693
 
7694
7694
  type VariantSelectFragment = Pick<ProductVariant, 'id' | 'title' | 'barcode' | 'baseID' | 'costPrice' | 'height' | 'inventoryPolicy' | 'inventoryQuantity' | 'inventoryStatus' | 'isDigital' | 'length' | 'lowInventoryAmount' | 'manageInventory' | 'mediaId' | 'platform' | 'price' | 'salePrice' | 'sku' | 'soldIndividually' | 'weight' | 'width'> & {
7695
7695
  selectedOptions: Array<Pick<SelectedOption, 'name' | 'value' | 'optionType'>>;
7696
- media?: Maybe<Pick<Media, 'id' | 'contentType' | 'src' | 'width' | 'height' | 'alt'>>;
7696
+ media?: Maybe<Pick<Media, 'id' | 'contentType' | 'previewImage' | 'src' | 'width' | 'height' | 'alt'>>;
7697
7697
  };
7698
7698
 
7699
7699
  type BorderStyle = StateProp<Border> | ResponsiveStateProp<Border>;
@@ -9405,7 +9405,7 @@ type RequiredCursorEdge<T> = {
9405
9405
  };
9406
9406
  declare const fetchVariants: (fetcher: FetchFunc, { id, isSample, isStorefront }: FetchProductParams) => Promise<RequiredCursorEdge<VariantSelectFragment>[]>;
9407
9407
  declare const fetchMedias: (fetcher: FetchFunc, { id, isSample, isStorefront }: FetchProductParams) => Promise<(Pick<MediaEdge, "cursor"> & {
9408
- node?: Maybe<Pick<Media, "width" | "height" | "id" | "contentType" | "src" | "alt">>;
9408
+ node?: Maybe<Pick<Media, "width" | "height" | "id" | "contentType" | "previewImage" | "src" | "alt">>;
9409
9409
  })[]>;
9410
9410
 
9411
9411
  type FetchProductsParams = {
@@ -9602,11 +9602,11 @@ declare const useSelectedOption: () => {
9602
9602
  };
9603
9603
  declare const useVariants: () => Maybe<Pick<ProductVariant, "title" | "width" | "length" | "weight" | "height" | "id" | "barcode" | "baseID" | "costPrice" | "inventoryPolicy" | "inventoryQuantity" | "inventoryStatus" | "isDigital" | "lowInventoryAmount" | "manageInventory" | "mediaId" | "platform" | "price" | "salePrice" | "sku" | "soldIndividually"> & {
9604
9604
  selectedOptions: Pick<SelectedOption, "value" | "name" | "optionType">[];
9605
- media?: Maybe<Pick<Media, "width" | "height" | "id" | "contentType" | "src" | "alt">>;
9605
+ media?: Maybe<Pick<Media, "width" | "height" | "id" | "contentType" | "previewImage" | "src" | "alt">>;
9606
9606
  }>[];
9607
9607
  declare const useVariant: (id: string) => Maybe<Pick<ProductVariant, "title" | "width" | "length" | "weight" | "height" | "id" | "barcode" | "baseID" | "costPrice" | "inventoryPolicy" | "inventoryQuantity" | "inventoryStatus" | "isDigital" | "lowInventoryAmount" | "manageInventory" | "mediaId" | "platform" | "price" | "salePrice" | "sku" | "soldIndividually"> & {
9608
9608
  selectedOptions: Pick<SelectedOption, "value" | "name" | "optionType">[];
9609
- media?: Maybe<Pick<Media, "width" | "height" | "id" | "contentType" | "src" | "alt">>;
9609
+ media?: Maybe<Pick<Media, "width" | "height" | "id" | "contentType" | "previewImage" | "src" | "alt">>;
9610
9610
  }>;
9611
9611
  declare const useCurrentVariant: () => Maybe<VariantSelectFragment>;
9612
9612
  declare const useCurrentVariantInStock: () => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "1.17.9",
3
+ "version": "1.17.10",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "devDependencies": {
27
27
  "@gem-sdk/adapter-shopify": "1.12.0",
28
- "@gem-sdk/styles": "1.17.7"
28
+ "@gem-sdk/styles": "1.17.10"
29
29
  },
30
30
  "dependencies": {
31
31
  "react-error-boundary": "4.0.10",