@rebuy/rebuy-hydrogen 3.0.0-beta.10 → 3.0.0-beta.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +196 -16
- package/dist/assets/Close.d.ts +2 -0
- package/dist/assets/Close.d.ts.map +1 -0
- package/dist/components/AddToCartBtn/AddToCartBtn.d.ts +1 -1
- package/dist/components/AddToCartBtn/AddToCartBtn.d.ts.map +1 -1
- package/dist/components/AddToCartBtn/HydrogenAddToCartBtn.d.ts.map +1 -1
- package/dist/components/AddToCartBtn/types.d.ts +1 -0
- package/dist/components/AddToCartBtn/types.d.ts.map +1 -1
- package/dist/components/ProductCard/ProductCard.d.ts +1 -1
- package/dist/components/ProductCard/ProductCard.d.ts.map +1 -1
- package/dist/components/ProductCard/defaultSettings.d.ts +3 -0
- package/dist/components/ProductCard/defaultSettings.d.ts.map +1 -0
- package/dist/components/ProductCard/index.d.ts +1 -0
- package/dist/components/ProductCard/index.d.ts.map +1 -1
- package/dist/components/ProductCard/types.d.ts +42 -0
- package/dist/components/ProductCard/types.d.ts.map +1 -1
- package/dist/components/ProductCarousel/ProductCarousel.d.ts +16 -0
- package/dist/components/ProductCarousel/ProductCarousel.d.ts.map +1 -0
- package/dist/components/ProductCarousel/index.d.ts +2 -0
- package/dist/components/ProductCarousel/index.d.ts.map +1 -0
- package/dist/components/ProductPrice/ProductPrice.d.ts +2 -4
- package/dist/components/ProductPrice/ProductPrice.d.ts.map +1 -1
- package/dist/components/ProductPrice/types.d.ts +23 -0
- package/dist/components/ProductPrice/types.d.ts.map +1 -0
- package/dist/components/QuantityInput/QuantityInput.d.ts +3 -0
- package/dist/components/QuantityInput/QuantityInput.d.ts.map +1 -0
- package/dist/components/QuantityInput/index.d.ts +3 -0
- package/dist/components/QuantityInput/index.d.ts.map +1 -0
- package/dist/components/QuantityInput/types.d.ts +7 -0
- package/dist/components/QuantityInput/types.d.ts.map +1 -0
- package/dist/components/Timer/Timer.d.ts +3 -0
- package/dist/components/Timer/Timer.d.ts.map +1 -0
- package/dist/components/Timer/index.d.ts +3 -0
- package/dist/components/Timer/index.d.ts.map +1 -0
- package/dist/components/Timer/types.d.ts +16 -0
- package/dist/components/Timer/types.d.ts.map +1 -0
- package/dist/components/Title/Title.d.ts +1 -1
- package/dist/components/Title/Title.d.ts.map +1 -1
- package/dist/components/Title/types.d.ts +1 -0
- package/dist/components/Title/types.d.ts.map +1 -1
- package/dist/components/VariantSelect/VariantSelect.d.ts +1 -1
- package/dist/components/VariantSelect/VariantSelect.d.ts.map +1 -1
- package/dist/components/VariantSelect/types.d.ts +2 -0
- package/dist/components/VariantSelect/types.d.ts.map +1 -1
- package/dist/constants/api.d.ts +2 -0
- package/dist/constants/api.d.ts.map +1 -0
- package/dist/context/RebuyConfigContext.d.ts +21 -0
- package/dist/context/RebuyConfigContext.d.ts.map +1 -0
- package/dist/hooks/useBreakpoint.d.ts +5 -0
- package/dist/hooks/useBreakpoint.d.ts.map +1 -0
- package/dist/hooks/usePopupTrigger.d.ts +3 -0
- package/dist/hooks/usePopupTrigger.d.ts.map +1 -0
- package/dist/hooks/useRebuyTheme.d.ts +21 -0
- package/dist/hooks/useRebuyTheme.d.ts.map +1 -0
- package/dist/index.css +588 -31
- package/dist/index.css.map +4 -4
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1669 -425
- package/dist/index.js.map +4 -4
- package/dist/index.mjs +1656 -413
- package/dist/index.mjs.map +4 -4
- package/dist/providers/RebuyHydrogenContextProvider.d.ts +1 -1
- package/dist/providers/RebuyHydrogenContextProvider.d.ts.map +1 -1
- package/dist/providers/RebuyHydrogenReactContextProvider.d.ts +6 -1
- package/dist/providers/RebuyHydrogenReactContextProvider.d.ts.map +1 -1
- package/dist/providers/types.d.ts +21 -4
- package/dist/providers/types.d.ts.map +1 -1
- package/dist/types/rebuyCustom.d.ts +52 -17
- package/dist/types/rebuyCustom.d.ts.map +1 -1
- package/dist/types/widgets.d.ts +5 -4
- package/dist/types/widgets.d.ts.map +1 -1
- package/dist/utils/createContextParameters.d.ts +1 -1
- package/dist/utils/createContextParameters.d.ts.map +1 -1
- package/dist/utils/csp.d.ts +16 -0
- package/dist/utils/csp.d.ts.map +1 -0
- package/dist/utils/theme.d.ts +20 -0
- package/dist/utils/theme.d.ts.map +1 -0
- package/dist/widgetContainer/RebuyWidgetContainer.d.ts.map +1 -1
- package/dist/widgets/RebuyCompleteTheLook/RebuyCompleteTheLook.d.ts.map +1 -1
- package/dist/widgets/RebuyDynamicBundleProducts/BundleImages.d.ts.map +1 -1
- package/dist/widgets/RebuyDynamicBundleProducts/BundleSelection.d.ts.map +1 -1
- package/dist/widgets/RebuyDynamicBundleProducts/Select.d.ts.map +1 -1
- package/dist/widgets/RebuyWidget/RebuyWidget.d.ts +3 -0
- package/dist/widgets/RebuyWidget/RebuyWidget.d.ts.map +1 -0
- package/dist/widgets/RebuyWidget/WidgetContent.d.ts +3 -0
- package/dist/widgets/RebuyWidget/WidgetContent.d.ts.map +1 -0
- package/dist/widgets/RebuyWidget/index.d.ts +2 -0
- package/dist/widgets/RebuyWidget/index.d.ts.map +1 -0
- package/dist/widgets/RebuyWidget/types.d.ts +335 -0
- package/dist/widgets/RebuyWidget/types.d.ts.map +1 -0
- package/package.json +3 -2
package/README.md
CHANGED
@@ -1,28 +1,208 @@
|
|
1
|
-
# Rebuy
|
1
|
+
# Beta Documentation: Rebuy Hydrogen 2.0
|
2
2
|
|
3
|
-
|
3
|
+
## Overview
|
4
4
|
|
5
|
-
|
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
|
-
|
7
|
+
## Initial Setup
|
8
8
|
|
9
|
-
|
9
|
+
### Prerequisites
|
10
10
|
|
11
|
-
|
11
|
+
First, determine whether your application uses:
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
3. **Components** - these components can be used to render various merchandising UI.
|
16
|
-
4. **Events** - these components automatically track user behaviors.
|
13
|
+
- Hydrogen only
|
14
|
+
- Both Hydrogen and Hydrogen React
|
17
15
|
|
18
|
-
|
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
|
-
|
18
|
+
### Installation Steps
|
21
19
|
|
22
|
-
|
20
|
+
1. Install the beta version of our package from npm:
|
23
21
|
|
24
|
-
|
22
|
+
```
|
23
|
+
npm i @rebuy/rebuy-hydrogen@3.0.0-beta.12
|
24
|
+
```
|
25
25
|
|
26
|
-
|
26
|
+
Package URL: [https://www.npmjs.com/package/@rebuy/rebuy-hydrogen](https://www.npmjs.com/package/@rebuy/rebuy-hydrogen)
|
27
27
|
|
28
|
-
|
28
|
+
|
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 @@
|
|
1
|
+
{"version":3,"file":"Close.d.ts","sourceRoot":"","sources":["../../src/assets/Close.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,+CAMjB,CAAC"}
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import type { AddToCartBtnProps } from '~/components/AddToCartBtn/types';
|
2
|
-
export declare const AddToCartBtn: ({ addToCartBtnText, addToCartCallback, disabled, isHydrogenReact, moneyData, selectedVariants, }: AddToCartBtnProps) => import("react/jsx-runtime").JSX.Element;
|
2
|
+
export declare const AddToCartBtn: ({ addToCartBtnText, addToCartCallback, disabled, isHydrogenReact, moneyData, quantity, selectedVariants, }: AddToCartBtnProps) => import("react/jsx-runtime").JSX.Element;
|
3
3
|
//# sourceMappingURL=AddToCartBtn.d.ts.map
|
@@ -1 +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,
|
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"}
|
@@ -1 +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,
|
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"}
|
@@ -1 +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,gBAAgB,EAAE,mBAAmB,EAAE,CAAC;CAC3C,CAAC"}
|
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"}
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import type { ProductCardProps } from '~/components/ProductCard/types';
|
2
|
-
export declare const ProductCard: ({ addToCartBtnText, addToCartCallback, isHydrogenReact, product, productCardTitleLevel, }: ProductCardProps) => import("react/jsx-runtime").JSX.Element;
|
2
|
+
export declare const ProductCard: ({ addToCartBtnText, addToCartCallback, isHydrogenReact, isInPopup, onPopupDismiss, product, productCardTitleLevel, settings, }: ProductCardProps) => import("react/jsx-runtime").JSX.Element;
|
3
3
|
//# sourceMappingURL=ProductCard.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ProductCard.d.ts","sourceRoot":"","sources":["../../../src/components/ProductCard/ProductCard.tsx"],"names":[],"mappings":"
|
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 @@
|
|
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"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ProductCard/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
|
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"}
|
@@ -4,7 +4,49 @@ export type ProductCardProps = {
|
|
4
4
|
addToCartBtnText?: string;
|
5
5
|
addToCartCallback?: () => void;
|
6
6
|
isHydrogenReact?: boolean;
|
7
|
+
isInPopup?: boolean;
|
8
|
+
onPopupDismiss?: () => void;
|
7
9
|
product: RebuyProduct;
|
8
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;
|
9
51
|
};
|
10
52
|
//# sourceMappingURL=types.d.ts.map
|
@@ -1 +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,OAAO,EAAE,YAAY,CAAC;IACtB,qBAAqB,EAAE,qBAAqB,CAAC;
|
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 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ProductCarousel/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
|
@@ -1,5 +1,3 @@
|
|
1
|
-
import type {
|
2
|
-
export declare const RebuyProductPrice: ({ selectedVariant }:
|
3
|
-
selectedVariant: RebuyProductVariant;
|
4
|
-
}) => import("react/jsx-runtime").JSX.Element | null;
|
1
|
+
import type { ProductPriceProps } from './types';
|
2
|
+
export declare const RebuyProductPrice: ({ selectedVariant, settingsDiscount }: ProductPriceProps) => import("react/jsx-runtime").JSX.Element | null;
|
5
3
|
//# sourceMappingURL=ProductPrice.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ProductPrice.d.ts","sourceRoot":"","sources":["../../../src/components/ProductPrice/ProductPrice.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,
|
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,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 @@
|
|
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 @@
|
|
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 @@
|
|
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 @@
|
|
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 @@
|
|
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"}
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import type { TitleProps } from '~/components/Title/types';
|
2
|
-
export declare const Title: ({ level, style, text }: TitleProps) => import("react/jsx-runtime").JSX.Element;
|
2
|
+
export declare const Title: ({ className, level, style, text }: TitleProps) => import("react/jsx-runtime").JSX.Element;
|
3
3
|
//# sourceMappingURL=Title.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Title.d.ts","sourceRoot":"","sources":["../../../src/components/Title/Title.tsx"],"names":[],"mappings":"
|
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"}
|
@@ -1 +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,KAAK,EAAE,qBAAqB,CAAC;IAC7B,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;CAChB,CAAC"}
|
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"}
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import type { VariantSelectProps } from '~/components/VariantSelect/types';
|
2
|
-
export declare const VariantSelect: ({ handleSelectedVariant, product }: VariantSelectProps) =>
|
2
|
+
export declare const VariantSelect: ({ handleSelectedVariant, product, selectedId, style }: VariantSelectProps) => import("react/jsx-runtime").JSX.Element | null;
|
3
3
|
//# sourceMappingURL=VariantSelect.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"VariantSelect.d.ts","sourceRoot":"","sources":["../../../src/components/VariantSelect/VariantSelect.tsx"],"names":[],"mappings":"
|
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"}
|
@@ -2,5 +2,7 @@ import type { RebuyProduct } from '~/types/rebuyCustom';
|
|
2
2
|
export type VariantSelectProps = {
|
3
3
|
handleSelectedVariant: (product: RebuyProduct, variant_id: string) => void;
|
4
4
|
product: RebuyProduct;
|
5
|
+
selectedId?: string;
|
6
|
+
style?: string;
|
5
7
|
};
|
6
8
|
//# sourceMappingURL=types.d.ts.map
|
@@ -1 +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;
|
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 @@
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/constants/api.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,2BAA2B,gDAAgD,CAAC"}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { type ReactNode } from 'react';
|
2
|
+
import type { RebuyConfig } from '~/types/rebuyCustom';
|
3
|
+
export type RebuyConfigLoadingStatus = 'idle' | 'loading' | 'success' | 'error';
|
4
|
+
export type RebuyConfigContextType = {
|
5
|
+
apiKey: string | null;
|
6
|
+
fetchError: Error | string | null;
|
7
|
+
fetchRebuyConfig: (domain: string) => Promise<void>;
|
8
|
+
loadingStatus: RebuyConfigLoadingStatus;
|
9
|
+
rebuyConfig: RebuyConfig | null;
|
10
|
+
shopDomain: string | null;
|
11
|
+
};
|
12
|
+
export type RebuyConfigProviderProps = {
|
13
|
+
children: ReactNode;
|
14
|
+
/** The Shopify store domain (e.g., example-brand.myshopify.com) used to fetch the config. */
|
15
|
+
initialShopDomain?: string;
|
16
|
+
/** Optional API key to override environment variable or config-derived one. */
|
17
|
+
overrideApiKey?: string;
|
18
|
+
};
|
19
|
+
export declare const RebuyConfigProvider: ({ children, initialShopDomain, overrideApiKey }: RebuyConfigProviderProps) => import("react/jsx-runtime").JSX.Element;
|
20
|
+
export declare const useRebuyConfig: () => RebuyConfigContextType;
|
21
|
+
//# sourceMappingURL=RebuyConfigContext.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"RebuyConfigContext.d.ts","sourceRoot":"","sources":["../../src/context/RebuyConfigContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACxG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGvD,MAAM,MAAM,wBAAwB,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAEhF,MAAM,MAAM,sBAAsB,GAAG;IACjC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,UAAU,EAAE,KAAK,GAAG,MAAM,GAAG,IAAI,CAAC;IAClC,gBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,aAAa,EAAE,wBAAwB,CAAC;IACxC,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAChC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B,CAAC;AAIF,MAAM,MAAM,wBAAwB,GAAG;IACnC,QAAQ,EAAE,SAAS,CAAC;IACpB,6FAA6F;IAC7F,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,+EAA+E;IAC/E,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,iDAAiD,wBAAwB,4CAyE5G,CAAC;AAEF,eAAO,MAAM,cAAc,QAAO,sBAQjC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useBreakpoint.d.ts","sourceRoot":"","sources":["../../src/hooks/useBreakpoint.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAElE,KAAK,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE/C,eAAO,MAAM,aAAa,GAAI,UAAU,cAAc,GAAG,IAAI,KAAG,UA4C/D,CAAC"}
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import type { WidgetSettings } from '~/widgets/RebuyWidget/types';
|
2
|
+
export declare const usePopupTrigger: (settings: WidgetSettings | null, popupTriggerId: string | undefined, widgetId: string, popupShownOnce: boolean, showPopup: boolean, setShowPopup: (show: boolean) => void, setPopupShownOnce: (shown: boolean) => void) => void;
|
3
|
+
//# sourceMappingURL=usePopupTrigger.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"usePopupTrigger.d.ts","sourceRoot":"","sources":["../../src/hooks/usePopupTrigger.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAElE,eAAO,MAAM,eAAe,GACxB,UAAU,cAAc,GAAG,IAAI,EAC/B,gBAAgB,MAAM,GAAG,SAAS,EAClC,UAAU,MAAM,EAChB,gBAAgB,OAAO,EACvB,WAAW,OAAO,EAClB,cAAc,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,EACrC,mBAAmB,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,SAoI9C,CAAC"}
|