@shopify/hydrogen 0.19.0 → 0.22.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.
Files changed (191) hide show
  1. package/CHANGELOG.md +203 -0
  2. package/config.d.ts +1 -0
  3. package/dist/esnext/client.d.ts +1 -0
  4. package/dist/esnext/client.js +1 -0
  5. package/dist/esnext/components/CartEstimatedCost/CartEstimatedCost.client.d.ts +1 -1
  6. package/dist/esnext/components/CartLineImage/CartLineImage.client.d.ts +4 -7
  7. package/dist/esnext/components/CartLineImage/CartLineImage.client.js +1 -2
  8. package/dist/esnext/components/CartLinePrice/CartLinePrice.client.d.ts +1 -1
  9. package/dist/esnext/components/CartProvider/CartProvider.client.d.ts +9 -4
  10. package/dist/esnext/components/CartProvider/CartProvider.client.js +42 -30
  11. package/dist/esnext/components/CartProvider/cart-queries.d.ts +10 -9
  12. package/dist/esnext/components/CartProvider/cart-queries.js +58 -743
  13. package/dist/esnext/components/CartProvider/hooks.client.js +4 -2
  14. package/dist/esnext/components/CartProvider/types.d.ts +2 -0
  15. package/dist/esnext/components/Image/Image.d.ts +77 -39
  16. package/dist/esnext/components/Image/Image.js +57 -54
  17. package/dist/esnext/components/Image/index.d.ts +1 -0
  18. package/dist/esnext/components/MediaFile/MediaFile.d.ts +2 -2
  19. package/dist/esnext/components/MediaFile/MediaFile.js +5 -4
  20. package/dist/esnext/components/Money/Money.client.d.ts +11 -5
  21. package/dist/esnext/components/Money/Money.client.js +16 -3
  22. package/dist/esnext/components/ProductPrice/ProductPrice.client.d.ts +1 -2
  23. package/dist/esnext/components/ProductPrice/ProductPrice.client.js +1 -2
  24. package/dist/esnext/components/Seo/NoIndexSeo.client.d.ts +3 -0
  25. package/dist/esnext/components/Seo/NoIndexSeo.client.js +10 -0
  26. package/dist/esnext/components/Seo/Seo.client.d.ts +4 -0
  27. package/dist/esnext/components/Seo/Seo.client.js +3 -0
  28. package/dist/esnext/components/Video/Video.d.ts +3 -3
  29. package/dist/esnext/components/Video/Video.js +7 -4
  30. package/dist/esnext/components/index.d.ts +0 -3
  31. package/dist/esnext/components/index.js +0 -3
  32. package/dist/esnext/config.d.ts +3 -3
  33. package/dist/esnext/entry-client.js +0 -3
  34. package/dist/esnext/entry-server.d.ts +14 -2
  35. package/dist/esnext/entry-server.js +97 -73
  36. package/dist/esnext/foundation/Analytics/Analytics.client.js +1 -1
  37. package/dist/esnext/foundation/Analytics/ClientAnalytics.js +2 -2
  38. package/dist/esnext/foundation/Analytics/connectors/PerformanceMetrics/PerformanceMetrics.client.js +2 -2
  39. package/dist/esnext/foundation/Analytics/index.d.ts +0 -1
  40. package/dist/esnext/foundation/Analytics/index.js +0 -1
  41. package/dist/esnext/foundation/FileRoutes/FileRoutes.server.js +5 -10
  42. package/dist/esnext/foundation/Router/BrowserRouter.client.d.ts +2 -1
  43. package/dist/esnext/foundation/Router/BrowserRouter.client.js +1 -1
  44. package/dist/esnext/foundation/ServerPropsProvider/ServerPropsProvider.js +0 -2
  45. package/dist/esnext/foundation/ServerRequestProvider/ServerRequestProvider.js +18 -3
  46. package/dist/esnext/foundation/ShopifyProvider/ShopifyProvider.server.js +0 -1
  47. package/dist/esnext/foundation/fetchSync/server/fetchSync.d.ts +1 -1
  48. package/dist/esnext/foundation/fetchSync/server/fetchSync.js +1 -1
  49. package/dist/esnext/foundation/useQuery/hooks.js +8 -9
  50. package/dist/esnext/foundation/useRouteParams/RouteParamsProvider.client.d.ts +2 -1
  51. package/dist/esnext/foundation/useRouteParams/RouteParamsProvider.client.js +1 -1
  52. package/dist/esnext/framework/Hydration/Html.js +3 -1
  53. package/dist/esnext/framework/Hydration/ServerComponentRequest.server.d.ts +2 -2
  54. package/dist/esnext/framework/Hydration/ServerComponentResponse.server.d.ts +1 -10
  55. package/dist/esnext/framework/Hydration/ServerComponentResponse.server.js +2 -20
  56. package/dist/esnext/framework/Hydration/rsc.js +55 -7
  57. package/dist/esnext/framework/cache/in-memory.js +0 -6
  58. package/dist/esnext/framework/cache-sub-request.d.ts +17 -0
  59. package/dist/esnext/framework/cache-sub-request.js +64 -0
  60. package/dist/esnext/framework/cache.d.ts +6 -6
  61. package/dist/esnext/framework/cache.js +36 -33
  62. package/dist/esnext/framework/middleware.js +1 -15
  63. package/dist/esnext/framework/plugin.js +7 -30
  64. package/dist/esnext/framework/plugins/vite-plugin-client-imports.d.ts +2 -0
  65. package/dist/esnext/framework/plugins/vite-plugin-client-imports.js +25 -0
  66. package/dist/esnext/framework/plugins/vite-plugin-css-modules-rsc.d.ts +1 -1
  67. package/dist/esnext/framework/plugins/vite-plugin-css-modules-rsc.js +73 -3
  68. package/dist/esnext/framework/plugins/vite-plugin-hydration-auto-import.js +1 -4
  69. package/dist/esnext/framework/plugins/vite-plugin-hydrogen-client-middleware.d.ts +1 -1
  70. package/dist/esnext/framework/plugins/vite-plugin-hydrogen-config.js +7 -5
  71. package/dist/esnext/framework/plugins/vite-plugin-hydrogen-middleware.d.ts +1 -1
  72. package/dist/esnext/framework/plugins/vite-plugin-hydrogen-middleware.js +8 -50
  73. package/dist/esnext/framework/plugins/vite-plugin-hydrogen-rsc.d.ts +1 -0
  74. package/dist/esnext/framework/plugins/vite-plugin-hydrogen-rsc.js +30 -0
  75. package/dist/esnext/framework/plugins/vite-plugin-hydrogen-virtual-files.d.ts +7 -0
  76. package/dist/esnext/framework/plugins/vite-plugin-hydrogen-virtual-files.js +99 -0
  77. package/dist/esnext/framework/plugins/vite-plugin-platform-entry.js +4 -4
  78. package/dist/esnext/framework/plugins/vite-plugin-ssr-interop.js +6 -3
  79. package/dist/esnext/framework/viteception.d.ts +4 -0
  80. package/dist/esnext/framework/viteception.js +15 -0
  81. package/dist/esnext/hooks/useShopQuery/hooks.d.ts +1 -2
  82. package/dist/esnext/hooks/useShopQuery/hooks.js +0 -1
  83. package/dist/esnext/index.d.ts +24 -9
  84. package/dist/esnext/index.js +24 -13
  85. package/dist/esnext/storefront-api-types.d.ts +6 -4
  86. package/dist/esnext/storefront-api-types.js +5 -3
  87. package/dist/esnext/streaming.server.d.ts +3 -1
  88. package/dist/esnext/types.d.ts +13 -5
  89. package/dist/esnext/utilities/apiRoutes.d.ts +4 -5
  90. package/dist/esnext/utilities/apiRoutes.js +2 -8
  91. package/dist/esnext/utilities/fetch.d.ts +1 -2
  92. package/dist/esnext/utilities/fetch.js +1 -3
  93. package/dist/esnext/utilities/graphql-tag.d.ts +1 -0
  94. package/dist/esnext/utilities/graphql-tag.js +6 -0
  95. package/dist/esnext/utilities/graphql-tracker.d.ts +1 -1
  96. package/dist/esnext/utilities/graphql-tracker.js +4 -0
  97. package/dist/esnext/utilities/html-encoding.d.ts +1 -0
  98. package/dist/esnext/utilities/html-encoding.js +8 -0
  99. package/dist/esnext/utilities/image_size.d.ts +4 -22
  100. package/dist/esnext/utilities/image_size.js +15 -33
  101. package/dist/esnext/utilities/index.d.ts +2 -1
  102. package/dist/esnext/utilities/index.js +2 -1
  103. package/dist/esnext/utilities/log/log-cache-api-status.js +5 -1
  104. package/dist/esnext/version.d.ts +1 -1
  105. package/dist/esnext/version.js +1 -1
  106. package/dist/node/components/Image/Image.d.ts +84 -0
  107. package/dist/node/components/Image/Image.js +89 -0
  108. package/dist/node/components/Image/index.d.ts +2 -0
  109. package/dist/node/components/Image/index.js +5 -0
  110. package/dist/node/entry-server.d.ts +14 -2
  111. package/dist/node/entry-server.js +97 -73
  112. package/dist/node/foundation/Analytics/Analytics.client.js +6 -6
  113. package/dist/node/foundation/Analytics/ClientAnalytics.js +2 -2
  114. package/dist/node/foundation/Router/BrowserRouter.client.d.ts +2 -1
  115. package/dist/node/foundation/Router/BrowserRouter.client.js +1 -1
  116. package/dist/node/foundation/ServerPropsProvider/ServerPropsProvider.js +0 -2
  117. package/dist/node/foundation/ServerRequestProvider/ServerRequestProvider.js +18 -3
  118. package/dist/node/framework/Hydration/Html.js +3 -1
  119. package/dist/node/framework/Hydration/ServerComponentRequest.server.d.ts +2 -2
  120. package/dist/node/framework/Hydration/ServerComponentResponse.server.d.ts +1 -10
  121. package/dist/node/framework/Hydration/ServerComponentResponse.server.js +2 -20
  122. package/dist/node/framework/Hydration/rsc.js +55 -7
  123. package/dist/node/framework/cache/in-memory.js +0 -6
  124. package/dist/node/framework/cache-sub-request.d.ts +17 -0
  125. package/dist/node/framework/cache-sub-request.js +95 -0
  126. package/dist/node/framework/cache.d.ts +6 -6
  127. package/dist/node/framework/cache.js +38 -35
  128. package/dist/node/framework/middleware.js +1 -15
  129. package/dist/node/framework/plugin.js +7 -53
  130. package/dist/node/framework/plugins/vite-plugin-client-imports.d.ts +2 -0
  131. package/dist/node/framework/plugins/vite-plugin-client-imports.js +28 -0
  132. package/dist/node/framework/plugins/vite-plugin-css-modules-rsc.d.ts +1 -1
  133. package/dist/node/framework/plugins/vite-plugin-css-modules-rsc.js +76 -3
  134. package/dist/node/framework/plugins/vite-plugin-hydration-auto-import.js +1 -4
  135. package/dist/node/framework/plugins/vite-plugin-hydrogen-client-middleware.d.ts +1 -1
  136. package/dist/node/framework/plugins/vite-plugin-hydrogen-config.js +7 -5
  137. package/dist/node/framework/plugins/vite-plugin-hydrogen-middleware.d.ts +1 -1
  138. package/dist/node/framework/plugins/vite-plugin-hydrogen-middleware.js +7 -49
  139. package/dist/node/framework/plugins/vite-plugin-hydrogen-rsc.d.ts +1 -0
  140. package/dist/node/framework/plugins/vite-plugin-hydrogen-rsc.js +36 -0
  141. package/dist/node/framework/plugins/vite-plugin-hydrogen-virtual-files.d.ts +7 -0
  142. package/dist/node/framework/plugins/vite-plugin-hydrogen-virtual-files.js +105 -0
  143. package/dist/node/framework/plugins/vite-plugin-platform-entry.js +4 -4
  144. package/dist/node/framework/plugins/vite-plugin-ssr-interop.js +6 -3
  145. package/dist/node/framework/viteception.d.ts +4 -0
  146. package/dist/node/framework/viteception.js +19 -0
  147. package/dist/node/storefront-api-types.d.ts +6 -4
  148. package/dist/node/storefront-api-types.js +5 -3
  149. package/dist/node/streaming.server.d.ts +3 -1
  150. package/dist/node/types.d.ts +13 -5
  151. package/dist/node/utilities/apiRoutes.d.ts +4 -5
  152. package/dist/node/utilities/apiRoutes.js +2 -8
  153. package/dist/node/utilities/fetch.d.ts +1 -2
  154. package/dist/node/utilities/fetch.js +1 -3
  155. package/dist/node/utilities/html-encoding.d.ts +1 -0
  156. package/dist/node/utilities/html-encoding.js +12 -0
  157. package/dist/node/utilities/image_size.d.ts +4 -22
  158. package/dist/node/utilities/image_size.js +16 -58
  159. package/dist/node/utilities/index.d.ts +2 -1
  160. package/dist/node/utilities/index.js +3 -2
  161. package/dist/node/utilities/log/log-cache-api-status.js +5 -1
  162. package/dist/node/version.d.ts +1 -1
  163. package/dist/node/version.js +1 -1
  164. package/entry-server.d.ts +1 -1
  165. package/package.json +6 -5
  166. package/vendor/react-server-dom-vite/cjs/react-server-dom-vite-plugin.js +214 -28
  167. package/vendor/react-server-dom-vite/esm/react-server-dom-vite-client-proxy.js +2 -0
  168. package/vendor/react-server-dom-vite/esm/react-server-dom-vite-plugin.js +214 -28
  169. package/vendor/react-server-dom-vite/package.json +2 -1
  170. package/dist/esnext/components/ProductDescription/ProductDescription.client.d.ts +0 -13
  171. package/dist/esnext/components/ProductDescription/ProductDescription.client.js +0 -16
  172. package/dist/esnext/components/ProductDescription/index.d.ts +0 -1
  173. package/dist/esnext/components/ProductDescription/index.js +0 -1
  174. package/dist/esnext/components/ProductMetafield/ProductMetafield.client.d.ts +0 -21
  175. package/dist/esnext/components/ProductMetafield/ProductMetafield.client.js +0 -42
  176. package/dist/esnext/components/ProductMetafield/index.d.ts +0 -2
  177. package/dist/esnext/components/ProductMetafield/index.js +0 -1
  178. package/dist/esnext/components/ProductTitle/ProductTitle.client.d.ts +0 -13
  179. package/dist/esnext/components/ProductTitle/ProductTitle.client.js +0 -16
  180. package/dist/esnext/components/ProductTitle/index.d.ts +0 -1
  181. package/dist/esnext/components/ProductTitle/index.js +0 -1
  182. package/dist/esnext/components/UnitPrice/UnitPrice.client.d.ts +0 -15
  183. package/dist/esnext/components/UnitPrice/UnitPrice.client.js +0 -22
  184. package/dist/esnext/components/UnitPrice/index.d.ts +0 -1
  185. package/dist/esnext/components/UnitPrice/index.js +0 -1
  186. package/dist/esnext/utilities/findRoutePrefix.d.ts +0 -1
  187. package/dist/esnext/utilities/findRoutePrefix.js +0 -17
  188. package/dist/node/foundation/Analytics/index.d.ts +0 -2
  189. package/dist/node/foundation/Analytics/index.js +0 -7
  190. package/dist/node/utilities/findRoutePrefix.d.ts +0 -1
  191. package/dist/node/utilities/findRoutePrefix.js +0 -21
