@shopify/hydrogen-react 0.0.0-next-72f8a5c → 0.0.0-next-ea37299

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 (349) hide show
  1. package/dist/dev/CartProvider.js +35 -35
  2. package/dist/dev/CartProvider.js.map +1 -1
  3. package/dist/dev/{CartProvider.cjs → CartProvider.mjs} +36 -36
  4. package/dist/dev/{CartProvider.cjs.map → CartProvider.mjs.map} +1 -1
  5. package/dist/dev/ExternalVideo.js +5 -5
  6. package/dist/dev/ExternalVideo.js.map +1 -1
  7. package/dist/dev/{ExternalVideo.cjs → ExternalVideo.mjs} +6 -6
  8. package/dist/{prod/ExternalVideo.cjs.map → dev/ExternalVideo.mjs.map} +1 -1
  9. package/dist/dev/Image.js +12 -12
  10. package/dist/dev/Image.js.map +1 -1
  11. package/dist/dev/{Image.cjs → Image.mjs} +13 -13
  12. package/dist/dev/{Image.cjs.map → Image.mjs.map} +1 -1
  13. package/dist/dev/MediaFile.js +12 -12
  14. package/dist/dev/MediaFile.js.map +1 -1
  15. package/dist/dev/{MediaFile.cjs → MediaFile.mjs} +13 -13
  16. package/dist/dev/{MediaFile.cjs.map → MediaFile.mjs.map} +1 -1
  17. package/dist/dev/Metafield.js +32 -32
  18. package/dist/dev/Metafield.js.map +1 -1
  19. package/dist/dev/{Metafield.cjs → Metafield.mjs} +33 -33
  20. package/dist/dev/{Metafield.cjs.map → Metafield.mjs.map} +1 -1
  21. package/dist/dev/ModelViewer.js +11 -11
  22. package/dist/dev/ModelViewer.js.map +1 -1
  23. package/dist/dev/{ModelViewer.cjs → ModelViewer.mjs} +12 -12
  24. package/dist/dev/{ModelViewer.cjs.map → ModelViewer.mjs.map} +1 -1
  25. package/dist/dev/Money.js +8 -8
  26. package/dist/dev/Money.js.map +1 -1
  27. package/dist/{prod/Money.cjs → dev/Money.mjs} +9 -9
  28. package/dist/dev/{Money.cjs.map → Money.mjs.map} +1 -1
  29. package/dist/dev/ProductPrice.js +9 -9
  30. package/dist/dev/ProductPrice.js.map +1 -1
  31. package/dist/{prod/ProductPrice.cjs → dev/ProductPrice.mjs} +10 -10
  32. package/dist/dev/{ProductPrice.cjs.map → ProductPrice.mjs.map} +1 -1
  33. package/dist/dev/ProductProvider.js +25 -25
  34. package/dist/dev/ProductProvider.js.map +1 -1
  35. package/dist/{prod/ProductProvider.cjs → dev/ProductProvider.mjs} +26 -26
  36. package/dist/dev/{ProductProvider.cjs.map → ProductProvider.mjs.map} +1 -1
  37. package/dist/dev/ShopPayButton.js +13 -13
  38. package/dist/dev/ShopPayButton.js.map +1 -1
  39. package/dist/{prod/ShopPayButton.cjs → dev/ShopPayButton.mjs} +14 -14
  40. package/dist/{prod/ShopPayButton.cjs.map → dev/ShopPayButton.mjs.map} +1 -1
  41. package/dist/dev/ShopifyProvider.js +14 -14
  42. package/dist/dev/ShopifyProvider.js.map +1 -1
  43. package/dist/dev/ShopifyProvider.mjs +46 -0
  44. package/dist/dev/{ShopifyProvider.cjs.map → ShopifyProvider.mjs.map} +1 -1
  45. package/dist/dev/Video.js +9 -9
  46. package/dist/dev/Video.js.map +1 -1
  47. package/dist/dev/{Video.cjs → Video.mjs} +10 -10
  48. package/dist/dev/{Video.cjs.map → Video.mjs.map} +1 -1
  49. package/dist/dev/_virtual/index.js +5 -0
  50. package/dist/dev/_virtual/index.js.map +1 -0
  51. package/dist/dev/_virtual/index.mjs +5 -0
  52. package/dist/dev/_virtual/index.mjs.map +1 -0
  53. package/dist/dev/_virtual/use-sync-external-store-shim.development.js +5 -0
  54. package/dist/dev/_virtual/use-sync-external-store-shim.development.js.map +1 -0
  55. package/dist/dev/_virtual/use-sync-external-store-shim.development.mjs +5 -0
  56. package/dist/dev/_virtual/use-sync-external-store-shim.development.mjs.map +1 -0
  57. package/dist/dev/_virtual/use-sync-external-store-shim.production.min.js +5 -0
  58. package/dist/dev/_virtual/use-sync-external-store-shim.production.min.js.map +1 -0
  59. package/dist/dev/_virtual/use-sync-external-store-shim.production.min.mjs +5 -0
  60. package/dist/dev/_virtual/use-sync-external-store-shim.production.min.mjs.map +1 -0
  61. package/dist/dev/_virtual/with-selector.development.js +5 -0
  62. package/dist/dev/_virtual/with-selector.development.js.map +1 -0
  63. package/dist/dev/_virtual/with-selector.development.mjs +5 -0
  64. package/dist/dev/_virtual/with-selector.development.mjs.map +1 -0
  65. package/dist/dev/_virtual/with-selector.js +5 -0
  66. package/dist/dev/_virtual/with-selector.js.map +1 -0
  67. package/dist/dev/_virtual/with-selector.mjs +5 -0
  68. package/dist/dev/_virtual/with-selector.mjs.map +1 -0
  69. package/dist/dev/_virtual/with-selector.production.min.js +5 -0
  70. package/dist/dev/_virtual/with-selector.production.min.js.map +1 -0
  71. package/dist/dev/_virtual/with-selector.production.min.mjs +5 -0
  72. package/dist/dev/_virtual/with-selector.production.min.mjs.map +1 -0
  73. package/dist/dev/cart-constants.js +9 -9
  74. package/dist/dev/cart-constants.js.map +1 -1
  75. package/dist/dev/cart-constants.mjs +17 -0
  76. package/dist/dev/{cart-constants.cjs.map → cart-constants.mjs.map} +1 -1
  77. package/dist/dev/cart-hooks.js +15 -15
  78. package/dist/dev/cart-hooks.js.map +1 -1
  79. package/dist/dev/cart-hooks.mjs +48 -0
  80. package/dist/dev/{cart-hooks.cjs.map → cart-hooks.mjs.map} +1 -1
  81. package/dist/dev/cart-queries.js +11 -11
  82. package/dist/dev/cart-queries.js.map +1 -1
  83. package/dist/{prod/cart-queries.cjs → dev/cart-queries.mjs} +12 -12
  84. package/dist/dev/{cart-queries.cjs.map → cart-queries.mjs.map} +1 -1
  85. package/dist/dev/flatten-connection.js +3 -3
  86. package/dist/dev/flatten-connection.js.map +1 -1
  87. package/dist/dev/{flatten-connection.cjs → flatten-connection.mjs} +4 -4
  88. package/dist/dev/{flatten-connection.cjs.map → flatten-connection.mjs.map} +1 -1
  89. package/dist/dev/image-size.js +6 -6
  90. package/dist/dev/image-size.js.map +1 -1
  91. package/dist/dev/{image-size.cjs → image-size.mjs} +7 -7
  92. package/dist/dev/{image-size.cjs.map → image-size.mjs.map} +1 -1
  93. package/dist/dev/index.js +37 -37
  94. package/dist/dev/index.js.map +1 -1
  95. package/dist/dev/index.mjs +38 -0
  96. package/dist/dev/index.mjs.map +1 -0
  97. package/dist/dev/load-script.js +7 -7
  98. package/dist/dev/load-script.js.map +1 -1
  99. package/dist/{prod/load-script.cjs → dev/load-script.mjs} +8 -8
  100. package/dist/dev/{load-script.cjs.map → load-script.mjs.map} +1 -1
  101. package/dist/dev/node_modules/@xstate/fsm/es/index.js +158 -0
  102. package/dist/dev/node_modules/@xstate/fsm/es/index.js.map +1 -0
  103. package/dist/dev/node_modules/@xstate/fsm/es/index.mjs +159 -0
  104. package/dist/dev/node_modules/@xstate/fsm/es/index.mjs.map +1 -0
  105. package/dist/dev/node_modules/@xstate/react/es/fsm.js +94 -0
  106. package/dist/dev/node_modules/@xstate/react/es/fsm.js.map +1 -0
  107. package/dist/dev/node_modules/@xstate/react/es/fsm.mjs +94 -0
  108. package/dist/dev/node_modules/@xstate/react/es/fsm.mjs.map +1 -0
  109. package/dist/dev/node_modules/@xstate/react/es/useConstant.js +30 -0
  110. package/dist/dev/node_modules/@xstate/react/es/useConstant.js.map +1 -0
  111. package/dist/dev/node_modules/@xstate/react/es/useConstant.mjs +12 -0
  112. package/dist/dev/node_modules/@xstate/react/es/useConstant.mjs.map +1 -0
  113. package/dist/dev/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.browser.esm.js +5 -0
  114. package/dist/dev/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.browser.esm.js.map +1 -0
  115. package/dist/dev/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.browser.esm.mjs +6 -0
  116. package/dist/dev/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.browser.esm.mjs.map +1 -0
  117. package/dist/dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +107 -0
  118. package/dist/dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js.map +1 -0
  119. package/dist/dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.mjs +105 -0
  120. package/dist/dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.mjs.map +1 -0
  121. package/dist/dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js +74 -0
  122. package/dist/dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js.map +1 -0
  123. package/dist/dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.mjs +72 -0
  124. package/dist/dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.mjs.map +1 -0
  125. package/dist/dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +138 -0
  126. package/dist/dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +1 -0
  127. package/dist/dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.mjs +136 -0
  128. package/dist/dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.mjs.map +1 -0
  129. package/dist/dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js +60 -0
  130. package/dist/dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js.map +1 -0
  131. package/dist/dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.mjs +58 -0
  132. package/dist/dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.mjs.map +1 -0
  133. package/dist/dev/node_modules/use-sync-external-store/shim/index.js +21 -0
  134. package/dist/dev/node_modules/use-sync-external-store/shim/index.js.map +1 -0
  135. package/dist/dev/node_modules/use-sync-external-store/shim/index.mjs +21 -0
  136. package/dist/dev/node_modules/use-sync-external-store/shim/index.mjs.map +1 -0
  137. package/dist/dev/node_modules/use-sync-external-store/shim/with-selector.js +12 -0
  138. package/dist/dev/node_modules/use-sync-external-store/shim/with-selector.js.map +1 -0
  139. package/dist/dev/node_modules/use-sync-external-store/shim/with-selector.mjs +11 -0
  140. package/dist/dev/node_modules/use-sync-external-store/shim/with-selector.mjs.map +1 -0
  141. package/dist/dev/node_modules/worktop/cookie/index.js +27 -0
  142. package/dist/dev/node_modules/worktop/cookie/index.js.map +1 -0
  143. package/dist/dev/node_modules/worktop/cookie/index.mjs +27 -0
  144. package/dist/dev/node_modules/worktop/cookie/index.mjs.map +1 -0
  145. package/dist/dev/storefront-api-constants.js +3 -3
  146. package/dist/dev/storefront-api-constants.js.map +1 -1
  147. package/dist/dev/storefront-api-constants.mjs +5 -0
  148. package/dist/dev/storefront-api-constants.mjs.map +1 -0
  149. package/dist/dev/storefront-client.js +6 -6
  150. package/dist/dev/storefront-client.js.map +1 -1
  151. package/dist/dev/{storefront-client.cjs → storefront-client.mjs} +7 -7
  152. package/dist/dev/storefront-client.mjs.map +1 -0
  153. package/dist/dev/useCartAPIStateMachine.js +20 -20
  154. package/dist/dev/useCartAPIStateMachine.js.map +1 -1
  155. package/dist/{prod/useCartAPIStateMachine.cjs → dev/useCartAPIStateMachine.mjs} +21 -21
  156. package/dist/{prod/useCartAPIStateMachine.cjs.map → dev/useCartAPIStateMachine.mjs.map} +1 -1
  157. package/dist/dev/useCartActions.js +26 -26
  158. package/dist/dev/useCartActions.js.map +1 -1
  159. package/dist/dev/{useCartActions.cjs → useCartActions.mjs} +27 -27
  160. package/dist/dev/{useCartActions.cjs.map → useCartActions.mjs.map} +1 -1
  161. package/dist/dev/useMoney.js +10 -10
  162. package/dist/dev/useMoney.js.map +1 -1
  163. package/dist/{prod/useMoney.cjs → dev/useMoney.mjs} +11 -11
  164. package/dist/{prod/useMoney.cjs.map → dev/useMoney.mjs.map} +1 -1
  165. package/dist/prod/CartProvider.js +35 -35
  166. package/dist/prod/CartProvider.js.map +1 -1
  167. package/dist/prod/{CartProvider.cjs → CartProvider.mjs} +36 -36
  168. package/dist/prod/{CartProvider.cjs.map → CartProvider.mjs.map} +1 -1
  169. package/dist/prod/ExternalVideo.js +5 -5
  170. package/dist/prod/ExternalVideo.js.map +1 -1
  171. package/dist/prod/{ExternalVideo.cjs → ExternalVideo.mjs} +6 -6
  172. package/dist/{dev/ExternalVideo.cjs.map → prod/ExternalVideo.mjs.map} +1 -1
  173. package/dist/prod/Image.js +12 -12
  174. package/dist/prod/Image.js.map +1 -1
  175. package/dist/prod/{Image.cjs → Image.mjs} +13 -13
  176. package/dist/prod/{Image.cjs.map → Image.mjs.map} +1 -1
  177. package/dist/prod/MediaFile.js +12 -12
  178. package/dist/prod/MediaFile.js.map +1 -1
  179. package/dist/prod/{MediaFile.cjs → MediaFile.mjs} +13 -13
  180. package/dist/prod/{MediaFile.cjs.map → MediaFile.mjs.map} +1 -1
  181. package/dist/prod/Metafield.js +32 -32
  182. package/dist/prod/Metafield.js.map +1 -1
  183. package/dist/prod/{Metafield.cjs → Metafield.mjs} +33 -33
  184. package/dist/prod/{Metafield.cjs.map → Metafield.mjs.map} +1 -1
  185. package/dist/prod/ModelViewer.js +11 -11
  186. package/dist/prod/ModelViewer.js.map +1 -1
  187. package/dist/prod/{ModelViewer.cjs → ModelViewer.mjs} +12 -12
  188. package/dist/prod/{ModelViewer.cjs.map → ModelViewer.mjs.map} +1 -1
  189. package/dist/prod/Money.js +8 -8
  190. package/dist/prod/Money.js.map +1 -1
  191. package/dist/{dev/Money.cjs → prod/Money.mjs} +9 -9
  192. package/dist/prod/{Money.cjs.map → Money.mjs.map} +1 -1
  193. package/dist/prod/ProductPrice.js +9 -9
  194. package/dist/prod/ProductPrice.js.map +1 -1
  195. package/dist/{dev/ProductPrice.cjs → prod/ProductPrice.mjs} +10 -10
  196. package/dist/prod/{ProductPrice.cjs.map → ProductPrice.mjs.map} +1 -1
  197. package/dist/prod/ProductProvider.js +25 -25
  198. package/dist/prod/ProductProvider.js.map +1 -1
  199. package/dist/{dev/ProductProvider.cjs → prod/ProductProvider.mjs} +26 -26
  200. package/dist/prod/{ProductProvider.cjs.map → ProductProvider.mjs.map} +1 -1
  201. package/dist/prod/ShopPayButton.js +13 -13
  202. package/dist/prod/ShopPayButton.js.map +1 -1
  203. package/dist/{dev/ShopPayButton.cjs → prod/ShopPayButton.mjs} +14 -14
  204. package/dist/{dev/ShopPayButton.cjs.map → prod/ShopPayButton.mjs.map} +1 -1
  205. package/dist/prod/ShopifyProvider.js +14 -14
  206. package/dist/prod/ShopifyProvider.js.map +1 -1
  207. package/dist/prod/ShopifyProvider.mjs +46 -0
  208. package/dist/prod/{ShopifyProvider.cjs.map → ShopifyProvider.mjs.map} +1 -1
  209. package/dist/prod/Video.js +9 -9
  210. package/dist/prod/Video.js.map +1 -1
  211. package/dist/prod/{Video.cjs → Video.mjs} +10 -10
  212. package/dist/prod/{Video.cjs.map → Video.mjs.map} +1 -1
  213. package/dist/prod/_virtual/index.js +5 -0
  214. package/dist/prod/_virtual/index.js.map +1 -0
  215. package/dist/prod/_virtual/index.mjs +5 -0
  216. package/dist/prod/_virtual/index.mjs.map +1 -0
  217. package/dist/prod/_virtual/use-sync-external-store-shim.development.js +5 -0
  218. package/dist/prod/_virtual/use-sync-external-store-shim.development.js.map +1 -0
  219. package/dist/prod/_virtual/use-sync-external-store-shim.development.mjs +5 -0
  220. package/dist/prod/_virtual/use-sync-external-store-shim.development.mjs.map +1 -0
  221. package/dist/prod/_virtual/use-sync-external-store-shim.production.min.js +5 -0
  222. package/dist/prod/_virtual/use-sync-external-store-shim.production.min.js.map +1 -0
  223. package/dist/prod/_virtual/use-sync-external-store-shim.production.min.mjs +5 -0
  224. package/dist/prod/_virtual/use-sync-external-store-shim.production.min.mjs.map +1 -0
  225. package/dist/prod/_virtual/with-selector.development.js +5 -0
  226. package/dist/prod/_virtual/with-selector.development.js.map +1 -0
  227. package/dist/prod/_virtual/with-selector.development.mjs +5 -0
  228. package/dist/prod/_virtual/with-selector.development.mjs.map +1 -0
  229. package/dist/prod/_virtual/with-selector.js +5 -0
  230. package/dist/prod/_virtual/with-selector.js.map +1 -0
  231. package/dist/prod/_virtual/with-selector.mjs +5 -0
  232. package/dist/prod/_virtual/with-selector.mjs.map +1 -0
  233. package/dist/prod/_virtual/with-selector.production.min.js +5 -0
  234. package/dist/prod/_virtual/with-selector.production.min.js.map +1 -0
  235. package/dist/prod/_virtual/with-selector.production.min.mjs +5 -0
  236. package/dist/prod/_virtual/with-selector.production.min.mjs.map +1 -0
  237. package/dist/prod/cart-constants.js +9 -9
  238. package/dist/prod/cart-constants.js.map +1 -1
  239. package/dist/prod/cart-constants.mjs +17 -0
  240. package/dist/prod/{cart-constants.cjs.map → cart-constants.mjs.map} +1 -1
  241. package/dist/prod/cart-hooks.js +15 -15
  242. package/dist/prod/cart-hooks.js.map +1 -1
  243. package/dist/prod/cart-hooks.mjs +48 -0
  244. package/dist/prod/{cart-hooks.cjs.map → cart-hooks.mjs.map} +1 -1
  245. package/dist/prod/cart-queries.js +11 -11
  246. package/dist/prod/cart-queries.js.map +1 -1
  247. package/dist/{dev/cart-queries.cjs → prod/cart-queries.mjs} +12 -12
  248. package/dist/prod/{cart-queries.cjs.map → cart-queries.mjs.map} +1 -1
  249. package/dist/prod/flatten-connection.js +3 -3
  250. package/dist/prod/flatten-connection.js.map +1 -1
  251. package/dist/prod/{flatten-connection.cjs → flatten-connection.mjs} +4 -4
  252. package/dist/prod/{flatten-connection.cjs.map → flatten-connection.mjs.map} +1 -1
  253. package/dist/prod/image-size.js +6 -6
  254. package/dist/prod/image-size.js.map +1 -1
  255. package/dist/prod/{image-size.cjs → image-size.mjs} +7 -7
  256. package/dist/prod/{image-size.cjs.map → image-size.mjs.map} +1 -1
  257. package/dist/prod/index.js +37 -37
  258. package/dist/prod/index.js.map +1 -1
  259. package/dist/prod/index.mjs +38 -0
  260. package/dist/prod/index.mjs.map +1 -0
  261. package/dist/prod/load-script.js +7 -7
  262. package/dist/prod/load-script.js.map +1 -1
  263. package/dist/{dev/load-script.cjs → prod/load-script.mjs} +8 -8
  264. package/dist/prod/{load-script.cjs.map → load-script.mjs.map} +1 -1
  265. package/dist/prod/node_modules/@xstate/fsm/es/index.js +158 -0
  266. package/dist/prod/node_modules/@xstate/fsm/es/index.js.map +1 -0
  267. package/dist/prod/node_modules/@xstate/fsm/es/index.mjs +159 -0
  268. package/dist/prod/node_modules/@xstate/fsm/es/index.mjs.map +1 -0
  269. package/dist/prod/node_modules/@xstate/react/es/fsm.js +94 -0
  270. package/dist/prod/node_modules/@xstate/react/es/fsm.js.map +1 -0
  271. package/dist/prod/node_modules/@xstate/react/es/fsm.mjs +94 -0
  272. package/dist/prod/node_modules/@xstate/react/es/fsm.mjs.map +1 -0
  273. package/dist/prod/node_modules/@xstate/react/es/useConstant.js +30 -0
  274. package/dist/prod/node_modules/@xstate/react/es/useConstant.js.map +1 -0
  275. package/dist/prod/node_modules/@xstate/react/es/useConstant.mjs +12 -0
  276. package/dist/prod/node_modules/@xstate/react/es/useConstant.mjs.map +1 -0
  277. package/dist/prod/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.browser.esm.js +5 -0
  278. package/dist/prod/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.browser.esm.js.map +1 -0
  279. package/dist/prod/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.browser.esm.mjs +6 -0
  280. package/dist/prod/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.browser.esm.mjs.map +1 -0
  281. package/dist/prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +107 -0
  282. package/dist/prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js.map +1 -0
  283. package/dist/prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.mjs +105 -0
  284. package/dist/prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.mjs.map +1 -0
  285. package/dist/prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js +74 -0
  286. package/dist/prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js.map +1 -0
  287. package/dist/prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.mjs +72 -0
  288. package/dist/prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.mjs.map +1 -0
  289. package/dist/prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +138 -0
  290. package/dist/prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +1 -0
  291. package/dist/prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.mjs +136 -0
  292. package/dist/prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.mjs.map +1 -0
  293. package/dist/prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js +60 -0
  294. package/dist/prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js.map +1 -0
  295. package/dist/prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.mjs +58 -0
  296. package/dist/prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.mjs.map +1 -0
  297. package/dist/prod/node_modules/use-sync-external-store/shim/index.js +21 -0
  298. package/dist/prod/node_modules/use-sync-external-store/shim/index.js.map +1 -0
  299. package/dist/prod/node_modules/use-sync-external-store/shim/index.mjs +21 -0
  300. package/dist/prod/node_modules/use-sync-external-store/shim/index.mjs.map +1 -0
  301. package/dist/prod/node_modules/use-sync-external-store/shim/with-selector.js +12 -0
  302. package/dist/prod/node_modules/use-sync-external-store/shim/with-selector.js.map +1 -0
  303. package/dist/prod/node_modules/use-sync-external-store/shim/with-selector.mjs +11 -0
  304. package/dist/prod/node_modules/use-sync-external-store/shim/with-selector.mjs.map +1 -0
  305. package/dist/prod/node_modules/worktop/cookie/index.js +27 -0
  306. package/dist/prod/node_modules/worktop/cookie/index.js.map +1 -0
  307. package/dist/prod/node_modules/worktop/cookie/index.mjs +27 -0
  308. package/dist/prod/node_modules/worktop/cookie/index.mjs.map +1 -0
  309. package/dist/prod/storefront-api-constants.js +3 -3
  310. package/dist/prod/storefront-api-constants.js.map +1 -1
  311. package/dist/prod/storefront-api-constants.mjs +5 -0
  312. package/dist/prod/storefront-api-constants.mjs.map +1 -0
  313. package/dist/prod/storefront-client.js +6 -6
  314. package/dist/prod/storefront-client.js.map +1 -1
  315. package/dist/prod/{storefront-client.cjs → storefront-client.mjs} +7 -7
  316. package/dist/prod/storefront-client.mjs.map +1 -0
  317. package/dist/prod/useCartAPIStateMachine.js +20 -20
  318. package/dist/prod/useCartAPIStateMachine.js.map +1 -1
  319. package/dist/{dev/useCartAPIStateMachine.cjs → prod/useCartAPIStateMachine.mjs} +21 -21
  320. package/dist/{dev/useCartAPIStateMachine.cjs.map → prod/useCartAPIStateMachine.mjs.map} +1 -1
  321. package/dist/prod/useCartActions.js +26 -26
  322. package/dist/prod/useCartActions.js.map +1 -1
  323. package/dist/prod/{useCartActions.cjs → useCartActions.mjs} +27 -27
  324. package/dist/prod/{useCartActions.cjs.map → useCartActions.mjs.map} +1 -1
  325. package/dist/prod/useMoney.js +10 -10
  326. package/dist/prod/useMoney.js.map +1 -1
  327. package/dist/{dev/useMoney.cjs → prod/useMoney.mjs} +11 -11
  328. package/dist/{dev/useMoney.cjs.map → prod/useMoney.mjs.map} +1 -1
  329. package/dist/umd/hydrogen-react.dev.js +1 -1
  330. package/dist/umd/hydrogen-react.dev.js.map +1 -1
  331. package/dist/umd/hydrogen-react.prod.js +1 -1
  332. package/dist/umd/hydrogen-react.prod.js.map +1 -1
  333. package/package.json +14 -14
  334. package/dist/dev/ShopifyProvider.cjs +0 -46
  335. package/dist/dev/cart-constants.cjs +0 -17
  336. package/dist/dev/cart-hooks.cjs +0 -48
  337. package/dist/dev/index.cjs +0 -38
  338. package/dist/dev/index.cjs.map +0 -1
  339. package/dist/dev/storefront-api-constants.cjs +0 -5
  340. package/dist/dev/storefront-api-constants.cjs.map +0 -1
  341. package/dist/dev/storefront-client.cjs.map +0 -1
  342. package/dist/prod/ShopifyProvider.cjs +0 -46
  343. package/dist/prod/cart-constants.cjs +0 -17
  344. package/dist/prod/cart-hooks.cjs +0 -48
  345. package/dist/prod/index.cjs +0 -38
  346. package/dist/prod/index.cjs.map +0 -1
  347. package/dist/prod/storefront-api-constants.cjs +0 -5
  348. package/dist/prod/storefront-api-constants.cjs.map +0 -1
  349. package/dist/prod/storefront-client.cjs.map +0 -1
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const useSyncExternalStoreShim_production_min = require("../../../_virtual/use-sync-external-store-shim.production.min.js");
4
+ const require$$0 = require("react");
5
+ const _interopDefaultLegacy = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
6
+ const require$$0__default = /* @__PURE__ */ _interopDefaultLegacy(require$$0);
7
+ /**
8
+ * @license React
9
+ * use-sync-external-store-shim.production.min.js
10
+ *
11
+ * Copyright (c) Facebook, Inc. and its affiliates.
12
+ *
13
+ * This source code is licensed under the MIT license found in the
14
+ * LICENSE file in the root directory of this source tree.
15
+ */
16
+ var hasRequiredUseSyncExternalStoreShim_production_min;
17
+ function requireUseSyncExternalStoreShim_production_min() {
18
+ if (hasRequiredUseSyncExternalStoreShim_production_min)
19
+ return useSyncExternalStoreShim_production_min.__exports;
20
+ hasRequiredUseSyncExternalStoreShim_production_min = 1;
21
+ var e = require$$0__default.default;
22
+ function h(a, b) {
23
+ return a === b && (0 !== a || 1 / a === 1 / b) || a !== a && b !== b;
24
+ }
25
+ var k = "function" === typeof Object.is ? Object.is : h, l = e.useState, m = e.useEffect, n = e.useLayoutEffect, p = e.useDebugValue;
26
+ function q(a, b) {
27
+ var d = b(), f = l({ inst: { value: d, getSnapshot: b } }), c = f[0].inst, g = f[1];
28
+ n(function() {
29
+ c.value = d;
30
+ c.getSnapshot = b;
31
+ r(c) && g({ inst: c });
32
+ }, [a, d, b]);
33
+ m(function() {
34
+ r(c) && g({ inst: c });
35
+ return a(function() {
36
+ r(c) && g({ inst: c });
37
+ });
38
+ }, [a]);
39
+ p(d);
40
+ return d;
41
+ }
42
+ function r(a) {
43
+ var b = a.getSnapshot;
44
+ a = a.value;
45
+ try {
46
+ var d = b();
47
+ return !k(a, d);
48
+ } catch (f) {
49
+ return true;
50
+ }
51
+ }
52
+ function t(a, b) {
53
+ return b();
54
+ }
55
+ var u = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? t : q;
56
+ useSyncExternalStoreShim_production_min.__exports.useSyncExternalStore = void 0 !== e.useSyncExternalStore ? e.useSyncExternalStore : u;
57
+ return useSyncExternalStoreShim_production_min.__exports;
58
+ }
59
+ exports.__require = requireUseSyncExternalStoreShim_production_min;
60
+ //# sourceMappingURL=use-sync-external-store-shim.production.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-sync-external-store-shim.production.min.js","sources":["../../../../../../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js"],"sourcesContent":["/**\n * @license React\n * use-sync-external-store-shim.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var e=require(\"react\");function h(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var k=\"function\"===typeof Object.is?Object.is:h,l=e.useState,m=e.useEffect,n=e.useLayoutEffect,p=e.useDebugValue;function q(a,b){var d=b(),f=l({inst:{value:d,getSnapshot:b}}),c=f[0].inst,g=f[1];n(function(){c.value=d;c.getSnapshot=b;r(c)&&g({inst:c})},[a,d,b]);m(function(){r(c)&&g({inst:c});return a(function(){r(c)&&g({inst:c})})},[a]);p(d);return d}\nfunction r(a){var b=a.getSnapshot;a=a.value;try{var d=b();return!k(a,d)}catch(f){return!0}}function t(a,b){return b()}var u=\"undefined\"===typeof window||\"undefined\"===typeof window.document||\"undefined\"===typeof window.document.createElement?t:q;exports.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:u;\n"],"names":["require$$0","useSyncExternalStoreShim_production_min"],"mappings":";;;;;;;;;;;;;;;;;;;;AASa,MAAI,IAAEA,oBAAgB;AAAC,WAAS,EAAE,GAAE,GAAE;AAAC,WAAO,MAAI,MAAI,MAAI,KAAG,IAAE,MAAI,IAAE,MAAI,MAAI,KAAG,MAAI;AAAA,EAAC;AAAC,MAAI,IAAE,eAAa,OAAO,OAAO,KAAG,OAAO,KAAG,GAAE,IAAE,EAAE,UAAS,IAAE,EAAE,WAAU,IAAE,EAAE,iBAAgB,IAAE,EAAE;AAAc,WAAS,EAAE,GAAE,GAAE;AAAC,QAAI,IAAE,EAAC,GAAG,IAAE,EAAE,EAAC,MAAK,EAAC,OAAM,GAAE,aAAY,EAAC,EAAC,CAAC,GAAE,IAAE,EAAE,GAAG,MAAK,IAAE,EAAE;AAAG,MAAE,WAAU;AAAC,QAAE,QAAM;AAAE,QAAE,cAAY;AAAE,QAAE,CAAC,KAAG,EAAE,EAAC,MAAK,EAAC,CAAC;AAAA,IAAC,GAAE,CAAC,GAAE,GAAE,CAAC,CAAC;AAAE,MAAE,WAAU;AAAC,QAAE,CAAC,KAAG,EAAE,EAAC,MAAK,EAAC,CAAC;AAAE,aAAO,EAAE,WAAU;AAAC,UAAE,CAAC,KAAG,EAAE,EAAC,MAAK,EAAC,CAAC;AAAA,MAAC,CAAC;AAAA,IAAC,GAAE,CAAC,CAAC,CAAC;AAAE,MAAE,CAAC;AAAE,WAAO;AAAA,EAAC;AAClc,WAAS,EAAE,GAAE;AAAC,QAAI,IAAE,EAAE;AAAY,QAAE,EAAE;AAAM,QAAG;AAAC,UAAI,IAAE,EAAG;AAAC,aAAM,CAAC,EAAE,GAAE,CAAC;AAAA,IAAC,SAAO,GAAN;AAAS,aAAM;AAAA,IAAE;AAAA,EAAC;AAAC,WAAS,EAAE,GAAE,GAAE;AAAC,WAAO,EAAC;AAAA,EAAE;AAAC,MAAI,IAAE,gBAAc,OAAO,UAAQ,gBAAc,OAAO,OAAO,YAAU,gBAAc,OAAO,OAAO,SAAS,gBAAc,IAAE;AAAEC,0CAA4B,UAAA,uBAAC,WAAS,EAAE,uBAAqB,EAAE,uBAAqB;;;;"}
@@ -0,0 +1,58 @@
1
+ import { __exports as useSyncExternalStoreShim_production_min } from "../../../_virtual/use-sync-external-store-shim.production.min.mjs";
2
+ import require$$0__default from "react";
3
+ /**
4
+ * @license React
5
+ * use-sync-external-store-shim.production.min.js
6
+ *
7
+ * Copyright (c) Facebook, Inc. and its affiliates.
8
+ *
9
+ * This source code is licensed under the MIT license found in the
10
+ * LICENSE file in the root directory of this source tree.
11
+ */
12
+ var hasRequiredUseSyncExternalStoreShim_production_min;
13
+ function requireUseSyncExternalStoreShim_production_min() {
14
+ if (hasRequiredUseSyncExternalStoreShim_production_min)
15
+ return useSyncExternalStoreShim_production_min;
16
+ hasRequiredUseSyncExternalStoreShim_production_min = 1;
17
+ var e = require$$0__default;
18
+ function h(a, b) {
19
+ return a === b && (0 !== a || 1 / a === 1 / b) || a !== a && b !== b;
20
+ }
21
+ var k = "function" === typeof Object.is ? Object.is : h, l = e.useState, m = e.useEffect, n = e.useLayoutEffect, p = e.useDebugValue;
22
+ function q(a, b) {
23
+ var d = b(), f = l({ inst: { value: d, getSnapshot: b } }), c = f[0].inst, g = f[1];
24
+ n(function() {
25
+ c.value = d;
26
+ c.getSnapshot = b;
27
+ r(c) && g({ inst: c });
28
+ }, [a, d, b]);
29
+ m(function() {
30
+ r(c) && g({ inst: c });
31
+ return a(function() {
32
+ r(c) && g({ inst: c });
33
+ });
34
+ }, [a]);
35
+ p(d);
36
+ return d;
37
+ }
38
+ function r(a) {
39
+ var b = a.getSnapshot;
40
+ a = a.value;
41
+ try {
42
+ var d = b();
43
+ return !k(a, d);
44
+ } catch (f) {
45
+ return true;
46
+ }
47
+ }
48
+ function t(a, b) {
49
+ return b();
50
+ }
51
+ var u = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? t : q;
52
+ useSyncExternalStoreShim_production_min.useSyncExternalStore = void 0 !== e.useSyncExternalStore ? e.useSyncExternalStore : u;
53
+ return useSyncExternalStoreShim_production_min;
54
+ }
55
+ export {
56
+ requireUseSyncExternalStoreShim_production_min as __require
57
+ };
58
+ //# sourceMappingURL=use-sync-external-store-shim.production.min.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-sync-external-store-shim.production.min.mjs","sources":["../../../../../../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js"],"sourcesContent":["/**\n * @license React\n * use-sync-external-store-shim.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var e=require(\"react\");function h(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var k=\"function\"===typeof Object.is?Object.is:h,l=e.useState,m=e.useEffect,n=e.useLayoutEffect,p=e.useDebugValue;function q(a,b){var d=b(),f=l({inst:{value:d,getSnapshot:b}}),c=f[0].inst,g=f[1];n(function(){c.value=d;c.getSnapshot=b;r(c)&&g({inst:c})},[a,d,b]);m(function(){r(c)&&g({inst:c});return a(function(){r(c)&&g({inst:c})})},[a]);p(d);return d}\nfunction r(a){var b=a.getSnapshot;a=a.value;try{var d=b();return!k(a,d)}catch(f){return!0}}function t(a,b){return b()}var u=\"undefined\"===typeof window||\"undefined\"===typeof window.document||\"undefined\"===typeof window.document.createElement?t:q;exports.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:u;\n"],"names":["require$$0"],"mappings":";;;;;;;;;;;;;;;;AASa,MAAI,IAAEA;AAAiB,WAAS,EAAE,GAAE,GAAE;AAAC,WAAO,MAAI,MAAI,MAAI,KAAG,IAAE,MAAI,IAAE,MAAI,MAAI,KAAG,MAAI;AAAA,EAAC;AAAC,MAAI,IAAE,eAAa,OAAO,OAAO,KAAG,OAAO,KAAG,GAAE,IAAE,EAAE,UAAS,IAAE,EAAE,WAAU,IAAE,EAAE,iBAAgB,IAAE,EAAE;AAAc,WAAS,EAAE,GAAE,GAAE;AAAC,QAAI,IAAE,EAAC,GAAG,IAAE,EAAE,EAAC,MAAK,EAAC,OAAM,GAAE,aAAY,EAAC,EAAC,CAAC,GAAE,IAAE,EAAE,GAAG,MAAK,IAAE,EAAE;AAAG,MAAE,WAAU;AAAC,QAAE,QAAM;AAAE,QAAE,cAAY;AAAE,QAAE,CAAC,KAAG,EAAE,EAAC,MAAK,EAAC,CAAC;AAAA,IAAC,GAAE,CAAC,GAAE,GAAE,CAAC,CAAC;AAAE,MAAE,WAAU;AAAC,QAAE,CAAC,KAAG,EAAE,EAAC,MAAK,EAAC,CAAC;AAAE,aAAO,EAAE,WAAU;AAAC,UAAE,CAAC,KAAG,EAAE,EAAC,MAAK,EAAC,CAAC;AAAA,MAAC,CAAC;AAAA,IAAC,GAAE,CAAC,CAAC,CAAC;AAAE,MAAE,CAAC;AAAE,WAAO;AAAA,EAAC;AAClc,WAAS,EAAE,GAAE;AAAC,QAAI,IAAE,EAAE;AAAY,QAAE,EAAE;AAAM,QAAG;AAAC,UAAI,IAAE,EAAG;AAAC,aAAM,CAAC,EAAE,GAAE,CAAC;AAAA,IAAC,SAAO,GAAN;AAAS,aAAM;AAAA,IAAE;AAAA,EAAC;AAAC,WAAS,EAAE,GAAE,GAAE;AAAC,WAAO,EAAC;AAAA,EAAE;AAAC,MAAI,IAAE,gBAAc,OAAO,UAAQ,gBAAc,OAAO,OAAO,YAAU,gBAAc,OAAO,OAAO,SAAS,gBAAc,IAAE;AAAE,0CAA4B,uBAAC,WAAS,EAAE,uBAAqB,EAAE,uBAAqB;;;"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const index = require("../../../_virtual/index.js");
4
+ const useSyncExternalStoreShim_production_min = require("../cjs/use-sync-external-store-shim.production.min.js");
5
+ const useSyncExternalStoreShim_development = require("../cjs/use-sync-external-store-shim.development.js");
6
+ var hasRequiredShim;
7
+ function requireShim() {
8
+ if (hasRequiredShim)
9
+ return index.shim.exports;
10
+ hasRequiredShim = 1;
11
+ (function(module2) {
12
+ if (process.env.NODE_ENV === "production") {
13
+ module2.exports = useSyncExternalStoreShim_production_min.__require();
14
+ } else {
15
+ module2.exports = useSyncExternalStoreShim_development.__require();
16
+ }
17
+ })(index.shim);
18
+ return index.shim.exports;
19
+ }
20
+ exports.__require = requireShim;
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../../../node_modules/use-sync-external-store/shim/index.js"],"sourcesContent":["'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.min.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim.development.js');\n}\n"],"names":["module","require$$0","require$$1"],"mappings":";;;;;;;;;;;AAEA,QAAI,QAAQ,IAAI,aAAa,cAAc;AACzC,MAAAA,QAAA,UAAiBC,wCAAAA;IACnB,OAAO;AACL,MAAAD,QAAA,UAAiBE,qCAAAA;IACnB;AAAA;;;;"}
@@ -0,0 +1,21 @@
1
+ import { s as shim } from "../../../_virtual/index.mjs";
2
+ import { __require as requireUseSyncExternalStoreShim_production_min } from "../cjs/use-sync-external-store-shim.production.min.mjs";
3
+ import { __require as requireUseSyncExternalStoreShim_development } from "../cjs/use-sync-external-store-shim.development.mjs";
4
+ var hasRequiredShim;
5
+ function requireShim() {
6
+ if (hasRequiredShim)
7
+ return shim.exports;
8
+ hasRequiredShim = 1;
9
+ (function(module) {
10
+ if (process.env.NODE_ENV === "production") {
11
+ module.exports = requireUseSyncExternalStoreShim_production_min();
12
+ } else {
13
+ module.exports = requireUseSyncExternalStoreShim_development();
14
+ }
15
+ })(shim);
16
+ return shim.exports;
17
+ }
18
+ export {
19
+ requireShim as __require
20
+ };
21
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../../../node_modules/use-sync-external-store/shim/index.js"],"sourcesContent":["'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.min.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim.development.js');\n}\n"],"names":["require$$0","require$$1"],"mappings":";;;;;;;;;AAEA,QAAI,QAAQ,IAAI,aAAa,cAAc;AACzC,aAAA,UAAiBA;IACnB,OAAO;AACL,aAAA,UAAiBC;IACnB;AAAA;;;"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ const withSelector = require("../../../_virtual/with-selector.js");
3
+ const withSelector_production_min = require("../cjs/use-sync-external-store-shim/with-selector.production.min.js");
4
+ const withSelector_development = require("../cjs/use-sync-external-store-shim/with-selector.development.js");
5
+ (function(module) {
6
+ if (process.env.NODE_ENV === "production") {
7
+ module.exports = withSelector_production_min.__require();
8
+ } else {
9
+ module.exports = withSelector_development.__require();
10
+ }
11
+ })(withSelector.withSelector);
12
+ //# sourceMappingURL=with-selector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"with-selector.js","sources":["../../../../../../../node_modules/use-sync-external-store/shim/with-selector.js"],"sourcesContent":["'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.production.min.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.development.js');\n}\n"],"names":["require$$0","require$$1"],"mappings":";;;;;AAEA,MAAI,QAAQ,IAAI,aAAa,cAAc;AACzC,WAAA,UAAiBA,4BAAAA;EACnB,OAAO;AACL,WAAA,UAAiBC,yBAAAA;EACnB;;"}
@@ -0,0 +1,11 @@
1
+ import { w as withSelector } from "../../../_virtual/with-selector.mjs";
2
+ import { __require as requireWithSelector_production_min } from "../cjs/use-sync-external-store-shim/with-selector.production.min.mjs";
3
+ import { __require as requireWithSelector_development } from "../cjs/use-sync-external-store-shim/with-selector.development.mjs";
4
+ (function(module) {
5
+ if (process.env.NODE_ENV === "production") {
6
+ module.exports = requireWithSelector_production_min();
7
+ } else {
8
+ module.exports = requireWithSelector_development();
9
+ }
10
+ })(withSelector);
11
+ //# sourceMappingURL=with-selector.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"with-selector.mjs","sources":["../../../../../../../node_modules/use-sync-external-store/shim/with-selector.js"],"sourcesContent":["'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.production.min.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.development.js');\n}\n"],"names":["require$$0","require$$1"],"mappings":";;;;AAEA,MAAI,QAAQ,IAAI,aAAa,cAAc;AACzC,WAAA,UAAiBA;EACnB,OAAO;AACL,WAAA,UAAiBC;EACnB;;"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ var g = /* @__PURE__ */ new Set([
4
+ "domain",
5
+ "path",
6
+ "max-age",
7
+ "expires",
8
+ "samesite",
9
+ "secure",
10
+ "httponly"
11
+ ]);
12
+ function u(a) {
13
+ let r = {}, e, t, n = 0, m = a.split(/;\s*/g), s, i;
14
+ for (; n < m.length; n++)
15
+ if (t = m[n], e = t.indexOf("="), ~e) {
16
+ if (s = t.substring(0, e++).trim(), i = t.substring(e).trim(), i[0] === '"' && (i = i.substring(1, i.length - 1)), ~i.indexOf("%"))
17
+ try {
18
+ i = decodeURIComponent(i);
19
+ } catch (f) {
20
+ }
21
+ g.has(t = s.toLowerCase()) ? t === "expires" ? r.expires = new Date(i) : t === "max-age" ? r.maxage = +i : r[t] = i : r[s] = i;
22
+ } else
23
+ (s = t.trim().toLowerCase()) && (s === "httponly" || s === "secure") && (r[s] = true);
24
+ return r;
25
+ }
26
+ exports.parse = u;
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../../../node_modules/worktop/cookie/index.mjs"],"sourcesContent":["// src/cookie.ts\nvar g = new Set([\n \"domain\",\n \"path\",\n \"max-age\",\n \"expires\",\n \"samesite\",\n \"secure\",\n \"httponly\"\n]);\nfunction u(a) {\n let r = {}, e, t, n = 0, m = a.split(/;\\s*/g), s, i;\n for (; n < m.length; n++)\n if (t = m[n], e = t.indexOf(\"=\"), ~e) {\n if (s = t.substring(0, e++).trim(), i = t.substring(e).trim(), i[0] === '\"' && (i = i.substring(1, i.length - 1)), ~i.indexOf(\"%\"))\n try {\n i = decodeURIComponent(i);\n } catch (f) {\n }\n g.has(t = s.toLowerCase()) ? t === \"expires\" ? r.expires = new Date(i) : t === \"max-age\" ? r.maxage = +i : r[t] = i : r[s] = i;\n } else\n (s = t.trim().toLowerCase()) && (s === \"httponly\" || s === \"secure\") && (r[s] = !0);\n return r;\n}\nfunction l(a, r, e = {}) {\n let t = a + \"=\" + encodeURIComponent(r);\n return e.expires && (t += \"; Expires=\" + new Date(e.expires).toUTCString()), e.maxage != null && e.maxage >= 0 && (t += \"; Max-Age=\" + (e.maxage | 0)), e.domain && (t += \"; Domain=\" + e.domain), e.path && (t += \"; Path=\" + e.path), e.samesite && (t += \"; SameSite=\" + e.samesite), (e.secure || e.samesite === \"None\") && (t += \"; Secure\"), e.httponly && (t += \"; HttpOnly\"), t;\n}\nexport {\n u as parse,\n l as stringify\n};\n"],"names":[],"mappings":";;AACA,IAAI,IAAI,oBAAI,IAAI;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AACD,SAAS,EAAE,GAAG;AACZ,MAAI,IAAI,CAAE,GAAE,GAAG,GAAG,IAAI,GAAG,IAAI,EAAE,MAAM,OAAO,GAAG,GAAG;AAClD,SAAO,IAAI,EAAE,QAAQ;AACnB,QAAI,IAAI,EAAE,IAAI,IAAI,EAAE,QAAQ,GAAG,GAAG,CAAC,GAAG;AACpC,UAAI,IAAI,EAAE,UAAU,GAAG,GAAG,EAAE,KAAM,GAAE,IAAI,EAAE,UAAU,CAAC,EAAE,KAAM,GAAE,EAAE,OAAO,QAAQ,IAAI,EAAE,UAAU,GAAG,EAAE,SAAS,CAAC,IAAI,CAAC,EAAE,QAAQ,GAAG;AAC/H,YAAI;AACF,cAAI,mBAAmB,CAAC;AAAA,QACzB,SAAQ,GAAP;AAAA,QACD;AACH,QAAE,IAAI,IAAI,EAAE,YAAa,CAAA,IAAI,MAAM,YAAY,EAAE,UAAU,IAAI,KAAK,CAAC,IAAI,MAAM,YAAY,EAAE,SAAS,CAAC,IAAI,EAAE,KAAK,IAAI,EAAE,KAAK;AAAA,IAC9H;AACC,OAAC,IAAI,EAAE,KAAM,EAAC,YAAW,OAAQ,MAAM,cAAc,MAAM,cAAc,EAAE,KAAK;AACpF,SAAO;AACT;;"}
@@ -0,0 +1,27 @@
1
+ var g = /* @__PURE__ */ new Set([
2
+ "domain",
3
+ "path",
4
+ "max-age",
5
+ "expires",
6
+ "samesite",
7
+ "secure",
8
+ "httponly"
9
+ ]);
10
+ function u(a) {
11
+ let r = {}, e, t, n = 0, m = a.split(/;\s*/g), s, i;
12
+ for (; n < m.length; n++)
13
+ if (t = m[n], e = t.indexOf("="), ~e) {
14
+ if (s = t.substring(0, e++).trim(), i = t.substring(e).trim(), i[0] === '"' && (i = i.substring(1, i.length - 1)), ~i.indexOf("%"))
15
+ try {
16
+ i = decodeURIComponent(i);
17
+ } catch (f) {
18
+ }
19
+ g.has(t = s.toLowerCase()) ? t === "expires" ? r.expires = new Date(i) : t === "max-age" ? r.maxage = +i : r[t] = i : r[s] = i;
20
+ } else
21
+ (s = t.trim().toLowerCase()) && (s === "httponly" || s === "secure") && (r[s] = true);
22
+ return r;
23
+ }
24
+ export {
25
+ u as parse
26
+ };
27
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../../../node_modules/worktop/cookie/index.mjs"],"sourcesContent":["// src/cookie.ts\nvar g = new Set([\n \"domain\",\n \"path\",\n \"max-age\",\n \"expires\",\n \"samesite\",\n \"secure\",\n \"httponly\"\n]);\nfunction u(a) {\n let r = {}, e, t, n = 0, m = a.split(/;\\s*/g), s, i;\n for (; n < m.length; n++)\n if (t = m[n], e = t.indexOf(\"=\"), ~e) {\n if (s = t.substring(0, e++).trim(), i = t.substring(e).trim(), i[0] === '\"' && (i = i.substring(1, i.length - 1)), ~i.indexOf(\"%\"))\n try {\n i = decodeURIComponent(i);\n } catch (f) {\n }\n g.has(t = s.toLowerCase()) ? t === \"expires\" ? r.expires = new Date(i) : t === \"max-age\" ? r.maxage = +i : r[t] = i : r[s] = i;\n } else\n (s = t.trim().toLowerCase()) && (s === \"httponly\" || s === \"secure\") && (r[s] = !0);\n return r;\n}\nfunction l(a, r, e = {}) {\n let t = a + \"=\" + encodeURIComponent(r);\n return e.expires && (t += \"; Expires=\" + new Date(e.expires).toUTCString()), e.maxage != null && e.maxage >= 0 && (t += \"; Max-Age=\" + (e.maxage | 0)), e.domain && (t += \"; Domain=\" + e.domain), e.path && (t += \"; Path=\" + e.path), e.samesite && (t += \"; SameSite=\" + e.samesite), (e.secure || e.samesite === \"None\") && (t += \"; Secure\"), e.httponly && (t += \"; HttpOnly\"), t;\n}\nexport {\n u as parse,\n l as stringify\n};\n"],"names":[],"mappings":"AACA,IAAI,IAAI,oBAAI,IAAI;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AACD,SAAS,EAAE,GAAG;AACZ,MAAI,IAAI,CAAE,GAAE,GAAG,GAAG,IAAI,GAAG,IAAI,EAAE,MAAM,OAAO,GAAG,GAAG;AAClD,SAAO,IAAI,EAAE,QAAQ;AACnB,QAAI,IAAI,EAAE,IAAI,IAAI,EAAE,QAAQ,GAAG,GAAG,CAAC,GAAG;AACpC,UAAI,IAAI,EAAE,UAAU,GAAG,GAAG,EAAE,KAAM,GAAE,IAAI,EAAE,UAAU,CAAC,EAAE,KAAM,GAAE,EAAE,OAAO,QAAQ,IAAI,EAAE,UAAU,GAAG,EAAE,SAAS,CAAC,IAAI,CAAC,EAAE,QAAQ,GAAG;AAC/H,YAAI;AACF,cAAI,mBAAmB,CAAC;AAAA,QACzB,SAAQ,GAAP;AAAA,QACD;AACH,QAAE,IAAI,IAAI,EAAE,YAAa,CAAA,IAAI,MAAM,YAAY,EAAE,UAAU,IAAI,KAAK,CAAC,IAAI,MAAM,YAAY,EAAE,SAAS,CAAC,IAAI,EAAE,KAAK,IAAI,EAAE,KAAK;AAAA,IAC9H;AACC,OAAC,IAAI,EAAE,KAAM,EAAC,YAAW,OAAQ,MAAM,cAAc,MAAM,cAAc,EAAE,KAAK;AACpF,SAAO;AACT;"}
@@ -1,5 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
1
3
  const SFAPI_VERSION = "2022-10";
