@shopify/hydrogen 2026.4.5 → 2026.10.0-preview.2

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 (764) hide show
  1. package/README.md +73 -13
  2. package/bin/hydrogen.mjs +7 -0
  3. package/dist/cli/index.mjs +647 -0
  4. package/dist/client/client.d.mts +34 -0
  5. package/dist/client/client.mjs +206 -0
  6. package/dist/client/client.mjs.map +1 -0
  7. package/dist/client/errors.d.mts +48 -0
  8. package/dist/client/errors.mjs +52 -0
  9. package/dist/client/errors.mjs.map +1 -0
  10. package/dist/client/index.d.mts +4 -0
  11. package/dist/client/types.d.mts +147 -0
  12. package/dist/core/analytics/cart-tracker.d.mts +8 -0
  13. package/dist/core/analytics/cart-tracker.mjs +144 -0
  14. package/dist/core/analytics/cart-tracker.mjs.map +1 -0
  15. package/dist/core/analytics/events.d.mts +15 -0
  16. package/dist/core/analytics/events.mjs +15 -0
  17. package/dist/core/analytics/events.mjs.map +1 -0
  18. package/dist/core/analytics/index.d.mts +3 -0
  19. package/dist/core/analytics/types.d.mts +143 -0
  20. package/dist/core/analytics/utils/flatten-connection.d.mts +19 -0
  21. package/dist/core/analytics/utils/flatten-connection.mjs +25 -0
  22. package/dist/core/analytics/utils/flatten-connection.mjs.map +1 -0
  23. package/dist/core/cache/cache-status.mjs +17 -0
  24. package/dist/core/cache/cache-status.mjs.map +1 -0
  25. package/dist/core/cache/fetch-with-cache.d.mts +43 -0
  26. package/dist/core/cache/fetch-with-cache.mjs +188 -0
  27. package/dist/core/cache/fetch-with-cache.mjs.map +1 -0
  28. package/dist/core/cache/key.d.mts +6 -0
  29. package/dist/core/cache/key.mjs +27 -0
  30. package/dist/core/cache/key.mjs.map +1 -0
  31. package/dist/core/cache/run-with-cache.d.mts +36 -0
  32. package/dist/core/cache/run-with-cache.mjs +114 -0
  33. package/dist/core/cache/run-with-cache.mjs.map +1 -0
  34. package/dist/core/cache/store.d.mts +19 -0
  35. package/dist/core/cache/store.mjs +62 -0
  36. package/dist/core/cache/store.mjs.map +1 -0
  37. package/dist/core/cache/strategies.d.mts +39 -0
  38. package/dist/core/cache/strategies.mjs +70 -0
  39. package/dist/core/cache/strategies.mjs.map +1 -0
  40. package/dist/core/cart/actions.d.mts +50 -0
  41. package/dist/core/cart/actions.mjs +240 -0
  42. package/dist/core/cart/actions.mjs.map +1 -0
  43. package/dist/core/cart/attach-quantity-input.d.mts +5 -0
  44. package/dist/core/cart/attach-quantity-input.mjs +17 -0
  45. package/dist/core/cart/attach-quantity-input.mjs.map +1 -0
  46. package/dist/core/cart/buyer-identity-sync.d.mts +23 -0
  47. package/dist/core/cart/buyer-identity-sync.mjs +9 -0
  48. package/dist/core/cart/buyer-identity-sync.mjs.map +1 -0
  49. package/dist/core/cart/cart.d.mts +37 -0
  50. package/dist/core/cart/cart.mjs +1707 -0
  51. package/dist/core/cart/cart.mjs.map +1 -0
  52. package/dist/core/cart/cookie.d.mts +5 -0
  53. package/dist/core/cart/cookie.mjs +28 -0
  54. package/dist/core/cart/cookie.mjs.map +1 -0
  55. package/dist/core/cart/form.d.mts +130 -0
  56. package/dist/core/cart/form.mjs +75 -0
  57. package/dist/core/cart/form.mjs.map +1 -0
  58. package/dist/core/cart/get-cart.d.mts +25 -0
  59. package/dist/core/cart/get-cart.mjs +32 -0
  60. package/dist/core/cart/get-cart.mjs.map +1 -0
  61. package/dist/core/cart/index.d.mts +10 -0
  62. package/dist/core/cart/quantity.d.mts +10 -0
  63. package/dist/core/cart/quantity.mjs +14 -0
  64. package/dist/core/cart/quantity.mjs.map +1 -0
  65. package/dist/core/cart/queries.d.mts +4296 -0
  66. package/dist/core/cart/queries.mjs +70 -0
  67. package/dist/core/cart/queries.mjs.map +1 -0
  68. package/dist/core/cart/server-handlers.d.mts +82 -0
  69. package/dist/core/cart/server-handlers.mjs +322 -0
  70. package/dist/core/cart/server-handlers.mjs.map +1 -0
  71. package/dist/core/cart/state.d.mts +137 -0
  72. package/dist/core/cart/state.mjs +76 -0
  73. package/dist/core/cart/state.mjs.map +1 -0
  74. package/dist/core/cart/sync-quantity-inputs.mjs +16 -0
  75. package/dist/core/cart/sync-quantity-inputs.mjs.map +1 -0
  76. package/dist/core/collection/collection.d.mts +134 -0
  77. package/dist/core/collection/collection.mjs +170 -0
  78. package/dist/core/collection/collection.mjs.map +1 -0
  79. package/dist/core/collection/index.d.mts +6 -0
  80. package/dist/core/collection/reconciler.d.mts +32 -0
  81. package/dist/core/collection/reconciler.mjs +89 -0
  82. package/dist/core/collection/reconciler.mjs.map +1 -0
  83. package/dist/core/collection/state.d.mts +66 -0
  84. package/dist/core/collection/state.mjs +20 -0
  85. package/dist/core/collection/state.mjs.map +1 -0
  86. package/dist/core/collection/url.d.mts +71 -0
  87. package/dist/core/collection/url.mjs +376 -0
  88. package/dist/core/collection/url.mjs.map +1 -0
  89. package/dist/core/constants.d.mts +5 -0
  90. package/dist/core/constants.mjs +8 -0
  91. package/dist/core/constants.mjs.map +1 -0
  92. package/dist/core/headers.mjs +43 -0
  93. package/dist/core/headers.mjs.map +1 -0
  94. package/dist/core/index.d.mts +56 -0
  95. package/dist/core/index.mjs +45 -0
  96. package/dist/core/logging/logging.d.mts +21 -0
  97. package/dist/core/logging/logging.mjs +99 -0
  98. package/dist/core/logging/logging.mjs.map +1 -0
  99. package/dist/core/logging/types.d.mts +40 -0
  100. package/dist/core/logging/types.mjs +18 -0
  101. package/dist/core/logging/types.mjs.map +1 -0
  102. package/dist/core/money/cache.mjs +25 -0
  103. package/dist/core/money/cache.mjs.map +1 -0
  104. package/dist/core/money/format.d.mts +15 -0
  105. package/dist/core/money/format.mjs +243 -0
  106. package/dist/core/money/format.mjs.map +1 -0
  107. package/dist/core/money/types.d.mts +47 -0
  108. package/dist/core/observable.mjs +46 -0
  109. package/dist/core/observable.mjs.map +1 -0
  110. package/dist/core/predictive-search/constants.d.mts +5 -0
  111. package/dist/core/predictive-search/constants.mjs +6 -0
  112. package/dist/core/predictive-search/constants.mjs.map +1 -0
  113. package/dist/core/predictive-search/form.d.mts +31 -0
  114. package/dist/core/predictive-search/form.mjs +31 -0
  115. package/dist/core/predictive-search/form.mjs.map +1 -0
  116. package/dist/core/predictive-search/index.d.mts +6 -0
  117. package/dist/core/predictive-search/queries.d.mts +118 -0
  118. package/dist/core/predictive-search/queries.mjs +81 -0
  119. package/dist/core/predictive-search/queries.mjs.map +1 -0
  120. package/dist/core/predictive-search/search.d.mts +32 -0
  121. package/dist/core/predictive-search/search.mjs +74 -0
  122. package/dist/core/predictive-search/search.mjs.map +1 -0
  123. package/dist/core/predictive-search/server-handlers.d.mts +36 -0
  124. package/dist/core/predictive-search/server-handlers.mjs +113 -0
  125. package/dist/core/predictive-search/server-handlers.mjs.map +1 -0
  126. package/dist/core/predictive-search/store.d.mts +44 -0
  127. package/dist/core/predictive-search/store.mjs +224 -0
  128. package/dist/core/predictive-search/store.mjs.map +1 -0
  129. package/dist/core/predictive-search/url.d.mts +41 -0
  130. package/dist/core/predictive-search/url.mjs +71 -0
  131. package/dist/core/predictive-search/url.mjs.map +1 -0
  132. package/dist/core/product/accept-variant-id.mjs +98 -0
  133. package/dist/core/product/accept-variant-id.mjs.map +1 -0
  134. package/dist/core/product/form.d.mts +63 -0
  135. package/dist/core/product/form.mjs +44 -0
  136. package/dist/core/product/form.mjs.map +1 -0
  137. package/dist/core/product/index.d.mts +5 -0
  138. package/dist/core/product/options.d.mts +43 -0
  139. package/dist/core/product/options.mjs +296 -0
  140. package/dist/core/product/options.mjs.map +1 -0
  141. package/dist/core/product/product-form.d.mts +72 -0
  142. package/dist/core/product/product-form.mjs +158 -0
  143. package/dist/core/product/product-form.mjs.map +1 -0
  144. package/dist/core/product/state.d.mts +68 -0
  145. package/dist/core/product/url.d.mts +47 -0
  146. package/dist/core/product/url.mjs +69 -0
  147. package/dist/core/product/url.mjs.map +1 -0
  148. package/dist/core/request-context.d.mts +75 -0
  149. package/dist/core/request-context.mjs +141 -0
  150. package/dist/core/request-context.mjs.map +1 -0
  151. package/dist/core/request-routing/handle-shopify-redirects.d.mts +17 -0
  152. package/dist/core/request-routing/handle-shopify-redirects.mjs +31 -0
  153. package/dist/core/request-routing/handle-shopify-redirects.mjs.map +1 -0
  154. package/dist/core/request-routing/handle-shopify-routes.d.mts +14 -0
  155. package/dist/core/request-routing/handle-shopify-routes.mjs +42 -0
  156. package/dist/core/request-routing/handle-shopify-routes.mjs.map +1 -0
  157. package/dist/core/request-routing/interceptors/admin-redirect.mjs +12 -0
  158. package/dist/core/request-routing/interceptors/admin-redirect.mjs.map +1 -0
  159. package/dist/core/request-routing/interceptors/ajax-api.mjs +16 -0
  160. package/dist/core/request-routing/interceptors/ajax-api.mjs.map +1 -0
  161. package/dist/core/request-routing/interceptors/api-proxy.mjs +20 -0
  162. package/dist/core/request-routing/interceptors/api-proxy.mjs.map +1 -0
  163. package/dist/core/request-routing/interceptors/checkout.mjs +58 -0
  164. package/dist/core/request-routing/interceptors/checkout.mjs.map +1 -0
  165. package/dist/core/request-routing/interceptors/mcp-proxy.mjs +23 -0
  166. package/dist/core/request-routing/interceptors/mcp-proxy.mjs.map +1 -0
  167. package/dist/core/request-routing/interceptors/proxy.mjs +73 -0
  168. package/dist/core/request-routing/interceptors/proxy.mjs.map +1 -0
  169. package/dist/core/request-routing/interceptors/query-param-redirect.mjs +22 -0
  170. package/dist/core/request-routing/interceptors/query-param-redirect.mjs.map +1 -0
  171. package/dist/core/request-routing/interceptors/sfapi-proxy.mjs +27 -0
  172. package/dist/core/request-routing/interceptors/sfapi-proxy.mjs.map +1 -0
  173. package/dist/core/request-routing/interceptors/standard-routes.mjs +19 -0
  174. package/dist/core/request-routing/interceptors/standard-routes.mjs.map +1 -0
  175. package/dist/core/request-routing/interceptors/url-redirects.mjs +27 -0
  176. package/dist/core/request-routing/interceptors/url-redirects.mjs.map +1 -0
  177. package/dist/core/request-routing/interceptors/well-known.mjs +22 -0
  178. package/dist/core/request-routing/interceptors/well-known.mjs.map +1 -0
  179. package/dist/core/request-routing/registered-routes.d.mts +7 -0
  180. package/dist/core/request-routing/registered-routes.mjs +72 -0
  181. package/dist/core/request-routing/registered-routes.mjs.map +1 -0
  182. package/dist/core/request-routing/route-types.d.mts +56 -0
  183. package/dist/core/request-routing/safe-apply-response-headers.mjs +16 -0
  184. package/dist/core/request-routing/safe-apply-response-headers.mjs.map +1 -0
  185. package/dist/core/shop-pay/shop-pay.d.mts +102 -0
  186. package/dist/core/shop-pay/shop-pay.mjs +289 -0
  187. package/dist/core/shop-pay/shop-pay.mjs.map +1 -0
  188. package/dist/core/shopify-scripts/analytics.mjs +26 -0
  189. package/dist/core/shopify-scripts/analytics.mjs.map +1 -0
  190. package/dist/core/shopify-scripts/consent.mjs +17 -0
  191. package/dist/core/shopify-scripts/consent.mjs.map +1 -0
  192. package/dist/core/shopify-scripts/constants.mjs +19 -0
  193. package/dist/core/shopify-scripts/constants.mjs.map +1 -0
  194. package/dist/core/shopify-scripts/deprecated-cookies.mjs +97 -0
  195. package/dist/core/shopify-scripts/deprecated-cookies.mjs.map +1 -0
  196. package/dist/core/shopify-scripts/global.d.mts +1 -0
  197. package/dist/core/shopify-scripts/global.mjs +86 -0
  198. package/dist/core/shopify-scripts/global.mjs.map +1 -0
  199. package/dist/core/shopify-scripts/index.d.mts +27 -0
  200. package/dist/core/shopify-scripts/index.mjs +135 -0
  201. package/dist/core/shopify-scripts/index.mjs.map +1 -0
  202. package/dist/core/shopify-scripts/initialize.d.mts +18 -0
  203. package/dist/core/shopify-scripts/initialize.mjs +27 -0
  204. package/dist/core/shopify-scripts/initialize.mjs.map +1 -0
  205. package/dist/core/shopify-scripts/page-view.mjs +49 -0
  206. package/dist/core/shopify-scripts/page-view.mjs.map +1 -0
  207. package/dist/core/shopify-scripts/perfkit.mjs +33 -0
  208. package/dist/core/shopify-scripts/perfkit.mjs.map +1 -0
  209. package/dist/core/shopify-scripts/render.d.mts +1 -0
  210. package/dist/core/shopify-scripts/render.mjs +23 -0
  211. package/dist/core/shopify-scripts/render.mjs.map +1 -0
  212. package/dist/core/shopify-scripts/types.d.mts +76 -0
  213. package/dist/core/shopify-scripts/utils/cookie-domain.mjs +43 -0
  214. package/dist/core/shopify-scripts/utils/cookie-domain.mjs.map +1 -0
  215. package/dist/core/shopify-scripts/utils/inline-script.mjs +8 -0
  216. package/dist/core/shopify-scripts/utils/inline-script.mjs.map +1 -0
  217. package/dist/core/shopify-scripts/utils/navigation.mjs +46 -0
  218. package/dist/core/shopify-scripts/utils/navigation.mjs.map +1 -0
  219. package/dist/core/shopify-scripts/utils/tracking-values.mjs +65 -0
  220. package/dist/core/shopify-scripts/utils/tracking-values.mjs.map +1 -0
  221. package/dist/core/shopify-scripts/utils/uuid.mjs +17 -0
  222. package/dist/core/shopify-scripts/utils/uuid.mjs.map +1 -0
  223. package/dist/core/shopify-scripts/webmcp.mjs +22 -0
  224. package/dist/core/shopify-scripts/webmcp.mjs.map +1 -0
  225. package/dist/core/standard-routes/build.d.mts +34 -0
  226. package/dist/core/standard-routes/build.mjs +54 -0
  227. package/dist/core/standard-routes/build.mjs.map +1 -0
  228. package/dist/core/standard-routes/defaults.mjs +31 -0
  229. package/dist/core/standard-routes/defaults.mjs.map +1 -0
  230. package/dist/core/standard-routes/match.mjs +108 -0
  231. package/dist/core/standard-routes/match.mjs.map +1 -0
  232. package/dist/core/standard-routes/path.mjs +58 -0
  233. package/dist/core/standard-routes/path.mjs.map +1 -0
  234. package/dist/core/standard-routes/redirects.mjs +51 -0
  235. package/dist/core/standard-routes/redirects.mjs.map +1 -0
  236. package/dist/core/standard-routes/types.d.mts +95 -0
  237. package/dist/core/url.mjs +42 -0
  238. package/dist/core/url.mjs.map +1 -0
  239. package/dist/core/utils/load-script.mjs +34 -0
  240. package/dist/core/utils/load-script.mjs.map +1 -0
  241. package/dist/core/utils/parse-gid.mjs +33 -0
  242. package/dist/core/utils/parse-gid.mjs.map +1 -0
  243. package/dist/core/utils/record.mjs +8 -0
  244. package/dist/core/utils/record.mjs.map +1 -0
  245. package/dist/customer-account/client.d.mts +50 -0
  246. package/dist/customer-account/client.mjs +239 -0
  247. package/dist/customer-account/client.mjs.map +1 -0
  248. package/dist/customer-account/errors.d.mts +28 -0
  249. package/dist/customer-account/errors.mjs +39 -0
  250. package/dist/customer-account/errors.mjs.map +1 -0
  251. package/dist/customer-account/graphql.d.mts +29 -0
  252. package/dist/customer-account/graphql.mjs +39 -0
  253. package/dist/customer-account/graphql.mjs.map +1 -0
  254. package/dist/customer-account/index.d.mts +7 -0
  255. package/dist/customer-account/index.mjs +7 -0
  256. package/dist/customer-account/session.d.mts +117 -0
  257. package/dist/customer-account/session.mjs +733 -0
  258. package/dist/customer-account/session.mjs.map +1 -0
  259. package/dist/customer-account/type-resolver.d.mts +11 -0
  260. package/dist/customer-account-api-types.d.ts +3269 -3270
  261. package/dist/customer-account.schema.json +50753 -1
  262. package/dist/development/_virtual/_@oxc-project_runtime@0.127.0/helpers/taggedTemplateLiteral.mjs +7 -0
  263. package/dist/development/client/client.d.mts +34 -0
  264. package/dist/development/client/client.mjs +206 -0
  265. package/dist/development/client/client.mjs.map +1 -0
  266. package/dist/development/client/errors.d.mts +48 -0
  267. package/dist/development/client/errors.mjs +57 -0
  268. package/dist/development/client/errors.mjs.map +1 -0
  269. package/dist/development/client/index.d.mts +4 -0
  270. package/dist/development/client/types.d.mts +147 -0
  271. package/dist/development/core/analytics/cart-tracker.d.mts +8 -0
  272. package/dist/development/core/analytics/cart-tracker.mjs +144 -0
  273. package/dist/development/core/analytics/cart-tracker.mjs.map +1 -0
  274. package/dist/development/core/analytics/events.d.mts +15 -0
  275. package/dist/development/core/analytics/events.mjs +15 -0
  276. package/dist/development/core/analytics/events.mjs.map +1 -0
  277. package/dist/development/core/analytics/index.d.mts +3 -0
  278. package/dist/development/core/analytics/types.d.mts +143 -0
  279. package/dist/development/core/analytics/utils/flatten-connection.d.mts +19 -0
  280. package/dist/development/core/analytics/utils/flatten-connection.mjs +25 -0
  281. package/dist/development/core/analytics/utils/flatten-connection.mjs.map +1 -0
  282. package/dist/development/core/cache/cache-status.mjs +17 -0
  283. package/dist/development/core/cache/cache-status.mjs.map +1 -0
  284. package/dist/development/core/cache/fetch-with-cache.d.mts +43 -0
  285. package/dist/development/core/cache/fetch-with-cache.mjs +188 -0
  286. package/dist/development/core/cache/fetch-with-cache.mjs.map +1 -0
  287. package/dist/development/core/cache/key.d.mts +6 -0
  288. package/dist/development/core/cache/key.mjs +27 -0
  289. package/dist/development/core/cache/key.mjs.map +1 -0
  290. package/dist/development/core/cache/run-with-cache.d.mts +36 -0
  291. package/dist/development/core/cache/run-with-cache.mjs +114 -0
  292. package/dist/development/core/cache/run-with-cache.mjs.map +1 -0
  293. package/dist/development/core/cache/store.d.mts +19 -0
  294. package/dist/development/core/cache/store.mjs +62 -0
  295. package/dist/development/core/cache/store.mjs.map +1 -0
  296. package/dist/development/core/cache/strategies.d.mts +39 -0
  297. package/dist/development/core/cache/strategies.mjs +70 -0
  298. package/dist/development/core/cache/strategies.mjs.map +1 -0
  299. package/dist/development/core/cart/actions.d.mts +50 -0
  300. package/dist/development/core/cart/actions.mjs +240 -0
  301. package/dist/development/core/cart/actions.mjs.map +1 -0
  302. package/dist/development/core/cart/attach-quantity-input.d.mts +5 -0
  303. package/dist/development/core/cart/attach-quantity-input.mjs +17 -0
  304. package/dist/development/core/cart/attach-quantity-input.mjs.map +1 -0
  305. package/dist/development/core/cart/buyer-identity-sync.d.mts +19 -0
  306. package/dist/development/core/cart/buyer-identity-sync.mjs +6 -0
  307. package/dist/development/core/cart/buyer-identity-sync.mjs.map +1 -0
  308. package/dist/development/core/cart/cart.d.mts +37 -0
  309. package/dist/development/core/cart/cart.mjs +1707 -0
  310. package/dist/development/core/cart/cart.mjs.map +1 -0
  311. package/dist/development/core/cart/cookie.d.mts +5 -0
  312. package/dist/development/core/cart/cookie.mjs +28 -0
  313. package/dist/development/core/cart/cookie.mjs.map +1 -0
  314. package/dist/development/core/cart/form.d.mts +130 -0
  315. package/dist/development/core/cart/form.mjs +75 -0
  316. package/dist/development/core/cart/form.mjs.map +1 -0
  317. package/dist/development/core/cart/get-cart.d.mts +25 -0
  318. package/dist/development/core/cart/get-cart.mjs +32 -0
  319. package/dist/development/core/cart/get-cart.mjs.map +1 -0
  320. package/dist/development/core/cart/index.d.mts +10 -0
  321. package/dist/development/core/cart/quantity.d.mts +10 -0
  322. package/dist/development/core/cart/quantity.mjs +14 -0
  323. package/dist/development/core/cart/quantity.mjs.map +1 -0
  324. package/dist/development/core/cart/queries.d.mts +4296 -0
  325. package/dist/development/core/cart/queries.mjs +70 -0
  326. package/dist/development/core/cart/queries.mjs.map +1 -0
  327. package/dist/development/core/cart/server-handlers.d.mts +82 -0
  328. package/dist/development/core/cart/server-handlers.mjs +322 -0
  329. package/dist/development/core/cart/server-handlers.mjs.map +1 -0
  330. package/dist/development/core/cart/state.d.mts +137 -0
  331. package/dist/development/core/cart/state.mjs +76 -0
  332. package/dist/development/core/cart/state.mjs.map +1 -0
  333. package/dist/development/core/cart/sync-quantity-inputs.mjs +16 -0
  334. package/dist/development/core/cart/sync-quantity-inputs.mjs.map +1 -0
  335. package/dist/development/core/collection/collection.d.mts +134 -0
  336. package/dist/development/core/collection/collection.mjs +170 -0
  337. package/dist/development/core/collection/collection.mjs.map +1 -0
  338. package/dist/development/core/collection/index.d.mts +6 -0
  339. package/dist/development/core/collection/reconciler.d.mts +32 -0
  340. package/dist/development/core/collection/reconciler.mjs +89 -0
  341. package/dist/development/core/collection/reconciler.mjs.map +1 -0
  342. package/dist/development/core/collection/state.d.mts +66 -0
  343. package/dist/development/core/collection/state.mjs +20 -0
  344. package/dist/development/core/collection/state.mjs.map +1 -0
  345. package/dist/development/core/collection/url.d.mts +71 -0
  346. package/dist/development/core/collection/url.mjs +376 -0
  347. package/dist/development/core/collection/url.mjs.map +1 -0
  348. package/dist/development/core/constants.mjs +7 -0
  349. package/dist/development/core/constants.mjs.map +1 -0
  350. package/dist/development/core/development.d.mts +56 -0
  351. package/dist/development/core/development.mjs +45 -0
  352. package/dist/development/core/headers.mjs +43 -0
  353. package/dist/development/core/headers.mjs.map +1 -0
  354. package/dist/development/core/index.d.mts +54 -0
  355. package/dist/development/core/logging/logging.d.mts +21 -0
  356. package/dist/development/core/logging/logging.mjs +99 -0
  357. package/dist/development/core/logging/logging.mjs.map +1 -0
  358. package/dist/development/core/logging/types.d.mts +40 -0
  359. package/dist/development/core/logging/types.mjs +18 -0
  360. package/dist/development/core/logging/types.mjs.map +1 -0
  361. package/dist/development/core/money/cache.mjs +25 -0
  362. package/dist/development/core/money/cache.mjs.map +1 -0
  363. package/dist/development/core/money/format.d.mts +15 -0
  364. package/dist/development/core/money/format.mjs +243 -0
  365. package/dist/development/core/money/format.mjs.map +1 -0
  366. package/dist/development/core/money/types.d.mts +47 -0
  367. package/dist/development/core/observable.mjs +46 -0
  368. package/dist/development/core/observable.mjs.map +1 -0
  369. package/dist/development/core/predictive-search/constants.d.mts +5 -0
  370. package/dist/development/core/predictive-search/constants.mjs +6 -0
  371. package/dist/development/core/predictive-search/constants.mjs.map +1 -0
  372. package/dist/development/core/predictive-search/form.d.mts +31 -0
  373. package/dist/development/core/predictive-search/form.mjs +31 -0
  374. package/dist/development/core/predictive-search/form.mjs.map +1 -0
  375. package/dist/development/core/predictive-search/index.d.mts +6 -0
  376. package/dist/development/core/predictive-search/queries.d.mts +118 -0
  377. package/dist/development/core/predictive-search/queries.mjs +81 -0
  378. package/dist/development/core/predictive-search/queries.mjs.map +1 -0
  379. package/dist/development/core/predictive-search/search.d.mts +32 -0
  380. package/dist/development/core/predictive-search/search.mjs +74 -0
  381. package/dist/development/core/predictive-search/search.mjs.map +1 -0
  382. package/dist/development/core/predictive-search/server-handlers.d.mts +36 -0
  383. package/dist/development/core/predictive-search/server-handlers.mjs +113 -0
  384. package/dist/development/core/predictive-search/server-handlers.mjs.map +1 -0
  385. package/dist/development/core/predictive-search/store.d.mts +44 -0
  386. package/dist/development/core/predictive-search/store.mjs +224 -0
  387. package/dist/development/core/predictive-search/store.mjs.map +1 -0
  388. package/dist/development/core/predictive-search/url.d.mts +41 -0
  389. package/dist/development/core/predictive-search/url.mjs +71 -0
  390. package/dist/development/core/predictive-search/url.mjs.map +1 -0
  391. package/dist/development/core/product/accept-variant-id.mjs +98 -0
  392. package/dist/development/core/product/accept-variant-id.mjs.map +1 -0
  393. package/dist/development/core/product/form.d.mts +63 -0
  394. package/dist/development/core/product/form.mjs +44 -0
  395. package/dist/development/core/product/form.mjs.map +1 -0
  396. package/dist/development/core/product/index.d.mts +5 -0
  397. package/dist/development/core/product/options.d.mts +43 -0
  398. package/dist/development/core/product/options.mjs +296 -0
  399. package/dist/development/core/product/options.mjs.map +1 -0
  400. package/dist/development/core/product/product-form.d.mts +72 -0
  401. package/dist/development/core/product/product-form.mjs +158 -0
  402. package/dist/development/core/product/product-form.mjs.map +1 -0
  403. package/dist/development/core/product/state.d.mts +68 -0
  404. package/dist/development/core/product/url.d.mts +47 -0
  405. package/dist/development/core/product/url.mjs +69 -0
  406. package/dist/development/core/product/url.mjs.map +1 -0
  407. package/dist/development/core/request-context.d.mts +75 -0
  408. package/dist/development/core/request-context.mjs +141 -0
  409. package/dist/development/core/request-context.mjs.map +1 -0
  410. package/dist/development/core/request-routing/handle-shopify-redirects.d.mts +17 -0
  411. package/dist/development/core/request-routing/handle-shopify-redirects.mjs +31 -0
  412. package/dist/development/core/request-routing/handle-shopify-redirects.mjs.map +1 -0
  413. package/dist/development/core/request-routing/handle-shopify-routes.d.mts +1 -0
  414. package/dist/development/core/request-routing/handle-shopify-routes.development.d.mts +11 -0
  415. package/dist/development/core/request-routing/handle-shopify-routes.development.mjs +16 -0
  416. package/dist/development/core/request-routing/handle-shopify-routes.development.mjs.map +1 -0
  417. package/dist/development/core/request-routing/handle-shopify-routes.mjs +42 -0
  418. package/dist/development/core/request-routing/handle-shopify-routes.mjs.map +1 -0
  419. package/dist/development/core/request-routing/interceptors/admin-redirect.mjs +12 -0
  420. package/dist/development/core/request-routing/interceptors/admin-redirect.mjs.map +1 -0
  421. package/dist/development/core/request-routing/interceptors/ajax-api.mjs +16 -0
  422. package/dist/development/core/request-routing/interceptors/ajax-api.mjs.map +1 -0
  423. package/dist/development/core/request-routing/interceptors/api-proxy.mjs +20 -0
  424. package/dist/development/core/request-routing/interceptors/api-proxy.mjs.map +1 -0
  425. package/dist/development/core/request-routing/interceptors/checkout.mjs +58 -0
  426. package/dist/development/core/request-routing/interceptors/checkout.mjs.map +1 -0
  427. package/dist/development/core/request-routing/interceptors/graphiql.mjs +46 -0
  428. package/dist/development/core/request-routing/interceptors/graphiql.mjs.map +1 -0
  429. package/dist/development/core/request-routing/interceptors/mcp-proxy.mjs +23 -0
  430. package/dist/development/core/request-routing/interceptors/mcp-proxy.mjs.map +1 -0
  431. package/dist/development/core/request-routing/interceptors/proxy.mjs +73 -0
  432. package/dist/development/core/request-routing/interceptors/proxy.mjs.map +1 -0
  433. package/dist/development/core/request-routing/interceptors/query-param-redirect.mjs +22 -0
  434. package/dist/development/core/request-routing/interceptors/query-param-redirect.mjs.map +1 -0
  435. package/dist/development/core/request-routing/interceptors/sfapi-proxy.mjs +27 -0
  436. package/dist/development/core/request-routing/interceptors/sfapi-proxy.mjs.map +1 -0
  437. package/dist/development/core/request-routing/interceptors/standard-routes.mjs +19 -0
  438. package/dist/development/core/request-routing/interceptors/standard-routes.mjs.map +1 -0
  439. package/dist/development/core/request-routing/interceptors/url-redirects.mjs +27 -0
  440. package/dist/development/core/request-routing/interceptors/url-redirects.mjs.map +1 -0
  441. package/dist/development/core/request-routing/interceptors/well-known.mjs +22 -0
  442. package/dist/development/core/request-routing/interceptors/well-known.mjs.map +1 -0
  443. package/dist/development/core/request-routing/registered-routes.d.mts +7 -0
  444. package/dist/development/core/request-routing/registered-routes.mjs +72 -0
  445. package/dist/development/core/request-routing/registered-routes.mjs.map +1 -0
  446. package/dist/development/core/request-routing/route-types.d.mts +56 -0
  447. package/dist/development/core/request-routing/safe-apply-response-headers.mjs +16 -0
  448. package/dist/development/core/request-routing/safe-apply-response-headers.mjs.map +1 -0
  449. package/dist/development/core/shop-pay/shop-pay.d.mts +102 -0
  450. package/dist/development/core/shop-pay/shop-pay.mjs +289 -0
  451. package/dist/development/core/shop-pay/shop-pay.mjs.map +1 -0
  452. package/dist/development/core/shopify-scripts/analytics.mjs +26 -0
  453. package/dist/development/core/shopify-scripts/analytics.mjs.map +1 -0
  454. package/dist/development/core/shopify-scripts/consent.mjs +17 -0
  455. package/dist/development/core/shopify-scripts/consent.mjs.map +1 -0
  456. package/dist/development/core/shopify-scripts/constants.mjs +19 -0
  457. package/dist/development/core/shopify-scripts/constants.mjs.map +1 -0
  458. package/dist/development/core/shopify-scripts/deprecated-cookies.mjs +97 -0
  459. package/dist/development/core/shopify-scripts/deprecated-cookies.mjs.map +1 -0
  460. package/dist/development/core/shopify-scripts/global.d.mts +1 -0
  461. package/dist/development/core/shopify-scripts/global.mjs +86 -0
  462. package/dist/development/core/shopify-scripts/global.mjs.map +1 -0
  463. package/dist/development/core/shopify-scripts/index.d.mts +27 -0
  464. package/dist/development/core/shopify-scripts/index.mjs +145 -0
  465. package/dist/development/core/shopify-scripts/index.mjs.map +1 -0
  466. package/dist/development/core/shopify-scripts/initialize.d.mts +18 -0
  467. package/dist/development/core/shopify-scripts/initialize.mjs +27 -0
  468. package/dist/development/core/shopify-scripts/initialize.mjs.map +1 -0
  469. package/dist/development/core/shopify-scripts/page-view.mjs +49 -0
  470. package/dist/development/core/shopify-scripts/page-view.mjs.map +1 -0
  471. package/dist/development/core/shopify-scripts/perfkit.mjs +33 -0
  472. package/dist/development/core/shopify-scripts/perfkit.mjs.map +1 -0
  473. package/dist/development/core/shopify-scripts/render.d.mts +1 -0
  474. package/dist/development/core/shopify-scripts/render.mjs +23 -0
  475. package/dist/development/core/shopify-scripts/render.mjs.map +1 -0
  476. package/dist/development/core/shopify-scripts/types.d.mts +76 -0
  477. package/dist/development/core/shopify-scripts/utils/cookie-domain.mjs +43 -0
  478. package/dist/development/core/shopify-scripts/utils/cookie-domain.mjs.map +1 -0
  479. package/dist/development/core/shopify-scripts/utils/inline-script.mjs +8 -0
  480. package/dist/development/core/shopify-scripts/utils/inline-script.mjs.map +1 -0
  481. package/dist/development/core/shopify-scripts/utils/navigation.mjs +46 -0
  482. package/dist/development/core/shopify-scripts/utils/navigation.mjs.map +1 -0
  483. package/dist/development/core/shopify-scripts/utils/tracking-values.mjs +65 -0
  484. package/dist/development/core/shopify-scripts/utils/tracking-values.mjs.map +1 -0
  485. package/dist/development/core/shopify-scripts/utils/uuid.mjs +17 -0
  486. package/dist/development/core/shopify-scripts/utils/uuid.mjs.map +1 -0
  487. package/dist/development/core/shopify-scripts/webmcp.mjs +22 -0
  488. package/dist/development/core/shopify-scripts/webmcp.mjs.map +1 -0
  489. package/dist/development/core/standard-routes/build.d.mts +34 -0
  490. package/dist/development/core/standard-routes/build.mjs +54 -0
  491. package/dist/development/core/standard-routes/build.mjs.map +1 -0
  492. package/dist/development/core/standard-routes/defaults.mjs +31 -0
  493. package/dist/development/core/standard-routes/defaults.mjs.map +1 -0
  494. package/dist/development/core/standard-routes/match.mjs +108 -0
  495. package/dist/development/core/standard-routes/match.mjs.map +1 -0
  496. package/dist/development/core/standard-routes/path.mjs +58 -0
  497. package/dist/development/core/standard-routes/path.mjs.map +1 -0
  498. package/dist/development/core/standard-routes/redirects.mjs +51 -0
  499. package/dist/development/core/standard-routes/redirects.mjs.map +1 -0
  500. package/dist/development/core/standard-routes/types.d.mts +95 -0
  501. package/dist/development/core/types.d.mts +11 -0
  502. package/dist/development/core/url.mjs +42 -0
  503. package/dist/development/core/url.mjs.map +1 -0
  504. package/dist/development/core/utils/load-script.mjs +34 -0
  505. package/dist/development/core/utils/load-script.mjs.map +1 -0
  506. package/dist/development/core/utils/parse-gid.mjs +33 -0
  507. package/dist/development/core/utils/parse-gid.mjs.map +1 -0
  508. package/dist/development/customer-account/session.d.mts +46 -0
  509. package/dist/development/customer-account/session.mjs +21 -0
  510. package/dist/development/customer-account/session.mjs.map +1 -0
  511. package/dist/development/globals.d.mts +64 -0
  512. package/dist/development/graphql/generated/customer-account-api-types.d.mts +13 -0
  513. package/dist/development/graphql/generated/graphql-env.d.mts +19280 -0
  514. package/dist/development/graphql/generated/storefront-api-types.d.mts +47 -0
  515. package/dist/development/graphql/graphql.d.mts +40 -0
  516. package/dist/development/graphql/graphql.mjs +16 -0
  517. package/dist/development/graphql/graphql.mjs.map +1 -0
  518. package/dist/development/graphql/index.d.mts +2 -0
  519. package/dist/development/graphql/scalars.d.mts +15 -0
  520. package/dist/development/graphql/type-resolver.d.mts +229 -0
  521. package/dist/development/react/cart.d.mts +44 -0
  522. package/dist/development/react/cart.mjs +155 -0
  523. package/dist/development/react/cart.mjs.map +1 -0
  524. package/dist/development/react/collection.d.mts +91 -0
  525. package/dist/development/react/collection.mjs +129 -0
  526. package/dist/development/react/collection.mjs.map +1 -0
  527. package/dist/development/react/index.d.mts +13 -0
  528. package/dist/development/react/index.mjs +10 -0
  529. package/dist/development/react/predictive-search.d.mts +49 -0
  530. package/dist/development/react/predictive-search.mjs +133 -0
  531. package/dist/development/react/predictive-search.mjs.map +1 -0
  532. package/dist/development/react/product.d.mts +72 -0
  533. package/dist/development/react/product.mjs +127 -0
  534. package/dist/development/react/product.mjs.map +1 -0
  535. package/dist/development/react/shop-pay.d.mts +9 -0
  536. package/dist/development/react/shop-pay.mjs +16 -0
  537. package/dist/development/react/shop-pay.mjs.map +1 -0
  538. package/dist/development/react/shopify-scripts.d.mts +20 -0
  539. package/dist/development/react/shopify-scripts.mjs +39 -0
  540. package/dist/development/react/shopify-scripts.mjs.map +1 -0
  541. package/dist/development/vendor/standard-actions.d.mts +134 -0
  542. package/dist/development/vendor/standard-events.d.mts +1107 -0
  543. package/dist/development/vue/cart.d.mts +46 -0
  544. package/dist/development/vue/cart.mjs +122 -0
  545. package/dist/development/vue/cart.mjs.map +1 -0
  546. package/dist/development/vue/collection.d.mts +46 -0
  547. package/dist/development/vue/collection.mjs +108 -0
  548. package/dist/development/vue/collection.mjs.map +1 -0
  549. package/dist/development/vue/index.d.mts +11 -0
  550. package/dist/development/vue/index.mjs +8 -0
  551. package/dist/development/vue/predictive-search.d.mts +124 -0
  552. package/dist/development/vue/predictive-search.mjs +171 -0
  553. package/dist/development/vue/predictive-search.mjs.map +1 -0
  554. package/dist/development/vue/product.d.mts +57 -0
  555. package/dist/development/vue/product.mjs +167 -0
  556. package/dist/development/vue/product.mjs.map +1 -0
  557. package/dist/development/vue/shop-pay.d.mts +25 -0
  558. package/dist/development/vue/shop-pay.mjs +35 -0
  559. package/dist/development/vue/shop-pay.mjs.map +1 -0
  560. package/dist/development/vue/shopify-scripts.d.mts +127 -0
  561. package/dist/development/vue/shopify-scripts.mjs +79 -0
  562. package/dist/development/vue/shopify-scripts.mjs.map +1 -0
  563. package/dist/globals.d.mts +64 -0
  564. package/dist/graphql/generated/customer-account-api-types.d.mts +13 -0
  565. package/dist/graphql/generated/customer-account-graphql-env.d.mts +22170 -0
  566. package/dist/graphql/generated/graphql-env.d.mts +19280 -0
  567. package/dist/graphql/generated/storefront-api-types.d.mts +47 -0
  568. package/dist/graphql/graphql.d.mts +40 -0
  569. package/dist/graphql/graphql.mjs +16 -0
  570. package/dist/graphql/graphql.mjs.map +1 -0
  571. package/dist/graphql/index.d.mts +2 -0
  572. package/dist/graphql/scalars.d.mts +26 -0
  573. package/dist/graphql/type-resolver.d.mts +229 -0
  574. package/dist/react/cart.d.mts +44 -0
  575. package/dist/react/cart.mjs +155 -0
  576. package/dist/react/cart.mjs.map +1 -0
  577. package/dist/react/collection.d.mts +91 -0
  578. package/dist/react/collection.mjs +129 -0
  579. package/dist/react/collection.mjs.map +1 -0
  580. package/dist/react/index.d.mts +13 -0
  581. package/dist/react/index.mjs +10 -0
  582. package/dist/react/predictive-search.d.mts +49 -0
  583. package/dist/react/predictive-search.mjs +133 -0
  584. package/dist/react/predictive-search.mjs.map +1 -0
  585. package/dist/react/product.d.mts +72 -0
  586. package/dist/react/product.mjs +127 -0
  587. package/dist/react/product.mjs.map +1 -0
  588. package/dist/react/shop-pay.d.mts +9 -0
  589. package/dist/react/shop-pay.mjs +16 -0
  590. package/dist/react/shop-pay.mjs.map +1 -0
  591. package/dist/react/shopify-scripts.d.mts +20 -0
  592. package/dist/react/shopify-scripts.mjs +39 -0
  593. package/dist/react/shopify-scripts.mjs.map +1 -0
  594. package/dist/storefront-api-types.d.ts +2351 -2390
  595. package/dist/storefront.schema.json +41534 -1
  596. package/dist/ts-plugin/index.cjs +68 -0
  597. package/dist/ts-plugin/index.cjs.map +1 -0
  598. package/dist/ts-plugin/index.d.cts +4 -0
  599. package/dist/vendor/standard-actions.d.mts +134 -0
  600. package/dist/vendor/standard-events.d.mts +1107 -0
  601. package/dist/vite/certificate-prompt.mjs +24 -0
  602. package/dist/vite/certificate-prompt.mjs.map +1 -0
  603. package/dist/vite/index.d.mts +2 -0
  604. package/dist/vite/index.mjs +3 -0
  605. package/dist/vite/local-https.d.mts +47 -0
  606. package/dist/vite/local-https.mjs +276 -0
  607. package/dist/vite/local-https.mjs.map +1 -0
  608. package/dist/vite/mkcert.mjs +141 -0
  609. package/dist/vite/mkcert.mjs.map +1 -0
  610. package/dist/vue/cart.d.mts +46 -0
  611. package/dist/vue/cart.mjs +122 -0
  612. package/dist/vue/cart.mjs.map +1 -0
  613. package/dist/vue/collection.d.mts +46 -0
  614. package/dist/vue/collection.mjs +108 -0
  615. package/dist/vue/collection.mjs.map +1 -0
  616. package/dist/vue/index.d.mts +11 -0
  617. package/dist/vue/index.mjs +8 -0
  618. package/dist/vue/predictive-search.d.mts +124 -0
  619. package/dist/vue/predictive-search.mjs +171 -0
  620. package/dist/vue/predictive-search.mjs.map +1 -0
  621. package/dist/vue/product.d.mts +57 -0
  622. package/dist/vue/product.mjs +167 -0
  623. package/dist/vue/product.mjs.map +1 -0
  624. package/dist/vue/shop-pay.d.mts +25 -0
  625. package/dist/vue/shop-pay.mjs +35 -0
  626. package/dist/vue/shop-pay.mjs.map +1 -0
  627. package/dist/vue/shopify-scripts.d.mts +127 -0
  628. package/dist/vue/shopify-scripts.mjs +79 -0
  629. package/dist/vue/shopify-scripts.mjs.map +1 -0
  630. package/package.json +116 -86
  631. package/skills/hydrogen-analytics/SKILL.md +80 -0
  632. package/skills/hydrogen-analytics/references/react.md +160 -0
  633. package/skills/hydrogen-analytics/references/vue.md +80 -0
  634. package/skills/hydrogen-cart-drawer/SKILL.md +248 -0
  635. package/skills/hydrogen-cart-drawer/references/accessibility.md +109 -0
  636. package/skills/hydrogen-cart-drawer/references/css.md +67 -0
  637. package/skills/hydrogen-cart-ui/SKILL.md +224 -0
  638. package/skills/hydrogen-cart-ui/references/nextjs.md +89 -0
  639. package/skills/hydrogen-cart-ui/references/react.md +285 -0
  640. package/skills/hydrogen-cart-ui/references/vue.md +228 -0
  641. package/skills/hydrogen-collection-browser/SKILL.md +83 -0
  642. package/skills/hydrogen-collection-browser/references/nextjs.md +118 -0
  643. package/skills/hydrogen-collection-browser/references/nuxt.md +108 -0
  644. package/skills/hydrogen-collection-browser/references/react.md +301 -0
  645. package/skills/hydrogen-customer-account/SKILL.md +107 -0
  646. package/skills/hydrogen-image/SKILL.md +65 -0
  647. package/skills/hydrogen-local-https/SKILL.md +142 -0
  648. package/skills/hydrogen-markets/SKILL.md +221 -0
  649. package/skills/hydrogen-markets/references/nextjs.md +157 -0
  650. package/skills/hydrogen-money/SKILL.md +67 -0
  651. package/skills/hydrogen-oxygen/SKILL.md +245 -0
  652. package/skills/hydrogen-oxygen/references/react-router.md +230 -0
  653. package/skills/hydrogen-predictive-search/SKILL.md +130 -0
  654. package/skills/hydrogen-predictive-search/references/react.md +32 -0
  655. package/skills/hydrogen-predictive-search/references/vue.md +40 -0
  656. package/skills/hydrogen-request-handlers/SKILL.md +107 -0
  657. package/skills/hydrogen-request-handlers/references/frameworks.md +179 -0
  658. package/skills/hydrogen-request-handlers/references/nextjs.md +137 -0
  659. package/skills/hydrogen-request-handlers/references/nuxt.md +215 -0
  660. package/skills/hydrogen-routing/SKILL.md +171 -0
  661. package/skills/hydrogen-setup/SKILL.md +50 -0
  662. package/skills/hydrogen-setup/references/analytics.md +624 -0
  663. package/skills/hydrogen-setup/steps/1-inspect-app.md +62 -0
  664. package/skills/hydrogen-setup/steps/10-analytics.md +10 -0
  665. package/skills/hydrogen-setup/steps/11-verify.md +31 -0
  666. package/skills/hydrogen-setup/steps/2-scaffold.md +86 -0
  667. package/skills/hydrogen-setup/steps/3-build-home-page.md +37 -0
  668. package/skills/hydrogen-setup/steps/4-collection-and-search.md +14 -0
  669. package/skills/hydrogen-setup/steps/5-cart.md +10 -0
  670. package/skills/hydrogen-setup/steps/6-product-detail-page.md +416 -0
  671. package/skills/hydrogen-setup/steps/7-shopify-runtime-scripts.md +69 -0
  672. package/skills/hydrogen-setup/steps/8-cart-drawer-and-navbar.md +35 -0
  673. package/skills/hydrogen-setup/steps/9-account-page.md +54 -0
  674. package/skills/hydrogen-shop-pay/SKILL.md +79 -0
  675. package/skills/hydrogen-shop-pay/references/core.md +66 -0
  676. package/skills/hydrogen-shop-pay/references/react.md +50 -0
  677. package/skills/hydrogen-shop-pay/references/vue.md +39 -0
  678. package/skills/hydrogen-smoke-test/SKILL.md +205 -0
  679. package/skills/hydrogen-storefront-client/SKILL.md +322 -0
  680. package/skills/hydrogen-storefront-client/references/astro.md +125 -0
  681. package/skills/hydrogen-storefront-client/references/caching.md +25 -0
  682. package/skills/hydrogen-storefront-client/references/nextjs.md +121 -0
  683. package/skills/hydrogen-storefront-client/references/nuxt.md +121 -0
  684. package/skills/hydrogen-storefront-client/references/query-validation.md +95 -0
  685. package/skills/hydrogen-storefront-client/references/react-router.md +81 -0
  686. package/skills/hydrogen-storefront-client/references/solidstart.md +131 -0
  687. package/skills/hydrogen-storefront-client/references/sveltekit.md +169 -0
  688. package/skills/hydrogen-variant-form/SKILL.md +267 -0
  689. package/skills/hydrogen-variant-form/references/nextjs.md +207 -0
  690. package/skills/hydrogen-variant-form/references/nuxt.md +95 -0
  691. package/skills/hydrogen-variant-form/references/react.md +71 -0
  692. package/dist/dev/get-virtual-routes-H72465VB.js +0 -74
  693. package/dist/dev/hydrogen-routes.d.ts +0 -5
  694. package/dist/dev/hydrogen-routes.js +0 -25
  695. package/dist/development/get-virtual-routes-ACFZHU42.js +0 -71
  696. package/dist/development/get-virtual-routes-ACFZHU42.js.map +0 -1
  697. package/dist/development/index.cjs +0 -6978
  698. package/dist/development/index.cjs.map +0 -1
  699. package/dist/development/index.js +0 -6631
  700. package/dist/development/index.js.map +0 -1
  701. package/dist/development/log-seo-tags-IG37ONQ2.js +0 -74
  702. package/dist/development/log-seo-tags-IG37ONQ2.js.map +0 -1
  703. package/dist/development/react-router-preset.d.ts +0 -45
  704. package/dist/development/react-router-preset.js +0 -49
  705. package/dist/development/react-router-preset.js.map +0 -1
  706. package/dist/index.cjs +0 -1
  707. package/dist/oxygen/index.d.ts +0 -197
  708. package/dist/oxygen/index.js +0 -107
  709. package/dist/production/get-virtual-routes-ZZEGQQDV.js +0 -3
  710. package/dist/production/get-virtual-routes-ZZEGQQDV.js.map +0 -1
  711. package/dist/production/index.cjs +0 -1019
  712. package/dist/production/index.cjs.map +0 -1
  713. package/dist/production/index.d.cts +0 -3260
  714. package/dist/production/index.d.ts +0 -3260
  715. package/dist/production/index.js +0 -1019
  716. package/dist/production/index.js.map +0 -1
  717. package/dist/production/log-seo-tags-TY72EQWZ.js +0 -2
  718. package/dist/production/log-seo-tags-TY72EQWZ.js.map +0 -1
  719. package/dist/production/react-router-preset.d.ts +0 -45
  720. package/dist/production/react-router-preset.js +0 -11
  721. package/dist/react-router.d.ts +0 -75
  722. package/dist/vite/chunk-4O5OI3OO.js +0 -127
  723. package/dist/vite/chunk-FAQ7TVHC.js +0 -9
  724. package/dist/vite/chunk-QXBQVDMY.js +0 -68
  725. package/dist/vite/compat-date.d.ts +0 -3
  726. package/dist/vite/compat-date.js +0 -6
  727. package/dist/vite/get-virtual-routes.d.ts +0 -21
  728. package/dist/vite/get-virtual-routes.js +0 -74
  729. package/dist/vite/hydrogen-middleware.d.ts +0 -9
  730. package/dist/vite/hydrogen-middleware.js +0 -7
  731. package/dist/vite/plugin.d.ts +0 -22
  732. package/dist/vite/plugin.js +0 -171
  733. package/dist/vite/request-events.d.ts +0 -144
  734. package/dist/vite/request-events.js +0 -10
  735. package/dist/vite/types.d.ts +0 -5
  736. package/dist/vite/types.js +0 -0
  737. package/dist/vite/virtual-routes/assets/debug-network.css +0 -609
  738. package/dist/vite/virtual-routes/assets/favicon-dark.svg +0 -20
  739. package/dist/vite/virtual-routes/assets/favicon.svg +0 -28
  740. package/dist/vite/virtual-routes/assets/inter-variable-font.woff2 +0 -0
  741. package/dist/vite/virtual-routes/assets/jetbrainsmono-variable-font.woff2 +0 -0
  742. package/dist/vite/virtual-routes/assets/styles.css +0 -249
  743. package/dist/vite/virtual-routes/components/FlameChartWrapper.jsx +0 -123
  744. package/dist/vite/virtual-routes/components/HydrogenLogoBaseBW.jsx +0 -32
  745. package/dist/vite/virtual-routes/components/HydrogenLogoBaseColor.jsx +0 -47
  746. package/dist/vite/virtual-routes/components/IconBanner.jsx +0 -292
  747. package/dist/vite/virtual-routes/components/IconClose.jsx +0 -38
  748. package/dist/vite/virtual-routes/components/IconDiscard.jsx +0 -44
  749. package/dist/vite/virtual-routes/components/IconError.jsx +0 -61
  750. package/dist/vite/virtual-routes/components/IconGithub.jsx +0 -23
  751. package/dist/vite/virtual-routes/components/IconTwitter.jsx +0 -21
  752. package/dist/vite/virtual-routes/components/Layout.jsx +0 -7
  753. package/dist/vite/virtual-routes/components/RequestDetails.jsx +0 -171
  754. package/dist/vite/virtual-routes/components/RequestTable.jsx +0 -91
  755. package/dist/vite/virtual-routes/components/RequestWaterfall.jsx +0 -151
  756. package/dist/vite/virtual-routes/layout.jsx +0 -33
  757. package/dist/vite/virtual-routes/lib/useDebugNetworkServer.jsx +0 -178
  758. package/dist/vite/virtual-routes/routes/[.]well-known.appspecific.com[.]chrome[.]devtools[.]json.jsx +0 -37
  759. package/dist/vite/virtual-routes/routes/[.]well-known.appspecific.com[.]chrome[.]devtools[.]json.tsx +0 -79
  760. package/dist/vite/virtual-routes/routes/graphiql.jsx +0 -5
  761. package/dist/vite/virtual-routes/routes/index.jsx +0 -265
  762. package/dist/vite/virtual-routes/routes/subrequest-profiler.jsx +0 -243
  763. package/dist/vite/virtual-routes/virtual-root-with-layout.jsx +0 -63
  764. package/dist/vite/virtual-routes/virtual-root.jsx +0 -67