@@ -2,6 +2,7 @@ import React, { useState } from 'react';
2
2
  import { useShop } from '../../foundation';
3
3
  import { flattenConnection } from '../../utilities';
4
4
  import { CartCreate } from './cart-queries';
5
+ import { useCart } from '../../hooks/useCart';
5
6
  export function useCartFetch() {
6
7
  const { storeDomain, storefrontApiVersion, storefrontToken } = useShop();
7
8
  return React.useCallback(({ query, variables, }) => {
@@ -28,6 +29,7 @@ export function useCartFetch() {
28
29
  }, [storeDomain, storefrontApiVersion, storefrontToken]);
29
30
  }
30
31
  export function useInstantCheckout() {
32
+ const { cartFragment } = useCart();
31
33
  const [cart, updateCart] = useState();
32
34
  const [checkoutUrl, updateCheckoutUrl] = useState();
33
35
  const [error, updateError] = useState();
@@ -35,7 +37,7 @@ export function useInstantCheckout() {
35
37
  const createInstantCheckout = React.useCallback(async (cartInput) => {
36
38
  var _a, _b;
37
39
  const { data, error } = await fetch({
38
- query: CartCreate,
40
+ query: CartCreate(cartFragment),
39
41
  variables: {
40
42
  input: cartInput,
41
43
  },
@@ -55,6 +57,6 @@ export function useInstantCheckout() {
55
57
  });
56
58
  updateCheckoutUrl(dataCart.checkoutUrl);
57
59
  }
58
- }, [fetch]);
60
+ }, [cartFragment, fetch]);
59
61
  return { cart, checkoutUrl, error, createInstantCheckout };
60
62
  }
