@shopify/hydrogen 0.21.0 → 0.23.0

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 (524) hide show
  1. package/CHANGELOG.md +304 -0
  2. package/dist/esnext/client.d.ts +1 -0
  3. package/dist/esnext/client.js +1 -0
  4. package/dist/esnext/components/AddToCartButton/AddToCartButton.client.js +5 -5
  5. package/dist/esnext/components/CartLines/{CartLines.d.ts → CartLines.client.d.ts} +0 -0
  6. package/dist/esnext/components/CartLines/{CartLines.js → CartLines.client.js} +0 -0
  7. package/dist/esnext/components/CartLines/index.d.ts +1 -1
  8. package/dist/esnext/components/CartLines/index.js +1 -1
  9. package/dist/esnext/components/CartProvider/CartProvider.client.d.ts +7 -4
  10. package/dist/esnext/components/CartProvider/CartProvider.client.js +22 -12
  11. package/dist/esnext/components/DevTools.client.js +1 -1
  12. package/dist/esnext/components/Image/Image.d.ts +11 -3
  13. package/dist/esnext/components/Image/Image.js +64 -13
  14. package/dist/esnext/components/Link/Link.client.d.ts +2 -0
  15. package/dist/esnext/components/Link/Link.client.js +7 -4
  16. package/dist/esnext/components/LocalizationProvider/LocalizationProvider.server.js +1 -1
  17. package/dist/esnext/components/MediaFile/MediaFile.js +3 -2
  18. package/dist/esnext/components/ProductOptionsProvider/ProductOptionsProvider.client.d.ts +21 -0
  19. package/dist/esnext/components/ProductOptionsProvider/ProductOptionsProvider.client.js +140 -0
  20. package/dist/esnext/components/ProductOptionsProvider/context.d.ts +2 -0
  21. package/dist/esnext/components/{ProductProvider → ProductOptionsProvider}/context.js +0 -1
  22. package/dist/esnext/components/ProductOptionsProvider/index.d.ts +2 -0
  23. package/dist/esnext/components/ProductOptionsProvider/index.js +2 -0
  24. package/dist/esnext/components/ProductPrice/ProductPrice.client.d.ts +5 -2
  25. package/dist/esnext/components/ProductPrice/ProductPrice.client.js +10 -12
  26. package/dist/esnext/components/Seo/NoIndexSeo.client.d.ts +3 -0
  27. package/dist/esnext/components/Seo/NoIndexSeo.client.js +10 -0
  28. package/dist/esnext/components/Seo/Seo.client.d.ts +4 -0
  29. package/dist/esnext/components/Seo/Seo.client.js +3 -0
  30. package/dist/esnext/components/index.d.ts +1 -1
  31. package/dist/esnext/components/index.js +1 -1
  32. package/dist/esnext/config.d.ts +3 -3
  33. package/dist/esnext/entry-client.js +106 -9
  34. package/dist/esnext/entry-server.d.ts +3 -16
  35. package/dist/esnext/entry-server.js +281 -331
  36. package/dist/esnext/foundation/Analytics/Analytics.client.js +16 -14
  37. package/dist/esnext/foundation/Analytics/Analytics.server.js +27 -20
  38. package/dist/esnext/foundation/Analytics/ClientAnalytics.d.ts +4 -2
  39. package/dist/esnext/foundation/Analytics/ClientAnalytics.js +17 -15
  40. package/dist/esnext/foundation/Analytics/ServerAnalyticsRoute.server.js +7 -5
  41. package/dist/esnext/foundation/Analytics/connectors/PerformanceMetrics/PerformanceMetrics.client.js +2 -2
  42. package/dist/esnext/foundation/Analytics/connectors/PerformanceMetrics/ServerAnalyticsConnector.server.d.ts +1 -0
  43. package/dist/esnext/foundation/Analytics/connectors/PerformanceMetrics/{PerformanceMetrics.server.js → ServerAnalyticsConnector.server.js} +7 -6
  44. package/dist/esnext/foundation/Analytics/connectors/Shopify/ServerAnalyticsConnector.server.d.ts +1 -0
  45. package/dist/esnext/foundation/Analytics/connectors/Shopify/ServerAnalyticsConnector.server.js +19 -0
  46. package/dist/esnext/foundation/Analytics/connectors/Shopify/ShopifyAnalytics.client.d.ts +3 -0
  47. package/dist/esnext/foundation/Analytics/connectors/Shopify/ShopifyAnalytics.client.js +190 -0
  48. package/dist/esnext/foundation/Analytics/connectors/Shopify/ShopifyAnalytics.server.d.ts +3 -0
  49. package/dist/esnext/foundation/Analytics/connectors/Shopify/ShopifyAnalytics.server.js +24 -0
  50. package/dist/esnext/foundation/Analytics/connectors/Shopify/const.d.ts +28 -0
  51. package/dist/esnext/foundation/Analytics/connectors/Shopify/const.js +51 -0
  52. package/dist/esnext/foundation/Analytics/connectors/Shopify/utils.d.ts +3 -0
  53. package/dist/esnext/foundation/Analytics/connectors/Shopify/utils.js +56 -0
  54. package/dist/esnext/foundation/Analytics/hook.js +4 -2
  55. package/dist/esnext/foundation/Analytics/index.d.ts +0 -1
  56. package/dist/esnext/foundation/Analytics/index.js +0 -1
  57. package/dist/esnext/foundation/Analytics/utils.d.ts +2 -0
  58. package/dist/esnext/foundation/Analytics/utils.js +21 -0
  59. package/dist/{node/framework → esnext/foundation/Cache}/cache-sub-request.d.ts +1 -1
  60. package/dist/esnext/{framework → foundation/Cache}/cache-sub-request.js +3 -3
  61. package/dist/esnext/{framework → foundation/Cache}/cache.d.ts +1 -1
  62. package/dist/esnext/{framework → foundation/Cache}/cache.js +3 -3
  63. package/dist/{node/framework/CachingStrategy → esnext/foundation/Cache/strategies}/index.d.ts +1 -1
  64. package/dist/esnext/{framework/CachingStrategy → foundation/Cache/strategies}/index.js +0 -0
  65. package/dist/esnext/foundation/Cookie/Cookie.d.ts +3 -3
  66. package/dist/esnext/foundation/FileRoutes/FileRoutes.server.js +5 -10
  67. package/dist/{node/framework/Hydration → esnext/foundation/Html}/Html.d.ts +3 -1
  68. package/dist/esnext/{framework/Hydration → foundation/Html}/Html.js +15 -2
  69. package/dist/{node/framework/Hydration/ServerComponentRequest.server.d.ts → esnext/foundation/HydrogenRequest/HydrogenRequest.server.d.ts} +9 -5
  70. package/dist/esnext/{framework/Hydration/ServerComponentRequest.server.js → foundation/HydrogenRequest/HydrogenRequest.server.js} +1 -1
  71. package/dist/esnext/foundation/HydrogenResponse/HydrogenResponse.server.d.ts +23 -0
  72. package/dist/esnext/foundation/HydrogenResponse/HydrogenResponse.server.js +46 -0
  73. package/dist/esnext/foundation/Router/BrowserRouter.client.d.ts +2 -1
  74. package/dist/esnext/foundation/Router/BrowserRouter.client.js +17 -10
  75. package/dist/esnext/foundation/ServerPropsProvider/ServerPropsProvider.d.ts +2 -1
  76. package/dist/esnext/foundation/ServerPropsProvider/ServerPropsProvider.js +1 -3
  77. package/dist/esnext/foundation/ServerRequestProvider/ServerRequestProvider.d.ts +4 -4
  78. package/dist/esnext/foundation/ServerRequestProvider/ServerRequestProvider.js +2 -2
  79. package/dist/esnext/foundation/ServerStateProvider/ServerStateProvider.d.ts +1 -1
  80. package/dist/esnext/foundation/ServerStateProvider/ServerStateProvider.js +1 -1
  81. package/dist/esnext/foundation/ShopifyProvider/ShopifyProvider.server.js +1 -1
  82. package/dist/esnext/foundation/index.d.ts +1 -1
  83. package/dist/esnext/foundation/index.js +1 -1
  84. package/dist/esnext/foundation/runtime.d.ts +2 -0
  85. package/dist/esnext/foundation/runtime.js +6 -0
  86. package/dist/esnext/foundation/session/session.d.ts +3 -3
  87. package/dist/esnext/foundation/ssr-interop.d.ts +2 -2
  88. package/dist/esnext/foundation/useNavigate/useNavigate.d.ts +2 -0
  89. package/dist/esnext/foundation/useNavigate/useNavigate.js +11 -4
  90. package/dist/esnext/foundation/useQuery/hooks.js +9 -6
  91. package/dist/esnext/foundation/useRouteParams/RouteParamsProvider.client.d.ts +2 -1
  92. package/dist/esnext/foundation/useRouteParams/RouteParamsProvider.client.js +1 -1
  93. package/dist/esnext/framework/Hydration/rsc.js +4 -2
  94. package/dist/esnext/framework/middleware.js +1 -15
  95. package/dist/esnext/framework/plugin.js +4 -0
  96. package/dist/esnext/framework/plugins/vite-plugin-hydrogen-client-middleware.d.ts +1 -1
  97. package/dist/esnext/framework/plugins/vite-plugin-hydrogen-config.js +6 -3
  98. package/dist/esnext/framework/plugins/vite-plugin-hydrogen-middleware.js +7 -48
  99. package/dist/esnext/framework/plugins/vite-plugin-hydrogen-rsc.js +5 -18
  100. package/dist/esnext/framework/plugins/vite-plugin-hydrogen-suppress-warnings.d.ts +3 -0
  101. package/dist/esnext/framework/plugins/vite-plugin-hydrogen-suppress-warnings.js +19 -0
  102. package/dist/esnext/framework/plugins/vite-plugin-hydrogen-virtual-files.d.ts +7 -0
  103. package/dist/esnext/framework/plugins/vite-plugin-hydrogen-virtual-files.js +99 -0
  104. package/dist/esnext/framework/plugins/vite-plugin-platform-entry.js +4 -4
  105. package/dist/esnext/framework/viteception.d.ts +4 -0
  106. package/dist/esnext/framework/viteception.js +15 -0
  107. package/dist/esnext/hooks/useParsedMetafields/useParsedMetafields.d.ts +2 -2
  108. package/dist/esnext/hooks/useProductOptions/types.d.ts +16 -14
  109. package/dist/esnext/hooks/useProductOptions/useProductOptions.client.d.ts +1 -15
  110. package/dist/esnext/hooks/useProductOptions/useProductOptions.client.js +8 -107
  111. package/dist/esnext/hooks/useShopQuery/hooks.d.ts +1 -2
  112. package/dist/esnext/hooks/useShopQuery/hooks.js +12 -7
  113. package/dist/esnext/index.d.ts +30 -16
  114. package/dist/esnext/index.js +30 -20
  115. package/dist/esnext/storefront-api-types.d.ts +1 -1
  116. package/dist/esnext/streaming.server.d.ts +3 -2
  117. package/dist/esnext/streaming.server.js +0 -4
  118. package/dist/esnext/types.d.ts +43 -27
  119. package/dist/esnext/utilities/apiRoutes.d.ts +5 -6
  120. package/dist/esnext/utilities/apiRoutes.js +2 -8
  121. package/dist/esnext/utilities/fetch.d.ts +1 -2
  122. package/dist/esnext/utilities/fetch.js +1 -3
  123. package/dist/esnext/utilities/graphql-tag.d.ts +1 -0
  124. package/dist/esnext/utilities/graphql-tag.js +6 -0
  125. package/dist/esnext/utilities/graphql-tracker.d.ts +1 -1
  126. package/dist/esnext/utilities/graphql-tracker.js +4 -0
  127. package/dist/esnext/utilities/html-encoding.d.ts +0 -1
  128. package/dist/esnext/utilities/html-encoding.js +0 -8
  129. package/dist/esnext/utilities/index.d.ts +2 -2
  130. package/dist/esnext/utilities/index.js +2 -2
  131. package/dist/esnext/utilities/isBrowser/index.d.ts +1 -0
  132. package/dist/esnext/utilities/isBrowser/index.js +1 -0
  133. package/dist/esnext/utilities/isBrowser/isBrowser.d.ts +4 -0
  134. package/dist/esnext/utilities/isBrowser/isBrowser.js +6 -0
  135. package/dist/esnext/utilities/isServer/isServer.js +2 -2
  136. package/dist/esnext/utilities/log/index.d.ts +1 -1
  137. package/dist/esnext/utilities/log/index.js +1 -1
  138. package/dist/esnext/utilities/log/log-cache-header.d.ts +4 -4
  139. package/dist/esnext/utilities/log/log-query-timeline.d.ts +3 -3
  140. package/dist/esnext/utilities/log/log.d.ts +17 -11
  141. package/dist/esnext/utilities/log/log.js +29 -20
  142. package/dist/esnext/version.d.ts +1 -1
  143. package/dist/esnext/version.js +1 -1
  144. package/dist/node/client.d.ts +16 -0
  145. package/dist/node/client.js +43 -0
  146. package/dist/node/components/AddToCartButton/AddToCartButton.client.d.ts +23 -0
  147. package/dist/node/components/AddToCartButton/AddToCartButton.client.js +74 -0
  148. package/dist/node/components/AddToCartButton/index.d.ts +1 -0
  149. package/dist/node/components/AddToCartButton/index.js +5 -0
  150. package/dist/node/components/BuyNowButton/BuyNowButton.client.d.ts +18 -0
  151. package/dist/node/components/BuyNowButton/BuyNowButton.client.js +53 -0
  152. package/dist/node/components/BuyNowButton/index.d.ts +1 -0
  153. package/dist/node/components/BuyNowButton/index.js +5 -0
  154. package/dist/node/components/CartCheckoutButton/CartCheckoutButton.client.d.ts +11 -0
  155. package/dist/node/components/CartCheckoutButton/CartCheckoutButton.client.js +44 -0
  156. package/dist/node/components/CartCheckoutButton/index.d.ts +1 -0
  157. package/dist/node/components/CartCheckoutButton/index.js +5 -0
  158. package/dist/node/components/CartEstimatedCost/CartEstimatedCost.client.d.ts +14 -0
  159. package/dist/node/components/CartEstimatedCost/CartEstimatedCost.client.js +36 -0
  160. package/dist/node/components/CartEstimatedCost/index.d.ts +1 -0
  161. package/dist/node/components/CartEstimatedCost/index.js +5 -0
  162. package/dist/node/components/CartLineImage/CartLineImage.client.d.ts +9 -0
  163. package/dist/node/components/CartLineImage/CartLineImage.client.js +18 -0
  164. package/dist/node/components/CartLineImage/index.d.ts +1 -0
  165. package/dist/node/components/CartLineImage/index.js +5 -0
  166. package/dist/node/components/CartLinePrice/CartLinePrice.client.d.ts +12 -0
  167. package/dist/node/components/CartLinePrice/CartLinePrice.client.js +28 -0
  168. package/dist/node/components/CartLinePrice/index.d.ts +1 -0
  169. package/dist/node/components/CartLinePrice/index.js +5 -0
  170. package/dist/node/components/CartLineProductTitle/CartLineProductTitle.client.d.ts +8 -0
  171. package/dist/node/components/CartLineProductTitle/CartLineProductTitle.client.js +19 -0
  172. package/dist/node/components/CartLineProductTitle/index.d.ts +1 -0
  173. package/dist/node/components/CartLineProductTitle/index.js +5 -0
  174. package/dist/node/components/CartLineProvider/CartLineProvider.client.d.ts +11 -0
  175. package/dist/node/components/CartLineProvider/CartLineProvider.client.js +15 -0
  176. package/dist/node/components/CartLineProvider/context.d.ts +26 -0
  177. package/dist/node/components/CartLineProvider/context.js +5 -0
  178. package/dist/node/components/CartLineProvider/index.d.ts +2 -0
  179. package/dist/node/components/CartLineProvider/index.js +7 -0
  180. package/dist/node/components/CartLineQuantity/CartLineQuantity.client.d.ts +8 -0
  181. package/dist/node/components/CartLineQuantity/CartLineQuantity.client.js +19 -0
  182. package/dist/node/components/CartLineQuantity/index.d.ts +1 -0
  183. package/dist/node/components/CartLineQuantity/index.js +5 -0
  184. package/dist/node/components/CartLineQuantityAdjustButton/CartLineQuantityAdjustButton.d.ts +14 -0
  185. package/dist/node/components/CartLineQuantityAdjustButton/CartLineQuantityAdjustButton.js +31 -0
  186. package/dist/node/components/CartLineQuantityAdjustButton/index.d.ts +1 -0
  187. package/dist/node/components/CartLineQuantityAdjustButton/index.js +5 -0
  188. package/dist/node/components/CartLines/CartLines.client.d.ts +15 -0
  189. package/dist/node/components/CartLines/CartLines.client.js +44 -0
  190. package/dist/node/components/CartLines/index.d.ts +1 -0
  191. package/dist/node/components/CartLines/index.js +5 -0
  192. package/dist/node/components/CartProvider/CartProvider.client.d.ts +41 -0
  193. package/dist/node/components/CartProvider/CartProvider.client.js +550 -0
  194. package/dist/node/components/CartProvider/cart-queries.d.ts +10 -0
  195. package/dist/node/components/CartProvider/cart-queries.js +203 -0
  196. package/dist/node/components/CartProvider/constants.d.ts +2 -0
  197. package/dist/node/components/CartProvider/constants.js +5 -0
  198. package/dist/node/components/CartProvider/context.d.ts +2 -0
  199. package/dist/node/components/CartProvider/context.js +5 -0
  200. package/dist/node/components/CartProvider/graphql/CartAttributesUpdateMutation.d.ts +86 -0
  201. package/dist/node/components/CartProvider/graphql/CartAttributesUpdateMutation.js +2 -0
  202. package/dist/node/components/CartProvider/graphql/CartBuyerIdentityUpdateMutation.d.ts +86 -0
  203. package/dist/node/components/CartProvider/graphql/CartBuyerIdentityUpdateMutation.js +2 -0
  204. package/dist/node/components/CartProvider/graphql/CartCreateMutation.d.ts +85 -0
  205. package/dist/node/components/CartProvider/graphql/CartCreateMutation.js +2 -0
  206. package/dist/node/components/CartProvider/graphql/CartDiscountCodesUpdateMutation.d.ts +86 -0
  207. package/dist/node/components/CartProvider/graphql/CartDiscountCodesUpdateMutation.js +2 -0
  208. package/dist/node/components/CartProvider/graphql/CartFragment.d.ts +72 -0
  209. package/dist/node/components/CartProvider/graphql/CartFragment.js +2 -0
  210. package/dist/node/components/CartProvider/graphql/CartLineAddMutation.d.ts +86 -0
  211. package/dist/node/components/CartProvider/graphql/CartLineAddMutation.js +2 -0
  212. package/dist/node/components/CartProvider/graphql/CartLineRemoveMutation.d.ts +86 -0
  213. package/dist/node/components/CartProvider/graphql/CartLineRemoveMutation.js +2 -0
  214. package/dist/node/components/CartProvider/graphql/CartLineUpdateMutation.d.ts +86 -0
  215. package/dist/node/components/CartProvider/graphql/CartLineUpdateMutation.js +2 -0
  216. package/dist/node/components/CartProvider/graphql/CartNoteUpdateMutation.d.ts +86 -0
  217. package/dist/node/components/CartProvider/graphql/CartNoteUpdateMutation.js +2 -0
  218. package/dist/node/components/CartProvider/graphql/CartQuery.d.ts +81 -0
  219. package/dist/node/components/CartProvider/graphql/CartQuery.js +2 -0
  220. package/dist/node/components/CartProvider/hooks.client.d.ts +15 -0
  221. package/dist/node/components/CartProvider/hooks.client.js +90 -0
  222. package/dist/node/components/CartProvider/index.d.ts +4 -0
  223. package/dist/node/components/CartProvider/index.js +10 -0
  224. package/dist/node/components/CartProvider/types.d.ts +102 -0
  225. package/dist/node/components/CartProvider/types.js +2 -0
  226. package/dist/node/components/CartShopPayButton/CartShopPayButton.client.d.ts +9 -0
  227. package/dist/node/components/CartShopPayButton/CartShopPayButton.client.js +46 -0
  228. package/dist/node/components/CartShopPayButton/index.d.ts +1 -0
  229. package/dist/node/components/CartShopPayButton/index.js +5 -0
  230. package/dist/node/components/ExternalVideo/ExternalVideo.d.ts +21 -0
  231. package/dist/node/components/ExternalVideo/ExternalVideo.js +21 -0
  232. package/dist/node/components/ExternalVideo/index.d.ts +1 -0
  233. package/dist/node/components/ExternalVideo/index.js +5 -0
  234. package/dist/node/components/Image/Image.d.ts +11 -3
  235. package/dist/node/components/Image/Image.js +63 -12
  236. package/dist/node/components/Link/Link.client.d.ts +25 -0
  237. package/dist/node/components/Link/Link.client.js +165 -0
  238. package/dist/node/components/Link/index.d.ts +1 -0
  239. package/dist/node/components/Link/index.js +5 -0
  240. package/dist/node/components/LocalizationProvider/LocalizationClientProvider.client.d.ts +6 -0
  241. package/dist/node/components/LocalizationProvider/LocalizationClientProvider.client.js +11 -0
  242. package/dist/node/components/LocalizationProvider/LocalizationContext.client.d.ts +6 -0
  243. package/dist/node/components/LocalizationProvider/LocalizationContext.client.js +5 -0
  244. package/dist/node/components/LocalizationProvider/LocalizationProvider.server.d.ts +33 -0
  245. package/dist/node/components/LocalizationProvider/LocalizationProvider.server.js +51 -0
  246. package/dist/node/components/MediaFile/MediaFile.d.ts +19 -0
  247. package/dist/node/components/MediaFile/MediaFile.js +39 -0
  248. package/dist/node/components/MediaFile/index.d.ts +1 -0
  249. package/dist/node/components/MediaFile/index.js +5 -0
  250. package/dist/node/components/Metafield/Metafield.client.d.ts +21 -0
  251. package/dist/node/components/Metafield/Metafield.client.js +75 -0
  252. package/dist/node/components/Metafield/index.d.ts +2 -0
  253. package/dist/node/components/Metafield/index.js +5 -0
  254. package/dist/node/components/Metafield/types.d.ts +4 -0
  255. package/dist/node/components/Metafield/types.js +2 -0
  256. package/dist/node/components/ModelViewer/ModelViewer.client.d.ts +128 -0
  257. package/dist/node/components/ModelViewer/ModelViewer.client.js +132 -0
  258. package/dist/node/components/ModelViewer/index.d.ts +1 -0
  259. package/dist/node/components/ModelViewer/index.js +5 -0
  260. package/dist/node/components/Money/Money.client.d.ts +25 -0
  261. package/dist/node/components/Money/Money.client.js +46 -0
  262. package/dist/node/components/Money/index.d.ts +1 -0
  263. package/dist/node/components/Money/index.js +5 -0
  264. package/dist/node/components/ProductOptionsProvider/ProductOptionsProvider.client.d.ts +21 -0
  265. package/dist/node/components/ProductOptionsProvider/ProductOptionsProvider.client.js +167 -0
  266. package/dist/node/components/ProductOptionsProvider/context.d.ts +2 -0
  267. package/dist/node/components/ProductOptionsProvider/context.js +5 -0
  268. package/dist/node/components/ProductOptionsProvider/index.d.ts +2 -0
  269. package/dist/node/components/ProductOptionsProvider/index.js +7 -0
  270. package/dist/node/components/ProductPrice/ProductPrice.client.d.ts +18 -0
  271. package/dist/node/components/ProductPrice/ProductPrice.client.js +61 -0
  272. package/dist/node/components/ProductPrice/index.d.ts +1 -0
  273. package/dist/node/components/ProductPrice/index.js +5 -0
  274. package/dist/node/components/Seo/CollectionSeo.client.d.ts +3 -0
  275. package/dist/node/components/Seo/CollectionSeo.client.js +22 -0
  276. package/dist/node/components/Seo/DefaultPageSeo.client.d.ts +3 -0
  277. package/dist/node/components/Seo/DefaultPageSeo.client.js +25 -0
  278. package/dist/node/components/Seo/DescriptionSeo.client.d.ts +4 -0
  279. package/dist/node/components/Seo/DescriptionSeo.client.js +17 -0
  280. package/dist/node/components/Seo/HomePageSeo.client.d.ts +2 -0
  281. package/dist/node/components/Seo/HomePageSeo.client.js +32 -0
  282. package/dist/node/components/Seo/ImageSeo.client.d.ts +3 -0
  283. package/dist/node/components/Seo/ImageSeo.client.js +17 -0
  284. package/dist/node/components/Seo/NoIndexSeo.client.d.ts +3 -0
  285. package/dist/node/components/Seo/NoIndexSeo.client.js +17 -0
  286. package/dist/node/components/Seo/PageSeo.client.d.ts +3 -0
  287. package/dist/node/components/Seo/PageSeo.client.js +20 -0
  288. package/dist/node/components/Seo/ProductSeo.client.d.ts +5 -0
  289. package/dist/node/components/Seo/ProductSeo.client.js +70 -0
  290. package/dist/node/components/Seo/Seo.client.d.ts +30 -0
  291. package/dist/node/components/Seo/Seo.client.js +38 -0
  292. package/dist/node/components/Seo/TitleSeo.client.d.ts +3 -0
  293. package/dist/node/components/Seo/TitleSeo.client.js +17 -0
  294. package/dist/node/components/Seo/TwitterSeo.client.d.ts +2 -0
  295. package/dist/node/components/Seo/TwitterSeo.client.js +16 -0
  296. package/dist/node/components/Seo/index.d.ts +1 -0
  297. package/dist/node/components/Seo/index.js +5 -0
  298. package/dist/node/components/Seo/seo-types.d.ts +17 -0
  299. package/dist/node/components/Seo/seo-types.js +2 -0
  300. package/dist/node/components/ShopPayButton/ShopPayButton.client.d.ts +38 -0
  301. package/dist/node/components/ShopPayButton/ShopPayButton.client.js +60 -0
  302. package/dist/node/components/ShopPayButton/index.d.ts +1 -0
  303. package/dist/node/components/ShopPayButton/index.js +5 -0
  304. package/dist/node/components/Video/Video.d.ts +14 -0
  305. package/dist/node/components/Video/Video.js +31 -0
  306. package/dist/node/components/Video/index.d.ts +1 -0
  307. package/dist/node/components/Video/index.js +5 -0
  308. package/dist/node/components/index.d.ts +28 -0
  309. package/dist/node/components/index.js +59 -0
  310. package/dist/node/components/types.d.ts +71 -0
  311. package/dist/node/components/types.js +11 -0
  312. package/dist/node/entry-server.d.ts +3 -16
  313. package/dist/node/entry-server.js +280 -330
  314. package/dist/node/foundation/Analytics/Analytics.client.js +19 -17
  315. package/dist/node/foundation/Analytics/Analytics.server.js +27 -20
  316. package/dist/node/foundation/Analytics/ClientAnalytics.d.ts +4 -2
  317. package/dist/node/foundation/Analytics/ClientAnalytics.js +16 -14
  318. package/dist/node/foundation/Analytics/ServerAnalyticsRoute.server.js +7 -5
  319. package/dist/node/foundation/Analytics/connectors/PerformanceMetrics/PerformanceMetrics.client.d.ts +7 -0
  320. package/dist/node/foundation/Analytics/connectors/PerformanceMetrics/PerformanceMetrics.client.js +68 -0
  321. package/dist/node/foundation/Analytics/connectors/PerformanceMetrics/PerformanceMetricsDebug.client.d.ts +1 -0
  322. package/dist/node/foundation/Analytics/connectors/PerformanceMetrics/PerformanceMetricsDebug.client.js +27 -0
  323. package/dist/node/foundation/Analytics/hook.js +4 -2
  324. package/dist/node/foundation/Analytics/index.d.ts +0 -1
  325. package/dist/node/foundation/Analytics/index.js +1 -3
  326. package/dist/node/foundation/Analytics/utils.d.ts +2 -0
  327. package/dist/node/foundation/Analytics/utils.js +24 -1
  328. package/dist/{esnext/framework → node/foundation/Cache}/cache-sub-request.d.ts +1 -1
  329. package/dist/node/{framework → foundation/Cache}/cache-sub-request.js +4 -4
  330. package/dist/node/{framework → foundation/Cache}/cache.d.ts +1 -1
  331. package/dist/node/{framework → foundation/Cache}/cache.js +5 -5
  332. package/dist/{esnext/framework/CachingStrategy → node/foundation/Cache/strategies}/index.d.ts +1 -1
  333. package/dist/node/{framework/CachingStrategy → foundation/Cache/strategies}/index.js +0 -0
  334. package/dist/node/foundation/Head/Head.client.d.ts +5 -0
  335. package/dist/node/foundation/Head/Head.client.js +17 -0
  336. package/dist/node/foundation/Head/index.d.ts +1 -0
  337. package/dist/node/foundation/Head/index.js +5 -0
  338. package/dist/{esnext/framework/Hydration → node/foundation/Html}/Html.d.ts +3 -1
  339. package/dist/node/{framework/Hydration → foundation/Html}/Html.js +15 -2
  340. package/dist/{esnext/framework/Hydration/ServerComponentRequest.server.d.ts → node/foundation/HydrogenRequest/HydrogenRequest.server.d.ts} +9 -5
  341. package/dist/node/{framework/Hydration/ServerComponentRequest.server.js → foundation/HydrogenRequest/HydrogenRequest.server.js} +3 -3
  342. package/dist/node/foundation/HydrogenResponse/HydrogenResponse.server.d.ts +23 -0
  343. package/dist/node/foundation/HydrogenResponse/HydrogenResponse.server.js +53 -0
  344. package/dist/node/foundation/Router/BrowserRouter.client.d.ts +2 -1
  345. package/dist/node/foundation/Router/BrowserRouter.client.js +17 -10
  346. package/dist/node/foundation/ServerPropsProvider/ServerPropsProvider.d.ts +2 -1
  347. package/dist/node/foundation/ServerPropsProvider/ServerPropsProvider.js +1 -3
  348. package/dist/node/foundation/ServerRequestProvider/ServerRequestProvider.d.ts +4 -4
  349. package/dist/node/foundation/ServerRequestProvider/ServerRequestProvider.js +2 -2
  350. package/dist/node/foundation/ShopifyProvider/ShopifyProvider.client.d.ts +7 -0
  351. package/dist/node/foundation/ShopifyProvider/ShopifyProvider.client.js +35 -0
  352. package/dist/node/foundation/ShopifyProvider/index.d.ts +1 -0
  353. package/dist/node/foundation/ShopifyProvider/index.js +5 -0
  354. package/dist/node/foundation/fetchSync/client/fetchSync.d.ts +10 -0
  355. package/dist/node/foundation/fetchSync/client/fetchSync.js +33 -0
  356. package/dist/node/foundation/fetchSync/server/fetchSync.d.ts +8 -0
  357. package/dist/node/foundation/fetchSync/server/fetchSync.js +33 -0
  358. package/dist/node/foundation/fetchSync/types.d.ts +5 -0
  359. package/dist/node/foundation/fetchSync/types.js +2 -0
  360. package/dist/node/foundation/index.d.ts +3 -0
  361. package/dist/node/foundation/index.js +10 -0
  362. package/dist/node/foundation/runtime.d.ts +2 -0
  363. package/dist/node/foundation/runtime.js +11 -0
  364. package/dist/node/foundation/session/session.d.ts +3 -3
  365. package/dist/node/foundation/ssr-interop.d.ts +2 -2
  366. package/dist/node/foundation/useNavigate/useNavigate.d.ts +2 -0
  367. package/dist/node/foundation/useNavigate/useNavigate.js +11 -4
  368. package/dist/node/foundation/useQuery/hooks.d.ts +36 -0
  369. package/dist/node/foundation/useQuery/hooks.js +104 -0
  370. package/dist/node/foundation/useRouteParams/RouteParamsProvider.client.d.ts +10 -0
  371. package/dist/node/foundation/useRouteParams/RouteParamsProvider.client.js +34 -0
  372. package/dist/node/foundation/useRouteParams/useRouteParams.d.ts +4 -0
  373. package/dist/node/foundation/useRouteParams/useRouteParams.js +13 -0
  374. package/dist/node/foundation/useServerProps/index.d.ts +1 -0
  375. package/dist/node/foundation/useServerProps/index.js +5 -0
  376. package/dist/node/foundation/useSession/useSession.d.ts +2 -0
  377. package/dist/node/foundation/useSession/useSession.js +12 -0
  378. package/dist/node/foundation/useShop/index.d.ts +1 -0
  379. package/dist/node/foundation/useShop/index.js +5 -0
  380. package/dist/node/foundation/useShop/use-shop.d.ts +6 -0
  381. package/dist/node/foundation/useShop/use-shop.js +18 -0
  382. package/dist/node/foundation/useUrl/index.d.ts +1 -0
  383. package/dist/node/foundation/useUrl/index.js +5 -0
  384. package/dist/node/foundation/useUrl/useUrl.d.ts +4 -0
  385. package/dist/node/foundation/useUrl/useUrl.js +32 -0
  386. package/dist/node/framework/Hydration/rsc.js +4 -2
  387. package/dist/node/framework/middleware.js +1 -15
  388. package/dist/node/framework/plugin.js +4 -0
  389. package/dist/node/framework/plugins/vite-plugin-hydrogen-client-middleware.d.ts +1 -1
  390. package/dist/node/framework/plugins/vite-plugin-hydrogen-config.js +6 -3
  391. package/dist/node/framework/plugins/vite-plugin-hydrogen-middleware.js +6 -47
  392. package/dist/node/framework/plugins/vite-plugin-hydrogen-rsc.js +5 -18
  393. package/dist/node/framework/plugins/vite-plugin-hydrogen-suppress-warnings.d.ts +3 -0
  394. package/dist/node/framework/plugins/vite-plugin-hydrogen-suppress-warnings.js +21 -0
  395. package/dist/node/framework/plugins/vite-plugin-hydrogen-virtual-files.d.ts +7 -0
  396. package/dist/node/framework/plugins/vite-plugin-hydrogen-virtual-files.js +105 -0
  397. package/dist/node/framework/plugins/vite-plugin-platform-entry.js +4 -4
  398. package/dist/node/framework/viteception.d.ts +4 -0
  399. package/dist/node/framework/viteception.js +19 -0
  400. package/dist/node/hooks/index.d.ts +6 -0
  401. package/dist/node/hooks/index.js +28 -0
  402. package/dist/node/hooks/useCart/index.d.ts +1 -0
  403. package/dist/node/hooks/useCart/index.js +5 -0
  404. package/dist/node/hooks/useCart/useCart.d.ts +4 -0
  405. package/dist/node/hooks/useCart/useCart.js +19 -0
  406. package/dist/node/hooks/useCartLine/index.d.ts +1 -0
  407. package/dist/node/hooks/useCartLine/index.js +5 -0
  408. package/dist/node/hooks/useCartLine/useCartLine.d.ts +29 -0
  409. package/dist/node/hooks/useCartLine/useCartLine.js +16 -0
  410. package/dist/node/hooks/useCountry/index.d.ts +1 -0
  411. package/dist/node/hooks/useCountry/index.js +5 -0
  412. package/dist/node/hooks/useCountry/useCountry.d.ts +7 -0
  413. package/dist/node/hooks/useCountry/useCountry.js +21 -0
  414. package/dist/node/hooks/useLoadScript/index.d.ts +1 -0
  415. package/dist/node/hooks/useLoadScript/index.js +5 -0
  416. package/dist/node/hooks/useLoadScript/useLoadScript.client.d.ts +8 -0
  417. package/dist/node/hooks/useLoadScript/useLoadScript.client.js +27 -0
  418. package/dist/node/hooks/useMeasurement/hooks.d.ts +9 -0
  419. package/dist/node/hooks/useMeasurement/hooks.js +17 -0
  420. package/dist/node/hooks/useMeasurement/index.d.ts +1 -0
  421. package/dist/node/hooks/useMeasurement/index.js +5 -0
  422. package/dist/node/hooks/useMoney/hooks.d.ts +54 -0
  423. package/dist/node/hooks/useMoney/hooks.js +70 -0
  424. package/dist/node/hooks/useMoney/index.d.ts +1 -0
  425. package/dist/node/hooks/useMoney/index.js +5 -0
  426. package/dist/node/hooks/useParsedMetafields/index.d.ts +1 -0
  427. package/dist/node/hooks/useParsedMetafields/index.js +5 -0
  428. package/dist/node/hooks/useParsedMetafields/useParsedMetafields.d.ts +21 -0
  429. package/dist/node/hooks/useParsedMetafields/useParsedMetafields.js +25 -0
  430. package/dist/node/hooks/useProductOptions/helpers.d.ts +6 -0
  431. package/dist/node/hooks/useProductOptions/helpers.js +46 -0
  432. package/dist/node/hooks/useProductOptions/index.d.ts +2 -0
  433. package/dist/node/hooks/useProductOptions/index.js +20 -0
  434. package/dist/node/hooks/useProductOptions/types.d.ts +44 -0
  435. package/dist/node/hooks/useProductOptions/types.js +2 -0
  436. package/dist/node/hooks/useProductOptions/useProductOptions.client.d.ts +1 -0
  437. package/dist/node/hooks/useProductOptions/useProductOptions.client.js +13 -0
  438. package/dist/node/hooks/useShopQuery/hooks.d.ts +28 -0
  439. package/dist/node/hooks/useShopQuery/hooks.js +171 -0
  440. package/dist/node/hooks/useShopQuery/index.d.ts +1 -0
  441. package/dist/node/hooks/useShopQuery/index.js +5 -0
  442. package/dist/node/storefront-api-types.d.ts +1 -1
  443. package/dist/node/streaming.server.d.ts +3 -2
  444. package/dist/node/streaming.server.js +1 -6
  445. package/dist/node/types.d.ts +43 -27
  446. package/dist/node/utilities/apiRoutes.d.ts +5 -6
  447. package/dist/node/utilities/apiRoutes.js +2 -8
  448. package/dist/node/utilities/devtools.d.ts +11 -0
  449. package/dist/node/utilities/devtools.js +15 -0
  450. package/dist/node/utilities/fetch.d.ts +1 -2
  451. package/dist/node/utilities/fetch.js +1 -3
  452. package/dist/node/utilities/graphql-tag.d.ts +1 -0
  453. package/dist/node/utilities/graphql-tag.js +10 -0
  454. package/dist/node/utilities/graphql-tracker.d.ts +17 -0
  455. package/dist/node/utilities/graphql-tracker.js +130 -0
  456. package/dist/node/utilities/html-encoding.d.ts +0 -1
  457. package/dist/node/utilities/html-encoding.js +1 -10
  458. package/dist/node/utilities/index.d.ts +2 -2
  459. package/dist/node/utilities/index.js +3 -4
  460. package/dist/node/utilities/isBrowser/index.d.ts +1 -0
  461. package/dist/node/utilities/isBrowser/index.js +5 -0
  462. package/dist/node/utilities/isBrowser/isBrowser.d.ts +4 -0
  463. package/dist/node/utilities/isBrowser/isBrowser.js +10 -0
  464. package/dist/node/utilities/isServer/isServer.js +2 -2
  465. package/dist/node/utilities/log/index.d.ts +1 -1
  466. package/dist/node/utilities/log/index.js +1 -3
  467. package/dist/node/utilities/log/log-cache-header.d.ts +4 -4
  468. package/dist/node/utilities/log/log-query-timeline.d.ts +3 -3
  469. package/dist/node/utilities/log/log.d.ts +17 -11
  470. package/dist/node/utilities/log/log.js +30 -23
  471. package/dist/node/version.d.ts +1 -1
  472. package/dist/node/version.js +1 -1
  473. package/package.json +6 -3
  474. package/vendor/react-server-dom-vite/cjs/react-server-dom-vite-plugin.js +219 -51
  475. package/vendor/react-server-dom-vite/cjs/react-server-dom-vite-writer.browser.development.server.js +77 -59
  476. package/vendor/react-server-dom-vite/cjs/react-server-dom-vite-writer.browser.production.min.server.js +30 -30
  477. package/vendor/react-server-dom-vite/cjs/react-server-dom-vite-writer.node.development.server.js +199 -70
  478. package/vendor/react-server-dom-vite/cjs/react-server-dom-vite-writer.node.production.min.server.js +38 -35
  479. package/vendor/react-server-dom-vite/cjs/react-server-dom-vite.development.js +9 -8
  480. package/vendor/react-server-dom-vite/cjs/react-server-dom-vite.production.min.js +3 -3
  481. package/vendor/react-server-dom-vite/esm/react-server-dom-vite-client-proxy.js +3 -7
  482. package/vendor/react-server-dom-vite/esm/react-server-dom-vite-plugin.js +220 -52
  483. package/vendor/react-server-dom-vite/esm/react-server-dom-vite-writer.browser.server.js +77 -59
  484. package/vendor/react-server-dom-vite/esm/react-server-dom-vite-writer.node.server.js +199 -70
  485. package/vendor/react-server-dom-vite/esm/react-server-dom-vite.js +9 -8
  486. package/vendor/react-server-dom-vite/package.json +1 -1
  487. package/dist/esnext/components/ProductProvider/ProductOptionsProvider.client.d.ts +0 -8
  488. package/dist/esnext/components/ProductProvider/ProductOptionsProvider.client.js +0 -12
  489. package/dist/esnext/components/ProductProvider/ProductProvider.client.d.ts +0 -24
  490. package/dist/esnext/components/ProductProvider/ProductProvider.client.js +0 -34
  491. package/dist/esnext/components/ProductProvider/context.d.ts +0 -29
  492. package/dist/esnext/components/ProductProvider/index.d.ts +0 -2
  493. package/dist/esnext/components/ProductProvider/index.js +0 -2
  494. package/dist/esnext/foundation/Analytics/connectors/PerformanceMetrics/PerformanceMetrics.server.d.ts +0 -1
  495. package/dist/esnext/framework/Hydration/ServerComponentResponse.server.d.ts +0 -35
  496. package/dist/esnext/framework/Hydration/ServerComponentResponse.server.js +0 -61
  497. package/dist/esnext/framework/config.d.ts +0 -6
  498. package/dist/esnext/framework/config.js +0 -6
  499. package/dist/esnext/framework/runtime.d.ts +0 -13
  500. package/dist/esnext/framework/runtime.js +0 -27
  501. package/dist/esnext/hooks/useProduct/index.d.ts +0 -1
  502. package/dist/esnext/hooks/useProduct/index.js +0 -1
  503. package/dist/esnext/hooks/useProduct/useProduct.d.ts +0 -52
  504. package/dist/esnext/hooks/useProduct/useProduct.js +0 -43
  505. package/dist/esnext/utilities/findRoutePrefix.d.ts +0 -1
  506. package/dist/esnext/utilities/findRoutePrefix.js +0 -17
  507. package/dist/esnext/utilities/isClient/index.d.ts +0 -1
  508. package/dist/esnext/utilities/isClient/index.js +0 -1
  509. package/dist/esnext/utilities/isClient/isClient.d.ts +0 -4
  510. package/dist/esnext/utilities/isClient/isClient.js +0 -6
  511. package/dist/node/framework/Hydration/ServerComponentResponse.server.d.ts +0 -35
  512. package/dist/node/framework/Hydration/ServerComponentResponse.server.js +0 -68
  513. package/dist/node/framework/config.d.ts +0 -6
  514. package/dist/node/framework/config.js +0 -11
  515. package/dist/node/framework/runtime.d.ts +0 -13
  516. package/dist/node/framework/runtime.js +0 -35
  517. package/dist/node/utilities/defer.d.ts +0 -6
  518. package/dist/node/utilities/defer.js +0 -18
  519. package/dist/node/utilities/findRoutePrefix.d.ts +0 -1
  520. package/dist/node/utilities/findRoutePrefix.js +0 -21
  521. package/dist/node/utilities/isClient/index.d.ts +0 -1
  522. package/dist/node/utilities/isClient/index.js +0 -5
  523. package/dist/node/utilities/isClient/isClient.d.ts +0 -4
  524. package/dist/node/utilities/isClient/isClient.js +0 -10
