@shopify/hydrogen 0.6.2 → 0.7.1

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.
Files changed (114) hide show
  1. package/dist/esnext/components/AddToCartButton/AddToCartButton.client.d.ts +1 -1
  2. package/dist/esnext/components/AddToCartButton/AddToCartButton.client.js +3 -3
  3. package/dist/esnext/components/CartLineProvider/context.d.ts +3 -3
  4. package/dist/esnext/components/CartProvider/CartProvider.client.js +0 -1
  5. package/dist/esnext/components/ExternalVideo/ExternalVideo.d.ts +1 -1
  6. package/dist/esnext/components/Image/Image.d.ts +1 -1
  7. package/dist/esnext/components/MediaFile/MediaFile.d.ts +1 -1
  8. package/dist/esnext/components/Metafield/Metafield.client.d.ts +1 -1
  9. package/dist/esnext/components/Metafield/Metafield.client.js +8 -0
  10. package/dist/esnext/components/Metafield/MetafieldFragment.d.ts +16 -1
  11. package/dist/esnext/components/Metafield/components/StarRating/StarRating.d.ts +1 -1
  12. package/dist/esnext/components/Metafield/index.d.ts +2 -2
  13. package/dist/esnext/components/Model3D/Model3D.client.d.ts +3 -1
  14. package/dist/esnext/components/Model3D/Model3D.client.js +1 -1
  15. package/dist/esnext/components/Money/Money.client.d.ts +1 -1
  16. package/dist/esnext/components/ProductProvider/ProductProvider.client.d.ts +1 -1
  17. package/dist/esnext/components/ProductProvider/context.d.ts +2 -2
  18. package/dist/esnext/components/ProductProvider/types.d.ts +2 -2
  19. package/dist/esnext/components/SelectedVariantAddToCartButton/SelectedVariantAddToCartButton.client.d.ts +1 -1
  20. package/dist/esnext/components/SelectedVariantAddToCartButton/SelectedVariantAddToCartButton.client.js +1 -1
  21. package/dist/esnext/components/UnitPrice/UnitPrice.client.d.ts +1 -1
  22. package/dist/esnext/components/Video/Video.d.ts +1 -1
  23. package/dist/esnext/components/index.d.ts +2 -2
  24. package/dist/esnext/entry-server.js +43 -19
  25. package/dist/esnext/foundation/Router/ServerStateRouter.client.js +5 -3
  26. package/dist/esnext/foundation/ServerStateProvider/ServerStateProvider.client.d.ts +19 -11
  27. package/dist/esnext/foundation/ServerStateProvider/ServerStateProvider.client.js +21 -20
  28. package/dist/esnext/foundation/ServerStateProvider/index.d.ts +2 -1
  29. package/dist/esnext/foundation/ShopifyProvider/ShopifyServerProvider.server.js +1 -1
  30. package/dist/esnext/{hooks → foundation}/useQuery/QueryProvider.d.ts +0 -0
  31. package/dist/esnext/{hooks → foundation}/useQuery/QueryProvider.js +0 -0
  32. package/dist/esnext/{hooks → foundation}/useQuery/hooks.d.ts +0 -0
  33. package/dist/esnext/{hooks → foundation}/useQuery/hooks.js +13 -3
  34. package/dist/esnext/{hooks → foundation}/useQuery/index.d.ts +0 -0
  35. package/dist/esnext/{hooks → foundation}/useQuery/index.js +0 -0
  36. package/dist/esnext/foundation/useServerState/use-server-state.d.ts +2 -2
  37. package/dist/esnext/foundation/useServerState/use-server-state.js +1 -1
  38. package/dist/esnext/framework/ClientMarker/ClientMarker.js +0 -1
  39. package/dist/esnext/framework/Hydration/Cache.client.js +3 -1
  40. package/dist/esnext/framework/Hydration/ServerComponentResponse.server.d.ts +10 -0
  41. package/dist/esnext/framework/Hydration/ServerComponentResponse.server.js +13 -0
  42. package/dist/esnext/framework/Hydration/client-imports.d.ts +1 -1
  43. package/dist/esnext/framework/Hydration/client-imports.js +1 -1
  44. package/dist/esnext/framework/Hydration/wire.server.js +1 -1
  45. package/dist/esnext/framework/Hydration/writer.server.js +1 -0
  46. package/dist/esnext/framework/middleware.d.ts +5 -1
  47. package/dist/esnext/framework/middleware.js +12 -8
  48. package/dist/esnext/framework/plugins/resolver.d.ts +1 -0
  49. package/dist/esnext/framework/plugins/resolver.js +3 -0
  50. package/dist/esnext/framework/plugins/vite-plugin-hydrogen-config.js +4 -1
  51. package/dist/esnext/framework/plugins/vite-plugin-hydrogen-middleware.js +8 -2
  52. package/dist/esnext/framework/plugins/vite-plugin-react-server-components-shim.js +11 -9
  53. package/dist/esnext/framework/server-components.js +25 -47
  54. package/dist/esnext/graphql/graphql-constants.d.ts +74 -37
  55. package/dist/esnext/graphql/graphql-constants.js +89 -15
  56. package/dist/esnext/handle-event.js +8 -4
  57. package/dist/esnext/hooks/index.d.ts +1 -1
  58. package/dist/esnext/hooks/index.js +1 -1
  59. package/dist/esnext/hooks/useCartLine/useCartLine.d.ts +3 -3
  60. package/dist/esnext/hooks/useMoney/hooks.js +2 -16
  61. package/dist/esnext/hooks/useParsedMetafields/useParsedMetafields.d.ts +2 -3
  62. package/dist/esnext/hooks/useProductOptions/types.d.ts +2 -3
  63. package/dist/esnext/hooks/useShopQuery/hooks.d.ts +4 -2
  64. package/dist/esnext/hooks/useShopQuery/hooks.js +6 -3
  65. package/dist/esnext/types.d.ts +19 -3
  66. package/dist/esnext/utilities/flattenConnection/flattenConnection.d.ts +0 -7
  67. package/dist/esnext/utilities/flattenConnection/flattenConnection.js +0 -7
  68. package/dist/esnext/utilities/isClient/isClient.d.ts +0 -4
  69. package/dist/esnext/utilities/isClient/isClient.js +0 -4
  70. package/dist/esnext/utilities/isServer/isServer.d.ts +0 -4
  71. package/dist/esnext/utilities/isServer/isServer.js +0 -4
  72. package/dist/esnext/utilities/parseMetafieldValue/parseMetafieldValue.d.ts +2 -33
  73. package/dist/esnext/utilities/parseMetafieldValue/parseMetafieldValue.js +0 -31
  74. package/dist/esnext/version.d.ts +1 -1
  75. package/dist/esnext/version.js +1 -1
  76. package/dist/node/framework/ClientMarker/ClientMarker.js +2 -3
  77. package/dist/node/framework/Hydration/Cache.client.js +7 -5
  78. package/dist/node/framework/Hydration/HydrationContext.server.js +1 -1
  79. package/dist/node/framework/Hydration/ServerComponentResponse.server.d.ts +10 -0
  80. package/dist/node/framework/Hydration/ServerComponentResponse.server.js +15 -2
  81. package/dist/node/framework/Hydration/client-imports.d.ts +1 -1
  82. package/dist/node/framework/Hydration/client-imports.js +2 -2
  83. package/dist/node/framework/Hydration/react-utils.js +3 -3
  84. package/dist/node/framework/Hydration/wire.server.js +2 -2
  85. package/dist/node/framework/Hydration/writer.server.js +1 -0
  86. package/dist/node/framework/cache.js +3 -3
  87. package/dist/node/framework/middleware.d.ts +5 -1
  88. package/dist/node/framework/middleware.js +17 -11
  89. package/dist/node/framework/plugin.js +5 -5
  90. package/dist/node/framework/plugins/resolver.d.ts +1 -0
  91. package/dist/node/framework/plugins/resolver.js +7 -0
  92. package/dist/node/framework/plugins/vite-plugin-hydrogen-config.js +4 -1
  93. package/dist/node/framework/plugins/vite-plugin-hydrogen-middleware.js +8 -2
  94. package/dist/node/framework/plugins/vite-plugin-react-server-components-shim.js +12 -10
  95. package/dist/node/framework/server-components.js +27 -49
  96. package/dist/node/handle-event.js +12 -8
  97. package/dist/node/types.d.ts +19 -3
  98. package/dist/node/utilities/fetch.js +1 -1
  99. package/dist/node/utilities/flattenConnection/flattenConnection.d.ts +0 -7
  100. package/dist/node/utilities/flattenConnection/flattenConnection.js +0 -7
  101. package/dist/node/utilities/isClient/isClient.d.ts +0 -4
  102. package/dist/node/utilities/isClient/isClient.js +0 -4
  103. package/dist/node/utilities/isServer/isServer.d.ts +0 -4
  104. package/dist/node/utilities/isServer/isServer.js +1 -5
  105. package/dist/node/utilities/parseMetafieldValue/parseMetafieldValue.d.ts +2 -33
  106. package/dist/node/utilities/parseMetafieldValue/parseMetafieldValue.js +0 -31
  107. package/dist/node/utilities/video_parameters.js +1 -1
  108. package/dist/node/version.d.ts +1 -1
  109. package/dist/node/version.js +1 -1
  110. package/dist/worker/framework/Hydration/ServerComponentResponse.server.d.ts +10 -0
  111. package/dist/worker/framework/Hydration/ServerComponentResponse.server.js +13 -0
  112. package/dist/worker/handle-event.js +8 -4
  113. package/dist/worker/types.d.ts +19 -3
  114. package/package.json +9 -7
