@shopify/hydrogen 1.0.2 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/esnext/FileSessionStorage.d.ts +1 -1
- package/dist/esnext/FileSessionStorage.js +1 -1
- package/dist/esnext/client.d.ts +16 -16
- package/dist/esnext/client.js +16 -16
- package/dist/esnext/components/AddToCartButton/AddToCartButton.client.d.ts +5 -2
- package/dist/esnext/components/AddToCartButton/AddToCartButton.client.js +6 -5
- package/dist/esnext/components/AddToCartButton/index.d.ts +1 -1
- package/dist/esnext/components/AddToCartButton/index.js +1 -1
- package/dist/esnext/components/BaseButton/BaseButton.client.d.ts +7 -5
- package/dist/esnext/components/BaseButton/BaseButton.client.js +5 -4
- package/dist/esnext/components/BaseButton/index.d.ts +1 -1
- package/dist/esnext/components/BaseButton/index.js +1 -1
- package/dist/esnext/components/BuyNowButton/BuyNowButton.client.d.ts +3 -2
- package/dist/esnext/components/BuyNowButton/BuyNowButton.client.js +2 -2
- package/dist/esnext/components/BuyNowButton/index.d.ts +1 -1
- package/dist/esnext/components/BuyNowButton/index.js +1 -1
- package/dist/esnext/components/CartCheckoutButton/CartCheckoutButton.client.js +1 -1
- package/dist/esnext/components/CartCheckoutButton/index.d.ts +1 -1
- package/dist/esnext/components/CartCheckoutButton/index.js +1 -1
- package/dist/esnext/components/CartCost/CartCost.client.d.ts +1 -1
- package/dist/esnext/components/CartCost/CartCost.client.js +2 -2
- package/dist/esnext/components/CartCost/index.d.ts +1 -1
- package/dist/esnext/components/CartCost/index.js +1 -1
- package/dist/esnext/components/CartLineImage/CartLineImage.client.d.ts +1 -1
- package/dist/esnext/components/CartLineImage/CartLineImage.client.js +2 -2
- package/dist/esnext/components/CartLineImage/index.d.ts +1 -1
- package/dist/esnext/components/CartLineImage/index.js +1 -1
- package/dist/esnext/components/CartLinePrice/CartLinePrice.client.d.ts +1 -1
- package/dist/esnext/components/CartLinePrice/CartLinePrice.client.js +2 -2
- package/dist/esnext/components/CartLinePrice/index.d.ts +1 -1
- package/dist/esnext/components/CartLinePrice/index.js +1 -1
- package/dist/esnext/components/CartLineProductTitle/CartLineProductTitle.client.js +1 -1
- package/dist/esnext/components/CartLineProductTitle/index.d.ts +1 -1
- package/dist/esnext/components/CartLineProductTitle/index.js +1 -1
- package/dist/esnext/components/CartLineProvider/CartLineProvider.client.d.ts +1 -1
- package/dist/esnext/components/CartLineProvider/CartLineProvider.client.js +1 -1
- package/dist/esnext/components/CartLineProvider/context.d.ts +13 -13
- package/dist/esnext/components/CartLineProvider/index.d.ts +2 -2
- package/dist/esnext/components/CartLineProvider/index.js +2 -2
- package/dist/esnext/components/CartLineQuantity/CartLineQuantity.client.js +1 -1
- package/dist/esnext/components/CartLineQuantity/index.d.ts +1 -1
- package/dist/esnext/components/CartLineQuantity/index.js +1 -1
- package/dist/esnext/components/CartLineQuantityAdjustButton/CartLineQuantityAdjustButton.d.ts +7 -8
- package/dist/esnext/components/CartLineQuantityAdjustButton/CartLineQuantityAdjustButton.js +3 -3
- package/dist/esnext/components/CartLineQuantityAdjustButton/index.d.ts +1 -1
- package/dist/esnext/components/CartLineQuantityAdjustButton/index.js +1 -1
- package/dist/esnext/components/CartLines/CartLines.client.d.ts +1 -1
- package/dist/esnext/components/CartLines/CartLines.client.js +2 -2
- package/dist/esnext/components/CartLines/index.d.ts +1 -1
- package/dist/esnext/components/CartLines/index.js +1 -1
- package/dist/esnext/components/CartProvider/CartProvider.client.d.ts +2 -2
- package/dist/esnext/components/CartProvider/CartProvider.client.js +13 -7
- package/dist/esnext/components/CartProvider/cart-queries.d.ts +1 -1
- package/dist/esnext/components/CartProvider/cart-queries.js +1 -0
- package/dist/esnext/components/CartProvider/context.d.ts +1 -1
- package/dist/esnext/components/CartProvider/graphql/CartAttributesUpdateMutation.d.ts +1 -1
- package/dist/esnext/components/CartProvider/graphql/CartBuyerIdentityUpdateMutation.d.ts +1 -1
- package/dist/esnext/components/CartProvider/graphql/CartCreateMutation.d.ts +1 -1
- package/dist/esnext/components/CartProvider/graphql/CartDiscountCodesUpdateMutation.d.ts +1 -1
- package/dist/esnext/components/CartProvider/graphql/CartFragment.d.ts +1 -1
- package/dist/esnext/components/CartProvider/graphql/CartLineAddMutation.d.ts +1 -1
- package/dist/esnext/components/CartProvider/graphql/CartLineRemoveMutation.d.ts +1 -1
- package/dist/esnext/components/CartProvider/graphql/CartLineUpdateMutation.d.ts +1 -1
- package/dist/esnext/components/CartProvider/graphql/CartNoteUpdateMutation.d.ts +1 -1
- package/dist/esnext/components/CartProvider/graphql/CartQuery.d.ts +1 -1
- package/dist/esnext/components/CartProvider/hooks.client.d.ts +2 -2
- package/dist/esnext/components/CartProvider/hooks.client.js +4 -4
- package/dist/esnext/components/CartProvider/index.d.ts +4 -4
- package/dist/esnext/components/CartProvider/index.js +3 -3
- package/dist/esnext/components/CartProvider/types.d.ts +2 -2
- package/dist/esnext/components/CartShopPayButton/CartShopPayButton.client.d.ts +1 -1
- package/dist/esnext/components/CartShopPayButton/CartShopPayButton.client.js +2 -2
- package/dist/esnext/components/CartShopPayButton/index.d.ts +1 -1
- package/dist/esnext/components/CartShopPayButton/index.js +1 -1
- package/dist/esnext/components/ExternalVideo/ExternalVideo.d.ts +2 -2
- package/dist/esnext/components/ExternalVideo/ExternalVideo.js +1 -1
- package/dist/esnext/components/ExternalVideo/index.d.ts +1 -1
- package/dist/esnext/components/ExternalVideo/index.js +1 -1
- package/dist/esnext/components/Image/Image.d.ts +2 -2
- package/dist/esnext/components/Image/Image.js +5 -5
- package/dist/esnext/components/Image/index.d.ts +2 -2
- package/dist/esnext/components/Image/index.js +1 -1
- package/dist/esnext/components/Link/Link.client.js +5 -5
- package/dist/esnext/components/Link/index.d.ts +1 -1
- package/dist/esnext/components/Link/index.js +1 -1
- package/dist/esnext/components/LocalizationProvider/LocalizationClientProvider.client.d.ts +1 -1
- package/dist/esnext/components/LocalizationProvider/LocalizationClientProvider.client.js +1 -1
- package/dist/esnext/components/LocalizationProvider/LocalizationProvider.server.d.ts +1 -1
- package/dist/esnext/components/LocalizationProvider/LocalizationProvider.server.js +5 -5
- package/dist/esnext/components/LocalizationProvider/index.d.ts +1 -1
- package/dist/esnext/components/LocalizationProvider/index.js +1 -1
- package/dist/esnext/components/MediaFile/MediaFile.d.ts +4 -4
- package/dist/esnext/components/MediaFile/MediaFile.js +4 -4
- package/dist/esnext/components/MediaFile/index.d.ts +1 -1
- package/dist/esnext/components/MediaFile/index.js +1 -1
- package/dist/esnext/components/Metafield/Metafield.client.d.ts +2 -2
- package/dist/esnext/components/Metafield/Metafield.client.js +6 -6
- package/dist/esnext/components/Metafield/components/StarRating/StarRating.d.ts +1 -1
- package/dist/esnext/components/Metafield/components/StarRating/index.d.ts +1 -1
- package/dist/esnext/components/Metafield/components/StarRating/index.js +1 -1
- package/dist/esnext/components/Metafield/components/index.d.ts +1 -1
- package/dist/esnext/components/Metafield/components/index.js +1 -1
- package/dist/esnext/components/Metafield/index.d.ts +2 -2
- package/dist/esnext/components/Metafield/index.js +1 -1
- package/dist/esnext/components/Metafield/types.d.ts +1 -1
- package/dist/esnext/components/ModelViewer/ModelViewer.client.d.ts +2 -2
- package/dist/esnext/components/ModelViewer/ModelViewer.client.js +1 -1
- package/dist/esnext/components/ModelViewer/index.d.ts +1 -1
- package/dist/esnext/components/ModelViewer/index.js +1 -1
- package/dist/esnext/components/Money/Money.client.d.ts +1 -1
- package/dist/esnext/components/Money/Money.client.js +1 -1
- package/dist/esnext/components/Money/index.d.ts +1 -1
- package/dist/esnext/components/Money/index.js +1 -1
- package/dist/esnext/components/ProductOptionsProvider/ProductOptionsProvider.client.d.ts +1 -1
- package/dist/esnext/components/ProductOptionsProvider/ProductOptionsProvider.client.js +3 -3
- package/dist/esnext/components/ProductOptionsProvider/context.d.ts +1 -1
- package/dist/esnext/components/ProductOptionsProvider/index.d.ts +1 -1
- package/dist/esnext/components/ProductOptionsProvider/index.js +1 -1
- package/dist/esnext/components/ProductPrice/ProductPrice.client.d.ts +2 -2
- package/dist/esnext/components/ProductPrice/ProductPrice.client.js +2 -2
- package/dist/esnext/components/ProductPrice/index.d.ts +1 -1
- package/dist/esnext/components/ProductPrice/index.js +1 -1
- package/dist/esnext/components/Seo/CollectionSeo.client.d.ts +1 -1
- package/dist/esnext/components/Seo/CollectionSeo.client.js +4 -4
- package/dist/esnext/components/Seo/DefaultPageSeo.client.d.ts +1 -1
- package/dist/esnext/components/Seo/DefaultPageSeo.client.js +5 -5
- package/dist/esnext/components/Seo/DescriptionSeo.client.d.ts +1 -1
- package/dist/esnext/components/Seo/DescriptionSeo.client.js +1 -1
- package/dist/esnext/components/Seo/HomePageSeo.client.d.ts +1 -1
- package/dist/esnext/components/Seo/HomePageSeo.client.js +3 -3
- package/dist/esnext/components/Seo/ImageSeo.client.d.ts +1 -1
- package/dist/esnext/components/Seo/ImageSeo.client.js +1 -1
- package/dist/esnext/components/Seo/NoIndexSeo.client.d.ts +1 -1
- package/dist/esnext/components/Seo/NoIndexSeo.client.js +2 -2
- package/dist/esnext/components/Seo/PageSeo.client.d.ts +1 -1
- package/dist/esnext/components/Seo/PageSeo.client.js +3 -3
- package/dist/esnext/components/Seo/ProductSeo.client.d.ts +1 -1
- package/dist/esnext/components/Seo/ProductSeo.client.js +6 -6
- package/dist/esnext/components/Seo/Seo.client.d.ts +4 -4
- package/dist/esnext/components/Seo/Seo.client.js +7 -7
- package/dist/esnext/components/Seo/TitleSeo.client.d.ts +1 -1
- package/dist/esnext/components/Seo/TitleSeo.client.js +1 -1
- package/dist/esnext/components/Seo/TwitterSeo.client.d.ts +1 -1
- package/dist/esnext/components/Seo/TwitterSeo.client.js +1 -1
- package/dist/esnext/components/Seo/index.d.ts +1 -1
- package/dist/esnext/components/Seo/index.js +1 -1
- package/dist/esnext/components/Seo/seo-types.d.ts +1 -1
- package/dist/esnext/components/ShopPayButton/ShopPayButton.client.js +2 -2
- package/dist/esnext/components/ShopPayButton/index.d.ts +1 -1
- package/dist/esnext/components/ShopPayButton/index.js +1 -1
- package/dist/esnext/components/Video/Video.d.ts +7 -2
- package/dist/esnext/components/Video/Video.js +3 -3
- package/dist/esnext/components/Video/index.d.ts +1 -1
- package/dist/esnext/components/Video/index.js +1 -1
- package/dist/esnext/components/index.d.ts +27 -27
- package/dist/esnext/components/index.js +25 -25
- package/dist/esnext/config.d.ts +5 -5
- package/dist/esnext/config.js +4 -4
- package/dist/esnext/constants.d.ts +1 -0
- package/dist/esnext/constants.js +1 -0
- package/dist/esnext/entry-client.d.ts +1 -1
- package/dist/esnext/entry-client.js +35 -14
- package/dist/esnext/entry-server.d.ts +1 -1
- package/dist/esnext/entry-server.js +86 -60
- package/dist/esnext/experimental.d.ts +2 -0
- package/dist/esnext/experimental.js +2 -0
- package/dist/esnext/foundation/Analytics/Analytics.client.js +1 -1
- package/dist/esnext/foundation/Analytics/Analytics.server.js +5 -5
- package/dist/esnext/foundation/Analytics/ClientAnalytics.d.ts +1 -1
- package/dist/esnext/foundation/Analytics/ClientAnalytics.js +4 -4
- package/dist/esnext/foundation/Analytics/ServerAnalyticsRoute.d.ts +1 -1
- package/dist/esnext/foundation/Analytics/ServerAnalyticsRoute.js +1 -1
- package/dist/esnext/foundation/Analytics/connectors/PerformanceMetrics/PerformanceMetrics.client.js +7 -5
- package/dist/esnext/foundation/Analytics/connectors/PerformanceMetrics/PerformanceMetricsDebug.client.js +1 -1
- package/dist/esnext/foundation/Analytics/connectors/PerformanceMetrics/ServerAnalyticsConnector.js +1 -1
- package/dist/esnext/foundation/Analytics/connectors/Shopify/ServerAnalyticsConnector.js +1 -1
- package/dist/esnext/foundation/Analytics/connectors/Shopify/ShopifyAnalytics.client.js +3 -3
- package/dist/esnext/foundation/Analytics/connectors/Shopify/ShopifyAnalytics.server.js +9 -9
- package/dist/esnext/foundation/Analytics/hook.js +2 -2
- package/dist/esnext/foundation/Analytics/index.d.ts +1 -1
- package/dist/esnext/foundation/Analytics/index.js +1 -1
- package/dist/esnext/foundation/Analytics/utils.js +1 -1
- package/dist/esnext/foundation/BuiltInRoutes/BuiltInRoutes.d.ts +1 -1
- package/dist/esnext/foundation/BuiltInRoutes/BuiltInRoutes.js +3 -3
- package/dist/esnext/foundation/Cache/cache-sub-request.d.ts +1 -1
- package/dist/esnext/foundation/Cache/cache-sub-request.js +4 -4
- package/dist/esnext/foundation/Cache/cache.d.ts +1 -1
- package/dist/esnext/foundation/Cache/cache.js +3 -4
- package/dist/esnext/foundation/Cache/strategies/index.d.ts +1 -1
- package/dist/esnext/foundation/Cookie/Cookie.js +2 -2
- package/dist/esnext/foundation/CookieSessionStorage/CookieSessionStorage.d.ts +2 -2
- package/dist/esnext/foundation/CookieSessionStorage/CookieSessionStorage.js +2 -1
- package/dist/esnext/foundation/DevTools/DevTools.client.js +1 -1
- package/dist/esnext/foundation/DevTools/DevTools.server.js +4 -3
- package/dist/esnext/foundation/DevTools/components/Heading.js +1 -1
- package/dist/esnext/foundation/DevTools/components/Interface.client.js +1 -1
- package/dist/esnext/foundation/DevTools/components/Panels.d.ts +2 -2
- package/dist/esnext/foundation/DevTools/components/Panels.js +28 -22
- package/dist/esnext/foundation/DevTools/components/Performance.client.js +1 -2
- package/dist/esnext/foundation/DevTools/components/Settings.client.d.ts +2 -1
- package/dist/esnext/foundation/DevTools/components/Settings.client.js +2 -5
- package/dist/esnext/foundation/DevTools/components/Table.js +3 -3
- package/dist/esnext/foundation/DevTools/components/index.d.ts +2 -2
- package/dist/esnext/foundation/DevTools/components/index.js +2 -2
- package/dist/esnext/foundation/FileRoutes/FileRoutes.server.d.ts +1 -1
- package/dist/esnext/foundation/FileRoutes/FileRoutes.server.js +5 -5
- package/dist/esnext/foundation/FileSessionStorage/FileSessionStorage.d.ts +3 -3
- package/dist/esnext/foundation/FileSessionStorage/FileSessionStorage.js +2 -2
- package/dist/esnext/foundation/Form/Form.client.d.ts +11 -0
- package/dist/esnext/foundation/Form/Form.client.js +51 -0
- package/dist/esnext/foundation/Head/Head.client.js +1 -1
- package/dist/esnext/foundation/Head/index.d.ts +1 -1
- package/dist/esnext/foundation/Head/index.js +1 -1
- package/dist/esnext/foundation/Html/Html.d.ts +1 -1
- package/dist/esnext/foundation/HydrogenRequest/HydrogenRequest.server.d.ts +6 -5
- package/dist/esnext/foundation/HydrogenRequest/HydrogenRequest.server.js +6 -7
- package/dist/esnext/foundation/HydrogenResponse/HydrogenResponse.server.d.ts +2 -4
- package/dist/esnext/foundation/HydrogenResponse/HydrogenResponse.server.js +4 -18
- package/dist/esnext/foundation/MemorySessionStorage/MemorySessionStorage.d.ts +2 -2
- package/dist/esnext/foundation/MemorySessionStorage/MemorySessionStorage.js +1 -1
- package/dist/esnext/foundation/Redirect/Redirect.client.js +1 -1
- package/dist/esnext/foundation/Route/Route.server.js +3 -3
- package/dist/esnext/foundation/Router/BrowserRouter.client.js +2 -2
- package/dist/esnext/foundation/Router/Router.server.js +1 -1
- package/dist/esnext/foundation/ServerPropsProvider/ServerPropsProvider.d.ts +3 -1
- package/dist/esnext/foundation/ServerPropsProvider/ServerPropsProvider.js +7 -7
- package/dist/esnext/foundation/ServerPropsProvider/index.d.ts +1 -1
- package/dist/esnext/foundation/ServerPropsProvider/index.js +1 -1
- package/dist/esnext/foundation/ServerRequestProvider/ServerRequestProvider.d.ts +2 -2
- package/dist/esnext/foundation/ServerRequestProvider/ServerRequestProvider.js +3 -3
- package/dist/esnext/foundation/ServerRequestProvider/index.d.ts +1 -1
- package/dist/esnext/foundation/ServerRequestProvider/index.js +1 -1
- package/dist/esnext/foundation/ShopifyProvider/ShopifyProvider.client.d.ts +1 -1
- package/dist/esnext/foundation/ShopifyProvider/ShopifyProvider.server.d.ts +2 -2
- package/dist/esnext/foundation/ShopifyProvider/ShopifyProvider.server.js +7 -6
- package/dist/esnext/foundation/ShopifyProvider/index.d.ts +1 -1
- package/dist/esnext/foundation/ShopifyProvider/index.js +1 -1
- package/dist/esnext/foundation/ShopifyProvider/types.d.ts +4 -3
- package/dist/esnext/foundation/fetchSync/ResponseSync.d.ts +14 -0
- package/dist/esnext/foundation/fetchSync/ResponseSync.js +38 -0
- package/dist/esnext/foundation/fetchSync/client/fetchSync.d.ts +2 -2
- package/dist/esnext/foundation/fetchSync/client/fetchSync.js +5 -10
- package/dist/esnext/foundation/fetchSync/server/fetchSync.d.ts +3 -3
- package/dist/esnext/foundation/fetchSync/server/fetchSync.js +7 -13
- package/dist/esnext/foundation/index.d.ts +3 -3
- package/dist/esnext/foundation/index.js +3 -3
- package/dist/esnext/foundation/session/session-types.d.ts +15 -0
- package/dist/esnext/foundation/{fetchSync/types.js → session/session-types.js} +0 -0
- package/dist/esnext/foundation/session/session.d.ts +7 -16
- package/dist/esnext/foundation/session/session.js +17 -1
- package/dist/esnext/foundation/ssr-interop.d.ts +2 -2
- package/dist/esnext/foundation/ssr-interop.js +2 -2
- package/dist/esnext/foundation/useNavigate/useNavigate.js +2 -2
- package/dist/esnext/foundation/useQuery/hooks.d.ts +4 -1
- package/dist/esnext/foundation/useQuery/hooks.js +5 -5
- package/dist/esnext/foundation/useQuery/index.d.ts +1 -1
- package/dist/esnext/foundation/useQuery/index.js +1 -1
- package/dist/esnext/foundation/useRequestContext/index.js +1 -1
- package/dist/esnext/foundation/useRouteParams/useRouteParams.js +2 -2
- package/dist/esnext/foundation/useServerProps/index.d.ts +1 -1
- package/dist/esnext/foundation/useServerProps/index.js +1 -1
- package/dist/esnext/foundation/useServerProps/use-server-props.d.ts +1 -1
- package/dist/esnext/foundation/useServerProps/use-server-props.js +1 -1
- package/dist/esnext/foundation/useSession/useSession.d.ts +1 -0
- package/dist/esnext/foundation/useSession/useSession.js +14 -1
- package/dist/esnext/foundation/useShop/index.d.ts +1 -1
- package/dist/esnext/foundation/useShop/index.js +1 -1
- package/dist/esnext/foundation/useShop/use-shop.d.ts +1 -1
- package/dist/esnext/foundation/useShop/use-shop.js +2 -2
- package/dist/esnext/foundation/useUrl/index.d.ts +1 -1
- package/dist/esnext/foundation/useUrl/index.js +1 -1
- package/dist/esnext/foundation/useUrl/useUrl.js +4 -4
- package/dist/esnext/framework/graphiql.js +26 -30
- package/dist/esnext/framework/load-config.js +2 -2
- package/dist/esnext/framework/middleware.d.ts +1 -1
- package/dist/esnext/framework/middleware.js +2 -2
- package/dist/esnext/framework/plugin.d.ts +1 -1
- package/dist/esnext/framework/plugin.js +17 -15
- package/dist/esnext/framework/plugins/vite-plugin-assets-version.d.ts +2 -0
- package/dist/esnext/framework/plugins/vite-plugin-assets-version.js +8 -0
- package/dist/esnext/framework/plugins/vite-plugin-css-modules-rsc.js +1 -1
- package/dist/esnext/framework/plugins/vite-plugin-css-rsc.d.ts +2 -0
- package/dist/esnext/framework/plugins/vite-plugin-css-rsc.js +108 -0
- package/dist/esnext/framework/plugins/vite-plugin-hydrogen-config.d.ts +2 -1
- package/dist/esnext/framework/plugins/vite-plugin-hydrogen-config.js +8 -4
- package/dist/esnext/framework/plugins/vite-plugin-hydrogen-middleware.d.ts +1 -1
- package/dist/esnext/framework/plugins/vite-plugin-hydrogen-middleware.js +3 -3
- package/dist/esnext/framework/plugins/vite-plugin-hydrogen-rsc.d.ts +1 -1
- package/dist/esnext/framework/plugins/vite-plugin-hydrogen-rsc.js +2 -2
- package/dist/esnext/framework/plugins/vite-plugin-hydrogen-virtual-files.d.ts +1 -1
- package/dist/esnext/framework/plugins/vite-plugin-hydrogen-virtual-files.js +35 -7
- package/dist/esnext/framework/plugins/vite-plugin-platform-entry.js +36 -7
- package/dist/esnext/framework/types.d.ts +14 -0
- package/dist/esnext/hooks/index.d.ts +6 -6
- package/dist/esnext/hooks/index.js +6 -6
- package/dist/esnext/hooks/useCart/index.d.ts +1 -1
- package/dist/esnext/hooks/useCart/index.js +1 -1
- package/dist/esnext/hooks/useCart/useCart.d.ts +1 -1
- package/dist/esnext/hooks/useCart/useCart.js +1 -1
- package/dist/esnext/hooks/useCartLine/index.d.ts +1 -1
- package/dist/esnext/hooks/useCartLine/index.js +1 -1
- package/dist/esnext/hooks/useCartLine/useCartLine.d.ts +13 -13
- package/dist/esnext/hooks/useCartLine/useCartLine.js +1 -1
- package/dist/esnext/hooks/useLoadScript/index.d.ts +1 -1
- package/dist/esnext/hooks/useLoadScript/index.js +1 -1
- package/dist/esnext/hooks/useLoadScript/useLoadScript.client.d.ts +1 -1
- package/dist/esnext/hooks/useLoadScript/useLoadScript.client.js +1 -1
- package/dist/esnext/hooks/useLocalization/useLocalization.d.ts +2 -3
- package/dist/esnext/hooks/useLocalization/useLocalization.js +2 -2
- package/dist/esnext/hooks/useMeasurement/hooks.d.ts +1 -1
- package/dist/esnext/hooks/useMeasurement/hooks.js +2 -2
- package/dist/esnext/hooks/useMeasurement/index.d.ts +1 -1
- package/dist/esnext/hooks/useMeasurement/index.js +1 -1
- package/dist/esnext/hooks/useMoney/hooks.d.ts +1 -1
- package/dist/esnext/hooks/useMoney/hooks.js +1 -1
- package/dist/esnext/hooks/useMoney/index.d.ts +1 -1
- package/dist/esnext/hooks/useMoney/index.js +1 -1
- package/dist/esnext/hooks/useProductOptions/helpers.d.ts +2 -2
- package/dist/esnext/hooks/useProductOptions/index.d.ts +2 -2
- package/dist/esnext/hooks/useProductOptions/index.js +2 -2
- package/dist/esnext/hooks/useProductOptions/types.d.ts +1 -1
- package/dist/esnext/hooks/useProductOptions/useProductOptions.client.d.ts +1 -1
- package/dist/esnext/hooks/useProductOptions/useProductOptions.client.js +1 -1
- package/dist/esnext/hooks/useShopQuery/hooks.d.ts +1 -1
- package/dist/esnext/hooks/useShopQuery/hooks.js +25 -17
- package/dist/esnext/hooks/useShopQuery/index.d.ts +1 -1
- package/dist/esnext/hooks/useShopQuery/index.js +1 -1
- package/dist/esnext/index.d.ts +26 -26
- package/dist/esnext/index.js +22 -22
- package/dist/esnext/node.d.ts +1 -1
- package/dist/esnext/node.js +1 -1
- package/dist/esnext/platforms/index.d.ts +1 -0
- package/dist/esnext/platforms/index.js +1 -0
- package/dist/esnext/platforms/node.d.ts +1 -1
- package/dist/esnext/platforms/node.js +5 -11
- package/dist/esnext/platforms/virtual.d.ts +8 -0
- package/dist/esnext/platforms/virtual.js +12 -0
- package/dist/esnext/platforms/worker-event.js +1 -1
- package/dist/esnext/platforms/worker.js +7 -7
- package/dist/esnext/shared-types.d.ts +3 -0
- package/dist/esnext/types.d.ts +8 -7
- package/dist/esnext/types.js +1 -1
- package/dist/esnext/utilities/apiRoutes.d.ts +4 -4
- package/dist/esnext/utilities/apiRoutes.js +51 -6
- package/dist/esnext/utilities/error.js +1 -1
- package/dist/esnext/utilities/fetch.js +1 -1
- package/dist/esnext/utilities/flattenConnection/flattenConnection.d.ts +1 -1
- package/dist/esnext/utilities/flattenConnection/index.d.ts +1 -1
- package/dist/esnext/utilities/flattenConnection/index.js +1 -1
- package/dist/esnext/utilities/hash.d.ts +1 -1
- package/dist/esnext/utilities/hash.js +1 -1
- package/dist/esnext/utilities/image_size.d.ts +1 -1
- package/dist/esnext/utilities/index.d.ts +12 -12
- package/dist/esnext/utilities/index.js +12 -12
- package/dist/esnext/utilities/isBrowser/index.d.ts +1 -1
- package/dist/esnext/utilities/isBrowser/index.js +1 -1
- package/dist/esnext/utilities/isServer/index.d.ts +1 -1
- package/dist/esnext/utilities/isServer/index.js +1 -1
- package/dist/esnext/utilities/isServer/isServer.js +1 -1
- package/dist/esnext/utilities/load_script.d.ts +1 -0
- package/dist/esnext/utilities/load_script.js +6 -1
- package/dist/esnext/utilities/locale/index.d.ts +1 -0
- package/dist/esnext/utilities/locale/index.js +1 -0
- package/dist/esnext/utilities/locale/locale.d.ts +7 -0
- package/dist/esnext/utilities/locale/locale.js +22 -0
- package/dist/esnext/utilities/log/index.d.ts +4 -4
- package/dist/esnext/utilities/log/index.js +4 -4
- package/dist/esnext/utilities/log/log-cache-api-status.js +1 -1
- package/dist/esnext/utilities/log/log-cache-header.d.ts +4 -4
- package/dist/esnext/utilities/log/log-cache-header.js +3 -3
- package/dist/esnext/utilities/log/log-query-timeline.d.ts +3 -3
- package/dist/esnext/utilities/log/log-query-timeline.js +13 -10
- package/dist/esnext/utilities/log/log.d.ts +1 -1
- package/dist/esnext/utilities/log/log.js +2 -2
- package/dist/esnext/utilities/log/utils.d.ts +1 -1
- package/dist/esnext/utilities/log/utils.js +1 -1
- package/dist/esnext/utilities/measurement.d.ts +1 -1
- package/dist/esnext/utilities/parseMetafield/index.d.ts +1 -1
- package/dist/esnext/utilities/parseMetafield/index.js +1 -1
- package/dist/esnext/utilities/parseMetafield/parseMetafield.d.ts +2 -2
- package/dist/esnext/utilities/parseMetafield/parseMetafield.js +1 -1
- package/dist/esnext/utilities/storefrontApi.js +1 -1
- package/dist/esnext/utilities/suspense.d.ts +1 -1
- package/dist/esnext/utilities/suspense.js +1 -1
- package/dist/esnext/version.d.ts +1 -1
- package/dist/esnext/version.js +1 -1
- package/dist/node/foundation/session/session-types.d.ts +15 -0
- package/dist/node/foundation/session/session-types.js +2 -0
- package/dist/node/framework/graphiql.js +26 -30
- package/dist/node/framework/load-config.js +3 -3
- package/dist/node/framework/middleware.d.ts +1 -1
- package/dist/node/framework/middleware.js +3 -3
- package/dist/node/framework/plugin.d.ts +1 -1
- package/dist/node/framework/plugin.js +26 -24
- package/dist/node/framework/plugins/vite-plugin-assets-version.d.ts +2 -0
- package/dist/node/framework/plugins/vite-plugin-assets-version.js +11 -0
- package/dist/node/framework/plugins/vite-plugin-css-modules-rsc.js +3 -3
- package/dist/node/framework/plugins/vite-plugin-css-rsc.d.ts +2 -0
- package/dist/node/framework/plugins/vite-plugin-css-rsc.js +114 -0
- package/dist/node/framework/plugins/vite-plugin-hydrogen-config.d.ts +2 -1
- package/dist/node/framework/plugins/vite-plugin-hydrogen-config.js +11 -4
- package/dist/node/framework/plugins/vite-plugin-hydrogen-middleware.d.ts +1 -1
- package/dist/node/framework/plugins/vite-plugin-hydrogen-middleware.js +7 -7
- package/dist/node/framework/plugins/vite-plugin-hydrogen-rsc.d.ts +1 -1
- package/dist/node/framework/plugins/vite-plugin-hydrogen-rsc.js +5 -5
- package/dist/node/framework/plugins/vite-plugin-hydrogen-virtual-files.d.ts +1 -1
- package/dist/node/framework/plugins/vite-plugin-hydrogen-virtual-files.js +35 -7
- package/dist/node/framework/plugins/vite-plugin-platform-entry.js +36 -7
- package/dist/node/framework/types.d.ts +14 -0
- package/dist/node/shared-types.d.ts +3 -0
- package/package.json +20 -3
- package/vendor/react-server-dom-vite/cjs/react-server-dom-vite-plugin.js +36 -14
- package/vendor/react-server-dom-vite/esm/react-server-dom-vite-plugin.js +36 -14
- package/dist/esnext/foundation/fetchSync/types.d.ts +0 -5
- package/dist/esnext/framework/plugins/vite-plugin-purge-query-cache.d.ts +0 -3
- package/dist/esnext/framework/plugins/vite-plugin-purge-query-cache.js +0 -11
- package/dist/node/framework/plugins/vite-plugin-purge-query-cache.d.ts +0 -3
- package/dist/node/framework/plugins/vite-plugin-purge-query-cache.js +0 -16
|
@@ -7,4 +7,4 @@ export declare const CartBuyerIdentityUpdate: (cartFragment: string) => string;
|
|
|
7
7
|
export declare const CartAttributesUpdate: (cartFragment: string) => string;
|
|
8
8
|
export declare const CartDiscountCodesUpdate: (cartFragment: string) => string;
|
|
9
9
|
export declare const CartQuery: (cartFragment: string) => string;
|
|
10
|
-
export declare const defaultCartFragment = "\nfragment CartFragment on Cart {\n id\n checkoutUrl\n totalQuantity\n buyerIdentity {\n countryCode\n customer {\n id\n email\n firstName\n lastName\n displayName\n }\n email\n phone\n }\n lines(first: $numCartLines) {\n edges {\n node {\n id\n quantity\n attributes {\n key\n value\n }\n cost {\n totalAmount {\n amount\n currencyCode\n }\n compareAtAmountPerQuantity {\n amount\n currencyCode\n }\n }\n merchandise {\n ... on ProductVariant {\n id\n availableForSale\n compareAtPriceV2 {\n ...MoneyFragment\n }\n priceV2 {\n ...MoneyFragment\n }\n requiresShipping\n title\n image {\n ...ImageFragment\n }\n product {\n handle\n title\n }\n selectedOptions {\n name\n value\n }\n }\n }\n }\n }\n }\n cost {\n subtotalAmount {\n ...MoneyFragment\n }\n totalAmount {\n ...MoneyFragment\n }\n totalDutyAmount {\n ...MoneyFragment\n }\n totalTaxAmount {\n ...MoneyFragment\n }\n }\n note\n attributes {\n key\n value\n }\n discountCodes {\n code\n }\n}\n\nfragment MoneyFragment on MoneyV2 {\n currencyCode\n amount\n}\nfragment ImageFragment on Image {\n id\n url\n altText\n width\n height\n}\n";
|
|
10
|
+
export declare const defaultCartFragment = "\nfragment CartFragment on Cart {\n id\n checkoutUrl\n totalQuantity\n buyerIdentity {\n countryCode\n customer {\n id\n email\n firstName\n lastName\n displayName\n }\n email\n phone\n }\n lines(first: $numCartLines) {\n edges {\n node {\n id\n quantity\n attributes {\n key\n value\n }\n cost {\n totalAmount {\n amount\n currencyCode\n }\n compareAtAmountPerQuantity {\n amount\n currencyCode\n }\n }\n merchandise {\n ... on ProductVariant {\n id\n availableForSale\n compareAtPriceV2 {\n ...MoneyFragment\n }\n priceV2 {\n ...MoneyFragment\n }\n requiresShipping\n title\n image {\n ...ImageFragment\n }\n product {\n handle\n title\n id\n }\n selectedOptions {\n name\n value\n }\n }\n }\n }\n }\n }\n cost {\n subtotalAmount {\n ...MoneyFragment\n }\n totalAmount {\n ...MoneyFragment\n }\n totalDutyAmount {\n ...MoneyFragment\n }\n totalTaxAmount {\n ...MoneyFragment\n }\n }\n note\n attributes {\n key\n value\n }\n discountCodes {\n code\n }\n}\n\nfragment MoneyFragment on MoneyV2 {\n currencyCode\n amount\n}\nfragment ImageFragment on Image {\n id\n url\n altText\n width\n height\n}\n";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CartWithActions } from './types';
|
|
1
|
+
import { CartWithActions } from './types.js';
|
|
2
2
|
export declare const CartContext: import("react").Context<CartWithActions | null>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* THIS FILE IS AUTO-GENERATED, DO NOT EDIT.
|
|
3
3
|
* Instead, you can edit the associated .graphql file to query for additional fields and this file will be updated when you run `yarn graphql-types`
|
|
4
4
|
*/
|
|
5
|
-
import * as Types from '../../../storefront-api-types';
|
|
5
|
+
import * as Types from '../../../storefront-api-types.js';
|
|
6
6
|
export declare type CartAttributesUpdateMutationVariables = Types.Exact<{
|
|
7
7
|
attributes: Array<Types.AttributeInput> | Types.AttributeInput;
|
|
8
8
|
cartId: Types.Scalars['ID'];
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* THIS FILE IS AUTO-GENERATED, DO NOT EDIT.
|
|
3
3
|
* Instead, you can edit the associated .graphql file to query for additional fields and this file will be updated when you run `yarn graphql-types`
|
|
4
4
|
*/
|
|
5
|
-
import * as Types from '../../../storefront-api-types';
|
|
5
|
+
import * as Types from '../../../storefront-api-types.js';
|
|
6
6
|
export declare type CartBuyerIdentityUpdateMutationVariables = Types.Exact<{
|
|
7
7
|
cartId: Types.Scalars['ID'];
|
|
8
8
|
buyerIdentity: Types.CartBuyerIdentityInput;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* THIS FILE IS AUTO-GENERATED, DO NOT EDIT.
|
|
3
3
|
* Instead, you can edit the associated .graphql file to query for additional fields and this file will be updated when you run `yarn graphql-types`
|
|
4
4
|
*/
|
|
5
|
-
import * as Types from '../../../storefront-api-types';
|
|
5
|
+
import * as Types from '../../../storefront-api-types.js';
|
|
6
6
|
export declare type CartCreateMutationVariables = Types.Exact<{
|
|
7
7
|
input: Types.CartInput;
|
|
8
8
|
numCartLines?: Types.InputMaybe<Types.Scalars['Int']>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* THIS FILE IS AUTO-GENERATED, DO NOT EDIT.
|
|
3
3
|
* Instead, you can edit the associated .graphql file to query for additional fields and this file will be updated when you run `yarn graphql-types`
|
|
4
4
|
*/
|
|
5
|
-
import * as Types from '../../../storefront-api-types';
|
|
5
|
+
import * as Types from '../../../storefront-api-types.js';
|
|
6
6
|
export declare type CartDiscountCodesUpdateMutationVariables = Types.Exact<{
|
|
7
7
|
cartId: Types.Scalars['ID'];
|
|
8
8
|
discountCodes?: Types.InputMaybe<Array<Types.Scalars['String']> | Types.Scalars['String']>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* THIS FILE IS AUTO-GENERATED, DO NOT EDIT.
|
|
3
3
|
* Instead, you can edit the associated .graphql file to query for additional fields and this file will be updated when you run `yarn graphql-types`
|
|
4
4
|
*/
|
|
5
|
-
import * as Types from '../../../storefront-api-types';
|
|
5
|
+
import * as Types from '../../../storefront-api-types.js';
|
|
6
6
|
export declare type CartFragmentFragment = {
|
|
7
7
|
__typename?: 'Cart';
|
|
8
8
|
} & Pick<Types.Cart, 'id' | 'checkoutUrl' | 'totalQuantity' | 'note'> & {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* THIS FILE IS AUTO-GENERATED, DO NOT EDIT.
|
|
3
3
|
* Instead, you can edit the associated .graphql file to query for additional fields and this file will be updated when you run `yarn graphql-types`
|
|
4
4
|
*/
|
|
5
|
-
import * as Types from '../../../storefront-api-types';
|
|
5
|
+
import * as Types from '../../../storefront-api-types.js';
|
|
6
6
|
export declare type CartLineAddMutationVariables = Types.Exact<{
|
|
7
7
|
cartId: Types.Scalars['ID'];
|
|
8
8
|
lines: Array<Types.CartLineInput> | Types.CartLineInput;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* THIS FILE IS AUTO-GENERATED, DO NOT EDIT.
|
|
3
3
|
* Instead, you can edit the associated .graphql file to query for additional fields and this file will be updated when you run `yarn graphql-types`
|
|
4
4
|
*/
|
|
5
|
-
import * as Types from '../../../storefront-api-types';
|
|
5
|
+
import * as Types from '../../../storefront-api-types.js';
|
|
6
6
|
export declare type CartLineRemoveMutationVariables = Types.Exact<{
|
|
7
7
|
cartId: Types.Scalars['ID'];
|
|
8
8
|
lines: Array<Types.Scalars['ID']> | Types.Scalars['ID'];
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* THIS FILE IS AUTO-GENERATED, DO NOT EDIT.
|
|
3
3
|
* Instead, you can edit the associated .graphql file to query for additional fields and this file will be updated when you run `yarn graphql-types`
|
|
4
4
|
*/
|
|
5
|
-
import * as Types from '../../../storefront-api-types';
|
|
5
|
+
import * as Types from '../../../storefront-api-types.js';
|
|
6
6
|
export declare type CartLineUpdateMutationVariables = Types.Exact<{
|
|
7
7
|
cartId: Types.Scalars['ID'];
|
|
8
8
|
lines: Array<Types.CartLineUpdateInput> | Types.CartLineUpdateInput;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* THIS FILE IS AUTO-GENERATED, DO NOT EDIT.
|
|
3
3
|
* Instead, you can edit the associated .graphql file to query for additional fields and this file will be updated when you run `yarn graphql-types`
|
|
4
4
|
*/
|
|
5
|
-
import * as Types from '../../../storefront-api-types';
|
|
5
|
+
import * as Types from '../../../storefront-api-types.js';
|
|
6
6
|
export declare type CartNoteUpdateMutationVariables = Types.Exact<{
|
|
7
7
|
cartId: Types.Scalars['ID'];
|
|
8
8
|
note?: Types.InputMaybe<Types.Scalars['String']>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* THIS FILE IS AUTO-GENERATED, DO NOT EDIT.
|
|
3
3
|
* Instead, you can edit the associated .graphql file to query for additional fields and this file will be updated when you run `yarn graphql-types`
|
|
4
4
|
*/
|
|
5
|
-
import * as Types from '../../../storefront-api-types';
|
|
5
|
+
import * as Types from '../../../storefront-api-types.js';
|
|
6
6
|
export declare type CartQueryQueryVariables = Types.Exact<{
|
|
7
7
|
id: Types.Scalars['ID'];
|
|
8
8
|
numCartLines?: Types.InputMaybe<Types.Scalars['Int']>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CartInput } from '../../storefront-api-types';
|
|
2
|
-
import { Cart } from './types';
|
|
1
|
+
import { CartInput } from '../../storefront-api-types.js';
|
|
2
|
+
import { Cart } from './types.js';
|
|
3
3
|
export declare function useCartFetch(): <T, K>({ query, variables, }: {
|
|
4
4
|
query: string;
|
|
5
5
|
variables: T;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import { useShop } from '../../foundation';
|
|
3
|
-
import { flattenConnection } from '../../utilities';
|
|
4
|
-
import { CartCreate, defaultCartFragment } from './cart-queries';
|
|
5
|
-
import { SHOPIFY_STOREFRONT_ID_HEADER, STOREFRONT_API_PUBLIC_TOKEN_HEADER, SHOPIFY_STOREFRONT_Y_HEADER, SHOPIFY_STOREFRONT_S_HEADER, SHOPIFY_Y, SHOPIFY_S, } from '../../constants';
|
|
2
|
+
import { useShop } from '../../foundation/index.js';
|
|
3
|
+
import { flattenConnection } from '../../utilities/index.js';
|
|
4
|
+
import { CartCreate, defaultCartFragment } from './cart-queries.js';
|
|
5
|
+
import { SHOPIFY_STOREFRONT_ID_HEADER, STOREFRONT_API_PUBLIC_TOKEN_HEADER, SHOPIFY_STOREFRONT_Y_HEADER, SHOPIFY_STOREFRONT_S_HEADER, SHOPIFY_Y, SHOPIFY_S, } from '../../constants.js';
|
|
6
6
|
import { parse } from 'worktop/cookie';
|
|
7
7
|
export function useCartFetch() {
|
|
8
8
|
const { storeDomain, storefrontApiVersion, storefrontToken, storefrontId } = useShop();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { CartProvider } from './CartProvider.client';
|
|
2
|
-
export { useCartFetch, useInstantCheckout } from './hooks.client';
|
|
3
|
-
export { useCart } from '../../hooks/useCart';
|
|
4
|
-
export type { State, Status, Cart, CartWithActions, CartAction } from './types';
|
|
1
|
+
export { CartProvider } from './CartProvider.client.js';
|
|
2
|
+
export { useCartFetch, useInstantCheckout } from './hooks.client.js';
|
|
3
|
+
export { useCart } from '../../hooks/useCart/index.js';
|
|
4
|
+
export type { State, Status, Cart, CartWithActions, CartAction, } from './types.js';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { CartProvider } from './CartProvider.client';
|
|
2
|
-
export { useCartFetch, useInstantCheckout } from './hooks.client';
|
|
3
|
-
export { useCart } from '../../hooks/useCart';
|
|
1
|
+
export { CartProvider } from './CartProvider.client.js';
|
|
2
|
+
export { useCartFetch, useInstantCheckout } from './hooks.client.js';
|
|
3
|
+
export { useCart } from '../../hooks/useCart/index.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CartInput, CartLineInput, CartLineUpdateInput, MutationCartNoteUpdateArgs, CartBuyerIdentityInput, MutationCartAttributesUpdateArgs } from '../../storefront-api-types';
|
|
2
|
-
import { CartFragmentFragment } from './graphql/CartFragment';
|
|
1
|
+
import { CartInput, CartLineInput, CartLineUpdateInput, MutationCartNoteUpdateArgs, CartBuyerIdentityInput, MutationCartAttributesUpdateArgs } from '../../storefront-api-types.js';
|
|
2
|
+
import { CartFragmentFragment } from './graphql/CartFragment.js';
|
|
3
3
|
export declare type Status = State['status'];
|
|
4
4
|
export interface Cart {
|
|
5
5
|
/** The cart's ID if it has been created through the Storefront API. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ShopPayButton } from '../ShopPayButton';
|
|
2
|
+
import { ShopPayButton } from '../ShopPayButton/index.js';
|
|
3
3
|
/**
|
|
4
4
|
* The `CartShopPayButton` component renders a `ShopPayButton` for the items in the cart.
|
|
5
5
|
* It must be a descendent of a `CartProvider` component.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
|
-
import { useCart } from '../CartProvider';
|
|
3
|
-
import { ShopPayButton } from '../ShopPayButton';
|
|
2
|
+
import { useCart } from '../CartProvider/index.js';
|
|
3
|
+
import { ShopPayButton } from '../ShopPayButton/index.js';
|
|
4
4
|
/**
|
|
5
5
|
* The `CartShopPayButton` component renders a `ShopPayButton` for the items in the cart.
|
|
6
6
|
* It must be a descendent of a `CartProvider` component.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { CartShopPayButton } from './CartShopPayButton.client';
|
|
1
|
+
export { CartShopPayButton } from './CartShopPayButton.client.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { CartShopPayButton } from './CartShopPayButton.client';
|
|
1
|
+
export { CartShopPayButton } from './CartShopPayButton.client.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { YouTube, Vimeo } from '../../utilities';
|
|
2
|
-
import type { ExternalVideo as ExternalVideoType } from '../../storefront-api-types';
|
|
1
|
+
import { YouTube, Vimeo } from '../../utilities/index.js';
|
|
2
|
+
import type { ExternalVideo as ExternalVideoType } from '../../storefront-api-types.js';
|
|
3
3
|
import type { PartialDeep } from 'type-fest';
|
|
4
4
|
interface ExternalVideoProps {
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { useEmbeddedVideoUrl } from '../../utilities';
|
|
2
|
+
import { useEmbeddedVideoUrl } from '../../utilities/index.js';
|
|
3
3
|
/**
|
|
4
4
|
* The `ExternalVideo` component renders an embedded video for the Storefront
|
|
5
5
|
* API's [ExternalVideo object](https://shopify.dev/api/storefront/reference/products/externalvideo).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ExternalVideo } from './ExternalVideo';
|
|
1
|
+
export { ExternalVideo } from './ExternalVideo.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ExternalVideo } from './ExternalVideo';
|
|
1
|
+
export { ExternalVideo } from './ExternalVideo.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type { Image as ImageType } from '../../storefront-api-types';
|
|
2
|
+
import type { Image as ImageType } from '../../storefront-api-types.js';
|
|
3
3
|
import type { PartialDeep, Simplify, SetRequired } from 'type-fest';
|
|
4
4
|
declare type HtmlImageProps = React.ImgHTMLAttributes<HTMLImageElement>;
|
|
5
5
|
declare type ImageProps<GenericLoaderOpts> = ShopifyImageProps | ExternalImageProps<GenericLoaderOpts>;
|
|
@@ -79,7 +79,7 @@ declare type LoaderProps<GenericLoaderOpts> = {
|
|
|
79
79
|
*/
|
|
80
80
|
loaderOptions?: GenericLoaderOpts;
|
|
81
81
|
};
|
|
82
|
-
declare type ExternalImageProps<GenericLoaderOpts> = SetRequired<HtmlImageProps, 'src' | 'width' | 'height' | 'alt'> & {
|
|
82
|
+
export declare type ExternalImageProps<GenericLoaderOpts> = SetRequired<HtmlImageProps, 'src' | 'width' | 'height' | 'alt'> & {
|
|
83
83
|
/** A custom function that generates the image URL. Parameters passed in
|
|
84
84
|
* are either `ShopifyLoaderParams` if using the `data` prop, or the
|
|
85
85
|
* `LoaderOptions` object that you pass to `loaderOptions`.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { getShopifyImageDimensions, shopifyImageLoader, addImageSizeParametersToUrl, IMG_SRC_SET_SIZES, } from '../../utilities';
|
|
2
|
+
import { getShopifyImageDimensions, shopifyImageLoader, addImageSizeParametersToUrl, IMG_SRC_SET_SIZES, } from '../../utilities/index.js';
|
|
3
3
|
/**
|
|
4
4
|
* The `Image` component renders an image for the Storefront API's
|
|
5
5
|
* [Image object](https://shopify.dev/api/storefront/reference/common-objects/image) by using the `data` prop, or a custom location by using the `src` prop. You can [customize this component](https://shopify.dev/api/hydrogen/components#customizing-hydrogen-components) using passthrough props.
|
|
@@ -27,7 +27,7 @@ export function Image(props) {
|
|
|
27
27
|
return React.createElement(ExternalImage, { ...props });
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
function ShopifyImage({ data, width, height, loading, loader = shopifyImageLoader, loaderOptions, widths, ...rest }) {
|
|
30
|
+
function ShopifyImage({ data, width, height, loading, loader = shopifyImageLoader, loaderOptions, widths, decoding = 'async', ...rest }) {
|
|
31
31
|
if (!data.url) {
|
|
32
32
|
throw new Error(`<Image/>: the 'data' prop requires the 'url' property`);
|
|
33
33
|
}
|
|
@@ -72,10 +72,10 @@ function ShopifyImage({ data, width, height, loading, loader = shopifyImageLoade
|
|
|
72
72
|
loader,
|
|
73
73
|
});
|
|
74
74
|
/* eslint-disable hydrogen/prefer-image-component */
|
|
75
|
-
return (React.createElement("img", { id: data.id ?? '', alt: data.altText ?? rest.alt ?? '', loading: loading ?? 'lazy', ...rest, src: finalSrc, width: imgElementWidth ?? undefined, height: imgElementHeight ?? undefined, srcSet: finalSrcset }));
|
|
75
|
+
return (React.createElement("img", { id: data.id ?? '', alt: data.altText ?? rest.alt ?? '', loading: loading ?? 'lazy', ...rest, src: finalSrc, width: imgElementWidth ?? undefined, height: imgElementHeight ?? undefined, srcSet: finalSrcset, decoding: decoding }));
|
|
76
76
|
/* eslint-enable hydrogen/prefer-image-component */
|
|
77
77
|
}
|
|
78
|
-
function ExternalImage({ src, width, height, alt, loader, loaderOptions, widths, loading, ...rest }) {
|
|
78
|
+
function ExternalImage({ src, width, height, alt, loader, loaderOptions, widths, loading, decoding = 'async', ...rest }) {
|
|
79
79
|
if (!width || !height) {
|
|
80
80
|
throw new Error(`<Image/>: when 'src' is provided, 'width' and 'height' are required and need to be valid values (i.e. greater than zero). Provided values: 'src': ${src}, 'width': ${width}, 'height': ${height}`);
|
|
81
81
|
}
|
|
@@ -112,7 +112,7 @@ function ExternalImage({ src, width, height, alt, loader, loaderOptions, widths,
|
|
|
112
112
|
// @ts-expect-error TS doesn't understand that it could exist
|
|
113
113
|
width: loaderOptions?.width ?? width,
|
|
114
114
|
// @ts-expect-error TS doesn't understand that it could exist
|
|
115
|
-
height: loaderOptions?.height ?? height, alt: alt ?? '', loading: loading ?? 'lazy', srcSet: finalSrcset }));
|
|
115
|
+
height: loaderOptions?.height ?? height, alt: alt ?? '', loading: loading ?? 'lazy', srcSet: finalSrcset, decoding: decoding }));
|
|
116
116
|
/* eslint-enable hydrogen/prefer-image-component */
|
|
117
117
|
}
|
|
118
118
|
function internalImageSrcSet({ src, width, crop, scale, widths, loader, height, }) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Image } from './Image';
|
|
2
|
-
export type { ShopifyLoaderParams, ShopifyLoaderOptions, ShopifyImageProps, } from './Image';
|
|
1
|
+
export { Image } from './Image.js';
|
|
2
|
+
export type { ShopifyLoaderParams, ShopifyLoaderOptions, ShopifyImageProps, ExternalImageProps, } from './Image.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Image } from './Image';
|
|
1
|
+
export { Image } from './Image.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useState } from 'react';
|
|
2
|
-
import { useLocation } from '../../foundation/Router/BrowserRouter.client';
|
|
2
|
+
import { useLocation } from '../../foundation/Router/BrowserRouter.client.js';
|
|
3
3
|
import { createPath } from 'history';
|
|
4
|
-
import { buildPath, useNavigate } from '../../foundation/useNavigate/useNavigate';
|
|
5
|
-
import { RSC_PATHNAME } from '../../constants';
|
|
6
|
-
import { useInternalServerProps } from '../../foundation/useServerProps/use-server-props';
|
|
7
|
-
import { useBasePath } from '../../foundation/useRouteParams/RouteParamsProvider.client';
|
|
4
|
+
import { buildPath, useNavigate, } from '../../foundation/useNavigate/useNavigate.js';
|
|
5
|
+
import { RSC_PATHNAME } from '../../constants.js';
|
|
6
|
+
import { useInternalServerProps } from '../../foundation/useServerProps/use-server-props.js';
|
|
7
|
+
import { useBasePath } from '../../foundation/useRouteParams/RouteParamsProvider.client.js';
|
|
8
8
|
/**
|
|
9
9
|
* The `Link` component is used to navigate between routes. Because it renders an underlying `<a>` element, all
|
|
10
10
|
* properties available to the `<a>` element are also available to the `Link` component.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Link } from './Link.client';
|
|
1
|
+
export { Link } from './Link.client.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Link } from './Link.client';
|
|
1
|
+
export { Link } from './Link.client.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import type { LocalizationContextValue } from '../../foundation/ShopifyProvider/types';
|
|
2
|
+
import type { LocalizationContextValue } from '../../foundation/ShopifyProvider/types.js';
|
|
3
3
|
export default function LocalizationClientProvider({ localization, children, }: {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
localization: LocalizationContextValue;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { LocalizationContext } from '../../foundation/ShopifyProvider/ShopifyProvider.client';
|
|
2
|
+
import { LocalizationContext } from '../../foundation/ShopifyProvider/ShopifyProvider.client.js';
|
|
3
3
|
export default function LocalizationClientProvider({ localization, children, }) {
|
|
4
4
|
return (React.createElement(LocalizationContext.Provider, { value: localization }, children));
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { CountryCode, LanguageCode } from '../../storefront-api-types';
|
|
2
|
+
import { CountryCode, LanguageCode } from '../../storefront-api-types.js';
|
|
3
3
|
export interface LocalizationProviderProps {
|
|
4
4
|
/** A `ReactNode` element. */
|
|
5
5
|
children: ReactNode;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import LocalizationClientProvider from './LocalizationClientProvider.client';
|
|
3
|
-
import { useShop } from '../../foundation/useShop';
|
|
4
|
-
import { useServerRequest } from '../../foundation/ServerRequestProvider';
|
|
5
|
-
import { log } from '../../utilities/log';
|
|
6
|
-
import { getLocalizationContextValue } from '../../foundation/ShopifyProvider/ShopifyProvider.server';
|
|
2
|
+
import LocalizationClientProvider from './LocalizationClientProvider.client.js';
|
|
3
|
+
import { useShop } from '../../foundation/useShop/index.js';
|
|
4
|
+
import { useServerRequest } from '../../foundation/ServerRequestProvider/index.js';
|
|
5
|
+
import { log } from '../../utilities/log/index.js';
|
|
6
|
+
import { getLocalizationContextValue } from '../../foundation/ShopifyProvider/ShopifyProvider.server.js';
|
|
7
7
|
/**
|
|
8
8
|
* The `LocalizationProvider` component automatically queries the Storefront API's
|
|
9
9
|
* [`localization`](https://shopify.dev/api/storefront/reference/common-objects/queryroot) field
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { LocalizationProvider } from './LocalizationProvider.server';
|
|
1
|
+
export { LocalizationProvider } from './LocalizationProvider.server.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { LocalizationProvider } from './LocalizationProvider.server';
|
|
1
|
+
export { LocalizationProvider } from './LocalizationProvider.server.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type ShopifyImageProps } from '../Image';
|
|
3
|
-
import { Video } from '../Video';
|
|
4
|
-
import { ExternalVideo } from '../ExternalVideo';
|
|
5
|
-
import type { MediaEdge as MediaEdgeType } from '../../storefront-api-types';
|
|
2
|
+
import { type ShopifyImageProps } from '../Image/index.js';
|
|
3
|
+
import { Video } from '../Video/index.js';
|
|
4
|
+
import { ExternalVideo } from '../ExternalVideo/index.js';
|
|
5
|
+
import type { MediaEdge as MediaEdgeType } from '../../storefront-api-types.js';
|
|
6
6
|
import type { PartialDeep } from 'type-fest';
|
|
7
7
|
export interface MediaFileProps {
|
|
8
8
|
/** An object with fields that correspond to the Storefront API's [Media object](https://shopify.dev/api/storefront/reference/products/media). */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Image } from '../Image';
|
|
3
|
-
import { Video } from '../Video';
|
|
4
|
-
import { ExternalVideo } from '../ExternalVideo';
|
|
5
|
-
import { ModelViewer } from '../ModelViewer';
|
|
2
|
+
import { Image } from '../Image/index.js';
|
|
3
|
+
import { Video } from '../Video/index.js';
|
|
4
|
+
import { ExternalVideo } from '../ExternalVideo/index.js';
|
|
5
|
+
import { ModelViewer } from '../ModelViewer/index.js';
|
|
6
6
|
/**
|
|
7
7
|
* The `MediaFile` component renders the media for the Storefront API's
|
|
8
8
|
* [Media object](https://shopify.dev/api/storefront/reference/products/media). It renders an `Image`, a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { MediaFile, MediaFileProps } from './MediaFile';
|
|
1
|
+
export { MediaFile, MediaFileProps } from './MediaFile.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { MediaFile } from './MediaFile';
|
|
1
|
+
export { MediaFile } from './MediaFile.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ElementType } from 'react';
|
|
2
|
-
import type { Props } from '../types';
|
|
3
|
-
import type { Metafield } from '../../storefront-api-types';
|
|
2
|
+
import type { Props } from '../types.js';
|
|
3
|
+
import type { Metafield } from '../../storefront-api-types.js';
|
|
4
4
|
import type { PartialDeep } from 'type-fest';
|
|
5
5
|
export interface MetafieldProps<TTag> {
|
|
6
6
|
/** An object with fields that correspond to the Storefront API's [Metafield object](https://shopify.dev/api/storefront/reference/common-objects/metafield). */
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
|
-
import { useLocalization } from '../../hooks/useLocalization/useLocalization';
|
|
3
|
-
import { getMeasurementAsString } from '../../utilities/measurement';
|
|
4
|
-
import { Image } from '../Image';
|
|
5
|
-
import { Video } from '../Video';
|
|
6
|
-
import { flattenConnection } from '../../utilities/flattenConnection/index';
|
|
7
|
-
import { parseMetafield } from '../../utilities/parseMetafield/index';
|
|
2
|
+
import { useLocalization } from '../../hooks/useLocalization/useLocalization.js';
|
|
3
|
+
import { getMeasurementAsString } from '../../utilities/measurement.js';
|
|
4
|
+
import { Image } from '../Image/index.js';
|
|
5
|
+
import { Video } from '../Video/index.js';
|
|
6
|
+
import { flattenConnection } from '../../utilities/flattenConnection/index.js';
|
|
7
|
+
import { parseMetafield } from '../../utilities/parseMetafield/index.js';
|
|
8
8
|
/**
|
|
9
9
|
* The `Metafield` component renders the value of a Storefront
|
|
10
10
|
* API's [Metafield object](https://shopify.dev/api/storefront/reference/common-objects/metafield).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { StarRating } from './StarRating';
|
|
1
|
+
export { StarRating } from './StarRating.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { StarRating } from './StarRating';
|
|
1
|
+
export { StarRating } from './StarRating.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { StarRating } from './StarRating';
|
|
1
|
+
export { StarRating } from './StarRating/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { StarRating } from './StarRating';
|
|
1
|
+
export { StarRating } from './StarRating/index.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Metafield } from './Metafield.client';
|
|
2
|
-
export type { MetafieldType } from './types';
|
|
1
|
+
export { Metafield } from './Metafield.client.js';
|
|
2
|
+
export type { MetafieldType } from './types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Metafield } from './Metafield.client';
|
|
1
|
+
export { Metafield } from './Metafield.client.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode, ElementType } from 'react';
|
|
2
|
-
import { Props } from '../types';
|
|
3
|
-
import type { Model3d } from '../../storefront-api-types';
|
|
2
|
+
import { Props } from '../types.js';
|
|
3
|
+
import type { Model3d } from '../../storefront-api-types.js';
|
|
4
4
|
import type { PartialDeep } from 'type-fest';
|
|
5
5
|
interface ModelViewerProps {
|
|
6
6
|
/** Any ReactNode elements. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState, useEffect, useCallback, } from 'react';
|
|
2
|
-
import { useLoadScript } from '../../hooks/useLoadScript/useLoadScript.client';
|
|
2
|
+
import { useLoadScript } from '../../hooks/useLoadScript/useLoadScript.client.js';
|
|
3
3
|
/**
|
|
4
4
|
* The `ModelViewer` component renders a 3D model (with the `model-viewer` tag) for
|
|
5
5
|
* the Storefront API's [Model3d object](https://shopify.dev/api/storefront/reference/products/model3d).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ModelViewer } from './ModelViewer.client';
|
|
1
|
+
export { ModelViewer } from './ModelViewer.client.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ModelViewer } from './ModelViewer.client';
|
|
1
|
+
export { ModelViewer } from './ModelViewer.client.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { type ReactNode } from 'react';
|
|
2
|
-
import type { MoneyV2, UnitPriceMeasurement } from '../../storefront-api-types';
|
|
2
|
+
import type { MoneyV2, UnitPriceMeasurement } from '../../storefront-api-types.js';
|
|
3
3
|
import type { PartialDeep } from 'type-fest';
|
|
4
4
|
interface CustomProps<ComponentGeneric extends React.ElementType> {
|
|
5
5
|
/** An HTML tag or React Component to be rendered as the base element wrapper. The default is `div`. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { useMoney } from '../../hooks';
|
|
2
|
+
import { useMoney } from '../../hooks/index.js';
|
|
3
3
|
/**
|
|
4
4
|
* The `Money` component renders a string of the Storefront API's
|
|
5
5
|
* [MoneyV2 object](https://shopify.dev/api/storefront/reference/common-objects/moneyv2) according to the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Money } from './Money.client';
|
|
1
|
+
export { Money } from './Money.client.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Money } from './Money.client';
|
|
1
|
+
export { Money } from './Money.client.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { Product, ProductVariant as ProductVariantType } from '../../storefront-api-types';
|
|
2
|
+
import type { Product, ProductVariant as ProductVariantType } from '../../storefront-api-types.js';
|
|
3
3
|
import type { PartialDeep } from 'type-fest';
|
|
4
4
|
declare type InitialVariantId = ProductVariantType['id'] | null;
|
|
5
5
|
interface ProductOptionsProviderProps {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useMemo, useState, useEffect, useCallback } from 'react';
|
|
2
|
-
import { ProductOptionsContext } from './context';
|
|
3
|
-
import { getSelectedVariant, getOptions, } from '../../hooks/useProductOptions/helpers';
|
|
4
|
-
import { flattenConnection } from '../../utilities/flattenConnection';
|
|
2
|
+
import { ProductOptionsContext } from './context.js';
|
|
3
|
+
import { getSelectedVariant, getOptions, } from '../../hooks/useProductOptions/helpers.js';
|
|
4
|
+
import { flattenConnection } from '../../utilities/flattenConnection/index.js';
|
|
5
5
|
export function ProductOptionsProvider({ children, data: product, initialVariantId: explicitVariantId, }) {
|
|
6
6
|
// The flattened variants
|
|
7
7
|
const variants = useMemo(() => flattenConnection(product.variants ?? {}), [product.variants]);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { ProductOptionsHookValue } from '../../hooks';
|
|
1
|
+
import type { ProductOptionsHookValue } from '../../hooks/index.js';
|
|
2
2
|
export declare const ProductOptionsContext: import("react").Context<ProductOptionsHookValue | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ProductOptionsProvider } from './ProductOptionsProvider.client';
|
|
1
|
+
export { ProductOptionsProvider } from './ProductOptionsProvider.client.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ProductOptionsProvider } from './ProductOptionsProvider.client';
|
|
1
|
+
export { ProductOptionsProvider } from './ProductOptionsProvider.client.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { Product } from '../../storefront-api-types';
|
|
3
|
-
import { Money } from '../Money';
|
|
2
|
+
import type { Product } from '../../storefront-api-types.js';
|
|
3
|
+
import { Money } from '../Money/index.js';
|
|
4
4
|
import type { PartialDeep } from 'type-fest';
|
|
5
5
|
export interface ProductPriceProps {
|
|
6
6
|
data: PartialDeep<Product>;
|