@cuemath/leap 3.2.17-mb → 3.2.17-pzd-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 +6 -5
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- 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/hint-fill.js +35 -0
- package/dist/assets/line-icons/icons/hint-fill.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 +6 -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/auth-page-layout/auth-page-layout.js +15 -14
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout.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/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/error/error.js +65 -27
- package/dist/features/ui/error/error.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/{stickers/stickers-effects/stickers-effects-utils.js → ui/stickers/stickers-utils.js} +6 -6
- 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/text/text.js +40 -36
- package/dist/features/ui/text/text.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 +152 -56
- package/dist/index.js +563 -539
- package/dist/index.js.map +1 -1
- package/dist/static/nudge-tap.0591aef4.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/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.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 @@
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../src/features/ui/stickers/constants.ts"],"sourcesContent":["export const STICKER_MIN_SIZE = 32;\nexport const STICKER_MAX_SIZE = 48;\n"],"names":["STICKER_MIN_SIZE","STICKER_MAX_SIZE"],"mappings":"AAAO,MAAMA,IAAmB,IACnBC,IAAmB;"}
|
package/dist/features/{stickers/stickers-effects/effects.js → ui/stickers/stickers-effects.js}
RENAMED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { keyframes as r, css as t } from "styled-components";
|
2
|
-
import { randomizeDuration as o } from "./stickers-
|
2
|
+
import { randomizeDuration as o } from "./stickers-utils.js";
|
3
3
|
const s = r`
|
4
4
|
0% {
|
5
5
|
transform: translateY(0vh);
|
@@ -45,20 +45,20 @@ const s = r`
|
|
45
45
|
opacity: 0;
|
46
46
|
}
|
47
47
|
`, i = {
|
48
|
-
|
48
|
+
float_up: (a) => t`
|
49
49
|
animation: ${s} ${o(a)}ms ease-out forwards;
|
50
50
|
`,
|
51
|
-
|
51
|
+
fall_down: (a) => t`
|
52
52
|
animation: ${n} ${o(a)}ms ease-out forwards;
|
53
53
|
`,
|
54
|
-
|
54
|
+
burst_from_edges: (a) => t`
|
55
55
|
animation: ${e} ${o(a)}ms linear forwards;
|
56
56
|
`,
|
57
|
-
|
57
|
+
pop_expand: (a) => t`
|
58
58
|
animation: ${m} ${a}ms cubic-bezier(0.5, 0.1, 0.7, 1) forwards;
|
59
59
|
`
|
60
60
|
};
|
61
61
|
export {
|
62
62
|
i as effectAnimations
|
63
63
|
};
|
64
|
-
//# sourceMappingURL=effects.js.map
|
64
|
+
//# sourceMappingURL=stickers-effects.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"stickers-effects.js","sources":["../../../../src/features/ui/stickers/stickers-effects.ts"],"sourcesContent":["import type { StickersProps } from './stickers-types';\n\nimport { keyframes, css } from 'styled-components';\n\nimport { randomizeDuration } from './stickers-utils';\n\nconst floatUp = keyframes`\n 0% {\n transform: translateY(0vh);\n opacity: 1;\n }\n 100% {\n transform: translateY(-100vh);\n opacity: 0;\n }\n`;\n\nconst fallDown = keyframes`\n 0% {\n transform: translateY(0vh);\n opacity: 1;\n }\n 100% {\n transform: translateY(100vh);\n opacity: 0;\n }\n`;\n\nconst burstFromEdges = keyframes`\n 0% {\n transform: translateX(var(--from-x)) translateY(var(--from-y)) scale(1);\n opacity: 1;\n }\n 100% {\n transform: translateX(0vw) translateY(0vh) scale(1.25);\n opacity: 0;\n }\n`;\n\nconst popExpand = keyframes`\n 0% {\n transform: translateX(0) translateY(0vh);\n opacity: 1;\n }\n 35% {\n transform: translateX(0) translateY(-50vh) scale(1.25);\n opacity: 1;\n }\n 60% {\n transform: translateX(var(--from-x)) translateY(var(--from-y)) scale(1.25);\n opacity: 0.75;\n }\n 100% {\n transform: translateX(var(--from-x)) translateY(-110vh) scale(1.25);\n opacity: 0;\n }\n`;\n\nexport const effectAnimations: Record<\n StickersProps['effect'],\n (duration: number) => ReturnType<typeof css>\n> = {\n float_up: (duration: number) => css`\n animation: ${floatUp} ${randomizeDuration(duration)}ms ease-out forwards;\n `,\n fall_down: (duration: number) => css`\n animation: ${fallDown} ${randomizeDuration(duration)}ms ease-out forwards;\n `,\n burst_from_edges: (duration: number) => css`\n animation: ${burstFromEdges} ${randomizeDuration(duration)}ms linear forwards;\n `,\n pop_expand: (duration: number) => css`\n animation: ${popExpand} ${duration}ms cubic-bezier(0.5, 0.1, 0.7, 1) forwards;\n `,\n};\n"],"names":["floatUp","keyframes","fallDown","burstFromEdges","popExpand","effectAnimations","duration","css","randomizeDuration"],"mappings":";;AAMA,MAAMA,IAAUC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAWVC,IAAWD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAWXE,IAAiBF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAWjBG,IAAYH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAmBLI,IAGT;AAAA,EACF,UAAU,CAACC,MAAqBC;AAAA,iBACjBP,CAAO,IAAIQ,EAAkBF,CAAQ,CAAC;AAAA;AAAA,EAErD,WAAW,CAACA,MAAqBC;AAAA,iBAClBL,CAAQ,IAAIM,EAAkBF,CAAQ,CAAC;AAAA;AAAA,EAEtD,kBAAkB,CAACA,MAAqBC;AAAA,iBACzBJ,CAAc,IAAIK,EAAkBF,CAAQ,CAAC;AAAA;AAAA,EAE5D,YAAY,CAACA,MAAqBC;AAAA,iBACnBH,CAAS,IAAIE,CAAQ;AAAA;AAEtC;"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import $, { css as s } from "styled-components";
|
2
|
-
import { effectAnimations as n } from "./effects.js";
|
2
|
+
import { effectAnimations as n } from "./stickers-effects.js";
|
3
3
|
const h = $.div`
|
4
4
|
position: relative;
|
5
5
|
width: 100vw;
|
@@ -26,4 +26,4 @@ export {
|
|
26
26
|
h as Container,
|
27
27
|
a as Sticker
|
28
28
|
};
|
29
|
-
//# sourceMappingURL=stickers-
|
29
|
+
//# sourceMappingURL=stickers-styled.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"stickers-styled.js","sources":["../../../../src/features/ui/stickers/stickers-styled.ts"],"sourcesContent":["import type { StickersProps } from './stickers-types';\n\nimport styled, { css } from 'styled-components';\n\nimport { effectAnimations } from './stickers-effects';\n\nexport const Container = styled.div`\n position: relative;\n width: 100vw;\n height: 100vh;\n background: transparent;\n pointer-events: none;\n`;\n\nexport const Sticker = styled.div<{\n effect: StickersProps['effect'];\n duration: number;\n fromX?: string;\n fromY?: string;\n x: number;\n y: number;\n size: number;\n}>`\n position: absolute;\n z-index: 10;\n\n left: ${({ x }) => `${x}%`};\n top: ${({ y }) => `${y}%`};\n width: ${({ size }) => `${size}px`};\n height: ${({ size }) => `${size}px`};\n font-size: ${({ size }) => `${size}px`};\n\n ${({ effect, duration, fromX, fromY }) =>\n fromX && fromY\n ? css`\n ${effectAnimations[effect](duration)}\n --from-x: ${fromX};\n --from-y: ${fromY};\n `\n : effectAnimations[effect](duration)}\n`;\n"],"names":["Container","styled","Sticker","x","y","size","effect","duration","fromX","fromY","css","effectAnimations"],"mappings":";;AAMO,MAAMA,IAAYC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQnBC,IAAUD,EAAO;AAAA;AAAA;AAAA;AAAA,UAYpB,CAAC,EAAE,GAAAE,EAAQ,MAAA,GAAGA,CAAC,GAAG;AAAA,SACnB,CAAC,EAAE,GAAAC,EAAQ,MAAA,GAAGA,CAAC,GAAG;AAAA,WAChB,CAAC,EAAE,MAAAC,EAAW,MAAA,GAAGA,CAAI,IAAI;AAAA,YACxB,CAAC,EAAE,MAAAA,EAAW,MAAA,GAAGA,CAAI,IAAI;AAAA,eACtB,CAAC,EAAE,MAAAA,EAAW,MAAA,GAAGA,CAAI,IAAI;AAAA;AAAA,IAEpC,CAAC,EAAE,QAAAC,GAAQ,UAAAC,GAAU,OAAAC,GAAO,OAAAC,QAC5BD,KAASC,IACLC;AAAA,YACIC,EAAiBL,CAAM,EAAEC,CAAQ,CAAC;AAAA,sBACxBC,CAAK;AAAA,sBACLC,CAAK;AAAA,YAEnBE,EAAiBL,CAAM,EAAEC,CAAQ,CAAC;AAAA;"}
|
@@ -40,10 +40,10 @@ function x({
|
|
40
40
|
minSize: r,
|
41
41
|
maxSize: d
|
42
42
|
}) {
|
43
|
-
const c = 100 / n * 2, M = () => Math.random() * (d - r) + r, h = [], i = ["
|
43
|
+
const c = 100 / n * 2, M = () => Math.random() * (d - r) + r, h = [], i = ["float_up", "fall_down"].includes(s) ? g(n, c) : [];
|
44
44
|
for (let o = 0; o < n; o++) {
|
45
45
|
const a = t[o % t.length] ?? "", e = M();
|
46
|
-
if (s === "
|
46
|
+
if (s === "float_up")
|
47
47
|
h.push({
|
48
48
|
id: o,
|
49
49
|
sticker: a,
|
@@ -51,7 +51,7 @@ function x({
|
|
51
51
|
y: 110 + (Math.random() - 0.5) * e,
|
52
52
|
size: e
|
53
53
|
});
|
54
|
-
else if (s === "
|
54
|
+
else if (s === "fall_down")
|
55
55
|
h.push({
|
56
56
|
id: o,
|
57
57
|
sticker: a,
|
@@ -59,10 +59,10 @@ function x({
|
|
59
59
|
y: -10 + (Math.random() - 0.5) * e,
|
60
60
|
size: e
|
61
61
|
});
|
62
|
-
else if (s === "
|
62
|
+
else if (s === "burst_from_edges") {
|
63
63
|
const { x: l, y: m, fromX: p, fromY: u } = f(o, n);
|
64
64
|
h.push({ id: o, sticker: a, x: l, y: m, fromX: p, fromY: u, size: e });
|
65
|
-
} else s === "
|
65
|
+
} else s === "pop_expand" ? h.push({
|
66
66
|
id: o,
|
67
67
|
sticker: a,
|
68
68
|
x: 50,
|
@@ -88,4 +88,4 @@ export {
|
|
88
88
|
x as generateStickerData,
|
89
89
|
v as randomizeDuration
|
90
90
|
};
|
91
|
-
//# sourceMappingURL=stickers-
|
91
|
+
//# sourceMappingURL=stickers-utils.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"stickers-utils.js","sources":["../../../../src/features/ui/stickers/stickers-utils.ts"],"sourcesContent":["import type { StickerDatum, StickersProps } from './stickers-types';\n\nconst getBurstPosition = (\n index: number,\n total: number,\n): {\n fromX: string;\n fromY: string;\n x: number;\n y: number;\n} => {\n const countPerSide = Math.ceil(total / 4);\n const sideIndex = Math.floor(index / countPerSide);\n const pos = index % countPerSide;\n\n const sides = ['top', 'right', 'bottom', 'left'] as const;\n const side = sides[sideIndex] ?? 'left';\n\n const basePercent = ((pos + 0.5) / countPerSide) * 100;\n const jitter = (Math.random() - 0.5) * 25;\n const edgePercent = Math.min(Math.max(basePercent + jitter, 0), 100);\n\n const centerX = 45 + Math.random() * 10;\n const centerY = 45 + Math.random() * 10;\n\n let fromX = 0;\n let fromY = 0;\n\n switch (side) {\n case 'top':\n fromX = edgePercent - centerX;\n fromY = -centerY + jitter;\n break;\n case 'right':\n fromX = 100 - centerX + jitter;\n fromY = edgePercent - centerY;\n break;\n case 'bottom':\n fromX = edgePercent - centerX;\n fromY = 100 - centerY + jitter;\n break;\n case 'left':\n fromX = -centerX + jitter;\n fromY = edgePercent - centerY;\n break;\n }\n\n return {\n fromX: `${fromX}vw`,\n fromY: `${fromY}vh`,\n x: centerX,\n y: centerY,\n };\n};\n\nconst getRandomNonOverlappingPositions = (count: number, buffer = 10): number[] => {\n const used: number[] = [];\n let attempts = 0;\n const maxAttempts = count;\n\n while (used.length < count && attempts < maxAttempts) {\n const value = Math.floor(Math.random() * (100 - 2 * buffer) + buffer);\n\n if (used.every(v => Math.abs(v - value) >= buffer)) {\n used.push(value);\n }\n attempts++;\n }\n\n while (used.length < count) {\n used.push(Math.floor(Math.random() * (100 - 2 * buffer) + buffer));\n }\n\n return used;\n};\n\nexport function generateStickerData({\n count,\n effect,\n stickers,\n minSize,\n maxSize,\n}: {\n count: number;\n effect: StickersProps['effect'];\n stickers: string[];\n minSize: number;\n maxSize: number;\n}): StickerDatum[] {\n const buffer = (100 / count) * 2;\n const getSize = () => Math.random() * (maxSize - minSize) + minSize;\n const result: StickerDatum[] = [];\n const xPositions = ['float_up', 'fall_down'].includes(effect)\n ? getRandomNonOverlappingPositions(count, buffer)\n : [];\n\n for (let i = 0; i < count; i++) {\n const sticker = stickers[i % stickers.length] ?? '';\n const size = getSize();\n\n if (effect === 'float_up') {\n result.push({\n id: i,\n sticker,\n x: xPositions[i]!,\n y: 110 + (Math.random() - 0.5) * size,\n size,\n });\n } else if (effect === 'fall_down') {\n result.push({\n id: i,\n sticker,\n x: xPositions[i]!,\n y: -10 + (Math.random() - 0.5) * size,\n size,\n });\n } else if (effect === 'burst_from_edges') {\n const { x, y, fromX, fromY } = getBurstPosition(i, count);\n\n result.push({ id: i, sticker, x, y, fromX, fromY, size });\n } else if (effect === 'pop_expand') {\n result.push({\n id: i,\n sticker,\n x: 50,\n y: 100,\n fromX: `${(Math.random() - 0.5) * 27.5}vw`,\n fromY: `${-50 - Math.random() * 27.5}vh`,\n size,\n });\n } else {\n result.push({\n id: i,\n sticker,\n x: Math.random() * 100,\n y: Math.random() * 100,\n size,\n });\n }\n }\n\n return result;\n}\n\nexport const randomizeDuration = (base: number, variancePercent = 0.2): number => {\n const delta = base * variancePercent;\n const min = base - delta;\n const max = base + delta;\n\n return Math.floor(Math.random() * (max - min + 1)) + min;\n};\n"],"names":["getBurstPosition","index","total","countPerSide","sideIndex","pos","side","basePercent","jitter","edgePercent","centerX","centerY","fromX","fromY","getRandomNonOverlappingPositions","count","buffer","used","attempts","maxAttempts","value","v","generateStickerData","effect","stickers","minSize","maxSize","getSize","result","xPositions","i","sticker","size","x","y","randomizeDuration","base","variancePercent","delta","min","max"],"mappings":"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"}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
2
|
+
import { memo as E, useState as I, useLayoutEffect as l } from "react";
|
3
|
+
import { STICKER_MIN_SIZE as x, STICKER_MAX_SIZE as D } from "./constants.js";
|
4
|
+
import { Container as T, Sticker as _ } from "./stickers-styled.js";
|
5
|
+
import { generateStickerData as z } from "./stickers-utils.js";
|
6
|
+
const C = ({ stickers: i, effect: t, count: m, duration: r }) => {
|
7
|
+
const [c, s] = I([]);
|
8
|
+
return l(() => {
|
9
|
+
const e = z({
|
10
|
+
count: m,
|
11
|
+
effect: t,
|
12
|
+
stickers: i,
|
13
|
+
minSize: x,
|
14
|
+
maxSize: D
|
15
|
+
});
|
16
|
+
s(e);
|
17
|
+
const o = setTimeout(() => s([]), r);
|
18
|
+
return () => clearTimeout(o);
|
19
|
+
}, [i, t, m, r]), /* @__PURE__ */ a(T, { children: c.map((e) => {
|
20
|
+
const { id: o, sticker: n, x: S, y: k, size: p, fromX: u, fromY: f } = e;
|
21
|
+
return /* @__PURE__ */ a(
|
22
|
+
_,
|
23
|
+
{
|
24
|
+
effect: t,
|
25
|
+
duration: r,
|
26
|
+
fromX: u,
|
27
|
+
fromY: f,
|
28
|
+
x: S,
|
29
|
+
y: k,
|
30
|
+
size: p,
|
31
|
+
children: n
|
32
|
+
},
|
33
|
+
o
|
34
|
+
);
|
35
|
+
}) });
|
36
|
+
}, R = E(C);
|
37
|
+
export {
|
38
|
+
R as default
|
39
|
+
};
|
40
|
+
//# sourceMappingURL=stickers.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"stickers.js","sources":["../../../../src/features/ui/stickers/stickers.tsx"],"sourcesContent":["import type { StickerDatum, StickersProps } from './stickers-types';\n\nimport React, { memo, useLayoutEffect, useState } from 'react';\n\nimport { STICKER_MAX_SIZE, STICKER_MIN_SIZE } from './constants';\nimport { Container, Sticker } from './stickers-styled';\nimport { generateStickerData } from './stickers-utils';\n\nconst Stickers: React.FC<StickersProps> = ({ stickers, effect, count, duration }) => {\n const [stickersData, setStickersData] = useState<ReturnType<typeof generateStickerData>>([]);\n\n useLayoutEffect(() => {\n const stickerData = generateStickerData({\n count,\n effect,\n stickers,\n minSize: STICKER_MIN_SIZE,\n maxSize: STICKER_MAX_SIZE,\n });\n\n setStickersData(stickerData);\n\n const timeout = setTimeout(() => setStickersData([]), duration);\n\n return () => clearTimeout(timeout);\n }, [stickers, effect, count, duration]);\n\n return (\n <Container>\n {stickersData.map((data: StickerDatum) => {\n const { id, sticker, x, y, size, fromX, fromY } = data;\n\n return (\n <Sticker\n key={id}\n effect={effect}\n duration={duration}\n fromX={fromX}\n fromY={fromY}\n x={x}\n y={y}\n size={size}\n >\n {sticker}\n </Sticker>\n );\n })}\n </Container>\n );\n};\n\nexport default memo(Stickers);\n"],"names":["Stickers","stickers","effect","count","duration","stickersData","setStickersData","useState","useLayoutEffect","stickerData","generateStickerData","STICKER_MIN_SIZE","STICKER_MAX_SIZE","timeout","jsx","Container","data","id","sticker","x","y","size","fromX","fromY","Sticker","memo"],"mappings":";;;;;AAQA,MAAMA,IAAoC,CAAC,EAAE,UAAAC,GAAU,QAAAC,GAAQ,OAAAC,GAAO,UAAAC,QAAe;AACnF,QAAM,CAACC,GAAcC,CAAe,IAAIC,EAAiD,CAAE,CAAA;AAE3F,SAAAC,EAAgB,MAAM;AACpB,UAAMC,IAAcC,EAAoB;AAAA,MACtC,OAAAP;AAAA,MACA,QAAAD;AAAA,MACA,UAAAD;AAAA,MACA,SAASU;AAAA,MACT,SAASC;AAAA,IAAA,CACV;AAED,IAAAN,EAAgBG,CAAW;AAE3B,UAAMI,IAAU,WAAW,MAAMP,EAAgB,CAAE,CAAA,GAAGF,CAAQ;AAEvD,WAAA,MAAM,aAAaS,CAAO;AAAA,KAChC,CAACZ,GAAUC,GAAQC,GAAOC,CAAQ,CAAC,GAGnC,gBAAAU,EAAAC,GAAA,EACE,UAAaV,EAAA,IAAI,CAACW,MAAuB;AAClC,UAAA,EAAE,IAAAC,GAAI,SAAAC,GAAS,GAAAC,GAAG,GAAAC,GAAG,MAAAC,GAAM,OAAAC,GAAO,OAAAC,EAAU,IAAAP;AAGhD,WAAA,gBAAAF;AAAA,MAACU;AAAA,MAAA;AAAA,QAEC,QAAAtB;AAAA,QACA,UAAAE;AAAA,QACA,OAAAkB;AAAA,QACA,OAAAC;AAAA,QACA,GAAAJ;AAAA,QACA,GAAAC;AAAA,QACA,MAAAC;AAAA,QAEC,UAAAH;AAAA,MAAA;AAAA,MATID;AAAA,IAAA;AAAA,EAYV,CAAA,EACH,CAAA;AAEJ,GAEehB,IAAAwB,EAAKzB,CAAQ;"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import i, { keyframes as o } from "styled-components";
|
2
2
|
const n = o`
|
3
3
|
66%{
|
4
4
|
opacity: 0;
|
@@ -6,29 +6,29 @@ const n = o`
|
|
6
6
|
33%{
|
7
7
|
opacity: 1;
|
8
8
|
}
|
9
|
-
`, a =
|
9
|
+
`, a = i.div`
|
10
10
|
height: 32px;
|
11
11
|
width: 32px;
|
12
12
|
display: flex;
|
13
13
|
align-items: center;
|
14
14
|
justify-content: center;
|
15
15
|
position: relative;
|
16
|
-
cursor: pointer;
|
17
|
-
`, s =
|
16
|
+
cursor: ${({ isInteractive: t }) => t ? "pointer" : "default"};
|
17
|
+
`, s = i.div`
|
18
18
|
height: 90%;
|
19
19
|
width: 90%;
|
20
20
|
position: absolute;
|
21
|
-
background: ${({ theme:
|
21
|
+
background: ${({ theme: t }) => t.colors.BLACK_1};
|
22
22
|
border-radius: 24px;
|
23
|
-
`, d =
|
23
|
+
`, d = i.div`
|
24
24
|
height: 90%;
|
25
25
|
width: 90%;
|
26
26
|
position: absolute;
|
27
|
-
background: ${({ theme:
|
27
|
+
background: ${({ theme: t }) => t.colors.RED};
|
28
28
|
border-radius: 32px;
|
29
29
|
animation: ${n}
|
30
|
-
${({ $blinkDelay:
|
31
|
-
`, c =
|
30
|
+
${({ $blinkDelay: t, $blinkDuration: e }) => `${e + t}ms linear infinite`};
|
31
|
+
`, c = i.div`
|
32
32
|
height: 100%;
|
33
33
|
width: 100%;
|
34
34
|
display: flex;
|
@@ -38,22 +38,22 @@ const n = o`
|
|
38
38
|
align-self: center;
|
39
39
|
padding-top: 6px;
|
40
40
|
z-index: 1;
|
41
|
-
`,
|
41
|
+
`, l = i.div`
|
42
42
|
position: absolute;
|
43
43
|
top: 0;
|
44
44
|
left: 0;
|
45
45
|
bottom: 0;
|
46
46
|
right: 0;
|
47
|
-
`,
|
47
|
+
`, p = i.img`
|
48
48
|
width: 100%;
|
49
49
|
height: 100%;
|
50
50
|
`;
|
51
51
|
export {
|
52
52
|
d as StreakBg,
|
53
53
|
c as StreakContent,
|
54
|
-
|
54
|
+
l as StreakImg,
|
55
55
|
s as StreakStaticBg,
|
56
56
|
a as StreakWrapper,
|
57
|
-
|
57
|
+
p as StyledImg
|
58
58
|
};
|
59
59
|
//# sourceMappingURL=streak-icon-styled.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"streak-icon-styled.js","sources":["../../../../src/features/ui/streak-icon/streak-icon-styled.tsx"],"sourcesContent":["import styled, { keyframes } from 'styled-components';\n\nconst fadeInFadeOut = keyframes`\n66%{\n opacity: 0;\n}\n33%{\n opacity: 1;\n}\n`;\n\nexport const StreakWrapper = styled.div
|
1
|
+
{"version":3,"file":"streak-icon-styled.js","sources":["../../../../src/features/ui/streak-icon/streak-icon-styled.tsx"],"sourcesContent":["import type { IStreakWrapperProps } from './streak-icon-types';\n\nimport styled, { keyframes } from 'styled-components';\n\nconst fadeInFadeOut = keyframes`\n66%{\n opacity: 0;\n}\n33%{\n opacity: 1;\n}\n`;\n\nexport const StreakWrapper = styled.div<IStreakWrapperProps>`\n height: 32px;\n width: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n cursor: ${({ isInteractive }) => (isInteractive ? 'pointer' : 'default')};\n`;\n\nexport const StreakStaticBg = styled.div`\n height: 90%;\n width: 90%;\n position: absolute;\n background: ${({ theme }) => theme.colors.BLACK_1};\n border-radius: 24px;\n`;\n\nexport const StreakBg = styled.div<{ $blinkDuration: number; $blinkDelay: number }>`\n height: 90%;\n width: 90%;\n position: absolute;\n background: ${({ theme }) => theme.colors.RED};\n border-radius: 32px;\n animation: ${fadeInFadeOut}\n ${({ $blinkDelay, $blinkDuration }) => `${$blinkDuration + $blinkDelay}ms linear infinite`};\n`;\n\nexport const StreakContent = styled.div`\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n align-self: center;\n padding-top: 6px;\n z-index: 1;\n`;\n\nexport const StreakImg = styled.div`\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n`;\n\nexport const StyledImg = styled.img`\n width: 100%;\n height: 100%;\n`;\n"],"names":["fadeInFadeOut","keyframes","StreakWrapper","styled","isInteractive","StreakStaticBg","theme","StreakBg","$blinkDelay","$blinkDuration","StreakContent","StreakImg","StyledImg"],"mappings":";AAIA,MAAMA,IAAgBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASTC,IAAgBC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAOxB,CAAC,EAAE,eAAAC,EAAA,MAAqBA,IAAgB,YAAY,SAAU;AAAA,GAG7DC,IAAiBF,EAAO;AAAA;AAAA;AAAA;AAAA,gBAIrB,CAAC,EAAE,OAAAG,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA,GAItCC,IAAWJ,EAAO;AAAA;AAAA;AAAA;AAAA,gBAIf,CAAC,EAAE,OAAAG,EAAA,MAAYA,EAAM,OAAO,GAAG;AAAA;AAAA,eAEhCN,CAAa;AAAA,MACtB,CAAC,EAAE,aAAAQ,GAAa,gBAAAC,QAAqB,GAAGA,IAAiBD,CAAW,oBAAoB;AAAA,GAGjFE,IAAgBP,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAYvBQ,IAAYR,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQnBS,IAAYT,EAAO;AAAA;AAAA;AAAA;"}
|
@@ -1,20 +1,22 @@
|
|
1
1
|
import { jsxs as e, jsx as r } from "react/jsx-runtime";
|
2
|
-
import { memo as
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import { BLINK_DURATION as
|
7
|
-
import { StreakWrapper as
|
8
|
-
const
|
9
|
-
/* @__PURE__ */
|
10
|
-
|
11
|
-
|
12
|
-
/* @__PURE__ */
|
13
|
-
|
2
|
+
import { memo as i } from "react";
|
3
|
+
import S from "../../../assets/illustrations/streak-green.svg.js";
|
4
|
+
import l from "../../../assets/illustrations/streak-white.svg.js";
|
5
|
+
import c from "../text/text.js";
|
6
|
+
import { BLINK_DURATION as k, BLINK_DELAY as p } from "./constants.js";
|
7
|
+
import { StreakWrapper as s, StreakStaticBg as f, StreakBg as d, StreakContent as I, StreakImg as $, StyledImg as o } from "./streak-icon-styled.js";
|
8
|
+
const g = i(
|
9
|
+
({ value: a, blink: t = !1, isInteractive: m = !0, ...n }) => /* @__PURE__ */ e(s, { isInteractive: m, ...n, children: [
|
10
|
+
/* @__PURE__ */ r(f, {}),
|
11
|
+
t && /* @__PURE__ */ r(d, { $blinkDuration: k, $blinkDelay: p }),
|
12
|
+
/* @__PURE__ */ e(I, { children: [
|
13
|
+
/* @__PURE__ */ r($, { children: t ? /* @__PURE__ */ r(o, { src: l, alt: "Streak" }) : /* @__PURE__ */ r(o, { src: S, alt: "Streak" }) }),
|
14
|
+
/* @__PURE__ */ r(c, { $renderAs: "ab3-bold", $color: "WHITE", $align: "center", children: a })
|
15
|
+
] })
|
14
16
|
] })
|
15
|
-
|
17
|
+
), G = g;
|
16
18
|
export {
|
17
|
-
|
18
|
-
|
19
|
+
g as StreakIcon,
|
20
|
+
G as default
|
19
21
|
};
|
20
22
|
//# sourceMappingURL=streak-icon.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"streak-icon.js","sources":["../../../../src/features/ui/streak-icon/streak-icon.tsx"],"sourcesContent":["import type { IStreakIconProps } from './streak-icon-types';\n\nimport React, { memo } from 'react';\n\nimport StreakGreenSVG from '../../../assets/illustrations/streak-green.svg';\nimport StreakWhiteSVG from '../../../assets/illustrations/streak-white.svg';\nimport Text from '../text/text';\nimport { BLINK_DELAY, BLINK_DURATION } from './constants';\nimport * as S from './streak-icon-styled';\n\nexport const StreakIcon: React.FC<IStreakIconProps> = memo(({ value, blink = false, ...rest }) => {\n
|
1
|
+
{"version":3,"file":"streak-icon.js","sources":["../../../../src/features/ui/streak-icon/streak-icon.tsx"],"sourcesContent":["import type { IStreakIconProps } from './streak-icon-types';\n\nimport React, { memo } from 'react';\n\nimport StreakGreenSVG from '../../../assets/illustrations/streak-green.svg';\nimport StreakWhiteSVG from '../../../assets/illustrations/streak-white.svg';\nimport Text from '../text/text';\nimport { BLINK_DELAY, BLINK_DURATION } from './constants';\nimport * as S from './streak-icon-styled';\n\nexport const StreakIcon: React.FC<IStreakIconProps> = memo(\n ({ value, blink = false, isInteractive = true, ...rest }) => {\n return (\n <S.StreakWrapper isInteractive={isInteractive} {...rest}>\n <S.StreakStaticBg />\n {blink && <S.StreakBg $blinkDuration={BLINK_DURATION} $blinkDelay={BLINK_DELAY} />}\n <S.StreakContent>\n <S.StreakImg>\n {blink ? (\n <S.StyledImg src={StreakWhiteSVG} alt=\"Streak\" />\n ) : (\n <S.StyledImg src={StreakGreenSVG} alt=\"Streak\" />\n )}\n </S.StreakImg>\n <Text $renderAs=\"ab3-bold\" $color=\"WHITE\" $align=\"center\">\n {value}\n </Text>\n </S.StreakContent>\n </S.StreakWrapper>\n );\n },\n);\n\nexport default StreakIcon;\n"],"names":["StreakIcon","memo","value","blink","isInteractive","rest","S.StreakWrapper","jsx","S.StreakStaticBg","S.StreakBg","BLINK_DURATION","BLINK_DELAY","jsxs","S.StreakContent","S.StreakImg","S.StyledImg","StreakWhiteSVG","StreakGreenSVG","Text","StreakIcon$1"],"mappings":";;;;;;;AAUO,MAAMA,IAAyCC;AAAA,EACpD,CAAC,EAAE,OAAAC,GAAO,OAAAC,IAAQ,IAAO,eAAAC,IAAgB,IAAM,GAAGC,0BAE7CC,GAAA,EAAgB,eAAAF,GAA+B,GAAGC,GACjD,UAAA;AAAA,IAAC,gBAAAE,EAAAC,GAAA,EAAiB;AAAA,IACjBL,uBAAUM,GAAA,EAAW,gBAAgBC,GAAgB,aAAaC,GAAa;AAAA,IAChF,gBAAAC,EAACC,GAAA,EACC,UAAA;AAAA,MAAC,gBAAAN,EAAAO,GAAA,EACE,UAAAX,sBACEY,GAAA,EAAY,KAAKC,GAAgB,KAAI,UAAS,sBAE9CD,GAAA,EAAY,KAAKE,GAAgB,KAAI,SAAS,CAAA,GAEnD;AAAA,MACA,gBAAAV,EAACW,KAAK,WAAU,YAAW,QAAO,SAAQ,QAAO,UAC9C,UACHhB,EAAA,CAAA;AAAA,IAAA,GACF;AAAA,EACF,EAAA,CAAA;AAGN,GAEAiB,IAAenB;"}
|
@@ -1,50 +1,54 @@
|
|
1
|
-
import
|
2
|
-
|
1
|
+
import { useMemo as C } from "react";
|
2
|
+
import F from "styled-components";
|
3
|
+
import { EDeviceType as y } from "../theme/constants.js";
|
4
|
+
const $ = F.div(
|
3
5
|
({
|
4
|
-
theme:
|
5
|
-
$renderAs:
|
6
|
+
theme: g,
|
7
|
+
$renderAs: t,
|
6
8
|
$color: n,
|
7
|
-
$align:
|
8
|
-
$width:
|
9
|
-
$widthX:
|
10
|
-
$marginBottom:
|
11
|
-
$marginBottomX:
|
9
|
+
$align: T = "left",
|
10
|
+
$width: e,
|
11
|
+
$widthX: f,
|
12
|
+
$marginBottom: o,
|
13
|
+
$marginBottomX: r,
|
12
14
|
$alignSelf: l,
|
13
|
-
$opacity:
|
14
|
-
$inline:
|
15
|
-
$textDecoration:
|
16
|
-
$whiteSpace:
|
15
|
+
$opacity: b = 1,
|
16
|
+
$inline: v,
|
17
|
+
$textDecoration: x,
|
18
|
+
$whiteSpace: a,
|
19
|
+
$renderOnMobileAs: c,
|
20
|
+
$renderOnTabletAs: i
|
17
21
|
}) => {
|
18
|
-
const { text:
|
19
|
-
fontFamily:
|
20
|
-
fontSize:
|
21
|
-
lineHeight:
|
22
|
+
const { text: E, colors: m, layout: u, device: p } = g, L = C(() => p <= y.MOBILE ? c || i || t : p <= y.TABLET && i || t, [p, t, c, i]), {
|
23
|
+
fontFamily: h,
|
24
|
+
fontSize: k,
|
25
|
+
lineHeight: z,
|
22
26
|
letterSpacing: s,
|
23
|
-
textTransform:
|
24
|
-
} =
|
27
|
+
textTransform: d = "none"
|
28
|
+
} = E[L];
|
25
29
|
return `
|
26
|
-
display: ${
|
27
|
-
font-family: ${
|
28
|
-
font-size: ${
|
29
|
-
text-align: ${
|
30
|
-
line-height: ${
|
31
|
-
text-transform: ${
|
30
|
+
display: ${v ? "inline-block" : "block"};
|
31
|
+
font-family: ${h};
|
32
|
+
font-size: ${k}px;
|
33
|
+
text-align: ${T};
|
34
|
+
line-height: ${z}px;
|
35
|
+
text-transform: ${d};
|
32
36
|
${typeof s == "number" ? `letter-spacing: ${s}px;` : ""}
|
33
|
-
color: ${n ?
|
34
|
-
opacity: ${
|
35
|
-
width: ${
|
36
|
-
${
|
37
|
-
margin-bottom: ${
|
38
|
-
${
|
37
|
+
color: ${n ? m[n] : m.BLACK};
|
38
|
+
opacity: ${b};
|
39
|
+
width: ${e ? `${e}` : "auto"}${typeof e == "number" ? "px" : ""};
|
40
|
+
${f ? `width: ${f * u.gutter}px;` : ""}
|
41
|
+
margin-bottom: ${o ? `${o}` : "initial"}${typeof o == "number" ? "px" : ""};
|
42
|
+
${r ? `margin-bottom: ${r * u.gutter}px;` : ""}
|
39
43
|
${l ? `align-self: ${l};` : ""}
|
40
|
-
${
|
41
|
-
${
|
44
|
+
${x ? `text-decoration: ${x};` : ""}
|
45
|
+
${a ? `white-space: ${a};` : ""}
|
42
46
|
`;
|
43
47
|
}
|
44
48
|
);
|
45
|
-
|
46
|
-
const
|
49
|
+
$.displayName = "Text";
|
50
|
+
const M = $;
|
47
51
|
export {
|
48
|
-
|
52
|
+
M as default
|
49
53
|
};
|
50
54
|
//# sourceMappingURL=text.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"text.js","sources":["../../../../src/features/ui/text/text.tsx"],"sourcesContent":["import type { TColorNames, TTextVariants } from '../types';\n\nimport styled from 'styled-components';\n\nexport interface TextProps {\n $renderAs: TTextVariants;\n $color?: TColorNames;\n $align?: 'auto' | 'left' | 'right' | 'center' | 'justify';\n $alignSelf?: 'auto' | 'flex-start' | 'flex-end' | 'center' | 'baseline' | 'stretch';\n $opacity?: number | undefined;\n $width?: number | string;\n $widthX?: number;\n $marginBottom?: number;\n $marginBottomX?: number;\n $inline?: boolean;\n $textDecoration?: string;\n $whiteSpace?: 'pre-line' | 'normal' | 'pre-wrap' | 'no-wrap' | 'pre' | 'break-spaces';\n}\n\n/**\n * @param $renderAs - The text variant to render as (ah1-ah4, ab1-ab3, ac1-ac4, ub1-ub3), anything else is deprecated\n */\nconst Text = styled.div<TextProps>(\n ({\n theme,\n $renderAs,\n $color,\n $align = 'left',\n $width,\n $widthX,\n $marginBottom,\n $marginBottomX,\n $alignSelf,\n $opacity = 1,\n $inline,\n $textDecoration,\n $whiteSpace,\n }) => {\n const { text, colors, layout } = theme;\n const {\n fontFamily,\n fontSize,\n lineHeight,\n letterSpacing,\n textTransform = 'none',\n } = text[
|
1
|
+
{"version":3,"file":"text.js","sources":["../../../../src/features/ui/text/text.tsx"],"sourcesContent":["import type { TColorNames, TTextVariants } from '../types';\n\nimport { useMemo } from 'react';\nimport styled from 'styled-components';\n\nimport { EDeviceType } from '../theme/constants';\n\nexport interface TextProps {\n $renderAs: TTextVariants;\n $color?: TColorNames;\n $align?: 'auto' | 'left' | 'right' | 'center' | 'justify';\n $alignSelf?: 'auto' | 'flex-start' | 'flex-end' | 'center' | 'baseline' | 'stretch';\n $opacity?: number | undefined;\n $width?: number | string;\n $widthX?: number;\n $marginBottom?: number;\n $marginBottomX?: number;\n $inline?: boolean;\n $textDecoration?: string;\n $whiteSpace?: 'pre-line' | 'normal' | 'pre-wrap' | 'no-wrap' | 'pre' | 'break-spaces';\n $renderOnMobileAs?: TTextVariants;\n $renderOnTabletAs?: TTextVariants;\n}\n\n/**\n * @param $renderAs (fallback for any device), @param $renderOnMobileAs, @param $renderOnTabletAs - The text variant to render as (ah1-ah4, ab1-ab3, ac1-ac4, ub1-ub3), anything else is deprecated\n */\nconst Text = styled.div<TextProps>(\n ({\n theme,\n $renderAs,\n $color,\n $align = 'left',\n $width,\n $widthX,\n $marginBottom,\n $marginBottomX,\n $alignSelf,\n $opacity = 1,\n $inline,\n $textDecoration,\n $whiteSpace,\n $renderOnMobileAs,\n $renderOnTabletAs,\n }) => {\n const { text, colors, layout, device } = theme;\n const renderAs = useMemo(() => {\n if (device <= EDeviceType.MOBILE) {\n return $renderOnMobileAs || $renderOnTabletAs || $renderAs;\n }\n\n if (device <= EDeviceType.TABLET) {\n return $renderOnTabletAs || $renderAs;\n }\n\n return $renderAs;\n }, [device, $renderAs, $renderOnMobileAs, $renderOnTabletAs]);\n\n const {\n fontFamily,\n fontSize,\n lineHeight,\n letterSpacing,\n textTransform = 'none',\n } = text[renderAs];\n\n return `\n display: ${$inline ? 'inline-block' : 'block'};\n font-family: ${fontFamily};\n font-size: ${fontSize}px;\n text-align: ${$align};\n line-height: ${lineHeight}px;\n text-transform: ${textTransform};\n ${typeof letterSpacing === 'number' ? `letter-spacing: ${letterSpacing}px;` : ''}\n color: ${$color ? colors[$color] : colors.BLACK};\n opacity: ${$opacity};\n width: ${$width ? `${$width}` : 'auto'}${typeof $width === 'number' ? 'px' : ''};\n ${$widthX ? `width: ${$widthX * layout.gutter}px;` : ''}\n margin-bottom: ${$marginBottom ? `${$marginBottom}` : 'initial'}${\n typeof $marginBottom === 'number' ? 'px' : ''\n };\n ${$marginBottomX ? `margin-bottom: ${$marginBottomX * layout.gutter}px;` : ''}\n ${$alignSelf ? `align-self: ${$alignSelf};` : ''}\n ${$textDecoration ? `text-decoration: ${$textDecoration};` : ''}\n ${$whiteSpace ? `white-space: ${$whiteSpace};` : ''}\n `;\n },\n);\n\nText.displayName = 'Text';\n\nexport default Text;\n"],"names":["Text","styled","theme","$renderAs","$color","$align","$width","$widthX","$marginBottom","$marginBottomX","$alignSelf","$opacity","$inline","$textDecoration","$whiteSpace","$renderOnMobileAs","$renderOnTabletAs","text","colors","layout","device","renderAs","useMemo","EDeviceType","fontFamily","fontSize","lineHeight","letterSpacing","textTransform","Text$1"],"mappings":";;;AA2BA,MAAMA,IAAOC,EAAO;AAAA,EAClB,CAAC;AAAA,IACC,OAAAC;AAAA,IACA,WAAAC;AAAA,IACA,QAAAC;AAAA,IACA,QAAAC,IAAS;AAAA,IACT,QAAAC;AAAA,IACA,SAAAC;AAAA,IACA,eAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,UAAAC,IAAW;AAAA,IACX,SAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,mBAAAC;AAAA,EAAA,MACI;AACJ,UAAM,EAAE,MAAAC,GAAM,QAAAC,GAAQ,QAAAC,GAAQ,QAAAC,MAAWlB,GACnCmB,IAAWC,EAAQ,MACnBF,KAAUG,EAAY,SACjBR,KAAqBC,KAAqBb,IAG/CiB,KAAUG,EAAY,UACjBP,KAAqBb,GAI7B,CAACiB,GAAQjB,GAAWY,GAAmBC,CAAiB,CAAC,GAEtD;AAAA,MACJ,YAAAQ;AAAA,MACA,UAAAC;AAAA,MACA,YAAAC;AAAA,MACA,eAAAC;AAAA,MACA,eAAAC,IAAgB;AAAA,IAAA,IACdX,EAAKI,CAAQ;AAEV,WAAA;AAAA,iBACMT,IAAU,iBAAiB,OAAO;AAAA,qBAC9BY,CAAU;AAAA,mBACZC,CAAQ;AAAA,oBACPpB,CAAM;AAAA,qBACLqB,CAAU;AAAA,wBACPE,CAAa;AAAA,QAC7B,OAAOD,KAAkB,WAAW,mBAAmBA,CAAa,QAAQ,EAAE;AAAA,eACvEvB,IAASc,EAAOd,CAAM,IAAIc,EAAO,KAAK;AAAA,iBACpCP,CAAQ;AAAA,eACVL,IAAS,GAAGA,CAAM,KAAK,MAAM,GAAG,OAAOA,KAAW,WAAW,OAAO,EAAE;AAAA,QAC7EC,IAAU,UAAUA,IAAUY,EAAO,MAAM,QAAQ,EAAE;AAAA,uBACtCX,IAAgB,GAAGA,CAAa,KAAK,SAAS,GAC7D,OAAOA,KAAkB,WAAW,OAAO,EAC7C;AAAA,QACEC,IAAiB,kBAAkBA,IAAiBU,EAAO,MAAM,QAAQ,EAAE;AAAA,QAC3ET,IAAa,eAAeA,CAAU,MAAM,EAAE;AAAA,QAC9CG,IAAkB,oBAAoBA,CAAe,MAAM,EAAE;AAAA,QAC7DC,IAAc,gBAAgBA,CAAW,MAAM,EAAE;AAAA;AAAA,EAEvD;AACF;AAEAd,EAAK,cAAc;AAEnB,MAAA6B,IAAe7B;"}
|
@@ -1,11 +1,13 @@
|
|
1
|
-
const
|
1
|
+
const A = {
|
2
2
|
tablet: 760,
|
3
3
|
smallDesktop: 920,
|
4
4
|
desktop: 1072,
|
5
5
|
largeDevice: 1232,
|
6
6
|
xlargeDevice: 1424
|
7
7
|
};
|
8
|
+
var E = /* @__PURE__ */ ((L) => (L[L.MOBILE = 0] = "MOBILE", L[L.TABLET = 1] = "TABLET", L[L.SMALL_DESKTOP = 2] = "SMALL_DESKTOP", L[L.DESKTOP = 3] = "DESKTOP", L[L.LARGE_DEVICE = 4] = "LARGE_DEVICE", L[L.XLARGE_DEVICE = 5] = "XLARGE_DEVICE", L))(E || {});
|
8
9
|
export {
|
9
|
-
|
10
|
+
A as BREAKPOINTS,
|
11
|
+
E as EDeviceType
|
10
12
|
};
|
11
13
|
//# sourceMappingURL=constants.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["../../../../src/features/ui/theme/constants.ts"],"sourcesContent":["export const BREAKPOINTS = {\n tablet: 760,\n smallDesktop: 920,\n desktop: 1072,\n largeDevice: 1232,\n xlargeDevice: 1424,\n};\n"],"names":["BREAKPOINTS"],"mappings":"AAAO,MAAMA,IAAc;AAAA,EACzB,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,SAAS;AAAA,EACT,aAAa;AAAA,EACb,cAAc;AAChB;"}
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../src/features/ui/theme/constants.ts"],"sourcesContent":["export const BREAKPOINTS = {\n tablet: 760,\n smallDesktop: 920,\n desktop: 1072,\n largeDevice: 1232,\n xlargeDevice: 1424,\n};\n\nexport enum EDeviceType {\n MOBILE = 0,\n TABLET = 1,\n SMALL_DESKTOP = 2,\n DESKTOP = 3,\n LARGE_DEVICE = 4,\n XLARGE_DEVICE = 5,\n}\n"],"names":["BREAKPOINTS","EDeviceType"],"mappings":"AAAO,MAAMA,IAAc;AAAA,EACzB,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,SAAS;AAAA,EACT,aAAa;AAAA,EACb,cAAc;AAChB;AAEY,IAAAC,sBAAAA,OACVA,EAAAA,EAAA,SAAS,CAAT,IAAA,UACAA,EAAAA,EAAA,SAAS,CAAT,IAAA,UACAA,EAAAA,EAAA,gBAAgB,CAAhB,IAAA,iBACAA,EAAAA,EAAA,UAAU,CAAV,IAAA,WACAA,EAAAA,EAAA,eAAe,CAAf,IAAA,gBACAA,EAAAA,EAAA,gBAAgB,CAAhB,IAAA,iBANUA,IAAAA,KAAA,CAAA,CAAA;"}
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { BREAKPOINTS as
|
2
|
-
const
|
1
|
+
import { BREAKPOINTS as E, EDeviceType as e } from "./constants.js";
|
2
|
+
const D = (r) => r >= E.xlargeDevice ? e.XLARGE_DEVICE : r >= E.largeDevice ? e.LARGE_DEVICE : r >= E.smallDesktop ? e.SMALL_DESKTOP : r >= E.desktop ? e.DESKTOP : r >= E.tablet ? e.TABLET : e.MOBILE;
|
3
3
|
export {
|
4
|
-
|
4
|
+
D as getDevice
|
5
5
|
};
|
6
6
|
//# sourceMappingURL=get-device.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"get-device.js","sources":["../../../../src/features/ui/theme/get-device.ts"],"sourcesContent":["import
|
1
|
+
{"version":3,"file":"get-device.js","sources":["../../../../src/features/ui/theme/get-device.ts"],"sourcesContent":["import { BREAKPOINTS, EDeviceType } from './constants';\n\nexport const getDevice = (width: number): EDeviceType => {\n if (width >= BREAKPOINTS.xlargeDevice) return EDeviceType.XLARGE_DEVICE;\n\n if (width >= BREAKPOINTS.largeDevice) return EDeviceType.LARGE_DEVICE;\n\n if (width >= BREAKPOINTS.smallDesktop) return EDeviceType.SMALL_DESKTOP;\n\n if (width >= BREAKPOINTS.desktop) return EDeviceType.DESKTOP;\n\n if (width >= BREAKPOINTS.tablet) return EDeviceType.TABLET;\n\n return EDeviceType.MOBILE;\n};\n"],"names":["getDevice","width","BREAKPOINTS","EDeviceType"],"mappings":";AAEa,MAAAA,IAAY,CAACC,MACpBA,KAASC,EAAY,eAAqBC,EAAY,gBAEtDF,KAASC,EAAY,cAAoBC,EAAY,eAErDF,KAASC,EAAY,eAAqBC,EAAY,gBAEtDF,KAASC,EAAY,UAAgBC,EAAY,UAEjDF,KAASC,EAAY,SAAeC,EAAY,SAE7CA,EAAY;"}
|
@@ -1,22 +1,22 @@
|
|
1
|
-
const t = 792, e = 1008, s = 30, T = 32, n = 28, I = 48,
|
1
|
+
const t = 792, e = 1008, s = 30, T = 32, n = 28, I = 48, a = 42, c = 16, E = 56, _ = 0, o = 52, O = { left: 0, top: 56 }, N = [
|
2
2
|
"practice-basic-optional",
|
3
3
|
"practice-regular-optional",
|
4
4
|
"advanced-we-do",
|
5
5
|
"advanced-your-turn",
|
6
6
|
"advanced-explore",
|
7
7
|
"advanced-practice"
|
8
|
-
],
|
8
|
+
], R = 2e3, S = [
|
9
9
|
{ name: "CORRECT", url: "https://static.qumath.in/static/intel-student/cmpress/correct-zap.mp3" },
|
10
10
|
{
|
11
11
|
name: "INCORRECT",
|
12
12
|
url: "https://static.qumath.in/static/intel-student/cmpress/incorrect-zap.mp3"
|
13
13
|
}
|
14
|
-
],
|
14
|
+
], A = [
|
15
15
|
{
|
16
16
|
name: "VALIDATE",
|
17
17
|
url: "https://wmznlejcfq.s3.ap-southeast-1.amazonaws.com/static/intel-student/cmpress/validate-zap.mp3"
|
18
18
|
}
|
19
|
-
],
|
19
|
+
], i = [
|
20
20
|
{
|
21
21
|
label: "Answered all the questions independently.",
|
22
22
|
id: "E"
|
@@ -31,21 +31,20 @@ const t = 792, e = 1008, s = 30, T = 32, n = 28, I = 48, E = 42, c = 16, a = 56,
|
|
31
31
|
}
|
32
32
|
];
|
33
33
|
export {
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
34
|
+
E as ACTION_BAR_HEIGHT,
|
35
|
+
R as CLOZE_FORMULA_RESPONSE_LIMIT,
|
36
|
+
O as DESMOS_CALC_POSITION,
|
37
|
+
i as EXIT_TICKET_RATING_OPTIONS,
|
38
38
|
s as INTERSECTION_OBSERVER_THRESHOLD_POINTS,
|
39
39
|
T as INTERSECTION_OBSERVER_THROTTLE_TIME,
|
40
|
-
|
41
|
-
R as OPTIONAL_ITEM_TYPES,
|
40
|
+
N as OPTIONAL_ITEM_TYPES,
|
42
41
|
c as QUESTIONS_GAP,
|
43
42
|
t as QUESTION_WIDTH,
|
44
|
-
|
43
|
+
o as SIDEBAR_WIDTH,
|
45
44
|
e as SPLIT_QUESTION_WIDTH,
|
46
45
|
S as SYSTEM_VALIDATION_AUDIO_LIST,
|
47
|
-
|
48
|
-
|
46
|
+
A as TEACHER_VALIDATION_AUDIO_LIST,
|
47
|
+
a as TOP_NAVIGATION_ARROW_WIDTH,
|
49
48
|
I as TOP_NAVIGATION_HEIGHT,
|
50
49
|
_ as WORKSHEET_CONTAINER_BORDER_RADIUS,
|
51
50
|
n as WORKSHEET_NUDGE_BANNER_HEIGHT
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["../../../../src/features/worksheet/worksheet/constants.ts"],"sourcesContent":["import type { QUESTIONS_RATING, TItemType } from './worksheet-types';\n\nexport const QUESTION_WIDTH = 792;\nexport const SPLIT_QUESTION_WIDTH = 1008; // 1024 - 16\nexport const INTERSECTION_OBSERVER_THRESHOLD_POINTS = 30;\nexport const INTERSECTION_OBSERVER_THROTTLE_TIME = 32; // in ms, 2 frames\nexport const WORKSHEET_NUDGE_BANNER_HEIGHT = 28;\n\nexport const TOP_NAVIGATION_HEIGHT = 48;\nexport const TOP_NAVIGATION_ARROW_WIDTH = 42;\n\nexport const QUESTIONS_GAP = 16;\nexport const ACTION_BAR_HEIGHT = 56;\nexport const WORKSHEET_CONTAINER_BORDER_RADIUS = 0;\nexport const
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../src/features/worksheet/worksheet/constants.ts"],"sourcesContent":["import type { QUESTIONS_RATING, TItemType } from './worksheet-types';\n\nexport const QUESTION_WIDTH = 792;\nexport const SPLIT_QUESTION_WIDTH = 1008; // 1024 - 16\nexport const INTERSECTION_OBSERVER_THRESHOLD_POINTS = 30;\nexport const INTERSECTION_OBSERVER_THROTTLE_TIME = 32; // in ms, 2 frames\nexport const WORKSHEET_NUDGE_BANNER_HEIGHT = 28;\n\nexport const TOP_NAVIGATION_HEIGHT = 48;\nexport const TOP_NAVIGATION_ARROW_WIDTH = 42;\n\nexport const QUESTIONS_GAP = 16;\nexport const ACTION_BAR_HEIGHT = 56;\nexport const WORKSHEET_CONTAINER_BORDER_RADIUS = 0;\nexport const SIDEBAR_WIDTH = 52;\n\nexport const DESMOS_CALC_POSITION = { left: 0, top: 56 };\n\nexport const OPTIONAL_ITEM_TYPES: TItemType[] = [\n 'practice-basic-optional',\n 'practice-regular-optional',\n 'advanced-we-do',\n 'advanced-your-turn',\n 'advanced-explore',\n 'advanced-practice',\n];\nexport const CLOZE_FORMULA_RESPONSE_LIMIT = 2000;\n\nexport const SYSTEM_VALIDATION_AUDIO_LIST = [\n { name: 'CORRECT', url: 'https://static.qumath.in/static/intel-student/cmpress/correct-zap.mp3' },\n {\n name: 'INCORRECT',\n url: 'https://static.qumath.in/static/intel-student/cmpress/incorrect-zap.mp3',\n },\n];\nexport const TEACHER_VALIDATION_AUDIO_LIST = [\n {\n name: 'VALIDATE',\n url: 'https://wmznlejcfq.s3.ap-southeast-1.amazonaws.com/static/intel-student/cmpress/validate-zap.mp3',\n },\n];\n\nexport const EXIT_TICKET_RATING_OPTIONS: Array<{\n label: string;\n id: keyof typeof QUESTIONS_RATING;\n}> = [\n {\n label: 'Answered all the questions independently.',\n id: 'E',\n },\n {\n label: 'Needed some help to answer the questions.',\n id: 'S',\n },\n {\n label: 'Needed a lot of help to answer the questions.',\n id: 'H',\n },\n];\n"],"names":["QUESTION_WIDTH","SPLIT_QUESTION_WIDTH","INTERSECTION_OBSERVER_THRESHOLD_POINTS","INTERSECTION_OBSERVER_THROTTLE_TIME","WORKSHEET_NUDGE_BANNER_HEIGHT","TOP_NAVIGATION_HEIGHT","TOP_NAVIGATION_ARROW_WIDTH","QUESTIONS_GAP","ACTION_BAR_HEIGHT","WORKSHEET_CONTAINER_BORDER_RADIUS","SIDEBAR_WIDTH","DESMOS_CALC_POSITION","OPTIONAL_ITEM_TYPES","CLOZE_FORMULA_RESPONSE_LIMIT","SYSTEM_VALIDATION_AUDIO_LIST","TEACHER_VALIDATION_AUDIO_LIST","EXIT_TICKET_RATING_OPTIONS"],"mappings":"AAEO,MAAMA,IAAiB,KACjBC,IAAuB,MACvBC,IAAyC,IACzCC,IAAsC,IACtCC,IAAgC,IAEhCC,IAAwB,IACxBC,IAA6B,IAE7BC,IAAgB,IAChBC,IAAoB,IACpBC,IAAoC,GACpCC,IAAgB,IAEhBC,IAAuB,EAAE,MAAM,GAAG,KAAK,GAAG,GAE1CC,IAAmC;AAAA,EAC9C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GACaC,IAA+B,KAE/BC,IAA+B;AAAA,EAC1C,EAAE,MAAM,WAAW,KAAK,wEAAwE;AAAA,EAChG;AAAA,IACE,MAAM;AAAA,IACN,KAAK;AAAA,EACP;AACF,GACaC,IAAgC;AAAA,EAC3C;AAAA,IACE,MAAM;AAAA,IACN,KAAK;AAAA,EACP;AACF,GAEaC,IAGR;AAAA,EACH;AAAA,IACE,OAAO;AAAA,IACP,IAAI;AAAA,EACN;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,IAAI;AAAA,EACN;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,IAAI;AAAA,EACN;AACF;"}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { useMemo as p, useEffect as m } from "react";
|
2
|
+
import { usePuzzleAttemptJourney as c } from "../../../journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js";
|
3
|
+
import { usePuzzleReviewJourney as f } from "../../../journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js";
|
4
|
+
import { usePuzzleUnassignJourney as l } from "../../../journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js";
|
5
|
+
import { useJourney as P } from "../../../journey/use-journey/use-journey.js";
|
6
|
+
const C = ({ behavior: a }) => {
|
7
|
+
const { maximumAttempts: e, canStartJourney: t } = a, { isJourneyActive: r, clearJourney: o } = P(), { puzzleAttemptCtaRef: i, startJourney: u } = c(), { puzzleReviewCtaRef: y, startJourney: n } = f(), { puzzleUnassignRef: J, startJourney: s } = l(), z = p(() => e === -2, [e]);
|
8
|
+
return m(() => {
|
9
|
+
z && t && !r && (u(), n(), s());
|
10
|
+
}, [
|
11
|
+
t,
|
12
|
+
r,
|
13
|
+
z,
|
14
|
+
u,
|
15
|
+
n,
|
16
|
+
s
|
17
|
+
]), m(() => () => {
|
18
|
+
o();
|
19
|
+
}, [o]), {
|
20
|
+
puzzleAttemptCtaRef: i,
|
21
|
+
puzzleReviewCtaRef: y,
|
22
|
+
puzzleUnassignRef: J
|
23
|
+
};
|
24
|
+
};
|
25
|
+
export {
|
26
|
+
C as useWorksheetJourney
|
27
|
+
};
|
28
|
+
//# sourceMappingURL=use-worksheet-journey.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"use-worksheet-journey.js","sources":["../../../../../src/features/worksheet/worksheet/hooks/use-worksheet-journey.ts"],"sourcesContent":["import type { IWorksheetBehavior } from '../worksheet-types';\n\nimport { useEffect, useMemo } from 'react';\n\nimport { usePuzzleAttemptJourney } from '../../../journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey';\nimport { usePuzzleReviewJourney } from '../../../journey/hooks/use-puzzles-journey/use-puzzle-review-journey';\nimport { usePuzzleUnassignJourney } from '../../../journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey';\nimport { useJourney } from '../../../journey/use-journey/use-journey';\n\ninterface IUseWorksheetJourney {\n behavior: IWorksheetBehavior;\n}\n\nconst useWorksheetJourney = ({ behavior }: IUseWorksheetJourney) => {\n const { maximumAttempts, canStartJourney } = behavior;\n\n const { isJourneyActive, clearJourney } = useJourney();\n\n const { puzzleAttemptCtaRef, startJourney: startPuzzleAttemptJourney } =\n usePuzzleAttemptJourney();\n\n const { puzzleReviewCtaRef, startJourney: startPuzzleReviewJourney } = usePuzzleReviewJourney();\n const { puzzleUnassignRef, startJourney: startPuzzleUnassignJourney } =\n usePuzzleUnassignJourney();\n\n const isPuzzleCard = useMemo(() => maximumAttempts === -2, [maximumAttempts]);\n\n useEffect(() => {\n if (isPuzzleCard && canStartJourney && !isJourneyActive) {\n //* This will be triggered by STUDENT during resume sheet.\n startPuzzleAttemptJourney();\n //* This will be triggered by TEACHER during review sheet\n startPuzzleReviewJourney();\n //* This will be trigger by TEACHER during preview sheet.\n startPuzzleUnassignJourney();\n }\n }, [\n canStartJourney,\n isJourneyActive,\n isPuzzleCard,\n startPuzzleAttemptJourney,\n startPuzzleReviewJourney,\n startPuzzleUnassignJourney,\n ]);\n\n useEffect(() => {\n return () => {\n clearJourney();\n };\n }, [clearJourney]);\n\n return {\n puzzleAttemptCtaRef,\n puzzleReviewCtaRef,\n puzzleUnassignRef,\n };\n};\n\nexport { useWorksheetJourney };\n"],"names":["useWorksheetJourney","behavior","maximumAttempts","canStartJourney","isJourneyActive","clearJourney","useJourney","puzzleAttemptCtaRef","startPuzzleAttemptJourney","usePuzzleAttemptJourney","puzzleReviewCtaRef","startPuzzleReviewJourney","usePuzzleReviewJourney","puzzleUnassignRef","startPuzzleUnassignJourney","usePuzzleUnassignJourney","isPuzzleCard","useMemo","useEffect"],"mappings":";;;;;AAaA,MAAMA,IAAsB,CAAC,EAAE,UAAAC,QAAqC;AAC5D,QAAA,EAAE,iBAAAC,GAAiB,iBAAAC,EAAoB,IAAAF,GAEvC,EAAE,iBAAAG,GAAiB,cAAAC,EAAa,IAAIC,EAAW,GAE/C,EAAE,qBAAAC,GAAqB,cAAcC,MACzCC,EAAwB,GAEpB,EAAE,oBAAAC,GAAoB,cAAcC,MAA6BC,EAAuB,GACxF,EAAE,mBAAAC,GAAmB,cAAcC,MACvCC,EAAyB,GAErBC,IAAeC,EAAQ,MAAMf,MAAoB,IAAI,CAACA,CAAe,CAAC;AAE5E,SAAAgB,EAAU,MAAM;AACV,IAAAF,KAAgBb,KAAmB,CAACC,MAEZI,KAEDG,KAEEG;EAC7B,GACC;AAAA,IACDX;AAAA,IACAC;AAAA,IACAY;AAAA,IACAR;AAAA,IACAG;AAAA,IACAG;AAAA,EAAA,CACD,GAEDI,EAAU,MACD,MAAM;AACE,IAAAb;EAAA,GAEd,CAACA,CAAY,CAAC,GAEV;AAAA,IACL,qBAAAE;AAAA,IACA,oBAAAG;AAAA,IACA,mBAAAG;AAAA,EAAA;AAEJ;"}
|