@@ -42,6 +42,8 @@ export interface CartWithActions extends Cart {
42
42
  discountCodesUpdate: (discountCodes: string[]) => void;
43
43
  /** The total number of items in the cart, across all lines. If there are no lines, then the value is 0. */
44
44
  totalQuantity: number;
45
+ /** The fragment used to query the cart object for all queries and mutations. */
46
+ cartFragment: string;
45
47
  }
46
48
  export declare type State =
47
49
  /** A cart has not been created yet, or an error occurred when a cart was attempting to be created or fetched. */
@@ -1,46 +1,84 @@
1
- import React from 'react';
2
- import { ImageSizeOptions, ImageLoaderOptions } from '../../utilities';
1
+ import * as React from 'react';
3
2
  import type { Image as ImageType } from '../../storefront-api-types';
4
- import type { PartialDeep, Merge, MergeExclusive } from 'type-fest';
5
- export interface BaseImageProps {
6
- /** A custom function that generates the image URL. Parameters passed into this function includes
7
- * `src` and an `options` object that contains the provided `width`, `height` and `loaderOptions` values.
3
+ import type { PartialDeep, Simplify, SetRequired } from 'type-fest';
4
+ declare type HtmlImageProps = React.ImgHTMLAttributes<HTMLImageElement>;
5
+ declare type ImageProps<GenericLoaderOpts> = ShopifyImageProps | ExternalImageProps<GenericLoaderOpts>;
6
+ export declare function Image<GenericLoaderOpts>(props: ImageProps<GenericLoaderOpts>): JSX.Element;
7
+ export declare type ShopifyLoaderOptions = {
8
+ crop?: 'top' | 'bottom' | 'left' | 'right' | 'center';
9
+ scale?: 2 | 3;
10
+ width?: HtmlImageProps['width'] | ImageType['width'];
11
+ height?: HtmlImageProps['height'] | ImageType['height'];
12
+ };
13
+ export declare type ShopifyLoaderParams = Simplify<ShopifyLoaderOptions & {
14
+ src: ImageType['url'];
15
+ }>;
16
+ export declare type ShopifyImageProps = Omit<HtmlImageProps, 'src'> & {
17
+ /** An object with fields that correspond to the Storefront API's
18
+ * [Image object](https://shopify.dev/api/storefront/reference/common-objects/image).
19
+ * The `data` prop is required if `src` isn't used, but both props shouldn't be used
20
+ * at the same time. If both `src` and `data` are passed, then `data` takes priority.
21
+ */
22
+ data: SetRequired<PartialDeep<ImageType>, 'url'>;
23
+ /** A custom function that generates the image URL. Parameters passed in
24
+ * are either `ShopifyLoaderParams` if using the `data` prop, or the
25
+ * `LoaderOptions` object that you pass to `loaderOptions`.
8
26
  */
9
- loader?(props: ImageLoaderOptions): string;
10
- /** An object of `loader` function options. For example, if the `loader` function requires a `scale` option,
11
- * then the value can be a property of the `loaderOptions` object (for example, `{scale: 2}`).
27
+ loader?: (params: ShopifyLoaderParams) => string;
28
+ /** An object of `loader` function options. For example, if the `loader` function
29
+ * requires a `scale` option, then the value can be a property of the
30
+ * `loaderOptions` object (for example, `{scale: 2}`). When the `data` prop
31
+ * is used, the object shape will be `ShopifyLoaderOptions`. When the `src`
32
+ * prop is used, the data shape is whatever you define it to be, and this shape
33
+ * will be passed to `loader`.
12
34
  */
13
- loaderOptions?: ImageLoaderOptions['options'];
35
+ loaderOptions?: ShopifyLoaderOptions;
14
36
  /**
15
- * Whether the image will be immediately loaded. Defaults to `false`. This prop should be used only when
16
- * the image is visible above the fold. For more information, refer to the
17
- * [Image Embed element's loading attribute](https://developer.mozilla.org/enUS/docs/Web/HTML/Element/img#attr-loading).
37
+ * 'src' shouldn't be passed when 'data' is used.
18
38
  */
19
- priority?: boolean;
20
- }
21
- interface MediaImagePropsBase extends BaseImageProps {
22
- /** An object with fields that correspond to the Storefront API's
23
- * [Image object](https://shopify.dev/api/storefront/reference/common-objects/image).
39
+ src?: never;
40
+ };
41
+ declare type LoaderProps<GenericLoaderOpts> = {
42
+ /** A URL string. This string can be an absolute path or a relative path depending
43
+ * on the `loader`. The `src` prop is required if `data` isn't used, but both
44
+ * props shouldn't be used at the same time. If both `src` and `data` are passed,
45
+ * then `data` takes priority.
46
+ */
47
+ src: HtmlImageProps['src'];
48
+ /** The integer or string value for the width of the image. This is a required prop
49
+ * when `src` is present.
50
+ */
51
+ width: HtmlImageProps['width'];
52
+ /** The integer or string value for the height of the image. This is a required prop
53
+ * when `src` is present.
54
+ */
55
+ height: HtmlImageProps['height'];
56
+ /** An object of `loader` function options. For example, if the `loader` function
57
+ * requires a `scale` option, then the value can be a property of the
58
+ * `loaderOptions` object (for example, `{scale: 2}`). When the `data` prop
59
+ * is used, the object shape will be `ShopifyLoaderOptions`. When the `src`
60
+ * prop is used, the data shape is whatever you define it to be, and this shape
61
+ * will be passed to `loader`.
62
+ */
63
+ loaderOptions?: GenericLoaderOpts;
64
+ };
65
+ declare type ExternalImageProps<GenericLoaderOpts> = SetRequired<HtmlImageProps, 'src' | 'width' | 'height' | 'alt'> & {
66
+ /** A custom function that generates the image URL. Parameters passed in
67
+ * are either `ShopifyLoaderParams` if using the `data` prop, or the
68
+ * `LoaderOptions` object that you pass to `loaderOptions`.
69
+ */
70
+ loader?: (params: LoaderProps<GenericLoaderOpts>) => string;
71
+ /** An object of `loader` function options. For example, if the `loader` function
72
+ * requires a `scale` option, then the value can be a property of the
73
+ * `loaderOptions` object (for example, `{scale: 2}`). When the `data` prop
74
+ * is used, the object shape will be `ShopifyLoaderOptions`. When the `src`
75
+ * prop is used, the data shape is whatever you define it to be, and this shape
76
+ * will be passed to `loader`.
77
+ */
78
+ loaderOptions?: GenericLoaderOpts;
79
+ /**
80
+ * 'data' shouldn't be passed when 'src' is used.
24
81
  */
25
- data: PartialDeep<ImageType>;
26
- /** An object of image size options for Shopify CDN images. */
27
- options?: ImageSizeOptions;
28
- }
29
- interface ExternalImagePropsBase extends BaseImageProps {
30
- /** A URL string. This string can be an absolute path or a relative path depending on the `loader`. */
31
- src: string;
32
- /** The integer value for the width of the image. This is a required prop when `src` is present. */
33
- width: number;
34
- /** The integer value for the height of the image. This is a required prop when `src` is present. */
35
- height: number;
36
- }
37
- declare type BaseElementProps = React.ImgHTMLAttributes<HTMLImageElement>;
38
- declare type MediaImageProps = Merge<BaseElementProps, MediaImagePropsBase>;
39
- declare type ExternalImageProps = Merge<BaseElementProps, ExternalImagePropsBase>;
40
- declare type ImageProps = MergeExclusive<MediaImageProps, ExternalImageProps>;
41
- /**
42
- * The `Image` component renders an image for the Storefront API's
43
- * [Image object](https://shopify.dev/api/storefront/reference/common-objects/image).
44
- */
45
- export declare function Image(props: ImageProps): JSX.Element;
82
+ data?: never;
83
+ };
46
84
  export {};