@@ -99,7 +99,7 @@
99
99
  *
100
100
  *```
101
101
  */
102
- export declare const CartAttributesUpdate: string;
102
+ export declare const CartAttributesUpdate = "\nmutation CartAttributesUpdate($attributes: [AttributeInput!]!, $cartId: ID!, $numCartLines: Int = 250, $country: CountryCode = ZZ) @inContext(country: $country) {\n cartAttributesUpdate(attributes: $attributes, cartId: $cartId) {\n cart {\n ...CartFragment\n }\n }\n}\n\nfragment CartFragment on Cart {\n id\n checkoutUrl\n buyerIdentity {\n countryCode\n customer {\n id\n email\n firstName\n lastName\n displayName\n }\n email\n phone\n }\n lines(first: $numCartLines) {\n edges {\n node {\n id\n quantity\n attributes {\n key\n value\n }\n merchandise {\n ... on ProductVariant {\n id\n availableForSale\n compareAtPriceV2 {\n ...MoneyFragment\n }\n priceV2 {\n ...MoneyFragment\n }\n requiresShipping\n title\n image {\n ...ImageFragment\n }\n product {\n handle\n title\n }\n selectedOptions {\n name\n value\n }\n }\n }\n }\n }\n }\n estimatedCost {\n subtotalAmount {\n ...MoneyFragment\n }\n totalAmount {\n ...MoneyFragment\n }\n totalDutyAmount {\n ...MoneyFragment\n }\n totalTaxAmount {\n ...MoneyFragment\n }\n }\n note\n attributes {\n key\n value\n }\n discountCodes {\n code\n }\n}\n\nfragment MoneyFragment on MoneyV2 {\n currencyCode\n amount\n}\nfragment ImageFragment on Image {\n id\n url\n altText\n width\n height\n}\n";
103
103
  /**
104
104
  *```
105
105
  *
@@ -206,7 +206,7 @@ export declare const CartAttributesUpdate: string;
206
206
  *
207
207
  *```
208
208
  */
209
- export declare const CartBuyerIdentityUpdate: string;
209
+ export declare const CartBuyerIdentityUpdate = "\nmutation CartBuyerIdentityUpdate(\n $cartId: ID!\n $buyerIdentity: CartBuyerIdentityInput!\n $numCartLines: Int = 250\n $country: CountryCode = ZZ\n) @inContext(country: $country) {\n cartBuyerIdentityUpdate(cartId: $cartId, buyerIdentity: $buyerIdentity) {\n cart {\n ...CartFragment\n }\n }\n}\n\nfragment CartFragment on Cart {\n id\n checkoutUrl\n buyerIdentity {\n countryCode\n customer {\n id\n email\n firstName\n lastName\n displayName\n }\n email\n phone\n }\n lines(first: $numCartLines) {\n edges {\n node {\n id\n quantity\n attributes {\n key\n value\n }\n merchandise {\n ... on ProductVariant {\n id\n availableForSale\n compareAtPriceV2 {\n ...MoneyFragment\n }\n priceV2 {\n ...MoneyFragment\n }\n requiresShipping\n title\n image {\n ...ImageFragment\n }\n product {\n handle\n title\n }\n selectedOptions {\n name\n value\n }\n }\n }\n }\n }\n }\n estimatedCost {\n subtotalAmount {\n ...MoneyFragment\n }\n totalAmount {\n ...MoneyFragment\n }\n totalDutyAmount {\n ...MoneyFragment\n }\n totalTaxAmount {\n ...MoneyFragment\n }\n }\n note\n attributes {\n key\n value\n }\n discountCodes {\n code\n }\n}\n\nfragment MoneyFragment on MoneyV2 {\n currencyCode\n amount\n}\nfragment ImageFragment on Image {\n id\n url\n altText\n width\n height\n}\n";
210
210
  /**
211
211
  *```
212
212
  *
@@ -308,7 +308,7 @@ export declare const CartBuyerIdentityUpdate: string;
308
308
  *
309
309
  *```
310
310
  */
311
- export declare const CartCreate: string;
311
+ export declare const CartCreate = "\nmutation CartCreate($input: CartInput!, $numCartLines: Int = 250, $country: CountryCode = ZZ) @inContext(country: $country) {\n cartCreate(input: $input) {\n cart {\n ...CartFragment\n }\n }\n}\n\nfragment CartFragment on Cart {\n id\n checkoutUrl\n buyerIdentity {\n countryCode\n customer {\n id\n email\n firstName\n lastName\n displayName\n }\n email\n phone\n }\n lines(first: $numCartLines) {\n edges {\n node {\n id\n quantity\n attributes {\n key\n value\n }\n merchandise {\n ... on ProductVariant {\n id\n availableForSale\n compareAtPriceV2 {\n ...MoneyFragment\n }\n priceV2 {\n ...MoneyFragment\n }\n requiresShipping\n title\n image {\n ...ImageFragment\n }\n product {\n handle\n title\n }\n selectedOptions {\n name\n value\n }\n }\n }\n }\n }\n }\n estimatedCost {\n subtotalAmount {\n ...MoneyFragment\n }\n totalAmount {\n ...MoneyFragment\n }\n totalDutyAmount {\n ...MoneyFragment\n }\n totalTaxAmount {\n ...MoneyFragment\n }\n }\n note\n attributes {\n key\n value\n }\n discountCodes {\n code\n }\n}\n\nfragment MoneyFragment on MoneyV2 {\n currencyCode\n amount\n}\nfragment ImageFragment on Image {\n id\n url\n altText\n width\n height\n}\n";
312
312
  /**
313
313
  *```
314
314
  *
