@shopify/hydrogen-react 2026.1.2 → 2026.4.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 (336) hide show
  1. package/customer-account.schema.json +1 -1
  2. package/dist/browser-dev/AddToCartButton.mjs.map +1 -1
  3. package/dist/browser-dev/BuyNowButton.mjs.map +1 -1
  4. package/dist/browser-dev/CartCheckoutButton.mjs.map +1 -1
  5. package/dist/browser-dev/CartCost.mjs.map +1 -1
  6. package/dist/browser-dev/CartLineProvider.mjs.map +1 -1
  7. package/dist/browser-dev/CartLineQuantity.mjs.map +1 -1
  8. package/dist/browser-dev/CartLineQuantityAdjustButton.mjs.map +1 -1
  9. package/dist/browser-dev/CartProvider.mjs.map +1 -1
  10. package/dist/browser-dev/ExternalVideo.mjs.map +1 -1
  11. package/dist/browser-dev/Image.mjs.map +1 -1
  12. package/dist/browser-dev/MediaFile.mjs.map +1 -1
  13. package/dist/browser-dev/ModelViewer.mjs.map +1 -1
  14. package/dist/browser-dev/Money.mjs.map +1 -1
  15. package/dist/browser-dev/ProductPrice.mjs.map +1 -1
  16. package/dist/browser-dev/ProductProvider.mjs.map +1 -1
  17. package/dist/browser-dev/RichText.mjs.map +1 -1
  18. package/dist/browser-dev/ShopPayButton.mjs.map +1 -1
  19. package/dist/browser-dev/ShopifyProvider.mjs.map +1 -1
  20. package/dist/browser-dev/Video.mjs.map +1 -1
  21. package/dist/browser-dev/analytics-constants.mjs.map +1 -1
  22. package/dist/browser-dev/analytics-schema-custom-storefront-customer-tracking.mjs +1 -1
  23. package/dist/browser-dev/analytics-utils.mjs.map +1 -1
  24. package/dist/browser-dev/analytics.mjs.map +1 -1
  25. package/dist/browser-dev/cart-queries.mjs +43 -81
  26. package/dist/browser-dev/cart-queries.mjs.map +1 -1
  27. package/dist/browser-dev/codegen.helpers.mjs.map +1 -1
  28. package/dist/browser-dev/cookies-utils.mjs.map +1 -1
  29. package/dist/browser-dev/flatten-connection.mjs.map +1 -1
  30. package/dist/browser-dev/getProductOptions.mjs.map +1 -1
  31. package/dist/browser-dev/load-script.mjs.map +1 -1
  32. package/dist/browser-dev/node_modules/.pnpm/@xstate_fsm@2.0.0/node_modules/@xstate/fsm/es/index.mjs +151 -0
  33. package/dist/browser-dev/node_modules/.pnpm/@xstate_fsm@2.0.0/node_modules/@xstate/fsm/es/index.mjs.map +1 -0
  34. package/dist/browser-dev/optionValueDecoder.mjs.map +1 -1
  35. package/dist/browser-dev/{package.json.mjs → packages/hydrogen-react/package.json.mjs} +1 -1
  36. package/dist/browser-dev/parse-metafield.mjs.map +1 -1
  37. package/dist/browser-dev/storefront-api-constants.mjs +1 -1
  38. package/dist/browser-dev/storefront-api-constants.mjs.map +1 -1
  39. package/dist/browser-dev/storefront-client.mjs.map +1 -1
  40. package/dist/browser-dev/tracking-utils.mjs.map +1 -1
  41. package/dist/browser-dev/useCartAPIStateMachine.mjs +8 -8
  42. package/dist/browser-dev/useCartAPIStateMachine.mjs.map +1 -1
  43. package/dist/browser-dev/useCartActions.mjs.map +1 -1
  44. package/dist/browser-dev/useMachine.mjs +4 -4
  45. package/dist/browser-dev/useMachine.mjs.map +1 -1
  46. package/dist/browser-dev/useMoney.mjs.map +1 -1
  47. package/dist/browser-dev/useSelectedOptionInUrlParam.mjs.map +1 -1
  48. package/dist/browser-dev/useShopifyCookies.mjs.map +1 -1
  49. package/dist/browser-prod/AddToCartButton.mjs.map +1 -1
  50. package/dist/browser-prod/BuyNowButton.mjs.map +1 -1
  51. package/dist/browser-prod/CartCheckoutButton.mjs.map +1 -1
  52. package/dist/browser-prod/CartCost.mjs.map +1 -1
  53. package/dist/browser-prod/CartLineProvider.mjs.map +1 -1
  54. package/dist/browser-prod/CartLineQuantity.mjs.map +1 -1
  55. package/dist/browser-prod/CartLineQuantityAdjustButton.mjs.map +1 -1
  56. package/dist/browser-prod/CartProvider.mjs.map +1 -1
  57. package/dist/browser-prod/ExternalVideo.mjs.map +1 -1
  58. package/dist/browser-prod/Image.mjs.map +1 -1
  59. package/dist/browser-prod/MediaFile.mjs.map +1 -1
  60. package/dist/browser-prod/ModelViewer.mjs.map +1 -1
  61. package/dist/browser-prod/Money.mjs.map +1 -1
  62. package/dist/browser-prod/ProductPrice.mjs.map +1 -1
  63. package/dist/browser-prod/ProductProvider.mjs.map +1 -1
  64. package/dist/browser-prod/RichText.mjs.map +1 -1
  65. package/dist/browser-prod/ShopPayButton.mjs.map +1 -1
  66. package/dist/browser-prod/ShopifyProvider.mjs.map +1 -1
  67. package/dist/browser-prod/Video.mjs.map +1 -1
  68. package/dist/browser-prod/analytics-constants.mjs.map +1 -1
  69. package/dist/browser-prod/analytics-schema-custom-storefront-customer-tracking.mjs +1 -1
  70. package/dist/browser-prod/analytics-utils.mjs.map +1 -1
  71. package/dist/browser-prod/analytics.mjs.map +1 -1
  72. package/dist/browser-prod/cart-queries.mjs +43 -81
  73. package/dist/browser-prod/cart-queries.mjs.map +1 -1
  74. package/dist/browser-prod/codegen.helpers.mjs.map +1 -1
  75. package/dist/browser-prod/cookies-utils.mjs.map +1 -1
  76. package/dist/browser-prod/flatten-connection.mjs.map +1 -1
  77. package/dist/browser-prod/getProductOptions.mjs.map +1 -1
  78. package/dist/browser-prod/load-script.mjs.map +1 -1
  79. package/dist/browser-prod/node_modules/.pnpm/@xstate_fsm@2.0.0/node_modules/@xstate/fsm/es/index.mjs +151 -0
  80. package/dist/browser-prod/node_modules/.pnpm/@xstate_fsm@2.0.0/node_modules/@xstate/fsm/es/index.mjs.map +1 -0
  81. package/dist/browser-prod/optionValueDecoder.mjs.map +1 -1
  82. package/dist/{node-dev → browser-prod/packages/hydrogen-react}/package.json.mjs +1 -1
  83. package/dist/browser-prod/parse-metafield.mjs.map +1 -1
  84. package/dist/browser-prod/storefront-api-constants.mjs +1 -1
  85. package/dist/browser-prod/storefront-api-constants.mjs.map +1 -1
  86. package/dist/browser-prod/storefront-client.mjs.map +1 -1
  87. package/dist/browser-prod/tracking-utils.mjs.map +1 -1
  88. package/dist/browser-prod/useCartAPIStateMachine.mjs +8 -8
  89. package/dist/browser-prod/useCartAPIStateMachine.mjs.map +1 -1
  90. package/dist/browser-prod/useCartActions.mjs.map +1 -1
  91. package/dist/browser-prod/useMachine.mjs +4 -4
  92. package/dist/browser-prod/useMachine.mjs.map +1 -1
  93. package/dist/browser-prod/useMoney.mjs.map +1 -1
  94. package/dist/browser-prod/useSelectedOptionInUrlParam.mjs.map +1 -1
  95. package/dist/browser-prod/useShopifyCookies.mjs.map +1 -1
  96. package/dist/node-dev/AddToCartButton.js.map +1 -1
  97. package/dist/node-dev/AddToCartButton.mjs.map +1 -1
  98. package/dist/node-dev/BuyNowButton.js.map +1 -1
  99. package/dist/node-dev/BuyNowButton.mjs.map +1 -1
  100. package/dist/node-dev/CartCheckoutButton.js.map +1 -1
  101. package/dist/node-dev/CartCheckoutButton.mjs.map +1 -1
  102. package/dist/node-dev/CartCost.js.map +1 -1
  103. package/dist/node-dev/CartCost.mjs.map +1 -1
  104. package/dist/node-dev/CartLineProvider.js.map +1 -1
  105. package/dist/node-dev/CartLineProvider.mjs.map +1 -1
  106. package/dist/node-dev/CartLineQuantity.js.map +1 -1
  107. package/dist/node-dev/CartLineQuantity.mjs.map +1 -1
  108. package/dist/node-dev/CartLineQuantityAdjustButton.js.map +1 -1
  109. package/dist/node-dev/CartLineQuantityAdjustButton.mjs.map +1 -1
  110. package/dist/node-dev/CartProvider.js.map +1 -1
  111. package/dist/node-dev/CartProvider.mjs.map +1 -1
  112. package/dist/node-dev/ExternalVideo.js.map +1 -1
  113. package/dist/node-dev/ExternalVideo.mjs.map +1 -1
  114. package/dist/node-dev/Image.js.map +1 -1
  115. package/dist/node-dev/Image.mjs.map +1 -1
  116. package/dist/node-dev/MediaFile.js.map +1 -1
  117. package/dist/node-dev/MediaFile.mjs.map +1 -1
  118. package/dist/node-dev/ModelViewer.js.map +1 -1
  119. package/dist/node-dev/ModelViewer.mjs.map +1 -1
  120. package/dist/node-dev/Money.js.map +1 -1
  121. package/dist/node-dev/Money.mjs.map +1 -1
  122. package/dist/node-dev/ProductPrice.js.map +1 -1
  123. package/dist/node-dev/ProductPrice.mjs.map +1 -1
  124. package/dist/node-dev/ProductProvider.js.map +1 -1
  125. package/dist/node-dev/ProductProvider.mjs.map +1 -1
  126. package/dist/node-dev/RichText.js.map +1 -1
  127. package/dist/node-dev/RichText.mjs.map +1 -1
  128. package/dist/node-dev/ShopPayButton.js.map +1 -1
  129. package/dist/node-dev/ShopPayButton.mjs.map +1 -1
  130. package/dist/node-dev/ShopifyProvider.js.map +1 -1
  131. package/dist/node-dev/ShopifyProvider.mjs.map +1 -1
  132. package/dist/node-dev/Video.js.map +1 -1
  133. package/dist/node-dev/Video.mjs.map +1 -1
  134. package/dist/node-dev/analytics-constants.js.map +1 -1
  135. package/dist/node-dev/analytics-constants.mjs.map +1 -1
  136. package/dist/node-dev/analytics-schema-custom-storefront-customer-tracking.js +1 -1
  137. package/dist/node-dev/analytics-schema-custom-storefront-customer-tracking.mjs +1 -1
  138. package/dist/node-dev/analytics-utils.js.map +1 -1
  139. package/dist/node-dev/analytics-utils.mjs.map +1 -1
  140. package/dist/node-dev/analytics.js.map +1 -1
  141. package/dist/node-dev/analytics.mjs.map +1 -1
  142. package/dist/node-dev/cart-queries.js +43 -81
  143. package/dist/node-dev/cart-queries.js.map +1 -1
  144. package/dist/node-dev/cart-queries.mjs +43 -81
  145. package/dist/node-dev/cart-queries.mjs.map +1 -1
  146. package/dist/node-dev/codegen.helpers.js.map +1 -1
  147. package/dist/node-dev/codegen.helpers.mjs.map +1 -1
  148. package/dist/node-dev/cookies-utils.js.map +1 -1
  149. package/dist/node-dev/cookies-utils.mjs.map +1 -1
  150. package/dist/node-dev/flatten-connection.js.map +1 -1
  151. package/dist/node-dev/flatten-connection.mjs.map +1 -1
  152. package/dist/node-dev/getProductOptions.js.map +1 -1
  153. package/dist/node-dev/getProductOptions.mjs.map +1 -1
  154. package/dist/node-dev/load-script.js.map +1 -1
  155. package/dist/node-dev/load-script.mjs.map +1 -1
  156. package/dist/node-dev/node_modules/.pnpm/@xstate_fsm@2.0.0/node_modules/@xstate/fsm/es/index.js +150 -0
  157. package/dist/node-dev/node_modules/.pnpm/@xstate_fsm@2.0.0/node_modules/@xstate/fsm/es/index.js.map +1 -0
  158. package/dist/node-dev/node_modules/.pnpm/@xstate_fsm@2.0.0/node_modules/@xstate/fsm/es/index.mjs +151 -0
  159. package/dist/node-dev/node_modules/.pnpm/@xstate_fsm@2.0.0/node_modules/@xstate/fsm/es/index.mjs.map +1 -0
  160. package/dist/node-dev/optionValueDecoder.js.map +1 -1
  161. package/dist/node-dev/optionValueDecoder.mjs.map +1 -1
  162. package/dist/node-dev/{package.json.js → packages/hydrogen-react/package.json.js} +1 -1
  163. package/dist/{browser-prod → node-dev/packages/hydrogen-react}/package.json.mjs +1 -1
  164. package/dist/node-dev/parse-metafield.js.map +1 -1
  165. package/dist/node-dev/parse-metafield.mjs.map +1 -1
  166. package/dist/node-dev/storefront-api-constants.js +1 -1
  167. package/dist/node-dev/storefront-api-constants.js.map +1 -1
  168. package/dist/node-dev/storefront-api-constants.mjs +1 -1
  169. package/dist/node-dev/storefront-api-constants.mjs.map +1 -1
  170. package/dist/node-dev/storefront-client.js.map +1 -1
  171. package/dist/node-dev/storefront-client.mjs.map +1 -1
  172. package/dist/node-dev/tracking-utils.js.map +1 -1
  173. package/dist/node-dev/tracking-utils.mjs.map +1 -1
  174. package/dist/node-dev/useCartAPIStateMachine.js +8 -8
  175. package/dist/node-dev/useCartAPIStateMachine.js.map +1 -1
  176. package/dist/node-dev/useCartAPIStateMachine.mjs +8 -8
  177. package/dist/node-dev/useCartAPIStateMachine.mjs.map +1 -1
  178. package/dist/node-dev/useCartActions.js.map +1 -1
  179. package/dist/node-dev/useCartActions.mjs.map +1 -1
  180. package/dist/node-dev/useMachine.js +4 -4
  181. package/dist/node-dev/useMachine.js.map +1 -1
  182. package/dist/node-dev/useMachine.mjs +4 -4
  183. package/dist/node-dev/useMachine.mjs.map +1 -1
  184. package/dist/node-dev/useMoney.js.map +1 -1
  185. package/dist/node-dev/useMoney.mjs.map +1 -1
  186. package/dist/node-dev/useSelectedOptionInUrlParam.js.map +1 -1
  187. package/dist/node-dev/useSelectedOptionInUrlParam.mjs.map +1 -1
  188. package/dist/node-dev/useShopifyCookies.js.map +1 -1
  189. package/dist/node-dev/useShopifyCookies.mjs.map +1 -1
  190. package/dist/node-prod/AddToCartButton.js.map +1 -1
  191. package/dist/node-prod/AddToCartButton.mjs.map +1 -1
  192. package/dist/node-prod/BuyNowButton.js.map +1 -1
  193. package/dist/node-prod/BuyNowButton.mjs.map +1 -1
  194. package/dist/node-prod/CartCheckoutButton.js.map +1 -1
  195. package/dist/node-prod/CartCheckoutButton.mjs.map +1 -1
  196. package/dist/node-prod/CartCost.js.map +1 -1
  197. package/dist/node-prod/CartCost.mjs.map +1 -1
  198. package/dist/node-prod/CartLineProvider.js.map +1 -1
  199. package/dist/node-prod/CartLineProvider.mjs.map +1 -1
  200. package/dist/node-prod/CartLineQuantity.js.map +1 -1
  201. package/dist/node-prod/CartLineQuantity.mjs.map +1 -1
  202. package/dist/node-prod/CartLineQuantityAdjustButton.js.map +1 -1
  203. package/dist/node-prod/CartLineQuantityAdjustButton.mjs.map +1 -1
  204. package/dist/node-prod/CartProvider.js.map +1 -1
  205. package/dist/node-prod/CartProvider.mjs.map +1 -1
  206. package/dist/node-prod/ExternalVideo.js.map +1 -1
  207. package/dist/node-prod/ExternalVideo.mjs.map +1 -1
  208. package/dist/node-prod/Image.js.map +1 -1
  209. package/dist/node-prod/Image.mjs.map +1 -1
  210. package/dist/node-prod/MediaFile.js.map +1 -1
  211. package/dist/node-prod/MediaFile.mjs.map +1 -1
  212. package/dist/node-prod/ModelViewer.js.map +1 -1
  213. package/dist/node-prod/ModelViewer.mjs.map +1 -1
  214. package/dist/node-prod/Money.js.map +1 -1
  215. package/dist/node-prod/Money.mjs.map +1 -1
  216. package/dist/node-prod/ProductPrice.js.map +1 -1
  217. package/dist/node-prod/ProductPrice.mjs.map +1 -1
  218. package/dist/node-prod/ProductProvider.js.map +1 -1
  219. package/dist/node-prod/ProductProvider.mjs.map +1 -1
  220. package/dist/node-prod/RichText.js.map +1 -1
  221. package/dist/node-prod/RichText.mjs.map +1 -1
  222. package/dist/node-prod/ShopPayButton.js.map +1 -1
  223. package/dist/node-prod/ShopPayButton.mjs.map +1 -1
  224. package/dist/node-prod/ShopifyProvider.js.map +1 -1
  225. package/dist/node-prod/ShopifyProvider.mjs.map +1 -1
  226. package/dist/node-prod/Video.js.map +1 -1
  227. package/dist/node-prod/Video.mjs.map +1 -1
  228. package/dist/node-prod/analytics-constants.js.map +1 -1
  229. package/dist/node-prod/analytics-constants.mjs.map +1 -1
  230. package/dist/node-prod/analytics-schema-custom-storefront-customer-tracking.js +1 -1
  231. package/dist/node-prod/analytics-schema-custom-storefront-customer-tracking.mjs +1 -1
  232. package/dist/node-prod/analytics-utils.js.map +1 -1
  233. package/dist/node-prod/analytics-utils.mjs.map +1 -1
  234. package/dist/node-prod/analytics.js.map +1 -1
  235. package/dist/node-prod/analytics.mjs.map +1 -1
  236. package/dist/node-prod/cart-queries.js +43 -81
  237. package/dist/node-prod/cart-queries.js.map +1 -1
  238. package/dist/node-prod/cart-queries.mjs +43 -81
  239. package/dist/node-prod/cart-queries.mjs.map +1 -1
  240. package/dist/node-prod/codegen.helpers.js.map +1 -1
  241. package/dist/node-prod/codegen.helpers.mjs.map +1 -1
  242. package/dist/node-prod/cookies-utils.js.map +1 -1
  243. package/dist/node-prod/cookies-utils.mjs.map +1 -1
  244. package/dist/node-prod/flatten-connection.js.map +1 -1
  245. package/dist/node-prod/flatten-connection.mjs.map +1 -1
  246. package/dist/node-prod/getProductOptions.js.map +1 -1
  247. package/dist/node-prod/getProductOptions.mjs.map +1 -1
  248. package/dist/node-prod/load-script.js.map +1 -1
  249. package/dist/node-prod/load-script.mjs.map +1 -1
  250. package/dist/node-prod/node_modules/.pnpm/@xstate_fsm@2.0.0/node_modules/@xstate/fsm/es/index.js +150 -0
  251. package/dist/node-prod/node_modules/.pnpm/@xstate_fsm@2.0.0/node_modules/@xstate/fsm/es/index.js.map +1 -0
  252. package/dist/node-prod/node_modules/.pnpm/@xstate_fsm@2.0.0/node_modules/@xstate/fsm/es/index.mjs +151 -0
  253. package/dist/node-prod/node_modules/.pnpm/@xstate_fsm@2.0.0/node_modules/@xstate/fsm/es/index.mjs.map +1 -0
  254. package/dist/node-prod/optionValueDecoder.js.map +1 -1
  255. package/dist/node-prod/optionValueDecoder.mjs.map +1 -1
  256. package/dist/node-prod/{package.json.js → packages/hydrogen-react/package.json.js} +1 -1
  257. package/dist/node-prod/{package.json.mjs → packages/hydrogen-react/package.json.mjs} +1 -1
  258. package/dist/node-prod/parse-metafield.js.map +1 -1
  259. package/dist/node-prod/parse-metafield.mjs.map +1 -1
  260. package/dist/node-prod/storefront-api-constants.js +1 -1
  261. package/dist/node-prod/storefront-api-constants.js.map +1 -1
  262. package/dist/node-prod/storefront-api-constants.mjs +1 -1
  263. package/dist/node-prod/storefront-api-constants.mjs.map +1 -1
  264. package/dist/node-prod/storefront-client.js.map +1 -1
  265. package/dist/node-prod/storefront-client.mjs.map +1 -1
  266. package/dist/node-prod/tracking-utils.js.map +1 -1
  267. package/dist/node-prod/tracking-utils.mjs.map +1 -1
  268. package/dist/node-prod/useCartAPIStateMachine.js +8 -8
  269. package/dist/node-prod/useCartAPIStateMachine.js.map +1 -1
  270. package/dist/node-prod/useCartAPIStateMachine.mjs +8 -8
  271. package/dist/node-prod/useCartAPIStateMachine.mjs.map +1 -1
  272. package/dist/node-prod/useCartActions.js.map +1 -1
  273. package/dist/node-prod/useCartActions.mjs.map +1 -1
  274. package/dist/node-prod/useMachine.js +4 -4
  275. package/dist/node-prod/useMachine.js.map +1 -1
  276. package/dist/node-prod/useMachine.mjs +4 -4
  277. package/dist/node-prod/useMachine.mjs.map +1 -1
  278. package/dist/node-prod/useMoney.js.map +1 -1
  279. package/dist/node-prod/useMoney.mjs.map +1 -1
  280. package/dist/node-prod/useSelectedOptionInUrlParam.js.map +1 -1
  281. package/dist/node-prod/useSelectedOptionInUrlParam.mjs.map +1 -1
  282. package/dist/node-prod/useShopifyCookies.js.map +1 -1
  283. package/dist/node-prod/useShopifyCookies.mjs.map +1 -1
  284. package/dist/types/AddToCartButton.d.ts +2 -0
  285. package/dist/types/BuyNowButton.d.ts +2 -0
  286. package/dist/types/CartCheckoutButton.d.ts +2 -0
  287. package/dist/types/CartCost.d.ts +2 -0
  288. package/dist/types/CartLineProvider.d.ts +3 -1
  289. package/dist/types/CartLineQuantity.d.ts +2 -0
  290. package/dist/types/CartLineQuantityAdjustButton.d.ts +1 -0
  291. package/dist/types/CartProvider.d.ts +9 -3
  292. package/dist/types/ExternalVideo.d.ts +4 -0
  293. package/dist/types/Image.d.ts +3 -1
  294. package/dist/types/MediaFile.d.ts +4 -0
  295. package/dist/types/ModelViewer.d.ts +2 -1
  296. package/dist/types/Money.d.ts +5 -4
  297. package/dist/types/ProductPrice.d.ts +2 -0
  298. package/dist/types/ProductProvider.d.ts +2 -0
  299. package/dist/types/RichText.d.ts +2 -0
  300. package/dist/types/ShopPayButton.d.ts +1 -0
  301. package/dist/types/ShopifyProvider.d.ts +2 -0
  302. package/dist/types/Video.d.ts +3 -1
  303. package/dist/types/analytics-constants.d.ts +9 -0
  304. package/dist/types/analytics-types.d.ts +1 -0
  305. package/dist/types/analytics-utils.d.ts +1 -0
  306. package/dist/types/analytics.d.ts +6 -1
  307. package/dist/types/cart-queries.d.ts +13 -9
  308. package/dist/types/codegen.helpers.d.ts +4 -2
  309. package/dist/types/cookies-utils.d.ts +2 -1
  310. package/dist/types/customer-account-api-types.d.ts +23 -1
  311. package/dist/types/flatten-connection.d.ts +3 -0
  312. package/dist/types/getProductOptions.d.ts +3 -0
  313. package/dist/types/load-script.d.ts +3 -1
  314. package/dist/types/optionValueDecoder.d.ts +5 -2
  315. package/dist/types/parse-metafield.d.ts +1 -0
  316. package/dist/types/storefront-api-constants.d.ts +1 -1
  317. package/dist/types/storefront-api-types.d.ts +1467 -443
  318. package/dist/types/storefront-client.d.ts +1 -0
  319. package/dist/types/tracking-utils.d.ts +2 -2
  320. package/dist/types/useCartAPIStateMachine.d.ts +2 -2
  321. package/dist/types/useCartActions.d.ts +2 -2
  322. package/dist/types/useMoney.d.ts +3 -2
  323. package/dist/types/useSelectedOptionInUrlParam.d.ts +1 -0
  324. package/dist/types/useShopifyCookies.d.ts +1 -0
  325. package/dist/umd/hydrogen-react.dev.js +45 -83
  326. package/dist/umd/hydrogen-react.dev.js.map +1 -1
  327. package/dist/umd/hydrogen-react.prod.js +43 -88
  328. package/dist/umd/hydrogen-react.prod.js.map +1 -1
  329. package/package.json +4 -4
  330. package/storefront.schema.json +1 -1
  331. /package/dist/browser-dev/{package.json.mjs.map → packages/hydrogen-react/package.json.mjs.map} +0 -0
  332. /package/dist/browser-prod/{package.json.mjs.map → packages/hydrogen-react/package.json.mjs.map} +0 -0
  333. /package/dist/node-dev/{package.json.js.map → packages/hydrogen-react/package.json.js.map} +0 -0
  334. /package/dist/node-dev/{package.json.mjs.map → packages/hydrogen-react/package.json.mjs.map} +0 -0
  335. /package/dist/node-prod/{package.json.js.map → packages/hydrogen-react/package.json.js.map} +0 -0
  336. /package/dist/node-prod/{package.json.mjs.map → packages/hydrogen-react/package.json.mjs.map} +0 -0
