@rebuy/rebuy-hydrogen 3.0.0-beta.1 → 3.0.0-beta.11

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 (190) hide show
  1. package/README.md +195 -17
  2. package/dist/assets/Close.d.ts +2 -0
  3. package/dist/assets/Close.d.ts.map +1 -0
  4. package/dist/components/AddToCartBtn/AddToCartBtn.d.ts +3 -0
  5. package/dist/components/AddToCartBtn/AddToCartBtn.d.ts.map +1 -0
  6. package/dist/components/AddToCartBtn/HydrogenAddToCartBtn.d.ts +3 -0
  7. package/dist/components/AddToCartBtn/HydrogenAddToCartBtn.d.ts.map +1 -0
  8. package/dist/components/AddToCartBtn/HydrogenReactAddToCartBtn.d.ts +3 -0
  9. package/dist/components/AddToCartBtn/HydrogenReactAddToCartBtn.d.ts.map +1 -0
  10. package/dist/components/AddToCartBtn/index.d.ts +2 -0
  11. package/dist/components/AddToCartBtn/index.d.ts.map +1 -0
  12. package/{src/components/AddToCartBtn/types.ts → dist/components/AddToCartBtn/types.d.ts} +2 -2
  13. package/dist/components/AddToCartBtn/types.d.ts.map +1 -0
  14. package/dist/components/ProductCard/ProductCard.d.ts +3 -0
  15. package/dist/components/ProductCard/ProductCard.d.ts.map +1 -0
  16. package/dist/components/ProductCard/defaultSettings.d.ts +3 -0
  17. package/dist/components/ProductCard/defaultSettings.d.ts.map +1 -0
  18. package/dist/components/ProductCard/index.d.ts +3 -0
  19. package/dist/components/ProductCard/index.d.ts.map +1 -0
  20. package/dist/components/ProductCard/types.d.ts +52 -0
  21. package/dist/components/ProductCard/types.d.ts.map +1 -0
  22. package/dist/components/ProductCarousel/ProductCarousel.d.ts +16 -0
  23. package/dist/components/ProductCarousel/ProductCarousel.d.ts.map +1 -0
  24. package/dist/components/ProductCarousel/index.d.ts +2 -0
  25. package/dist/components/ProductCarousel/index.d.ts.map +1 -0
  26. package/dist/components/ProductPrice/ProductPrice.d.ts +3 -0
  27. package/dist/components/ProductPrice/ProductPrice.d.ts.map +1 -0
  28. package/dist/components/ProductPrice/index.d.ts +2 -0
  29. package/dist/components/ProductPrice/index.d.ts.map +1 -0
  30. package/dist/components/ProductPrice/types.d.ts +23 -0
  31. package/dist/components/ProductPrice/types.d.ts.map +1 -0
  32. package/dist/components/QuantityInput/QuantityInput.d.ts +3 -0
  33. package/dist/components/QuantityInput/QuantityInput.d.ts.map +1 -0
  34. package/dist/components/QuantityInput/index.d.ts +3 -0
  35. package/dist/components/QuantityInput/index.d.ts.map +1 -0
  36. package/dist/components/QuantityInput/types.d.ts +7 -0
  37. package/dist/components/QuantityInput/types.d.ts.map +1 -0
  38. package/dist/components/Timer/Timer.d.ts +3 -0
  39. package/dist/components/Timer/Timer.d.ts.map +1 -0
  40. package/dist/components/Timer/index.d.ts +3 -0
  41. package/dist/components/Timer/index.d.ts.map +1 -0
  42. package/dist/components/Timer/types.d.ts +16 -0
  43. package/dist/components/Timer/types.d.ts.map +1 -0
  44. package/dist/components/Title/Title.d.ts +3 -0
  45. package/dist/components/Title/Title.d.ts.map +1 -0
  46. package/dist/components/Title/index.d.ts +2 -0
  47. package/dist/components/Title/index.d.ts.map +1 -0
  48. package/{src/components/Title/types.ts → dist/components/Title/types.d.ts} +2 -1
  49. package/dist/components/Title/types.d.ts.map +1 -0
  50. package/dist/components/VariantSelect/VariantSelect.d.ts +3 -0
  51. package/dist/components/VariantSelect/VariantSelect.d.ts.map +1 -0
  52. package/dist/components/VariantSelect/index.d.ts +2 -0
  53. package/dist/components/VariantSelect/index.d.ts.map +1 -0
  54. package/{src/components/VariantSelect/types.ts → dist/components/VariantSelect/types.d.ts} +3 -1
  55. package/dist/components/VariantSelect/types.d.ts.map +1 -0
  56. package/dist/constants/api.d.ts +2 -0
  57. package/dist/constants/api.d.ts.map +1 -0
  58. package/dist/context/RebuyConfigContext.d.ts +21 -0
  59. package/dist/context/RebuyConfigContext.d.ts.map +1 -0
  60. package/{src/context/RebuyContext.tsx → dist/context/RebuyContext.d.ts} +2 -5
  61. package/dist/context/RebuyContext.d.ts.map +1 -0
  62. package/dist/hooks/titleLevel.d.ts +3 -0
  63. package/dist/hooks/titleLevel.d.ts.map +1 -0
  64. package/dist/hooks/useBreakpoint.d.ts +5 -0
  65. package/dist/hooks/useBreakpoint.d.ts.map +1 -0
  66. package/dist/hooks/usePopupTrigger.d.ts +3 -0
  67. package/dist/hooks/usePopupTrigger.d.ts.map +1 -0
  68. package/dist/hooks/useRebuyTheme.d.ts +21 -0
  69. package/dist/hooks/useRebuyTheme.d.ts.map +1 -0
  70. package/dist/index.css +853 -0
  71. package/dist/index.css.map +7 -0
  72. package/dist/index.d.ts +14 -0
  73. package/dist/index.d.ts.map +1 -0
  74. package/dist/index.js +3211 -0
  75. package/dist/index.js.map +7 -0
  76. package/dist/index.mjs +3178 -0
  77. package/dist/index.mjs.map +7 -0
  78. package/dist/providers/RebuyHydrogenContextProvider.d.ts +3 -0
  79. package/dist/providers/RebuyHydrogenContextProvider.d.ts.map +1 -0
  80. package/dist/providers/RebuyHydrogenReactContextProvider.d.ts +8 -0
  81. package/dist/providers/RebuyHydrogenReactContextProvider.d.ts.map +1 -0
  82. package/{src/providers/types.ts → dist/providers/types.d.ts} +31 -18
  83. package/dist/providers/types.d.ts.map +1 -0
  84. package/dist/queries/cart.queries.d.ts +5 -0
  85. package/dist/queries/cart.queries.d.ts.map +1 -0
  86. package/dist/rebuy-rebuy-hydrogen-3.0.0-beta.11.tgz +0 -0
  87. package/dist/types/common.d.ts +9 -0
  88. package/dist/types/common.d.ts.map +1 -0
  89. package/{src/types/rebuyCustom.ts → dist/types/rebuyCustom.d.ts} +62 -50
  90. package/dist/types/rebuyCustom.d.ts.map +1 -0
  91. package/{src/types/rebuySmartCart.ts → dist/types/rebuySmartCart.d.ts} +1 -5
  92. package/dist/types/rebuySmartCart.d.ts.map +1 -0
  93. package/dist/types/shopify.d.ts +85 -0
  94. package/dist/types/shopify.d.ts.map +1 -0
  95. package/{src/types/widgets.ts → dist/types/widgets.d.ts} +7 -13
  96. package/dist/types/widgets.d.ts.map +1 -0
  97. package/dist/utils/convertToRebuyProduct.d.ts +156 -0
  98. package/dist/utils/convertToRebuyProduct.d.ts.map +1 -0
  99. package/dist/utils/createContextParameters.d.ts +3 -0
  100. package/dist/utils/createContextParameters.d.ts.map +1 -0
  101. package/dist/utils/csp.d.ts +16 -0
  102. package/dist/utils/csp.d.ts.map +1 -0
  103. package/dist/utils/getEncodedAttributes.d.ts +3 -0
  104. package/dist/utils/getEncodedAttributes.d.ts.map +1 -0
  105. package/dist/utils/getRebuyConfig.d.ts +3 -0
  106. package/dist/utils/getRebuyConfig.d.ts.map +1 -0
  107. package/dist/utils/theme.d.ts +20 -0
  108. package/dist/utils/theme.d.ts.map +1 -0
  109. package/dist/widgetContainer/RebuyWidgetContainer.d.ts +8 -0
  110. package/dist/widgetContainer/RebuyWidgetContainer.d.ts.map +1 -0
  111. package/dist/widgets/RebuyCompleteTheLook/RebuyCompleteTheLook.d.ts +3 -0
  112. package/dist/widgets/RebuyCompleteTheLook/RebuyCompleteTheLook.d.ts.map +1 -0
  113. package/{src/widgets/RebuyCompleteTheLook/index.ts → dist/widgets/RebuyCompleteTheLook/index.d.ts} +1 -0
  114. package/dist/widgets/RebuyCompleteTheLook/index.d.ts.map +1 -0
  115. package/{src/widgets/RebuyCompleteTheLook/types.ts → dist/widgets/RebuyCompleteTheLook/types.d.ts} +1 -1
  116. package/dist/widgets/RebuyCompleteTheLook/types.d.ts.map +1 -0
  117. package/dist/widgets/RebuyDynamicBundleProducts/BundleImages.d.ts +5 -0
  118. package/dist/widgets/RebuyDynamicBundleProducts/BundleImages.d.ts.map +1 -0
  119. package/dist/widgets/RebuyDynamicBundleProducts/BundlePrice.d.ts +5 -0
  120. package/dist/widgets/RebuyDynamicBundleProducts/BundlePrice.d.ts.map +1 -0
  121. package/dist/widgets/RebuyDynamicBundleProducts/BundleSelection.d.ts +3 -0
  122. package/dist/widgets/RebuyDynamicBundleProducts/BundleSelection.d.ts.map +1 -0
  123. package/dist/widgets/RebuyDynamicBundleProducts/RebuyDynamicBundleProducts.d.ts +3 -0
  124. package/dist/widgets/RebuyDynamicBundleProducts/RebuyDynamicBundleProducts.d.ts.map +1 -0
  125. package/dist/widgets/RebuyDynamicBundleProducts/Select.d.ts +3 -0
  126. package/dist/widgets/RebuyDynamicBundleProducts/Select.d.ts.map +1 -0
  127. package/{src/widgets/RebuyDynamicBundleProducts/index.ts → dist/widgets/RebuyDynamicBundleProducts/index.d.ts} +1 -0
  128. package/dist/widgets/RebuyDynamicBundleProducts/index.d.ts.map +1 -0
  129. package/{src/widgets/RebuyDynamicBundleProducts/types.ts → dist/widgets/RebuyDynamicBundleProducts/types.d.ts} +1 -5
  130. package/dist/widgets/RebuyDynamicBundleProducts/types.d.ts.map +1 -0
  131. package/dist/widgets/RebuyProductAddOns/RebuyProductAddOnCard.d.ts +3 -0
  132. package/dist/widgets/RebuyProductAddOns/RebuyProductAddOnCard.d.ts.map +1 -0
  133. package/dist/widgets/RebuyProductAddOns/RebuyProductAddOns.d.ts +3 -0
  134. package/dist/widgets/RebuyProductAddOns/RebuyProductAddOns.d.ts.map +1 -0
  135. package/{src/widgets/RebuyProductAddOns/index.ts → dist/widgets/RebuyProductAddOns/index.d.ts} +1 -0
  136. package/dist/widgets/RebuyProductAddOns/index.d.ts.map +1 -0
  137. package/{src/widgets/RebuyProductAddOns/types.ts → dist/widgets/RebuyProductAddOns/types.d.ts} +2 -7
  138. package/dist/widgets/RebuyProductAddOns/types.d.ts.map +1 -0
  139. package/dist/widgets/RebuyProductRecommendations/RebuyProductRecommendations.d.ts +3 -0
  140. package/dist/widgets/RebuyProductRecommendations/RebuyProductRecommendations.d.ts.map +1 -0
  141. package/{src/widgets/RebuyProductRecommendations/index.ts → dist/widgets/RebuyProductRecommendations/index.d.ts} +1 -0
  142. package/dist/widgets/RebuyProductRecommendations/index.d.ts.map +1 -0
  143. package/{src/widgets/RebuyProductRecommendations/types.ts → dist/widgets/RebuyProductRecommendations/types.d.ts} +1 -1
  144. package/dist/widgets/RebuyProductRecommendations/types.d.ts.map +1 -0
  145. package/dist/widgets/RebuyWidget/RebuyWidget.d.ts +3 -0
  146. package/dist/widgets/RebuyWidget/RebuyWidget.d.ts.map +1 -0
  147. package/dist/widgets/RebuyWidget/WidgetContent.d.ts +3 -0
  148. package/dist/widgets/RebuyWidget/WidgetContent.d.ts.map +1 -0
  149. package/dist/widgets/RebuyWidget/index.d.ts +2 -0
  150. package/dist/widgets/RebuyWidget/index.d.ts.map +1 -0
  151. package/dist/widgets/RebuyWidget/types.d.ts +335 -0
  152. package/dist/widgets/RebuyWidget/types.d.ts.map +1 -0
  153. package/package.json +50 -37
  154. package/src/components/AddToCartBtn/AddToCartBtn.tsx +0 -45
  155. package/src/components/AddToCartBtn/HydrogenAddToCartBtn.tsx +0 -43
  156. package/src/components/AddToCartBtn/HydrogenReactAddToCartBtn.tsx +0 -35
  157. package/src/components/AddToCartBtn/index.ts +0 -1
  158. package/src/components/ProductCard/ProductCard.tsx +0 -70
  159. package/src/components/ProductCard/index.ts +0 -1
  160. package/src/components/ProductCard/types.ts +0 -10
  161. package/src/components/ProductPrice/ProductPrice.tsx +0 -49
  162. package/src/components/ProductPrice/index.ts +0 -1
  163. package/src/components/Title/Title.tsx +0 -20
  164. package/src/components/Title/index.ts +0 -1
  165. package/src/components/VariantSelect/VariantSelect.tsx +0 -45
  166. package/src/components/VariantSelect/index.ts +0 -1
  167. package/src/hooks/titleLevel.tsx +0 -42
  168. package/src/index.ts +0 -7
  169. package/src/providers/RebuyHydrogenContextProvider.tsx +0 -112
  170. package/src/providers/RebuyHydrogenReactContextProvider.tsx +0 -192
  171. package/src/queries/cart.queries.ts +0 -467
  172. package/src/types/common.ts +0 -8
  173. package/src/types/css.d.ts +0 -11
  174. package/src/types/env.d.ts +0 -12
  175. package/src/types/rebuy.d.ts +0 -31
  176. package/src/types/shopify.ts +0 -142
  177. package/src/utils/convertToRebuyProduct.tsx +0 -319
  178. package/src/utils/createContextParameters.ts +0 -142
  179. package/src/utils/getEncodedAttributes.ts +0 -11
  180. package/src/utils/getRebuyConfig.ts +0 -31
  181. package/src/widgetContainer/RebuyWidgetContainer.tsx +0 -183
  182. package/src/widgets/RebuyCompleteTheLook/RebuyCompleteTheLook.tsx +0 -50
  183. package/src/widgets/RebuyDynamicBundleProducts/BundleImages.tsx +0 -62
  184. package/src/widgets/RebuyDynamicBundleProducts/BundlePrice.tsx +0 -93
  185. package/src/widgets/RebuyDynamicBundleProducts/BundleSelection.tsx +0 -65
  186. package/src/widgets/RebuyDynamicBundleProducts/RebuyDynamicBundleProducts.tsx +0 -118
  187. package/src/widgets/RebuyDynamicBundleProducts/Select.tsx +0 -41
  188. package/src/widgets/RebuyProductAddOns/RebuyProductAddOnCard.tsx +0 -66
  189. package/src/widgets/RebuyProductAddOns/RebuyProductAddOns.tsx +0 -218
  190. package/src/widgets/RebuyProductRecommendations/RebuyProductRecommendations.tsx +0 -50
