shopify 4.3.0 → 4.5.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 (337) hide show
  1. package/dist/analytics-DMUNCDGT.js +1 -0
  2. package/dist/analytics-GAPN4I6R.js +1 -0
  3. package/dist/assets/hydrogen/routes/locale-check.ts +3 -3
  4. package/dist/assets/hydrogen/starter/CHANGELOG.md +106 -0
  5. package/dist/assets/hydrogen/starter/app/components/Aside.tsx +4 -2
  6. package/dist/assets/hydrogen/starter/app/components/CartMain.tsx +8 -5
  7. package/dist/assets/hydrogen/starter/app/components/CartSummary.tsx +117 -23
  8. package/dist/assets/hydrogen/starter/app/components/Header.tsx +3 -3
  9. package/dist/assets/hydrogen/starter/app/components/PaginatedResourceSection.tsx +24 -4
  10. package/dist/assets/hydrogen/starter/app/components/ProductPrice.tsx +1 -1
  11. package/dist/assets/hydrogen/starter/app/lib/context.ts +5 -0
  12. package/dist/assets/hydrogen/starter/app/routes/[robots.txt].tsx +14 -53
  13. package/dist/assets/hydrogen/starter/app/routes/_index.tsx +11 -4
  14. package/dist/assets/hydrogen/starter/app/routes/account.$.tsx +1 -1
  15. package/dist/assets/hydrogen/starter/app/routes/account.addresses.tsx +2 -2
  16. package/dist/assets/hydrogen/starter/app/routes/account.profile.tsx +1 -1
  17. package/dist/assets/hydrogen/starter/package.json +9 -10
  18. package/dist/assets/hydrogen/starter/storefrontapi.generated.d.ts +0 -11
  19. package/dist/assets/hydrogen/starter/vite.config.ts +10 -4
  20. package/dist/assets/hydrogen/vite/package.json +1 -2
  21. package/dist/assets/hydrogen/vite/vite.config.js +4 -3
  22. package/dist/bootstrap.js +1 -1
  23. package/dist/{chunk-3YDYZ232.js → chunk-235JVI2J.js} +8 -8
  24. package/dist/{chunk-2K7FGAT6.js → chunk-24RF5KN3.js} +1 -1
  25. package/dist/{chunk-GWHV62YT.js → chunk-2IPVQRMI.js} +1 -1
  26. package/dist/{chunk-QDVJJKLB.js → chunk-2MDFREEW.js} +1 -1
  27. package/dist/{chunk-JSOGPMWB.js → chunk-2MZACB7V.js} +1 -1
  28. package/dist/{chunk-LCZDC6EE.js → chunk-2ROG5NK3.js} +1 -1
  29. package/dist/{chunk-WVRGCNBZ.js → chunk-2VUG6LRN.js} +1 -1
  30. package/dist/{chunk-S22NCNAJ.js → chunk-32KQKGSY.js} +1 -1
  31. package/dist/chunk-3EQY5B4S.js +836 -0
  32. package/dist/{chunk-VRJTLVG3.js → chunk-3JAC5SI7.js} +1 -1
  33. package/dist/{chunk-G3JJLXPH.js → chunk-3JZKWK2V.js} +1 -1
  34. package/dist/chunk-3NMVMCOM.js +3 -0
  35. package/dist/chunk-3OE5HXHO.js +1 -0
  36. package/dist/{chunk-2RBIR3NM.js → chunk-4EYTWWYF.js} +1 -1
  37. package/dist/{chunk-G2OHWAY2.js → chunk-4LML2QWN.js} +1 -1
  38. package/dist/{chunk-UYSF234H.js → chunk-4Q54UDO3.js} +1 -1
  39. package/dist/{chunk-7572RLUP.js → chunk-4U3NC3UU.js} +1 -1
  40. package/dist/chunk-52H2R2FU.js +1 -0
  41. package/dist/{chunk-PMS4MNHB.js → chunk-57IRHKV3.js} +1 -1
  42. package/dist/{chunk-3AOQKI4B.js → chunk-5A7EMVAP.js} +1 -1
  43. package/dist/{chunk-T3ERXB7F.js → chunk-5EVFLUUA.js} +1 -1
  44. package/dist/{chunk-DYNH5SKT.js → chunk-5O7PY44R.js} +1 -1
  45. package/dist/chunk-63NFEXJR.js +275 -0
  46. package/dist/{chunk-PXHY753L.js → chunk-663TS34D.js} +1 -1
  47. package/dist/{chunk-JAWKLBOB.js → chunk-6I3FNLT3.js} +1 -1
  48. package/dist/{chunk-WA3YC5W4.js → chunk-6LTJMYUD.js} +2 -2
  49. package/dist/{chunk-5BKCIDMS.js → chunk-6V37CHBZ.js} +1 -1
  50. package/dist/{chunk-HOSFU6UP.js → chunk-74IG3ZE3.js} +3 -3
  51. package/dist/{chunk-4J32OHLY.js → chunk-7BVXGS44.js} +1 -1
  52. package/dist/{chunk-MRS6LAY7.js → chunk-7DYZVU7H.js} +1 -1
  53. package/dist/{chunk-YSIBRY6C.js → chunk-7EOQVQND.js} +1 -1
  54. package/dist/{chunk-3SPDFV5D.js → chunk-7HZG7FBK.js} +1 -1
  55. package/dist/{chunk-MIDYZPO4.js → chunk-7KHYEIA7.js} +1 -1
  56. package/dist/{chunk-5XDQ76DQ.js → chunk-7ZIO3X22.js} +1 -1
  57. package/dist/{chunk-6JKGUQRD.js → chunk-A2O3MBPH.js} +1 -1
  58. package/dist/{chunk-Q77MM2N2.js → chunk-ABCU552E.js} +1 -1
  59. package/dist/{chunk-N3CNWCC2.js → chunk-AP6FNGTA.js} +1 -1
  60. package/dist/chunk-AUZCENYI.js +1 -0
  61. package/dist/chunk-AYKRKE6O.js +2 -0
  62. package/dist/{chunk-PFGYC53K.js → chunk-AYSS2ERL.js} +1 -1
  63. package/dist/chunk-B367FOQA.js +7 -0
  64. package/dist/{chunk-PCCK4YTE.js → chunk-BBATKR3B.js} +1 -1
  65. package/dist/chunk-BCEWCYZD.js +1 -0
  66. package/dist/{chunk-2GU7OY3H.js → chunk-BH34ZLZ4.js} +1 -1
  67. package/dist/{chunk-ZM75DSIW.js → chunk-BLI7DUNV.js} +1 -1
  68. package/dist/{chunk-E7DHELFH.js → chunk-BNX4MZMV.js} +1 -1
  69. package/dist/{chunk-N5LVGFDS.js → chunk-BU7R7NFL.js} +1 -1
  70. package/dist/{chunk-NILXAUUT.js → chunk-BVHBMOIB.js} +1 -1
  71. package/dist/{chunk-7FQFEB33.js → chunk-BXDZX3BS.js} +34 -34
  72. package/dist/{chunk-MMIHHCMW.js → chunk-CVRAATZ5.js} +1 -1
  73. package/dist/{chunk-G3RWLAOG.js → chunk-DBBU6OVN.js} +1 -1
  74. package/dist/{chunk-G2LVUM7N.js → chunk-DKVU7LYY.js} +1 -1
  75. package/dist/{chunk-L2PC4MUV.js → chunk-DLZPP33V.js} +1 -1
  76. package/dist/{chunk-JEZ3PGVC.js → chunk-DQOS54HN.js} +1 -1
  77. package/dist/{chunk-OZBY45KT.js → chunk-E4GW6OXT.js} +1 -1
  78. package/dist/chunk-E64BQS4D.js +1 -0
  79. package/dist/chunk-F447QKVX.js +1 -0
  80. package/dist/{chunk-57PPQKJT.js → chunk-FA25RL4G.js} +1 -1
  81. package/dist/{chunk-TRYWVIVJ.js → chunk-FJOEHMXM.js} +1 -1
  82. package/dist/{chunk-NWXDOCL5.js → chunk-G6YOP2SJ.js} +1 -1
  83. package/dist/{chunk-YIRFEW5M.js → chunk-GOAKZ2IL.js} +1 -1
  84. package/dist/{chunk-AU5EZQW7.js → chunk-H2JU5BGK.js} +1 -1
  85. package/dist/{chunk-VJ6KDRZI.js → chunk-H3V6Y5JO.js} +1 -1
  86. package/dist/{chunk-GJXINXSU.js → chunk-HHA322FT.js} +46 -46
  87. package/dist/{chunk-HCTZN7L4.js → chunk-HP3NDE7S.js} +1 -1
  88. package/dist/{chunk-ANBOLDON.js → chunk-HX3TALXV.js} +1 -1
  89. package/dist/{chunk-OU3M32A2.js → chunk-I3Y6XTKN.js} +1 -1
  90. package/dist/{chunk-DCLUZFT7.js → chunk-ICHNVDFU.js} +1 -1
  91. package/dist/{chunk-RSRYC5ZF.js → chunk-ICXHUPP5.js} +1 -1
  92. package/dist/chunk-IE4SSSXU.js +593 -0
  93. package/dist/{chunk-5FVB7JHP.js → chunk-IFVYCKX5.js} +1 -1
  94. package/dist/{chunk-JUYJZUYU.js → chunk-J2ZES5K5.js} +1 -1
  95. package/dist/{chunk-JCIN73BE.js → chunk-J5U2FUIX.js} +1 -1
  96. package/dist/chunk-JC3PRJJS.js +1 -0
  97. package/dist/chunk-JGN7YG5X.js +3 -0
  98. package/dist/{chunk-ZGJ3DFTQ.js → chunk-JZVNNQWE.js} +1 -1
  99. package/dist/{chunk-CV5EQGES.js → chunk-K2CIMJJW.js} +1 -1
  100. package/dist/{chunk-T4NS63K4.js → chunk-K7I5BGFC.js} +1 -1
  101. package/dist/{chunk-33OHQUHZ.js → chunk-KESQOMEW.js} +1 -1
  102. package/dist/{chunk-4QTEPWEJ.js → chunk-KJQAJUDU.js} +4 -4
  103. package/dist/{chunk-TP7E54WN.js → chunk-KNEF6NAG.js} +1 -1
  104. package/dist/{chunk-S6B2ADVR.js → chunk-KUKYAIOR.js} +1 -1
  105. package/dist/{chunk-MEIEEENL.js → chunk-KZDI2BXR.js} +1 -1
  106. package/dist/chunk-LKZ7ARYS.js +18 -0
  107. package/dist/{chunk-W7DDV2EY.js → chunk-LMPD55L6.js} +1 -1
  108. package/dist/{chunk-YVQXEPHY.js → chunk-LXZM6Z4F.js} +1 -1
  109. package/dist/{chunk-S5IFJ737.js → chunk-MGPLKG23.js} +1 -1
  110. package/dist/chunk-MSJDZLZT.js +1 -0
  111. package/dist/{chunk-N3NE4MVN.js → chunk-N4LCWB56.js} +1 -1
  112. package/dist/{chunk-VI34CKV6.js → chunk-N5U5Q2MG.js} +1 -1
  113. package/dist/{chunk-JK3NIHTX.js → chunk-N5YIZJ4S.js} +1 -1
  114. package/dist/{chunk-CEHXOWA6.js → chunk-N625VE5T.js} +1 -1
  115. package/dist/{chunk-A5HKAMAC.js → chunk-NJLSZS27.js} +1 -1
  116. package/dist/{chunk-WHNWE7P2.js → chunk-O7OQK2OC.js} +1 -1
  117. package/dist/{chunk-5O43334U.js → chunk-P375IGKT.js} +1 -1
  118. package/dist/chunk-P3RGC53U.js +5 -0
  119. package/dist/{chunk-4FFPTEKD.js → chunk-P4243GCY.js} +1 -1
  120. package/dist/{chunk-FIYAECXH.js → chunk-PFEC2NUB.js} +1 -1
  121. package/dist/{chunk-JJ6RM54S.js → chunk-PH7F4BMG.js} +1 -1
  122. package/dist/chunk-PK6NOLT5.js +2 -0
  123. package/dist/chunk-PLHJQQVZ.js +1 -0
  124. package/dist/{chunk-AO3RFGNV.js → chunk-PVD544NN.js} +1 -1
  125. package/dist/chunk-Q3WOWDUU.js +1 -0
  126. package/dist/chunk-Q7BOSHWX.js +7 -0
  127. package/dist/{chunk-2XZBQZ5R.js → chunk-QAM7VCLV.js} +1 -1
  128. package/dist/{chunk-FOFJBRSL.js → chunk-QCBAFI6Z.js} +1 -1
  129. package/dist/{chunk-SSCYLDSX.js → chunk-QHWF3S7U.js} +1 -1
  130. package/dist/{chunk-EVZA2TCI.js → chunk-QJL3SXYA.js} +1 -1
  131. package/dist/{chunk-UB26DGTR.js → chunk-QRETBFXI.js} +1 -1
  132. package/dist/chunk-RBOYWA2D.js +1 -0
  133. package/dist/{chunk-N3YTDGFY.js → chunk-ROQXPIEZ.js} +1 -1
  134. package/dist/{chunk-ATSMK66C.js → chunk-RUKK4KXX.js} +1 -1
  135. package/dist/{chunk-PNP5OKNZ.js → chunk-RY2ESY3P.js} +1 -1
  136. package/dist/{chunk-HIQHYPLU.js → chunk-RY5CY3ZW.js} +1 -1
  137. package/dist/{chunk-Q73GEVSJ.js → chunk-S442LGHR.js} +1 -1
  138. package/dist/{chunk-OXJBYKMX.js → chunk-S5JJL3BP.js} +1 -1
  139. package/dist/{chunk-UU5P2IYU.js → chunk-SF53RKMO.js} +1 -1
  140. package/dist/{chunk-JAWOP4HJ.js → chunk-SY2AH7C2.js} +1 -1
  141. package/dist/{chunk-J5BRKYGE.js → chunk-TC3JOEMA.js} +1 -1
  142. package/dist/{chunk-M7YFD4EV.js → chunk-TEXYUUTD.js} +5 -5
  143. package/dist/chunk-TGM7L6RV.js +1 -0
  144. package/dist/{chunk-5H3VTG77.js → chunk-TKW3Z7XL.js} +1 -1
  145. package/dist/{chunk-HDC5V7RY.js → chunk-TM534QSE.js} +1 -1
  146. package/dist/{chunk-5FFHQTRC.js → chunk-U44HRKSU.js} +1 -1
  147. package/dist/{chunk-UTO4Z6P6.js → chunk-UEC23KAO.js} +1 -1
  148. package/dist/{chunk-RKDZGK5K.js → chunk-UFGDNIYX.js} +1 -1
  149. package/dist/{chunk-Q7C44DX5.js → chunk-UGGFSV7N.js} +1 -1
  150. package/dist/{chunk-USLYL5AC.js → chunk-UJVYIWUI.js} +1 -1
  151. package/dist/{chunk-OU4SKQTC.js → chunk-UP7H24B3.js} +2 -2
  152. package/dist/{chunk-YPBCSDFQ.js → chunk-UQZ7HZ47.js} +1 -1
  153. package/dist/{chunk-2EHBJWC6.js → chunk-UTLRP527.js} +1 -1
  154. package/dist/chunk-UTPJAU5S.js +1 -0
  155. package/dist/{chunk-DNXYKGV2.js → chunk-V66IHWQO.js} +1 -1
  156. package/dist/{chunk-YL3TYQGT.js → chunk-V774I3FW.js} +1 -1
  157. package/dist/{chunk-6KETAPWL.js → chunk-VKFDDZD3.js} +1 -1
  158. package/dist/{chunk-ZUKLGZOU.js → chunk-VNYKNAT5.js} +1 -1
  159. package/dist/{chunk-AERKD4TO.js → chunk-VUACOGOX.js} +1 -1
  160. package/dist/{chunk-KRQGLK2Q.js → chunk-WFB3FHKV.js} +1 -1
  161. package/dist/chunk-WPITBIL5.js +21 -0
  162. package/dist/{chunk-J3HX6ZGD.js → chunk-WTYH2O47.js} +1 -1
  163. package/dist/chunk-WU6GIY22.js +4 -0
  164. package/dist/{chunk-UC7KMA6W.js → chunk-XA5JA7DK.js} +1 -1
  165. package/dist/{chunk-2TMQG2UT.js → chunk-XSXX75VV.js} +1 -1
  166. package/dist/{chunk-7D45IAMQ.js → chunk-XXUWTD7A.js} +1 -1
  167. package/dist/chunk-XZWAX4FI.js +46 -0
  168. package/dist/{chunk-FQ5ZZX2G.js → chunk-YF4HKJB5.js} +1 -1
  169. package/dist/chunk-YJAX22JK.js +7 -0
  170. package/dist/{chunk-BL46CZ2M.js → chunk-YT3NPMWK.js} +1 -1
  171. package/dist/{chunk-NTRAWIEJ.js → chunk-YYLEWVO6.js} +3 -3
  172. package/dist/chunk-Z2Y6G2QF.js +1 -0
  173. package/dist/{chunk-M2YINBHF.js → chunk-Z66NZ2HC.js} +1 -1
  174. package/dist/{chunk-6LWOWDF4.js → chunk-ZFOWAMFK.js} +1 -1
  175. package/dist/{chunk-25HJX3L2.js → chunk-ZKBWEHIY.js} +1 -1
  176. package/dist/{chunk-2GAFKG64.js → chunk-ZZ3SMI2A.js} +1 -1
  177. package/dist/{chunk-TY6BZTG3.js → chunk-ZZWSMRKT.js} +1 -1
  178. package/dist/cli/commands/app/app-logs/sources.js +1 -1
  179. package/dist/cli/commands/app/build.js +1 -1
  180. package/dist/cli/commands/app/bulk/cancel.js +1 -1
  181. package/dist/cli/commands/app/bulk/execute.js +1 -1
  182. package/dist/cli/commands/app/bulk/status.js +1 -1
  183. package/dist/cli/commands/app/config/link.js +1 -1
  184. package/dist/cli/commands/app/config/pull.js +1 -1
  185. package/dist/cli/commands/app/config/use.js +1 -1
  186. package/dist/cli/commands/app/config/validate.js +1 -1
  187. package/dist/cli/commands/app/demo/watcher.js +1 -1
  188. package/dist/cli/commands/app/deploy.js +1 -1
  189. package/dist/cli/commands/app/dev/clean.js +1 -1
  190. package/dist/cli/commands/app/dev.js +1 -1
  191. package/dist/cli/commands/app/env/pull.js +1 -1
  192. package/dist/cli/commands/app/env/show.js +1 -1
  193. package/dist/cli/commands/app/execute.js +1 -1
  194. package/dist/cli/commands/app/function/build.js +1 -1
  195. package/dist/cli/commands/app/function/info.js +1 -1
  196. package/dist/cli/commands/app/function/replay.js +1 -1
  197. package/dist/cli/commands/app/function/run.js +1 -1
  198. package/dist/cli/commands/app/function/schema.js +1 -1
  199. package/dist/cli/commands/app/function/typegen.js +1 -1
  200. package/dist/cli/commands/app/generate/extension.js +1 -1
  201. package/dist/cli/commands/app/graphiql.js +1 -0
  202. package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
  203. package/dist/cli/commands/app/import-extensions.js +1 -1
  204. package/dist/cli/commands/app/info.js +1 -1
  205. package/dist/cli/commands/app/init.js +1 -1
  206. package/dist/cli/commands/app/logs.js +1 -1
  207. package/dist/cli/commands/app/release.js +1 -1
  208. package/dist/cli/commands/app/versions/list.js +1 -1
  209. package/dist/cli/commands/app/webhook/trigger.js +1 -1
  210. package/dist/cli/commands/auth/login.js +1 -1
  211. package/dist/cli/commands/auth/logout.js +1 -1
  212. package/dist/cli/commands/cache/clear.js +1 -1
  213. package/dist/cli/commands/config/autoupgrade/off.js +1 -1
  214. package/dist/cli/commands/config/autoupgrade/on.js +1 -1
  215. package/dist/cli/commands/config/autoupgrade/status.js +1 -1
  216. package/dist/cli/commands/debug/command-flags.js +1 -1
  217. package/dist/cli/commands/doc/fetch.js +1 -1
  218. package/dist/cli/commands/doc/search.js +1 -1
  219. package/dist/cli/commands/docs/generate.js +1 -1
  220. package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
  221. package/dist/cli/commands/doctor-release/theme/index.js +1 -1
  222. package/dist/cli/commands/help.js +1 -1
  223. package/dist/cli/commands/kitchen-sink/async.js +1 -1
  224. package/dist/cli/commands/kitchen-sink/index.js +1 -1
  225. package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
  226. package/dist/cli/commands/kitchen-sink/static.js +1 -1
  227. package/dist/cli/commands/notifications/generate.js +1 -1
  228. package/dist/cli/commands/notifications/list.js +1 -1
  229. package/dist/cli/commands/organization/list.js +1 -1
  230. package/dist/cli/commands/search.js +1 -1
  231. package/dist/cli/commands/theme/check.js +1 -1
  232. package/dist/cli/commands/theme/console.js +1 -1
  233. package/dist/cli/commands/theme/delete.js +1 -1
  234. package/dist/cli/commands/theme/dev.js +1 -1
  235. package/dist/cli/commands/theme/duplicate.js +1 -1
  236. package/dist/cli/commands/theme/info.js +1 -1
  237. package/dist/cli/commands/theme/init.js +1 -1
  238. package/dist/cli/commands/theme/language-server.js +1 -1
  239. package/dist/cli/commands/theme/list.js +1 -1
  240. package/dist/cli/commands/theme/metafields/pull.js +1 -1
  241. package/dist/cli/commands/theme/open.js +1 -1
  242. package/dist/cli/commands/theme/package.js +1 -1
  243. package/dist/cli/commands/theme/preview.js +1 -1
  244. package/dist/cli/commands/theme/profile.js +1 -1
  245. package/dist/cli/commands/theme/publish.js +1 -1
  246. package/dist/cli/commands/theme/pull.js +1 -1
  247. package/dist/cli/commands/theme/push.js +1 -1
  248. package/dist/cli/commands/theme/rename.js +1 -1
  249. package/dist/cli/commands/theme/share.js +1 -1
  250. package/dist/cli/commands/upgrade.js +1 -1
  251. package/dist/cli/commands/version.js +1 -1
  252. package/dist/cli/help.d.ts +38 -0
  253. package/dist/cli/help.js +2 -0
  254. package/dist/command-registry.js +1 -1
  255. package/dist/{conf-store-UY3MDGGA.js → conf-store-V6ILVUUO.js} +1 -1
  256. package/dist/{deprecations-KNUMDRIU.js → deprecations-MOEFN6OW.js} +1 -1
  257. package/dist/dist-2BL5GGMG.js +1 -0
  258. package/dist/dist-E6QKEULH.js +1 -0
  259. package/dist/environments-5KA3OBIZ.js +1 -0
  260. package/dist/error-NYYI6HVX.js +1 -0
  261. package/dist/error-handler-BOESDKZA.js +1 -0
  262. package/dist/{fs-LJWVNO4H.js → fs-XE6SBVBF.js} +1 -1
  263. package/dist/hooks/app-init.js +1 -1
  264. package/dist/hooks/did-you-mean.js +1 -1
  265. package/dist/hooks/hydrogen-init.js +1 -1
  266. package/dist/hooks/plugin-plugins.js +1 -1
  267. package/dist/hooks/postrun.js +1 -1
  268. package/dist/hooks/prerun.js +1 -1
  269. package/dist/hooks/public-metadata.js +1 -1
  270. package/dist/hooks/sensitive-metadata.js +1 -1
  271. package/dist/hooks/tunnel-provider.js +1 -1
  272. package/dist/hooks/tunnel-start.js +1 -1
  273. package/dist/index.js +23 -10
  274. package/dist/{is-global-W6ALVC5L.js → is-global-JOHCPSKZ.js} +1 -1
  275. package/dist/lib-NOROGV6N.js +1 -0
  276. package/dist/lib-UCG2DNMS.js +1 -0
  277. package/dist/{local-GKEWZAIV.js → local-BTQDUX72.js} +1 -1
  278. package/dist/local-storage-WUSIVDTQ.js +1 -0
  279. package/dist/{metadata-UEUN64TK.js → metadata-APVOKTBV.js} +1 -1
  280. package/dist/{morph-CGOZEPPZ.js → morph-CG6HEMCQ.js} +4 -4
  281. package/dist/{node-package-manager-4ASQQIIF.js → node-package-manager-AC34ZJZD.js} +1 -1
  282. package/dist/notifications-system-4ODOESG2.js +1 -0
  283. package/dist/{output-S6E37GJQ.js → output-EAPQ7OWD.js} +1 -1
  284. package/dist/{prettier-EGVCP5CY.js → prettier-6ZMB2MMO.js} +1 -1
  285. package/dist/system-D7CH26HU.js +1 -0
  286. package/dist/tsconfig.tsbuildinfo +1 -1
  287. package/dist/ui-AXZBGWIQ.js +1 -0
  288. package/dist/upgrade-SLPJF6LD.js +1 -0
  289. package/dist/version-3IYH4V5U.js +1 -0
  290. package/dist/version-FAU37PQN.js +1 -0
  291. package/dist/{workerd-QOTT6UCO.js → workerd-XXPWKQOM.js} +1 -1
  292. package/oclif.manifest.json +712 -124
  293. package/package.json +15 -8
  294. package/dist/analytics-JH64XI2J.js +0 -1
  295. package/dist/analytics-MEGKKFGF.js +0 -1
  296. package/dist/assets/hydrogen/starter/app/routes/api.$version.[graphql.json].tsx +0 -14
  297. package/dist/chunk-762JWOWJ.js +0 -5
  298. package/dist/chunk-7LV55VWE.js +0 -1
  299. package/dist/chunk-A27NZMWB.js +0 -1
  300. package/dist/chunk-AVD3INWF.js +0 -1
  301. package/dist/chunk-AWEB5AQM.js +0 -1
  302. package/dist/chunk-AXNAGI32.js +0 -1
  303. package/dist/chunk-BQWK3C47.js +0 -278
  304. package/dist/chunk-CFOXXOO2.js +0 -1
  305. package/dist/chunk-DTIWUT2T.js +0 -18
  306. package/dist/chunk-DZQYG32N.js +0 -2
  307. package/dist/chunk-EH7ZTFS4.js +0 -613
  308. package/dist/chunk-EKVTNWHM.js +0 -1
  309. package/dist/chunk-G4OQABDT.js +0 -836
  310. package/dist/chunk-I22ZTRKK.js +0 -3
  311. package/dist/chunk-I4R7TML2.js +0 -7
  312. package/dist/chunk-J3H4LPN6.js +0 -18
  313. package/dist/chunk-JLE4NBMT.js +0 -1
  314. package/dist/chunk-LXVORHCQ.js +0 -1
  315. package/dist/chunk-MINZGZ4N.js +0 -1
  316. package/dist/chunk-S7F5KFQP.js +0 -1
  317. package/dist/chunk-T4IV643Z.js +0 -9
  318. package/dist/chunk-TPCG6DCA.js +0 -1
  319. package/dist/chunk-TUNUEOHO.js +0 -3
  320. package/dist/chunk-VPPWSKOY.js +0 -1
  321. package/dist/chunk-XVUHUA36.js +0 -1
  322. package/dist/chunk-YMAWEIUR.js +0 -1
  323. package/dist/dist-C5IV2YDQ.js +0 -1
  324. package/dist/dist-VL4KZWV2.js +0 -1
  325. package/dist/environments-YPRVO2CF.js +0 -1
  326. package/dist/error-XRBQTNFM.js +0 -1
  327. package/dist/error-handler-NI7D6GSY.js +0 -1
  328. package/dist/lib-AIKYSHWL.js +0 -1
  329. package/dist/lib-Q4PWEMFD.js +0 -1
  330. package/dist/local-storage-ZOZMA22B.js +0 -1
  331. package/dist/notifications-system-HLXJCAMG.js +0 -1
  332. package/dist/system-YQZNGSWB.js +0 -1
  333. package/dist/ui-D2FFWRK7.js +0 -1
  334. package/dist/upgrade-TVTCFMXM.js +0 -1
  335. package/dist/version-J6MDN7BZ.js +0 -1
  336. package/dist/version-RIRW5EXQ.js +0 -1
  337. /package/dist/{chunk-YLQ3LNNY.js → chunk-VDN6MEYI.js} +0 -0