@@ -1,59 +1,62 @@
1
- import React from 'react';
2
- import { shopifyImageLoader, getShopifyImageDimensions, } from '../../utilities';
3
- /**
4
- * The `Image` component renders an image for the Storefront API's
5
- * [Image object](https://shopify.dev/api/storefront/reference/common-objects/image).
6
- */
1
+ import * as React from 'react';
2
+ import { getShopifyImageDimensions, shopifyImageLoader } from '../../utilities';
7
3
  export function Image(props) {
8
- var _a, _b, _c, _d;
9
- const { data, options, src, id, alt, width, height, loader, loaderOptions, priority, ...passthroughProps } = props;
10
- if (!data && !src) {
11
- throw new Error('Image component: requires either an `data` or `src` prop.');
12
- }
13
- if (!data && src && (!width || !height)) {
14
- throw new Error(`Image component: when 'src' is provided, 'width' and 'height' are required and needs to be valid values (i.e. greater than zero). Provided values: 'src': ${src}, 'width': ${width}, 'height': ${height}`);
15
- }
16
- const imgProps = data
17
- ? convertShopifyImageData({
18
- data,
19
- options,
20
- loader,
21
- loaderOptions,
22
- id,
23
- alt,
24
- priority,
25
- })
26
- : {
27
- src,
28
- id,
29
- alt,
30
- width,
31
- height,
32
- loader,
33
- priority,
34
- loaderOptions: { width, height, ...loaderOptions },
35
- };
36
- const srcPath = imgProps.loader
37
- ? imgProps.loader({ src: imgProps.src, options: imgProps.loaderOptions })
38
- : imgProps.src;
4
+ if (!props.data && !props.src) {
5
+ throw new Error(`<Image/>: requires either a 'data' or 'src' prop.`);
6
+ }
7
+ if (__DEV__ && props.data && props.src) {
8
+ console.warn(`<Image/>: using both 'data' and 'src' props is not supported; using the 'data' prop by default`);
9
+ }
10
+ if (props.data) {
11
+ return React.createElement(ShopifyImage, { ...props });
12
+ }
13
+ else {
14
+ return React.createElement(ExternalImage, { ...props });
15
+ }
16
+ }
17
+ function ShopifyImage({ data, width, height, loading, loader = shopifyImageLoader, loaderOptions, ...rest }) {
18
+ var _a, _b, _c, _d, _e, _f;
19
+ if (!data.url) {
20
+ throw new Error(`<Image/>: the 'data' prop requires the 'url' property`);
21
+ }
22
+ if (__DEV__ && !data.altText && !rest.alt) {
23
+ console.warn(`<Image/>: the 'data' prop should have the 'altText' property, or the 'alt' prop, and one of them should not be empty. ${`Image: ${(_a = data.id) !== null && _a !== void 0 ? _a : data.url}`}`);
24
+ }
25
+ const { width: finalWidth, height: finalHeight } = getShopifyImageDimensions(data, loaderOptions);
26
+ if ((__DEV__ && !finalWidth) || !finalHeight) {
27
+ console.warn(`<Image/>: the 'data' prop requires either 'width' or 'data.width', and 'height' or 'data.height' properties. ${`Image: ${(_b = data.id) !== null && _b !== void 0 ? _b : data.url}`}`);
28
+ }
29
+ let finalSrc = data.url;
30
+ if (loader) {
31
+ finalSrc = loader({
32
+ ...loaderOptions,
33
+ src: data.url,
34
+ width: finalWidth,
35
+ height: finalHeight,
36
+ });
37
+ if (typeof finalSrc !== 'string' || !finalSrc) {
38
+ throw new Error(`<Image/>: 'loader' did not return a valid string. ${`Image: ${(_c = data.id) !== null && _c !== void 0 ? _c : data.url}`}`);
39
+ }
40
+ }
39
41
  /* eslint-disable hydrogen/prefer-image-component */
40
- return (React.createElement("img", { id: (_a = imgProps.id) !== null && _a !== void 0 ? _a : '', loading: imgProps.priority ? 'eager' : 'lazy', alt: (_b = imgProps.alt) !== null && _b !== void 0 ? _b : '', ...passthroughProps, src: srcPath, width: (_c = imgProps.width) !== null && _c !== void 0 ? _c : undefined, height: (_d = imgProps.height) !== null && _d !== void 0 ? _d : undefined }));
42
+ return (React.createElement("img", { id: (_d = data.id) !== null && _d !== void 0 ? _d : '', alt: (_f = (_e = data.altText) !== null && _e !== void 0 ? _e : rest.alt) !== null && _f !== void 0 ? _f : '', loading: loading !== null && loading !== void 0 ? loading : 'lazy', ...rest, src: finalSrc, width: finalWidth !== null && finalWidth !== void 0 ? finalWidth : undefined, height: finalHeight !== null && finalHeight !== void 0 ? finalHeight : undefined }));
41
43
  /* eslint-enable hydrogen/prefer-image-component */
42
44
  }
