yt-uikit 0.10.142-oos-bundle.0 → 0.10.142

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 (180) 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 +35 -35
  19. package/dist/esm/components/BundleBlock/Bundle.d.ts +478 -478
  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 +36 -36
  25. package/dist/esm/components/BundleBlock/BundleBuilderTracker/BundleBuilderTracker.d.ts +56 -56
  26. package/dist/esm/components/BundleBlock/BundleBuilderTracker/bundleBuilderTracker.style.d.ts +80 -80
  27. package/dist/esm/components/BundleBlock/BundleLoaderModal.d.ts +7 -7
  28. package/dist/esm/components/BundleBlock/BundleProductDetailsModal/BundleProductDetailsModal.d.ts +54 -54
  29. package/dist/esm/components/BundleBlock/BundleProductDetailsModal/ImageViewer.d.ts +18 -18
  30. package/dist/esm/components/BundleBlock/BundleProductDetailsModal/bundleProductDetailsModal.style.d.ts +9 -9
  31. package/dist/esm/components/BundleBlock/CartATCLoader.d.ts +12 -12
  32. package/dist/esm/components/BundleBlock/CollectionBundle/CategoryFilter.d.ts +10 -10
  33. package/dist/esm/components/BundleBlock/CollectionBundle/ColllectionBundle.d.ts +135 -135
  34. package/dist/esm/components/BundleBlock/CollectionBundle/ProductDetailsModal.d.ts +20 -20
  35. package/dist/esm/components/BundleBlock/ComboBundle.d.ts +17 -17
  36. package/dist/esm/components/BundleBlock/ErrorToast.d.ts +10 -10
  37. package/dist/esm/components/BundleBlock/FixedBundle/FixedBundle.d.ts +4 -4
  38. package/dist/esm/components/BundleBlock/FixedBundle/SeparateVariantOptions.d.ts +52 -52
  39. package/dist/esm/components/BundleBlock/FixedBundle/VariantSelectorModal.d.ts +23 -23
  40. package/dist/esm/components/BundleBlock/FixedBundle/fixedBundle.style.d.ts +86 -86
  41. package/dist/esm/components/BundleBlock/Loader.d.ts +5 -5
  42. package/dist/esm/components/BundleBlock/MixAndMatchBundle/MixAndMatchBundle.d.ts +9 -9
  43. package/dist/esm/components/BundleBlock/MixAndMatchBundle/mixAndMatchBundle.style.d.ts +91 -91
  44. package/dist/esm/components/BundleBlock/PersonalizationForm/PersonalizationForm.d.ts +35 -35
  45. package/dist/esm/components/BundleBlock/PersonalizationForm/PersonalizationFormModal.d.ts +24 -24
  46. package/dist/esm/components/BundleBlock/VariantDropdown.d.ts +33 -33
  47. package/dist/esm/components/BundleBlock/VolumeBundle/VolumeBundle.d.ts +31 -31
  48. package/dist/esm/components/BundleBlock/VolumeBundle/volumeBundle.style.d.ts +102 -102
  49. package/dist/esm/components/BundleBlock/gokwikGuard.d.ts +22 -22
  50. package/dist/esm/components/BundleBlock/index.d.ts +1 -1
  51. package/dist/esm/components/Cart/ApplyCoupon.d.ts +13 -13
  52. package/dist/esm/components/Cart/Bundle.d.ts +6 -6
  53. package/dist/esm/components/Cart/Cart.d.ts +271 -271
  54. package/dist/esm/components/Cart/CartDrawer.d.ts +41 -41
  55. package/dist/esm/components/Cart/CartOffersCarousel.d.ts +48 -48
  56. package/dist/esm/components/Cart/CartProductsList.d.ts +55 -55
  57. package/dist/esm/components/Cart/CartTimer.d.ts +8 -8
  58. package/dist/esm/components/Cart/CheckoutSection.d.ts +55 -55
  59. package/dist/esm/components/Cart/CouponSelection.d.ts +18 -18
  60. package/dist/esm/components/Cart/CustomVariantSwatches.d.ts +15 -15
  61. package/dist/esm/components/Cart/DatePicker.d.ts +10 -10
  62. package/dist/esm/components/Cart/EmptyCart.d.ts +34 -34
  63. package/dist/esm/components/Cart/FloatingCart.d.ts +24 -24
  64. package/dist/esm/components/Cart/FooterSections.d.ts +9 -9
  65. package/dist/esm/components/Cart/FreebieClaimManager.d.ts +17 -17
  66. package/dist/esm/components/Cart/FreebieClaimOverlay.d.ts +18 -18
  67. package/dist/esm/components/Cart/FreebieClaimOverlayCard.d.ts +14 -14
  68. package/dist/esm/components/Cart/FreebieClaimSection.d.ts +16 -16
  69. package/dist/esm/components/Cart/FreebieClaimSectionCard.d.ts +23 -23
  70. package/dist/esm/components/Cart/GSTSection.d.ts +15 -15
  71. package/dist/esm/components/Cart/GiftWrap.d.ts +13 -13
  72. package/dist/esm/components/Cart/InlineCartOfferInfoText.d.ts +10 -10
  73. package/dist/esm/components/Cart/ItemSwap.d.ts +35 -35
  74. package/dist/esm/components/Cart/LoyaltyAppliedCTA.d.ts +14 -14
  75. package/dist/esm/components/Cart/LoyaltyApplyCTA.d.ts +16 -16
  76. package/dist/esm/components/Cart/LoyaltyBadge.d.ts +11 -11
  77. package/dist/esm/components/Cart/LoyaltyGuestCTA.d.ts +15 -15
  78. package/dist/esm/components/Cart/MultiStepProgressBar/CheckpointConfetti.d.ts +11 -11
  79. package/dist/esm/components/Cart/MultiStepProgressBar/CheckpointIcon.d.ts +3 -3
  80. package/dist/esm/components/Cart/MultiStepProgressBar/CheckpointTooltip.d.ts +3 -3
  81. package/dist/esm/components/Cart/MultiStepProgressBar/MultiStepIcon.d.ts +9 -9
  82. package/dist/esm/components/Cart/MultiStepProgressBar/MultiStepProgressBar.d.ts +5 -5
  83. package/dist/esm/components/Cart/MultiStepProgressBar/MultiStepProgressBar.styled.d.ts +47 -47
  84. package/dist/esm/components/Cart/MultiStepProgressBar/MultiStepUtils.d.ts +6 -6
  85. package/dist/esm/components/Cart/MultiStepProgressBar/MultiTierProgressBar.d.ts +4 -4
  86. package/dist/esm/components/Cart/MultiStepProgressBar/MutiTierNextRewardMessage.d.ts +3 -3
  87. package/dist/esm/components/Cart/MultiStepProgressBar/NextRewardMessage.d.ts +3 -3
  88. package/dist/esm/components/Cart/MultiStepProgressBar/SingleTierProgressBar.d.ts +4 -4
  89. package/dist/esm/components/Cart/MultiStepProgressBar/SingleTierProgressBar.styled.d.ts +22 -22
  90. package/dist/esm/components/Cart/MultiStepProgressBar/SingletTierNextRewardMessage.d.ts +3 -3
  91. package/dist/esm/components/Cart/MultiStepProgressBar/types.d.ts +54 -54
  92. package/dist/esm/components/Cart/NextFreebieRow.d.ts +21 -21
  93. package/dist/esm/components/Cart/NoteSection.d.ts +8 -8
  94. package/dist/esm/components/Cart/ProductCard.d.ts +36 -36
  95. package/dist/esm/components/Cart/ProductRecCard.d.ts +23 -23
  96. package/dist/esm/components/Cart/ProductRecList.d.ts +24 -24
  97. package/dist/esm/components/Cart/ProgressBarCartLoader.d.ts +7 -7
  98. package/dist/esm/components/Cart/QuantitySelector.d.ts +11 -11
  99. package/dist/esm/components/Cart/RegionSpecificDelivery.d.ts +14 -14
  100. package/dist/esm/components/Cart/RewardPointsPreview.d.ts +12 -12
  101. package/dist/esm/components/Cart/StandardDelivery.d.ts +11 -11
  102. package/dist/esm/components/Cart/StealDealSection.d.ts +16 -16
  103. package/dist/esm/components/Cart/StickyCart.d.ts +68 -68
  104. package/dist/esm/components/Cart/SubtotalSection.d.ts +13 -13
  105. package/dist/esm/components/Cart/UploadImageSection.d.ts +31 -31
  106. package/dist/esm/components/Cart/VariantDropDown.d.ts +13 -13
  107. package/dist/esm/components/Cart/VariantSelectionPopup/DesktopVariantPopup.d.ts +17 -17
  108. package/dist/esm/components/Cart/VariantSelectionPopup/DesktopVariantPopup.styled.d.ts +48 -48
  109. package/dist/esm/components/Cart/VariantSelectionPopup/MobileVariantPopover.d.ts +17 -17
  110. package/dist/esm/components/Cart/index.d.ts +1 -1
  111. package/dist/esm/components/Loyalty/AccountAddresses.d.ts +30 -30
  112. package/dist/esm/components/Loyalty/AccountBlock.d.ts +108 -108
  113. package/dist/esm/components/Loyalty/AccountBlock.types.d.ts +290 -290
  114. package/dist/esm/components/Loyalty/AccountLoginForm.d.ts +57 -57
  115. package/dist/esm/components/Loyalty/AccountOrderHistory.d.ts +61 -61
  116. package/dist/esm/components/Loyalty/AccountRewards.d.ts +25 -25
  117. package/dist/esm/components/Loyalty/AccountWaysToRedeem.d.ts +10 -10
  118. package/dist/esm/components/Loyalty/ActiveSessionOverlay.d.ts +8 -8
  119. package/dist/esm/components/Loyalty/BubbleLauncher.d.ts +14 -14
  120. package/dist/esm/components/Loyalty/GuestDesktop.d.ts +5 -5
  121. package/dist/esm/components/Loyalty/GuestDesktopWithoutImage.d.ts +7 -7
  122. package/dist/esm/components/Loyalty/GuestMobile.d.ts +6 -6
  123. package/dist/esm/components/Loyalty/Loader.d.ts +10 -10
  124. package/dist/esm/components/Loyalty/LoyaltyProductCatalog.d.ts +69 -69
  125. package/dist/esm/components/Loyalty/LoyaltyProfile.d.ts +6 -6
  126. package/dist/esm/components/Loyalty/LoyaltyWidget.d.ts +6 -6
  127. package/dist/esm/components/Loyalty/OTPComponent.d.ts +20 -20
  128. package/dist/esm/components/Loyalty/PointEarnBadge.d.ts +17 -17
  129. package/dist/esm/components/Loyalty/PointRedeemBadge.d.ts +17 -17
  130. package/dist/esm/components/Loyalty/RecentTransactions.d.ts +8 -8
  131. package/dist/esm/components/Loyalty/RewardsModal.d.ts +13 -13
  132. package/dist/esm/components/Loyalty/RibbonLauncher.d.ts +12 -12
  133. package/dist/esm/components/Loyalty/StickyLauncher.d.ts +14 -14
  134. package/dist/esm/components/Loyalty/StickyTextLauncher.d.ts +2 -2
  135. package/dist/esm/components/Loyalty/Toast.d.ts +7 -7
  136. package/dist/esm/components/Loyalty/VIPTiersScreen.d.ts +11 -11
  137. package/dist/esm/components/Loyalty/WTRCoupon.d.ts +13 -13
  138. package/dist/esm/components/Loyalty/WaysToEarn.d.ts +34 -34
  139. package/dist/esm/components/Loyalty/WaysToRedeem.d.ts +109 -109
  140. package/dist/esm/components/Loyalty/index.d.ts +16 -16
  141. package/dist/esm/components/Loyalty/loyaltyLauncher.d.ts +19 -19
  142. package/dist/esm/components/Loyalty/styles/AccountBlock.styles.d.ts +27 -27
  143. package/dist/esm/components/Loyalty/styles/ActiveSession.styles.d.ts +3 -3
  144. package/dist/esm/components/Loyalty/styles/DobPopup.styles.d.ts +3 -3
  145. package/dist/esm/components/Loyalty/styles/PointEarnBadge.styles.d.ts +3 -3
  146. package/dist/esm/components/Loyalty/styles/PointRedeemBadge.styles.d.ts +3 -3
  147. package/dist/esm/components/Loyalty/styles/RecentTransactions.styles.d.ts +6 -6
  148. package/dist/esm/components/Loyalty/styles/VIPTiers.styles.d.ts +4 -4
  149. package/dist/esm/components/Loyalty/styles/WaysToRedeem.styles.d.ts +5 -5
  150. package/dist/esm/components/Loyalty/styles/shared.styles.d.ts +3 -3
  151. package/dist/esm/components/Loyalty/styles.d.ts +23 -23
  152. package/dist/esm/components/Loyalty/types.d.ts +416 -416
  153. package/dist/esm/components/LoyaltyPageBlock/LoyaltyPageBlock.d.ts +235 -235
  154. package/dist/esm/components/Nudge/LeadGenerationNudge.d.ts +15 -15
  155. package/dist/esm/components/Nudge/Nudge.d.ts +40 -40
  156. package/dist/esm/components/Nudge/index.d.ts +1 -1
  157. package/dist/esm/components/ProductOffersBlock/ProductOffersCoupon.d.ts +12 -12
  158. package/dist/esm/components/ProductOffersBlock/ProductOffersList.d.ts +12 -12
  159. package/dist/esm/components/ProductOffersBlock/ProductOffersTermsMobilePopover.d.ts +10 -10
  160. package/dist/esm/components/ProductOffersBlock/ProductOffersTermsPopup.d.ts +10 -10
  161. package/dist/esm/components/ProductOffersBlock/ProductsOffers.d.ts +42 -42
  162. package/dist/esm/components/SpinnerWheel/SpinnerWheel.d.ts +23 -23
  163. package/dist/esm/components/SpinnerWheel/WheelSection.d.ts +9 -9
  164. package/dist/esm/components/SpinnerWheel/index.d.ts +1 -1
  165. package/dist/esm/components/index.d.ts +20 -20
  166. package/dist/esm/index.d.ts +3 -3
  167. package/dist/esm/index.js +543 -543
  168. package/dist/esm/utils/converter.d.ts +4 -4
  169. package/dist/esm/utils/customCartConfig.d.ts +2 -2
  170. package/dist/esm/utils/customHtmlInteractions.d.ts +9 -9
  171. package/dist/esm/utils/customVariantOptions.d.ts +30 -30
  172. package/dist/esm/utils/freebieProductUtils.d.ts +40 -40
  173. package/dist/esm/utils/freebieUtils.d.ts +12 -12
  174. package/dist/esm/utils/index.d.ts +30 -30
  175. package/dist/esm/utils/safeguardDOM.d.ts +5 -5
  176. package/dist/esm/utils/shopifyAtcBridge.d.ts +43 -43
  177. package/dist/esm/utils/useMediaQuery.d.ts +1 -1
  178. package/dist/esm/utils/variantAvailability.d.ts +53 -53
  179. package/package.json +98 -98
  180. /package/dist/esm/{confetti-89678a6f.js → confetti-f3502561.js} +0 -0