@@ -0,0 +1,3 @@
1
+ import type { RebuyHydrogenContextProviderProps } from '~/providers/types';
2
+ export declare const RebuyHydrogenContextProvider: ({ cart, children, overrideApiKey, publicStoreDomain, shop, }: RebuyHydrogenContextProviderProps) => import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=RebuyHydrogenContextProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RebuyHydrogenContextProvider.d.ts","sourceRoot":"","sources":["../../src/providers/RebuyHydrogenContextProvider.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAA6B,iCAAiC,EAAE,MAAM,mBAAmB,CAAC;AAwDtG,eAAO,MAAM,4BAA4B,GAAI,8DAM1C,iCAAiC,4CAsBnC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { RebuyHydrogenReactContextProviderProps } from '~/providers/types';
2
+ /**
3
+ * Outer provider component responsible for setting up ShopifyProvider,
4
+ * CartProvider (from @shopify/hydrogen-react), and wrapping the application
5
+ * with the RebuyHydrogenReactContext.
6
+ */
7
+ export declare const RebuyHydrogenReactContextProvider: ({ cartFragment, children, countryIsoCode, customerAccessToken, data, languageIsoCode, numCartLines, onAttributesUpdate, onAttributesUpdateComplete, onBuyerIdentityUpdate, onBuyerIdentityUpdateComplete, onCreate, onCreateComplete, onDiscountCodesUpdate, onDiscountCodesUpdateComplete, onLineAdd, onLineAddComplete, onLineRemove, onLineRemoveComplete, onLineUpdate, onLineUpdateComplete, onNoteUpdate, onNoteUpdateComplete, overrideApiKey, publicPrimaryDomian, publicStoreDomain, publicStorefrontApiToken, publicStorefrontId, storefrontApiVersion, }: RebuyHydrogenReactContextProviderProps) => import("react/jsx-runtime").JSX.Element;
8
+ //# sourceMappingURL=RebuyHydrogenReactContextProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RebuyHydrogenReactContextProvider.d.ts","sourceRoot":"","sources":["../../src/providers/RebuyHydrogenReactContextProvider.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,sCAAsC,EAA2B,MAAM,mBAAmB,CAAC;AAsFzG;;;;GAIG;AACH,eAAO,MAAM,iCAAiC,GAAI,qiBAoC/C,sCAAsC,4CAgFxC,CAAC"}
@@ -1,22 +1,21 @@
1
- import { PartialDeep } from 'type-fest';
2
-
3
- import type { CartReturn } from '@shopify/hydrogen';
4
- import type {
5
- Attribute,
6
- Cart,
7
- CartLine,
8
- ComponentizableCartLine,
9
- CountryCode,
10
- LanguageCode,
11
- Maybe,
12
- } from '@shopify/hydrogen-react/storefront-api-types';
13
-
1
+ import type { Cart as HydrogenStorefrontApiCart } from '@shopify/hydrogen/storefront-api-types';
2
+ import type { Attribute, Cart, CartLine, ComponentizableCartLine, CountryCode, LanguageCode, Maybe } from '@shopify/hydrogen-react/storefront-api-types';
3
+ import { type PartialDeep } from 'type-fest';
4
+ export type RebuyHydrogenContextProps = {
5
+ children: React.ReactNode;
6
+ shop: string;
7
+ sourceHydrogenCart?: HydrogenStorefrontApiCart | null;
8
+ };
14
9
  export type RebuyHydrogenContextProviderProps = {
15
- cart: CartReturn;
10
+ cart: Promise<HydrogenStorefrontApiCart | null>;
16
11
  children: React.ReactNode;
12
+ enableSmartCart?: boolean;
13
+ overrideApiKey?: string;
14
+ publicStoreDomain: string;
15
+ shop: string;
17
16
  };