2
- export {
3
- SFAPI_VERSION
4
- };
4
+ exports.SFAPI_VERSION = SFAPI_VERSION;
5
5
  //# sourceMappingURL=storefront-api-constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"storefront-api-constants.js","sources":["../../src/storefront-api-constants.ts"],"sourcesContent":["export const SFAPI_VERSION = '2022-10';\n"],"names":[],"mappings":"AAAO,MAAM,gBAAgB;"}
1
+ {"version":3,"file":"storefront-api-constants.js","sources":["../../src/storefront-api-constants.ts"],"sourcesContent":["export const SFAPI_VERSION = '2022-10';\n"],"names":[],"mappings":";;AAAO,MAAM,gBAAgB;;"}
@@ -0,0 +1,5 @@
1
+ const SFAPI_VERSION = "2022-10";
2
+ export {
3
+ SFAPI_VERSION
4
+ };
5
+ //# sourceMappingURL=storefront-api-constants.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storefront-api-constants.mjs","sources":["../../src/storefront-api-constants.ts"],"sourcesContent":["export const SFAPI_VERSION = '2022-10';\n"],"names":[],"mappings":"AAAO,MAAM,gBAAgB;"}
@@ -1,4 +1,6 @@
1
- import { SFAPI_VERSION } from "./storefront-api-constants.js";
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const storefrontApiConstants = require("./storefront-api-constants.js");
2
4
  function createStorefrontClient({
3
5
  storeDomain,
4
6
  privateStorefrontToken,
@@ -6,9 +8,9 @@ function createStorefrontClient({
6
8
  storefrontApiVersion,
7
9
  contentType
8
10
  }) {
9
- if (storefrontApiVersion !== SFAPI_VERSION) {
11
+ if (storefrontApiVersion !== storefrontApiConstants.SFAPI_VERSION) {
10
12
  console.warn(
11
- `StorefrontClient: The Storefront API version that you're using is different than the version this build of Hydrogen-UI is targeting. You may run into unexpected errors if these versions don't match. Received verion: "${storefrontApiVersion}"; expected version ${SFAPI_VERSION}`
13
+ `StorefrontClient: The Storefront API version that you're using is different than the version this build of Hydrogen-UI is targeting. You may run into unexpected errors if these versions don't match. Received verion: "${storefrontApiVersion}"; expected version "${storefrontApiConstants.SFAPI_VERSION}"`
12
14
  );
13
15
  }
14
16
  return {
@@ -51,7 +53,5 @@ function createStorefrontClient({
51
53
  }
52
54
  };
53
55
  }
54
- export {
55
- createStorefrontClient
56
- };
56
+ exports.createStorefrontClient = createStorefrontClient;
57
57
  //# sourceMappingURL=storefront-client.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"storefront-client.js","sources":["../../src/storefront-client.ts"],"sourcesContent":["import {SFAPI_VERSION} from './storefront-api-constants.js';\n\n/**\n * The `createStorefrontClient()` function creates helpers that enable you to quickly query the Shopify Storefront API.\n *\n * When used on the server, it is recommended to use the `privateStorefrontToken` prop. When used on the client, it is recommended to use the `publicStorefrontToken` prop.\n */\nexport function createStorefrontClient({\n storeDomain,\n privateStorefrontToken,\n publicStorefrontToken,\n storefrontApiVersion,\n contentType,\n}: StorefrontClientProps): StorefrontClientReturn {\n if (storefrontApiVersion !== SFAPI_VERSION) {\n console.warn(\n `StorefrontClient: The Storefront API version that you're using is different than the version this build of Hydrogen-UI is targeting. You may run into unexpected errors if these versions don't match. Received verion: \"${storefrontApiVersion}\"; expected version ${SFAPI_VERSION}`\n );\n }\n\n // only warn if not in a browser environment\n if (__HYDROGEN_DEV__ && !privateStorefrontToken && !globalThis.document) {\n console.warn(\n `StorefrontClient: Using a private storefront token is recommended for server environments. Refer to the authentication https://shopify.dev/api/storefront#authentication documentation for more details. `\n );\n }\n\n // only warn if in a browser environment and you're using the privateStorefrontToken\n if (__HYDROGEN_DEV__ && privateStorefrontToken && globalThis) {\n console.warn(\n `StorefrontClient: You are attempting to use a private token in an environment where it can be easily accessed by anyone. This is a security risk; please use the public token and the 'publicStorefrontToken' prop`\n );\n }\n\n return {\n getStorefrontApiUrl(overrideProps) {\n return `https://${\n overrideProps?.storeDomain ?? storeDomain\n }.myshopify.com/api/${\n overrideProps?.storefrontApiVersion ?? storefrontApiVersion\n }/graphql.json`;\n },\n getPrivateTokenHeaders(overrideProps) {\n if (!privateStorefrontToken && !overrideProps?.privateStorefrontToken) {\n throw new Error(\n `StorefrontClient: You did not pass in a 'privateStorefrontToken' while using 'getPrivateTokenHeaders()'`\n );\n }\n\n if (__HYDROGEN_DEV__ && !overrideProps?.buyerIp) {\n console.warn(\n `StorefrontClient: it is recommended to pass in the 'buyerIp' property which improves analytics and data in the admin.`\n );\n }\n\n const finalContentType = overrideProps?.contentType ?? contentType;\n\n return {\n // default to json\n 'content-type':\n finalContentType === 'graphql'\n ? 'application/graphql'\n : 'application/json',\n 'X-SDK-Variant': 'hydrogen-ui',\n 'X-SDK-Variant-Source': 'react',\n 'X-SDK-Version': storefrontApiVersion,\n 'Shopify-Storefront-Private-Token':\n overrideProps?.privateStorefrontToken ?? privateStorefrontToken ?? '',\n ...(overrideProps?.buyerIp\n ? {'Shopify-Storefront-Buyer-IP': overrideProps.buyerIp}\n : {}),\n };\n },\n getPublicTokenHeaders(overrideProps) {\n if (!publicStorefrontToken && !overrideProps?.publicStorefrontToken) {\n throw new Error(\n `StorefrontClient: You did not pass in a 'publicStorefrontToken' while using 'getPublicTokenHeaders()'`\n );\n }\n\n const finalContentType = overrideProps?.contentType ?? contentType;\n\n return {\n // default to json\n 'content-type':\n finalContentType === 'graphql'\n ? 'application/graphql'\n : 'application/json',\n 'X-SDK-Variant': 'hydrogen-ui',\n 'X-SDK-Variant-Source': 'react',\n 'X-SDK-Version': storefrontApiVersion,\n 'X-Shopify-Storefront-Access-Token':\n overrideProps?.publicStorefrontToken ?? publicStorefrontToken ?? '',\n };\n },\n };\n}\n\ntype StorefrontClientProps = {\n /** The host name of the domain (eg: `{shop}.myshopify.com`). */\n storeDomain: string;\n /** The Storefront API delegate access token. Refer to the [authentication](https://shopify.dev/api/storefront#authentication) and [delegate access token](https://shopify.dev/apps/auth/oauth/delegate-access-tokens) documentation for more details. */\n privateStorefrontToken?: string;\n /** The Storefront API access token. Refer to the [authentication](https://shopify.dev/api/storefront#authentication) documentation for more details. */\n publicStorefrontToken?: string;\n /** The Storefront API version. This should almost always be the same as the version Hydrogen-UI was built for. Learn more about Shopify [API versioning](https://shopify.dev/api/usage/versioning) for more details. */\n storefrontApiVersion: string;\n /**\n * Customizes which `\"content-type\"` header is added when using `getPrivateTokenHeaders()` and `getPublicTokenHeaders()`. When fetching with a `JSON.stringify()`-ed `body`, use `\"json\"`. When fetching with a `body` that is a plain string, use `\"graphql\"`. Defaults to `\"json\"`\n *\n * Can also be customized on a call-by-call basis by passing in `'contentType'` to both `getPrivateTokenHeaders({...})` and `getPublicTokenHeaders({...})`, for example: `getPublicTokenHeaders({contentType: 'graphql'})`\n */\n contentType?: 'json' | 'graphql';\n};\n\ntype OverrideTokenHeaderProps = Partial<\n Pick<StorefrontClientProps, 'contentType'>\n>;\n\ntype StorefrontClientReturn = {\n /**\n * Creates the fully-qualified URL to your store's GraphQL endpoint.\n *\n * By default, it will use the config you passed in when calling `createStorefrontClient()`. However, you can override the following settings on each invocation of `getStorefrontApiUrl({...})`:\n *\n * - `storeDomain`\n * - `storefrontApiVersion`\n */\n getStorefrontApiUrl: (\n props?: Partial<\n Pick<StorefrontClientProps, 'storeDomain' | 'storefrontApiVersion'>\n >\n ) => string;\n /**\n * Returns an object that contains headers that are needed for each query to Storefront API GraphQL endpoint. This method uses the private Server-to-Server token which reduces the chance of throttling but must not be exposed to clients. Server-side calls should prefer using this over `getPublicTokenHeaders()`.\n *\n * By default, it will use the config you passed in when calling `createStorefrontClient()`. However, you can override the following settings on each invocation of `getPrivateTokenHeaders({...})`:\n *\n * - `contentType`\n * - `privateStorefrontToken`\n * - `buyerIp`\n *\n * Note that `contentType` defaults to what you configured in `createStorefrontClient({...})` and defaults to `'json'`, but a specific call may require using `graphql`. When using `JSON.stringify()` on the `body`, use `'json'`; otherwise, use `'graphql'`.\n */\n getPrivateTokenHeaders: (\n props?: OverrideTokenHeaderProps &\n Pick<StorefrontClientProps, 'privateStorefrontToken'> & {\n /**\n * The client's IP address. Passing this to the Storefront API when using a server-to-server token will help improve your store's analytics data.\n */\n buyerIp?: string;\n }\n ) => Record<string, string>;\n /**\n * Returns an object that contains headers that are needed for each query to Storefront API GraphQL endpoint. This method uses the private Server-to-Server token which reduces the chance of throttling but must not be exposed to clients. Server-side calls should prefer using this over `getPublicTokenHeaders()`.\n *\n * By default, it will use the config you passed in when calling `createStorefrontClient()`. However, you can override the following settings on each invocation of `getPrivateTokenHeaders({...})`:\n *\n * - `contentType`\n * - `publicStorefrontToken`\n *\n * Note that `contentType` defaults to what you configured in `createStorefrontClient({...})` and defaults to `'json'`, but a specific call may require using `graphql`. When using `JSON.stringify()` on the `body`, use `'json'`; otherwise, use `'graphql'`.\n */\n getPublicTokenHeaders: (\n props?: OverrideTokenHeaderProps &\n Pick<StorefrontClientProps, 'publicStorefrontToken'>\n ) => Record<string, string>;\n};\n"],"names":[],"mappings":";AAOO,SAAS,uBAAuB;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAkD;AAChD,MAAI,yBAAyB,eAAe;AAClC,YAAA;AAAA,MACN,4NAA4N,2CAA2C;AAAA,IAAA;AAAA,EAE3Q;AAgBO,SAAA;AAAA,IACL,oBAAoB,eAAe;;AACjC,aAAO,YACL,oDAAe,gBAAf,YAA8B,kCAE9B,oDAAe,yBAAf,YAAuC;AAAA,IAE3C;AAAA,IACA,uBAAuB,eAAe;;AACpC,UAAI,CAAC,0BAA0B,EAAC,+CAAe,yBAAwB;AACrE,cAAM,IAAI;AAAA,UACR;AAAA,QAAA;AAAA,MAEJ;AAQM,YAAA,oBAAmB,oDAAe,gBAAf,YAA8B;AAEhD,aAAA;AAAA,QAEL,gBACE,qBAAqB,YACjB,wBACA;AAAA,QACN,iBAAiB;AAAA,QACjB,wBAAwB;AAAA,QACxB,iBAAiB;AAAA,QACjB,qCACE,0DAAe,2BAAf,YAAyC,2BAAzC,YAAmE;AAAA,QACrE,IAAI,+CAAe,WACf,EAAC,+BAA+B,cAAc,QAAA,IAC9C,CAAC;AAAA,MAAA;AAAA,IAET;AAAA,IACA,sBAAsB,eAAe;;AACnC,UAAI,CAAC,yBAAyB,EAAC,+CAAe,wBAAuB;AACnE,cAAM,IAAI;AAAA,UACR;AAAA,QAAA;AAAA,MAEJ;AAEM,YAAA,oBAAmB,oDAAe,gBAAf,YAA8B;AAEhD,aAAA;AAAA,QAEL,gBACE,qBAAqB,YACjB,wBACA;AAAA,QACN,iBAAiB;AAAA,QACjB,wBAAwB;AAAA,QACxB,iBAAiB;AAAA,QACjB,sCACE,0DAAe,0BAAf,YAAwC,0BAAxC,YAAiE;AAAA,MAAA;AAAA,IAEvE;AAAA,EAAA;AAEJ;"}
1
+ {"version":3,"file":"storefront-client.js","sources":["../../src/storefront-client.ts"],"sourcesContent":["import {SFAPI_VERSION} from './storefront-api-constants.js';\n\n/**\n * The `createStorefrontClient()` function creates helpers that enable you to quickly query the Shopify Storefront API.\n *\n * When used on the server, it is recommended to use the `privateStorefrontToken` prop. When used on the client, it is recommended to use the `publicStorefrontToken` prop.\n */\nexport function createStorefrontClient({\n storeDomain,\n privateStorefrontToken,\n publicStorefrontToken,\n storefrontApiVersion,\n contentType,\n}: StorefrontClientProps): StorefrontClientReturn {\n if (storefrontApiVersion !== SFAPI_VERSION) {\n console.warn(\n `StorefrontClient: The Storefront API version that you're using is different than the version this build of Hydrogen-UI is targeting. You may run into unexpected errors if these versions don't match. Received verion: \"${storefrontApiVersion}\"; expected version \"${SFAPI_VERSION}\"`\n );\n }\n\n // only warn if not in a browser environment\n if (__HYDROGEN_DEV__ && !privateStorefrontToken && !globalThis.document) {\n console.warn(\n `StorefrontClient: Using a private storefront token is recommended for server environments. Refer to the authentication https://shopify.dev/api/storefront#authentication documentation for more details. `\n );\n }\n\n // only warn if in a browser environment and you're using the privateStorefrontToken\n if (__HYDROGEN_DEV__ && privateStorefrontToken && globalThis) {\n console.warn(\n `StorefrontClient: You are attempting to use a private token in an environment where it can be easily accessed by anyone. This is a security risk; please use the public token and the 'publicStorefrontToken' prop`\n );\n }\n\n return {\n getStorefrontApiUrl(overrideProps) {\n return `https://${\n overrideProps?.storeDomain ?? storeDomain\n }.myshopify.com/api/${\n overrideProps?.storefrontApiVersion ?? storefrontApiVersion\n }/graphql.json`;\n },\n getPrivateTokenHeaders(overrideProps) {\n if (!privateStorefrontToken && !overrideProps?.privateStorefrontToken) {\n throw new Error(\n `StorefrontClient: You did not pass in a 'privateStorefrontToken' while using 'getPrivateTokenHeaders()'`\n );\n }\n\n if (__HYDROGEN_DEV__ && !overrideProps?.buyerIp) {\n console.warn(\n `StorefrontClient: it is recommended to pass in the 'buyerIp' property which improves analytics and data in the admin.`\n );\n }\n\n const finalContentType = overrideProps?.contentType ?? contentType;\n\n return {\n // default to json\n 'content-type':\n finalContentType === 'graphql'\n ? 'application/graphql'\n : 'application/json',\n 'X-SDK-Variant': 'hydrogen-ui',\n 'X-SDK-Variant-Source': 'react',\n 'X-SDK-Version': storefrontApiVersion,\n 'Shopify-Storefront-Private-Token':\n overrideProps?.privateStorefrontToken ?? privateStorefrontToken ?? '',\n ...(overrideProps?.buyerIp\n ? {'Shopify-Storefront-Buyer-IP': overrideProps.buyerIp}\n : {}),\n };\n },\n getPublicTokenHeaders(overrideProps) {\n if (!publicStorefrontToken && !overrideProps?.publicStorefrontToken) {\n throw new Error(\n `StorefrontClient: You did not pass in a 'publicStorefrontToken' while using 'getPublicTokenHeaders()'`\n );\n }\n\n const finalContentType = overrideProps?.contentType ?? contentType;\n\n return {\n // default to json\n 'content-type':\n finalContentType === 'graphql'\n ? 'application/graphql'\n : 'application/json',\n 'X-SDK-Variant': 'hydrogen-ui',\n 'X-SDK-Variant-Source': 'react',\n 'X-SDK-Version': storefrontApiVersion,\n 'X-Shopify-Storefront-Access-Token':\n overrideProps?.publicStorefrontToken ?? publicStorefrontToken ?? '',\n };\n },\n };\n}\n\ntype StorefrontClientProps = {\n /** The host name of the domain (eg: `{shop}.myshopify.com`). */\n storeDomain: string;\n /** The Storefront API delegate access token. Refer to the [authentication](https://shopify.dev/api/storefront#authentication) and [delegate access token](https://shopify.dev/apps/auth/oauth/delegate-access-tokens) documentation for more details. */\n privateStorefrontToken?: string;\n /** The Storefront API access token. Refer to the [authentication](https://shopify.dev/api/storefront#authentication) documentation for more details. */\n publicStorefrontToken?: string;\n /** The Storefront API version. This should almost always be the same as the version Hydrogen-UI was built for. Learn more about Shopify [API versioning](https://shopify.dev/api/usage/versioning) for more details. */\n storefrontApiVersion: string;\n /**\n * Customizes which `\"content-type\"` header is added when using `getPrivateTokenHeaders()` and `getPublicTokenHeaders()`. When fetching with a `JSON.stringify()`-ed `body`, use `\"json\"`. When fetching with a `body` that is a plain string, use `\"graphql\"`. Defaults to `\"json\"`\n *\n * Can also be customized on a call-by-call basis by passing in `'contentType'` to both `getPrivateTokenHeaders({...})` and `getPublicTokenHeaders({...})`, for example: `getPublicTokenHeaders({contentType: 'graphql'})`\n */\n contentType?: 'json' | 'graphql';\n};\n\ntype OverrideTokenHeaderProps = Partial<\n Pick<StorefrontClientProps, 'contentType'>\n>;\n\ntype StorefrontClientReturn = {\n /**\n * Creates the fully-qualified URL to your store's GraphQL endpoint.\n *\n * By default, it will use the config you passed in when calling `createStorefrontClient()`. However, you can override the following settings on each invocation of `getStorefrontApiUrl({...})`:\n *\n * - `storeDomain`\n * - `storefrontApiVersion`\n */\n getStorefrontApiUrl: (\n props?: Partial<\n Pick<StorefrontClientProps, 'storeDomain' | 'storefrontApiVersion'>\n >\n ) => string;\n /**\n * Returns an object that contains headers that are needed for each query to Storefront API GraphQL endpoint. This method uses the private Server-to-Server token which reduces the chance of throttling but must not be exposed to clients. Server-side calls should prefer using this over `getPublicTokenHeaders()`.\n *\n * By default, it will use the config you passed in when calling `createStorefrontClient()`. However, you can override the following settings on each invocation of `getPrivateTokenHeaders({...})`:\n *\n * - `contentType`\n * - `privateStorefrontToken`\n * - `buyerIp`\n *\n * Note that `contentType` defaults to what you configured in `createStorefrontClient({...})` and defaults to `'json'`, but a specific call may require using `graphql`. When using `JSON.stringify()` on the `body`, use `'json'`; otherwise, use `'graphql'`.\n */\n getPrivateTokenHeaders: (\n props?: OverrideTokenHeaderProps &\n Pick<StorefrontClientProps, 'privateStorefrontToken'> & {\n /**\n * The client's IP address. Passing this to the Storefront API when using a server-to-server token will help improve your store's analytics data.\n */\n buyerIp?: string;\n }\n ) => Record<string, string>;\n /**\n * Returns an object that contains headers that are needed for each query to Storefront API GraphQL endpoint. This method uses the private Server-to-Server token which reduces the chance of throttling but must not be exposed to clients. Server-side calls should prefer using this over `getPublicTokenHeaders()`.\n *\n * By default, it will use the config you passed in when calling `createStorefrontClient()`. However, you can override the following settings on each invocation of `getPrivateTokenHeaders({...})`:\n *\n * - `contentType`\n * - `publicStorefrontToken`\n *\n * Note that `contentType` defaults to what you configured in `createStorefrontClient({...})` and defaults to `'json'`, but a specific call may require using `graphql`. When using `JSON.stringify()` on the `body`, use `'json'`; otherwise, use `'graphql'`.\n */\n getPublicTokenHeaders: (\n props?: OverrideTokenHeaderProps &\n Pick<StorefrontClientProps, 'publicStorefrontToken'>\n ) => Record<string, string>;\n};\n"],"names":["SFAPI_VERSION"],"mappings":";;;AAOO,SAAS,uBAAuB;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAkD;AAChD,MAAI,yBAAyBA,uBAAAA,eAAe;AAClC,YAAA;AAAA,MACN,4NAA4N,4CAA4CA,uBAAAA;AAAAA,IAAA;AAAA,EAE5Q;AAgBO,SAAA;AAAA,IACL,oBAAoB,eAAe;;AACjC,aAAO,YACL,oDAAe,gBAAf,YAA8B,kCAE9B,oDAAe,yBAAf,YAAuC;AAAA,IAE3C;AAAA,IACA,uBAAuB,eAAe;;AACpC,UAAI,CAAC,0BAA0B,EAAC,+CAAe,yBAAwB;AACrE,cAAM,IAAI;AAAA,UACR;AAAA,QAAA;AAAA,MAEJ;AAQM,YAAA,oBAAmB,oDAAe,gBAAf,YAA8B;AAEhD,aAAA;AAAA,QAEL,gBACE,qBAAqB,YACjB,wBACA;AAAA,QACN,iBAAiB;AAAA,QACjB,wBAAwB;AAAA,QACxB,iBAAiB;AAAA,QACjB,qCACE,0DAAe,2BAAf,YAAyC,2BAAzC,YAAmE;AAAA,QACrE,IAAI,+CAAe,WACf,EAAC,+BAA+B,cAAc,QAAA,IAC9C,CAAC;AAAA,MAAA;AAAA,IAET;AAAA,IACA,sBAAsB,eAAe;;AACnC,UAAI,CAAC,yBAAyB,EAAC,+CAAe,wBAAuB;AACnE,cAAM,IAAI;AAAA,UACR;AAAA,QAAA;AAAA,MAEJ;AAEM,YAAA,oBAAmB,oDAAe,gBAAf,YAA8B;AAEhD,aAAA;AAAA,QAEL,gBACE,qBAAqB,YACjB,wBACA;AAAA,QACN,iBAAiB;AAAA,QACjB,wBAAwB;AAAA,QACxB,iBAAiB;AAAA,QACjB,sCACE,0DAAe,0BAAf,YAAwC,0BAAxC,YAAiE;AAAA,MAAA;AAAA,IAEvE;AAAA,EAAA;AAEJ;;"}
@@ -1,6 +1,4 @@
1
- "use strict";
2
- Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const storefrontApiConstants = require("./storefront-api-constants.cjs");
1
+ import { SFAPI_VERSION } from "./storefront-api-constants.mjs";
4
2
  function createStorefrontClient({
5
3
  storeDomain,
6
4
  privateStorefrontToken,
@@ -8,9 +6,9 @@ function createStorefrontClient({
8
6
  storefrontApiVersion,
9
7
  contentType
10
8
  }) {
11
- if (storefrontApiVersion !== storefrontApiConstants.SFAPI_VERSION) {
9
+ if (storefrontApiVersion !== SFAPI_VERSION) {
12
10
  console.warn(
13
- `StorefrontClient: The Storefront API version that you're using is different than the version this build of Hydrogen-UI is targeting. You may run into unexpected errors if these versions don't match. Received verion: "${storefrontApiVersion}"; expected version ${storefrontApiConstants.SFAPI_VERSION}`
11
+ `StorefrontClient: The Storefront API version that you're using is different than the version this build of Hydrogen-UI is targeting. You may run into unexpected errors if these versions don't match. Received verion: "${storefrontApiVersion}"; expected version "${SFAPI_VERSION}"`
14
12
  );
15
13
  }
16
14
  return {
@@ -53,5 +51,7 @@ function createStorefrontClient({
53
51
  }
54
52
  };
55
53
  }
56
- exports.createStorefrontClient = createStorefrontClient;
57
- //# sourceMappingURL=storefront-client.cjs.map
54
+ export {
55
+ createStorefrontClient
56
+ };
57
+ //# sourceMappingURL=storefront-client.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storefront-client.mjs","sources":["../../src/storefront-client.ts"],"sourcesContent":["import {SFAPI_VERSION} from './storefront-api-constants.js';\n\n/**\n * The `createStorefrontClient()` function creates helpers that enable you to quickly query the Shopify Storefront API.\n *\n * When used on the server, it is recommended to use the `privateStorefrontToken` prop. When used on the client, it is recommended to use the `publicStorefrontToken` prop.\n */\nexport function createStorefrontClient({\n storeDomain,\n privateStorefrontToken,\n publicStorefrontToken,\n storefrontApiVersion,\n contentType,\n}: StorefrontClientProps): StorefrontClientReturn {\n if (storefrontApiVersion !== SFAPI_VERSION) {\n console.warn(\n `StorefrontClient: The Storefront API version that you're using is different than the version this build of Hydrogen-UI is targeting. You may run into unexpected errors if these versions don't match. Received verion: \"${storefrontApiVersion}\"; expected version \"${SFAPI_VERSION}\"`\n );\n }\n\n // only warn if not in a browser environment\n if (__HYDROGEN_DEV__ && !privateStorefrontToken && !globalThis.document) {\n console.warn(\n `StorefrontClient: Using a private storefront token is recommended for server environments. Refer to the authentication https://shopify.dev/api/storefront#authentication documentation for more details. `\n );\n }\n\n // only warn if in a browser environment and you're using the privateStorefrontToken\n if (__HYDROGEN_DEV__ && privateStorefrontToken && globalThis) {\n console.warn(\n `StorefrontClient: You are attempting to use a private token in an environment where it can be easily accessed by anyone. This is a security risk; please use the public token and the 'publicStorefrontToken' prop`\n );\n }\n\n return {\n getStorefrontApiUrl(overrideProps) {\n return `https://${\n overrideProps?.storeDomain ?? storeDomain\n }.myshopify.com/api/${\n overrideProps?.storefrontApiVersion ?? storefrontApiVersion\n }/graphql.json`;\n },\n getPrivateTokenHeaders(overrideProps) {\n if (!privateStorefrontToken && !overrideProps?.privateStorefrontToken) {\n throw new Error(\n `StorefrontClient: You did not pass in a 'privateStorefrontToken' while using 'getPrivateTokenHeaders()'`\n );\n }\n\n if (__HYDROGEN_DEV__ && !overrideProps?.buyerIp) {\n console.warn(\n `StorefrontClient: it is recommended to pass in the 'buyerIp' property which improves analytics and data in the admin.`\n );\n }\n\n const finalContentType = overrideProps?.contentType ?? contentType;\n\n return {\n // default to json\n 'content-type':\n finalContentType === 'graphql'\n ? 'application/graphql'\n : 'application/json',\n 'X-SDK-Variant': 'hydrogen-ui',\n 'X-SDK-Variant-Source': 'react',\n 'X-SDK-Version': storefrontApiVersion,\n 'Shopify-Storefront-Private-Token':\n overrideProps?.privateStorefrontToken ?? privateStorefrontToken ?? '',\n ...(overrideProps?.buyerIp\n ? {'Shopify-Storefront-Buyer-IP': overrideProps.buyerIp}\n : {}),\n };\n },\n getPublicTokenHeaders(overrideProps) {\n if (!publicStorefrontToken && !overrideProps?.publicStorefrontToken) {\n throw new Error(\n `StorefrontClient: You did not pass in a 'publicStorefrontToken' while using 'getPublicTokenHeaders()'`\n );\n }\n\n const finalContentType = overrideProps?.contentType ?? contentType;\n\n return {\n // default to json\n 'content-type':\n finalContentType === 'graphql'\n ? 'application/graphql'\n : 'application/json',\n 'X-SDK-Variant': 'hydrogen-ui',\n 'X-SDK-Variant-Source': 'react',\n 'X-SDK-Version': storefrontApiVersion,\n 'X-Shopify-Storefront-Access-Token':\n overrideProps?.publicStorefrontToken ?? publicStorefrontToken ?? '',\n };\n },\n };\n}\n\ntype StorefrontClientProps = {\n /** The host name of the domain (eg: `{shop}.myshopify.com`). */\n storeDomain: string;\n /** The Storefront API delegate access token. Refer to the [authentication](https://shopify.dev/api/storefront#authentication) and [delegate access token](https://shopify.dev/apps/auth/oauth/delegate-access-tokens) documentation for more details. */\n privateStorefrontToken?: string;\n /** The Storefront API access token. Refer to the [authentication](https://shopify.dev/api/storefront#authentication) documentation for more details. */\n publicStorefrontToken?: string;\n /** The Storefront API version. This should almost always be the same as the version Hydrogen-UI was built for. Learn more about Shopify [API versioning](https://shopify.dev/api/usage/versioning) for more details. */\n storefrontApiVersion: string;\n /**\n * Customizes which `\"content-type\"` header is added when using `getPrivateTokenHeaders()` and `getPublicTokenHeaders()`. When fetching with a `JSON.stringify()`-ed `body`, use `\"json\"`. When fetching with a `body` that is a plain string, use `\"graphql\"`. Defaults to `\"json\"`\n *\n * Can also be customized on a call-by-call basis by passing in `'contentType'` to both `getPrivateTokenHeaders({...})` and `getPublicTokenHeaders({...})`, for example: `getPublicTokenHeaders({contentType: 'graphql'})`\n */\n contentType?: 'json' | 'graphql';\n};\n\ntype OverrideTokenHeaderProps = Partial<\n Pick<StorefrontClientProps, 'contentType'>\n>;\n\ntype StorefrontClientReturn = {\n /**\n * Creates the fully-qualified URL to your store's GraphQL endpoint.\n *\n * By default, it will use the config you passed in when calling `createStorefrontClient()`. However, you can override the following settings on each invocation of `getStorefrontApiUrl({...})`:\n *\n * - `storeDomain`\n * - `storefrontApiVersion`\n */\n getStorefrontApiUrl: (\n props?: Partial<\n Pick<StorefrontClientProps, 'storeDomain' | 'storefrontApiVersion'>\n >\n ) => string;\n /**\n * Returns an object that contains headers that are needed for each query to Storefront API GraphQL endpoint. This method uses the private Server-to-Server token which reduces the chance of throttling but must not be exposed to clients. Server-side calls should prefer using this over `getPublicTokenHeaders()`.\n *\n * By default, it will use the config you passed in when calling `createStorefrontClient()`. However, you can override the following settings on each invocation of `getPrivateTokenHeaders({...})`:\n *\n * - `contentType`\n * - `privateStorefrontToken`\n * - `buyerIp`\n *\n * Note that `contentType` defaults to what you configured in `createStorefrontClient({...})` and defaults to `'json'`, but a specific call may require using `graphql`. When using `JSON.stringify()` on the `body`, use `'json'`; otherwise, use `'graphql'`.\n */\n getPrivateTokenHeaders: (\n props?: OverrideTokenHeaderProps &\n Pick<StorefrontClientProps, 'privateStorefrontToken'> & {\n /**\n * The client's IP address. Passing this to the Storefront API when using a server-to-server token will help improve your store's analytics data.\n */\n buyerIp?: string;\n }\n ) => Record<string, string>;\n /**\n * Returns an object that contains headers that are needed for each query to Storefront API GraphQL endpoint. This method uses the private Server-to-Server token which reduces the chance of throttling but must not be exposed to clients. Server-side calls should prefer using this over `getPublicTokenHeaders()`.\n *\n * By default, it will use the config you passed in when calling `createStorefrontClient()`. However, you can override the following settings on each invocation of `getPrivateTokenHeaders({...})`:\n *\n * - `contentType`\n * - `publicStorefrontToken`\n *\n * Note that `contentType` defaults to what you configured in `createStorefrontClient({...})` and defaults to `'json'`, but a specific call may require using `graphql`. When using `JSON.stringify()` on the `body`, use `'json'`; otherwise, use `'graphql'`.\n */\n getPublicTokenHeaders: (\n props?: OverrideTokenHeaderProps &\n Pick<StorefrontClientProps, 'publicStorefrontToken'>\n ) => Record<string, string>;\n};\n"],"names":[],"mappings":";AAOO,SAAS,uBAAuB;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAkD;AAChD,MAAI,yBAAyB,eAAe;AAClC,YAAA;AAAA,MACN,4NAA4N,4CAA4C;AAAA,IAAA;AAAA,EAE5Q;AAgBO,SAAA;AAAA,IACL,oBAAoB,eAAe;;AACjC,aAAO,YACL,oDAAe,gBAAf,YAA8B,kCAE9B,oDAAe,yBAAf,YAAuC;AAAA,IAE3C;AAAA,IACA,uBAAuB,eAAe;;AACpC,UAAI,CAAC,0BAA0B,EAAC,+CAAe,yBAAwB;AACrE,cAAM,IAAI;AAAA,UACR;AAAA,QAAA;AAAA,MAEJ;AAQM,YAAA,oBAAmB,oDAAe,gBAAf,YAA8B;AAEhD,aAAA;AAAA,QAEL,gBACE,qBAAqB,YACjB,wBACA;AAAA,QACN,iBAAiB;AAAA,QACjB,wBAAwB;AAAA,QACxB,iBAAiB;AAAA,QACjB,qCACE,0DAAe,2BAAf,YAAyC,2BAAzC,YAAmE;AAAA,QACrE,IAAI,+CAAe,WACf,EAAC,+BAA+B,cAAc,QAAA,IAC9C,CAAC;AAAA,MAAA;AAAA,IAET;AAAA,IACA,sBAAsB,eAAe;;AACnC,UAAI,CAAC,yBAAyB,EAAC,+CAAe,wBAAuB;AACnE,cAAM,IAAI;AAAA,UACR;AAAA,QAAA;AAAA,MAEJ;AAEM,YAAA,oBAAmB,oDAAe,gBAAf,YAA8B;AAEhD,aAAA;AAAA,QAEL,gBACE,qBAAqB,YACjB,wBACA;AAAA,QACN,iBAAiB;AAAA,QACjB,wBAAwB;AAAA,QACxB,iBAAiB;AAAA,QACjB,sCACE,0DAAe,0BAAf,YAAwC,0BAAxC,YAAiE;AAAA,MAAA;AAAA,IAEvE;AAAA,EAAA;AAEJ;"}
@@ -1,15 +1,17 @@
1
- import { useMachine } from "@xstate/react/fsm";
2
- import { assign, createMachine } from "@xstate/fsm";
3
- import { flattenConnection } from "./flatten-connection.js";
4
- import { useCartActions } from "./useCartActions.js";
5
- import { useMemo } from "react";
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const fsm = require("./node_modules/@xstate/react/es/fsm.js");
4
+ const index = require("./node_modules/@xstate/fsm/es/index.js");
5
+ const flattenConnection = require("./flatten-connection.js");
6
+ const useCartActions = require("./useCartActions.js");
7
+ const require$$0 = require("react");
6
8
  function invokeCart(action, options) {
7
9
  return {
8
10
  entry: [...(options == null ? void 0 : options.entryActions) || [], "onCartActionEntry", "onCartActionOptimisticUI", action],
9
11
  on: {
10
12
  RESOLVE: {
11
13
  target: (options == null ? void 0 : options.resolveTarget) || "idle",
12
- actions: [assign({
14
+ actions: [index.assign({
13
15
  prevCart: (context) => context == null ? void 0 : context.cart,
14
16
  cart: (_, event) => {
15
17
  var _a;
@@ -24,7 +26,7 @@ function invokeCart(action, options) {
24
26
  },
25
27
  ERROR: {
26
28
  target: (options == null ? void 0 : options.errorTarget) || "error",
27
- actions: [assign({
29
+ actions: [index.assign({
28
30
  prevCart: (context) => context == null ? void 0 : context.cart,
29
31
  cart: (context) => context == null ? void 0 : context.lastValidCart,
30
32
  errors: (_, event) => {
@@ -35,7 +37,7 @@ function invokeCart(action, options) {
35
37
  },
36
38
  CART_COMPLETED: {
37
39
  target: "cartCompleted",
38
- actions: assign({
40
+ actions: index.assign({
39
41
  prevCart: (_) => void 0,
40
42
  cart: (_) => void 0,
41
43
  lastValidCart: (_) => void 0,
@@ -55,7 +57,7 @@ const INITIALIZING_CART_EVENTS = {
55
57
  },
56
58
  CART_SET: {
57
59
  target: "idle",
58
- actions: [assign({
60
+ actions: [index.assign({
59
61
  rawCartResult: (_, event) => event.payload.cart,
60
62
  cart: (_, event) => cartFromGraphQL(event.payload.cart)
61
63
  })]
@@ -85,7 +87,7 @@ const UPDATING_CART_EVENTS = {
85
87
  }
86
88
  };
87
89
  function createCartMachine(initialCart) {
88
- return createMachine({
90
+ return index.createMachine({
89
91
  id: "Cart",
90
92
  initial: initialCart ? "idle" : "uninitialized",
91
93
  context: {
@@ -148,13 +150,13 @@ function useCartAPIStateMachine({
148
150
  buyerIdentityUpdate,
149
151
  cartAttributesUpdate,
150
152
  discountCodesUpdate
151
- } = useCartActions({
153
+ } = useCartActions.useCartActions({
152
154
  numCartLines,
153
155
  cartFragment,
154
156
  countryCode
155
157
  });
156
- const cartMachine = useMemo(() => createCartMachine(cart), [cart]);
157
- const [state, send, service] = useMachine(cartMachine, {
158
+ const cartMachine = require$$0.useMemo(() => createCartMachine(cart), [cart]);
159
+ const [state, send, service] = fsm.useMachine(cartMachine, {
158
160
  actions: {
159
161
  cartFetchAction: async (_, event) => {
160
162
  var _a;
@@ -263,7 +265,7 @@ function useCartAPIStateMachine({
263
265
  }
264
266
  },
265
267
  ...onCartActionOptimisticUI && {
266
- onCartActionOptimisticUI: assign((context, event) => {
268
+ onCartActionOptimisticUI: index.assign((context, event) => {
267
269
  return onCartActionOptimisticUI(context, event);
268
270
  })
269
271
  },
@@ -276,13 +278,13 @@ function useCartAPIStateMachine({
276
278
  }
277
279
  }
278
280
  });
279
- return useMemo(() => [state, send, service], [state, send, service]);
281
+ return require$$0.useMemo(() => [state, send, service], [state, send, service]);
280
282
  }
281
283
  function cartFromGraphQL(cart) {
282
284
  var _a;
283
285
  return {
284
286
  ...cart,
285
- lines: flattenConnection(cart == null ? void 0 : cart.lines),
287
+ lines: flattenConnection.flattenConnection(cart == null ? void 0 : cart.lines),
286
288
  note: (_a = cart.note) != null ? _a : void 0
287
289
  };
288
290
  }
@@ -319,8 +321,6 @@ function isCartActionEvent(event) {
319
321
  function isCartFetchResultEvent(event) {
320
322
  return event.type === "RESOLVE" || event.type === "ERROR" || event.type === "CART_COMPLETED";
321
323
  }
322
- export {
323
- cartFromGraphQL,
324
- useCartAPIStateMachine
325
- };
324
+ exports.cartFromGraphQL = cartFromGraphQL;
325
+ exports.useCartAPIStateMachine = useCartAPIStateMachine;
326
326
  //# sourceMappingURL=useCartAPIStateMachine.js.map