@cuemath/leap 3.2.18-mb → 3.2.19-beta-0.1
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 +11 -5
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/line-icons/icons/after-noon.js +34 -0
- package/dist/assets/line-icons/icons/after-noon.js.map +1 -0
- package/dist/assets/line-icons/icons/apple-icon-white.js +42 -0
- package/dist/assets/line-icons/icons/apple-icon-white.js.map +1 -0
- package/dist/assets/line-icons/icons/cue-board-filled.js +33 -0
- package/dist/assets/line-icons/icons/cue-board-filled.js.map +1 -0
- package/dist/assets/line-icons/icons/cue-board.js +23 -0
- package/dist/assets/line-icons/icons/cue-board.js.map +1 -0
- package/dist/assets/line-icons/icons/evening.js +35 -0
- package/dist/assets/line-icons/icons/evening.js.map +1 -0
- package/dist/assets/line-icons/icons/hint-fill.js +35 -0
- package/dist/assets/line-icons/icons/hint-fill.js.map +1 -0
- package/dist/assets/line-icons/icons/morning.js +35 -0
- package/dist/assets/line-icons/icons/morning.js.map +1 -0
- package/dist/assets/line-icons/icons/screen-grab-filled.js +35 -0
- package/dist/assets/line-icons/icons/screen-grab-filled.js.map +1 -0
- package/dist/assets/line-icons/icons/screen-grab.js +23 -0
- package/dist/assets/line-icons/icons/screen-grab.js.map +1 -0
- package/dist/assets/line-icons/icons/sticker-filled.js +64 -0
- package/dist/assets/line-icons/icons/sticker-filled.js.map +1 -0
- package/dist/assets/line-icons/icons/sticker.js +46 -0
- package/dist/assets/line-icons/icons/sticker.js.map +1 -0
- package/dist/assets/lottie/lottie.js +16 -1
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/features/analytics-events/platform-events-student.js +2 -1
- package/dist/features/analytics-events/platform-events-student.js.map +1 -1
- package/dist/features/analytics-events/platform-events-teacher.js +6 -4
- package/dist/features/analytics-events/platform-events-teacher.js.map +1 -1
- package/dist/features/analytics-events/whitelist-events.js +10 -8
- package/dist/features/analytics-events/whitelist-events.js.map +1 -1
- package/dist/features/auth/account-selector/account-selector.js +26 -25
- package/dist/features/auth/account-selector/account-selector.js.map +1 -1
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-constants.js +9 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-constants.js.map +1 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-styled.js +52 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-styled.js.map +1 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js +93 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js.map +1 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-text/animated-text-styled.js +10 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-text/animated-text-styled.js.map +1 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-text/animated-text.js +17 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-text/animated-text.js.map +1 -0
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js +20 -14
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js.map +1 -1
- package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar-styled.js +12 -0
- package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar-styled.js.map +1 -0
- package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar.js +34 -0
- package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar.js.map +1 -0
- package/dist/features/auth/comps/otp-input/otp-input-styled.js +26 -0
- package/dist/features/auth/comps/otp-input/otp-input-styled.js.map +1 -0
- package/dist/features/auth/comps/otp-input/otp-input.js +50 -0
- package/dist/features/auth/comps/otp-input/otp-input.js.map +1 -0
- package/dist/features/auth/comps/pill-button/pill-button-styled.js +44 -0
- package/dist/features/auth/comps/pill-button/pill-button-styled.js.map +1 -0
- package/dist/features/auth/comps/pill-button/pill-button.js +74 -0
- package/dist/features/auth/comps/pill-button/pill-button.js.map +1 -0
- package/dist/features/auth/comps/resend-otp/resend-otp.js +54 -47
- package/dist/features/auth/comps/resend-otp/resend-otp.js.map +1 -1
- package/dist/features/auth/comps/selectable-info-card/selectable-info-card-styled.js +17 -0
- package/dist/features/auth/comps/selectable-info-card/selectable-info-card-styled.js.map +1 -0
- package/dist/features/auth/comps/selectable-info-card/selectable-info-card.js +67 -0
- package/dist/features/auth/comps/selectable-info-card/selectable-info-card.js.map +1 -0
- package/dist/features/auth/comps/tabs/tab-tem/tab-item.js +29 -17
- package/dist/features/auth/comps/tabs/tab-tem/tab-item.js.map +1 -1
- package/dist/features/auth/comps/tabs/tabs-styled.js +22 -10
- package/dist/features/auth/comps/tabs/tabs-styled.js.map +1 -1
- package/dist/features/auth/comps/tabs/tabs.js +5 -5
- package/dist/features/auth/comps/tabs/tabs.js.map +1 -1
- package/dist/features/auth/comps/user-list/user-item/user-item.js +30 -31
- package/dist/features/auth/comps/user-list/user-item/user-item.js.map +1 -1
- package/dist/features/auth/comps/user-list/user-list.js +35 -34
- package/dist/features/auth/comps/user-list/user-list.js.map +1 -1
- package/dist/features/auth/forgot-password/forgot-password-styled.js +14 -15
- package/dist/features/auth/forgot-password/forgot-password-styled.js.map +1 -1
- package/dist/features/auth/login/identifier-otp-form/identifier-otp-form-styled.js +6 -7
- package/dist/features/auth/login/identifier-otp-form/identifier-otp-form-styled.js.map +1 -1
- package/dist/features/auth/login/login-styled.js +8 -9
- package/dist/features/auth/login/login-styled.js.map +1 -1
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-constants.js +19 -0
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-constants.js.map +1 -0
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-styled.js +32 -0
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-styled.js.map +1 -0
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide.js +44 -0
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide.js.map +1 -0
- package/dist/features/auth/pla-signup/signup-header/signup-header.js +54 -0
- package/dist/features/auth/pla-signup/signup-header/signup-header.js.map +1 -0
- package/dist/features/auth/pla-signup/signup-options/signup-options.js +83 -0
- package/dist/features/auth/pla-signup/signup-options/signup-options.js.map +1 -0
- package/dist/features/chapters-v2/utils/node-card-utils.js +9 -9
- package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card-styled.js +4 -4
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card-styled.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card.js +85 -85
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card.js.map +1 -1
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js +121 -98
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js.map +1 -1
- package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey.js +29 -28
- package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey.js.map +1 -1
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js +43 -42
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js.map +1 -1
- package/dist/features/circle-games/games/tutorial/tutorial.js +43 -35
- package/dist/features/circle-games/games/tutorial/tutorial.js.map +1 -1
- package/dist/features/circle-games/sign-up/comp/grade-input/grade-input-styled.js +2 -2
- package/dist/features/circle-games/sign-up/comp/grade-input/grade-input-styled.js.map +1 -1
- package/dist/features/circle-games/sign-up/comp/grade-input/grade-input.js +1 -1
- package/dist/features/circle-games/sign-up/comp/grade-input/grade-input.js.map +1 -1
- package/dist/features/circle-games/sign-up/comp/username-input/username-input.js +26 -24
- package/dist/features/circle-games/sign-up/comp/username-input/username-input.js.map +1 -1
- package/dist/features/circle-games/sign-up/constants.js +3 -1
- package/dist/features/circle-games/sign-up/constants.js.map +1 -1
- package/dist/features/communication/pub-sub/constants.js +7 -4
- package/dist/features/communication/pub-sub/constants.js.map +1 -1
- package/dist/features/cue-canvas/hooks/use-canvas-sync-broker.js +42 -42
- package/dist/features/cue-canvas/hooks/use-canvas-sync-broker.js.map +1 -1
- package/dist/features/homework/homework-card-view.js +85 -97
- package/dist/features/homework/homework-card-view.js.map +1 -1
- package/dist/features/homework/homework-card.js +44 -42
- package/dist/features/homework/homework-card.js.map +1 -1
- package/dist/features/homework/hw-card-list/hw-card-list-view.js +31 -29
- package/dist/features/homework/hw-card-list/hw-card-list-view.js.map +1 -1
- package/dist/features/homework/hw-card-list/hw-card-list.js +54 -48
- package/dist/features/homework/hw-card-list/hw-card-list.js.map +1 -1
- package/dist/features/homework/utils.js +33 -27
- package/dist/features/homework/utils.js.map +1 -1
- package/dist/features/journey/comps/coachmark/coachmark.js +29 -27
- package/dist/features/journey/comps/coachmark/coachmark.js.map +1 -1
- package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js +17 -11
- package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js.map +1 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js +72 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js.map +1 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js +59 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js.map +1 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js +63 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js.map +1 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js +67 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js.map +1 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js +70 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js.map +1 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js +59 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js.map +1 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js +59 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js.map +1 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js +70 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js.map +1 -0
- package/dist/features/journey/journey-id/journey-id-student.js +2 -2
- package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
- package/dist/features/journey/journey-id/journey-id-teacher.js +2 -2
- package/dist/features/journey/journey-id/journey-id-teacher.js.map +1 -1
- package/dist/features/journey/use-journey/journey-context-provider.js +73 -72
- package/dist/features/journey/use-journey/journey-context-provider.js.map +1 -1
- package/dist/features/journey/use-journey/journey-styled.js +6 -4
- package/dist/features/journey/use-journey/journey-styled.js.map +1 -1
- package/dist/features/puzzles/api/puzzle-dashboard.js +10 -0
- package/dist/features/puzzles/api/puzzle-dashboard.js.map +1 -0
- package/dist/features/puzzles/app/puzzle-app-styled.js +85 -0
- package/dist/features/puzzles/app/puzzle-app-styled.js.map +1 -0
- package/dist/features/puzzles/app/puzzle-app-view.js +120 -0
- package/dist/features/puzzles/app/puzzle-app-view.js.map +1 -0
- package/dist/features/puzzles/app/puzzle-app.js +62 -0
- package/dist/features/puzzles/app/puzzle-app.js.map +1 -0
- package/dist/features/puzzles/comps/puzzle-card-styled.js +24 -69
- package/dist/features/puzzles/comps/puzzle-card-styled.js.map +1 -1
- package/dist/features/puzzles/comps/puzzle-card.js +79 -30
- package/dist/features/puzzles/comps/puzzle-card.js.map +1 -1
- package/dist/features/puzzles/constants/puzzle-container.js +8 -0
- package/dist/features/puzzles/constants/puzzle-container.js.map +1 -0
- package/dist/features/puzzles/puzzle-analytics-events.js +11 -0
- package/dist/features/puzzles/puzzle-analytics-events.js.map +1 -0
- package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js +55 -25
- package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js.map +1 -1
- package/dist/features/puzzles/puzzle-container/puzzle-container-view.js +55 -0
- package/dist/features/puzzles/puzzle-container/puzzle-container-view.js.map +1 -0
- package/dist/features/puzzles/puzzle-container/puzzle-container.js +100 -107
- package/dist/features/puzzles/puzzle-container/puzzle-container.js.map +1 -1
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js +37 -0
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js.map +1 -0
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js +110 -0
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js.map +1 -0
- package/dist/features/puzzles/puzzle-feedback-celebration/puzzle-feedback-celebration.js +1 -1
- package/dist/features/puzzles/puzzle-feedback-celebration/puzzle-feedback-celebration.js.map +1 -1
- package/dist/features/puzzles/utils/puzzle-pattern.js +28 -13
- package/dist/features/puzzles/utils/puzzle-pattern.js.map +1 -1
- package/dist/features/ui/arrow-tooltip/arrow-tooltip-constants.js +6 -0
- package/dist/features/ui/arrow-tooltip/arrow-tooltip-constants.js.map +1 -0
- package/dist/features/ui/arrow-tooltip/arrow-tooltip-styled.js +12 -60
- package/dist/features/ui/arrow-tooltip/arrow-tooltip-styled.js.map +1 -1
- package/dist/features/ui/arrow-tooltip/arrow-tooltip.js +72 -77
- package/dist/features/ui/arrow-tooltip/arrow-tooltip.js.map +1 -1
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body-styled.js +63 -0
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body-styled.js.map +1 -0
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body.js +21 -0
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body.js.map +1 -0
- package/dist/features/ui/buttons/button/button.js +41 -38
- package/dist/features/ui/buttons/button/button.js.map +1 -1
- package/dist/features/ui/buttons/icon-button/icon-button.js +31 -27
- package/dist/features/ui/buttons/icon-button/icon-button.js.map +1 -1
- package/dist/features/ui/buttons/text-button/text-button.js +26 -22
- package/dist/features/ui/buttons/text-button/text-button.js.map +1 -1
- package/dist/features/ui/drawer/drawer-styled.js +34 -0
- package/dist/features/ui/drawer/drawer-styled.js.map +1 -0
- package/dist/features/ui/drawer/drawer.js +42 -0
- package/dist/features/ui/drawer/drawer.js.map +1 -0
- package/dist/features/ui/error/error.js +65 -27
- package/dist/features/ui/error/error.js.map +1 -1
- package/dist/features/ui/grade-selector/grade-selector.js +33 -27
- package/dist/features/ui/grade-selector/grade-selector.js.map +1 -1
- package/dist/features/ui/image/image.js +1 -1
- package/dist/features/ui/image/image.js.map +1 -1
- package/dist/features/ui/lottie-animation/lottie-animation.js +25 -29
- package/dist/features/ui/lottie-animation/lottie-animation.js.map +1 -1
- package/dist/features/ui/modals/modal-styled.js +34 -58
- package/dist/features/ui/modals/modal-styled.js.map +1 -1
- package/dist/features/ui/modals/modal.js +40 -14
- package/dist/features/ui/modals/modal.js.map +1 -1
- package/dist/features/ui/nudge/nudge-styled.js +14 -7
- package/dist/features/ui/nudge/nudge-styled.js.map +1 -1
- package/dist/features/ui/nudge/nudge.js +13 -12
- package/dist/features/ui/nudge/nudge.js.map +1 -1
- package/dist/features/{stickers/sticker-selector/sticker-selector-styles.js → ui/sticker-grid/sticker-grid-styles.js} +3 -4
- package/dist/features/ui/sticker-grid/sticker-grid-styles.js.map +1 -0
- package/dist/features/ui/sticker-grid/sticker-grid.js +24 -0
- package/dist/features/ui/sticker-grid/sticker-grid.js.map +1 -0
- package/dist/features/ui/sticker-grid/sticker.js +57 -0
- package/dist/features/ui/sticker-grid/sticker.js.map +1 -0
- package/dist/features/ui/stickers/constants.js +6 -0
- package/dist/features/ui/stickers/constants.js.map +1 -0
- package/dist/features/{stickers/stickers-effects/effects.js → ui/stickers/stickers-effects.js} +6 -6
- package/dist/features/ui/stickers/stickers-effects.js.map +1 -0
- package/dist/features/{stickers/stickers-effects/stickers-effects-styled.js → ui/stickers/stickers-styled.js} +2 -2
- package/dist/features/ui/stickers/stickers-styled.js.map +1 -0
- package/dist/features/ui/stickers/stickers-utils.js +91 -0
- package/dist/features/ui/stickers/stickers-utils.js.map +1 -0
- package/dist/features/ui/stickers/stickers.js +40 -0
- package/dist/features/ui/stickers/stickers.js.map +1 -0
- package/dist/features/ui/streak-icon/streak-icon-styled.js +13 -13
- package/dist/features/ui/streak-icon/streak-icon-styled.js.map +1 -1
- package/dist/features/ui/streak-icon/streak-icon.js +17 -15
- package/dist/features/ui/streak-icon/streak-icon.js.map +1 -1
- package/dist/features/ui/tab/tab.js +30 -26
- package/dist/features/ui/tab/tab.js.map +1 -1
- package/dist/features/ui/text/text.js +40 -36
- package/dist/features/ui/text/text.js.map +1 -1
- package/dist/features/ui/theme/button.js +78 -78
- package/dist/features/ui/theme/button.js.map +1 -1
- package/dist/features/ui/theme/constants.js +4 -2
- package/dist/features/ui/theme/constants.js.map +1 -1
- package/dist/features/ui/theme/get-device.js +3 -3
- package/dist/features/ui/theme/get-device.js.map +1 -1
- package/dist/features/worksheet/worksheet/constants.js +12 -13
- package/dist/features/worksheet/worksheet/constants.js.map +1 -1
- package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js +28 -0
- package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js.map +1 -0
- package/dist/features/worksheet/worksheet/worksheet-helpers.js +20 -19
- package/dist/features/worksheet/worksheet/worksheet-helpers.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js +29 -25
- package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js +101 -47
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +244 -255
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js +242 -207
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-styled.js +45 -36
- package/dist/features/worksheet/worksheet/worksheet-styled.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-types.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet.js +321 -325
- package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
- package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js +1 -1
- package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js.map +1 -1
- package/dist/features/worksheet/worksheet-preview/worksheet-preview.js +44 -35
- package/dist/features/worksheet/worksheet-preview/worksheet-preview.js.map +1 -1
- package/dist/index.d.ts +281 -61
- package/dist/index.js +585 -537
- package/dist/index.js.map +1 -1
- package/dist/static/animated-avatar.1ad58b1d.json +1 -0
- package/dist/static/animated-avatar.69b07505.json +1 -0
- package/dist/static/animated-avatar.9c560b46.json +1 -0
- package/dist/static/calendar-purple.1a840b41.svg +1 -0
- package/dist/static/flying-disk.c7f6ed39.json +1 -0
- package/dist/static/graduation-cap.3be3340a.json +1 -0
- package/dist/static/handshake.287e7dfb.svg +1 -0
- package/dist/static/light-bulb.c6db0b23.json +1 -0
- package/dist/static/money.332aacf1.svg +1 -0
- package/dist/static/muscle.9bcfb8a7.json +1 -0
- package/dist/static/nudge-tap.0591aef4.json +1 -0
- package/dist/static/parent-avatar.822c7b9b.svg +1 -0
- package/dist/static/pencil.23df9da0.json +1 -0
- package/dist/static/plus-sign.de6af957.json +1 -0
- package/dist/static/puzzle-blue-lottie.7017e2e8.json +1 -0
- package/dist/static/puzzle-blue-lottie.bf64ebc5.json +12760 -0
- package/dist/static/puzzle-dashboard-banner.b7956519.svg +1 -0
- package/dist/static/puzzle-green-lottie.1da90698.json +1 -0
- package/dist/static/puzzle-orange-lottie.cfcf3724.json +1 -0
- package/dist/static/puzzle-pattern-blue.abff0164.svg +1 -0
- package/dist/static/puzzle-pattern-green.b8ba1840.svg +1 -0
- package/dist/static/puzzle-pattern-orange.3f5a17ff.svg +1 -0
- package/dist/static/puzzle-pattern-purple.14b09759.svg +1 -0
- package/dist/static/puzzle-pattern-yellow.50917fab.svg +1 -0
- package/dist/static/puzzle-purple-lottie.e70de110.json +9860 -0
- package/dist/static/puzzle-yellow-lottie.275b5cf4.json +1 -0
- package/dist/static/racing-car.2cbf864e.json +1 -0
- package/dist/static/rocket.0a3ccab0.json +1 -0
- package/dist/static/shovel.abeec04c.json +1 -0
- package/dist/static/trustpilot.bd3d79e1.svg +1 -0
- package/package.json +1 -1
- package/dist/features/hooks/use-viewport/use-viewport.js +0 -22
- package/dist/features/hooks/use-viewport/use-viewport.js.map +0 -1
- package/dist/features/stickers/sticker-data.js +0 -234
- package/dist/features/stickers/sticker-data.js.map +0 -1
- package/dist/features/stickers/sticker-selector/sticker-selector-styles.js.map +0 -1
- package/dist/features/stickers/sticker-selector/sticker-selector.js +0 -25
- package/dist/features/stickers/sticker-selector/sticker-selector.js.map +0 -1
- package/dist/features/stickers/sticker-selector/sticker.js +0 -57
- package/dist/features/stickers/sticker-selector/sticker.js.map +0 -1
- package/dist/features/stickers/stickers-effects/effects.js.map +0 -1
- package/dist/features/stickers/stickers-effects/stickers-effects-styled.js.map +0 -1
- package/dist/features/stickers/stickers-effects/stickers-effects-utils.js +0 -93
- package/dist/features/stickers/stickers-effects/stickers-effects-utils.js.map +0 -1
- package/dist/features/stickers/stickers-effects/stickers-effects.js +0 -39
- package/dist/features/stickers/stickers-effects/stickers-effects.js.map +0 -1
- package/dist/static/nudge-tap.5cb30093.json +0 -1057
- package/dist/static/puzzle-pattern-blue.f4bea1ee.svg +0 -1
- package/dist/static/puzzle-pattern-green.c9f84bbc.svg +0 -1
- package/dist/static/puzzle-pattern-orange.3da09665.svg +0 -1
- package/dist/static/puzzle-pattern-purple.5fb5a319.svg +0 -1
- package/dist/static/puzzle-pattern-yellow.aadbf457.svg +0 -1
@@ -0,0 +1,55 @@
|
|
1
|
+
import { jsxs as i, Fragment as $, jsx as e } from "react/jsx-runtime";
|
2
|
+
import { memo as d } from "react";
|
3
|
+
import m from "../../ui/buttons/clickable/clickable.js";
|
4
|
+
import u from "../../ui/image/image.js";
|
5
|
+
import t from "../../ui/text/text.js";
|
6
|
+
import { PuzzleContent as g, AssignedTag as h, PuzzleButton as p } from "./puzzle-container-styled.js";
|
7
|
+
const k = d(
|
8
|
+
({ handleOnPuzzleClick: l, imageUrl: o, title: c, handleAssign: a, assigned: r, assigning: n, analyticsProps: s }) => /* @__PURE__ */ i($, { children: [
|
9
|
+
/* @__PURE__ */ i(
|
10
|
+
g,
|
11
|
+
{
|
12
|
+
$justifyContent: "center",
|
13
|
+
$alignItems: "center",
|
14
|
+
onClick: l,
|
15
|
+
title: "Click to preview",
|
16
|
+
$flexGapX: 1.5,
|
17
|
+
$assigned: r,
|
18
|
+
$gutterX: 1,
|
19
|
+
children: [
|
20
|
+
/* @__PURE__ */ e(u, { width: 136, height: 136, src: o, withLoader: !1, alt: "Puzzle" }),
|
21
|
+
/* @__PURE__ */ e(t, { $renderAs: "h4", $align: "center", children: c }),
|
22
|
+
r && /* @__PURE__ */ e(h, { $gap: 4, $gutter: 8, $background: "BLACK_1", children: /* @__PURE__ */ e(t, { $renderAs: "ac4", $color: "WHITE_1", children: "Assigned" }) })
|
23
|
+
]
|
24
|
+
}
|
25
|
+
),
|
26
|
+
/* @__PURE__ */ e(
|
27
|
+
m,
|
28
|
+
{
|
29
|
+
onClick: a,
|
30
|
+
label: "",
|
31
|
+
analyticsLabel: "puzzle_assigned",
|
32
|
+
disabled: r || n,
|
33
|
+
analyticsProps: s,
|
34
|
+
children: /* @__PURE__ */ e(
|
35
|
+
p,
|
36
|
+
{
|
37
|
+
$background: "BLACK_1",
|
38
|
+
$widthX: 15.75,
|
39
|
+
$alignItems: "center",
|
40
|
+
$justifyContent: "center",
|
41
|
+
$gapX: 0.75,
|
42
|
+
$gutterX: 1,
|
43
|
+
$assigned: r,
|
44
|
+
$assigning: n,
|
45
|
+
children: /* @__PURE__ */ e(t, { $renderAs: "ub1-bold", $color: r ? "BLACK_T_38" : "WHITE_1", children: r ? "Discuss in next class" : "Assign" })
|
46
|
+
}
|
47
|
+
)
|
48
|
+
}
|
49
|
+
)
|
50
|
+
] })
|
51
|
+
);
|
52
|
+
export {
|
53
|
+
k as default
|
54
|
+
};
|
55
|
+
//# sourceMappingURL=puzzle-container-view.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"puzzle-container-view.js","sources":["../../../../src/features/puzzles/puzzle-container/puzzle-container-view.tsx"],"sourcesContent":["import type { IPuzzleContainerViewProps } from './puzzle-container-types';\nimport type { FC } from 'react';\n\nimport { memo } from 'react';\n\nimport Clickable from '../../ui/buttons/clickable/clickable';\nimport Image from '../../ui/image/image';\nimport Text from '../../ui/text/text';\nimport * as Styled from './puzzle-container-styled';\n\nconst PuzzleContainerView: FC<IPuzzleContainerViewProps> = memo(\n ({ handleOnPuzzleClick, imageUrl, title, handleAssign, assigned, assigning, analyticsProps }) => {\n return (\n <>\n <Styled.PuzzleContent\n $justifyContent=\"center\"\n $alignItems=\"center\"\n onClick={handleOnPuzzleClick}\n title=\"Click to preview\"\n $flexGapX={1.5}\n $assigned={assigned}\n $gutterX={1}\n >\n <Image width={136} height={136} src={imageUrl} withLoader={false} alt=\"Puzzle\" />\n <Text $renderAs=\"h4\" $align=\"center\">\n {title}\n </Text>\n\n {assigned && (\n <Styled.AssignedTag $gap={4} $gutter={8} $background=\"BLACK_1\">\n <Text $renderAs=\"ac4\" $color=\"WHITE_1\">\n Assigned\n </Text>\n </Styled.AssignedTag>\n )}\n </Styled.PuzzleContent>\n\n <Clickable\n onClick={handleAssign}\n label=\"\"\n analyticsLabel=\"puzzle_assigned\"\n disabled={assigned || assigning}\n analyticsProps={analyticsProps}\n >\n <Styled.PuzzleButton\n $background=\"BLACK_1\"\n $widthX={15.75}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $gapX={0.75}\n $gutterX={1}\n $assigned={assigned}\n $assigning={assigning}\n >\n <Text $renderAs=\"ub1-bold\" $color={assigned ? 'BLACK_T_38' : 'WHITE_1'}>\n {assigned ? 'Discuss in next class' : 'Assign'}\n </Text>\n </Styled.PuzzleButton>\n </Clickable>\n </>\n );\n },\n);\n\nexport default PuzzleContainerView;\n"],"names":["PuzzleContainerView","memo","handleOnPuzzleClick","imageUrl","title","handleAssign","assigned","assigning","analyticsProps","jsxs","Fragment","Styled.PuzzleContent","jsx","Image","Text","Styled.AssignedTag","Clickable","Styled.PuzzleButton"],"mappings":";;;;;;AAUA,MAAMA,IAAqDC;AAAA,EACzD,CAAC,EAAE,qBAAAC,GAAqB,UAAAC,GAAU,OAAAC,GAAO,cAAAC,GAAc,UAAAC,GAAU,WAAAC,GAAW,gBAAAC,QAGtE,gBAAAC,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAAD;AAAA,MAACE;AAAAA,MAAA;AAAA,QACC,iBAAgB;AAAA,QAChB,aAAY;AAAA,QACZ,SAAST;AAAA,QACT,OAAM;AAAA,QACN,WAAW;AAAA,QACX,WAAWI;AAAA,QACX,UAAU;AAAA,QAEV,UAAA;AAAA,UAAC,gBAAAM,EAAAC,GAAA,EAAM,OAAO,KAAK,QAAQ,KAAK,KAAKV,GAAU,YAAY,IAAO,KAAI,SAAS,CAAA;AAAA,4BAC9EW,GAAK,EAAA,WAAU,MAAK,QAAO,UACzB,UACHV,GAAA;AAAA,UAECE,KACE,gBAAAM,EAAAG,GAAA,EAAmB,MAAM,GAAG,SAAS,GAAG,aAAY,WACnD,4BAACD,GAAK,EAAA,WAAU,OAAM,QAAO,WAAU,qBAEvC,CAAA,GACF;AAAA,QAAA;AAAA,MAAA;AAAA,IAEJ;AAAA,IAEA,gBAAAF;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,SAASX;AAAA,QACT,OAAM;AAAA,QACN,gBAAe;AAAA,QACf,UAAUC,KAAYC;AAAA,QACtB,gBAAAC;AAAA,QAEA,UAAA,gBAAAI;AAAA,UAACK;AAAAA,UAAA;AAAA,YACC,aAAY;AAAA,YACZ,SAAS;AAAA,YACT,aAAY;AAAA,YACZ,iBAAgB;AAAA,YAChB,OAAO;AAAA,YACP,UAAU;AAAA,YACV,WAAWX;AAAA,YACX,YAAYC;AAAA,YAEZ,UAAA,gBAAAK,EAACE,GAAK,EAAA,WAAU,YAAW,QAAQR,IAAW,eAAe,WAC1D,UAAWA,IAAA,0BAA0B,SACxC,CAAA;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IACF;AAAA,EACF,EAAA,CAAA;AAGN;"}
|
@@ -1,127 +1,120 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import { memo as
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import {
|
7
|
-
import D from "../
|
8
|
-
import { PuzzleContainer as
|
9
|
-
|
1
|
+
import { jsx as n, jsxs as T } from "react/jsx-runtime";
|
2
|
+
import { memo as Z, useState as j, useRef as k, useMemo as u, useEffect as O, useCallback as m } from "react";
|
3
|
+
import U from "../../ui/layout/flex-view.js";
|
4
|
+
import v from "../../ui/lottie-animation/lottie-animation.js";
|
5
|
+
import { usePostPuzzleToAssign as y } from "../api/puzzle-assign.js";
|
6
|
+
import { PUZZLE_ASSIGN_ANIMATION as c } from "../constants/puzzle-container.js";
|
7
|
+
import { getPuzzleCardLottie as D } from "../utils/puzzle-pattern.js";
|
8
|
+
import { PuzzleContainer as E, PuzzleAssignedWrapper as G, PuzzleContentWrapper as M } from "./puzzle-container-styled.js";
|
9
|
+
import S from "./puzzle-container-view.js";
|
10
|
+
const W = {
|
11
|
+
loop: !1,
|
12
|
+
renderer: "svg",
|
13
|
+
autoPlay: !1
|
14
|
+
}, X = Z(
|
10
15
|
({
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
studentId: u
|
16
|
+
triggerReveal: l = !1,
|
17
|
+
onFullyHidden: o,
|
18
|
+
onPuzzleClick: f,
|
19
|
+
puzzleData: $,
|
20
|
+
courseStream: z,
|
21
|
+
studentId: p
|
18
22
|
}) => {
|
19
23
|
const {
|
20
|
-
image_hue:
|
21
|
-
image_url:
|
22
|
-
assigned:
|
23
|
-
title:
|
24
|
-
id:
|
25
|
-
|
26
|
-
|
27
|
-
|
24
|
+
image_hue: i,
|
25
|
+
image_url: g,
|
26
|
+
assigned: s,
|
27
|
+
title: d,
|
28
|
+
id: P,
|
29
|
+
node_id: A,
|
30
|
+
student_elo_rating: h,
|
31
|
+
current_elo_rating: _
|
32
|
+
} = $, [I, a] = j(s), r = k(null), w = u(() => D(i), [i]), R = u(
|
33
|
+
() => ({
|
34
|
+
node_id: A,
|
35
|
+
node_type: "PUZZLE_CARD",
|
36
|
+
student_elo_rating: h,
|
37
|
+
current_elo_rating: _
|
38
|
+
}),
|
39
|
+
[A, h, _]
|
40
|
+
), { post: C, isProcessing: b } = y({
|
41
|
+
onComplete: (e) => {
|
42
|
+
var t;
|
43
|
+
e ? a(!0) : ((t = r.current) == null || t.playSegments(c.REVEAL_ASSIGNED, !1), a(!1));
|
28
44
|
}
|
29
45
|
});
|
30
|
-
|
31
|
-
e
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
}), [n, e]);
|
37
|
-
const T = c(() => {
|
38
|
-
switch (n) {
|
39
|
-
case "movingIn":
|
40
|
-
t("revealing");
|
41
|
-
break;
|
42
|
-
case "revealing":
|
43
|
-
t("visible");
|
44
|
-
break;
|
45
|
-
case "assigning":
|
46
|
-
t("assigned"), P(!0);
|
47
|
-
break;
|
48
|
-
case "movingOut":
|
49
|
-
t("hidden"), s == null || s();
|
50
|
-
break;
|
51
|
-
}
|
52
|
-
}, [n, s]), v = c(() => {
|
53
|
-
e || $(
|
46
|
+
O(() => {
|
47
|
+
var e, t;
|
48
|
+
s || (l ? (e = r.current) == null || e.playSegments(c.REVEAL, !0) : ((t = r.current) == null || t.stop(), a(!1)));
|
49
|
+
}, [s, l]);
|
50
|
+
const x = m(() => {
|
51
|
+
s || C(
|
54
52
|
{
|
55
|
-
puzzle_id:
|
53
|
+
puzzle_id: P
|
56
54
|
},
|
57
55
|
{
|
58
|
-
studentId:
|
59
|
-
courseStream:
|
56
|
+
studentId: p,
|
57
|
+
courseStream: z
|
60
58
|
}
|
61
59
|
);
|
62
|
-
}, [
|
63
|
-
|
64
|
-
}, [
|
65
|
-
|
66
|
-
|
60
|
+
}, [z, s, C, P, p]), L = m(() => {
|
61
|
+
f();
|
62
|
+
}, [f]), V = m(() => {
|
63
|
+
var e;
|
64
|
+
(e = r.current) == null || e.playSegments(c.REVEAL, !0);
|
65
|
+
}, []), N = u(
|
66
|
+
() => ({
|
67
|
+
name: "enterFrame",
|
68
|
+
callback: (e) => {
|
69
|
+
const { currentTime: t } = e;
|
70
|
+
t === 49 && a(!0), t === 101 && (o == null || o());
|
71
|
+
}
|
72
|
+
}),
|
73
|
+
[o]
|
74
|
+
);
|
75
|
+
return l ? s ? /* @__PURE__ */ n(E, { $justifyContent: "center", children: /* @__PURE__ */ n(
|
76
|
+
G,
|
77
|
+
{
|
78
|
+
$imageHue: i,
|
79
|
+
$background: `${i}_2`,
|
80
|
+
$widthX: 15.9375,
|
81
|
+
children: /* @__PURE__ */ n(
|
82
|
+
S,
|
83
|
+
{
|
84
|
+
imageUrl: g,
|
85
|
+
handleOnPuzzleClick: L,
|
86
|
+
title: d,
|
87
|
+
assigned: !0
|
88
|
+
}
|
89
|
+
)
|
90
|
+
}
|
91
|
+
) }) : /* @__PURE__ */ n(E, { children: /* @__PURE__ */ T(U, { $heightX: 26, children: [
|
92
|
+
/* @__PURE__ */ n(
|
93
|
+
v,
|
67
94
|
{
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
$flexGapX: 1.5,
|
75
|
-
children: [
|
76
|
-
/* @__PURE__ */ i(O, { width: 136, height: 136, src: b, withLoader: !1, alt: "Puzzle" }),
|
77
|
-
/* @__PURE__ */ i(r, { $renderAs: "h4", children: I }),
|
78
|
-
e && /* @__PURE__ */ i(K, { $gap: 4, $gutter: 8, $background: "BLACK_1", children: /* @__PURE__ */ i(r, { $renderAs: "ac4", $color: "WHITE_1", children: "Assigned" }) })
|
79
|
-
]
|
95
|
+
src: w,
|
96
|
+
ref: r,
|
97
|
+
settings: W,
|
98
|
+
onRender: V,
|
99
|
+
eventListener: N,
|
100
|
+
animateOnIntersect: !0
|
80
101
|
}
|
81
102
|
),
|
82
|
-
|
103
|
+
/* @__PURE__ */ n(M, { $visible: I, $position: "absolute", children: /* @__PURE__ */ n(
|
83
104
|
S,
|
84
105
|
{
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
onClick: v,
|
92
|
-
$disabled: e || k,
|
93
|
-
children: /* @__PURE__ */ i(r, { $renderAs: "ub1-bold", $color: e ? "BLACK_T_38" : "WHITE_1", children: e ? "Discuss in next class" : "Assign" })
|
106
|
+
imageUrl: g,
|
107
|
+
title: d,
|
108
|
+
handleOnPuzzleClick: L,
|
109
|
+
handleAssign: x,
|
110
|
+
assigning: b,
|
111
|
+
analyticsProps: R
|
94
112
|
}
|
95
|
-
)
|
96
|
-
] })
|
97
|
-
/* @__PURE__ */ i(
|
98
|
-
H,
|
99
|
-
{
|
100
|
-
$widthX: 2.5,
|
101
|
-
$heightX: 2.5,
|
102
|
-
$background: "WHITE",
|
103
|
-
$alignItems: "center",
|
104
|
-
$justifyContent: "center",
|
105
|
-
children: /* @__PURE__ */ i(L, {})
|
106
|
-
}
|
107
|
-
),
|
108
|
-
/* @__PURE__ */ i(r, { $renderAs: "ab1-bold", $align: "center", $color: "WHITE", children: "Puzzle assigned" })
|
109
|
-
] }) : null;
|
110
|
-
return n === "hidden" && !o ? null : /* @__PURE__ */ i(W, { children: /* @__PURE__ */ i(
|
111
|
-
D,
|
112
|
-
{
|
113
|
-
animationPhase: e ? void 0 : n,
|
114
|
-
onAnimationEnd: T,
|
115
|
-
imageHue: m ?? "BLUE",
|
116
|
-
heightX: 19,
|
117
|
-
widthX: 15.75,
|
118
|
-
backgroundColor: e ? `${m}_2` : void 0,
|
119
|
-
children: E()
|
120
|
-
}
|
121
|
-
) });
|
113
|
+
) })
|
114
|
+
] }) }) : null;
|
122
115
|
}
|
123
|
-
),
|
116
|
+
), te = X;
|
124
117
|
export {
|
125
|
-
|
118
|
+
te as default
|
126
119
|
};
|
127
120
|
//# sourceMappingURL=puzzle-container.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"puzzle-container.js","sources":["../../../../src/features/puzzles/puzzle-container/puzzle-container.tsx"],"sourcesContent":["import type { TPuzzleCardAnimationPhases } from '../comps/puzzle-card-types';\nimport type { IPuzzleCardContainerProps } from './puzzle-container-types';\nimport type { FC } from 'react';\n\nimport { useState, useCallback, useEffect, useRef, memo } from 'react';\n\nimport Check2Icon from '../../../assets/line-icons/icons/check2';\nimport Image from '../../ui/image/image';\nimport Text from '../../ui/text/text';\nimport { usePostPuzzleToAssign } from '../api/puzzle-assign';\nimport PuzzleCard from '../comps/puzzle-card';\nimport * as Styled from './puzzle-container-styled';\n\nconst ASSIGNED_DISPLAY_DURATION = 1500; // ms\n\nconst PuzzleCardContainer: FC<IPuzzleCardContainerProps> = memo(\n ({\n userType,\n triggerReveal = false,\n onFullyHidden,\n onPuzzleClick,\n puzzleData,\n courseStream,\n studentId,\n }) => {\n const {\n image_hue: imageHue,\n image_url: imageUrl,\n assigned: externalAssigned,\n title,\n id: puzzleId,\n } = puzzleData;\n\n const [animationPhase, setAnimationPhase] = useState<TPuzzleCardAnimationPhases>('hidden');\n const [isAssigned, setIsAssigned] = useState(false);\n\n const assignedTimer = useRef<NodeJS.Timeout | null>(null);\n\n const { post: postPuzzleToAssign, isProcessing } = usePostPuzzleToAssign({\n onComplete: (error: string | null) => {\n if (error) {\n // Handle error (e.g., show a notification)\n setAnimationPhase('visible'); // Reset to visible if assignment fails\n } else {\n if (animationPhase === 'visible') {\n setAnimationPhase('assigning');\n }\n }\n },\n });\n\n // Main trigger to start or hide the card\n useEffect(() => {\n if (!externalAssigned) {\n if (triggerReveal) {\n if (isAssigned) {\n setAnimationPhase('assigned'); // Already assigned, show statically\n } else if (animationPhase === 'hidden') {\n setAnimationPhase('movingIn'); // Start the animation sequence\n }\n } else {\n // If trigger is removed, start hiding (unless already hidden/hiding)\n if (animationPhase !== 'hidden' && animationPhase !== 'movingOut') {\n setAnimationPhase('movingOut');\n }\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [triggerReveal, isAssigned, externalAssigned]);\n\n // Timer to auto-hide after the 'assigned' phase\n useEffect(() => {\n if (animationPhase === 'assigned' && !externalAssigned) {\n assignedTimer.current = setTimeout(() => {\n setAnimationPhase('movingOut');\n }, ASSIGNED_DISPLAY_DURATION);\n }\n\n return () => {\n if (assignedTimer.current) clearTimeout(assignedTimer.current);\n };\n }, [animationPhase, externalAssigned]);\n\n // State machine for animations\n const handleAnimationEnd = useCallback(() => {\n switch (animationPhase) {\n case 'movingIn':\n setAnimationPhase('revealing');\n break;\n case 'revealing':\n setAnimationPhase('visible');\n break;\n case 'assigning':\n setAnimationPhase('assigned');\n setIsAssigned(true);\n break;\n case 'movingOut':\n setAnimationPhase('hidden');\n onFullyHidden?.();\n break;\n default:\n break;\n }\n }, [animationPhase, onFullyHidden]);\n\n const handleAssign = useCallback(() => {\n if (externalAssigned) return; // Do nothing if already assigned\n\n postPuzzleToAssign(\n {\n puzzle_id: puzzleId,\n },\n {\n studentId,\n courseStream,\n },\n );\n }, [courseStream, externalAssigned, postPuzzleToAssign, puzzleId, studentId]);\n\n const handleOnPuzzleClick = useCallback(() => {\n onPuzzleClick();\n }, [onPuzzleClick]);\n\n // Render content only during specific phases\n const renderContent = () => {\n if (animationPhase === 'visible' || externalAssigned) {\n return (\n <>\n <Styled.PuzzleContent\n $justifyContent=\"center\"\n $alignItems=\"center\"\n $width=\"100%\"\n $height=\"100%\"\n onClick={handleOnPuzzleClick}\n title=\"Click to preview\"\n $flexGapX={1.5}\n >\n <Image width={136} height={136} src={imageUrl} withLoader={false} alt=\"Puzzle\" />\n <Text $renderAs=\"h4\">{title}</Text>\n\n {externalAssigned && (\n <Styled.AssignedTag $gap={4} $gutter={8} $background=\"BLACK_1\">\n <Text $renderAs=\"ac4\" $color=\"WHITE_1\">\n Assigned\n </Text>\n </Styled.AssignedTag>\n )}\n </Styled.PuzzleContent>\n\n {userType === 'TEACHER' && (\n <Styled.PuzzleButton\n $background=\"BLACK_1\"\n $widthX={15.75}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $gapX={0.75}\n $gutterX={1}\n onClick={handleAssign}\n $disabled={externalAssigned || isProcessing}\n >\n <Text $renderAs=\"ub1-bold\" $color={externalAssigned ? 'BLACK_T_38' : 'WHITE_1'}>\n {externalAssigned ? 'Discuss in next class' : 'Assign'}\n </Text>\n </Styled.PuzzleButton>\n )}\n </>\n );\n }\n\n if (animationPhase === 'assigned') {\n return (\n <Styled.PuzzleText $alignItems=\"center\" $justifyContent=\"center\" $flexGap={8}>\n <Styled.CheckMarkIcon\n $widthX={2.5}\n $heightX={2.5}\n $background=\"WHITE\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n <Check2Icon />\n </Styled.CheckMarkIcon>\n\n <Text $renderAs=\"ab1-bold\" $align=\"center\" $color=\"WHITE\">\n Puzzle assigned\n </Text>\n </Styled.PuzzleText>\n );\n }\n\n // No content during animations\n return null;\n };\n\n if (animationPhase === 'hidden' && !triggerReveal) {\n return null;\n }\n\n return (\n <Styled.PuzzleContainer>\n <PuzzleCard\n animationPhase={!externalAssigned ? animationPhase : undefined}\n onAnimationEnd={handleAnimationEnd}\n imageHue={imageHue ?? 'BLUE'}\n heightX={19}\n widthX={15.75}\n backgroundColor={externalAssigned ? `${imageHue}_2` : undefined}\n >\n {renderContent()}\n </PuzzleCard>\n </Styled.PuzzleContainer>\n );\n },\n);\n\nexport default PuzzleCardContainer;\n"],"names":["ASSIGNED_DISPLAY_DURATION","PuzzleCardContainer","memo","userType","triggerReveal","onFullyHidden","onPuzzleClick","puzzleData","courseStream","studentId","imageHue","imageUrl","externalAssigned","title","puzzleId","animationPhase","setAnimationPhase","useState","isAssigned","setIsAssigned","assignedTimer","useRef","postPuzzleToAssign","isProcessing","usePostPuzzleToAssign","error","useEffect","handleAnimationEnd","useCallback","handleAssign","handleOnPuzzleClick","renderContent","jsxs","Fragment","Styled.PuzzleContent","jsx","Image","Text","Styled.AssignedTag","Styled.PuzzleButton","Styled.PuzzleText","Styled.CheckMarkIcon","Check2Icon","Styled.PuzzleContainer","PuzzleCard","PuzzleCardContainer$1"],"mappings":";;;;;;;;AAaA,MAAMA,IAA4B,MAE5BC,IAAqDC;AAAA,EACzD,CAAC;AAAA,IACC,UAAAC;AAAA,IACA,eAAAC,IAAgB;AAAA,IAChB,eAAAC;AAAA,IACA,eAAAC;AAAA,IACA,YAAAC;AAAA,IACA,cAAAC;AAAA,IACA,WAAAC;AAAA,EAAA,MACI;AACE,UAAA;AAAA,MACJ,WAAWC;AAAA,MACX,WAAWC;AAAA,MACX,UAAUC;AAAA,MACV,OAAAC;AAAA,MACA,IAAIC;AAAA,IACF,IAAAP,GAEE,CAACQ,GAAgBC,CAAiB,IAAIC,EAAqC,QAAQ,GACnF,CAACC,GAAYC,CAAa,IAAIF,EAAS,EAAK,GAE5CG,IAAgBC,EAA8B,IAAI,GAElD,EAAE,MAAMC,GAAoB,cAAAC,EAAA,IAAiBC,EAAsB;AAAA,MACvE,YAAY,CAACC,MAAyB;AACpC,QAAIA,IAEFT,EAAkB,SAAS,IAEvBD,MAAmB,aACrBC,EAAkB,WAAW;AAAA,MAGnC;AAAA,IAAA,CACD;AAGD,IAAAU,EAAU,MAAM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AAA,CAAA,IAKG;AAGL,WAAAtB,MAAmB,YAAY,CAACX,IAC3B,OAIP,gBAAA+B,EAACQ,GAAA,EACC,UAAA,gBAAAR;AAAA,MAACS;AAAA,MAAA;AAAA,QACC,gBAAiBhC,IAAoC,SAAjBG;AAAA,QACpC,gBAAgBY;AAAA,QAChB,UAAUjB,KAAY;AAAA,QACtB,SAAS;AAAA,QACT,QAAQ;AAAA,QACR,iBAAiBE,IAAmB,GAAGF,CAAQ,OAAO;AAAA,QAErD,UAAcqB,EAAA;AAAA,MAAA;AAAA,IAEnB,EAAA,CAAA;AAAA,EAEJ;AACF,GAEAc,IAAe5C;"}
|
1
|
+
{"version":3,"file":"puzzle-container.js","sources":["../../../../src/features/puzzles/puzzle-container/puzzle-container.tsx"],"sourcesContent":["import type { ILottieAnimationRef } from '../../ui/lottie-animation/types';\nimport type { IPuzzleCardContainerProps } from './puzzle-container-types';\nimport type { AnimationEventName, BMEnterFrameEvent } from 'lottie-web';\nimport type { FC } from 'react';\n\nimport { useState, useCallback, useEffect, useRef, memo, useMemo } from 'react';\n\nimport FlexView from '../../ui/layout/flex-view';\nimport LottieAnimation from '../../ui/lottie-animation/lottie-animation';\nimport { usePostPuzzleToAssign } from '../api/puzzle-assign';\nimport { PUZZLE_ASSIGN_ANIMATION } from '../constants/puzzle-container';\nimport { getPuzzleCardLottie } from '../utils/puzzle-pattern';\nimport * as Styled from './puzzle-container-styled';\nimport PuzzleAssigned from './puzzle-container-view';\n\nconst modeRevealAnimationSettings = {\n loop: false,\n renderer: 'svg',\n autoPlay: false,\n};\n\nconst PuzzleCardContainer: FC<IPuzzleCardContainerProps> = memo(\n ({\n triggerReveal = false,\n onFullyHidden,\n onPuzzleClick,\n puzzleData,\n courseStream,\n studentId,\n }) => {\n const {\n image_hue: imageHue,\n image_url: imageUrl,\n assigned: externalAssigned,\n title,\n id: puzzleId,\n node_id: nodeId,\n student_elo_rating,\n current_elo_rating,\n } = puzzleData;\n\n const [showPuzzleInfo, setShowPuzzleInfo] = useState(externalAssigned);\n\n const assignLottieRef = useRef<ILottieAnimationRef | null>(null);\n const puzzleLottieSrc = useMemo(() => getPuzzleCardLottie(imageHue), [imageHue]);\n\n const analyticsProps = useMemo(\n () => ({\n node_id: nodeId,\n node_type: 'PUZZLE_CARD',\n student_elo_rating,\n current_elo_rating,\n }),\n [nodeId, student_elo_rating, current_elo_rating],\n );\n\n const { post: postPuzzleToAssign, isProcessing } = usePostPuzzleToAssign({\n onComplete: (error: string | null) => {\n if (error) {\n // Handle error (e.g., show a notification)\n setShowPuzzleInfo(true);\n } else {\n assignLottieRef.current?.playSegments(PUZZLE_ASSIGN_ANIMATION.REVEAL_ASSIGNED, false);\n\n setShowPuzzleInfo(false);\n }\n },\n });\n\n useEffect(() => {\n if (!externalAssigned) {\n if (triggerReveal) {\n assignLottieRef.current?.playSegments(PUZZLE_ASSIGN_ANIMATION.REVEAL, true);\n } else {\n assignLottieRef.current?.stop();\n setShowPuzzleInfo(false);\n }\n }\n }, [externalAssigned, triggerReveal]);\n\n const handleAssign = useCallback(() => {\n if (externalAssigned) return;\n\n postPuzzleToAssign(\n {\n puzzle_id: puzzleId,\n },\n {\n studentId,\n courseStream,\n },\n );\n }, [courseStream, externalAssigned, postPuzzleToAssign, puzzleId, studentId]);\n\n const handleOnPuzzleClick = useCallback(() => {\n onPuzzleClick();\n }, [onPuzzleClick]);\n\n const showPuzzleLottie = useCallback(() => {\n assignLottieRef.current?.playSegments(PUZZLE_ASSIGN_ANIMATION.REVEAL, true);\n }, []);\n\n const onAnimationFinish = useMemo(\n () => ({\n name: 'enterFrame' as AnimationEventName,\n callback: (event: BMEnterFrameEvent) => {\n const { currentTime } = event;\n\n if (currentTime === 49) {\n setShowPuzzleInfo(true);\n }\n\n if (currentTime === 101) {\n onFullyHidden?.();\n }\n },\n }),\n [onFullyHidden],\n );\n\n if (!triggerReveal) {\n return null;\n }\n\n if (externalAssigned) {\n return (\n <Styled.PuzzleContainer $justifyContent=\"center\">\n <Styled.PuzzleAssignedWrapper\n $imageHue={imageHue}\n $background={`${imageHue}_2`}\n $widthX={15.9375}\n >\n <PuzzleAssigned\n imageUrl={imageUrl}\n handleOnPuzzleClick={handleOnPuzzleClick}\n title={title}\n assigned\n />\n </Styled.PuzzleAssignedWrapper>\n </Styled.PuzzleContainer>\n );\n }\n\n return (\n <Styled.PuzzleContainer>\n <FlexView $heightX={26}>\n <LottieAnimation\n src={puzzleLottieSrc}\n ref={assignLottieRef}\n settings={modeRevealAnimationSettings}\n onRender={showPuzzleLottie}\n eventListener={onAnimationFinish}\n animateOnIntersect\n />\n\n <Styled.PuzzleContentWrapper $visible={showPuzzleInfo} $position=\"absolute\">\n <PuzzleAssigned\n imageUrl={imageUrl}\n title={title}\n handleOnPuzzleClick={handleOnPuzzleClick}\n handleAssign={handleAssign}\n assigning={isProcessing}\n analyticsProps={analyticsProps}\n />\n </Styled.PuzzleContentWrapper>\n </FlexView>\n </Styled.PuzzleContainer>\n );\n },\n);\n\nexport default PuzzleCardContainer;\n"],"names":["modeRevealAnimationSettings","PuzzleCardContainer","memo","triggerReveal","onFullyHidden","onPuzzleClick","puzzleData","courseStream","studentId","imageHue","imageUrl","externalAssigned","title","puzzleId","nodeId","student_elo_rating","current_elo_rating","showPuzzleInfo","setShowPuzzleInfo","useState","assignLottieRef","useRef","puzzleLottieSrc","useMemo","getPuzzleCardLottie","analyticsProps","postPuzzleToAssign","isProcessing","usePostPuzzleToAssign","error","_a","PUZZLE_ASSIGN_ANIMATION","useEffect","_b","handleAssign","useCallback","handleOnPuzzleClick","showPuzzleLottie","onAnimationFinish","event","currentTime","jsx","Styled.PuzzleContainer","Styled.PuzzleAssignedWrapper","PuzzleAssigned","jsxs","FlexView","LottieAnimation","Styled.PuzzleContentWrapper","PuzzleCardContainer$1"],"mappings":";;;;;;;;;AAeA,MAAMA,IAA8B;AAAA,EAClC,MAAM;AAAA,EACN,UAAU;AAAA,EACV,UAAU;AACZ,GAEMC,IAAqDC;AAAA,EACzD,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B,WAAU,YAC/D,UAAA,gBAAAwB;AAAA,QAACG;AAAAA,QAAA;AAAA,UACC,UAAAlC;AAAA,UACA,OAAAE;AAAA,UACA,qBAAAwB;AAAA,UACA,cAAAF;AAAA,UACA,WAAWP;AAAA,UACX,gBAAAF;AAAA,QAAA;AAAA,MAAA,GAEJ;AAAA,IAAA,EACF,CAAA,EACF,CAAA,IA7CO;AAAA,EA+CX;AACF,GAEAwB,KAAehD;"}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import o from "styled-components";
|
2
|
+
import { ILLUSTRATIONS as t } from "../../../assets/illustrations/illustrations.js";
|
3
|
+
import e from "../../../assets/line-icons/icons/puzzle2.js";
|
4
|
+
import p from "../../ui/layout/flex-view.js";
|
5
|
+
const s = o(p)``, l = o(p)`
|
6
|
+
background-image: url(${t.PUZZLE_DASHBOARD_BANNER});
|
7
|
+
background-size: cover;
|
8
|
+
`, d = o(p)`
|
9
|
+
position: absolute;
|
10
|
+
top: 16px;
|
11
|
+
left: 16px;
|
12
|
+
`, m = o(p)`
|
13
|
+
position: sticky;
|
14
|
+
top: 16px;
|
15
|
+
z-index: 5;
|
16
|
+
`, u = o.div`
|
17
|
+
display: grid;
|
18
|
+
width: 100%;
|
19
|
+
grid-template-columns: repeat(5, 1fr);
|
20
|
+
column-gap: 24px;
|
21
|
+
row-gap: 40px;
|
22
|
+
padding: 0 37px;
|
23
|
+
`, x = o(e)`
|
24
|
+
path {
|
25
|
+
stroke: ${({ theme: r }) => r.colors.BLACK_T_60};
|
26
|
+
opacity: 0.38;
|
27
|
+
}
|
28
|
+
`;
|
29
|
+
export {
|
30
|
+
d as BackIconContainer,
|
31
|
+
m as BackIconWrapper,
|
32
|
+
l as BannerWrapper,
|
33
|
+
u as ContentWrapper,
|
34
|
+
s as PuzzleDashboardWrapper,
|
35
|
+
x as StyledPuzzleIcon
|
36
|
+
};
|
37
|
+
//# sourceMappingURL=puzzle-dashboard-styled.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"puzzle-dashboard-styled.js","sources":["../../../../src/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport PuzzleIcon2 from '../../../assets/line-icons/icons/puzzle2';\nimport FlexView from '../../ui/layout/flex-view';\n\nconst PuzzleDashboardWrapper = styled(FlexView)``;\n\nconst BannerWrapper = styled(FlexView)`\n background-image: url(${ILLUSTRATIONS.PUZZLE_DASHBOARD_BANNER});\n background-size: cover;\n`;\n\nconst BackIconContainer = styled(FlexView)`\n position: absolute;\n top: 16px;\n left: 16px;\n`;\n\nconst BackIconWrapper = styled(FlexView)`\n position: sticky;\n top: 16px;\n z-index: 5;\n`;\n\nconst ContentWrapper = styled.div`\n display: grid;\n width: 100%;\n grid-template-columns: repeat(5, 1fr);\n column-gap: 24px;\n row-gap: 40px;\n padding: 0 37px;\n`;\n\nconst StyledPuzzleIcon = styled(PuzzleIcon2)`\n path {\n stroke: ${({ theme }) => theme.colors.BLACK_T_60};\n opacity: 0.38;\n }\n`;\n\nexport {\n PuzzleDashboardWrapper,\n BannerWrapper,\n BackIconContainer,\n BackIconWrapper,\n ContentWrapper,\n StyledPuzzleIcon,\n};\n"],"names":["PuzzleDashboardWrapper","styled","FlexView","BannerWrapper","ILLUSTRATIONS","BackIconContainer","BackIconWrapper","ContentWrapper","StyledPuzzleIcon","PuzzleIcon2","theme"],"mappings":";;;;AAMM,MAAAA,IAAyBC,EAAOC,CAAQ,KAExCC,IAAgBF,EAAOC,CAAQ;AAAA,0BACXE,EAAc,uBAAuB;AAAA;AAAA,GAIzDC,IAAoBJ,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA,GAMnCI,IAAkBL,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA,GAMjCK,IAAiBN,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASxBO,IAAmBP,EAAOQ,CAAW;AAAA;AAAA,cAE7B,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,OAAO,UAAU;AAAA;AAAA;AAAA;"}
|
@@ -0,0 +1,110 @@
|
|
1
|
+
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
2
|
+
import { useCallback as w, useEffect as P } from "react";
|
3
|
+
import _ from "../../../assets/line-icons/icons/back2.js";
|
4
|
+
import x from "../../ui/buttons/button/button.js";
|
5
|
+
import y from "../../ui/buttons/icon-button/icon-button.js";
|
6
|
+
import t from "../../ui/layout/flex-view.js";
|
7
|
+
import A from "../../ui/loader/app-loader/app-loader.js";
|
8
|
+
import i from "../../ui/text/text.js";
|
9
|
+
import { useGetPuzzles as I } from "../api/puzzle-dashboard.js";
|
10
|
+
import X from "../comps/puzzle-card.js";
|
11
|
+
import { PuzzleDashboardWrapper as j, BannerWrapper as B, BackIconContainer as k, BackIconWrapper as T, StyledPuzzleIcon as v, ContentWrapper as S } from "./puzzle-dashboard-styled.js";
|
12
|
+
const W = ({ studentId: o, onBackCLick: s, onCardClick: d }) => {
|
13
|
+
const {
|
14
|
+
get: c,
|
15
|
+
data: r,
|
16
|
+
isProcessing: h,
|
17
|
+
isProcessingFailed: m
|
18
|
+
} = I(), l = (r == null ? void 0 : r.length) || 0, a = w(() => {
|
19
|
+
c(o, void 0, {
|
20
|
+
courseStream: "MATH"
|
21
|
+
});
|
22
|
+
}, [c, o]);
|
23
|
+
return P(() => {
|
24
|
+
a();
|
25
|
+
}, [a]), h ? /* @__PURE__ */ e(A, { height: "100vh" }) : m ? /* @__PURE__ */ n(t, { $flexGapX: 1.5, $height: "100vh", $justifyContent: "center", $alignItems: "center", children: [
|
26
|
+
/* @__PURE__ */ e(i, { $renderAs: "h6", children: "Oops! Something went wrong. Please try again later." }),
|
27
|
+
/* @__PURE__ */ e(
|
28
|
+
x,
|
29
|
+
{
|
30
|
+
widthX: 14,
|
31
|
+
size: "small",
|
32
|
+
shape: "square",
|
33
|
+
renderAs: "primary",
|
34
|
+
label: "Try again",
|
35
|
+
onClick: a
|
36
|
+
}
|
37
|
+
)
|
38
|
+
] }) : /* @__PURE__ */ n(
|
39
|
+
j,
|
40
|
+
{
|
41
|
+
$alignItems: "center",
|
42
|
+
$flexGapX: l === 0 ? 10 : 2.5,
|
43
|
+
$position: "relative",
|
44
|
+
children: [
|
45
|
+
/* @__PURE__ */ n(B, { $widthX: 50, $heightX: 10.5, $justifyContent: "center", children: [
|
46
|
+
/* @__PURE__ */ n(i, { $renderAs: "ah3-bold", $alignSelf: "center", children: [
|
47
|
+
l,
|
48
|
+
" Puzzles Solved"
|
49
|
+
] }),
|
50
|
+
s && /* @__PURE__ */ e(k, { $height: "100%", children: /* @__PURE__ */ e(T, { children: /* @__PURE__ */ e(
|
51
|
+
y,
|
52
|
+
{
|
53
|
+
Icon: _,
|
54
|
+
size: "xsmall",
|
55
|
+
renderAs: "secondary",
|
56
|
+
analyticsLabel: "puzzle_back",
|
57
|
+
onClick: s
|
58
|
+
}
|
59
|
+
) }) })
|
60
|
+
] }),
|
61
|
+
l === 0 ? /* @__PURE__ */ n(t, { $flexGapX: 1, $justifyContent: "center", children: [
|
62
|
+
/* @__PURE__ */ e(
|
63
|
+
t,
|
64
|
+
{
|
65
|
+
$flexDirection: "row",
|
66
|
+
$alignItems: "center",
|
67
|
+
$justifyContent: "center",
|
68
|
+
$width: "100%",
|
69
|
+
children: /* @__PURE__ */ e(t, { $widthX: 3.5, $heightX: 3.5, $background: "WHITE_4", children: /* @__PURE__ */ e(v, { width: 56, height: 56 }) })
|
70
|
+
}
|
71
|
+
),
|
72
|
+
/* @__PURE__ */ n(t, { $justifyContent: "center", children: [
|
73
|
+
/* @__PURE__ */ e(i, { $renderAs: "ab2-bold", $color: "BLACK_T_60", $align: "center", children: "No puzzle assigned yet!" }),
|
74
|
+
/* @__PURE__ */ e(i, { $renderAs: "ab2-bold", $color: "BLACK_T_60", children: "Hang tight — your tutor will share one soon! 🎉🧩" })
|
75
|
+
] })
|
76
|
+
] }) : /* @__PURE__ */ e(S, { children: r == null ? void 0 : r.map((u) => {
|
77
|
+
const {
|
78
|
+
id: p,
|
79
|
+
image_hue: $,
|
80
|
+
image_url: g,
|
81
|
+
title: f,
|
82
|
+
user_node_id: z,
|
83
|
+
rewards: b,
|
84
|
+
node_id: C
|
85
|
+
} = u;
|
86
|
+
return /* @__PURE__ */ e(
|
87
|
+
X,
|
88
|
+
{
|
89
|
+
imageHue: $,
|
90
|
+
imageUrl: g,
|
91
|
+
title: f,
|
92
|
+
width: 126,
|
93
|
+
height: 152,
|
94
|
+
onCardClick: d,
|
95
|
+
userNodeId: z,
|
96
|
+
rewards: b,
|
97
|
+
nodeId: C,
|
98
|
+
studentId: o
|
99
|
+
},
|
100
|
+
p
|
101
|
+
);
|
102
|
+
}) })
|
103
|
+
]
|
104
|
+
}
|
105
|
+
);
|
106
|
+
}, U = W;
|
107
|
+
export {
|
108
|
+
U as default
|
109
|
+
};
|
110
|
+
//# sourceMappingURL=puzzle-dashboard.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"puzzle-dashboard.js","sources":["../../../../src/features/puzzles/puzzle-dashboard/puzzle-dashboard.tsx"],"sourcesContent":["import type { IPuzzleDashboardProps } from './puzzle-dashboard-types';\n\nimport { useCallback, useEffect, type FC } from 'react';\n\nimport Back2Icon from '../../../assets/line-icons/icons/back2';\nimport Button from '../../ui/buttons/button/button';\nimport IconButton from '../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../ui/layout/flex-view';\nimport AppLoader from '../../ui/loader/app-loader/app-loader';\nimport Text from '../../ui/text/text';\nimport { useGetPuzzles } from '../api/puzzle-dashboard';\nimport PuzzleCard from '../comps/puzzle-card';\nimport * as Styled from './puzzle-dashboard-styled';\n\nconst PuzzleDashboard: FC<IPuzzleDashboardProps> = ({ studentId, onBackCLick, onCardClick }) => {\n const {\n get: getPuzzles,\n data: puzzleHistoryData,\n isProcessing,\n isProcessingFailed,\n } = useGetPuzzles();\n\n const puzzleCount = puzzleHistoryData?.length || 0;\n\n const fetchPuzzles = useCallback(() => {\n getPuzzles(studentId, undefined, {\n courseStream: 'MATH',\n });\n }, [getPuzzles, studentId]);\n\n useEffect(() => {\n fetchPuzzles();\n }, [fetchPuzzles]);\n\n if (isProcessing) {\n return <AppLoader height=\"100vh\" />;\n }\n\n if (isProcessingFailed) {\n return (\n <FlexView $flexGapX={1.5} $height=\"100vh\" $justifyContent=\"center\" $alignItems=\"center\">\n <Text $renderAs=\"h6\">Oops! Something went wrong. Please try again later.</Text>\n <Button\n widthX={14}\n size=\"small\"\n shape=\"square\"\n renderAs=\"primary\"\n label=\"Try again\"\n onClick={fetchPuzzles}\n />\n </FlexView>\n );\n }\n\n return (\n <Styled.PuzzleDashboardWrapper\n $alignItems=\"center\"\n $flexGapX={puzzleCount === 0 ? 10 : 2.5}\n $position=\"relative\"\n >\n <Styled.BannerWrapper $widthX={50} $heightX={10.5} $justifyContent=\"center\">\n <Text $renderAs=\"ah3-bold\" $alignSelf=\"center\">\n {puzzleCount} Puzzles Solved\n </Text>\n\n {onBackCLick && (\n <Styled.BackIconContainer $height=\"100%\">\n <Styled.BackIconWrapper>\n <IconButton\n Icon={Back2Icon}\n size=\"xsmall\"\n renderAs=\"secondary\"\n analyticsLabel=\"puzzle_back\"\n onClick={onBackCLick}\n />\n </Styled.BackIconWrapper>\n </Styled.BackIconContainer>\n )}\n </Styled.BannerWrapper>\n\n {puzzleCount === 0 ? (\n <FlexView $flexGapX={1} $justifyContent=\"center\">\n <FlexView\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $width=\"100%\"\n >\n <FlexView $widthX={3.5} $heightX={3.5} $background=\"WHITE_4\">\n <Styled.StyledPuzzleIcon width={56} height={56} />\n </FlexView>\n </FlexView>\n\n <FlexView $justifyContent=\"center\">\n <Text $renderAs=\"ab2-bold\" $color=\"BLACK_T_60\" $align=\"center\">\n No puzzle assigned yet!\n </Text>\n <Text $renderAs=\"ab2-bold\" $color=\"BLACK_T_60\">\n Hang tight — your tutor will share one soon! 🎉🧩\n </Text>\n </FlexView>\n </FlexView>\n ) : (\n <Styled.ContentWrapper>\n {puzzleHistoryData?.map(item => {\n const {\n id,\n image_hue: imageHue,\n image_url: imageUrl,\n title,\n user_node_id: userNodeId,\n rewards,\n node_id: nodeId,\n } = item;\n\n return (\n <PuzzleCard\n key={id}\n imageHue={imageHue}\n imageUrl={imageUrl}\n title={title}\n width={126}\n height={152}\n onCardClick={onCardClick}\n userNodeId={userNodeId}\n rewards={rewards}\n nodeId={nodeId}\n studentId={studentId}\n />\n );\n })}\n </Styled.ContentWrapper>\n )}\n </Styled.PuzzleDashboardWrapper>\n );\n};\n\nexport default PuzzleDashboard;\n"],"names":["PuzzleDashboard","studentId","onBackCLick","onCardClick","getPuzzles","puzzleHistoryData","isProcessing","isProcessingFailed","useGetPuzzles","puzzleCount","fetchPuzzles","useCallback","useEffect","jsx","AppLoader","jsxs","FlexView","Text","Button","Styled.PuzzleDashboardWrapper","Styled.BannerWrapper","Styled.BackIconContainer","Styled.BackIconWrapper","IconButton","Back2Icon","Styled.StyledPuzzleIcon","Styled.ContentWrapper","item","id","imageHue","imageUrl","title","userNodeId","rewards","nodeId","PuzzleCard","PuzzleDashboard$1"],"mappings":";;;;;;;;;;;AAcA,MAAMA,IAA6C,CAAC,EAAE,WAAAC,GAAW,aAAAC,GAAa,aAAAC,QAAkB;AACxF,QAAA;AAAA,IACJ,KAAKC;AAAA,IACL,MAAMC;AAAA,IACN,cAAAC;AAAA,IACA,oBAAAC;AAAA,MACEC,EAAc,GAEZC,KAAcJ,KAAA,gBAAAA,EAAmB,WAAU,GAE3CK,IAAeC,EAAY,MAAM;AACrC,IAAAP,EAAWH,GAAW,QAAW;AAAA,MAC/B,cAAc;AAAA,IAAA,CACf;AAAA,EAAA,GACA,CAACG,GAAYH,CAAS,CAAC;AAM1B,SAJAW,EAAU,MAAM;AACD,IAAAF;EAAA,GACZ,CAACA,CAAY,CAAC,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S,EAAA,SAAS,KAAK,UAAU,KAAK,aAAY,WACjD,UAAC,gBAAAH,EAAAY,GAAA,EAAwB,OAAO,IAAI,QAAQ,GAAI,CAAA,GAClD;AAAA,YAAA;AAAA,UACF;AAAA,UAEA,gBAAAV,EAACC,GAAS,EAAA,iBAAgB,UACxB,UAAA;AAAA,YAAA,gBAAAH,EAACI,KAAK,WAAU,YAAW,QAAO,cAAa,QAAO,UAAS,UAE/D,0BAAA,CAAA;AAAA,8BACCA,GAAK,EAAA,WAAU,YAAW,QAAO,cAAa,UAE/C,qDAAA;AAAA,UAAA,GACF;AAAA,QAAA,GACF,IAEC,gBAAAJ,EAAAa,GAAA,EACE,UAAArB,KAAA,gBAAAA,EAAmB,IAAI,CAAQsB,MAAA;AACxB,gBAAA;AAAA,YACJ,IAAAC;AAAA,YACA,WAAWC;AAAA,YACX,WAAWC;AAAA,YACX,OAAAC;AAAA,YACA,cAAcC;AAAA,YACd,SAAAC;AAAA,YACA,SAASC;AAAA,UACP,IAAAP;AAGF,iBAAA,gBAAAd;AAAA,YAACsB;AAAA,YAAA;AAAA,cAEC,UAAAN;AAAA,cACA,UAAAC;AAAA,cACA,OAAAC;AAAA,cACA,OAAO;AAAA,cACP,QAAQ;AAAA,cACR,aAAA5B;AAAA,cACA,YAAA6B;AAAA,cACA,SAAAC;AAAA,cACA,QAAAC;AAAA,cACA,WAAAjC;AAAA,YAAA;AAAA,YAVK2B;AAAA,UAAA;AAAA,QAaV,IACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR,GAEAQ,IAAepC;"}
|
package/dist/features/puzzles/puzzle-feedback-celebration/puzzle-feedback-celebration.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"puzzle-feedback-celebration.js","sources":["../../../../src/features/puzzles/puzzle-feedback-celebration/puzzle-feedback-celebration.tsx"],"sourcesContent":["import type { IPuzzleFeedbackCelebration } from './puzzle-feedback-celebration-types';\nimport type { FC } from 'react';\n\nimport { useCallback, useEffect, useState } from 'react';\n\nimport CrossIcon from '../../../assets/line-icons/icons/cross';\nimport IconButton from '../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../ui/layout/flex-view';\nimport LottieAnimation from '../../ui/lottie-animation/lottie-animation';\nimport useModalActions from '../../ui/modals/use-modal-actions';\nimport useModalParams from '../../ui/modals/use-modal-params';\nimport { getPuzzleStickerLottie } from '../utils/puzzle-feedback-celebration';\nimport * as Styled from './puzzle-feedback-celebration-styled';\n\nconst puzzleStickerLottieSettings = {\n autoplay: true,\n loop: true,\n renderer: 'canvas',\n};\n\nconst PuzzleFeedbackCelebration: FC = () => {\n const { closeModal } = useModalActions();\n const { feedbackComments, rewards, onCloseModal } = useModalParams<IPuzzleFeedbackCelebration>();\n\n const [showHeader, setShowHeader] = useState(false);\n const [showLottie, setShowLottie] = useState(false);\n const [showText, setShowText] = useState(false);\n const [showButton, setShowButton] = useState(false);\n\n const { sticker } = rewards[0] || {};\n\n const stickerLottie = sticker ? getPuzzleStickerLottie(sticker) : undefined;\n\n const handleCloseModal = useCallback(() => {\n onCloseModal?.();\n closeModal();\n }, [closeModal, onCloseModal]);\n\n useEffect(() => {\n // Sequence: Header -> Lottie -> Text -> Button\n const headerTimer = setTimeout(() => {\n setShowHeader(true);\n }, 100);\n\n const lottieTimer = setTimeout(() => {\n setShowLottie(true);\n }, 400);\n\n const textTimer = setTimeout(() => {\n setShowText(true);\n }, 1000);\n\n const buttonTimer = setTimeout(() => {\n setShowButton(true);\n }, 1500);\n\n // Close modal after 4000ms\n const closeModalTimer = setTimeout(() => {\n handleCloseModal();\n }, 5500);\n\n return () => {\n clearTimeout(headerTimer);\n clearTimeout(lottieTimer);\n clearTimeout(textTimer);\n clearTimeout(buttonTimer);\n clearTimeout(closeModalTimer);\n };\n }, [handleCloseModal]);\n\n return (\n <FlexView $justifyContent=\"center\" $alignItems=\"center\" $width=\"100%\">\n <Styled.PuzzleFeedbackModalWrapper $flexGapX={2.5} $widthX={33.5} $alignItems=\"center\">\n <Styled.ShimmerText $renderAs=\"ac2-black\" $show={showHeader}>\n Puzzle Reviewed\n </Styled.ShimmerText>\n\n <Styled.LottieContainer $widthX={12.5} $heightX={12.5} $show={showLottie}>\n {stickerLottie && (\n <LottieAnimation\n width={200}\n height={200}\n src={stickerLottie}\n settings={puzzleStickerLottieSettings}\n />\n )}\n </Styled.LottieContainer>\n\n <Styled.FeedbackText\n $width=\"80%\"\n $renderAs=\"
|
1
|
+
{"version":3,"file":"puzzle-feedback-celebration.js","sources":["../../../../src/features/puzzles/puzzle-feedback-celebration/puzzle-feedback-celebration.tsx"],"sourcesContent":["import type { IPuzzleFeedbackCelebration } from './puzzle-feedback-celebration-types';\nimport type { FC } from 'react';\n\nimport { useCallback, useEffect, useState } from 'react';\n\nimport CrossIcon from '../../../assets/line-icons/icons/cross';\nimport IconButton from '../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../ui/layout/flex-view';\nimport LottieAnimation from '../../ui/lottie-animation/lottie-animation';\nimport useModalActions from '../../ui/modals/use-modal-actions';\nimport useModalParams from '../../ui/modals/use-modal-params';\nimport { getPuzzleStickerLottie } from '../utils/puzzle-feedback-celebration';\nimport * as Styled from './puzzle-feedback-celebration-styled';\n\nconst puzzleStickerLottieSettings = {\n autoplay: true,\n loop: true,\n renderer: 'canvas',\n};\n\nconst PuzzleFeedbackCelebration: FC = () => {\n const { closeModal } = useModalActions();\n const { feedbackComments, rewards, onCloseModal } = useModalParams<IPuzzleFeedbackCelebration>();\n\n const [showHeader, setShowHeader] = useState(false);\n const [showLottie, setShowLottie] = useState(false);\n const [showText, setShowText] = useState(false);\n const [showButton, setShowButton] = useState(false);\n\n const { sticker } = rewards[0] || {};\n\n const stickerLottie = sticker ? getPuzzleStickerLottie(sticker) : undefined;\n\n const handleCloseModal = useCallback(() => {\n onCloseModal?.();\n closeModal();\n }, [closeModal, onCloseModal]);\n\n useEffect(() => {\n // Sequence: Header -> Lottie -> Text -> Button\n const headerTimer = setTimeout(() => {\n setShowHeader(true);\n }, 100);\n\n const lottieTimer = setTimeout(() => {\n setShowLottie(true);\n }, 400);\n\n const textTimer = setTimeout(() => {\n setShowText(true);\n }, 1000);\n\n const buttonTimer = setTimeout(() => {\n setShowButton(true);\n }, 1500);\n\n // Close modal after 4000ms\n const closeModalTimer = setTimeout(() => {\n handleCloseModal();\n }, 5500);\n\n return () => {\n clearTimeout(headerTimer);\n clearTimeout(lottieTimer);\n clearTimeout(textTimer);\n clearTimeout(buttonTimer);\n clearTimeout(closeModalTimer);\n };\n }, [handleCloseModal]);\n\n return (\n <FlexView $justifyContent=\"center\" $alignItems=\"center\" $width=\"100%\">\n <Styled.PuzzleFeedbackModalWrapper $flexGapX={2.5} $widthX={33.5} $alignItems=\"center\">\n <Styled.ShimmerText $renderAs=\"ac2-black\" $show={showHeader}>\n Puzzle Reviewed\n </Styled.ShimmerText>\n\n <Styled.LottieContainer $widthX={12.5} $heightX={12.5} $show={showLottie}>\n {stickerLottie && (\n <LottieAnimation\n width={200}\n height={200}\n src={stickerLottie}\n settings={puzzleStickerLottieSettings}\n />\n )}\n </Styled.LottieContainer>\n\n <Styled.FeedbackText\n $width=\"80%\"\n $renderAs=\"ah4\"\n $color=\"WHITE_1\"\n $align=\"center\"\n $show={showText}\n >\n {feedbackComments}\n </Styled.FeedbackText>\n\n <Styled.CloseButtonWrapper $show={showButton}>\n <IconButton\n renderAs=\"secondary\"\n Icon={CrossIcon}\n size=\"small\"\n analyticsLabel=\"close_puzzle_feedback_modal\"\n onClick={handleCloseModal}\n />\n </Styled.CloseButtonWrapper>\n </Styled.PuzzleFeedbackModalWrapper>\n </FlexView>\n );\n};\n\nexport default PuzzleFeedbackCelebration;\n"],"names":["puzzleStickerLottieSettings","PuzzleFeedbackCelebration","closeModal","useModalActions","feedbackComments","rewards","onCloseModal","useModalParams","showHeader","setShowHeader","useState","showLottie","setShowLottie","showText","setShowText","showButton","setShowButton","sticker","stickerLottie","getPuzzleStickerLottie","handleCloseModal","useCallback","useEffect","headerTimer","lottieTimer","textTimer","buttonTimer","closeModalTimer","FlexView","jsxs","Styled.PuzzleFeedbackModalWrapper","jsx","Styled.ShimmerText","Styled.LottieContainer","LottieAnimation","Styled.FeedbackText","Styled.CloseButtonWrapper","IconButton","CrossIcon","PuzzleFeedbackCelebration$1"],"mappings":";;;;;;;;;;AAcA,MAAMA,IAA8B;AAAA,EAClC,UAAU;AAAA,EACV,MAAM;AAAA,EACN,UAAU;AACZ,GAEMC,IAAgC,MAAM;AACpC,QAAA,EAAE,YAAAC,MAAeC,KACjB,EAAE,kBAAAC,GAAkB,SAAAC,GAAS,cAAAC,MAAiBC,EAA2C,GAEzF,CAACC,GAAYC,CAAa,IAAIC,EAAS,EAAK,GAC5C,CAACC,GAAYC,CAAa,IAAIF,EAAS,EAAK,GAC5C,CAACG,GAAUC,CAAW,IAAIJ,EAAS,EAAK,GACxC,CAACK,GAAYC,CAAa,IAAIN,EAAS,EAAK,GAE5C,EAAE,SAAAO,EAAQ,IAAIZ,EAAQ,CAAC,KAAK,CAAA,GAE5Ba,IAAgBD,IAAUE,EAAuBF,CAAO,IAAI,QAE5DG,IAAmBC,EAAY,MAAM;AAC1B,IAAAf,KAAA,QAAAA,KACJJ;EAAA,GACV,CAACA,GAAYI,CAAY,CAAC;AAE7B,SAAAgB,EAAU,MAAM;AAER,UAAAC,IAAc,WAAW,MAAM;AACnC,MAAAd,EAAc,EAAI;AAAA,OACjB,GAAG,GAEAe,IAAc,WAAW,MAAM;AACnC,MAAAZ,EAAc,EAAI;AAAA,OACjB,GAAG,GAEAa,IAAY,WAAW,MAAM;AACjC,MAAAX,EAAY,EAAI;AAAA,OACf,GAAI,GAEDY,IAAc,WAAW,MAAM;AACnC,MAAAV,EAAc,EAAI;AAAA,OACjB,IAAI,GAGDW,IAAkB,WAAW,MAAM;AACtB,MAAAP;OAChB,IAAI;AAEP,WAAO,MAAM;AACX,mBAAaG,CAAW,GACxB,aAAaC,CAAW,GACxB,aAAaC,CAAS,GACtB,aAAaC,CAAW,GACxB,aAAaC,CAAe;AAAA,IAAA;AAAA,EAC9B,GACC,CAACP,CAAgB,CAAC,qBAGlBQ,GAAS,EAAA,iBAAgB,UAAS,aAAY,UAAS,QAAO,QAC7D,UAAC,gBAAAC,EAAAC,GAAA,EAAkC,WAAW,KAAK,SAAS,MAAM,aAAY,UAC5E,UAAA;AAAA,IAAA,gBAAAC,EAACC,GAAA,EAAmB,WAAU,aAAY,OAAOxB,GAAY,UAE7D,mBAAA;AAAA,IAEA,gBAAAuB,EAACE,GAAA,EAAuB,SAAS,MAAM,UAAU,MAAM,OAAOtB,GAC3D,UACCO,KAAA,gBAAAa;AAAA,MAACG;AAAA,MAAA;AAAA,QACC,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,KAAKhB;AAAA,QACL,UAAUlB;AAAA,MAAA;AAAA,IAAA,GAGhB;AAAA,IAEA,gBAAA+B;AAAA,MAACI;AAAAA,MAAA;AAAA,QACC,QAAO;AAAA,QACP,WAAU;AAAA,QACV,QAAO;AAAA,QACP,QAAO;AAAA,QACP,OAAOtB;AAAA,QAEN,UAAAT;AAAA,MAAA;AAAA,IACH;AAAA,IAEC,gBAAA2B,EAAAK,GAAA,EAA0B,OAAOrB,GAChC,UAAA,gBAAAgB;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,UAAS;AAAA,QACT,MAAMC;AAAA,QACN,MAAK;AAAA,QACL,gBAAe;AAAA,QACf,SAASlB;AAAA,MAAA;AAAA,IAAA,GAEb;AAAA,EAAA,EACF,CAAA,EACF,CAAA;AAEJ,GAEAmB,IAAetC;"}
|
@@ -1,25 +1,40 @@
|
|
1
|
-
import { ILLUSTRATIONS as
|
1
|
+
import { ILLUSTRATIONS as r } from "../../../assets/illustrations/illustrations.js";
|
2
|
+
import { LOTTIE as E } from "../../../assets/lottie/lottie.js";
|
2
3
|
const {
|
3
|
-
PUZZLE_PATTERN_BLUE:
|
4
|
-
PUZZLE_PATTERN_GREEN:
|
5
|
-
PUZZLE_PATTERN_ORANGE:
|
6
|
-
PUZZLE_PATTERN_PURPLE:
|
7
|
-
PUZZLE_PATTERN_YELLOW:
|
8
|
-
} =
|
9
|
-
switch (
|
4
|
+
PUZZLE_PATTERN_BLUE: e,
|
5
|
+
PUZZLE_PATTERN_GREEN: t,
|
6
|
+
PUZZLE_PATTERN_ORANGE: P,
|
7
|
+
PUZZLE_PATTERN_PURPLE: T,
|
8
|
+
PUZZLE_PATTERN_YELLOW: Z
|
9
|
+
} = r, U = (L) => {
|
10
|
+
switch (L) {
|
10
11
|
case "YELLOW":
|
11
|
-
return
|
12
|
+
return Z;
|
12
13
|
case "GREEN":
|
14
|
+
return t;
|
15
|
+
case "ORANGE":
|
16
|
+
return P;
|
17
|
+
case "PURPLE":
|
18
|
+
return T;
|
19
|
+
default:
|
13
20
|
return e;
|
21
|
+
}
|
22
|
+
}, O = (L) => {
|
23
|
+
switch (L) {
|
24
|
+
case "YELLOW":
|
25
|
+
return E.PUZZLE_YELLOW_LOTTIE;
|
26
|
+
case "GREEN":
|
27
|
+
return E.PUZZLE_GREEN_LOTTIE;
|
14
28
|
case "ORANGE":
|
15
|
-
return
|
29
|
+
return E.PUZZLE_ORANGE_LOTTIE;
|
16
30
|
case "PURPLE":
|
17
|
-
return
|
31
|
+
return E.PUZZLE_PURPLE_LOTTIE;
|
18
32
|
default:
|
19
|
-
return
|
33
|
+
return E.PUZZLE_BLUE_LOTTIE;
|
20
34
|
}
|
21
35
|
};
|
22
36
|
export {
|
23
|
-
|
37
|
+
O as getPuzzleCardLottie,
|
38
|
+
U as getPuzzleCardPattern
|
24
39
|
};
|
25
40
|
//# sourceMappingURL=puzzle-pattern.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"puzzle-pattern.js","sources":["../../../../src/features/puzzles/utils/puzzle-pattern.ts"],"sourcesContent":["import type { THueNames } from '../../ui/types';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\n\nconst {\n PUZZLE_PATTERN_BLUE,\n PUZZLE_PATTERN_GREEN,\n PUZZLE_PATTERN_ORANGE,\n PUZZLE_PATTERN_PURPLE,\n PUZZLE_PATTERN_YELLOW,\n} = ILLUSTRATIONS;\n\nconst getPuzzleCardPattern = (imageHue: THueNames) => {\n switch (imageHue) {\n case 'YELLOW':\n return PUZZLE_PATTERN_YELLOW;\n case 'GREEN':\n return PUZZLE_PATTERN_GREEN;\n case 'ORANGE':\n return PUZZLE_PATTERN_ORANGE;\n case 'PURPLE':\n return PUZZLE_PATTERN_PURPLE;\n\n default:\n return PUZZLE_PATTERN_BLUE;\n }\n};\n\nexport { getPuzzleCardPattern };\n"],"names":["PUZZLE_PATTERN_BLUE","PUZZLE_PATTERN_GREEN","PUZZLE_PATTERN_ORANGE","PUZZLE_PATTERN_PURPLE","PUZZLE_PATTERN_YELLOW","ILLUSTRATIONS","getPuzzleCardPattern","imageHue"],"mappings":"
|
1
|
+
{"version":3,"file":"puzzle-pattern.js","sources":["../../../../src/features/puzzles/utils/puzzle-pattern.ts"],"sourcesContent":["import type { THueNames } from '../../ui/types';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport { LOTTIE } from '../../../assets/lottie/lottie';\n\nconst {\n PUZZLE_PATTERN_BLUE,\n PUZZLE_PATTERN_GREEN,\n PUZZLE_PATTERN_ORANGE,\n PUZZLE_PATTERN_PURPLE,\n PUZZLE_PATTERN_YELLOW,\n} = ILLUSTRATIONS;\n\nconst getPuzzleCardPattern = (imageHue: THueNames) => {\n switch (imageHue) {\n case 'YELLOW':\n return PUZZLE_PATTERN_YELLOW;\n case 'GREEN':\n return PUZZLE_PATTERN_GREEN;\n case 'ORANGE':\n return PUZZLE_PATTERN_ORANGE;\n case 'PURPLE':\n return PUZZLE_PATTERN_PURPLE;\n\n default:\n return PUZZLE_PATTERN_BLUE;\n }\n};\n\nconst getPuzzleCardLottie = (imageHue: THueNames) => {\n switch (imageHue) {\n case 'YELLOW':\n return LOTTIE.PUZZLE_YELLOW_LOTTIE;\n case 'GREEN':\n return LOTTIE.PUZZLE_GREEN_LOTTIE;\n case 'ORANGE':\n return LOTTIE.PUZZLE_ORANGE_LOTTIE;\n case 'PURPLE':\n return LOTTIE.PUZZLE_PURPLE_LOTTIE;\n\n default:\n return LOTTIE.PUZZLE_BLUE_LOTTIE;\n }\n};\n\nexport { getPuzzleCardPattern, getPuzzleCardLottie };\n"],"names":["PUZZLE_PATTERN_BLUE","PUZZLE_PATTERN_GREEN","PUZZLE_PATTERN_ORANGE","PUZZLE_PATTERN_PURPLE","PUZZLE_PATTERN_YELLOW","ILLUSTRATIONS","getPuzzleCardPattern","imageHue","getPuzzleCardLottie","LOTTIE"],"mappings":";;AAKA,MAAM;AAAA,EACJ,qBAAAA;AAAA,EACA,sBAAAC;AAAA,EACA,uBAAAC;AAAA,EACA,uBAAAC;AAAA,EACA,uBAAAC;AACF,IAAIC,GAEEC,IAAuB,CAACC,MAAwB;AACpD,UAAQA,GAAU;AAAA,IAChB,KAAK;AACI,aAAAH;AAAA,IACT,KAAK;AACI,aAAAH;AAAA,IACT,KAAK;AACI,aAAAC;AAAA,IACT,KAAK;AACI,aAAAC;AAAA,IAET;AACS,aAAAH;AAAA,EACX;AACF,GAEMQ,IAAsB,CAACD,MAAwB;AACnD,UAAQA,GAAU;AAAA,IAChB,KAAK;AACH,aAAOE,EAAO;AAAA,IAChB,KAAK;AACH,aAAOA,EAAO;AAAA,IAChB,KAAK;AACH,aAAOA,EAAO;AAAA,IAChB,KAAK;AACH,aAAOA,EAAO;AAAA,IAEhB;AACE,aAAOA,EAAO;AAAA,EAClB;AACF;"}
|