@rebuy/rebuy-hydrogen 2.3.1 → 3.0.0-alpha.1

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 (162) 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/dist/components/AddToCartBtn/types.d.ts +27 -0
  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/dist/components/Title/types.d.ts +8 -0
  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/dist/components/VariantSelect/types.d.ts +8 -0
  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/dist/context/RebuyContext.d.ts +6 -0
  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/dist/providers/types.d.ts +71 -0
  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/types/common.d.ts +9 -0
  87. package/dist/types/common.d.ts.map +1 -0
  88. package/dist/types/rebuyCustom.d.ts +275 -0
  89. package/dist/types/rebuyCustom.d.ts.map +1 -0
  90. package/dist/types/rebuySmartCart.d.ts +184 -0
  91. package/dist/types/rebuySmartCart.d.ts.map +1 -0
  92. package/dist/types/shopify.d.ts +85 -0
  93. package/dist/types/shopify.d.ts.map +1 -0
  94. package/dist/types/widgets.d.ts +23 -0
  95. package/dist/types/widgets.d.ts.map +1 -0
  96. package/dist/utils/convertToRebuyProduct.d.ts +156 -0
  97. package/dist/utils/convertToRebuyProduct.d.ts.map +1 -0
  98. package/dist/utils/createContextParameters.d.ts +3 -0
  99. package/dist/utils/createContextParameters.d.ts.map +1 -0
  100. package/dist/utils/csp.d.ts +16 -0
  101. package/dist/utils/csp.d.ts.map +1 -0
  102. package/dist/utils/getEncodedAttributes.d.ts +3 -0
  103. package/dist/utils/getEncodedAttributes.d.ts.map +1 -0
  104. package/dist/utils/getRebuyConfig.d.ts +3 -0
  105. package/dist/utils/getRebuyConfig.d.ts.map +1 -0
  106. package/dist/utils/theme.d.ts +20 -0
  107. package/dist/utils/theme.d.ts.map +1 -0
  108. package/dist/widgetContainer/RebuyWidgetContainer.d.ts +8 -0
  109. package/dist/widgetContainer/RebuyWidgetContainer.d.ts.map +1 -0
  110. package/dist/widgets/RebuyCompleteTheLook/RebuyCompleteTheLook.d.ts +3 -0
  111. package/dist/widgets/RebuyCompleteTheLook/RebuyCompleteTheLook.d.ts.map +1 -0
  112. package/dist/widgets/RebuyCompleteTheLook/index.d.ts +2 -0
  113. package/dist/widgets/RebuyCompleteTheLook/index.d.ts.map +1 -0
  114. package/dist/widgets/RebuyCompleteTheLook/types.d.ts +5 -0
  115. package/dist/widgets/RebuyCompleteTheLook/types.d.ts.map +1 -0
  116. package/dist/widgets/RebuyDynamicBundleProducts/BundleImages.d.ts +5 -0
  117. package/dist/widgets/RebuyDynamicBundleProducts/BundleImages.d.ts.map +1 -0
  118. package/dist/widgets/RebuyDynamicBundleProducts/BundlePrice.d.ts +5 -0
  119. package/dist/widgets/RebuyDynamicBundleProducts/BundlePrice.d.ts.map +1 -0
  120. package/dist/widgets/RebuyDynamicBundleProducts/BundleSelection.d.ts +3 -0
  121. package/dist/widgets/RebuyDynamicBundleProducts/BundleSelection.d.ts.map +1 -0
  122. package/dist/widgets/RebuyDynamicBundleProducts/RebuyDynamicBundleProducts.d.ts +3 -0
  123. package/dist/widgets/RebuyDynamicBundleProducts/RebuyDynamicBundleProducts.d.ts.map +1 -0
  124. package/dist/widgets/RebuyDynamicBundleProducts/Select.d.ts +3 -0
  125. package/dist/widgets/RebuyDynamicBundleProducts/Select.d.ts.map +1 -0
  126. package/dist/widgets/RebuyDynamicBundleProducts/index.d.ts +2 -0
  127. package/dist/widgets/RebuyDynamicBundleProducts/index.d.ts.map +1 -0
  128. package/dist/widgets/RebuyDynamicBundleProducts/types.d.ts +19 -0
  129. package/dist/widgets/RebuyDynamicBundleProducts/types.d.ts.map +1 -0
  130. package/dist/widgets/RebuyProductAddOns/RebuyProductAddOnCard.d.ts +3 -0
  131. package/dist/widgets/RebuyProductAddOns/RebuyProductAddOnCard.d.ts.map +1 -0
  132. package/dist/widgets/RebuyProductAddOns/RebuyProductAddOns.d.ts +3 -0
  133. package/dist/widgets/RebuyProductAddOns/RebuyProductAddOns.d.ts.map +1 -0
  134. package/dist/widgets/RebuyProductAddOns/index.d.ts +2 -0
  135. package/dist/widgets/RebuyProductAddOns/index.d.ts.map +1 -0
  136. package/dist/widgets/RebuyProductAddOns/types.d.ts +19 -0
  137. package/dist/widgets/RebuyProductAddOns/types.d.ts.map +1 -0
  138. package/dist/widgets/RebuyProductRecommendations/RebuyProductRecommendations.d.ts +3 -0
  139. package/dist/widgets/RebuyProductRecommendations/RebuyProductRecommendations.d.ts.map +1 -0
  140. package/dist/widgets/RebuyProductRecommendations/index.d.ts +2 -0
  141. package/dist/widgets/RebuyProductRecommendations/index.d.ts.map +1 -0
  142. package/dist/widgets/RebuyProductRecommendations/types.d.ts +5 -0
  143. package/dist/widgets/RebuyProductRecommendations/types.d.ts.map +1 -0
  144. package/dist/widgets/RebuyWidget/RebuyWidget.d.ts +3 -0
  145. package/dist/widgets/RebuyWidget/RebuyWidget.d.ts.map +1 -0
  146. package/dist/widgets/RebuyWidget/WidgetContent.d.ts +3 -0
  147. package/dist/widgets/RebuyWidget/WidgetContent.d.ts.map +1 -0
  148. package/dist/widgets/RebuyWidget/index.d.ts +2 -0
  149. package/dist/widgets/RebuyWidget/index.d.ts.map +1 -0
  150. package/dist/widgets/RebuyWidget/types.d.ts +335 -0
  151. package/dist/widgets/RebuyWidget/types.d.ts.map +1 -0
  152. package/package.json +86 -47
  153. package/RebuyCompleteTheLook.client.jsx +0 -188
  154. package/RebuyContextProvider.client.jsx +0 -222
  155. package/RebuyContexts.client.jsx +0 -3
  156. package/RebuyDynamicBundleProducts.client.jsx +0 -415
  157. package/RebuyProductAddOnCard.client.jsx +0 -89
  158. package/RebuyProductAddOns.client.jsx +0 -227
  159. package/RebuyProductRecommendations.client.jsx +0 -68
  160. package/RebuyProductViewed.client.jsx +0 -62
  161. package/RebuyRecentlyViewedProducts.client.jsx +0 -68
  162. package/RebuyWidgetContainer.client.jsx +0 -136