@@ -410,7 +410,7 @@ export declare const CartCreate: string;
410
410
  *
411
411
  *```
412
412
  */
413
- export declare const CartDiscountCodesUpdate: string;
413
+ export declare const CartDiscountCodesUpdate = "\nmutation CartDiscountCodesUpdate($cartId: ID!, $discountCodes: [String!], $numCartLines: Int = 250, $country: CountryCode = ZZ) @inContext(country: $country) {\n cartDiscountCodesUpdate(cartId: $cartId, discountCodes: $discountCodes) {\n cart {\n ...CartFragment\n }\n }\n}\n\nfragment CartFragment on Cart {\n id\n checkoutUrl\n buyerIdentity {\n countryCode\n customer {\n id\n email\n firstName\n lastName\n displayName\n }\n email\n phone\n }\n lines(first: $numCartLines) {\n edges {\n node {\n id\n quantity\n attributes {\n key\n value\n }\n merchandise {\n ... on ProductVariant {\n id\n availableForSale\n compareAtPriceV2 {\n ...MoneyFragment\n }\n priceV2 {\n ...MoneyFragment\n }\n requiresShipping\n title\n image {\n ...ImageFragment\n }\n product {\n handle\n title\n }\n selectedOptions {\n name\n value\n }\n }\n }\n }\n }\n }\n estimatedCost {\n subtotalAmount {\n ...MoneyFragment\n }\n totalAmount {\n ...MoneyFragment\n }\n totalDutyAmount {\n ...MoneyFragment\n }\n totalTaxAmount {\n ...MoneyFragment\n }\n }\n note\n attributes {\n key\n value\n }\n discountCodes {\n code\n }\n}\n\nfragment MoneyFragment on MoneyV2 {\n currencyCode\n amount\n}\nfragment ImageFragment on Image {\n id\n url\n altText\n width\n height\n}\n";
414
414
  /**
415
415
  *```