@@ -0,0 +1,47 @@
1
+ //#region src/graphql/generated/storefront-api-types.d.ts
2
+ /**
3
+ * Error codes returned by [`CartUserError`](https://shopify.dev/docs/api/storefront/current/objects/CartUserError) during cart mutations. Covers validation failures for addresses, quantities, delivery options, merchandise lines, discount codes, and metafields.
4
+ *
5
+ */
6
+ type CartErrorCode = /** The specified address field contains emojis. */"ADDRESS_FIELD_CONTAINS_EMOJIS" /** The specified address field contains HTML tags. */ | "ADDRESS_FIELD_CONTAINS_HTML_TAGS" /** The specified address field contains a URL. */ | "ADDRESS_FIELD_CONTAINS_URL" /** The specified address field does not match the expected pattern. */ | "ADDRESS_FIELD_DOES_NOT_MATCH_EXPECTED_PATTERN" /** The specified address field is required. */ | "ADDRESS_FIELD_IS_REQUIRED" /** The specified address field is too long. */ | "ADDRESS_FIELD_IS_TOO_LONG" /** Bundles and addons cannot be mixed. */ | "BUNDLES_AND_ADDONS_CANNOT_BE_MIXED" /** Buyer cannot purchase for company location. */ | "BUYER_CANNOT_PURCHASE_FOR_COMPANY_LOCATION" /** The cart is too large to save. */ | "CART_TOO_LARGE" /** The specified gift card recipient is invalid. */ | "GIFT_CARD_RECIPIENT_INVALID" /** The input value is invalid. */ | "INVALID" /** Company location not found or not allowed. */ | "INVALID_COMPANY_LOCATION" /** The delivery address was not found. */ | "INVALID_DELIVERY_ADDRESS_ID" /** Delivery group was not found in cart. */ | "INVALID_DELIVERY_GROUP" /** Delivery option was not valid. */ | "INVALID_DELIVERY_OPTION" /** The quantity must be a multiple of the specified increment. */ | "INVALID_INCREMENT" /** Merchandise line was not found in cart. */ | "INVALID_MERCHANDISE_LINE" /** The metafields were not valid. */ | "INVALID_METAFIELDS" /** The payment wasn't valid. */ | "INVALID_PAYMENT" /** The payment is invalid. Deferred payment is required. */ | "INVALID_PAYMENT_DEFERRED_PAYMENT_REQUIRED" /** Cannot update payment on an empty cart */ | "INVALID_PAYMENT_EMPTY_CART" /** The given zip code is invalid for the provided country. */ | "INVALID_ZIP_CODE_FOR_COUNTRY" /** The given zip code is invalid for the provided province. */ | "INVALID_ZIP_CODE_FOR_PROVINCE" /** The input value should be less than the maximum value allowed. */ | "LESS_THAN" /** The quantity must be below the specified maximum for the item. */ | "MAXIMUM_EXCEEDED" /** An error occurred while processing cart transformations. */ | "MERCHANDISE_LINE_TRANSFORMERS_RUN_ERROR" /** Item cannot be purchased as configured. */ | "MERCHANDISE_NOT_APPLICABLE" /** The quantity must be above the specified minimum for the item. */ | "MINIMUM_NOT_MET" /** The customer access token is required when setting a company location. */ | "MISSING_CUSTOMER_ACCESS_TOKEN" /** Missing discount code. */ | "MISSING_DISCOUNT_CODE" /** Missing note. */ | "MISSING_NOTE" /** The note length must be below the specified maximum. */ | "NOTE_TOO_LONG" /** Only one delivery address can be selected. */ | "ONLY_ONE_DELIVERY_ADDRESS_CAN_BE_SELECTED" /** Cannot reference existing parent lines by variant_id. */ | "PARENT_LINE_INVALID_REFERENCE" /** Parent line nesting is too deep or circular. */ | "PARENT_LINE_NESTING_TOO_DEEP" /** Parent line not found. */ | "PARENT_LINE_NOT_FOUND" /** Nested cartlines are blocked due to an incompatibility. */ | "PARENT_LINE_OPERATION_BLOCKED" /** Credit card has expired. */ | "PAYMENTS_CREDIT_CARD_BASE_EXPIRED" /** Credit card gateway is not supported. */ | "PAYMENTS_CREDIT_CARD_BASE_GATEWAY_NOT_SUPPORTED" /** Credit card error. */ | "PAYMENTS_CREDIT_CARD_GENERIC" /** Credit card month is invalid. */ | "PAYMENTS_CREDIT_CARD_MONTH_INCLUSION" /** Credit card number is invalid. */ | "PAYMENTS_CREDIT_CARD_NUMBER_INVALID" /** Credit card number format is invalid. */ | "PAYMENTS_CREDIT_CARD_NUMBER_INVALID_FORMAT" /** Credit card verification value is blank. */ | "PAYMENTS_CREDIT_CARD_VERIFICATION_VALUE_BLANK" /** Credit card verification value is invalid for card type. */ | "PAYMENTS_CREDIT_CARD_VERIFICATION_VALUE_INVALID_FOR_CARD_TYPE" /** Credit card has expired. */ | "PAYMENTS_CREDIT_CARD_YEAR_EXPIRED" /** Credit card expiry year is invalid. */ | "PAYMENTS_CREDIT_CARD_YEAR_INVALID_EXPIRY_YEAR" /** The payment method is not applicable. */ | "PAYMENT_METHOD_NOT_APPLICABLE" /** The payment method is not supported. */ | "PAYMENT_METHOD_NOT_SUPPORTED" /** The delivery group is in a pending state. */ | "PENDING_DELIVERY_GROUPS" /** The given province cannot be found. */ | "PROVINCE_NOT_FOUND" /** Selling plan is not applicable. */ | "SELLING_PLAN_NOT_APPLICABLE" /** An error occurred while saving the cart. */ | "SERVICE_UNAVAILABLE" /** Too many delivery addresses on Cart. */ | "TOO_MANY_DELIVERY_ADDRESSES" /** A general error occurred during address validation. */ | "UNSPECIFIED_ADDRESS_ERROR" /** Validation failed. */ | "VALIDATION_CUSTOM" /** Variant can only be purchased with a selling plan. */ | "VARIANT_REQUIRES_SELLING_PLAN" /** The given zip code is unsupported. */ | "ZIP_CODE_NOT_SUPPORTED";
7
+ /** The code for the cart warning. */
8
+ type CartWarningCode = /** The discount code cannot be honored. */"DISCOUNT_CODE_NOT_HONOURED" /** The discount is currently inactive. */ | "DISCOUNT_CURRENTLY_INACTIVE" /** The customer is not eligible for this discount. */ | "DISCOUNT_CUSTOMER_NOT_ELIGIBLE" /** The customer's discount usage limit has been reached. */ | "DISCOUNT_CUSTOMER_USAGE_LIMIT_REACHED" /** An eligible customer is missing for this discount. */ | "DISCOUNT_ELIGIBLE_CUSTOMER_MISSING" /** The purchase type is incompatible with this discount. */ | "DISCOUNT_INCOMPATIBLE_PURCHASE_TYPE" /** The discount was not found. */ | "DISCOUNT_NOT_FOUND" /** There are no entitled line items for this discount. */ | "DISCOUNT_NO_ENTITLED_LINE_ITEMS" /** There are no entitled shipping lines for this discount. */ | "DISCOUNT_NO_ENTITLED_SHIPPING_LINES" /** The purchase is not in range for this discount. */ | "DISCOUNT_PURCHASE_NOT_IN_RANGE" /** The quantity is not in range for this discount. */ | "DISCOUNT_QUANTITY_NOT_IN_RANGE" /** The discount usage limit has been reached. */ | "DISCOUNT_USAGE_LIMIT_REACHED" /** A delivery address with the same details already exists on this cart. */ | "DUPLICATE_DELIVERY_ADDRESS" /** The merchandise does not have enough stock. */ | "MERCHANDISE_NOT_ENOUGH_STOCK" /** The merchandise is out of stock. */ | "MERCHANDISE_OUT_OF_STOCK" /** Only one-time purchase is available for B2B orders. */ | "MERCHANDISE_SELLING_PLAN_NOT_APPLICABLE_ON_COMPANY_LOCATION" /** Gift cards are not available as a payment method. */ | "PAYMENTS_GIFT_CARDS_UNAVAILABLE";
9
+ /**
10
+ * The code designating a country/region, which generally follows ISO 3166-1 alpha-2 guidelines.
11
+ * If a territory doesn't have a country code value in the `CountryCode` enum, then it might be considered a subdivision
12
+ * of another country. For example, the territories associated with Spain are represented by the country code `ES`,
13
+ * and the territories associated with the United States of America are represented by the country code `US`.
14
+ *
15
+ */
16
+ type CountryCode = /** Ascension Island. */"AC" /** Andorra. */ | "AD" /** United Arab Emirates. */ | "AE" /** Afghanistan. */ | "AF" /** Antigua & Barbuda. */ | "AG" /** Anguilla. */ | "AI" /** Albania. */ | "AL" /** Armenia. */ | "AM" /** Netherlands Antilles. */ | "AN" /** Angola. */ | "AO" /** Argentina. */ | "AR" /** Austria. */ | "AT" /** Australia. */ | "AU" /** Aruba. */ | "AW" /** Åland Islands. */ | "AX" /** Azerbaijan. */ | "AZ" /** Bosnia & Herzegovina. */ | "BA" /** Barbados. */ | "BB" /** Bangladesh. */ | "BD" /** Belgium. */ | "BE" /** Burkina Faso. */ | "BF" /** Bulgaria. */ | "BG" /** Bahrain. */ | "BH" /** Burundi. */ | "BI" /** Benin. */ | "BJ" /** St. Barthélemy. */ | "BL" /** Bermuda. */ | "BM" /** Brunei. */ | "BN" /** Bolivia. */ | "BO" /** Caribbean Netherlands. */ | "BQ" /** Brazil. */ | "BR" /** Bahamas. */ | "BS" /** Bhutan. */ | "BT" /** Bouvet Island. */ | "BV" /** Botswana. */ | "BW" /** Belarus. */ | "BY" /** Belize. */ | "BZ" /** Canada. */ | "CA" /** Cocos (Keeling) Islands. */ | "CC" /** Congo - Kinshasa. */ | "CD" /** Central African Republic. */ | "CF" /** Congo - Brazzaville. */ | "CG" /** Switzerland. */ | "CH" /** Côte d’Ivoire. */ | "CI" /** Cook Islands. */ | "CK" /** Chile. */ | "CL" /** Cameroon. */ | "CM" /** China. */ | "CN" /** Colombia. */ | "CO" /** Costa Rica. */ | "CR" /** Cuba. */ | "CU" /** Cape Verde. */ | "CV" /** Curaçao. */ | "CW" /** Christmas Island. */ | "CX" /** Cyprus. */ | "CY" /** Czechia. */ | "CZ" /** Germany. */ | "DE" /** Djibouti. */ | "DJ" /** Denmark. */ | "DK" /** Dominica. */ | "DM" /** Dominican Republic. */ | "DO" /** Algeria. */ | "DZ" /** Ecuador. */ | "EC" /** Estonia. */ | "EE" /** Egypt. */ | "EG" /** Western Sahara. */ | "EH" /** Eritrea. */ | "ER" /** Spain. */ | "ES" /** Ethiopia. */ | "ET" /** Finland. */ | "FI" /** Fiji. */ | "FJ" /** Falkland Islands. */ | "FK" /** Faroe Islands. */ | "FO" /** France. */ | "FR" /** Gabon. */ | "GA" /** United Kingdom. */ | "GB" /** Grenada. */ | "GD" /** Georgia. */ | "GE" /** French Guiana. */ | "GF" /** Guernsey. */ | "GG" /** Ghana. */ | "GH" /** Gibraltar. */ | "GI" /** Greenland. */ | "GL" /** Gambia. */ | "GM" /** Guinea. */ | "GN" /** Guadeloupe. */ | "GP" /** Equatorial Guinea. */ | "GQ" /** Greece. */ | "GR" /** South Georgia & South Sandwich Islands. */ | "GS" /** Guatemala. */ | "GT" /** Guinea-Bissau. */ | "GW" /** Guyana. */ | "GY" /** Hong Kong SAR. */ | "HK" /** Heard & McDonald Islands. */ | "HM" /** Honduras. */ | "HN" /** Croatia. */ | "HR" /** Haiti. */ | "HT" /** Hungary. */ | "HU" /** Indonesia. */ | "ID" /** Ireland. */ | "IE" /** Israel. */ | "IL" /** Isle of Man. */ | "IM" /** India. */ | "IN" /** British Indian Ocean Territory. */ | "IO" /** Iraq. */ | "IQ" /** Iran. */ | "IR" /** Iceland. */ | "IS" /** Italy. */ | "IT" /** Jersey. */ | "JE" /** Jamaica. */ | "JM" /** Jordan. */ | "JO" /** Japan. */ | "JP" /** Kenya. */ | "KE" /** Kyrgyzstan. */ | "KG" /** Cambodia. */ | "KH" /** Kiribati. */ | "KI" /** Comoros. */ | "KM" /** St. Kitts & Nevis. */ | "KN" /** North Korea. */ | "KP" /** South Korea. */ | "KR" /** Kuwait. */ | "KW" /** Cayman Islands. */ | "KY" /** Kazakhstan. */ | "KZ" /** Laos. */ | "LA" /** Lebanon. */ | "LB" /** St. Lucia. */ | "LC" /** Liechtenstein. */ | "LI" /** Sri Lanka. */ | "LK" /** Liberia. */ | "LR" /** Lesotho. */ | "LS" /** Lithuania. */ | "LT" /** Luxembourg. */ | "LU" /** Latvia. */ | "LV" /** Libya. */ | "LY" /** Morocco. */ | "MA" /** Monaco. */ | "MC" /** Moldova. */ | "MD" /** Montenegro. */ | "ME" /** St. Martin. */ | "MF" /** Madagascar. */ | "MG" /** North Macedonia. */ | "MK" /** Mali. */ | "ML" /** Myanmar (Burma). */ | "MM" /** Mongolia. */ | "MN" /** Macao SAR. */ | "MO" /** Martinique. */ | "MQ" /** Mauritania. */ | "MR" /** Montserrat. */ | "MS" /** Malta. */ | "MT" /** Mauritius. */ | "MU" /** Maldives. */ | "MV" /** Malawi. */ | "MW" /** Mexico. */ | "MX" /** Malaysia. */ | "MY" /** Mozambique. */ | "MZ" /** Namibia. */ | "NA" /** New Caledonia. */ | "NC" /** Niger. */ | "NE" /** Norfolk Island. */ | "NF" /** Nigeria. */ | "NG" /** Nicaragua. */ | "NI" /** Netherlands. */ | "NL" /** Norway. */ | "NO" /** Nepal. */ | "NP" /** Nauru. */ | "NR" /** Niue. */ | "NU" /** New Zealand. */ | "NZ" /** Oman. */ | "OM" /** Panama. */ | "PA" /** Peru. */ | "PE" /** French Polynesia. */ | "PF" /** Papua New Guinea. */ | "PG" /** Philippines. */ | "PH" /** Pakistan. */ | "PK" /** Poland. */ | "PL" /** St. Pierre & Miquelon. */ | "PM" /** Pitcairn Islands. */ | "PN" /** Palestinian Territories. */ | "PS" /** Portugal. */ | "PT" /** Paraguay. */ | "PY" /** Qatar. */ | "QA" /** Réunion. */ | "RE" /** Romania. */ | "RO" /** Serbia. */ | "RS" /** Russia. */ | "RU" /** Rwanda. */ | "RW" /** Saudi Arabia. */ | "SA" /** Solomon Islands. */ | "SB" /** Seychelles. */ | "SC" /** Sudan. */ | "SD" /** Sweden. */ | "SE" /** Singapore. */ | "SG" /** St. Helena. */ | "SH" /** Slovenia. */ | "SI" /** Svalbard & Jan Mayen. */ | "SJ" /** Slovakia. */ | "SK" /** Sierra Leone. */ | "SL" /** San Marino. */ | "SM" /** Senegal. */ | "SN" /** Somalia. */ | "SO" /** Suriname. */ | "SR" /** South Sudan. */ | "SS" /** São Tomé & Príncipe. */ | "ST" /** El Salvador. */ | "SV" /** Sint Maarten. */ | "SX" /** Syria. */ | "SY" /** Eswatini. */ | "SZ" /** Tristan da Cunha. */ | "TA" /** Turks & Caicos Islands. */ | "TC" /** Chad. */ | "TD" /** French Southern Territories. */ | "TF" /** Togo. */ | "TG" /** Thailand. */ | "TH" /** Tajikistan. */ | "TJ" /** Tokelau. */ | "TK" /** Timor-Leste. */ | "TL" /** Turkmenistan. */ | "TM" /** Tunisia. */ | "TN" /** Tonga. */ | "TO" /** Türkiye. */ | "TR" /** Trinidad & Tobago. */ | "TT" /** Tuvalu. */ | "TV" /** Taiwan. */ | "TW" /** Tanzania. */ | "TZ" /** Ukraine. */ | "UA" /** Uganda. */ | "UG" /** U.S. Outlying Islands. */ | "UM" /** United States. */ | "US" /** Uruguay. */ | "UY" /** Uzbekistan. */ | "UZ" /** Vatican City. */ | "VA" /** St. Vincent & Grenadines. */ | "VC" /** Venezuela. */ | "VE" /** British Virgin Islands. */ | "VG" /** Vietnam. */ | "VN" /** Vanuatu. */ | "VU" /** Wallis & Futuna. */ | "WF" /** Samoa. */ | "WS" /** Kosovo. */ | "XK" /** Yemen. */ | "YE" /** Mayotte. */ | "YT" /** South Africa. */ | "ZA" /** Zambia. */ | "ZM" /** Zimbabwe. */ | "ZW" /** Unknown Region. */ | "ZZ";
17
+ /**
18
+ * Supported languages for retrieving translated storefront content. Pass a language code to the [`@inContext`](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/in-context) directive to return product titles, descriptions, and other translatable fields in that language.
19
+ *
20
+ * The [`Localization`](https://shopify.dev/docs/api/storefront/current/objects/Localization) object provides the list of available languages for the active country, and each [`Country`](https://shopify.dev/docs/api/storefront/current/objects/Country) in [`availableCountries`](https://shopify.dev/docs/api/storefront/current/objects/Localization#field-Localization.fields.availableCountries) includes its own available languages.
21
+ *
22
+ */
23
+ type LanguageCode = /** Afrikaans. */"AF" /** Akan. */ | "AK" /** Amharic. */ | "AM" /** Arabic. */ | "AR" /** Assamese. */ | "AS" /** Azerbaijani. */ | "AZ" /** Belarusian. */ | "BE" /** Bulgarian. */ | "BG" /** Bambara. */ | "BM" /** Bangla. */ | "BN" /** Tibetan. */ | "BO" /** Breton. */ | "BR" /** Bosnian. */ | "BS" /** Catalan. */ | "CA" /** Chechen. */ | "CE" /** Central Kurdish. */ | "CKB" /** Czech. */ | "CS" /** Church Slavic. */ | "CU" /** Welsh. */ | "CY" /** Danish. */ | "DA" /** German. */ | "DE" /** Dzongkha. */ | "DZ" /** Ewe. */ | "EE" /** Greek. */ | "EL" /** English. */ | "EN" /** Esperanto. */ | "EO" /** Spanish. */ | "ES" /** Estonian. */ | "ET" /** Basque. */ | "EU" /** Persian. */ | "FA" /** Fulah. */ | "FF" /** Finnish. */ | "FI" /** Filipino. */ | "FIL" /** Faroese. */ | "FO" /** French. */ | "FR" /** Western Frisian. */ | "FY" /** Irish. */ | "GA" /** Scottish Gaelic. */ | "GD" /** Galician. */ | "GL" /** Gujarati. */ | "GU" /** Manx. */ | "GV" /** Hausa. */ | "HA" /** Hebrew. */ | "HE" /** Hindi. */ | "HI" /** Croatian. */ | "HR" /** Hungarian. */ | "HU" /** Armenian. */ | "HY" /** Interlingua. */ | "IA" /** Indonesian. */ | "ID" /** Igbo. */ | "IG" /** Sichuan Yi. */ | "II" /** Icelandic. */ | "IS" /** Italian. */ | "IT" /** Japanese. */ | "JA" /** Javanese. */ | "JV" /** Georgian. */ | "KA" /** Kikuyu. */ | "KI" /** Kazakh. */ | "KK" /** Kalaallisut. */ | "KL" /** Khmer. */ | "KM" /** Kannada. */ | "KN" /** Korean. */ | "KO" /** Kashmiri. */ | "KS" /** Kurdish. */ | "KU" /** Cornish. */ | "KW" /** Kyrgyz. */ | "KY" /** Latin. */ | "LA" /** Luxembourgish. */ | "LB" /** Ganda. */ | "LG" /** Lingala. */ | "LN" /** Lao. */ | "LO" /** Lithuanian. */ | "LT" /** Luba-Katanga. */ | "LU" /** Latvian. */ | "LV" /** Malagasy. */ | "MG" /** Māori. */ | "MI" /** Macedonian. */ | "MK" /** Malayalam. */ | "ML" /** Mongolian. */ | "MN" /** Moldavian. */ | "MO" /** Marathi. */ | "MR" /** Malay. */ | "MS" /** Maltese. */ | "MT" /** Burmese. */ | "MY" /** Norwegian (Bokmål). */ | "NB" /** North Ndebele. */ | "ND" /** Nepali. */ | "NE" /** Dutch. */ | "NL" /** Norwegian Nynorsk. */ | "NN" /** Norwegian. */ | "NO" /** Oromo. */ | "OM" /** Odia. */ | "OR" /** Ossetic. */ | "OS" /** Punjabi. */ | "PA" /** Polish. */ | "PL" /** Pashto. */ | "PS" /** Portuguese. */ | "PT" /** Portuguese (Brazil). */ | "PT_BR" /** Portuguese (Portugal). */ | "PT_PT" /** Quechua. */ | "QU" /** Romansh. */ | "RM" /** Rundi. */ | "RN" /** Romanian. */ | "RO" /** Russian. */ | "RU" /** Kinyarwanda. */ | "RW" /** Sanskrit. */ | "SA" /** Sardinian. */ | "SC" /** Sindhi. */ | "SD" /** Northern Sami. */ | "SE" /** Sango. */ | "SG" /** Serbo-Croatian. */ | "SH" /** Sinhala. */ | "SI" /** Slovak. */ | "SK" /** Slovenian. */ | "SL" /** Shona. */ | "SN" /** Somali. */ | "SO" /** Albanian. */ | "SQ" /** Serbian. */ | "SR" /** Sundanese. */ | "SU" /** Swedish. */ | "SV" /** Swahili. */ | "SW" /** Tamil. */ | "TA" /** Telugu. */ | "TE" /** Tajik. */ | "TG" /** Thai. */ | "TH" /** Tigrinya. */ | "TI" /** Turkmen. */ | "TK" /** Tongan. */ | "TO" /** Turkish. */ | "TR" /** Tatar. */ | "TT" /** Uyghur. */ | "UG" /** Ukrainian. */ | "UK" /** Urdu. */ | "UR" /** Uzbek. */ | "UZ" /** Vietnamese. */ | "VI" /** Volapük. */ | "VO" /** Wolof. */ | "WO" /** Xhosa. */ | "XH" /** Yiddish. */ | "YI" /** Yoruba. */ | "YO" /** Chinese. */ | "ZH" /** Chinese (Simplified). */ | "ZH_CN" /** Chinese (Traditional). */ | "ZH_TW" /** Zulu. */ | "ZU";
24
+ /** Decides the distribution of results. */
25
+ type PredictiveSearchLimitScope = /** Return results up to limit across all types. */"ALL" /** Return results up to limit per type. */ | "EACH";
26
+ /** The types of search items to perform predictive search on. */
27
+ type PredictiveSearchType = /** Returns matching articles. */"ARTICLE" /** Returns matching collections. */ | "COLLECTION" /** Returns matching pages. */ | "PAGE" /** Returns matching products. */ | "PRODUCT" /** Returns matching query strings. */ | "QUERY";
28
+ /**
29
+ * Sort options for products within a [`Collection`](https://shopify.dev/docs/api/storefront/current/objects/Collection). Used by the [`products`](https://shopify.dev/docs/api/storefront/current/objects/Collection#field-Collection.fields.products) connection to order results by best-selling, price, title, creation date, or the collection's default and manual ordering.
30
+ *
31
+ * > Note: The [`RELEVANCE`](https://shopify.dev/docs/api/storefront/current/enums/ProductCollectionSortKeys#enums-RELEVANCE) key applies only when you specify a search query.
32
+ *
33
+ */
34
+ type ProductCollectionSortKeys = /** Sort by the `best-selling` value. */"BEST_SELLING" /** Sort by the `collection-default` value. */ | "COLLECTION_DEFAULT" /** Sort by the `created` value. */ | "CREATED" /** Sort by the `id` value. */ | "ID" /** Sort by the `manual` value. */ | "MANUAL" /** Sort by the `price` value. */ | "PRICE"
35
+ /**
36
+ * Sort by relevance to the search terms when the `query` parameter is specified on the connection.
37
+ * Don't use this sort key when no search query is specified.
38
+ *
39
+ */
40
+ | "RELEVANCE" /** Sort by the `title` value. */ | "TITLE";
41
+ /** Specifies whether to display results for unavailable products. */
42
+ type SearchUnavailableProductsType = /** Exclude unavailable products. */"HIDE" /** Show unavailable products after all other matching results. This is the default. */ | "LAST" /** Show unavailable products in the order that they're found. */ | "SHOW";
43
+ /** Specifies the list of resource fields to search. */
44
+ type SearchableField = /** Author of the page or article. */"AUTHOR" /** Body of the page or article or product description or collection description. */ | "BODY" /** Product type. */ | "PRODUCT_TYPE" /** Tag associated with the product or article. */ | "TAG" /** Title of the page or article or product title or collection title. */ | "TITLE" /** Variant barcode. */ | "VARIANTS_BARCODE" /** Variant SKU. */ | "VARIANTS_SKU" /** Variant title. */ | "VARIANTS_TITLE" /** Product vendor. */ | "VENDOR";
45
+ //#endregion
46
+ export { CartErrorCode, CartWarningCode, CountryCode, LanguageCode, PredictiveSearchLimitScope, PredictiveSearchType, ProductCollectionSortKeys, SearchUnavailableProductsType, SearchableField };
47
+ //# sourceMappingURL=storefront-api-types.d.mts.map
@@ -0,0 +1,40 @@
1
+ import { introspection } from "./generated/graphql-env.mjs";
2
+ import { StorefrontScalars } from "./scalars.mjs";
3
+ import { InferResult, InferVariables } from "./type-resolver.mjs";
4
+ import { DocumentDecoration, initGraphQLTada } from "gql.tada";
5
+
6
+ //#region src/graphql/graphql.d.ts
7
+ type StorefrontTadaGql = initGraphQLTada<{
8
+ introspection: introspection;
9
+ scalars: StorefrontScalars;
10
+ }>;
11
+ type StorefrontQueryMetadata<Source extends string = string> = {
12
+ readonly __hydrogenQueryBrand: true;
13
+ readonly __hydrogenQuerySource?: Source;
14
+ };
15
+ /**
16
+ * A branded string that carries phantom Result and Variables types.
17
+ *
18
+ * Honest about being a `string` at runtime (unlike `TadaDocumentNode`
19
+ * which claims to be an AST). Implements `DocumentDecoration` so
20
+ * `ResultOf<>` and `VariablesOf<>` work on it.
21
+ */
22
+ type StorefrontQueryString<Result = any, Variables = any, Source extends string = string> = string & DocumentDecoration<Result, Variables> & {
23
+ readonly __hydrogenQueryBrand: true;
24
+ readonly __hydrogenQuerySource?: Source;
25
+ };
26
+ type AnyStorefrontQueryString = string & StorefrontQueryMetadata;
27
+ type SourceOf<Doc> = Doc extends {
28
+ readonly __hydrogenQuerySource?: infer Source extends string;
29
+ } ? Source : never;
30
+ type FragmentSources<Fragments extends readonly AnyStorefrontQueryString[]> = Fragments extends readonly [] ? "" : Fragments extends readonly [infer Only extends AnyStorefrontQueryString] ? SourceOf<Only> : Fragments extends readonly [infer First extends AnyStorefrontQueryString, ...infer Rest extends readonly AnyStorefrontQueryString[]] ? `${SourceOf<First>}\n${FragmentSources<Rest>}` : string;
31
+ type ComposedSource<Source extends string, Fragments extends readonly AnyStorefrontQueryString[]> = FragmentSources<Fragments> extends "" ? Source : `${Source}\n${FragmentSources<Fragments>}`;
32
+ type StorefrontGql = {
33
+ <const Document extends AnyStorefrontQueryString, const Fragments extends readonly AnyStorefrontQueryString[], const DocumentSource extends string = ComposedSource<SourceOf<Document>, Fragments>>(document: Document, fragments: Fragments): StorefrontQueryString<InferResult<DocumentSource>, InferVariables<DocumentSource>, DocumentSource>;
34
+ <const Source extends string>(source: Source): StorefrontQueryString<InferResult<Source>, InferVariables<Source>, Source>;
35
+ <const Source extends string, const Fragments extends readonly AnyStorefrontQueryString[], const DocumentSource extends string = ComposedSource<Source, Fragments>>(source: Source, fragments: Fragments): StorefrontQueryString<InferResult<DocumentSource>, InferVariables<DocumentSource>, DocumentSource>;
36
+ } & StorefrontTadaGql;
37
+ declare const gql: StorefrontGql;
38
+ //#endregion
39
+ export { AnyStorefrontQueryString, ComposedSource, SourceOf, StorefrontQueryString, gql };
40
+ //# sourceMappingURL=graphql.d.mts.map
@@ -0,0 +1,16 @@
1
+ //#region src/graphql/graphql.ts
2
+ const gql = ((source, fragments) => {
3
+ let query = source;
4
+ if (fragments) {
5
+ const seen = /* @__PURE__ */ new Set();
6
+ for (const fragment of fragments) if (!seen.has(fragment)) {
7
+ seen.add(fragment);
8
+ query += "\n" + fragment;
9
+ }
10
+ }
11
+ return query;
12
+ });
13
+
14
+ //#endregion
15
+ export { gql };
16
+ //# sourceMappingURL=graphql.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graphql.mjs","names":[],"sources":["../../src/graphql/graphql.ts"],"sourcesContent":["import type { DocumentDecoration, initGraphQLTada as InitGraphQLTada } from \"gql.tada\";\n\nimport type { introspection } from \"./generated/graphql-env\";\nimport type { StorefrontScalars } from \"./scalars\";\nimport type { InferResult, InferVariables } from \"./type-resolver\";\n\ntype StorefrontTadaGql = InitGraphQLTada<{\n introspection: introspection;\n scalars: StorefrontScalars;\n}>;\n\ntype StorefrontQueryMetadata<Source extends string = string> = {\n readonly __hydrogenQueryBrand: true;\n readonly __hydrogenQuerySource?: Source;\n};\n\n/**\n * A branded string that carries phantom Result and Variables types.\n *\n * Honest about being a `string` at runtime (unlike `TadaDocumentNode`\n * which claims to be an AST). Implements `DocumentDecoration` so\n * `ResultOf<>` and `VariablesOf<>` work on it.\n */\nexport type StorefrontQueryString<\n Result = any,\n Variables = any,\n Source extends string = string,\n> = string &\n DocumentDecoration<Result, Variables> & {\n readonly __hydrogenQueryBrand: true;\n readonly __hydrogenQuerySource?: Source;\n };\n\nexport type AnyStorefrontQueryString = string & StorefrontQueryMetadata;\n\nexport type SourceOf<Doc> = Doc extends {\n readonly __hydrogenQuerySource?: infer Source extends string;\n}\n ? Source\n : never;\n\nexport type FragmentSources<Fragments extends readonly AnyStorefrontQueryString[]> =\n Fragments extends readonly []\n ? \"\"\n : Fragments extends readonly [infer Only extends AnyStorefrontQueryString]\n ? SourceOf<Only>\n : Fragments extends readonly [\n infer First extends AnyStorefrontQueryString,\n ...infer Rest extends readonly AnyStorefrontQueryString[],\n ]\n ? `${SourceOf<First>}\\n${FragmentSources<Rest>}`\n : string;\n\nexport type ComposedSource<\n Source extends string,\n Fragments extends readonly AnyStorefrontQueryString[],\n> = FragmentSources<Fragments> extends \"\" ? Source : `${Source}\\n${FragmentSources<Fragments>}`;\n\ntype StorefrontGql = {\n // Composes an already-declared document with additional fragments. Declared\n // before the raw-source overloads so branded documents recover their literal\n // source through SourceOf instead of binding Source to the branded type,\n // which would degrade ComposedSource and kill inference.\n <\n const Document extends AnyStorefrontQueryString,\n const Fragments extends readonly AnyStorefrontQueryString[],\n const DocumentSource extends string = ComposedSource<SourceOf<Document>, Fragments>,\n >(\n document: Document,\n fragments: Fragments,\n ): StorefrontQueryString<\n InferResult<DocumentSource>,\n InferVariables<DocumentSource>,\n DocumentSource\n >;\n <const Source extends string>(\n source: Source,\n ): StorefrontQueryString<InferResult<Source>, InferVariables<Source>, Source>;\n <\n const Source extends string,\n const Fragments extends readonly AnyStorefrontQueryString[],\n const DocumentSource extends string = ComposedSource<Source, Fragments>,\n >(\n source: Source,\n fragments: Fragments,\n ): StorefrontQueryString<\n InferResult<DocumentSource>,\n InferVariables<DocumentSource>,\n DocumentSource\n >;\n} & StorefrontTadaGql;\n\n// oxlint-disable-next-line typescript-eslint/consistent-type-assertions -- gql.tada adds phantom helper properties to the function type that are not used at runtime.\nexport const gql = ((source: string, fragments?: Array<string>) => {\n let query = source;\n\n if (fragments) {\n const seen = new Set<string>();\n for (const fragment of fragments) {\n if (!seen.has(fragment)) {\n seen.add(fragment);\n query += \"\\n\" + fragment;\n }\n }\n }\n\n return query;\n}) as unknown as StorefrontGql;\n"],"mappings":";AA6FA,MAAa,QAAQ,QAAgB,cAA8B;CACjE,IAAI,QAAQ;AAEZ,KAAI,WAAW;EACb,MAAM,uBAAO,IAAI,KAAa;AAC9B,OAAK,MAAM,YAAY,UACrB,KAAI,CAAC,KAAK,IAAI,SAAS,EAAE;AACvB,QAAK,IAAI,SAAS;AAClB,YAAS,OAAO;;;AAKtB,QAAO"}
@@ -0,0 +1,2 @@
1
+ import { InferResult, InferVariables } from "./type-resolver.mjs";
2
+ import { AnyStorefrontQueryString, ComposedSource, SourceOf, StorefrontQueryString, gql } from "./graphql.mjs";
@@ -0,0 +1,26 @@
1
+ //#region src/graphql/scalars.d.ts
2
+ declare const STOREFRONT_API_SCALARS: {
3
+ readonly Color: "string";
4
+ readonly DateTime: "string";
5
+ readonly Decimal: "string";
6
+ readonly HTML: "string";
7
+ readonly JSON: "string";
8
+ readonly URL: "string";
9
+ readonly UnsignedInt64: "string";
10
+ };
11
+ declare const CUSTOMER_ACCOUNT_API_SCALARS: {
12
+ readonly BigInt: "string";
13
+ readonly DateTime: "string";
14
+ readonly Decimal: "string";
15
+ readonly HTML: "string";
16
+ readonly ISO8601DateTime: "string";
17
+ readonly JSON: "string";
18
+ readonly URL: "string";
19
+ readonly UnsignedInt64: "string";
20
+ };
21
+ type StringScalarTypes<Scalars extends Record<string, string>> = { [Scalar in keyof Scalars]: string };
22
+ type StorefrontScalars = StringScalarTypes<typeof STOREFRONT_API_SCALARS>;
23
+ type CustomerAccountScalars = StringScalarTypes<typeof CUSTOMER_ACCOUNT_API_SCALARS>;
24
+ //#endregion
25
+ export { CustomerAccountScalars, StorefrontScalars };
26
+ //# sourceMappingURL=scalars.d.mts.map
@@ -0,0 +1,229 @@
1
+ import { introspection } from "./generated/graphql-env.mjs";
2
+ import { StorefrontScalars } from "./scalars.mjs";
3
+ import { parseDocument } from "gql.tada";
4
+
5
+ //#region src/graphql/type-resolver.d.ts
6
+ type DefaultScalars = {
7
+ readonly ID: string;
8
+ readonly Boolean: boolean;
9
+ readonly String: string;
10
+ readonly Float: number;
11
+ readonly Int: number;
12
+ };
13
+ type ScalarMap<CustomScalars extends Record<string, unknown>> = { [P in keyof CustomScalars | keyof DefaultScalars]: {
14
+ name: P;
15
+ type: P extends keyof CustomScalars ? CustomScalars[P] : P extends keyof DefaultScalars ? DefaultScalars[P] : never;
16
+ } };
17
+ type GraphQLSchemaFor<SchemaIntrospection extends {
18
+ name: any;
19
+ query: string;
20
+ mutation?: any;
21
+ subscription?: any;
22
+ types: {
23
+ [name: string]: any;
24
+ };
25
+ }, CustomScalars extends Record<string, unknown>> = {
26
+ name: SchemaIntrospection["name"];
27
+ query: SchemaIntrospection["query"];
28
+ mutation: SchemaIntrospection["mutation"];
29
+ subscription: SchemaIntrospection["subscription"];
30
+ types: ScalarMap<CustomScalars> & SchemaIntrospection["types"];
31
+ };
32
+ type StorefrontSchema = GraphQLSchemaFor<introspection, StorefrontScalars>;
33
+ type Obj<T> = T extends {
34
+ [key: string | number]: any;
35
+ } ? { [K in keyof T]: T[K] } : never;
36
+ type ObjectLikeType = {
37
+ kind: "OBJECT" | "INTERFACE" | "UNION";
38
+ name: string;
39
+ fields: {
40
+ [key: string]: any;
41
+ };
42
+ };
43
+ type SchemaLike = {
44
+ name?: any;
45
+ query: string;
46
+ mutation?: any;
47
+ subscription?: any;
48
+ types: {
49
+ [name: string]: any;
50
+ };
51
+ };
52
+ type FieldAlias<Node> = Node extends {
53
+ alias: undefined;
54
+ name: any;
55
+ } ? Node["name"]["value"] : Node extends {
56
+ alias: any;
57
+ } ? Node["alias"]["value"] : never;
58
+ type IsConditional<Node> = Node extends {
59
+ directives: any[];
60
+ } ? Node["directives"][number]["name"]["value"] & ("include" | "skip" | "defer") extends never ? false : true : false;
61
+ type TypeDirective<Node> = Node extends {
62
+ directives: any[];
63
+ } ? Node["directives"][number]["name"]["value"] & ("required" | "_required") extends never ? Node["directives"][number]["name"]["value"] & ("optional" | "_optional") extends never ? void : true : false : void;
64
+ type UnwrapOutputType<Type, SelectionSet, Schema extends SchemaLike, Fragments extends {
65
+ [name: string]: any;
66
+ }, IsOptional> = Type extends {
67
+ readonly kind: "NON_NULL";
68
+ readonly ofType: any;
69
+ } ? UnwrapOutputType<Type["ofType"], SelectionSet, Schema, Fragments, IsOptional extends void ? false : IsOptional> : Type extends {
70
+ readonly kind: "LIST";
71
+ readonly ofType: any;
72
+ } ? IsOptional extends false ? Array<UnwrapOutputType<Type["ofType"], SelectionSet, Schema, Fragments, void>> : null | Array<UnwrapOutputType<Type["ofType"], SelectionSet, Schema, Fragments, void>> : Type extends {
73
+ readonly name: string;
74
+ } ? Schema["types"][Type["name"]] extends ObjectLikeType ? SelectionSet extends {
75
+ kind: "SelectionSet";
76
+ selections: any;
77
+ } ? IsOptional extends false ? ResolveSelection<SelectionSet["selections"], Schema["types"][Type["name"]], Schema, Fragments> : null | ResolveSelection<SelectionSet["selections"], Schema["types"][Type["name"]], Schema, Fragments> : unknown : Schema["types"][Type["name"]] extends {
78
+ type: any;
79
+ } ? IsOptional extends false ? Schema["types"][Type["name"]]["type"] : Schema["types"][Type["name"]]["type"] | null : IsOptional extends false ? Schema["types"][Type["name"]]["enumValues"] : Schema["types"][Type["name"]]["enumValues"] | null : unknown;
80
+ type TypenameOf<Type> = (Type extends {
81
+ name: any;
82
+ } ? Type["name"] : never) | (Type extends {
83
+ possibleTypes: any;
84
+ } ? Type["possibleTypes"] : never);
85
+ type SpreadSubtype<Node, BaseType extends ObjectLikeType, Schema extends SchemaLike, Fragments extends {
86
+ [name: string]: any;
87
+ }> = Node extends {
88
+ kind: "InlineFragment";
89
+ typeCondition?: any;
90
+ } ? Node["typeCondition"] extends {
91
+ kind: "NamedType";
92
+ name: any;
93
+ } ? Schema["types"][Node["typeCondition"]["name"]["value"]] : BaseType : Node extends {
94
+ kind: "FragmentSpread";
95
+ name: any;
96
+ } ? Node["name"]["value"] extends keyof Fragments ? Schema["types"][Fragments[Node["name"]["value"]]["typeCondition"]["name"]["value"]] : void : void;
97
+ type FragmentSelection<Node, PossibleType extends string, Type extends ObjectLikeType, Schema extends SchemaLike, Fragments extends {
98
+ [name: string]: any;
99
+ }> = Node extends {
100
+ kind: "InlineFragment";
101
+ selectionSet: any;
102
+ } ? SelectionWalker<Node["selectionSet"]["selections"], PossibleType, Type, Schema, Fragments> : Node extends {
103
+ kind: "FragmentSpread";
104
+ name: any;
105
+ } ? Node["name"]["value"] extends keyof Fragments ? SelectionWalker<Fragments[Node["name"]["value"]]["selectionSet"]["selections"], PossibleType, Type, Schema, Fragments> : never : never;
106
+ interface SelectionAcc<Fields extends {} = {}, Rest = unknown> {
107
+ fields: Fields;
108
+ rest: Rest;
109
+ }
110
+ type SelectionWalker<Selections, PossibleType extends string, Type extends ObjectLikeType, Schema extends SchemaLike, Fragments extends {
111
+ [name: string]: any;
112
+ }, Acc extends SelectionAcc = SelectionAcc> = Selections extends [infer Node, ...infer Rest] ? SelectionWalker<Rest, PossibleType, Type, Schema, Fragments, Node extends {
113
+ kind: "FragmentSpread" | "InlineFragment";
114
+ } ? SpreadSubtype<Node, Type, Schema, Fragments> extends infer Sub extends ObjectLikeType ? PossibleType extends TypenameOf<Sub> ? IsConditional<Node> extends true ? SelectionAcc<Acc["fields"], Acc["rest"] & ({} | FragmentSelection<Node, PossibleType, Sub, Schema, Fragments>)> : SelectionAcc<Acc["fields"] & FragmentSelection<Node, PossibleType, Sub, Schema, Fragments>, Acc["rest"]> : Acc : Acc : Node extends {
115
+ kind: "Field";
116
+ name: any;
117
+ selectionSet: any;
118
+ } ? IsConditional<Node> extends true ? SelectionAcc<Acc["fields"] & { [P in FieldAlias<Node>]?: Node["name"]["value"] extends "__typename" ? PossibleType : UnwrapOutputType<Type["fields"][Node["name"]["value"]]["type"], Node["selectionSet"], Schema, Fragments, TypeDirective<Node>> }, Acc["rest"]> : SelectionAcc<Acc["fields"] & { [P in FieldAlias<Node>]: Node["name"]["value"] extends "__typename" ? PossibleType : UnwrapOutputType<Type["fields"][Node["name"]["value"]]["type"], Node["selectionSet"], Schema, Fragments, TypeDirective<Node>> }, Acc["rest"]> : Acc> : Acc["rest"] extends infer T ? Obj<Acc["fields"] & T> : never;
119
+ type ResolveSelection<Selections, Type extends ObjectLikeType, Schema extends SchemaLike, Fragments extends {
120
+ [name: string]: any;
121
+ }> = Type extends {
122
+ kind: "UNION" | "INTERFACE";
123
+ possibleTypes: any;
124
+ } ? { [PT in Type["possibleTypes"]]: SelectionWalker<Selections, PT, Type, Schema, Fragments, SelectionAcc<{
125
+ __typename?: PT;
126
+ }>> }[Type["possibleTypes"]] : Type extends {
127
+ kind: "OBJECT";
128
+ name: any;
129
+ } ? SelectionWalker<Selections, Type["name"], Type, Schema, Fragments> : {};
130
+ type FragmentMap<Defs, Map = {}> = Defs extends readonly [infer Def, ...infer Rest] ? FragmentMap<Rest, Def extends {
131
+ kind: "FragmentDefinition";
132
+ name: any;
133
+ } ? { [N in Def["name"]["value"]]: Def } & Map : Map> : Map;
134
+ type FirstOperation<Defs> = Defs extends readonly [infer Def, ...infer Rest] ? Def extends {
135
+ kind: "OperationDefinition";
136
+ } ? Def : FirstOperation<Rest> : never;
137
+ type SingleOperation<Defs, Operation = never> = Defs extends readonly [infer Def, ...infer Rest] ? Def extends {
138
+ kind: "OperationDefinition";
139
+ } ? [Operation] extends [never] ? SingleOperation<Rest, Def> : never : SingleOperation<Rest, Operation> : Operation;
140
+ type FirstFragment<Defs> = Defs extends readonly [infer Def, ...infer Rest] ? Def extends {
141
+ kind: "FragmentDefinition";
142
+ } ? Def : FirstFragment<Rest> : never;
143
+ type OperationType<Def, Schema extends SchemaLike, Fragments extends {
144
+ [name: string]: any;
145
+ }> = Def extends {
146
+ kind: "OperationDefinition";
147
+ selectionSet: any;
148
+ operation: any;
149
+ } ? Schema["types"][Schema[Def["operation"]]] extends infer T extends ObjectLikeType ? ResolveSelection<Def["selectionSet"]["selections"], T, Schema, Fragments> : {} : never;
150
+ type FragmentType<Def, Schema extends SchemaLike, Fragments extends {
151
+ [name: string]: any;
152
+ }> = Def extends {
153
+ kind: "FragmentDefinition";
154
+ selectionSet: any;
155
+ typeCondition: any;
156
+ } ? Schema["types"][Def["typeCondition"]["name"]["value"]] extends infer T extends ObjectLikeType ? ResolveSelection<Def["selectionSet"]["selections"], T, Schema, Fragments> : never : never;
157
+ type DocumentType<Doc, Schema extends SchemaLike> = Doc extends {
158
+ kind: "Document";
159
+ definitions: infer Defs extends readonly unknown[];
160
+ } ? FirstOperation<Defs> extends infer Operation ? [Operation] extends [never] ? FragmentType<FirstFragment<Defs>, Schema, FragmentMap<Defs>> : OperationType<Operation, Schema, FragmentMap<Defs>> : never : never;
161
+ type ResolveInputScalar<TypeName, Schema extends SchemaLike> = TypeName extends keyof Schema["types"] ? Schema["types"][TypeName] extends {
162
+ kind: "INPUT_OBJECT";
163
+ inputFields: any;
164
+ isOneOf?: any;
165
+ } ? Schema["types"][TypeName]["isOneOf"] extends true ? InputObjectOneOf<Schema["types"][TypeName]["inputFields"], Schema> : InputObject<Schema["types"][TypeName]["inputFields"], Schema> : Schema["types"][TypeName] extends {
166
+ type: any;
167
+ } ? Schema["types"][TypeName]["type"] : Schema["types"][TypeName]["enumValues"] : never;
168
+ type InputObject<Fields, Schema extends SchemaLike, Acc = {}> = Fields extends [infer F, ...infer Rest] ? InputObject<Rest, Schema, (F extends {
169
+ name: any;
170
+ type: any;
171
+ } ? F extends {
172
+ defaultValue?: undefined | null;
173
+ type: {
174
+ kind: "NON_NULL";
175
+ };
176
+ } ? { [N in F["name"]]: UnwrapInputRef<F["type"], Schema, true> } : { [N in F["name"]]?: UnwrapInputRef<F["type"], Schema, true> | null } : {}) & Acc> : Obj<Acc>;
177
+ type InputObjectOneOf<Fields, Schema extends SchemaLike, Acc = never> = Fields extends [infer F, ...infer Rest] ? InputObjectOneOf<Rest, Schema, (F extends {
178
+ name: any;
179
+ type: any;
180
+ } ? { [N in F["name"]]: UnwrapInputRef<F["type"], Schema, false> } : never) | Acc> : Acc;
181
+ type UnwrapInputRef<Type, Schema extends SchemaLike, IsOptional> = Type extends {
182
+ kind: "NON_NULL";
183
+ ofType: any;
184
+ } ? UnwrapInputRef<Type["ofType"], Schema, false> : Type extends {
185
+ kind: "LIST";
186
+ ofType: any;
187
+ } ? IsOptional extends false ? Array<UnwrapInputRef<Type["ofType"], Schema, true>> : null | Array<UnwrapInputRef<Type["ofType"], Schema, true>> : Type extends {
188
+ name: any;
189
+ } ? IsOptional extends false ? ResolveInputScalar<Type["name"], Schema> : null | ResolveInputScalar<Type["name"], Schema> : unknown;
190
+ type UnwrapVarTypeRef<Type, Schema extends SchemaLike, IsOptional> = Type extends {
191
+ kind: "NonNullType";
192
+ type: any;
193
+ } ? UnwrapVarTypeRef<Type["type"], Schema, false> : Type extends {
194
+ kind: "ListType";
195
+ type: any;
196
+ } ? IsOptional extends false ? Array<UnwrapVarTypeRef<Type["type"], Schema, true>> : null | Array<UnwrapVarTypeRef<Type["type"], Schema, true>> : Type extends {
197
+ kind: "NamedType";
198
+ name: any;
199
+ } ? IsOptional extends false ? ResolveInputScalar<Type["name"]["value"], Schema> : null | ResolveInputScalar<Type["name"]["value"], Schema> : unknown;
200
+ type VariablesWalker<Vars, Schema extends SchemaLike, Acc = {}> = Vars extends [infer V, ...infer Rest] ? VariablesWalker<Rest, Schema, (V extends {
201
+ kind: "VariableDefinition";
202
+ variable: any;
203
+ type: any;
204
+ } ? V extends {
205
+ defaultValue: undefined;
206
+ type: {
207
+ kind: "NonNullType";
208
+ };
209
+ } ? { [N in V["variable"]["name"]["value"]]: UnwrapVarTypeRef<V["type"], Schema, true> } : { [N in V["variable"]["name"]["value"]]?: UnwrapVarTypeRef<V["type"], Schema, true> } : {}) & Acc> : Obj<Acc>;
210
+ type VariablesType<Doc, Schema extends SchemaLike> = Doc extends {
211
+ kind: "Document";
212
+ definitions: infer Defs extends readonly unknown[];
213
+ } ? FirstOperation<Defs> extends {
214
+ variableDefinitions: any;
215
+ } ? VariablesWalker<FirstOperation<Defs>["variableDefinitions"], Schema> : {} : {};
216
+ type OperationKindType<Doc> = Doc extends {
217
+ kind: "Document";
218
+ definitions: infer Defs extends readonly unknown[];
219
+ } ? [SingleOperation<Defs>] extends [never] ? "unknown" : SingleOperation<Defs> extends {
220
+ operation: infer Operation extends string;
221
+ } ? Operation : "unknown" : "unknown";
222
+ type InferResultForSchema<T extends string, Schema extends SchemaLike> = parseDocument<T> extends infer Doc ? Doc extends never ? never : DocumentType<Doc, Schema> : never;
223
+ type InferVariablesForSchema<T extends string, Schema extends SchemaLike> = parseDocument<T> extends infer Doc ? Doc extends never ? never : VariablesType<Doc, Schema> : never;
224
+ type InferResult<T extends string> = InferResultForSchema<T, StorefrontSchema>;
225
+ type InferVariables<T extends string> = InferVariablesForSchema<T, StorefrontSchema>;
226
+ type InferOperationKind<T extends string> = parseDocument<T> extends infer Doc ? [Doc] extends [never] ? "unknown" : OperationKindType<Doc> : "unknown";
227
+ //#endregion
228
+ export { GraphQLSchemaFor, InferOperationKind, InferResult, InferResultForSchema, InferVariables, InferVariablesForSchema };
229
+ //# sourceMappingURL=type-resolver.d.mts.map
@@ -0,0 +1,44 @@
1
+ import { CartData, CartState } from "../core/cart/state.mjs";
2
+ import { CartStore, CreateCartStoreOptions } from "../core/cart/cart.mjs";
3
+ import { CartFormRegister } from "../core/cart/form.mjs";
4
+ import { CartDataFromHandlers } from "../core/cart/server-handlers.mjs";
5
+ import { FormHTMLAttributes, ReactNode, SubmitEvent } from "react";
6
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
7
+
8
+ //#region src/react/cart.d.ts
9
+ type TypedCartProviderProps<TData extends CartData> = {
10
+ initialData?: CartInitialData<TData>;
11
+ children?: ReactNode;
12
+ };
13
+ type CartInitialData<TData extends CartData = CartData> = CreateCartStoreOptions<TData>["initialData"];
14
+ /** Actions for reconciling cart state after updates outside Standard Actions. */
15
+ type CartActions = Pick<CartStore, "refresh">;
16
+ type TypedCartComponents<TData extends CartData> = {
17
+ CartProvider: (props: TypedCartProviderProps<TData>) => ReactNode;
18
+ useCart: <S>(selector: (state: CartState<TData>) => S, isEqual?: (a: S, b: S) => boolean) => S;
19
+ useSuspenseCart: <S>(selector: (state: CartState<TData>) => S, isEqual?: (a: S, b: S) => boolean) => S;
20
+ useOptionalCart: <S>(selector: (state: CartState<TData>) => S, isEqual?: (a: S, b: S) => boolean) => S | undefined;
21
+ useCartActions: typeof useCartActions;
22
+ useCartForm: typeof useCartForm;
23
+ };
24
+ declare function createCartComponents<THandlers>(): TypedCartComponents<CartDataFromHandlers<THandlers>>;
25
+ declare function CartProvider({
26
+ initialData,
27
+ children
28
+ }: {
29
+ initialData?: CartInitialData;
30
+ children?: ReactNode;
31
+ }): _$react_jsx_runtime0.JSX.Element;
32
+ declare function useCart<TData extends CartData = CartData, S = unknown>(selector: (state: CartState<TData>) => S, isEqual?: (a: S, b: S) => boolean): S;
33
+ declare function useCartActions(): CartActions;
34
+ declare function useCartAnalytics(): void;
35
+ declare function useCartForm(): {
36
+ formProps: (opts?: {
37
+ beforeSubmit?: (e: SubmitEvent<HTMLFormElement>) => void;
38
+ afterSubmit?: (e: SubmitEvent<HTMLFormElement>) => void;
39
+ }) => FormHTMLAttributes<HTMLFormElement>;
40
+ register: CartFormRegister;
41
+ };
42
+ //#endregion
43
+ export { CartActions, CartProvider, createCartComponents, useCart, useCartActions, useCartAnalytics, useCartForm };
44
+ //# sourceMappingURL=cart.d.mts.map
@@ -0,0 +1,155 @@
1
+ "use client";
2
+
3
+ import { trackCartAnalytics } from "../core/analytics/cart-tracker.mjs";
4
+ import { createCartFormRegister } from "../core/cart/form.mjs";
5
+ import { configureCartEndpoint, createCartStore } from "../core/cart/cart.mjs";
6
+ import { attachQuantityInput } from "../core/cart/attach-quantity-input.mjs";
7
+ import { createContext, useContext, useEffect, useMemo, useRef, useSyncExternalStore } from "react";
8
+ import { jsx } from "react/jsx-runtime";
9
+
10
+ //#region src/react/cart.tsx
11
+ let cartEndpoint = "/api/cart";
12
+ const CartContext = createContext(null);
13
+ function getCartEndpoint() {
14
+ return cartEndpoint;
15
+ }
16
+ function createCartComponents() {
17
+ function TypedCartProvider({ initialData, children }) {
18
+ return /* @__PURE__ */ jsx(CartProvider, {
19
+ initialData,
20
+ children
21
+ });
22
+ }
23
+ function useTypedCart(selector, isEqual) {
24
+ return useCart((state) => selector(state), isEqual);
25
+ }
26
+ function useTypedOptionalCart(selector, isEqual) {
27
+ return useOptionalCart((state) => selector(state), isEqual);
28
+ }
29
+ function useSuspenseCart(selector, isEqual) {
30
+ const readyPromise = useCart((state) => state.readyPromise);
31
+ if (readyPromise) throw readyPromise;
32
+ return useCart(selector, isEqual);
33
+ }
34
+ return {
35
+ CartProvider: TypedCartProvider,
36
+ useCart: useTypedCart,
37
+ useSuspenseCart,
38
+ useOptionalCart: useTypedOptionalCart,
39
+ useCartActions,
40
+ useCartForm
41
+ };
42
+ }
43
+ function useCartStore(hookName = "useCart") {
44
+ const store = useContext(CartContext);
45
+ if (!store) throw new Error(`${hookName} must be used inside <CartProvider>.`);
46
+ return store;
47
+ }
48
+ function useOptionalCartStore() {
49
+ return useContext(CartContext);
50
+ }
51
+ function CartProvider({ initialData, children }) {
52
+ const store = useMemo(() => createCartStore({ initialData }), []);
53
+ useEffect(() => {
54
+ configureCartEndpoint(cartEndpoint);
55
+ store.connect();
56
+ return () => {
57
+ store.destroy();
58
+ };
59
+ }, [store]);
60
+ return /* @__PURE__ */ jsx(CartContext.Provider, {
61
+ value: store,
62
+ children
63
+ });
64
+ }
65
+ function useCart(selector, isEqual) {
66
+ return useCartSelector(useCartStore(), selector, isEqual);
67
+ }
68
+ function useCartActions() {
69
+ const store = useCartStore("useCartActions");
70
+ return useMemo(() => ({ refresh: store.refresh }), [store]);
71
+ }
72
+ function useCartAnalytics() {
73
+ const store = useCartStore();
74
+ useEffect(() => trackCartAnalytics(store), [store]);
75
+ }
76
+ /**
77
+ * Like `useCart`, but returns `undefined` when rendered outside a `<CartProvider>`.
78
+ * @internal
79
+ */
80
+ function useOptionalCart(selector, isEqual) {
81
+ const store = useOptionalCartStore();
82
+ if (!store) return void 0;
83
+ return useCartSelector(store, selector, isEqual);
84
+ }
85
+ function useCartSelector(store, selector, isEqual) {
86
+ const cachedRef = useRef(null);
87
+ const getSnapshot = () => {
88
+ const state = store.getState();
89
+ if (cachedRef.current && cachedRef.current.state === state && cachedRef.current.selector === selector) return cachedRef.current.value;
90
+ const next = selector(state);
91
+ if (cachedRef.current && isEqual?.(cachedRef.current.value, next)) {
92
+ cachedRef.current = {
93
+ state,
94
+ selector,
95
+ value: cachedRef.current.value
96
+ };
97
+ return cachedRef.current.value;
98
+ }
99
+ cachedRef.current = {
100
+ state,
101
+ selector,
102
+ value: next
103
+ };
104
+ return next;
105
+ };
106
+ return useSyncExternalStore(store.subscribe, getSnapshot, getSnapshot);
107
+ }
108
+ function useCartForm() {
109
+ const store = useCartStore();
110
+ const coreRegister = useMemo(() => createCartFormRegister(), []);
111
+ const register = useMemo(() => {
112
+ const wrapped = ((...args) => {
113
+ const result = coreRegister(...args);
114
+ const [field, opts] = args;
115
+ if (field === "quantity" && opts?.interactive) {
116
+ let cleanup = null;
117
+ const ref = (el) => {
118
+ cleanup?.();
119
+ cleanup = null;
120
+ if (el) {
121
+ const form = el.closest("form");
122
+ if (form) cleanup = attachQuantityInput(el, form);
123
+ }
124
+ };
125
+ const { value: _, ...rest } = result;
126
+ return {
127
+ ...rest,
128
+ defaultValue: result.value,
129
+ ref
130
+ };
131
+ }
132
+ return result;
133
+ });
134
+ return wrapped;
135
+ }, [coreRegister]);
136
+ const formProps = (opts) => ({
137
+ onSubmit: (e) => {
138
+ opts?.beforeSubmit?.(e);
139
+ if (e.defaultPrevented) return;
140
+ e.preventDefault();
141
+ store.handleFormSubmit(e.nativeEvent).catch(() => {});
142
+ opts?.afterSubmit?.(e);
143
+ },
144
+ method: "post",
145
+ action: cartEndpoint
146
+ });
147
+ return {
148
+ formProps,
149
+ register
150
+ };
151
+ }
152
+
153
+ //#endregion
154
+ export { CartProvider, createCartComponents, getCartEndpoint, useCart, useCartActions, useCartAnalytics, useCartForm, useCartStore };
155
+ //# sourceMappingURL=cart.mjs.map