@@ -0,0 +1 @@
1
+ import{ta as a,ua as b,va as c,wa as d,xa as e,ya as f}from"./chunk-3EQY5B4S.js";import"./chunk-ZDF5N422.js";import"./chunk-MPW2YJWU.js";import"./chunk-HX3TALXV.js";import"./chunk-TM534QSE.js";import"./chunk-Q3WOWDUU.js";import"./chunk-WTYH2O47.js";import"./chunk-T7KHS6RF.js";import"./chunk-BU7R7NFL.js";import"./chunk-5C7HDTHJ.js";import"./chunk-YYLEWVO6.js";import"./chunk-EJDWYASP.js";import"./chunk-RJ5VF3QY.js";import"./chunk-7UNQOKZW.js";import"./chunk-GB3YC4TI.js";import"./chunk-7HZG7FBK.js";import"./chunk-N5U5Q2MG.js";import"./chunk-AUZCENYI.js";import"./chunk-BXDZX3BS.js";import"./chunk-A4SBXDZB.js";import"./chunk-NJOO5XJV.js";import"./chunk-ZG7BVVT2.js";import"./chunk-2O22LZKV.js";import"./chunk-MGPLKG23.js";import"./chunk-NNOSZ447.js";import"./chunk-773TIA5M.js";import"./chunk-636CTEW7.js";import"./chunk-T6CC5WUU.js";import"./chunk-UQWFDL3F.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-ET2CGROE.js";import"./chunk-TOLPNBZK.js";import"./chunk-CRALWNNO.js";import"./chunk-VKWPEFWQ.js";export{f as compileData,c as recordError,e as recordEvent,d as recordRetry,b as recordTiming,a as reportAnalyticsEvent};
@@ -0,0 +1 @@
1
+ import{qa as a,ra as b,sa as c}from"./chunk-3EQY5B4S.js";import"./chunk-ZDF5N422.js";import"./chunk-MPW2YJWU.js";import"./chunk-HX3TALXV.js";import"./chunk-TM534QSE.js";import"./chunk-Q3WOWDUU.js";import"./chunk-WTYH2O47.js";import"./chunk-T7KHS6RF.js";import"./chunk-BU7R7NFL.js";import"./chunk-5C7HDTHJ.js";import"./chunk-YYLEWVO6.js";import"./chunk-EJDWYASP.js";import"./chunk-RJ5VF3QY.js";import"./chunk-7UNQOKZW.js";import"./chunk-GB3YC4TI.js";import"./chunk-7HZG7FBK.js";import"./chunk-N5U5Q2MG.js";import"./chunk-AUZCENYI.js";import"./chunk-BXDZX3BS.js";import"./chunk-A4SBXDZB.js";import"./chunk-NJOO5XJV.js";import"./chunk-ZG7BVVT2.js";import"./chunk-2O22LZKV.js";import"./chunk-MGPLKG23.js";import"./chunk-NNOSZ447.js";import"./chunk-773TIA5M.js";import"./chunk-636CTEW7.js";import"./chunk-T6CC5WUU.js";import"./chunk-UQWFDL3F.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-ET2CGROE.js";import"./chunk-TOLPNBZK.js";import"./chunk-CRALWNNO.js";import"./chunk-VKWPEFWQ.js";export{b as getEnvironmentData,c as getSensitiveEnvironmentData,a as startAnalytics};
@@ -1,4 +1,4 @@
1
- import type {LoaderFunctionArgs} from '@shopify/remix-oxygen';
1
+ import type {LoaderFunctionArgs} from 'react-router';
2
2
 
