@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.
- package/README.md +195 -17
- package/dist/assets/Close.d.ts +2 -0
- package/dist/assets/Close.d.ts.map +1 -0
- package/dist/components/AddToCartBtn/AddToCartBtn.d.ts +3 -0
- package/dist/components/AddToCartBtn/AddToCartBtn.d.ts.map +1 -0
- package/dist/components/AddToCartBtn/HydrogenAddToCartBtn.d.ts +3 -0
- package/dist/components/AddToCartBtn/HydrogenAddToCartBtn.d.ts.map +1 -0
- package/dist/components/AddToCartBtn/HydrogenReactAddToCartBtn.d.ts +3 -0
- package/dist/components/AddToCartBtn/HydrogenReactAddToCartBtn.d.ts.map +1 -0
- package/dist/components/AddToCartBtn/index.d.ts +2 -0
- package/dist/components/AddToCartBtn/index.d.ts.map +1 -0
- package/{src/components/AddToCartBtn/types.ts → dist/components/AddToCartBtn/types.d.ts} +2 -2
- package/dist/components/AddToCartBtn/types.d.ts.map +1 -0
- package/dist/components/ProductCard/ProductCard.d.ts +3 -0
- package/dist/components/ProductCard/ProductCard.d.ts.map +1 -0
- 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 +3 -0
- package/dist/components/ProductCard/index.d.ts.map +1 -0
- package/dist/components/ProductCard/types.d.ts +52 -0
- package/dist/components/ProductCard/types.d.ts.map +1 -0
- 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 +3 -0
- package/dist/components/ProductPrice/ProductPrice.d.ts.map +1 -0
- package/dist/components/ProductPrice/index.d.ts +2 -0
- package/dist/components/ProductPrice/index.d.ts.map +1 -0
- 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 +3 -0
- package/dist/components/Title/Title.d.ts.map +1 -0
- package/dist/components/Title/index.d.ts +2 -0
- package/dist/components/Title/index.d.ts.map +1 -0
- package/{src/components/Title/types.ts → dist/components/Title/types.d.ts} +2 -1
- package/dist/components/Title/types.d.ts.map +1 -0
- package/dist/components/VariantSelect/VariantSelect.d.ts +3 -0
- package/dist/components/VariantSelect/VariantSelect.d.ts.map +1 -0
- package/dist/components/VariantSelect/index.d.ts +2 -0
- package/dist/components/VariantSelect/index.d.ts.map +1 -0
- package/{src/components/VariantSelect/types.ts → dist/components/VariantSelect/types.d.ts} +3 -1
- package/dist/components/VariantSelect/types.d.ts.map +1 -0
- 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/{src/context/RebuyContext.tsx → dist/context/RebuyContext.d.ts} +2 -5
- package/dist/context/RebuyContext.d.ts.map +1 -0
- package/dist/hooks/titleLevel.d.ts +3 -0
- package/dist/hooks/titleLevel.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 +853 -0
- package/dist/index.css.map +7 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3211 -0
- package/dist/index.js.map +7 -0
- package/dist/index.mjs +3178 -0
- package/dist/index.mjs.map +7 -0
- package/dist/providers/RebuyHydrogenContextProvider.d.ts +3 -0
- package/dist/providers/RebuyHydrogenContextProvider.d.ts.map +1 -0
- package/dist/providers/RebuyHydrogenReactContextProvider.d.ts +8 -0
- package/dist/providers/RebuyHydrogenReactContextProvider.d.ts.map +1 -0
- package/{src/providers/types.ts → dist/providers/types.d.ts} +31 -18
- package/dist/providers/types.d.ts.map +1 -0
- package/dist/queries/cart.queries.d.ts +5 -0
- package/dist/queries/cart.queries.d.ts.map +1 -0
- package/dist/rebuy-rebuy-hydrogen-3.0.0-beta.11.tgz +0 -0
- package/dist/types/common.d.ts +9 -0
- package/dist/types/common.d.ts.map +1 -0
- package/{src/types/rebuyCustom.ts → dist/types/rebuyCustom.d.ts} +62 -50
- package/dist/types/rebuyCustom.d.ts.map +1 -0
- package/{src/types/rebuySmartCart.ts → dist/types/rebuySmartCart.d.ts} +1 -5
- package/dist/types/rebuySmartCart.d.ts.map +1 -0
- package/dist/types/shopify.d.ts +85 -0
- package/dist/types/shopify.d.ts.map +1 -0
- package/{src/types/widgets.ts → dist/types/widgets.d.ts} +7 -13
- package/dist/types/widgets.d.ts.map +1 -0
- package/dist/utils/convertToRebuyProduct.d.ts +156 -0
- package/dist/utils/convertToRebuyProduct.d.ts.map +1 -0
- package/dist/utils/createContextParameters.d.ts +3 -0
- package/dist/utils/createContextParameters.d.ts.map +1 -0
- package/dist/utils/csp.d.ts +16 -0
- package/dist/utils/csp.d.ts.map +1 -0
- package/dist/utils/getEncodedAttributes.d.ts +3 -0
- package/dist/utils/getEncodedAttributes.d.ts.map +1 -0
- package/dist/utils/getRebuyConfig.d.ts +3 -0
- package/dist/utils/getRebuyConfig.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 +8 -0
- package/dist/widgetContainer/RebuyWidgetContainer.d.ts.map +1 -0
- package/dist/widgets/RebuyCompleteTheLook/RebuyCompleteTheLook.d.ts +3 -0
- package/dist/widgets/RebuyCompleteTheLook/RebuyCompleteTheLook.d.ts.map +1 -0
- package/{src/widgets/RebuyCompleteTheLook/index.ts → dist/widgets/RebuyCompleteTheLook/index.d.ts} +1 -0
- package/dist/widgets/RebuyCompleteTheLook/index.d.ts.map +1 -0
- package/{src/widgets/RebuyCompleteTheLook/types.ts → dist/widgets/RebuyCompleteTheLook/types.d.ts} +1 -1
- package/dist/widgets/RebuyCompleteTheLook/types.d.ts.map +1 -0
- package/dist/widgets/RebuyDynamicBundleProducts/BundleImages.d.ts +5 -0
- package/dist/widgets/RebuyDynamicBundleProducts/BundleImages.d.ts.map +1 -0
- package/dist/widgets/RebuyDynamicBundleProducts/BundlePrice.d.ts +5 -0
- package/dist/widgets/RebuyDynamicBundleProducts/BundlePrice.d.ts.map +1 -0
- package/dist/widgets/RebuyDynamicBundleProducts/BundleSelection.d.ts +3 -0
- package/dist/widgets/RebuyDynamicBundleProducts/BundleSelection.d.ts.map +1 -0
- package/dist/widgets/RebuyDynamicBundleProducts/RebuyDynamicBundleProducts.d.ts +3 -0
- package/dist/widgets/RebuyDynamicBundleProducts/RebuyDynamicBundleProducts.d.ts.map +1 -0
- package/dist/widgets/RebuyDynamicBundleProducts/Select.d.ts +3 -0
- package/dist/widgets/RebuyDynamicBundleProducts/Select.d.ts.map +1 -0
- package/{src/widgets/RebuyDynamicBundleProducts/index.ts → dist/widgets/RebuyDynamicBundleProducts/index.d.ts} +1 -0
- package/dist/widgets/RebuyDynamicBundleProducts/index.d.ts.map +1 -0
- package/{src/widgets/RebuyDynamicBundleProducts/types.ts → dist/widgets/RebuyDynamicBundleProducts/types.d.ts} +1 -5
- package/dist/widgets/RebuyDynamicBundleProducts/types.d.ts.map +1 -0
- package/dist/widgets/RebuyProductAddOns/RebuyProductAddOnCard.d.ts +3 -0
- package/dist/widgets/RebuyProductAddOns/RebuyProductAddOnCard.d.ts.map +1 -0
- package/dist/widgets/RebuyProductAddOns/RebuyProductAddOns.d.ts +3 -0
- package/dist/widgets/RebuyProductAddOns/RebuyProductAddOns.d.ts.map +1 -0
- package/{src/widgets/RebuyProductAddOns/index.ts → dist/widgets/RebuyProductAddOns/index.d.ts} +1 -0
- package/dist/widgets/RebuyProductAddOns/index.d.ts.map +1 -0
- package/{src/widgets/RebuyProductAddOns/types.ts → dist/widgets/RebuyProductAddOns/types.d.ts} +2 -7
- package/dist/widgets/RebuyProductAddOns/types.d.ts.map +1 -0
- package/dist/widgets/RebuyProductRecommendations/RebuyProductRecommendations.d.ts +3 -0
- package/dist/widgets/RebuyProductRecommendations/RebuyProductRecommendations.d.ts.map +1 -0
- package/{src/widgets/RebuyProductRecommendations/index.ts → dist/widgets/RebuyProductRecommendations/index.d.ts} +1 -0
- package/dist/widgets/RebuyProductRecommendations/index.d.ts.map +1 -0
- package/{src/widgets/RebuyProductRecommendations/types.ts → dist/widgets/RebuyProductRecommendations/types.d.ts} +1 -1
- package/dist/widgets/RebuyProductRecommendations/types.d.ts.map +1 -0
- 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 +50 -37
- package/src/components/AddToCartBtn/AddToCartBtn.tsx +0 -45
- package/src/components/AddToCartBtn/HydrogenAddToCartBtn.tsx +0 -43
- package/src/components/AddToCartBtn/HydrogenReactAddToCartBtn.tsx +0 -35
- package/src/components/AddToCartBtn/index.ts +0 -1
- package/src/components/ProductCard/ProductCard.tsx +0 -70
- package/src/components/ProductCard/index.ts +0 -1
- package/src/components/ProductCard/types.ts +0 -10
- package/src/components/ProductPrice/ProductPrice.tsx +0 -49
- package/src/components/ProductPrice/index.ts +0 -1
- package/src/components/Title/Title.tsx +0 -20
- package/src/components/Title/index.ts +0 -1
- package/src/components/VariantSelect/VariantSelect.tsx +0 -45
- package/src/components/VariantSelect/index.ts +0 -1
- package/src/hooks/titleLevel.tsx +0 -42
- package/src/index.ts +0 -7
- package/src/providers/RebuyHydrogenContextProvider.tsx +0 -112
- package/src/providers/RebuyHydrogenReactContextProvider.tsx +0 -192
- package/src/queries/cart.queries.ts +0 -467
- package/src/types/common.ts +0 -8
- package/src/types/css.d.ts +0 -11
- package/src/types/env.d.ts +0 -12
- package/src/types/rebuy.d.ts +0 -31
- package/src/types/shopify.ts +0 -142
- package/src/utils/convertToRebuyProduct.tsx +0 -319
- package/src/utils/createContextParameters.ts +0 -142
- package/src/utils/getEncodedAttributes.ts +0 -11
- package/src/utils/getRebuyConfig.ts +0 -31
- package/src/widgetContainer/RebuyWidgetContainer.tsx +0 -183
- package/src/widgets/RebuyCompleteTheLook/RebuyCompleteTheLook.tsx +0 -50
- package/src/widgets/RebuyDynamicBundleProducts/BundleImages.tsx +0 -62
- package/src/widgets/RebuyDynamicBundleProducts/BundlePrice.tsx +0 -93
- package/src/widgets/RebuyDynamicBundleProducts/BundleSelection.tsx +0 -65
- package/src/widgets/RebuyDynamicBundleProducts/RebuyDynamicBundleProducts.tsx +0 -118
- package/src/widgets/RebuyDynamicBundleProducts/Select.tsx +0 -41
- package/src/widgets/RebuyProductAddOns/RebuyProductAddOnCard.tsx +0 -66
- package/src/widgets/RebuyProductAddOns/RebuyProductAddOns.tsx +0 -218
- package/src/widgets/RebuyProductRecommendations/RebuyProductRecommendations.tsx +0 -50
@@ -0,0 +1,156 @@
|
|
1
|
+
import type { RebuyProductVariant } from '~/types/rebuyCustom';
|
2
|
+
import type { HydrogenProduct } from '~/types/shopify';
|
3
|
+
export declare const convertToRebuyProduct: (isHydrogenReact: boolean, product?: HydrogenProduct) => {
|
4
|
+
collections: {
|
5
|
+
nodes: {
|
6
|
+
handle: string;
|
7
|
+
}[];
|
8
|
+
};
|
9
|
+
compareAtPriceRange: {
|
10
|
+
maxVariantCompareAtPrice: null;
|
11
|
+
minVariantCompareAtPrice: null;
|
12
|
+
};
|
13
|
+
description: string;
|
14
|
+
descriptionHtml: string;
|
15
|
+
featuredImage: {
|
16
|
+
altText: string;
|
17
|
+
height: number;
|
18
|
+
id: string;
|
19
|
+
url: string;
|
20
|
+
width: number;
|
21
|
+
};
|
22
|
+
handle: string;
|
23
|
+
id: string;
|
24
|
+
images: {
|
25
|
+
altText: string;
|
26
|
+
height: number;
|
27
|
+
id: string;
|
28
|
+
url: string;
|
29
|
+
width: number;
|
30
|
+
}[];
|
31
|
+
media: never[];
|
32
|
+
metafields: never[];
|
33
|
+
options: never[];
|
34
|
+
priceRange: {
|
35
|
+
maxVariantPrice: import("@shopify/hydrogen-react/storefront-api-types").MoneyV2;
|
36
|
+
minVariantPrice: import("@shopify/hydrogen-react/storefront-api-types").MoneyV2;
|
37
|
+
};
|
38
|
+
selected: boolean;
|
39
|
+
selectedOptions: {};
|
40
|
+
selectedSellingPlan: {};
|
41
|
+
selectedSellingPlanAllocation: {};
|
42
|
+
selectedVariant: {
|
43
|
+
availableForSale: boolean;
|
44
|
+
compareAtPriceV2: {
|
45
|
+
amount: string;
|
46
|
+
currencyCode: import("@shopify/hydrogen-react/storefront-api-types").CurrencyCode;
|
47
|
+
};
|
48
|
+
id: string;
|
49
|
+
image: {
|
50
|
+
altText: string;
|
51
|
+
height: number;
|
52
|
+
id: string;
|
53
|
+
url: string;
|
54
|
+
width: number;
|
55
|
+
};
|
56
|
+
priceV2: {
|
57
|
+
amount: string;
|
58
|
+
currencyCode: import("@shopify/hydrogen-react/storefront-api-types").CurrencyCode;
|
59
|
+
};
|
60
|
+
product: {
|
61
|
+
handle: string;
|
62
|
+
id: string;
|
63
|
+
title: string;
|
64
|
+
vendor: string;
|
65
|
+
};
|
66
|
+
selectedOptions: Pick<import("@shopify/hydrogen-react/storefront-api-types").SelectedOption, "name" | "value">[];
|
67
|
+
sku: string;
|
68
|
+
title: string;
|
69
|
+
};
|
70
|
+
sellingPlanGroups: never[];
|
71
|
+
seo: {
|
72
|
+
description: string;
|
73
|
+
title: string;
|
74
|
+
};
|
75
|
+
title: string;
|
76
|
+
variants: {
|
77
|
+
nodes: RebuyProductVariant[];
|
78
|
+
};
|
79
|
+
vendor: string;
|
80
|
+
} | {
|
81
|
+
collections: {
|
82
|
+
nodes: never[];
|
83
|
+
};
|
84
|
+
compareAtPriceRange: {
|
85
|
+
maxVariantCompareAtPrice: null;
|
86
|
+
minVariantCompareAtPrice: null;
|
87
|
+
};
|
88
|
+
description: string;
|
89
|
+
descriptionHtml: string;
|
90
|
+
featuredImage: {
|
91
|
+
altText: string;
|
92
|
+
height: number;
|
93
|
+
id: string;
|
94
|
+
url: string;
|
95
|
+
width: number;
|
96
|
+
};
|
97
|
+
handle: string;
|
98
|
+
id: string;
|
99
|
+
images: {
|
100
|
+
altText: string;
|
101
|
+
height: number;
|
102
|
+
id: string;
|
103
|
+
url: string;
|
104
|
+
width: number;
|
105
|
+
}[];
|
106
|
+
media: never[];
|
107
|
+
metafields: never[];
|
108
|
+
options: never[];
|
109
|
+
priceRange: {
|
110
|
+
maxVariantPrice: import("@shopify/hydrogen-react/storefront-api-types").MoneyV2;
|
111
|
+
minVariantPrice: import("@shopify/hydrogen-react/storefront-api-types").MoneyV2;
|
112
|
+
};
|
113
|
+
selected: boolean;
|
114
|
+
selectedOptions: {};
|
115
|
+
selectedSellingPlan: {};
|
116
|
+
selectedSellingPlanAllocation: {};
|
117
|
+
selectedVariant: {
|
118
|
+
availableForSale: boolean;
|
119
|
+
compareAtPriceV2: {
|
120
|
+
amount: string;
|
121
|
+
currencyCode: import("@shopify/hydrogen-react/storefront-api-types").CurrencyCode;
|
122
|
+
};
|
123
|
+
id: string;
|
124
|
+
image: {
|
125
|
+
altText: string;
|
126
|
+
height: number;
|
127
|
+
id: string;
|
128
|
+
url: string;
|
129
|
+
width: number;
|
130
|
+
};
|
131
|
+
priceV2: {
|
132
|
+
amount: string;
|
133
|
+
currencyCode: import("@shopify/hydrogen-react/storefront-api-types").CurrencyCode;
|
134
|
+
};
|
135
|
+
product: {
|
136
|
+
handle: string;
|
137
|
+
id: string;
|
138
|
+
title: string;
|
139
|
+
vendor: string;
|
140
|
+
};
|
141
|
+
selectedOptions: Pick<import("@shopify/hydrogen-react/storefront-api-types").SelectedOption, "name" | "value">[];
|
142
|
+
sku: string;
|
143
|
+
title: string;
|
144
|
+
};
|
145
|
+
sellingPlanGroups: never[];
|
146
|
+
seo: {
|
147
|
+
description: null;
|
148
|
+
title: null;
|
149
|
+
};
|
150
|
+
title: string;
|
151
|
+
variants: {
|
152
|
+
nodes: RebuyProductVariant[];
|
153
|
+
};
|
154
|
+
vendor: string;
|
155
|
+
};
|
156
|
+
//# sourceMappingURL=convertToRebuyProduct.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"convertToRebuyProduct.d.ts","sourceRoot":"","sources":["../../src/utils/convertToRebuyProduct.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEvD,eAAO,MAAM,qBAAqB,GAAI,iBAAiB,OAAO,EAAE,UAAU,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqOxF,CAAC"}
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import type { ContextParameters, RebuyContextProps } from '~/types/rebuyCustom';
|
2
|
+
export declare const createContextParameters: ({ cacheKey, cartAttributes: legacyCartAttributes, cartCost: legacyCartCost, cartId: legacyCartId, cartLines: legacyCartLines, cartLinesLength: legacyCartLinesLength, cartNote: legacyCartNote, cartSubtotal: legacyCartSubtotal, cartTotalQuantity: legacyCartTotalQuantity, checkoutUrl: legacyCheckoutUrl, discountCodes: legacyDiscountCodes, hydrogenReactCartActions, hydrogenReactCartError, hydrogenReactCartStatus, isHydrogenReact, queryObject, sourceHydrogenCart, windowUrl, }: RebuyContextProps) => ContextParameters;
|
3
|
+
//# sourceMappingURL=createContextParameters.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"createContextParameters.d.ts","sourceRoot":"","sources":["../../src/utils/createContextParameters.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAyB,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AA8BvG,eAAO,MAAM,uBAAuB,GAAI,6dAsBrC,iBAAiB,KAAG,iBAmLtB,CAAC"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
type CspOptions = {
|
2
|
+
/** Add sources for Rebuy client-side API calls. Defaults to false. */
|
3
|
+
connectSrc?: boolean;
|
4
|
+
/** Add sources for Rebuy stylesheets. Defaults to true. */
|
5
|
+
styleSrc?: boolean;
|
6
|
+
};
|
7
|
+
/**
|
8
|
+
* Modifies a Headers object or a CSP string to include necessary Rebuy domains.
|
9
|
+
*
|
10
|
+
* @param {Headers | string} existing - The existing Headers object or CSP string.
|
11
|
+
* @param {CspOptions} options - Configuration for which Rebuy sources to add.
|
12
|
+
* @returns {Headers | string} The modified Headers object or CSP string.
|
13
|
+
*/
|
14
|
+
export declare const updateRebuyCsp: <T extends Headers | string>(existing: T, options?: CspOptions) => T;
|
15
|
+
export {};
|
16
|
+
//# sourceMappingURL=csp.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"csp.d.ts","sourceRoot":"","sources":["../../src/utils/csp.ts"],"names":[],"mappings":"AAMA,KAAK,UAAU,GAAG;IACd,sEAAsE;IACtE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,OAAO,GAAG,MAAM,EAAE,UAAU,CAAC,EAAE,UAAS,UAAe,KAAG,CA4DlG,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getEncodedAttributes.d.ts","sourceRoot":"","sources":["../../src/utils/getEncodedAttributes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8CAA8C,CAAC;AAE9E,eAAO,MAAM,oBAAoB,GAAI,YAAY,SAAS,EAAE,WAGvD,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getRebuyConfig.d.ts","sourceRoot":"","sources":["../../src/utils/getRebuyConfig.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAiB,MAAM,qBAAqB,CAAC;AAEtE,eAAO,MAAM,cAAc,GAAU,aAAa,MAAM,KAAG,OAAO,CAAC,WAAW,CAuB7E,CAAC"}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
/**
|
2
|
+
* Generates a link object for the Rebuy theme stylesheet.
|
3
|
+
* Suitable for Remix's static `links` export.
|
4
|
+
*
|
5
|
+
* Requires API key to be passed directly or available as an environment variable
|
6
|
+
* that this function can access (if it were running in a Node.js server environment
|
7
|
+
* where process.env is available before React rendering).
|
8
|
+
* For Remix, it's best to pass the apiKey explicitly if it's not a universally available env var.
|
9
|
+
*
|
10
|
+
* @param {object} options - The options for the Rebuy theme stylesheet link.
|
11
|
+
* @param {string} options.apiKey - The API key for the Rebuy theme stylesheet.
|
12
|
+
* @returns {Array<{ href: string; rel: string }>}
|
13
|
+
*/
|
14
|
+
export declare const getRebuyThemeStylesLink: (options: {
|
15
|
+
apiKey: string;
|
16
|
+
}) => {
|
17
|
+
href: string;
|
18
|
+
rel: string;
|
19
|
+
}[];
|
20
|
+
//# sourceMappingURL=theme.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/utils/theme.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,uBAAuB,GAAI,SAAS;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,KAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,EAelG,CAAC"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { type ComponentType } from 'react';
|
2
|
+
import type { RebuyWidgetContainerProps } from '~/types/rebuyCustom';
|
3
|
+
type RebuyWidgetContainerComponent = {
|
4
|
+
(props: RebuyWidgetContainerProps): JSX.Element;
|
5
|
+
} & ComponentType<RebuyWidgetContainerProps>;
|
6
|
+
export declare const RebuyWidgetContainer: RebuyWidgetContainerComponent;
|
7
|
+
export {};
|
8
|
+
//# sourceMappingURL=RebuyWidgetContainer.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"RebuyWidgetContainer.d.ts","sourceRoot":"","sources":["../../src/widgetContainer/RebuyWidgetContainer.tsx"],"names":[],"mappings":"AAGA,OAAc,EAAE,KAAK,aAAa,EAAgC,MAAM,OAAO,CAAC;AAGhF,OAAO,KAAK,EAAgB,yBAAyB,EAAuB,MAAM,qBAAqB,CAAC;AAExG,KAAK,6BAA6B,GAAG;IACjC,CAAC,KAAK,EAAE,yBAAyB,GAAG,GAAG,CAAC,OAAO,CAAC;CACnD,GAAG,aAAa,CAAC,yBAAyB,CAAC,CAAC;AA8G7C,eAAO,MAAM,oBAAoB,EAA+B,6BAA6B,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"RebuyCompleteTheLook.d.ts","sourceRoot":"","sources":["../../../src/widgets/RebuyCompleteTheLook/RebuyCompleteTheLook.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAKzD,eAAO,MAAM,oBAAoB,GAAI,OAAO,yBAAyB,mDAkCpE,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/widgets/RebuyCompleteTheLook/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/widgets/RebuyCompleteTheLook/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD,MAAM,MAAM,yBAAyB,GAAG;IACpC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B,GAAG,gBAAgB,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"BundleImages.d.ts","sourceRoot":"","sources":["../../../src/widgets/RebuyDynamicBundleProducts/BundleImages.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAIhF,eAAO,MAAM,YAAY,GAAI,cAAc;IAAE,QAAQ,EAAE,aAAa,EAAE,CAAA;CAAE,4CAkDvE,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"BundlePrice.d.ts","sourceRoot":"","sources":["../../../src/widgets/RebuyDynamicBundleProducts/BundlePrice.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAGhF,eAAO,MAAM,WAAW,GAAI,cAAc;IAAE,QAAQ,EAAE,aAAa,EAAE,CAAA;CAAE,oDAqEtE,CAAC"}
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import type { BundleSelectionProps } from '~/widgets/RebuyDynamicBundleProducts/types';
|
2
|
+
export declare const BundleSelection: ({ onSelectVariant, onToggleBundleItem, products }: BundleSelectionProps) => import("react/jsx-runtime").JSX.Element;
|
3
|
+
//# sourceMappingURL=BundleSelection.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"BundleSelection.d.ts","sourceRoot":"","sources":["../../../src/widgets/RebuyDynamicBundleProducts/BundleSelection.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAIvF,eAAO,MAAM,eAAe,GAAI,mDAAmD,oBAAoB,4CAyCtG,CAAC"}
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import type { RebuyDynamicBundleProductsProps } from '~/widgets/RebuyDynamicBundleProducts/types';
|
2
|
+
export declare const RebuyDynamicBundleProducts: (props: RebuyDynamicBundleProductsProps) => import("react/jsx-runtime").JSX.Element | null;
|
3
|
+
//# sourceMappingURL=RebuyDynamicBundleProducts.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"RebuyDynamicBundleProducts.d.ts","sourceRoot":"","sources":["../../../src/widgets/RebuyDynamicBundleProducts/RebuyDynamicBundleProducts.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAiB,+BAA+B,EAAE,MAAM,4CAA4C,CAAC;AAIjH,eAAO,MAAM,0BAA0B,GAAI,OAAO,+BAA+B,mDAsFhF,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/widgets/RebuyDynamicBundleProducts/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAInG,eAAO,MAAM,MAAM,GAAI,8BAA8B,iBAAiB,4CA6BrE,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/widgets/RebuyDynamicBundleProducts/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC"}
|
@@ -1,23 +1,19 @@
|
|
1
1
|
import type { RebuyProduct } from '~/types/rebuyCustom';
|
2
2
|
import type { WidgetChildProps } from '~/types/widgets';
|
3
|
-
|
4
3
|
export type BundleProductOptions = {
|
5
4
|
default?: boolean;
|
6
5
|
};
|
7
|
-
|
8
6
|
export type BundleProduct = RebuyProduct & BundleProductOptions;
|
9
|
-
|
10
7
|
export type BundleSelectionProps = {
|
11
8
|
onSelectVariant: (product: BundleProduct, variantId: string) => void;
|
12
9
|
onToggleBundleItem: (product: BundleProduct) => void;
|
13
10
|
products: BundleProduct[];
|
14
11
|
};
|
15
|
-
|
16
12
|
export type BundleSelectProps = {
|
17
13
|
onSelectVariant: (product: BundleProduct, variantId: string) => void;
|
18
14
|
product: BundleProduct;
|
19
15
|
};
|
20
|
-
|
21
16
|
export type RebuyDynamicBundleProductsProps = {
|
22
17
|
addToCartBtnText?: string;
|
23
18
|
} & WidgetChildProps;
|
19
|
+
//# sourceMappingURL=types.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/widgets/RebuyDynamicBundleProducts/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD,MAAM,MAAM,oBAAoB,GAAG;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,oBAAoB,CAAC;AAEhE,MAAM,MAAM,oBAAoB,GAAG;IAC/B,eAAe,EAAE,CAAC,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACrE,kBAAkB,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,IAAI,CAAC;IACrD,QAAQ,EAAE,aAAa,EAAE,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC5B,eAAe,EAAE,CAAC,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACrE,OAAO,EAAE,aAAa,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC1C,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B,GAAG,gBAAgB,CAAC"}
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import type { RebuyProductAddOnCardProps } from './types';
|
2
|
+
export declare const RebuyProductAddOnCard: ({ handleChange, learnMoreText, outOfStockText, product, titleLevel, }: RebuyProductAddOnCardProps) => import("react/jsx-runtime").JSX.Element;
|
3
|
+
//# sourceMappingURL=RebuyProductAddOnCard.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"RebuyProductAddOnCard.d.ts","sourceRoot":"","sources":["../../../src/widgets/RebuyProductAddOns/RebuyProductAddOnCard.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAG1D,eAAO,MAAM,qBAAqB,GAAI,uEAMnC,0BAA0B,4CAwC5B,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"RebuyProductAddOns.d.ts","sourceRoot":"","sources":["../../../src/widgets/RebuyProductAddOns/RebuyProductAddOns.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAIjF,eAAO,MAAM,kBAAkB,GAAI,OAAO,sBAAsB,mDA0K/D,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/widgets/RebuyProductAddOns/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
|
package/{src/widgets/RebuyProductAddOns/types.ts → dist/widgets/RebuyProductAddOns/types.d.ts}
RENAMED
@@ -1,7 +1,6 @@
|
|
1
1
|
import type { ProductCardTitleLevel } from '~/types/common';
|
2
2
|
import type { RebuyProduct } from '~/types/rebuyCustom';
|
3
3
|
import type { WidgetChildProps } from '~/types/widgets';
|
4
|
-
|
5
4
|
export type RebuyProductAddOnProps = {
|
6
5
|
addToCartBtnText?: string;
|
7
6
|
includeMainProduct?: boolean;
|
@@ -10,15 +9,11 @@ export type RebuyProductAddOnProps = {
|
|
10
9
|
subtotalText?: string;
|
11
10
|
withProductText?: string;
|
12
11
|
} & WidgetChildProps;
|
13
|
-
|
14
12
|
export type RebuyProductAddOnCardProps = {
|
15
|
-
handleChange: (
|
16
|
-
event: React.ChangeEvent<HTMLInputElement>,
|
17
|
-
product: RebuyProduct
|
18
|
-
) => void;
|
19
|
-
|
13
|
+
handleChange: (event: React.ChangeEvent<HTMLInputElement>, product: RebuyProduct) => void;
|
20
14
|
learnMoreText?: string;
|
21
15
|
outOfStockText?: string;
|
22
16
|
product: RebuyProduct;
|
23
17
|
titleLevel: ProductCardTitleLevel;
|
24
18
|
};
|
19
|
+
//# sourceMappingURL=types.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/widgets/RebuyProductAddOns/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD,MAAM,MAAM,sBAAsB,GAAG;IACjC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B,GAAG,gBAAgB,CAAC;AAErB,MAAM,MAAM,0BAA0B,GAAG;IACrC,YAAY,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,EAAE,OAAO,EAAE,YAAY,KAAK,IAAI,CAAC;IAE1F,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,YAAY,CAAC;IACtB,UAAU,EAAE,qBAAqB,CAAC;CACrC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"RebuyProductRecommendations.d.ts","sourceRoot":"","sources":["../../../src/widgets/RebuyProductRecommendations/RebuyProductRecommendations.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,SAAS,CAAC;AAGhE,eAAO,MAAM,2BAA2B,GAAI,OAAO,gCAAgC,mDAkClF,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/widgets/RebuyProductRecommendations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/widgets/RebuyProductRecommendations/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD,MAAM,MAAM,gCAAgC,GAAG;IAC3C,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B,GAAG,gBAAgB,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"RebuyWidget.d.ts","sourceRoot":"","sources":["../../../src/widgets/RebuyWidget/RebuyWidget.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,gBAAgB,EAAkB,MAAM,SAAS,CAAC;AAKhE,eAAO,MAAM,WAAW,GAAI,OAAO,gBAAgB,mDA6UlD,CAAC"}
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import type { WidgetContentProps } from '~/widgets/RebuyWidget/types';
|
2
|
+
export declare const WidgetContent: ({ addToCartCallback, customTitleLevel, isHydrogenReact, isInPopup, onDismiss, products, settings, }: WidgetContentProps) => import("react/jsx-runtime").JSX.Element;
|
3
|
+
//# sourceMappingURL=WidgetContent.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"WidgetContent.d.ts","sourceRoot":"","sources":["../../../src/widgets/RebuyWidget/WidgetContent.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAGtE,eAAO,MAAM,aAAa,GAAI,qGAQ3B,kBAAkB,4CAsGpB,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/widgets/RebuyWidget/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
|