@@ -1,4 +1,4 @@
1
- export declare const getSubunitFactor: (currency: string) => number;
2
- export declare const getCurrencyValueFromShopifyPrice: (price: number, currency: string) => number;
3
- export declare const getOrderRewardPoints: (type: string | undefined, value: number | undefined, cartAmount: number, multiplier?: number | null) => number;
4
- export declare const getCurrencySymbol: (cartData: any, currency?: string) => string;
1
+ export declare const getSubunitFactor: (currency: string) => number;
2
+ export declare const getCurrencyValueFromShopifyPrice: (price: number, currency: string) => number;
3
+ export declare const getOrderRewardPoints: (type: string | undefined, value: number | undefined, cartAmount: number, multiplier?: number | null) => number;
4
+ export declare const getCurrencySymbol: (cartData: any, currency?: string) => string;
@@ -1,2 +1,2 @@
1
- export type CustomCartConfig = Record<string, unknown>;
2
- export declare const readCustomCartConfig: (raw: unknown) => CustomCartConfig | undefined;
1
+ export type CustomCartConfig = Record<string, unknown>;
2
+ export declare const readCustomCartConfig: (raw: unknown) => CustomCartConfig | undefined;
@@ -1,9 +1,9 @@
1
- import type { MouseEvent } from "react";
2
- export declare const CUSTOM_HTML_TOGGLE_ATTRIBUTE = "data-yt-toggle";
3
- export declare const CUSTOM_HTML_TOGGLE_TARGET_ATTRIBUTE = "data-yt-toggle-target";
4
- export type CustomHtmlToggleTarget = "self" | "parent" | "next" | "previous";
5
- export declare const inlineToggleToDataAttributes: (handlerSource: string) => {
6
- className: string;
7
- target: CustomHtmlToggleTarget;
8
- } | undefined;
9
- export declare const handleCustomHtmlClick: (event: MouseEvent<HTMLElement>) => void;
1
+ import type { MouseEvent } from "react";
2
+ export declare const CUSTOM_HTML_TOGGLE_ATTRIBUTE = "data-yt-toggle";
3
+ export declare const CUSTOM_HTML_TOGGLE_TARGET_ATTRIBUTE = "data-yt-toggle-target";
4
+ export type CustomHtmlToggleTarget = "self" | "parent" | "next" | "previous";
5
+ export declare const inlineToggleToDataAttributes: (handlerSource: string) => {
6
+ className: string;
7
+ target: CustomHtmlToggleTarget;
8
+ } | undefined;
9
+ export declare const handleCustomHtmlClick: (event: MouseEvent<HTMLElement>) => void;
@@ -1,30 +1,30 @@
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 resolveCustomVariantOptionValue: (customOption: CustomVariantOption | undefined, optionValue?: string) => {
21
- customValue: CustomVariantValue | undefined;
22
- displayValue: string;
23
- };
24
- export declare const getCustomVariantDisplayValue: (customOption: CustomVariantOption | undefined, optionValue?: string) => string;
25
- export declare const resolveCustomVariantValue: (customOptions: CustomVariantOption[] | undefined, optionName?: string, optionValue?: string, fallbackToValue?: boolean) => {
26
- customValue: CustomVariantValue | undefined;
27
- displayValue: string;
28
- customOption: CustomVariantOption | undefined;
29
- };
30
- 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 resolveCustomVariantOptionValue: (customOption: CustomVariantOption | undefined, optionValue?: string) => {
21
+ customValue: CustomVariantValue | undefined;
22
+ displayValue: string;
23
+ };
24
+ export declare const getCustomVariantDisplayValue: (customOption: CustomVariantOption | undefined, optionValue?: string) => string;
25
+ export declare const resolveCustomVariantValue: (customOptions: CustomVariantOption[] | undefined, optionName?: string, optionValue?: string, fallbackToValue?: boolean) => {
26
+ customValue: CustomVariantValue | undefined;
27
+ displayValue: string;
28
+ customOption: CustomVariantOption | undefined;
29
+ };
30
+ export declare const useCustomVariantOptions: () => CustomVariantOptions | null;
@@ -1,40 +1,40 @@
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 isSameCouponTemplateId: (left: unknown, right: unknown) => boolean;
19
- export declare const getAvailableFreebieVariants: (product: any) => any[];
20
- export declare const getClaimAllowedVariantIds: (product: any) => string[];
21
- export declare const getClaimableFreebieVariants: (product: any) => any[];
22
- export declare const getFirstClaimableVariantId: (product: any) => string | undefined;
23
- export declare const hasClaimableFreebieVariant: (product: any) => boolean;
24
- export declare const getFreebieProductTier: (product: any, freebieCouponTemplates?: any[]) => any;
25
- type ProductSelectionKeyGetter = (product: any) => string;
26
- export declare const getSelectedCountForFreebieTier: (selectedProductIds: string[], tierId: string | number | undefined, freebieProducts: any[], getProductSelectionKey?: ProductSelectionKeyGetter) => number;
27
- export declare const isFreebieTierLimitReached: ({ product, selectedProductIds, freebieProducts, freebieCouponTemplates, fallbackMaxFreebies, fallbackLimitReached, getProductSelectionKey, }: {
28
- product: any;
29
- selectedProductIds: string[];
30
- freebieProducts: any[];
31
- freebieCouponTemplates?: any[] | undefined;
32
- fallbackMaxFreebies?: number | undefined;
33
- fallbackLimitReached?: boolean | undefined;
34
- getProductSelectionKey?: ProductSelectionKeyGetter | undefined;
35
- }) => boolean;
36
- export declare const checkpointIncludesVariant: (checkpoint: any, variantGid?: string) => boolean;
37
- export declare const getTotalClaimableFreebies: (freebieProducts: any[], freebieCouponTemplates?: any[], fallbackMaxFreebies?: number) => number;
38
- export declare const processFreebieProduct: (product: any, freebieCouponTemplates?: any[], localVariantId?: string) => ProcessedFreebieProduct;
39
- export declare const getInitialVariantWithDealAmount: (availableVariants: any[], freebieCouponTemplates?: any[], claimAllowedVariants?: string[]) => string | undefined;
40
- 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 isSameCouponTemplateId: (left: unknown, right: unknown) => boolean;
19
+ export declare const getAvailableFreebieVariants: (product: any) => any[];
20
+ export declare const getClaimAllowedVariantIds: (product: any) => string[];
21
+ export declare const getClaimableFreebieVariants: (product: any) => any[];
22
+ export declare const getFirstClaimableVariantId: (product: any) => string | undefined;
23
+ export declare const hasClaimableFreebieVariant: (product: any) => boolean;
24
+ export declare const getFreebieProductTier: (product: any, freebieCouponTemplates?: any[]) => any;
25
+ type ProductSelectionKeyGetter = (product: any) => string;
26
+ export declare const getSelectedCountForFreebieTier: (selectedProductIds: string[], tierId: string | number | undefined, freebieProducts: any[], getProductSelectionKey?: ProductSelectionKeyGetter) => number;
27
+ export declare const isFreebieTierLimitReached: ({ product, selectedProductIds, freebieProducts, freebieCouponTemplates, fallbackMaxFreebies, fallbackLimitReached, getProductSelectionKey, }: {
28
+ product: any;
29
+ selectedProductIds: string[];
30
+ freebieProducts: any[];
31
+ freebieCouponTemplates?: any[] | undefined;
32
+ fallbackMaxFreebies?: number | undefined;
33
+ fallbackLimitReached?: boolean | undefined;
34
+ getProductSelectionKey?: ProductSelectionKeyGetter | undefined;
35
+ }) => boolean;
36
+ export declare const checkpointIncludesVariant: (checkpoint: any, variantGid?: string) => boolean;
37
+ export declare const getTotalClaimableFreebies: (freebieProducts: any[], freebieCouponTemplates?: any[], fallbackMaxFreebies?: number) => number;
38
+ export declare const processFreebieProduct: (product: any, freebieCouponTemplates?: any[], localVariantId?: string) => ProcessedFreebieProduct;
39
+ export declare const getInitialVariantWithDealAmount: (availableVariants: any[], freebieCouponTemplates?: any[], claimAllowedVariants?: string[]) => string | undefined;
40
+ export {};
@@ -1,12 +1,12 @@
1
- export declare const isEnabledCartProperty: (value: unknown) => boolean;
2
- export type FreebieRewardContext = {
3
- couponTemplateId?: string;
4
- rewardKey?: string;
5
- };
6
- export declare const getFreebieRewardKey: (product: any) => string;
7
- export declare const getFreebieRewardContext: (product: any) => FreebieRewardContext;
8
- /**
9
- * Shared utility function for adding freebie products to cart
10
- * Used by both FreebieClaimManager and FreebieClaimSection to avoid code duplication
11
- */
12
- 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 declare const isEnabledCartProperty: (value: unknown) => boolean;
2
+ export type FreebieRewardContext = {
3
+ couponTemplateId?: string;
4
+ rewardKey?: string;
5
+ };
6
+ export declare const getFreebieRewardKey: (product: any) => string;
7
+ export declare const getFreebieRewardContext: (product: any) => FreebieRewardContext;
8
+ /**
9
+ * Shared utility function for adding freebie products to cart
10
+ * Used by both FreebieClaimManager and FreebieClaimSection to avoid code duplication
11
+ */
12
+ 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,30 +1,30 @@
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 optimizeShopifyImage: (imageUrl: string | undefined | null, size?: number, quality?: number, format?: "webp" | "auto" | "jpg" | "png") => string;
12
- export declare const darkenColor: (color: string | undefined, amount?: number) => string;
13
- export declare const getCompareAtPrice: (item: {
14
- compare_at_price?: number | null;
15
- properties?: Record<string, any> | null;
16
- }, currency: string) => number;
17
- export declare const extractBundleDiscountTitle: (discountTitle: string) => string;
18
- export declare const sanitizeHtml: (html: string | null | undefined, options?: {
19
- allowStyling?: boolean;
20
- }) => string;
21
- export declare const getSafeNavigationUrl: (destination: string | null | undefined) => string | undefined;
22
- export declare const getSafeVariantNavigationUrl: (destination: string | null | undefined, variantId: string | number | null | undefined) => string | undefined;
23
- export declare const getSafeExternalUrl: (destination: string | null | undefined) => string | undefined;
24
- export declare const safeNavigate: (destination: string | null | undefined, replace?: boolean) => boolean;
25
- export declare const safeNavigateExternal: (destination: string | null | undefined, replace?: boolean) => boolean;
26
- export declare const safeCssColor: (value: string | null | undefined, fallback?: string) => string | undefined;
27
- export declare const safeCssNumber: (value: unknown) => number | undefined;
28
- export declare const getSafeImageUrl: (value: string | null | undefined) => string | undefined;
29
- export * from "./shopifyAtcBridge";
30
- export declare const getShadowCss: (shadowType?: string) => "none" | "8px 8px 8px -6px #0000004D" | "6px 6px 0px -1px #00000033";
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 optimizeShopifyImage: (imageUrl: string | undefined | null, size?: number, quality?: number, format?: "webp" | "auto" | "jpg" | "png") => string;
12
+ export declare const darkenColor: (color: string | undefined, amount?: number) => string;
13
+ export declare const getCompareAtPrice: (item: {
14
+ compare_at_price?: number | null;
15
+ properties?: Record<string, any> | null;
16
+ }, currency: string) => number;
17
+ export declare const extractBundleDiscountTitle: (discountTitle: string) => string;
18
+ export declare const sanitizeHtml: (html: string | null | undefined, options?: {
19
+ allowStyling?: boolean;
20
+ }) => string;
21
+ export declare const getSafeNavigationUrl: (destination: string | null | undefined) => string | undefined;
22
+ export declare const getSafeVariantNavigationUrl: (destination: string | null | undefined, variantId: string | number | null | undefined) => string | undefined;
23
+ export declare const getSafeExternalUrl: (destination: string | null | undefined) => string | undefined;
24
+ export declare const safeNavigate: (destination: string | null | undefined, replace?: boolean) => boolean;
25
+ export declare const safeNavigateExternal: (destination: string | null | undefined, replace?: boolean) => boolean;
26
+ export declare const safeCssColor: (value: string | null | undefined, fallback?: string) => string | undefined;
27
+ export declare const safeCssNumber: (value: unknown) => number | undefined;
28
+ export declare const getSafeImageUrl: (value: string | null | undefined) => string | undefined;
29
+ export * from "./shopifyAtcBridge";
30
+ export declare const getShadowCss: (shadowType?: string) => "none" | "8px 8px 8px -6px #0000004D" | "6px 6px 0px -1px #00000033";
@@ -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;
@@ -1,53 +1,53 @@
1
- /**
2
- * Variant option availability, shared by every bundle type's variant render.
3
- *
4
- * Option values come from `product.options[].values`, which lists the values of
5
- * the whole product — including values that have no variant in combination with
6
- * what is currently selected. Those must not render at all: "no such variant" is
7
- * not the same as "out of stock".
8
- */
9
- export interface VariantNodeLike {
10
- title: string;
11
- selectedOptions?: {
12
- name: string;
13
- value: string;
14
- }[] | null;
15
- [key: string]: any;
16
- }
17
- export interface VariantEdgeLike {
18
- node: VariantNodeLike;
19
- }
20
- export interface ProductLike {
21
- options?: {
22
- name: string;
23
- values: string[];
24
- }[];
25
- variants?: {
26
- edges: VariantEdgeLike[];
27
- };
28
- }
29
- /**
30
- * One value per product option for a variant: `selectedOptions` when the fetch
31
- * provides it, otherwise parsed out of the title.
32
- */
33
- export declare const getVariantOptionValues: (product?: ProductLike, node?: VariantNodeLike) => string[];
34
- /**
35
- * The values of `options[optionIndex]` a real variant exists for, given the
36
- * values already picked for the preceding options. Options after `optionIndex`
37
- * are left unconstrained, so every variant stays reachable.
38
- *
39
- * `isNodeAllowed` narrows further, e.g. to in-stock variants only.
40
- */
41
- export declare const getAvailableOptionValues: (product?: ProductLike, selectedValues?: string[], optionIndex?: number, isNodeAllowed?: ((node: VariantNodeLike) => boolean) | undefined) => string[];
42
- /**
43
- * Whether any option offers a real pick, counting only values a variant backs.
44
- * The selectors hide an option with nothing to choose between, so this is what
45
- * decides whether they render at all or the variant shows as a badge instead.
46
- */
47
- export declare const hasVariantOptionChoice: (product?: ProductLike) => boolean;
48
- /**
49
- * Re-points a selection at values that still exist after one option changed:
50
- * each option keeps its value while it is still available, otherwise falls back
51
- * to the first value that is.
52
- */
53
- export declare const resolveVariantSelection: (product?: ProductLike, selectedValues?: string[]) => string[];
1
+ /**
2
+ * Variant option availability, shared by every bundle type's variant render.
3
+ *
4
+ * Option values come from `product.options[].values`, which lists the values of
5
+ * the whole product — including values that have no variant in combination with
6
+ * what is currently selected. Those must not render at all: "no such variant" is
7
+ * not the same as "out of stock".
8
+ */
9
+ export interface VariantNodeLike {
10
+ title: string;
11
+ selectedOptions?: {
12
+ name: string;
13
+ value: string;
14
+ }[] | null;
15
+ [key: string]: any;
16
+ }
17
+ export interface VariantEdgeLike {
18
+ node: VariantNodeLike;
19
+ }
20
+ export interface ProductLike {
21
+ options?: {
22
+ name: string;
23
+ values: string[];
24
+ }[];
25
+ variants?: {
26
+ edges: VariantEdgeLike[];
27
+ };
28
+ }
29
+ /**
30
+ * One value per product option for a variant: `selectedOptions` when the fetch
31
+ * provides it, otherwise parsed out of the title.
32
+ */
33
+ export declare const getVariantOptionValues: (product?: ProductLike, node?: VariantNodeLike) => string[];
34
+ /**
35
+ * The values of `options[optionIndex]` a real variant exists for, given the
36
+ * values already picked for the preceding options. Options after `optionIndex`
37
+ * are left unconstrained, so every variant stays reachable.
38
+ *
39
+ * `isNodeAllowed` narrows further, e.g. to in-stock variants only.
40
+ */
41
+ export declare const getAvailableOptionValues: (product?: ProductLike, selectedValues?: string[], optionIndex?: number, isNodeAllowed?: ((node: VariantNodeLike) => boolean) | undefined) => string[];
42
+ /**
43
+ * Whether any option offers a real pick, counting only values a variant backs.
44
+ * The selectors hide an option with nothing to choose between, so this is what
45
+ * decides whether they render at all or the variant shows as a badge instead.
46
+ */
47
+ export declare const hasVariantOptionChoice: (product?: ProductLike) => boolean;
48
+ /**
49
+ * Re-points a selection at values that still exist after one option changed:
50
+ * each option keeps its value while it is still available, otherwise falls back
51
+ * to the first value that is.
52
+ */
53
+ export declare const resolveVariantSelection: (product?: ProductLike, selectedValues?: string[]) => string[];