@@ -8,6 +8,7 @@ type CartLineQuantityAdjustButtonProps<AsType extends React.ElementType = 'butto
8
8
  * The `<CartLineQuantityAdjustButton />` component renders a button that adjusts the cart line's quantity when pressed.
9
9
  *
10
10
  * It must be a descendent of `<CartLineProvider/>` and `<CartProvider/>`.
11
+ * @publicDocs
11
12
  */
12
13
  export declare function CartLineQuantityAdjustButton<AsType extends React.ElementType = 'button'>(props: CartLineQuantityAdjustButtonProps<AsType>): JSX.Element;
13
14
  export {};
@@ -1,9 +1,14 @@
1
1
  import { CartBuyerIdentityInput, CountryCode, LanguageCode, Cart as CartType } from './storefront-api-types.js';
2
- import { CartWithActions } from './cart-types.js';
2
+ import { CartWithActions, CartWithActionsDocs } from './cart-types.js';
3
3
  import { PartialDeep } from 'type-fest';
4
4
  export declare const CartContext: import("react").Context<CartWithActions | null>;
5
+ /**
6
+ * `useCart` hook must be a descendent of a `CartProvider` component.
7
+ * @publicDocs */
8
+ export type UseCartDocs = () => CartWithActionsDocs;
5
9
  /**
6
10
  * The `useCart` hook provides access to the cart object. It must be a descendent of a `CartProvider` component.
11
+ * @publicDocs
7
12
  */
