@rebuy/rebuy-hydrogen 3.0.0-beta.18 → 3.0.0-beta.19
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 +3 -3
- package/dist/components/Timer/Timer.d.ts +1 -1
- package/dist/components/Timer/Timer.d.ts.map +1 -1
- package/dist/components/Timer/types.d.ts +4 -0
- package/dist/components/Timer/types.d.ts.map +1 -1
- package/dist/hooks/useBFCacheReset.d.ts +7 -0
- package/dist/hooks/useBFCacheReset.d.ts.map +1 -0
- package/dist/index.css +27 -27
- package/dist/index.css.map +1 -1
- package/dist/index.js +420 -376
- package/dist/index.js.map +4 -4
- package/dist/index.mjs +193 -149
- package/dist/index.mjs.map +4 -4
- package/dist/providers/RebuyHydrogenContextProvider.d.ts.map +1 -1
- package/dist/providers/RebuyHydrogenReactContextProvider.d.ts.map +1 -1
- package/dist/types/widgets.d.ts +168 -168
- package/dist/widgets/RebuyWidget/RebuyWidget.d.ts.map +1 -1
- package/dist/widgets/RebuyWidget/WidgetContent.d.ts +1 -1
- package/dist/widgets/RebuyWidget/WidgetContent.d.ts.map +1 -1
- package/dist/widgets/RebuyWidget/types.d.ts +2 -0
- package/dist/widgets/RebuyWidget/types.d.ts.map +1 -1
- package/package.json +1 -9
package/README.md
CHANGED
@@ -28,10 +28,10 @@ This distinction is important as different hooks/functions are used in each case
|
|
28
28
|
|
29
29
|
### Prerequisites
|
30
30
|
|
31
|
-
"@shopify/hydrogen": ">=2025.5.0",
|
32
31
|
|
33
|
-
-
|
34
|
-
"@shopify/hydrogen-react": ">=2025.4.0"
|
32
|
+
- "@shopify/hydrogen": ">=2025.5.0",
|
33
|
+
- If you are also using hydrogen-react along with just hydrogen: "@shopify/hydrogen-react": ">=2025.4.0"
|
34
|
+
- Smart Cart V2. Legacy Smart Carts are not supported
|
35
35
|
|
36
36
|
|
37
37
|
### Installation Steps
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import type { TimerProps } from './types';
|
2
|
-
export declare const Timer: ({ action, durationMinutes, durationSeconds, isPopup, onDismiss, title }: TimerProps) => import("react/jsx-runtime").JSX.Element;
|
2
|
+
export declare const Timer: ({ action, cartCount, checkoutUrl, durationMinutes, durationSeconds, isPopup, onDismiss, title, }: TimerProps) => import("react/jsx-runtime").JSX.Element;
|
3
3
|
//# sourceMappingURL=Timer.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Timer.d.ts","sourceRoot":"","sources":["../../../src/components/Timer/Timer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAI1C,eAAO,MAAM,KAAK,GAAI,
|
1
|
+
{"version":3,"file":"Timer.d.ts","sourceRoot":"","sources":["../../../src/components/Timer/Timer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAI1C,eAAO,MAAM,KAAK,GAAI,kGASnB,UAAU,4CAoFZ,CAAC"}
|
@@ -2,6 +2,10 @@ export type TimerAction = 'dismiss' | 'checkout' | 'cart' | 'stop';
|
|
2
2
|
export type TimerProps = {
|
3
3
|
/** The action to take when the timer reaches zero */
|
4
4
|
action: TimerAction;
|
5
|
+
/** The cart count to handle the edge case where the cart count is 0 and we don't want the redirect to occur */
|
6
|
+
cartCount?: number;
|
7
|
+
/** The URL for the stores checkout page (for checkout action) */
|
8
|
+
checkoutUrl?: string;
|
5
9
|
/** The duration in minutes */
|
6
10
|
durationMinutes: number | null;
|
7
11
|
/** The duration in seconds */
|
@@ -1 +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,GAAG,IAAI,CAAC;IAC/B,8BAA8B;IAC9B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,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
|
+
{"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,+GAA+G;IAC/G,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iEAAiE;IACjE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8BAA8B;IAC9B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,8BAA8B;IAC9B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,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,7 @@
|
|
1
|
+
/**
|
2
|
+
* Hook to detect B/F (Back/Forward) cache restoration and provide a reset key
|
3
|
+
* When the browser restores a page from B/F cache, this hook updates the reset key
|
4
|
+
* which can be used to force remount components and reset their state
|
5
|
+
*/
|
6
|
+
export declare const useBFCacheReset: () => number;
|
7
|
+
//# sourceMappingURL=useBFCacheReset.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useBFCacheReset.d.ts","sourceRoot":"","sources":["../../src/hooks/useBFCacheReset.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,eAAe,cAkB3B,CAAC"}
|
package/dist/index.css
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
clip: rect(0, 0, 0, 0);
|
12
12
|
}
|
13
13
|
|
14
|
-
/* ../../../../../tmp/tmp-165-
|
14
|
+
/* ../../../../../tmp/tmp-165-PG4yN66KHu8v/opt/atlassian/pipelines/agent/build/src/smart-cart/components/AnnouncementBar/AnnouncementBar.css */
|
15
15
|
.AnnouncementBar_rebuy-announcement-bar__container {
|
16
16
|
position: relative;
|
17
17
|
background-color: var(--rb-color-banner-background);
|
@@ -47,7 +47,7 @@
|
|
47
47
|
overflow-wrap: break-word;
|
48
48
|
}
|
49
49
|
|
50
|
-
/* ../../../../../tmp/tmp-165-
|
50
|
+
/* ../../../../../tmp/tmp-165-PG4yN66KHu8v/opt/atlassian/pipelines/agent/build/src/smart-cart/components/CartItem/CartItem.css */
|
51
51
|
.CartItem_rebuy-cart-item {
|
52
52
|
display: flex;
|
53
53
|
position: relative;
|
@@ -562,7 +562,7 @@
|
|
562
562
|
opacity: 0.5;
|
563
563
|
}
|
564
564
|
|
565
|
-
/* ../../../../../tmp/tmp-165-
|
565
|
+
/* ../../../../../tmp/tmp-165-PG4yN66KHu8v/opt/atlassian/pipelines/agent/build/src/smart-cart/components/EmptyCart/EmptyCart.css */
|
566
566
|
.EmptyCart_rebuy-empty-cart-message {
|
567
567
|
flex: 0 0 auto;
|
568
568
|
margin: 0;
|
@@ -583,7 +583,7 @@
|
|
583
583
|
text-decoration: var(--rb-empty-cart-message-link-text-decoration-hover);
|
584
584
|
}
|
585
585
|
|
586
|
-
/* ../../../../../tmp/tmp-165-
|
586
|
+
/* ../../../../../tmp/tmp-165-PG4yN66KHu8v/opt/atlassian/pipelines/agent/build/src/smart-cart/components/CartItemList/CartItemList.css */
|
587
587
|
.CartItemList_rebuy-cart-item-list__container {
|
588
588
|
display: flex;
|
589
589
|
flex-flow: column nowrap;
|
@@ -605,7 +605,7 @@
|
|
605
605
|
min-height: var(--rb-cart-item-list-min-height);
|
606
606
|
}
|
607
607
|
|
608
|
-
/* ../../../../../tmp/tmp-165-
|
608
|
+
/* ../../../../../tmp/tmp-165-PG4yN66KHu8v/opt/atlassian/pipelines/agent/build/src/smart-cart/components/CartNoteInput/CartNoteInput.css */
|
609
609
|
.CartNoteInput_rebuy-cart-note-input {
|
610
610
|
display: flex;
|
611
611
|
flex-direction: column;
|
@@ -815,7 +815,7 @@
|
|
815
815
|
gap: var(--rb-cart-note-input-gap);
|
816
816
|
}
|
817
817
|
|
818
|
-
/* ../../../../../tmp/tmp-165-
|
818
|
+
/* ../../../../../tmp/tmp-165-PG4yN66KHu8v/opt/atlassian/pipelines/agent/build/src/smart-cart/components/CartSubtotal/CartSubtotal.css */
|
819
819
|
.CartSubtotal_rebuy-cart-subtotal {
|
820
820
|
display: flex;
|
821
821
|
margin: 0;
|
@@ -931,7 +931,7 @@
|
|
931
931
|
font-weight: var(--rb-cart-subtotal-discount-summary-item-amount-font-weight);
|
932
932
|
}
|
933
933
|
|
934
|
-
/* ../../../../../tmp/tmp-165-
|
934
|
+
/* ../../../../../tmp/tmp-165-PG4yN66KHu8v/opt/atlassian/pipelines/agent/build/src/smart-cart/components/CartTitleBar/CartTitleBar.css */
|
935
935
|
.CartTitleBar_rebuy-cart-title-bar {
|
936
936
|
flex-grow: var(--rb-cart-title-bar-flex-grow);
|
937
937
|
margin: 0;
|
@@ -947,7 +947,7 @@
|
|
947
947
|
font-weight: var(--rb-cart-title-bar-font-weight);
|
948
948
|
}
|
949
949
|
|
950
|
-
/* ../../../../../tmp/tmp-165-
|
950
|
+
/* ../../../../../tmp/tmp-165-PG4yN66KHu8v/opt/atlassian/pipelines/agent/build/src/smart-cart/components/CheckoutArea/CheckoutArea.css */
|
951
951
|
.CheckoutArea_rebuy-checkout-area {
|
952
952
|
display: flex;
|
953
953
|
flex-flow: column nowrap;
|
@@ -1138,7 +1138,7 @@
|
|
1138
1138
|
text-decoration: none;
|
1139
1139
|
}
|
1140
1140
|
|
1141
|
-
/* ../../../../../tmp/tmp-165-
|
1141
|
+
/* ../../../../../tmp/tmp-165-PG4yN66KHu8v/opt/atlassian/pipelines/agent/build/src/components/AddToCartBtn/AddToCartBtn.css */
|
1142
1142
|
.AddToCartBtn_rebuy-cart-button {
|
1143
1143
|
padding: var(--rb-spacing-unit-2x, 8px) var(--rb-spacing-unit-4x, 16px);
|
1144
1144
|
border-radius: var(--rb-border-radius-button, 4px);
|
@@ -1190,7 +1190,7 @@
|
|
1190
1190
|
max-width: 100%;
|
1191
1191
|
}
|
1192
1192
|
|
1193
|
-
/* ../../../../../tmp/tmp-165-
|
1193
|
+
/* ../../../../../tmp/tmp-165-PG4yN66KHu8v/opt/atlassian/pipelines/agent/build/src/components/ProductPrice/ProductPrice.css */
|
1194
1194
|
.ProductPrice_rebuy-product-price {
|
1195
1195
|
display: flex;
|
1196
1196
|
align-items: baseline;
|
@@ -1212,7 +1212,7 @@
|
|
1212
1212
|
font-size: var(--rb-font-size-small, 0.875em);
|
1213
1213
|
}
|
1214
1214
|
|
1215
|
-
/* ../../../../../tmp/tmp-165-
|
1215
|
+
/* ../../../../../tmp/tmp-165-PG4yN66KHu8v/opt/atlassian/pipelines/agent/build/src/components/QuantityInput/QuantityInput.css */
|
1216
1216
|
.QuantityInput_rebuy-quantity__container {
|
1217
1217
|
display: flex;
|
1218
1218
|
align-items: center;
|
@@ -1230,7 +1230,7 @@
|
|
1230
1230
|
appearance: auto;
|
1231
1231
|
}
|
1232
1232
|
|
1233
|
-
/* ../../../../../tmp/tmp-165-
|
1233
|
+
/* ../../../../../tmp/tmp-165-PG4yN66KHu8v/opt/atlassian/pipelines/agent/build/src/components/VariantSelect/VariantSelect.css */
|
1234
1234
|
.VariantSelect_rebuy-variant__container {
|
1235
1235
|
position: relative;
|
1236
1236
|
}
|
@@ -1296,7 +1296,7 @@
|
|
1296
1296
|
border-color: #999;
|
1297
1297
|
}
|
1298
1298
|
|
1299
|
-
/* ../../../../../tmp/tmp-165-
|
1299
|
+
/* ../../../../../tmp/tmp-165-PG4yN66KHu8v/opt/atlassian/pipelines/agent/build/src/components/Title/Title.css */
|
1300
1300
|
.Title_rebuy-title {
|
1301
1301
|
font-family: var(--rb-font-family-base);
|
1302
1302
|
font-weight: var(--rb-font-weight-bold);
|
@@ -1306,7 +1306,7 @@
|
|
1306
1306
|
padding: 0;
|
1307
1307
|
}
|
1308
1308
|
|
1309
|
-
/* ../../../../../tmp/tmp-165-
|
1309
|
+
/* ../../../../../tmp/tmp-165-PG4yN66KHu8v/opt/atlassian/pipelines/agent/build/src/components/ProductCard/ProductCard.css */
|
1310
1310
|
:root {
|
1311
1311
|
--rb-product-card-gap: var(--rb-spacing-unit-2x, 8px);
|
1312
1312
|
--rb-product-card-padding: var(--rb-spacing-unit-3x, 12px);
|
@@ -1546,7 +1546,7 @@
|
|
1546
1546
|
margin-top: var(--rb-spacing-unit-1x, 0.5em);
|
1547
1547
|
}
|
1548
1548
|
|
1549
|
-
/* ../../../../../tmp/tmp-165-
|
1549
|
+
/* ../../../../../tmp/tmp-165-PG4yN66KHu8v/opt/atlassian/pipelines/agent/build/src/components/ProductCarousel/ProductCarousel.css */
|
1550
1550
|
.ProductCarousel_rebuy-carousel {
|
1551
1551
|
position: relative;
|
1552
1552
|
overflow: hidden;
|
@@ -1629,7 +1629,7 @@
|
|
1629
1629
|
flex: 0 0 calc(16.66% - 1.25em);
|
1630
1630
|
}
|
1631
1631
|
|
1632
|
-
/* ../../../../../tmp/tmp-165-
|
1632
|
+
/* ../../../../../tmp/tmp-165-PG4yN66KHu8v/opt/atlassian/pipelines/agent/build/src/components/Timer/Timer.css */
|
1633
1633
|
.Timer_rebuy-timer__container {
|
1634
1634
|
margin: 0 auto;
|
1635
1635
|
padding: 10px;
|
@@ -1690,7 +1690,7 @@
|
|
1690
1690
|
}
|
1691
1691
|
}
|
1692
1692
|
|
1693
|
-
/* ../../../../../tmp/tmp-165-
|
1693
|
+
/* ../../../../../tmp/tmp-165-PG4yN66KHu8v/opt/atlassian/pipelines/agent/build/src/widgets/RebuyWidget/RebuyWidget.css */
|
1694
1694
|
.RebuyWidget_rebuy-widget__container {
|
1695
1695
|
width: 100%;
|
1696
1696
|
padding: 0;
|
@@ -1793,7 +1793,7 @@
|
|
1793
1793
|
align-items: flex-start;
|
1794
1794
|
}
|
1795
1795
|
|
1796
|
-
/* ../../../../../tmp/tmp-165-
|
1796
|
+
/* ../../../../../tmp/tmp-165-PG4yN66KHu8v/opt/atlassian/pipelines/agent/build/src/smart-cart/components/DiscountCodeInput/DiscountCodeInput.css */
|
1797
1797
|
.DiscountCodeInput_rebuy-discount-code-input {
|
1798
1798
|
display: flex;
|
1799
1799
|
flex-flow: row wrap;
|
@@ -2007,7 +2007,7 @@
|
|
2007
2007
|
font-weight: var(--rb-discount-code-input-total-discount-amount-font-weight);
|
2008
2008
|
}
|
2009
2009
|
|
2010
|
-
/* ../../../../../tmp/tmp-165-
|
2010
|
+
/* ../../../../../tmp/tmp-165-PG4yN66KHu8v/opt/atlassian/pipelines/agent/build/src/smart-cart/components/LoginButton/LoginButton.css */
|
2011
2011
|
.LoginButton_rebuy-login-button {
|
2012
2012
|
appearance: none;
|
2013
2013
|
box-sizing: border-box;
|
@@ -2049,7 +2049,7 @@
|
|
2049
2049
|
color: var(--rb-login-button-text-color-active);
|
2050
2050
|
}
|
2051
2051
|
|
2052
|
-
/* ../../../../../tmp/tmp-165-
|
2052
|
+
/* ../../../../../tmp/tmp-165-PG4yN66KHu8v/opt/atlassian/pipelines/agent/build/src/smart-cart/components/TieredProgressBar/TieredProgressBar.css */
|
2053
2053
|
.TieredProgressBar_rebuy-tiered-progress-bar {
|
2054
2054
|
display: flex;
|
2055
2055
|
flex-direction: column;
|
@@ -2324,7 +2324,7 @@
|
|
2324
2324
|
border-color: var(--rb-tiered-progress-bar-gift-item-select-border-color-hover);
|
2325
2325
|
}
|
2326
2326
|
|
2327
|
-
/* ../../../../../tmp/tmp-165-
|
2327
|
+
/* ../../../../../tmp/tmp-165-PG4yN66KHu8v/opt/atlassian/pipelines/agent/build/src/smart-cart/components/_Layouts/LayoutStyles.css */
|
2328
2328
|
.LayoutStyles_rebuy-smart-cart-layout__anchor-goal-box {
|
2329
2329
|
display: flex;
|
2330
2330
|
flex-flow: column nowrap;
|
@@ -2459,7 +2459,7 @@ body.rebuy-smart-cart-open {
|
|
2459
2459
|
box-sizing: border-box !important;
|
2460
2460
|
}
|
2461
2461
|
|
2462
|
-
/* ../../../../../tmp/tmp-165-
|
2462
|
+
/* ../../../../../tmp/tmp-165-PG4yN66KHu8v/opt/atlassian/pipelines/agent/build/src/smart-cart/components/SmartCartContainer/SmartCartContainer.css */
|
2463
2463
|
.SmartCartContainer_rebuy-smart-cart,
|
2464
2464
|
.SmartCartContainer_rebuy-smart-cart *,
|
2465
2465
|
.SmartCartContainer_rebuy-smart-cart *::before,
|
@@ -2613,7 +2613,7 @@ body.rebuy-smart-cart-open {
|
|
2613
2613
|
}
|
2614
2614
|
}
|
2615
2615
|
|
2616
|
-
/* ../../../../../tmp/tmp-165-
|
2616
|
+
/* ../../../../../tmp/tmp-165-PG4yN66KHu8v/opt/atlassian/pipelines/agent/build/src/widgets/RebuyCompleteTheLook/RebuyCompleteTheLook.css */
|
2617
2617
|
.RebuyCompleteTheLook_container {
|
2618
2618
|
padding: 32px 1em;
|
2619
2619
|
margin: 1em 0;
|
@@ -2640,7 +2640,7 @@ body.rebuy-smart-cart-open {
|
|
2640
2640
|
width: 100%;
|
2641
2641
|
}
|
2642
2642
|
|
2643
|
-
/* ../../../../../tmp/tmp-165-
|
2643
|
+
/* ../../../../../tmp/tmp-165-PG4yN66KHu8v/opt/atlassian/pipelines/agent/build/src/widgets/RebuyDynamicBundleProducts/RebuyDynamicBundleProducts.css */
|
2644
2644
|
.RebuyDynamicBundleProducts_container {
|
2645
2645
|
padding: 32px 16px;
|
2646
2646
|
background-color: #f0f4f8;
|
@@ -2729,7 +2729,7 @@ body.rebuy-smart-cart-open {
|
|
2729
2729
|
opacity: 0.5;
|
2730
2730
|
}
|
2731
2731
|
|
2732
|
-
/* ../../../../../tmp/tmp-165-
|
2732
|
+
/* ../../../../../tmp/tmp-165-PG4yN66KHu8v/opt/atlassian/pipelines/agent/build/src/widgets/RebuyProductAddOns/RebuyProductAddOns.css */
|
2733
2733
|
.RebuyProductAddOns_container {
|
2734
2734
|
display: flex;
|
2735
2735
|
flex-direction: column;
|
@@ -2839,7 +2839,7 @@ body.rebuy-smart-cart-open {
|
|
2839
2839
|
justify-content: center;
|
2840
2840
|
}
|
2841
2841
|
|
2842
|
-
/* ../../../../../tmp/tmp-165-
|
2842
|
+
/* ../../../../../tmp/tmp-165-PG4yN66KHu8v/opt/atlassian/pipelines/agent/build/src/widgets/RebuyProductRecommendations/RebuyProductRecommendations.css */
|
2843
2843
|
.RebuyProductRecommendations_container {
|
2844
2844
|
padding: 32px 16px;
|
2845
2845
|
background-color: #f0f4f8;
|
@@ -2857,7 +2857,7 @@ body.rebuy-smart-cart-open {
|
|
2857
2857
|
list-style: none;
|
2858
2858
|
}
|
2859
2859
|
|
2860
|
-
/* ../../../../../tmp/tmp-165-
|
2860
|
+
/* ../../../../../tmp/tmp-165-PG4yN66KHu8v/opt/atlassian/pipelines/agent/build/src/widgets/RebuyRecentlyViewedProducts/RebuyRecentlyViewedProducts.css */
|
2861
2861
|
.RebuyRecentlyViewedProducts_rebuy-recently-viewed-products-container {
|
2862
2862
|
padding: 32px 16px;
|
2863
2863
|
background-color: #f0f4f8;
|