@shopify/hydrogen 0.17.3 → 0.20.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/CHANGELOG.md +259 -0
- package/config.d.ts +1 -0
- package/config.js +1 -0
- package/dist/esnext/components/AddToCartButton/AddToCartButton.client.js +2 -2
- package/dist/esnext/components/CartLineImage/CartLineImage.client.d.ts +4 -7
- package/dist/esnext/components/CartLineImage/CartLineImage.client.js +1 -2
- package/dist/esnext/components/CartProvider/CartProvider.client.d.ts +3 -1
- package/dist/esnext/components/CartProvider/CartProvider.client.js +37 -34
- package/dist/esnext/components/CartProvider/cart-queries.d.ts +10 -9
- package/dist/esnext/components/CartProvider/cart-queries.js +58 -743
- package/dist/esnext/components/CartProvider/{hooks.d.ts → hooks.client.d.ts} +0 -0
- package/dist/esnext/components/CartProvider/{hooks.js → hooks.client.js} +4 -2
- package/dist/esnext/components/CartProvider/index.d.ts +1 -1
- package/dist/esnext/components/CartProvider/index.js +1 -1
- package/dist/esnext/components/CartProvider/types.d.ts +2 -0
- package/dist/esnext/components/{DevTools.d.ts → DevTools.client.d.ts} +0 -0
- package/dist/esnext/components/{DevTools.js → DevTools.client.js} +3 -2
- package/dist/esnext/components/Image/Image.d.ts +78 -34
- package/dist/esnext/components/Image/Image.js +56 -51
- package/dist/esnext/components/Image/index.d.ts +1 -0
- package/dist/esnext/components/Link/Link.client.js +11 -2
- package/dist/esnext/components/LocalizationProvider/LocalizationClientProvider.client.js +2 -15
- package/dist/esnext/components/LocalizationProvider/LocalizationContext.client.d.ts +0 -1
- package/dist/esnext/components/LocalizationProvider/LocalizationProvider.server.d.ts +2 -6
- package/dist/esnext/components/LocalizationProvider/LocalizationProvider.server.js +11 -5
- package/dist/esnext/components/MediaFile/MediaFile.d.ts +2 -2
- package/dist/esnext/components/MediaFile/MediaFile.js +2 -2
- package/dist/esnext/components/Metafield/Metafield.client.js +4 -5
- package/dist/esnext/components/ModelViewer/ModelViewer.client.js +1 -1
- package/dist/esnext/components/Money/Money.client.d.ts +5 -1
- package/dist/esnext/components/Money/Money.client.js +16 -3
- package/dist/esnext/components/ProductMetafield/ProductMetafield.client.js +1 -1
- package/dist/esnext/components/ProductProvider/ProductOptionsProvider.client.js +1 -1
- package/dist/esnext/components/ProductProvider/ProductProvider.client.d.ts +7 -3
- package/dist/esnext/components/ShopPayButton/ShopPayButton.client.js +6 -2
- package/dist/esnext/components/Video/Video.d.ts +3 -3
- package/dist/esnext/components/Video/Video.js +10 -5
- package/dist/esnext/config.d.ts +3 -0
- package/dist/esnext/config.js +1 -0
- package/dist/esnext/constants.js +1 -1
- package/dist/esnext/entry-client.js +3 -1
- package/dist/esnext/entry-server.d.ts +14 -2
- package/dist/esnext/entry-server.js +56 -82
- package/dist/esnext/foundation/Cookie/Cookie.js +2 -1
- package/dist/esnext/foundation/FileRoutes/FileRoutes.server.d.ts +4 -4
- package/dist/esnext/foundation/FileRoutes/FileRoutes.server.js +17 -4
- package/dist/esnext/foundation/FileSessionStorage/FileSessionStorage.js +2 -1
- package/dist/esnext/foundation/Redirect/Redirect.client.js +1 -0
- package/dist/esnext/foundation/Router/BrowserRouter.client.js +10 -1
- package/dist/esnext/foundation/ServerPropsProvider/ServerPropsProvider.js +5 -3
- package/dist/esnext/foundation/ServerRequestProvider/ServerRequestProvider.d.ts +2 -2
- package/dist/esnext/foundation/ServerRequestProvider/ServerRequestProvider.js +7 -2
- package/dist/esnext/foundation/ServerStateProvider/ServerStateProvider.js +8 -1
- package/dist/esnext/foundation/ShopifyProvider/ShopifyProvider.server.d.ts +8 -1
- package/dist/esnext/foundation/ShopifyProvider/ShopifyProvider.server.js +31 -5
- package/dist/esnext/foundation/ShopifyProvider/types.d.ts +3 -4
- package/dist/esnext/foundation/fetchSync/client/fetchSync.js +2 -1
- package/dist/esnext/foundation/fetchSync/server/fetchSync.d.ts +1 -1
- package/dist/esnext/foundation/fetchSync/server/fetchSync.js +5 -3
- package/dist/esnext/foundation/ssr-interop.js +1 -1
- package/dist/esnext/foundation/useQuery/hooks.d.ts +1 -1
- package/dist/esnext/foundation/useQuery/hooks.js +2 -2
- package/dist/esnext/foundation/useSession/useSession.d.ts +1 -1
- package/dist/esnext/foundation/useSession/useSession.js +1 -1
- package/dist/esnext/foundation/useShop/use-shop.d.ts +3 -1
- package/dist/esnext/foundation/useShop/use-shop.js +3 -1
- package/dist/esnext/foundation/useUrl/useUrl.js +7 -4
- package/dist/esnext/framework/Hydration/Html.js +4 -2
- package/dist/esnext/framework/Hydration/ServerComponentRequest.server.d.ts +3 -2
- package/dist/esnext/framework/Hydration/ServerComponentRequest.server.js +16 -7
- package/dist/esnext/framework/Hydration/rsc.d.ts +0 -3
- package/dist/esnext/framework/Hydration/rsc.js +0 -20
- package/dist/esnext/framework/middleware.d.ts +3 -4
- package/dist/esnext/framework/middleware.js +4 -4
- package/dist/esnext/framework/plugin.d.ts +2 -2
- package/dist/esnext/framework/plugin.js +5 -32
- package/dist/esnext/framework/plugins/vite-plugin-css-modules-rsc.d.ts +1 -1
- package/dist/esnext/framework/plugins/vite-plugin-css-modules-rsc.js +68 -3
- package/dist/esnext/framework/plugins/vite-plugin-hydration-auto-import.js +1 -4
- package/dist/esnext/framework/plugins/vite-plugin-hydrogen-config.js +6 -5
- package/dist/esnext/framework/plugins/vite-plugin-hydrogen-middleware.d.ts +3 -3
- package/dist/esnext/framework/plugins/vite-plugin-hydrogen-middleware.js +61 -7
- package/dist/esnext/framework/plugins/vite-plugin-hydrogen-rsc.d.ts +1 -0
- package/dist/esnext/framework/plugins/vite-plugin-hydrogen-rsc.js +35 -0
- package/dist/esnext/framework/plugins/vite-plugin-platform-entry.js +1 -1
- package/dist/esnext/framework/plugins/vite-plugin-ssr-interop.js +6 -3
- package/dist/esnext/hooks/useCountry/useCountry.d.ts +1 -11
- package/dist/esnext/hooks/useCountry/useCountry.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.d.ts → useLoadScript.client.d.ts} +0 -0
- package/dist/esnext/hooks/useLoadScript/{useLoadScript.js → useLoadScript.client.js} +2 -1
- package/dist/esnext/hooks/useMoney/hooks.d.ts +13 -1
- package/dist/esnext/hooks/useMoney/hooks.js +25 -1
- package/dist/esnext/hooks/useProduct/useProduct.js +1 -1
- package/dist/esnext/hooks/useProductOptions/index.d.ts +1 -1
- package/dist/esnext/hooks/useProductOptions/index.js +1 -1
- package/dist/esnext/hooks/useProductOptions/{useProductOptions.d.ts → useProductOptions.client.d.ts} +0 -0
- package/dist/esnext/hooks/useProductOptions/{useProductOptions.js → useProductOptions.client.js} +6 -23
- package/dist/esnext/hooks/useShopQuery/hooks.js +15 -4
- package/dist/esnext/node.d.ts +1 -0
- package/dist/esnext/node.js +1 -0
- package/dist/esnext/storefront-api-types.d.ts +65 -9
- package/dist/esnext/storefront-api-types.js +11 -5
- package/dist/esnext/types.d.ts +11 -4
- package/dist/esnext/utilities/apiRoutes.d.ts +4 -4
- package/dist/esnext/utilities/apiRoutes.js +29 -16
- package/dist/esnext/utilities/bot-ua.js +4 -0
- package/dist/esnext/utilities/empty-hydrogen-config.d.ts +2 -0
- package/dist/esnext/utilities/empty-hydrogen-config.js +2 -0
- package/dist/esnext/utilities/findRoutePrefix.d.ts +1 -0
- package/dist/esnext/utilities/findRoutePrefix.js +17 -0
- package/dist/esnext/utilities/image_size.d.ts +4 -22
- package/dist/esnext/utilities/image_size.js +15 -33
- package/dist/esnext/utilities/index.d.ts +1 -1
- package/dist/esnext/utilities/index.js +1 -1
- package/dist/esnext/utilities/log/utils.js +1 -1
- package/dist/esnext/utilities/parse.d.ts +1 -0
- package/dist/esnext/utilities/parse.js +9 -0
- package/dist/esnext/utilities/parseMetafieldValue/parseMetafieldValue.js +2 -1
- package/dist/esnext/utilities/storefrontApi.js +1 -0
- package/dist/esnext/version.d.ts +1 -1
- package/dist/esnext/version.js +1 -1
- package/dist/node/components/Image/Image.d.ts +84 -0
- package/dist/node/components/Image/Image.js +86 -0
- package/dist/node/components/Image/index.d.ts +2 -0
- package/dist/node/components/Image/index.js +5 -0
- package/dist/node/constants.js +1 -1
- package/dist/node/entry-server.d.ts +14 -2
- package/dist/node/entry-server.js +56 -82
- package/dist/node/foundation/Redirect/Redirect.client.js +1 -0
- package/dist/node/foundation/Router/BrowserRouter.client.js +10 -1
- package/dist/node/foundation/ServerPropsProvider/ServerPropsProvider.js +5 -3
- package/dist/node/foundation/ServerRequestProvider/ServerRequestProvider.d.ts +2 -2
- package/dist/node/foundation/ServerRequestProvider/ServerRequestProvider.js +7 -2
- package/dist/node/foundation/ShopifyProvider/types.d.ts +3 -4
- package/dist/node/foundation/ssr-interop.js +1 -1
- package/dist/node/framework/Hydration/Html.js +4 -2
- package/dist/node/framework/Hydration/ServerComponentRequest.server.d.ts +3 -2
- package/dist/node/framework/Hydration/ServerComponentRequest.server.js +16 -7
- package/dist/node/framework/Hydration/rsc.d.ts +0 -3
- package/dist/node/framework/Hydration/rsc.js +0 -20
- package/dist/node/framework/middleware.d.ts +3 -4
- package/dist/node/framework/middleware.js +4 -4
- package/dist/node/framework/plugin.d.ts +2 -2
- package/dist/node/framework/plugin.js +5 -55
- package/dist/node/framework/plugins/vite-plugin-css-modules-rsc.d.ts +1 -1
- package/dist/node/framework/plugins/vite-plugin-css-modules-rsc.js +71 -3
- package/dist/node/framework/plugins/vite-plugin-hydration-auto-import.js +1 -4
- package/dist/node/framework/plugins/vite-plugin-hydrogen-config.js +6 -5
- package/dist/node/framework/plugins/vite-plugin-hydrogen-middleware.d.ts +3 -3
- package/dist/node/framework/plugins/vite-plugin-hydrogen-middleware.js +60 -6
- package/dist/node/framework/plugins/vite-plugin-hydrogen-rsc.d.ts +1 -0
- package/dist/node/framework/plugins/vite-plugin-hydrogen-rsc.js +41 -0
- package/dist/node/framework/plugins/vite-plugin-platform-entry.js +1 -1
- package/dist/node/framework/plugins/vite-plugin-ssr-interop.js +6 -3
- package/dist/node/storefront-api-types.d.ts +65 -9
- package/dist/node/storefront-api-types.js +11 -5
- package/dist/node/types.d.ts +11 -4
- package/dist/node/utilities/apiRoutes.d.ts +4 -4
- package/dist/node/utilities/apiRoutes.js +29 -16
- package/dist/node/utilities/bot-ua.js +4 -0
- package/dist/node/utilities/findRoutePrefix.d.ts +1 -0
- package/dist/node/utilities/findRoutePrefix.js +21 -0
- package/dist/node/utilities/image_size.d.ts +4 -22
- package/dist/node/utilities/image_size.js +16 -58
- package/dist/node/utilities/index.d.ts +1 -1
- package/dist/node/utilities/index.js +1 -2
- package/dist/node/utilities/log/utils.js +1 -1
- package/dist/node/utilities/parse.d.ts +1 -0
- package/dist/node/utilities/parse.js +13 -0
- package/dist/node/utilities/parseMetafieldValue/parseMetafieldValue.js +2 -1
- package/dist/node/utilities/storefrontApi.js +1 -0
- package/dist/node/version.d.ts +1 -1
- package/dist/node/version.js +1 -1
- package/entry-server.d.ts +1 -1
- package/package.json +8 -6
- package/vendor/react-server-dom-vite/cjs/react-server-dom-vite-plugin.js +173 -29
- package/vendor/react-server-dom-vite/esm/react-server-dom-vite-client-proxy.js +2 -0
- package/vendor/react-server-dom-vite/esm/react-server-dom-vite-plugin.js +173 -29
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
export declare const CartLineAdd
|
|
2
|
-
export declare const CartCreate
|
|
3
|
-
export declare const CartLineRemove
|
|
4
|
-
export declare const CartLineUpdate
|
|
5
|
-
export declare const CartNoteUpdate
|
|
6
|
-
export declare const CartBuyerIdentityUpdate
|
|
7
|
-
export declare const CartAttributesUpdate
|
|
8
|
-
export declare const CartDiscountCodesUpdate
|
|
9
|
-
export declare const CartQuery
|
|
1
|
+
export declare const CartLineAdd: (cartFragment: string) => string;
|
|
2
|
+
export declare const CartCreate: (cartFragment: string) => string;
|
|
3
|
+
export declare const CartLineRemove: (cartFragment: string) => string;
|
|
4
|
+
export declare const CartLineUpdate: (cartFragment: string) => string;
|
|
5
|
+
export declare const CartNoteUpdate: (cartFragment: string) => string;
|
|
6
|
+
export declare const CartBuyerIdentityUpdate: (cartFragment: string) => string;
|
|
7
|
+
export declare const CartAttributesUpdate: (cartFragment: string) => string;
|
|
8
|
+
export declare const CartDiscountCodesUpdate: (cartFragment: string) => string;
|
|
9
|
+
export declare const CartQuery: (cartFragment: string) => string;
|
|
10
|
+
export declare const defaultCartFragment = "\nfragment CartFragment on Cart {\n id\n checkoutUrl\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 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 estimatedCost {\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";
|