8
13
  export declare function useCart(): CartWithActions;
9
14
  type CartProviderProps = {
@@ -43,11 +48,11 @@ type CartProviderProps = {
43
48
  onAttributesUpdateComplete?: () => void;
44
49
  /** A callback that is invoked when the process to update the cart discount codes completes */
45
50
  onDiscountCodesUpdateComplete?: () => void;
46
- /** An object with fields that correspond to the Storefront API's [Cart object](https://shopify.dev/api/storefront/2026-01/objects/cart). */
51
+ /** An object with fields that correspond to the Storefront API's [Cart object](https://shopify.dev/api/storefront/2026-04/objects/cart). */
47
52
  data?: PartialDeep<CartType, {
48
53
  recurseIntoArrays: true;
49
54
  }>;
50
- /** A fragment used to query the Storefront API's [Cart object](https://shopify.dev/api/storefront/2026-01/objects/cart) for all queries and mutations. A default value is used if no argument is provided. */
55
+ /** A fragment used to query the Storefront API's [Cart object](https://shopify.dev/api/storefront/2026-04/objects/cart) for all queries and mutations. A default value is used if no argument is provided. */
51
56
  cartFragment?: string;
52
57
  /** A customer access token that's accessible on the server if there's a customer login. */
53
58
  customerAccessToken?: CartBuyerIdentityInput['customerAccessToken'];
@@ -65,6 +70,7 @@ type CartProviderProps = {
65
70
  * There are also props that trigger when a call to the Storefront API is completed, such as `onLineAddComplete={}` when the fetch request for adding a line to the cart completes.
66
71
  *
67
72
  * The `CartProvider` component must be a descendant of the `ShopifyProvider` component.
73
+ * @publicDocs
68
74
  */
69
75
  export declare function CartProvider({ children, numCartLines, onCreate, onLineAdd, onLineRemove, onLineUpdate, onNoteUpdate, onBuyerIdentityUpdate, onAttributesUpdate, onDiscountCodesUpdate, onCreateComplete, onLineAddComplete, onLineRemoveComplete, onLineUpdateComplete, onNoteUpdateComplete, onBuyerIdentityUpdateComplete, onAttributesUpdateComplete, onDiscountCodesUpdateComplete, data: cart, cartFragment, customerAccessToken, countryCode, languageCode, }: CartProviderProps): JSX.Element;
70
76
  /**
@@ -1,6 +1,9 @@
1
1
  import type { ExternalVideo as ExternalVideoType } from './storefront-api-types.js';
2
2
  import type { PartialDeep } from 'type-fest';
3
3
  import { IframeHTMLAttributes } from 'react';
4
+ /**
5
+ * Takes in the same props as a native `<iframe>` element, except for `src`.
6
+ * @publicDocs */
4
7
  export interface ExternalVideoBaseProps {
5
8
  /**
6
9
  * An object with fields that correspond to the Storefront API's [ExternalVideo object](https://shopify.dev/api/storefront/reference/products/externalvideo).
@@ -18,6 +21,7 @@ export type ExternalVideoProps = Omit<IframeHTMLAttributes<HTMLIFrameElement>, '
18
21
  /**
19
22
  * The `ExternalVideo` component renders an embedded video for the Storefront
20
23
  * API's [ExternalVideo object](https://shopify.dev/api/storefront/reference/products/externalvideo).
24
+ * @publicDocs
21
25
  */
22
26
  export declare const ExternalVideo: import("react").ForwardRefExoticComponent<Omit<IframeHTMLAttributes<HTMLIFrameElement>, "src"> & ExternalVideoBaseProps & import("react").RefAttributes<HTMLIFrameElement>>;
23
27
  interface YouTube {
@@ -23,6 +23,7 @@ export type LoaderParams = {
23
23
  };
24
24
  export type Loader = (params: LoaderParams) => string;
25
25
  type Crop = 'center' | 'top' | 'bottom' | 'left' | 'right';
26
+ /** @publicDocs */
26
27
  export type HydrogenImageProps = React.ComponentPropsWithRef<'img'> & HydrogenImageBaseProps;
27
28
  type HydrogenImageBaseProps = {
28
29
  /** The aspect ratio of the image, in the format of `width/height`.
@@ -42,7 +43,7 @@ type HydrogenImageBaseProps = {
42
43
  * @defaultValue `center`
43
44
  */
44
45
  crop?: Crop;
45
- /** Data mapping to the [Storefront API `Image`](https://shopify.dev/docs/api/storefront/2026-01/objects/Image) object. Must be an Image object.
46
+ /** Data mapping to the [Storefront API `Image`](https://shopify.dev/docs/api/storefront/2026-04/objects/Image) object. Must be an Image object.
46
47
  *
47
48
  * @example
48
49
  * ```
@@ -117,6 +118,7 @@ export declare const IMAGE_FRAGMENT = "#graphql\n fragment Image on Image {\n
117
118
  * ```
118
119
  *
119
120
  * {@link https://shopify.dev/docs/api/hydrogen-react/components/image}
121
+ * @publicDocs
120
122
  */
121
123
  export declare const Image: React.ForwardRefExoticComponent<Omit<HydrogenImageProps, "ref"> & React.RefAttributes<HTMLImageElement>>;
122
124
  export declare function shopifyLoader({ src, width, height, crop }: LoaderParams): string;
@@ -6,6 +6,9 @@ import type { MediaEdge as MediaEdgeType } from './storefront-api-types.js';
6
6
  import type { PartialDeep } from 'type-fest';
7
7
  import type { ModelViewerElement } from '@google/model-viewer/lib/model-viewer.js';
8
8
  type BaseProps = React.HTMLAttributes<HTMLImageElement | HTMLVideoElement | HTMLIFrameElement | ModelViewerElement>;
9
+ /**
10
+ * MediaFile renders an `Image`, `Video`, `ExternalVideo`, or `ModelViewer` component. Use the `mediaOptions` prop to customize the props sent to each of these components.
11
+ * @publicDocs */
9
12
  export interface MediaFileProps extends BaseProps {
10
13
  /** An object with fields that correspond to the Storefront API's [Media object](https://shopify.dev/api/storefront/reference/products/media). */
11
14
  data: PartialDeep<MediaEdgeType['node'], {
@@ -28,6 +31,7 @@ type MediaOptions = {
28
31
  * The `MediaFile` component renders the media for the Storefront API's
29
32
  * [Media object](https://shopify.dev/api/storefront/reference/products/media). It renders an `Image`, a
30
33
  * `Video`, an `ExternalVideo`, or a `ModelViewer` depending on the `__typename` of the `data` prop.
34
+ * @publicDocs
31
35
  */
32
36
  export declare function MediaFile({ data, mediaOptions, ...passthroughProps }: MediaFileProps): JSX.Element | null;
33
37
  export {};
@@ -14,7 +14,7 @@ type ModelViewerProps = Omit<PartialDeep<JSX.IntrinsicElements['model-viewer'],
14
14
  recurseIntoArrays: true;
15
15
  }>, 'src'> & ModelViewerBaseProps;
16
16
  type ModelViewerBaseProps = {
17
- /** An object with fields that correspond to the Storefront API's [Model3D object](https://shopify.dev/api/storefront/2026-01/objects/model3d). */
17
+ /** An object with fields that correspond to the Storefront API's [Model3D object](https://shopify.dev/api/storefront/2026-04/objects/model3d). */
18
18
  data: PartialDeep<Model3d, {
19
19
  recurseIntoArrays: true;
20
20
  }>;
@@ -52,6 +52,7 @@ type ModelViewerBaseProps = {
52
52
  * The `model-viewer` custom element is lazily downloaded through a dynamically-injected `<script type="module">` tag when the `<ModelViewer />` component is rendered
53
53
  *
54
54
  * ModelViewer is using version `1.21.1` of the `@google/model-viewer` library.
55
+ * @publicDocs
55
56
  */
56
57
  export declare function ModelViewer(props: ModelViewerProps): JSX.Element | null;
57
58
  export {};
@@ -11,7 +11,7 @@ type MoneyV2 = StorefrontApiMoneyV2 | CustomerAccountApiMoneyV2;
11
11
  export interface MoneyPropsBase<ComponentGeneric extends React.ElementType> {
12
12
  /** An HTML tag or React Component to be rendered as the base element wrapper. The default is `div`. */
13
13
  as?: ComponentGeneric;
14
- /** An object with fields that correspond to the [Storefront API's MoneyV2 object](https://shopify.dev/docs/api/storefront/2026-01/objects/MoneyV2) or [Customer Account API's MoneyV2 object](https://shopify.dev/docs/api/customer/2026-01/objects/moneyv2). */
14
+ /** An object with fields that correspond to the [Storefront API's MoneyV2 object](https://shopify.dev/docs/api/storefront/2026-04/objects/MoneyV2) or [Customer Account API's MoneyV2 object](https://shopify.dev/docs/api/customer/2026-04/objects/moneyv2). */
15
15
  data: PartialDeep<MoneyV2, {
16
16
  recurseIntoArrays: true;
17
17
  }>;
@@ -19,7 +19,7 @@ export interface MoneyPropsBase<ComponentGeneric extends React.ElementType> {
19
19
  withoutCurrency?: boolean;
20
20
  /** Whether to remove trailing zeros (fractional money) from the output. */
21
21
  withoutTrailingZeros?: boolean;
22
- /** A [UnitPriceMeasurement object](https://shopify.dev/api/storefront/2026-01/objects/unitpricemeasurement). */
22
+ /** A [UnitPriceMeasurement object](https://shopify.dev/api/storefront/2026-04/objects/unitpricemeasurement). */
23
23
  measurement?: PartialDeep<UnitPriceMeasurement, {
24
24
  recurseIntoArrays: true;
25
25
  }>;
@@ -28,8 +28,8 @@ export interface MoneyPropsBase<ComponentGeneric extends React.ElementType> {
28
28
  }
29
29
  export type MoneyProps<ComponentGeneric extends React.ElementType> = MoneyPropsBase<ComponentGeneric> & (ComponentGeneric extends keyof React.JSX.IntrinsicElements ? Omit<React.ComponentPropsWithoutRef<ComponentGeneric>, keyof MoneyPropsBase<ComponentGeneric>> : React.ComponentPropsWithoutRef<ComponentGeneric>);
30
30
  /**
31
- * The `Money` component renders a string of the [Storefront API's MoneyV2 object](https://shopify.dev/docs/api/storefront/2026-01/objects/MoneyV2)
32
- * or the [Customer Account API's MoneyV2 object](https://shopify.dev/docs/api/customer/2026-01/objects/moneyv2)
31
+ * The `Money` component renders a string of the [Storefront API's MoneyV2 object](https://shopify.dev/docs/api/storefront/2026-04/objects/MoneyV2)
32
+ * or the [Customer Account API's MoneyV2 object](https://shopify.dev/docs/api/customer/2026-04/objects/moneyv2)
33
33
  * according to the `locale` in the `ShopifyProvider` component.
34
34
  * &nbsp;
35
35
  * @see {@link https://shopify.dev/api/hydrogen/components/money}
@@ -59,6 +59,7 @@ export type MoneyProps<ComponentGeneric extends React.ElementType> = MoneyPropsB
59
59
  * measurementSeparator=" per "
60
60
  * />
61
61
  * ```
62
+ * @publicDocs
62
63
  */
63
64
  export declare function Money<ComponentGeneric extends React.ElementType = 'div'>({ data, as, withoutCurrency, withoutTrailingZeros, measurement, measurementSeparator, ...passthroughProps }: MoneyProps<ComponentGeneric>): JSX.Element;
64
65
  export {};
@@ -16,7 +16,9 @@ export interface ProductPriceProps {
16
16
  /**
17
17
  * The `ProductPrice` component renders a `Money` component with the product
18
18
  * [`priceRange`](https://shopify.dev/api/storefront/reference/products/productpricerange)'s `maxVariantPrice` or `minVariantPrice`, for either the regular price or compare at price range.
19
+ * @publicDocs
19
20
  */
20
21
  export declare function ProductPrice<ComponentGeneric extends React.ElementType = 'div'>(props: ProductPriceProps & Omit<MoneyProps<ComponentGeneric>, 'data' | 'measurement'>): JSX.Element | null;
22
+ /** @publicDocs */
21
23
  export interface ProductPricePropsForDocs<AsType extends React.ElementType = 'div'> extends Omit<MoneyPropsBase<AsType>, 'data' | 'measurement'>, ProductPriceProps {
22
24
  }
@@ -22,10 +22,12 @@ interface ProductProviderProps {
22
22
  * `<ProductProvider />` is a context provider that enables use of the `useProduct()` hook.
23
23
  *
24
24
  * It helps manage selected options and variants for a product.
25
+ * @publicDocs
25
26
  */
26
27
  export declare function ProductProvider({ children, data: product, initialVariantId: explicitVariantId, }: ProductProviderProps): JSX.Element;
27
28
  /**
28
29
  * Provides access to the context value provided by `<ProductProvider />`. Must be a descendent of `<ProductProvider />`.
30
+ * @publicDocs
29
31
  */
30
32
  export declare function useProduct(): ProductHookValue;
31
33
  export interface OptionWithValues {
@@ -9,6 +9,8 @@ export interface RichTextPropsBase<ComponentGeneric extends React.ElementType> {
9
9
  /** Remove rich text formatting and render plain text */
10
10
  plain?: boolean;
11
11
  }
12
+ /** @publicDocs */
12
13
  export declare function RichText<ComponentGeneric extends React.ElementType = 'div'>({ as, data, plain, components, ...passthroughProps }: RichTextProps<ComponentGeneric>): JSX.Element;
13
14
  export type RichTextProps<ComponentGeneric extends React.ElementType> = RichTextPropsBase<ComponentGeneric> & Omit<React.ComponentPropsWithoutRef<ComponentGeneric>, keyof RichTextPropsBase<ComponentGeneric>>;
15
+ /** @publicDocs */
14
16
  export type RichTextPropsForDocs<AsType extends React.ElementType = 'div'> = RichTextPropsBase<AsType>;
@@ -43,6 +43,7 @@ declare global {
43
43
  * The `ShopPayButton` component renders a button that redirects to the Shop Pay checkout.
44
44
  * It renders a [`<shop-pay-button>`](https://shopify.dev/custom-storefronts/tools/web-components) custom element, for which it will lazy-load the source code automatically.
45
45
  * It relies on the `<ShopProvider>` context provider.
46
+ * @publicDocs
46
47
  */
47
48
  export declare function ShopPayButton({ channel, variantIds, className, variantIdsAndQuantities, width, storeDomain: _storeDomain, }: ShopPayButtonProps): JSX.Element;
48
49
  export declare const MissingStoreDomainErrorMessage = "You must pass a \"storeDomain\" prop to the \"ShopPayButton\" component, or wrap it in a \"ShopifyProvider\" component.";
@@ -3,10 +3,12 @@ import type { LanguageCode, CountryCode } from './storefront-api-types.js';
3
3
  export declare const defaultShopifyContext: ShopifyContextValue;
4
4
  /**
5
5
  * The `<ShopifyProvider/>` component enables use of the `useShop()` hook. The component should wrap your app.
6
+ * @publicDocs
6
7
  */
7
8
  export declare function ShopifyProvider({ children, ...shopifyConfig }: ShopifyProviderProps): JSX.Element;
8
9
  /**
9
10
  * Provides access to the `shopifyConfig` prop of `<ShopifyProvider/>`. Must be a descendent of `<ShopifyProvider/>`.
11
+ * @publicDocs
10
12
  */
11
13
  export declare function useShop(): ShopifyContextValue;
12
14
  export interface ShopifyProviderBase {
@@ -2,8 +2,9 @@ import { type HTMLAttributes } from 'react';
2
2
  import { shopifyLoader } from './Image.js';
3
3
  import type { Video as VideoType } from './storefront-api-types.js';
4
4
  import type { PartialDeep } from 'type-fest';
5
+ /** @publicDocs */
5
6
  export interface VideoProps {
6
- /** An object with fields that correspond to the Storefront API's [Video object](https://shopify.dev/api/storefront/2026-01/objects/video). */
7
+ /** An object with fields that correspond to the Storefront API's [Video object](https://shopify.dev/api/storefront/2026-04/objects/video). */
7
8
  data: PartialDeep<VideoType, {
8
9
  recurseIntoArrays: true;
9
10
  }>;
@@ -16,5 +17,6 @@ export interface VideoProps {
16
17
  }
17
18
  /**
18
19
  * The `Video` component renders a `video` for the Storefront API's [Video object](https://shopify.dev/api/storefront/reference/products/video).
20
+ * @publicDocs
19
21
  */
20
22
  export declare const Video: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLVideoElement> & import("react").VideoHTMLAttributes<HTMLVideoElement> & VideoProps, "ref"> & import("react").RefAttributes<HTMLVideoElement>>;
@@ -16,12 +16,18 @@ export declare const ShopifyAppId: {
16
16
  * These duplicated interface declaration is so that we can generate proper documentation
17
17
  * for these public facing constants
18
18
  */
19
+ /**
20
+ * Analytics event names accepted by Shopify analytics.
21
+ * @publicDocs */
19
22
  export interface AnalyticsEventName {
20
23
  /** Page view */
21
24
  PAGE_VIEW: 'PAGE_VIEW';
22
25
  /** Add to cart */
23
26
  ADD_TO_CART: 'ADD_TO_CART';
24
27
  }
28
+ /**
29
+ * Analytics page type values accepted by Shopify analytics.
30
+ * @publicDocs */
25
31
  export interface AnalyticsPageType {
26
32
  article: 'article';
27
33
  blog: 'blog';
@@ -46,6 +52,9 @@ export interface AnalyticsPageType {
46
52
  policy: 'policy';
47
53
  search: 'search';
48
54
  }
55
+ /**
56
+ * Analytics sales channel values accepted by Shopify analytics.
57
+ * @publicDocs */
49
58
  export interface ShopifySalesChannel {
50
59
  /** Shopify Hydrogen sales channel */
51
60
  hydrogen: 'hydrogen';
@@ -180,6 +180,7 @@ export type ShopifyAnalyticsPayload = ShopifyPageViewPayload | ShopifyAddToCartP
180
180
  */
181
181
  export type ShopifyAnalyticsPayloadWithPrivacyFields = ShopifyPageViewPayloadWithPrivacyFields | ShopifyAddToCartPayloadWithPrivacyFields;
182
182
  export type ShopifyAnalytics = ShopifyPageView | ShopifyAddToCart;
183
+ /** Shopify cookies names */
183
184
  export type ShopifyCookies = {
184
185
  /** Shopify unique user token: Value of `_shopify_y` cookie. */
185
186
  [SHOPIFY_Y]: string;
@@ -19,6 +19,7 @@ export declare function schemaWrapper(schemaId: string, payload: ShopifyMonorail
19
19
  * * const {id, resource} = parseGid('gid://shopify/Cart/abc123')
20
20
  * // => id = "abc123", resource = 'Cart'
21
21
  * ```
22
+ * @publicDocs
22
23
  **/
23
24
  export declare function parseGid(gid: string | undefined): ShopifyGid;
24
25
  /**
@@ -1,9 +1,14 @@
1
1
  import type { ClientBrowserParameters, ShopifyAnalytics } from './analytics-types.js';
2
2
  /**
3
- * Set user and session cookies and refresh the expiry time
3
+ * Set user and session cookies and refresh the expiry time. If `event.payload.hasUserConsent` is false, no analytics event will happen.
4
4
  * @param event - The analytics event.
5
5
  * @param shopDomain - The Online Store domain to sent Shopify analytics under the same
6
6
  * top level domain.
7
+ * @publicDocs
7
8
  */
8
9
  export declare function sendShopifyAnalytics(event: ShopifyAnalytics, shopDomain?: string): Promise<void>;
10
+ /**
11
+ * If executed on server, this method will return empty string for each field.
12
+ * @publicDocs
13
+ */
9
14
  export declare function getClientBrowserParameters(): ClientBrowserParameters;
@@ -1,10 +1,14 @@
1
- export declare const CartLineAdd: (cartFragment: string) => string;
2
- export declare const CartCreate: (cartFragment: string) => string;
3
- export declare const CartLineRemove: (cartFragment: string) => string;
4
- export declare const CartLineUpdate: (cartFragment: string) => string;
5
- export declare const CartNoteUpdate: (cartFragment: string) => string;
6
- export declare const CartBuyerIdentityUpdate: (cartFragment: string) => string;
7
- export declare const CartAttributesUpdate: (cartFragment: string) => string;
8
- export declare const CartDiscountCodesUpdate: (cartFragment: string) => string;
9
- export declare const CartQuery: (cartFragment: string) => string;
1
+ type CartQueryOptions = {
2
+ includeVisitorConsent?: boolean;
3
+ };
4
+ export declare const CartLineAdd: (cartFragment: string, options?: CartQueryOptions) => string;
5
+ export declare const CartCreate: (cartFragment: string, options?: CartQueryOptions) => string;
6
+ export declare const CartLineRemove: (cartFragment: string, options?: CartQueryOptions) => string;
7
+ export declare const CartLineUpdate: (cartFragment: string, options?: CartQueryOptions) => string;
8
+ export declare const CartNoteUpdate: (cartFragment: string, options?: CartQueryOptions) => string;
9
+ export declare const CartBuyerIdentityUpdate: (cartFragment: string, options?: CartQueryOptions) => string;
10
+ export declare const CartAttributesUpdate: (cartFragment: string, options?: CartQueryOptions) => string;
11
+ export declare const CartDiscountCodesUpdate: (cartFragment: string, options?: CartQueryOptions) => string;
12
+ export declare const CartQuery: (cartFragment: string, options?: CartQueryOptions) => string;
10
13
  export declare const defaultCartFragment = "\n fragment CartFragment on Cart {\n id\n checkoutUrl\n totalQuantity\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 cost {\n totalAmount {\n amount\n currencyCode\n }\n compareAtAmountPerQuantity {\n amount\n currencyCode\n }\n }\n merchandise {\n ... on ProductVariant {\n id\n availableForSale\n compareAtPrice {\n ...MoneyFragment\n }\n price {\n ...MoneyFragment\n }\n requiresShipping\n title\n image {\n ...ImageFragment\n }\n product {\n handle\n title\n id\n }\n selectedOptions {\n name\n value\n }\n }\n }\n }\n }\n }\n cost {\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 applicable\n }\n }\n\n fragment MoneyFragment on MoneyV2 {\n currencyCode\n amount\n }\n fragment ImageFragment on Image {\n id\n url\n altText\n width\n height\n }\n";
14
+ export {};
@@ -1,7 +1,8 @@
1
1
  /**
2
2
  * Meant to be used with GraphQL CodeGen to type the Storefront API's custom scalars correctly.
3
- * Reference for the GraphQL types: https://shopify.dev/docs/api/storefront/2026-01/scalars/HTML
3
+ * Reference for the GraphQL types: https://shopify.dev/docs/api/storefront/2026-04/scalars/HTML
4
4
  * Note: JSON is generated as 'unknown' by default.
5
+ * @publicDocs
5
6
  */
6
7
  export declare const storefrontApiCustomScalars: {
7
8
  DateTime: string;
@@ -13,8 +14,9 @@ export declare const storefrontApiCustomScalars: {
13
14
  };
14
15
  /**
15
16
  * Meant to be used with GraphQL CodeGen to type the Storefront API's custom scalars correctly.
16
- * Reference for the GraphQL types: https://shopify.dev/docs/api/customer/2026-01/scalars/HTML
17
+ * Reference for the GraphQL types: https://shopify.dev/docs/api/customer/2026-04/scalars/HTML
17
18
  * Note: JSON is generated as 'unknown' by default.
19
+ * @publicDocs
18
20
  */
19
21
  export declare const customerAccountApiCustomScalars: {
20
22
  DateTime: string;
@@ -2,7 +2,8 @@ import { ShopifyCookies } from './analytics-types.js';
2
2
  export declare function buildUUID(): string;
3
3
  export declare function hexTime(): string;
4
4
  /**
5
- * Gets the values of _shopify_y and _shopify_s cookies from the provided cookie string.
5
+ * Gets the values of _shopify_y and _shopify_s cookies from the provided cookie string. If the Shopify cookies doesn't exist, this method will return an empty string for each missing cookie.
6
6
  * @deprecated Use getTrackingValues instead.
7
+ * @publicDocs
7
8
  */
8
9
  export declare function getShopifyCookies(cookies: string): ShopifyCookies;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * THIS FILE IS AUTO-GENERATED, DO NOT EDIT
3
- * Based on Customer Account API 2026-01
3
+ * Based on Customer Account API 2026-04
4
4
  * If changes need to happen to the types defined in this file, then generally the Storefront API needs to update. After it's updated, you can run `npm run graphql-types`.
5
5
  * Except custom Scalars, which are defined in the `codegen.ts` file
6
6
  */
@@ -2906,6 +2906,8 @@ export type DraftOrder = Node & {
2906
2906
  currencyCode: CurrencyCode;
2907
2907
  /** The customer who placed the order. */
2908
2908
  customer?: Maybe<Customer>;
2909
+ /** List of discounts applied to the draft order. */
2910
+ discountApplications: DiscountApplicationConnection;
2909
2911
  /** The discount information for the draft order. */
2910
2912
  discountInformation: DraftOrderDiscountInformation;
2911
2913
  /** The email address of the customer, which is used to send notifications to. */
@@ -2965,11 +2967,21 @@ export type DraftOrder = Node & {
2965
2967
  updatedAt: Scalars['DateTime']['output'];
2966
2968
  };
2967
2969
 
2970
+ /** A draft order for the customer. Any fields related to money are in the presentment currency. Apps using the Customer Account API must meet the protected customer data [requirements](https://shopify.dev/docs/apps/launch/protected-customer-data). */
2971
+ export type DraftOrderDiscountApplicationsArgs = {
2972
+ after?: InputMaybe<Scalars['String']['input']>;
2973
+ before?: InputMaybe<Scalars['String']['input']>;
2974
+ first?: InputMaybe<Scalars['Int']['input']>;
2975
+ last?: InputMaybe<Scalars['Int']['input']>;
2976
+ reverse?: InputMaybe<Scalars['Boolean']['input']>;
2977
+ };
2978
+
2968
2979
  /** A draft order for the customer. Any fields related to money are in the presentment currency. Apps using the Customer Account API must meet the protected customer data [requirements](https://shopify.dev/docs/apps/launch/protected-customer-data). */
2969
2980
  export type DraftOrderLineItemsArgs = {
2970
2981
  after?: InputMaybe<Scalars['String']['input']>;
2971
2982
  before?: InputMaybe<Scalars['String']['input']>;
2972
2983
  first?: InputMaybe<Scalars['Int']['input']>;
2984
+ flattenComponents?: InputMaybe<Scalars['Boolean']['input']>;
2973
2985
  last?: InputMaybe<Scalars['Int']['input']>;
2974
2986
  reverse?: InputMaybe<Scalars['Boolean']['input']>;
2975
2987
  };
@@ -3037,6 +3049,10 @@ export type DraftOrderConnection = {
3037
3049
  /** The discount information associated with a draft order. */
3038
3050
  export type DraftOrderDiscountInformation = {
3039
3051
  __typename?: 'DraftOrderDiscountInformation';
3052
+ /** The discount information for the draft order, including line_level discount applications. */
3053
+ allAppliedDiscounts: Array<OrderAllDiscounts>;
3054
+ /** The order level discount information for the draft order. */
3055
+ allOrderLevelAppliedDiscounts: Array<OrderAllDiscounts>;
3040
3056
  /** The order-level discount applied to the draft order. */
3041
3057
  appliedDiscount?: Maybe<DraftOrderAppliedDiscount>;
3042
3058
  /** The total discounts applied to the draft order. */
@@ -3055,6 +3071,12 @@ export type DraftOrderEdge = {
3055
3071
  /** A line item included in a draft order. */
3056
3072
  export type DraftOrderLineItem = Node & {
3057
3073
  __typename?: 'DraftOrderLineItem';
3074
+ /** The discounted total divided by the quantity, resulting in an average per-unit price reduction. */
3075
+ approximateDiscountedUnitPrice: MoneyV2;
3076
+ /** The list of components for this draft order line item. */
3077
+ components: Array<DraftOrderLineItem>;
3078
+ /** List of discounts allocated to the draft order line item. */
3079
+ discountAllocations: Array<DiscountAllocation>;
3058
3080
  /** The discount information for the draft order line item. */
3059
3081
  discountInformation: DraftOrderLineItemDiscountInformation;
3060
3082
  /** The total price of the line item after discounts have been applied. */
@@ -4,6 +4,7 @@ import type { PartialDeep } from 'type-fest';
4
4
  * The utility works with either `nodes` or `edges.node`.
5
5
  *
6
6
  * If `connection` is null or undefined, will return an empty array instead in production. In development, an error will be thrown.
7
+ * @publicDocs
7
8
  */
8
9
  export declare function flattenConnection<ConnectionGeneric extends PartialDeep<ConnectionEdges, {
9
10
  recurseIntoArrays: true;
@@ -36,8 +37,10 @@ type ConnectionEdges = {
36
37
  type ConnectionNodes = {
37
38
  nodes: Array<unknown>;
38
39
  };
40
+ /** @publicDocs */
39
41
  export interface ConnectionGenericForDoc {
40
42
  connection?: ConnectionEdges | ConnectionNodes;
41
43
  }
44
+ /** @publicDocs */
42
45
  export type FlattenConnectionReturnForDoc = unknown[];
43
46
  export {};
@@ -30,6 +30,7 @@ type MappedProductOptionValue = ProductOptionValue & ProductOptionValueState;
30
30
  * Color: 'Red',
31
31
  * Size: 'Medium',
32
32
  * \}
33
+ * @publicDocs
33
34
  */
34
35
  export declare function mapSelectedProductOptionToObject(options: Pick<SelectedOption, 'name' | 'value'>[]): Record<string, string>;
35
36
  export type MappedProductOptions = Omit<ProductOption, 'optionValues'> & {
@@ -39,11 +40,13 @@ export declare function checkProductParam(product: RecursivePartial<Product>, ch
39
40
  /**
40
41
  * Finds all the variants provided by adjacentVariants, options.optionValues.firstAvailableVariant,
41
42
  * and selectedOrFirstAvailableVariant and return them in a single array
43
+ * @publicDocs
42
44
  */
43
45
  export declare function getAdjacentAndFirstAvailableVariants(product: RecursivePartial<Product>): ProductVariant[];
44
46
  /**
45
47
  * Returns a product options array with its relevant information
46
48
  * about the variant
49
+ * @publicDocs
47
50
  */
48
51
  export declare function getProductOptions(product: RecursivePartial<Product>): MappedProductOptions[];
49
52
  export {};
@@ -4,9 +4,11 @@ type LoadScriptOptions = {
4
4
  attributes?: Record<string, string>;
5
5
  };
6
6
  export declare function loadScript(src: string, options?: LoadScriptOptions): Promise<boolean>;
7
- type LoadScriptParams = Parameters<typeof loadScript>;
7
+ /** @publicDocs */
8
+ export type LoadScriptParams = Parameters<typeof loadScript>;
8
9
  /**
9
10
  * The `useLoadScript` hook loads an external script tag in the browser. It allows React components to lazy-load large third-party dependencies.
11
+ * @publicDocs
10
12
  */
11
13
  export declare function useLoadScript(url: LoadScriptParams[0], options?: LoadScriptParams[1]): ScriptState;
12
14
  type ScriptState = 'loading' | 'done' | 'error';
@@ -9,21 +9,24 @@
9
9
  * - `-` indicates a continuous range of option values. ex: `0 1-3 4`. Ranges are only present encoded in the final option value position, so for example the trie for the set [[0,0,0],[0,0,1], ..., [0,2,2]] will be structured as `0:0:0-2,1:0-2,2:0-2`, not `0:0-2:0-2`.
10
10
  */
11
11
  import { Product } from './storefront-api-types.js';
12
+ /** @publicDocs */
12
13
  export type IsOptionValueCombinationInEncodedVariant = (targetOptionValueCombination: number[], encodedVariantField: string) => boolean;
13
14
  /**
14
15
  * Determine whether an option value combination is present in an encoded option value string. Function is memoized by encodedVariantField.
15
16
  *
16
17
  * @param targetOptionValueCombination - Indices of option values to look up in the encoded option value string. A partial set of indices may be passed to determine whether a node or any children is present. For example, if a product has 3 options, passing [0] will return true if any option value combination for the first option's option value is present in the encoded string.
17
- * @param encodedVariantField - Encoded option value string from the Storefront API, e.g. [product.encodedVariantExistence](/docs/api/storefront/2026-01/objects/Product#field-encodedvariantexistence) or [product.encodedVariantAvailability](/docs/api/storefront/2026-01/objects/Product#field-encodedvariantavailability)
18
+ * @param encodedVariantField - Encoded option value string from the Storefront API, e.g. [product.encodedVariantExistence](/docs/api/storefront/2026-04/objects/Product#field-encodedvariantexistence) or [product.encodedVariantAvailability](/docs/api/storefront/2026-04/objects/Product#field-encodedvariantavailability)
18
19
  * @returns - True if a full or partial targetOptionValueIndices is present in the encoded option value string, false otherwise.
20
+ * @publicDocs
19
21
  */
20
22
  export declare const isOptionValueCombinationInEncodedVariant: IsOptionValueCombinationInEncodedVariant;
21
23
  type EncodedVariantField = Product['encodedVariantAvailability'] | Product['encodedVariantExistence'];
22
24
  type DecodedOptionValues = number[][];
23
25
  /**
24
26
  * For an encoded option value string, decode into option value combinations. Entries represent a valid combination formatted as an array of option value positions.
25
- * @param encodedVariantField - Encoded option value string from the Storefront API, e.g. [product.encodedVariantExistence](/docs/api/storefront/2026-01/objects/Product#field-encodedvariantexistence) or [product.encodedVariantAvailability](/docs/api/storefront/2026-01/objects/Product#field-encodedvariantavailability)
27
+ * @param encodedVariantField - Encoded option value string from the Storefront API, e.g. [product.encodedVariantExistence](/docs/api/storefront/2026-04/objects/Product#field-encodedvariantexistence) or [product.encodedVariantAvailability](/docs/api/storefront/2026-04/objects/Product#field-encodedvariantavailability)
26
28
  * @returns Decoded option value combinations
29
+ * @publicDocs
27
30
  */
28
31
  export declare function decodeEncodedVariant(encodedVariantField: EncodedVariantField): DecodedOptionValues;
29
32
  export {};
@@ -9,6 +9,7 @@ import { RootASTNode as RichTextRootASTNode } from './RichText.types.js';
9
9
  * ```
10
10
  * parseMetafield<ParsedMetafields['boolean']>({type: 'boolean', value: 'false'}
11
11
  * ```
12
+ * @publicDocs
12
13
  */
13
14
  export declare function parseMetafield<ReturnGeneric>(metafield: PartialDeep<MetafieldBaseType, {
14
15
  recurseIntoArrays: true;
@@ -1 +1 @@
1
- export declare const SFAPI_VERSION = "2026-01";
1
+ export declare const SFAPI_VERSION = "2026-04";