43
- function convertShopifyImageData({ data, options, loader, priority, loaderOptions, id: propId, alt, }) {
44
- const { url: src, altText, id } = data;
45
- if (!src) {
46
- throw new Error(`<Image/> requires 'data.url' when using the 'data' prop`);
47
- }
48
- const { width, height } = getShopifyImageDimensions(data, options);
49
- return {
50
- src,
51
- id: propId ? propId : id,
52
- alt: alt ? alt : altText,
53
- width,
54
- height,
55
- loader: loader ? loader : shopifyImageLoader,
56
- loaderOptions: { ...options, ...loaderOptions },
57
- priority,
58
- };
45
+ function ExternalImage({ src, width, height, alt, loader, loaderOptions, loading, ...rest }) {
46
+ if (!width || !height) {
47
+ 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}`);
48
+ }
49
+ if (__DEV__ && !alt) {
50
+ console.warn(`<Image/>: when 'src' is provided, 'alt' should also be provided. ${`Image: ${src}`}`);
51
+ }
52
+ let finalSrc = src;
53
+ if (loader) {
54
+ finalSrc = loader({ src, width, height, ...loaderOptions });
55
+ if (typeof finalSrc !== 'string' || !finalSrc) {
56
+ throw new Error(`<Image/>: 'loader' did not return a valid string`);
57
+ }
58
+ }
59
+ /* eslint-disable hydrogen/prefer-image-component */
60
+ return (React.createElement("img", { ...rest, src: finalSrc, width: width, height: height, alt: alt !== null && alt !== void 0 ? alt : '', loading: loading !== null && loading !== void 0 ? loading : 'lazy' }));
61
+ /* eslint-enable hydrogen/prefer-image-component */
59
62
  }
@@ -1 +1,2 @@
1
1
  export { Image } from './Image';
2
+ export type { ShopifyLoaderParams, ShopifyLoaderOptions, ShopifyImageProps, } from './Image';
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { Image } from '../Image';
2
+ import { type ShopifyImageProps } from '../Image';
3
3
  import { Video } from '../Video';
4
4
  import { ExternalVideo } from '../ExternalVideo';
5
5
  import type { MediaEdge as MediaEdgeType } from '../../storefront-api-types';
@@ -8,7 +8,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). */
9
9
  data: PartialDeep<MediaEdgeType['node']>;
10
10
  /** The options for the `Image`, `Video`, or `ExternalVideo` components. */
11
- options?: React.ComponentProps<typeof Image>['options'] | React.ComponentProps<typeof Video>['options'] | React.ComponentProps<typeof ExternalVideo>['options'];
11
+ options?: ShopifyImageProps | React.ComponentProps<typeof Video>['previewImageOptions'] | React.ComponentProps<typeof ExternalVideo>['options'];
12
12
  }
13
13
  /**
14
14
  * The `MediaFile` component renders the media for the Storefront API's
@@ -12,15 +12,16 @@ import { ModelViewer } from '../ModelViewer';
12
12
  export function MediaFile({ data, options, ...passthroughProps }) {
13
13
  switch (data.mediaContentType) {
14
14
  case 'IMAGE': {
15
- const dataImage = data.image;
16
- if (!dataImage) {
15
+ const dataImage = data
16
+ .image;
17
+ if (!dataImage || !dataImage.url) {
17
18
  console.warn(`No "image" property was found on the "data" prop for <MediaFile/>, for the "type='image'"`);
18
19
  return null;
19
20
  }
20
- return (React.createElement(Image, { ...passthroughProps, data: dataImage, options: options }));
21
+ return (React.createElement(Image, { ...passthroughProps, data: dataImage, loaderOptions: options }));
21
22
  }
22
23
  case 'VIDEO':
23
- return (React.createElement(Video, { ...passthroughProps, data: data, options: options }));
24
+ return (React.createElement(Video, { ...passthroughProps, data: data, previewImageOptions: options }));
24
25
  case 'EXTERNAL_VIDEO':
25
26
  return (React.createElement(ExternalVideo, { ...passthroughProps, data: data, options: options }));
26
27
  case 'MODEL_3D':
@@ -1,19 +1,25 @@
1
- import type { MoneyV2 } from '../../storefront-api-types';
1
+ import React, { type ReactNode } from 'react';
2
+ import type { MoneyV2, UnitPriceMeasurement } from '../../storefront-api-types';
2
3
  import type { PartialDeep } from 'type-fest';
3
- interface MoneyProps<TTag> {
4
- /** An HTML tag to be rendered as the base element wrapper. The default is `div`. */
5
- as?: TTag;
4
+ interface CustomProps<ComponentGeneric extends React.ElementType> {
5
+ /** An HTML tag or React Component to be rendered as the base element wrapper. The default is `div`. */
6
+ as?: ComponentGeneric;
6
7
  /** An object with fields that correspond to the Storefront API's [MoneyV2 object](https://shopify.dev/api/storefront/reference/common-objects/moneyv2). */
7
8
  data: PartialDeep<MoneyV2>;
8
9
  /** Whether to remove the currency symbol from the output. */
9
10
  withoutCurrency?: boolean;
10
11
  /** Whether to remove trailing zeros (fractional money) from the output. */
11
12
  withoutTrailingZeros?: boolean;
13
+ /** A [UnitPriceMeasurement object](https://shopify.dev/api/storefront/latest/objects/unitpricemeasurement). */
14
+ measurement?: PartialDeep<UnitPriceMeasurement>;
15
+ /** Customizes the separator between the money output and the measurement output. Used with the `measurement` prop. Defaults to `'/'`. */
16
+ measurementSeparator?: ReactNode;
12
17
  }
18
+ declare type MoneyProps<ComponentGeneric extends React.ElementType> = CustomProps<ComponentGeneric> & Omit<React.ComponentPropsWithoutRef<ComponentGeneric>, keyof CustomProps<ComponentGeneric>>;
13
19
  /**
14
20
  * The `Money` component renders a string of the Storefront API's
15
21
  * [MoneyV2 object](https://shopify.dev/api/storefront/reference/common-objects/moneyv2) according to the
16
22
  * `defaultLocale` in [the `hydrogen.config.js` file](https://shopify.dev/custom-storefronts/hydrogen/framework/hydrogen-config).
17
23
  */
18
- export declare function Money<TTag extends keyof JSX.IntrinsicElements = 'div'>(props: JSX.IntrinsicElements[TTag] & MoneyProps<TTag>): JSX.Element;
24
+ export declare function Money<TTag extends React.ElementType>({ data, as, withoutCurrency, withoutTrailingZeros, measurement, measurementSeparator, ...passthroughProps }: MoneyProps<TTag>): JSX.Element;
19
25
  export {};
@@ -5,8 +5,10 @@ import { useMoney } from '../../hooks';
5
5
  * [MoneyV2 object](https://shopify.dev/api/storefront/reference/common-objects/moneyv2) according to the
6
6
  * `defaultLocale` in [the `hydrogen.config.js` file](https://shopify.dev/custom-storefronts/hydrogen/framework/hydrogen-config).
7
7
  */
8
- export function Money(props) {
9
- const { data, as, withoutCurrency, withoutTrailingZeros, ...passthroughProps } = props;
8
+ export function Money({ data, as, withoutCurrency, withoutTrailingZeros, measurement, measurementSeparator = '/', ...passthroughProps }) {
9
+ if (!isMoney(data)) {
10
+ throw new Error(`<Money/> needs a valid 'data' prop that has 'amount' and 'currencyCode'`);
11
+ }
10
12
  const moneyObject = useMoney(data);
11
13
  const Wrapper = as !== null && as !== void 0 ? as : 'div';
12
14
  let output = moneyObject.localizedString;
@@ -22,5 +24,16 @@ export function Money(props) {
22
24
  output = moneyObject.withoutTrailingZerosAndCurrency;
23
25
  }
24
26
  }
25
- return React.createElement(Wrapper, { ...passthroughProps }, output);
27
+ return (React.createElement(Wrapper, { ...passthroughProps },
28
+ output,
29
+ measurement && measurement.referenceUnit && (React.createElement(React.Fragment, null,
30
+ measurementSeparator,
31
+ measurement.referenceUnit))));
32
+ }
33
+ // required in order to narrow the money object down and make TS happy
34
+ function isMoney(maybeMoney) {
35
+ return (typeof maybeMoney.amount === 'string' &&
36
+ !!maybeMoney.amount &&
37
+ typeof maybeMoney.currencyCode === 'string' &&
38
+ !!maybeMoney.currencyCode);
26
39
  }
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
2
  import { Money } from '../Money';
3
- import { UnitPrice } from '../UnitPrice';
4
3
  export interface ProductPriceProps {
5
4
  /** The type of price. Valid values: `regular` (default) or `compareAt`. */
6
5
  priceType?: 'regular' | 'compareAt';
@@ -13,4 +12,4 @@ export interface ProductPriceProps {
13
12
  * The `ProductPrice` component renders a `Money` component with the product
14
13
  * [`priceRange`](https://shopify.dev/api/storefront/reference/products/productpricerange)'s `maxVariantPrice` or `minVariantPrice`, for either the regular price or compare at price range. It must be a descendent of the `ProductProvider` component.
15
14
  */
16
- export declare function ProductPrice<TTag extends keyof JSX.IntrinsicElements>(props: (Omit<React.ComponentProps<typeof UnitPrice>, 'data' | 'measurement'> | Omit<React.ComponentProps<typeof Money>, 'data'>) & ProductPriceProps): JSX.Element | null;
15
+ export declare function ProductPrice<TTag extends keyof JSX.IntrinsicElements>(props: Omit<React.ComponentProps<typeof Money>, 'data' | 'measurement'> & ProductPriceProps): JSX.Element | null;
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
2
  import { Money } from '../Money';
3
3
  import { useProduct } from '../ProductProvider';
4
- import { UnitPrice } from '../UnitPrice';
5
4
  /**
6
5
  * The `ProductPrice` component renders a `Money` component with the product
7
6
  * [`priceRange`](https://shopify.dev/api/storefront/reference/products/productpricerange)'s `maxVariantPrice` or `minVariantPrice`, for either the regular price or compare at price range. It must be a descendent of the `ProductProvider` component.
@@ -51,7 +50,7 @@ export function ProductPrice(props) {
51
50
  return null;
52
51
  }
53
52
  if (measurement) {
54
- return (React.createElement(UnitPrice, { ...passthroughProps, data: price, measurement: measurement }));
53
+ return (React.createElement(Money, { ...passthroughProps, data: price, measurement: measurement }));
55
54
  }
56
55
  return React.createElement(Money, { ...passthroughProps, data: price });
57
56
  }
@@ -0,0 +1,3 @@
1
+ import type { DefaultPage } from './seo-types';
2
+ import type { PartialDeep } from 'type-fest';
3
+ export declare function NoIndexPageSeo({ title, titleTemplate, lang, }: PartialDeep<DefaultPage>): JSX.Element;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { useShop } from '../../foundation';
3
+ import { Head } from '../../client';
4
+ export function NoIndexPageSeo({ title, titleTemplate, lang, }) {
5
+ const { languageCode: fallBacklang } = useShop();
6
+ return (React.createElement(React.Fragment, null,
7
+ React.createElement(Head, { defaultTitle: title !== null && title !== void 0 ? title : '', titleTemplate: titleTemplate !== null && titleTemplate !== void 0 ? titleTemplate : `%s - ${title}` },
8
+ React.createElement("html", { lang: lang !== null && lang !== void 0 ? lang : fallBacklang }),
9
+ React.createElement("meta", { name: "robots", content: "noindex" }))));
10
+ }
@@ -2,6 +2,7 @@ import { type ComponentProps } from 'react';
2
2
  import { ProductSeo } from './ProductSeo.client';
3
3
  import { CollectionSeo } from './CollectionSeo.client';
4
4
  import { PageSeo } from './PageSeo.client';
5
+ import { NoIndexPageSeo } from './NoIndexSeo.client';
5
6
  import type { DefaultPage as DefaultPageType, HomePage as HomePageType } from './seo-types';
6
7
  declare type Props = {
7
8
  type: 'defaultSeo';
@@ -18,6 +19,9 @@ declare type Props = {
18
19
  } | {
19
20
  type: 'page';
20
21
  data: ComponentProps<typeof PageSeo>;
22
+ } | {
23
+ type: 'noindex';
24
+ data: ComponentProps<typeof NoIndexPageSeo>;
21
25
  };
22
26
  /**
23
27
  * The `Seo` component renders SEO information on a webpage.
@@ -5,6 +5,7 @@ import { HomePageSeo } from './HomePageSeo.client';
5
5
  import { ProductSeo } from './ProductSeo.client';
6
6
  import { CollectionSeo } from './CollectionSeo.client';
7
7
  import { PageSeo } from './PageSeo.client';
8
+ import { NoIndexPageSeo } from './NoIndexSeo.client';
8
9
  /**
9
10
  * The `Seo` component renders SEO information on a webpage.
10
11
  */
@@ -21,6 +22,8 @@ export function Seo(props) {
21
22
  return React.createElement(CollectionSeo, { ...props.data });
22
23
  case 'page':
23
24
  return React.createElement(PageSeo, { ...props.data });
25
+ case 'noindex':
26
+ return React.createElement(NoIndexPageSeo, { ...props.data });
24
27
  default:
25
28
  console.warn('The <Seo/> only accepts type prop with values of defaultSeo, homepage, product, collection, or page.');
26
29
  return null;
@@ -1,11 +1,11 @@
1
- import { ImageSizeOptions } from '../../utilities';
1
+ import { shopifyImageLoader } from '../../utilities';
2
2
  import type { Video as VideoType } from '../../storefront-api-types';
3
3
  import type { PartialDeep } from 'type-fest';
4
4
  interface VideoProps {
5
5
  /** An object with fields that correspond to the Storefront API's [Video object](https://shopify.dev/api/storefront/latest/objects/video). */
6
6
  data: PartialDeep<VideoType>;
7
- /** An object of image size options for the video's `previewImage`. */
8
- options?: ImageSizeOptions;
7
+ /** An object of image size options for the video's `previewImage`. Uses `shopifyImageLoader` to generate the `poster` URL. */
8
+ previewImageOptions?: Parameters<typeof shopifyImageLoader>[0];
9
9
  }
10
10
  /**
11
11
  * The `Video` component renders a `video` for the Storefront API's [Video object](https://shopify.dev/api/storefront/reference/products/video).
@@ -1,12 +1,15 @@
1
1
  import React from 'react';
2
- import { useImageUrl } from '../../utilities';
2
+ import { shopifyImageLoader } from '../../utilities';
3
3
  /**
4
4
  * The `Video` component renders a `video` for the Storefront API's [Video object](https://shopify.dev/api/storefront/reference/products/video).
5
5
  */
6
6
  export function Video(props) {
7
- var _a;
8
- const { data, options, id = data.id, playsInline = true, controls = true, ...passthroughProps } = props;
9
- const posterUrl = useImageUrl((_a = data.previewImage) === null || _a === void 0 ? void 0 : _a.url, options);
7
+ var _a, _b;
8
+ const { data, previewImageOptions, id = data.id, playsInline = true, controls = true, ...passthroughProps } = props;
9
+ const posterUrl = shopifyImageLoader({
10
+ src: (_b = (_a = data.previewImage) === null || _a === void 0 ? void 0 : _a.url) !== null && _b !== void 0 ? _b : '',
11
+ ...previewImageOptions,
12
+ });
10
13
  if (!data.sources) {
11
14
  throw new Error(`<Video/> requires a 'data.sources' array`);
12
15
  }
@@ -21,10 +21,7 @@ export { CartEstimatedCost } from './CartEstimatedCost';
21
21
  export { CartProvider, useCart, useInstantCheckout } from './CartProvider';
22
22
  export type { State, Status, Cart, CartWithActions, CartAction, } from './CartProvider';
23
23
  export { ProductProvider, useProduct } from './ProductProvider';
24
- export { ProductDescription } from './ProductDescription';
25
- export { ProductTitle } from './ProductTitle';
26
24
  export { ProductPrice } from './ProductPrice';
27
- export { ProductMetafield } from './ProductMetafield';
28
25
  export { BuyNowButton } from './BuyNowButton';
29
26
  export { ShopPayButton } from './ShopPayButton';
30
27
  export { useCountry } from '../hooks/useCountry';
@@ -19,10 +19,7 @@ export { CartShopPayButton } from './CartShopPayButton';
19
19
  export { CartEstimatedCost } from './CartEstimatedCost';
20
20
  export { CartProvider, useCart, useInstantCheckout } from './CartProvider';
21
21
  export { ProductProvider, useProduct } from './ProductProvider';
22
- export { ProductDescription } from './ProductDescription';
23
- export { ProductTitle } from './ProductTitle';
24
22
  export { ProductPrice } from './ProductPrice';
25
- export { ProductMetafield } from './ProductMetafield';
26
23
  export { BuyNowButton } from './BuyNowButton';
27
24
  export { ShopPayButton } from './ShopPayButton';
28
25
  export { useCountry } from '../hooks/useCountry';
@@ -1,3 +1,3 @@
1
- import type { HydrogenConfig } from './types';
2
- export declare const defineConfig: (params: HydrogenConfig) => HydrogenConfig;
3
- export type { HydrogenConfig };
1
+ import type { InlineHydrogenConfig } from './types';
2
+ export declare const defineConfig: (params: InlineHydrogenConfig) => InlineHydrogenConfig;
3
+ export type { InlineHydrogenConfig as HydrogenConfig };
@@ -1,6 +1,4 @@
1
- /* eslint-disable hydrogen/no-state-in-server-components */
2
1
  import React, { Suspense, useState, StrictMode, Fragment, } from 'react';
3
- // @ts-expect-error hydrateRoot isn't on the TS types yet, but we're using React 18 so it exists
4
2
  import { hydrateRoot } from 'react-dom/client';
5
3
  import { ErrorBoundary } from 'react-error-boundary';
6
4
  import { useServerResponse } from './framework/Hydration/rsc';
@@ -70,4 +68,3 @@ function Error({ error }) {
70
68
  React.createElement("a", { href: "/", style: { textDecoration: 'underline' } }, "home page"),
71
69
  "."))));
72
70
  }
73
- /* eslint-enable hydrogen/no-state-in-server-components */
@@ -1,5 +1,8 @@
1
1
  /// <reference types="node" />
2
- import type { HydrogenConfig } from './types';
2
+ import { Logger } from './utilities/log';
3
+ import type { ImportGlobEagerOutput } from './types';
4
+ import { ServerComponentResponse } from './framework/Hydration/ServerComponentResponse.server';
5
+ import { ServerComponentRequest } from './framework/Hydration/ServerComponentRequest.server';
3
6
  import type { ServerResponse, IncomingMessage } from 'http';
4
7
  import { RuntimeContext } from './framework/runtime';
5
8
  declare global {
@@ -19,5 +22,14 @@ interface RequestHandlerOptions {
19
22
  export interface RequestHandler {
20
23
  (request: Request | IncomingMessage, options: RequestHandlerOptions): Promise<Response | undefined>;
21
24
  }
22
- export declare const renderHydrogen: (App: any, hydrogenConfig?: HydrogenConfig | undefined) => RequestHandler;
25
+ export declare const renderHydrogen: (App: any) => RequestHandler;
26
+ declare type SharedServerProps = {
27
+ state?: object | null;
28
+ request: ServerComponentRequest;
29
+ response: ServerComponentResponse;
30
+ log: Logger;
31
+ };
32
+ export declare type AppProps = SharedServerProps & {
33
+ routes?: ImportGlobEagerOutput;
34
+ };
23
35
  export default renderHydrogen;