416
416
  * fragment CartFragment on Cart {
@@ -503,7 +503,7 @@ export declare const CartDiscountCodesUpdate: string;
503
503
  *
504
504
  *```
505
505
  */
506
- export declare const CartFragment: string;
506
+ export declare const CartFragment = "fragment CartFragment on Cart {\n id\n checkoutUrl\n buyerIdentity {\n countryCode\n customer {\n id\n email\n firstName\n lastName\n displayName\n }\n email\n phone\n }\n lines(first: $numCartLines) {\n edges {\n node {\n id\n quantity\n attributes {\n key\n value\n }\n merchandise {\n ... on ProductVariant {\n id\n availableForSale\n compareAtPriceV2 {\n ...MoneyFragment\n }\n priceV2 {\n ...MoneyFragment\n }\n requiresShipping\n title\n image {\n ...ImageFragment\n }\n product {\n handle\n title\n }\n selectedOptions {\n name\n value\n }\n }\n }\n }\n }\n }\n estimatedCost {\n subtotalAmount {\n ...MoneyFragment\n }\n totalAmount {\n ...MoneyFragment\n }\n totalDutyAmount {\n ...MoneyFragment\n }\n totalTaxAmount {\n ...MoneyFragment\n }\n }\n note\n attributes {\n key\n value\n }\n discountCodes {\n code\n }\n}\n\nfragment MoneyFragment on MoneyV2 {\n currencyCode\n amount\n}\nfragment ImageFragment on Image {\n id\n url\n altText\n width\n height\n}\n";
507
507
  /**
508
508
  *```
509
509
  *
@@ -605,7 +605,7 @@ export declare const CartFragment: string;
605
605
  *
606
606
  *```
607
607
  */
608
- export declare const CartLineAdd: string;
608
+ export declare const CartLineAdd = "\nmutation CartLineAdd($cartId: ID!, $lines: [CartLineInput!]!, $numCartLines: Int = 250, $country: CountryCode = ZZ) @inContext(country: $country) {\n cartLinesAdd(cartId: $cartId, lines: $lines) {\n cart {\n ...CartFragment\n }\n }\n}\n\nfragment CartFragment on Cart {\n id\n checkoutUrl\n buyerIdentity {\n countryCode\n customer {\n id\n email\n firstName\n lastName\n displayName\n }\n email\n phone\n }\n lines(first: $numCartLines) {\n edges {\n node {\n id\n quantity\n attributes {\n key\n value\n }\n merchandise {\n ... on ProductVariant {\n id\n availableForSale\n compareAtPriceV2 {\n ...MoneyFragment\n }\n priceV2 {\n ...MoneyFragment\n }\n requiresShipping\n title\n image {\n ...ImageFragment\n }\n product {\n handle\n title\n }\n selectedOptions {\n name\n value\n }\n }\n }\n }\n }\n }\n estimatedCost {\n subtotalAmount {\n ...MoneyFragment\n }\n totalAmount {\n ...MoneyFragment\n }\n totalDutyAmount {\n ...MoneyFragment\n }\n totalTaxAmount {\n ...MoneyFragment\n }\n }\n note\n attributes {\n key\n value\n }\n discountCodes {\n code\n }\n}\n\nfragment MoneyFragment on MoneyV2 {\n currencyCode\n amount\n}\nfragment ImageFragment on Image {\n id\n url\n altText\n width\n height\n}\n";
609
609
  /**
610
610
  *```
611
611
  *
@@ -707,7 +707,7 @@ export declare const CartLineAdd: string;
707
707
  *
708
708
  *```
709
709
  */
710
- export declare const CartLineRemove: string;
710
+ export declare const CartLineRemove = "\nmutation CartLineRemove($cartId: ID!, $lines: [ID!]!, $numCartLines: Int = 250, $country: CountryCode = ZZ) @inContext(country: $country) {\n cartLinesRemove(cartId: $cartId, lineIds: $lines) {\n cart {\n ...CartFragment\n }\n }\n}\n\nfragment CartFragment on Cart {\n id\n checkoutUrl\n buyerIdentity {\n countryCode\n customer {\n id\n email\n firstName\n lastName\n displayName\n }\n email\n phone\n }\n lines(first: $numCartLines) {\n edges {\n node {\n id\n quantity\n attributes {\n key\n value\n }\n merchandise {\n ... on ProductVariant {\n id\n availableForSale\n compareAtPriceV2 {\n ...MoneyFragment\n }\n priceV2 {\n ...MoneyFragment\n }\n requiresShipping\n title\n image {\n ...ImageFragment\n }\n product {\n handle\n title\n }\n selectedOptions {\n name\n value\n }\n }\n }\n }\n }\n }\n estimatedCost {\n subtotalAmount {\n ...MoneyFragment\n }\n totalAmount {\n ...MoneyFragment\n }\n totalDutyAmount {\n ...MoneyFragment\n }\n totalTaxAmount {\n ...MoneyFragment\n }\n }\n note\n attributes {\n key\n value\n }\n discountCodes {\n code\n }\n}\n\nfragment MoneyFragment on MoneyV2 {\n currencyCode\n amount\n}\nfragment ImageFragment on Image {\n id\n url\n altText\n width\n height\n}\n";
711
711
  /**
712
712
  *```
713
713
  *
@@ -809,7 +809,7 @@ export declare const CartLineRemove: string;
809
809
  *
810
810
  *```
811
811
  */
812
- export declare const CartLineUpdate: string;
812
+ export declare const CartLineUpdate = "\nmutation CartLineUpdate($cartId: ID!, $lines: [CartLineUpdateInput!]!, $numCartLines: Int = 250, $country: CountryCode = ZZ) @inContext(country: $country) {\n cartLinesUpdate(cartId: $cartId, lines: $lines) {\n cart {\n ...CartFragment\n }\n }\n}\n\nfragment CartFragment on Cart {\n id\n checkoutUrl\n buyerIdentity {\n countryCode\n customer {\n id\n email\n firstName\n lastName\n displayName\n }\n email\n phone\n }\n lines(first: $numCartLines) {\n edges {\n node {\n id\n quantity\n attributes {\n key\n value\n }\n merchandise {\n ... on ProductVariant {\n id\n availableForSale\n compareAtPriceV2 {\n ...MoneyFragment\n }\n priceV2 {\n ...MoneyFragment\n }\n requiresShipping\n title\n image {\n ...ImageFragment\n }\n product {\n handle\n title\n }\n selectedOptions {\n name\n value\n }\n }\n }\n }\n }\n }\n estimatedCost {\n subtotalAmount {\n ...MoneyFragment\n }\n totalAmount {\n ...MoneyFragment\n }\n totalDutyAmount {\n ...MoneyFragment\n }\n totalTaxAmount {\n ...MoneyFragment\n }\n }\n note\n attributes {\n key\n value\n }\n discountCodes {\n code\n }\n}\n\nfragment MoneyFragment on MoneyV2 {\n currencyCode\n amount\n}\nfragment ImageFragment on Image {\n id\n url\n altText\n width\n height\n}\n";
813
813
  /**
814
814
  *```
815
815
  *
@@ -911,7 +911,7 @@ export declare const CartLineUpdate: string;
911
911
  *
912
912
  *```
913
913
  */
914
- export declare const CartNoteUpdate: string;
914
+ export declare const CartNoteUpdate = "\nmutation CartNoteUpdate($cartId: ID!, $note: String, $numCartLines: Int = 250, $country: CountryCode = ZZ) @inContext(country: $country) {\n cartNoteUpdate(cartId: $cartId, note: $note) {\n cart {\n ...CartFragment\n }\n }\n}\n\nfragment CartFragment on Cart {\n id\n checkoutUrl\n buyerIdentity {\n countryCode\n customer {\n id\n email\n firstName\n lastName\n displayName\n }\n email\n phone\n }\n lines(first: $numCartLines) {\n edges {\n node {\n id\n quantity\n attributes {\n key\n value\n }\n merchandise {\n ... on ProductVariant {\n id\n availableForSale\n compareAtPriceV2 {\n ...MoneyFragment\n }\n priceV2 {\n ...MoneyFragment\n }\n requiresShipping\n title\n image {\n ...ImageFragment\n }\n product {\n handle\n title\n }\n selectedOptions {\n name\n value\n }\n }\n }\n }\n }\n }\n estimatedCost {\n subtotalAmount {\n ...MoneyFragment\n }\n totalAmount {\n ...MoneyFragment\n }\n totalDutyAmount {\n ...MoneyFragment\n }\n totalTaxAmount {\n ...MoneyFragment\n }\n }\n note\n attributes {\n key\n value\n }\n discountCodes {\n code\n }\n}\n\nfragment MoneyFragment on MoneyV2 {\n currencyCode\n amount\n}\nfragment ImageFragment on Image {\n id\n url\n altText\n width\n height\n}\n";
915
915
  /**
916
916
  *```
917
917
  *
@@ -1011,7 +1011,7 @@ export declare const CartNoteUpdate: string;
1011
1011
  *
1012
1012
  *```
1013
1013
  */
1014
- export declare const CartQuery: string;
1014
+ export declare const CartQuery = "\nquery CartQuery($id: ID!, $numCartLines: Int = 250, $country: CountryCode = ZZ) @inContext(country: $country) {\n cart(id: $id) {\n ...CartFragment\n }\n}\n\nfragment CartFragment on Cart {\n id\n checkoutUrl\n buyerIdentity {\n countryCode\n customer {\n id\n email\n firstName\n lastName\n displayName\n }\n email\n phone\n }\n lines(first: $numCartLines) {\n edges {\n node {\n id\n quantity\n attributes {\n key\n value\n }\n merchandise {\n ... on ProductVariant {\n id\n availableForSale\n compareAtPriceV2 {\n ...MoneyFragment\n }\n priceV2 {\n ...MoneyFragment\n }\n requiresShipping\n title\n image {\n ...ImageFragment\n }\n product {\n handle\n title\n }\n selectedOptions {\n name\n value\n }\n }\n }\n }\n }\n }\n estimatedCost {\n subtotalAmount {\n ...MoneyFragment\n }\n totalAmount {\n ...MoneyFragment\n }\n totalDutyAmount {\n ...MoneyFragment\n }\n totalTaxAmount {\n ...MoneyFragment\n }\n }\n note\n attributes {\n key\n value\n }\n discountCodes {\n code\n }\n}\n\nfragment MoneyFragment on MoneyV2 {\n currencyCode\n amount\n}\nfragment ImageFragment on Image {\n id\n url\n altText\n width\n height\n}\n";
1015
1015
  /**
1016
1016
  *```
1017
1017
  * fragment ExternalVideoFragment on ExternalVideo {
@@ -1023,7 +1023,7 @@ export declare const CartQuery: string;
1023
1023
 
1024
1024
  *```
1025
1025
  */
1026
- export declare const ExternalVideoFragment: string;
1026
+ export declare const ExternalVideoFragment = "fragment ExternalVideoFragment on ExternalVideo {\n id\n embeddedUrl\n host\n}\n\n";
1027
1027
  /**
1028
1028
  *```
1029
1029
  * fragment ImageFragment on Image {
@@ -1037,7 +1037,7 @@ export declare const ExternalVideoFragment: string;
1037
1037
 
1038
1038
  *```
1039
1039
  */
1040
- export declare const ImageFragment: string;
1040
+ export declare const ImageFragment = "fragment ImageFragment on Image {\n id\n url\n altText\n width\n height\n}\n\n";
1041
1041
  /**
1042
1042
  *```
1043
1043
  * query Localization {
@@ -1062,7 +1062,7 @@ export declare const ImageFragment: string;
1062
1062
 
1063
1063
  *```
1064
1064
  */
1065
- export declare const Localization: string;
1065
+ export declare const Localization = "query Localization {\n localization {\n country {\n isoCode\n name\n currency {\n isoCode\n }\n }\n availableCountries {\n isoCode\n name\n currency {\n isoCode\n }\n }\n }\n}\n\n";
1066
1066
  /**
1067
1067
  *```
1068
1068
  *
@@ -1126,23 +1126,41 @@ export declare const Localization: string;
1126
1126
  *
1127
1127
  *```
1128
1128
  */
1129
- export declare const MediaFileFragment: string;
1129
+ export declare const MediaFileFragment = "\nfragment MediaFileFragment on Media {\n ... on MediaImage {\n mediaContentType\n image {\n ...ImageFragment\n }\n }\n ... on Video {\n mediaContentType\n ...VideoFragment\n }\n ... on ExternalVideo {\n mediaContentType\n ...ExternalVideoFragment\n }\n ... on Model3d {\n mediaContentType\n ...Model3DFragment\n }\n}\n\nfragment ImageFragment on Image {\n id\n url\n altText\n width\n height\n}\n\nfragment VideoFragment on Video {\n id\n previewImage {\n url\n }\n sources {\n mimeType\n url\n }\n}\n\nfragment ExternalVideoFragment on ExternalVideo {\n id\n embeddedUrl\n host\n}\n\nfragment Model3DFragment on Model3d {\n id\n alt\n mediaContentType\n previewImage {\n url\n }\n sources {\n url\n }\n}\n";
1130
1130
  /**
1131
- *```
1132
- * fragment MetafieldFragment on Metafield {
1133
- * id
1134
- * type
1135
- * namespace
1136
- * key
1137
- * value
1138
- * createdAt
1139
- * updatedAt
1140
- * description
1141
- * }
1142
-
1143
- *```
1144
- */
1145
- export declare const MetafieldFragment: string;
1131
+ *```
1132
+ *
1133
+ * fragment MetafieldFragment on Metafield {
1134
+ * id
1135
+ * type
1136
+ * namespace
1137
+ * key
1138
+ * value
1139
+ * createdAt
1140
+ * updatedAt
1141
+ * description
1142
+ * reference @include(if: $includeReferenceMetafieldDetails) {
1143
+ * __typename
1144
+ * ... on MediaImage {
1145
+ * id
1146
+ * mediaContentType
1147
+ * image {
1148
+ * ...ImageFragment
1149
+ * }
1150
+ * }
1151
+ * }
1152
+ * }
1153
+ * fragment ImageFragment on Image {
1154
+ * id
1155
+ * url
1156
+ * altText
1157
+ * width
1158
+ * height
1159
+ * }
1160
+ *
1161
+ *```
1162
+ */
1163
+ export declare const MetafieldFragment = "\nfragment MetafieldFragment on Metafield {\n id\n type\n namespace\n key\n value\n createdAt\n updatedAt\n description\n reference @include(if: $includeReferenceMetafieldDetails) {\n __typename\n ... on MediaImage {\n id\n mediaContentType\n image {\n ...ImageFragment\n }\n }\n }\n}\nfragment ImageFragment on Image {\n id\n url\n altText\n width\n height\n}\n";
1146
1164
  /**
1147
1165
  *```
1148
1166
  * fragment Model3DFragment on Model3d {
@@ -1160,7 +1178,7 @@ export declare const MetafieldFragment: string;
1160
1178
 
1161
1179
  *```
1162
1180
  */
1163
- export declare const Model3DFragment: string;
1181
+ export declare const Model3DFragment = "fragment Model3DFragment on Model3d {\n id\n alt\n mediaContentType\n previewImage {\n url\n }\n sources {\n url\n }\n}\n\n";
1164
1182
  /**
1165
1183
  *```
1166
1184
  * fragment MoneyFragment on MoneyV2 {
@@ -1170,7 +1188,7 @@ export declare const Model3DFragment: string;
1170
1188
 
1171
1189
  *```
1172
1190
  */
1173
- export declare const MoneyFragment: string;
1191
+ export declare const MoneyFragment = "fragment MoneyFragment on MoneyV2 {\n currencyCode\n amount\n}\n";
1174
1192
  /**
1175
1193
  *```
1176
1194
  *
@@ -1247,6 +1265,7 @@ export declare const MoneyFragment: string;
1247
1265
  * }
1248
1266
  * }
1249
1267
  *
1268
+ *
1250
1269
  * fragment MetafieldFragment on Metafield {
1251
1270
  * id
1252
1271
  * type
@@ -1256,6 +1275,16 @@ export declare const MoneyFragment: string;
1256
1275
  * createdAt
1257
1276
  * updatedAt
1258
1277
  * description
1278
+ * reference @include(if: $includeReferenceMetafieldDetails) {
1279
+ * __typename
1280
+ * ... on MediaImage {
1281
+ * id
1282
+ * mediaContentType
1283
+ * image {
1284
+ * ...ImageFragment
1285
+ * }
1286
+ * }
1287
+ * }
1259
1288
  * }
1260
1289
  *
1261
1290
  * fragment VariantFragment on ProductVariant {
@@ -1365,6 +1394,14 @@ export declare const MoneyFragment: string;
1365
1394
  * }
1366
1395
  * }
1367
1396
  *
1397
+ * fragment ImageFragment on Image {
1398
+ * id
1399
+ * url
1400
+ * altText
1401
+ * width
1402
+ * height
1403
+ * }
1404
+ *
1368
1405
  *
1369
1406
  * fragment SellingPlanFragment on SellingPlan {
1370
1407
  * id
@@ -1462,7 +1499,7 @@ export declare const MoneyFragment: string;
1462
1499
  * }
1463
1500
  *```
1464
1501
  */
1465
- export declare const ProductProviderFragment: string;
1502
+ export declare const ProductProviderFragment = "\nfragment ProductProviderFragment on Product {\n compareAtPriceRange {\n maxVariantPrice {\n ...MoneyFragment\n }\n minVariantPrice {\n ...MoneyFragment\n }\n }\n descriptionHtml\n handle\n id\n media(first: $numProductMedia) {\n edges {\n node {\n ...MediaFileFragment\n }\n }\n }\n metafields(first: $numProductMetafields) {\n edges {\n node {\n ...MetafieldFragment\n }\n }\n }\n priceRange {\n maxVariantPrice {\n ...MoneyFragment\n }\n minVariantPrice {\n ...MoneyFragment\n }\n }\n title\n variants(first: $numProductVariants) {\n edges {\n node {\n ...VariantFragment\n }\n }\n }\n sellingPlanGroups(first: $numProductSellingPlanGroups) {\n edges {\n node {\n ...SellingPlanGroupsFragment\n }\n }\n }\n}\n\n\nfragment MediaFileFragment on Media {\n ... on MediaImage {\n mediaContentType\n image {\n ...ImageFragment\n }\n }\n ... on Video {\n mediaContentType\n ...VideoFragment\n }\n ... on ExternalVideo {\n mediaContentType\n ...ExternalVideoFragment\n }\n ... on Model3d {\n mediaContentType\n ...Model3DFragment\n }\n}\n\n\nfragment MetafieldFragment on Metafield {\n id\n type\n namespace\n key\n value\n createdAt\n updatedAt\n description\n reference @include(if: $includeReferenceMetafieldDetails) {\n __typename\n ... on MediaImage {\n id\n mediaContentType\n image {\n ...ImageFragment\n }\n }\n }\n}\n\nfragment VariantFragment on ProductVariant {\n id\n title\n availableForSale\n image {\n ...ImageFragment\n }\n ...UnitPriceFragment\n priceV2 {\n ...MoneyFragment\n }\n compareAtPriceV2 {\n ...MoneyFragment\n }\n selectedOptions {\n name\n value\n }\n metafields(first: $numProductVariantMetafields) {\n edges {\n node {\n ...MetafieldFragment\n }\n }\n }\n sellingPlanAllocations(first: $numProductVariantSellingPlanAllocations) {\n edges {\n node {\n priceAdjustments {\n compareAtPrice {\n ...MoneyFragment\n }\n perDeliveryPrice {\n ...MoneyFragment\n }\n price {\n ...MoneyFragment\n }\n unitPrice {\n ...MoneyFragment\n }\n }\n sellingPlan {\n ...SellingPlanFragment\n }\n }\n }\n }\n}\n\n\nfragment SellingPlanGroupsFragment on SellingPlanGroup {\n sellingPlans(first:$numProductSellingPlans) {\n edges {\n node {\n ...SellingPlanFragment\n }\n }\n }\n appName\n name\n options {\n name\n values\n }\n}\nfragment MoneyFragment on MoneyV2 {\n currencyCode\n amount\n}\nfragment ImageFragment on Image {\n id\n url\n altText\n width\n height\n}\n\nfragment VideoFragment on Video {\n id\n previewImage {\n url\n }\n sources {\n mimeType\n url\n }\n}\n\nfragment ExternalVideoFragment on ExternalVideo {\n id\n embeddedUrl\n host\n}\n\nfragment Model3DFragment on Model3d {\n id\n alt\n mediaContentType\n previewImage {\n url\n }\n sources {\n url\n }\n}\n\nfragment ImageFragment on Image {\n id\n url\n altText\n width\n height\n}\n\n\nfragment SellingPlanFragment on SellingPlan {\n id\n description\n name\n options {\n name\n value\n }\n priceAdjustments {\n orderCount\n adjustmentValue {\n ...on SellingPlanFixedAmountPriceAdjustment {\n adjustmentAmount {\n ...MoneyFragment\n }\n }\n ...on SellingPlanFixedPriceAdjustment {\n price {\n ...MoneyFragment\n }\n }\n ...on SellingPlanPercentagePriceAdjustment {\n adjustmentPercentage\n }\n }\n }\n recurringDeliveries\n}\nfragment MoneyFragment on MoneyV2 {\n currencyCode\n amount\n}\nfragment ImageFragment on Image {\n id\n url\n altText\n width\n height\n}\n\n\nfragment UnitPriceFragment on ProductVariant {\n unitPriceMeasurement {\n measuredType\n quantityUnit\n quantityValue\n referenceUnit\n referenceValue\n }\n unitPrice {\n ...MoneyFragment\n }\n}\nfragment MoneyFragment on MoneyV2 {\n currencyCode\n amount\n}\nfragment MoneyFragment on MoneyV2 {\n currencyCode\n amount\n}\n\nfragment SellingPlanFragment on SellingPlan {\n id\n description\n name\n options {\n name\n value\n }\n priceAdjustments {\n orderCount\n adjustmentValue {\n ...on SellingPlanFixedAmountPriceAdjustment {\n adjustmentAmount {\n ...MoneyFragment\n }\n }\n ...on SellingPlanFixedPriceAdjustment {\n price {\n ...MoneyFragment\n }\n }\n ...on SellingPlanPercentagePriceAdjustment {\n adjustmentPercentage\n }\n }\n }\n recurringDeliveries\n}\nfragment MoneyFragment on MoneyV2 {\n currencyCode\n amount\n}";
1466
1503
  /**
1467
1504
  *```
1468
1505
  *
@@ -1484,7 +1521,7 @@ export declare const ProductProviderFragment: string;
1484
1521
  * }
1485
1522
  *```
1486
1523
  */
1487
- export declare const UnitPriceFragment: string;
1524
+ export declare const UnitPriceFragment = "\nfragment UnitPriceFragment on ProductVariant {\n unitPriceMeasurement {\n measuredType\n quantityUnit\n quantityValue\n referenceUnit\n referenceValue\n }\n unitPrice {\n ...MoneyFragment\n }\n}\nfragment MoneyFragment on MoneyV2 {\n currencyCode\n amount\n}";
1488
1525
  /**
1489
1526
  *```
1490
1527
  * fragment VideoFragment on Video {
@@ -1501,7 +1538,7 @@ export declare const UnitPriceFragment: string;
1501
1538
 
1502
1539
  *```
1503
1540
  */
1504
- export declare const VideoFragment: string;
1541
+ export declare const VideoFragment = "fragment VideoFragment on Video {\n id\n previewImage {\n url\n }\n sources {\n mimeType\n url\n }\n}\n\n";
1505
1542
  /**
1506
1543
  *```
1507
1544
  *
@@ -1539,7 +1576,7 @@ export declare const VideoFragment: string;
1539
1576
  * }
1540
1577
  *```
1541
1578
  */
1542
- export declare const SellingPlanFragment: string;
1579
+ export declare const SellingPlanFragment = "\nfragment SellingPlanFragment on SellingPlan {\n id\n description\n name\n options {\n name\n value\n }\n priceAdjustments {\n orderCount\n adjustmentValue {\n ...on SellingPlanFixedAmountPriceAdjustment {\n adjustmentAmount {\n ...MoneyFragment\n }\n }\n ...on SellingPlanFixedPriceAdjustment {\n price {\n ...MoneyFragment\n }\n }\n ...on SellingPlanPercentagePriceAdjustment {\n adjustmentPercentage\n }\n }\n }\n recurringDeliveries\n}\nfragment MoneyFragment on MoneyV2 {\n currencyCode\n amount\n}";
1543
1580
  /**
1544
1581
  *```
1545
1582
  *
@@ -1593,7 +1630,7 @@ export declare const SellingPlanFragment: string;
1593
1630
  * }
1594
1631
  *```
1595
1632
  */
1596
- export declare const SellingPlanGroupsFragment: string;
1633
+ export declare const SellingPlanGroupsFragment = "\nfragment SellingPlanGroupsFragment on SellingPlanGroup {\n sellingPlans(first:$numProductSellingPlans) {\n edges {\n node {\n ...SellingPlanFragment\n }\n }\n }\n appName\n name\n options {\n name\n values\n }\n}\n\nfragment SellingPlanFragment on SellingPlan {\n id\n description\n name\n options {\n name\n value\n }\n priceAdjustments {\n orderCount\n adjustmentValue {\n ...on SellingPlanFixedAmountPriceAdjustment {\n adjustmentAmount {\n ...MoneyFragment\n }\n }\n ...on SellingPlanFixedPriceAdjustment {\n price {\n ...MoneyFragment\n }\n }\n ...on SellingPlanPercentagePriceAdjustment {\n adjustmentPercentage\n }\n }\n }\n recurringDeliveries\n}\nfragment MoneyFragment on MoneyV2 {\n currencyCode\n amount\n}";
1597
1634
  /**
1598
1635
  *```
1599
1636
  *
@@ -1711,4 +1748,4 @@ export declare const SellingPlanGroupsFragment: string;
1711
1748
  * }