@@ -1,10 +1,10 @@
1
1
  import * as React from 'react';
2
- import { getShopifyImageDimensions, shopifyImageLoader } from '../../utilities';
2
+ import { getShopifyImageDimensions, shopifyImageLoader, addImageSizeParametersToUrl, } from '../../utilities';
3
3
  export function Image(props) {
4
4
  if (!props.data && !props.src) {
5
5
  throw new Error(`<Image/>: requires either a 'data' or 'src' prop.`);
6
6
  }
7
- if (props.data && props.src) {
7
+ if (__HYDROGEN_DEV__ && props.data && props.src) {
8
8
  console.warn(`<Image/>: using both 'data' and 'src' props is not supported; using the 'data' prop by default`);
9
9
  }
10
10
  if (props.data) {
@@ -14,17 +14,17 @@ export function Image(props) {
14
14
  return React.createElement(ExternalImage, { ...props });
15
15
  }
16
16
  }
17
- function ShopifyImage({ data, width, height, loading, loader = shopifyImageLoader, loaderOptions, ...rest }) {
18
- var _a, _b, _c;
17
+ function ShopifyImage({ data, width, height, loading, loader = shopifyImageLoader, loaderOptions, widths, ...rest }) {
18
+ var _a, _b, _c, _d, _e, _f, _g;
19
19
  if (!data.url) {
20
20
  throw new Error(`<Image/>: the 'data' prop requires the 'url' property`);
21
21
  }
22
- if (!data.altText && !rest.alt) {
23
- console.warn(`<Image/>: the 'data' prop should have the 'altText' property, or the 'alt' prop, and one of them should not be empty. ${data.id ? `Image ID: ${data.id}` : ''}`);
22
+ if (__HYDROGEN_DEV__ && !data.altText && !rest.alt) {
23
+ console.warn(`<Image/>: the 'data' prop should have the 'altText' property, or the 'alt' prop, and one of them should not be empty. ${`Image: ${(_a = data.id) !== null && _a !== void 0 ? _a : data.url}`}`);
24
24
  }
25
25
  const { width: finalWidth, height: finalHeight } = getShopifyImageDimensions(data, loaderOptions);
26
- if (!finalWidth || !finalHeight) {
27
- console.warn(`<Image/>: the 'data' prop requires either 'width' or 'data.width', and 'height' or 'data.height' properties`);
26
+ if ((__HYDROGEN_DEV__ && !finalWidth) || !finalHeight) {
27
+ console.warn(`<Image/>: the 'data' prop requires either 'width' or 'data.width', and 'height' or 'data.height' properties. ${`Image: ${(_b = data.id) !== null && _b !== void 0 ? _b : data.url}`}`);
28
28
  }
29
29
  let finalSrc = data.url;
30
30
  if (loader) {
@@ -34,18 +34,36 @@ function ShopifyImage({ data, width, height, loading, loader = shopifyImageLoade
34
34
  width: finalWidth,
35
35
  height: finalHeight,
36
36
  });
37
+ if (typeof finalSrc !== 'string' || !finalSrc) {
38
+ throw new Error(`<Image/>: 'loader' did not return a valid string. ${`Image: ${(_c = data.id) !== null && _c !== void 0 ? _c : data.url}`}`);
39
+ }
37
40
  }
41
+ // determining what the intended width of the image is. For example, if the width is specified and lower than the image width, then that is the maximum image width
42
+ // to prevent generating a srcset with widths bigger than needed or to generate images that would distort because of being larger than original
43
+ const maxWidth = width && finalWidth && width < finalWidth ? width : finalWidth;
44
+ const finalSrcset = (_d = rest.srcSet) !== null && _d !== void 0 ? _d : internalImageSrcSet({
45
+ ...loaderOptions,
46
+ widths,
47
+ src: data.url,
48
+ width: maxWidth,
49
+ loader,
50
+ });
38
51
  /* eslint-disable hydrogen/prefer-image-component */
39
- return (React.createElement("img", { id: (_a = data.id) !== null && _a !== void 0 ? _a : '', alt: (_c = (_b = data.altText) !== null && _b !== void 0 ? _b : rest.alt) !== null && _c !== void 0 ? _c : '', loading: loading !== null && loading !== void 0 ? loading : 'lazy', ...rest, src: finalSrc, width: finalWidth !== null && finalWidth !== void 0 ? finalWidth : undefined, height: finalHeight !== null && finalHeight !== void 0 ? finalHeight : undefined }));
52
+ return (React.createElement("img", { id: (_e = data.id) !== null && _e !== void 0 ? _e : '', alt: (_g = (_f = data.altText) !== null && _f !== void 0 ? _f : rest.alt) !== null && _g !== void 0 ? _g : '', loading: loading !== null && loading !== void 0 ? loading : 'lazy', ...rest, src: finalSrc, width: finalWidth !== null && finalWidth !== void 0 ? finalWidth : undefined, height: finalHeight !== null && finalHeight !== void 0 ? finalHeight : undefined, srcSet: finalSrcset }));
40
53
  /* eslint-enable hydrogen/prefer-image-component */
41
54
  }
42
- function ExternalImage({ src, width, height, alt, loader, loaderOptions, loading, ...rest }) {
55
+ function ExternalImage({ src, width, height, alt, loader, loaderOptions, widths, loading, ...rest }) {
56
+ var _a, _b;
43
57
  if (!width || !height) {
44
58
  throw new Error(`<Image/>: when 'src' is provided, 'width' and 'height' are required and need to be valid values (i.e. greater than zero). Provided values: 'src': ${src}, 'width': ${width}, 'height': ${height}`);
45
59
  }
46
- if (!alt) {
47
- console.warn(`<Image/>: when 'src' is provided, 'alt' should also be provided`);
60
+ if (__HYDROGEN_DEV__ && !alt) {
61
+ console.warn(`<Image/>: when 'src' is provided, 'alt' should also be provided. ${`Image: ${src}`}`);
48
62
  }
63
+ if (widths &&
64
+ Array.isArray(widths) &&
65
+ widths.some((size) => isNaN(size)))
66
+ throw new Error(`<Image/>: the 'widths' property must be an array of numbers`);
49
67
  let finalSrc = src;
50
68
  if (loader) {
51
69
  finalSrc = loader({ src, width, height, ...loaderOptions });
@@ -53,7 +71,40 @@ function ExternalImage({ src, width, height, alt, loader, loaderOptions, loading
53
71
  throw new Error(`<Image/>: 'loader' did not return a valid string`);
54
72
  }
55
73
  }
74
+ let finalSrcset = (_a = rest.srcSet) !== null && _a !== void 0 ? _a : undefined;
75
+ if (!finalSrcset && loader && widths) {
76
+ // Height is a requirement in the LoaderProps, so to keep the aspect ratio, we must determine the height based on the default values
77
+ const heightToWidthRatio = parseInt(height) / parseInt(width);
78
+ finalSrcset = (_b = widths === null || widths === void 0 ? void 0 : widths.map((width) => parseInt(width, 10))) === null || _b === void 0 ? void 0 : _b.map((width) => `${loader({
79
+ ...loaderOptions,
80
+ src,
81
+ width,
82
+ height: Math.floor(width * heightToWidthRatio),
83
+ })} ${width}w`).join(', ');
84
+ }
56
85
  /* eslint-disable hydrogen/prefer-image-component */
57
- return (React.createElement("img", { ...rest, src: finalSrc, width: width, height: height, alt: alt !== null && alt !== void 0 ? alt : '', loading: loading !== null && loading !== void 0 ? loading : 'lazy' }));
86
+ return (React.createElement("img", { ...rest, src: finalSrc, width: width, height: height, alt: alt !== null && alt !== void 0 ? alt : '', loading: loading !== null && loading !== void 0 ? loading : 'lazy', srcSet: finalSrcset }));
58
87
  /* eslint-enable hydrogen/prefer-image-component */
59
88
  }
89
+ // based on the default width sizes used by the Shopify liquid HTML tag img_tag plus a 2560 width to account for 2k resolutions
90
+ // reference: https://shopify.dev/api/liquid/filters/html-filters#image_tag
91
+ const IMG_SRC_SET_SIZES = [352, 832, 1200, 1920, 2560];
92
+ function internalImageSrcSet({ src, width, crop, scale, widths, loader, }) {
93
+ const hasCustomWidths = widths && Array.isArray(widths);
94
+ if (hasCustomWidths && widths.some((size) => isNaN(size)))
95
+ throw new Error(`<Image/>: the 'widths' must be an array of numbers`);
96
+ let setSizes = hasCustomWidths ? widths : IMG_SRC_SET_SIZES;
97
+ if (!hasCustomWidths &&
98
+ width &&
99
+ width < IMG_SRC_SET_SIZES[IMG_SRC_SET_SIZES.length - 1])
100
+ setSizes = IMG_SRC_SET_SIZES.filter((size) => size <= width);
101
+ const srcGenerator = loader ? loader : addImageSizeParametersToUrl;
102
+ return setSizes
103
+ .map((size) => `${srcGenerator({
104
+ src,
105
+ width: size,
106
+ crop,
107
+ scale,
108
+ })} ${size}w`)
109
+ .join(', ');
110
+ }
@@ -10,6 +10,8 @@ export interface LinkProps extends Omit<React.AnchorHTMLAttributes<HTMLAnchorEle
10
10
  reloadDocument?: boolean;
11
11
  /** Whether to prefetch the link source when the user signals intent. Defaults to `true`. For more information, refer to [Prefetching a link source](https://shopify.dev/custom-storefronts/hydrogen/framework/routes#prefetching-a-link-source). */
12
12
  prefetch?: boolean;
13
+ /** Whether to emulate natural browser behavior and restore scroll position on navigation. Defaults to `true`. */
14
+ scroll?: boolean;
13
15
  }
14
16
  /**
15
17
  * The `Link` component is used to navigate between routes. Because it renders an underlying `<a>` element, all
@@ -18,7 +18,7 @@ export const Link = React.forwardRef(function Link(props, ref) {
18
18
  */
19
19
  const [shouldPrefetch, setShouldPrefetch] = useState(false);
20
20
  const [maybePrefetch, setMaybePrefetch] = useState(false);
21
- const { reloadDocument, target, replace: _replace, to, onClick, clientState, prefetch = true, } = props;
21
+ const { reloadDocument, target, replace: _replace, to, onClick, clientState, prefetch = true, scroll = true, } = props;
22
22
  const internalClick = useCallback((e) => {
23
23
  if (onClick)
24
24
  onClick(e);
@@ -32,18 +32,20 @@ export const Link = React.forwardRef(function Link(props, ref) {
32
32
  const replace = !!_replace || createPath(location) === createPath({ pathname: to });
33
33
  navigate(to, {
34
34
  replace,
35
+ scroll,
35
36
  clientState,
36
37
  });
37
38
  }
38
39
  }, [
40
+ onClick,
39
41
  reloadDocument,
40
42
  target,
41
43
  _replace,
42
- to,
43
- clientState,
44
- onClick,
45
44
  location,
45
+ to,
46
46
  navigate,
47
+ clientState,
48
+ scroll,
47
49
  ]);
48
50
  const signalPrefetchIntent = () => {
49
51
  /**
@@ -91,6 +93,7 @@ export const Link = React.forwardRef(function Link(props, ref) {
91
93
  'clientState',
92
94
  'reloadDocument',
93
95
  'prefetch',
96
+ 'scroll',
94
97
  ]), ref: ref, onClick: internalClick, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onFocus: onFocus, onBlur: onBlur, onTouchStart: onTouchStart, href: props.to }, props.children),
95
98
  shouldPrefetch && React.createElement(Prefetch, { pathname: to })));
96
99
  });
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import LocalizationClientProvider from './LocalizationClientProvider.client';
3
3
  import { useShop } from '../../foundation/useShop';
4
4
  import { useShopQuery } from '../../hooks/useShopQuery';
5
- import { CacheDays } from '../../framework/CachingStrategy';
5
+ import { CacheDays } from '../../foundation/Cache/strategies';
6
6
  import { useSession } from '../../foundation/useSession/useSession';
7
7
  /**
8
8
  * The `LocalizationProvider` component automatically queries the Storefront API's
@@ -12,8 +12,9 @@ import { ModelViewer } from '../ModelViewer';
12
12
  export function MediaFile({ data, options, ...passthroughProps }) {
13
13
  switch (data.mediaContentType) {
14
14
  case 'IMAGE': {
15
- const dataImage = data.image;
16
- if (!dataImage) {
15
+ const dataImage = data
16
+ .image;
17
+ if (!dataImage || !dataImage.url) {
17
18
  console.warn(`No "image" property was found on the "data" prop for <MediaFile/>, for the "type='image'"`);
18
19
  return null;
19
20
  }
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import type { Product, ProductVariant as ProductVariantType } from '../../storefront-api-types';
3
+ import type { PartialDeep } from 'type-fest';
4
+ declare type InitialVariantId = ProductVariantType['id'] | null;
5
+ interface ProductOptionsProviderProps {
6
+ /** A [Product object](https://shopify.dev/api/storefront/reference/products/product). */
7
+ data: PartialDeep<Product>;
8
+ /** A `ReactNode` element. */
9
+ children: React.ReactNode;
10
+ /**
11
+ * The initially selected variant.
12
+ * The following logic applies to `initialVariantId`:
13
+ * 1. If `initialVariantId` is provided, then it's used even if it's out of stock.
14
+ * 2. If `initialVariantId` is provided but is `null`, then no variant is used.
15
+ * 3. If nothing is passed to `initialVariantId` then the first available / in-stock variant is used.
16
+ * 4. If nothing is passed to `initialVariantId` and no variants are in stock, then the first variant is used.
17
+ */
18
+ initialVariantId?: InitialVariantId;
19
+ }
20
+ export declare function ProductOptionsProvider({ children, data: product, initialVariantId: explicitVariantId, }: ProductOptionsProviderProps): JSX.Element;
21
+ export {};
@@ -0,0 +1,140 @@
1
+ import React, { useMemo, useState, useEffect, useCallback } from 'react';
2
+ import { ProductOptionsContext } from './context';
3
+ import { getSelectedVariant, getOptions, } from '../../hooks/useProductOptions/helpers';
4
+ export function ProductOptionsProvider({ children, data: product, initialVariantId: explicitVariantId, }) {
5
+ var _a, _b;
6
+ // The flattened variants
7
+ const variants = useMemo(() => { var _a; return (_a = product.variants) === null || _a === void 0 ? void 0 : _a.nodes; }, [(_a = product.variants) === null || _a === void 0 ? void 0 : _a.nodes]);
8
+ if (!isProductVariantArray(variants)) {
9
+ throw new Error(`<ProductOptionsProvider/> requires product.variants.nodes`);
10
+ }
11
+ // All the options available for a product, based on all the variants
12
+ const options = useMemo(() => getOptions(variants), [variants]);
13
+ /**
14
+ * Track the selectedVariant within the provider.
15
+ */
16
+ const [selectedVariant, setSelectedVariant] = useState(() => getVariantBasedOnIdProp(explicitVariantId, variants));
17
+ /**
18
+ * Track the selectedOptions within the provider. If a `initialVariantId`
19
+ * is passed, use that to select initial options.
20
+ */
21
+ const [selectedOptions, setSelectedOptions] = useState(() => getSelectedOptions(selectedVariant));
22
+ /**
23
+ * When the initialVariantId changes, we need to make sure we
24
+ * update the selected variant and selected options. If not,
25
+ * then the selected variant and options will reference incorrect
26
+ * values.
27
+ */
28
+ useEffect(() => {
29
+ const newSelectedVariant = getVariantBasedOnIdProp(explicitVariantId, variants);
30
+ setSelectedVariant(newSelectedVariant);
31
+ setSelectedOptions(getSelectedOptions(newSelectedVariant));
32
+ }, [explicitVariantId, variants]);
33
+ /**
34
+ * Allow the developer to select an option.
35
+ */
36
+ const setSelectedOption = useCallback((name, value) => {
37
+ setSelectedOptions((selectedOptions) => ({
38
+ ...selectedOptions,
39
+ [name]: value,
40
+ }));
41
+ }, [setSelectedOptions]);
42
+ const isOptionInStock = useCallback((option, value) => {
43
+ var _a;
44
+ const proposedVariant = getSelectedVariant(variants, {
45
+ ...selectedOptions,
46
+ ...{ [option]: value },
47
+ });
48
+ return (_a = proposedVariant === null || proposedVariant === void 0 ? void 0 : proposedVariant.availableForSale) !== null && _a !== void 0 ? _a : true;
49
+ }, [selectedOptions, variants]);
50
+ const sellingPlanGroups = useMemo(() => {
51
+ var _a, _b;
52
+ return (_b = (_a = product.sellingPlanGroups) === null || _a === void 0 ? void 0 : _a.nodes) === null || _b === void 0 ? void 0 : _b.map((sellingPlanGroup) => {
53
+ var _a, _b;
54
+ return ({
55
+ ...sellingPlanGroup,
56
+ sellingPlans: (_b = (_a = sellingPlanGroup === null || sellingPlanGroup === void 0 ? void 0 : sellingPlanGroup.sellingPlans) === null || _a === void 0 ? void 0 : _a.nodes) !== null && _b !== void 0 ? _b : [],
57
+ });
58
+ });
59
+ }, [(_b = product.sellingPlanGroups) === null || _b === void 0 ? void 0 : _b.nodes]);
60
+ /**
61
+ * Track the selectedSellingPlan within the hook. If `initialSellingPlanId`
62
+ * is passed, use that as an initial value. Look it up from the `selectedVariant`, since
63
+ * that is also a requirement.
64
+ */
65
+ const [selectedSellingPlan, setSelectedSellingPlan] = useState(undefined);
66
+ const selectedSellingPlanAllocation = useMemo(() => {
67
+ var _a, _b;
68
+ if (!selectedVariant || !selectedSellingPlan) {
69
+ return;
70
+ }
71
+ if (!((_a = selectedVariant.sellingPlanAllocations) === null || _a === void 0 ? void 0 : _a.nodes)) {
72
+ throw new Error(`<ProductOptionsProvider/>: You must include 'sellingPlanAllocations.nodes' in your variants in order to calculate selectedSellingPlanAllocation`);
73
+ }
74
+ return (_b = selectedVariant.sellingPlanAllocations.nodes) === null || _b === void 0 ? void 0 : _b.find((allocation) => { var _a; return ((_a = allocation === null || allocation === void 0 ? void 0 : allocation.sellingPlan) === null || _a === void 0 ? void 0 : _a.id) === selectedSellingPlan.id; });
75
+ }, [selectedVariant, selectedSellingPlan]);
76
+ const value = useMemo(() => ({
77
+ variants,
78
+ variantsConnection: product.variants,
79
+ options,
80
+ selectedVariant,
81
+ setSelectedVariant,
82
+ selectedOptions,
83
+ setSelectedOption,
84
+ setSelectedOptions,
85
+ isOptionInStock,
86
+ selectedSellingPlan,
87
+ setSelectedSellingPlan,
88
+ selectedSellingPlanAllocation,
89
+ sellingPlanGroups,
90
+ sellingPlanGroupsConnection: product.sellingPlanGroups,
91
+ }), [
92
+ isOptionInStock,
93
+ options,
94
+ product.sellingPlanGroups,
95
+ product.variants,
96
+ selectedOptions,
97
+ selectedSellingPlan,
98
+ selectedSellingPlanAllocation,
99
+ selectedVariant,
100
+ sellingPlanGroups,
101
+ setSelectedOption,
102
+ variants,
103
+ ]);
104
+ return (React.createElement(ProductOptionsContext.Provider, { value: value }, children));
105
+ }
106
+ function getVariantBasedOnIdProp(explicitVariantId, variants) {
107
+ // get the initial variant based on the logic outlined in the comments for 'initialVariantId' above
108
+ // * 1. If `initialVariantId` is provided, then it's used even if it's out of stock.
109
+ if (explicitVariantId) {
110
+ const foundVariant = variants.find((variant) => (variant === null || variant === void 0 ? void 0 : variant.id) === explicitVariantId);
111
+ if (!foundVariant) {
112
+ console.warn(`<ProductOptionsProvider/> received a 'initialVariantId' prop, but could not actually find a variant with that ID`);
113
+ }
114
+ return foundVariant;
115
+ }
116
+ // * 2. If `initialVariantId` is provided but is `null`, then no variant is used.
117
+ if (explicitVariantId === null) {
118
+ return null;
119
+ }
120
+ // * 3. If nothing is passed to `initialVariantId` then the first available / in-stock variant is used.
121
+ // * 4. If nothing is passed to `initialVariantId` and no variants are in stock, then the first variant is used.
122
+ if (explicitVariantId === undefined) {
123
+ return variants.find((variant) => variant === null || variant === void 0 ? void 0 : variant.availableForSale) || variants[0];
124
+ }
125
+ }
126
+ function getSelectedOptions(selectedVariant) {
127
+ return (selectedVariant === null || selectedVariant === void 0 ? void 0 : selectedVariant.selectedOptions)
128
+ ? selectedVariant.selectedOptions.reduce((memo, optionSet) => {
129
+ var _a, _b;
130
+ memo[(_a = optionSet === null || optionSet === void 0 ? void 0 : optionSet.name) !== null && _a !== void 0 ? _a : ''] = (_b = optionSet === null || optionSet === void 0 ? void 0 : optionSet.value) !== null && _b !== void 0 ? _b : '';
131
+ return memo;
132
+ }, {})
133
+ : {};
134
+ }
135
+ function isProductVariantArray(maybeVariantArray) {
136
+ if (!maybeVariantArray || !Array.isArray(maybeVariantArray)) {
137
+ return false;
138
+ }
139
+ return true;
140
+ }
@@ -0,0 +1,2 @@
1
+ import { ProductOptionsHookValue } from '../../hooks';
2
+ export declare const ProductOptionsContext: import("react").Context<ProductOptionsHookValue | null>;
@@ -1,3 +1,2 @@
1
1
  import { createContext } from 'react';
2
- export const ProductContext = createContext(null);
3
2
  export const ProductOptionsContext = createContext(null);
@@ -0,0 +1,2 @@
1
+ export { ProductOptionsProvider } from './ProductOptionsProvider.client';
2
+ export { useProductOptions } from '../../hooks/useProductOptions/useProductOptions.client';
@@ -0,0 +1,2 @@
1
+ export { ProductOptionsProvider } from './ProductOptionsProvider.client';
2
+ export { useProductOptions } from '../../hooks/useProductOptions/useProductOptions.client';
@@ -1,6 +1,9 @@
1
1
  import React from 'react';
2
+ import type { Product } from '../../storefront-api-types';
2
3
  import { Money } from '../Money';
4
+ import type { PartialDeep } from 'type-fest';
3
5
  export interface ProductPriceProps {
6
+ data: PartialDeep<Product>;
4
7
  /** The type of price. Valid values: `regular` (default) or `compareAt`. */
5
8
  priceType?: 'regular' | 'compareAt';
6
9
  /** The type of value. Valid values: `min` (default), `max` or `unit`. */
@@ -10,6 +13,6 @@ export interface ProductPriceProps {
10
13
  }
11
14
  /**
12
15
  * The `ProductPrice` component renders a `Money` component with the product
13
- * [`priceRange`](https://shopify.dev/api/storefront/reference/products/productpricerange)'s `maxVariantPrice` or `minVariantPrice`, for either the regular price or compare at price range. It must be a descendent of the `ProductProvider` component.
16
+ * [`priceRange`](https://shopify.dev/api/storefront/reference/products/productpricerange)'s `maxVariantPrice` or `minVariantPrice`, for either the regular price or compare at price range.
14
17
  */
15
- export declare function ProductPrice<TTag extends keyof JSX.IntrinsicElements>(props: Omit<React.ComponentProps<typeof Money>, 'data' | 'measurement'> & ProductPriceProps): JSX.Element | null;
18
+ export declare function ProductPrice(props: Omit<React.ComponentProps<typeof Money>, 'data' | 'measurement'> & ProductPriceProps): JSX.Element | null;
@@ -1,34 +1,32 @@
1
1
  import React from 'react';
2
2
  import { Money } from '../Money';
3
- import { useProduct } from '../ProductProvider';
4
3
  /**
5
4
  * The `ProductPrice` component renders a `Money` component with the product
6
- * [`priceRange`](https://shopify.dev/api/storefront/reference/products/productpricerange)'s `maxVariantPrice` or `minVariantPrice`, for either the regular price or compare at price range. It must be a descendent of the `ProductProvider` component.
5
+ * [`priceRange`](https://shopify.dev/api/storefront/reference/products/productpricerange)'s `maxVariantPrice` or `minVariantPrice`, for either the regular price or compare at price range.
7
6
  */
8
7
  export function ProductPrice(props) {
9
- var _a, _b, _c, _d, _e, _f, _g;
10
- const product = useProduct();
11
- const { priceType = 'regular', variantId, valueType = 'min', ...passthroughProps } = props;
8
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
9
+ const { priceType = 'regular', variantId, valueType = 'min', data: product, ...passthroughProps } = props;
12
10
  if (product == null) {
13
- throw new Error('Expected a ProductProvider context, but none was found');
11
+ throw new Error(`<ProductPrice/> requires a product as the 'data' prop`);
14
12
  }
15
13
  let price;
16
14
  let measurement;
17
15
  const variant = variantId
18
- ? (_a = product === null || product === void 0 ? void 0 : product.variants) === null || _a === void 0 ? void 0 : _a.find((variant) => (variant === null || variant === void 0 ? void 0 : variant.id) === variantId)
16
+ ? (_c = (_b = (_a = product === null || product === void 0 ? void 0 : product.variants) === null || _a === void 0 ? void 0 : _a.nodes) === null || _b === void 0 ? void 0 : _b.find((variant) => (variant === null || variant === void 0 ? void 0 : variant.id) === variantId)) !== null && _c !== void 0 ? _c : null
19
17
  : null;
20
18
  if (priceType === 'compareAt') {
21
19
  if (variantId && variant) {
22
- if (((_b = variant.compareAtPriceV2) === null || _b === void 0 ? void 0 : _b.amount) === ((_c = variant.priceV2) === null || _c === void 0 ? void 0 : _c.amount)) {
20
+ if (((_d = variant.compareAtPriceV2) === null || _d === void 0 ? void 0 : _d.amount) === ((_e = variant.priceV2) === null || _e === void 0 ? void 0 : _e.amount)) {
23
21
  return null;
24
22
  }
25
23
  price = variant.compareAtPriceV2;
26
24
  }
27
25
  else if (valueType === 'max') {
28
- price = (_d = product === null || product === void 0 ? void 0 : product.compareAtPriceRange) === null || _d === void 0 ? void 0 : _d.maxVariantPrice;
26
+ price = (_f = product === null || product === void 0 ? void 0 : product.compareAtPriceRange) === null || _f === void 0 ? void 0 : _f.maxVariantPrice;
29
27
  }
30
28
  else {
31
- price = (_e = product === null || product === void 0 ? void 0 : product.compareAtPriceRange) === null || _e === void 0 ? void 0 : _e.minVariantPrice;
29
+ price = (_g = product === null || product === void 0 ? void 0 : product.compareAtPriceRange) === null || _g === void 0 ? void 0 : _g.minVariantPrice;
32
30
  }
33
31
  }
34
32
  else {
@@ -40,10 +38,10 @@ export function ProductPrice(props) {
40
38
  }
41
39
  }
42
40
  else if (valueType === 'max') {
43
- price = (_f = product.priceRange) === null || _f === void 0 ? void 0 : _f.maxVariantPrice;
41
+ price = (_h = product.priceRange) === null || _h === void 0 ? void 0 : _h.maxVariantPrice;
44
42
  }
45
43
  else {
46
- price = (_g = product.priceRange) === null || _g === void 0 ? void 0 : _g.minVariantPrice;
44
+ price = (_j = product.priceRange) === null || _j === void 0 ? void 0 : _j.minVariantPrice;
47
45
  }
48
46
  }
49
47
  if (!price) {
@@ -0,0 +1,3 @@
1
+ import type { DefaultPage } from './seo-types';
2
+ import type { PartialDeep } from 'type-fest';
3
+ export declare function NoIndexPageSeo({ title, titleTemplate, lang, }: PartialDeep<DefaultPage>): JSX.Element;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { useShop } from '../../foundation';
3
+ import { Head } from '../../client';
4
+ export function NoIndexPageSeo({ title, titleTemplate, lang, }) {
5
+ const { languageCode: fallBacklang } = useShop();
6
+ return (React.createElement(React.Fragment, null,
7
+ React.createElement(Head, { defaultTitle: title !== null && title !== void 0 ? title : '', titleTemplate: titleTemplate !== null && titleTemplate !== void 0 ? titleTemplate : `%s - ${title}` },
8
+ React.createElement("html", { lang: lang !== null && lang !== void 0 ? lang : fallBacklang }),
9
+ React.createElement("meta", { name: "robots", content: "noindex" }))));
10
+ }
@@ -2,6 +2,7 @@ import { type ComponentProps } from 'react';
2
2
  import { ProductSeo } from './ProductSeo.client';
3
3
  import { CollectionSeo } from './CollectionSeo.client';
4
4
  import { PageSeo } from './PageSeo.client';
5
+ import { NoIndexPageSeo } from './NoIndexSeo.client';
5
6
  import type { DefaultPage as DefaultPageType, HomePage as HomePageType } from './seo-types';
6
7
  declare type Props = {
7
8
  type: 'defaultSeo';
@@ -18,6 +19,9 @@ declare type Props = {
18
19
  } | {
19
20
  type: 'page';
20
21
  data: ComponentProps<typeof PageSeo>;
22
+ } | {
23
+ type: 'noindex';
24
+ data: ComponentProps<typeof NoIndexPageSeo>;
21
25
  };
22
26
  /**
23
27
  * The `Seo` component renders SEO information on a webpage.
@@ -5,6 +5,7 @@ import { HomePageSeo } from './HomePageSeo.client';
5
5
  import { ProductSeo } from './ProductSeo.client';
6
6
  import { CollectionSeo } from './CollectionSeo.client';
7
7
  import { PageSeo } from './PageSeo.client';
8
+ import { NoIndexPageSeo } from './NoIndexSeo.client';
8
9
  /**
9
10
  * The `Seo` component renders SEO information on a webpage.
10
11
  */
@@ -21,6 +22,8 @@ export function Seo(props) {
21
22
  return React.createElement(CollectionSeo, { ...props.data });
22
23
  case 'page':
23
24
  return React.createElement(PageSeo, { ...props.data });
25
+ case 'noindex':
26
+ return React.createElement(NoIndexPageSeo, { ...props.data });
24
27
  default:
25
28
  console.warn('The <Seo/> only accepts type prop with values of defaultSeo, homepage, product, collection, or page.');
26
29
  return null;
@@ -20,7 +20,7 @@ export { CartShopPayButton } from './CartShopPayButton';
20
20
  export { CartEstimatedCost } from './CartEstimatedCost';
21
21
  export { CartProvider, useCart, useInstantCheckout } from './CartProvider';
22
22
  export type { State, Status, Cart, CartWithActions, CartAction, } from './CartProvider';
23
- export { ProductProvider, useProduct } from './ProductProvider';
23
+ export { ProductOptionsProvider, useProductOptions, } from './ProductOptionsProvider';
24
24
  export { ProductPrice } from './ProductPrice';
25
25
  export { BuyNowButton } from './BuyNowButton';
26
26
  export { ShopPayButton } from './ShopPayButton';
@@ -18,7 +18,7 @@ export { CartCheckoutButton } from './CartCheckoutButton';
18
18
  export { CartShopPayButton } from './CartShopPayButton';
19
19
  export { CartEstimatedCost } from './CartEstimatedCost';
20
20
  export { CartProvider, useCart, useInstantCheckout } from './CartProvider';
21
- export { ProductProvider, useProduct } from './ProductProvider';
21
+ export { ProductOptionsProvider, useProductOptions, } from './ProductOptionsProvider';
22
22
  export { ProductPrice } from './ProductPrice';
23
23
  export { BuyNowButton } from './BuyNowButton';
24
24
  export { ShopPayButton } from './ShopPayButton';
@@ -1,3 +1,3 @@
1
- import type { HydrogenConfig } from './types';
2
- export declare const defineConfig: (params: HydrogenConfig) => HydrogenConfig;
3
- export type { HydrogenConfig };
1
+ import type { InlineHydrogenConfig } from './types';
2
+ export declare const defineConfig: (params: InlineHydrogenConfig) => InlineHydrogenConfig;
3
+ export type { InlineHydrogenConfig as HydrogenConfig };