yt-uikit 0.10.65-progress-css.0 → 0.10.66

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 (160) hide show
  1. package/README.md +94 -94
  2. package/dist/esm/assets/confetti.d.ts +2 -2
  3. package/dist/esm/atoms/bundleBuilderProductDetailsAtom.d.ts +4 -4
  4. package/dist/esm/atoms/cartDataAtom.d.ts +3 -3
  5. package/dist/esm/atoms/cartLoadingAtom.d.ts +23 -23
  6. package/dist/esm/atoms/cartTimer.d.ts +2 -2
  7. package/dist/esm/atoms/dateAtom.d.ts +1 -1
  8. package/dist/esm/atoms/freebieClaimModalAtom.d.ts +7 -7
  9. package/dist/esm/atoms/giftWrap.d.ts +2 -2
  10. package/dist/esm/atoms/gstCompanyNameAtom.d.ts +1 -1
  11. package/dist/esm/atoms/gstInputAtom.d.ts +1 -1
  12. package/dist/esm/atoms/maxQtyErrorAtom.d.ts +3 -3
  13. package/dist/esm/atoms/multiClaimSelectionAtom.d.ts +28 -28
  14. package/dist/esm/atoms/noteInputAtom.d.ts +3 -3
  15. package/dist/esm/atoms/postalCodeAtom.d.ts +1 -1
  16. package/dist/esm/atoms/shippingAtom.d.ts +8 -8
  17. package/dist/esm/atoms/showGSTInputAtom.d.ts +1 -1
  18. package/dist/esm/atoms/variantSelectionModalAtom.d.ts +33 -33
  19. package/dist/esm/components/BundleBlock/Bundle.d.ts +467 -467
  20. package/dist/esm/components/BundleBlock/BundleBuilder/BundleBuilder.d.ts +52 -52
  21. package/dist/esm/components/BundleBlock/BundleBuilder/ResponsiveBgImage.d.ts +9 -9
  22. package/dist/esm/components/BundleBlock/BundleBuilder/SortAndFilter.d.ts +74 -74
  23. package/dist/esm/components/BundleBlock/BundleBuilder/VariantOptionsModal.d.ts +30 -30
  24. package/dist/esm/components/BundleBlock/BundleBuilder/bundleBuilder.style.d.ts +37 -37
  25. package/dist/esm/components/BundleBlock/BundleBuilderTracker/BundleBuilderTracker.d.ts +56 -56
  26. package/dist/esm/components/BundleBlock/BundleBuilderTracker/bundleBuilderTracker.style.d.ts +77 -77
  27. package/dist/esm/components/BundleBlock/BundleLoaderModal.d.ts +7 -7
  28. package/dist/esm/components/BundleBlock/BundleProductDetailsModal/BundleProductDetailsModal.d.ts +45 -45
  29. package/dist/esm/components/BundleBlock/BundleProductDetailsModal/bundleProductDetailsModal.style.d.ts +10 -10
  30. package/dist/esm/components/BundleBlock/CartATCLoader.d.ts +12 -12
  31. package/dist/esm/components/BundleBlock/CollectionBundle/CategoryFilter.d.ts +10 -10
  32. package/dist/esm/components/BundleBlock/CollectionBundle/ColllectionBundle.d.ts +133 -133
  33. package/dist/esm/components/BundleBlock/CollectionBundle/ProductDetailsModal.d.ts +16 -16
  34. package/dist/esm/components/BundleBlock/ComboBundle.d.ts +17 -17
  35. package/dist/esm/components/BundleBlock/ErrorToast.d.ts +10 -10
  36. package/dist/esm/components/BundleBlock/FixedBundle/FixedBundle.d.ts +4 -4
  37. package/dist/esm/components/BundleBlock/FixedBundle/SeparateVariantOptions.d.ts +47 -47
  38. package/dist/esm/components/BundleBlock/FixedBundle/VariantSelectorModal.d.ts +23 -23
  39. package/dist/esm/components/BundleBlock/FixedBundle/fixedBundle.style.d.ts +81 -81
  40. package/dist/esm/components/BundleBlock/Loader.d.ts +5 -5
  41. package/dist/esm/components/BundleBlock/MixAndMatchBundle/MixAndMatchBundle.d.ts +9 -9
  42. package/dist/esm/components/BundleBlock/MixAndMatchBundle/mixAndMatchBundle.style.d.ts +86 -86
  43. package/dist/esm/components/BundleBlock/PersonalizationForm/PersonalizationForm.d.ts +35 -35
  44. package/dist/esm/components/BundleBlock/PersonalizationForm/PersonalizationFormModal.d.ts +24 -24
  45. package/dist/esm/components/BundleBlock/VolumeBundle/VolumeBundle.d.ts +27 -27
  46. package/dist/esm/components/BundleBlock/VolumeBundle/volumeBundle.style.d.ts +100 -100
  47. package/dist/esm/components/BundleBlock/index.d.ts +1 -1
  48. package/dist/esm/components/Cart/ApplyCoupon.d.ts +13 -13
  49. package/dist/esm/components/Cart/Bundle.d.ts +6 -6
  50. package/dist/esm/components/Cart/Cart.d.ts +261 -261
  51. package/dist/esm/components/Cart/CartDrawer.d.ts +34 -34
  52. package/dist/esm/components/Cart/CartOffersCarousel.d.ts +48 -48
  53. package/dist/esm/components/Cart/CartProductsList.d.ts +48 -48
  54. package/dist/esm/components/Cart/CartTimer.d.ts +8 -8
  55. package/dist/esm/components/Cart/CheckoutSection.d.ts +48 -48
  56. package/dist/esm/components/Cart/CouponSelection.d.ts +18 -18
  57. package/dist/esm/components/Cart/DatePicker.d.ts +10 -10
  58. package/dist/esm/components/Cart/EmptyCart.d.ts +34 -34
  59. package/dist/esm/components/Cart/FloatingCart.d.ts +24 -24
  60. package/dist/esm/components/Cart/FooterSections.d.ts +6 -6
  61. package/dist/esm/components/Cart/FreebieClaimManager.d.ts +18 -18
  62. package/dist/esm/components/Cart/FreebieClaimOverlay.d.ts +18 -18
  63. package/dist/esm/components/Cart/FreebieClaimOverlayCard.d.ts +13 -13
  64. package/dist/esm/components/Cart/FreebieClaimSection.d.ts +18 -18
  65. package/dist/esm/components/Cart/FreebieClaimSectionCard.d.ts +19 -19
  66. package/dist/esm/components/Cart/GSTSection.d.ts +15 -15
  67. package/dist/esm/components/Cart/GiftWrap.d.ts +15 -15
  68. package/dist/esm/components/Cart/InlineCartOfferInfoText.d.ts +10 -10
  69. package/dist/esm/components/Cart/LoyaltyAppliedCTA.d.ts +14 -14
  70. package/dist/esm/components/Cart/LoyaltyApplyCTA.d.ts +15 -15
  71. package/dist/esm/components/Cart/LoyaltyBadge.d.ts +11 -11
  72. package/dist/esm/components/Cart/LoyaltyGuestCTA.d.ts +17 -17
  73. package/dist/esm/components/Cart/MultiStepProgressBar/CheckpointConfetti.d.ts +11 -11
  74. package/dist/esm/components/Cart/MultiStepProgressBar/CheckpointIcon.d.ts +3 -3
  75. package/dist/esm/components/Cart/MultiStepProgressBar/CheckpointTooltip.d.ts +3 -3
  76. package/dist/esm/components/Cart/MultiStepProgressBar/MultiStepIcon.d.ts +9 -9
  77. package/dist/esm/components/Cart/MultiStepProgressBar/MultiStepProgressBar.d.ts +5 -5
  78. package/dist/esm/components/Cart/MultiStepProgressBar/MultiStepProgressBar.styled.d.ts +45 -45
  79. package/dist/esm/components/Cart/MultiStepProgressBar/MultiStepUtils.d.ts +6 -6
  80. package/dist/esm/components/Cart/MultiStepProgressBar/MultiTierProgressBar.d.ts +4 -4
  81. package/dist/esm/components/Cart/MultiStepProgressBar/MutiTierNextRewardMessage.d.ts +3 -3
  82. package/dist/esm/components/Cart/MultiStepProgressBar/NextRewardMessage.d.ts +3 -3
  83. package/dist/esm/components/Cart/MultiStepProgressBar/SingleTierProgressBar.d.ts +4 -4
  84. package/dist/esm/components/Cart/MultiStepProgressBar/SingleTierProgressBar.styled.d.ts +22 -22
  85. package/dist/esm/components/Cart/MultiStepProgressBar/SingletTierNextRewardMessage.d.ts +3 -3
  86. package/dist/esm/components/Cart/MultiStepProgressBar/types.d.ts +55 -55
  87. package/dist/esm/components/Cart/NextFreebieRow.d.ts +21 -21
  88. package/dist/esm/components/Cart/NoteSection.d.ts +8 -8
  89. package/dist/esm/components/Cart/ProductCard.d.ts +31 -31
  90. package/dist/esm/components/Cart/ProductRecCard.d.ts +20 -20
  91. package/dist/esm/components/Cart/ProductRecList.d.ts +23 -23
  92. package/dist/esm/components/Cart/ProgressBarCartLoader.d.ts +7 -7
  93. package/dist/esm/components/Cart/QuantitySelector.d.ts +12 -12
  94. package/dist/esm/components/Cart/RegionSpecificDelivery.d.ts +17 -17
  95. package/dist/esm/components/Cart/RewardPointsPreview.d.ts +12 -12
  96. package/dist/esm/components/Cart/StandardDelivery.d.ts +11 -11
  97. package/dist/esm/components/Cart/StealDealSection.d.ts +15 -15
  98. package/dist/esm/components/Cart/StickyCart.d.ts +64 -64
  99. package/dist/esm/components/Cart/SubtotalSection.d.ts +13 -13
  100. package/dist/esm/components/Cart/VariantSelectionPopup/DesktopVariantPopup.d.ts +20 -20
  101. package/dist/esm/components/Cart/VariantSelectionPopup/DesktopVariantPopup.styled.d.ts +60 -60
  102. package/dist/esm/components/Cart/VariantSelectionPopup/MobileVariantPopover.d.ts +20 -20
  103. package/dist/esm/components/Cart/index.d.ts +1 -1
  104. package/dist/esm/components/Loyalty/ActiveSessionOverlay.d.ts +8 -8
  105. package/dist/esm/components/Loyalty/BubbleLauncher.d.ts +14 -14
  106. package/dist/esm/components/Loyalty/GuestDesktop.d.ts +5 -5
  107. package/dist/esm/components/Loyalty/GuestDesktopWithoutImage.d.ts +7 -7
  108. package/dist/esm/components/Loyalty/GuestMobile.d.ts +6 -6
  109. package/dist/esm/components/Loyalty/Loader.d.ts +10 -10
  110. package/dist/esm/components/Loyalty/LoyaltyProductCatalog.d.ts +69 -69
  111. package/dist/esm/components/Loyalty/LoyaltyProfile.d.ts +6 -6
  112. package/dist/esm/components/Loyalty/LoyaltyWidget.d.ts +6 -6
  113. package/dist/esm/components/Loyalty/OTPComponent.d.ts +20 -20
  114. package/dist/esm/components/Loyalty/PointEarnBadge.d.ts +15 -15
  115. package/dist/esm/components/Loyalty/RecentTransactions.d.ts +8 -8
  116. package/dist/esm/components/Loyalty/RewardsModal.d.ts +13 -13
  117. package/dist/esm/components/Loyalty/RibbonLauncher.d.ts +12 -12
  118. package/dist/esm/components/Loyalty/StickyLauncher.d.ts +14 -14
  119. package/dist/esm/components/Loyalty/StickyTextLauncher.d.ts +2 -2
  120. package/dist/esm/components/Loyalty/Toast.d.ts +7 -7
  121. package/dist/esm/components/Loyalty/VIPTiersScreen.d.ts +11 -11
  122. package/dist/esm/components/Loyalty/WTRCoupon.d.ts +13 -13
  123. package/dist/esm/components/Loyalty/WaysToEarn.d.ts +33 -33
  124. package/dist/esm/components/Loyalty/WaysToRedeem.d.ts +106 -106
  125. package/dist/esm/components/Loyalty/index.d.ts +7 -7
  126. package/dist/esm/components/Loyalty/loyaltyLauncher.d.ts +19 -19
  127. package/dist/esm/components/Loyalty/styles/ActiveSession.styles.d.ts +3 -3
  128. package/dist/esm/components/Loyalty/styles/DobPopup.styles.d.ts +3 -3
  129. package/dist/esm/components/Loyalty/styles/PointEarnBadge.styles.d.ts +3 -3
  130. package/dist/esm/components/Loyalty/styles/RecentTransactions.styles.d.ts +6 -6
  131. package/dist/esm/components/Loyalty/styles/VIPTiers.styles.d.ts +4 -4
  132. package/dist/esm/components/Loyalty/styles/WaysToRedeem.styles.d.ts +5 -5
  133. package/dist/esm/components/Loyalty/styles/shared.styles.d.ts +3 -3
  134. package/dist/esm/components/Loyalty/styles.d.ts +23 -23
  135. package/dist/esm/components/Loyalty/types.d.ts +414 -414
  136. package/dist/esm/components/LoyaltyPageBlock/LoyaltyPageBlock.d.ts +219 -160
  137. package/dist/esm/components/Nudge/LeadGenerationNudge.d.ts +15 -15
  138. package/dist/esm/components/Nudge/Nudge.d.ts +40 -40
  139. package/dist/esm/components/Nudge/index.d.ts +1 -1
  140. package/dist/esm/components/ProductOffersBlock/ProductOffersCoupon.d.ts +12 -12
  141. package/dist/esm/components/ProductOffersBlock/ProductOffersList.d.ts +12 -12
  142. package/dist/esm/components/ProductOffersBlock/ProductOffersTermsMobilePopover.d.ts +10 -10
  143. package/dist/esm/components/ProductOffersBlock/ProductOffersTermsPopup.d.ts +10 -10
  144. package/dist/esm/components/ProductOffersBlock/ProductsOffers.d.ts +42 -42
  145. package/dist/esm/components/SpinnerWheel/SpinnerWheel.d.ts +23 -23
  146. package/dist/esm/components/SpinnerWheel/WheelSection.d.ts +9 -9
  147. package/dist/esm/components/SpinnerWheel/index.d.ts +1 -1
  148. package/dist/esm/components/index.d.ts +16 -16
  149. package/dist/esm/index.d.ts +1 -1
  150. package/dist/esm/index.js +431 -431
  151. package/dist/esm/utils/converter.d.ts +3 -3
  152. package/dist/esm/utils/customVariantOptions.d.ts +21 -21
  153. package/dist/esm/utils/freebieProductUtils.d.ts +39 -39
  154. package/dist/esm/utils/freebieUtils.d.ts +11 -11
  155. package/dist/esm/utils/index.d.ts +16 -16
  156. package/dist/esm/utils/safeguardDOM.d.ts +5 -5
  157. package/dist/esm/utils/shopifyAtcBridge.d.ts +43 -43
  158. package/dist/esm/utils/useMediaQuery.d.ts +1 -1
  159. package/package.json +98 -98
  160. /package/dist/esm/{confetti-89678a6f.js → confetti-f3502561.js} +0 -0