1712
1749
  *```
1713
1750
  */
1714
- export declare const VariantFragment: string;
1751
+ export declare const VariantFragment = "\nfragment VariantFragment on ProductVariant {\n id\n title\n availableForSale\n image {\n ...ImageFragment\n }\n ...UnitPriceFragment\n priceV2 {\n ...MoneyFragment\n }\n compareAtPriceV2 {\n ...MoneyFragment\n }\n selectedOptions {\n name\n value\n }\n metafields(first: $numProductVariantMetafields) {\n edges {\n node {\n ...MetafieldFragment\n }\n }\n }\n sellingPlanAllocations(first: $numProductVariantSellingPlanAllocations) {\n edges {\n node {\n priceAdjustments {\n compareAtPrice {\n ...MoneyFragment\n }\n perDeliveryPrice {\n ...MoneyFragment\n }\n price {\n ...MoneyFragment\n }\n unitPrice {\n ...MoneyFragment\n }\n }\n sellingPlan {\n ...SellingPlanFragment\n }\n }\n }\n }\n}\n\n\nfragment SellingPlanFragment on SellingPlan {\n id\n description\n name\n options {\n name\n value\n }\n priceAdjustments {\n orderCount\n adjustmentValue {\n ...on SellingPlanFixedAmountPriceAdjustment {\n adjustmentAmount {\n ...MoneyFragment\n }\n }\n ...on SellingPlanFixedPriceAdjustment {\n price {\n ...MoneyFragment\n }\n }\n ...on SellingPlanPercentagePriceAdjustment {\n adjustmentPercentage\n }\n }\n }\n recurringDeliveries\n}\nfragment MoneyFragment on MoneyV2 {\n currencyCode\n amount\n}\nfragment ImageFragment on Image {\n id\n url\n altText\n width\n height\n}\n\n\nfragment UnitPriceFragment on ProductVariant {\n unitPriceMeasurement {\n measuredType\n quantityUnit\n quantityValue\n referenceUnit\n referenceValue\n }\n unitPrice {\n ...MoneyFragment\n }\n}\nfragment MoneyFragment on MoneyV2 {\n currencyCode\n amount\n}\nfragment MoneyFragment on MoneyV2 {\n currencyCode\n amount\n}";
@@ -2173,21 +2173,40 @@ fragment Model3DFragment on Model3d {
2173
2173
  }
2174
2174
  `;
