@cuemath/leap 3.2.19-beta-0.1 → 3.2.19-link.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 -6
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/line-icons/icons/star3.js +32 -0
- package/dist/assets/line-icons/icons/star3.js.map +1 -0
- package/dist/assets/lottie/lottie.js +0 -5
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/features/analytics-events/platform-events-student.js +1 -2
- package/dist/features/analytics-events/platform-events-student.js.map +1 -1
- package/dist/features/analytics-events/platform-events-teacher.js +4 -6
- package/dist/features/analytics-events/platform-events-teacher.js.map +1 -1
- package/dist/features/analytics-events/whitelist-events.js +8 -10
- package/dist/features/analytics-events/whitelist-events.js.map +1 -1
- package/dist/features/chapters-v2/utils/node-card-utils.js +2 -2
- package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -1
- package/dist/features/communication/pub-sub/constants.js +4 -7
- package/dist/features/communication/pub-sub/constants.js.map +1 -1
- package/dist/features/homework/homework-card-view.js +97 -85
- package/dist/features/homework/homework-card-view.js.map +1 -1
- package/dist/features/homework/homework-card.js +42 -44
- package/dist/features/homework/homework-card.js.map +1 -1
- package/dist/features/homework/hw-card-list/hw-card-list-view.js +29 -31
- 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 +48 -54
- package/dist/features/homework/hw-card-list/hw-card-list.js.map +1 -1
- package/dist/features/homework/utils.js +27 -33
- package/dist/features/homework/utils.js.map +1 -1
- package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js +11 -17
- package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js.map +1 -1
- package/dist/features/journey/journey-id/journey-id-student.js +1 -1
- package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
- package/dist/features/journey/journey-id/journey-id-teacher.js +2 -2
- package/dist/features/journey/journey-id/journey-id-teacher.js.map +1 -1
- package/dist/features/puzzles/app/puzzle-app-styled.js +6 -10
- package/dist/features/puzzles/app/puzzle-app-styled.js.map +1 -1
- package/dist/features/puzzles/comps/puzzle-card-styled.js +69 -24
- package/dist/features/puzzles/comps/puzzle-card-styled.js.map +1 -1
- package/dist/features/puzzles/comps/puzzle-card.js +30 -79
- package/dist/features/puzzles/comps/puzzle-card.js.map +1 -1
- package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js +25 -55
- package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js.map +1 -1
- package/dist/features/puzzles/puzzle-container/puzzle-container.js +107 -100
- package/dist/features/puzzles/puzzle-container/puzzle-container.js.map +1 -1
- 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 +13 -28
- package/dist/features/puzzles/utils/puzzle-pattern.js.map +1 -1
- package/dist/features/trial-session/comps/student-profile/student-profile.js +1 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro-styled.js +7 -50
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro-styled.js.map +1 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro.js +15 -69
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro.js.map +1 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.js +49 -0
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.js.map +1 -0
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js +64 -0
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js.map +1 -0
- package/dist/features/ui/accordion/accordion-items/accordion-items-styled.js +28 -0
- package/dist/features/ui/accordion/accordion-items/accordion-items-styled.js.map +1 -0
- package/dist/features/ui/accordion/accordion-items/accordion-items.js +83 -0
- package/dist/features/ui/accordion/accordion-items/accordion-items.js.map +1 -0
- package/dist/features/ui/accordion/accordion.js +62 -0
- package/dist/features/ui/accordion/accordion.js.map +1 -0
- package/dist/features/ui/inputs/base-input/base-input.js +11 -11
- package/dist/features/ui/inputs/base-input/base-input.js.map +1 -1
- package/dist/features/ui/inputs/text-input/text-input.js +19 -18
- package/dist/features/ui/inputs/text-input/text-input.js.map +1 -1
- package/dist/features/ui/modals/modal-styled.js +42 -8
- package/dist/features/ui/modals/modal-styled.js.map +1 -1
- package/dist/features/ui/modals/modal.js +37 -27
- package/dist/features/ui/modals/modal.js.map +1 -1
- package/dist/features/ui/text/text.js +31 -29
- package/dist/features/ui/text/text.js.map +1 -1
- package/dist/features/ui/theme/clrs.js +2 -0
- package/dist/features/ui/theme/clrs.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-helpers.js +19 -20
- package/dist/features/worksheet/worksheet/worksheet-helpers.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js +12 -16
- package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js +47 -101
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +146 -149
- 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 +207 -242
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-styled.js +37 -37
- 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 +313 -307
- 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 +35 -44
- package/dist/features/worksheet/worksheet-preview/worksheet-preview.js.map +1 -1
- package/dist/index.d.ts +71 -89
- package/dist/index.js +626 -626
- package/dist/static/puzzle-pattern-blue.f4bea1ee.svg +1 -0
- package/dist/static/puzzle-pattern-green.c9f84bbc.svg +1 -0
- package/dist/static/puzzle-pattern-orange.3da09665.svg +1 -0
- package/dist/static/puzzle-pattern-purple.5fb5a319.svg +1 -0
- package/dist/static/puzzle-pattern-yellow.aadbf457.svg +1 -0
- package/dist/static/stripe-blurple.6abf422f.svg +1 -0
- package/package.json +1 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js +0 -72
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js +0 -59
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js +0 -63
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js +0 -67
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js +0 -70
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js +0 -59
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js +0 -59
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js +0 -70
- package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js.map +0 -1
- package/dist/features/puzzles/api/puzzle-dashboard.js +0 -10
- package/dist/features/puzzles/api/puzzle-dashboard.js.map +0 -1
- package/dist/features/puzzles/constants/puzzle-container.js +0 -8
- package/dist/features/puzzles/constants/puzzle-container.js.map +0 -1
- package/dist/features/puzzles/puzzle-analytics-events.js +0 -11
- package/dist/features/puzzles/puzzle-analytics-events.js.map +0 -1
- package/dist/features/puzzles/puzzle-container/puzzle-container-view.js +0 -55
- package/dist/features/puzzles/puzzle-container/puzzle-container-view.js.map +0 -1
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js +0 -37
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js.map +0 -1
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js +0 -110
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js.map +0 -1
- package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js +0 -28
- package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js.map +0 -1
- package/dist/static/puzzle-blue-lottie.7017e2e8.json +0 -1
- package/dist/static/puzzle-blue-lottie.bf64ebc5.json +0 -12760
- package/dist/static/puzzle-dashboard-banner.b7956519.svg +0 -1
- package/dist/static/puzzle-green-lottie.1da90698.json +0 -1
- package/dist/static/puzzle-orange-lottie.cfcf3724.json +0 -1
- package/dist/static/puzzle-pattern-blue.abff0164.svg +0 -1
- package/dist/static/puzzle-pattern-green.b8ba1840.svg +0 -1
- package/dist/static/puzzle-pattern-orange.3f5a17ff.svg +0 -1
- package/dist/static/puzzle-pattern-purple.14b09759.svg +0 -1
- package/dist/static/puzzle-pattern-yellow.50917fab.svg +0 -1
- package/dist/static/puzzle-purple-lottie.e70de110.json +0 -9860
- package/dist/static/puzzle-yellow-lottie.275b5cf4.json +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"puzzle-app-styled.js","sources":["../../../../src/features/puzzles/app/puzzle-app-styled.tsx"],"sourcesContent":["import type { THueNames } from '../../ui/types';\n\nimport styled from 'styled-components';\n\nimport HintFillIcon from '../../../assets/line-icons/icons/hint-fill';\nimport FlexView from '../../ui/layout/flex-view';\nimport Text from '../../ui/text/text';\nimport { getPuzzleCardPattern } from '../utils/puzzle-pattern';\n\nconst PuzzleAppWrapper = styled(FlexView)<{ $visible: boolean }>(({ theme, $visible }) => {\n const { gutter } = theme.layout;\n\n if (!$visible) {\n return ``;\n }\n\n return `\n overflow: scroll;\n padding-top: ${gutter * 1.5}px;\n padding-bottom: ${gutter * 2}px;\n `;\n});\n\nconst PuzzleContainer = styled(FlexView)<{ $imageHue: THueNames; $backgroundOpacity?: number }>`\n position: relative;\n margin: 0 auto;\n box-shadow: inset 0px 0px 0px 4px ${({ theme, $imageHue }) => theme.colors[`${$imageHue}_4`]};\n max-width: 343px;\n width: 100%;\n min-height: max-content;\n\n &::before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-image: ${({ $imageHue }) => `url(${getPuzzleCardPattern($imageHue)})`};\n background-size: cover;\n opacity: 0.
|
1
|
+
{"version":3,"file":"puzzle-app-styled.js","sources":["../../../../src/features/puzzles/app/puzzle-app-styled.tsx"],"sourcesContent":["import type { THueNames } from '../../ui/types';\n\nimport styled from 'styled-components';\n\nimport HintFillIcon from '../../../assets/line-icons/icons/hint-fill';\nimport FlexView from '../../ui/layout/flex-view';\nimport Text from '../../ui/text/text';\nimport { getPuzzleCardPattern } from '../utils/puzzle-pattern';\n\nconst PuzzleAppWrapper = styled(FlexView)<{ $visible: boolean }>(({ theme, $visible }) => {\n const { gutter } = theme.layout;\n\n if (!$visible) {\n return ``;\n }\n\n return `\n overflow: scroll;\n padding-top: ${gutter * 1.5}px;\n padding-bottom: ${gutter * 2}px;\n `;\n});\n\nconst PuzzleContainer = styled(FlexView)<{ $imageHue: THueNames; $backgroundOpacity?: number }>`\n position: relative;\n margin: 0 auto;\n box-shadow: inset 0px 0px 0px 4px ${({ theme, $imageHue }) => theme.colors[`${$imageHue}_4`]};\n max-width: 343px;\n width: 100%;\n min-height: max-content;\n\n &::before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-image: ${({ $imageHue }) => `url(${getPuzzleCardPattern($imageHue)})`};\n background-size: cover;\n opacity: 0.2;\n }\n`;\n\nconst StyledHintFillIcon = styled(HintFillIcon)`\n color: ${({ theme }) => theme.colors.BLACK_1};\n\n & .hint-fill-icon-path {\n fill: ${({ theme }) => theme.colors.WHITE_1};\n }\n`;\n\nconst StyledFeedbackText = styled(Text)`\n & span {\n font-weight: 700;\n margin-right: 4px;\n }\n`;\n\nconst PuzzleQuestionWrapper = styled.div`\n color: ${({ theme }) => theme.colors.BLACK};\n font-size: 14px;\n line-height: 1.2;\n font-family: 'Athletics';\n\n font-weight: 400;\n font-style: normal;\n\n em {\n font-style: italic;\n }\n\n ul,\n ol {\n list-style-type: initial;\n padding-left: 32px;\n }\n\n ol {\n list-style-type: decimal;\n }\n\n p {\n margin: 0;\n }\n\n li {\n margin: 4px 0;\n }\n`;\n\nexport {\n PuzzleAppWrapper,\n PuzzleContainer,\n StyledFeedbackText,\n StyledHintFillIcon,\n PuzzleQuestionWrapper,\n};\n"],"names":["PuzzleAppWrapper","styled","FlexView","theme","$visible","gutter","PuzzleContainer","$imageHue","getPuzzleCardPattern","StyledHintFillIcon","HintFillIcon","StyledFeedbackText","Text","PuzzleQuestionWrapper"],"mappings":";;;;;AASM,MAAAA,IAAmBC,EAAOC,CAAQ,EAAyB,CAAC,EAAE,OAAAC,GAAO,UAAAC,QAAe;AAClF,QAAA,EAAE,QAAAC,EAAO,IAAIF,EAAM;AAEzB,SAAKC,IAIE;AAAA;AAAA,mBAEUC,IAAS,GAAG;AAAA,sBACTA,IAAS,CAAC;AAAA,MANrB;AAQX,CAAC,GAEKC,IAAkBL,EAAOC,CAAQ;AAAA;AAAA;AAAA,sCAGD,CAAC,EAAE,OAAAC,GAAO,WAAAI,QAAgBJ,EAAM,OAAO,GAAGI,CAAS,IAAI,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAYtE,CAAC,EAAE,WAAAA,EAAU,MAAM,OAAOC,EAAqBD,CAAS,CAAC,GAAG;AAAA;AAAA;AAAA;AAAA,GAM9EE,IAAqBR,EAAOS,CAAY;AAAA,WACnC,CAAC,EAAE,OAAAP,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA;AAAA,YAGlC,CAAC,EAAE,OAAAA,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA,GAIzCQ,IAAqBV,EAAOW,CAAI;AAAA;AAAA;AAAA;AAAA;AAAA,GAOhCC,IAAwBZ,EAAO;AAAA,WAC1B,CAAC,EAAE,OAAAE,EAAA,MAAYA,EAAM,OAAO,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
@@ -1,34 +1,79 @@
|
|
1
|
-
import e from "styled-components";
|
2
|
-
import
|
3
|
-
import
|
4
|
-
|
5
|
-
|
1
|
+
import e, { keyframes as a, css as r } from "styled-components";
|
2
|
+
import n from "../../ui/layout/flex-view.js";
|
3
|
+
import { getPuzzleCardPattern as l } from "../utils/puzzle-pattern.js";
|
4
|
+
const m = a`
|
5
|
+
from { transform: translateY(-100%); }
|
6
|
+
to { transform: translateY(0); }
|
7
|
+
`, o = a`
|
8
|
+
from { transform: rotateY(0deg); }
|
9
|
+
to { transform: rotateY(360deg); }
|
10
|
+
`, c = a`
|
11
|
+
from { transform: translateY(0); opacity: 1; }
|
12
|
+
to { transform: translateY(-100%); opacity: 0; }
|
13
|
+
`, d = e(n)`
|
6
14
|
position: relative;
|
7
|
-
cursor: pointer;
|
8
15
|
|
9
|
-
box-shadow: inset 0px 0px 0px 4px ${({ theme:
|
16
|
+
box-shadow: inset 0px 0px 0px 4px ${({ theme: t, $imageHue: i }) => t.colors[`${i}_4`]};
|
10
17
|
|
11
|
-
background-image: ${({ $imageHue:
|
18
|
+
background-image: ${({ $imageHue: t }) => `url(${l(t)})`};
|
12
19
|
background-size: cover;
|
13
20
|
|
14
|
-
|
15
|
-
|
21
|
+
${({ $animationPhase: t }) => t && r`
|
22
|
+
transform-style: preserve-3d;
|
23
|
+
opacity: 0;
|
24
|
+
visibility: hidden;
|
25
|
+
transform: translateY(-100%);
|
26
|
+
`}
|
27
|
+
|
28
|
+
${({ $animationPhase: t, theme: i, $imageHue: s }) => {
|
29
|
+
switch (t) {
|
30
|
+
case "movingIn":
|
31
|
+
return r`
|
32
|
+
visibility: visible;
|
33
|
+
opacity: 1;
|
34
|
+
animation: ${m} 0.5s ease-out forwards;
|
35
|
+
`;
|
36
|
+
case "revealing":
|
37
|
+
return r`
|
38
|
+
visibility: visible;
|
39
|
+
opacity: 1;
|
40
|
+
transform: translateY(0); /* Position after moveIn */
|
41
|
+
animation: ${o} 1s ease-in-out forwards;
|
42
|
+
`;
|
43
|
+
case "visible":
|
44
|
+
return r`
|
45
|
+
visibility: visible;
|
46
|
+
opacity: 1;
|
47
|
+
transform: translateY(0) rotateY(360deg);
|
48
|
+
background-color: ${i.colors[`${s}_2`]};
|
49
|
+
transition: background-color 0.2s ease-in;
|
50
|
+
`;
|
51
|
+
case "assigning":
|
52
|
+
return r`
|
53
|
+
visibility: visible;
|
54
|
+
opacity: 1;
|
55
|
+
transform: translateY(0); /* Reset rotation for this animation */
|
56
|
+
animation: ${o} 1s ease-in-out forwards;
|
57
|
+
`;
|
58
|
+
case "assigned":
|
59
|
+
return r`
|
60
|
+
visibility: visible;
|
61
|
+
opacity: 1;
|
62
|
+
transform: translateY(0) rotateY(360deg);
|
63
|
+
`;
|
64
|
+
case "movingOut":
|
65
|
+
return r`
|
66
|
+
visibility: visible;
|
67
|
+
opacity: 1;
|
68
|
+
transform: translateY(0); /* Start from final position */
|
69
|
+
animation: ${c} 0.5s ease-in forwards;
|
70
|
+
`;
|
71
|
+
default:
|
72
|
+
return "";
|
16
73
|
}
|
17
|
-
|
18
|
-
display: -webkit-box;
|
19
|
-
-webkit-line-clamp: 3;
|
20
|
-
-webkit-box-orient: vertical;
|
21
|
-
overflow: hidden;
|
22
|
-
text-overflow: ellipsis;
|
23
|
-
white-space: break-spaces;
|
24
|
-
`, b = e(r)`
|
25
|
-
position: absolute;
|
26
|
-
top: -16px;
|
27
|
-
right: -15px;
|
74
|
+
}}
|
28
75
|
`;
|
29
76
|
export {
|
30
|
-
|
31
|
-
b as StickerWrapper,
|
32
|
-
x as Title
|
77
|
+
d as PuzzleWrapper
|
33
78
|
};
|
34
79
|
//# sourceMappingURL=puzzle-card-styled.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"puzzle-card-styled.js","sources":["../../../../src/features/puzzles/comps/puzzle-card-styled.tsx"],"sourcesContent":["import type { THueNames } from '../../ui/types';\n\nimport styled from 'styled-components';\n\nimport FlexView from '../../ui/layout/flex-view';\nimport
|
1
|
+
{"version":3,"file":"puzzle-card-styled.js","sources":["../../../../src/features/puzzles/comps/puzzle-card-styled.tsx"],"sourcesContent":["import type { THueNames } from '../../ui/types';\n\nimport styled, { css, keyframes } from 'styled-components';\n\nimport FlexView from '../../ui/layout/flex-view';\nimport { getPuzzleCardPattern } from '../utils/puzzle-pattern';\n\n// --- Keyframes for each animation step ---\nconst moveInAnim = keyframes`\n from { transform: translateY(-100%); }\n to { transform: translateY(0); }\n`;\n\nconst rotateYAnim = keyframes`\n from { transform: rotateY(0deg); }\n to { transform: rotateY(360deg); }\n`;\n\nconst moveOutAnim = keyframes`\n from { transform: translateY(0); opacity: 1; }\n to { transform: translateY(-100%); opacity: 0; }\n`;\n\nconst PuzzleWrapper = styled(FlexView)<{ $animationPhase?: string; $imageHue: THueNames }>`\n position: relative;\n\n box-shadow: inset 0px 0px 0px 4px ${({ theme, $imageHue }) => theme.colors[`${$imageHue}_4`]};\n\n background-image: ${({ $imageHue }) => `url(${getPuzzleCardPattern($imageHue)})`};\n background-size: cover;\n\n ${({ $animationPhase }) =>\n $animationPhase &&\n css`\n transform-style: preserve-3d;\n opacity: 0;\n visibility: hidden;\n transform: translateY(-100%);\n `}\n\n ${({ $animationPhase, theme, $imageHue }) => {\n switch ($animationPhase) {\n case 'movingIn':\n return css`\n visibility: visible;\n opacity: 1;\n animation: ${moveInAnim} 0.5s ease-out forwards;\n `;\n case 'revealing':\n return css`\n visibility: visible;\n opacity: 1;\n transform: translateY(0); /* Position after moveIn */\n animation: ${rotateYAnim} 1s ease-in-out forwards;\n `;\n case 'visible':\n return css`\n visibility: visible;\n opacity: 1;\n transform: translateY(0) rotateY(360deg);\n background-color: ${theme.colors[`${$imageHue}_2`]};\n transition: background-color 0.2s ease-in;\n `;\n case 'assigning':\n return css`\n visibility: visible;\n opacity: 1;\n transform: translateY(0); /* Reset rotation for this animation */\n animation: ${rotateYAnim} 1s ease-in-out forwards;\n `;\n case 'assigned':\n return css`\n visibility: visible;\n opacity: 1;\n transform: translateY(0) rotateY(360deg);\n `;\n case 'movingOut':\n return css`\n visibility: visible;\n opacity: 1;\n transform: translateY(0); /* Start from final position */\n animation: ${moveOutAnim} 0.5s ease-in forwards;\n `;\n default:\n return '';\n }\n }}\n`;\n\nexport { PuzzleWrapper };\n"],"names":["moveInAnim","keyframes","rotateYAnim","moveOutAnim","PuzzleWrapper","styled","FlexView","theme","$imageHue","getPuzzleCardPattern","$animationPhase","css"],"mappings":";;;AAQA,MAAMA,IAAaC;AAAA;AAAA;AAAA,GAKbC,IAAcD;AAAA;AAAA;AAAA,GAKdE,IAAcF;AAAA;AAAA;AAAA,GAKdG,IAAgBC,EAAOC,CAAQ;AAAA;AAAA;AAAA,sCAGC,CAAC,EAAE,OAAAC,GAAO,WAAAC,QAAgBD,EAAM,OAAO,GAAGC,CAAS,IAAI,CAAC;AAAA;AAAA,sBAExE,CAAC,EAAE,WAAAA,EAAU,MAAM,OAAOC,EAAqBD,CAAS,CAAC,GAAG;AAAA;AAAA;AAAA,IAG9E,CAAC,EAAE,iBAAAE,QACHA,KACAC;AAAA;AAAA;AAAA;AAAA;AAAA,KAKC;AAAA;AAAA,IAED,CAAC,EAAE,iBAAAD,GAAiB,OAAAH,GAAO,WAAAC,QAAgB;AAC3C,UAAQE,GAAiB;AAAA,IACvB,KAAK;AACI,aAAAC;AAAA;AAAA;AAAA,uBAGQX,CAAU;AAAA;AAAA,IAE3B,KAAK;AACI,aAAAW;AAAA;AAAA;AAAA;AAAA,uBAIQT,CAAW;AAAA;AAAA,IAE5B,KAAK;AACI,aAAAS;AAAA;AAAA;AAAA;AAAA,8BAIeJ,EAAM,OAAO,GAAGC,CAAS,IAAI,CAAC;AAAA;AAAA;AAAA,IAGtD,KAAK;AACI,aAAAG;AAAA;AAAA;AAAA;AAAA,uBAIQT,CAAW;AAAA;AAAA,IAE5B,KAAK;AACI,aAAAS;AAAA;AAAA;AAAA;AAAA;AAAA,IAKT,KAAK;AACI,aAAAA;AAAA;AAAA;AAAA;AAAA,uBAIQR,CAAW;AAAA;AAAA,IAE5B;AACS,aAAA;AAAA,EACX;AACF,CAAC;AAAA;"}
|
@@ -1,84 +1,35 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import { memo as
|
3
|
-
import
|
4
|
-
|
5
|
-
import A from "../../ui/layout/flex-view.js";
|
6
|
-
import Z from "../../ui/lottie-animation/lottie-animation.js";
|
7
|
-
import { PUZZLE_ANALYTICS_EVENTS as k } from "../puzzle-analytics-events.js";
|
8
|
-
import { getPuzzleStickerLottie as x } from "../utils/puzzle-feedback-celebration.js";
|
9
|
-
import { PuzzleWrapper as M, Title as j, StickerWrapper as v } from "./puzzle-card-styled.js";
|
10
|
-
const R = {
|
11
|
-
autoplay: !1,
|
12
|
-
loop: !0,
|
13
|
-
renderer: "canvas"
|
14
|
-
}, G = P(
|
1
|
+
import { jsx as h } from "react/jsx-runtime";
|
2
|
+
import { memo as p } from "react";
|
3
|
+
import { PuzzleWrapper as s } from "./puzzle-card-styled.js";
|
4
|
+
const c = p(
|
15
5
|
({
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
width:
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
e
|
39
|
-
}
|
40
|
-
|
41
|
-
e && ((t = l.current) == null || t.stop());
|
42
|
-
}, [e]);
|
43
|
-
return /* @__PURE__ */ i(
|
44
|
-
S,
|
45
|
-
{
|
46
|
-
label: "",
|
47
|
-
analyticsLabel: k.PUZZLE_VIEWED,
|
48
|
-
analyticsProps: L,
|
49
|
-
onClick: g,
|
50
|
-
children: /* @__PURE__ */ f(
|
51
|
-
M,
|
52
|
-
{
|
53
|
-
$width: z,
|
54
|
-
$height: $,
|
55
|
-
$justifyContent: "center",
|
56
|
-
$alignItems: "center",
|
57
|
-
$imageHue: c,
|
58
|
-
$background: `${c}_2`,
|
59
|
-
onMouseEnter: E,
|
60
|
-
onMouseLeave: d,
|
61
|
-
children: [
|
62
|
-
/* @__PURE__ */ f(A, { $justifyContent: "center", $alignItems: "center", $flexGap: 12, children: [
|
63
|
-
/* @__PURE__ */ i(b, { src: u ?? "", width: 68, height: 68, withLoader: !1, alt: "Puzzle" }),
|
64
|
-
/* @__PURE__ */ i(j, { $renderAs: "ab3", $align: "center", $width: "80%", children: h })
|
65
|
-
] }),
|
66
|
-
e && /* @__PURE__ */ i(v, { $widthX: 2.5, $heightX: 2.5, children: /* @__PURE__ */ i(
|
67
|
-
Z,
|
68
|
-
{
|
69
|
-
src: e,
|
70
|
-
ref: l,
|
71
|
-
settings: R
|
72
|
-
}
|
73
|
-
) })
|
74
|
-
]
|
75
|
-
}
|
76
|
-
)
|
77
|
-
}
|
78
|
-
);
|
79
|
-
}
|
6
|
+
children: e,
|
7
|
+
imageHue: t,
|
8
|
+
onAnimationEnd: r,
|
9
|
+
animationPhase: o,
|
10
|
+
width: i,
|
11
|
+
widthX: m,
|
12
|
+
height: n,
|
13
|
+
heightX: $,
|
14
|
+
backgroundColor: a
|
15
|
+
}) => /* @__PURE__ */ h(
|
16
|
+
s,
|
17
|
+
{
|
18
|
+
$animationPhase: o,
|
19
|
+
onAnimationEnd: r,
|
20
|
+
$width: i,
|
21
|
+
$height: n,
|
22
|
+
$widthX: m,
|
23
|
+
$heightX: $,
|
24
|
+
$alignItems: "center",
|
25
|
+
$justifyContent: "center",
|
26
|
+
$imageHue: t,
|
27
|
+
$background: a ?? `${t}_6`,
|
28
|
+
children: e
|
29
|
+
}
|
30
|
+
)
|
80
31
|
);
|
81
32
|
export {
|
82
|
-
|
33
|
+
c as default
|
83
34
|
};
|
84
35
|
//# sourceMappingURL=puzzle-card.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"puzzle-card.js","sources":["../../../../src/features/puzzles/comps/puzzle-card.tsx"],"sourcesContent":["import type {
|
1
|
+
{"version":3,"file":"puzzle-card.js","sources":["../../../../src/features/puzzles/comps/puzzle-card.tsx"],"sourcesContent":["import type { IPuzzleCardProps } from './puzzle-card-types';\nimport type { FC } from 'react';\n\nimport { memo } from 'react';\n\nimport * as Styled from './puzzle-card-styled';\n\nconst PuzzleCard: FC<IPuzzleCardProps> = memo(\n ({\n children,\n imageHue,\n onAnimationEnd,\n animationPhase,\n width,\n widthX,\n height,\n heightX,\n backgroundColor,\n }) => {\n return (\n <Styled.PuzzleWrapper\n $animationPhase={animationPhase}\n onAnimationEnd={onAnimationEnd}\n $width={width}\n $height={height}\n $widthX={widthX}\n $heightX={heightX}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $imageHue={imageHue}\n $background={backgroundColor ?? `${imageHue}_6`}\n >\n {children}\n </Styled.PuzzleWrapper>\n );\n },\n);\n\nexport default PuzzleCard;\n"],"names":["PuzzleCard","memo","children","imageHue","onAnimationEnd","animationPhase","width","widthX","height","heightX","backgroundColor","jsx","Styled.PuzzleWrapper"],"mappings":";;;AAOA,MAAMA,IAAmCC;AAAA,EACvC,CAAC;AAAA,IACC,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,QAAAC;AAAA,IACA,SAAAC;AAAA,IACA,iBAAAC;AAAA,EAAA,MAGE,gBAAAC;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,iBAAiBP;AAAA,MACjB,gBAAAD;AAAA,MACA,QAAQE;AAAA,MACR,SAASE;AAAA,MACT,SAASD;AAAA,MACT,UAAUE;AAAA,MACV,aAAY;AAAA,MACZ,iBAAgB;AAAA,MAChB,WAAWN;AAAA,MACX,aAAaO,KAAmB,GAAGP,CAAQ;AAAA,MAE1C,UAAAD;AAAA,IAAA;AAAA,EAAA;AAIT;"}
|
@@ -1,77 +1,47 @@
|
|
1
|
-
import
|
2
|
-
import
|
3
|
-
|
4
|
-
|
5
|
-
const { colors: i, layout: n } = t;
|
6
|
-
return `
|
7
|
-
cursor: pointer;
|
8
|
-
width: ${n.gutter * 15.9375}px;
|
9
|
-
height: ${n.gutter * 19.125}px;
|
10
|
-
position: relative;
|
11
|
-
left: ${o ? "0" : "50px"};
|
12
|
-
top: ${o ? "0" : "50px"};
|
1
|
+
import o from "styled-components";
|
2
|
+
import t from "../../ui/layout/flex-view.js";
|
3
|
+
const p = o(t)`
|
4
|
+
cursor: pointer;
|
13
5
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
const { colors: n, layout: p } = t;
|
6
|
+
&:hover {
|
7
|
+
outline: 2px solid ${({ theme: e }) => e.colors.BLACK_1};
|
8
|
+
}
|
9
|
+
`, l = o(t)(({ theme: e, $disabled: n }) => {
|
10
|
+
const { colors: r } = e;
|
20
11
|
return `
|
21
|
-
cursor: pointer;
|
22
|
-
width: ${p.gutter * 15.9375}px;
|
23
12
|
position: absolute;
|
24
|
-
|
25
|
-
|
13
|
+
bottom: -48px;
|
14
|
+
cursor: pointer;
|
15
|
+
z-index: -1;
|
26
16
|
|
27
|
-
${
|
28
|
-
background: ${
|
29
|
-
border: 2px solid ${
|
17
|
+
${n && `
|
18
|
+
background: ${r.WHITE_4};
|
19
|
+
border: 2px solid ${r.WHITE_5};
|
30
20
|
border-top: 0;
|
31
21
|
pointer-events: none;
|
32
22
|
`}
|
33
23
|
`;
|
34
|
-
})
|
35
|
-
e(r)`
|
24
|
+
}), c = o(t)`
|
36
25
|
position: relative;
|
37
26
|
top: -8px;
|
38
27
|
height: 100%;
|
39
28
|
width: 100%;
|
40
|
-
|
41
|
-
e(r)`
|
29
|
+
`, u = o(t)`
|
42
30
|
border-radius: 50%;
|
43
|
-
|
44
|
-
const d = e(r)`
|
31
|
+
`, a = o(t)`
|
45
32
|
position: relative;
|
46
33
|
transition: height 0.3s ease-out;
|
47
|
-
`,
|
34
|
+
`, d = o(t)`
|
48
35
|
position: absolute;
|
49
36
|
top: 0;
|
50
37
|
right: 0;
|
51
|
-
`, h = e(r)(({ $visible: t, theme: o }) => {
|
52
|
-
const { layout: i } = o;
|
53
|
-
return `
|
54
|
-
width: ${i.gutter * 22.1875}px;
|
55
|
-
height: ${i.gutter * 26}px;
|
56
|
-
left: 0;
|
57
|
-
opacity: ${t ? 1 : 0};
|
58
|
-
pointer-events: ${t ? "auto" : "none"};
|
59
|
-
transition: opacity 0.2s ease-out;
|
60
|
-
`;
|
61
|
-
}), $ = e(r)`
|
62
|
-
position: relative;
|
63
|
-
|
64
|
-
box-shadow: inset 0px 0px 0px 4px ${({ theme: t, $imageHue: o }) => t.colors[`${o}_4`]};
|
65
|
-
|
66
|
-
background-image: ${({ $imageHue: t }) => `url(${s(t)})`};
|
67
|
-
background-size: cover;
|
68
38
|
`;
|
69
39
|
export {
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
40
|
+
d as AssignedTag,
|
41
|
+
u as CheckMarkIcon,
|
42
|
+
l as PuzzleButton,
|
43
|
+
a as PuzzleContainer,
|
44
|
+
p as PuzzleContent,
|
45
|
+
c as PuzzleText
|
76
46
|
};
|
77
47
|
//# sourceMappingURL=puzzle-container-styled.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"puzzle-container-styled.js","sources":["../../../../src/features/puzzles/puzzle-container/puzzle-container-styled.tsx"],"sourcesContent":["import
|
1
|
+
{"version":3,"file":"puzzle-container-styled.js","sources":["../../../../src/features/puzzles/puzzle-container/puzzle-container-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../ui/layout/flex-view';\n\nconst PuzzleContent = styled(FlexView)`\n cursor: pointer;\n\n &:hover {\n outline: 2px solid ${({ theme }) => theme.colors.BLACK_1};\n }\n`;\n\ninterface IPuzzleButton {\n $disabled?: boolean;\n}\n\nconst PuzzleButton = styled(FlexView)<IPuzzleButton>(({ theme, $disabled }) => {\n const { colors } = theme;\n\n return `\n position: absolute;\n bottom: -48px;\n cursor: pointer;\n z-index: -1;\n \n ${\n $disabled &&\n `\n background: ${colors.WHITE_4};\n border: 2px solid ${colors.WHITE_5};\n border-top: 0;\n pointer-events: none;\n `\n }\n `;\n});\n\nconst PuzzleText = styled(FlexView)`\n position: relative;\n top: -8px;\n height: 100%;\n width: 100%;\n`;\n\nconst CheckMarkIcon = styled(FlexView)`\n border-radius: 50%;\n`;\n\nconst PuzzleContainer = styled(FlexView)`\n position: relative;\n transition: height 0.3s ease-out;\n`;\n\nconst AssignedTag = styled(FlexView)`\n position: absolute;\n top: 0;\n right: 0;\n`;\n\nexport { PuzzleContainer, PuzzleContent, PuzzleButton, PuzzleText, CheckMarkIcon, AssignedTag };\n"],"names":["PuzzleContent","styled","FlexView","theme","PuzzleButton","$disabled","colors","PuzzleText","CheckMarkIcon","PuzzleContainer","AssignedTag"],"mappings":";;AAIM,MAAAA,IAAgBC,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA,yBAIZ,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA,GAQtDC,IAAeH,EAAOC,CAAQ,EAAiB,CAAC,EAAE,OAAAC,GAAO,WAAAE,QAAgB;AACvE,QAAA,EAAE,QAAAC,EAAW,IAAAH;AAEZ,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAOHE,KACA;AAAA,oBACcC,EAAO,OAAO;AAAA,0BACRA,EAAO,OAAO;AAAA;AAAA;AAAA,KAIpC;AAAA;AAEJ,CAAC,GAEKC,IAAaN,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,GAO5BM,IAAgBP,EAAOC,CAAQ;AAAA;AAAA,GAI/BO,IAAkBR,EAAOC,CAAQ;AAAA;AAAA;AAAA,GAKjCQ,IAAcT,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA;"}
|
@@ -1,120 +1,127 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import { memo as
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import {
|
7
|
-
import
|
8
|
-
import { PuzzleContainer as
|
9
|
-
|
10
|
-
const W = {
|
11
|
-
loop: !1,
|
12
|
-
renderer: "svg",
|
13
|
-
autoPlay: !1
|
14
|
-
}, X = Z(
|
1
|
+
import { jsx as i, jsxs as l, Fragment as w } from "react/jsx-runtime";
|
2
|
+
import { memo as X, useState as z, useRef as j, useEffect as C, useCallback as c } from "react";
|
3
|
+
import L from "../../../assets/line-icons/icons/check2.js";
|
4
|
+
import O from "../../ui/image/image.js";
|
5
|
+
import r from "../../ui/text/text.js";
|
6
|
+
import { usePostPuzzleToAssign as B } from "../api/puzzle-assign.js";
|
7
|
+
import D from "../comps/puzzle-card.js";
|
8
|
+
import { PuzzleContainer as W, PuzzleContent as G, AssignedTag as K, PuzzleButton as S, PuzzleText as U, CheckMarkIcon as H } from "./puzzle-container-styled.js";
|
9
|
+
const N = 1500, M = X(
|
15
10
|
({
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
11
|
+
userType: A,
|
12
|
+
triggerReveal: o = !1,
|
13
|
+
onFullyHidden: s,
|
14
|
+
onPuzzleClick: d,
|
15
|
+
puzzleData: p,
|
16
|
+
courseStream: g,
|
17
|
+
studentId: u
|
22
18
|
}) => {
|
23
19
|
const {
|
24
|
-
image_hue:
|
25
|
-
image_url:
|
26
|
-
assigned:
|
27
|
-
title:
|
28
|
-
id:
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
} = $, [I, a] = j(s), r = k(null), w = u(() => D(i), [i]), R = u(
|
33
|
-
() => ({
|
34
|
-
node_id: A,
|
35
|
-
node_type: "PUZZLE_CARD",
|
36
|
-
student_elo_rating: h,
|
37
|
-
current_elo_rating: _
|
38
|
-
}),
|
39
|
-
[A, h, _]
|
40
|
-
), { post: C, isProcessing: b } = y({
|
41
|
-
onComplete: (e) => {
|
42
|
-
var t;
|
43
|
-
e ? a(!0) : ((t = r.current) == null || t.playSegments(c.REVEAL_ASSIGNED, !1), a(!1));
|
20
|
+
image_hue: m,
|
21
|
+
image_url: b,
|
22
|
+
assigned: e,
|
23
|
+
title: I,
|
24
|
+
id: h
|
25
|
+
} = p, [n, t] = z("hidden"), [f, P] = z(!1), a = j(null), { post: $, isProcessing: k } = B({
|
26
|
+
onComplete: (x) => {
|
27
|
+
x ? t("visible") : n === "visible" && t("assigning");
|
44
28
|
}
|
45
29
|
});
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
30
|
+
C(() => {
|
31
|
+
e || (o ? f ? t("assigned") : n === "hidden" && t("movingIn") : n !== "hidden" && n !== "movingOut" && t("movingOut"));
|
32
|
+
}, [o, f, e]), C(() => (n === "assigned" && !e && (a.current = setTimeout(() => {
|
33
|
+
t("movingOut");
|
34
|
+
}, N)), () => {
|
35
|
+
a.current && clearTimeout(a.current);
|
36
|
+
}), [n, e]);
|
37
|
+
const T = c(() => {
|
38
|
+
switch (n) {
|
39
|
+
case "movingIn":
|
40
|
+
t("revealing");
|
41
|
+
break;
|
42
|
+
case "revealing":
|
43
|
+
t("visible");
|
44
|
+
break;
|
45
|
+
case "assigning":
|
46
|
+
t("assigned"), P(!0);
|
47
|
+
break;
|
48
|
+
case "movingOut":
|
49
|
+
t("hidden"), s == null || s();
|
50
|
+
break;
|
51
|
+
}
|
52
|
+
}, [n, s]), v = c(() => {
|
53
|
+
e || $(
|
52
54
|
{
|
53
|
-
puzzle_id:
|
55
|
+
puzzle_id: h
|
54
56
|
},
|
55
57
|
{
|
56
|
-
studentId:
|
57
|
-
courseStream:
|
58
|
+
studentId: u,
|
59
|
+
courseStream: g
|
58
60
|
}
|
59
61
|
);
|
60
|
-
}, [
|
61
|
-
|
62
|
-
}, [
|
63
|
-
|
64
|
-
|
65
|
-
}, []), N = u(
|
66
|
-
() => ({
|
67
|
-
name: "enterFrame",
|
68
|
-
callback: (e) => {
|
69
|
-
const { currentTime: t } = e;
|
70
|
-
t === 49 && a(!0), t === 101 && (o == null || o());
|
71
|
-
}
|
72
|
-
}),
|
73
|
-
[o]
|
74
|
-
);
|
75
|
-
return l ? s ? /* @__PURE__ */ n(E, { $justifyContent: "center", children: /* @__PURE__ */ n(
|
76
|
-
G,
|
77
|
-
{
|
78
|
-
$imageHue: i,
|
79
|
-
$background: `${i}_2`,
|
80
|
-
$widthX: 15.9375,
|
81
|
-
children: /* @__PURE__ */ n(
|
82
|
-
S,
|
83
|
-
{
|
84
|
-
imageUrl: g,
|
85
|
-
handleOnPuzzleClick: L,
|
86
|
-
title: d,
|
87
|
-
assigned: !0
|
88
|
-
}
|
89
|
-
)
|
90
|
-
}
|
91
|
-
) }) : /* @__PURE__ */ n(E, { children: /* @__PURE__ */ T(U, { $heightX: 26, children: [
|
92
|
-
/* @__PURE__ */ n(
|
93
|
-
v,
|
62
|
+
}, [g, e, $, h, u]), _ = c(() => {
|
63
|
+
d();
|
64
|
+
}, [d]), E = () => n === "visible" || e ? /* @__PURE__ */ l(w, { children: [
|
65
|
+
/* @__PURE__ */ l(
|
66
|
+
G,
|
94
67
|
{
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
68
|
+
$justifyContent: "center",
|
69
|
+
$alignItems: "center",
|
70
|
+
$width: "100%",
|
71
|
+
$height: "100%",
|
72
|
+
onClick: _,
|
73
|
+
title: "Click to preview",
|
74
|
+
$flexGapX: 1.5,
|
75
|
+
children: [
|
76
|
+
/* @__PURE__ */ i(O, { width: 136, height: 136, src: b, withLoader: !1, alt: "Puzzle" }),
|
77
|
+
/* @__PURE__ */ i(r, { $renderAs: "h4", children: I }),
|
78
|
+
e && /* @__PURE__ */ i(K, { $gap: 4, $gutter: 8, $background: "BLACK_1", children: /* @__PURE__ */ i(r, { $renderAs: "ac4", $color: "WHITE_1", children: "Assigned" }) })
|
79
|
+
]
|
101
80
|
}
|
102
81
|
),
|
103
|
-
|
82
|
+
A === "TEACHER" && /* @__PURE__ */ i(
|
104
83
|
S,
|
105
84
|
{
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
85
|
+
$background: "BLACK_1",
|
86
|
+
$widthX: 15.75,
|
87
|
+
$alignItems: "center",
|
88
|
+
$justifyContent: "center",
|
89
|
+
$gapX: 0.75,
|
90
|
+
$gutterX: 1,
|
91
|
+
onClick: v,
|
92
|
+
$disabled: e || k,
|
93
|
+
children: /* @__PURE__ */ i(r, { $renderAs: "ub1-bold", $color: e ? "BLACK_T_38" : "WHITE_1", children: e ? "Discuss in next class" : "Assign" })
|
112
94
|
}
|
113
|
-
)
|
114
|
-
] })
|
95
|
+
)
|
96
|
+
] }) : n === "assigned" ? /* @__PURE__ */ l(U, { $alignItems: "center", $justifyContent: "center", $flexGap: 8, children: [
|
97
|
+
/* @__PURE__ */ i(
|
98
|
+
H,
|
99
|
+
{
|
100
|
+
$widthX: 2.5,
|
101
|
+
$heightX: 2.5,
|
102
|
+
$background: "WHITE",
|
103
|
+
$alignItems: "center",
|
104
|
+
$justifyContent: "center",
|
105
|
+
children: /* @__PURE__ */ i(L, {})
|
106
|
+
}
|
107
|
+
),
|
108
|
+
/* @__PURE__ */ i(r, { $renderAs: "ab1-bold", $align: "center", $color: "WHITE", children: "Puzzle assigned" })
|
109
|
+
] }) : null;
|
110
|
+
return n === "hidden" && !o ? null : /* @__PURE__ */ i(W, { children: /* @__PURE__ */ i(
|
111
|
+
D,
|
112
|
+
{
|
113
|
+
animationPhase: e ? void 0 : n,
|
114
|
+
onAnimationEnd: T,
|
115
|
+
imageHue: m ?? "BLUE",
|
116
|
+
heightX: 19,
|
117
|
+
widthX: 15.75,
|
118
|
+
backgroundColor: e ? `${m}_2` : void 0,
|
119
|
+
children: E()
|
120
|
+
}
|
121
|
+
) });
|
115
122
|
}
|
116
|
-
),
|
123
|
+
), F = M;
|
117
124
|
export {
|
118
|
-
|
125
|
+
F as default
|
119
126
|
};
|
120
127
|
//# sourceMappingURL=puzzle-container.js.map
|