@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.
- package/README.md +73 -13
- package/bin/hydrogen.mjs +7 -0
- package/dist/cli/index.mjs +647 -0
- package/dist/client/client.d.mts +34 -0
- package/dist/client/client.mjs +206 -0
- package/dist/client/client.mjs.map +1 -0
- package/dist/client/errors.d.mts +48 -0
- package/dist/client/errors.mjs +52 -0
- package/dist/client/errors.mjs.map +1 -0
- package/dist/client/index.d.mts +4 -0
- package/dist/client/types.d.mts +147 -0
- package/dist/core/analytics/cart-tracker.d.mts +8 -0
- package/dist/core/analytics/cart-tracker.mjs +144 -0
- package/dist/core/analytics/cart-tracker.mjs.map +1 -0
- package/dist/core/analytics/events.d.mts +15 -0
- package/dist/core/analytics/events.mjs +15 -0
- package/dist/core/analytics/events.mjs.map +1 -0
- package/dist/core/analytics/index.d.mts +3 -0
- package/dist/core/analytics/types.d.mts +143 -0
- package/dist/core/analytics/utils/flatten-connection.d.mts +19 -0
- package/dist/core/analytics/utils/flatten-connection.mjs +25 -0
- package/dist/core/analytics/utils/flatten-connection.mjs.map +1 -0
- package/dist/core/cache/cache-status.mjs +17 -0
- package/dist/core/cache/cache-status.mjs.map +1 -0
- package/dist/core/cache/fetch-with-cache.d.mts +43 -0
- package/dist/core/cache/fetch-with-cache.mjs +188 -0
- package/dist/core/cache/fetch-with-cache.mjs.map +1 -0
- package/dist/core/cache/key.d.mts +6 -0
- package/dist/core/cache/key.mjs +27 -0
- package/dist/core/cache/key.mjs.map +1 -0
- package/dist/core/cache/run-with-cache.d.mts +36 -0
- package/dist/core/cache/run-with-cache.mjs +114 -0
- package/dist/core/cache/run-with-cache.mjs.map +1 -0
- package/dist/core/cache/store.d.mts +19 -0
- package/dist/core/cache/store.mjs +62 -0
- package/dist/core/cache/store.mjs.map +1 -0
- package/dist/core/cache/strategies.d.mts +39 -0
- package/dist/core/cache/strategies.mjs +70 -0
- package/dist/core/cache/strategies.mjs.map +1 -0
- package/dist/core/cart/actions.d.mts +50 -0
- package/dist/core/cart/actions.mjs +240 -0
- package/dist/core/cart/actions.mjs.map +1 -0
- package/dist/core/cart/attach-quantity-input.d.mts +5 -0
- package/dist/core/cart/attach-quantity-input.mjs +17 -0
- package/dist/core/cart/attach-quantity-input.mjs.map +1 -0
- package/dist/core/cart/buyer-identity-sync.d.mts +23 -0
- package/dist/core/cart/buyer-identity-sync.mjs +9 -0
- package/dist/core/cart/buyer-identity-sync.mjs.map +1 -0
- package/dist/core/cart/cart.d.mts +37 -0
- package/dist/core/cart/cart.mjs +1707 -0
- package/dist/core/cart/cart.mjs.map +1 -0
- package/dist/core/cart/cookie.d.mts +5 -0
- package/dist/core/cart/cookie.mjs +28 -0
- package/dist/core/cart/cookie.mjs.map +1 -0
- package/dist/core/cart/form.d.mts +130 -0
- package/dist/core/cart/form.mjs +75 -0
- package/dist/core/cart/form.mjs.map +1 -0
- package/dist/core/cart/get-cart.d.mts +25 -0
- package/dist/core/cart/get-cart.mjs +32 -0
- package/dist/core/cart/get-cart.mjs.map +1 -0
- package/dist/core/cart/index.d.mts +10 -0
- package/dist/core/cart/quantity.d.mts +10 -0
- package/dist/core/cart/quantity.mjs +14 -0
- package/dist/core/cart/quantity.mjs.map +1 -0
- package/dist/core/cart/queries.d.mts +4296 -0
- package/dist/core/cart/queries.mjs +70 -0
- package/dist/core/cart/queries.mjs.map +1 -0
- package/dist/core/cart/server-handlers.d.mts +82 -0
- package/dist/core/cart/server-handlers.mjs +322 -0
- package/dist/core/cart/server-handlers.mjs.map +1 -0
- package/dist/core/cart/state.d.mts +137 -0
- package/dist/core/cart/state.mjs +76 -0
- package/dist/core/cart/state.mjs.map +1 -0
- package/dist/core/cart/sync-quantity-inputs.mjs +16 -0
- package/dist/core/cart/sync-quantity-inputs.mjs.map +1 -0
- package/dist/core/collection/collection.d.mts +134 -0
- package/dist/core/collection/collection.mjs +170 -0
- package/dist/core/collection/collection.mjs.map +1 -0
- package/dist/core/collection/index.d.mts +6 -0
- package/dist/core/collection/reconciler.d.mts +32 -0
- package/dist/core/collection/reconciler.mjs +89 -0
- package/dist/core/collection/reconciler.mjs.map +1 -0
- package/dist/core/collection/state.d.mts +66 -0
- package/dist/core/collection/state.mjs +20 -0
- package/dist/core/collection/state.mjs.map +1 -0
- package/dist/core/collection/url.d.mts +71 -0
- package/dist/core/collection/url.mjs +376 -0
- package/dist/core/collection/url.mjs.map +1 -0
- package/dist/core/constants.d.mts +5 -0
- package/dist/core/constants.mjs +8 -0
- package/dist/core/constants.mjs.map +1 -0
- package/dist/core/headers.mjs +43 -0
- package/dist/core/headers.mjs.map +1 -0
- package/dist/core/index.d.mts +56 -0
- package/dist/core/index.mjs +45 -0
- package/dist/core/logging/logging.d.mts +21 -0
- package/dist/core/logging/logging.mjs +99 -0
- package/dist/core/logging/logging.mjs.map +1 -0
- package/dist/core/logging/types.d.mts +40 -0
- package/dist/core/logging/types.mjs +18 -0
- package/dist/core/logging/types.mjs.map +1 -0
- package/dist/core/money/cache.mjs +25 -0
- package/dist/core/money/cache.mjs.map +1 -0
- package/dist/core/money/format.d.mts +15 -0
- package/dist/core/money/format.mjs +243 -0
- package/dist/core/money/format.mjs.map +1 -0
- package/dist/core/money/types.d.mts +47 -0
- package/dist/core/observable.mjs +46 -0
- package/dist/core/observable.mjs.map +1 -0
- package/dist/core/predictive-search/constants.d.mts +5 -0
- package/dist/core/predictive-search/constants.mjs +6 -0
- package/dist/core/predictive-search/constants.mjs.map +1 -0
- package/dist/core/predictive-search/form.d.mts +31 -0
- package/dist/core/predictive-search/form.mjs +31 -0
- package/dist/core/predictive-search/form.mjs.map +1 -0
- package/dist/core/predictive-search/index.d.mts +6 -0
- package/dist/core/predictive-search/queries.d.mts +118 -0
- package/dist/core/predictive-search/queries.mjs +81 -0
- package/dist/core/predictive-search/queries.mjs.map +1 -0
- package/dist/core/predictive-search/search.d.mts +32 -0
- package/dist/core/predictive-search/search.mjs +74 -0
- package/dist/core/predictive-search/search.mjs.map +1 -0
- package/dist/core/predictive-search/server-handlers.d.mts +36 -0
- package/dist/core/predictive-search/server-handlers.mjs +113 -0
- package/dist/core/predictive-search/server-handlers.mjs.map +1 -0
- package/dist/core/predictive-search/store.d.mts +44 -0
- package/dist/core/predictive-search/store.mjs +224 -0
- package/dist/core/predictive-search/store.mjs.map +1 -0
- package/dist/core/predictive-search/url.d.mts +41 -0
- package/dist/core/predictive-search/url.mjs +71 -0
- package/dist/core/predictive-search/url.mjs.map +1 -0
- package/dist/core/product/accept-variant-id.mjs +98 -0
- package/dist/core/product/accept-variant-id.mjs.map +1 -0
- package/dist/core/product/form.d.mts +63 -0
- package/dist/core/product/form.mjs +44 -0
- package/dist/core/product/form.mjs.map +1 -0
- package/dist/core/product/index.d.mts +5 -0
- package/dist/core/product/options.d.mts +43 -0
- package/dist/core/product/options.mjs +296 -0
- package/dist/core/product/options.mjs.map +1 -0
- package/dist/core/product/product-form.d.mts +72 -0
- package/dist/core/product/product-form.mjs +158 -0
- package/dist/core/product/product-form.mjs.map +1 -0
- package/dist/core/product/state.d.mts +68 -0
- package/dist/core/product/url.d.mts +47 -0
- package/dist/core/product/url.mjs +69 -0
- package/dist/core/product/url.mjs.map +1 -0
- package/dist/core/request-context.d.mts +75 -0
- package/dist/core/request-context.mjs +141 -0
- package/dist/core/request-context.mjs.map +1 -0
- package/dist/core/request-routing/handle-shopify-redirects.d.mts +17 -0
- package/dist/core/request-routing/handle-shopify-redirects.mjs +31 -0
- package/dist/core/request-routing/handle-shopify-redirects.mjs.map +1 -0
- package/dist/core/request-routing/handle-shopify-routes.d.mts +14 -0
- package/dist/core/request-routing/handle-shopify-routes.mjs +42 -0
- package/dist/core/request-routing/handle-shopify-routes.mjs.map +1 -0
- package/dist/core/request-routing/interceptors/admin-redirect.mjs +12 -0
- package/dist/core/request-routing/interceptors/admin-redirect.mjs.map +1 -0
- package/dist/core/request-routing/interceptors/ajax-api.mjs +16 -0
- package/dist/core/request-routing/interceptors/ajax-api.mjs.map +1 -0
- package/dist/core/request-routing/interceptors/api-proxy.mjs +20 -0
- package/dist/core/request-routing/interceptors/api-proxy.mjs.map +1 -0
- package/dist/core/request-routing/interceptors/checkout.mjs +58 -0
- package/dist/core/request-routing/interceptors/checkout.mjs.map +1 -0
- package/dist/core/request-routing/interceptors/mcp-proxy.mjs +23 -0
- package/dist/core/request-routing/interceptors/mcp-proxy.mjs.map +1 -0
- package/dist/core/request-routing/interceptors/proxy.mjs +73 -0
- package/dist/core/request-routing/interceptors/proxy.mjs.map +1 -0
- package/dist/core/request-routing/interceptors/query-param-redirect.mjs +22 -0
- package/dist/core/request-routing/interceptors/query-param-redirect.mjs.map +1 -0
- package/dist/core/request-routing/interceptors/sfapi-proxy.mjs +27 -0
- package/dist/core/request-routing/interceptors/sfapi-proxy.mjs.map +1 -0
- package/dist/core/request-routing/interceptors/standard-routes.mjs +19 -0
- package/dist/core/request-routing/interceptors/standard-routes.mjs.map +1 -0
- package/dist/core/request-routing/interceptors/url-redirects.mjs +27 -0
- package/dist/core/request-routing/interceptors/url-redirects.mjs.map +1 -0
- package/dist/core/request-routing/interceptors/well-known.mjs +22 -0
- package/dist/core/request-routing/interceptors/well-known.mjs.map +1 -0
- package/dist/core/request-routing/registered-routes.d.mts +7 -0
- package/dist/core/request-routing/registered-routes.mjs +72 -0
- package/dist/core/request-routing/registered-routes.mjs.map +1 -0
- package/dist/core/request-routing/route-types.d.mts +56 -0
- package/dist/core/request-routing/safe-apply-response-headers.mjs +16 -0
- package/dist/core/request-routing/safe-apply-response-headers.mjs.map +1 -0
- package/dist/core/shop-pay/shop-pay.d.mts +102 -0
- package/dist/core/shop-pay/shop-pay.mjs +289 -0
- package/dist/core/shop-pay/shop-pay.mjs.map +1 -0
- package/dist/core/shopify-scripts/analytics.mjs +26 -0
- package/dist/core/shopify-scripts/analytics.mjs.map +1 -0
- package/dist/core/shopify-scripts/consent.mjs +17 -0
- package/dist/core/shopify-scripts/consent.mjs.map +1 -0
- package/dist/core/shopify-scripts/constants.mjs +19 -0
- package/dist/core/shopify-scripts/constants.mjs.map +1 -0
- package/dist/core/shopify-scripts/deprecated-cookies.mjs +97 -0
- package/dist/core/shopify-scripts/deprecated-cookies.mjs.map +1 -0
- package/dist/core/shopify-scripts/global.d.mts +1 -0
- package/dist/core/shopify-scripts/global.mjs +86 -0
- package/dist/core/shopify-scripts/global.mjs.map +1 -0
- package/dist/core/shopify-scripts/index.d.mts +27 -0
- package/dist/core/shopify-scripts/index.mjs +135 -0
- package/dist/core/shopify-scripts/index.mjs.map +1 -0
- package/dist/core/shopify-scripts/initialize.d.mts +18 -0
- package/dist/core/shopify-scripts/initialize.mjs +27 -0
- package/dist/core/shopify-scripts/initialize.mjs.map +1 -0
- package/dist/core/shopify-scripts/page-view.mjs +49 -0
- package/dist/core/shopify-scripts/page-view.mjs.map +1 -0
- package/dist/core/shopify-scripts/perfkit.mjs +33 -0
- package/dist/core/shopify-scripts/perfkit.mjs.map +1 -0
- package/dist/core/shopify-scripts/render.d.mts +1 -0
- package/dist/core/shopify-scripts/render.mjs +23 -0
- package/dist/core/shopify-scripts/render.mjs.map +1 -0
- package/dist/core/shopify-scripts/types.d.mts +76 -0
- package/dist/core/shopify-scripts/utils/cookie-domain.mjs +43 -0
- package/dist/core/shopify-scripts/utils/cookie-domain.mjs.map +1 -0
- package/dist/core/shopify-scripts/utils/inline-script.mjs +8 -0
- package/dist/core/shopify-scripts/utils/inline-script.mjs.map +1 -0
- package/dist/core/shopify-scripts/utils/navigation.mjs +46 -0
- package/dist/core/shopify-scripts/utils/navigation.mjs.map +1 -0
- package/dist/core/shopify-scripts/utils/tracking-values.mjs +65 -0
- package/dist/core/shopify-scripts/utils/tracking-values.mjs.map +1 -0
- package/dist/core/shopify-scripts/utils/uuid.mjs +17 -0
- package/dist/core/shopify-scripts/utils/uuid.mjs.map +1 -0
- package/dist/core/shopify-scripts/webmcp.mjs +22 -0
- package/dist/core/shopify-scripts/webmcp.mjs.map +1 -0
- package/dist/core/standard-routes/build.d.mts +34 -0
- package/dist/core/standard-routes/build.mjs +54 -0
- package/dist/core/standard-routes/build.mjs.map +1 -0
- package/dist/core/standard-routes/defaults.mjs +31 -0
- package/dist/core/standard-routes/defaults.mjs.map +1 -0
- package/dist/core/standard-routes/match.mjs +108 -0
- package/dist/core/standard-routes/match.mjs.map +1 -0
- package/dist/core/standard-routes/path.mjs +58 -0
- package/dist/core/standard-routes/path.mjs.map +1 -0
- package/dist/core/standard-routes/redirects.mjs +51 -0
- package/dist/core/standard-routes/redirects.mjs.map +1 -0
- package/dist/core/standard-routes/types.d.mts +95 -0
- package/dist/core/url.mjs +42 -0
- package/dist/core/url.mjs.map +1 -0
- package/dist/core/utils/load-script.mjs +34 -0
- package/dist/core/utils/load-script.mjs.map +1 -0
- package/dist/core/utils/parse-gid.mjs +33 -0
- package/dist/core/utils/parse-gid.mjs.map +1 -0
- package/dist/core/utils/record.mjs +8 -0
- package/dist/core/utils/record.mjs.map +1 -0
- package/dist/customer-account/client.d.mts +50 -0
- package/dist/customer-account/client.mjs +239 -0
- package/dist/customer-account/client.mjs.map +1 -0
- package/dist/customer-account/errors.d.mts +28 -0
- package/dist/customer-account/errors.mjs +39 -0
- package/dist/customer-account/errors.mjs.map +1 -0
- package/dist/customer-account/graphql.d.mts +29 -0
- package/dist/customer-account/graphql.mjs +39 -0
- package/dist/customer-account/graphql.mjs.map +1 -0
- package/dist/customer-account/index.d.mts +7 -0
- package/dist/customer-account/index.mjs +7 -0
- package/dist/customer-account/session.d.mts +117 -0
- package/dist/customer-account/session.mjs +733 -0
- package/dist/customer-account/session.mjs.map +1 -0
- package/dist/customer-account/type-resolver.d.mts +11 -0
- package/dist/customer-account-api-types.d.ts +3269 -3270
- package/dist/customer-account.schema.json +50753 -1
- package/dist/development/_virtual/_@oxc-project_runtime@0.127.0/helpers/taggedTemplateLiteral.mjs +7 -0
- package/dist/development/client/client.d.mts +34 -0
- package/dist/development/client/client.mjs +206 -0
- package/dist/development/client/client.mjs.map +1 -0
- package/dist/development/client/errors.d.mts +48 -0
- package/dist/development/client/errors.mjs +57 -0
- package/dist/development/client/errors.mjs.map +1 -0
- package/dist/development/client/index.d.mts +4 -0
- package/dist/development/client/types.d.mts +147 -0
- package/dist/development/core/analytics/cart-tracker.d.mts +8 -0
- package/dist/development/core/analytics/cart-tracker.mjs +144 -0
- package/dist/development/core/analytics/cart-tracker.mjs.map +1 -0
- package/dist/development/core/analytics/events.d.mts +15 -0
- package/dist/development/core/analytics/events.mjs +15 -0
- package/dist/development/core/analytics/events.mjs.map +1 -0
- package/dist/development/core/analytics/index.d.mts +3 -0
- package/dist/development/core/analytics/types.d.mts +143 -0
- package/dist/development/core/analytics/utils/flatten-connection.d.mts +19 -0
- package/dist/development/core/analytics/utils/flatten-connection.mjs +25 -0
- package/dist/development/core/analytics/utils/flatten-connection.mjs.map +1 -0
- package/dist/development/core/cache/cache-status.mjs +17 -0
- package/dist/development/core/cache/cache-status.mjs.map +1 -0
- package/dist/development/core/cache/fetch-with-cache.d.mts +43 -0
- package/dist/development/core/cache/fetch-with-cache.mjs +188 -0
- package/dist/development/core/cache/fetch-with-cache.mjs.map +1 -0
- package/dist/development/core/cache/key.d.mts +6 -0
- package/dist/development/core/cache/key.mjs +27 -0
- package/dist/development/core/cache/key.mjs.map +1 -0
- package/dist/development/core/cache/run-with-cache.d.mts +36 -0
- package/dist/development/core/cache/run-with-cache.mjs +114 -0
- package/dist/development/core/cache/run-with-cache.mjs.map +1 -0
- package/dist/development/core/cache/store.d.mts +19 -0
- package/dist/development/core/cache/store.mjs +62 -0
- package/dist/development/core/cache/store.mjs.map +1 -0
- package/dist/development/core/cache/strategies.d.mts +39 -0
- package/dist/development/core/cache/strategies.mjs +70 -0
- package/dist/development/core/cache/strategies.mjs.map +1 -0
- package/dist/development/core/cart/actions.d.mts +50 -0
- package/dist/development/core/cart/actions.mjs +240 -0
- package/dist/development/core/cart/actions.mjs.map +1 -0
- package/dist/development/core/cart/attach-quantity-input.d.mts +5 -0
- package/dist/development/core/cart/attach-quantity-input.mjs +17 -0
- package/dist/development/core/cart/attach-quantity-input.mjs.map +1 -0
- package/dist/development/core/cart/buyer-identity-sync.d.mts +19 -0
- package/dist/development/core/cart/buyer-identity-sync.mjs +6 -0
- package/dist/development/core/cart/buyer-identity-sync.mjs.map +1 -0
- package/dist/development/core/cart/cart.d.mts +37 -0
- package/dist/development/core/cart/cart.mjs +1707 -0
- package/dist/development/core/cart/cart.mjs.map +1 -0
- package/dist/development/core/cart/cookie.d.mts +5 -0
- package/dist/development/core/cart/cookie.mjs +28 -0
- package/dist/development/core/cart/cookie.mjs.map +1 -0
- package/dist/development/core/cart/form.d.mts +130 -0
- package/dist/development/core/cart/form.mjs +75 -0
- package/dist/development/core/cart/form.mjs.map +1 -0
- package/dist/development/core/cart/get-cart.d.mts +25 -0
- package/dist/development/core/cart/get-cart.mjs +32 -0
- package/dist/development/core/cart/get-cart.mjs.map +1 -0
- package/dist/development/core/cart/index.d.mts +10 -0
- package/dist/development/core/cart/quantity.d.mts +10 -0
- package/dist/development/core/cart/quantity.mjs +14 -0
- package/dist/development/core/cart/quantity.mjs.map +1 -0
- package/dist/development/core/cart/queries.d.mts +4296 -0
- package/dist/development/core/cart/queries.mjs +70 -0
- package/dist/development/core/cart/queries.mjs.map +1 -0
- package/dist/development/core/cart/server-handlers.d.mts +82 -0
- package/dist/development/core/cart/server-handlers.mjs +322 -0
- package/dist/development/core/cart/server-handlers.mjs.map +1 -0
- package/dist/development/core/cart/state.d.mts +137 -0
- package/dist/development/core/cart/state.mjs +76 -0
- package/dist/development/core/cart/state.mjs.map +1 -0
- package/dist/development/core/cart/sync-quantity-inputs.mjs +16 -0
- package/dist/development/core/cart/sync-quantity-inputs.mjs.map +1 -0
- package/dist/development/core/collection/collection.d.mts +134 -0
- package/dist/development/core/collection/collection.mjs +170 -0
- package/dist/development/core/collection/collection.mjs.map +1 -0
- package/dist/development/core/collection/index.d.mts +6 -0
- package/dist/development/core/collection/reconciler.d.mts +32 -0
- package/dist/development/core/collection/reconciler.mjs +89 -0
- package/dist/development/core/collection/reconciler.mjs.map +1 -0
- package/dist/development/core/collection/state.d.mts +66 -0
- package/dist/development/core/collection/state.mjs +20 -0
- package/dist/development/core/collection/state.mjs.map +1 -0
- package/dist/development/core/collection/url.d.mts +71 -0
- package/dist/development/core/collection/url.mjs +376 -0
- package/dist/development/core/collection/url.mjs.map +1 -0
- package/dist/development/core/constants.mjs +7 -0
- package/dist/development/core/constants.mjs.map +1 -0
- package/dist/development/core/development.d.mts +56 -0
- package/dist/development/core/development.mjs +45 -0
- package/dist/development/core/headers.mjs +43 -0
- package/dist/development/core/headers.mjs.map +1 -0
- package/dist/development/core/index.d.mts +54 -0
- package/dist/development/core/logging/logging.d.mts +21 -0
- package/dist/development/core/logging/logging.mjs +99 -0
- package/dist/development/core/logging/logging.mjs.map +1 -0
- package/dist/development/core/logging/types.d.mts +40 -0
- package/dist/development/core/logging/types.mjs +18 -0
- package/dist/development/core/logging/types.mjs.map +1 -0
- package/dist/development/core/money/cache.mjs +25 -0
- package/dist/development/core/money/cache.mjs.map +1 -0
- package/dist/development/core/money/format.d.mts +15 -0
- package/dist/development/core/money/format.mjs +243 -0
- package/dist/development/core/money/format.mjs.map +1 -0
- package/dist/development/core/money/types.d.mts +47 -0
- package/dist/development/core/observable.mjs +46 -0
- package/dist/development/core/observable.mjs.map +1 -0
- package/dist/development/core/predictive-search/constants.d.mts +5 -0
- package/dist/development/core/predictive-search/constants.mjs +6 -0
- package/dist/development/core/predictive-search/constants.mjs.map +1 -0
- package/dist/development/core/predictive-search/form.d.mts +31 -0
- package/dist/development/core/predictive-search/form.mjs +31 -0
- package/dist/development/core/predictive-search/form.mjs.map +1 -0
- package/dist/development/core/predictive-search/index.d.mts +6 -0
- package/dist/development/core/predictive-search/queries.d.mts +118 -0
- package/dist/development/core/predictive-search/queries.mjs +81 -0
- package/dist/development/core/predictive-search/queries.mjs.map +1 -0
- package/dist/development/core/predictive-search/search.d.mts +32 -0
- package/dist/development/core/predictive-search/search.mjs +74 -0
- package/dist/development/core/predictive-search/search.mjs.map +1 -0
- package/dist/development/core/predictive-search/server-handlers.d.mts +36 -0
- package/dist/development/core/predictive-search/server-handlers.mjs +113 -0
- package/dist/development/core/predictive-search/server-handlers.mjs.map +1 -0
- package/dist/development/core/predictive-search/store.d.mts +44 -0
- package/dist/development/core/predictive-search/store.mjs +224 -0
- package/dist/development/core/predictive-search/store.mjs.map +1 -0
- package/dist/development/core/predictive-search/url.d.mts +41 -0
- package/dist/development/core/predictive-search/url.mjs +71 -0
- package/dist/development/core/predictive-search/url.mjs.map +1 -0
- package/dist/development/core/product/accept-variant-id.mjs +98 -0
- package/dist/development/core/product/accept-variant-id.mjs.map +1 -0
- package/dist/development/core/product/form.d.mts +63 -0
- package/dist/development/core/product/form.mjs +44 -0
- package/dist/development/core/product/form.mjs.map +1 -0
- package/dist/development/core/product/index.d.mts +5 -0
- package/dist/development/core/product/options.d.mts +43 -0
- package/dist/development/core/product/options.mjs +296 -0
- package/dist/development/core/product/options.mjs.map +1 -0
- package/dist/development/core/product/product-form.d.mts +72 -0
- package/dist/development/core/product/product-form.mjs +158 -0
- package/dist/development/core/product/product-form.mjs.map +1 -0
- package/dist/development/core/product/state.d.mts +68 -0
- package/dist/development/core/product/url.d.mts +47 -0
- package/dist/development/core/product/url.mjs +69 -0
- package/dist/development/core/product/url.mjs.map +1 -0
- package/dist/development/core/request-context.d.mts +75 -0
- package/dist/development/core/request-context.mjs +141 -0
- package/dist/development/core/request-context.mjs.map +1 -0
- package/dist/development/core/request-routing/handle-shopify-redirects.d.mts +17 -0
- package/dist/development/core/request-routing/handle-shopify-redirects.mjs +31 -0
- package/dist/development/core/request-routing/handle-shopify-redirects.mjs.map +1 -0
- package/dist/development/core/request-routing/handle-shopify-routes.d.mts +1 -0
- package/dist/development/core/request-routing/handle-shopify-routes.development.d.mts +11 -0
- package/dist/development/core/request-routing/handle-shopify-routes.development.mjs +16 -0
- package/dist/development/core/request-routing/handle-shopify-routes.development.mjs.map +1 -0
- package/dist/development/core/request-routing/handle-shopify-routes.mjs +42 -0
- package/dist/development/core/request-routing/handle-shopify-routes.mjs.map +1 -0
- package/dist/development/core/request-routing/interceptors/admin-redirect.mjs +12 -0
- package/dist/development/core/request-routing/interceptors/admin-redirect.mjs.map +1 -0
- package/dist/development/core/request-routing/interceptors/ajax-api.mjs +16 -0
- package/dist/development/core/request-routing/interceptors/ajax-api.mjs.map +1 -0
- package/dist/development/core/request-routing/interceptors/api-proxy.mjs +20 -0
- package/dist/development/core/request-routing/interceptors/api-proxy.mjs.map +1 -0
- package/dist/development/core/request-routing/interceptors/checkout.mjs +58 -0
- package/dist/development/core/request-routing/interceptors/checkout.mjs.map +1 -0
- package/dist/development/core/request-routing/interceptors/graphiql.mjs +46 -0
- package/dist/development/core/request-routing/interceptors/graphiql.mjs.map +1 -0
- package/dist/development/core/request-routing/interceptors/mcp-proxy.mjs +23 -0
- package/dist/development/core/request-routing/interceptors/mcp-proxy.mjs.map +1 -0
- package/dist/development/core/request-routing/interceptors/proxy.mjs +73 -0
- package/dist/development/core/request-routing/interceptors/proxy.mjs.map +1 -0
- package/dist/development/core/request-routing/interceptors/query-param-redirect.mjs +22 -0
- package/dist/development/core/request-routing/interceptors/query-param-redirect.mjs.map +1 -0
- package/dist/development/core/request-routing/interceptors/sfapi-proxy.mjs +27 -0
- package/dist/development/core/request-routing/interceptors/sfapi-proxy.mjs.map +1 -0
- package/dist/development/core/request-routing/interceptors/standard-routes.mjs +19 -0
- package/dist/development/core/request-routing/interceptors/standard-routes.mjs.map +1 -0
- package/dist/development/core/request-routing/interceptors/url-redirects.mjs +27 -0
- package/dist/development/core/request-routing/interceptors/url-redirects.mjs.map +1 -0
- package/dist/development/core/request-routing/interceptors/well-known.mjs +22 -0
- package/dist/development/core/request-routing/interceptors/well-known.mjs.map +1 -0
- package/dist/development/core/request-routing/registered-routes.d.mts +7 -0
- package/dist/development/core/request-routing/registered-routes.mjs +72 -0
- package/dist/development/core/request-routing/registered-routes.mjs.map +1 -0
- package/dist/development/core/request-routing/route-types.d.mts +56 -0
- package/dist/development/core/request-routing/safe-apply-response-headers.mjs +16 -0
- package/dist/development/core/request-routing/safe-apply-response-headers.mjs.map +1 -0
- package/dist/development/core/shop-pay/shop-pay.d.mts +102 -0
- package/dist/development/core/shop-pay/shop-pay.mjs +289 -0
- package/dist/development/core/shop-pay/shop-pay.mjs.map +1 -0
- package/dist/development/core/shopify-scripts/analytics.mjs +26 -0
- package/dist/development/core/shopify-scripts/analytics.mjs.map +1 -0
- package/dist/development/core/shopify-scripts/consent.mjs +17 -0
- package/dist/development/core/shopify-scripts/consent.mjs.map +1 -0
- package/dist/development/core/shopify-scripts/constants.mjs +19 -0
- package/dist/development/core/shopify-scripts/constants.mjs.map +1 -0
- package/dist/development/core/shopify-scripts/deprecated-cookies.mjs +97 -0
- package/dist/development/core/shopify-scripts/deprecated-cookies.mjs.map +1 -0
- package/dist/development/core/shopify-scripts/global.d.mts +1 -0
- package/dist/development/core/shopify-scripts/global.mjs +86 -0
- package/dist/development/core/shopify-scripts/global.mjs.map +1 -0
- package/dist/development/core/shopify-scripts/index.d.mts +27 -0
- package/dist/development/core/shopify-scripts/index.mjs +145 -0
- package/dist/development/core/shopify-scripts/index.mjs.map +1 -0
- package/dist/development/core/shopify-scripts/initialize.d.mts +18 -0
- package/dist/development/core/shopify-scripts/initialize.mjs +27 -0
- package/dist/development/core/shopify-scripts/initialize.mjs.map +1 -0
- package/dist/development/core/shopify-scripts/page-view.mjs +49 -0
- package/dist/development/core/shopify-scripts/page-view.mjs.map +1 -0
- package/dist/development/core/shopify-scripts/perfkit.mjs +33 -0
- package/dist/development/core/shopify-scripts/perfkit.mjs.map +1 -0
- package/dist/development/core/shopify-scripts/render.d.mts +1 -0
- package/dist/development/core/shopify-scripts/render.mjs +23 -0
- package/dist/development/core/shopify-scripts/render.mjs.map +1 -0
- package/dist/development/core/shopify-scripts/types.d.mts +76 -0
- package/dist/development/core/shopify-scripts/utils/cookie-domain.mjs +43 -0
- package/dist/development/core/shopify-scripts/utils/cookie-domain.mjs.map +1 -0
- package/dist/development/core/shopify-scripts/utils/inline-script.mjs +8 -0
- package/dist/development/core/shopify-scripts/utils/inline-script.mjs.map +1 -0
- package/dist/development/core/shopify-scripts/utils/navigation.mjs +46 -0
- package/dist/development/core/shopify-scripts/utils/navigation.mjs.map +1 -0
- package/dist/development/core/shopify-scripts/utils/tracking-values.mjs +65 -0
- package/dist/development/core/shopify-scripts/utils/tracking-values.mjs.map +1 -0
- package/dist/development/core/shopify-scripts/utils/uuid.mjs +17 -0
- package/dist/development/core/shopify-scripts/utils/uuid.mjs.map +1 -0
- package/dist/development/core/shopify-scripts/webmcp.mjs +22 -0
- package/dist/development/core/shopify-scripts/webmcp.mjs.map +1 -0
- package/dist/development/core/standard-routes/build.d.mts +34 -0
- package/dist/development/core/standard-routes/build.mjs +54 -0
- package/dist/development/core/standard-routes/build.mjs.map +1 -0
- package/dist/development/core/standard-routes/defaults.mjs +31 -0
- package/dist/development/core/standard-routes/defaults.mjs.map +1 -0
- package/dist/development/core/standard-routes/match.mjs +108 -0
- package/dist/development/core/standard-routes/match.mjs.map +1 -0
- package/dist/development/core/standard-routes/path.mjs +58 -0
- package/dist/development/core/standard-routes/path.mjs.map +1 -0
- package/dist/development/core/standard-routes/redirects.mjs +51 -0
- package/dist/development/core/standard-routes/redirects.mjs.map +1 -0
- package/dist/development/core/standard-routes/types.d.mts +95 -0
- package/dist/development/core/types.d.mts +11 -0
- package/dist/development/core/url.mjs +42 -0
- package/dist/development/core/url.mjs.map +1 -0
- package/dist/development/core/utils/load-script.mjs +34 -0
- package/dist/development/core/utils/load-script.mjs.map +1 -0
- package/dist/development/core/utils/parse-gid.mjs +33 -0
- package/dist/development/core/utils/parse-gid.mjs.map +1 -0
- package/dist/development/customer-account/session.d.mts +46 -0
- package/dist/development/customer-account/session.mjs +21 -0
- package/dist/development/customer-account/session.mjs.map +1 -0
- package/dist/development/globals.d.mts +64 -0
- package/dist/development/graphql/generated/customer-account-api-types.d.mts +13 -0
- package/dist/development/graphql/generated/graphql-env.d.mts +19280 -0
- package/dist/development/graphql/generated/storefront-api-types.d.mts +47 -0
- package/dist/development/graphql/graphql.d.mts +40 -0
- package/dist/development/graphql/graphql.mjs +16 -0
- package/dist/development/graphql/graphql.mjs.map +1 -0
- package/dist/development/graphql/index.d.mts +2 -0
- package/dist/development/graphql/scalars.d.mts +15 -0
- package/dist/development/graphql/type-resolver.d.mts +229 -0
- package/dist/development/react/cart.d.mts +44 -0
- package/dist/development/react/cart.mjs +155 -0
- package/dist/development/react/cart.mjs.map +1 -0
- package/dist/development/react/collection.d.mts +91 -0
- package/dist/development/react/collection.mjs +129 -0
- package/dist/development/react/collection.mjs.map +1 -0
- package/dist/development/react/index.d.mts +13 -0
- package/dist/development/react/index.mjs +10 -0
- package/dist/development/react/predictive-search.d.mts +49 -0
- package/dist/development/react/predictive-search.mjs +133 -0
- package/dist/development/react/predictive-search.mjs.map +1 -0
- package/dist/development/react/product.d.mts +72 -0
- package/dist/development/react/product.mjs +127 -0
- package/dist/development/react/product.mjs.map +1 -0
- package/dist/development/react/shop-pay.d.mts +9 -0
- package/dist/development/react/shop-pay.mjs +16 -0
- package/dist/development/react/shop-pay.mjs.map +1 -0
- package/dist/development/react/shopify-scripts.d.mts +20 -0
- package/dist/development/react/shopify-scripts.mjs +39 -0
- package/dist/development/react/shopify-scripts.mjs.map +1 -0
- package/dist/development/vendor/standard-actions.d.mts +134 -0
- package/dist/development/vendor/standard-events.d.mts +1107 -0
- package/dist/development/vue/cart.d.mts +46 -0
- package/dist/development/vue/cart.mjs +122 -0
- package/dist/development/vue/cart.mjs.map +1 -0
- package/dist/development/vue/collection.d.mts +46 -0
- package/dist/development/vue/collection.mjs +108 -0
- package/dist/development/vue/collection.mjs.map +1 -0
- package/dist/development/vue/index.d.mts +11 -0
- package/dist/development/vue/index.mjs +8 -0
- package/dist/development/vue/predictive-search.d.mts +124 -0
- package/dist/development/vue/predictive-search.mjs +171 -0
- package/dist/development/vue/predictive-search.mjs.map +1 -0
- package/dist/development/vue/product.d.mts +57 -0
- package/dist/development/vue/product.mjs +167 -0
- package/dist/development/vue/product.mjs.map +1 -0
- package/dist/development/vue/shop-pay.d.mts +25 -0
- package/dist/development/vue/shop-pay.mjs +35 -0
- package/dist/development/vue/shop-pay.mjs.map +1 -0
- package/dist/development/vue/shopify-scripts.d.mts +127 -0
- package/dist/development/vue/shopify-scripts.mjs +79 -0
- package/dist/development/vue/shopify-scripts.mjs.map +1 -0
- package/dist/globals.d.mts +64 -0
- package/dist/graphql/generated/customer-account-api-types.d.mts +13 -0
- package/dist/graphql/generated/customer-account-graphql-env.d.mts +22170 -0
- package/dist/graphql/generated/graphql-env.d.mts +19280 -0
- package/dist/graphql/generated/storefront-api-types.d.mts +47 -0
- package/dist/graphql/graphql.d.mts +40 -0
- package/dist/graphql/graphql.mjs +16 -0
- package/dist/graphql/graphql.mjs.map +1 -0
- package/dist/graphql/index.d.mts +2 -0
- package/dist/graphql/scalars.d.mts +26 -0
- package/dist/graphql/type-resolver.d.mts +229 -0
- package/dist/react/cart.d.mts +44 -0
- package/dist/react/cart.mjs +155 -0
- package/dist/react/cart.mjs.map +1 -0
- package/dist/react/collection.d.mts +91 -0
- package/dist/react/collection.mjs +129 -0
- package/dist/react/collection.mjs.map +1 -0
- package/dist/react/index.d.mts +13 -0
- package/dist/react/index.mjs +10 -0
- package/dist/react/predictive-search.d.mts +49 -0
- package/dist/react/predictive-search.mjs +133 -0
- package/dist/react/predictive-search.mjs.map +1 -0
- package/dist/react/product.d.mts +72 -0
- package/dist/react/product.mjs +127 -0
- package/dist/react/product.mjs.map +1 -0
- package/dist/react/shop-pay.d.mts +9 -0
- package/dist/react/shop-pay.mjs +16 -0
- package/dist/react/shop-pay.mjs.map +1 -0
- package/dist/react/shopify-scripts.d.mts +20 -0
- package/dist/react/shopify-scripts.mjs +39 -0
- package/dist/react/shopify-scripts.mjs.map +1 -0
- package/dist/storefront-api-types.d.ts +2351 -2390
- package/dist/storefront.schema.json +41534 -1
- package/dist/ts-plugin/index.cjs +68 -0
- package/dist/ts-plugin/index.cjs.map +1 -0
- package/dist/ts-plugin/index.d.cts +4 -0
- package/dist/vendor/standard-actions.d.mts +134 -0
- package/dist/vendor/standard-events.d.mts +1107 -0
- package/dist/vite/certificate-prompt.mjs +24 -0
- package/dist/vite/certificate-prompt.mjs.map +1 -0
- package/dist/vite/index.d.mts +2 -0
- package/dist/vite/index.mjs +3 -0
- package/dist/vite/local-https.d.mts +47 -0
- package/dist/vite/local-https.mjs +276 -0
- package/dist/vite/local-https.mjs.map +1 -0
- package/dist/vite/mkcert.mjs +141 -0
- package/dist/vite/mkcert.mjs.map +1 -0
- package/dist/vue/cart.d.mts +46 -0
- package/dist/vue/cart.mjs +122 -0
- package/dist/vue/cart.mjs.map +1 -0
- package/dist/vue/collection.d.mts +46 -0
- package/dist/vue/collection.mjs +108 -0
- package/dist/vue/collection.mjs.map +1 -0
- package/dist/vue/index.d.mts +11 -0
- package/dist/vue/index.mjs +8 -0
- package/dist/vue/predictive-search.d.mts +124 -0
- package/dist/vue/predictive-search.mjs +171 -0
- package/dist/vue/predictive-search.mjs.map +1 -0
- package/dist/vue/product.d.mts +57 -0
- package/dist/vue/product.mjs +167 -0
- package/dist/vue/product.mjs.map +1 -0
- package/dist/vue/shop-pay.d.mts +25 -0
- package/dist/vue/shop-pay.mjs +35 -0
- package/dist/vue/shop-pay.mjs.map +1 -0
- package/dist/vue/shopify-scripts.d.mts +127 -0
- package/dist/vue/shopify-scripts.mjs +79 -0
- package/dist/vue/shopify-scripts.mjs.map +1 -0
- package/package.json +116 -86
- package/skills/hydrogen-analytics/SKILL.md +80 -0
- package/skills/hydrogen-analytics/references/react.md +160 -0
- package/skills/hydrogen-analytics/references/vue.md +80 -0
- package/skills/hydrogen-cart-drawer/SKILL.md +248 -0
- package/skills/hydrogen-cart-drawer/references/accessibility.md +109 -0
- package/skills/hydrogen-cart-drawer/references/css.md +67 -0
- package/skills/hydrogen-cart-ui/SKILL.md +224 -0
- package/skills/hydrogen-cart-ui/references/nextjs.md +89 -0
- package/skills/hydrogen-cart-ui/references/react.md +285 -0
- package/skills/hydrogen-cart-ui/references/vue.md +228 -0
- package/skills/hydrogen-collection-browser/SKILL.md +83 -0
- package/skills/hydrogen-collection-browser/references/nextjs.md +118 -0
- package/skills/hydrogen-collection-browser/references/nuxt.md +108 -0
- package/skills/hydrogen-collection-browser/references/react.md +301 -0
- package/skills/hydrogen-customer-account/SKILL.md +107 -0
- package/skills/hydrogen-image/SKILL.md +65 -0
- package/skills/hydrogen-local-https/SKILL.md +142 -0
- package/skills/hydrogen-markets/SKILL.md +221 -0
- package/skills/hydrogen-markets/references/nextjs.md +157 -0
- package/skills/hydrogen-money/SKILL.md +67 -0
- package/skills/hydrogen-oxygen/SKILL.md +245 -0
- package/skills/hydrogen-oxygen/references/react-router.md +230 -0
- package/skills/hydrogen-predictive-search/SKILL.md +130 -0
- package/skills/hydrogen-predictive-search/references/react.md +32 -0
- package/skills/hydrogen-predictive-search/references/vue.md +40 -0
- package/skills/hydrogen-request-handlers/SKILL.md +107 -0
- package/skills/hydrogen-request-handlers/references/frameworks.md +179 -0
- package/skills/hydrogen-request-handlers/references/nextjs.md +137 -0
- package/skills/hydrogen-request-handlers/references/nuxt.md +215 -0
- package/skills/hydrogen-routing/SKILL.md +171 -0
- package/skills/hydrogen-setup/SKILL.md +50 -0
- package/skills/hydrogen-setup/references/analytics.md +624 -0
- package/skills/hydrogen-setup/steps/1-inspect-app.md +62 -0
- package/skills/hydrogen-setup/steps/10-analytics.md +10 -0
- package/skills/hydrogen-setup/steps/11-verify.md +31 -0
- package/skills/hydrogen-setup/steps/2-scaffold.md +86 -0
- package/skills/hydrogen-setup/steps/3-build-home-page.md +37 -0
- package/skills/hydrogen-setup/steps/4-collection-and-search.md +14 -0
- package/skills/hydrogen-setup/steps/5-cart.md +10 -0
- package/skills/hydrogen-setup/steps/6-product-detail-page.md +416 -0
- package/skills/hydrogen-setup/steps/7-shopify-runtime-scripts.md +69 -0
- package/skills/hydrogen-setup/steps/8-cart-drawer-and-navbar.md +35 -0
- package/skills/hydrogen-setup/steps/9-account-page.md +54 -0
- package/skills/hydrogen-shop-pay/SKILL.md +79 -0
- package/skills/hydrogen-shop-pay/references/core.md +66 -0
- package/skills/hydrogen-shop-pay/references/react.md +50 -0
- package/skills/hydrogen-shop-pay/references/vue.md +39 -0
- package/skills/hydrogen-smoke-test/SKILL.md +205 -0
- package/skills/hydrogen-storefront-client/SKILL.md +322 -0
- package/skills/hydrogen-storefront-client/references/astro.md +125 -0
- package/skills/hydrogen-storefront-client/references/caching.md +25 -0
- package/skills/hydrogen-storefront-client/references/nextjs.md +121 -0
- package/skills/hydrogen-storefront-client/references/nuxt.md +121 -0
- package/skills/hydrogen-storefront-client/references/query-validation.md +95 -0
- package/skills/hydrogen-storefront-client/references/react-router.md +81 -0
- package/skills/hydrogen-storefront-client/references/solidstart.md +131 -0
- package/skills/hydrogen-storefront-client/references/sveltekit.md +169 -0
- package/skills/hydrogen-variant-form/SKILL.md +267 -0
- package/skills/hydrogen-variant-form/references/nextjs.md +207 -0
- package/skills/hydrogen-variant-form/references/nuxt.md +95 -0
- package/skills/hydrogen-variant-form/references/react.md +71 -0
- package/dist/dev/get-virtual-routes-H72465VB.js +0 -74
- package/dist/dev/hydrogen-routes.d.ts +0 -5
- package/dist/dev/hydrogen-routes.js +0 -25
- package/dist/development/get-virtual-routes-ACFZHU42.js +0 -71
- package/dist/development/get-virtual-routes-ACFZHU42.js.map +0 -1
- package/dist/development/index.cjs +0 -6978
- package/dist/development/index.cjs.map +0 -1
- package/dist/development/index.js +0 -6631
- package/dist/development/index.js.map +0 -1
- package/dist/development/log-seo-tags-IG37ONQ2.js +0 -74
- package/dist/development/log-seo-tags-IG37ONQ2.js.map +0 -1
- package/dist/development/react-router-preset.d.ts +0 -45
- package/dist/development/react-router-preset.js +0 -49
- package/dist/development/react-router-preset.js.map +0 -1
- package/dist/index.cjs +0 -1
- package/dist/oxygen/index.d.ts +0 -197
- package/dist/oxygen/index.js +0 -107
- package/dist/production/get-virtual-routes-ZZEGQQDV.js +0 -3
- package/dist/production/get-virtual-routes-ZZEGQQDV.js.map +0 -1
- package/dist/production/index.cjs +0 -1019
- package/dist/production/index.cjs.map +0 -1
- package/dist/production/index.d.cts +0 -3260
- package/dist/production/index.d.ts +0 -3260
- package/dist/production/index.js +0 -1019
- package/dist/production/index.js.map +0 -1
- package/dist/production/log-seo-tags-TY72EQWZ.js +0 -2
- package/dist/production/log-seo-tags-TY72EQWZ.js.map +0 -1
- package/dist/production/react-router-preset.d.ts +0 -45
- package/dist/production/react-router-preset.js +0 -11
- package/dist/react-router.d.ts +0 -75
- package/dist/vite/chunk-4O5OI3OO.js +0 -127
- package/dist/vite/chunk-FAQ7TVHC.js +0 -9
- package/dist/vite/chunk-QXBQVDMY.js +0 -68
- package/dist/vite/compat-date.d.ts +0 -3
- package/dist/vite/compat-date.js +0 -6
- package/dist/vite/get-virtual-routes.d.ts +0 -21
- package/dist/vite/get-virtual-routes.js +0 -74
- package/dist/vite/hydrogen-middleware.d.ts +0 -9
- package/dist/vite/hydrogen-middleware.js +0 -7
- package/dist/vite/plugin.d.ts +0 -22
- package/dist/vite/plugin.js +0 -171
- package/dist/vite/request-events.d.ts +0 -144
- package/dist/vite/request-events.js +0 -10
- package/dist/vite/types.d.ts +0 -5
- package/dist/vite/types.js +0 -0
- package/dist/vite/virtual-routes/assets/debug-network.css +0 -609
- package/dist/vite/virtual-routes/assets/favicon-dark.svg +0 -20
- package/dist/vite/virtual-routes/assets/favicon.svg +0 -28
- package/dist/vite/virtual-routes/assets/inter-variable-font.woff2 +0 -0
- package/dist/vite/virtual-routes/assets/jetbrainsmono-variable-font.woff2 +0 -0
- package/dist/vite/virtual-routes/assets/styles.css +0 -249
- package/dist/vite/virtual-routes/components/FlameChartWrapper.jsx +0 -123
- package/dist/vite/virtual-routes/components/HydrogenLogoBaseBW.jsx +0 -32
- package/dist/vite/virtual-routes/components/HydrogenLogoBaseColor.jsx +0 -47
- package/dist/vite/virtual-routes/components/IconBanner.jsx +0 -292
- package/dist/vite/virtual-routes/components/IconClose.jsx +0 -38
- package/dist/vite/virtual-routes/components/IconDiscard.jsx +0 -44
- package/dist/vite/virtual-routes/components/IconError.jsx +0 -61
- package/dist/vite/virtual-routes/components/IconGithub.jsx +0 -23
- package/dist/vite/virtual-routes/components/IconTwitter.jsx +0 -21
- package/dist/vite/virtual-routes/components/Layout.jsx +0 -7
- package/dist/vite/virtual-routes/components/RequestDetails.jsx +0 -171
- package/dist/vite/virtual-routes/components/RequestTable.jsx +0 -91
- package/dist/vite/virtual-routes/components/RequestWaterfall.jsx +0 -151
- package/dist/vite/virtual-routes/layout.jsx +0 -33
- package/dist/vite/virtual-routes/lib/useDebugNetworkServer.jsx +0 -178
- package/dist/vite/virtual-routes/routes/[.]well-known.appspecific.com[.]chrome[.]devtools[.]json.jsx +0 -37
- package/dist/vite/virtual-routes/routes/[.]well-known.appspecific.com[.]chrome[.]devtools[.]json.tsx +0 -79
- package/dist/vite/virtual-routes/routes/graphiql.jsx +0 -5
- package/dist/vite/virtual-routes/routes/index.jsx +0 -265
- package/dist/vite/virtual-routes/routes/subrequest-profiler.jsx +0 -243
- package/dist/vite/virtual-routes/virtual-root-with-layout.jsx +0 -63
- package/dist/vite/virtual-routes/virtual-root.jsx +0 -67
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Shopify Runtime Scripts
|
|
2
|
+
|
|
3
|
+
## Install Shopify Runtime Scripts
|
|
4
|
+
|
|
5
|
+
Render Shopify runtime scripts once in the root document.
|
|
6
|
+
|
|
7
|
+
- Use the `ShopifyScripts` component from your framework binding if it exports one. Frameworks without a binding should render `getShopifyScriptTags()` / `renderShopifyScriptTags()` during SSR and call `initializeShopifyScripts()` during browser hydration.
|
|
8
|
+
- Invoke the `hydrogen-routing` skill for the required script routing options; reuse the shared route template manifest from the scaffold step.
|
|
9
|
+
|
|
10
|
+
### The `shop` and `i18n` props
|
|
11
|
+
|
|
12
|
+
Build both in a server-only module, annotated with the types exported from `@shopify/hydrogen`, so TypeScript rejects wrong or missing fields at the declaration — not at the distant `ShopifyScripts` call site:
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import type { ShopifyScriptsI18n, ShopifyScriptsShop } from "@shopify/hydrogen";
|
|
16
|
+
|
|
17
|
+
const shop: ShopifyScriptsShop = {
|
|
18
|
+
shopId: env.SHOP_ID,
|
|
19
|
+
storefrontId: env.PUBLIC_STOREFRONT_ID || "0",
|
|
20
|
+
myshopifyDomain: env.PUBLIC_STORE_DOMAIN,
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const i18n: ShopifyScriptsI18n = {
|
|
24
|
+
country, // resolved market country, e.g. "US"
|
|
25
|
+
language, // resolved market language, e.g. "EN"
|
|
26
|
+
};
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
All three `shop` fields are required and identify different things:
|
|
30
|
+
|
|
31
|
+
- `shopId` — the **shop** itself: the numeric Shopify shop ID (or Shop GID `gid://shopify/Shop/{id}`). Same shop as the Customer Account API `SHOP_ID`. Shopify analytics attributes events to it.
|
|
32
|
+
- `storefrontId` — the specific **headless/Hydrogen storefront instance** attached to the shop. A shop can have several storefronts; analytics and PerfKit use this ID to attribute traffic to this one. Use `"0"` when the app has no provisioned storefront ID.
|
|
33
|
+
- `myshopifyDomain` — the shop's permanent `*.myshopify.com` domain, exposed as `window.Shopify.shop`.
|
|
34
|
+
|
|
35
|
+
`i18n` is the same resolved market used by Storefront API requests (`country` + `language`, optional `currency`) — not a locale string, and not the analytics consent config.
|
|
36
|
+
|
|
37
|
+
For vanilla browser code that does not use SSR or a framework head API, render the HTML from core and include it in the document shell. If your app renders tags through core helpers instead of a framework binding, call `initializeShopifyScripts()` from bundled client code:
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
import { initializeShopifyScripts, renderShopifyScriptTags } from "@shopify/hydrogen";
|
|
41
|
+
import { routeTemplates } from "./route-templates";
|
|
42
|
+
|
|
43
|
+
const tags = renderShopifyScriptTags({ i18n, shop });
|
|
44
|
+
initializeShopifyScripts({ routes: routeTemplates });
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Continue when
|
|
48
|
+
|
|
49
|
+
- [ ] The Shopify script tags appear exactly once in the server-rendered document (check view-source, not just the hydrated DOM)
|
|
50
|
+
- [ ] `window.Shopify.actions` is defined in the browser console after page load
|
|
51
|
+
- [ ] `shop` values (`shopId`, `storefrontId`, `myshopifyDomain`) are resolved server-side and serialized; no client module reads `process.env`, `import.meta.env`, or framework env modules
|
|
52
|
+
|
|
53
|
+
## Configure Shopify Navigation
|
|
54
|
+
|
|
55
|
+
When Shopify or Hydrogen browser utilities need to navigate through the framework router, set the top-level navigation hook. WebMCP is one consumer of this hook. Pass `navigate={navigate}` to the framework `ShopifyScripts` component when the router hook is available there, or call `initializeShopifyScripts()` from client code when scripts are rendered through core helpers or a framework head API:
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
import { initializeShopifyScripts } from "@shopify/hydrogen";
|
|
59
|
+
import { routeTemplates } from "./route-templates";
|
|
60
|
+
|
|
61
|
+
initializeShopifyScripts({ routes: routeTemplates, navigate: (url) => router.push(url) });
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Use the framework's normal client lifecycle primitive when the app is already bundling frontend code, such as a mounted hook, client-only effect, or processed browser script.
|
|
65
|
+
|
|
66
|
+
### Continue when
|
|
67
|
+
|
|
68
|
+
- [ ] The navigation hook is wired through the framework router (`navigate` prop on `ShopifyScripts`, or the `navigate` option of `initializeShopifyScripts()`)
|
|
69
|
+
- [ ] Navigation triggered through the hook performs client-side routing without a full page reload
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Cart Drawer And Navbar
|
|
2
|
+
|
|
3
|
+
## Add The Cart Drawer
|
|
4
|
+
|
|
5
|
+
Invoke the `hydrogen-cart-drawer` skill to render an accessible cart drawer once in the root layout. Keep the `/cart` route as the full-page fallback when the drawer is unavailable, wire the drawer's Standard Actions `openCart` handler, and preserve the `hydrogen-cart-ui` progressive line item form contract in drawer content.
|
|
6
|
+
|
|
7
|
+
The drawer's `openCart` handler depends on the Shopify runtime scripts installed in the previous step; `window.Shopify.actions` must exist before the drawer's Standard Actions wiring can work.
|
|
8
|
+
|
|
9
|
+
### Continue when
|
|
10
|
+
|
|
11
|
+
- [ ] The drawer renders once in the root layout and can open on every page
|
|
12
|
+
- [ ] `window.Shopify.actions.openCart()` opens the drawer from the browser console
|
|
13
|
+
- [ ] Adding a product to cart opens the drawer and shows the added line item
|
|
14
|
+
- [ ] Drawer line item forms use the same `hydrogen-cart-ui` progressive form contract as the `/cart` page
|
|
15
|
+
- [ ] The drawer passes the `hydrogen-cart-drawer` skill's verification checklist
|
|
16
|
+
|
|
17
|
+
## Build The Navbar
|
|
18
|
+
|
|
19
|
+
Create or update the shared site navigation. Do this after the cart drawer, so the cart trigger can follow the drawer's markup contract.
|
|
20
|
+
|
|
21
|
+
### Requirements
|
|
22
|
+
|
|
23
|
+
- Preserve the app's existing layout component and styling conventions. Do not remove existing navigation items unless they directly conflict with the setup.
|
|
24
|
+
- Ensure a home link exists, if not, make one and point to `/`.
|
|
25
|
+
- Every navbar link must resolve: the route must exist in the app, and dynamic destinations (collection or page handles) must exist in the shop. Do not invent handles. In particular, do not link to `/collections/all` — the "all" collection is a Liquid storefront convention with no Storefront API equivalent; `collection(handle: "all")` returns null and the route 404s unless the merchant explicitly created a collection with that handle. For a browse-everything destination link to the `/collections` listing route or `/search`; for specific collections use handles returned by the Storefront API (e.g. from the home page collections query).
|
|
26
|
+
- The cart trigger is a `/cart` anchor that opens the drawer via `showModal()` after hydration; follow the `hydrogen-cart-drawer` skill for the markup.
|
|
27
|
+
- Make `/cart` reachable as a real link in the **footer** (site chrome). `/cart` is the full-page fallback when the cart drawer is unavailable. For strict no-JS live cart HTML, the cart route must receive resolved cart `initialData`.
|
|
28
|
+
- Use the framework's native link component when one is already used in the app.
|
|
29
|
+
- Keep the navbar server-renderable unless the app already uses a client-only navigation shell.
|
|
30
|
+
- Do not block the response by waiting for the cart contents to load.
|
|
31
|
+
|
|
32
|
+
### Continue when
|
|
33
|
+
|
|
34
|
+
- [ ] The navbar appears on the home, collection, product, and cart routes
|
|
35
|
+
- [ ] Every navbar and footer link href returns a 200 when requested directly against the dev server (`curl -s -o /dev/null -w "%{http_code}" http://localhost:<port><href>` for each one) — no 404s, no invented collection handles
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Account Page
|
|
2
|
+
|
|
3
|
+
Create a minimal server-rendered account page and wire it into the navbar. The scaffold step already registered the Customer Account handlers (`/account/login`, `/account/authorize`, `/account/refresh`, `/account/logout`); those are server routes, not UI. This step builds the app-owned UI on top of them: without it the storefront has working auth endpoints and no way for a buyer to see their account or log out.
|
|
4
|
+
|
|
5
|
+
Invoke the `hydrogen-customer-account` skill for the session/token rules (read-only vs writable session managers, `isLoggedIn()` vs `getAccessToken()`, the one-shot refresh redirect) and follow its Account Page section for the UI contract.
|
|
6
|
+
|
|
7
|
+
## Requirements
|
|
8
|
+
|
|
9
|
+
- **Navbar account link.** Add an `/account` link to the navbar. A static link is enough — the account page handles both signed-in and signed-out states. Do not block navbar rendering on session reads.
|
|
10
|
+
- **`/account` route**, server-rendered:
|
|
11
|
+
- Signed out: render a sign-in panel with a link to `/account/login?return_to=/account`. The login link must be a full-document navigation (plain `<a>` or the framework link's reload-document mode) — the login handler returns a raw redirect to Shopify's hosted login page that client-side routing cannot follow.
|
|
12
|
+
- Signed in: fetch a minimal profile with the Customer Account API and render it:
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import { gql } from "@shopify/hydrogen/customer-account";
|
|
16
|
+
|
|
17
|
+
const CUSTOMER_QUERY = gql(`
|
|
18
|
+
query CurrentCustomer {
|
|
19
|
+
customer {
|
|
20
|
+
firstName
|
|
21
|
+
lastName
|
|
22
|
+
emailAddress {
|
|
23
|
+
emailAddress
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
`);
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
- Check GraphQL `errors` and render an error state; a failing Customer Account call must not crash the route.
|
|
31
|
+
- **Logout button.** Render a plain HTML form — not the framework's client-side form component:
|
|
32
|
+
|
|
33
|
+
```html
|
|
34
|
+
<form method="post" action="/account/logout">
|
|
35
|
+
<button type="submit">Log out</button>
|
|
36
|
+
</form>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
The logout handler requires a same-origin POST and returns a raw redirect (to Shopify's logout endpoint when an `id_token` exists). Client-side form handling cannot process that redirect; a native browser submit follows it correctly. This also keeps logout working without JavaScript.
|
|
40
|
+
- **No token exposure.** Access, refresh, and ID tokens stay server-side. Only render derived profile fields (name, email); never serialize session or token objects into loader data or HTML.
|
|
41
|
+
|
|
42
|
+
## OAuth Caveat
|
|
43
|
+
|
|
44
|
+
Completing a real login requires a public HTTPS origin whose `/account/authorize` callback is registered in the Customer Account app configuration. When the local origin is not registered, verify the signed-out rendering and handler wiring; skip the signed-in checks and say so instead of faking them.
|
|
45
|
+
|
|
46
|
+
## Continue when
|
|
47
|
+
|
|
48
|
+
- [ ] The navbar has an `/account` link and it returns 200
|
|
49
|
+
- [ ] Signed out, `/account` renders the sign-in panel without touching access tokens
|
|
50
|
+
- [ ] `GET /account/login` responds with a redirect to Shopify's login page (curl and check the `location` header)
|
|
51
|
+
- [ ] The logout control is a native `<form method="post" action="/account/logout">` — not a client-side form component or a fetch call
|
|
52
|
+
- [ ] Signed in (when the origin is registered for OAuth): `/account` renders the customer's name and email, and submitting the logout form signs the buyer out and lands back on the storefront
|
|
53
|
+
- [ ] No access/refresh/ID token appears in serialized loader data or page HTML
|
|
54
|
+
- [ ] `typecheck` (with `hydrogen gql check` chained) passes with the customer query in place
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hydrogen-shop-pay
|
|
3
|
+
description: >
|
|
4
|
+
Guide for adding or reviewing Shop Pay buttons in Hydrogen storefronts. Use
|
|
5
|
+
when working with ShopPayButton, renderShopPayButton, createShopPayButton,
|
|
6
|
+
product buy buttons, cart checkout acceleration, variant IDs, quantities, or
|
|
7
|
+
source attribution attributes.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Shop Pay
|
|
11
|
+
|
|
12
|
+
Hydrogen renders the Shop Pay button locally as a `<hydrogen-shop-pay-button>`
|
|
13
|
+
with a declarative shadow root. The shadow root protects the branded styles and
|
|
14
|
+
contains an anchor pointing at the storefront's own `/checkout` or
|
|
15
|
+
`/cart/<id>:<qty>` permalink paths, which `handleShopifyRoutes` redirects to the
|
|
16
|
+
store's real checkout. No external script loads and the server-rendered button
|
|
17
|
+
works before any JavaScript runs.
|
|
18
|
+
|
|
19
|
+
## Framework References
|
|
20
|
+
|
|
21
|
+
Before writing UI, check whether this skill has a reference file for the app's framework in `references/`. If one exists, read it and use that framework binding. If there is no matching reference, use `references/core.md` and wire the framework-neutral helpers into the app's existing component and routing conventions.
|
|
22
|
+
|
|
23
|
+
## Rules
|
|
24
|
+
|
|
25
|
+
- For product buy buttons, render Shop Pay only when there is a resolved ProductVariant ID.
|
|
26
|
+
- Pass ProductVariant GIDs or bare numeric ProductVariant IDs. Product IDs are invalid.
|
|
27
|
+
- Use quantity objects when quantity is known: `{ id: selectedVariant.id, quantity }`.
|
|
28
|
+
- For cart checkout buttons, omit `variants`; checkout mode uses the current cart.
|
|
29
|
+
- Disable Shop Pay whenever the add-to-cart button is disabled or a product/cart mutation is pending.
|
|
30
|
+
- Omit `channel` unless the integration needs explicit `headless` or `hydrogen` checkout attribution and knows which sales channel issued its Storefront API token.
|
|
31
|
+
- Omit `checkoutUrl` when the app routes same-origin checkout paths through `handleShopifyRoutes`. Otherwise pass the cart checkout URL.
|
|
32
|
+
- Pass `nonce` only when the storefront's Content Security Policy requires nonces for inline `<style>` elements. The nonce authorizes the shadow-root stylesheet, not the `style` attribute used by `width` and `borderRadius`; strict policies must allow inline style attributes for those custom dimensions.
|
|
33
|
+
- Keep Shop Pay near the primary purchase action, and keep its disabled state aligned with `canAddToCart(...)`.
|
|
34
|
+
- Size with `width` and `borderRadius`; arbitrary `className` and `style` overrides are intentionally not supported because the branded button is isolated inside its shadow root. Pass `accessibilityLabel` when the storefront language is not English, and never translate the `Shop Pay` brand name.
|
|
35
|
+
|
|
36
|
+
## Product Page Pattern
|
|
37
|
+
|
|
38
|
+
```tsx
|
|
39
|
+
{selectedVariant ? (
|
|
40
|
+
<ShopPayButton
|
|
41
|
+
variants={[{ id: selectedVariant.id, quantity }]}
|
|
42
|
+
disabled={!addable || pending}
|
|
43
|
+
width="100%"
|
|
44
|
+
borderRadius="9999px"
|
|
45
|
+
/>
|
|
46
|
+
) : null}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
`addable` should come from `canAddToCart(product, options)`, not from checking `selectedVariant` alone.
|
|
50
|
+
|
|
51
|
+
## Cart Pattern
|
|
52
|
+
|
|
53
|
+
For a full-cart checkout shortcut, render Shop Pay without `variants` and hide or disable it when the cart is empty or a cart mutation is pending.
|
|
54
|
+
|
|
55
|
+
```tsx
|
|
56
|
+
{cart.lines.nodes.length > 0 ? (
|
|
57
|
+
<ShopPayButton
|
|
58
|
+
disabled={cartPending}
|
|
59
|
+
width="100%"
|
|
60
|
+
borderRadius="4px"
|
|
61
|
+
/>
|
|
62
|
+
) : null}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Verify
|
|
66
|
+
|
|
67
|
+
Done when:
|
|
68
|
+
|
|
69
|
+
- [ ] Product buy buttons render Shop Pay only when a resolved ProductVariant ID exists.
|
|
70
|
+
- [ ] Shop Pay's disabled state matches the add-to-cart button (disabled when add-to-cart is disabled or a product/cart mutation is pending).
|
|
71
|
+
- [ ] Product buttons pass ProductVariant GIDs or bare numeric variant IDs (never Product IDs), with a quantity object when quantity is known.
|
|
72
|
+
- [ ] Cart checkout buttons omit `variants` and are hidden or disabled when the cart is empty or a mutation is pending.
|
|
73
|
+
- [ ] `checkoutUrl` is omitted only when `handleShopifyRoutes` handles the same-origin checkout paths.
|
|
74
|
+
|
|
75
|
+
## Gotchas
|
|
76
|
+
|
|
77
|
+
- The button's same-origin URLs only check out if the app routes requests through `handleShopifyRoutes`, which redirects `/checkout` and `/cart/<id>:<qty>` permalinks to the store's checkout.
|
|
78
|
+
- Disabled buttons render without an `href` (with `aria-disabled="true"`), so nothing navigates while a mutation is pending.
|
|
79
|
+
- If the button renders but checkout fails, verify variant ID format and that `handleShopifyRoutes` handles the request first.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Core Helpers
|
|
2
|
+
|
|
3
|
+
Use core helpers when not using the React or Vue bindings:
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
import {
|
|
7
|
+
createShopPayButton,
|
|
8
|
+
renderShopPayButton,
|
|
9
|
+
} from "@shopify/hydrogen";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Both helpers create a self-contained `<hydrogen-shop-pay-button>` with an open
|
|
13
|
+
shadow root containing the protected styles and an anchor with the Shop Pay
|
|
14
|
+
logo. Pick by integration shape:
|
|
15
|
+
|
|
16
|
+
- `renderShopPayButton(options)` returns an HTML string. Use it in server
|
|
17
|
+
templates or frameworks with raw-HTML rendering (`{@html}`, `v-html`,
|
|
18
|
+
`innerHTML`). Server output includes a declarative shadow root and needs no
|
|
19
|
+
client JavaScript. Browser calls register the custom element and return an
|
|
20
|
+
empty host that creates its shadow root when connected; use
|
|
21
|
+
`createShopPayButton` instead for client-created strict-CSP buttons that need
|
|
22
|
+
a `nonce`.
|
|
23
|
+
- `createShopPayButton(options)` returns a detached self-contained
|
|
24
|
+
`<hydrogen-shop-pay-button>` with an imperative shadow root. Use it for
|
|
25
|
+
imperative DOM UIs.
|
|
26
|
+
|
|
27
|
+
For product buy buttons, pass variants:
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
const button = createShopPayButton({
|
|
31
|
+
variants: [{ id: selectedVariant.id, quantity: 1 }],
|
|
32
|
+
width: "100%",
|
|
33
|
+
});
|
|
34
|
+
container.append(button);
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The open shadow root can be inspected with browser developer tools, but page CSS
|
|
38
|
+
cannot select its internal anchor or logo. The supported style controls are
|
|
39
|
+
`width` and `borderRadius`; do not treat the open root as a styling API.
|
|
40
|
+
Pass `nonce` when the storefront's Content Security Policy requires nonces for
|
|
41
|
+
inline `<style>` elements. The nonce does not authorize the `style` attribute
|
|
42
|
+
used by `width` and `borderRadius`; strict policies must allow inline style
|
|
43
|
+
attributes for those custom dimensions.
|
|
44
|
+
|
|
45
|
+
For cart checkout buttons, omit `variants`; the button links to the same-origin
|
|
46
|
+
`/checkout` path and `handleShopifyRoutes` redirects it to the current cart's
|
|
47
|
+
checkout:
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
const button = createShopPayButton({
|
|
51
|
+
width: "100%",
|
|
52
|
+
});
|
|
53
|
+
container.append(button);
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Validation Rules
|
|
57
|
+
|
|
58
|
+
- Variant IDs must be Shopify ProductVariant GIDs or bare numeric variant IDs.
|
|
59
|
+
- Quantities must be positive integers.
|
|
60
|
+
- Mixed variant formats are invalid: use all strings or all `{ id, quantity }` objects.
|
|
61
|
+
- Cart checkout mode omits `variants`; the current cart checks out.
|
|
62
|
+
- `disabled` renders the button without an `href` and with `aria-disabled="true"`.
|
|
63
|
+
- `accessibilityLabel` sets the accessible name for the logo-only button, which otherwise defaults to English. Localize words around the brand, but never translate `Shop Pay` itself.
|
|
64
|
+
- `channel` is optional. Set it to `headless` or `hydrogen` only when checkout needs explicit attribution to the sales channel that issued the Storefront API token.
|
|
65
|
+
- `nonce` is optional. It is applied to the shadow root's `<style>` element for strict Content Security Policies in server output, `createShopPayButton`, and framework bindings.
|
|
66
|
+
- Pass `checkoutUrl` when the app does not route same-origin checkout paths through `handleShopifyRoutes`.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# React
|
|
2
|
+
|
|
3
|
+
Import from the React entrypoint:
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import { ShopPayButton } from "@shopify/hydrogen/react";
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
In a product form:
|
|
10
|
+
|
|
11
|
+
```tsx
|
|
12
|
+
function AddToCart({ product }: { product: ProductData }) {
|
|
13
|
+
const { options, selectedVariant, formProps, register, errors, pending } = useProductForm();
|
|
14
|
+
const [quantity, setQuantity] = useState(1);
|
|
15
|
+
const addable = canAddToCart(product, options);
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<>
|
|
19
|
+
<form {...formProps({ beforeSubmit: openCartDrawer })}>
|
|
20
|
+
<input type="hidden" {...register("merchandiseId", {})} />
|
|
21
|
+
<input {...register("quantity", { value: quantity })} />
|
|
22
|
+
<button {...register("addToCart", {})} disabled={!addable || pending}>Add to cart</button>
|
|
23
|
+
</form>
|
|
24
|
+
|
|
25
|
+
{selectedVariant ? (
|
|
26
|
+
<ShopPayButton
|
|
27
|
+
variants={[{ id: selectedVariant.id, quantity }]}
|
|
28
|
+
disabled={!addable || pending}
|
|
29
|
+
width="100%"
|
|
30
|
+
borderRadius="9999px"
|
|
31
|
+
accessibilityLabel="Shop Payで購入"
|
|
32
|
+
/>
|
|
33
|
+
) : null}
|
|
34
|
+
</>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
`ShopPayButton` server-renders a `<hydrogen-shop-pay-button>` with a declarative
|
|
40
|
+
shadow root. The shadow root preserves the branded styles before JavaScript runs
|
|
41
|
+
and upgrades client-created instances without hydration errors.
|
|
42
|
+
|
|
43
|
+
Size with `width`/`borderRadius`. `className` and `style` are intentionally not
|
|
44
|
+
supported because page CSS cannot reach the internal anchor. Pass
|
|
45
|
+
`accessibilityLabel` when the storefront language is not English. Localize words
|
|
46
|
+
around the brand, but never translate `Shop Pay` itself. Pass `nonce` when the
|
|
47
|
+
storefront's Content Security Policy requires nonces for inline `<style>`
|
|
48
|
+
elements. The nonce does not authorize the `style` attribute used by `width` and
|
|
49
|
+
`borderRadius`; strict policies must allow inline style attributes for those
|
|
50
|
+
custom dimensions.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Vue And Nuxt
|
|
2
|
+
|
|
3
|
+
Import from the Vue entrypoint:
|
|
4
|
+
|
|
5
|
+
```vue
|
|
6
|
+
<script setup lang="ts">
|
|
7
|
+
import { canAddToCart } from "@shopify/hydrogen";
|
|
8
|
+
import { ShopPayButton } from "@shopify/hydrogen/vue";
|
|
9
|
+
|
|
10
|
+
const form = useProductForm();
|
|
11
|
+
const quantity = ref(1);
|
|
12
|
+
const addable = computed(() => canAddToCart(props.product, form.options));
|
|
13
|
+
</script>
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Render only when a variant is resolved:
|
|
17
|
+
|
|
18
|
+
```vue
|
|
19
|
+
<ShopPayButton
|
|
20
|
+
v-if="form.selectedVariant"
|
|
21
|
+
:variants="[{ id: form.selectedVariant.id, quantity }]"
|
|
22
|
+
:disabled="!addable || form.pending.value"
|
|
23
|
+
width="100%"
|
|
24
|
+
border-radius="9999px"
|
|
25
|
+
accessibility-label="Shop Pay से खरीदें"
|
|
26
|
+
/>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The component server-renders a `<hydrogen-shop-pay-button>` with a declarative
|
|
30
|
+
shadow root, so it works with Nuxt server rendering and needs no client-only
|
|
31
|
+
wrapper. The shadow root protects the branded internal styles.
|
|
32
|
+
|
|
33
|
+
Size with `width`/`border-radius`. Extra `class` and `style` attributes are
|
|
34
|
+
intentionally not forwarded into the shadow root. Pass `accessibility-label`
|
|
35
|
+
when the storefront language is not English. Localize words around the brand,
|
|
36
|
+
but never translate `Shop Pay` itself. Pass `nonce` when the storefront's
|
|
37
|
+
Content Security Policy requires nonces for inline `<style>` elements. The nonce
|
|
38
|
+
does not authorize the `style` attribute used by `width` and `border-radius`;
|
|
39
|
+
strict policies must allow inline style attributes for those custom dimensions.
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hydrogen-smoke-test
|
|
3
|
+
description: >
|
|
4
|
+
Smoke-test checklist for Hydrogen storefronts built by agents. Use after
|
|
5
|
+
creating or modifying a Hydrogen storefront, setup flow, cart, product page,
|
|
6
|
+
collection/search browsing, analytics, request handlers, Shopify redirects,
|
|
7
|
+
Shop Pay, or framework middleware integration.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Hydrogen Storefront Smoke Tests
|
|
11
|
+
|
|
12
|
+
Run the app in the framework's dev server and, when practical, in a production build. Type checks are not enough for Hydrogen wiring.
|
|
13
|
+
|
|
14
|
+
If any check below fails, fix the app and re-run the failing check before treating verification as complete.
|
|
15
|
+
|
|
16
|
+
Copyable checklist (details for each check are in the sections below):
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
Static checks:
|
|
20
|
+
- [ ] Formatting fixer, if present
|
|
21
|
+
- [ ] lint, typecheck, or check
|
|
22
|
+
- [ ] GraphQL validation (`hydrogen gql check`) when `gql()` documents changed
|
|
23
|
+
- [ ] build
|
|
24
|
+
- [ ] test
|
|
25
|
+
- [ ] Formatting check, if distinct from the fixer
|
|
26
|
+
|
|
27
|
+
Request handlers:
|
|
28
|
+
- [ ] POST /api/{api-version}/graphql.json returns Storefront API JSON, not the framework 404
|
|
29
|
+
- [ ] GET /api/cart returns cart handler JSON (no cart cookie -> {cart: null})
|
|
30
|
+
- [ ] GET /admin redirects to the configured shop/admin domain
|
|
31
|
+
- [ ] Unknown path returns framework 404 unless a Shopify URL redirect matches
|
|
32
|
+
|
|
33
|
+
Navigation:
|
|
34
|
+
- [ ] Every navbar and footer link href returns 200 when curled directly (no invented routes)
|
|
35
|
+
|
|
36
|
+
Product page:
|
|
37
|
+
- [ ] Server-renders title, gallery, price, variant options, add-to-cart form, and related products when available
|
|
38
|
+
- [ ] URL option params select the expected variant on reload
|
|
39
|
+
- [ ] Selecting same-product options updates the URL without scroll reset
|
|
40
|
+
- [ ] Combined-listing values navigate to the target product handle instead of calling selectOption
|
|
41
|
+
- [ ] Sold-out values remain selectable and show sold-out text
|
|
42
|
+
- [ ] Non-existent combinations are disabled
|
|
43
|
+
- [ ] Add-to-cart is enabled only when canAddToCart(product, options) is true
|
|
44
|
+
- [ ] Shop Pay renders only when a selected variant exists and is disabled when add-to-cart is disabled or pending
|
|
45
|
+
|
|
46
|
+
Cart:
|
|
47
|
+
- [ ] /cart works without JavaScript and is reachable via a real /cart link in the footer
|
|
48
|
+
- [ ] Header cart trigger is a `/cart` anchor that opens the drawer via `showModal()` after hydration
|
|
49
|
+
- [ ] window.Shopify.actions.openCart() opens the drawer after Standard Actions loads
|
|
50
|
+
- [ ] A mutation driven through the real Add to cart UI or framework cart action issues `Set-Cookie` and propagates expected response headers
|
|
51
|
+
- [ ] Add-to-cart can open the drawer after a successful submit when the product UX chooses that behavior
|
|
52
|
+
- [ ] Each line item form includes hidden set, scoped lineId, and editable quantity
|
|
53
|
+
- [ ] Quantity Enter key submits a set action
|
|
54
|
+
- [ ] Rapid quantity clicks settle to the final expected quantity
|
|
55
|
+
- [ ] Line, discount, note, attribute, network, and cart-level errors appear in the right scope
|
|
56
|
+
- [ ] Attribute editing submits the complete list, preserves unrelated attributes, and shows scoped pending UI
|
|
57
|
+
- [ ] Totals are server-provided and visually pending during cart mutations
|
|
58
|
+
|
|
59
|
+
Collection and search:
|
|
60
|
+
- [ ] Collection filters and sort update the URL and product grid
|
|
61
|
+
- [ ] Checkbox filters and price min/max controls both render, apply, and persist after reload
|
|
62
|
+
- [ ] Reloading a filtered URL server-renders the same filter/sort state
|
|
63
|
+
- [ ] Active filter chips remove one filter and preserve unrelated params
|
|
64
|
+
- [ ] Search filters preserve q
|
|
65
|
+
- [ ] JavaScript-disabled filter forms still submit with GET
|
|
66
|
+
- [ ] Back/forward navigation does not leave browse state stuck in loading
|
|
67
|
+
|
|
68
|
+
Analytics:
|
|
69
|
+
- [ ] Page view fires on initial load and client navigations
|
|
70
|
+
- [ ] Product/collection/search/cart view events fire once per route data change
|
|
71
|
+
- [ ] Cart tracking is wired once via trackCartAnalytics(cartStore) (React/Vue: useCartAnalytics()), delta events fire on confirmed cart data changes, and the cart query includes updatedAt
|
|
72
|
+
- [ ] No browser module reads private env variables
|
|
73
|
+
- [ ] Production does not bypass Customer Privacy consent gating (no forced-always-true consent checks)
|
|
74
|
+
|
|
75
|
+
Markets and money:
|
|
76
|
+
- [ ] Market-aware Storefront API queries declare $country, $language, and @inContext
|
|
77
|
+
- [ ] Money renders from Storefront API money fields via formatMoney()
|
|
78
|
+
- [ ] No client-side subtotal/total arithmetic exists
|
|
79
|
+
|
|
80
|
+
Production pass:
|
|
81
|
+
- [ ] Build and run the production bundle and repeat the request-handler checks against production mode
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Static Checks
|
|
85
|
+
|
|
86
|
+
Run the app's available scripts:
|
|
87
|
+
|
|
88
|
+
1. Formatting fixer, if present.
|
|
89
|
+
2. `lint`, `typecheck`, or `check`.
|
|
90
|
+
3. GraphQL validation (`hydrogen gql check`) when `gql()` documents changed.
|
|
91
|
+
4. `build`.
|
|
92
|
+
5. `test`.
|
|
93
|
+
6. Formatting check, if distinct from the fixer.
|
|
94
|
+
|
|
95
|
+
## Request Handlers
|
|
96
|
+
|
|
97
|
+
Replace `<port>` with the running app port, and `{api-version}` with the Storefront API version configured by the app:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
curl -i -X POST http://localhost:<port>/api/{api-version}/graphql.json \
|
|
101
|
+
-H "content-type: application/json" \
|
|
102
|
+
-H "X-Shopify-Storefront-Access-Token: <public-token>" \
|
|
103
|
+
-d '{"query":"{ shop { name } }"}'
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Expected: Storefront API JSON, not the framework 404.
|
|
107
|
+
|
|
108
|
+
The SFAPI proxy forwards the incoming public token header; it does not inject a token from server config.
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
curl -i http://localhost:<port>/api/cart
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Expected: cart handler JSON, not 404. With no cart cookie, the body should be `{cart: null}`.
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
curl -i http://localhost:<port>/admin
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Expected: redirect to `/admin` on the configured shop/admin domain.
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
curl -i http://localhost:<port>/this-does-not-exist
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Expected: framework 404 unless Shopify has a matching URL redirect.
|
|
127
|
+
|
|
128
|
+
## Navigation
|
|
129
|
+
|
|
130
|
+
Extract every `href` from the rendered navbar and footer and request each one directly:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
curl -s -o /dev/null -w "%{http_code} <href>\n" http://localhost:<port><href>
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Expected: 200 for every link. A 404 means the link points to a route the app never created or a handle the shop does not have. `/collections/all` is the classic failure: the Liquid "all" collection does not exist in the Storefront API, so only link to it when the shop really has a collection with that handle.
|
|
137
|
+
|
|
138
|
+
## Account
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
curl -i http://localhost:<port>/account/login
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Expected: a redirect whose `location` header points at Shopify's hosted login, not a framework 404 or 500.
|
|
145
|
+
|
|
146
|
+
- `/account` renders the signed-out panel when no session exists, without touching access tokens.
|
|
147
|
+
- The logout control is a native `<form method="post" action="/account/logout">`; the handler enforces same-origin POST and returns a raw redirect only a native browser submit can follow.
|
|
148
|
+
- Completing a real login requires a public HTTPS origin registered for the OAuth callback; when the local origin is not registered, verify the signed-out checks and say so instead of faking signed-in ones.
|
|
149
|
+
|
|
150
|
+
## Product Page
|
|
151
|
+
|
|
152
|
+
- Product page server-renders title, gallery, price, variant options, add-to-cart form, and related products when available.
|
|
153
|
+
- URL option params select the expected variant on reload.
|
|
154
|
+
- Selecting same-product options updates the URL without scroll reset.
|
|
155
|
+
- Combined-listing values navigate to the target product handle instead of calling `selectOption`.
|
|
156
|
+
- Sold-out values remain selectable and show sold-out text.
|
|
157
|
+
- Non-existent combinations are disabled.
|
|
158
|
+
- Add-to-cart is enabled only when `canAddToCart(product, options)` is true.
|
|
159
|
+
- Shop Pay renders only when a selected variant exists and is disabled when add-to-cart is disabled or pending.
|
|
160
|
+
|
|
161
|
+
## Cart
|
|
162
|
+
|
|
163
|
+
- `/cart` works without JavaScript and is reachable via a real `/cart` link in the footer.
|
|
164
|
+
- The header cart trigger is a `/cart` anchor that opens the drawer via `showModal()` after hydration.
|
|
165
|
+
- `window.Shopify.actions.openCart()` opens the drawer after Standard Actions loads.
|
|
166
|
+
- Exercise a mutation through the real Add to cart UI or the framework's cart action. Do not hand-craft an internal
|
|
167
|
+
Hydrogen cart payload. Confirm the response issues the expected cart or session `Set-Cookie` and propagates the
|
|
168
|
+
action's response headers.
|
|
169
|
+
- `handleShopifyRoutes` can intercept `/api/cart` and predictive-search requests, so the absence of a matching route
|
|
170
|
+
file does not mean the handler is missing.
|
|
171
|
+
- Add-to-cart can open the drawer after a successful submit when the product UX chooses that behavior.
|
|
172
|
+
- Each line item form includes hidden `set`, scoped `lineId`, and editable `quantity`.
|
|
173
|
+
- Quantity Enter key submits a set action.
|
|
174
|
+
- Rapid quantity clicks settle to the final expected quantity.
|
|
175
|
+
- Line, discount, note, attribute, network, and cart-level errors appear in the right scope.
|
|
176
|
+
- Saving one cart attribute submits the complete next list, preserves unrelated attributes, and shows a saving state while `pending.attributes` is true. Submitting no attribute fields clears the list.
|
|
177
|
+
- Totals are server-provided and visually pending during cart mutations.
|
|
178
|
+
|
|
179
|
+
## Collection And Search
|
|
180
|
+
|
|
181
|
+
- Collection filters and sort update the URL and product grid.
|
|
182
|
+
- Checkbox filters and price min/max controls both render, apply, and persist after reload.
|
|
183
|
+
- Reloading a filtered URL server-renders the same filter/sort state.
|
|
184
|
+
- Active filter chips remove one filter and preserve unrelated params.
|
|
185
|
+
- Search filters preserve `q`.
|
|
186
|
+
- JavaScript-disabled filter forms still submit with GET.
|
|
187
|
+
- Back/forward navigation does not leave browse state stuck in loading.
|
|
188
|
+
|
|
189
|
+
## Analytics
|
|
190
|
+
|
|
191
|
+
- Page view fires on initial load and client navigations.
|
|
192
|
+
- Product/collection/search/cart view events fire once per route data change.
|
|
193
|
+
- Cart tracking is wired once per cart store lifecycle via `trackCartAnalytics(cartStore)` (React/Vue: `useCartAnalytics()`), cart delta events fire on confirmed cart data changes, and the cart query includes `updatedAt`.
|
|
194
|
+
- No browser module reads private env variables.
|
|
195
|
+
- Analytics destinations only receive events after Shopify Customer Privacy allows analytics processing.
|
|
196
|
+
|
|
197
|
+
## Markets And Money
|
|
198
|
+
|
|
199
|
+
- Storefront API queries that should be market-aware declare `$country`, `$language`, and `@inContext`.
|
|
200
|
+
- Money renders from Storefront API money fields via `formatMoney()`.
|
|
201
|
+
- No client-side subtotal/total arithmetic exists.
|
|
202
|
+
|
|
203
|
+
## Production Pass
|
|
204
|
+
|
|
205
|
+
Build and run the production bundle. Repeat request-handler checks against production mode because dev-only middleware or development export conditions can hide broken production wiring.
|