2175
2175
  /**
2176
- *```
2177
- * fragment MetafieldFragment on Metafield {
2178
- * id
2179
- * type
2180
- * namespace
2181
- * key
2182
- * value
2183
- * createdAt
2184
- * updatedAt
2185
- * description
2186
- * }
2187
-
2188
- *```
2189
- */
2190
- export const MetafieldFragment = `fragment MetafieldFragment on Metafield {
2176
+ *```
2177
+ *
2178
+ * fragment MetafieldFragment on Metafield {
2179
+ * id
2180
+ * type
2181
+ * namespace
2182
+ * key
2183
+ * value
2184
+ * createdAt
2185
+ * updatedAt
2186
+ * description
2187
+ * reference @include(if: $includeReferenceMetafieldDetails) {
2188
+ * __typename
2189
+ * ... on MediaImage {
2190
+ * id
2191
+ * mediaContentType
2192
+ * image {
2193
+ * ...ImageFragment
2194
+ * }
2195
+ * }
2196
+ * }
2197
+ * }
2198
+ * fragment ImageFragment on Image {
2199
+ * id
2200
+ * url
2201
+ * altText
2202
+ * width
2203
+ * height
2204
+ * }
2205
+ *
2206
+ *```
2207
+ */
2208
+ export const MetafieldFragment = `
2209
+ fragment MetafieldFragment on Metafield {
2191
2210
  id
2192
2211
  type
2193
2212
  namespace
@@ -2196,6 +2215,23 @@ export const MetafieldFragment = `fragment MetafieldFragment on Metafield {
2196
2215
  createdAt
2197
2216
  updatedAt
2198
2217
  description
2218
+ reference @include(if: $includeReferenceMetafieldDetails) {
2219
+ __typename
2220
+ ... on MediaImage {
2221
+ id
2222
+ mediaContentType
2223
+ image {
2224
+ ...ImageFragment
2225
+ }
2226
+ }
2227
+ }
2228
+ }
2229
+ fragment ImageFragment on Image {
2230
+ id
2231
+ url
2232
+ altText
2233
+ width
2234
+ height
2199
2235
  }
2200
2236
  `;
2201
2237
  /**
@@ -2318,6 +2354,7 @@ export const MoneyFragment = `fragment MoneyFragment on MoneyV2 {
2318
2354
  * }
2319
2355
  * }
2320
2356
  *
2357
+ *
2321
2358
  * fragment MetafieldFragment on Metafield {
2322
2359
  * id
2323
2360
  * type
@@ -2327,6 +2364,16 @@ export const MoneyFragment = `fragment MoneyFragment on MoneyV2 {
2327
2364
  * createdAt
2328
2365
  * updatedAt
2329
2366
  * description
2367
+ * reference @include(if: $includeReferenceMetafieldDetails) {
2368
+ * __typename
2369
+ * ... on MediaImage {
2370
+ * id
2371
+ * mediaContentType
2372
+ * image {
2373
+ * ...ImageFragment
2374
+ * }
2375
+ * }
2376
+ * }
2330
2377
  * }
2331
2378
  *
2332
2379
  * fragment VariantFragment on ProductVariant {
@@ -2436,6 +2483,14 @@ export const MoneyFragment = `fragment MoneyFragment on MoneyV2 {
2436
2483
  * }
2437
2484
  * }
2438
2485
  *
2486
+ * fragment ImageFragment on Image {
2487
+ * id
2488
+ * url
2489
+ * altText
2490
+ * width
2491
+ * height
2492
+ * }
2493
+ *
2439
2494
  *
2440
2495
  * fragment SellingPlanFragment on SellingPlan {
2441
2496
  * id
@@ -2607,6 +2662,7 @@ fragment MediaFileFragment on Media {
2607
2662
  }
2608
2663
  }
2609
2664
 
2665
+
2610
2666
  fragment MetafieldFragment on Metafield {
2611
2667
  id
2612
2668
  type
@@ -2616,6 +2672,16 @@ fragment MetafieldFragment on Metafield {
2616
2672
  createdAt
2617
2673
  updatedAt
2618
2674
  description
2675
+ reference @include(if: $includeReferenceMetafieldDetails) {
2676
+ __typename
2677
+ ... on MediaImage {
2678
+ id
2679
+ mediaContentType
2680
+ image {
2681
+ ...ImageFragment
2682
+ }
2683
+ }
2684
+ }
2619
2685
  }
2620
2686
 
2621
2687
  fragment VariantFragment on ProductVariant {
@@ -2725,6 +2791,14 @@ fragment Model3DFragment on Model3d {
2725
2791
  }
2726
2792
  }
2727
2793
 
2794
+ fragment ImageFragment on Image {
2795
+ id
2796
+ url
2797
+ altText
2798
+ width
2799
+ height
2800
+ }
2801
+
2728
2802
 
2729
2803
  fragment SellingPlanFragment on SellingPlan {
2730
2804
  id
@@ -2,7 +2,7 @@ import { getCacheControlHeader } from './framework/cache';
2
2
  import { setContext, setCache } from './framework/runtime';
3
3
  import { setConfig } from './framework/config';
4
4
  export default async function handleEvent(event, { request, entrypoint, indexTemplate, assetHandler, streamableResponse, dev, cache, context, }) {
5
- var _a, _b, _c;
5
+ var _a, _b, _c, _d, _e;
6
6
  const url = new URL(request.url);
7
7
  /**
8
8
  * Inject the cache & context into the module loader so we can pull it out for subrequests.
@@ -56,15 +56,17 @@ export default async function handleEvent(event, { request, entrypoint, indexTem
56
56
  */
57
57
  headers.set(getCacheControlHeader({ dev }), componentResponse.cacheControlHeader);
58
58
  if (componentResponse.customBody) {
59
+ const { status, customStatus } = componentResponse;
59
60
  return new Response(await componentResponse.customBody, {
60
- status: (_a = componentResponse.status) !== null && _a !== void 0 ? _a : 200,
61
+ status: (_b = (_a = customStatus === null || customStatus === void 0 ? void 0 : customStatus.code) !== null && _a !== void 0 ? _a : status) !== null && _b !== void 0 ? _b : 200,
62
+ statusText: customStatus === null || customStatus === void 0 ? void 0 : customStatus.text,
61
63
  headers,
62
64
  });
63
65
  }
64
66
  let response;
65
67
  if (isReactHydrationRequest) {
66
68
  response = new Response(body, {
67
- status: (_b = componentResponse.status) !== null && _b !== void 0 ? _b : 200,
69
+ status: (_c = componentResponse.status) !== null && _c !== void 0 ? _c : 200,
68
70
  headers,
69
71
  });
70
72
  }
@@ -75,8 +77,10 @@ export default async function handleEvent(event, { request, entrypoint, indexTem
75
77
  .replace('<body', bodyAttributes ? `<body ${bodyAttributes}` : '$&')
76
78
  .replace('<html', htmlAttributes ? `<html ${htmlAttributes}` : '$&');
77
79
  headers.append('content-type', 'text/html');
80
+ const { status, customStatus } = componentResponse;
78
81
  response = new Response(html, {
79
- status: (_c = componentResponse.status) !== null && _c !== void 0 ? _c : 200,
82
+ status: (_e = (_d = customStatus === null || customStatus === void 0 ? void 0 : customStatus.code) !== null && _d !== void 0 ? _d : status) !== null && _e !== void 0 ? _e : 200,
83
+ statusText: customStatus === null || customStatus === void 0 ? void 0 : customStatus.text,
80
84
  headers,
81
85
  });
82
86
  }
@@ -1,6 +1,6 @@
1
1
  export { useProductOptions } from './useProductOptions';
2
2
  export * from './useProductOptions/types';
3
- export { useQuery, QueryProvider } from './useQuery';
3
+ export { useQuery, QueryProvider } from '../foundation/useQuery';
4
4
  export { useMoney } from './useMoney';
5
5
  export { useMeasurement } from './useMeasurement';
6
6
  export { useParsedMetafields } from './useParsedMetafields';
@@ -1,6 +1,6 @@
1
1
  export { useProductOptions } from './useProductOptions';
2
2
  export * from './useProductOptions/types';
3
- export { useQuery, QueryProvider } from './useQuery';
3
+ export { useQuery, QueryProvider } from '../foundation/useQuery';
4
4
  export { useMoney } from './useMoney';
5
5
  export { useMeasurement } from './useMeasurement';
6
6
  export { useParsedMetafields } from './useParsedMetafields';
@@ -9,7 +9,7 @@ export declare function useCartLine(): {
9
9
  } & Pick<import("../../graphql/types/types").Attribute, "key" | "value">)[];
10
10
  merchandise: {
11
11
  __typename?: "ProductVariant" | undefined;
12
- } & Pick<import("../../graphql/types/types").ProductVariant, "title" | "id" | "availableForSale" | "requiresShipping"> & {
12
+ } & Pick<import("../../graphql/types/types").ProductVariant, "id" | "title" | "availableForSale" | "requiresShipping"> & {
13
13
  compareAtPriceV2?: import("../../graphql/types/types").Maybe<{
14
14
  __typename?: "MoneyV2" | undefined;
15
15
  } & {
@@ -26,12 +26,12 @@ export declare function useCartLine(): {
26
26
  __typename?: "Image" | undefined; /**
27
27
  * The `useCartLine` hook provides access to the cart line object. It must be a descendent of a `CartProvider` component.
28
28
  */
29
- } & Pick<import("../../graphql/types/types").Image, "height" | "width" | "url" | "id" | "altText">> | undefined;
29
+ } & Pick<import("../../graphql/types/types").Image, "id" | "height" | "width" | "url" | "altText">> | undefined;
30
30
  product: {
31
31
  __typename?: "Product" | undefined;
32
32
  } & Pick<import("../../graphql/types/types").Product, "title" | "handle">;
33
33
  selectedOptions: ({
34
34
  __typename?: "SelectedOption" | undefined;
35
- } & Pick<import("../../graphql/types/types").SelectedOption, "value" | "name">)[];
35
+ } & Pick<import("../../graphql/types/types").SelectedOption, "name" | "value">)[];
36
36
  };