package/README.md CHANGED
@@ -1,30 +1,208 @@
1
- # Rebuy + Hydrogen Overview
1
+ # Beta Documentation: Rebuy Hydrogen 2.0
2
2
 
3
- Rebuy + Hydrogen package is a web development framework used for building Shopify custom storefronts. It includes providers, components, and tooling you need to get started so you can spend your time creating intelligent shopping experiences.
3
+ ## Overview
4
4
 
5
- ## Rebuy + Hydrogen 2
5
+ The new beta version of our Rebuy Hydrogen package is designed to work with both Hydrogen and Hydrogen React versions 2.0. We've streamlined this package to be as plug-and-play as possible, with the package handling most of the work. Below you'll find descriptions of each component and implementation instructions for your application.
6
6
 
7
- Rebuy makes it incredibly easy to bring powerful personalized product recommendations and smart search to your Shopify Hydrogen 2.0 Storefront. For more details on this, please check out our [Rebuy + Shopify Hydrogen 2.0 documentation](https://developers.rebuyengine.com/reference/rebuy-shopify-hydrogen-2).
7
+ ## Initial Setup
8
8
 
9
- Components and more coming soon.
9
+ ### Prerequisites
10
10
 
11
- ## How Rebuy + Hydrogen Works
11
+ First, determine whether your application uses:
12
12
 
13
- Rebuy + Hydrogen is a lightweight framework for creating personalized shopping experiences that are lightening fast. The framework is composed of:
13
+ - Hydrogen only
14
+ - Both Hydrogen and Hydrogen React
14
15
 
15
- 1. **Providers** - these components build contextual objects that are used during network calls.
16
- 2. **Containers** - these components get personalized data from Rebuy and pass the resulting information to children components via props.
17
- 3. **Components** - these components can be used to render various merchandising UI.
18
- 4. **Events** - these components automatically track user behaviors.
16
+ This distinction is important as different hooks/functions are used in each case. Note that if you're using Hydrogen React, Hydrogen is also being used by default. Our components will call the appropriate hooks/functions/components for Hydrogen React applications.
19
17
 
20
- ### Data Sources
18
+ ### Installation Steps
21
19
 
22
- Rebuy + Hydrogen is powered by Rebuy's Data Sources, which allows for AI-powered product recommendations, custom defined rulesets, or mixture of human and computer derived output. Data Sources are created in Rebuy's App Admin, and the data source URL is used in your Hydrogen project. Separating the logic from the codebase allows non-technical team members to manage the merchandising rules without the need for costly code changes or redeployments.
20
+ 1. Install the beta version of our package from npm:
23
21
 
24
- ### User Interfaces
22
+ ```
23
+ npm i @rebuy/rebuy-hydrogen@3.0.0-beta.13
24
+ ```
25
25
 
26
- Rebuy + Hydrogen uses a React container pattern to separate the data fetching logic and state management from the presentational components. As such, container components do not render user interface elements. They simply pass their own properties, as well as data received from Rebuy, to their children components for consumption. This allows you to build your own user interface with your existing components, or use Rebuy's out of the box components to get up and running quickly.
26
+ Package URL: [https://www.npmjs.com/package/@rebuy/rebuy-hydrogen](https://www.npmjs.com/package/@rebuy/rebuy-hydrogen)
27
27
 
28
- ### Getting Started
29
28
 
30
- To get started, please visit our [Rebuy + Shopify Hydrogen documentation](https://developers.rebuyengine.com/reference/shopify-hydrogen-getting-started).
29
+
30
+ 2\. In your entry.server.tsx add update the creatContentSecurityPolicy to have the [rebuyengine.com](http://rebuyengine.com) in the connectSrc
31
+
32
+ ```
33
+ const {nonce, header, NonceProvider} = createContentSecurityPolicy({
34
+ shop: {
35
+ checkoutDomain: context.env.PUBLIC_CHECKOUT_DOMAIN,
36
+ storeDomain: context.env.PUBLIC_STORE_DOMAIN,
37
+ },
38
+ connectSrc: ['*.rebuyengine.com', 'rebuyengine.com']
39
+ });
40
+ ```
41
+
42
+ ### For Hydrogen-only Applications:
43
+
44
+ 1. Navigate to your `app/root.tsx` file and add the following imports:
45
+
46
+ ```
47
+ import { RebuyHydrogenContextProvider } from '@rebuy/rebuy-hydrogen';
48
+ import '@rebuy/rebuy-hydrogen/dist/index.css';
49
+ ```
50
+
51
+ 2. Place the `<RebuyHydrogenContextProvider>` component as the parent component after the body. Required props: `cart.data` and `shop(domain) and publicStoreDomain (domain.myshopify.com)`.
52
+
53
+ ```
54
+ {data ? (
55
+ <RebuyHydrogenContextProvider cart={data.cart} shop="example.com" publicStoreDomain="example.myshopify.com"
56
+ >
57
+ <Analytics.Provider
58
+ cart={data.cart}
59
+ shop={data.shop}
60
+ consent={data.consent}
61
+ >
62
+ <PageLayout {...data}>
63
+ {children}
64
+ </PageLayout>
65
+ </Analytics.Provider>
66
+ </RebuyHydrogenContextProvider>
67
+ ) : (
68
+ children
69
+ )}
70
+ ```
71
+
72
+ ### For Hydrogen React Applications:
73
+
74
+ 1. Navigate to your `app/root.tsx` file and add the import for the CSS:
75
+
76
+ ```
77
+ import '@rebuy/rebuy-hydrogen/dist/index.css';
78
+ ```
79
+
80
+ 2. Navigate to where your context providers are located and wrap the `RebuyHydrogenReactContextProvider` around the children. Required Props: `shop(domain) and publicStoreDomain (domain.myshopify.com)` For Pack Digital users, this would be in `app/context/ContextProvider.tsx`:
81
+
82
+ ```
83
+ <RebuyHydrogenReactContextProvider publicPrimaryDomian="example.com" publicStoreDomain="example.myshopify.com" publicStorefrontApiToken="1233456" publicStorefrontId="12345678" >
84
+ {children}
85
+ </RebuyHydrogenReactContextProvider>
86
+ ```
87
+
88
+ 3. With this you can also pass in any CartProvider props that you need to pass in.
89
+
90
+ - # Cart Provider Properties
91
+
92
+ | Property | Type | Required | Description |
93
+ | :---- | :---- | :---- | :---- |
94
+ | `children` | `React.ReactNode` | Yes | Any `ReactNode` elements. |
95
+ | `numCartLines` | `number` | No | Maximum number of cart lines to fetch. Defaults to 250 cart lines. |
96
+ | `onCreate` | `() => void` | No | A callback that is invoked when the process to create a cart begins, but before the cart is created in the Storefront API. |
97
+ | `onLineAdd` | `() => void` | No | A callback that is invoked when the process to add a line item to the cart begins, but before the line item is added to the Storefront API. |
98
+ | `onLineRemove` | `() => void` | No | A callback that is invoked when the process to remove a line item to the cart begins, but before the line item is removed from the Storefront API. |
99
+ | `onLineUpdate` | `() => void` | No | A callback that is invoked when the process to update a line item in the cart begins, but before the line item is updated in the Storefront API. |
100
+ | `onNoteUpdate` | `() => void` | No | A callback that is invoked when the process to add or update a note in the cart begins, but before the note is added or updated in the Storefront API. |
101
+ | `onBuyerIdentityUpdate` | `() => void` | No | A callback that is invoked when the process to update the buyer identity begins, but before the buyer identity is updated in the Storefront API. |
102
+ | `onAttributesUpdate` | `() => void` | No | A callback that is invoked when the process to update the cart attributes begins, but before the attributes are updated in the Storefront API. |
103
+ | `onDiscountCodesUpdate` | `() => void` | No | A callback that is invoked when the process to update the cart discount codes begins, but before the discount codes are updated in the Storefront API. |
104
+ | `onCreateComplete` | `() => void` | No | A callback that is invoked when the process to create a cart completes. |
105
+ | `onLineAddComplete` | `() => void` | No | A callback that is invoked when the process to add a line item to the cart completes. |
106
+ | `onLineRemoveComplete` | `() => void` | No | A callback that is invoked when the process to remove a line item to the cart completes. |
107
+ | `onLineUpdateComplete` | `() => void` | No | A callback that is invoked when the process to update a line item in the cart completes. |
108
+ | `onNoteUpdateComplete` | `() => void` | No | A callback that is invoked when the process to add or update a note in the cart completes. |
109
+ | `onBuyerIdentityUpdateComplete` | `() => void` | No | A callback that is invoked when the process to update the buyer identity completes. |
110
+ | `onAttributesUpdateComplete` | `() => void` | No | A callback that is invoked when the process to update the cart attributes completes. |
111
+ | `onDiscountCodesUpdateComplete` | `() => void` | No | A callback that is invoked when the process to update the cart discount codes completes. |
112
+ | `data` | `PartialDeep<CartType, {recurseIntoArrays: true}>` | No | An object with fields that correspond to the Storefront API's Cart object. |
113
+ | `cartFragment` | `string` | No | A fragment used to query the Storefront API's Cart object for all queries and mutations. A default value is used if no argument is provided. |
114
+ | `customerAccessToken` | `string` | No | A customer access token that's accessible on the server if there's a customer login. |
115
+ | `countryCode` | `CountryCode` | No | The ISO country code for i18n. |
116
+
117
+ -
118
+
119
+ ## Override key
120
+ If you need to pass in a different Rebuy Api key from the one that we dynamically use for your store, you can pass it in as a prop on either of the provider components. ie `overrideApiKey="123456"`
121
+
122
+ ## Components
123
+
124
+ Our components work seamlessly in both Hydrogen-only and Hydrogen React applications by using the existing context to call the correct hooks/functions.
125
+
126
+ ### WidgetContainer
127
+
128
+ This is the parent component that provides the needed context to child widgets.
129
+
130
+ **Properties:**
131
+
132
+ | Property | Description |
133
+ | :---- | :---- |
134
+ | `dataSource` | The Rebuy API endpoint to use for product recommendations |
135
+ | `productId` | The Shopify product ID |
136
+ | `product` | The entire product object |
137
+ | `variantID` | The selected variant ID |
138
+ | `variant` | The selected variant object |
139
+ | `limit` | How many product recommendations to return |
140
+ | `options` | An object with key-value pairs of Rebuy REST API arguments (e.g., `{ metafields: "yes" }`) |
141
+
142
+ ### RebuyCompleteTheLook
143
+
144
+ **Properties:**
145
+
146
+ | Property | Description |
147
+ | :---- | :---- |
148
+ | `customTitle` | A custom title displayed above the component |
149
+ | `customTitleLevel` | Sets the initial title level (e.g., if set to `h2`, other titles in the component will adjust to `h3` accordingly) |
150
+ | `customTitleStyle` | An object of custom styles for the title (e.g., text color, text align) |
151
+ | `addToCartCallBack` | A callback function for custom functionality when items are added to the cart |
152
+ | `addToCartBtnText` | Custom text for the Add To Cart button |
153
+
154
+ ### RebuyDynamicBundleProducts
155
+
156
+ **Properties:**
157
+
158
+ | Property | Description |
159
+ | :---- | :---- |
160
+ | `customTitle` | A custom title displayed above the component |
161
+ | `customTitleLevel` | Sets the initial title level (e.g., if set to `h2`, other titles in the component will adjust to `h3` accordingly) |
162
+ | `customTitleStyle` | An object of custom styles for the title (e.g., text color, text align) |
163
+ | `addToCartCallBack` | A callback function for custom functionality when items are added to the cart |
164
+ | `addToCartBtnText` | Custom text for the Add To Cart button |
165
+
166
+ ### RebuyProductRecommendations
167
+
168
+ **Properties:**
169
+
170
+ | Property | Description |
171
+ | :---- | :---- |
172
+ | `customTitle` | A custom title displayed above the component |
173
+ | `customTitleLevel` | Sets the initial title level (e.g., if set to `h2`, other titles in the component will adjust to `h3` accordingly) |
174
+ | `customTitleStyle` | An object of custom styles for the title (e.g., text color, text align) |
175
+ | `addToCartCallBack` | A callback function for custom functionality when items are added to the cart |
176
+ | `addToCartBtnText` | Custom text for the Add To Cart button |
177
+
178
+ ### RebuyProductAddOns
179
+
180
+ **Properties:**
181
+
182
+ | Property | Description |
183
+ | :---- | :---- |
184
+ | `customTitle` | A custom title displayed above the component |
185
+ | `customTitleLevel` | Sets the initial title level (e.g., if set to `h2`, other titles in the component will adjust to `h3` accordingly) |
186
+ | `customTitleStyle` | An object of custom styles for the title (e.g., text color, text align) |
187
+ | `addToCartCallBack` | A callback function for custom functionality when items are added to the cart |
188
+ | `addToCartBtnText` | Custom text for the Add To Cart button |
189
+ | `includeMainProduct` | Option to include the product passed from the `WidgetContainer` in the add to cart functionality |
190
+ | `learnMoreText` | Text displayed in a CTA that takes users to the product page |
191
+ | `subtotalText` | Text that appears before the subtotal of all add-ons |
192
+ | `withProductText` | Text that appears before the total if the product from `WidgetContainer` is included in the add to cart functionality |
193
+
194
+ ### RebuyWidget
195
+
196
+ ## Dynamic widget that can be set up to display a widget that you have created in the Rebuy Admin
197
+
198
+ **Properties:**
199
+
200
+ | Property | Description |
201
+ | :---- | :---- |
202
+ | `widgetId` | The widget Id for the widget that you want to display (can be found in the Rebuy Admin) |
203
+ | `addToCartCallBack` | A callback function for custom functionality when items are added to the cart |
204
+ | `productId` | The Shopify product ID |
205
+ | `product` | The entire product object |
206
+ | `variantID` | The selected variant ID |
207
+ | `variant` | The selected variant object |
208
+ | `popupTriggerid` | If you have configured this to be a popup that is triggered on a button click then you need to pass the id of the element that you want to trigger the popup to appear on |
@@ -0,0 +1,2 @@
1
+ export declare const Close: () => import("react/jsx-runtime").JSX.Element;
2
+ //# sourceMappingURL=Close.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Close.d.ts","sourceRoot":"","sources":["../../src/assets/Close.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,+CAMjB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { AddToCartBtnProps } from '~/components/AddToCartBtn/types';
2
+ export declare const AddToCartBtn: ({ addToCartBtnText, addToCartCallback, disabled, isHydrogenReact, moneyData, quantity, selectedVariants, }: AddToCartBtnProps) => import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=AddToCartBtn.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AddToCartBtn.d.ts","sourceRoot":"","sources":["../../../src/components/AddToCartBtn/AddToCartBtn.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAIzE,eAAO,MAAM,YAAY,GAAI,4GAQ1B,iBAAiB,4CAgCnB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { btnProps } from '~/components/AddToCartBtn/types';
2
+ export declare const HydrogenAddToCartBtn: ({ addToCartBtnText, addToCartCallback, disabled, linesToAdd, moneyData, }: btnProps) => import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=HydrogenAddToCartBtn.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HydrogenAddToCartBtn.d.ts","sourceRoot":"","sources":["../../../src/components/AddToCartBtn/HydrogenAddToCartBtn.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAGhE,eAAO,MAAM,oBAAoB,GAAI,2EAMlC,QAAQ,4CA+BV,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { btnProps } from '~/components/AddToCartBtn/types';
2
+ export declare const HydrogenReactAddToCartBtn: ({ addToCartBtnText, addToCartCallback, disabled, linesToAdd, moneyData, }: btnProps) => import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=HydrogenReactAddToCartBtn.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HydrogenReactAddToCartBtn.d.ts","sourceRoot":"","sources":["../../../src/components/AddToCartBtn/HydrogenReactAddToCartBtn.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAGhE,eAAO,MAAM,yBAAyB,GAAI,2EAMvC,QAAQ,4CAkBV,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './AddToCartBtn';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AddToCartBtn/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,27 @@
1
+ import type { MoneyV2 } from '@shopify/hydrogen-react/storefront-api-types';
2
+ import type { RebuyProductVariant } from '~/types/rebuyCustom';
3
+ export type btnProps = {
4
+ addToCartBtnText?: string;
5
+ addToCartCallback?: () => void;
6
+ disabled?: boolean;
7
+ linesToAdd: {
8
+ attributes: {
9
+ key: string;
10
+ value: string;
11
+ }[];
12
+ merchandiseId: string;
13
+ quantity: number;
14
+ selectedVariant: unknown;
15
+ }[];
16
+ moneyData?: MoneyV2;
17
+ };
18
+ export type AddToCartBtnProps = {
19
+ addToCartBtnText?: string;
20
+ addToCartCallback?: () => void;
21
+ disabled?: boolean;
22
+ isHydrogenReact?: boolean;
23
+ moneyData?: MoneyV2;
24
+ quantity?: number;
25
+ selectedVariants: RebuyProductVariant[];
26
+ };
27
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/AddToCartBtn/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,8CAA8C,CAAC;AAC5E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE/D,MAAM,MAAM,QAAQ,GAAG;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE;QACR,UAAU,EAAE;YACR,GAAG,EAAE,MAAM,CAAC;YACZ,KAAK,EAAE,MAAM,CAAC;SACjB,EAAE,CAAC;QACJ,aAAa,EAAE,MAAM,CAAC;QACtB,QAAQ,EAAE,MAAM,CAAC;QACjB,eAAe,EAAE,OAAO,CAAC;KAC5B,EAAE,CAAC;IACJ,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC5B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,mBAAmB,EAAE,CAAC;CAC3C,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { ProductCardProps } from '~/components/ProductCard/types';
2
+ export declare const ProductCard: ({ addToCartBtnText, addToCartCallback, isHydrogenReact, isInPopup, onPopupDismiss, product, productCardTitleLevel, settings, }: ProductCardProps) => import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=ProductCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProductCard.d.ts","sourceRoot":"","sources":["../../../src/components/ProductCard/ProductCard.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAQvE,eAAO,MAAM,WAAW,GAAI,gIASzB,gBAAgB,4CAgMlB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { ProductCardSettings } from './types';
2
+ export declare const defaultProductCardSettings: ProductCardSettings;
3
+ //# sourceMappingURL=defaultSettings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defaultSettings.d.ts","sourceRoot":"","sources":["../../../src/components/ProductCard/defaultSettings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,eAAO,MAAM,0BAA0B,EAAE,mBAsCxC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { defaultProductCardSettings } from './defaultSettings';
2
+ export * from './ProductCard';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ProductCard/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAC/D,cAAc,eAAe,CAAC"}
@@ -0,0 +1,52 @@
1
+ import type { ProductCardTitleLevel } from '~/types/common';
2
+ import type { RebuyProduct } from '~/types/rebuyCustom';
3
+ export type ProductCardProps = {
4
+ addToCartBtnText?: string;
5
+ addToCartCallback?: () => void;
6
+ isHydrogenReact?: boolean;
7
+ isInPopup?: boolean;
8
+ onPopupDismiss?: () => void;
9
+ product: RebuyProduct;
10
+ productCardTitleLevel: ProductCardTitleLevel;
11
+ settings?: ProductCardSettings;
12
+ };
13
+ export type ProductCardSettings = {
14
+ layoutStyle?: string;
15
+ productOptions?: {
16
+ hide_out_of_stock_variants: boolean;
17
+ match_variant: boolean;
18
+ match_variant_out_of_stock: boolean;
19
+ show_product_description: string;
20
+ show_subscription_options: string;
21
+ show_variant_options: string;
22
+ show_variant_title: string;
23
+ show_variants_as_products: boolean;
24
+ variant_display_limit: string;
25
+ };
26
+ quantityInput?: {
27
+ default_quantity: number;
28
+ enabled: boolean;
29
+ max_value: number;
30
+ min_value: number;
31
+ };
32
+ settingsDiscount?: {
33
+ amount: number;
34
+ bundle_protection: {
35
+ allowed_removals: number;
36
+ disable_atc_on_incomplete: boolean;
37
+ enabled: boolean;
38
+ };
39
+ discount_protection: {
40
+ enabled: boolean;
41
+ minimum_items_to_get_discount: number;
42
+ };
43
+ discounted_by: string;
44
+ discounted_from: string;
45
+ message: string;
46
+ quantity: number;
47
+ show_saving_amount: boolean;
48
+ type: string;
49
+ };
50
+ variantSelector?: string;
51
+ };
52
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/ProductCard/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,MAAM,MAAM,gBAAgB,GAAG;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,OAAO,EAAE,YAAY,CAAC;IACtB,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,QAAQ,CAAC,EAAE,mBAAmB,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE;QACb,0BAA0B,EAAE,OAAO,CAAC;QACpC,aAAa,EAAE,OAAO,CAAC;QACvB,0BAA0B,EAAE,OAAO,CAAC;QACpC,wBAAwB,EAAE,MAAM,CAAC;QACjC,yBAAyB,EAAE,MAAM,CAAC;QAClC,oBAAoB,EAAE,MAAM,CAAC;QAC7B,kBAAkB,EAAE,MAAM,CAAC;QAC3B,yBAAyB,EAAE,OAAO,CAAC;QACnC,qBAAqB,EAAE,MAAM,CAAC;KACjC,CAAC;IACF,aAAa,CAAC,EAAE;QACZ,gBAAgB,EAAE,MAAM,CAAC;QACzB,OAAO,EAAE,OAAO,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,gBAAgB,CAAC,EAAE;QACf,MAAM,EAAE,MAAM,CAAC;QACf,iBAAiB,EAAE;YACf,gBAAgB,EAAE,MAAM,CAAC;YACzB,yBAAyB,EAAE,OAAO,CAAC;YACnC,OAAO,EAAE,OAAO,CAAC;SACpB,CAAC;QACF,mBAAmB,EAAE;YACjB,OAAO,EAAE,OAAO,CAAC;YACjB,6BAA6B,EAAE,MAAM,CAAC;SACzC,CAAC;QACF,aAAa,EAAE,MAAM,CAAC;QACtB,eAAe,EAAE,MAAM,CAAC;QACxB,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,EAAE,MAAM,CAAC;QACjB,kBAAkB,EAAE,OAAO,CAAC;QAC5B,IAAI,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { ProductCardSettings } from '~/components/ProductCard/types';
2
+ import type { ProductCardTitleLevel } from '~/types/common';
3
+ import type { RebuyProduct } from '~/types/rebuyCustom';
4
+ type ProductCarouselProps = {
5
+ addToCartBtnText?: string;
6
+ addToCartCallback?: () => void;
7
+ columns: number;
8
+ isHydrogenReact?: boolean;
9
+ productCardTitleLevel: ProductCardTitleLevel;
10
+ products: RebuyProduct[];
11
+ settings: ProductCardSettings;
12
+ showPagination?: boolean;
13
+ };
14
+ export declare const ProductCarousel: ({ addToCartBtnText, addToCartCallback, columns, isHydrogenReact, productCardTitleLevel, products, settings, showPagination, }: ProductCarouselProps) => import("react/jsx-runtime").JSX.Element;
15
+ export {};
16
+ //# sourceMappingURL=ProductCarousel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProductCarousel.d.ts","sourceRoot":"","sources":["../../../src/components/ProductCarousel/ProductCarousel.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGxD,KAAK,oBAAoB,GAAG;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,+HAS7B,oBAAoB,4CAoGtB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './ProductCarousel';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ProductCarousel/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { ProductPriceProps } from './types';
2
+ export declare const RebuyProductPrice: ({ selectedVariant, settingsDiscount }: ProductPriceProps) => import("react/jsx-runtime").JSX.Element | null;
3
+ //# sourceMappingURL=ProductPrice.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProductPrice.d.ts","sourceRoot":"","sources":["../../../src/components/ProductPrice/ProductPrice.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAIjD,eAAO,MAAM,iBAAiB,GAAI,uCAAuC,iBAAiB,mDAmCzF,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './ProductPrice';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ProductPrice/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type { RebuyProductVariant } from '~/types/rebuyCustom';
2
+ export type ProductPriceProps = {
3
+ selectedVariant: RebuyProductVariant;
4
+ settingsDiscount?: {
5
+ amount: number;
6
+ bundle_protection: {
7
+ allowed_removals: number;
8
+ disable_atc_on_incomplete: boolean;
9
+ enabled: boolean;
10
+ };
11
+ discount_protection: {
12
+ enabled: boolean;
13
+ minimum_items_to_get_discount: number;
14
+ };
15
+ discounted_by: string;
16
+ discounted_from: string;
17
+ message: string;
18
+ quantity: number;
19
+ show_saving_amount: boolean;
20
+ type: string;
21
+ };
22
+ };
23
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/ProductPrice/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE/D,MAAM,MAAM,iBAAiB,GAAG;IAC5B,eAAe,EAAE,mBAAmB,CAAC;IACrC,gBAAgB,CAAC,EAAE;QACf,MAAM,EAAE,MAAM,CAAC;QACf,iBAAiB,EAAE;YACf,gBAAgB,EAAE,MAAM,CAAC;YACzB,yBAAyB,EAAE,OAAO,CAAC;YACnC,OAAO,EAAE,OAAO,CAAC;SACpB,CAAC;QACF,mBAAmB,EAAE;YACjB,OAAO,EAAE,OAAO,CAAC;YACjB,6BAA6B,EAAE,MAAM,CAAC;SACzC,CAAC;QACF,aAAa,EAAE,MAAM,CAAC;QACtB,eAAe,EAAE,MAAM,CAAC;QACxB,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,EAAE,MAAM,CAAC;QACjB,kBAAkB,EAAE,OAAO,CAAC;QAC5B,IAAI,EAAE,MAAM,CAAC;KAChB,CAAC;CACL,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { QuantityInputProps } from './types';
2
+ export declare const QuantityInput: ({ defaultQuantity, handleSelectedQuantity, maxValue, minValue, }: QuantityInputProps) => import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=QuantityInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuantityInput.d.ts","sourceRoot":"","sources":["../../../src/components/QuantityInput/QuantityInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAGlD,eAAO,MAAM,aAAa,GAAI,kEAK3B,kBAAkB,4CAgCpB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './QuantityInput';
2
+ export type { QuantityInputProps } from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QuantityInput/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,YAAY,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,7 @@
1
+ export type QuantityInputProps = {
2
+ defaultQuantity?: number;
3
+ handleSelectedQuantity?: (quantity: number) => void;
4
+ maxValue?: number;
5
+ minValue?: number;
6
+ };
7
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QuantityInput/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG;IAC7B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sBAAsB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { TimerProps } from './types';
2
+ export declare const Timer: ({ action, durationMinutes, durationSeconds, isPopup, onDismiss, title }: TimerProps) => import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=Timer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Timer.d.ts","sourceRoot":"","sources":["../../../src/components/Timer/Timer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAG1C,eAAO,MAAM,KAAK,GAAI,yEAAiF,UAAU,4CA2EhH,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './Timer';
2
+ export * from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Timer/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
@@ -0,0 +1,16 @@
1
+ export type TimerAction = 'dismiss' | 'checkout' | 'cart' | 'stop';
2
+ export type TimerProps = {
3
+ /** The action to take when the timer reaches zero */
4
+ action: TimerAction;
5
+ /** The duration in minutes */
6
+ durationMinutes: number;
7
+ /** The duration in seconds */
8
+ durationSeconds: number;
9
+ /** Whether the timer is in a popup context */
10
+ isPopup?: boolean;
11
+ /** Callback function to dismiss the popup */
12
+ onDismiss?: () => void;
13
+ /** The title text to display above the timer */
14
+ title?: string;
15
+ };
16
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Timer/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;AAEnE,MAAM,MAAM,UAAU,GAAG;IACrB,qDAAqD;IACrD,MAAM,EAAE,WAAW,CAAC;IACpB,8BAA8B;IAC9B,eAAe,EAAE,MAAM,CAAC;IACxB,8BAA8B;IAC9B,eAAe,EAAE,MAAM,CAAC;IACxB,8CAA8C;IAC9C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { TitleProps } from '~/components/Title/types';
2
+ export declare const Title: ({ className, level, style, text }: TitleProps) => import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=Title.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Title.d.ts","sourceRoot":"","sources":["../../../src/components/Title/Title.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAG3D,eAAO,MAAM,KAAK,GAAI,mCAAmC,UAAU,4CA0ClE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './Title';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Title/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { ProductCardTitleLevel } from '~/types/common';
2
+ export type TitleProps = {
3
+ className?: string;
4
+ level: ProductCardTitleLevel;
5
+ style?: React.CSSProperties;
6
+ text: string;
7
+ };
8
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Title/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAE5D,MAAM,MAAM,UAAU,GAAG;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,qBAAqB,CAAC;IAC7B,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;CAChB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { VariantSelectProps } from '~/components/VariantSelect/types';
2
+ export declare const VariantSelect: ({ handleSelectedVariant, product, selectedId, style }: VariantSelectProps) => import("react/jsx-runtime").JSX.Element | null;
3
+ //# sourceMappingURL=VariantSelect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VariantSelect.d.ts","sourceRoot":"","sources":["../../../src/components/VariantSelect/VariantSelect.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAI3E,eAAO,MAAM,aAAa,GAAI,uDAAkE,kBAAkB,mDAwEjH,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './VariantSelect';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/VariantSelect/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { RebuyProduct } from '~/types/rebuyCustom';
2
+ export type VariantSelectProps = {
3
+ handleSelectedVariant: (product: RebuyProduct, variant_id: string) => void;
4
+ product: RebuyProduct;
5
+ selectedId?: string;
6
+ style?: string;
7
+ };
8
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/VariantSelect/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,MAAM,MAAM,kBAAkB,GAAG;IAC7B,qBAAqB,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3E,OAAO,EAAE,YAAY,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const REBUY_THEME_STYLES_BASE_URL = "https://rebuyengine.com/api/v1/theme-styles";
2
+ //# sourceMappingURL=api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/constants/api.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,2BAA2B,gDAAgD,CAAC"}