@cuemath/leap 3.5.30-gg4 → 3.5.30-j1
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 +12 -0
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/images/images.js +8 -0
- package/dist/assets/images/images.js.map +1 -1
- package/dist/assets/line-icons/icons/carat-right.js +26 -0
- package/dist/assets/line-icons/icons/carat-right.js.map +1 -0
- package/dist/features/chapters/chapters-list/chapter-item/chapter-circular-progress/chapter-circular-progress.js +3 -3
- package/dist/features/chapters/chapters-list/chapter-item/chapter-circular-progress/chapter-circular-progress.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/carousel/carousel-styled.js +16 -32
- package/dist/features/circle-games/game-launcher/comps/carousel/carousel-styled.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/carousel/carousel.js +88 -87
- package/dist/features/circle-games/game-launcher/comps/carousel/carousel.js.map +1 -1
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js +35 -35
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js.map +1 -1
- package/dist/features/stickers/hooks/use-handle-sticker-send/use-handle-sticker-send.js +0 -1
- package/dist/features/stickers/hooks/use-handle-sticker-send/use-handle-sticker-send.js.map +1 -1
- package/dist/features/timeline/daily-timeline-styled.js +13 -9
- package/dist/features/timeline/daily-timeline-styled.js.map +1 -1
- package/dist/features/timeline/daily-timeline-view.js +9 -10
- package/dist/features/timeline/daily-timeline-view.js.map +1 -1
- package/dist/features/timeline/monthly-report/api/use-monthly-report-get.js +13 -0
- package/dist/features/timeline/monthly-report/api/use-monthly-report-get.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/achievements/achievements.js +68 -0
- package/dist/features/timeline/monthly-report/comps/achievements/achievements.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/achievements/achievements.styled.js +15 -0
- package/dist/features/timeline/monthly-report/comps/achievements/achievements.styled.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/activities/activities-card/activities-card.js +128 -0
- package/dist/features/timeline/monthly-report/comps/activities/activities-card/activities-card.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/activities/activities-card/activities-card.styled.js +53 -0
- package/dist/features/timeline/monthly-report/comps/activities/activities-card/activities-card.styled.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/activities/activities-card-puzzles/activities-card-puzzles.js +121 -0
- package/dist/features/timeline/monthly-report/comps/activities/activities-card-puzzles/activities-card-puzzles.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/activities/activities-card-puzzles/activities-card-puzzles.styled.js +58 -0
- package/dist/features/timeline/monthly-report/comps/activities/activities-card-puzzles/activities-card-puzzles.styled.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/activities/activities.js +27 -0
- package/dist/features/timeline/monthly-report/comps/activities/activities.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/activities/constants.js +95 -0
- package/dist/features/timeline/monthly-report/comps/activities/constants.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/activities/utils.js +15 -0
- package/dist/features/timeline/monthly-report/comps/activities/utils.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/attendance/attendance-constants.js +29 -0
- package/dist/features/timeline/monthly-report/comps/attendance/attendance-constants.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/attendance/attendance-utils.js +92 -0
- package/dist/features/timeline/monthly-report/comps/attendance/attendance-utils.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/attendance/attendance.js +44 -0
- package/dist/features/timeline/monthly-report/comps/attendance/attendance.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/attendance/attendance.styled.js +39 -0
- package/dist/features/timeline/monthly-report/comps/attendance/attendance.styled.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/attendance/attendence-view.js +52 -0
- package/dist/features/timeline/monthly-report/comps/attendance/attendence-view.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/feedback/feedback-styled.js +9 -0
- package/dist/features/timeline/monthly-report/comps/feedback/feedback-styled.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/feedback/feedback.js +94 -0
- package/dist/features/timeline/monthly-report/comps/feedback/feedback.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/goals/goals-card/goal-chapter-card.js +48 -0
- package/dist/features/timeline/monthly-report/comps/goals/goals-card/goal-chapter-card.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/goals/goals-card/goals-card-styled.js +28 -0
- package/dist/features/timeline/monthly-report/comps/goals/goals-card/goals-card-styled.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/goals/goals-card/goals-card.js +113 -0
- package/dist/features/timeline/monthly-report/comps/goals/goals-card/goals-card.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/goals/goals-constants.js +30 -0
- package/dist/features/timeline/monthly-report/comps/goals/goals-constants.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/goals/goals.js +22 -0
- package/dist/features/timeline/monthly-report/comps/goals/goals.js.map +1 -0
- package/dist/features/timeline/monthly-report/monthly-report-styled.js +14 -0
- package/dist/features/timeline/monthly-report/monthly-report-styled.js.map +1 -0
- package/dist/features/timeline/monthly-report/monthly-report-types.js +5 -0
- package/dist/features/timeline/monthly-report/monthly-report-types.js.map +1 -0
- package/dist/features/timeline/monthly-report/monthly-report.js +69 -0
- package/dist/features/timeline/monthly-report/monthly-report.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/api/use-monthly-timeline-get.js +10 -0
- package/dist/features/timeline/monthly-timeline/api/use-monthly-timeline-get.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/comps/monthly-card/monthly-card.js +87 -0
- package/dist/features/timeline/monthly-timeline/comps/monthly-card/monthly-card.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/comps/monthly-card/monthly-card.styled.js +9 -0
- package/dist/features/timeline/monthly-timeline/comps/monthly-card/monthly-card.styled.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/constants.js +41 -0
- package/dist/features/timeline/monthly-timeline/constants.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/monthly-timeline-styled.js +13 -0
- package/dist/features/timeline/monthly-timeline/monthly-timeline-styled.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/monthly-timeline-types.js +6 -0
- package/dist/features/timeline/monthly-timeline/monthly-timeline-types.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/monthly-timeline-view.js +28 -0
- package/dist/features/timeline/monthly-timeline/monthly-timeline-view.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/monthly-timeline.js +62 -0
- package/dist/features/timeline/monthly-timeline/monthly-timeline.js.map +1 -0
- package/dist/features/timeline/ptm-report/api/use-ptm-report-get.js +9 -0
- package/dist/features/timeline/ptm-report/api/use-ptm-report-get.js.map +1 -0
- package/dist/features/timeline/ptm-report/comps/key-need/key-need-styled.js +9 -0
- package/dist/features/timeline/ptm-report/comps/key-need/key-need-styled.js.map +1 -0
- package/dist/features/timeline/ptm-report/comps/key-need/key-need.js +35 -0
- package/dist/features/timeline/ptm-report/comps/key-need/key-need.js.map +1 -0
- package/dist/features/timeline/ptm-report/comps/parent-support/parent-support.js +53 -0
- package/dist/features/timeline/ptm-report/comps/parent-support/parent-support.js.map +1 -0
- package/dist/features/timeline/ptm-report/comps/real-world-projects/real-world-projects-styled.js +19 -0
- package/dist/features/timeline/ptm-report/comps/real-world-projects/real-world-projects-styled.js.map +1 -0
- package/dist/features/timeline/ptm-report/comps/real-world-projects/real-world-projects.js +50 -0
- package/dist/features/timeline/ptm-report/comps/real-world-projects/real-world-projects.js.map +1 -0
- package/dist/features/timeline/ptm-report/comps/report-card/report-card-styled.js +9 -0
- package/dist/features/timeline/ptm-report/comps/report-card/report-card-styled.js.map +1 -0
- package/dist/features/timeline/ptm-report/comps/report-card/report-card.js +22 -0
- package/dist/features/timeline/ptm-report/comps/report-card/report-card.js.map +1 -0
- package/dist/features/timeline/ptm-report/comps/school-support/school-support-styled.js +9 -0
- package/dist/features/timeline/ptm-report/comps/school-support/school-support-styled.js.map +1 -0
- package/dist/features/timeline/ptm-report/comps/school-support/school-support.js +84 -0
- package/dist/features/timeline/ptm-report/comps/school-support/school-support.js.map +1 -0
- package/dist/features/timeline/ptm-report/comps/strategies/strategies-constant.js +11 -0
- package/dist/features/timeline/ptm-report/comps/strategies/strategies-constant.js.map +1 -0
- package/dist/features/timeline/ptm-report/comps/strategies/strategies.js +36 -0
- package/dist/features/timeline/ptm-report/comps/strategies/strategies.js.map +1 -0
- package/dist/features/timeline/ptm-report/comps/strategy-card/strategy-card-styled.js +55 -0
- package/dist/features/timeline/ptm-report/comps/strategy-card/strategy-card-styled.js.map +1 -0
- package/dist/features/timeline/ptm-report/comps/strategy-card/strategy-card.js +35 -0
- package/dist/features/timeline/ptm-report/comps/strategy-card/strategy-card.js.map +1 -0
- package/dist/features/timeline/ptm-report/comps/student-info/student-info-styled.js +21 -0
- package/dist/features/timeline/ptm-report/comps/student-info/student-info-styled.js.map +1 -0
- package/dist/features/timeline/ptm-report/comps/student-info/student-info.js +21 -0
- package/dist/features/timeline/ptm-report/comps/student-info/student-info.js.map +1 -0
- package/dist/features/timeline/ptm-report/comps/support-card/support-card-styled.js +9 -0
- package/dist/features/timeline/ptm-report/comps/support-card/support-card-styled.js.map +1 -0
- package/dist/features/timeline/ptm-report/comps/support-card/support-card.js +30 -0
- package/dist/features/timeline/ptm-report/comps/support-card/support-card.js.map +1 -0
- package/dist/features/timeline/ptm-report/comps/teacher-observations/teacher-observations-constant.js +9 -0
- package/dist/features/timeline/ptm-report/comps/teacher-observations/teacher-observations-constant.js.map +1 -0
- package/dist/features/timeline/ptm-report/comps/teacher-observations/teacher-observations.js +56 -0
- package/dist/features/timeline/ptm-report/comps/teacher-observations/teacher-observations.js.map +1 -0
- package/dist/features/timeline/ptm-report/comps/upcoming-chapters/upcoming-chapters.js +15 -0
- package/dist/features/timeline/ptm-report/comps/upcoming-chapters/upcoming-chapters.js.map +1 -0
- package/dist/features/timeline/ptm-report/ptm-report-constants.js +16 -0
- package/dist/features/timeline/ptm-report/ptm-report-constants.js.map +1 -0
- package/dist/features/timeline/ptm-report/ptm-report-helpers.js +8 -0
- package/dist/features/timeline/ptm-report/ptm-report-helpers.js.map +1 -0
- package/dist/features/timeline/ptm-report/ptm-report-styled.js +11 -0
- package/dist/features/timeline/ptm-report/ptm-report-styled.js.map +1 -0
- package/dist/features/timeline/ptm-report/ptm-report-types.js +5 -0
- package/dist/features/timeline/ptm-report/ptm-report-types.js.map +1 -0
- package/dist/features/timeline/ptm-report/ptm-report.js +113 -0
- package/dist/features/timeline/ptm-report/ptm-report.js.map +1 -0
- package/dist/features/timeline/timeline-tabs/timeline-tabs-types.js +5 -0
- package/dist/features/timeline/timeline-tabs/timeline-tabs-types.js.map +1 -0
- package/dist/features/timeline/timeline-tabs/timeline-tabs.js +42 -0
- package/dist/features/timeline/timeline-tabs/timeline-tabs.js.map +1 -0
- package/dist/features/timeline/timeline-tabs/timeline-tabs.styled.js +37 -0
- package/dist/features/timeline/timeline-tabs/timeline-tabs.styled.js.map +1 -0
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body-styled.js.map +1 -1
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body.js +11 -11
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body.js.map +1 -1
- package/dist/features/ui/swipable-carousel/swipable-carousel-styled.js +57 -0
- package/dist/features/ui/swipable-carousel/swipable-carousel-styled.js.map +1 -0
- package/dist/features/ui/swipable-carousel/swipable-carousel.js +132 -0
- package/dist/features/ui/swipable-carousel/swipable-carousel.js.map +1 -0
- package/dist/features/ui/swipeable-component/swipeable-component-styled.js.map +1 -0
- package/dist/features/ui/swipeable-component/swipeable-component.js +27 -0
- package/dist/features/ui/swipeable-component/swipeable-component.js.map +1 -0
- package/dist/features/worksheet/user-pointer-pin/hooks/use-user-location.js +20 -21
- package/dist/features/worksheet/user-pointer-pin/hooks/use-user-location.js.map +1 -1
- package/dist/features/worksheet/user-pointer-pin/user-pin.js +35 -37
- package/dist/features/worksheet/user-pointer-pin/user-pin.js.map +1 -1
- package/dist/features/worksheet/worksheet/hooks/use-create-imperative-handle.js +132 -132
- package/dist/features/worksheet/worksheet/hooks/use-create-imperative-handle.js.map +1 -1
- package/dist/features/worksheet/worksheet/hooks/use-get-active-question-id.js +62 -0
- package/dist/features/worksheet/worksheet/hooks/use-get-active-question-id.js.map +1 -0
- package/dist/features/worksheet/worksheet/hooks/use-time-on-questions.js +19 -24
- package/dist/features/worksheet/worksheet/hooks/use-time-on-questions.js.map +1 -1
- package/dist/features/worksheet/worksheet/question-tips.js +47 -48
- package/dist/features/worksheet/worksheet/question-tips.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-action-bar/worksheet-action-bar.js +132 -88
- package/dist/features/worksheet/worksheet/worksheet-action-bar/worksheet-action-bar.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-blocker/worksheet-blocker.js +55 -44
- package/dist/features/worksheet/worksheet/worksheet-blocker/worksheet-blocker.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-container.js +87 -0
- package/dist/features/worksheet/worksheet/worksheet-container.js.map +1 -0
- package/dist/features/worksheet/worksheet/worksheet-helpers.js +112 -109
- package/dist/features/worksheet/worksheet/worksheet-helpers.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-navigation/worksheet-item-navigation/worksheet-item-navigation.js +27 -25
- package/dist/features/worksheet/worksheet/worksheet-navigation/worksheet-item-navigation/worksheet-item-navigation.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-navigation/worksheet-item-number/worksheet-item-number.js +47 -47
- package/dist/features/worksheet/worksheet/worksheet-navigation/worksheet-item-number/worksheet-item-number.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-navigation/worksheet-navigation.js +64 -66
- package/dist/features/worksheet/worksheet/worksheet-navigation/worksheet-navigation.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-navigation/worksheet-section-navigation/worksheet-section-navigation.js +40 -38
- package/dist/features/worksheet/worksheet/worksheet-navigation/worksheet-section-navigation/worksheet-section-navigation.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-permissions/error.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/header/header.js +71 -73
- package/dist/features/worksheet/worksheet/worksheet-question/header/header.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js +59 -61
- package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/subjective-review.js +18 -21
- package/dist/features/worksheet/worksheet/worksheet-question/subjective-review.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +272 -269
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/scribble-switch.js +31 -32
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/scribble-switch.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/use-handler-callbacks.js +149 -147
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/use-handler-callbacks.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js +223 -212
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-summary/worksheet-questions-summary.js +20 -22
- package/dist/features/worksheet/worksheet/worksheet-questions-summary/worksheet-questions-summary.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-sidebar/question-guide.js +55 -57
- package/dist/features/worksheet/worksheet/worksheet-sidebar/question-guide.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-sidebar/sidebar.js +42 -47
- package/dist/features/worksheet/worksheet/worksheet-sidebar/sidebar.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-styled.js +34 -24
- package/dist/features/worksheet/worksheet/worksheet-styled.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-summary/worksheet-summary.js +12 -16
- package/dist/features/worksheet/worksheet/worksheet-summary/worksheet-summary.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-summary-controller/worksheet-summary-controller.js +7 -8
- package/dist/features/worksheet/worksheet/worksheet-summary-controller/worksheet-summary-controller.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-types.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet.js +441 -203
- package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
- package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js.map +1 -1
- package/dist/features/worksheet/worksheet-preview/worksheet-preview-view.js +1 -1
- package/dist/features/worksheet/worksheet-preview/worksheet-preview-view.js.map +1 -1
- package/dist/index.d.ts +276 -31
- package/dist/index.js +465 -451
- package/dist/index.js.map +1 -1
- package/dist/static/2021.0683b580.png +0 -0
- package/dist/static/2022.d34ad7a5.png +0 -0
- package/dist/static/2023.fce87149.png +0 -0
- package/dist/static/2024.a275ee85.png +0 -0
- package/dist/static/2025.677cc187.png +0 -0
- package/dist/static/2026.63763214.png +0 -0
- package/dist/static/2027.b82dc039.png +0 -0
- package/dist/static/2028.580b8cc0.png +0 -0
- package/dist/static/coding-report-icon.91a1e900.svg +1 -0
- package/dist/static/elp-icon.d45b457d.svg +1 -0
- package/dist/static/empty-reports.fe92faad.svg +1 -0
- package/dist/static/english-icon.50c2e005.svg +1 -0
- package/dist/static/full-report.00112c74.svg +1 -0
- package/dist/static/math-fit-grey.c32f37b3.svg +1 -0
- package/dist/static/no-report.4158fad3.svg +1 -0
- package/dist/static/ptm-report-icon.5089218f.svg +1 -0
- package/dist/static/sat-report-icon.4331be86.svg +1 -0
- package/dist/static/science-report-icon.a0014c40.svg +1 -0
- package/dist/static/thumps-down.a1192a62.svg +1 -0
- package/dist/static/thumps-up.caa35a98.svg +1 -0
- package/package.json +3 -4
- package/dist/features/circle-games/game-launcher/comps/swipable-component/swipeable-component-styled.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/swipable-component/swipeable-component.js +0 -26
- package/dist/features/circle-games/game-launcher/comps/swipable-component/swipeable-component.js.map +0 -1
- package/dist/features/worksheet/worksheet/hooks/use-active-question-observer.js +0 -59
- package/dist/features/worksheet/worksheet/hooks/use-active-question-observer.js.map +0 -1
- package/dist/features/worksheet/worksheet/hooks/use-worksheet-store.js +0 -13
- package/dist/features/worksheet/worksheet/hooks/use-worksheet-store.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-blocker/worksheet-blocker-view.js +0 -68
- package/dist/features/worksheet/worksheet/worksheet-blocker/worksheet-blocker-view.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-calculator/worksheet-calculator.js +0 -17
- package/dist/features/worksheet/worksheet/worksheet-calculator/worksheet-calculator.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-nudge-banner/worksheet-nudge-banner-styled.js +0 -20
- package/dist/features/worksheet/worksheet/worksheet-nudge-banner/worksheet-nudge-banner-styled.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-nudge-banner/worksheet-nudge-banner.js +0 -49
- package/dist/features/worksheet/worksheet/worksheet-nudge-banner/worksheet-nudge-banner.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-provider.js +0 -21
- package/dist/features/worksheet/worksheet/worksheet-provider.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-questions/worksheet-questions-styled.js +0 -16
- package/dist/features/worksheet/worksheet/worksheet-questions/worksheet-questions-styled.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-questions/worksheet-questions.js +0 -73
- package/dist/features/worksheet/worksheet/worksheet-questions/worksheet-questions.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-store.js +0 -301
- package/dist/features/worksheet/worksheet/worksheet-store.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-view.js +0 -141
- package/dist/features/worksheet/worksheet/worksheet-view.js.map +0 -1
- package/dist/node_modules/zustand/esm/middleware.js +0 -22
- package/dist/node_modules/zustand/esm/middleware.js.map +0 -1
- package/dist/node_modules/zustand/esm/react/shallow.js +0 -13
- package/dist/node_modules/zustand/esm/react/shallow.js.map +0 -1
- package/dist/node_modules/zustand/esm/vanilla/shallow.js +0 -31
- package/dist/node_modules/zustand/esm/vanilla/shallow.js.map +0 -1
- /package/dist/features/{circle-games/game-launcher/comps/swipable-component → ui/swipeable-component}/swipeable-component-styled.js +0 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { jsx as i, jsxs as z } from "react/jsx-runtime";
|
|
2
|
+
import { memo as W, forwardRef as x, useState as F, useCallback as l, useImperativeHandle as K, useEffect as L } from "react";
|
|
3
|
+
import O from "../swipeable-component/swipeable-component.js";
|
|
4
|
+
import D from "../buttons/icon-button/icon-button.js";
|
|
5
|
+
import { Carousel as X, CarouselWrapper as g, CarouselItemContainer as k, NavigationConatainer as N, Dot as q } from "./swipable-carousel-styled.js";
|
|
6
|
+
import w from "../../../assets/line-icons/icons/chevron-left.js";
|
|
7
|
+
import B from "../../../assets/line-icons/icons/chevron-right.js";
|
|
8
|
+
import y from "../layout/flex-view.js";
|
|
9
|
+
import J from "../separator/separator.js";
|
|
10
|
+
const Q = {
|
|
11
|
+
dotColor: "BLACK_1",
|
|
12
|
+
inactiveDotColor: "WHITE_1",
|
|
13
|
+
activeIndicatorSize: "8px",
|
|
14
|
+
inactiveIndicatorSize: "8px",
|
|
15
|
+
spacing: "8px"
|
|
16
|
+
}, U = {
|
|
17
|
+
buttonVariant: "secondary",
|
|
18
|
+
buttonSize: "xsmall",
|
|
19
|
+
spacing: 8,
|
|
20
|
+
hideOnMobile: !0
|
|
21
|
+
}, Y = ({
|
|
22
|
+
items: o,
|
|
23
|
+
children: h,
|
|
24
|
+
defaultIndex: b = 0,
|
|
25
|
+
transitionDuration: j = 300,
|
|
26
|
+
onSwipeLeft: s,
|
|
27
|
+
onSwipeRight: u,
|
|
28
|
+
onIndexChange: e,
|
|
29
|
+
showDots: C = !1,
|
|
30
|
+
dotsConfig: G,
|
|
31
|
+
showNavigationButtons: v = !1,
|
|
32
|
+
navigationConfig: I,
|
|
33
|
+
onDotClick: f
|
|
34
|
+
}, P) => {
|
|
35
|
+
const V = Math.max(0, Math.min(b, o.length - 1)), [r, m] = F(V), $ = r > 0, d = r < o.length - 1, p = { ...Q, ...G }, c = { ...U, ...I }, a = l(
|
|
36
|
+
(t) => {
|
|
37
|
+
t < 0 || t >= o.length || t === r || (m(t), e == null || e(t));
|
|
38
|
+
},
|
|
39
|
+
[r, o.length, e]
|
|
40
|
+
), A = l(() => {
|
|
41
|
+
if (!d) return;
|
|
42
|
+
const t = r + 1;
|
|
43
|
+
m(t), e == null || e(t), s == null || s();
|
|
44
|
+
}, [d, r, s, e]), M = l(() => {
|
|
45
|
+
if (!$) return;
|
|
46
|
+
const t = r - 1;
|
|
47
|
+
m(t), e == null || e(t), u == null || u();
|
|
48
|
+
}, [$, r, u, e]), _ = l(
|
|
49
|
+
(t) => {
|
|
50
|
+
a(t), f == null || f(t);
|
|
51
|
+
},
|
|
52
|
+
[a, f]
|
|
53
|
+
), E = l(() => {
|
|
54
|
+
a(r - 1);
|
|
55
|
+
}, [a, r]), H = l(() => {
|
|
56
|
+
a(r + 1);
|
|
57
|
+
}, [a, r]);
|
|
58
|
+
K(P, () => ({
|
|
59
|
+
currentIndex: r,
|
|
60
|
+
goToIndex: a
|
|
61
|
+
})), L(() => {
|
|
62
|
+
m(b);
|
|
63
|
+
}, [b]);
|
|
64
|
+
const S = () => !C || o.length <= 1 ? null : /* @__PURE__ */ i(y, { $flexDirection: "row", $alignItems: "center", $justifyContent: "center", $flexGap: 8, children: o.map((t, n) => /* @__PURE__ */ i(
|
|
65
|
+
q,
|
|
66
|
+
{
|
|
67
|
+
onClick: () => _(n),
|
|
68
|
+
$isCurrent: n === r,
|
|
69
|
+
$dotColor: p.dotColor,
|
|
70
|
+
$inactiveDotColor: p.inactiveDotColor,
|
|
71
|
+
$activeIndicatorSize: p.activeIndicatorSize,
|
|
72
|
+
$inactiveIndicatorSize: p.inactiveIndicatorSize
|
|
73
|
+
},
|
|
74
|
+
n
|
|
75
|
+
)) }), T = () => !v || o.length <= 1 ? null : /* @__PURE__ */ z(N, { $bottom: "-48px", children: [
|
|
76
|
+
/* @__PURE__ */ i(J, { heightX: 1 }),
|
|
77
|
+
/* @__PURE__ */ z(
|
|
78
|
+
y,
|
|
79
|
+
{
|
|
80
|
+
$flexDirection: "row",
|
|
81
|
+
$alignItems: "center",
|
|
82
|
+
$justifyContent: "center",
|
|
83
|
+
$flex: 1,
|
|
84
|
+
$flexGap: c.spacing || 8,
|
|
85
|
+
children: [
|
|
86
|
+
/* @__PURE__ */ i(
|
|
87
|
+
D,
|
|
88
|
+
{
|
|
89
|
+
Icon: w,
|
|
90
|
+
renderAs: c.buttonVariant,
|
|
91
|
+
analyticsLabel: "Previous",
|
|
92
|
+
size: c.buttonSize,
|
|
93
|
+
onClick: E,
|
|
94
|
+
disabled: !$,
|
|
95
|
+
"aria-label": "Previous item"
|
|
96
|
+
}
|
|
97
|
+
),
|
|
98
|
+
S(),
|
|
99
|
+
/* @__PURE__ */ i(
|
|
100
|
+
D,
|
|
101
|
+
{
|
|
102
|
+
Icon: B,
|
|
103
|
+
renderAs: c.buttonVariant,
|
|
104
|
+
analyticsLabel: "Next",
|
|
105
|
+
size: c.buttonSize,
|
|
106
|
+
onClick: H,
|
|
107
|
+
disabled: !d,
|
|
108
|
+
"aria-label": "Next item"
|
|
109
|
+
}
|
|
110
|
+
)
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
)
|
|
114
|
+
] });
|
|
115
|
+
return /* @__PURE__ */ i(O, { onSwipeLeft: A, onSwipeRight: M, children: /* @__PURE__ */ z(X, { children: [
|
|
116
|
+
/* @__PURE__ */ i(
|
|
117
|
+
g,
|
|
118
|
+
{
|
|
119
|
+
$translate: r * 100,
|
|
120
|
+
$translateDuration: j,
|
|
121
|
+
children: o.map((t, n) => /* @__PURE__ */ i(k, { children: t }, n))
|
|
122
|
+
}
|
|
123
|
+
),
|
|
124
|
+
h,
|
|
125
|
+
C && !v && /* @__PURE__ */ i(N, { $bottom: "-18px", children: S() }),
|
|
126
|
+
v && T()
|
|
127
|
+
] }) });
|
|
128
|
+
}, ct = W(x(Y));
|
|
129
|
+
export {
|
|
130
|
+
ct as default
|
|
131
|
+
};
|
|
132
|
+
//# sourceMappingURL=swipable-carousel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"swipable-carousel.js","sources":["../../../../src/features/ui/swipable-carousel/swipable-carousel.tsx"],"sourcesContent":["import {\n type ForwardRefRenderFunction,\n memo,\n useCallback,\n useEffect,\n useState,\n forwardRef,\n useImperativeHandle,\n} from 'react';\n\nimport SwipeableComponent from '../swipeable-component/swipeable-component';\nimport IconButton from '../buttons/icon-button/icon-button';\nimport * as Styled from './swipable-carousel-styled';\nimport type { ISwipableCarouselRefs, ISwipableCarousel } from './swipable-carousel-types';\nimport ChevronLeft from '../../../assets/line-icons/icons/chevron-left';\nimport ChevronRight from '../../../assets/line-icons/icons/chevron-right';\nimport FlexView from '../layout/flex-view';\nimport Separator from '../separator/separator';\n\n// Default dot configuration\nconst defaultDotConfig = {\n dotColor: 'BLACK_1' as const,\n inactiveDotColor: 'WHITE_1' as const,\n activeIndicatorSize: '8px',\n inactiveIndicatorSize: '8px',\n spacing: '8px',\n};\n\n// Default navigation configuration\nconst defaultNavigationConfig = {\n buttonVariant: 'secondary' as const,\n buttonSize: 'xsmall' as const,\n spacing: 8,\n hideOnMobile: true,\n};\n\nconst SwipableCarousel: ForwardRefRenderFunction<ISwipableCarouselRefs, ISwipableCarousel> = (\n {\n items,\n children,\n defaultIndex = 0,\n transitionDuration = 300,\n onSwipeLeft,\n onSwipeRight,\n onIndexChange,\n showDots = false,\n dotsConfig,\n showNavigationButtons = false,\n navigationConfig,\n onDotClick,\n },\n ref,\n) => {\n const validDefaultIndex = Math.max(0, Math.min(defaultIndex, items.length - 1));\n const [currIndex, setCurrIndex] = useState(validDefaultIndex);\n const canGoPrevious = currIndex > 0;\n const canGoNext = currIndex < items.length - 1;\n const finalDotConfig = { ...defaultDotConfig, ...dotsConfig };\n const finalNavigationConfig = { ...defaultNavigationConfig, ...navigationConfig };\n\n const goToIndex = useCallback(\n (index: number) => {\n if (index < 0 || index >= items.length || index === currIndex) return;\n setCurrIndex(index);\n onIndexChange?.(index);\n },\n [currIndex, items.length, onIndexChange],\n );\n\n const handleSwipeLeft = useCallback(() => {\n if (!canGoNext) return;\n\n const newIndex = currIndex + 1;\n\n setCurrIndex(newIndex);\n onIndexChange?.(newIndex);\n onSwipeLeft?.();\n }, [canGoNext, currIndex, onSwipeLeft, onIndexChange]);\n\n const handleSwipeRight = useCallback(() => {\n if (!canGoPrevious) return;\n\n const newIndex = currIndex - 1;\n\n setCurrIndex(newIndex);\n onIndexChange?.(newIndex);\n onSwipeRight?.();\n }, [canGoPrevious, currIndex, onSwipeRight, onIndexChange]);\n\n const handleDotClick = useCallback(\n (index: number) => {\n goToIndex(index);\n onDotClick?.(index);\n },\n [goToIndex, onDotClick],\n );\n\n const handlePrevious = useCallback(() => {\n goToIndex(currIndex - 1);\n }, [goToIndex, currIndex]);\n\n const handleNext = useCallback(() => {\n goToIndex(currIndex + 1);\n }, [goToIndex, currIndex]);\n\n useImperativeHandle(ref, () => ({\n currentIndex: currIndex,\n goToIndex,\n }));\n\n useEffect(() => {\n setCurrIndex(defaultIndex);\n }, [defaultIndex]);\n\n const renderDots = () => {\n if (!showDots || items.length <= 1) return null;\n\n return (\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $justifyContent=\"center\" $flexGap={8}>\n {items.map((_, index) => (\n <Styled.Dot\n key={index}\n onClick={() => handleDotClick(index)}\n $isCurrent={index === currIndex}\n $dotColor={finalDotConfig.dotColor}\n $inactiveDotColor={finalDotConfig.inactiveDotColor}\n $activeIndicatorSize={finalDotConfig.activeIndicatorSize}\n $inactiveIndicatorSize={finalDotConfig.inactiveIndicatorSize}\n />\n ))}\n </FlexView>\n );\n };\n\n const renderNavigation = () => {\n if (!showNavigationButtons || items.length <= 1) return null;\n\n return (\n <Styled.NavigationConatainer $bottom=\"-48px\">\n <Separator heightX={1} />\n <FlexView\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $flex={1}\n $flexGap={finalNavigationConfig.spacing || 8}\n >\n <IconButton\n Icon={ChevronLeft}\n renderAs={finalNavigationConfig.buttonVariant}\n analyticsLabel=\"Previous\"\n size={finalNavigationConfig.buttonSize}\n onClick={handlePrevious}\n disabled={!canGoPrevious}\n aria-label=\"Previous item\"\n />\n {renderDots()}\n <IconButton\n Icon={ChevronRight}\n renderAs={finalNavigationConfig.buttonVariant}\n analyticsLabel=\"Next\"\n size={finalNavigationConfig.buttonSize}\n onClick={handleNext}\n disabled={!canGoNext}\n aria-label=\"Next item\"\n />\n </FlexView>\n </Styled.NavigationConatainer>\n );\n };\n\n return (\n <SwipeableComponent onSwipeLeft={handleSwipeLeft} onSwipeRight={handleSwipeRight}>\n <Styled.Carousel>\n <Styled.CarouselWrapper\n $translate={currIndex * 100}\n $translateDuration={transitionDuration}\n >\n {items.map((item, index) => (\n <Styled.CarouselItemContainer key={index}>{item}</Styled.CarouselItemContainer>\n ))}\n </Styled.CarouselWrapper>\n {children}\n {showDots && !showNavigationButtons && (\n <Styled.NavigationConatainer $bottom=\"-18px\">{renderDots()}</Styled.NavigationConatainer>\n )}\n {showNavigationButtons && renderNavigation()}\n </Styled.Carousel>\n </SwipeableComponent>\n );\n};\n\nexport default memo(forwardRef(SwipableCarousel));\n"],"names":["defaultDotConfig","defaultNavigationConfig","SwipableCarousel","items","children","defaultIndex","transitionDuration","onSwipeLeft","onSwipeRight","onIndexChange","showDots","dotsConfig","showNavigationButtons","navigationConfig","onDotClick","ref","validDefaultIndex","currIndex","setCurrIndex","useState","canGoPrevious","canGoNext","finalDotConfig","finalNavigationConfig","goToIndex","useCallback","index","handleSwipeLeft","newIndex","handleSwipeRight","handleDotClick","handlePrevious","handleNext","useImperativeHandle","useEffect","renderDots","jsx","FlexView","_","Styled.Dot","renderNavigation","jsxs","Styled.NavigationConatainer","Separator","IconButton","ChevronLeft","ChevronRight","SwipeableComponent","Styled.Carousel","Styled.CarouselWrapper","item","Styled.CarouselItemContainer","SwipableCarousel$1","memo","forwardRef"],"mappings":";;;;;;;;;AAoBA,MAAMA,IAAmB;AAAA,EACvB,UAAU;AAAA,EACV,kBAAkB;AAAA,EAClB,qBAAqB;AAAA,EACrB,uBAAuB;AAAA,EACvB,SAAS;AACX,GAGMC,IAA0B;AAAA,EAC9B,eAAe;AAAA,EACf,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,cAAc;AAChB,GAEMC,IAAuF,CAC3F;AAAA,EACE,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,cAAAC,IAAe;AAAA,EACf,oBAAAC,IAAqB;AAAA,EACrB,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,eAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,YAAAC;AAAA,EACA,uBAAAC,IAAwB;AAAA,EACxB,kBAAAC;AAAA,EACA,YAAAC;AACF,GACAC,MACG;AACG,QAAAC,IAAoB,KAAK,IAAI,GAAG,KAAK,IAAIX,GAAcF,EAAM,SAAS,CAAC,CAAC,GACxE,CAACc,GAAWC,CAAY,IAAIC,EAASH,CAAiB,GACtDI,IAAgBH,IAAY,GAC5BI,IAAYJ,IAAYd,EAAM,SAAS,GACvCmB,IAAiB,EAAE,GAAGtB,GAAkB,GAAGW,EAAW,GACtDY,IAAwB,EAAE,GAAGtB,GAAyB,GAAGY,EAAiB,GAE1EW,IAAYC;AAAA,IAChB,CAACC,MAAkB;AACjB,MAAIA,IAAQ,KAAKA,KAASvB,EAAM,UAAUuB,MAAUT,MACpDC,EAAaQ,CAAK,GAClBjB,KAAA,Q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AAZ;AAAA,MAACa;AAAAA,MAAA;AAAA,QACC,YAAYhC,IAAY;AAAA,QACxB,oBAAoBX;AAAA,QAEnB,UAAAH,EAAM,IAAI,CAAC+C,GAAMxB,MACf,gBAAAU,EAAAe,GAAA,EAA0C,UAARD,EAAA,GAAAxB,CAAa,CACjD;AAAA,MAAA;AAAA,IACH;AAAA,IACCtB;AAAA,IACAM,KAAY,CAACE,KACX,gBAAAwB,EAAAM,GAAA,EAA4B,SAAQ,SAAS,UAAAP,EAAA,GAAa;AAAA,IAE5DvB,KAAyB4B,EAAiB;AAAA,EAAA,EAC7C,CAAA,EACF,CAAA;AAEJ,GAEAY,KAAeC,EAAKC,EAAWpD,CAAgB,CAAC;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"swipeable-component-styled.js","sources":["../../../../src/features/ui/swipeable-component/swipeable-component-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nexport const SwipeableWrapper = styled.div`\n display: flex;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n`;\n"],"names":["SwipeableWrapper","styled"],"mappings":";AAEO,MAAMA,IAAmBC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as C } from "react/jsx-runtime";
|
|
2
|
+
import { memo as T, useRef as l, useCallback as e } from "react";
|
|
3
|
+
import { SwipeableWrapper as X } from "./swipeable-component-styled.js";
|
|
4
|
+
const m = T(
|
|
5
|
+
({ onSwipeLeft: t, onSwipeRight: a, minSwipeDistance: o = 50, children: d }) => {
|
|
6
|
+
const s = l(0), n = l(0), u = e(() => {
|
|
7
|
+
const r = s.current - n.current;
|
|
8
|
+
Math.abs(r) < o || (r > 0 ? t == null || t() : a == null || a());
|
|
9
|
+
}, [o, t, a]), b = e((r) => {
|
|
10
|
+
var c;
|
|
11
|
+
s.current = ((c = r.changedTouches[0]) == null ? void 0 : c.clientX) || 0;
|
|
12
|
+
}, []), h = e(
|
|
13
|
+
(r) => {
|
|
14
|
+
var c;
|
|
15
|
+
n.current = ((c = r.changedTouches[0]) == null ? void 0 : c.clientX) || 0, u();
|
|
16
|
+
},
|
|
17
|
+
[u]
|
|
18
|
+
);
|
|
19
|
+
return /* @__PURE__ */ C(X, { onTouchStart: b, onTouchEnd: h, children: d });
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
m.displayName = "SwipeableComponent";
|
|
23
|
+
const E = m;
|
|
24
|
+
export {
|
|
25
|
+
E as default
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=swipeable-component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"swipeable-component.js","sources":["../../../../src/features/ui/swipeable-component/swipeable-component.tsx"],"sourcesContent":["import { useRef, useCallback, memo } from 'react';\n\nimport * as Styled from './swipeable-component-styled';\nimport { type ISwipeableComponentProps } from './swipeable-component-types';\n\nconst SwipeableComponent: React.FC<ISwipeableComponentProps> = memo(\n ({ onSwipeLeft, onSwipeRight, minSwipeDistance = 50, children }) => {\n const touchStartX = useRef(0);\n const touchEndX = useRef(0);\n\n const handleSwipe = useCallback(() => {\n const distance = touchStartX.current - touchEndX.current;\n\n if (Math.abs(distance) < minSwipeDistance) return;\n\n if (distance > 0) {\n onSwipeLeft?.();\n } else {\n onSwipeRight?.();\n }\n }, [minSwipeDistance, onSwipeLeft, onSwipeRight]);\n\n const onTouchStart = useCallback((e: React.TouchEvent) => {\n touchStartX.current = e.changedTouches[0]?.clientX || 0;\n }, []);\n\n const onTouchEnd = useCallback(\n (e: React.TouchEvent) => {\n touchEndX.current = e.changedTouches[0]?.clientX || 0;\n handleSwipe();\n },\n [handleSwipe],\n );\n\n return (\n <Styled.SwipeableWrapper onTouchStart={onTouchStart} onTouchEnd={onTouchEnd}>\n {children}\n </Styled.SwipeableWrapper>\n );\n },\n);\n\nSwipeableComponent.displayName = 'SwipeableComponent';\n\nexport default SwipeableComponent;\n"],"names":["SwipeableComponent","memo","onSwipeLeft","onSwipeRight","minSwipeDistance","children","touchStartX","useRef","touchEndX","handleSwipe","useCallback","distance","onTouchStart","e","_a","onTouchEnd","Styled.SwipeableWrapper","SwipeableCard"],"mappings":";;;AAKA,MAAMA,IAAyDC;AAAA,EAC7D,CAAC,EAAE,aAAAC,GAAa,cAAAC,GAAc,kBAAAC,IAAmB,IAAI,UAAAC,QAAe;AAC5D,UAAAC,IAAcC,EAAO,CAAC,GACtBC,IAAYD,EAAO,CAAC,GAEpBE,IAAcC,EAAY,MAAM;AAC9B,YAAAC,IAAWL,EAAY,UAAUE,EAAU;AAEjD,MAAI,KAAK,IAAIG,CAAQ,IAAIP,MAErBO,IAAW,IACCT,KAAA,QAAAA,MAECC,KAAA,QAAAA;AAAA,IAEhB,GAAA,CAACC,GAAkBF,GAAaC,CAAY,CAAC,GAE1CS,IAAeF,EAAY,CAACG,MAAwB;;AACxD,MAAAP,EAAY,YAAUQ,IAAAD,EAAE,eAAe,CAAC,MAAlB,gBAAAC,EAAqB,YAAW;AAAA,IACxD,GAAG,CAAE,CAAA,GAECC,IAAaL;AAAA,MACjB,CAACG,MAAwB;;AACvB,QAAAL,EAAU,YAAUM,IAAAD,EAAE,eAAe,CAAC,MAAlB,gBAAAC,EAAqB,YAAW,GACxCL;MACd;AAAA,MACA,CAACA,CAAW;AAAA,IAAA;AAGd,6BACGO,GAAA,EAAwB,cAAAJ,GAA4B,YAAAG,GAClD,UAAAV,EACH,CAAA;AAAA,EAEJ;AACF;AAEAL,EAAmB,cAAc;AAEjC,MAAAiB,IAAejB;"}
|
|
@@ -1,32 +1,31 @@
|
|
|
1
|
-
import { useState as
|
|
2
|
-
import { useAVMessage as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
u(d.id);
|
|
1
|
+
import { useState as u, useMemo as a, useCallback as I } from "react";
|
|
2
|
+
import { useAVMessage as c } from "@cuemath/av";
|
|
3
|
+
const N = ({
|
|
4
|
+
questions: o,
|
|
5
|
+
activeQuestionIndex: r,
|
|
6
|
+
userType: p
|
|
7
|
+
}) => {
|
|
8
|
+
var n;
|
|
9
|
+
const [t, i] = u(), e = a(
|
|
10
|
+
() => o.findIndex((s) => s.response_id === t),
|
|
11
|
+
[t, o]
|
|
12
|
+
), d = I((s, m) => {
|
|
13
|
+
i(m.id);
|
|
15
14
|
}, []);
|
|
16
|
-
return
|
|
15
|
+
return c({
|
|
17
16
|
type: "STUDENT_MOUSE_POINTER_POSITION_CHANGED",
|
|
18
|
-
onMessage:
|
|
19
|
-
}),
|
|
17
|
+
onMessage: d
|
|
18
|
+
}), p !== "TEACHER" || e === -1 || r === e ? {
|
|
20
19
|
peerLocation: void 0,
|
|
21
20
|
peerQuestionIndex: void 0,
|
|
22
21
|
peerItemNumber: void 0
|
|
23
22
|
} : {
|
|
24
|
-
peerLocation:
|
|
25
|
-
peerQuestionIndex:
|
|
26
|
-
peerItemNumber: (
|
|
23
|
+
peerLocation: e > r ? "down" : "up",
|
|
24
|
+
peerQuestionIndex: e,
|
|
25
|
+
peerItemNumber: (n = o[e]) == null ? void 0 : n.item_number
|
|
27
26
|
};
|
|
28
27
|
};
|
|
29
28
|
export {
|
|
30
|
-
|
|
29
|
+
N as default
|
|
31
30
|
};
|
|
32
31
|
//# sourceMappingURL=use-user-location.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-user-location.js","sources":["../../../../../src/features/worksheet/user-pointer-pin/hooks/use-user-location.ts"],"sourcesContent":["import { useCallback, useMemo, useState } from 'react';\n\nimport { useAVMessage } from '@cuemath/av';\n\nimport {
|
|
1
|
+
{"version":3,"file":"use-user-location.js","sources":["../../../../../src/features/worksheet/user-pointer-pin/hooks/use-user-location.ts"],"sourcesContent":["import { useCallback, useMemo, useState } from 'react';\n\nimport { useAVMessage } from '@cuemath/av';\n\nimport type { TUserTypes } from '../../../ui/types';\nimport type { IWorksheetQuestion } from '../../worksheet/worksheet-types';\n\ninterface IUseRemoteUserLocationProps {\n questions: IWorksheetQuestion[];\n activeQuestionIndex: number;\n userType?: TUserTypes;\n}\n\ntype TpointerLocation = 'up' | 'down' | undefined;\n\ninterface IUseRemoteUserLocation {\n peerLocation: TpointerLocation;\n peerQuestionIndex: number | undefined;\n peerItemNumber: number | undefined;\n}\n\nconst useRemoteUserLocation = ({\n questions,\n activeQuestionIndex,\n userType,\n}: IUseRemoteUserLocationProps): IUseRemoteUserLocation => {\n const [peerResponseId, setPeerResponseId] = useState<string | undefined>();\n const peerQuestionIndex = useMemo(\n () => questions.findIndex(qs => qs.response_id === peerResponseId),\n [peerResponseId, questions],\n );\n const onPointerReceive = useCallback((_: string, data: Record<string, unknown>) => {\n setPeerResponseId(data.id as string);\n }, []);\n\n useAVMessage<Record<string, unknown>>({\n type: 'STUDENT_MOUSE_POINTER_POSITION_CHANGED',\n onMessage: onPointerReceive,\n });\n\n if (\n userType !== 'TEACHER' ||\n peerQuestionIndex === -1 ||\n activeQuestionIndex === peerQuestionIndex\n ) {\n return {\n peerLocation: undefined,\n peerQuestionIndex: undefined,\n peerItemNumber: undefined,\n };\n }\n\n return {\n peerLocation: peerQuestionIndex > activeQuestionIndex ? 'down' : 'up',\n peerQuestionIndex,\n peerItemNumber: questions[peerQuestionIndex]?.item_number,\n };\n};\n\nexport default useRemoteUserLocation;\n"],"names":["useRemoteUserLocation","questions","activeQuestionIndex","userType","peerResponseId","setPeerResponseId","useState","peerQuestionIndex","useMemo","qs","onPointerReceive","useCallback","_","data","useAVMessage","_a"],"mappings":";;AAqBA,MAAMA,IAAwB,CAAC;AAAA,EAC7B,WAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,UAAAC;AACF,MAA2D;;AACzD,QAAM,CAACC,GAAgBC,CAAiB,IAAIC,EAA6B,GACnEC,IAAoBC;AAAA,IACxB,MAAMP,EAAU,UAAU,CAAMQ,MAAAA,EAAG,gBAAgBL,CAAc;AAAA,IACjE,CAACA,GAAgBH,CAAS;AAAA,EAAA,GAEtBS,IAAmBC,EAAY,CAACC,GAAWC,MAAkC;AACjF,IAAAR,EAAkBQ,EAAK,EAAY;AAAA,EACrC,GAAG,CAAE,CAAA;AAOL,SALsCC,EAAA;AAAA,IACpC,MAAM;AAAA,IACN,WAAWJ;AAAA,EAAA,CACZ,GAGCP,MAAa,aACbI,MAAsB,MACtBL,MAAwBK,IAEjB;AAAA,IACL,cAAc;AAAA,IACd,mBAAmB;AAAA,IACnB,gBAAgB;AAAA,EAAA,IAIb;AAAA,IACL,cAAcA,IAAoBL,IAAsB,SAAS;AAAA,IACjE,mBAAAK;AAAA,IACA,iBAAgBQ,IAAAd,EAAUM,CAAiB,MAA3B,gBAAAQ,EAA8B;AAAA,EAAA;AAElD;"}
|
|
@@ -1,57 +1,55 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { memo as
|
|
3
|
-
import
|
|
4
|
-
import { ILLUSTRATIONS as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
const c = 32, f = 36, b = l.img`
|
|
2
|
+
import { memo as U, useCallback as S } from "react";
|
|
3
|
+
import a from "styled-components";
|
|
4
|
+
import { ILLUSTRATIONS as f } from "../../../assets/illustrations/illustrations.js";
|
|
5
|
+
import _ from "../../ui/buttons/clickable/clickable.js";
|
|
6
|
+
import C from "../../ui/layout/flex-view.js";
|
|
7
|
+
import { scrollToQuestion as E } from "../worksheet/worksheet-helpers.js";
|
|
8
|
+
import R from "./hooks/use-user-location.js";
|
|
9
|
+
const c = 32, u = 36, T = a.img`
|
|
11
10
|
position: absolute;
|
|
12
|
-
transform: ${({ $pointer:
|
|
13
|
-
`,
|
|
14
|
-
({ $pointer:
|
|
11
|
+
transform: ${({ $pointer: t }) => t === "down" ? `translate(-${c / 2}px, -${u}px)` : `translate(-${c / 2}px, 0)`};
|
|
12
|
+
`, b = a(C)(
|
|
13
|
+
({ $pointer: t, $topOffset: r, $bottomOffset: i }) => `
|
|
15
14
|
position: sticky;
|
|
16
|
-
top: ${
|
|
15
|
+
top: ${t === "down" ? `calc(100% - ${i}px)` : `calc(${r + 48 + 8}px)`};
|
|
17
16
|
z-index: 1;
|
|
18
17
|
`
|
|
19
|
-
),
|
|
20
|
-
const {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
userType:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
if (i === void 0)
|
|
18
|
+
), H = U(function(r) {
|
|
19
|
+
const { activeQuestionIndex: i, questions: o, bottomOffset: d, topOffset: $, userType: l } = r, { peerLocation: e, peerQuestionIndex: n } = R({
|
|
20
|
+
questions: o,
|
|
21
|
+
activeQuestionIndex: i,
|
|
22
|
+
userType: l
|
|
23
|
+
}), x = S(() => {
|
|
24
|
+
var p, m;
|
|
25
|
+
if (n === void 0)
|
|
28
26
|
return null;
|
|
29
|
-
if ((
|
|
30
|
-
const
|
|
31
|
-
|
|
27
|
+
if ((p = o[n]) != null && p.response_id) {
|
|
28
|
+
const I = (m = o[n]) == null ? void 0 : m.response_id;
|
|
29
|
+
E(I);
|
|
32
30
|
}
|
|
33
|
-
}, [
|
|
34
|
-
return !
|
|
35
|
-
|
|
31
|
+
}, [n, o]);
|
|
32
|
+
return !e || l !== "TEACHER" ? null : /* @__PURE__ */ s(
|
|
33
|
+
b,
|
|
36
34
|
{
|
|
37
35
|
$alignItems: "center",
|
|
38
36
|
$justifyContent: "center",
|
|
39
|
-
$pointer:
|
|
40
|
-
$bottomOffset:
|
|
41
|
-
$topOffset:
|
|
42
|
-
children: /* @__PURE__ */ s(
|
|
43
|
-
|
|
37
|
+
$pointer: e,
|
|
38
|
+
$bottomOffset: d,
|
|
39
|
+
$topOffset: $,
|
|
40
|
+
children: /* @__PURE__ */ s(_, { label: "User Location Pointer", onClick: x, children: /* @__PURE__ */ s(
|
|
41
|
+
T,
|
|
44
42
|
{
|
|
45
|
-
$pointer:
|
|
43
|
+
$pointer: e,
|
|
46
44
|
width: c,
|
|
47
|
-
height:
|
|
48
|
-
src:
|
|
45
|
+
height: u,
|
|
46
|
+
src: e === "up" ? f.USER_UP : f.USER_DOWN
|
|
49
47
|
}
|
|
50
48
|
) })
|
|
51
49
|
}
|
|
52
50
|
);
|
|
53
51
|
});
|
|
54
52
|
export {
|
|
55
|
-
|
|
53
|
+
H as default
|
|
56
54
|
};
|
|
57
55
|
//# sourceMappingURL=user-pin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-pin.js","sources":["../../../../src/features/worksheet/user-pointer-pin/user-pin.tsx"],"sourcesContent":["import { memo, useCallback, type FC } from 'react';\nimport styled from 'styled-components';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport Clickable from '../../ui/buttons/clickable/clickable';\nimport FlexView from '../../ui/layout/flex-view';\nimport {
|
|
1
|
+
{"version":3,"file":"user-pin.js","sources":["../../../../src/features/worksheet/user-pointer-pin/user-pin.tsx"],"sourcesContent":["import { memo, useCallback, type FC } from 'react';\nimport styled from 'styled-components';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport Clickable from '../../ui/buttons/clickable/clickable';\nimport FlexView from '../../ui/layout/flex-view';\nimport type { TUserTypes } from '../../ui/types';\nimport { scrollToQuestion } from '../worksheet/worksheet-helpers';\nimport type { IWorksheetQuestion } from '../worksheet/worksheet-types';\nimport useRemoteUserLocation from './hooks/use-user-location';\n\nconst USER_PIN_WIDTH = 32;\nconst USER_PIN_HEIGHT = 36;\n\nconst StyledImage = styled.img<{ $pointer: 'up' | 'down' | undefined }>`\n position: absolute;\n transform: ${({ $pointer }) =>\n $pointer === 'down'\n ? `translate(-${USER_PIN_WIDTH / 2}px, -${USER_PIN_HEIGHT}px)`\n : `translate(-${USER_PIN_WIDTH / 2}px, 0)`};\n`;\n\nconst StickyContainer = styled(FlexView)<{\n $pointer: 'up' | 'down' | undefined;\n $topOffset: number;\n $bottomOffset: number;\n}>(\n ({ $pointer, $topOffset, $bottomOffset }) => `\n position: sticky;\n top: ${\n $pointer === 'down' ? `calc(100% - ${$bottomOffset}px)` : `calc(${$topOffset + 48 + 8}px)`\n };\n z-index: 1;\n`,\n);\n\ninterface IUserPointerProps {\n activeQuestionIndex: number;\n onClick: (questionId: string) => void;\n questions: IWorksheetQuestion[];\n bottomOffset: number;\n topOffset: number;\n userType: TUserTypes;\n}\n\nconst UserPointer: FC<IUserPointerProps> = memo(function UserPointer(props) {\n const { activeQuestionIndex, questions, bottomOffset, topOffset, userType } = props;\n const { peerLocation, peerQuestionIndex } = useRemoteUserLocation({\n questions,\n activeQuestionIndex,\n userType,\n });\n\n const handleClick = useCallback(() => {\n if (peerQuestionIndex === undefined) {\n return null;\n }\n\n if (questions[peerQuestionIndex]?.response_id) {\n const qrId = questions[peerQuestionIndex]?.response_id as string;\n\n scrollToQuestion(qrId);\n }\n }, [peerQuestionIndex, questions]);\n\n if (!peerLocation || userType !== 'TEACHER') {\n return null;\n }\n\n return (\n <StickyContainer\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $pointer={peerLocation}\n $bottomOffset={bottomOffset}\n $topOffset={topOffset}\n >\n <Clickable label=\"User Location Pointer\" onClick={handleClick}>\n <StyledImage\n $pointer={peerLocation}\n width={USER_PIN_WIDTH}\n height={USER_PIN_HEIGHT}\n src={peerLocation === 'up' ? ILLUSTRATIONS.USER_UP : ILLUSTRATIONS.USER_DOWN}\n />\n </Clickable>\n </StickyContainer>\n );\n});\n\nexport default UserPointer;\n"],"names":["USER_PIN_WIDTH","USER_PIN_HEIGHT","StyledImage","styled","$pointer","StickyContainer","FlexView","$topOffset","$bottomOffset","UserPointer","memo","props","activeQuestionIndex","questions","bottomOffset","topOffset","userType","peerLocation","peerQuestionIndex","useRemoteUserLocation","handleClick","useCallback","_a","qrId","_b","scrollToQuestion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