37
37
  };
@@ -1,19 +1,5 @@
1
1
  import { useMemo } from 'react';
2
2
  import { useShop } from '../../foundation/useShop';
3
- // TODO: Remove this when Oxygen supports Intl properly (oxygen-sws#527)
4
- const NARROW_SYMBOL_MAP = {
5
- USD: '$',
6
- AUD: '$',
7
- CAD: '$',
8
- NZD: '$',
9
- EUR: '€',
10
- GBP: '£',
11
- INR: '₹',
12
- RUB: '₽',
13
- CNY: '¥',
14
- JPY: '¥',
15
- BRL: 'R$',
16
- };
17
3
  /**
18
4
  * The `useMoney` hook takes a [`MoneyV2` object](/api/storefront/reference/common-objects/moneyv2) and returns a
19
5
  * default-formatted string of the amount with the correct currency indicator, along with some of the parts provided by
@@ -37,12 +23,12 @@ export function useMoney(money) {
37
23
  currencyDisplay: 'narrowSymbol',
38
24
  }).formatToParts(amount);
39
25
  const moneyValue = useMemo(() => {
40
- var _a, _b, _c, _d, _e, _f, _g;
26
+ var _a, _b, _c, _d, _e, _f;
41
27
  return ({
42
28
  currencyCode: money.currencyCode,
43
29
  currencyName: (_b = (_a = nameParts.find((part) => part.type === 'currency')) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : money.currencyCode,
44
30
  currencySymbol: (_d = (_c = baseParts.find((part) => part.type === 'currency')) === null || _c === void 0 ? void 0 : _c.value) !== null && _d !== void 0 ? _d : money.currencyCode,
45
- currencyNarrowSymbol: (_g = (_f = (_e = narrowParts.find((part) => part.type === 'currency')) === null || _e === void 0 ? void 0 : _e.value) !== null && _f !== void 0 ? _f : NARROW_SYMBOL_MAP[money.currencyCode]) !== null && _g !== void 0 ? _g : '',
31
+ currencyNarrowSymbol: (_f = (_e = narrowParts.find((part) => part.type === 'currency')) === null || _e === void 0 ? void 0 : _e.value) !== null && _f !== void 0 ? _f : '',
46
32
  parts: baseParts,
47
33
  localizedString: value,
48
34
  amount: baseParts
@@ -1,7 +1,6 @@
1
- import { GraphQLConnection, ParsedMetafield } from '../../types';
2
- import { Metafield } from '../../graphql/types/types';
1
+ import { GraphQLConnection, ParsedMetafield, RawMetafield } from '../../types';
3
2
  /**
4
3
  * The `useParsedMetafields` hook transforms a [MetafieldConnection](/api/storefront/reference/common-objects/metafieldconnection)
5
4
  * in an array of metafields whose `values` have been parsed according to the metafield `type`.
6
5
  */