3
3
  export async function loader({params, context}: LoaderFunctionArgs) {
4
4
  const {language, country} = context.storefront.i18n;
@@ -7,8 +7,8 @@ export async function loader({params, context}: LoaderFunctionArgs) {
7
7
  params.locale &&
8
8
  params.locale.toLowerCase() !== `${language}-${country}`.toLowerCase()
9
9
  ) {
10
- // If the locale URL param is defined, yet we still are still at the default locale
11
- // then the the locale param must be invalid, send to the 404 page
10
+ // If the locale URL param is defined, yet we are still at the default locale
11
+ // then the locale param must be invalid, send to the 404 page
12
12
  throw new Response(null, {status: 404});
13
13
  }
14
14
 
@@ -1,5 +1,111 @@
1
1
  # skeleton
2
2
 
3
+ ## 2026.4.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`23431c956193420bce3442e9e5cc711dc95cc497`](https://github.com/Shopify/hydrogen/commit/23431c956193420bce3442e9e5cc711dc95cc497)]:
8
+ - @shopify/hydrogen@2026.4.4
9
+
10
+ ## 2026.4.3
11
+
12
+ ### Patch Changes
13
+
14
+ - Include line item children recursively in cart. ([#3753](https://github.com/Shopify/hydrogen/pull/3753)) by [@martin-pettersson](https://github.com/martin-pettersson)
15
+
16
+ - Add generic cart result typing to `createCartHandler` so custom cart fragments can use their generated fragment types. ([#3767](https://github.com/Shopify/hydrogen/pull/3767)) by [@andguy95](https://github.com/andguy95)
17
+
18
+ - Widen React Router peer dependency ranges so Hydrogen packages accept compatible React Router 7.16 patch versions without npm peer dependency conflicts. New Hydrogen projects now default to React Router 7.16.0. ([#3771](https://github.com/Shopify/hydrogen/pull/3771)) by [@fredericoo](https://github.com/fredericoo)
19
+
20
+ - Updated dependencies [[`3ccc22e0a3407298e835104e29adfb036f261474`](https://github.com/Shopify/hydrogen/commit/3ccc22e0a3407298e835104e29adfb036f261474), [`a810db483c108ac8bbeaac45595b130ed95a2ec7`](https://github.com/Shopify/hydrogen/commit/a810db483c108ac8bbeaac45595b130ed95a2ec7), [`d17057eb4630710743e81b83573973100ec56d23`](https://github.com/Shopify/hydrogen/commit/d17057eb4630710743e81b83573973100ec56d23), [`995190036d99e02ba6fb559b8e3c406c90043599`](https://github.com/Shopify/hydrogen/commit/995190036d99e02ba6fb559b8e3c406c90043599), [`39f2b326e9fddda36b1d12149794bf4ffcc0d4b8`](https://github.com/Shopify/hydrogen/commit/39f2b326e9fddda36b1d12149794bf4ffcc0d4b8)]:
21
+ - @shopify/hydrogen@2026.4.3
22
+
23
+ ## 2026.4.2
24
+
25
+ ### Patch Changes
26
+
27
+ - Add support for Vite 7 and Vite 8. Hydrogen remains backwards-compatible with Vite 5+. ([#3617](https://github.com/Shopify/hydrogen/pull/3617)) by [@frandiox](https://github.com/frandiox)
28
+
29
+ Mini Oxygen's dev server has been refactored to use the [Vite Environment API](https://vite.dev/guide/api-environment), which is the standard way to run non-browser runtimes in Vite. This replaces the previous custom middleware approach with a first-class `FetchableDevEnvironment`, improving compatibility with Vite's built-in HMR and module invalidation.
30
+
31
+ New Hydrogen projects created with `npm create @shopify/hydrogen` will default to Vite 8. The `vite-tsconfig-paths` plugin is no longer needed in the skeleton template since Vite 8 supports `resolve.tsconfigPaths` natively.
32
+
33
+ - Updated dependencies [[`dc49699c799997d5893bc06e444f888e86a3bc29`](https://github.com/Shopify/hydrogen/commit/dc49699c799997d5893bc06e444f888e86a3bc29), [`50df825c57159757529f5f9f62c258d4de2a4b97`](https://github.com/Shopify/hydrogen/commit/50df825c57159757529f5f9f62c258d4de2a4b97), [`51f1e77fe63be5e5ded4ef0c91942bc304f1abc4`](https://github.com/Shopify/hydrogen/commit/51f1e77fe63be5e5ded4ef0c91942bc304f1abc4)]:
34
+ - @shopify/hydrogen@2026.4.2
35
+
36
+ ## 2026.4.1
37
+
38
+ ### Patch Changes
39
+
40
+ - Fix `set-cookie-parser` and `cookie` resolution warnings during `dev` by using Vite's nested dependency syntax (`react-router > dep`). These are CJS transitive dependencies of `react-router` that weren't resolvable by bare name with strict package managers like pnpm. ([#3698](https://github.com/Shopify/hydrogen/pull/3698)) by [@fredericoo](https://github.com/fredericoo)
41
+
42
+ - Updated dependencies [[`f84ab400c62d89827574d0fa65ba310a2e75f36f`](https://github.com/Shopify/hydrogen/commit/f84ab400c62d89827574d0fa65ba310a2e75f36f)]:
43
+ - @shopify/hydrogen@2026.4.1
44
+
45
+ ## 2026.4.0
46
+
47
+ ### Major Changes
48
+
49
+ - Update Storefront API and Customer Account API from 2026-01 to 2026-04. ([#3651](https://github.com/Shopify/hydrogen/pull/3651)) by [@itsjustriley](https://github.com/itsjustriley)
50
+
51
+ ## Breaking changes
52
+
53
+ **JSON metafield values limited to 128KB**: When using API version 2026-04 or later, the Storefront API limits JSON type metafield writes to 128KB. This limit applies at the API level - Hydrogen passes through to the Storefront API without additional restriction. Apps that used JSON metafields before April 1, 2026 are grandfathered at the existing 2MB limit. Large metafield values continue to be readable by all API versions.
54
+
55
+ ## New features
56
+
57
+ **New `MERCHANDISE_LINE_TRANSFORMERS_RUN_ERROR` cart error code**: Cart operations (`cartCreate`, `cartLinesAdd`, etc.) now return a specific `MERCHANDISE_LINE_TRANSFORMERS_RUN_ERROR` error code when a Cart Transform Function fails at runtime, instead of the previous generic `INVALID` error code. If you handle cart errors in your storefront code, you may want to add handling for this new code.
58
+
59
+ ## Changelog links
60
+ - [Storefront API 2026-04 changelog](https://shopify.dev/changelog?filter=api&api_version=2026-04&api_type=storefront-graphql)
61
+ - [Customer Account API 2026-04 changelog](https://shopify.dev/changelog?filter=api&api_version=2026-04&api_type=customer-account-graphql)
62
+
63
+ ### Patch Changes
64
+
65
+ - Updated dependencies [[`e7215ed0d7a74cacfa8c935f414c1cf32fc2ccd0`](https://github.com/Shopify/hydrogen/commit/e7215ed0d7a74cacfa8c935f414c1cf32fc2ccd0), [`92ab8e8b59807bbdb5dbecaa18629292d5566135`](https://github.com/Shopify/hydrogen/commit/92ab8e8b59807bbdb5dbecaa18629292d5566135), [`b0caa5c013380c7837f049f48da089a1671e2c6d`](https://github.com/Shopify/hydrogen/commit/b0caa5c013380c7837f049f48da089a1671e2c6d)]:
66
+ - @shopify/hydrogen@2026.4.0
67
+
68
+ ## 2026.1.4
69
+
70
+ ### Patch Changes
71
+
72
+ - Remove redundant Storefront API proxy route from skeleton template. The server now automatically proxies requests to `/api/:version/graphql.json` via `createRequestHandler` with `proxyStandardRoutes: true` (enabled by default since December 2025). ([#3572](https://github.com/Shopify/hydrogen/pull/3572)) by [@itsjustriley](https://github.com/itsjustriley)
73
+
74
+ Developers no longer need a manual route file for the tokenless Storefront API. Existing apps with this route can safely delete it - the server-level proxy provides the same functionality with better cookie forwarding and analytics integration.
75
+
76
+ - Updated dependencies [[`b0a75c1d759706931876f056662de2497cb3e688`](https://github.com/Shopify/hydrogen/commit/b0a75c1d759706931876f056662de2497cb3e688), [`a44ee3566b9bb9a7f43f05dfaae6f1f2ab1d548f`](https://github.com/Shopify/hydrogen/commit/a44ee3566b9bb9a7f43f05dfaae6f1f2ab1d548f)]:
77
+ - @shopify/hydrogen@2026.1.4
78
+
79
+ ## 2026.1.3
80
+
81
+ ### Patch Changes
82
+
83
+ - Improve screen reader experience for paginated product grids by hiding decorative arrow characters from assistive technology. ([#3557](https://github.com/Shopify/hydrogen/pull/3557)) by [@itsjustriley](https://github.com/itsjustriley)
84
+
85
+ - Fix broken `aria-label` on territory code input in address form. The label was the raw developer string `"territoryCode"` instead of a human-readable `"Country code"`. ([#3607](https://github.com/Shopify/hydrogen/pull/3607)) by [@itsjustriley](https://github.com/itsjustriley)
86
+
87
+ - Add aria-label to ProductPrice for improved screen reader accessibility ([#3558](https://github.com/Shopify/hydrogen/pull/3558)) by [@itsjustriley](https://github.com/itsjustriley)
88
+
89
+ - Updated dependencies [[`108243003a7f36349a446478f4e8ab0cade3e13a`](https://github.com/Shopify/hydrogen/commit/108243003a7f36349a446478f4e8ab0cade3e13a)]:
90
+ - @shopify/hydrogen@2026.1.3
91
+
92
+ ## 2026.1.2
93
+
94
+ ### Patch Changes
95
+
96
+ - Improve gift card accessibility in Skeleton template ([#3518](https://github.com/Shopify/hydrogen/pull/3518)) by [@itsjustriley](https://github.com/itsjustriley)
97
+
98
+ - Updated shopify/cli dependencies for cli-hydrogen ([#3553](https://github.com/Shopify/hydrogen/pull/3553)) by [@andguy95](https://github.com/andguy95)
99
+
100
+ - Updated loaders that used `customerAccount.handleAuthStatus()` to now await it. ([#3523](https://github.com/Shopify/hydrogen/pull/3523)) by [@fredericoo](https://github.com/fredericoo)
101
+
102
+ ### Migration
103
+
104
+ If you call `handleAuthStatus()` in your own loaders, update those callsites to use `await`.
105
+
106
+ - Updated dependencies [[`16b0e7baca0dfd1fb330d12dac924c7593d169a8`](https://github.com/Shopify/hydrogen/commit/16b0e7baca0dfd1fb330d12dac924c7593d169a8), [`1c19b87782818dbdb4252754d2d44eb9a44fe50f`](https://github.com/Shopify/hydrogen/commit/1c19b87782818dbdb4252754d2d44eb9a44fe50f), [`029fa2d0e2297f67b37c650ba8e875ee5dee81b3`](https://github.com/Shopify/hydrogen/commit/029fa2d0e2297f67b37c650ba8e875ee5dee81b3)]:
107
+ - @shopify/hydrogen@2026.1.2
108
+
3
109
  ## 2026.1.1
4
110
 
5
111
  ### Patch Changes
@@ -5,6 +5,7 @@ import {
5
5
  useEffect,
6
6
  useState,
7
7
  } from 'react';
8
+ import {useId} from 'react';
8
9
 
9
10
  type AsideType = 'search' | 'cart' | 'mobile' | 'closed';
10
11
  type AsideContextValue = {
@@ -34,7 +35,7 @@ export function Aside({
34
35
  }) {
35
36
  const {type: activeType, close} = useAside();
36
37
  const expanded = type === activeType;
37
-
38
+ const id = useId();
38
39
  useEffect(() => {
39
40
  const abortController = new AbortController();
40
41
 
@@ -57,11 +58,12 @@ export function Aside({
57
58
  aria-modal
58
59
  className={`overlay ${expanded ? 'expanded' : ''}`}
59
60
  role="dialog"
61
+ aria-labelledby={id}
60
62
  >
61
63
  <button className="close-outside" onClick={close} />
62
64
  <aside>
63
65
  <header>
64
- <h3>{heading}</h3>
66
+ <h3 id={id}>{heading}</h3>
65
67
  <button className="close reset" onClick={close} aria-label="Close">
66
68
  &times;
67
69
  </button>
@@ -1,4 +1,4 @@
1
- import {useOptimisticCart, type OptimisticCartLine} from '@shopify/hydrogen';
1
+ import {useOptimisticCart} from '@shopify/hydrogen';
2
2
  import {Link} from 'react-router';
3
3
  import type {CartApiQueryFragment} from 'storefrontapi.generated';
4
4
  import {useAside} from '~/components/Aside';
@@ -23,8 +23,8 @@ function getLineItemChildrenMap(lines: CartLine[]): LineItemChildrenMap {
23
23
  children[parentId].push(line);
24
24
  }
25
25
  if ('lineComponents' in line) {
26
- const children = getLineItemChildrenMap(line.lineComponents);
27
- for (const [parentId, childIds] of Object.entries(children)) {
26
+ const lineChildren = getLineItemChildrenMap(line.lineComponents);
27
+ for (const [parentId, childIds] of Object.entries(lineChildren)) {
28
28
  if (!children[parentId]) children[parentId] = [];
29
29
  children[parentId].push(...childIds);
30
30
  }
@@ -50,7 +50,10 @@ export function CartMain({layout, cart: originalCart}: CartMainProps) {
50
50
  const childrenMap = getLineItemChildrenMap(cart?.lines?.nodes ?? []);
51
51
 
52
52
  return (
53
- <div className={className}>
53
+ <section
54
+ className={className}
55
+ aria-label={layout === 'page' ? 'Cart page' : 'Cart drawer'}
56
+ >
54
57
  <CartEmpty hidden={linesCount} layout={layout} />
55
58
  <div className="cart-details">
56
59
  <p id="cart-lines" className="sr-only">
@@ -79,7 +82,7 @@ export function CartMain({layout, cart: originalCart}: CartMainProps) {
79
82
  </div>
80
83
  {cartHasItems && <CartSummary cart={cart} layout={layout} />}
81
84
  </div>
82
- </div>
85
+ </section>
83
86
  );
84
87
  }
85
88
 
@@ -1,7 +1,7 @@
1
1
  import type {CartApiQueryFragment} from 'storefrontapi.generated';
2
2
  import type {CartLayout} from '~/components/CartMain';
3
3
  import {CartForm, Money, type OptimisticCart} from '@shopify/hydrogen';
4
- import {useEffect, useRef} from 'react';
4
+ import {useEffect, useId, useRef, useState} from 'react';
5
5
  import {useFetcher} from 'react-router';
6
6
 
7
7
  type CartSummaryProps = {
@@ -12,11 +12,16 @@ type CartSummaryProps = {
12
12
  export function CartSummary({cart, layout}: CartSummaryProps) {
13
13
  const className =
14
14
  layout === 'page' ? 'cart-summary-page' : 'cart-summary-aside';
15
+ const summaryId = useId();
16
+ const discountsHeadingId = useId();
17
+ const discountCodeInputId = useId();
18
+ const giftCardHeadingId = useId();
19
+ const giftCardInputId = useId();
15
20
 
16
21
  return (
17
- <div aria-labelledby="cart-summary" className={className}>
18
- <h4>Totals</h4>
19
- <dl className="cart-subtotal">
22
+ <div aria-labelledby={summaryId} className={className}>
23
+ <h4 id={summaryId}>Totals</h4>
24
+ <dl role="group" className="cart-subtotal">
20
25
  <dt>Subtotal</dt>
21
26
  <dd>
22
27
  {cart?.cost?.subtotalAmount?.amount ? (
@@ -26,8 +31,16 @@ export function CartSummary({cart, layout}: CartSummaryProps) {
26
31
  )}
27
32
  </dd>
28
33
  </dl>
29
- <CartDiscounts discountCodes={cart?.discountCodes} />
30
- <CartGiftCard giftCardCodes={cart?.appliedGiftCards} />
34
+ <CartDiscounts
35
+ discountCodes={cart?.discountCodes}
36
+ discountsHeadingId={discountsHeadingId}
37
+ discountCodeInputId={discountCodeInputId}
38
+ />
39
+ <CartGiftCard
40
+ giftCardCodes={cart?.appliedGiftCards}
41
+ giftCardHeadingId={giftCardHeadingId}
42
+ giftCardInputId={giftCardInputId}
43
+ />
31
44
  <CartCheckoutActions checkoutUrl={cart?.checkoutUrl} />
32
45
  </div>
33
46
  );
@@ -48,8 +61,12 @@ function CartCheckoutActions({checkoutUrl}: {checkoutUrl?: string}) {
48
61
 
49
62
  function CartDiscounts({
50
63
  discountCodes,
64
+ discountsHeadingId,
65
+ discountCodeInputId,
51
66
  }: {
52
67
  discountCodes?: CartApiQueryFragment['discountCodes'];
68
+ discountsHeadingId: string;
69
+ discountCodeInputId: string;
53
70
  }) {
54
71
  const codes: string[] =
55
72
  discountCodes
@@ -57,13 +74,17 @@ function CartDiscounts({
57
74
  ?.map(({code}) => code) || [];
58
75
 
59
76
  return (
60
- <div>
77
+ <section aria-label="Discounts">
61
78
  {/* Have existing discount, display it with a remove option */}
62
79
  <dl hidden={!codes.length}>
63
80
  <div>
64
- <dt>Discount(s)</dt>
81
+ <dt id={discountsHeadingId}>Discounts</dt>
65
82
  <UpdateDiscountForm>
66
- <div className="cart-discount">
83
+ <div
84
+ className="cart-discount"
85
+ role="group"
86
+ aria-labelledby={discountsHeadingId}
87
+ >
67
88
  <code>{codes?.join(', ')}</code>
68
89
  &nbsp;
69
90
  <button type="submit" aria-label="Remove discount">
@@ -77,11 +98,11 @@ function CartDiscounts({
77
98
  {/* Show an input to apply a discount */}
78
99
  <UpdateDiscountForm discountCodes={codes}>
79
100
  <div>
80
- <label htmlFor="discount-code-input" className="sr-only">
101
+ <label htmlFor={discountCodeInputId} className="sr-only">
81
102
  Discount code
82
103
  </label>
83
104
  <input
84
- id="discount-code-input"
105
+ id={discountCodeInputId}
85
106
  type="text"
86
107
  name="discountCode"
87
108
  placeholder="Discount code"
@@ -92,7 +113,7 @@ function CartDiscounts({
92
113
  </button>
93
114
  </div>
94
115
  </UpdateDiscountForm>
95
- </div>
116
+ </section>
96
117
  );
97
118
  }
98
119
 
@@ -118,52 +139,110 @@ function UpdateDiscountForm({
118
139
 
119
140
  function CartGiftCard({
120
141
  giftCardCodes,
142
+ giftCardHeadingId,
143
+ giftCardInputId,
121
144
  }: {
122
145
  giftCardCodes: CartApiQueryFragment['appliedGiftCards'] | undefined;
146
+ giftCardHeadingId: string;
147
+ giftCardInputId: string;
123
148
  }) {
124
149
  const giftCardCodeInput = useRef<HTMLInputElement>(null);
150
+ const removeButtonRefs = useRef<Map<string, HTMLButtonElement>>(new Map());
151
+ const previousCardIdsRef = useRef<string[]>([]);
125
152
  const giftCardAddFetcher = useFetcher({key: 'gift-card-add'});
153
+ const [removedCardIndex, setRemovedCardIndex] = useState<number | null>(null);
126
154
 
127
155
  useEffect(() => {
128
156
  if (giftCardAddFetcher.data) {
129
- giftCardCodeInput.current!.value = '';
157
+ if (giftCardCodeInput.current !== null) {
158
+ giftCardCodeInput.current.value = '';
159
+ }
130
160
  }
131
161
  }, [giftCardAddFetcher.data]);
132
162
 
163
+ useEffect(() => {
164
+ const currentCardIds = giftCardCodes?.map((card) => card.id) || [];
165
+
166
+ if (removedCardIndex !== null && giftCardCodes) {
167
+ const focusTargetIndex = Math.min(
168
+ removedCardIndex,
169
+ giftCardCodes.length - 1,
170
+ );
171
+ const focusTargetCard = giftCardCodes[focusTargetIndex];
172
+ const focusButton = focusTargetCard
173
+ ? removeButtonRefs.current.get(focusTargetCard.id)
174
+ : null;
175
+
176
+ if (focusButton) {
177
+ focusButton.focus();
178
+ } else if (giftCardCodeInput.current) {
179
+ giftCardCodeInput.current.focus();
180
+ }
181
+
182
+ setRemovedCardIndex(null);
183
+ }
184
+
185
+ previousCardIdsRef.current = currentCardIds;
186
+ }, [giftCardCodes, removedCardIndex]);
187
+
188
+ const handleRemoveClick = (cardId: string) => {
189
+ const index = previousCardIdsRef.current.indexOf(cardId);
190
+ if (index !== -1) {
191
+ setRemovedCardIndex(index);
192
+ }
193
+ };
194
+
133
195
  return (
134
- <div>
196
+ <section aria-label="Gift cards">
135
197
  {giftCardCodes && giftCardCodes.length > 0 && (
136
198
  <dl>
137
- <dt>Applied Gift Card(s)</dt>
199
+ <dt id={giftCardHeadingId}>Applied Gift Card(s)</dt>
138
200
  {giftCardCodes.map((giftCard) => (
139
- <RemoveGiftCardForm key={giftCard.id} giftCardId={giftCard.id}>
140
- <div className="cart-discount">
201
+ <dd key={giftCard.id} className="cart-discount">
202
+ <RemoveGiftCardForm
203
+ giftCardId={giftCard.id}
204
+ lastCharacters={giftCard.lastCharacters}
205
+ onRemoveClick={() => handleRemoveClick(giftCard.id)}
206
+ buttonRef={(el: HTMLButtonElement | null) => {
207
+ if (el) {
208
+ removeButtonRefs.current.set(giftCard.id, el);
209
+ } else {
210
+ removeButtonRefs.current.delete(giftCard.id);
211
+ }
212
+ }}
213
+ >
141
214
  <code>***{giftCard.lastCharacters}</code>
142
215
  &nbsp;
143
216
  <Money data={giftCard.amountUsed} />
144
- &nbsp;
145
- <button type="submit">Remove</button>
146
- </div>
147
- </RemoveGiftCardForm>
217
+ </RemoveGiftCardForm>
218
+ </dd>
148
219
  ))}
149
220
  </dl>
150
221
  )}
151
222
 
152
223
  <AddGiftCardForm fetcherKey="gift-card-add">
153
224
  <div>
225
+ <label htmlFor={giftCardInputId} className="sr-only">
226
+ Gift card code
227
+ </label>
154
228
  <input
229
+ id={giftCardInputId}
155
230
  type="text"
156
231
  name="giftCardCode"
157
232
  placeholder="Gift card code"
158
233
  ref={giftCardCodeInput}
159
234
  />
160
235
  &nbsp;
161
- <button type="submit" disabled={giftCardAddFetcher.state !== 'idle'}>
236
+ <button
237
+ type="submit"
238
+ disabled={giftCardAddFetcher.state !== 'idle'}
239
+ aria-label="Apply gift card code"
240
+ >
162
241
  Apply
163
242
  </button>
164
243
  </div>
165
244
  </AddGiftCardForm>
166
- </div>
245
+ </section>
167
246
  );
168
247
  }
169
248
 
@@ -187,10 +266,16 @@ function AddGiftCardForm({
187
266
 
188
267
  function RemoveGiftCardForm({
189
268
  giftCardId,
269
+ lastCharacters,
190
270
  children,
271
+ onRemoveClick,
272
+ buttonRef,
191
273
  }: {
192
274
  giftCardId: string;
275
+ lastCharacters: string;
193
276
  children: React.ReactNode;
277
+ onRemoveClick?: () => void;
278
+ buttonRef?: (el: HTMLButtonElement | null) => void;
194
279
  }) {
195
280
  return (
196
281
  <CartForm
@@ -201,6 +286,15 @@ function RemoveGiftCardForm({
201
286
  }}
202
287
  >
203
288
  {children}
289
+ &nbsp;
290
+ <button
291
+ type="submit"
292
+ aria-label={`Remove gift card ending in ${lastCharacters}`}
293
+ onClick={onRemoveClick}
294
+ ref={buttonRef}
295
+ >
296
+ Remove
297
+ </button>
204
298
  </CartForm>
205
299
  );
206
300
  }
@@ -136,7 +136,7 @@ function SearchToggle() {
136
136
  );
137
137
  }
138
138
 
139
- function CartBadge({count}: {count: number | null}) {
139
+ function CartBadge({count}: {count: number}) {
140
140
  const {open} = useAside();
141
141
  const {publish, shop, cart, prevCart} = useAnalytics();
142
142
 
@@ -154,14 +154,14 @@ function CartBadge({count}: {count: number | null}) {
154
154
  } as CartViewPayload);
155
155
  }}
156
156
  >
157
- Cart {count === null ? <span>&nbsp;</span> : count}
157
+ Cart <span aria-label={`(items: ${count})`}>{count}</span>
158
158
  </a>
159
159
  );
160
160
  }
161
161
 
162
162
  function CartToggle({cart}: Pick<HeaderProps, 'cart'>) {
163
163
  return (
164
- <Suspense fallback={<CartBadge count={null} />}>
164
+ <Suspense fallback={<CartBadge count={0} />}>
165
165
  <Await resolve={cart}>
166
166
  <CartBanner />
167
167
  </Await>
@@ -2,15 +2,17 @@ import * as React from 'react';
2
2
  import {Pagination} from '@shopify/hydrogen';
3
3
 
4
4
  /**
5
- * <PaginatedResourceSection > is a component that encapsulate how the previous and next behaviors throughout your application.
5
+ * <PaginatedResourceSection> encapsulates the previous and next pagination behaviors throughout your application.
6
6
  */
7
7
  export function PaginatedResourceSection<NodesType>({
8
8
  connection,
9
9
  children,
10
+ ariaLabel,
10
11
  resourcesClassName,
11
12
  }: {
12
13
  connection: React.ComponentProps<typeof Pagination<NodesType>>['connection'];
13
14
  children: React.FunctionComponent<{node: NodesType; index: number}>;
15
+ ariaLabel?: string;
14
16
  resourcesClassName?: string;
15
17
  }) {
16
18
  return (
@@ -23,15 +25,33 @@ export function PaginatedResourceSection<NodesType>({
23
25
  return (
24
26
  <div>
25
27
  <PreviousLink>
26
- {isLoading ? 'Loading...' : <span>↑ Load previous</span>}
28
+ {isLoading ? (
29
+ 'Loading...'
30
+ ) : (
31
+ <span>
32
+ <span aria-hidden="true">↑</span> Load previous
33
+ </span>
34
+ )}
27
35
  </PreviousLink>
28
36
  {resourcesClassName ? (
29
- <div className={resourcesClassName}>{resourcesMarkup}</div>
37
+ <div
38
+ aria-label={ariaLabel}
39
+ className={resourcesClassName}
40
+ role={ariaLabel ? 'region' : undefined}
41
+ >
42
+ {resourcesMarkup}
43
+ </div>
30
44
  ) : (
31
45
  resourcesMarkup
32
46
  )}
33
47
  <NextLink>
34
- {isLoading ? 'Loading...' : <span>Load more ↓</span>}
48
+ {isLoading ? (
49
+ 'Loading...'
50
+ ) : (
51
+ <span>
52
+ Load more <span aria-hidden="true">↓</span>
53
+ </span>
54
+ )}
35
55
  </NextLink>
36
56
  </div>
37
57
  );
@@ -9,7 +9,7 @@ export function ProductPrice({
9
9
  compareAtPrice?: MoneyV2 | null;
10
10
  }) {
11
11
  return (
12
- <div className="product-price">
12
+ <div aria-label="Price" className="product-price" role="group">
13
13
  {compareAtPrice ? (
14
14
  <div className="product-price-on-sale">
15
15
  {price ? <Money data={price} /> : null}
@@ -1,6 +1,7 @@
1
1
  import {createHydrogenContext} from '@shopify/hydrogen';
2
2
  import {AppSession} from '~/lib/session';
3
3
  import {CART_QUERY_FRAGMENT} from '~/lib/fragments';
4
+ import type {CartApiQueryFragment} from 'storefrontapi.generated';
4
5
 
5
6
  // Define the additional context object
6
7
  const additionalContext = {
@@ -16,6 +17,10 @@ type AdditionalContextType = typeof additionalContext;
16
17
 
17
18
  declare global {
18
19
  interface HydrogenAdditionalContext extends AdditionalContextType {}
20
+
21
+ // Augment HydrogenCustomCartFragment with the codegen'd cart fragment type so
22
+ // that context.cart.get() and all cart mutations return the extended cart type.
23
+ interface HydrogenCustomCartFragment extends CartApiQueryFragment {}
19
24
  }
20
25
 
21
26
  /**