@@ -1,3 +1,3 @@
1
- export declare const getCurrencyValueFromShopifyPrice: (price: number, currency: string) => number;
2
- export declare const getOrderRewardPoints: (type: string | undefined, value: number | undefined, cartAmount: number, multiplier?: number | null) => number;
3
- export declare const getCurrencySymbol: (cartData: any, currency?: string) => string;
1
+ export declare const getCurrencyValueFromShopifyPrice: (price: number, currency: string) => number;
2
+ export declare const getOrderRewardPoints: (type: string | undefined, value: number | undefined, cartAmount: number, multiplier?: number | null) => number;
3
+ export declare const getCurrencySymbol: (cartData: any, currency?: string) => string;
@@ -1,21 +1,21 @@
1
- export interface CustomVariantValue {
2
- name: string;
3
- value: string;
4
- }
5
- export interface CustomVariantOption {
6
- id?: string;
7
- name: string;
8
- type?: "text" | "image" | "color" | string;
9
- values: CustomVariantValue[];
10
- }
11
- export interface CustomVariantOptions {
12
- options: CustomVariantOption[];
13
- }
14
- export declare const normalizeVariantLabel: (label?: string) => string;
15
- export declare const extractHexFromLabel: (label?: string) => string | null;
16
- export declare const loadCustomVariantOptions: () => CustomVariantOptions | null;
17
- export declare const saveCustomVariantOptions: (input: CustomVariantOptions | CustomVariantOption[]) => void;
18
- export declare const clearCustomVariantOptions: () => void;
19
- export declare const findMatchingCustomVariantValue: (customOption: CustomVariantOption | undefined, optionValue?: string) => CustomVariantValue | undefined;
20
- export declare const getCustomVariantDisplayValue: (customOption: CustomVariantOption | undefined, optionValue?: string) => string;
21
- export declare const useCustomVariantOptions: () => CustomVariantOptions | null;
1
+ export interface CustomVariantValue {
2
+ name: string;
3
+ value: string;
4
+ }
5
+ export interface CustomVariantOption {
6
+ id?: string;
7
+ name: string;
8
+ type?: "text" | "image" | "color" | string;
9
+ values: CustomVariantValue[];
10
+ }
11
+ export interface CustomVariantOptions {
12
+ options: CustomVariantOption[];
13
+ }
14
+ export declare const normalizeVariantLabel: (label?: string) => string;
15
+ export declare const extractHexFromLabel: (label?: string) => string | null;
16
+ export declare const loadCustomVariantOptions: () => CustomVariantOptions | null;
17
+ export declare const saveCustomVariantOptions: (input: CustomVariantOptions | CustomVariantOption[]) => void;
18
+ export declare const clearCustomVariantOptions: () => void;
19
+ export declare const findMatchingCustomVariantValue: (customOption: CustomVariantOption | undefined, optionValue?: string) => CustomVariantValue | undefined;
20
+ export declare const getCustomVariantDisplayValue: (customOption: CustomVariantOption | undefined, optionValue?: string) => string;
21
+ export declare const useCustomVariantOptions: () => CustomVariantOptions | null;
@@ -1,39 +1,39 @@
1
- export declare const isVariantAvailable: (product: any, variantNode: any) => boolean;
2
- export interface ProcessedFreebieProduct {
3
- selectedVariantId?: string;
4
- selectedVariantGid?: string;
5
- selectedVariantPrice: number;
6
- availableVariants: any[];
7
- displayVariantCount: number;
8
- effectiveDiscount: number;
9
- effectiveDiscountPercentage: number;
10
- effectivePrice: number;
11
- dealAmount: number;
12
- showOptions: boolean;
13
- isFree: boolean;
14
- isNoDiscount: boolean;
15
- }
16
- export declare const normalizeShopifyId: (value: unknown) => string | undefined;
17
- export declare const isSameShopifyId: (left: unknown, right: unknown) => boolean;
18
- export declare const getAvailableFreebieVariants: (product: any) => any[];
19
- export declare const getClaimAllowedVariantIds: (product: any) => string[];
20
- export declare const getClaimableFreebieVariants: (product: any) => any[];
21
- export declare const getFirstClaimableVariantId: (product: any) => string | undefined;
22
- export declare const hasClaimableFreebieVariant: (product: any) => boolean;
23
- export declare const getFreebieProductTier: (product: any, freebieCouponTemplates?: any[]) => any;
24
- type ProductSelectionKeyGetter = (product: any) => string;
25
- export declare const getSelectedCountForFreebieTier: (selectedProductIds: string[], tierId: number | undefined, freebieProducts: any[], getProductSelectionKey?: ProductSelectionKeyGetter) => number;
26
- export declare const isFreebieTierLimitReached: ({ product, selectedProductIds, freebieProducts, freebieCouponTemplates, fallbackMaxFreebies, fallbackLimitReached, getProductSelectionKey, }: {
27
- product: any;
28
- selectedProductIds: string[];
29
- freebieProducts: any[];
30
- freebieCouponTemplates?: any[] | undefined;
31
- fallbackMaxFreebies?: number | undefined;
32
- fallbackLimitReached?: boolean | undefined;
33
- getProductSelectionKey?: ProductSelectionKeyGetter | undefined;
34
- }) => boolean;
35
- export declare const checkpointIncludesVariant: (checkpoint: any, variantGid?: string) => boolean;
36
- export declare const getTotalClaimableFreebies: (freebieProducts: any[], freebieCouponTemplates?: any[], fallbackMaxFreebies?: number) => number;
37
- export declare const processFreebieProduct: (product: any, freebieCouponTemplates?: any[], localVariantId?: string) => ProcessedFreebieProduct;
38
- export declare const getInitialVariantWithDealAmount: (availableVariants: any[], freebieCouponTemplates?: any[], claimAllowedVariants?: string[]) => string | undefined;
39
- export {};
1
+ export declare const isVariantAvailable: (product: any, variantNode: any) => boolean;
2
+ export interface ProcessedFreebieProduct {
3
+ selectedVariantId?: string;
4
+ selectedVariantGid?: string;
5
+ selectedVariantPrice: number;
6
+ availableVariants: any[];
7
+ displayVariantCount: number;
8
+ effectiveDiscount: number;
9
+ effectiveDiscountPercentage: number;
10
+ effectivePrice: number;
11
+ dealAmount: number;
12
+ showOptions: boolean;
13
+ isFree: boolean;
14
+ isNoDiscount: boolean;
15
+ }
16
+ export declare const normalizeShopifyId: (value: unknown) => string | undefined;
17
+ export declare const isSameShopifyId: (left: unknown, right: unknown) => boolean;
18
+ export declare const getAvailableFreebieVariants: (product: any) => any[];
19
+ export declare const getClaimAllowedVariantIds: (product: any) => string[];
20
+ export declare const getClaimableFreebieVariants: (product: any) => any[];
21
+ export declare const getFirstClaimableVariantId: (product: any) => string | undefined;
22
+ export declare const hasClaimableFreebieVariant: (product: any) => boolean;
23
+ export declare const getFreebieProductTier: (product: any, freebieCouponTemplates?: any[]) => any;
24
+ type ProductSelectionKeyGetter = (product: any) => string;
25
+ export declare const getSelectedCountForFreebieTier: (selectedProductIds: string[], tierId: number | undefined, freebieProducts: any[], getProductSelectionKey?: ProductSelectionKeyGetter) => number;
26
+ export declare const isFreebieTierLimitReached: ({ product, selectedProductIds, freebieProducts, freebieCouponTemplates, fallbackMaxFreebies, fallbackLimitReached, getProductSelectionKey, }: {
27
+ product: any;
28
+ selectedProductIds: string[];
29
+ freebieProducts: any[];
30
+ freebieCouponTemplates?: any[] | undefined;
31
+ fallbackMaxFreebies?: number | undefined;
32
+ fallbackLimitReached?: boolean | undefined;
33
+ getProductSelectionKey?: ProductSelectionKeyGetter | undefined;
34
+ }) => boolean;
35
+ export declare const checkpointIncludesVariant: (checkpoint: any, variantGid?: string) => boolean;
36
+ export declare const getTotalClaimableFreebies: (freebieProducts: any[], freebieCouponTemplates?: any[], fallbackMaxFreebies?: number) => number;
37
+ export declare const processFreebieProduct: (product: any, freebieCouponTemplates?: any[], localVariantId?: string) => ProcessedFreebieProduct;
38
+ export declare const getInitialVariantWithDealAmount: (availableVariants: any[], freebieCouponTemplates?: any[], claimAllowedVariants?: string[]) => string | undefined;
39
+ export {};
@@ -1,11 +1,11 @@
1
- export type FreebieRewardContext = {
2
- couponTemplateId?: string;
3
- rewardKey?: string;
4
- };
5
- export declare const getFreebieRewardKey: (product: any) => string;
6
- export declare const getFreebieRewardContext: (product: any) => FreebieRewardContext;
7
- /**
8
- * Shared utility function for adding freebie products to cart
9
- * Used by both FreebieClaimManager and FreebieClaimSection to avoid code duplication
10
- */
11
- export declare const addFreebieProductsToCart: (selectedProductIds: string[], freebieProductsInCart: any[], addFreebieToCart?: ((variantId: string, originalAllowedVariantIds?: string[], rewardContext?: FreebieRewardContext) => Promise<void>) | undefined, selectedVariantIds?: Record<string, string | undefined>, onProductAdded?: ((productId: string) => void) | undefined) => Promise<void>;
1
+ export type FreebieRewardContext = {
2
+ couponTemplateId?: string;
3
+ rewardKey?: string;
4
+ };
5
+ export declare const getFreebieRewardKey: (product: any) => string;
6
+ export declare const getFreebieRewardContext: (product: any) => FreebieRewardContext;
7
+ /**
8
+ * Shared utility function for adding freebie products to cart
9
+ * Used by both FreebieClaimManager and FreebieClaimSection to avoid code duplication
10
+ */
11
+ export declare const addFreebieProductsToCart: (selectedProductIds: string[], freebieProductsInCart: any[], addFreebieToCart?: ((variantId: string, originalAllowedVariantIds?: string[], rewardContext?: FreebieRewardContext) => Promise<void>) | undefined, selectedVariantIds?: Record<string, string | undefined>, onProductAdded?: ((productId: string) => void) | undefined) => Promise<void>;
@@ -1,16 +1,16 @@
1
- export declare const getAdjustedTitle: (title: string, length?: number) => string;
2
- export declare const decodeHtmlEntities: (text: string) => string;
3
- export declare function getColorWithAlpha(colorHex: string, alpha: number): string;
4
- export declare function hexToRGBWithOpacity(hex: any, opacity: any): string;
5
- export declare const getIdFromGid: (gid: string) => string | undefined;
6
- export declare function getCookieValue(cookieName: string): string;
7
- export declare const extractShopifyProductOrVariantId: (id: string) => string;
8
- export declare function setContrastTextColor(element: HTMLElement | null, lightColor?: string, darkColor?: string, threshold?: number): void;
9
- export declare const formatPriceWithCommas: (price: number | string) => string;
10
- export declare const shouldRenderCheckoutMessageInCartList: () => boolean;
11
- export declare const shouldUseBWTheme: () => boolean;
12
- export declare const optimizeShopifyImage: (imageUrl: string | undefined | null, size?: number, quality?: number, format?: "webp" | "auto" | "jpg" | "png") => string;
13
- export declare const darkenColor: (color: string | undefined, amount?: number) => string;
14
- export declare const extractBundleDiscountTitle: (discountTitle: string) => string;
15
- export declare const sanitizeHtml: (html: string | null | undefined) => string;
16
- export * from "./shopifyAtcBridge";
1
+ export declare const getAdjustedTitle: (title: string, length?: number) => string;
2
+ export declare const decodeHtmlEntities: (text: string) => string;
3
+ export declare function getColorWithAlpha(colorHex: string, alpha: number): string;
4
+ export declare function hexToRGBWithOpacity(hex: any, opacity: any): string;
5
+ export declare const getIdFromGid: (gid: string) => string | undefined;
6
+ export declare function getCookieValue(cookieName: string): string;
7
+ export declare const extractShopifyProductOrVariantId: (id: string) => string;
8
+ export declare function setContrastTextColor(element: HTMLElement | null, lightColor?: string, darkColor?: string, threshold?: number): void;
9
+ export declare const formatPriceWithCommas: (price: number | string) => string;
10
+ export declare const shouldRenderCheckoutMessageInCartList: () => boolean;
11
+ export declare const shouldUseBWTheme: () => boolean;
12
+ export declare const optimizeShopifyImage: (imageUrl: string | undefined | null, size?: number, quality?: number, format?: "webp" | "auto" | "jpg" | "png") => string;
13
+ export declare const darkenColor: (color: string | undefined, amount?: number) => string;
14
+ export declare const extractBundleDiscountTitle: (discountTitle: string) => string;
15
+ export declare const sanitizeHtml: (html: string | null | undefined) => string;
16
+ export * from "./shopifyAtcBridge";
@@ -1,5 +1,5 @@
1
- /**
2
- * Safeguards React DOM operations against third-party script DOM manipulations
3
- * (e.g. Gokwik, Google Translate, Shopify themes replacing/moving DOM nodes).
4
- */
5
- export declare function safeguardDOM(): void;
1
+ /**
2
+ * Safeguards React DOM operations against third-party script DOM manipulations
3
+ * (e.g. Gokwik, Google Translate, Shopify themes replacing/moving DOM nodes).
4
+ */
5
+ export declare function safeguardDOM(): void;
@@ -1,43 +1,43 @@
1
- /**
2
- * shopifyAtcBridge.ts
3
- *
4
- * Manages native theme button takeover when `styles.volumeBundle?.addtoCartMethod === 'shopify_atc_button'`.
5
- *
6
- * Scopes button discovery to the qualified primary product form using a robust scoring algorithm,
7
- * preventing accidental targeting of buttons inside recommendation sliders, quick-add cards, or installment forms.
8
- *
9
- */
10
- export interface ShopifyAtcBridgeConfig {
11
- /** Callback invoked when the native Add to Cart button is clicked. */
12
- onAddToCart: () => void | Promise<void>;
13
- /** Callback invoked when a native Buy Now / Checkout button is clicked. */
14
- onCheckout?: () => void | Promise<void>;
15
- /** Non-null when the currently selected variant combination is out of stock. */
16
- notifyVariant?: {
17
- tier: number;
18
- index: number;
19
- optionIndex?: number;
20
- value?: string;
21
- } | null;
22
- }
23
- export interface ShopifyAtcBridgeHandle {
24
- cleanup: () => void;
25
- }
26
- /**
27
- * Accurately classifies a candidate element as an Add to Cart button,
28
- * a Checkout/Buy-Now button, or an unrelated theme UI button (quantity stepper,
29
- * variant swatch/picker, accordion toggle, modal opener, share button, etc.).
30
- */
31
- export declare function classifyButton(btn: HTMLElement): "atc" | "checkout" | "ignore";
32
- /**
33
- * Initialises the native theme button takeover bridge for the Volume Bundle.
34
- * Supports dynamic section re-rendering and AJAX variant updates via:
35
- * 1. Capture-phase event delegation at document level
36
- * 2. MutationObserver for DOM replacements
37
- * 3. Theme custom event listeners (e.g. variant:change, shopify:section:load)
38
- */
39
- export declare function initShopifyAtcBridge(config: ShopifyAtcBridgeConfig): ShopifyAtcBridgeHandle;
40
- /**
41
- * Imperatively tears down all active bridge instances.
42
- */
43
- export declare function cleanupShopifyAtcBridge(): void;
1
+ /**
2
+ * shopifyAtcBridge.ts
3
+ *
4
+ * Manages native theme button takeover when `styles.volumeBundle?.addtoCartMethod === 'shopify_atc_button'`.
5
+ *
6
+ * Scopes button discovery to the qualified primary product form using a robust scoring algorithm,
7
+ * preventing accidental targeting of buttons inside recommendation sliders, quick-add cards, or installment forms.
8
+ *
9
+ */
10
+ export interface ShopifyAtcBridgeConfig {
11
+ /** Callback invoked when the native Add to Cart button is clicked. */
12
+ onAddToCart: () => void | Promise<void>;
13
+ /** Callback invoked when a native Buy Now / Checkout button is clicked. */
14
+ onCheckout?: () => void | Promise<void>;
15
+ /** Non-null when the currently selected variant combination is out of stock. */
16
+ notifyVariant?: {
17
+ tier: number;
18
+ index: number;
19
+ optionIndex?: number;
20
+ value?: string;
21
+ } | null;
22
+ }
23
+ export interface ShopifyAtcBridgeHandle {
24
+ cleanup: () => void;
25
+ }
26
+ /**
27
+ * Accurately classifies a candidate element as an Add to Cart button,
28
+ * a Checkout/Buy-Now button, or an unrelated theme UI button (quantity stepper,
29
+ * variant swatch/picker, accordion toggle, modal opener, share button, etc.).
30
+ */
31
+ export declare function classifyButton(btn: HTMLElement): "atc" | "checkout" | "ignore";
32
+ /**
33
+ * Initialises the native theme button takeover bridge for the Volume Bundle.
34
+ * Supports dynamic section re-rendering and AJAX variant updates via:
35
+ * 1. Capture-phase event delegation at document level
36
+ * 2. MutationObserver for DOM replacements
37
+ * 3. Theme custom event listeners (e.g. variant:change, shopify:section:load)
38
+ */
39
+ export declare function initShopifyAtcBridge(config: ShopifyAtcBridgeConfig): ShopifyAtcBridgeHandle;
40
+ /**
41
+ * Imperatively tears down all active bridge instances.
42
+ */
43
+ export declare function cleanupShopifyAtcBridge(): void;
@@ -1 +1 @@
1
- export declare function useMediaQuery(query: string, defaultValue?: boolean): boolean;
1
+ export declare function useMediaQuery(query: string, defaultValue?: boolean): boolean;
package/package.json CHANGED
@@ -1,98 +1,98 @@
1
- {
2
- "name": "yt-uikit",
3
- "version": "0.10.65-progress-css.0",
4
- "description": "YourToken UI Kit",
5
- "scripts": {
6
- "rollup": "rm -rf dist && tsc && rollup -c",
7
- "test": "jest",
8
- "storybook": "storybook dev -p 6006",
9
- "build-storybook": "storybook build"
10
- },
11
- "author": "Pulkit Vyas",
12
- "license": "ISC",
13
- "resolutions": {
14
- "@types/react": "^17.0.0",
15
- "@types/react-dom": "^17.0.0"
16
- },
17
- "peerDependencies": {
18
- "canvas-confetti": "^1.0.0",
19
- "currency-symbol-map": "^5.0.0",
20
- "jotai": "^2.0.0",
21
- "lottie-react": "^2.4.1",
22
- "react": ">= 16.8.0",
23
- "react-calendar": "^5.0.0",
24
- "react-dom": ">= 16.8.0",
25
- "react-icons": "^5.0.0",
26
- "react-international-phone": "^4.3.0",
27
- "react-modal-image": "^2.6.0",
28
- "react-otp-input": "^3.1.1",
29
- "react-spinners": "^0.14.1",
30
- "react-use": "^17.5.0",
31
- "styled-components": "^6.0.7",
32
- "web-vitals": "^3.5.1"
33
- },
34
- "devDependencies": {
35
- "@babel/core": "^7.16.0",
36
- "@babel/preset-env": "^7.16.4",
37
- "@babel/preset-react": "^7.16.0",
38
- "@babel/preset-typescript": "^7.16.0",
39
- "@mdx-js/react": "^2.1.2",
40
- "@rollup/plugin-commonjs": "^21.0.1",
41
- "@rollup/plugin-node-resolve": "^13.0.6",
42
- "@rollup/plugin-typescript": "^8.3.0",
43
- "@storybook/addon-actions": "^7.6.16",
44
- "@storybook/addon-essentials": "^7.6.16",
45
- "@storybook/addon-links": "^7.6.16",
46
- "@storybook/addon-postcss": "^2.0.0",
47
- "@storybook/addon-styling-webpack": "^0.0.6",
48
- "@storybook/preset-scss": "^1.0.3",
49
- "@storybook/react": "^7.6.16",
50
- "@storybook/react-webpack5": "^7.6.16",
51
- "@testing-library/react": "^13.3.0",
52
- "@types/canvas-confetti": "^1.9.0",
53
- "@types/d3-ease": "^3.0.0",
54
- "@types/jest": "^28.1.6",
55
- "@types/react": "^18.0.15",
56
- "@types/react-modal-image": "^2.6.3",
57
- "autoprefixer": "^10.4.17",
58
- "babel-jest": "^27.3.1",
59
- "babel-loader": "^8.2.3",
60
- "class-variance-authority": "^0.7.0",
61
- "clsx": "^2.1.0",
62
- "css-loader": "^6.5.1",
63
- "currency-symbol-map": "^5.1.0",
64
- "daisyui": "^4.7.2",
65
- "html-webpack-plugin": "^5.5.0",
66
- "identity-obj-proxy": "^3.0.0",
67
- "jest": "^28.1.3",
68
- "jest-worker": "^29.7.0",
69
- "jotai": "^2.6.4",
70
- "lottie-react": "^2.4.1",
71
- "react": "^18.2.0",
72
- "react-dom": "^18.2.0",
73
- "react-icons": "5.4.0",
74
- "rollup": "^2.60.0",
75
- "rollup-plugin-dts": "^4.0.1",
76
- "rollup-plugin-postcss": "^4.0.1",
77
- "rollup-plugin-svg": "^2.0.0",
78
- "sass": "^1.43.5",
79
- "sass-loader": "^12.3.0",
80
- "storybook": "^7.6.16",
81
- "style-loader": "^3.3.1",
82
- "tslib": "^2.8.1",
83
- "typescript": "^4.7.4",
84
- "webpack": "^5.89.0",
85
- "webpack-cli": "^5.1.4",
86
- "webpack-dev-server": "^4.15.1"
87
- },
88
- "main": "dist/cjs/index.js",
89
- "module": "dist/esm/index.js",
90
- "files": [
91
- "dist"
92
- ],
93
- "types": "dist/esm/index.d.ts",
94
- "dependencies": {
95
- "prettier": "^3.6.2",
96
- "rollup-plugin-terser": "^7.0.2"
97
- }
98
- }
1
+ {
2
+ "name": "yt-uikit",
3
+ "version": "0.10.66",
4
+ "description": "YourToken UI Kit",
5
+ "scripts": {
6
+ "rollup": "rm -rf dist && tsc && rollup -c",
7
+ "test": "jest",
8
+ "storybook": "storybook dev -p 6006",
9
+ "build-storybook": "storybook build"
10
+ },
11
+ "author": "Pulkit Vyas",
12
+ "license": "ISC",
13
+ "resolutions": {
14
+ "@types/react": "^17.0.0",
15
+ "@types/react-dom": "^17.0.0"
16
+ },
17
+ "peerDependencies": {
18
+ "canvas-confetti": "^1.0.0",
19
+ "currency-symbol-map": "^5.0.0",
20
+ "jotai": "^2.0.0",
21
+ "lottie-react": "^2.4.1",
22
+ "react": ">= 16.8.0",
23
+ "react-calendar": "^5.0.0",
24
+ "react-dom": ">= 16.8.0",
25
+ "react-icons": "^5.0.0",
26
+ "react-international-phone": "^4.3.0",
27
+ "react-modal-image": "^2.6.0",
28
+ "react-otp-input": "^3.1.1",
29
+ "react-spinners": "^0.14.1",
30
+ "react-use": "^17.5.0",
31
+ "styled-components": "^6.0.7",
32
+ "web-vitals": "^3.5.1"
33
+ },
34
+ "devDependencies": {
35
+ "@babel/core": "^7.16.0",
36
+ "@babel/preset-env": "^7.16.4",
37
+ "@babel/preset-react": "^7.16.0",
38
+ "@babel/preset-typescript": "^7.16.0",
39
+ "@mdx-js/react": "^2.1.2",
40
+ "@rollup/plugin-commonjs": "^21.0.1",
41
+ "@rollup/plugin-node-resolve": "^13.0.6",
42
+ "@rollup/plugin-typescript": "^8.3.0",
43
+ "@storybook/addon-actions": "^7.6.16",
44
+ "@storybook/addon-essentials": "^7.6.16",
45
+ "@storybook/addon-links": "^7.6.16",
46
+ "@storybook/addon-postcss": "^2.0.0",
47
+ "@storybook/addon-styling-webpack": "^0.0.6",
48
+ "@storybook/preset-scss": "^1.0.3",
49
+ "@storybook/react": "^7.6.16",
50
+ "@storybook/react-webpack5": "^7.6.16",
51
+ "@testing-library/react": "^13.3.0",
52
+ "@types/canvas-confetti": "^1.9.0",
53
+ "@types/d3-ease": "^3.0.0",
54
+ "@types/jest": "^28.1.6",
55
+ "@types/react": "^18.0.15",
56
+ "@types/react-modal-image": "^2.6.3",
57
+ "autoprefixer": "^10.4.17",
58
+ "babel-jest": "^27.3.1",
59
+ "babel-loader": "^8.2.3",
60
+ "class-variance-authority": "^0.7.0",
61
+ "clsx": "^2.1.0",
62
+ "css-loader": "^6.5.1",
63
+ "currency-symbol-map": "^5.1.0",
64
+ "daisyui": "^4.7.2",
65
+ "html-webpack-plugin": "^5.5.0",
66
+ "identity-obj-proxy": "^3.0.0",
67
+ "jest": "^28.1.3",
68
+ "jest-worker": "^29.7.0",
69
+ "jotai": "^2.6.4",
70
+ "lottie-react": "^2.4.1",
71
+ "react": "^18.2.0",
72
+ "react-dom": "^18.2.0",
73
+ "react-icons": "5.4.0",
74
+ "rollup": "^2.60.0",
75
+ "rollup-plugin-dts": "^4.0.1",
76
+ "rollup-plugin-postcss": "^4.0.1",
77
+ "rollup-plugin-svg": "^2.0.0",
78
+ "sass": "^1.43.5",
79
+ "sass-loader": "^12.3.0",
80
+ "storybook": "^7.6.16",
81
+ "style-loader": "^3.3.1",
82
+ "tslib": "^2.8.1",
83
+ "typescript": "^4.7.4",
84
+ "webpack": "^5.89.0",
85
+ "webpack-cli": "^5.1.4",
86
+ "webpack-dev-server": "^4.15.1"
87
+ },
88
+ "main": "dist/cjs/index.js",
89
+ "module": "dist/esm/index.js",
90
+ "files": [
91
+ "dist"
92
+ ],
93
+ "types": "dist/esm/index.d.ts",
94
+ "dependencies": {
95
+ "prettier": "^3.6.2",
96
+ "rollup-plugin-terser": "^7.0.2"
97
+ }
98
+ }