7
- export declare function useParsedMetafields(metafields: GraphQLConnection<Partial<Metafield>> | undefined): ParsedMetafield[];
6
+ export declare function useParsedMetafields(metafields: GraphQLConnection<RawMetafield> | undefined): ParsedMetafield[];
@@ -1,12 +1,11 @@
1
- import { MetafieldFragmentFragment } from '../..';
2
- import { GraphQLConnection } from '../../types';
1
+ import { GraphQLConnection, RawMetafield } from '../../types';
3
2
  import { SellingPlanFragmentFragment } from './SellingPlanFragment';
4
3
  import { SellingPlanGroupsFragmentFragment } from './SellingPlanGroupsFragment';
5
4
  import { VariantFragmentFragment } from './VariantFragment';
6
5
  export declare type Variant = Omit<Partial<VariantFragmentFragment>, 'id' | 'selectedOptions' | 'metafields' | 'sellingPlanAllocations'> & {
7
6
  id: VariantFragmentFragment['id'];
8
7
  selectedOptions: VariantFragmentFragment['selectedOptions'];
9
- metafields?: GraphQLConnection<Partial<MetafieldFragmentFragment>>;
8
+ metafields?: GraphQLConnection<Partial<RawMetafield>>;
10
9
  sellingPlanAllocations?: GraphQLConnection<SellingPlanAllocation>;
11
10
  };
12
11
  export declare type SellingPlanGroup = Omit<Partial<SellingPlanGroupsFragmentFragment>, 'options'> & {
@@ -11,8 +11,10 @@ export interface UseShopQueryResponse<T> {
11
11
  * \> It must be a descendent of a `ShopifyProvider` component.
12
12
  */
13
13
  export declare function useShopQuery<T>({ query, variables, cache, }: {
14
- /** A string of the GraphQL query. */
15
- query: ASTNode | string;
14
+ /** A string of the GraphQL query.
15
+ * If no query is provided, useShopQuery will make no calls to the Storefront API.
16
+ */
17
+ query?: ASTNode | string;
16
18
  /** An object of the variables for the GraphQL query. */
17
19
  variables?: Record<string, any>;
18
20
  /** An object containing cache-control options for the sub-request. */