@anker-in/headless-ui 1.1.84 → 1.1.86
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/dist/cjs/biz-components/AccordionCards/index.d.ts +36 -1
- package/dist/cjs/biz-components/ActiveShelf/index.d.ts +2 -2
- package/dist/cjs/biz-components/ActiveShelf/index.js +1 -1
- package/dist/cjs/biz-components/ActiveShelf/index.js.map +3 -3
- package/dist/cjs/biz-components/ActivitySchedule/index.d.ts +3 -1
- package/dist/cjs/biz-components/AnchorNavigation/index.d.ts +1 -1
- package/dist/cjs/biz-components/AplusDesc/index.d.ts +17 -1
- package/dist/cjs/biz-components/BrandCardLink/BrandCardLink.d.ts +2 -1
- package/dist/cjs/biz-components/BrandEquity/BrandEquity.d.ts +2 -1
- package/dist/cjs/biz-components/Category/index.d.ts +1 -1
- package/dist/cjs/biz-components/CreativeModule/index.d.ts +7 -1
- package/dist/cjs/biz-components/DownLoad/index.d.ts +6 -1
- package/dist/cjs/biz-components/Evaluate/index.d.ts +1 -1
- package/dist/cjs/biz-components/EventSchedule/index.d.ts +2 -7
- package/dist/cjs/biz-components/EventSchedule/index.js +1 -1
- package/dist/cjs/biz-components/EventSchedule/index.js.map +3 -3
- package/dist/cjs/biz-components/Faq/Faq.d.ts +3 -2
- package/dist/cjs/biz-components/FeatureCards/FeatureCards.d.ts +3 -1
- package/dist/cjs/biz-components/FeatureShowcase/FeatureShowcase.d.ts +3 -1
- package/dist/cjs/biz-components/FeaturedBlogPosts/index.d.ts +1 -6
- package/dist/cjs/biz-components/FeaturedBlogPosts/index.js +1 -1
- package/dist/cjs/biz-components/FeaturedBlogPosts/index.js.map +3 -3
- package/dist/cjs/biz-components/Features/index.d.ts +9 -1
- package/dist/cjs/biz-components/FootCharger/index.d.ts +7 -1
- package/dist/cjs/biz-components/FooterNavigation/index.d.ts +2 -1
- package/dist/cjs/biz-components/GiftBox/index.d.ts +3 -1
- package/dist/cjs/biz-components/GiftShelf/index.d.ts +3 -1
- package/dist/cjs/biz-components/GiftTierShelf/index.d.ts +3 -1
- package/dist/cjs/biz-components/Graphic/index.d.ts +1 -1
- package/dist/cjs/biz-components/GraphicAttractionBlock/index.d.ts +1 -1
- package/dist/cjs/biz-components/GraphicMore/index.d.ts +7 -1
- package/dist/cjs/biz-components/GraphicOverlay/GraphicOverlay.d.ts +10 -2
- package/dist/cjs/biz-components/HeaderNavigation/index.d.ts +3 -1
- package/dist/cjs/biz-components/HeroBanner/HeroBanner.d.ts +5 -1
- package/dist/cjs/biz-components/HeroBanner/HeroBanner.js +1 -1
- package/dist/cjs/biz-components/HeroBanner/HeroBanner.js.map +2 -2
- package/dist/cjs/biz-components/ImageOverlayShelf/index.d.ts +2 -2
- package/dist/cjs/biz-components/ImageOverlayShelf/index.js +1 -1
- package/dist/cjs/biz-components/ImageOverlayShelf/index.js.map +3 -3
- package/dist/cjs/biz-components/ImageTextFeature/ImageTextFeature.d.ts +3 -1
- package/dist/cjs/biz-components/ImageWithText/ImageWithText.d.ts +3 -1
- package/dist/cjs/biz-components/Ksp/index.d.ts +1 -1
- package/dist/cjs/biz-components/Listing/components/PaidShipping/index.d.ts +11 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.d.ts +26 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.d.ts +1 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.d.ts +1 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.d.ts +1 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.d.ts +1 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.d.ts +1 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.d.ts +1 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductPaidShipping/index.d.ts +11 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.d.ts +1 -1
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.d.ts +2 -1
- package/dist/cjs/biz-components/LotteryShared/BaseModal.d.ts +61 -0
- package/dist/cjs/biz-components/LotteryShared/BaseModal.js +2 -0
- package/dist/cjs/biz-components/LotteryShared/BaseModal.js.map +7 -0
- package/dist/cjs/biz-components/LotteryShared/ChanceMethods.d.ts +25 -0
- package/dist/cjs/biz-components/LotteryShared/ChanceMethods.js +2 -0
- package/dist/cjs/biz-components/LotteryShared/ChanceMethods.js.map +7 -0
- package/dist/cjs/biz-components/LotteryShared/ErrorModal.d.ts +47 -0
- package/dist/cjs/biz-components/LotteryShared/ErrorModal.js +2 -0
- package/dist/cjs/biz-components/LotteryShared/ErrorModal.js.map +7 -0
- package/dist/cjs/biz-components/LotteryShared/MyRewardsModal.d.ts +101 -0
- package/dist/cjs/biz-components/LotteryShared/MyRewardsModal.js +2 -0
- package/dist/cjs/biz-components/LotteryShared/MyRewardsModal.js.map +7 -0
- package/dist/cjs/biz-components/LotteryShared/PrizePool.d.ts +29 -0
- package/dist/cjs/biz-components/LotteryShared/PrizePool.js +2 -0
- package/dist/cjs/biz-components/LotteryShared/PrizePool.js.map +7 -0
- package/dist/cjs/biz-components/LotteryShared/RulesModal.d.ts +56 -0
- package/dist/cjs/biz-components/LotteryShared/RulesModal.js +2 -0
- package/dist/cjs/biz-components/LotteryShared/RulesModal.js.map +7 -0
- package/dist/cjs/biz-components/LotteryShared/ShareModal.d.ts +79 -0
- package/dist/cjs/biz-components/LotteryShared/ShareModal.js +2 -0
- package/dist/cjs/biz-components/LotteryShared/ShareModal.js.map +7 -0
- package/dist/cjs/biz-components/LotteryShared/WinnerModal.d.ts +27 -0
- package/dist/cjs/biz-components/LotteryShared/WinnerModal.js +2 -0
- package/dist/cjs/biz-components/LotteryShared/WinnerModal.js.map +7 -0
- package/dist/cjs/biz-components/LotteryShared/index.d.ts +23 -0
- package/dist/cjs/biz-components/LotteryShared/index.js +2 -0
- package/dist/cjs/biz-components/LotteryShared/index.js.map +7 -0
- package/dist/cjs/biz-components/LotteryShared/types.d.ts +760 -0
- package/dist/cjs/biz-components/LotteryShared/types.js +2 -0
- package/dist/cjs/biz-components/LotteryShared/types.js.map +7 -0
- package/dist/cjs/biz-components/Marquee/Marquee.d.ts +3 -2
- package/dist/cjs/biz-components/MarqueeReview/index.d.ts +1 -1
- package/dist/cjs/biz-components/MediaEndorsement/index.d.ts +2 -1
- package/dist/cjs/biz-components/MediaEndorsement/index.js +2 -2
- package/dist/cjs/biz-components/MediaEndorsement/index.js.map +2 -2
- package/dist/cjs/biz-components/MediaPlayerBase/index.d.ts +2 -1
- package/dist/cjs/biz-components/MediaPlayerMulti/index.d.ts +2 -1
- package/dist/cjs/biz-components/MediaPlayerSticky/index.d.ts +7 -1
- package/dist/cjs/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.d.ts +2 -1
- package/dist/cjs/biz-components/MediaSceneSwitcherV2/index.d.ts +1 -1
- package/dist/cjs/biz-components/MediaShelf/index.d.ts +2 -2
- package/dist/cjs/biz-components/MediaShelf/index.js +1 -1
- package/dist/cjs/biz-components/MediaShelf/index.js.map +3 -3
- package/dist/cjs/biz-components/MemberEquity/index.d.ts +3 -1
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.d.ts +17 -2
- package/dist/cjs/biz-components/NavigationSearch/index.d.ts +2 -1
- package/dist/cjs/biz-components/ProductCompare/index.d.ts +1 -1
- package/dist/cjs/biz-components/ProductHero/ProductHero.d.ts +3 -1
- package/dist/cjs/biz-components/ProductLottery/MediaDrawArea.d.ts +4 -0
- package/dist/cjs/biz-components/ProductLottery/MediaDrawArea.js +2 -0
- package/dist/cjs/biz-components/ProductLottery/MediaDrawArea.js.map +7 -0
- package/dist/cjs/biz-components/ProductLottery/index.d.ts +17 -0
- package/dist/cjs/biz-components/ProductLottery/index.js +2 -0
- package/dist/cjs/biz-components/ProductLottery/index.js.map +7 -0
- package/dist/cjs/biz-components/ProductLottery/types.d.ts +363 -0
- package/dist/cjs/biz-components/ProductLottery/types.js +2 -0
- package/dist/cjs/biz-components/ProductLottery/types.js.map +7 -0
- package/dist/cjs/biz-components/ProductNav/ProductNav.d.ts +2 -1
- package/dist/cjs/biz-components/PromotionalBar/index.d.ts +1 -1
- package/dist/cjs/biz-components/SecondaryBanner/index.d.ts +1 -1
- package/dist/cjs/biz-components/SelectStore/index.d.ts +7 -1
- package/dist/cjs/biz-components/ShelfDisplay/index.d.ts +3 -1
- package/dist/cjs/biz-components/Slogan/index.d.ts +3 -1
- package/dist/cjs/biz-components/Spacer/index.d.ts +3 -1
- package/dist/cjs/biz-components/Specs/index.d.ts +1 -1
- package/dist/cjs/biz-components/Specs/index.js +1 -1
- package/dist/cjs/biz-components/Specs/index.js.map +3 -3
- package/dist/cjs/biz-components/SpecsComparison/SpecsComparison.d.ts +3 -1
- package/dist/cjs/biz-components/Subscribe/index.js +2 -2
- package/dist/cjs/biz-components/Subscribe/index.js.map +2 -2
- package/dist/cjs/biz-components/TabWithImage/TabWithImage.d.ts +3 -1
- package/dist/cjs/biz-components/Tabs/Tabs.d.ts +3 -1
- package/dist/cjs/biz-components/Tabs/Tabs.js +1 -1
- package/dist/cjs/biz-components/Tabs/Tabs.js.map +2 -2
- package/dist/cjs/biz-components/TabsGroup/index.d.ts +3 -1
- package/dist/cjs/biz-components/TabsWithMedia/TabsWithMedia.d.ts +3 -1
- package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.d.ts +3 -1
- package/dist/cjs/biz-components/Title/index.d.ts +1 -1
- package/dist/cjs/biz-components/VideoFeature/VideoFeature.d.ts +3 -1
- package/dist/cjs/biz-components/WheelLottery/index.d.ts +12 -12
- package/dist/cjs/biz-components/WheelLottery/index.js +1 -1
- package/dist/cjs/biz-components/WheelLottery/index.js.map +3 -3
- package/dist/cjs/biz-components/WheelLottery/types.d.ts +17 -723
- package/dist/cjs/biz-components/WheelLottery/types.js +1 -1
- package/dist/cjs/biz-components/WheelLottery/types.js.map +3 -3
- package/dist/cjs/biz-components/WhyChoose/WhyChoose.d.ts +3 -2
- package/dist/cjs/biz-components/index.d.ts +2 -0
- package/dist/cjs/biz-components/index.js +1 -1
- package/dist/cjs/biz-components/index.js.map +3 -3
- package/dist/cjs/shared/Styles.d.ts +7 -21
- package/dist/cjs/shared/Styles.js +1 -1
- package/dist/cjs/shared/Styles.js.map +3 -3
- package/dist/esm/biz-components/AccordionCards/index.d.ts +36 -1
- package/dist/esm/biz-components/ActiveShelf/index.d.ts +2 -2
- package/dist/esm/biz-components/ActiveShelf/index.js +1 -1
- package/dist/esm/biz-components/ActiveShelf/index.js.map +3 -3
- package/dist/esm/biz-components/ActivitySchedule/index.d.ts +3 -1
- package/dist/esm/biz-components/AnchorNavigation/index.d.ts +1 -1
- package/dist/esm/biz-components/AplusDesc/index.d.ts +17 -1
- package/dist/esm/biz-components/BrandCardLink/BrandCardLink.d.ts +2 -1
- package/dist/esm/biz-components/BrandEquity/BrandEquity.d.ts +2 -1
- package/dist/esm/biz-components/Category/index.d.ts +1 -1
- package/dist/esm/biz-components/CreativeModule/index.d.ts +7 -1
- package/dist/esm/biz-components/DownLoad/index.d.ts +6 -1
- package/dist/esm/biz-components/Evaluate/index.d.ts +1 -1
- package/dist/esm/biz-components/EventSchedule/index.d.ts +2 -7
- package/dist/esm/biz-components/EventSchedule/index.js +1 -1
- package/dist/esm/biz-components/EventSchedule/index.js.map +3 -3
- package/dist/esm/biz-components/Faq/Faq.d.ts +3 -2
- package/dist/esm/biz-components/FeatureCards/FeatureCards.d.ts +3 -1
- package/dist/esm/biz-components/FeatureShowcase/FeatureShowcase.d.ts +3 -1
- package/dist/esm/biz-components/FeaturedBlogPosts/index.d.ts +1 -6
- package/dist/esm/biz-components/FeaturedBlogPosts/index.js +1 -1
- package/dist/esm/biz-components/FeaturedBlogPosts/index.js.map +3 -3
- package/dist/esm/biz-components/Features/index.d.ts +9 -1
- package/dist/esm/biz-components/FootCharger/index.d.ts +7 -1
- package/dist/esm/biz-components/FooterNavigation/index.d.ts +2 -1
- package/dist/esm/biz-components/GiftBox/index.d.ts +3 -1
- package/dist/esm/biz-components/GiftShelf/index.d.ts +3 -1
- package/dist/esm/biz-components/GiftTierShelf/index.d.ts +3 -1
- package/dist/esm/biz-components/Graphic/index.d.ts +1 -1
- package/dist/esm/biz-components/GraphicAttractionBlock/index.d.ts +1 -1
- package/dist/esm/biz-components/GraphicMore/index.d.ts +7 -1
- package/dist/esm/biz-components/GraphicOverlay/GraphicOverlay.d.ts +10 -2
- package/dist/esm/biz-components/HeaderNavigation/index.d.ts +3 -1
- package/dist/esm/biz-components/HeroBanner/HeroBanner.d.ts +5 -1
- package/dist/esm/biz-components/HeroBanner/HeroBanner.js +1 -1
- package/dist/esm/biz-components/HeroBanner/HeroBanner.js.map +2 -2
- package/dist/esm/biz-components/ImageOverlayShelf/index.d.ts +2 -2
- package/dist/esm/biz-components/ImageOverlayShelf/index.js +1 -1
- package/dist/esm/biz-components/ImageOverlayShelf/index.js.map +3 -3
- package/dist/esm/biz-components/ImageTextFeature/ImageTextFeature.d.ts +3 -1
- package/dist/esm/biz-components/ImageWithText/ImageWithText.d.ts +3 -1
- package/dist/esm/biz-components/Ksp/index.d.ts +1 -1
- package/dist/esm/biz-components/Listing/components/PaidShipping/index.d.ts +11 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.d.ts +26 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.d.ts +1 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.d.ts +1 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.d.ts +1 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.d.ts +1 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.d.ts +1 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.d.ts +1 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductPaidShipping/index.d.ts +11 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.d.ts +1 -1
- package/dist/esm/biz-components/Listing/components/PurchaseBar/index.d.ts +2 -1
- package/dist/esm/biz-components/LotteryShared/BaseModal.d.ts +61 -0
- package/dist/esm/biz-components/LotteryShared/BaseModal.js +2 -0
- package/dist/esm/biz-components/LotteryShared/BaseModal.js.map +7 -0
- package/dist/esm/biz-components/LotteryShared/ChanceMethods.d.ts +25 -0
- package/dist/esm/biz-components/LotteryShared/ChanceMethods.js +2 -0
- package/dist/esm/biz-components/LotteryShared/ChanceMethods.js.map +7 -0
- package/dist/esm/biz-components/LotteryShared/ErrorModal.d.ts +47 -0
- package/dist/esm/biz-components/LotteryShared/ErrorModal.js +2 -0
- package/dist/esm/biz-components/LotteryShared/ErrorModal.js.map +7 -0
- package/dist/esm/biz-components/LotteryShared/MyRewardsModal.d.ts +101 -0
- package/dist/esm/biz-components/LotteryShared/MyRewardsModal.js +2 -0
- package/dist/esm/biz-components/LotteryShared/MyRewardsModal.js.map +7 -0
- package/dist/esm/biz-components/LotteryShared/PrizePool.d.ts +29 -0
- package/dist/esm/biz-components/LotteryShared/PrizePool.js +2 -0
- package/dist/esm/biz-components/LotteryShared/PrizePool.js.map +7 -0
- package/dist/esm/biz-components/LotteryShared/RulesModal.d.ts +56 -0
- package/dist/esm/biz-components/LotteryShared/RulesModal.js +2 -0
- package/dist/esm/biz-components/LotteryShared/RulesModal.js.map +7 -0
- package/dist/esm/biz-components/LotteryShared/ShareModal.d.ts +79 -0
- package/dist/esm/biz-components/LotteryShared/ShareModal.js +2 -0
- package/dist/esm/biz-components/LotteryShared/ShareModal.js.map +7 -0
- package/dist/esm/biz-components/LotteryShared/WinnerModal.d.ts +27 -0
- package/dist/esm/biz-components/LotteryShared/WinnerModal.js +2 -0
- package/dist/esm/biz-components/LotteryShared/WinnerModal.js.map +7 -0
- package/dist/esm/biz-components/LotteryShared/index.d.ts +23 -0
- package/dist/esm/biz-components/LotteryShared/index.js +2 -0
- package/dist/esm/biz-components/LotteryShared/index.js.map +7 -0
- package/dist/esm/biz-components/LotteryShared/types.d.ts +760 -0
- package/dist/esm/biz-components/LotteryShared/types.js +2 -0
- package/dist/esm/biz-components/LotteryShared/types.js.map +7 -0
- package/dist/esm/biz-components/Marquee/Marquee.d.ts +3 -2
- package/dist/esm/biz-components/MarqueeReview/index.d.ts +1 -1
- package/dist/esm/biz-components/MediaEndorsement/index.d.ts +2 -1
- package/dist/esm/biz-components/MediaEndorsement/index.js +2 -2
- package/dist/esm/biz-components/MediaEndorsement/index.js.map +3 -3
- package/dist/esm/biz-components/MediaPlayerBase/index.d.ts +2 -1
- package/dist/esm/biz-components/MediaPlayerMulti/index.d.ts +2 -1
- package/dist/esm/biz-components/MediaPlayerSticky/index.d.ts +7 -1
- package/dist/esm/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.d.ts +2 -1
- package/dist/esm/biz-components/MediaSceneSwitcherV2/index.d.ts +1 -1
- package/dist/esm/biz-components/MediaShelf/index.d.ts +2 -2
- package/dist/esm/biz-components/MediaShelf/index.js +1 -1
- package/dist/esm/biz-components/MediaShelf/index.js.map +3 -3
- package/dist/esm/biz-components/MemberEquity/index.d.ts +3 -1
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.d.ts +17 -2
- package/dist/esm/biz-components/NavigationSearch/index.d.ts +2 -1
- package/dist/esm/biz-components/ProductCompare/index.d.ts +1 -1
- package/dist/esm/biz-components/ProductHero/ProductHero.d.ts +3 -1
- package/dist/esm/biz-components/ProductLottery/MediaDrawArea.d.ts +4 -0
- package/dist/esm/biz-components/ProductLottery/MediaDrawArea.js +2 -0
- package/dist/esm/biz-components/ProductLottery/MediaDrawArea.js.map +7 -0
- package/dist/esm/biz-components/ProductLottery/index.d.ts +17 -0
- package/dist/esm/biz-components/ProductLottery/index.js +2 -0
- package/dist/esm/biz-components/ProductLottery/index.js.map +7 -0
- package/dist/esm/biz-components/ProductLottery/types.d.ts +363 -0
- package/dist/esm/biz-components/ProductLottery/types.js +2 -0
- package/dist/esm/biz-components/ProductLottery/types.js.map +7 -0
- package/dist/esm/biz-components/ProductNav/ProductNav.d.ts +2 -1
- package/dist/esm/biz-components/PromotionalBar/index.d.ts +1 -1
- package/dist/esm/biz-components/SecondaryBanner/index.d.ts +1 -1
- package/dist/esm/biz-components/SelectStore/index.d.ts +7 -1
- package/dist/esm/biz-components/ShelfDisplay/index.d.ts +3 -1
- package/dist/esm/biz-components/Slogan/index.d.ts +3 -1
- package/dist/esm/biz-components/Spacer/index.d.ts +3 -1
- package/dist/esm/biz-components/Specs/index.d.ts +1 -1
- package/dist/esm/biz-components/Specs/index.js +1 -1
- package/dist/esm/biz-components/Specs/index.js.map +3 -3
- package/dist/esm/biz-components/SpecsComparison/SpecsComparison.d.ts +3 -1
- package/dist/esm/biz-components/Subscribe/index.js +2 -2
- package/dist/esm/biz-components/Subscribe/index.js.map +2 -2
- package/dist/esm/biz-components/TabWithImage/TabWithImage.d.ts +3 -1
- package/dist/esm/biz-components/Tabs/Tabs.d.ts +3 -1
- package/dist/esm/biz-components/Tabs/Tabs.js +1 -1
- package/dist/esm/biz-components/Tabs/Tabs.js.map +2 -2
- package/dist/esm/biz-components/TabsGroup/index.d.ts +3 -1
- package/dist/esm/biz-components/TabsWithMedia/TabsWithMedia.d.ts +3 -1
- package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.d.ts +3 -1
- package/dist/esm/biz-components/Title/index.d.ts +1 -1
- package/dist/esm/biz-components/VideoFeature/VideoFeature.d.ts +3 -1
- package/dist/esm/biz-components/WheelLottery/index.d.ts +12 -12
- package/dist/esm/biz-components/WheelLottery/index.js +1 -1
- package/dist/esm/biz-components/WheelLottery/index.js.map +3 -3
- package/dist/esm/biz-components/WheelLottery/types.d.ts +17 -723
- package/dist/esm/biz-components/WheelLottery/types.js +1 -1
- package/dist/esm/biz-components/WheelLottery/types.js.map +3 -3
- package/dist/esm/biz-components/WhyChoose/WhyChoose.d.ts +3 -2
- package/dist/esm/biz-components/index.d.ts +2 -0
- package/dist/esm/biz-components/index.js +1 -1
- package/dist/esm/biz-components/index.js.map +2 -2
- package/dist/esm/shared/Styles.d.ts +7 -21
- package/dist/esm/shared/Styles.js +1 -1
- package/dist/esm/shared/Styles.js.map +3 -3
- package/package.json +1 -1
- package/style.css +77 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const
|
|
1
|
+
export*from"../LotteryShared/types.js";const e="https://cdn.shopify.com/s/files/1/0517/2199/4432/files/2790697ba78c1a85d953787a8be9b258.png?v=1766371471",i="https://cdn.shopify.com/s/files/1/0582/4669/3040/files/2790697ba78c1a85d953787a8be9b258.png?v=1767610632",n="https://cdn.shopify.com/s/files/1/0517/2199/4432/files/be866c03-4d29-4d59-a8d4-39f5d64bbc0e_ae_e_6.png?v=1766374361",o="https://cdn.shopify.com/s/files/1/0517/2199/4432/files/ad63174a-3da0-4dcd-ac61-c83172c7893c_ae_e_8.png?v=1766374392",r={spinDuration:4e3,easing:"ease-out",chanceTitle:"Want more chances to win?"},t={isSpinning:!1,currentRotation:0,winningPrize:null,isButtonDisabled:!1,isFinished:!1};export{i as DEFAULT_POINTER_DISABLE_IMAGE,e as DEFAULT_POINTER_IMAGE,n as DEFAULT_WHEEL_BG_6_PRIZES,o as DEFAULT_WHEEL_BG_8_PRIZES,r as DEFAULT_WHEEL_CONFIG,t as INITIAL_WHEEL_STATE};
|
|
2
2
|
//# sourceMappingURL=types.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/WheelLottery/types.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * \u5927\u8F6C\u76D8\u62BD\u5956\u7EC4\u4EF6\uFF08WheelLottery\uFF09\u7C7B\u578B\u5B9A\u4E49\n *\n * @module WheelLotteryTypes\n * @date 2025-12-17\n */\n\nimport type { Theme, Img } from '../../types/props.js'\n\n// ============================================================================\n// Imperative Handle \u63A5\u53E3\n// ============================================================================\n\n/**\n * WheelLottery \u7EC4\u4EF6\u547D\u4EE4\u5F0F\u63A7\u5236\u63A5\u53E3\n *\n * \u901A\u8FC7 ref \u66B4\u9732\u7ED9\u7236\u7EC4\u4EF6\uFF0C\u7528\u4E8E\u5916\u90E8\u63A7\u5236\u5F39\u7A97\u7B49\u72B6\u6001\n *\n * @example\n * ```tsx\n * const lotteryRef = useRef<WheelLotteryHandle>(null)\n *\n * <WheelLottery ref={lotteryRef} prizes={prizes} />\n *\n * // \u5916\u90E8\u89E6\u53D1\u9519\u8BEF\u5F39\u7A97\n * lotteryRef.current?.showError({\n * title: 'Network Error',\n * message: 'Failed to connect to server',\n * confirmText: 'Retry'\n * })\n *\n * // \u663E\u793A\u89C4\u5219\u5F39\u7A97\n * lotteryRef.current?.showRules()\n *\n * // \u5173\u95ED\u6240\u6709\u5F39\u7A97\n * lotteryRef.current?.hideAllModals()\n * ```\n */\nexport interface WheelLotteryHandle {\n /**\n * \u663E\u793A\u9519\u8BEF\u5F39\u7A97\n * @param config \u9519\u8BEF\u5F39\u7A97\u914D\u7F6E\n */\n showError: (config: {\n /** \u9519\u8BEF\u4FE1\u606F */\n message: string\n /** \u6807\u9898\uFF08\u53EF\u9009\uFF09 */\n title?: string\n /** \u786E\u8BA4\u6309\u94AE\u6587\u672C\uFF08\u53EF\u9009\uFF09 */\n confirmText?: string\n }) => void\n\n /**\n * \u9690\u85CF\u9519\u8BEF\u5F39\u7A97\n */\n hideError: () => void\n\n /**\n * \u663E\u793A\u672A\u4E2D\u5956\u5F39\u7A97\uFF08\u4F7F\u7528 ErrorModal\uFF09\n * @param config \u672A\u4E2D\u5956\u5F39\u7A97\u914D\u7F6E\n */\n showNoWin: (config?: {\n /** \u6807\u9898\uFF08\u53EF\u9009\uFF09 */\n title?: string\n /** \u63D0\u793A\u4FE1\u606F\uFF08\u53EF\u9009\uFF09 */\n message?: string\n /** \u786E\u8BA4\u6309\u94AE\u6587\u672C\uFF08\u53EF\u9009\uFF09 */\n confirmText?: string\n }) => void\n\n /**\n * \u9690\u85CF\u672A\u4E2D\u5956\u5F39\u7A97\n */\n hideNoWin: () => void\n\n /**\n * \u663E\u793A\u4E2D\u5956\u5F39\u7A97\n * @param prize \u4E2D\u5956\u5956\u54C1\n * @param config \u4E2D\u5956\u5F39\u7A97\u914D\u7F6E\uFF08\u53EF\u9009\uFF09\n */\n showWinner: (prize: Prize, config?: Partial<WinnerModalConfig>) => void\n\n /**\n * \u9690\u85CF\u4E2D\u5956\u5F39\u7A97\n */\n hideWinner: () => void\n\n /**\n * \u663E\u793A\u89C4\u5219\u5F39\u7A97\n */\n showRules: () => void\n\n /**\n * \u9690\u85CF\u89C4\u5219\u5F39\u7A97\n */\n hideRules: () => void\n\n /**\n * \u663E\u793A\u6211\u7684\u5956\u52B1\u5F39\u7A97\n */\n showRewards: () => void\n\n /**\n * \u9690\u85CF\u6211\u7684\u5956\u52B1\u5F39\u7A97\n */\n hideRewards: () => void\n\n /**\n * \u663E\u793A\u5206\u4EAB\u5F39\u7A97\n * @param config \u5206\u4EAB\u5F39\u7A97\u914D\u7F6E\uFF08\u53EF\u9009\uFF09\n */\n showShare: (config?: Partial<ShareModalConfig>) => void\n\n /**\n * \u9690\u85CF\u5206\u4EAB\u5F39\u7A97\n */\n hideShare: () => void\n\n /**\n * \u5173\u95ED\u6240\u6709\u5F39\u7A97\n */\n hideAllModals: () => void\n}\n\n// ============================================================================\n// \u9ED8\u8BA4\u56FE\u7247\u7D20\u6750\u5E38\u91CF\n// ============================================================================\n\n/**\n * \u9ED8\u8BA4\u8F6C\u76D8\u6307\u9488\u56FE\u7247 URL\n */\nexport const DEFAULT_POINTER_IMAGE =\n 'https://cdn.shopify.com/s/files/1/0517/2199/4432/files/2790697ba78c1a85d953787a8be9b258.png?v=1766371471'\n\nexport const DEFAULT_POINTER_DISABLE_IMAGE =\n 'https://cdn.shopify.com/s/files/1/0582/4669/3040/files/2790697ba78c1a85d953787a8be9b258.png?v=1767610632'\n\n/**\n * \u9ED8\u8BA4\u8F6C\u76D8\u5E95\u56FE\uFF086 \u4E2A\u5956\u54C1\uFF09\n */\nexport const DEFAULT_WHEEL_BG_6_PRIZES =\n 'https://cdn.shopify.com/s/files/1/0517/2199/4432/files/be866c03-4d29-4d59-a8d4-39f5d64bbc0e_ae_e_6.png?v=1766374361'\n\n/**\n * \u9ED8\u8BA4\u8F6C\u76D8\u5E95\u56FE\uFF088 \u4E2A\u5956\u54C1\uFF09\n */\nexport const DEFAULT_WHEEL_BG_8_PRIZES =\n 'https://cdn.shopify.com/s/files/1/0517/2199/4432/files/ad63174a-3da0-4dcd-ac61-c83172c7893c_ae_e_8.png?v=1766374392'\n\n// ============================================================================\n// \u6838\u5FC3\u5B9E\u4F53\u7C7B\u578B\n// ============================================================================\n\n/**\n * \u5956\u54C1\uFF08Prize\uFF09\n *\n * \u4EE3\u8868\u8F6C\u76D8\u4E0A\u7684\u4E00\u4E2A\u5956\u54C1\u533A\u5757\uFF0C\u5305\u542B\u663E\u793A\u6240\u9700\u7684\u6240\u6709\u4FE1\u606F\u3002\n *\n * @example\n * ```tsx\n * const prize: Prize = {\n * prizeKey: 'prize-001',\n * name: 'Anker Prime Charger (100W, 3 Ports, GaN)',\n * image: { url: 'https://images.unsplash.com/photo-123', alt: 'Charger' },\n * rank: '1st',\n * price: '$79.99'\n * }\n * ```\n */\nexport interface Prize {\n /**\n * \u552F\u4E00\u6807\u8BC6\u7B26\uFF0C\u7528\u4E8E React key \u548C\u4E2D\u5956\u7ED3\u679C\u5339\u914D\n */\n prizeKey: string\n\n /**\n * \u5956\u54C1\u540D\u79F0\uFF0C\u663E\u793A\u5728\u8F6C\u76D8\u548C\u5956\u6C60\u4E2D\n * @maxLength 100\n */\n name: string\n\n /**\n * \u5956\u54C1\u56FE\u7247\u5BF9\u8C61\uFF0C\u5305\u542B url \u548C alt\n */\n image: Img\n\n /**\n * \u6392\u540D\u6807\u8BC6\uFF0C\u4EC5\u5728 Prize Pool \u4E2D\u663E\u793A\n * @optional\n */\n rank?: '1st' | '2nd' | '3rd'\n\n /**\n * \u4EF7\u683C\u6216\u6298\u6263\u4FE1\u606F\uFF0C\u663E\u793A\u5728\u5956\u6C60\u4E2D\n * @example \"$99.99\" | \"12% Off\"\n * @optional\n */\n price?: string\n}\n\n/**\n * \u4E2D\u5956\u4FE1\u606F\uFF08WinningInfo\uFF09\n *\n * \u4EE3\u8868\u4E00\u6761\u4E2D\u5956\u8BB0\u5F55\uFF0C\u7528\u4E8E\u5E95\u90E8\u6EDA\u52A8\u6761\u5C55\u793A\uFF0C\u8425\u9020\u6D3B\u52A8\u6C1B\u56F4\u3002\n *\n * @example\n * ```tsx\n * const winningInfo: WinningInfo = {\n * winningKey: 'win-001',\n * userName: 'Shuqi***',\n * prizeName: '12% Off Discount',\n * timestamp: 1702800000000\n * }\n * ```\n */\nexport interface WinningInfo {\n /**\n * \u552F\u4E00\u6807\u8BC6\u7B26\n */\n winningKey: string\n\n /**\n * \u7528\u6237\u540D\uFF08\u5DF2\u8131\u654F\uFF09\uFF0C\u5982 \"Shuqi***\"\n * @note \u5047\u8BBE\u4F20\u5165\u7684\u7528\u6237\u540D\u5DF2\u7ECF\u8FC7\u8131\u654F\u5904\u7406\uFF0C\u7EC4\u4EF6\u5185\u90E8\u4E0D\u518D\u5904\u7406\n */\n userName: string\n\n /**\n * \u4E2D\u5956\u5956\u54C1\u540D\u79F0\n */\n prizeName: string\n\n /**\n * \u4E2D\u5956\u65F6\u95F4\u6233\uFF08\u6BEB\u79D2\uFF09\n * @optional\n */\n timestamp?: number\n}\n\n/**\n * \u83B7\u53D6\u673A\u4F1A\u65B9\u5F0F\u7C7B\u578B\n */\nexport type ChanceMethodType = 'share' | 'points' | 'refer' | string\n\n/**\n * \u83B7\u53D6\u673A\u4F1A\u65B9\u5F0F\u72B6\u6001\n */\nexport type ChanceMethodStatus = 'pending' | 'completed' | 'used'\n\n/**\n * \u83B7\u53D6\u673A\u4F1A\u65B9\u5F0F\uFF08ChanceMethod\uFF09\n *\n * \u4EE3\u8868\u4E00\u79CD\u83B7\u53D6\u62BD\u5956\u673A\u4F1A\u7684\u65B9\u5F0F\uFF0C\u652F\u6301\u7075\u6D3B\u914D\u7F6E\uFF08\u5206\u4EAB\u3001\u79EF\u5206\u3001\u63A8\u8350\u7B49\uFF09\u3002\n *\n * @example\n * ```tsx\n * const chanceMethod: ChanceMethod = {\n * methodKey: 'share-001',\n * type: 'share',\n * title: 'Share on your socials',\n * description: 'Share this event on your social media',\n * buttonText: 'Redeem now',\n * onClick: () => console.log('Share clicked'),\n * disabled: false,\n * status: 'pending'\n * }\n * ```\n */\nexport interface ChanceMethod {\n /**\n * \u552F\u4E00\u6807\u8BC6\u7B26\n */\n methodKey: string\n\n /**\n * \u65B9\u5F0F\u7C7B\u578B\uFF0C\u652F\u6301\u9884\u5B9A\u4E49\u7C7B\u578B\uFF08'share', 'points', 'refer'\uFF09\u6216\u81EA\u5B9A\u4E49\u7C7B\u578B\n */\n type: ChanceMethodType\n\n /**\n * \u65B9\u5F0F\u6807\u9898\uFF0C\u5982 \"Share on your socials\"\n */\n title: string\n\n /**\n * \u8BE6\u7EC6\u8BF4\u660E\u6587\u5B57\n */\n description: string\n\n /**\n * \u6309\u94AE\u6587\u6848\uFF0C\u9ED8\u8BA4 \"Redeem now\"\n * @default \"Redeem now\"\n * @optional\n */\n buttonText?: string\n\n completed?: string\n\n used?: string\n\n /**\n * \u672A\u767B\u5F55\u65F6\u70B9\u51FB GO \u6309\u94AE\u7684\u56DE\u8C03\n * @example\n * ```tsx\n * onLoginRequired={() => {\n * // \u6253\u5F00\u767B\u5F55\u5F39\u7A97\u6216\u8DF3\u8F6C\u767B\u5F55\u9875\n * router.push('/login')\n * }}\n * ```\n */\n onLoginRequired?: () => void\n\n /**\n * \u70B9\u51FB\u6309\u94AE\u65F6\u7684\u56DE\u8C03\u51FD\u6570\n * @note \u4E1A\u52A1\u903B\u8F91\uFF08\u5982\u79EF\u5206\u6263\u9664\u3001\u5206\u4EAB\u9A8C\u8BC1\uFF09\u7531\u7236\u7EC4\u4EF6\u5904\u7406\n */\n onClick: () => void\n\n /**\n * \u662F\u5426\u7981\u7528\u8BE5\u65B9\u5F0F\n * @default false\n * @optional\n */\n disabled?: boolean\n\n /**\n * \u83B7\u53D6\u673A\u4F1A\u65B9\u5F0F\u7684\u72B6\u6001\n * - pending: \u672A\u5B8C\u6210\uFF08\u9ED8\u8BA4\u72B6\u6001\uFF09\n * - completed: \u5DF2\u5B8C\u6210/\u5DF2\u83B7\u5F97\n * - used: \u5DF2\u4F7F\u7528\n * @default \"pending\"\n * @optional\n */\n status?: ChanceMethodStatus\n\n /**\n * \u662F\u5426\u663E\u793A\u52A0\u8F7D\u72B6\u6001\n * @default false\n * @optional\n */\n loading?: boolean\n\n /**\n * \u662F\u5426\u5728\u70B9\u51FB\u65F6\u6253\u5F00\u5206\u4EAB\u5F39\u7A97\n * @default false\n * @optional\n */\n openShareModal?: boolean\n}\n\n/**\n * \u7528\u6237\u6570\u636E\uFF08UserData\uFF09\n *\n * \u4EE3\u8868\u5F53\u524D\u7528\u6237\u7684\u62BD\u5956\u76F8\u5173\u6570\u636E\n *\n * @example\n * ```tsx\n * const userData: UserData = {\n * isLoggedIn: true,\n * availableChances: 3,\n * wonPrizes: [\n * { id: 'prize-001', name: 'Charger', image: 'https://...', timestamp: 1702800000000 }\n * ]\n * }\n * ```\n */\nexport interface UserData {\n /**\n * \u7528\u6237\u662F\u5426\u5DF2\u767B\u5F55\n */\n isLoggedIn: boolean\n\n /**\n * \u5F53\u524D\u53EF\u4F7F\u7528\u7684\u62BD\u5956\u6B21\u6570\n * @default 0\n */\n availableChances: number\n\n /**\n * \u603B\u673A\u4F1A\u6570\uFF08\u7528\u4E8E\u663E\u793A\u8FDB\u5EA6\uFF0C\u4F8B\u5982 \"3/5\"\uFF09\n * @default undefined\n * @optional\n */\n totalChances?: number\n\n /**\n * \u5DF2\u83B7\u5F97\u7684\u5956\u54C1\u5217\u8868\n * @optional\n */\n wonPrizes?: Array<Prize & { timestamp?: number }>\n\n /** * \u7528\u6237\u7535\u5B50\u90AE\u7BB1\uFF08\u53EF\u9009\uFF0C\u7528\u4E8E\u53D1\u9001\u4E2D\u5956\u901A\u77E5\u7B49\uFF09\n * @optional\n */\n email?: string\n}\n\n/**\n * \u7F13\u52A8\u51FD\u6570\u7C7B\u578B\n */\nexport type EasingFunction = 'ease-out' | 'ease-in-out' | 'linear'\n\n// ============================================================================\n// \u516C\u5171\u6587\u6848\u914D\u7F6E\u7C7B\u578B\n// ============================================================================\n\n/**\n * \u590D\u5236\u64CD\u4F5C\u76F8\u5173\u6587\u6848\u914D\u7F6E\uFF08\u516C\u5171\u7C7B\u578B\uFF09\n * \u7528\u4E8E\u6240\u6709\u5305\u542B\u590D\u5236\u529F\u80FD\u7684\u7EC4\u4EF6\n */\nexport interface CopyTextConfig {\n /**\n * \u590D\u5236\u6309\u94AE\u6587\u672C\n * @default \"COPY\"\n */\n copyText?: string\n\n /**\n * \u590D\u5236\u6210\u529F\u540E\u7684\u6309\u94AE\u6587\u672C\n * @default \"COPIED\"\n */\n copiedText?: string\n}\n\n/**\n * \u4F18\u60E0\u7801\u76F8\u5173\u914D\u7F6E\uFF08\u516C\u5171\u7C7B\u578B\uFF09\n * \u7528\u4E8E\u6240\u6709\u5C55\u793A\u4F18\u60E0\u7801\u7684\u7EC4\u4EF6\n */\nexport interface CouponConfig {\n /**\n * \u4EE3\u7801\u6587\u672C\u524D\u7F00\n * @default \"CODE:\"\n */\n codeText?: string\n\n /**\n * \u4F18\u60E0\u7801\n */\n couponCode?: string\n\n /**\n * \u4F18\u60E0\u7801\u8FC7\u671F\u65F6\u95F4\n */\n expiresAt?: string\n\n /**\n * \u4F18\u60E0\u5238\u6298\u6263\u6587\u672C\uFF08\u4F8B\u5982 \"20%\"\uFF09\n */\n couponDiscount?: string\n\n /**\n * \u4F18\u60E0\u5238\u5355\u4F4D\u6587\u672C\n * @default \"Off\"\n */\n couponUnit?: string\n}\n\n/**\n * \u5956\u52B1\u65F6\u95F4\u6587\u6848\u914D\u7F6E\uFF08\u516C\u5171\u7C7B\u578B\uFF09\n */\nexport interface PrizeTimeTextConfig {\n /**\n * \u5956\u52B1\u65F6\u95F4\u6587\u672C\u524D\u7F00\n * @default \"Prize time:\"\n */\n prizeText?: string\n}\n\n/**\n * \u4E2D\u5956\u5F39\u7A97\u914D\u7F6E\uFF08WinnerModalConfig\uFF09\n *\n * \u7528\u4E8E\u914D\u7F6E\u4E2D\u5956\u5F39\u7A97\u7684\u5C55\u793A\u5185\u5BB9\uFF0C\u901A\u5E38\u7531\u62BD\u5956\u63A5\u53E3\u8FD4\u56DE\u63D0\u4F9B\n *\n * @example\n * ```tsx\n * const winnerModalConfig: WinnerModalConfig = {\n * title: 'Congratulations!',\n * prizeTitle: 'Anker Prime Charger',\n * prizeImage: 'https://...',\n * prizeDescription: 'High-speed charging for all your devices',\n * learnMoreUrl: 'https://...',\n * learnMoreText: 'View Details',\n * couponCode: 'ANKER2024',\n * expiresAt: '2024-12-31',\n * couponDiscount: '20%',\n * couponUnit: 'Off',\n * confirmText: 'Claim Now'\n * }\n * ```\n */\nexport interface WinnerModalConfig extends CopyTextConfig, CouponConfig, PrizeTimeTextConfig {\n /**\n * \u4E2D\u5956\u5F39\u7A97\u6807\u9898\n * @default \"You Have Won\"\n * @optional\n */\n title?: string\n\n /**\n * \u4E2D\u5956\u5F39\u7A97\u5956\u54C1\u6807\u9898\uFF08\u4F18\u5148\u7EA7\u9AD8\u4E8E prize.name\uFF09\n * @optional\n */\n prizeTitle?: string\n\n /**\n * \u4E2D\u5956\u5F39\u7A97\u5956\u54C1\u56FE\u7247 URL\uFF08\u4F18\u5148\u7EA7\u9AD8\u4E8E prize.image\uFF09\n * @optional\n */\n prizeImage?: string\n\n /**\n * \u4E2D\u5956\u5F39\u7A97\u5956\u54C1\u8BE6\u60C5\u63CF\u8FF0\n * @optional\n */\n prizeDescription?: string\n\n /**\n * \u4E2D\u5956\u5F39\u7A97 Learn More \u94FE\u63A5\n * @optional\n */\n learnMoreUrl?: string\n\n /**\n * \u4E2D\u5956\u5F39\u7A97 Learn More \u6309\u94AE\u6587\u672C\n * @default \"Learn More\"\n * @optional\n */\n learnMoreText?: string\n\n /**\n * \u4E2D\u5956\u5F39\u7A97\u786E\u8BA4\u6309\u94AE\u6587\u672C\n * @default \"Okay, Got It\"\n * @optional\n */\n confirmText?: string\n}\n\n/**\n * Rules \u5F39\u7A97\u914D\u7F6E\n *\n * @example\n * ```tsx\n * rulesModalConfig={{\n * rulesData: [\n * { item: '$100 instead of $200, 10 tickets/day.' },\n * { item: '$100 for $120, 50 tickets/day.' }\n * ],\n * rulesText: 'Game Rules',\n * rulesTitle: 'Activity Rules'\n * }}\n * ```\n */\nexport interface RulesModalConfig {\n /**\n * \u89C4\u5219\u6570\u636E\u5217\u8868\n * @optional\n */\n rulesData?: Array<{\n /**\n * \u89C4\u5219\u9879\u5185\u5BB9\n */\n item: string\n }>\n\n /**\n * Rules \u6309\u94AE\u6587\u672C\n * @default \"Rules\"\n * @optional\n */\n rulesText?: string\n\n /**\n * \u5F39\u7A97\u6807\u9898\n * @default \"Rules\"\n * @optional\n */\n rulesTitle?: string\n}\n\n/**\n * My Rewards \u5F39\u7A97\u914D\u7F6E\n *\n * @example\n * ```tsx\n * myRewardsModalConfig={{\n * rewardsData: [\n * {\n * id: '1',\n * name: 'Anker Charger',\n * code: 'ANKER2024',\n * status: 'Available',\n * prizeTime: '2024-01-01',\n * showCopyCode: true\n * }\n * ],\n * myRewardsText: 'My Prizes',\n * codeText: 'CODE:',\n * copyText: 'COPY',\n * prizeText: 'Prize time:',\n * emptyText: 'No rewards yet'\n * }}\n * ```\n */\nexport interface MyRewardsModalConfig extends CopyTextConfig, PrizeTimeTextConfig {\n /**\n * \u5956\u52B1\u6570\u636E\u5217\u8868\n * @optional\n */\n rewardsData?: Array<{\n /**\n * \u5956\u52B1 ID\n */\n id: string\n /**\n * \u5956\u52B1\u540D\u79F0\n */\n name: string\n /**\n * \u4F18\u60E0\u7801\uFF08\u53EF\u9009\uFF09\n */\n code?: string\n /**\n * \u72B6\u6001\n */\n status: 'Available' | 'Expired' | 'Used'\n /**\n * \u5956\u52B1\u65F6\u95F4\n */\n prizeTime?: string\n /**\n * \u662F\u5426\u53EF\u590D\u5236\u7801\n */\n showCopyCode?: boolean\n }>\n\n /**\n * My Rewards \u6309\u94AE\u6587\u672C\n * @default \"My Rewards\"\n * @optional\n */\n myRewardsText?: string\n\n /**\n * \u5F39\u7A97\u6807\u9898\n * @default \"My Rewards\"\n * @optional\n */\n myRewardsTitle?: string\n\n /**\n * \u4EE3\u7801\u6587\u672C\u524D\u7F00\n * @default \"CODE:\"\n * @optional\n */\n codeText?: string\n\n /**\n * \u7A7A\u72B6\u6001\u63D0\u793A\u6587\u672C\n * @default \"No rewards yet\"\n * @optional\n */\n emptyText?: string\n}\n\n/**\n * \u9519\u8BEF\u5F39\u7A97\u914D\u7F6E\n * @example\n * ```tsx\n * errorModalConfig={{\n * title: 'Oops!',\n * message: 'Something went wrong during the lottery process.',\n * confirmText: 'OK, I get'\n * }}\n * ```\n */\nexport interface ErrorModalConfig {\n /**\n * \u5F39\u7A97\u6807\u9898\n * @default \"Oops!\"\n * @optional\n */\n title?: string\n /**\n * \u9519\u8BEF\u6D88\u606F\u5185\u5BB9\n * @default \"Something went wrong during the lottery process.\"\n * @optional\n */\n message?: string\n /**\n * \u786E\u8BA4\u6309\u94AE\u6587\u672C\n * @default \"OK, I get\"\n * @optional\n */\n confirmText?: string\n}\n\n/**\n * \u793E\u4EA4\u5E73\u53F0\u7C7B\u578B\n */\nexport type SocialPlatform = 'facebook' | 'twitter' | 'instagram' | 'linkedin' | 'tiktok' | 'youtube'\n\n/**\n * \u793E\u4EA4\u5E73\u53F0\u914D\u7F6E\n */\nexport interface SharePlatformConfig {\n /**\n * \u5E73\u53F0\u7C7B\u578B\n */\n platform: SocialPlatform\n\n /**\n * \u5E73\u53F0\u540D\u79F0\n */\n name: string\n\n /**\n * \u5206\u4EAB URL\uFF08\u53EF\u9009\uFF0C\u5982\u679C\u63D0\u4F9B\u5219\u76F4\u63A5\u8DF3\u8F6C\uFF09\n */\n url?: string\n\n /**\n * \u70B9\u51FB\u56DE\u8C03\uFF08\u5982\u679C\u63D0\u4F9B url \u5219\u6B64\u56DE\u8C03\u4F1A\u5728\u8DF3\u8F6C\u524D\u6267\u884C\uFF09\n */\n onClick?: () => void\n\n /**\n * \u662F\u5426\u7981\u7528\n */\n disabled?: boolean\n}\n\n/**\n * \u5206\u4EAB\u5F39\u7A97\u914D\u7F6E\n */\nexport interface ShareModalConfig {\n /**\n * \u5F39\u7A97\u6807\u9898\n * @default \"Share to Get More Chances\"\n */\n title?: string\n\n /**\n * \u526F\u6807\u9898/\u5F15\u5BFC\u6587\u6848\n * @default \"Share to Play Again Keep Trying! You Could Still Win Big!\"\n */\n subtitle?: string\n\n /**\n * \u5E95\u90E8\u63D0\u793A\u6587\u6848\n * @default \"Note: Maximum of 3 times per participant.\"\n */\n note?: string\n\n /**\n * \u793E\u4EA4\u5E73\u53F0\u914D\u7F6E\u5217\u8868\n */\n platforms?: SharePlatformConfig[]\n\n /**\n * \u5206\u4EAB\u6210\u529F\u56DE\u8C03\n */\n onShareSuccess?: (platform: SocialPlatform) => void\n}\n\n// ============================================================================\n// \u7EC4\u4EF6 Props \u63A5\u53E3\n// ============================================================================\n\n/**\n * WheelLottery \u7EC4\u4EF6 Props\n *\n * @example\n * ```tsx\n * <WheelLottery\n * prizes={prizes}\n * winningPrizeId=\"prize-003\"\n * spinDuration={4000}\n * easing=\"ease-out\"\n * chanceMethods={chanceMethods}\n * chanceTitle=\"Want more chances to win?\"\n * winningInfos={winningInfos}\n * onSpinStart={() => console.log('Spin started')}\n * onSpinEnd={(prize) => alert(`You won ${prize.name}`)}\n * />\n * ```\n */\nexport interface WheelLotteryProps {\n // ========== \u5FC5\u9700 Props ==========\n\n /**\n * 8 \u4E2A\u5956\u54C1\u6570\u7EC4\uFF08\u5FC5\u9700\uFF09\n * @minLength 8\n * @maxLength 8\n * @validation \u5982\u679C\u957F\u5EA6\u4E0D\u7B49\u4E8E 8\uFF0C\u5E94\u5728\u5F00\u53D1\u73AF\u5883\u4E0B\u8F93\u51FA\u8B66\u544A\n */\n prizes: Prize[]\n\n // ========== \u8F6C\u76D8\u914D\u7F6E Props\uFF08\u53EF\u9009\uFF09 ==========\n\n /**\n * \u4E3B\u9898\u8272\n */\n theme?: Theme\n\n /**\n * \u6307\u5B9A\u4E2D\u5956\u5956\u54C1\u7684 ID\uFF0C\u7528\u4E8E\u6D4B\u8BD5\u6216\u670D\u52A1\u7AEF\u51B3\u5B9A\u7ED3\u679C\n * @note \u5FC5\u987B\u662F prizes \u6570\u7EC4\u4E2D\u67D0\u4E2A Prize \u7684 id\n * @optional\n */\n winningPrizeId?: string\n\n /**\n * \u65CB\u8F6C\u65F6\u957F\uFF08\u6BEB\u79D2\uFF09\n * @default 4000\n * @range 3000-5000\n * @optional\n */\n spinDuration?: number\n\n /**\n * \u7F13\u52A8\u51FD\u6570\n * @default \"ease-out\"\n * @optional\n */\n easing?: EasingFunction\n\n /**\n * \u8F6C\u76D8\u5E95\u56FE URL\uFF08\u652F\u6301 6 \u4E2A\u6216 8 \u4E2A\u5956\u54C1\u7684\u80CC\u666F\u56FE\uFF09\n * @default \u6839\u636E prizes.length \u81EA\u52A8\u9009\u62E9 6 \u6216 8 \u5956\u54C1\u5E95\u56FE\n * @optional\n */\n wheelBackgroundImage?: string\n\n /**\n * \u8F6C\u76D8\u6307\u9488\u56FE\u7247 URL\n * @default \u9ED8\u8BA4\u6307\u9488\u56FE\u7247\n * @optional\n */\n pointerImage?: string\n\n // ========== \u83B7\u53D6\u673A\u4F1A\u533A\u57DF Props\uFF08\u53EF\u9009\uFF09 ==========\n\n /**\n * \u83B7\u53D6\u673A\u4F1A\u65B9\u5F0F\u6570\u7EC4\n * @default DEFAULT_CHANCE_METHODS\uFF083\u79CD\u9ED8\u8BA4\u65B9\u5F0F\uFF1A\u5206\u4EAB\u3001\u79EF\u5206\u3001\u63A8\u8350\uFF09\n * @note \u5F53\u6570\u7EC4\u4E3A\u7A7A\u65F6\uFF0C\u9690\u85CF\u6574\u4E2A\"\u83B7\u53D6\u673A\u4F1A\"\u533A\u57DF\n * @optional\n */\n chanceMethods?: ChanceMethod[]\n\n /**\n * \u83B7\u53D6\u673A\u4F1A\u533A\u57DF\u6807\u9898\n * @default \"Want more chances to win?\"\n * @optional\n */\n chanceTitle?: string\n\n /**\n * \u83B7\u53D6\u673A\u4F1A\u533A\u57DF\u526F\u6807\u9898\n * @optional\n */\n chanceSubtitle?: string\n\n /**\n * \u83B7\u53D6\u673A\u4F1A\u533A\u57DF\u5E95\u90E8\u63D0\u793A\n * @optional\n */\n chanceFooterNote?: string\n\n /**\n * \u83B7\u53D6\u673A\u4F1A\u65B9\u5F0F\u6587\u6848\u914D\u7F6E\n * @optional\n */\n chanceMethodsText?: {\n chanceBadgeText?: string\n completedText?: string\n usedText?: string\n loadingText?: string\n }\n\n // ========== \u4E2D\u5956\u4FE1\u606F Props\uFF08\u53EF\u9009\uFF09 ==========\n\n /**\n * \u4E2D\u5956\u4FE1\u606F\u6570\u7EC4\uFF0C\u7528\u4E8E\u5E95\u90E8\u6EDA\u52A8\u6761\u5C55\u793A\n * @default []\n * @note \u5F53\u6570\u7EC4\u4E3A\u7A7A\u65F6\uFF0C\u9690\u85CF\u5E95\u90E8\u6EDA\u52A8\u6761\u6216\u663E\u793A\u9ED8\u8BA4\u63D0\u793A\n * @optional\n */\n winningInfos?: WinningInfo[]\n\n /**\n * \u5956\u54C1\u6C60\u5C55\u793A\u533A\u57DF\u6807\u9898\n * @default \"Prize Pool\"\n * @optional\n */\n prizesTitle?: string\n\n // ========== \u56DE\u8C03\u51FD\u6570 Props\uFF08\u53EF\u9009\uFF09 ==========\n\n /**\n * \u62BD\u5956\u5F00\u59CB\u65F6\u7684\u56DE\u8C03\uFF0C\u8FD4\u56DE Promise \u4EE5\u652F\u6301\u5F02\u6B65\u63A5\u53E3\u8C03\u7528\n * @returns Promise<string> - \u4E2D\u5956\u5956\u54C1\u7684 ID\uFF0C\u5982\u679C\u63A5\u53E3\u5931\u8D25\u5219 reject\n * @optional\n * @example\n * ```tsx\n * onSpinStart={async () => {\n * const result = await fetch('/api/lottery')\n * const data = await result.json()\n * return data.prizeId // \u8FD4\u56DE\u4E2D\u5956\u5956\u54C1 ID\n * }}\n * ```\n */\n onSpinStart?: () => Promise<string>\n\n /**\n * \u62BD\u5956\u7ED3\u675F\u65F6\u7684\u56DE\u8C03\uFF0C\u4F20\u9012\u4E2D\u5956\u5956\u54C1\n * @param prize \u4E2D\u5956\u5956\u54C1\u5BF9\u8C61\n * @optional\n */\n onSpinEnd?: (prize: Prize) => void\n\n /**\n * \u62BD\u5956\u9519\u8BEF\u65F6\u7684\u56DE\u8C03\n * @param error \u9519\u8BEF\u4FE1\u606F\n * @optional\n */\n onSpinError?: (error: Error) => void\n\n // ========== \u4E2D\u5956\u5F39\u7A97\u914D\u7F6E Props\uFF08\u53EF\u9009\uFF09 ==========\n\n /**\n * \u4E2D\u5956\u5F39\u7A97\u914D\u7F6E\u5BF9\u8C61\uFF0C\u901A\u5E38\u7531\u62BD\u5956\u63A5\u53E3\u8FD4\u56DE\u63D0\u4F9B\n * @optional\n * @example\n * ```tsx\n * winnerModalConfig={{\n * title: 'Congratulations!',\n * prizeTitle: 'Anker Prime Charger',\n * prizeImage: 'https://...',\n * prizeDescription: 'High-speed charging',\n * learnMoreUrl: 'https://...',\n * couponCode: 'ANKER2024',\n * expiresAt: '2024-12-31',\n * couponDiscount: '20%',\n * confirmText: 'Claim Now'\n * }}\n * ```\n */\n winnerModalConfig?: WinnerModalConfig\n\n rulesModalConfig?: RulesModalConfig\n\n myRewardsModalConfig?: MyRewardsModalConfig\n\n errorModalConfig?: ErrorModalConfig\n\n /**\n * \u5206\u4EAB\u5F39\u7A97\u914D\u7F6E\n * @optional\n */\n shareModalConfig?: ShareModalConfig\n\n /**\n * \u672A\u767B\u5F55\u65F6\u70B9\u51FB GO \u6309\u94AE\u7684\u56DE\u8C03\n * @example\n * ```tsx\n * onLoginRequired={() => {\n * // \u6253\u5F00\u767B\u5F55\u5F39\u7A97\u6216\u8DF3\u8F6C\u767B\u5F55\u9875\n * router.push('/login')\n * }}\n * ```\n */\n onLoginRequired?: () => void\n\n // ========== \u7528\u6237\u76F8\u5173 Props\uFF08\u53EF\u9009\uFF09 ==========\n\n /**\n * \u7528\u6237\u6570\u636E\n * @optional\n * @example\n * ```tsx\n * userData={{\n * isLoggedIn: true,\n * availableChances: 3,\n * wonPrizes: [{ id: 'prize-001', name: 'Charger', image: 'https://...' }]\n * }}\n * ```\n */\n userData?: UserData\n\n /**\n * \u672A\u767B\u5F55\u65F6\u7684\u63D0\u793A\u6587\u6848\n * @default \"Please log in to participate\"\n * @optional\n */\n loginPromptText?: string\n\n /**\n * \u767B\u5F55\u6309\u94AE\u6587\u6848\n * @default \"Log In\"\n * @optional\n */\n loginButtonText?: string\n\n /**\n * \u6B21\u6570\u4E0D\u8DB3\u65F6\u7684\u63D0\u793A\u6587\u6848\n * @default \"You have no chances left\"\n * @optional\n */\n noChancesText?: string\n\n // ========== \u5F39\u7A97\u76F8\u5173 Props\uFF08\u53EF\u9009\uFF09 ==========\n\n /**\n * \u590D\u5236\u4F18\u60E0\u7801\u56DE\u8C03\n * @optional\n */\n onCopyCode?: (code: string) => void\n\n /**\n * Rules \u6309\u94AE\u6587\u672C\n * @default \"Rules\"\n * @optional\n */\n rulesText?: string\n\n /**\n * Opportunities \u6587\u672C\u6570\u7EC4\n * @default [\"Accumulate\", \"lottery opportunities\"]\n * @optional\n */\n opportunitiesText?: string[]\n\n /**\n * My Rewards \u6309\u94AE\u6587\u672C\n * @default \"My Rewards\"\n * @optional\n */\n myRewardsText?: string\n\n /**\n * \u672A\u4E2D\u5956\u5F39\u7A97\u6807\u9898\n * @default \"Sorry, You Didn't Win This Time\"\n * @optional\n */\n noWinTitle?: string\n\n /**\n * \u672A\u4E2D\u5956\u5F39\u7A97\u526F\u6807\u9898\n * @default \"Keep Trying, You Could Still Win Big!\"\n * @optional\n */\n noWinSubtitle?: string\n\n // ========== My Rewards \u5F39\u7A97\u6587\u6848\u914D\u7F6E\uFF08\u53EF\u9009\uFF09 ==========\n\n /**\n * My Rewards \u5F39\u7A97\u65E0\u5956\u52B1\u65F6\u7684\u63D0\u793A\u6587\u672C\n * @default \"No rewards yet\"\n * @optional\n */\n rewardsEmptyText?: string\n\n /**\n * My Rewards \u5F39\u7A97 CODE \u6807\u7B7E\u6587\u672C\n * @default \"CODE:\"\n * @optional\n */\n rewardsCodeLabel?: string\n\n /**\n * My Rewards \u5F39\u7A97\u590D\u5236\u6309\u94AE\u6587\u672C\n * @default \"Copy\"\n * @optional\n */\n rewardsCopyButtonText?: string\n\n /**\n * My Rewards \u5F39\u7A97\u5956\u52B1\u65F6\u95F4\u6807\u7B7E\u6587\u672C\n * @default \"Prize time:\"\n * @optional\n */\n rewardsPrizeTimeLabel?: string\n\n // ========== BaseModal \u914D\u7F6E\uFF08\u53EF\u9009\uFF09 ==========\n\n /**\n * \u5F39\u7A97\u5173\u95ED\u6309\u94AE\u7684 aria-label\n * @default \"\u5173\u95ED\u5F39\u7A97\"\n * @optional\n */\n modalCloseButtonAriaLabel?: string\n\n // ========== \u6837\u5F0F\u76F8\u5173 Props\uFF08\u53EF\u9009\uFF09 ==========\n\n /**\n * \u81EA\u5B9A\u4E49 CSS \u7C7B\u540D\uFF0C\u7528\u4E8E\u8986\u76D6\u6216\u6269\u5C55\u9ED8\u8BA4\u6837\u5F0F\n * @optional\n */\n className?: string\n}\n\n// ============================================================================\n// \u9ED8\u8BA4\u914D\u7F6E\n// ============================================================================\n\n/**\n * \u9ED8\u8BA4\u83B7\u53D6\u673A\u4F1A\u65B9\u5F0F\uFF083\u79CD\uFF09\n * @note \u7236\u7EC4\u4EF6\u9700\u8981\u8986\u76D6 onClick \u56DE\u8C03\u4EE5\u5B9E\u73B0\u5177\u4F53\u4E1A\u52A1\u903B\u8F91\n */\nexport const DEFAULT_CHANCE_METHODS: ChanceMethod[] = [\n {\n methodKey: 'default-share',\n type: 'share',\n title: 'Share on your socials',\n description: 'Share this event on your social media',\n buttonText: 'Redeem now',\n onLoginRequired: () => {\n alert('Please log in to share and get a chance!')\n },\n onClick: () => {\n console.warn('ChanceMethod.onClick not implemented. Please provide a custom onClick handler.')\n },\n disabled: false,\n },\n {\n methodKey: 'default-points',\n type: 'points',\n title: 'Spend 100 points',\n description: 'Use your reward points to get a chance',\n buttonText: 'Redeem now',\n onLoginRequired: () => {\n alert('Please log in to share and get a chance!')\n },\n onClick: () => {\n console.warn('ChanceMethod.onClick not implemented. Please provide a custom onClick handler.')\n },\n disabled: false,\n },\n {\n methodKey: 'default-refer',\n type: 'refer',\n title: 'Refer a friend',\n description: 'Invite your friends to join',\n buttonText: 'Redeem now',\n onLoginRequired: () => {\n alert('Please log in to share and get a chance!')\n },\n onClick: () => {\n console.warn('ChanceMethod.onClick not implemented. Please provide a custom onClick handler.')\n },\n disabled: false,\n },\n]\n\n/**\n * \u9ED8\u8BA4\u8F6C\u76D8\u914D\u7F6E\n */\n\nexport const DEFAULT_WHEEL_CONFIG = {\n spinDuration: 4000, // 4 \u79D2\n easing: 'ease-out' as EasingFunction,\n chanceTitle: 'Want more chances to win?',\n}\n\n// ============================================================================\n// \u5185\u90E8\u72B6\u6001\u7C7B\u578B\uFF08\u4EC5\u4F9B\u7EC4\u4EF6\u5185\u90E8\u4F7F\u7528\uFF09\n// ============================================================================\n\n/**\n * \u8F6C\u76D8\u8FD0\u884C\u65F6\u72B6\u6001\uFF08\u7EC4\u4EF6\u5185\u90E8\u4F7F\u7528\uFF09\n * @internal\n */\nexport interface WheelState {\n /**\n * \u8F6C\u76D8\u662F\u5426\u6B63\u5728\u65CB\u8F6C\n */\n isSpinning: boolean\n\n /**\n * \u5F53\u524D\u65CB\u8F6C\u89D2\u5EA6\uFF08\u5EA6\u6570\uFF09\n */\n currentRotation: number\n\n /**\n * \u4E2D\u5956\u5956\u54C1\uFF0C\u62BD\u5956\u7ED3\u675F\u540E\u8BBE\u7F6E\n */\n winningPrize: Prize | null\n\n /**\n * GO \u6309\u94AE\u662F\u5426\u7981\u7528\n */\n isButtonDisabled: boolean\n\n /**\n * \u662F\u5426\u5DF2\u5B8C\u6210\u62BD\u5956\uFF08\u7528\u4E8E\u63A7\u5236\u8F6C\u76D8\u662F\u5426\u663E\u793A\u521D\u59CB\u65CB\u8F6C\u52A8\u753B\uFF09\n */\n isFinished: boolean\n}\n\n/**\n * \u521D\u59CB\u8F6C\u76D8\u72B6\u6001\n * @internal\n */\nexport const INITIAL_WHEEL_STATE: WheelState = {\n isSpinning: false,\n currentRotation: 0,\n winningPrize: null,\n isButtonDisabled: false,\n isFinished: false,\n}\n\n// ============================================================================\n// \u5B50\u7EC4\u4EF6 Props \u7C7B\u578B\n// ============================================================================\n\n/**\n * Wheel \u8F6C\u76D8\u7EC4\u4EF6 Props\n */\nexport interface WheelProps {\n /**\n * \u4E3B\u9898\u6A21\u5F0F\n * @optional\n */\n theme?: Theme\n\n /**\n * 8 \u4E2A\u5956\u54C1\u6570\u7EC4\n */\n prizes: Prize[]\n\n /**\n * \u5F53\u524D\u65CB\u8F6C\u89D2\u5EA6(\u5EA6\u6570)\n */\n rotation: number\n\n /**\n * \u662F\u5426\u6B63\u5728\u65CB\u8F6C\n */\n isSpinning: boolean\n\n /**\n * \u662F\u5426\u5DF2\u5B8C\u6210\u62BD\u5956\uFF08\u7528\u4E8E\u63A7\u5236\u8F6C\u76D8\u662F\u5426\u663E\u793A\u521D\u59CB\u65CB\u8F6C\u52A8\u753B\uFF09\n */\n isFinished?: boolean\n\n /**\n * GO \u6309\u94AE\u662F\u5426\u7981\u7528\n */\n isButtonDisabled: boolean\n\n /**\n * GO \u6309\u94AE\u70B9\u51FB\u56DE\u8C03\n */\n onGoClick: () => void\n\n /**\n * \u8F6C\u76D8\u5E95\u56FE URL\uFF08\u53EF\u9009\uFF09\n */\n wheelBackgroundImage?: string\n\n /**\n * \u8F6C\u76D8\u6307\u9488\u56FE\u7247 URL\uFF08\u53EF\u9009\uFF09\n */\n pointerImage?: string\n\n /**\n * \u767B\u5F55\u7528\u6237\u6570\u636E\uFF08\u53EF\u9009\uFF09\n * @optional\n */\n userData?: UserData\n\n /**\n * \u6253\u5F00\u5206\u4EAB\u5F39\u7A97\u56DE\u8C03\uFF08\u53EF\u9009\uFF09\n * @optional\n */\n onOpenShareModal?: () => void\n\n /**\n * \u81EA\u5B9A\u4E49\u7C7B\u540D\n */\n className?: string\n}\n\n/**\n * PrizePool \u5956\u54C1\u6C60\u7EC4\u4EF6 Props\n */\nexport interface PrizePoolProps {\n /**\n * \u4E3B\u9898\u6A21\u5F0F\n * @optional\n */\n theme?: Theme\n\n /**\n * \u5956\u54C1\u5217\u8868(\u901A\u5E38\u662F\u5168\u90E8 8 \u4E2A\u5956\u54C1)\n */\n prizes: Prize[]\n\n /**\n * \u6807\u9898\u6587\u672C\n * @default \"Prize Pool\"\n */\n title?: string\n\n /**\n * \u4E2D\u5956\u4EBA\u540D\u5355\u6570\u636E\n * @optional\n */\n winningInfos?: WinningInfo[]\n\n /**\n * \u81EA\u5B9A\u4E49\u7C7B\u540D\n */\n className?: string\n}\n\n/**\n * ChanceMethods \u83B7\u53D6\u673A\u4F1A\u7EC4\u4EF6 Props\n */\nexport interface ChanceMethodsProps {\n /**\n * \u4E3B\u9898\u6A21\u5F0F\n * @optional\n */\n theme?: Theme\n\n /**\n * \u83B7\u53D6\u673A\u4F1A\u65B9\u5F0F\u5217\u8868\n */\n methods: ChanceMethod[]\n\n /**\n * \u6807\u9898\u6587\u672C\n * @default \"Want more chances to win?\"\n */\n title?: string\n\n /**\n * \u526F\u6807\u9898(\u53EF\u9009)\n */\n subtitle?: string\n\n /**\n * \u5E95\u90E8\u63D0\u793A\u6587\u672C(\u53EF\u9009)\n */\n footerNote?: string\n\n /**\n * \u767B\u5F55\u7528\u6237\u6570\u636E\uFF08\u53EF\u9009\uFF09\n * @optional\n */\n userData?: UserData\n\n /**\n * \u6253\u5F00\u5206\u4EAB\u5F39\u7A97\u56DE\u8C03\uFF08\u53EF\u9009\uFF09\n * @optional\n */\n onOpenShareModal?: () => void\n\n /**\n * \u5FBD\u7AE0\u6587\u6848\n * @default \"Chance +1\"\n */\n chanceBadgeText?: string\n\n /**\n * \u5DF2\u5B8C\u6210\u72B6\u6001\u6587\u6848\n * @default \"Completed\"\n */\n completedText?: string\n\n /**\n * \u5DF2\u4F7F\u7528\u72B6\u6001\u6587\u6848\n * @default \"Used\"\n */\n usedText?: string\n\n /**\n * \u52A0\u8F7D\u4E2D\u6587\u6848\n * @default \"Loading...\"\n */\n loadingText?: string\n\n /**\n * \u81EA\u5B9A\u4E49\u7C7B\u540D\n */\n className?: string\n}\n\n/**\n * WinnerModal \u4E2D\u5956\u5F39\u7A97\u7EC4\u4EF6 Props\n */\nexport interface WinnerModalProps extends CopyTextConfig, CouponConfig, PrizeTimeTextConfig {\n /**\n * \u662F\u5426\u663E\u793A\u5F39\u7A97\n */\n isOpen: boolean\n\n /**\n * \u4E2D\u5956\u5956\u54C1\u4FE1\u606F\n */\n prize: Prize | null\n\n /**\n * \u5F39\u7A97\u6807\u9898\uFF08\u53EF\u9009\uFF0C\u9ED8\u8BA4 \"You Have Won\"\uFF09\n */\n title?: string\n\n /**\n * \u5956\u54C1\u6807\u9898\uFF08\u53EF\u9009\uFF0C\u9ED8\u8BA4\u4F7F\u7528 prize.name\uFF09\n */\n prizeTitle?: string\n\n /**\n * \u5956\u54C1\u56FE\u7247 URL\uFF08\u53EF\u9009\uFF0C\u9ED8\u8BA4\u4F7F\u7528 prize.image\uFF09\n */\n prizeImage?: string\n\n /**\n * \u5956\u54C1\u8BE6\u60C5\u63CF\u8FF0\uFF08\u53EF\u9009\uFF09\n */\n prizeDescription?: string\n\n /**\n * Learn More \u94FE\u63A5\uFF08\u53EF\u9009\uFF09\n */\n learnMoreUrl?: string\n\n /**\n * Learn More \u6309\u94AE\u6587\u672C\uFF08\u53EF\u9009\uFF0C\u9ED8\u8BA4 \"Learn More\"\uFF09\n */\n learnMoreText?: string\n\n /**\n * \u590D\u5236\u7801\u70B9\u51FB\u56DE\u8C03\n */\n onCopyCode?: (code: string) => void\n\n /**\n * \u5173\u95ED\u5F39\u7A97\u56DE\u8C03\n */\n onClose: () => void\n\n /**\n * \u786E\u8BA4\u6309\u94AE\u6587\u672C\uFF08\u53EF\u9009\uFF0C\u9ED8\u8BA4 \"Okay, Got It\"\uFF09\n */\n confirmText?: string\n\n /**\n * \u786E\u8BA4\u6309\u94AE\u70B9\u51FB\u56DE\u8C03\uFF08\u53EF\u9009\uFF09\n */\n onConfirm?: () => void\n\n /**\n * \u81EA\u5B9A\u4E49\u7C7B\u540D\n */\n className?: string\n}\n\n// ============================================================================\n// \u5DE5\u5177\u7C7B\u578B\n// ============================================================================\n\n/**\n * \u9A8C\u8BC1\u7ED3\u679C\n */\nexport interface ValidationResult {\n valid: boolean\n error?: string\n}\n\n/**\n * \u5956\u54C1\u9A8C\u8BC1\u9009\u9879\n */\nexport interface ValidatePrizesOptions {\n /**\n * \u662F\u5426\u5141\u8BB8\u7F3A\u5C11 rank \u5B57\u6BB5\n * @default true\n */\n allowMissingRank?: boolean\n\n /**\n * \u662F\u5426\u5141\u8BB8\u7F3A\u5C11 price \u5B57\u6BB5\n * @default true\n */\n allowMissingPrice?: boolean\n}\n\n// ============================================================================\n// \u7C7B\u578B\u5B88\u536B\n// ============================================================================\n\n/**\n * \u68C0\u67E5\u662F\u5426\u4E3A\u6709\u6548\u7684 Prize \u5BF9\u8C61\n * @param value \u5F85\u68C0\u67E5\u7684\u503C\n * @returns \u662F\u5426\u4E3A\u6709\u6548\u7684 Prize\n */\nexport function isPrize(value: unknown): value is Prize {\n return (\n typeof value === 'object' &&\n value !== null &&\n 'prizeKey' in value &&\n 'name' in value &&\n 'image' in value &&\n typeof (value as Prize).prizeKey === 'string' &&\n typeof (value as Prize).name === 'string' &&\n typeof (value as Prize).image === 'object'\n )\n}\n\n/**\n * \u68C0\u67E5\u662F\u5426\u4E3A\u6709\u6548\u7684 ChanceMethod \u5BF9\u8C61\n * @param value \u5F85\u68C0\u67E5\u7684\u503C\n * @returns \u662F\u5426\u4E3A\u6709\u6548\u7684 ChanceMethod\n */\nexport function isChanceMethod(value: unknown): value is ChanceMethod {\n return (\n typeof value === 'object' &&\n value !== null &&\n 'methodKey' in value &&\n 'type' in value &&\n 'title' in value &&\n 'description' in value &&\n 'onClick' in value &&\n typeof (value as ChanceMethod).methodKey === 'string' &&\n typeof (value as ChanceMethod).type === 'string' &&\n typeof (value as ChanceMethod).title === 'string' &&\n typeof (value as ChanceMethod).description === 'string' &&\n typeof (value as ChanceMethod).onClick === 'function'\n )\n}\n\n/**\n * \u68C0\u67E5\u662F\u5426\u4E3A\u6709\u6548\u7684 WinningInfo \u5BF9\u8C61\n * @param value \u5F85\u68C0\u67E5\u7684\u503C\n * @returns \u662F\u5426\u4E3A\u6709\u6548\u7684 WinningInfo\n */\nexport function isWinningInfo(value: unknown): value is WinningInfo {\n return (\n typeof value === 'object' &&\n value !== null &&\n 'winningKey' in value &&\n 'userName' in value &&\n 'prizeName' in value &&\n typeof (value as WinningInfo).winningKey === 'string' &&\n typeof (value as WinningInfo).userName === 'string' &&\n typeof (value as WinningInfo).prizeName === 'string'\n )\n}\n\n// ============================================================================\n// \u5BFC\u51FA\u7C7B\u578B\u522B\u540D\uFF08\u7528\u4E8E\u7B80\u5316\u4F7F\u7528\uFF09\n// ============================================================================\n\n/**\n * \u62BD\u5956\u56DE\u8C03\u51FD\u6570\u7C7B\u578B\n */\nexport type OnSpinEndCallback = (prize: Prize) => void\n\n/**\n * \u83B7\u53D6\u673A\u4F1A\u70B9\u51FB\u56DE\u8C03\u51FD\u6570\u7C7B\u578B\n */\nexport type OnChanceMethodClick = () => void\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["DEFAULT_POINTER_IMAGE", "DEFAULT_POINTER_DISABLE_IMAGE", "DEFAULT_WHEEL_BG_6_PRIZES", "DEFAULT_WHEEL_BG_8_PRIZES", "
|
|
4
|
+
"sourcesContent": ["/**\n * \u5927\u8F6C\u76D8\u62BD\u5956\u7EC4\u4EF6\uFF08WheelLottery\uFF09\u7C7B\u578B\u5B9A\u4E49 - \u8F6C\u76D8\u4E13\u7528\u7C7B\u578B\n *\n * \u5171\u4EAB\u7C7B\u578B\u5DF2\u63D0\u53D6\u5230 LotteryShared/types.ts\uFF0C\u6B64\u6587\u4EF6\u901A\u8FC7 re-export \u4FDD\u6301\u5411\u540E\u517C\u5BB9\u3002\n *\n * @module WheelLotteryTypes\n * @date 2025-12-17\n */\n\n// ============================================================================\n// Re-export \u6240\u6709\u5171\u4EAB\u7C7B\u578B\uFF08\u5411\u540E\u517C\u5BB9\uFF09\n// ============================================================================\n\nexport * from '../LotteryShared/types.js'\n\n// ============================================================================\n// \u8F6C\u76D8\u4E13\u7528 import\n// ============================================================================\n\nimport type {\n Prize,\n WinnerModalConfig,\n ShareModalConfig,\n EasingFunction,\n ChanceMethod,\n WinningInfo,\n RulesModalConfig,\n MyRewardsModalConfig,\n ErrorModalConfig,\n UserData,\n ChanceMechanismType,\n ChanceInputConfig,\n} from '../LotteryShared/types.js'\n\nimport type { Theme } from '../../types/props.js'\n\n// ============================================================================\n// Imperative Handle \u63A5\u53E3\n// ============================================================================\n\n/**\n * WheelLottery \u7EC4\u4EF6\u547D\u4EE4\u5F0F\u63A7\u5236\u63A5\u53E3\n *\n * \u901A\u8FC7 ref \u66B4\u9732\u7ED9\u7236\u7EC4\u4EF6\uFF0C\u7528\u4E8E\u5916\u90E8\u63A7\u5236\u5F39\u7A97\u7B49\u72B6\u6001\n *\n * @example\n * ```tsx\n * const lotteryRef = useRef<WheelLotteryHandle>(null)\n *\n * <WheelLottery ref={lotteryRef} prizes={prizes} />\n *\n * // \u5916\u90E8\u89E6\u53D1\u9519\u8BEF\u5F39\u7A97\n * lotteryRef.current?.showError({\n * title: 'Network Error',\n * message: 'Failed to connect to server',\n * confirmText: 'Retry'\n * })\n *\n * // \u663E\u793A\u89C4\u5219\u5F39\u7A97\n * lotteryRef.current?.showRules()\n *\n * // \u5173\u95ED\u6240\u6709\u5F39\u7A97\n * lotteryRef.current?.hideAllModals()\n * ```\n */\nexport interface WheelLotteryHandle {\n /**\n * \u663E\u793A\u9519\u8BEF\u5F39\u7A97\n * @param config \u9519\u8BEF\u5F39\u7A97\u914D\u7F6E\n */\n showError: (config: {\n /** \u9519\u8BEF\u4FE1\u606F */\n message: string\n /** \u6807\u9898\uFF08\u53EF\u9009\uFF09 */\n title?: string\n /** \u786E\u8BA4\u6309\u94AE\u6587\u672C\uFF08\u53EF\u9009\uFF09 */\n confirmText?: string\n }) => void\n\n /**\n * \u9690\u85CF\u9519\u8BEF\u5F39\u7A97\n */\n hideError: () => void\n\n /**\n * \u663E\u793A\u672A\u4E2D\u5956\u5F39\u7A97\uFF08\u4F7F\u7528 ErrorModal\uFF09\n * @param config \u672A\u4E2D\u5956\u5F39\u7A97\u914D\u7F6E\n */\n showNoWin: (config?: {\n /** \u6807\u9898\uFF08\u53EF\u9009\uFF09 */\n title?: string\n /** \u63D0\u793A\u4FE1\u606F\uFF08\u53EF\u9009\uFF09 */\n message?: string\n /** \u786E\u8BA4\u6309\u94AE\u6587\u672C\uFF08\u53EF\u9009\uFF09 */\n confirmText?: string\n }) => void\n\n /**\n * \u9690\u85CF\u672A\u4E2D\u5956\u5F39\u7A97\n */\n hideNoWin: () => void\n\n /**\n * \u663E\u793A\u4E2D\u5956\u5F39\u7A97\n * @param prize \u4E2D\u5956\u5956\u54C1\n * @param config \u4E2D\u5956\u5F39\u7A97\u914D\u7F6E\uFF08\u53EF\u9009\uFF09\n */\n showWinner: (prize: Prize, config?: Partial<WinnerModalConfig>) => void\n\n /**\n * \u9690\u85CF\u4E2D\u5956\u5F39\u7A97\n */\n hideWinner: () => void\n\n /**\n * \u663E\u793A\u89C4\u5219\u5F39\u7A97\n */\n showRules: () => void\n\n /**\n * \u9690\u85CF\u89C4\u5219\u5F39\u7A97\n */\n hideRules: () => void\n\n /**\n * \u663E\u793A\u6211\u7684\u5956\u52B1\u5F39\u7A97\n */\n showRewards: () => void\n\n /**\n * \u9690\u85CF\u6211\u7684\u5956\u52B1\u5F39\u7A97\n */\n hideRewards: () => void\n\n /**\n * \u663E\u793A\u5206\u4EAB\u5F39\u7A97\n * @param config \u5206\u4EAB\u5F39\u7A97\u914D\u7F6E\uFF08\u53EF\u9009\uFF09\n */\n showShare: (config?: Partial<ShareModalConfig>) => void\n\n /**\n * \u9690\u85CF\u5206\u4EAB\u5F39\u7A97\n */\n hideShare: () => void\n\n /**\n * \u5173\u95ED\u6240\u6709\u5F39\u7A97\n */\n hideAllModals: () => void\n}\n\n// ============================================================================\n// \u9ED8\u8BA4\u56FE\u7247\u7D20\u6750\u5E38\u91CF\n// ============================================================================\n\n/**\n * \u9ED8\u8BA4\u8F6C\u76D8\u6307\u9488\u56FE\u7247 URL\n */\nexport const DEFAULT_POINTER_IMAGE =\n 'https://cdn.shopify.com/s/files/1/0517/2199/4432/files/2790697ba78c1a85d953787a8be9b258.png?v=1766371471'\n\nexport const DEFAULT_POINTER_DISABLE_IMAGE =\n 'https://cdn.shopify.com/s/files/1/0582/4669/3040/files/2790697ba78c1a85d953787a8be9b258.png?v=1767610632'\n\n/**\n * \u9ED8\u8BA4\u8F6C\u76D8\u5E95\u56FE\uFF086 \u4E2A\u5956\u54C1\uFF09\n */\nexport const DEFAULT_WHEEL_BG_6_PRIZES =\n 'https://cdn.shopify.com/s/files/1/0517/2199/4432/files/be866c03-4d29-4d59-a8d4-39f5d64bbc0e_ae_e_6.png?v=1766374361'\n\n/**\n * \u9ED8\u8BA4\u8F6C\u76D8\u5E95\u56FE\uFF088 \u4E2A\u5956\u54C1\uFF09\n */\nexport const DEFAULT_WHEEL_BG_8_PRIZES =\n 'https://cdn.shopify.com/s/files/1/0517/2199/4432/files/ad63174a-3da0-4dcd-ac61-c83172c7893c_ae_e_8.png?v=1766374392'\n\n// ============================================================================\n// \u7EC4\u4EF6 Props \u63A5\u53E3\n// ============================================================================\n\n/**\n * WheelLottery \u7EC4\u4EF6 Props\n *\n * @example\n * ```tsx\n * <WheelLottery\n * prizes={prizes}\n * winningPrizeId=\"prize-003\"\n * spinDuration={4000}\n * easing=\"ease-out\"\n * chanceMethods={chanceMethods}\n * chanceTitle=\"Want more chances to win?\"\n * winningInfos={winningInfos}\n * onSpinStart={() => console.log('Spin started')}\n * onSpinEnd={(prize) => alert(`You won ${prize.name}`)}\n * />\n * ```\n */\nexport interface WheelLotteryProps {\n // ========== \u5FC5\u9700 Props ==========\n\n /**\n * 8 \u4E2A\u5956\u54C1\u6570\u7EC4\uFF08\u5FC5\u9700\uFF09\n * @minLength 8\n * @maxLength 8\n * @validation \u5982\u679C\u957F\u5EA6\u4E0D\u7B49\u4E8E 8\uFF0C\u5E94\u5728\u5F00\u53D1\u73AF\u5883\u4E0B\u8F93\u51FA\u8B66\u544A\n */\n prizes: Prize[]\n\n // ========== \u8F6C\u76D8\u914D\u7F6E Props\uFF08\u53EF\u9009\uFF09 ==========\n\n /**\n * \u4E3B\u9898\u8272\n */\n theme?: Theme\n\n /**\n * \u6307\u5B9A\u4E2D\u5956\u5956\u54C1\u7684 ID\uFF0C\u7528\u4E8E\u6D4B\u8BD5\u6216\u670D\u52A1\u7AEF\u51B3\u5B9A\u7ED3\u679C\n * @note \u5FC5\u987B\u662F prizes \u6570\u7EC4\u4E2D\u67D0\u4E2A Prize \u7684 id\n * @optional\n */\n winningPrizeId?: string\n\n /**\n * \u65CB\u8F6C\u65F6\u957F\uFF08\u6BEB\u79D2\uFF09\n * @default 4000\n * @range 3000-5000\n * @optional\n */\n spinDuration?: number\n\n /**\n * \u7F13\u52A8\u51FD\u6570\n * @default \"ease-out\"\n * @optional\n */\n easing?: EasingFunction\n\n /**\n * \u8F6C\u76D8\u5E95\u56FE URL\uFF08\u652F\u6301 6 \u4E2A\u6216 8 \u4E2A\u5956\u54C1\u7684\u80CC\u666F\u56FE\uFF09\n * @default \u6839\u636E prizes.length \u81EA\u52A8\u9009\u62E9 6 \u6216 8 \u5956\u54C1\u5E95\u56FE\n * @optional\n */\n wheelBackgroundImage?: string\n\n /**\n * \u8F6C\u76D8\u6307\u9488\u56FE\u7247 URL\n * @default \u9ED8\u8BA4\u6307\u9488\u56FE\u7247\n * @optional\n */\n pointerImage?: string\n\n // ========== \u83B7\u53D6\u673A\u4F1A\u533A\u57DF Props\uFF08\u53EF\u9009\uFF09 ==========\n\n /**\n * \u83B7\u53D6\u673A\u4F1A\u65B9\u5F0F\u6570\u7EC4\n * @default DEFAULT_CHANCE_METHODS\uFF083\u79CD\u9ED8\u8BA4\u65B9\u5F0F\uFF1A\u5206\u4EAB\u3001\u79EF\u5206\u3001\u63A8\u8350\uFF09\n * @note \u5F53\u6570\u7EC4\u4E3A\u7A7A\u65F6\uFF0C\u9690\u85CF\u6574\u4E2A\"\u83B7\u53D6\u673A\u4F1A\"\u533A\u57DF\n * @optional\n */\n chanceMethods?: ChanceMethod[]\n\n /**\n * \u83B7\u53D6\u673A\u4F1A\u533A\u57DF\u673A\u5236\u7C7B\u578B\n * @default \"methods\"\n * @optional\n */\n mechanismType?: ChanceMechanismType\n\n /**\n * \u8F93\u5165\u6846\u914D\u7F6E\uFF08\u5F53 mechanismType \u4E3A 'input' \u65F6\u4F7F\u7528\uFF09\n * @optional\n */\n inputConfig?: ChanceInputConfig\n\n /**\n * \u83B7\u53D6\u673A\u4F1A\u533A\u57DF\u6807\u9898\n * @default \"Want more chances to win?\"\n * @optional\n */\n chanceTitle?: string\n\n /**\n * \u83B7\u53D6\u673A\u4F1A\u533A\u57DF\u526F\u6807\u9898\n * @optional\n */\n chanceSubtitle?: string\n\n /**\n * \u83B7\u53D6\u673A\u4F1A\u533A\u57DF\u5E95\u90E8\u63D0\u793A\n * @optional\n */\n chanceFooterNote?: string\n\n /**\n * \u83B7\u53D6\u673A\u4F1A\u65B9\u5F0F\u6587\u6848\u914D\u7F6E\n * @optional\n */\n chanceMethodsText?: {\n chanceBadgeText?: string\n completedText?: string\n usedText?: string\n loadingText?: string\n }\n\n // ========== \u4E2D\u5956\u4FE1\u606F Props\uFF08\u53EF\u9009\uFF09 ==========\n\n /**\n * \u4E2D\u5956\u4FE1\u606F\u6570\u7EC4\uFF0C\u7528\u4E8E\u5E95\u90E8\u6EDA\u52A8\u6761\u5C55\u793A\n * @default []\n * @note \u5F53\u6570\u7EC4\u4E3A\u7A7A\u65F6\uFF0C\u9690\u85CF\u5E95\u90E8\u6EDA\u52A8\u6761\u6216\u663E\u793A\u9ED8\u8BA4\u63D0\u793A\n * @optional\n */\n winningInfos?: WinningInfo[]\n\n /**\n * \u5956\u54C1\u6C60\u5C55\u793A\u533A\u57DF\u6807\u9898\n * @default \"Prize Pool\"\n * @optional\n */\n prizesTitle?: string\n\n // ========== \u56DE\u8C03\u51FD\u6570 Props\uFF08\u53EF\u9009\uFF09 ==========\n\n /**\n * \u62BD\u5956\u5F00\u59CB\u65F6\u7684\u56DE\u8C03\uFF0C\u8FD4\u56DE Promise \u4EE5\u652F\u6301\u5F02\u6B65\u63A5\u53E3\u8C03\u7528\n * @returns Promise<string> - \u4E2D\u5956\u5956\u54C1\u7684 ID\uFF0C\u5982\u679C\u63A5\u53E3\u5931\u8D25\u5219 reject\n * @optional\n * @example\n * ```tsx\n * onSpinStart={async () => {\n * const result = await fetch('/api/lottery')\n * const data = await result.json()\n * return data.prizeId // \u8FD4\u56DE\u4E2D\u5956\u5956\u54C1 ID\n * }}\n * ```\n */\n onSpinStart?: () => Promise<string>\n\n /**\n * \u62BD\u5956\u7ED3\u675F\u65F6\u7684\u56DE\u8C03\uFF0C\u4F20\u9012\u4E2D\u5956\u5956\u54C1\n * @param prize \u4E2D\u5956\u5956\u54C1\u5BF9\u8C61\n * @optional\n */\n onSpinEnd?: (prize: Prize) => void\n\n /**\n * \u62BD\u5956\u9519\u8BEF\u65F6\u7684\u56DE\u8C03\n * @param error \u9519\u8BEF\u4FE1\u606F\n * @optional\n */\n onSpinError?: (error: Error) => void\n\n // ========== \u4E2D\u5956\u5F39\u7A97\u914D\u7F6E Props\uFF08\u53EF\u9009\uFF09 ==========\n\n /**\n * \u4E2D\u5956\u5F39\u7A97\u914D\u7F6E\u5BF9\u8C61\uFF0C\u901A\u5E38\u7531\u62BD\u5956\u63A5\u53E3\u8FD4\u56DE\u63D0\u4F9B\n * @optional\n * @example\n * ```tsx\n * winnerModalConfig={{\n * title: 'Congratulations!',\n * prizeTitle: 'Anker Prime Charger',\n * prizeImage: 'https://...',\n * prizeDescription: 'High-speed charging',\n * learnMoreUrl: 'https://...',\n * couponCode: 'ANKER2024',\n * expiresAt: '2024-12-31',\n * couponDiscount: '20%',\n * confirmText: 'Claim Now'\n * }}\n * ```\n */\n winnerModalConfig?: WinnerModalConfig\n\n rulesModalConfig?: RulesModalConfig\n\n myRewardsModalConfig?: MyRewardsModalConfig\n\n errorModalConfig?: ErrorModalConfig\n\n /**\n * \u5206\u4EAB\u5F39\u7A97\u914D\u7F6E\n * @optional\n */\n shareModalConfig?: ShareModalConfig\n\n /**\n * \u672A\u767B\u5F55\u65F6\u70B9\u51FB GO \u6309\u94AE\u7684\u56DE\u8C03\n * @example\n * ```tsx\n * onLoginRequired={() => {\n * // \u6253\u5F00\u767B\u5F55\u5F39\u7A97\u6216\u8DF3\u8F6C\u767B\u5F55\u9875\n * router.push('/login')\n * }}\n * ```\n */\n onLoginRequired?: () => void\n\n // ========== \u7528\u6237\u76F8\u5173 Props\uFF08\u53EF\u9009\uFF09 ==========\n\n /**\n * \u7528\u6237\u6570\u636E\n * @optional\n * @example\n * ```tsx\n * userData={{\n * isLoggedIn: true,\n * availableChances: 3,\n * wonPrizes: [{ id: 'prize-001', name: 'Charger', image: 'https://...' }]\n * }}\n * ```\n */\n userData?: UserData\n\n /**\n * \u672A\u767B\u5F55\u65F6\u7684\u63D0\u793A\u6587\u6848\n * @default \"Please log in to participate\"\n * @optional\n */\n loginPromptText?: string\n\n /**\n * \u767B\u5F55\u6309\u94AE\u6587\u6848\n * @default \"Log In\"\n * @optional\n */\n loginButtonText?: string\n\n /**\n * \u6B21\u6570\u4E0D\u8DB3\u65F6\u7684\u63D0\u793A\u6587\u6848\n * @default \"You have no chances left\"\n * @optional\n */\n noChancesText?: string\n\n // ========== \u5F39\u7A97\u76F8\u5173 Props\uFF08\u53EF\u9009\uFF09 ==========\n\n /**\n * \u590D\u5236\u4F18\u60E0\u7801\u56DE\u8C03\n * @optional\n */\n onCopyCode?: (code: string) => void\n\n /**\n * Rules \u6309\u94AE\u6587\u672C\n * @default \"Rules\"\n * @optional\n */\n rulesText?: string\n\n /**\n * Opportunities \u6587\u672C\u6570\u7EC4\n * @default [\"Accumulate\", \"lottery opportunities\"]\n * @optional\n */\n opportunitiesText?: string[]\n\n /**\n * My Rewards \u6309\u94AE\u6587\u672C\n * @default \"My Rewards\"\n * @optional\n */\n myRewardsText?: string\n\n /**\n * \u672A\u4E2D\u5956\u5F39\u7A97\u6807\u9898\n * @default \"Sorry, You Didn't Win This Time\"\n * @optional\n */\n noWinTitle?: string\n\n /**\n * \u672A\u4E2D\u5956\u5F39\u7A97\u526F\u6807\u9898\n * @default \"Keep Trying, You Could Still Win Big!\"\n * @optional\n */\n noWinSubtitle?: string\n\n // ========== My Rewards \u5F39\u7A97\u6587\u6848\u914D\u7F6E\uFF08\u53EF\u9009\uFF09 ==========\n\n /**\n * My Rewards \u5F39\u7A97\u65E0\u5956\u52B1\u65F6\u7684\u63D0\u793A\u6587\u672C\n * @default \"No rewards yet\"\n * @optional\n */\n rewardsEmptyText?: string\n\n /**\n * My Rewards \u5F39\u7A97 CODE \u6807\u7B7E\u6587\u672C\n * @default \"CODE:\"\n * @optional\n */\n rewardsCodeLabel?: string\n\n /**\n * My Rewards \u5F39\u7A97\u590D\u5236\u6309\u94AE\u6587\u672C\n * @default \"Copy\"\n * @optional\n */\n rewardsCopyButtonText?: string\n\n /**\n * My Rewards \u5F39\u7A97\u5956\u52B1\u65F6\u95F4\u6807\u7B7E\u6587\u672C\n * @default \"Prize time:\"\n * @optional\n */\n rewardsPrizeTimeLabel?: string\n\n // ========== BaseModal \u914D\u7F6E\uFF08\u53EF\u9009\uFF09 ==========\n\n /**\n * \u5F39\u7A97\u5173\u95ED\u6309\u94AE\u7684 aria-label\n * @default \"\u5173\u95ED\u5F39\u7A97\"\n * @optional\n */\n modalCloseButtonAriaLabel?: string\n\n // ========== \u6837\u5F0F\u76F8\u5173 Props\uFF08\u53EF\u9009\uFF09 ==========\n\n /**\n * \u81EA\u5B9A\u4E49 CSS \u7C7B\u540D\uFF0C\u7528\u4E8E\u8986\u76D6\u6216\u6269\u5C55\u9ED8\u8BA4\u6837\u5F0F\n * @optional\n */\n className?: string\n}\n\n/**\n * \u9ED8\u8BA4\u8F6C\u76D8\u914D\u7F6E\n */\n\nexport const DEFAULT_WHEEL_CONFIG = {\n spinDuration: 4000, // 4 \u79D2\n easing: 'ease-out' as EasingFunction,\n chanceTitle: 'Want more chances to win?',\n}\n\n// ============================================================================\n// \u5185\u90E8\u72B6\u6001\u7C7B\u578B\uFF08\u4EC5\u4F9B\u7EC4\u4EF6\u5185\u90E8\u4F7F\u7528\uFF09\n// ============================================================================\n\n/**\n * \u8F6C\u76D8\u8FD0\u884C\u65F6\u72B6\u6001\uFF08\u7EC4\u4EF6\u5185\u90E8\u4F7F\u7528\uFF09\n * @internal\n */\nexport interface WheelState {\n /**\n * \u8F6C\u76D8\u662F\u5426\u6B63\u5728\u65CB\u8F6C\n */\n isSpinning: boolean\n\n /**\n * \u5F53\u524D\u65CB\u8F6C\u89D2\u5EA6\uFF08\u5EA6\u6570\uFF09\n */\n currentRotation: number\n\n /**\n * \u4E2D\u5956\u5956\u54C1\uFF0C\u62BD\u5956\u7ED3\u675F\u540E\u8BBE\u7F6E\n */\n winningPrize: Prize | null\n\n /**\n * GO \u6309\u94AE\u662F\u5426\u7981\u7528\n */\n isButtonDisabled: boolean\n\n /**\n * \u662F\u5426\u5DF2\u5B8C\u6210\u62BD\u5956\uFF08\u7528\u4E8E\u63A7\u5236\u8F6C\u76D8\u662F\u5426\u663E\u793A\u521D\u59CB\u65CB\u8F6C\u52A8\u753B\uFF09\n */\n isFinished: boolean\n}\n\n/**\n * \u521D\u59CB\u8F6C\u76D8\u72B6\u6001\n * @internal\n */\nexport const INITIAL_WHEEL_STATE: WheelState = {\n isSpinning: false,\n currentRotation: 0,\n winningPrize: null,\n isButtonDisabled: false,\n isFinished: false,\n}\n\n// ============================================================================\n// \u8F6C\u76D8\u5B50\u7EC4\u4EF6 Props \u7C7B\u578B\n// ============================================================================\n\n/**\n * Wheel \u8F6C\u76D8\u7EC4\u4EF6 Props\n */\nexport interface WheelProps {\n /**\n * \u4E3B\u9898\u6A21\u5F0F\n * @optional\n */\n theme?: Theme\n\n /**\n * 8 \u4E2A\u5956\u54C1\u6570\u7EC4\n */\n prizes: Prize[]\n\n /**\n * \u5F53\u524D\u65CB\u8F6C\u89D2\u5EA6(\u5EA6\u6570)\n */\n rotation: number\n\n /**\n * \u662F\u5426\u6B63\u5728\u65CB\u8F6C\n */\n isSpinning: boolean\n\n /**\n * \u662F\u5426\u5DF2\u5B8C\u6210\u62BD\u5956\uFF08\u7528\u4E8E\u63A7\u5236\u8F6C\u76D8\u662F\u5426\u663E\u793A\u521D\u59CB\u65CB\u8F6C\u52A8\u753B\uFF09\n */\n isFinished?: boolean\n\n /**\n * GO \u6309\u94AE\u662F\u5426\u7981\u7528\n */\n isButtonDisabled: boolean\n\n /**\n * GO \u6309\u94AE\u70B9\u51FB\u56DE\u8C03\n */\n onGoClick: () => void\n\n /**\n * \u8F6C\u76D8\u5E95\u56FE URL\uFF08\u53EF\u9009\uFF09\n */\n wheelBackgroundImage?: string\n\n /**\n * \u8F6C\u76D8\u6307\u9488\u56FE\u7247 URL\uFF08\u53EF\u9009\uFF09\n */\n pointerImage?: string\n\n /**\n * \u767B\u5F55\u7528\u6237\u6570\u636E\uFF08\u53EF\u9009\uFF09\n * @optional\n */\n userData?: UserData\n\n /**\n * \u6253\u5F00\u5206\u4EAB\u5F39\u7A97\u56DE\u8C03\uFF08\u53EF\u9009\uFF09\n * @optional\n */\n onOpenShareModal?: () => void\n\n /**\n * \u81EA\u5B9A\u4E49\u7C7B\u540D\n */\n className?: string\n}\n\n// ============================================================================\n// \u5DE5\u5177\u7C7B\u578B\n// ============================================================================\n\n/**\n * \u9A8C\u8BC1\u7ED3\u679C\n */\nexport interface ValidationResult {\n valid: boolean\n error?: string\n}\n\n/**\n * \u5956\u54C1\u9A8C\u8BC1\u9009\u9879\n */\nexport interface ValidatePrizesOptions {\n /**\n * \u662F\u5426\u5141\u8BB8\u7F3A\u5C11 rank \u5B57\u6BB5\n * @default true\n */\n allowMissingRank?: boolean\n\n /**\n * \u662F\u5426\u5141\u8BB8\u7F3A\u5C11 price \u5B57\u6BB5\n * @default true\n */\n allowMissingPrice?: boolean\n}\n"],
|
|
5
|
+
"mappings": "AAaA,WAAc,4BAiJP,MAAMA,EACX,2GAEWC,EACX,2GAKWC,EACX,sHAKWC,EACX,sHAqWWC,EAAuB,CAClC,aAAc,IACd,OAAQ,WACR,YAAa,2BACf,EAyCaC,EAAkC,CAC7C,WAAY,GACZ,gBAAiB,EACjB,aAAc,KACd,iBAAkB,GAClB,WAAY,EACd",
|
|
6
|
+
"names": ["DEFAULT_POINTER_IMAGE", "DEFAULT_POINTER_DISABLE_IMAGE", "DEFAULT_WHEEL_BG_6_PRIZES", "DEFAULT_WHEEL_BG_8_PRIZES", "DEFAULT_WHEEL_CONFIG", "INITIAL_WHEEL_STATE"]
|
|
7
7
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { WhyChooseProps, WhyChooseItem as ItemType } from './types.js';
|
|
2
3
|
declare const WhyChooseItem: {
|
|
3
4
|
({ data }: {
|
|
4
5
|
data: ItemType;
|
|
5
6
|
}): import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
displayName: string;
|
|
7
8
|
};
|
|
8
|
-
declare const _default:
|
|
9
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<WhyChooseProps & React.RefAttributes<HTMLDivElement>, "container" | keyof import("../../shared/Styles.js").StylesProps> & import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
10
|
export default _default;
|
|
10
11
|
export { WhyChooseItem };
|
|
@@ -75,6 +75,8 @@ export type { BrandCardLinkProps, BrandCardLinkItemProps } from './BrandCardLink
|
|
|
75
75
|
export * as IPRedirect from './IPRedirect/index.js';
|
|
76
76
|
export { default as WheelLottery } from './WheelLottery/index.js';
|
|
77
77
|
export type { WheelLotteryProps, WheelLotteryHandle, Prize, ChanceMethod, WinningInfo, UserData, } from './WheelLottery/types.js';
|
|
78
|
+
export { default as ProductLottery } from './ProductLottery/index.js';
|
|
79
|
+
export type { ProductLotteryProps, ProductLotteryHandle, MediaConfig, CtaButtonConfig } from './ProductLottery/types.js';
|
|
78
80
|
export { default as ProductCompare } from './ProductCompare/index.js';
|
|
79
81
|
export type { ProductCompareProps, ProductItemData } from './ProductCompare/index.js';
|
|
80
82
|
export { default as Ksp } from './Ksp/index.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{default as
|
|
1
|
+
import{default as o}from"./ActivitySchedule/index.js";import{default as i}from"./GiftShelf/index.js";import{default as s}from"./GiftTierShelf/index.js";import{default as d}from"./ActivityMechanism/index.js";import{default as u}from"./BrandEquity/index.js";import{default as n}from"./MemberEquity/index.js";import{default as x}from"./Slogan/index.js";import{default as y}from"./Title/index.js";import{default as S}from"./Spacer/index.js";import{default as g}from"./ShelfDisplay/index.js";import{default as B}from"./Evaluate/index.js";import{default as T}from"./Category/index.js";import{default as F}from"./HeroBanner/index.js";import{default as G}from"./AccordionCards/index.js";import{default as D}from"./Graphic/index.js";import{default as k}from"./MediaPlayerBase/index.js";import{default as L}from"./MediaPlayerSticky/index.js";import{default as E}from"./MediaPlayerMulti/index.js";import{default as N}from"./Marquee/index.js";import{default as R}from"./MarqueeReview/index.js";import{default as V}from"./WhyChoose/index.js";import{default as _}from"./Faq/index.js";import{MarqueeItem as U,MarqueeImageContent as Y,MarqueeTextContent as J}from"./Marquee/index.js";import{default as X}from"./MultiLayoutGraphicBlock/index.js";import{default as $}from"./GraphicAttractionBlock/index.js";import{default as te}from"./HeaderNavigation/index.js";import{default as oe}from"./FooterNavigation/index.js";import{default as ie}from"./SearchPage/index.js";import{IPC_SEARCH_PAGE as se,SearchPageTabType as fe}from"./SearchPage/types.js";import{withLayout as ce}from"../shared/Styles.js";import{default as le}from"./AiuiProvider/index.js";import{default as me}from"./Tabs/index.js";import{default as he}from"./CreativeModule/index.js";import{default as Pe}from"./GraphicOverlay/index.js";import{default as Ce}from"./Specs/index.js";import{default as Me}from"./TabsGroup/index.js";import{default as ve}from"./Listing/BizProductProvider.js";import{default as Ie}from"./Listing/components/PurchaseBar/index.js";import{default as je}from"./Listing/components/PurchaseBar/ProductActions/index.js";import{default as Ae}from"./Listing/components/ProductCard/index.js";import{default as be}from"./Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js";import{default as we}from"./Listing/components/ProductCard/ProductDetail/ProductBenefits/index.js";import{default as qe}from"./Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js";import{default as We}from"./Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js";import{default as Oe}from"./Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js";import{default as He}from"./Listing/components/ProductCard/ProductDetail/ProductOptions/index.js";import{default as Ke}from"./Listing/components/ProductCard/ProductDetail/ProductBundle/index.js";import{default as ze}from"./Listing/components/ProductCard/ProductDetail/ProductCoupon/index.js";import{default as Ye}from"./Listing/components/ProductCard/ProductDetail/ProductBanner/index.js";import{default as Qe}from"./Listing/components/ProductCard/ProductGridBox.js";import{default as Ze}from"./Listing/components/ProductCard/ProductGallery/index.js";import{default as et}from"./Listing/components/ProductCard/ProductDetail/index.js";import{default as rt}from"./Listing/components/ProductCard/ProductSummary/index.js";import{default as at}from"./Listing/components/ProductCard/ProductDetail/BenefitsTab.js";import{default as pt}from"./Listing/components/PaidShipping/index.js";import{default as ft}from"./Listing/components/ProductCard/ProductPaidShipping/index.js";import{default as ct}from"./GraphicMore/index.js";import{default as lt}from"./Features/index.js";import{default as mt}from"./AplusDesc/index.js";import{default as ht}from"./GiftBox/index.js";import{default as Pt}from"./SelectStore/index.js";import{default as Ct}from"./DownLoad/index.js";import{default as Mt}from"./FootCharger/index.js";import{default as vt}from"./BrandCardLink/index.js";import*as Tt from"./IPRedirect/index.js";import{default as Ft}from"./WheelLottery/index.js";import{default as Gt}from"./ProductLottery/index.js";import{default as Dt}from"./ProductCompare/index.js";import{default as kt}from"./Ksp/index.js";import{default as Lt}from"./ImageTextFeature/index.js";import{default as Et}from"./FeatureCards/index.js";import{default as Nt}from"./FeaturedBlogPosts/index.js";import{default as Rt}from"./ImageWithText/index.js";import{default as Vt}from"./VideoFeature/index.js";import{default as _t}from"./TabsWithMedia/index.js";import{default as Ut}from"./TabWithImage/index.js";import{default as Jt}from"./FeatureShowcase/index.js";import{default as Xt}from"./ProductHero/index.js";import{default as $t}from"./SpecsComparison/index.js";import{default as tr}from"./MediaSceneSwitcher/index.js";import{default as or}from"./MediaSceneSwitcherV2/index.js";import{default as ir}from"./ThreeDCarousel/index.js";import{default as sr}from"./ProductNav/index.js";import{default as dr}from"./AnchorNavigation/index.js";import{default as ur}from"./PromotionalBar/index.js";import{default as nr}from"./EventSchedule/index.js";import{default as xr}from"./SecondaryBanner/index.js";import{default as yr}from"./BuyOneGetOneShelf/index.js";import{default as Sr}from"./ActiveShelf/index.js";import{default as gr}from"./MediaShelf/index.js";import{default as Br,CreditsProductCard as vr}from"./CreditsShelf/index.js";import{default as Ir,SceneProductCard as Fr}from"./SceneShelf/index.js";import{default as Gr}from"./MediaEndorsement/index.js";import{default as Dr}from"./ImageOverlayShelf/index.js";import{default as kr}from"./MiniCart/index.js";import{default as Lr}from"./MiniCart/CircleProgress.js";import{default as Er,MiniCartDialog as Wr}from"./MiniCart/MiniCartDialog.js";const e={"ipc-accordioncards":"AccordionCards","ipc-aplusdesc":"AplusDesc","ipc-banner":"HeroBanner","ipc-brand-equity":"BrandEquity","ipc-category":"Category","ipc-collection-banner":"CollectionBanner","ipc-collection-shelves":"CollectionShelves","ipc-creativemodule":"CreativeModule","ipc-download":"DownLoad","ipc-evaluate":"Evaluate","ipc-faq":"Faq","ipc-features":"Features","ipc-footcharger":"FootCharger","ipc-ga-block":"GraphicAttractionBlock","ipc-giftbox":"GiftBox","ipc-giftshelf":"GiftShelf","ipc-graphic":"Graphic","ipc-graphicmore":"GraphicMore","ipc-graphicoverlay":"GraphicOverlay","ipc-marquee":"Marquee","ipc-mediaplayerbase":"MediaPlayerBase","ipc-mediaplayermulti":"MediaPlayerMulti","ipc-mediaplayersticky":"MediaPlayerSticky","ipc-member-equity":"MemberEquity","ipc-mlg-block":"MultiLayoutGraphicBlock","ipc-search-page-tabs":"SearchPageBlock","ipc-selectstore":"SelectStore","ipc-shelfdisplay":"ShelfDisplay","ipc-slogan":"Slogan","ipc-spacer":"Spacer","ipc-specs":"Specs","ipc-tabs":"TabsBlock","ipc-text-marquee":"TextMarquee","ipc-title":"Title","ipc-whychoose":"WhyChoose","ipc-product-nav":"ProductNav","ipc-brand-card-link":"BrandCardLink","ipc-ipredirect":"IPRedirect",ksp:"Ksp","ipc-secondary-banner":"SecondaryBanner","ipc-active-shelf":"ActiveShelf","ipc-media-shelf":"MediaShelf","ipc-bogo-shelf":"BuyOneGetOneShelf","ipc-media-endorsement":"MediaEndorsement","ipc-media-scene-switcher-v2":"MediaSceneSwitcherV2","ipc-featured-blog-posts":"FeaturedBlogPosts"};export{G as AccordionCards,Sr as ActiveShelf,d as ActivityMechanism,o as ActivitySchedule,le as AiuiProvider,dr as AnchorNavigation,mt as AplusDesc,at as BenefitsTab,ve as BizProductProvider,vt as BrandCardLink,u as BrandEquity,yr as BuyOneGetOneShelf,T as Category,he as CreativeModule,vr as CreditsProductCard,Br as CreditsShelf,Ct as DownLoad,B as Evaluate,nr as EventSchedule,_ as Faq,Et as FeatureCards,Jt as FeatureShowcase,Nt as FeaturedBlogPosts,lt as Features,Mt as FootCharger,oe as FooterNavigation,ht as GiftBox,i as GiftShelf,s as GiftTierShelf,D as Graphic,$ as GraphicAttractionBlock,ct as GraphicMore,Pe as GraphicOverlay,te as HeaderNavigation,F as HeroBanner,se as IPC_SEARCH_PAGE,Tt as IPRedirect,Dr as ImageOverlayShelf,Lt as ImageTextFeature,Rt as ImageWithText,kt as Ksp,N as Marquee,Y as MarqueeImageContent,U as MarqueeItem,R as MarqueeReview,J as MarqueeTextContent,Gr as MediaEndorsement,k as MediaPlayerBase,E as MediaPlayerMulti,L as MediaPlayerSticky,tr as MediaSceneSwitcher,or as MediaSceneSwitcherV2,gr as MediaShelf,n as MemberEquity,kr as MiniCart,Lr as MiniCartCircleProgress,Er as MiniCartDialog,Wr as MiniCartDialogComponent,X as MultiLayoutGraphicBlock,e as PAYLOAD_COMPONENT_MAP,pt as PaidShipping,je as ProductActions,Ye as ProductBanner,we as ProductBenefits,be as ProductBenefitsTabs,Ke as ProductBundle,Ae as ProductCard,Dt as ProductCompare,ze as ProductCoupon,et as ProductDetail,Oe as ProductExchangePurchase,We as ProductFreeGift,Ze as ProductGallery,Qe as ProductGridBox,Xt as ProductHero,qe as ProductHighlight,Gt as ProductLottery,sr as ProductNav,He as ProductOptions,ft as ProductPaidShipping,rt as ProductSummary,ur as PromotionalBar,Ie as PurchaseBar,Fr as SceneProductCard,Ir as SceneShelf,ie as SearchPage,fe as SearchPageTabType,xr as SecondaryBanner,Pt as SelectStore,g as ShelfDisplay,x as Slogan,S as Spacer,Ce as Specs,$t as SpecsComparison,Me as TabGroup,Ut as TabWithImage,me as Tabs,_t as TabsWithMedia,ir as ThreeDCarousel,y as Title,Vt as VideoFeature,Ft as WheelLottery,V as WhyChoose,ce as withLayout};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/biz-components/index.ts"],
|
|
4
|
-
"sourcesContent": ["export { default as ActivitySchedule } from './ActivitySchedule/index.js'\nexport type { ActivityScheduleProps, ActivityScheduleData, ActivityScheduleItem } from './ActivitySchedule/types.js'\nexport { default as GiftShelf } from './GiftShelf/index.js'\nexport type {\n GiftShelfProps,\n GiftShelfData,\n GiftShelfItem,\n CountdownConfig,\n ResponsiveBackgroundImage as GiftShelfResponsiveBackgroundImage,\n} from './GiftShelf/types.js'\nexport { default as GiftTierShelf } from './GiftTierShelf/index.js'\nexport type { GiftTierShelfProps, GiftTierShelfData, GiftTierItem, GiftTierProduct } from './GiftTierShelf/types.js'\nexport { default as ActivityMechanism } from './ActivityMechanism/index.js'\nexport type {\n ActivityMechanismProps,\n ActivityMechanismItem,\n ActivityMechanismSemanticName,\n ResponsiveBackgroundImage,\n} from './ActivityMechanism/types.js'\nexport { default as BrandEquity } from './BrandEquity/index.js'\nexport { default as MemberEquity } from './MemberEquity/index.js'\nexport { default as Slogan } from './Slogan/index.js'\nexport { default as Title } from './Title/index.js'\nexport { default as Spacer } from './Spacer/index.js'\nexport { default as ShelfDisplay } from './ShelfDisplay/index.js'\nexport { default as Evaluate } from './Evaluate/index.js'\nexport { default as Category } from './Category/index.js'\nexport { default as HeroBanner } from './HeroBanner/index.js'\nexport { default as AccordionCards } from './AccordionCards/index.js'\nexport { default as Graphic } from './Graphic/index.js'\nexport { default as MediaPlayerBase } from './MediaPlayerBase/index.js'\nexport { default as MediaPlayerSticky } from './MediaPlayerSticky/index.js'\nexport { default as MediaPlayerMulti } from './MediaPlayerMulti/index.js'\nexport { default as Marquee } from './Marquee/index.js'\nexport { default as MarqueeReview } from './MarqueeReview/index.js'\nexport type { MarqueeReviewProps, MarqueeReviewData, ReviewItem } from './MarqueeReview/index.js'\nexport { default as WhyChoose } from './WhyChoose/index.js'\nexport { default as Faq } from './Faq/index.js'\nexport { MarqueeItem, MarqueeImageContent, MarqueeTextContent } from './Marquee/index.js'\nexport { default as MultiLayoutGraphicBlock } from './MultiLayoutGraphicBlock/index.js'\nexport type { MultiLayoutGraphicBlockProps } from './MultiLayoutGraphicBlock/index.js'\nexport { default as GraphicAttractionBlock } from './GraphicAttractionBlock/index.js'\nexport type { GraphicAttractionBlockProps } from './GraphicAttractionBlock/index.js'\nexport { default as HeaderNavigation } from './HeaderNavigation/index.js'\nexport { default as FooterNavigation } from './FooterNavigation/index.js'\nexport { default as SearchPage } from './SearchPage/index.js'\nexport type { SearchPageProps } from './SearchPage/types.js'\nexport { IPC_SEARCH_PAGE, SearchPageTabType } from './SearchPage/types.js'\n\nexport { withLayout } from '../shared/Styles.js'\nexport { default as AiuiProvider } from './AiuiProvider/index.js'\nexport { default as Tabs } from './Tabs/index.js'\nexport { default as CreativeModule } from './CreativeModule/index.js'\nexport { default as GraphicOverlay } from './GraphicOverlay/index.js'\nexport { default as Specs } from './Specs/index.js'\nexport { default as TabGroup } from './TabsGroup/index.js'\n\nexport { default as BizProductProvider } from './Listing/BizProductProvider.js'\nexport { default as PurchaseBar } from './Listing/components/PurchaseBar/index.js'\nexport { default as ProductActions } from './Listing/components/PurchaseBar/ProductActions/index.js'\nexport type { ProductActionsProps } from './Listing/components/PurchaseBar/ProductActions/index.js'\nexport { default as ProductCard } from './Listing/components/ProductCard/index.js'\nexport { default as ProductBenefitsTabs } from './Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js'\nexport { default as ProductBenefits } from './Listing/components/ProductCard/ProductDetail/ProductBenefits/index.js'\nexport { default as ProductHighlight } from './Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js'\nexport { default as ProductFreeGift } from './Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js'\nexport { default as ProductExchangePurchase } from './Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js'\nexport { default as ProductOptions } from './Listing/components/ProductCard/ProductDetail/ProductOptions/index.js'\nexport { default as ProductBundle } from './Listing/components/ProductCard/ProductDetail/ProductBundle/index.js'\nexport { default as ProductCoupon } from './Listing/components/ProductCard/ProductDetail/ProductCoupon/index.js'\nexport { default as ProductBanner } from './Listing/components/ProductCard/ProductDetail/ProductBanner/index.js'\nexport { default as ProductGridBox } from './Listing/components/ProductCard/ProductGridBox.js'\nexport { default as ProductGallery } from './Listing/components/ProductCard/ProductGallery/index.js'\nexport { default as ProductDetail } from './Listing/components/ProductCard/ProductDetail/index.js'\nexport { default as ProductSummary } from './Listing/components/ProductCard/ProductSummary/index.js'\nexport { default as BenefitsTab } from './Listing/components/ProductCard/ProductDetail/BenefitsTab.js'\nexport { default as PaidShipping } from './Listing/components/PaidShipping/index.js'\nexport { default as ProductPaidShipping } from './Listing/components/ProductCard/ProductPaidShipping/index.js'\n\nexport { default as GraphicMore } from './GraphicMore/index.js'\nexport { default as Features } from './Features/index.js'\nexport { default as AplusDesc } from './AplusDesc/index.js'\nexport { default as GiftBox } from './GiftBox/index.js'\nexport { default as SelectStore } from './SelectStore/index.js'\nexport { default as DownLoad } from './DownLoad/index.js'\nexport { default as FootCharger } from './FootCharger/index.js'\nexport { default as BrandCardLink } from './BrandCardLink/index.js'\nexport type { BrandCardLinkProps, BrandCardLinkItemProps } from './BrandCardLink/types.js'\n\nexport * as IPRedirect from './IPRedirect/index.js'\n\nexport { default as WheelLottery } from './WheelLottery/index.js'\nexport type {\n WheelLotteryProps,\n WheelLotteryHandle,\n Prize,\n ChanceMethod,\n WinningInfo,\n UserData,\n} from './WheelLottery/types.js'\nexport { default as ProductCompare } from './ProductCompare/index.js'\nexport type { ProductCompareProps, ProductItemData } from './ProductCompare/index.js'\nexport { default as Ksp } from './Ksp/index.js'\nexport type { KspProps, KspData, KspCardItem } from './Ksp/index.js'\nexport { default as ImageTextFeature } from './ImageTextFeature/index.js'\nexport type { ImageTextFeatureProps, ImageTextFeatureItem } from './ImageTextFeature/index.js'\nexport { default as FeatureCards } from './FeatureCards/index.js'\nexport type { FeatureCardsProps, FeatureCardItem } from './FeatureCards/index.js'\nexport { default as FeaturedBlogPosts } from './FeaturedBlogPosts/index.js'\nexport type {\n FeaturedBlogPostsProps,\n FeaturedBlogPostsData,\n FeaturedBlogPostItem,\n FeaturedBlogPostSpan,\n} from './FeaturedBlogPosts/index.js'\nexport { default as ImageWithText } from './ImageWithText/index.js'\nexport type { ImageWithTextProps } from './ImageWithText/index.js'\nexport { default as VideoFeature } from './VideoFeature/index.js'\nexport type { VideoFeatureProps } from './VideoFeature/index.js'\nexport { default as TabsWithMedia } from './TabsWithMedia/index.js'\nexport type { TabsWithMediaProps, TabItem, TimeIndex } from './TabsWithMedia/index.js'\nexport { default as TabWithImage } from './TabWithImage/index.js'\nexport type { TabWithImageProps, TabWithImageDataItem } from './TabWithImage/index.js'\nexport { default as FeatureShowcase } from './FeatureShowcase/index.js'\nexport type { FeatureShowcaseProps, FeatureShowcaseItem } from './FeatureShowcase/index.js'\nexport { default as ProductHero } from './ProductHero/index.js'\nexport type { ProductHeroProps } from './ProductHero/index.js'\nexport { default as SpecsComparison } from './SpecsComparison/index.js'\nexport type {\n SpecsComparisonProps,\n SpecsComparisonMenuItem,\n SpecsComparisonLeftMenuItem,\n} from './SpecsComparison/index.js'\nexport { default as MediaSceneSwitcher } from './MediaSceneSwitcher/index.js'\nexport type { MediaSceneSwitcherProps } from './MediaSceneSwitcher/types.js'\nexport { default as MediaSceneSwitcherV2 } from './MediaSceneSwitcherV2/index.js'\nexport type {\n MediaSceneSwitcherV2Props,\n MediaSceneSwitcherV2Data,\n MediaSceneSwitcherV2Item,\n MediaSceneSwitcherV2Layout,\n} from './MediaSceneSwitcherV2/index.js'\nexport { default as ThreeDCarousel } from './ThreeDCarousel/index.js'\nexport type { ThreeDCarouselProps } from './ThreeDCarousel/index.js'\nexport { default as ProductNav } from './ProductNav/index.js'\nexport type { ProductNavProps, TabLink, AnchorItem, BuyButton } from './ProductNav/index.js'\nexport { default as AnchorNavigation } from './AnchorNavigation/index.js'\nexport { default as PromotionalBar } from './PromotionalBar/index.js'\nexport { default as EventSchedule } from './EventSchedule/index.js'\nexport { default as SecondaryBanner } from './SecondaryBanner/index.js'\nexport { default as BuyOneGetOneShelf } from './BuyOneGetOneShelf/index.js'\nexport { default as ActiveShelf } from './ActiveShelf/index.js'\nexport { default as MediaShelf } from './MediaShelf/index.js'\nexport { default as CreditsShelf, CreditsProductCard } from './CreditsShelf/index.js'\nexport type {\n CreditsShelfSemanticName,\n CreditsProductCardData,\n CopyConfig as CreditsShelfCopyConfig,\n ButtonFunctionType as CreditsShelfButtonFunctionType,\n} from './CreditsShelf/index.js'\nexport { default as SceneShelf, SceneProductCard } from './SceneShelf/index.js'\nexport type { SceneShelfSemanticName, SceneProductCardData, SceneProductCardSemanticName } from './SceneShelf/index.js'\n\nexport { default as MediaEndorsement } from './MediaEndorsement/index.js'\nexport type {\n MediaEndorsementProps,\n MediaEndorsementData,\n MediaEndorsementItem,\n MediaEndorsementSemanticName,\n} from './MediaEndorsement/index.js'\n\n// Copy configuration types and defaults\nexport type {\n CopyConfig as MediaShelfCopyConfig,\n ButtonFunctionType as MediaShelfButtonFunctionType,\n} from './MediaShelf/types.js'\nexport type { CopyConfig as ActiveShelfCopyConfig, ButtonFunctionType } from './ActiveShelf/types.js'\n\nexport {\n default as ImageOverlayShelf,\n type ButtonFunctionType as ImageOverlayShelfButtonFunctionType,\n} from './ImageOverlayShelf/index.js'\n\n// MiniCart \u7EC4\u4EF6\u53CA\u7C7B\u578B\u5BFC\u51FA\nexport { default as MiniCart } from './MiniCart/index.js'\nexport type { Cart, CartLineItem, MiniCartData, MiniCartProps, CircleProgressConfig } from './MiniCart/index.js'\nexport { default as MiniCartCircleProgress } from './MiniCart/CircleProgress.js'\nexport type { CircleProgressProps as MiniCartCircleProgressProps } from './MiniCart/CircleProgress.js'\nexport { default as MiniCartDialog, MiniCartDialog as MiniCartDialogComponent } from './MiniCart/MiniCartDialog.js'\nexport type {\n MiniCartDialogProps,\n MiniCartDialogCopy,\n MiniCartDialogSemanticName,\n CartData,\n} from './MiniCart/MiniCartDialog.js'\n\n/**\n * \u7EC4\u4EF6\u6620\u5C04\u5BF9\u8C61\n */\n\nexport const PAYLOAD_COMPONENT_MAP = {\n 'ipc-accordioncards': 'AccordionCards',\n 'ipc-aplusdesc': 'AplusDesc',\n 'ipc-banner': 'HeroBanner',\n 'ipc-brand-equity': 'BrandEquity',\n 'ipc-category': 'Category',\n 'ipc-collection-banner': 'CollectionBanner',\n 'ipc-collection-shelves': 'CollectionShelves',\n 'ipc-creativemodule': 'CreativeModule',\n 'ipc-download': 'DownLoad',\n 'ipc-evaluate': 'Evaluate',\n 'ipc-faq': 'Faq',\n 'ipc-features': 'Features',\n 'ipc-footcharger': 'FootCharger',\n 'ipc-ga-block': 'GraphicAttractionBlock',\n 'ipc-giftbox': 'GiftBox',\n 'ipc-giftshelf': 'GiftShelf',\n 'ipc-graphic': 'Graphic',\n 'ipc-graphicmore': 'GraphicMore',\n 'ipc-graphicoverlay': 'GraphicOverlay',\n 'ipc-marquee': 'Marquee',\n 'ipc-mediaplayerbase': 'MediaPlayerBase',\n 'ipc-mediaplayermulti': 'MediaPlayerMulti',\n 'ipc-mediaplayersticky': 'MediaPlayerSticky',\n 'ipc-member-equity': 'MemberEquity',\n 'ipc-mlg-block': 'MultiLayoutGraphicBlock',\n 'ipc-search-page-tabs': 'SearchPageBlock',\n 'ipc-selectstore': 'SelectStore',\n 'ipc-shelfdisplay': 'ShelfDisplay',\n 'ipc-slogan': 'Slogan',\n 'ipc-spacer': 'Spacer',\n 'ipc-specs': 'Specs',\n 'ipc-tabs': 'TabsBlock',\n 'ipc-text-marquee': 'TextMarquee',\n 'ipc-title': 'Title',\n 'ipc-whychoose': 'WhyChoose',\n 'ipc-product-nav': 'ProductNav',\n 'ipc-brand-card-link': 'BrandCardLink',\n 'ipc-ipredirect': 'IPRedirect',\n ksp: 'Ksp',\n 'ipc-secondary-banner': 'SecondaryBanner',\n /**\n * \u6D3B\u52A8\u8D27\u67B6\n */\n 'ipc-active-shelf': 'ActiveShelf',\n 'ipc-media-shelf': 'MediaShelf',\n /**\n * \u6D3B\u52A8\u4E70\u8D60\u8D27\u67B6\n */\n 'ipc-bogo-shelf': 'BuyOneGetOneShelf',\n 'ipc-media-endorsement': 'MediaEndorsement',\n 'ipc-media-scene-switcher-v2': 'MediaSceneSwitcherV2',\n 'ipc-featured-blog-posts': 'FeaturedBlogPosts',\n}\n"],
|
|
5
|
-
"mappings": "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",
|
|
4
|
+
"sourcesContent": ["export { default as ActivitySchedule } from './ActivitySchedule/index.js'\nexport type { ActivityScheduleProps, ActivityScheduleData, ActivityScheduleItem } from './ActivitySchedule/types.js'\nexport { default as GiftShelf } from './GiftShelf/index.js'\nexport type {\n GiftShelfProps,\n GiftShelfData,\n GiftShelfItem,\n CountdownConfig,\n ResponsiveBackgroundImage as GiftShelfResponsiveBackgroundImage,\n} from './GiftShelf/types.js'\nexport { default as GiftTierShelf } from './GiftTierShelf/index.js'\nexport type { GiftTierShelfProps, GiftTierShelfData, GiftTierItem, GiftTierProduct } from './GiftTierShelf/types.js'\nexport { default as ActivityMechanism } from './ActivityMechanism/index.js'\nexport type {\n ActivityMechanismProps,\n ActivityMechanismItem,\n ActivityMechanismSemanticName,\n ResponsiveBackgroundImage,\n} from './ActivityMechanism/types.js'\nexport { default as BrandEquity } from './BrandEquity/index.js'\nexport { default as MemberEquity } from './MemberEquity/index.js'\nexport { default as Slogan } from './Slogan/index.js'\nexport { default as Title } from './Title/index.js'\nexport { default as Spacer } from './Spacer/index.js'\nexport { default as ShelfDisplay } from './ShelfDisplay/index.js'\nexport { default as Evaluate } from './Evaluate/index.js'\nexport { default as Category } from './Category/index.js'\nexport { default as HeroBanner } from './HeroBanner/index.js'\nexport { default as AccordionCards } from './AccordionCards/index.js'\nexport { default as Graphic } from './Graphic/index.js'\nexport { default as MediaPlayerBase } from './MediaPlayerBase/index.js'\nexport { default as MediaPlayerSticky } from './MediaPlayerSticky/index.js'\nexport { default as MediaPlayerMulti } from './MediaPlayerMulti/index.js'\nexport { default as Marquee } from './Marquee/index.js'\nexport { default as MarqueeReview } from './MarqueeReview/index.js'\nexport type { MarqueeReviewProps, MarqueeReviewData, ReviewItem } from './MarqueeReview/index.js'\nexport { default as WhyChoose } from './WhyChoose/index.js'\nexport { default as Faq } from './Faq/index.js'\nexport { MarqueeItem, MarqueeImageContent, MarqueeTextContent } from './Marquee/index.js'\nexport { default as MultiLayoutGraphicBlock } from './MultiLayoutGraphicBlock/index.js'\nexport type { MultiLayoutGraphicBlockProps } from './MultiLayoutGraphicBlock/index.js'\nexport { default as GraphicAttractionBlock } from './GraphicAttractionBlock/index.js'\nexport type { GraphicAttractionBlockProps } from './GraphicAttractionBlock/index.js'\nexport { default as HeaderNavigation } from './HeaderNavigation/index.js'\nexport { default as FooterNavigation } from './FooterNavigation/index.js'\nexport { default as SearchPage } from './SearchPage/index.js'\nexport type { SearchPageProps } from './SearchPage/types.js'\nexport { IPC_SEARCH_PAGE, SearchPageTabType } from './SearchPage/types.js'\n\nexport { withLayout } from '../shared/Styles.js'\nexport { default as AiuiProvider } from './AiuiProvider/index.js'\nexport { default as Tabs } from './Tabs/index.js'\nexport { default as CreativeModule } from './CreativeModule/index.js'\nexport { default as GraphicOverlay } from './GraphicOverlay/index.js'\nexport { default as Specs } from './Specs/index.js'\nexport { default as TabGroup } from './TabsGroup/index.js'\n\nexport { default as BizProductProvider } from './Listing/BizProductProvider.js'\nexport { default as PurchaseBar } from './Listing/components/PurchaseBar/index.js'\nexport { default as ProductActions } from './Listing/components/PurchaseBar/ProductActions/index.js'\nexport type { ProductActionsProps } from './Listing/components/PurchaseBar/ProductActions/index.js'\nexport { default as ProductCard } from './Listing/components/ProductCard/index.js'\nexport { default as ProductBenefitsTabs } from './Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js'\nexport { default as ProductBenefits } from './Listing/components/ProductCard/ProductDetail/ProductBenefits/index.js'\nexport { default as ProductHighlight } from './Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js'\nexport { default as ProductFreeGift } from './Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js'\nexport { default as ProductExchangePurchase } from './Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js'\nexport { default as ProductOptions } from './Listing/components/ProductCard/ProductDetail/ProductOptions/index.js'\nexport { default as ProductBundle } from './Listing/components/ProductCard/ProductDetail/ProductBundle/index.js'\nexport { default as ProductCoupon } from './Listing/components/ProductCard/ProductDetail/ProductCoupon/index.js'\nexport { default as ProductBanner } from './Listing/components/ProductCard/ProductDetail/ProductBanner/index.js'\nexport { default as ProductGridBox } from './Listing/components/ProductCard/ProductGridBox.js'\nexport { default as ProductGallery } from './Listing/components/ProductCard/ProductGallery/index.js'\nexport { default as ProductDetail } from './Listing/components/ProductCard/ProductDetail/index.js'\nexport { default as ProductSummary } from './Listing/components/ProductCard/ProductSummary/index.js'\nexport { default as BenefitsTab } from './Listing/components/ProductCard/ProductDetail/BenefitsTab.js'\nexport { default as PaidShipping } from './Listing/components/PaidShipping/index.js'\nexport { default as ProductPaidShipping } from './Listing/components/ProductCard/ProductPaidShipping/index.js'\n\nexport { default as GraphicMore } from './GraphicMore/index.js'\nexport { default as Features } from './Features/index.js'\nexport { default as AplusDesc } from './AplusDesc/index.js'\nexport { default as GiftBox } from './GiftBox/index.js'\nexport { default as SelectStore } from './SelectStore/index.js'\nexport { default as DownLoad } from './DownLoad/index.js'\nexport { default as FootCharger } from './FootCharger/index.js'\nexport { default as BrandCardLink } from './BrandCardLink/index.js'\nexport type { BrandCardLinkProps, BrandCardLinkItemProps } from './BrandCardLink/types.js'\n\nexport * as IPRedirect from './IPRedirect/index.js'\n\nexport { default as WheelLottery } from './WheelLottery/index.js'\nexport type {\n WheelLotteryProps,\n WheelLotteryHandle,\n Prize,\n ChanceMethod,\n WinningInfo,\n UserData,\n} from './WheelLottery/types.js'\nexport { default as ProductLottery } from './ProductLottery/index.js'\nexport type { ProductLotteryProps, ProductLotteryHandle, MediaConfig, CtaButtonConfig } from './ProductLottery/types.js'\nexport { default as ProductCompare } from './ProductCompare/index.js'\nexport type { ProductCompareProps, ProductItemData } from './ProductCompare/index.js'\nexport { default as Ksp } from './Ksp/index.js'\nexport type { KspProps, KspData, KspCardItem } from './Ksp/index.js'\nexport { default as ImageTextFeature } from './ImageTextFeature/index.js'\nexport type { ImageTextFeatureProps, ImageTextFeatureItem } from './ImageTextFeature/index.js'\nexport { default as FeatureCards } from './FeatureCards/index.js'\nexport type { FeatureCardsProps, FeatureCardItem } from './FeatureCards/index.js'\nexport { default as FeaturedBlogPosts } from './FeaturedBlogPosts/index.js'\nexport type {\n FeaturedBlogPostsProps,\n FeaturedBlogPostsData,\n FeaturedBlogPostItem,\n FeaturedBlogPostSpan,\n} from './FeaturedBlogPosts/index.js'\nexport { default as ImageWithText } from './ImageWithText/index.js'\nexport type { ImageWithTextProps } from './ImageWithText/index.js'\nexport { default as VideoFeature } from './VideoFeature/index.js'\nexport type { VideoFeatureProps } from './VideoFeature/index.js'\nexport { default as TabsWithMedia } from './TabsWithMedia/index.js'\nexport type { TabsWithMediaProps, TabItem, TimeIndex } from './TabsWithMedia/index.js'\nexport { default as TabWithImage } from './TabWithImage/index.js'\nexport type { TabWithImageProps, TabWithImageDataItem } from './TabWithImage/index.js'\nexport { default as FeatureShowcase } from './FeatureShowcase/index.js'\nexport type { FeatureShowcaseProps, FeatureShowcaseItem } from './FeatureShowcase/index.js'\nexport { default as ProductHero } from './ProductHero/index.js'\nexport type { ProductHeroProps } from './ProductHero/index.js'\nexport { default as SpecsComparison } from './SpecsComparison/index.js'\nexport type {\n SpecsComparisonProps,\n SpecsComparisonMenuItem,\n SpecsComparisonLeftMenuItem,\n} from './SpecsComparison/index.js'\nexport { default as MediaSceneSwitcher } from './MediaSceneSwitcher/index.js'\nexport type { MediaSceneSwitcherProps } from './MediaSceneSwitcher/types.js'\nexport { default as MediaSceneSwitcherV2 } from './MediaSceneSwitcherV2/index.js'\nexport type {\n MediaSceneSwitcherV2Props,\n MediaSceneSwitcherV2Data,\n MediaSceneSwitcherV2Item,\n MediaSceneSwitcherV2Layout,\n} from './MediaSceneSwitcherV2/index.js'\nexport { default as ThreeDCarousel } from './ThreeDCarousel/index.js'\nexport type { ThreeDCarouselProps } from './ThreeDCarousel/index.js'\nexport { default as ProductNav } from './ProductNav/index.js'\nexport type { ProductNavProps, TabLink, AnchorItem, BuyButton } from './ProductNav/index.js'\nexport { default as AnchorNavigation } from './AnchorNavigation/index.js'\nexport { default as PromotionalBar } from './PromotionalBar/index.js'\nexport { default as EventSchedule } from './EventSchedule/index.js'\nexport { default as SecondaryBanner } from './SecondaryBanner/index.js'\nexport { default as BuyOneGetOneShelf } from './BuyOneGetOneShelf/index.js'\nexport { default as ActiveShelf } from './ActiveShelf/index.js'\nexport { default as MediaShelf } from './MediaShelf/index.js'\nexport { default as CreditsShelf, CreditsProductCard } from './CreditsShelf/index.js'\nexport type {\n CreditsShelfSemanticName,\n CreditsProductCardData,\n CopyConfig as CreditsShelfCopyConfig,\n ButtonFunctionType as CreditsShelfButtonFunctionType,\n} from './CreditsShelf/index.js'\nexport { default as SceneShelf, SceneProductCard } from './SceneShelf/index.js'\nexport type { SceneShelfSemanticName, SceneProductCardData, SceneProductCardSemanticName } from './SceneShelf/index.js'\n\nexport { default as MediaEndorsement } from './MediaEndorsement/index.js'\nexport type {\n MediaEndorsementProps,\n MediaEndorsementData,\n MediaEndorsementItem,\n MediaEndorsementSemanticName,\n} from './MediaEndorsement/index.js'\n\n// Copy configuration types and defaults\nexport type {\n CopyConfig as MediaShelfCopyConfig,\n ButtonFunctionType as MediaShelfButtonFunctionType,\n} from './MediaShelf/types.js'\nexport type { CopyConfig as ActiveShelfCopyConfig, ButtonFunctionType } from './ActiveShelf/types.js'\n\nexport {\n default as ImageOverlayShelf,\n type ButtonFunctionType as ImageOverlayShelfButtonFunctionType,\n} from './ImageOverlayShelf/index.js'\n\n// MiniCart \u7EC4\u4EF6\u53CA\u7C7B\u578B\u5BFC\u51FA\nexport { default as MiniCart } from './MiniCart/index.js'\nexport type { Cart, CartLineItem, MiniCartData, MiniCartProps, CircleProgressConfig } from './MiniCart/index.js'\nexport { default as MiniCartCircleProgress } from './MiniCart/CircleProgress.js'\nexport type { CircleProgressProps as MiniCartCircleProgressProps } from './MiniCart/CircleProgress.js'\nexport { default as MiniCartDialog, MiniCartDialog as MiniCartDialogComponent } from './MiniCart/MiniCartDialog.js'\nexport type {\n MiniCartDialogProps,\n MiniCartDialogCopy,\n MiniCartDialogSemanticName,\n CartData,\n} from './MiniCart/MiniCartDialog.js'\n\n/**\n * \u7EC4\u4EF6\u6620\u5C04\u5BF9\u8C61\n */\n\nexport const PAYLOAD_COMPONENT_MAP = {\n 'ipc-accordioncards': 'AccordionCards',\n 'ipc-aplusdesc': 'AplusDesc',\n 'ipc-banner': 'HeroBanner',\n 'ipc-brand-equity': 'BrandEquity',\n 'ipc-category': 'Category',\n 'ipc-collection-banner': 'CollectionBanner',\n 'ipc-collection-shelves': 'CollectionShelves',\n 'ipc-creativemodule': 'CreativeModule',\n 'ipc-download': 'DownLoad',\n 'ipc-evaluate': 'Evaluate',\n 'ipc-faq': 'Faq',\n 'ipc-features': 'Features',\n 'ipc-footcharger': 'FootCharger',\n 'ipc-ga-block': 'GraphicAttractionBlock',\n 'ipc-giftbox': 'GiftBox',\n 'ipc-giftshelf': 'GiftShelf',\n 'ipc-graphic': 'Graphic',\n 'ipc-graphicmore': 'GraphicMore',\n 'ipc-graphicoverlay': 'GraphicOverlay',\n 'ipc-marquee': 'Marquee',\n 'ipc-mediaplayerbase': 'MediaPlayerBase',\n 'ipc-mediaplayermulti': 'MediaPlayerMulti',\n 'ipc-mediaplayersticky': 'MediaPlayerSticky',\n 'ipc-member-equity': 'MemberEquity',\n 'ipc-mlg-block': 'MultiLayoutGraphicBlock',\n 'ipc-search-page-tabs': 'SearchPageBlock',\n 'ipc-selectstore': 'SelectStore',\n 'ipc-shelfdisplay': 'ShelfDisplay',\n 'ipc-slogan': 'Slogan',\n 'ipc-spacer': 'Spacer',\n 'ipc-specs': 'Specs',\n 'ipc-tabs': 'TabsBlock',\n 'ipc-text-marquee': 'TextMarquee',\n 'ipc-title': 'Title',\n 'ipc-whychoose': 'WhyChoose',\n 'ipc-product-nav': 'ProductNav',\n 'ipc-brand-card-link': 'BrandCardLink',\n 'ipc-ipredirect': 'IPRedirect',\n ksp: 'Ksp',\n 'ipc-secondary-banner': 'SecondaryBanner',\n /**\n * \u6D3B\u52A8\u8D27\u67B6\n */\n 'ipc-active-shelf': 'ActiveShelf',\n 'ipc-media-shelf': 'MediaShelf',\n /**\n * \u6D3B\u52A8\u4E70\u8D60\u8D27\u67B6\n */\n 'ipc-bogo-shelf': 'BuyOneGetOneShelf',\n 'ipc-media-endorsement': 'MediaEndorsement',\n 'ipc-media-scene-switcher-v2': 'MediaSceneSwitcherV2',\n 'ipc-featured-blog-posts': 'FeaturedBlogPosts',\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": ["default", "MarqueeItem", "MarqueeImageContent", "MarqueeTextContent", "IPC_SEARCH_PAGE", "SearchPageTabType", "withLayout", "IPRedirect", "CreditsProductCard", "SceneProductCard", "MiniCartDialog", "PAYLOAD_COMPONENT_MAP"]
|
|
7
7
|
}
|
|
@@ -1,37 +1,23 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export interface ContainerProps {
|
|
3
3
|
container?: {
|
|
4
|
-
/** 桌面端列内容宽度 */
|
|
5
4
|
desktopSpan: number;
|
|
6
|
-
/** 移动端列内容宽度 */
|
|
7
5
|
mobileSpan: number;
|
|
8
6
|
};
|
|
9
7
|
}
|
|
10
8
|
export interface StylesProps {
|
|
11
|
-
/** 自定义样式字符串或对象 */
|
|
12
9
|
style?: string | React.CSSProperties;
|
|
13
|
-
/** 唯一标识符 */
|
|
14
10
|
uid?: string;
|
|
15
|
-
/** 是否禁用 */
|
|
16
11
|
disabled?: boolean;
|
|
12
|
+
containerClassName?: string;
|
|
17
13
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
export declare const getStylesProps: <T extends Record<string, unknown>>(props: T & StylesProps) => StylesProps;
|
|
22
|
-
/**
|
|
23
|
-
* 样式 Hook,返回样式类名和样式组件
|
|
24
|
-
* @param styleProps - 样式属性
|
|
25
|
-
*/
|
|
26
|
-
export declare const useStyles: (styleProps: Partial<StylesProps>, data?: Record<string, any>) => {
|
|
14
|
+
type LayoutProps<P> = Omit<P, keyof StylesProps | keyof ContainerProps> & StylesProps & ContainerProps;
|
|
15
|
+
export declare const getStylesProps: <T extends StylesProps>(props: T) => StylesProps;
|
|
16
|
+
export declare const useStyles: (styleProps: Partial<StylesProps>, data?: Record<string, unknown>) => {
|
|
27
17
|
readonly className: `block-${string} `;
|
|
28
18
|
readonly StyleComponent: import("react/jsx-runtime").JSX.Element;
|
|
29
19
|
readonly uid: string;
|
|
30
20
|
};
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
* @param WrappedComponent - 需要包装的组件
|
|
35
|
-
* @param defaultLayoutProps - 默认样式属性
|
|
36
|
-
*/
|
|
37
|
-
export declare function withLayout<P>(WrappedComponent: React.ComponentType<P>, defaultLayoutProps?: Partial<StylesProps & ContainerProps>): any;
|
|
21
|
+
export declare function withLayout<P, R>(WrappedComponent: React.ForwardRefExoticComponent<P & React.RefAttributes<R>>, defaultLayoutProps?: Partial<StylesProps & ContainerProps>): React.ForwardRefExoticComponent<LayoutProps<P> & React.RefAttributes<R>>;
|
|
22
|
+
export declare function withLayout<P>(WrappedComponent: React.ComponentType<P>, defaultLayoutProps?: Partial<StylesProps & ContainerProps>): React.ForwardRefExoticComponent<LayoutProps<P> & React.RefAttributes<unknown>>;
|
|
23
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Fragment as
|
|
1
|
+
import{Fragment as B,jsx as r,jsxs as F}from"react/jsx-runtime";import p,{useMemo as m}from"react";import{simpleHash as f}from"./simpleHash.js";import C from"./getKeyPropsString.js";import{Grid as S,GridItem as g}from"../components/grid.js";import{Container as w}from"../components/container.js";import b from"./ErrorBoundary.js";const k={12:"col-start-1 col-end-13",10:"col-start-2 col-end-12",8:"col-start-3 col-end-11",6:"col-start-4 col-end-10",4:"col-start-5 col-end-9"},N={12:"tablet:col-start-1 tablet:col-end-13",10:"tablet:col-start-2 tablet:col-end-12",8:"tablet:col-start-3 tablet:col-end-11",6:"tablet:col-start-4 tablet:col-end-10",4:"tablet:col-start-5 tablet:col-end-9"},u=t=>{const n=C(t);return`style_${f(n)}`},I=t=>{const{style:n,uid:e,disabled:o,containerClassName:s}=t;return{style:n,uid:e,disabled:o,containerClassName:s}},T=({style:t,uid:n=u({}),disabled:e=!1})=>!t||e?null:r("style",{suppressHydrationWarning:!0,"data-style-id":n,dangerouslySetInnerHTML:{__html:`.block-${n} { ${t} }`}}),h=(t,n)=>{const e=m(()=>t?.uid||u({...t,...n??{}}),[n,t]),o=m(()=>r(T,{...t,uid:e}),[t,e]);return{className:`block-${e} `,StyleComponent:o,uid:e}},L=t=>{const{desktopSpan:n,mobileSpan:e}=t||{},o=e?k[e]:"",s=n?N[n]:"";return`${o} ${s}`.trim()},$=t=>t?typeof t=="string"?t:typeof t=="object"&&Object.entries(t).length<=0?"":Object.entries(t).map(([n,e])=>`${n.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${e}`).join("; ")+";":"",x=(t,n)=>[t,n].map($).filter(e=>!!e).map(e=>e.trim().endsWith(";")?e:`${e};`).join(" ");function E(t,n){const e=p.forwardRef((o,s)=>{const a=I(o),i=x(n?.style,a.style),c={...n,...a,...i&&{style:i}},{className:l,StyleComponent:d}=h(c,o.data),{style:_,uid:G,disabled:K,className:P,...R}=o;return F(B,{children:[d,r(t,{...R,className:[l,P].filter(Boolean).join(" ").trim(),ref:s})]})});return e.displayName=`WithStyleInjection(${t.displayName||t.name||"Component"})`,e}function j(t,n){const e=p.forwardRef((o,s)=>{const{container:a,containerClassName:i,...c}=o;if(!a||Reflect.ownKeys(a).length===0)return r(t,{...c,ref:s});const l=[n,i].filter(Boolean).join(" ").trim();return r(w,{className:l,children:r(S,{className:"container_grid",children:r(g,{className:L(a),children:r(t,{...c,ref:s})})})})});return e.displayName=`WithContainerLayout(${t.displayName||t.name||"Component"})`,e}function A(t){const n=p.forwardRef((e,o)=>r(b,{children:r(t,{...e,ref:o})}));return n.displayName=`WithErrorBoundary(${t.displayName||t.name||"Component"})`,n}const y=new WeakMap;function Z(t,n){if(y.has(t))return t;const e=A(j(E(t,n),n?.containerClassName));return e.displayName=`WithLayout(${t.displayName||t.name||"Component"})`,y.set(t,!0),e}export{I as getStylesProps,h as useStyles,Z as withLayout};
|
|
2
2
|
//# sourceMappingURL=Styles.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/shared/Styles.tsx"],
|
|
4
|
-
"sourcesContent": ["import React, { useMemo } from 'react'\nimport { simpleHash } from './simpleHash.js'\nimport getKeyPropsString from './getKeyPropsString.js'\nimport { Grid, GridItem } from '../components/grid.js'\nimport { Container } from '../components/container.js'\nimport ErrorBoundary from './ErrorBoundary.js'\n\nconst colContentClasses: Record<number, string> = {\n 12: 'col-start-1 col-end-13',\n 10: 'col-start-2 col-end-12',\n 8: 'col-start-3 col-end-11',\n 6: 'col-start-4 col-end-10',\n 4: 'col-start-5 col-end-9',\n} as const\n\n// \u9884\u5B9A\u4E49\u5E26 tablet \u524D\u7F00\u7684\u7C7B\u540D\uFF0C\u786E\u4FDD Tailwind \u53EF\u4EE5\u8BC6\u522B\nconst colContentClassesTablet: Record<number, string> = {\n 12: 'tablet:col-start-1 tablet:col-end-13',\n 10: 'tablet:col-start-2 tablet:col-end-12',\n 8: 'tablet:col-start-3 tablet:col-end-11',\n 6: 'tablet:col-start-4 tablet:col-end-10',\n 4: 'tablet:col-start-5 tablet:col-end-9',\n} as const\n\nexport interface ContainerProps {\n container?: {\n
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["Fragment", "jsx", "jsxs", "React", "useMemo", "simpleHash", "getKeyPropsString", "Grid", "GridItem", "Container", "ErrorBoundary", "colContentClasses", "colContentClassesTablet", "generateUID", "props", "keyString", "getStylesProps", "style", "uid", "disabled", "Styles", "useStyles", "styleProps", "data", "StyleComponent", "
|
|
4
|
+
"sourcesContent": ["import React, { useMemo } from 'react'\nimport { simpleHash } from './simpleHash.js'\nimport getKeyPropsString from './getKeyPropsString.js'\nimport { Grid, GridItem } from '../components/grid.js'\nimport { Container } from '../components/container.js'\nimport ErrorBoundary from './ErrorBoundary.js'\n\nconst colContentClasses: Record<number, string> = {\n 12: 'col-start-1 col-end-13',\n 10: 'col-start-2 col-end-12',\n 8: 'col-start-3 col-end-11',\n 6: 'col-start-4 col-end-10',\n 4: 'col-start-5 col-end-9',\n} as const\n\n// \u9884\u5B9A\u4E49\u5E26 tablet \u524D\u7F00\u7684\u7C7B\u540D\uFF0C\u786E\u4FDD Tailwind \u53EF\u4EE5\u8BC6\u522B\nconst colContentClassesTablet: Record<number, string> = {\n 12: 'tablet:col-start-1 tablet:col-end-13',\n 10: 'tablet:col-start-2 tablet:col-end-12',\n 8: 'tablet:col-start-3 tablet:col-end-11',\n 6: 'tablet:col-start-4 tablet:col-end-10',\n 4: 'tablet:col-start-5 tablet:col-end-9',\n} as const\n\nexport interface ContainerProps {\n container?: {\n desktopSpan: number\n mobileSpan: number\n }\n}\n\nexport interface StylesProps {\n style?: string | React.CSSProperties\n uid?: string\n disabled?: boolean\n containerClassName?: string\n}\n\ntype LayoutProps<P> = Omit<P, keyof StylesProps | keyof ContainerProps> & StylesProps & ContainerProps\n\nconst generateUID = (props: Record<string, unknown>) => {\n const keyString = getKeyPropsString(props)\n return `style_${simpleHash(keyString)}`\n}\n\nexport const getStylesProps = <T extends StylesProps>(props: T): StylesProps => {\n const { style, uid, disabled, containerClassName } = props\n return { style, uid, disabled, containerClassName }\n}\n\nconst Styles: React.FC<StylesProps> = ({ style, uid = generateUID({}), disabled = false }) => {\n if (!style || disabled) {\n return null\n }\n\n return (\n <style\n suppressHydrationWarning\n data-style-id={uid}\n dangerouslySetInnerHTML={{ __html: `.block-${uid} { ${style} }` }}\n />\n )\n}\n\nexport const useStyles = (styleProps: Partial<StylesProps>, data?: Record<string, unknown>) => {\n const uid = useMemo(() => styleProps?.uid || generateUID({ ...styleProps, ...(data ?? {}) }), [data, styleProps])\n\n const StyleComponent = useMemo(() => <Styles {...styleProps} uid={uid} />, [styleProps, uid])\n\n return {\n className: `block-${uid} `,\n StyleComponent,\n uid,\n } as const\n}\n\nconst getGridItemClassName = (container?: ContainerProps['container']) => {\n const { desktopSpan, mobileSpan } = container || {}\n const mobileClasses = mobileSpan ? colContentClasses[mobileSpan] : ''\n const desktopClasses = desktopSpan ? colContentClassesTablet[desktopSpan] : ''\n return `${mobileClasses} ${desktopClasses}`.trim()\n}\n\nconst styleToString = (style?: string | React.CSSProperties): string => {\n if (!style) return ''\n if (typeof style === 'string') return style\n if (typeof style === 'object' && Object.entries(style).length <= 0) return ''\n return (\n Object.entries(style)\n .map(([key, value]) => {\n const cssKey = key.replace(/([A-Z])/g, '-$1').toLowerCase()\n return `${cssKey}: ${value}`\n })\n .join('; ') + ';'\n )\n}\n\nconst mergeStyles = (a?: string | React.CSSProperties, b?: string | React.CSSProperties): string =>\n [a, b]\n .map(styleToString)\n .filter((s): s is string => Boolean(s))\n .map(s => (s.trim().endsWith(';') ? s : `${s};`))\n .join(' ')\n\ntype InternalProps = StylesProps &\n ContainerProps & { className?: string; data?: Record<string, unknown> } & Record<string, unknown>\n\nfunction withStyleInjection(\n WrappedComponent: React.ComponentType<InternalProps>,\n defaultStyleProps?: Partial<StylesProps>\n): React.ComponentType<InternalProps> {\n const Wrapped = React.forwardRef<unknown, InternalProps>((props, ref) => {\n const propsStyleProps = getStylesProps(props)\n const mergedStyle = mergeStyles(defaultStyleProps?.style, propsStyleProps.style)\n\n const finalStyleProps: StylesProps = {\n ...defaultStyleProps,\n ...propsStyleProps,\n ...(mergedStyle && { style: mergedStyle }),\n }\n\n const { className, StyleComponent } = useStyles(finalStyleProps, props.data as Record<string, unknown> | undefined)\n\n // eslint-disable-next-line no-unused-vars\n const { style: _s, uid: _u, disabled: _d, className: ownClassName, ...rest } = props\n\n return (\n <>\n {StyleComponent}\n <WrappedComponent {...rest} className={[className, ownClassName].filter(Boolean).join(' ').trim()} ref={ref} />\n </>\n )\n })\n\n Wrapped.displayName = `WithStyleInjection(${WrappedComponent.displayName || WrappedComponent.name || 'Component'})`\n return Wrapped as React.ComponentType<InternalProps>\n}\n\nfunction withContainerLayout(\n WrappedComponent: React.ComponentType<InternalProps>,\n defaultContainerClassName?: string\n): React.ComponentType<InternalProps> {\n const Wrapped = React.forwardRef<unknown, InternalProps>((props, ref) => {\n // eslint-disable-next-line no-unused-vars\n const { container, containerClassName, ...componentProps } = props\n\n if (!container || Reflect.ownKeys(container).length === 0) {\n return <WrappedComponent {...componentProps} ref={ref} />\n }\n\n const mergedContainerClassName = [defaultContainerClassName, containerClassName].filter(Boolean).join(' ').trim()\n\n return (\n <Container className={mergedContainerClassName}>\n <Grid className=\"container_grid\">\n <GridItem className={getGridItemClassName(container as ContainerProps['container'])}>\n <WrappedComponent {...componentProps} ref={ref} />\n </GridItem>\n </Grid>\n </Container>\n )\n })\n\n Wrapped.displayName = `WithContainerLayout(${WrappedComponent.displayName || WrappedComponent.name || 'Component'})`\n return Wrapped as React.ComponentType<InternalProps>\n}\n\nfunction withErrorBoundary(WrappedComponent: React.ComponentType<InternalProps>): React.ComponentType<InternalProps> {\n const Wrapped = React.forwardRef<unknown, InternalProps>((props, ref) => (\n <ErrorBoundary>\n <WrappedComponent {...props} ref={ref} />\n </ErrorBoundary>\n ))\n\n Wrapped.displayName = `WithErrorBoundary(${WrappedComponent.displayName || WrappedComponent.name || 'Component'})`\n return Wrapped as React.ComponentType<InternalProps>\n}\n\nconst wrappedComponents = new WeakMap<React.ComponentType<never>, true>()\n\nexport function withLayout<P, R>(\n WrappedComponent: React.ForwardRefExoticComponent<P & React.RefAttributes<R>>,\n defaultLayoutProps?: Partial<StylesProps & ContainerProps>\n): React.ForwardRefExoticComponent<LayoutProps<P> & React.RefAttributes<R>>\n\nexport function withLayout<P>(\n WrappedComponent: React.ComponentType<P>,\n defaultLayoutProps?: Partial<StylesProps & ContainerProps>\n): React.ForwardRefExoticComponent<LayoutProps<P> & React.RefAttributes<unknown>>\n\nexport function withLayout<P>(\n WrappedComponent: React.ComponentType<P>,\n defaultLayoutProps?: Partial<StylesProps & ContainerProps>\n): React.ForwardRefExoticComponent<LayoutProps<P> & React.RefAttributes<unknown>> {\n if (wrappedComponents.has(WrappedComponent as React.ComponentType<never>)) {\n return WrappedComponent as unknown as React.ForwardRefExoticComponent<LayoutProps<P> & React.RefAttributes<unknown>>\n }\n\n const composed = withErrorBoundary(\n withContainerLayout(\n withStyleInjection(WrappedComponent as React.ComponentType<InternalProps>, defaultLayoutProps),\n defaultLayoutProps?.containerClassName\n )\n )\n\n composed.displayName = `WithLayout(${WrappedComponent.displayName || WrappedComponent.name || 'Component'})`\n\n wrappedComponents.set(WrappedComponent as React.ComponentType<never>, true)\n\n return composed as unknown as React.ForwardRefExoticComponent<LayoutProps<P> & React.RefAttributes<unknown>>\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["Fragment", "jsx", "jsxs", "React", "useMemo", "simpleHash", "getKeyPropsString", "Grid", "GridItem", "Container", "ErrorBoundary", "colContentClasses", "colContentClassesTablet", "generateUID", "props", "keyString", "getStylesProps", "style", "uid", "disabled", "containerClassName", "Styles", "useStyles", "styleProps", "data", "StyleComponent", "getGridItemClassName", "container", "desktopSpan", "mobileSpan", "mobileClasses", "desktopClasses", "styleToString", "key", "value", "mergeStyles", "a", "b", "s", "withStyleInjection", "WrappedComponent", "defaultStyleProps", "Wrapped", "ref", "propsStyleProps", "mergedStyle", "finalStyleProps", "className", "_s", "_u", "_d", "ownClassName", "rest", "withContainerLayout", "defaultContainerClassName", "componentProps", "mergedContainerClassName", "withErrorBoundary", "wrappedComponents", "withLayout", "defaultLayoutProps", "composed"]
|
|
7
7
|
}
|