@cuemath/leap 3.5.0 → 3.5.1-akm-6
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/assets/illustrations/illustrations.js +7 -0
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/lottie/lottie.js +3 -0
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/features/analytics-events/platform-events-student.js +1 -1
- package/dist/features/analytics-events/platform-events-student.js.map +1 -1
- package/dist/features/analytics-events/whitelist-events.js +1 -1
- package/dist/features/analytics-events/whitelist-events.js.map +1 -1
- package/dist/features/auth/comps/animated-avatar-message/animated-text/animated-text.js.map +1 -1
- package/dist/features/auth/comps/resend-otp/resend-otp.js.map +1 -1
- package/dist/features/auth/comps/tabs/tab-tem/tab-item.js +31 -16
- package/dist/features/auth/comps/tabs/tab-tem/tab-item.js.map +1 -1
- package/dist/features/auth/comps/tabs/tabs.js +22 -5
- package/dist/features/auth/comps/tabs/tabs.js.map +1 -1
- package/dist/features/chapters/lpar-chapter/constants/block-icons.js.map +1 -1
- package/dist/features/chapters-v2/comps/tag/tag.js.map +1 -1
- package/dist/features/circle-games/about-game-activities/about-game-activities-constants.js +40 -0
- package/dist/features/circle-games/about-game-activities/about-game-activities-constants.js.map +1 -0
- package/dist/features/circle-games/about-game-activities/about-game-activities-styled.js +52 -0
- package/dist/features/circle-games/about-game-activities/about-game-activities-styled.js.map +1 -0
- package/dist/features/circle-games/about-game-activities/about-game-activities.js +69 -0
- package/dist/features/circle-games/about-game-activities/about-game-activities.js.map +1 -0
- package/dist/features/circle-games/comps/arc-container/arc-container-styled.js +77 -0
- package/dist/features/circle-games/comps/arc-container/arc-container-styled.js.map +1 -0
- package/dist/features/circle-games/comps/arc-container/arc-container.js +37 -0
- package/dist/features/circle-games/comps/arc-container/arc-container.js.map +1 -0
- package/dist/features/circle-games/comps/arc-container/constants.js +10 -0
- package/dist/features/circle-games/comps/arc-container/constants.js.map +1 -0
- package/dist/features/circle-games/comps/info-bar/info-bar.js.map +1 -1
- package/dist/features/circle-games/{game-launcher → game-launcher-v2}/api/get-content-for-today/constants.js +1 -1
- package/dist/features/circle-games/game-launcher-v2/api/get-content-for-today/constants.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/api/get-content-for-today/get-circle-home-api.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/card-container/card-container-styled.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/card-container/card-container.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/card-container/constants.js +11 -0
- package/dist/features/circle-games/game-launcher-v2/comps/card-container/constants.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/carousel/carousel-styled.js +121 -0
- package/dist/features/circle-games/game-launcher-v2/comps/carousel/carousel-styled.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/carousel/carousel.js +110 -0
- package/dist/features/circle-games/game-launcher-v2/comps/carousel/carousel.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/carousel/constants.js +9 -0
- package/dist/features/circle-games/game-launcher-v2/comps/carousel/constants.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/carousel-badge/carousel-badge-style.js +20 -0
- package/dist/features/circle-games/game-launcher-v2/comps/carousel-badge/carousel-badge-style.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/carousel-badge/carousel-badge.js +17 -0
- package/dist/features/circle-games/game-launcher-v2/comps/carousel-badge/carousel-badge.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/carousel-badge/carousel-single-badge.js +20 -0
- package/dist/features/circle-games/game-launcher-v2/comps/carousel-badge/carousel-single-badge.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/circular-game-card/circular-game-card-styled.js +66 -0
- package/dist/features/circle-games/game-launcher-v2/comps/circular-game-card/circular-game-card-styled.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/circular-game-card/circular-game-card.js +89 -0
- package/dist/features/circle-games/game-launcher-v2/comps/circular-game-card/circular-game-card.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/circular-game-card/constants.js +8 -0
- package/dist/features/circle-games/game-launcher-v2/comps/circular-game-card/constants.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/game-card-content/constants.js +6 -0
- package/dist/features/circle-games/game-launcher-v2/comps/game-card-content/constants.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/game-card-content/game-card-content-styled.js +57 -0
- package/dist/features/circle-games/game-launcher-v2/comps/game-card-content/game-card-content-styled.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/game-card-content/game-card-content.js +9 -0
- package/dist/features/circle-games/game-launcher-v2/comps/game-card-content/game-card-content.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/segmented-game-card/constants.js +7 -0
- package/dist/features/circle-games/game-launcher-v2/comps/segmented-game-card/constants.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/swipable-card/swipeable-card-styled.js +14 -0
- package/dist/features/circle-games/game-launcher-v2/comps/swipable-card/swipeable-card-styled.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/swipable-card/swipeable-card.js +24 -0
- package/dist/features/circle-games/game-launcher-v2/comps/swipable-card/swipeable-card.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/tables-card/constants.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/tables-card/infinite-button/infinite-mode-launcher-button.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/tables-card/spl-events-text/constants.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/tables-card/spl-events-text/spl-events-text-style.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/tables-card/spl-events-text/spl-events-text-types.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/tables-card/spl-events-text/spl-events-text.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/tables-card/table-mode/table-mode-styled.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/tables-card/table-mode/table-mode.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/tables-card/table-mode-star/constants.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/tables-card/table-mode-star/table-mode-star-styled.js.map +1 -0
- package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/table-mode-star/table-mode-star.js +3 -3
- package/dist/features/circle-games/game-launcher-v2/comps/tables-card/table-mode-star/table-mode-star.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/tables-card/table-segment-star/table-segment-star-styled.js.map +1 -0
- package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/table-segment-star/table-segment-star.js +7 -7
- package/dist/features/circle-games/game-launcher-v2/comps/tables-card/table-segment-star/table-segment-star.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/tables-card/tables-card-styled.js.map +1 -0
- package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/tables-card.js +18 -18
- package/dist/features/circle-games/game-launcher-v2/comps/tables-card/tables-card.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/dal/use-get-circle-home-details-dal/helper.js +94 -0
- package/dist/features/circle-games/game-launcher-v2/dal/use-get-circle-home-details-dal/helper.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/game-launcher-analytics-events.js +13 -0
- package/dist/features/circle-games/game-launcher-v2/game-launcher-analytics-events.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/game-launcher-v2.js +321 -0
- package/dist/features/circle-games/game-launcher-v2/game-launcher-v2.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/helpers.js +8 -0
- package/dist/features/circle-games/game-launcher-v2/helpers.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/hooks/use-game-launcher-journey/constants.js +6 -0
- package/dist/features/circle-games/game-launcher-v2/hooks/use-game-launcher-journey/constants.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/hooks/use-game-launcher-journey/use-game-launcher-journey.js +160 -0
- package/dist/features/circle-games/game-launcher-v2/hooks/use-game-launcher-journey/use-game-launcher-journey.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/hooks/use-table-infinite-launcher-journey/constants.js +5 -0
- package/dist/features/circle-games/game-launcher-v2/hooks/use-table-infinite-launcher-journey/constants.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey.js +92 -0
- package/dist/features/circle-games/game-launcher-v2/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/hooks/use-table-launcher-journey/constants.js +10 -0
- package/dist/features/circle-games/game-launcher-v2/hooks/use-table-launcher-journey/constants.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/hooks/use-table-launcher-journey/use-table-launcher-journey.js +159 -0
- package/dist/features/circle-games/game-launcher-v2/hooks/use-table-launcher-journey/use-table-launcher-journey.js.map +1 -0
- package/dist/features/circle-games/games/tutorial/tutorial-styled.js +13 -10
- package/dist/features/circle-games/games/tutorial/tutorial-styled.js.map +1 -1
- package/dist/features/circle-games/games/tutorial/tutorial.js +53 -65
- package/dist/features/circle-games/games/tutorial/tutorial.js.map +1 -1
- package/dist/features/circle-games/hooks/use-circle-sounds/constants.js +9 -7
- package/dist/features/circle-games/hooks/use-circle-sounds/constants.js.map +1 -1
- package/dist/features/circle-games/hooks/use-circle-sounds/use-circle-sounds-enums.js +2 -2
- package/dist/features/circle-games/hooks/use-circle-sounds/use-circle-sounds-enums.js.map +1 -1
- package/dist/features/circle-games/hooks/use-circle-sounds/use-circle-sounds.js +50 -48
- package/dist/features/circle-games/hooks/use-circle-sounds/use-circle-sounds.js.map +1 -1
- package/dist/features/circle-games/leaderboard/comps/leaderboard-item/leaderboard-item.js.map +1 -1
- package/dist/features/circle-games/leaderboard/comps/navigation-button/navigation-button.js.map +1 -1
- package/dist/features/circle-games/sign-up/api/use-validate-username-api/use-username-availability-get.js +4 -4
- package/dist/features/circle-games/sign-up/api/use-validate-username-api/use-username-availability-get.js.map +1 -1
- package/dist/features/circle-games/sign-up/comp/input-wrapper/input-wrapper.js +8 -8
- package/dist/features/circle-games/sign-up/comp/input-wrapper/input-wrapper.js.map +1 -1
- package/dist/features/communication/hooks/use-inclass-message-broker/use-inclass-message-broker.js +4 -4
- package/dist/features/communication/hooks/use-inclass-message-broker/use-inclass-message-broker.js.map +1 -1
- package/dist/features/communication/hooks/use-trial-session-message-broker/use-trial-session-message-broker.js +4 -4
- package/dist/features/communication/hooks/use-trial-session-message-broker/use-trial-session-message-broker.js.map +1 -1
- package/dist/features/cue-canvas/cue-canvas.js.map +1 -1
- package/dist/features/cue-canvas/hooks/use-canvas-sync-broker.js +4 -4
- package/dist/features/cue-canvas/hooks/use-canvas-sync-broker.js.map +1 -1
- package/dist/features/cue-canvas/sidebar/homework/homework-menu.js.map +1 -1
- package/dist/features/cue-canvas/sidebar/homework/homework-request.js.map +1 -1
- package/dist/features/cue-canvas/sidebar/puzzles/filter-selection-menu.js.map +1 -1
- package/dist/features/cue-canvas/sidebar/puzzles/filters-section.js.map +1 -1
- package/dist/features/cue-canvas/sidebar/puzzles/filters.js.map +1 -1
- package/dist/features/cue-canvas/sidebar/puzzles/puzzle-menu-header.js.map +1 -1
- package/dist/features/cue-canvas/sidebar/puzzles/puzzle-menu.js.map +1 -1
- package/dist/features/cue-canvas/toolbar/color-palette.js.map +1 -1
- package/dist/features/cue-canvas/toolbar/grid-menu.js.map +1 -1
- package/dist/features/cue-canvas/toolbar/toolbar.js.map +1 -1
- package/dist/features/homework/homework-card.js.map +1 -1
- package/dist/features/homework/hw-card-list/hw-card-list.js.map +1 -1
- package/dist/features/homework/node-progress.js.map +1 -1
- package/dist/features/journey/hooks/use-get-tracked-views.js +13 -0
- package/dist/features/journey/hooks/use-get-tracked-views.js.map +1 -0
- package/dist/features/journey/journey-id/journey-id-student.js +1 -1
- package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
- package/dist/features/journey/tracking-id/tracking-id-student.js +5 -0
- package/dist/features/journey/tracking-id/tracking-id-student.js.map +1 -0
- package/dist/features/journey/tracking-id/tracking-ids.js +8 -0
- package/dist/features/journey/tracking-id/tracking-ids.js.map +1 -0
- package/dist/features/journey/use-journey/journey-context-provider.js +42 -42
- package/dist/features/journey/use-journey/journey-context-provider.js.map +1 -1
- package/dist/features/milestone/create/comps/info-points/info-points.js +12 -12
- package/dist/features/milestone/create/comps/info-points/info-points.js.map +1 -1
- package/dist/features/milestone/create/submit-modal/submit-modal.js.map +1 -1
- package/dist/features/milestone/create/submit-modal/submit-with-plan-modal/submit-with-plan-modal.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-rank.js.map +1 -1
- package/dist/features/milestone/outcome/comps/outcome-collection/input-descriptor.js +1 -5
- package/dist/features/milestone/outcome/comps/outcome-collection/input-descriptor.js.map +1 -1
- package/dist/features/notification/notification.js.map +1 -1
- package/dist/features/parent-dashboard/comps/next-steps/next-steps.js.map +1 -1
- package/dist/features/pointer-sync/hooks/use-pointer-sync.js +6 -6
- package/dist/features/pointer-sync/hooks/use-pointer-sync.js.map +1 -1
- package/dist/features/post-game-stats/accuracy/accuracy-styled.js +2 -2
- package/dist/features/post-game-stats/accuracy/accuracy-styled.js.map +1 -1
- package/dist/features/post-game-stats/clock/clock-styled.js +2 -2
- package/dist/features/post-game-stats/clock/clock-styled.js.map +1 -1
- package/dist/features/post-game-stats/digital-meter/constants.js +1 -1
- package/dist/features/post-game-stats/digital-meter/constants.js.map +1 -1
- package/dist/features/post-game-stats/digital-meter/digital-meter-styled.js +1 -1
- package/dist/features/post-game-stats/digital-meter/digital-meter-styled.js.map +1 -1
- package/dist/features/post-game-stats/digital-meter/digital-meter.js +27 -27
- package/dist/features/post-game-stats/digital-meter/digital-meter.js.map +1 -1
- package/dist/features/post-game-stats/points/points.js +5 -4
- package/dist/features/post-game-stats/points/points.js.map +1 -1
- package/dist/features/post-game-stats/post-game-stats-styled.js +9 -8
- package/dist/features/post-game-stats/post-game-stats-styled.js.map +1 -1
- package/dist/features/post-game-stats/post-game-stats.js +107 -105
- package/dist/features/post-game-stats/post-game-stats.js.map +1 -1
- package/dist/features/post-game-stats/score/score-styled.js +2 -2
- package/dist/features/post-game-stats/score/score-styled.js.map +1 -1
- package/dist/features/post-game-stats/streak/constants.js +1 -1
- package/dist/features/post-game-stats/streak/constants.js.map +1 -1
- package/dist/features/post-game-stats/streak/streak-styled.js +2 -2
- package/dist/features/post-game-stats/streak/streak-styled.js.map +1 -1
- package/dist/features/talk-meter/hooks/use-talk-meter.js +4 -4
- package/dist/features/talk-meter/hooks/use-talk-meter.js.map +1 -1
- package/dist/features/trial-session/comps/learning-plan/use-learning-plan-scroll-sync.js +5 -5
- package/dist/features/trial-session/comps/learning-plan/use-learning-plan-scroll-sync.js.map +1 -1
- package/dist/features/ui/arc-button/arc-button-styled.js +23 -21
- package/dist/features/ui/arc-button/arc-button-styled.js.map +1 -1
- package/dist/features/ui/arc-button/arc-button.js +18 -17
- package/dist/features/ui/arc-button/arc-button.js.map +1 -1
- package/dist/features/ui/nudge/nudge.js +14 -13
- package/dist/features/ui/nudge/nudge.js.map +1 -1
- package/dist/features/worksheet/user-pointer-pin/hooks/use-user-location.js +5 -5
- package/dist/features/worksheet/user-pointer-pin/hooks/use-user-location.js.map +1 -1
- package/dist/index.d.ts +103 -44
- package/dist/index.js +368 -366
- package/dist/index.js.map +1 -1
- package/dist/static/accuracy-badge.2e161f00.svg +1 -0
- package/dist/static/clock-badge.0adb4ba6.svg +1 -0
- package/dist/static/daily-work-out-complete.eaffdd2b.json +1 -0
- package/dist/static/down-arrow-badge.f462f615.svg +1 -0
- package/dist/static/green-tick.43b94c3a.svg +1 -0
- package/dist/static/nudge-swipe.3b97c01a.json +1 -0
- package/dist/static/pill-tick.c06f606d.json +1 -0
- package/dist/static/points-badge.96bdecc9.svg +1 -0
- package/dist/static/star-badge.5450c267.svg +1 -0
- package/dist/static/up-arrow-badge.71fe7ad1.svg +1 -0
- package/package.json +2 -2
- package/dist/assets/line-icons/icons/carat-left.js +0 -26
- package/dist/assets/line-icons/icons/carat-left.js.map +0 -1
- package/dist/assets/line-icons/icons/carat-right.js +0 -26
- package/dist/assets/line-icons/icons/carat-right.js.map +0 -1
- package/dist/features/circle-games/game-launcher/api/get-content-for-today/constants.js.map +0 -1
- package/dist/features/circle-games/game-launcher/api/get-content-for-today/get-circle-home-api.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/card-container/card-container-styled.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/card-container/card-container.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/card-container/constants.js +0 -7
- package/dist/features/circle-games/game-launcher/comps/card-container/constants.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/carousel/carousel-styled.js +0 -39
- package/dist/features/circle-games/game-launcher/comps/carousel/carousel-styled.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/carousel/carousel.js +0 -85
- package/dist/features/circle-games/game-launcher/comps/carousel/carousel.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/segmented-game-card/constants.js +0 -12
- package/dist/features/circle-games/game-launcher/comps/segmented-game-card/constants.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card-styled.js +0 -138
- package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card-styled.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card.js +0 -105
- package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/constants.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/infinite-button/infinite-mode-launcher-button.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/spl-events-text/constants.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/spl-events-text/spl-events-text-style.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/spl-events-text/spl-events-text-types.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/spl-events-text/spl-events-text.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode/table-mode-styled.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode/table-mode.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode-star/constants.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode-star/table-mode-star-styled.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode-star/table-mode-star.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-segment-star/table-segment-star-styled.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-segment-star/table-segment-star.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card-styled.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card.js.map +0 -1
- package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/helper.js +0 -73
- package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/helper.js.map +0 -1
- package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js.map +0 -1
- package/dist/features/circle-games/game-launcher/game-launcher-analytics-events.js +0 -12
- package/dist/features/circle-games/game-launcher/game-launcher-analytics-events.js.map +0 -1
- package/dist/features/circle-games/game-launcher/game-launcher.js +0 -219
- package/dist/features/circle-games/game-launcher/game-launcher.js.map +0 -1
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/constants.js +0 -8
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/constants.js.map +0 -1
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js +0 -286
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js.map +0 -1
- package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/constants.js +0 -10
- package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/constants.js.map +0 -1
- package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey-styled.js +0 -13
- package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey-styled.js.map +0 -1
- package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey.js +0 -137
- package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey.js.map +0 -1
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/constants.js +0 -14
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/constants.js.map +0 -1
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey-styled.js +0 -13
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey-styled.js.map +0 -1
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js +0 -230
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js.map +0 -1
- /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/api/get-content-for-today/get-circle-home-api.js +0 -0
- /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/card-container/card-container-styled.js +0 -0
- /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/card-container/card-container.js +0 -0
- /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/constants.js +0 -0
- /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/infinite-button/infinite-mode-launcher-button.js +0 -0
- /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/spl-events-text/constants.js +0 -0
- /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/spl-events-text/spl-events-text-style.js +0 -0
- /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/spl-events-text/spl-events-text-types.js +0 -0
- /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/spl-events-text/spl-events-text.js +0 -0
- /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/table-mode/table-mode-styled.js +0 -0
- /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/table-mode/table-mode.js +0 -0
- /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/table-mode-star/constants.js +0 -0
- /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/table-mode-star/table-mode-star-styled.js +0 -0
- /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/table-segment-star/table-segment-star-styled.js +0 -0
- /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/tables-card-styled.js +0 -0
- /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js +0 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { jsx as e, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { memo as $, useState as h, useMemo as x, useCallback as u, useEffect as v } from "react";
|
|
3
|
+
import { useTheme as C } from "styled-components";
|
|
4
|
+
import V from "../../../assets/line-icons/icons/back2.js";
|
|
5
|
+
import { useGetTrackedViews as y } from "../../journey/hooks/use-get-tracked-views.js";
|
|
6
|
+
import { TRACKING_ID_STUDENT as k } from "../../journey/tracking-id/tracking-id-student.js";
|
|
7
|
+
import { useJourney as g } from "../../journey/use-journey/use-journey.js";
|
|
8
|
+
import N from "../../ui/buttons/button/button.js";
|
|
9
|
+
import B from "../../ui/buttons/icon-button/icon-button.js";
|
|
10
|
+
import p from "../../ui/separator/separator.js";
|
|
11
|
+
import I from "../../ui/text/text.js";
|
|
12
|
+
import { ArcContainer as F } from "../comps/arc-container/arc-container.js";
|
|
13
|
+
import { getAboutGameActivitiesStepsForKTo1 as O, getAboutGameActivitiesSteps as D } from "./about-game-activities-constants.js";
|
|
14
|
+
import { Container as M, ContentArea as L, VideoContainer as U, Video as H, Header as j, Footer as z, NavigationContainer as K } from "./about-game-activities-styled.js";
|
|
15
|
+
import { EDeviceType as P } from "../../ui/theme/constants.js";
|
|
16
|
+
const W = $(({ show: s = !1, isGradeKTo1: E = !1, onShowInfoChange: o }) => {
|
|
17
|
+
const { device: G } = C(), n = G <= P.TABLET, [t, c] = h(0), { trackView: f } = g(), A = y().includes(
|
|
18
|
+
k.INFO_ABOUT_GAME_ACTIVITIES
|
|
19
|
+
), [a, T] = h(!A || s), l = x(() => E ? O(n) : D(n), [n]), b = t === 0, r = t === l.length - 1, i = l[t], d = u(() => {
|
|
20
|
+
T(!1);
|
|
21
|
+
}, []), S = u(() => {
|
|
22
|
+
t > 0 && c(t - 1);
|
|
23
|
+
}, [t]), _ = u(() => {
|
|
24
|
+
t < l.length - 1 && c(t + 1), r && (f(k.INFO_ABOUT_GAME_ACTIVITIES), d());
|
|
25
|
+
}, [t, d, r, f]);
|
|
26
|
+
return v(() => {
|
|
27
|
+
s && (T(!0), c(0));
|
|
28
|
+
}, [s]), v(() => {
|
|
29
|
+
o == null || o(a);
|
|
30
|
+
}, [a, o]), i ? a && /* @__PURE__ */ e(F, { onClose: A ? d : void 0, children: /* @__PURE__ */ m(M, { children: [
|
|
31
|
+
/* @__PURE__ */ e(L, { children: /* @__PURE__ */ e(U, { children: /* @__PURE__ */ m(H, { playsInline: !0, autoPlay: !0, loop: !0, muted: !0, children: [
|
|
32
|
+
/* @__PURE__ */ e("source", { src: i.videoUrl, type: "video/mp4" }),
|
|
33
|
+
"Your browser does not support the video tag."
|
|
34
|
+
] }, t) }) }),
|
|
35
|
+
/* @__PURE__ */ e(p, { height: 40 }),
|
|
36
|
+
/* @__PURE__ */ e(j, { children: /* @__PURE__ */ e(I, { $renderAs: "ah4-bold", $renderOnMobileAs: "ab1-black", $color: "WHITE", $align: "center", children: i.headerText }) }),
|
|
37
|
+
/* @__PURE__ */ e(p, { height: 32 }),
|
|
38
|
+
/* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(I, { $renderAs: "ub1", $renderOnMobileAs: "ub2", $color: "WHITE_T_87", $align: "center", children: i.footerText }) }),
|
|
39
|
+
/* @__PURE__ */ e(p, { height: 40 }),
|
|
40
|
+
/* @__PURE__ */ m(K, { $isFirstStep: b, children: [
|
|
41
|
+
!b && /* @__PURE__ */ e(
|
|
42
|
+
B,
|
|
43
|
+
{
|
|
44
|
+
Icon: V,
|
|
45
|
+
onClick: S,
|
|
46
|
+
disabled: !1,
|
|
47
|
+
size: "small",
|
|
48
|
+
analyticsLabel: "previous-step",
|
|
49
|
+
renderAs: "black-dark"
|
|
50
|
+
}
|
|
51
|
+
),
|
|
52
|
+
/* @__PURE__ */ e(
|
|
53
|
+
N,
|
|
54
|
+
{
|
|
55
|
+
label: r ? "Get Started" : "Next",
|
|
56
|
+
onClick: _,
|
|
57
|
+
disabled: !1,
|
|
58
|
+
size: "small",
|
|
59
|
+
analyticsLabel: r ? "get-started" : "next-step",
|
|
60
|
+
renderAs: r ? "secondary-dark" : "black-dark"
|
|
61
|
+
}
|
|
62
|
+
)
|
|
63
|
+
] })
|
|
64
|
+
] }) }) : null;
|
|
65
|
+
}), ae = W;
|
|
66
|
+
export {
|
|
67
|
+
ae as default
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=about-game-activities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"about-game-activities.js","sources":["../../../../src/features/circle-games/about-game-activities/about-game-activities.tsx"],"sourcesContent":["import { useState, useCallback, memo, useMemo, useEffect } from 'react';\nimport type { FC } from 'react';\nimport { useTheme } from 'styled-components';\n\n\nimport BackIcon from '../../../assets/line-icons/icons/back2';\nimport { useGetTrackedViews } from '../../journey/hooks/use-get-tracked-views';\nimport { TRACKING_ID_STUDENT } from '../../journey/tracking-id/tracking-id-student';\nimport { useJourney } from '../../journey/use-journey/use-journey';\nimport Button from '../../ui/buttons/button/button';\nimport IconButton from '../../ui/buttons/icon-button/icon-button';\nimport Separator from '../../ui/separator/separator';\nimport Text from '../../ui/text/text';\nimport { ArcContainer } from '../comps/arc-container/arc-container';\nimport { getAboutGameActivitiesSteps, getAboutGameActivitiesStepsForKTo1 } from './about-game-activities-constants';\nimport * as Styled from './about-game-activities-styled';\nimport type { IAboutGameActivitiesProps } from './about-game-activities-types';\nimport { EDeviceType } from '../../ui/theme/constants';\n\nconst AboutGameActivities: FC<IAboutGameActivitiesProps> = memo(({ show = false, isGradeKTo1 = false, onShowInfoChange }) => {\n const { device } = useTheme();\n const isTouchDevice = device <= EDeviceType.TABLET;\n const [currentStep, setCurrentStep] = useState(0);\n const { trackView } = useJourney();\n const trackedViews = useGetTrackedViews();\n const isInfoAboutGameActivitiesViewed = trackedViews.includes(\n TRACKING_ID_STUDENT.INFO_ABOUT_GAME_ACTIVITIES,\n );\n const [showInfo, setShowInfo] = useState(!isInfoAboutGameActivitiesViewed || show);\n \n\n const steps = useMemo(() => isGradeKTo1 ? getAboutGameActivitiesStepsForKTo1(isTouchDevice):getAboutGameActivitiesSteps(isTouchDevice), [isTouchDevice]);\n const isFirstStep = currentStep === 0;\n const isLastStep = currentStep === steps.length - 1;\n\n const currentStepData = steps[currentStep];\n\n\n const handleClose = useCallback(() => {\n setShowInfo(false);\n }, []);\n\n const handlePrevious = useCallback(() => {\n if (currentStep > 0) {\n setCurrentStep(currentStep - 1);\n }\n }, [currentStep]);\n\n const handleNext = useCallback(() => {\n if (currentStep < steps.length - 1) {\n setCurrentStep(currentStep + 1);\n }\n\n if (isLastStep) {\n trackView(TRACKING_ID_STUDENT.INFO_ABOUT_GAME_ACTIVITIES);\n handleClose();\n }\n }, [currentStep, handleClose, isLastStep, trackView]);\n\n useEffect(() => {\n if (show) {\n setShowInfo(true);\n setCurrentStep(0);\n }\n }, [show]);\n\n useEffect(() => {\n onShowInfoChange?.(showInfo);\n }, [showInfo, onShowInfoChange]);\n\n\n if (!currentStepData) {\n return null;\n }\n\n return (\n showInfo && (\n <ArcContainer onClose={isInfoAboutGameActivitiesViewed ? handleClose : undefined}>\n <Styled.Container>\n\n <Styled.ContentArea>\n <Styled.VideoContainer>\n <Styled.Video key={currentStep} playsInline autoPlay loop muted>\n <source src={currentStepData.videoUrl} type=\"video/mp4\" />\n Your browser does not support the video tag.\n </Styled.Video>\n </Styled.VideoContainer>\n </Styled.ContentArea>\n\n <Separator height={40} />\n <Styled.Header>\n <Text $renderAs=\"ah4-bold\" $renderOnMobileAs=\"ab1-black\" $color=\"WHITE\" $align=\"center\">\n {currentStepData.headerText}\n </Text>\n </Styled.Header>\n\n <Separator height={32} />\n\n <Styled.Footer>\n <Text $renderAs=\"ub1\" $renderOnMobileAs=\"ub2\" $color=\"WHITE_T_87\" $align=\"center\">\n {currentStepData.footerText}\n </Text>\n </Styled.Footer>\n\n <Separator height={40} />\n\n <Styled.NavigationContainer $isFirstStep={isFirstStep}>\n {!isFirstStep && (\n <IconButton\n Icon={BackIcon}\n onClick={handlePrevious}\n disabled={false}\n size=\"small\"\n analyticsLabel=\"previous-step\"\n renderAs=\"black-dark\"\n />\n )}\n <Button\n label={isLastStep ? 'Get Started' : 'Next'}\n onClick={handleNext}\n disabled={false}\n size=\"small\"\n analyticsLabel={isLastStep ? 'get-started' : 'next-step'}\n renderAs={isLastStep ? 'secondary-dark' : 'black-dark'}\n />\n </Styled.NavigationContainer>\n </Styled.Container>\n </ArcContainer>\n )\n );\n});\n\nexport default AboutGameActivities;\n"],"names":["AboutGameActivities","memo","show","isGradeKTo1","onShowInfoChange","device","useTheme","isTouchDevice","EDeviceType","currentStep","setCurrentStep","useState","trackView","useJourney","isInfoAboutGameActivitiesViewed","useGetTrackedViews","TRACKING_ID_STUDENT","showInfo","setShowInfo","steps","useMemo","getAboutGameActivitiesStepsForKTo1","getAboutGameActivitiesSteps","isFirstStep","isLastStep","currentStepData","handleClose","useCallback","handlePrevious","handleNext","useEffect","jsx","ArcContainer","jsxs","Styled.Container","Styled.ContentArea","Styled.VideoContainer","Styled.Video","Separator","Styled.Header","Text","Styled.Footer","Styled.NavigationContainer","IconButton","BackIcon","Button","AboutGameActivities$1"],"mappings":";;;;;;;;;;;;;;;AAmBA,MAAMA,IAAqDC,EAAK,CAAC,EAAE,MAAAC,IAAO,IAAO,aAAAC,IAAc,IAAO,kBAAAC,QAAuB;AACrH,QAAA,EAAE,QAAAC,MAAWC,KACbC,IAAgBF,KAAUG,EAAY,QACtC,CAACC,GAAaC,CAAc,IAAIC,EAAS,CAAC,GAC1C,EAAE,WAAAC,MAAcC,KAEhBC,IADeC,IACgC;AAAA,IACnDC,EAAoB;AAAA,EAAA,GAEhB,CAACC,GAAUC,CAAW,IAAIP,EAAS,CAACG,KAAmCZ,CAAI,GAG3EiB,IAAQC,EAAQ,MAAMjB,IAAckB,EAAmCd,CAAa,IAAEe,EAA4Bf,CAAa,GAAG,CAACA,CAAa,CAAC,GACjJgB,IAAcd,MAAgB,GAC9Be,IAAaf,MAAgBU,EAAM,SAAS,GAE5CM,IAAkBN,EAAMV,CAAW,GAGnCiB,IAAcC,EAAY,MAAM;AACpC,IAAAT,EAAY,EAAK;AAAA,EACnB,GAAG,CAAE,CAAA,GAECU,IAAiBD,EAAY,MAAM;AACvC,IAAIlB,IAAc,KAChBC,EAAeD,IAAc,CAAC;AAAA,EAChC,GACC,CAACA,CAAW,CAAC,GAEVoB,IAAaF,EAAY,MAAM;AAC/B,IAAAlB,IAAcU,EAAM,SAAS,KAC/BT,EAAeD,IAAc,CAAC,GAG5Be,MACFZ,EAAUI,EAAoB,0BAA0B,GAC5CU;KAEb,CAACjB,GAAaiB,GAAaF,GAAYZ,CAAS,CAAC;AAcpD,SAZAkB,EAAU,MAAM;AACd,IAAI5B,MACFgB,EAAY,EAAI,GAChBR,EAAe,CAAC;AAAA,EAClB,GACC,CAACR,CAAI,CAAC,GAET4B,EAAU,MAAM;AACd,IAAA1B,KAAA,QAAAA,EAAmBa;AAAA,EAAQ,GAC1B,CAACA,GAAUb,CAAgB,CAAC,GAG1BqB,IAKHR,KACG,gBAAAc,EAAAC,GAAA,EAAa,SAASlB,IAAkCY,IAAc,QACrE,UAAA,gBAAAO,EAACC,GAAA,EAEC,UAAA;AAAA,IAAA,gBAAAH,EAACI,GAAA,EACC,4BAACC,GAAA,EACC,UAAC,gBAAAH,EAAAI,GAAA,EAA+B,aAAW,IAAC,UAAQ,IAAC,MAAI,IAAC,OAAK,IAC7D,UAAA;AAAA,MAAA,gBAAAN,EAAC,UAAO,EAAA,KAAKN,EAAgB,UAAU,MAAK,aAAY;AAAA,MAAE;AAAA,IAAA,KADzChB,CAGnB,EACF,CAAA,GACF;AAAA,IAEA,gBAAAsB,EAACO,GAAU,EAAA,QAAQ,GAAI,CAAA;AAAA,sBACZC,GAAA,EACT,UAAA,gBAAAR,EAACS,KAAK,WAAU,YAAW,mBAAkB,aAAY,QAAO,SAAQ,QAAO,UAC5E,UAAAf,EAAgB,WACnB,CAAA,GACF;AAAA,IAEA,gBAAAM,EAACO,GAAU,EAAA,QAAQ,GAAI,CAAA;AAAA,sBAEtBG,GAAA,EACC,UAAA,gBAAAV,EAACS,KAAK,WAAU,OAAM,mBAAkB,OAAM,QAAO,cAAa,QAAO,UACtE,UAAAf,EAAgB,WACnB,CAAA,GACF;AAAA,IAEA,gBAAAM,EAACO,GAAU,EAAA,QAAQ,GAAI,CAAA;AAAA,IAEtB,gBAAAL,EAAAS,GAAA,EAA2B,cAAcnB,GACvC,UAAA;AAAA,MAAA,CAACA,KACA,gBAAAQ;AAAA,QAACY;AAAA,QAAA;AAAA,UACC,MAAMC;AAAAA,UACN,SAAShB;AAAA,UACT,UAAU;AAAA,UACV,MAAK;AAAA,UACL,gBAAe;AAAA,UACf,UAAS;AAAA,QAAA;AAAA,MACX;AAAA,MAEF,gBAAAG;AAAA,QAACc;AAAA,QAAA;AAAA,UACC,OAAOrB,IAAa,gBAAgB;AAAA,UACpC,SAASK;AAAA,UACT,UAAU;AAAA,UACV,MAAK;AAAA,UACL,gBAAgBL,IAAa,gBAAgB;AAAA,UAC7C,UAAUA,IAAa,mBAAmB;AAAA,QAAA;AAAA,MAC5C;AAAA,IAAA,GACF;AAAA,EAAA,EACF,CAAA,EACF,CAAA,IAvDK;AA0DX,CAAC,GAEDsB,KAAe9C;"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { styled as i } from "styled-components";
|
|
2
|
+
import { BLUR_VIEW_Z_INDEX as o, ARC_HEIGHT as e, CROSS_Z_INDEX as r, ARC_CONTENT_Z_INDEX as s } from "./constants.js";
|
|
3
|
+
const c = i.div`
|
|
4
|
+
position: absolute;
|
|
5
|
+
top: 0;
|
|
6
|
+
left: 0;
|
|
7
|
+
right: 0;
|
|
8
|
+
bottom: 0;
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
user-select: none;
|
|
14
|
+
z-index: ${o};
|
|
15
|
+
`, d = i.div`
|
|
16
|
+
position: absolute;
|
|
17
|
+
height: inherit;
|
|
18
|
+
width: inherit;
|
|
19
|
+
background: ${({ theme: t }) => t.colors.WHITE_T_05};
|
|
20
|
+
z-index: ${o};
|
|
21
|
+
backdrop-filter: blur(4px);
|
|
22
|
+
`, p = i.div`
|
|
23
|
+
position: absolute;
|
|
24
|
+
height: inherit;
|
|
25
|
+
width: inherit;
|
|
26
|
+
background: ${({ theme: t }) => t.colors.TRANSPARENT};
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: flex-end;
|
|
29
|
+
z-index: ${o};
|
|
30
|
+
`, f = i.div`
|
|
31
|
+
position: relative;
|
|
32
|
+
height: auto;
|
|
33
|
+
display: flex;
|
|
34
|
+
flex: 1;
|
|
35
|
+
flex-direction: column;
|
|
36
|
+
align-items: center;
|
|
37
|
+
justify-content: center;
|
|
38
|
+
background: ${({ theme: t }) => t.colors.BLACK_2};
|
|
39
|
+
max-height: calc(100% - ${e + 80}px);
|
|
40
|
+
`, h = i.div`
|
|
41
|
+
position: absolute;
|
|
42
|
+
z-index: ${({ $zIndex: t }) => t};
|
|
43
|
+
top: ${({ top: t }) => t}px;
|
|
44
|
+
display: flex;
|
|
45
|
+
width: ${({ width: t }) => t};
|
|
46
|
+
border-top-right-radius: ${({ width: t }) => t};
|
|
47
|
+
border-top-left-radius: ${({ width: t }) => t};
|
|
48
|
+
aspect-ratio: 1;
|
|
49
|
+
transform: scaleX(2);
|
|
50
|
+
background: ${({ theme: t, showGradient: n }) => n ? `linear-gradient(
|
|
51
|
+
270deg,
|
|
52
|
+
rgba(255, 255, 255, 0.15) 0%,
|
|
53
|
+
#ffffff 50%,
|
|
54
|
+
rgba(255, 255, 255, 0.15) 100%
|
|
55
|
+
)` : t.colors.BLACK_2};
|
|
56
|
+
`, u = i.div`
|
|
57
|
+
position: absolute;
|
|
58
|
+
top: -${e + 48}px;
|
|
59
|
+
z-index: ${r};
|
|
60
|
+
cursor: pointer;
|
|
61
|
+
`, x = i.div`
|
|
62
|
+
position: relative;
|
|
63
|
+
z-index: ${s};
|
|
64
|
+
width: 100%;
|
|
65
|
+
height: 100%;
|
|
66
|
+
overflow: auto;
|
|
67
|
+
`;
|
|
68
|
+
export {
|
|
69
|
+
h as Arc,
|
|
70
|
+
p as ArcContainer,
|
|
71
|
+
d as ArcContainerOverlay,
|
|
72
|
+
c as ArcContainerWrapper,
|
|
73
|
+
x as ArcContent,
|
|
74
|
+
f as ArcContentContainer,
|
|
75
|
+
u as CrossIconContainer
|
|
76
|
+
};
|
|
77
|
+
//# sourceMappingURL=arc-container-styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arc-container-styled.js","sources":["../../../../../src/features/circle-games/comps/arc-container/arc-container-styled.tsx"],"sourcesContent":["import { styled } from 'styled-components';\n\nimport { ARC_CONTENT_Z_INDEX, ARC_HEIGHT, BLUR_VIEW_Z_INDEX, CROSS_Z_INDEX } from './constants';\n\nexport const ArcContainerWrapper = styled.div`\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n user-select: none;\n z-index: ${BLUR_VIEW_Z_INDEX};\n`;\n\nexport const ArcContainerOverlay = styled.div`\n position: absolute;\n height: inherit;\n width: inherit;\n background: ${({ theme }) => theme.colors.WHITE_T_05};\n z-index: ${BLUR_VIEW_Z_INDEX};\n backdrop-filter: blur(4px);\n`;\n\nexport const ArcContainer = styled.div`\n position: absolute;\n height: inherit;\n width: inherit;\n background: ${({ theme }) => theme.colors.TRANSPARENT};\n display: flex;\n align-items: flex-end;\n z-index: ${BLUR_VIEW_Z_INDEX};\n`;\n\nexport const ArcContentContainer = styled.div`\n position: relative;\n height: auto;\n display: flex;\n flex: 1;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n background: ${({ theme }) => theme.colors.BLACK_2};\n max-height: calc(100% - ${ARC_HEIGHT + 80}px);\n`;\n\nexport const Arc = styled.div<{\n width?: string;\n top: number;\n showGradient?: boolean;\n $zIndex?: number;\n}>`\n position: absolute;\n z-index: ${({ $zIndex }) => $zIndex};\n top: ${({ top }) => top}px;\n display: flex;\n width: ${({ width }) => width};\n border-top-right-radius: ${({ width }) => width};\n border-top-left-radius: ${({ width }) => width};\n aspect-ratio: 1;\n transform: scaleX(2);\n background: ${({ theme, showGradient }) =>\n showGradient\n ? `linear-gradient(\n 270deg,\n rgba(255, 255, 255, 0.15) 0%,\n #ffffff 50%,\n rgba(255, 255, 255, 0.15) 100%\n )`\n : theme.colors.BLACK_2};\n`;\n\nexport const CrossIconContainer = styled.div`\n position: absolute;\n top: -${ARC_HEIGHT + 48}px;\n z-index: ${CROSS_Z_INDEX};\n cursor: pointer;\n`;\n\nexport const ArcContent = styled.div`\n position: relative;\n z-index: ${ARC_CONTENT_Z_INDEX};\n width: 100%;\n height: 100%;\n overflow: auto;\n`;\n"],"names":["ArcContainerWrapper","styled","BLUR_VIEW_Z_INDEX","ArcContainerOverlay","theme","ArcContainer","ArcContentContainer","ARC_HEIGHT","Arc","$zIndex","top","width","showGradient","CrossIconContainer","CROSS_Z_INDEX","ArcContent","ARC_CONTENT_Z_INDEX"],"mappings":";;AAIO,MAAMA,IAAsBC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAW7BC,CAAiB;AAAA,GAGjBC,IAAsBF,EAAO;AAAA;AAAA;AAAA;AAAA,gBAI1B,CAAC,EAAE,OAAAG,EAAA,MAAYA,EAAM,OAAO,UAAU;AAAA,aACzCF,CAAiB;AAAA;AAAA,GAIjBG,IAAeJ,EAAO;AAAA;AAAA;AAAA;AAAA,gBAInB,CAAC,EAAE,OAAAG,EAAA,MAAYA,EAAM,OAAO,WAAW;AAAA;AAAA;AAAA,aAG1CF,CAAiB;AAAA,GAGjBI,IAAsBL,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAQ1B,CAAC,EAAE,OAAAG,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA,4BACvBG,IAAa,EAAE;AAAA,GAG9BC,IAAMP,EAAO;AAAA;AAAA,aAOb,CAAC,EAAE,SAAAQ,EAAQ,MAAMA,CAAO;AAAA,SAC5B,CAAC,EAAE,KAAAC,EAAI,MAAMA,CAAG;AAAA;AAAA,WAEd,CAAC,EAAE,OAAAC,EAAM,MAAMA,CAAK;AAAA,6BACF,CAAC,EAAE,OAAAA,EAAM,MAAMA,CAAK;AAAA,4BACrB,CAAC,EAAE,OAAAA,EAAM,MAAMA,CAAK;AAAA;AAAA;AAAA,gBAGhC,CAAC,EAAE,OAAAP,GAAO,cAAAQ,QACtBA,IACI;AAAA;AAAA;AAAA;AAAA;AAAA,OAMAR,EAAM,OAAO,OAAO;AAAA,GAGfS,IAAqBZ,EAAO;AAAA;AAAA,UAE/BM,IAAa,EAAE;AAAA,aACZO,CAAa;AAAA;AAAA,GAIbC,IAAad,EAAO;AAAA;AAAA,aAEpBe,CAAmB;AAAA;AAAA;AAAA;AAAA;"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx as r, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
import { memo as c } from "react";
|
|
3
|
+
import C from "../../../../assets/line-icons/icons/cross.js";
|
|
4
|
+
import m from "../../../ui/layout/flex-view.js";
|
|
5
|
+
import { ArcContainerWrapper as a, ArcContainerOverlay as p, ArcContainer as s, ArcContentContainer as A, CrossIconContainer as d, Arc as o, ArcContent as h } from "./arc-container-styled.js";
|
|
6
|
+
import { ARC_HEIGHT as e, WHITE_ARC_Z_INDEX as l, BLACK_ARC_Z_INDEX as I } from "./constants.js";
|
|
7
|
+
const H = c(({ children: i, onClose: n }) => /* @__PURE__ */ r(a, { children: /* @__PURE__ */ t(
|
|
8
|
+
m,
|
|
9
|
+
{
|
|
10
|
+
$position: "relative",
|
|
11
|
+
$height: "100%",
|
|
12
|
+
$width: "100%",
|
|
13
|
+
$alignItems: "center",
|
|
14
|
+
$justifyContent: "center",
|
|
15
|
+
children: [
|
|
16
|
+
/* @__PURE__ */ r(p, {}),
|
|
17
|
+
/* @__PURE__ */ r(s, { children: /* @__PURE__ */ t(A, { children: [
|
|
18
|
+
n && /* @__PURE__ */ r(d, { onClick: n, children: /* @__PURE__ */ r(C, { color: "WHITE" }) }),
|
|
19
|
+
/* @__PURE__ */ r(
|
|
20
|
+
o,
|
|
21
|
+
{
|
|
22
|
+
top: -(e + 3),
|
|
23
|
+
showGradient: !0,
|
|
24
|
+
width: "112%",
|
|
25
|
+
$zIndex: l
|
|
26
|
+
}
|
|
27
|
+
),
|
|
28
|
+
/* @__PURE__ */ r(o, { top: -e, $zIndex: I, width: "112%" }),
|
|
29
|
+
/* @__PURE__ */ r(h, { children: i })
|
|
30
|
+
] }) })
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
) }));
|
|
34
|
+
export {
|
|
35
|
+
H as ArcContainer
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=arc-container.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arc-container.js","sources":["../../../../../src/features/circle-games/comps/arc-container/arc-container.tsx"],"sourcesContent":["import { memo } from 'react';\n\nimport CrossIcon from '../../../../assets/line-icons/icons/cross';\nimport FlexView from '../../../ui/layout/flex-view';\nimport * as Styled from './arc-container-styled';\nimport type { IArcContainerProps } from './arc-container-types';\nimport { ARC_HEIGHT, BLACK_ARC_Z_INDEX, WHITE_ARC_Z_INDEX } from './constants';\n\nexport const ArcContainer = memo(({ children, onClose }: IArcContainerProps) => {\n return (\n <Styled.ArcContainerWrapper>\n <FlexView\n $position=\"relative\"\n $height=\"100%\"\n $width=\"100%\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n <Styled.ArcContainerOverlay />\n <Styled.ArcContainer>\n <Styled.ArcContentContainer>\n {onClose && (\n <Styled.CrossIconContainer onClick={onClose}>\n <CrossIcon color=\"WHITE\" />\n </Styled.CrossIconContainer>\n )}\n <Styled.Arc\n top={-(ARC_HEIGHT + 3)}\n showGradient={true}\n width=\"112%\"\n $zIndex={WHITE_ARC_Z_INDEX}\n />\n <Styled.Arc top={-ARC_HEIGHT} $zIndex={BLACK_ARC_Z_INDEX} width=\"112%\" />\n\n <Styled.ArcContent>{children}</Styled.ArcContent>\n </Styled.ArcContentContainer>\n </Styled.ArcContainer>\n </FlexView>\n </Styled.ArcContainerWrapper>\n );\n});\n"],"names":["ArcContainer","memo","children","onClose","jsx","Styled.ArcContainerWrapper","jsxs","FlexView","Styled.ArcContainerOverlay","Styled.ArcContainer","Styled.ArcContentContainer","Styled.CrossIconContainer","CrossIcon","Styled.Arc","ARC_HEIGHT","WHITE_ARC_Z_INDEX","BLACK_ARC_Z_INDEX","Styled.ArcContent"],"mappings":";;;;;;AAQO,MAAMA,IAAeC,EAAK,CAAC,EAAE,UAAAC,GAAU,SAAAC,QAE1C,gBAAAC,EAACC,GAAA,EACC,UAAA,gBAAAC;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,WAAU;AAAA,IACV,SAAQ;AAAA,IACR,QAAO;AAAA,IACP,aAAY;AAAA,IACZ,iBAAgB;AAAA,IAEhB,UAAA;AAAA,MAAC,gBAAAH,EAAAI,GAAA,EAA2B;AAAA,wBAC3BC,GAAA,EACC,UAAC,gBAAAH,EAAAI,GAAA,EACE,UAAA;AAAA,QACCP,KAAA,gBAAAC,EAACO,GAAA,EAA0B,SAASR,GAClC,UAAC,gBAAAC,EAAAQ,GAAA,EAAU,OAAM,QAAA,CAAQ,EAC3B,CAAA;AAAA,QAEF,gBAAAR;AAAA,UAACS;AAAAA,UAAA;AAAA,YACC,KAAK,EAAEC,IAAa;AAAA,YACpB,cAAc;AAAA,YACd,OAAM;AAAA,YACN,SAASC;AAAA,UAAA;AAAA,QACX;AAAA,QACA,gBAAAX,EAACS,GAAA,EAAW,KAAK,CAACC,GAAY,SAASE,GAAmB,OAAM,QAAO;AAAA,QAEtE,gBAAAZ,EAAAa,GAAA,EAAmB,UAAAf,GAAS;AAAA,MAAA,EAAA,CAC/B,EACF,CAAA;AAAA,IAAA;AAAA,EAAA;AAEJ,EAAA,CAAA,CAEH;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const _ = 100, E = 101, I = 102, N = 103, C = 104, R = 48;
|
|
2
|
+
export {
|
|
3
|
+
N as ARC_CONTENT_Z_INDEX,
|
|
4
|
+
R as ARC_HEIGHT,
|
|
5
|
+
I as BLACK_ARC_Z_INDEX,
|
|
6
|
+
_ as BLUR_VIEW_Z_INDEX,
|
|
7
|
+
C as CROSS_Z_INDEX,
|
|
8
|
+
E as WHITE_ARC_Z_INDEX
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../../src/features/circle-games/comps/arc-container/constants.ts"],"sourcesContent":["export const BLUR_VIEW_Z_INDEX = 100;\nexport const WHITE_ARC_Z_INDEX = BLUR_VIEW_Z_INDEX + 1;\nexport const BLACK_ARC_Z_INDEX = WHITE_ARC_Z_INDEX + 1;\nexport const ARC_CONTENT_Z_INDEX = BLACK_ARC_Z_INDEX + 1;\nexport const CROSS_Z_INDEX = ARC_CONTENT_Z_INDEX + 1;\nexport const ARC_HEIGHT = 48;\n"],"names":["BLUR_VIEW_Z_INDEX","WHITE_ARC_Z_INDEX","BLACK_ARC_Z_INDEX","ARC_CONTENT_Z_INDEX","CROSS_Z_INDEX","ARC_HEIGHT"],"mappings":"AAAO,MAAMA,IAAoB,KACpBC,IAAoB,KACpBC,IAAoB,KACpBC,IAAsB,KACtBC,IAAgB,KAChBC,IAAa;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"info-bar.js","sources":["../../../../../src/features/circle-games/comps/info-bar/info-bar.tsx"],"sourcesContent":["import { useMemo } from 'react';\n\nimport type { TColorNames, THueNames } from '../../../ui/types';\nimport * as Styled from './info-bar-styled';\nimport type { IInfoBarProps } from './info-bar-types';\n\nconst computeColorsFromHue = (\n hue: THueNames,\n): { backgroundColor: TColorNames; borderColor: TColorNames } => {\n return { backgroundColor: `${hue}_6`, borderColor: `${hue}_4` };\n};\n\nexport const InfoBar:
|
|
1
|
+
{"version":3,"file":"info-bar.js","sources":["../../../../../src/features/circle-games/comps/info-bar/info-bar.tsx"],"sourcesContent":["import { useMemo, type FC } from 'react';\n\nimport type { TColorNames, THueNames } from '../../../ui/types';\nimport * as Styled from './info-bar-styled';\nimport type { IInfoBarProps } from './info-bar-types';\n\nconst computeColorsFromHue = (\n hue: THueNames,\n): { backgroundColor: TColorNames; borderColor: TColorNames } => {\n return { backgroundColor: `${hue}_6`, borderColor: `${hue}_4` };\n};\n\nexport const InfoBar: FC<IInfoBarProps> = ({ children, hue }) => {\n const { backgroundColor, borderColor } = useMemo(() => computeColorsFromHue(hue), [hue]);\n\n return (\n <Styled.InfoBarWrapper $background={backgroundColor} $borderColor={borderColor}>\n {children}\n </Styled.InfoBarWrapper>\n );\n};\n"],"names":["computeColorsFromHue","hue","InfoBar","children","backgroundColor","borderColor","useMemo","jsx","Styled.InfoBarWrapper"],"mappings":";;;AAMA,MAAMA,IAAuB,CAC3BC,OAEO,EAAE,iBAAiB,GAAGA,CAAG,MAAM,aAAa,GAAGA,CAAG,SAG9CC,IAA6B,CAAC,EAAE,UAAAC,GAAU,KAAAF,QAAU;AACzD,QAAA,EAAE,iBAAAG,GAAiB,aAAAC,EAAA,IAAgBC,EAAQ,MAAMN,EAAqBC,CAAG,GAAG,CAACA,CAAG,CAAC;AAGrF,SAAA,gBAAAM,EAACC,GAAA,EAAsB,aAAaJ,GAAiB,cAAcC,GAChE,UAAAF,EACH,CAAA;AAEJ;"}
|
package/dist/features/circle-games/game-launcher-v2/api/get-content-for-today/constants.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../../../src/features/circle-games/game-launcher-v2/api/get-content-for-today/constants.ts"],"sourcesContent":["export const BASE_URL = '/api/v2/circle';\n"],"names":["BASE_URL"],"mappings":"AAAO,MAAMA,IAAW;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-circle-home-api.js","sources":["../../../../../../src/features/circle-games/game-launcher-v2/api/get-content-for-today/get-circle-home-api.ts"],"sourcesContent":["import { createGetAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL } from './constants';\nimport type {\n IGetCircleHomeResponseModel,\n IGetCircleHomePayloadModel,\n} from './get-circle-home-api-types';\n\nexport const { useGet: useGetCircleHomeAPI, invalidate: invalidateCircleHomeAPI } = createGetAPI<\n IGetCircleHomeResponseModel,\n IGetCircleHomePayloadModel\n>({\n getURL: (_, { user_id, grade }) =>\n `${BASE_URL}/circle-home/?intelenrollment_id=${user_id}&grade=${grade}`,\n});\n"],"names":["useGetCircleHomeAPI","invalidateCircleHomeAPI","createGetAPI","_","user_id","grade","BASE_URL"],"mappings":";;AAQO,MAAM,EAAE,QAAQA,GAAqB,YAAYC,EAAA,IAA4BC,EAGlF;AAAA,EACA,QAAQ,CAACC,GAAG,EAAE,SAAAC,GAAS,OAAAC,EACrB,MAAA,GAAGC,CAAQ,oCAAoCF,CAAO,UAAUC,CAAK;AACzE,CAAC;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card-container-styled.js","sources":["../../../../../../src/features/circle-games/game-launcher-v2/comps/card-container/card-container-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\nimport type { TColorNames } from '../../../../ui/types';\nimport { GAME_LAUNCHER_SIZE } from './constants';\n\nexport const CardWrapper = styled.div`\n position: relative;\n display: flex;\n justify-content: center;\n`;\n\nexport const ExtendedFlexView = styled(FlexView)`\n position: absolute;\n top: -28px;\n display: flex;\n justify-content: center;\n`;\n\nexport const CardContainer = styled.div<{ $strokeColor?: TColorNames }>`\n position: relative;\n border-radius: ${GAME_LAUNCHER_SIZE}px;\n border: ${({ $strokeColor }) =>\n $strokeColor ? `2px solid ${$strokeColor}` : '0 solid transparent'};\n height: ${GAME_LAUNCHER_SIZE}px;\n width: ${GAME_LAUNCHER_SIZE}px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n align-self: center;\n backdrop-filter: blur(0px);\n flex-shrink: 0;\n`;\n\nexport const AnimatedLabel = styled(Text)<{ $isAnimated: boolean }>`\n transition: color 0.5s ease-in-out;\n\n ${({ $isAnimated }) =>\n $isAnimated &&\n `\n animation: zoomInOut 1s ease-in-out infinite;\n `}\n\n @keyframes zoomInOut {\n 0% {\n transform: scale(1);\n }\n 50% {\n transform: scale(1.05);\n }\n 100% {\n transform: scale(1);\n }\n }\n`;\n"],"names":["CardWrapper","styled","ExtendedFlexView","FlexView","CardContainer","GAME_LAUNCHER_SIZE","$strokeColor","AnimatedLabel","Text","$isAnimated"],"mappings":";;;;AAOO,MAAMA,IAAcC,EAAO;AAAA;AAAA;AAAA;AAAA,GAMrBC,IAAmBD,EAAOE,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,GAOlCC,IAAgBH,EAAO;AAAA;AAAA,mBAEjBI,CAAkB;AAAA,YACzB,CAAC,EAAE,cAAAC,EAAa,MACxBA,IAAe,aAAaA,CAAY,KAAK,qBAAqB;AAAA,YAC1DD,CAAkB;AAAA,WACnBA,CAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAWhBE,IAAgBN,EAAOO,CAAI;AAAA;AAAA;AAAA,IAGpC,CAAC,EAAE,aAAAC,QACHA,KACA;AAAA;AAAA,KAEC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
package/dist/features/circle-games/game-launcher-v2/comps/card-container/card-container.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card-container.js","sources":["../../../../../../src/features/circle-games/game-launcher-v2/comps/card-container/card-container.tsx"],"sourcesContent":["import type { ForwardRefRenderFunction } from 'react';\nimport { forwardRef, memo } from 'react';\n\nimport * as Styled from './card-container-styled';\nimport type { ICardContainerProps } from './card-container-types';\n\nconst Container: ForwardRefRenderFunction<HTMLDivElement, ICardContainerProps> = (props, ref) => {\n const {\n children,\n strokeColor,\n label,\n isAnimated,\n labelRef,\n showLabel = true,\n labelColor,\n ...rest\n } = props;\n\n return (\n <Styled.CardWrapper {...rest}>\n <Styled.ExtendedFlexView>\n <Styled.AnimatedLabel\n ref={labelRef}\n $renderAs=\"ac4-black\"\n $align=\"center\"\n $color={labelColor}\n $isAnimated={isAnimated}\n >\n {showLabel ? label : ''}\n </Styled.AnimatedLabel>\n </Styled.ExtendedFlexView>\n <Styled.CardContainer ref={ref} $strokeColor={strokeColor}>\n {children}\n </Styled.CardContainer>\n </Styled.CardWrapper>\n );\n};\n\nexport const CardContainer = memo(forwardRef(Container));\n"],"names":["Container","props","ref","children","strokeColor","label","isAnimated","labelRef","showLabel","labelColor","rest","jsxs","Styled.CardWrapper","jsx","Styled.ExtendedFlexView","Styled.AnimatedLabel","Styled.CardContainer","CardContainer","memo","forwardRef"],"mappings":";;;AAMA,MAAMA,IAA2E,CAACC,GAAOC,MAAQ;AACzF,QAAA;AAAA,IACJ,UAAAC;AAAA,IACA,aAAAC;AAAA,IACA,OAAAC;AAAA,IACA,YAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC,IAAY;AAAA,IACZ,YAAAC;AAAA,IACA,GAAGC;AAAA,EACD,IAAAT;AAEJ,SACG,gBAAAU,EAAAC,GAAA,EAAoB,GAAGF,GACtB,UAAA;AAAA,IAAC,gBAAAG,EAAAC,GAAA,EACC,UAAA,gBAAAD;AAAA,MAACE;AAAAA,MAAA;AAAA,QACC,KAAKR;AAAA,QACL,WAAU;AAAA,QACV,QAAO;AAAA,QACP,QAAQE;AAAA,QACR,aAAaH;AAAA,QAEZ,cAAYD,IAAQ;AAAA,MAAA;AAAA,IAAA,GAEzB;AAAA,sBACCW,GAAA,EAAqB,KAAAd,GAAU,cAAcE,GAC3C,UAAAD,GACH;AAAA,EACF,EAAA,CAAA;AAEJ,GAEac,IAAgBC,EAAKC,EAAWnB,CAAS,CAAC;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const _ = 180, A = 296, n = 400;
|
|
2
|
+
let E;
|
|
3
|
+
window.innerWidth >= 600 && window.innerHeight >= 800 ? E = 400 : window.innerWidth >= 350 && window.innerHeight >= 650 ? E = 296 : E = 180;
|
|
4
|
+
const i = E;
|
|
5
|
+
export {
|
|
6
|
+
i as GAME_LAUNCHER_SIZE,
|
|
7
|
+
n as GAME_LAUNCHER_SIZE_LARGE,
|
|
8
|
+
A as GAME_LAUNCHER_SIZE_MEDIUM,
|
|
9
|
+
_ as GAME_LAUNCHER_SIZE_SMALL
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../../../src/features/circle-games/game-launcher-v2/comps/card-container/constants.ts"],"sourcesContent":["export const GAME_LAUNCHER_SIZE_SMALL = 180;\nexport const GAME_LAUNCHER_SIZE_MEDIUM = 296;\nexport const GAME_LAUNCHER_SIZE_LARGE = 400;\n\nlet CARD_CONTAINER_SIZE;\n\nif (window.innerWidth >= 600 && window.innerHeight >= 800) {\n CARD_CONTAINER_SIZE = GAME_LAUNCHER_SIZE_LARGE;\n} else if (window.innerWidth >= 350 && window.innerHeight >= 650) {\n CARD_CONTAINER_SIZE = GAME_LAUNCHER_SIZE_MEDIUM;\n} else {\n CARD_CONTAINER_SIZE = GAME_LAUNCHER_SIZE_SMALL;\n}\n\nexport const GAME_LAUNCHER_SIZE = CARD_CONTAINER_SIZE;\n"],"names":["GAME_LAUNCHER_SIZE_SMALL","GAME_LAUNCHER_SIZE_MEDIUM","GAME_LAUNCHER_SIZE_LARGE","CARD_CONTAINER_SIZE","GAME_LAUNCHER_SIZE"],"mappings":"AAAO,MAAMA,IAA2B,KAC3BC,IAA4B,KAC5BC,IAA2B;AAExC,IAAIC;AAEA,OAAO,cAAc,OAAO,OAAO,eAAe,MAC9BA,IAAA,MACb,OAAO,cAAc,OAAO,OAAO,eAAe,MACrCA,IAAA,MAEAA,IAAA;AAGjB,MAAMC,IAAqBD;"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import t, { css as o } from "styled-components";
|
|
2
|
+
import r from "../../../../ui/layout/flex-view.js";
|
|
3
|
+
import { GAME_LAUNCHER_SIZE as n } from "../card-container/constants.js";
|
|
4
|
+
const c = t.div`
|
|
5
|
+
width: 100%;
|
|
6
|
+
height: 100%;
|
|
7
|
+
position: relative;
|
|
8
|
+
display: flex;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
touch-action: none;
|
|
11
|
+
`, d = t.div`
|
|
12
|
+
display: flex;
|
|
13
|
+
width: 100%;
|
|
14
|
+
flex-grow: 1;
|
|
15
|
+
transform: ${({ $translate: e = 0 }) => `translateX(${-e}%)`};
|
|
16
|
+
transition: ${({ $translateDuration: e }) => `all ${e}ms ease-in`};
|
|
17
|
+
touch-action: none;
|
|
18
|
+
`, f = t.div`
|
|
19
|
+
width: 100%;
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
flex-grow: 1;
|
|
24
|
+
flex-shrink: 0;
|
|
25
|
+
touch-action: none;
|
|
26
|
+
`, x = t.div`
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: row;
|
|
29
|
+
align-items: center;
|
|
30
|
+
padding: 2px;
|
|
31
|
+
gap: 2px;
|
|
32
|
+
background: ${({ theme: e }) => e.colors.BLACK_5 || "#313131"};
|
|
33
|
+
border-radius: 24px;
|
|
34
|
+
margin-top: 20px;
|
|
35
|
+
|
|
36
|
+
/* Desktop overrides only if NOT touch device */
|
|
37
|
+
${({ $isTouchDevice: e }) => !e && o`
|
|
38
|
+
padding: 8px;
|
|
39
|
+
gap: 8px;
|
|
40
|
+
margin-top: 16px;
|
|
41
|
+
`}
|
|
42
|
+
`, u = t.div`
|
|
43
|
+
width: 28px;
|
|
44
|
+
height: 28px;
|
|
45
|
+
display: flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
justify-content: center;
|
|
48
|
+
flex-shrink: 0;
|
|
49
|
+
`, h = t.img`
|
|
50
|
+
width: 100%;
|
|
51
|
+
height: 100%;
|
|
52
|
+
object-fit: contain;
|
|
53
|
+
`;
|
|
54
|
+
t.div`
|
|
55
|
+
position: relative;
|
|
56
|
+
display: inline-block; /* shrink to fit the carousel */
|
|
57
|
+
`;
|
|
58
|
+
const g = t.div`
|
|
59
|
+
position: absolute;
|
|
60
|
+
width: 160%;
|
|
61
|
+
top: 60%;
|
|
62
|
+
left: 50%;
|
|
63
|
+
transform: translate(-50%, -50%);
|
|
64
|
+
pointer-events: none;
|
|
65
|
+
z-index: 2;
|
|
66
|
+
`, m = t.div`
|
|
67
|
+
box-sizing: border-box;
|
|
68
|
+
|
|
69
|
+
/* ------ MOBILE-FIRST STYLES ------ */
|
|
70
|
+
width: 20px;
|
|
71
|
+
height: 20px;
|
|
72
|
+
border-radius: 13.33px;
|
|
73
|
+
display: flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
justify-content: center;
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
color: ${({ $isCompleted: e }) => e ? "transparent" : "#0D0D0D"};
|
|
78
|
+
background: ${({ $isSelected: e, $isCompleted: i }) => i && e ? "#00E573" : i ? "#007038" : e ? "#FFFFFF" : "#313131"};
|
|
79
|
+
|
|
80
|
+
/* ------ DESKTOP OVERRIDES ------ */
|
|
81
|
+
${({ $isTouchDevice: e, $isCompleted: i, $isSelected: s }) => !e && o`
|
|
82
|
+
width: 28px;
|
|
83
|
+
height: 28px;
|
|
84
|
+
border-radius: 16px;
|
|
85
|
+
line-height: 50px;
|
|
86
|
+
border: ${i ? "none" : "1px solid rgba(255, 255, 255, 0.38)"};
|
|
87
|
+
|
|
88
|
+
${!s && !i && o`
|
|
89
|
+
&:hover {
|
|
90
|
+
background: rgba(255, 255, 255, 0.38);
|
|
91
|
+
border: 1px solid #ffffff;
|
|
92
|
+
color: #ffffff;
|
|
93
|
+
}
|
|
94
|
+
`}
|
|
95
|
+
`}
|
|
96
|
+
`, b = t(r)`
|
|
97
|
+
position: absolute;
|
|
98
|
+
top: calc(50% + ${n / 2}px);
|
|
99
|
+
`, v = t(r)`
|
|
100
|
+
position: absolute;
|
|
101
|
+
top: calc(50% + ${56 + n / 2}px);
|
|
102
|
+
justify-content: center;
|
|
103
|
+
align-items: center;
|
|
104
|
+
pointer-events: none;
|
|
105
|
+
${({ theme: e }) => e.mediaQueries.minWidthTablet} {
|
|
106
|
+
top: calc(50% + ${66 + n / 2}px);
|
|
107
|
+
}
|
|
108
|
+
`;
|
|
109
|
+
export {
|
|
110
|
+
c as Carousel,
|
|
111
|
+
x as CarouselContainer,
|
|
112
|
+
m as CarouselItem,
|
|
113
|
+
f as CarouselItemContainer,
|
|
114
|
+
u as CarouselItemWrapper,
|
|
115
|
+
d as CarouselWrapper,
|
|
116
|
+
b as ExtendedFlexView,
|
|
117
|
+
g as OverlappingLottie,
|
|
118
|
+
v as StyledCarouselBadgeWrapper,
|
|
119
|
+
h as TickIcon
|
|
120
|
+
};
|
|
121
|
+
//# sourceMappingURL=carousel-styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"carousel-styled.js","sources":["../../../../../../src/features/circle-games/game-launcher-v2/comps/carousel/carousel-styled.tsx"],"sourcesContent":["import styled, { css } from 'styled-components';\n\nimport FlexView from '../../../../ui/layout/flex-view';\nimport { GAME_LAUNCHER_SIZE } from '../card-container/constants';\nimport type { CarouselContainerProps, CarouselItemProps } from './carousel-types';\n\nexport const Carousel = styled.div`\n width: 100%;\n height: 100%;\n position: relative;\n display: flex;\n justify-content: center;\n touch-action: none;\n`;\nexport const CarouselWrapper = styled.div<{ $translate?: number; $translateDuration?: number }>`\n display: flex;\n width: 100%;\n flex-grow: 1;\n transform: ${({ $translate = 0 }) => `translateX(${-$translate}%)`};\n transition: ${({ $translateDuration }) => `all ${$translateDuration}ms ease-in`};\n touch-action: none;\n`;\n\nexport const CarouselItemContainer = styled.div`\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-grow: 1;\n flex-shrink: 0;\n touch-action: none;\n`;\n\n// StyledComponents.ts\n\nexport const CarouselContainer = styled.div<CarouselContainerProps>`\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 2px;\n gap: 2px;\n background: ${({ theme }) => theme.colors.BLACK_5 || '#313131'};\n border-radius: 24px;\n margin-top: 20px;\n\n /* Desktop overrides only if NOT touch device */\n ${({ $isTouchDevice }) =>\n !$isTouchDevice &&\n css`\n padding: 8px;\n gap: 8px;\n margin-top: 16px;\n `}\n`;\n\nexport const CarouselItemWrapper = styled.div`\n width: 28px;\n height: 28px;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n`;\n\nexport const TickIcon = styled.img`\n width: 100%;\n height: 100%;\n object-fit: contain;\n`;\n\nexport const CarouselWrapperRelative = styled.div`\n position: relative;\n display: inline-block; /* shrink to fit the carousel */\n`;\n\nexport const OverlappingLottie = styled.div`\n position: absolute;\n width: 160%;\n top: 60%;\n left: 50%;\n transform: translate(-50%, -50%);\n pointer-events: none;\n z-index: 2;\n`;\n\nexport const CarouselItem = styled.div<CarouselItemProps>`\n box-sizing: border-box;\n\n /* ------ MOBILE-FIRST STYLES ------ */\n width: 20px;\n height: 20px;\n border-radius: 13.33px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n color: ${({ $isCompleted }) => ($isCompleted ? 'transparent' : '#0D0D0D')};\n background: ${({ $isSelected, $isCompleted }) => {\n if ($isCompleted && $isSelected) return '#00E573';\n\n if ($isCompleted) return '#007038';\n\n if ($isSelected) return '#FFFFFF';\n\n return '#313131';\n }};\n\n /* ------ DESKTOP OVERRIDES ------ */\n ${({ $isTouchDevice, $isCompleted, $isSelected }) =>\n !$isTouchDevice &&\n css`\n width: 28px;\n height: 28px;\n border-radius: 16px;\n line-height: 50px;\n border: ${$isCompleted ? 'none' : '1px solid rgba(255, 255, 255, 0.38)'};\n\n ${!$isSelected &&\n !$isCompleted &&\n css`\n &:hover {\n background: rgba(255, 255, 255, 0.38);\n border: 1px solid #ffffff;\n color: #ffffff;\n }\n `}\n `}\n`;\nexport const ExtendedFlexView = styled(FlexView)`\n position: absolute;\n top: calc(50% + ${GAME_LAUNCHER_SIZE / 2}px);\n`;\n\nexport const StyledCarouselBadgeWrapper = styled(FlexView)`\n position: absolute;\n top: calc(50% + ${56 + GAME_LAUNCHER_SIZE / 2}px);\n justify-content: center;\n align-items: center;\n pointer-events: none;\n ${({ theme }) => theme.mediaQueries.minWidthTablet} {\n top: calc(50% + ${66 + GAME_LAUNCHER_SIZE / 2}px);\n }\n`;\n"],"names":["Carousel","styled","CarouselWrapper","$translate","$translateDuration","CarouselItemContainer","CarouselContainer","theme","$isTouchDevice","css","CarouselItemWrapper","TickIcon","OverlappingLottie","CarouselItem","$isCompleted","$isSelected","ExtendedFlexView","FlexView","GAME_LAUNCHER_SIZE","StyledCarouselBadgeWrapper"],"mappings":";;;AAMO,MAAMA,IAAWC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQlBC,IAAkBD,EAAO;AAAA;AAAA;AAAA;AAAA,eAIvB,CAAC,EAAE,YAAAE,IAAa,QAAQ,cAAc,CAACA,CAAU,IAAI;AAAA,gBACpD,CAAC,EAAE,oBAAAC,EAAyB,MAAA,OAAOA,CAAkB,YAAY;AAAA;AAAA,GAIpEC,IAAwBJ,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAY/BK,IAAoBL,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAMxB,CAAC,EAAE,OAAAM,QAAYA,EAAM,OAAO,WAAW,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA,IAK5D,CAAC,EAAE,gBAAAC,EAAe,MAClB,CAACA,KACDC;AAAA;AAAA;AAAA;AAAA,KAIC;AAAA,GAGQC,IAAsBT,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAS7BU,IAAWV,EAAO;AAAA;AAAA;AAAA;AAAA;AAMQA,EAAO;AAAA;AAAA;AAAA;AAKvC,MAAMW,IAAoBX,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAU3BY,IAAeZ,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAWxB,CAAC,EAAE,cAAAa,EAAA,MAAoBA,IAAe,gBAAgB,SAAU;AAAA,gBAC3D,CAAC,EAAE,aAAAC,GAAa,cAAAD,QACxBA,KAAgBC,IAAoB,YAEpCD,IAAqB,YAErBC,IAAoB,YAEjB,SACR;AAAA;AAAA;AAAA,IAGC,CAAC,EAAE,gBAAAP,GAAgB,cAAAM,GAAc,aAAAC,EAAY,MAC7C,CAACP,KACDC;AAAA;AAAA;AAAA;AAAA;AAAA,gBAKYK,IAAe,SAAS,qCAAqC;AAAA;AAAA,QAErE,CAACC,KACH,CAACD,KACDL;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,OAMC;AAAA,KACF;AAAA,GAEQO,IAAmBf,EAAOgB,CAAQ;AAAA;AAAA,oBAE3BC,IAAqB,CAAC;AAAA,GAG7BC,IAA6BlB,EAAOgB,CAAQ;AAAA;AAAA,oBAErC,KAAKC,IAAqB,CAAC;AAAA;AAAA;AAAA;AAAA,IAI3C,CAAC,EAAE,OAAAX,EAAA,MAAYA,EAAM,aAAa,cAAc;AAAA,sBAC9B,KAAKW,IAAqB,CAAC;AAAA;AAAA;"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { jsxs as E, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { memo as W, forwardRef as X, useRef as u, useState as x, useMemo as k, createRef as K, useCallback as M, useImperativeHandle as j, useEffect as S } from "react";
|
|
3
|
+
import { useTheme as H } from "styled-components";
|
|
4
|
+
import { ILLUSTRATIONS as N } from "../../../../../assets/illustrations/illustrations.js";
|
|
5
|
+
import { LOTTIE as w } from "../../../../../assets/lottie/lottie.js";
|
|
6
|
+
import d from "../../../../ui/hooks/use-click-handler.js";
|
|
7
|
+
import F from "../../../../ui/lottie-animation/lottie-animation.js";
|
|
8
|
+
import U from "../../../../ui/text/text.js";
|
|
9
|
+
import { EDeviceType as G } from "../../../../ui/theme/constants.js";
|
|
10
|
+
import { useCircleSounds as V } from "../../../hooks/use-circle-sounds/use-circle-sounds.js";
|
|
11
|
+
import { CircleSoundKey as Y } from "../../../hooks/use-circle-sounds/use-circle-sounds-enums.js";
|
|
12
|
+
import { Carousel as q, CarouselWrapper as z, CarouselItemContainer as J, ExtendedFlexView as Q, CarouselContainer as Z, CarouselItemWrapper as ee, CarouselItem as re, TickIcon as oe, OverlappingLottie as ne, StyledCarouselBadgeWrapper as te } from "./carousel-styled.js";
|
|
13
|
+
import { allWorkOutsCompletedAnimationSetting as le } from "./constants.js";
|
|
14
|
+
const ce = ({ items: r, defaultIndex: a = 0, analyticsSwipeLeft: p, analyticsSwipeRight: m, analyticsCardClick: C }, $) => {
|
|
15
|
+
var y;
|
|
16
|
+
const { device: b } = H(), { playSwipeSound: h, play: v } = V(), s = b <= G.TABLET, A = u(null), i = u(!0), [t, l] = x(a), { handleClick: P } = d(
|
|
17
|
+
{
|
|
18
|
+
analyticsLabel: m.analyticsLabel,
|
|
19
|
+
analyticsProps: m.analyticsProps
|
|
20
|
+
},
|
|
21
|
+
() => l((e) => e - 1)
|
|
22
|
+
), { handleClick: D } = d(
|
|
23
|
+
{
|
|
24
|
+
analyticsLabel: p.analyticsLabel,
|
|
25
|
+
analyticsProps: p.analyticsProps
|
|
26
|
+
},
|
|
27
|
+
() => l((e) => e + 1)
|
|
28
|
+
), { handleClick: f } = d(
|
|
29
|
+
{
|
|
30
|
+
analyticsLabel: C.analyticsLabel,
|
|
31
|
+
analyticsProps: C.analyticsProps
|
|
32
|
+
},
|
|
33
|
+
() => {
|
|
34
|
+
}
|
|
35
|
+
// we'll replace this inline
|
|
36
|
+
), T = u(0), O = (e) => {
|
|
37
|
+
var o, c;
|
|
38
|
+
T.current = ((c = (o = e.touches) == null ? void 0 : o[0]) == null ? void 0 : c.clientX) ?? 0;
|
|
39
|
+
}, R = (e) => {
|
|
40
|
+
var g, I;
|
|
41
|
+
const c = (((I = (g = e.changedTouches) == null ? void 0 : g[0]) == null ? void 0 : I.clientX) ?? 0) - T.current;
|
|
42
|
+
c > 50 && t > 0 ? P() : c < -50 && t < r.length - 1 && D();
|
|
43
|
+
}, L = k(() => r.map(() => K()), [r]), _ = k(() => r.every((e) => e.isCompleted), [r]), B = M(
|
|
44
|
+
(e) => {
|
|
45
|
+
h(), f(), l(e);
|
|
46
|
+
},
|
|
47
|
+
[f, h]
|
|
48
|
+
);
|
|
49
|
+
return j($, () => ({
|
|
50
|
+
nextBtnRef: A,
|
|
51
|
+
indicatorRefs: L,
|
|
52
|
+
currentIndex: t,
|
|
53
|
+
goToIndex: (e) => {
|
|
54
|
+
l(e);
|
|
55
|
+
}
|
|
56
|
+
})), S(() => {
|
|
57
|
+
i.current && (i.current = !1);
|
|
58
|
+
}, []), S(() => {
|
|
59
|
+
l((e) => r.length <= 1 || e >= r.length ? 0 : a);
|
|
60
|
+
}, [a, r.length]), /* @__PURE__ */ E(q, { children: [
|
|
61
|
+
/* @__PURE__ */ n(
|
|
62
|
+
z,
|
|
63
|
+
{
|
|
64
|
+
onTouchStart: O,
|
|
65
|
+
onTouchEnd: R,
|
|
66
|
+
...r.length > 1 && {
|
|
67
|
+
$translate: t * 100,
|
|
68
|
+
$translateDuration: i.current ? 0 : 300
|
|
69
|
+
},
|
|
70
|
+
children: r.map((e, o) => /* @__PURE__ */ n(J, { children: e.element }, o))
|
|
71
|
+
}
|
|
72
|
+
),
|
|
73
|
+
r.length > 1 && /* @__PURE__ */ n(Q, { $flexDirection: "row", $alignItems: "center", $justifyContent: "center", children: /* @__PURE__ */ E(Z, { $isTouchDevice: s, children: [
|
|
74
|
+
r.map((e, o) => /* @__PURE__ */ n(ee, { children: /* @__PURE__ */ n(
|
|
75
|
+
re,
|
|
76
|
+
{
|
|
77
|
+
ref: L[o],
|
|
78
|
+
$isSelected: o === t,
|
|
79
|
+
$isCompleted: e.isCompleted,
|
|
80
|
+
$isTouchDevice: s,
|
|
81
|
+
onClick: () => B(o),
|
|
82
|
+
children: e.isCompleted && o !== t ? /* @__PURE__ */ n(oe, { src: N.GREEN_TICK, alt: "completed" }) : /* @__PURE__ */ n(
|
|
83
|
+
U,
|
|
84
|
+
{
|
|
85
|
+
$renderAs: s ? "ac4-black" : "ac3-black",
|
|
86
|
+
$color: o === t ? "BLACK" : "WHITE_T_60",
|
|
87
|
+
$marginBottom: 0,
|
|
88
|
+
children: o + 1
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
}
|
|
92
|
+
) }, o)),
|
|
93
|
+
_ && /* @__PURE__ */ n(ne, { children: /* @__PURE__ */ n(
|
|
94
|
+
F,
|
|
95
|
+
{
|
|
96
|
+
src: w.DAILY_WORK_OUT_COMPLETE,
|
|
97
|
+
settings: le,
|
|
98
|
+
onRender: () => {
|
|
99
|
+
v(Y.ALL_TASKS_COMPLETED);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
) })
|
|
103
|
+
] }) }),
|
|
104
|
+
((y = r[t]) == null ? void 0 : y.carouselBadge) && /* @__PURE__ */ n(te, { children: r[t].carouselBadge })
|
|
105
|
+
] });
|
|
106
|
+
}, ge = W(X(ce));
|
|
107
|
+
export {
|
|
108
|
+
ge as Carousel
|
|
109
|
+
};
|
|
110
|
+
//# sourceMappingURL=carousel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"carousel.js","sources":["../../../../../../src/features/circle-games/game-launcher-v2/comps/carousel/carousel.tsx"],"sourcesContent":["import type { ForwardRefRenderFunction } from 'react';\nimport {\n memo,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n forwardRef,\n useImperativeHandle,\n createRef,\n} from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { ILLUSTRATIONS } from '../../../../../assets/illustrations/illustrations';\nimport { LOTTIE } from '../../../../../assets/lottie/lottie';\nimport useClickHandler from '../../../../ui/hooks/use-click-handler';\nimport LottieAnimation from '../../../../ui/lottie-animation/lottie-animation';\nimport Text from '../../../../ui/text/text';\nimport { EDeviceType } from '../../../../ui/theme/constants';\nimport { useCircleSounds } from '../../../hooks/use-circle-sounds/use-circle-sounds';\nimport { CircleSoundKey } from '../../../hooks/use-circle-sounds/use-circle-sounds-enums';\nimport * as Styled from './carousel-styled';\nimport {\n CarouselItem,\n CarouselItemWrapper,\n TickIcon,\n StyledCarouselBadgeWrapper,\n} from './carousel-styled';\nimport type { ICarouselProps, ICarouselRefs } from './carousel-types';\nimport { allWorkOutsCompletedAnimationSetting } from './constants';\n\nconst CarouselComponent: ForwardRefRenderFunction<ICarouselRefs, ICarouselProps> = (\n { items, defaultIndex = 0, analyticsSwipeLeft, analyticsSwipeRight, analyticsCardClick },\n ref,\n) => {\n const { device } = useTheme();\n\n const { playSwipeSound, play } = useCircleSounds();\n const isTouchDevice = device <= EDeviceType.TABLET;\n\n const nextBtnRef = useRef<HTMLDivElement>(null) as React.RefObject<HTMLDivElement>;\n const isFirstMount = useRef(true);\n const [currIndex, setCurrIndex] = useState(defaultIndex);\n\n const { handleClick: handlePrevClick } = useClickHandler(\n {\n analyticsLabel: analyticsSwipeRight.analyticsLabel,\n analyticsProps: analyticsSwipeRight.analyticsProps,\n },\n () => setCurrIndex(prev => prev - 1),\n );\n\n const { handleClick: handleNextClick } = useClickHandler(\n {\n analyticsLabel: analyticsSwipeLeft.analyticsLabel,\n analyticsProps: analyticsSwipeLeft.analyticsProps,\n },\n () => setCurrIndex(prev => prev + 1),\n );\n\n const { handleClick: handleCardClick } = useClickHandler(\n {\n analyticsLabel: analyticsCardClick.analyticsLabel,\n analyticsProps: analyticsCardClick.analyticsProps,\n },\n () => {}, // we'll replace this inline\n );\n // swipe tracking\n const touchStartX = useRef(0);\n\n const handleTouchStart = (e: React.TouchEvent) => {\n touchStartX.current = e.touches?.[0]?.clientX ?? 0;\n };\n\n const handleTouchEnd = (e: React.TouchEvent) => {\n const endX = e.changedTouches?.[0]?.clientX ?? 0;\n const deltaX = endX - touchStartX.current;\n\n if (deltaX > 50 && currIndex > 0) {\n // swipe right → previous\n handlePrevClick();\n } else if (deltaX < -50 && currIndex < items.length - 1) {\n // swipe left → next\n handleNextClick();\n }\n };\n\n const indicatorRefs = useMemo(() => items.map(() => createRef<HTMLDivElement>()), [items]);\n const allCompleted = useMemo(() => items.every(item => item.isCompleted), [items]);\n\n const handleCarouselIndicatorClick = useCallback(\n (index: number) => {\n playSwipeSound();\n handleCardClick();\n setCurrIndex(index);\n },\n [handleCardClick, playSwipeSound],\n );\n\n useImperativeHandle(ref, () => ({\n nextBtnRef,\n indicatorRefs,\n currentIndex: currIndex,\n goToIndex: (index: number) => {\n setCurrIndex(index);\n },\n }));\n\n useEffect(() => {\n if (isFirstMount.current) {\n isFirstMount.current = false;\n }\n }, []);\n\n useEffect(() => {\n setCurrIndex(prev => {\n if (items.length <= 1) return 0;\n\n if (prev >= items.length) return 0;\n\n return defaultIndex;\n });\n }, [defaultIndex, items.length]);\n\n return (\n <Styled.Carousel>\n <Styled.CarouselWrapper\n onTouchStart={handleTouchStart}\n onTouchEnd={handleTouchEnd}\n {...(items.length > 1 && {\n $translate: currIndex * 100,\n $translateDuration: isFirstMount.current ? 0 : 300,\n })}\n >\n {items.map((item, index) => (\n <Styled.CarouselItemContainer key={index}>{item.element}</Styled.CarouselItemContainer>\n ))}\n </Styled.CarouselWrapper>\n\n {items.length > 1 && (\n <Styled.ExtendedFlexView $flexDirection=\"row\" $alignItems=\"center\" $justifyContent=\"center\">\n <Styled.CarouselContainer $isTouchDevice={isTouchDevice}>\n {items.map((item, index) => (\n <CarouselItemWrapper key={index}>\n <CarouselItem\n ref={indicatorRefs[index]}\n $isSelected={index === currIndex}\n $isCompleted={item.isCompleted}\n $isTouchDevice={isTouchDevice}\n onClick={() => handleCarouselIndicatorClick(index)}\n >\n {item.isCompleted && index !== currIndex ? (\n <TickIcon src={ILLUSTRATIONS.GREEN_TICK} alt=\"completed\" />\n ) : (\n <Text\n $renderAs={isTouchDevice ? 'ac4-black' : 'ac3-black'}\n $color={index === currIndex ? 'BLACK' : 'WHITE_T_60'}\n $marginBottom={0}\n >\n {index + 1}\n </Text>\n )}\n </CarouselItem>\n </CarouselItemWrapper>\n ))}\n {allCompleted && (\n <Styled.OverlappingLottie>\n <LottieAnimation\n src={LOTTIE.DAILY_WORK_OUT_COMPLETE}\n settings={allWorkOutsCompletedAnimationSetting}\n onRender={() => {\n play(CircleSoundKey.ALL_TASKS_COMPLETED);\n }}\n />\n </Styled.OverlappingLottie>\n )}\n </Styled.CarouselContainer>\n </Styled.ExtendedFlexView>\n )}\n\n {items[currIndex]?.carouselBadge && (\n <StyledCarouselBadgeWrapper>{items[currIndex].carouselBadge}</StyledCarouselBadgeWrapper>\n )}\n </Styled.Carousel>\n );\n};\n\nexport const Carousel = memo(forwardRef(CarouselComponent));\n"],"names":["CarouselComponent","items","defaultIndex","analyticsSwipeLeft","analyticsSwipeRight","analyticsCardClick","ref","device","useTheme","playSwipeSound","play","useCircleSounds","isTouchDevice","EDeviceType","nextBtnRef","useRef","isFirstMount","currIndex","setCurrIndex","useState","handlePrevClick","useClickHandler","prev","handleNextClick","handleCardClick","touchStartX","handleTouchStart","_b","_a","handleTouchEnd","deltaX","indicatorRefs","useMemo","createRef","allCompleted","item","handleCarouselIndicatorClick","useCallback","index","useImperativeHandle","useEffect","jsxs","Styled.Carousel","jsx","Styled.CarouselWrapper","Styled.CarouselItemContainer","Styled.ExtendedFlexView","Styled.CarouselContainer","CarouselItemWrapper","CarouselItem","TickIcon","ILLUSTRATIONS","Text","Styled.OverlappingLottie","LottieAnimation","LOTTIE","allWorkOutsCompletedAnimationSetting","CircleSoundKey","StyledCarouselBadgeWrapper","Carousel","memo","forwardRef"],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../../../src/features/circle-games/game-launcher-v2/comps/carousel/constants.ts"],"sourcesContent":["export const allWorkOutsCompletedAnimationSetting = {\n autoplay: true,\n loop: false,\n renderer: 'canvas',\n};\n"],"names":["allWorkOutsCompletedAnimationSetting"],"mappings":"AAAO,MAAMA,IAAuC;AAAA,EAClD,UAAU;AAAA,EACV,MAAM;AAAA,EACN,UAAU;AACZ;"}
|
package/dist/features/circle-games/game-launcher-v2/comps/carousel-badge/carousel-badge-style.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import e from "styled-components";
|
|
2
|
+
const t = e.div`
|
|
3
|
+
display: flex;
|
|
4
|
+
gap: 16px;
|
|
5
|
+
height: 24px;
|
|
6
|
+
`, p = e.div`
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
height: 24px;
|
|
10
|
+
`, d = e.img`
|
|
11
|
+
width: 24px;
|
|
12
|
+
height: 24px;
|
|
13
|
+
flex-shrink: 0;
|
|
14
|
+
`;
|
|
15
|
+
export {
|
|
16
|
+
p as Badge,
|
|
17
|
+
t as BadgeContainer,
|
|
18
|
+
d as StyledIcon
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=carousel-badge-style.js.map
|
package/dist/features/circle-games/game-launcher-v2/comps/carousel-badge/carousel-badge-style.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"carousel-badge-style.js","sources":["../../../../../../src/features/circle-games/game-launcher-v2/comps/carousel-badge/carousel-badge-style.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nexport const BadgeContainer = styled.div`\n display: flex;\n gap: 16px;\n height: 24px;\n`;\n\nexport const Badge = styled.div`\n display: flex;\n align-items: center;\n height: 24px;\n`;\n\nexport const StyledIcon = styled.img`\n width: 24px;\n height: 24px;\n flex-shrink: 0;\n`;\n"],"names":["BadgeContainer","styled","Badge","StyledIcon"],"mappings":";AAEO,MAAMA,IAAiBC,EAAO;AAAA;AAAA;AAAA;AAAA,GAMxBC,IAAQD,EAAO;AAAA;AAAA;AAAA;AAAA,GAMfE,IAAaF,EAAO;AAAA;AAAA;AAAA;AAAA;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { BadgeContainer as e } from "./carousel-badge-style.js";
|
|
3
|
+
import { SingleBadge as a } from "./carousel-single-badge.js";
|
|
4
|
+
const u = ({ badges: l, style: t }) => /* @__PURE__ */ r(e, { style: t, children: l.map((o, i) => /* @__PURE__ */ r(
|
|
5
|
+
a,
|
|
6
|
+
{
|
|
7
|
+
illustration: o.illustration,
|
|
8
|
+
value: o.value,
|
|
9
|
+
color: o.color,
|
|
10
|
+
label: o.label
|
|
11
|
+
},
|
|
12
|
+
i
|
|
13
|
+
)) });
|
|
14
|
+
export {
|
|
15
|
+
u as BadgesGroup
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=carousel-badge.js.map
|