18
-
19
17
  export type RebuyHydrogenProps = {
18
+ apiKey?: string;
20
19
  cartAttributes?: Attribute[];
21
20
  cartCost?: string;
22
21
  cartId?: string;
@@ -24,18 +23,24 @@ export type RebuyHydrogenProps = {
24
23
  cartNote?: Maybe<string>;
25
24
  cartQuantity?: number;
26
25
  children: React.ReactNode;
26
+ publicStoreDomain: string;
27
+ shop: string;
27
28
  };
28
-
29
29
  export type RebuyHydrogenReactProps = {
30
30
  children: React.ReactNode;
31
+ enableSmartCart?: boolean;
32
+ publicPrimaryDomian: string;
33
+ shop?: string;
31
34
  };
32
-
33
35
  export type RebuyHydrogenReactContextProviderProps = {
34
36
  cartFragment?: string;
35
37
  children: React.ReactNode;
36
38
  countryIsoCode?: CountryCode;
37
39
  customerAccessToken?: string;
38
- data?: PartialDeep<Cart, { recurseIntoArrays: true }>;
40
+ data?: PartialDeep<Cart, {
41
+ recurseIntoArrays: true;
42
+ }>;
43
+ enableSmartCart?: boolean;
39
44
  languageIsoCode?: LanguageCode;
40
45
  numCartLines?: number;
41
46
  onAttributesUpdate?: () => void;
@@ -54,5 +59,13 @@ export type RebuyHydrogenReactContextProviderProps = {
54
59
  onLineUpdateComplete?: () => void;
55
60
  onNoteUpdate?: () => void;
56
61
  onNoteUpdateComplete?: () => void;
62
+ overrideApiKey?: string;
63
+ publicPrimaryDomian: string;
64
+ publicStoreDomain: string;
65
+ publicStorefrontApiToken: string;
66
+ publicStorefrontId: string;
67
+ publicStorefrontToken: string;
68
+ shop?: string;
57
69
  storefrontApiVersion?: string;
58
70
  };
71
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../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AAC;IAC1B,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAC;IAClC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,wBAAwB,EAAE,MAAM,CAAC;IACjC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oBAAoB,CAAC,EAAE,MAAM,CAAC;CACjC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const OPTION_FRAGMENT = "#graphql\n fragment OptionFragment on ProductOption {\n id\n name\n optionValues {\n id\n name\n swatch {\n color\n image {\n mediaContentType\n previewImage {\n height\n id\n url\n width\n altText\n }\n id\n alt\n }\n }\n }\n }\n";
2
+ export declare const CART_LINE_FRAGMENT: "#graphql\n fragment CartLineFragment on CartLine {\n id\n quantity\n cost {\n amountPerQuantity {\n amount\n currencyCode\n }\n compareAtAmountPerQuantity {\n amount\n currencyCode\n }\n totalAmount {\n amount\n currencyCode\n }\n subtotalAmount {\n amount\n currencyCode\n }\n }\n attributes {\n key\n value\n }\n discountAllocations {\n discountedAmount {\n amount\n currencyCode\n }\n ... on CartAutomaticDiscountAllocation {\n __typename\n discountedAmount {\n amount\n currencyCode\n }\n title\n }\n ... on CartCodeDiscountAllocation {\n __typename\n code\n discountedAmount {\n amount\n currencyCode\n }\n }\n ... on CartCustomDiscountAllocation {\n __typename\n discountedAmount {\n amount\n currencyCode\n }\n title\n }\n }\n merchandise {\n ... on ProductVariant {\n availableForSale\n id\n sku\n title\n compareAtPrice {\n amount\n currencyCode\n }\n image {\n altText\n height\n id\n url\n width\n }\n price {\n amount\n currencyCode\n }\n product {\n handle\n id\n productType\n tags\n title\n vendor\n collections(first: 10) {\n nodes {\n handle\n }\n }\n options {\n ...OptionFragment\n }\n images(first: 20) {\n nodes {\n altText\n height\n id\n url\n width\n }\n }\n }\n selectedOptions {\n name\n value\n }\n }\n }\n }\n";
3
+ export declare const CART_LINE_COMPONENT_FRAGMENT: "#graphql\n fragment CartLineComponentFragment on ComponentizableCartLine {\n id\n quantity\n cost {\n amountPerQuantity {\n amount\n currencyCode\n }\n compareAtAmountPerQuantity {\n amount\n currencyCode\n }\n totalAmount {\n amount\n currencyCode\n }\n subtotalAmount {\n amount\n currencyCode\n }\n }\n attributes {\n key\n value\n }\n discountAllocations {\n discountedAmount {\n amount\n currencyCode\n }\n ... on CartAutomaticDiscountAllocation {\n __typename\n discountedAmount {\n amount\n currencyCode\n }\n title\n }\n ... on CartCodeDiscountAllocation {\n __typename\n code\n discountedAmount {\n amount\n currencyCode\n }\n }\n ... on CartCustomDiscountAllocation {\n __typename\n discountedAmount {\n amount\n currencyCode\n }\n title\n }\n }\n merchandise {\n ... on ProductVariant {\n availableForSale\n id\n sku\n title\n compareAtPrice {\n amount\n currencyCode\n }\n image {\n altText\n height\n id\n url\n width\n }\n price {\n amount\n currencyCode\n }\n product {\n handle\n id\n productType\n tags\n title\n vendor\n collections(first: 10) {\n nodes {\n handle\n }\n }\n options {\n id\n name\n optionValues {\n id\n name\n swatch {\n color\n image {\n mediaContentType\n previewImage {\n height\n id\n url\n width\n altText\n }\n id\n alt\n }\n }\n }\n }\n images(first: 20) {\n nodes {\n altText\n height\n id\n url\n width\n }\n }\n }\n selectedOptions {\n name\n value\n }\n }\n }\n lineComponents {\n id\n quantity\n cost {\n amountPerQuantity {\n amount\n currencyCode\n }\n compareAtAmountPerQuantity {\n amount\n currencyCode\n }\n totalAmount {\n amount\n currencyCode\n }\n subtotalAmount {\n amount\n currencyCode\n }\n }\n attributes {\n key\n value\n }\n discountAllocations {\n discountedAmount {\n amount\n currencyCode\n }\n ... on CartAutomaticDiscountAllocation {\n __typename\n discountedAmount {\n amount\n currencyCode\n }\n title\n }\n ... on CartCodeDiscountAllocation {\n __typename\n code\n discountedAmount {\n amount\n currencyCode\n }\n }\n ... on CartCustomDiscountAllocation {\n __typename\n discountedAmount {\n amount\n currencyCode\n }\n title\n }\n }\n merchandise {\n ... on ProductVariant {\n availableForSale\n id\n sku\n title\n compareAtPrice {\n amount\n currencyCode\n }\n image {\n altText\n height\n id\n url\n width\n }\n price {\n amount\n currencyCode\n }\n product {\n handle\n id\n productType\n tags\n title\n vendor\n collections(first: 10) {\n nodes {\n handle\n }\n }\n options {\n ...OptionFragment\n }\n images(first: 20) {\n nodes {\n altText\n height\n id\n url\n width\n }\n }\n }\n selectedOptions {\n name\n value\n }\n }\n }\n }\n }\n";
4
+ export declare const CART_FRAGMENT: "#graphql\n fragment CartFragment on Cart {\n id\n checkoutUrl\n createdAt\n totalQuantity\n note\n updatedAt\n __typename\n buyerIdentity {\n countryCode\n customer {\n id\n email\n firstName\n lastName\n displayName\n }\n email\n phone\n }\n attributes {\n key\n value\n }\n cost {\n subtotalAmount {\n amount\n currencyCode\n }\n totalAmount {\n amount\n currencyCode\n }\n }\n discountAllocations {\n discountedAmount {\n amount\n currencyCode\n }\n ... on CartAutomaticDiscountAllocation {\n __typename\n discountedAmount {\n amount\n currencyCode\n }\n title\n }\n ... on CartCodeDiscountAllocation {\n __typename\n code\n discountedAmount {\n amount\n currencyCode\n }\n }\n ... on CartCustomDiscountAllocation {\n __typename\n discountedAmount {\n amount\n currencyCode\n }\n title\n }\n }\n discountCodes {\n applicable\n code\n }\n lines(first: $numCartLines) {\n edges {\n node {\n ...CartLineComponentFragment\n }\n }\n edges {\n node {\n ...CartLineFragment\n }\n }\n }\n }\n #graphql\n fragment CartLineFragment on CartLine {\n id\n quantity\n cost {\n amountPerQuantity {\n amount\n currencyCode\n }\n compareAtAmountPerQuantity {\n amount\n currencyCode\n }\n totalAmount {\n amount\n currencyCode\n }\n subtotalAmount {\n amount\n currencyCode\n }\n }\n attributes {\n key\n value\n }\n discountAllocations {\n discountedAmount {\n amount\n currencyCode\n }\n ... on CartAutomaticDiscountAllocation {\n __typename\n discountedAmount {\n amount\n currencyCode\n }\n title\n }\n ... on CartCodeDiscountAllocation {\n __typename\n code\n discountedAmount {\n amount\n currencyCode\n }\n }\n ... on CartCustomDiscountAllocation {\n __typename\n discountedAmount {\n amount\n currencyCode\n }\n title\n }\n }\n merchandise {\n ... on ProductVariant {\n availableForSale\n id\n sku\n title\n compareAtPrice {\n amount\n currencyCode\n }\n image {\n altText\n height\n id\n url\n width\n }\n price {\n amount\n currencyCode\n }\n product {\n handle\n id\n productType\n tags\n title\n vendor\n collections(first: 10) {\n nodes {\n handle\n }\n }\n options {\n ...OptionFragment\n }\n images(first: 20) {\n nodes {\n altText\n height\n id\n url\n width\n }\n }\n }\n selectedOptions {\n name\n value\n }\n }\n }\n }\n\n #graphql\n fragment CartLineComponentFragment on ComponentizableCartLine {\n id\n quantity\n cost {\n amountPerQuantity {\n amount\n currencyCode\n }\n compareAtAmountPerQuantity {\n amount\n currencyCode\n }\n totalAmount {\n amount\n currencyCode\n }\n subtotalAmount {\n amount\n currencyCode\n }\n }\n attributes {\n key\n value\n }\n discountAllocations {\n discountedAmount {\n amount\n currencyCode\n }\n ... on CartAutomaticDiscountAllocation {\n __typename\n discountedAmount {\n amount\n currencyCode\n }\n title\n }\n ... on CartCodeDiscountAllocation {\n __typename\n code\n discountedAmount {\n amount\n currencyCode\n }\n }\n ... on CartCustomDiscountAllocation {\n __typename\n discountedAmount {\n amount\n currencyCode\n }\n title\n }\n }\n merchandise {\n ... on ProductVariant {\n availableForSale\n id\n sku\n title\n compareAtPrice {\n amount\n currencyCode\n }\n image {\n altText\n height\n id\n url\n width\n }\n price {\n amount\n currencyCode\n }\n product {\n handle\n id\n productType\n tags\n title\n vendor\n collections(first: 10) {\n nodes {\n handle\n }\n }\n options {\n id\n name\n optionValues {\n id\n name\n swatch {\n color\n image {\n mediaContentType\n previewImage {\n height\n id\n url\n width\n altText\n }\n id\n alt\n }\n }\n }\n }\n images(first: 20) {\n nodes {\n altText\n height\n id\n url\n width\n }\n }\n }\n selectedOptions {\n name\n value\n }\n }\n }\n lineComponents {\n id\n quantity\n cost {\n amountPerQuantity {\n amount\n currencyCode\n }\n compareAtAmountPerQuantity {\n amount\n currencyCode\n }\n totalAmount {\n amount\n currencyCode\n }\n subtotalAmount {\n amount\n currencyCode\n }\n }\n attributes {\n key\n value\n }\n discountAllocations {\n discountedAmount {\n amount\n currencyCode\n }\n ... on CartAutomaticDiscountAllocation {\n __typename\n discountedAmount {\n amount\n currencyCode\n }\n title\n }\n ... on CartCodeDiscountAllocation {\n __typename\n code\n discountedAmount {\n amount\n currencyCode\n }\n }\n ... on CartCustomDiscountAllocation {\n __typename\n discountedAmount {\n amount\n currencyCode\n }\n title\n }\n }\n merchandise {\n ... on ProductVariant {\n availableForSale\n id\n sku\n title\n compareAtPrice {\n amount\n currencyCode\n }\n image {\n altText\n height\n id\n url\n width\n }\n price {\n amount\n currencyCode\n }\n product {\n handle\n id\n productType\n tags\n title\n vendor\n collections(first: 10) {\n nodes {\n handle\n }\n }\n options {\n ...OptionFragment\n }\n images(first: 20) {\n nodes {\n altText\n height\n id\n url\n width\n }\n }\n }\n selectedOptions {\n name\n value\n }\n }\n }\n }\n }\n\n #graphql\n fragment OptionFragment on ProductOption {\n id\n name\n optionValues {\n id\n name\n swatch {\n color\n image {\n mediaContentType\n previewImage {\n height\n id\n url\n width\n altText\n }\n id\n alt\n }\n }\n }\n }\n\n";
5
+ //# sourceMappingURL=cart.queries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cart.queries.d.ts","sourceRoot":"","sources":["../../src/queries/cart.queries.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,sYAwB3B,CAAC;AAOF,eAAO,MAAM,kBAAkB,m+DA6GrB,CAAC;AAEX,eAAO,MAAM,4BAA4B,8lJA6O/B,CAAC;AAEX,eAAO,MAAM,aAAa,k2QAqFhB,CAAC"}
@@ -0,0 +1,9 @@
1
+ export declare enum ProductCardTitleLevel {
2
+ H1 = "h1",
3
+ H2 = "h2",
4
+ H3 = "h3",
5
+ H4 = "h4",
6
+ H5 = "h5",
7
+ H6 = "h6"
8
+ }
9
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/types/common.ts"],"names":[],"mappings":"AAAA,oBAAY,qBAAqB;IAC7B,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;CACZ"}
@@ -1,60 +1,71 @@
1
- import type {
2
- Attribute,
3
- CartLine,
4
- Collection,
5
- ComponentizableCartLine,
6
- MoneyV2,
7
- Product,
8
- ProductVariant,
9
- SelectedOption,
10
- } from '@shopify/hydrogen-react/storefront-api-types';
11
- import type { SmartCart } from '~/types/rebuySmartCart';
12
- import type {
13
- HydrogenCollection,
14
- HydrogenProduct,
15
- HydrogenProductVariant,
16
- } from '~/types/shopify';
17
-
1
+ import type { Attribute, CartCost, CartDiscountCode, CartLine, Collection, Cart as HydrogenStorefrontApiCart, MoneyV2, Product, ProductVariant, SelectedOption } from '@shopify/hydrogen/storefront-api-types';
2
+ import type { CartStatus } from '@shopify/hydrogen-react';
3
+ import type { CartInput, AttributeInput as HRAttributeInput, CartLineInput as HRCartLineInput, CartLineUpdateInput as HRCartLineUpdateInput } from '@shopify/hydrogen-react/storefront-api-types';
4
+ import type { HydrogenCollection, HydrogenProduct, HydrogenProductVariant } from '~/types/shopify';
5
+ export type RawCartLine = CartLine;
6
+ export type RawAttribute = Attribute;
7
+ export type RawDiscountCode = CartDiscountCode;
8
+ export type RawCartCost = Pick<CartCost, 'subtotalAmount' | 'totalAmount'>;
9
+ export type HydrogenReactCartActions = {
10
+ cartAttributesUpdate: (attributes: HRAttributeInput[]) => void;
11
+ cartCreate: (cartInput: CartInput) => void;
12
+ discountCodesUpdate: (discountCodes: string[]) => void;
13
+ linesAdd: (lines: HRCartLineInput[]) => void;
14
+ linesRemove: (lineIds: string[]) => void;
15
+ linesUpdate: (lines: HRCartLineUpdateInput[]) => void;
16
+ noteUpdate: (note: string) => void;
17
+ };
18
18
  export type RebuyContextProps = {
19
19
  cacheKey?: string;
20
- cartAttributes?: Attribute[];
20
+ cartAttributes?: RawAttribute[];
21
+ cartCost?: RawCartCost;
21
22
  cartId?: string;
22
- // Depending on where the cart is coming from hydrogen or hydrogen-react the objects are very differetn and this is the only way to account for that
23
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
24
- cartLines?: (CartLine | ComponentizableCartLine)[] | any;
23
+ cartLines?: RawCartLine[];
25
24
  cartLinesLength?: number;
26
25
  cartNote?: string;
27
26
  cartSubtotal?: string;
28
27
  cartTotalQuantity?: number;
28
+ checkoutUrl?: string;
29
+ discountCodes?: RawDiscountCode[];
30
+ hydrogenReactCartActions?: HydrogenReactCartActions;
31
+ hydrogenReactCartError?: unknown;
32
+ hydrogenReactCartStatus?: CartStatus;
29
33
  isHydrogenReact: boolean;
30
34
  queryObject: Record<string, string>;
35
+ sourceHydrogenCart?: HydrogenStorefrontApiCart | Partial<HydrogenStorefrontApiCart> | null;
31
36
  windowUrl: string;
32
37
  };
33
-
38
+ export type ContextParameters = {
39
+ readonly cacheKey?: string;
40
+ readonly cart?: Readonly<CartContext>;
41
+ readonly cartAttributes?: readonly RawAttribute[];
42
+ readonly cartCost?: Readonly<RawCartCost>;
43
+ readonly cartCount: number;
44
+ readonly cartId?: string;
45
+ readonly cartItemCount: number;
46
+ readonly cartLineCount: number;
47
+ readonly cartLines?: readonly RawCartLine[];
48
+ readonly cartNote?: string | null;
49
+ readonly cartSubtotal: number;
50
+ readonly cartToken?: string;
51
+ readonly checkoutUrl?: string;
52
+ readonly discountCodes?: readonly RawDiscountCode[];
53
+ readonly hydrogenCart?: Readonly<HydrogenStorefrontApiCart> | null;
54
+ readonly hydrogenReactCartActions?: Readonly<HydrogenReactCartActions>;
55
+ readonly hydrogenReactCartError?: RebuyContextProps['hydrogenReactCartError'];
56
+ readonly hydrogenReactCartStatus?: RebuyContextProps['hydrogenReactCartStatus'];
57
+ readonly isHydrogenReact: boolean;
58
+ readonly time: string;
59
+ readonly url: string;
60
+ };
34
61
  export type RebuyConfig = {
35
62
  shop: RebuyShop | null;
36
- smart_cart: SmartCart | null;
37
- smart_flows: unknown[]; // TODO: Define type for smart_flows still in beta development
63
+ smart_flows: unknown[];
38
64
  };
39
-
40
65
  export type RebuyResponse = {
41
66
  data: RebuyConfig;
42
67
  response: unknown;
43
68
  };
44
-
45
- export type ContextParameters = {
46
- cache_key?: string;
47
- cart?: CartContext;
48
- cart_count: number;
49
- cart_item_count: number;
50
- cart_line_count: number;
51
- cart_subtotal: number;
52
- cart_token?: string;
53
- isHydrogenReact: boolean; // This detemines if a user is using just Hydrogen or Hydrogen-React. It will determine how we get the cart info
54
- time: string;
55
- url: string;
56
- };
57
-
58
69
  type RebuyShopIntegrations = {
59
70
  attentive: boolean;
60
71
  judgeme: boolean;
@@ -68,7 +79,6 @@ type RebuyShopIntegrations = {
68
79
  stamped: boolean;
69
80
  yotpo: boolean;
70
81
  };
71
-
72
82
  type RebuyShop = {
73
83
  active_experiments: unknown[];
74
84
  api_key: string;
@@ -94,7 +104,6 @@ type RebuyShop = {
94
104
  shopify_selling_plans_enabled: boolean;
95
105
  storefront_access_token: string | null;
96
106
  };
97
-
98
107
  export type CartContext = {
99
108
  attributes: string;
100
109
  item_count: number;
@@ -104,7 +113,6 @@ export type CartContext = {
104
113
  subtotal: number;
105
114
  token: string;
106
115
  };
107
-
108
116
  export type CartItem = {
109
117
  attributes: Attribute[];
110
118
  product_id: string;
@@ -112,23 +120,25 @@ export type CartItem = {
112
120
  quantity: number;
113
121
  variant_id: string;
114
122
  };
115
-
116
123
  export type RebuyWidgetContainerProps = {
124
+ apiKey: string;
117
125
  children?: React.ReactNode;
118
126
  collection?: Collection | HydrogenCollection;
119
127
  collectionId?: string;
120
128
  dataSource?: string;
121
129
  limit?: number;
122
- // wasn't to sure of how we wanted to handle this type. It's my understanding that clients could create their own endpoints so I'm not sure we want to lock down the type
123
130
  options?: object;
124
131
  product?: Product | HydrogenProduct;
125
132
  productId?: string;
126
133
  variant?: ProductVariant | HydrogenProductVariant;
127
134
  variantId?: string;
128
135
  };
129
-
130
136
  export type RebuyProduct = {
131
- collections: { nodes: { handle: string }[] };
137
+ collections: {
138
+ nodes: {
139
+ handle: string;
140
+ }[];
141
+ };
132
142
  compareAtPriceRange: {
133
143
  maxVariantCompareAtPrice: MoneyV2 | null;
134
144
  minVariantCompareAtPrice: MoneyV2 | null;
@@ -161,6 +171,10 @@ export type RebuyProduct = {
161
171
  maxVariantPrice: MoneyV2;
162
172
  minVariantPrice: MoneyV2;
163
173
  };
174
+ reviews?: {
175
+ review_count?: number;
176
+ star_rating?: number;
177
+ };
164
178
  selected: boolean;
165
179
  selectedOptions: Record<string, string>;
166
180
  selectedSellingPlan: unknown;
@@ -177,7 +191,6 @@ export type RebuyProduct = {
177
191
  };
178
192
  vendor: string;
179
193
  };
180
-
181
194
  export type RebuyProductVariant = {
182
195
  availableForSale: boolean;
183
196
  compareAtPriceV2: MoneyV2 | null;
@@ -200,7 +213,6 @@ export type RebuyProductVariant = {
200
213
  sku: string;
201
214
  title: string;
202
215
  };
203
-
204
216
  export type RebuyWidgetMetadata = {
205
217
  also_bot_tracking_ids?: number[];
206
218
  cache_info?: {
@@ -213,7 +225,6 @@ export type RebuyWidgetMetadata = {
213
225
  top_sellers_filled?: boolean;
214
226
  trending_products_filled?: boolean;
215
227
  };
216
-
217
228
  export type Customer = {
218
229
  accepts_marketing: boolean;
219
230
  accepts_marketing_updated_at: string;
@@ -241,7 +252,6 @@ export type Customer = {
241
252
  updated_at: string;
242
253
  verified_email: boolean;
243
254
  };
244
-
245
255
  export type Address = {
246
256
  address1: string;
247
257
  address2: string;
@@ -261,3 +271,5 @@ export type Address = {
261
271
  province_code: string;
262
272
  zip: string;
263
273
  };
274
+ export {};
275
+ //# sourceMappingURL=rebuyCustom.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"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CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,OAAO,EAAE,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,GAAG,EAAE,MAAM,CAAC;CACf,CAAC"}
@@ -11,7 +11,6 @@ export type ProgressBarTier = {
11
11
  products: unknown[];
12
12
  type: string;
13
13
  };
14
-
15
14
  export type ProgressBar = {
16
15
  country_codes: string[];
17
16
  exclude_discount: boolean;
@@ -24,7 +23,6 @@ export type ProgressBar = {
24
23
  name: string;
25
24
  tiers: ProgressBarTier[];
26
25
  };
27
-
28
26
  export type SmartCartLanguage = {
29
27
  bmsm_discount_message: string;
30
28
  bmsm_discount_success: string;
@@ -48,7 +46,6 @@ export type SmartCartLanguage = {
48
46
  view_cart_label: string;
49
47
  view_cart_working_label: string;
50
48
  };
51
-
52
49
  export type SmartCartComponent = {
53
50
  always_visible?: boolean;
54
51
  hidden?: boolean;
@@ -58,13 +55,11 @@ export type SmartCartComponent = {
58
55
  title: string;
59
56
  type: string;
60
57
  };
61
-
62
58
  export type SmartCartAnchor = {
63
59
  components: string[];
64
60
  id: string;
65
61
  title: string;
66
62
  };
67
-
68
63
  export type SmartCart = {
69
64
  accelerated_checkout: {
70
65
  enabled: boolean;
@@ -186,3 +181,4 @@ export type SmartCart = {
186
181
  enabled: boolean;
187
182
  };
188
183
  };
184
+ //# sourceMappingURL=rebuySmartCart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rebuySmartCart.d.ts","sourceRoot":"","sources":["../../src/types/rebuySmartCart.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,sBAAsB,EAAE;QACpB,OAAO,EAAE,OAAO,CAAC;KACpB,CAAC;IACF,4BAA4B,EAAE,OAAO,CAAC;IACtC,iCAAiC,EAAE,MAAM,CAAC;IAC1C,8BAA8B,EAAE,OAAO,CAAC;IACxC,mCAAmC,EAAE,MAAM,CAAC;IAC5C,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACtB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,6BAA6B,EAAE,OAAO,CAAC;IACvC,6BAA6B,EAAE,OAAO,CAAC;IACvC,mBAAmB,EAAE,OAAO,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AC;QAC3B,OAAO,EAAE,OAAO,CAAC;QACjB,QAAQ,EAAE;YACN,iBAAiB,EAAE,MAAM,CAAC;YAC1B,0BAA0B,EAAE,MAAM,CAAC;YACnC,oBAAoB,EAAE,MAAM,CAAC;YAC7B,+BAA+B,EAAE,MAAM,CAAC;YACxC,yBAAyB,EAAE,MAAM,CAAC;YAClC,yCAAyC,EAAE,MAAM,CAAC;YAClD,6BAA6B,EAAE,MAAM,CAAC;YACtC,8CAA8C,EAAE,MAAM,CAAC;YACvD,eAAe,EAAE,MAAM,CAAC;SAC3B,CAAC;KACL,CAAC;IACF,KAAK,EAAE;QACH,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,EAAE,OAAO,CAAC;KACpB,CAAC;IACF,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE;QACd,OAAO,EAAE,OAAO,CAAC;KACpB,CAAC;CACL,CAAC"}
@@ -0,0 +1,85 @@
1
+ import type { Collection, Image, Maybe, MoneyV2, PageInfo, Product, ProductOption, ProductOptionValue, ProductOptionValueSwatch, ProductVariant, SelectedOption, Seo } from '@shopify/hydrogen-react/storefront-api-types';
2
+ import type { RebuyProductVariant } from './rebuyCustom';
3
+ export type HydrogenProduct = Pick<Product, 'id' | 'title' | 'vendor' | 'handle' | 'descriptionHtml' | 'description' | 'encodedVariantExistence' | 'encodedVariantAvailability'> & {
4
+ adjacentVariants: (Pick<ProductVariant, 'availableForSale' | 'id' | 'sku' | 'title'> & {
5
+ compareAtPrice?: Maybe<Pick<MoneyV2, 'amount' | 'currencyCode'>>;
6
+ image?: Maybe<{
7
+ __typename: 'Image';
8
+ } & Pick<Image, 'id' | 'url' | 'altText' | 'width' | 'height'>>;
9
+ price: Pick<MoneyV2, 'amount' | 'currencyCode'>;
10
+ product: Pick<Product, 'title' | 'handle'>;
11
+ selectedOptions: Pick<SelectedOption, 'name' | 'value'>[];
12
+ unitPrice?: Maybe<Pick<MoneyV2, 'amount' | 'currencyCode'>>;
13
+ })[];
14
+ collections: {
15
+ nodes: {
16
+ handle: string;
17
+ }[];
18
+ };
19
+ featuredImage?: {
20
+ altText: string | null;
21
+ height: number;
22
+ id: string;
23
+ url: string;
24
+ width: number;
25
+ };
26
+ images: {
27
+ altText: string | null;
28
+ height: number;
29
+ id: string;
30
+ url: string;
31
+ width: number;
32
+ }[];
33
+ options: (Pick<ProductOption, 'name'> & {
34
+ optionValues: (Pick<ProductOptionValue, 'name'> & {
35
+ firstSelectableVariant?: Maybe<Pick<ProductVariant, 'availableForSale' | 'id' | 'sku' | 'title'> & {
36
+ compareAtPrice?: Maybe<Pick<MoneyV2, 'amount' | 'currencyCode'>>;
37
+ image?: Maybe<{
38
+ __typename: 'Image';
39
+ } & Pick<Image, 'id' | 'url' | 'altText' | 'width' | 'height'>>;
40
+ price: Pick<MoneyV2, 'amount' | 'currencyCode'>;
41
+ product: Pick<Product, 'title' | 'handle'>;
42
+ selectedOptions: Pick<SelectedOption, 'name' | 'value'>[];
43
+ unitPrice?: Maybe<Pick<MoneyV2, 'amount' | 'currencyCode'>>;
44
+ }>;
45
+ swatch?: Maybe<Pick<ProductOptionValueSwatch, 'color'> & {
46
+ image?: Maybe<{
47
+ previewImage?: Maybe<Pick<Image, 'url'>>;
48
+ }>;
49
+ }>;
50
+ })[];
51
+ })[];
52
+ priceRange: {
53
+ maxVariantPrice: MoneyV2;
54
+ minVariantPrice: MoneyV2;
55
+ };
56
+ selectedOrFirstAvailableVariant?: HydrogenProductVariant;
57
+ selectedVariant?: HydrogenProductVariant;
58
+ seo: Pick<Seo, 'description' | 'title'>;
59
+ variants?: {
60
+ nodes: RebuyProductVariant[];
61
+ };
62
+ };
63
+ export type HydrogenProductVariant = Pick<ProductVariant, 'availableForSale' | 'id' | 'sku' | 'title'> & {
64
+ compareAtPrice?: Maybe<Pick<MoneyV2, 'amount' | 'currencyCode'>>;
65
+ image?: Maybe<{
66
+ __typename: 'Image';
67
+ } & Pick<Image, 'id' | 'url' | 'altText' | 'width' | 'height'>>;
68
+ price: Pick<MoneyV2, 'amount' | 'currencyCode'>;
69
+ product: Pick<Product, 'title' | 'handle'>;
70
+ selectedOptions: Pick<SelectedOption, 'name' | 'value'>[];
71
+ unitPrice?: Maybe<Pick<MoneyV2, 'amount' | 'currencyCode'>>;
72
+ };
73
+ export type HydrogenCollection = Pick<Collection, 'id' | 'handle' | 'title' | 'description'> & {
74
+ products: {
75
+ nodes: (Pick<Product, 'id' | 'handle' | 'title'> & {
76
+ featuredImage?: Maybe<Pick<Image, 'id' | 'altText' | 'url' | 'width' | 'height'>>;
77
+ priceRange: {
78
+ maxVariantPrice: Pick<MoneyV2, 'amount' | 'currencyCode'>;
79
+ minVariantPrice: Pick<MoneyV2, 'amount' | 'currencyCode'>;
80
+ };
81
+ })[];
82
+ pageInfo: Pick<PageInfo, 'hasPreviousPage' | 'hasNextPage' | 'endCursor' | 'startCursor'>;
83
+ };
84
+ };
85
+ //# sourceMappingURL=shopify.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shopify.d.ts","sourceRoot":"","sources":["../../src/types/shopify.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,UAAU,EACV,KAAK,EACL,KAAK,EACL,OAAO,EACP,QAAQ,EACR,OAAO,EACP,aAAa,EACb,kBAAkB,EAClB,wBAAwB,EACxB,cAAc,EACd,cAAc,EACd,GAAG,EACN,MAAM,8CAA8C,CAAC;AACtD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEzD,MAAM,MAAM,eAAe,GAAG,IAAI,CAC9B,OAAO,EACL,IAAI,GACJ,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,iBAAiB,GACjB,aAAa,GACb,yBAAyB,GACzB,4BAA4B,CACjC,GAAG;IACA,gBAAgB,EAAE,CAAC,IAAI,CAAC,cAAc,EAAE,kBAAkB,GAAG,IAAI,GAAG,KAAK,GAAG,OAAO,CAAC,GAAG;QACnF,cAAc,CAAC,EAAE,KAAK,CAAC,IAAI,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AAQ,GAAG,cAAc,CAAC,CAAC;gBAC1D,eAAe,EAAE,IAAI,CAAC,OAAO,EAAE,QAAQ,GAAG,cAAc,CAAC,CAAC;aAC7D,CAAC;SACL,CAAC,EAAE,CAAC;QACL,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,iBAAiB,GAAG,aAAa,GAAG,WAAW,GAAG,aAAa,CAAC,CAAC;KAC7F,CAAC;CACL,CAAC"}
@@ -1,12 +1,5 @@
1
+ import { type RebuyProduct, type RebuyProductVariant, type RebuyWidgetMetadata } from '~/types/rebuyCustom';
1
2
  import type { HydrogenProduct } from '~/types/shopify';
2
-
3
- import {
4
- RebuyProduct,
5
- RebuyProductVariant,
6
- RebuyWidgetMetadata,
7
- } from '~/types/rebuyCustom';
8
-
9
- // Internal type with all props from container
10
3
  export type WidgetContainerProvidedProps = {
11
4
  dataSource: string;
12
5
  isHydrogenReact: boolean;
@@ -14,16 +7,17 @@ export type WidgetContainerProvidedProps = {
14
7
  limit: number;
15
8
  metadata: RebuyWidgetMetadata;
16
9
  options: Record<string, unknown>;
17
- product: HydrogenProduct;
18
- productId: string;
10
+ product?: HydrogenProduct;
11
+ productId?: string;
19
12
  products: RebuyProduct[];
20
- variant: RebuyProductVariant;
21
- variantId: string;
13
+ variant?: RebuyProductVariant;
14
+ variantId?: string;
22
15
  };
23
-
24
16
  export type WidgetChildProps = {
25
17
  addToCartCallback?: () => void;
18
+ cacheKey?: string;
26
19
  customTitle?: string;
27
20
  customTitleLevel?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
28
21
  customTitleStyle?: React.CSSProperties;
29
22
  } & Partial<WidgetContainerProvidedProps>;
23
+ //# sourceMappingURL=widgets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"widgets.d.ts","sourceRoot":"","sources":["../../src/types/widgets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,mBAAmB,EAAE,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC5G,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAGvD,MAAM,MAAM,4BAA4B,GAAG;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,OAAO,CAAC;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC3B,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC3D,gBAAgB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC1C,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC"}