@cuemath/leap 3.2.2-akm-2 → 3.2.2-ppa-beta-0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/line-icons/icons/hint-fill.js +35 -0
- package/dist/assets/line-icons/icons/hint-fill.js.map +1 -0
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js +15 -15
- 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/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/constants.js +1 -3
- package/dist/features/circle-games/sign-up/constants.js.map +1 -1
- package/dist/features/puzzles/app/puzzle-app-styled.js +115 -0
- package/dist/features/puzzles/app/puzzle-app-styled.js.map +1 -0
- package/dist/features/puzzles/app/puzzle-app-view.js +116 -0
- package/dist/features/puzzles/app/puzzle-app-view.js.map +1 -0
- package/dist/features/puzzles/app/puzzle-app.js +63 -0
- package/dist/features/puzzles/app/puzzle-app.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 +15 -17
- package/dist/features/ui/streak-icon/streak-icon.js.map +1 -1
- package/dist/index.d.ts +17 -1
- package/dist/index.js +521 -517
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"puzzle-app-view.js","sources":["../../../../src/features/puzzles/app/puzzle-app-view.tsx"],"sourcesContent":["import type {\n ILearnosityError,\n ILearnosityQuestion,\n} from '../../worksheet/worksheet/worksheet-types';\nimport type { IPuzzleAppViewProps } from './puzzle-app-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useEffect, useMemo, useRef } from 'react';\n\nimport Image from '../../ui/image/image';\nimport Separator from '../../ui/separator/separator';\nimport EVENTS from '../../worksheet/constants/events';\nimport useLearnosity from '../../worksheet/worksheet/hooks/use-learnosity';\nimport useWorksheetDataHelper from '../../worksheet/worksheet/hooks/use-worksheet-data-helper';\nimport { getQuestionsFromItems } from '../../worksheet/worksheet/worksheet-helpers';\nimport * as Styled from './puzzle-app-styled';\n\nconst extractImageFromHTML = (htmlString: string) => {\n if (!htmlString) return null;\n\n const imgMatch = htmlString.match(/<img[^>]+src=\"([^\">]+)\"/);\n\n return imgMatch ? imgMatch[1] : null;\n};\n\nconst PuzzleAppView: FC<IPuzzleAppViewProps> = ({\n worksheetData,\n loggerRef,\n onWorksheetErrored,\n imageHue,\n onLoaded,\n}) => {\n const { signed_request: itemsSignedRequest, questions_signed_request: questionSignedRequest } =\n worksheetData;\n\n // Ref for the container to trigger MathJax rendering\n const containerRef = useRef<HTMLDivElement>(null);\n\n // Get Learnosity items using the signed_request (not questions_signed_request)\n const {\n loadingState,\n data: learnosityData,\n error: worksheetError,\n } = useWorksheetDataHelper({\n attemptId: undefined,\n signedRequest: itemsSignedRequest,\n loggerRef,\n });\n\n const onLearnosityErrored = useCallback(\n (err: ILearnosityError) => {\n onWorksheetErrored({\n code: err.code,\n message: err.detail,\n });\n },\n [onWorksheetErrored],\n );\n\n // Initialize Learnosity using questions_signed_request (needed for interactive questions)\n const { learnosity } = useLearnosity(questionSignedRequest, onLearnosityErrored, loggerRef);\n\n useEffect(() => {\n if (loadingState === 'error') {\n onWorksheetErrored({\n message: worksheetError ?? 'Error loading worksheet',\n });\n }\n }, [loadingState, onWorksheetErrored, worksheetError]);\n\n // Log when learnosity is ready for future interactive features\n useEffect(() => {\n if (learnosity) {\n loggerRef.current(EVENTS.WORKSHEET_V3_LEARNOSITY_INITIALIZED);\n }\n }, [learnosity, loggerRef]);\n\n useEffect(() => {\n if (learnosity && loadingState === 'success' && onLoaded) {\n loggerRef.current(EVENTS.WORKSHEET_V3_READY);\n onLoaded();\n }\n }, [learnosity, loadingState, loggerRef, onLoaded]);\n\n // Memoize questions processing to prevent re-render loops\n const questions = useMemo(() => {\n // Extract questions from Learnosity items when data is loaded successfully\n if (loadingState === 'success' && learnosityData?.learnosityItems) {\n loggerRef.current(EVENTS.WORKSHEET_V3_READY);\n\n // Convert learnosityItems to questions using the worksheet helper\n const worksheetQuestions = getQuestionsFromItems(learnosityData.learnosityItems, {\n sectioned: false,\n adaptive: false,\n });\n\n // Extract just the Learnosity questions from worksheet questions\n const learnosityQuestions: ILearnosityQuestion[] = worksheetQuestions.map(q => ({\n response_id: q.response_id,\n type: q.type,\n stimulus: q.stimulus,\n template: q.template,\n stimulus_review: q.stimulus_review,\n options: q.options,\n metadata: q.metadata,\n validation: q.validation,\n // Add other properties as needed\n }));\n\n return learnosityQuestions;\n }\n\n if (loadingState === 'error' || worksheetError) {\n return [];\n }\n\n return [];\n }, [loadingState, learnosityData, worksheetError, loggerRef]);\n\n // Force MathJax rendering after questions are loaded and rendered\n // Similar to how useLearnosityAppend does it\n useEffect(() => {\n if (learnosity && questions.length > 0) {\n // Use requestAnimationFrame to ensure DOM is updated before rendering math\n const renderMath = () => {\n try {\n learnosity.renderMath('mathjax');\n } catch (error) {\n // Fallback - MathJax rendering will happen automatically via global config\n // or when the content is processed by the browser\n }\n };\n\n const animationId = requestAnimationFrame(renderMath);\n\n return () => {\n cancelAnimationFrame(animationId);\n };\n }\n }, [learnosity, questions]);\n\n const renderQuestionContent = useCallback((question: ILearnosityQuestion) => {\n const { stimulus = '', template = '', response_id: responseId } = question;\n const imageUrl = extractImageFromHTML(stimulus);\n\n return (\n <Styled.QuestionCard\n key={responseId}\n $alignItems=\"center\"\n className=\"puzzle-app-view-question-card\"\n >\n {/* Main Image or Interactive Content */}\n {imageUrl && (\n <Image\n src={imageUrl}\n alt=\"Puzzle illustration\"\n width={183}\n height={183}\n withLoader={true}\n />\n )}\n\n <Separator heightX={1} />\n\n {/* Question HTML Content */}\n {template && (\n <Styled.PuzzleQuestionWrapper>\n <div dangerouslySetInnerHTML={{ __html: template }} />\n </Styled.PuzzleQuestionWrapper>\n )}\n </Styled.QuestionCard>\n );\n }, []);\n\n if (!questions.length) return null;\n\n return (\n <Styled.PuzzleContainer\n ref={containerRef}\n $gapX={1}\n $gutterX={1}\n $imageHue={imageHue}\n $background=\"WHITE_1\"\n className=\"puzzle-app-view-container\"\n $justifyContent=\"center\"\n >\n {questions.map(question => (\n <div key={`question-${question.response_id}`}>{renderQuestionContent(question)}</div>\n ))}\n </Styled.PuzzleContainer>\n );\n};\n\nexport default memo(PuzzleAppView);\n"],"names":["extractImageFromHTML","htmlString","imgMatch","PuzzleAppView","worksheetData","loggerRef","onWorksheetErrored","imageHue","onLoaded","itemsSignedRequest","questionSignedRequest","containerRef","useRef","loadingState","learnosityData","worksheetError","useWorksheetDataHelper","onLearnosityErrored","useCallback","err","learnosity","useLearnosity","useEffect","EVENTS","questions","useMemo","getQuestionsFromItems","q","animationId","renderQuestionContent","question","stimulus","template","responseId","imageUrl","jsxs","Styled.QuestionCard","jsx","Image","Separator","Styled.PuzzleQuestionWrapper","Styled.PuzzleContainer","PuzzleAppView$1","memo"],"mappings":";;;;;;;;;AAiBA,MAAMA,IAAuB,CAACC,MAAuB;AAC/C,MAAA,CAACA,EAAmB,QAAA;AAElB,QAAAC,IAAWD,EAAW,MAAM,yBAAyB;AAEpD,SAAAC,IAAWA,EAAS,CAAC,IAAI;AAClC,GAEMC,IAAyC,CAAC;AAAA,EAC9C,eAAAC;AAAA,EACA,WAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AACF,MAAM;AACJ,QAAM,EAAE,gBAAgBC,GAAoB,0BAA0BC,MACpEN,GAGIO,IAAeC,EAAuB,IAAI,GAG1C;AAAA,IACJ,cAAAC;AAAA,IACA,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,UAAUiB,EAAA,IAAI,CACbM,MAAA,gBAAAO,EAAC,OAA8C,EAAA,UAAAR,EAAsBC,CAAQ,EAAA,GAAnE,YAAYA,EAAS,WAAW,EAAqC,CAChF;AAAA,IAAA;AAAA,EAAA,IAdyB;AAiBhC,GAEeY,IAAAC,EAAKxC,CAAa;"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { jsx as e, jsxs as o, Fragment as W } from "react/jsx-runtime";
|
|
2
|
+
import { memo as P, useState as d, useRef as v, useCallback as n, useEffect as y } from "react";
|
|
3
|
+
import R from "../../ui/error/error.js";
|
|
4
|
+
import h from "../../ui/layout/flex-view.js";
|
|
5
|
+
import F from "../../ui/loader/app-loader/app-loader.js";
|
|
6
|
+
import p from "../../ui/text/text.js";
|
|
7
|
+
import { usePreviewWorksheetGet as I } from "../../worksheet/worksheet-preview/api/get-preview-worksheet.js";
|
|
8
|
+
import { PuzzleAppWrapper as L, StyledFeedbackText as T, StyledHintFillIcon as j } from "./puzzle-app-styled.js";
|
|
9
|
+
import C from "./puzzle-app-view.js";
|
|
10
|
+
const D = ({ itemRef: s, title: m, imageHue: i, feedbackComments: l, tip: f }) => {
|
|
11
|
+
const [u, $] = d(), [r, g] = d(!1), { isProcessing: k, get: a, data: c, error: w } = I(), z = v(() => null), A = f || "Celebrate persistence more than correct answers - it's a life skill worth building.", t = n(() => {
|
|
12
|
+
a("test", {
|
|
13
|
+
action: "review",
|
|
14
|
+
node_type: "PUZZLE_CARD",
|
|
15
|
+
items: [s]
|
|
16
|
+
});
|
|
17
|
+
}, [a, s]);
|
|
18
|
+
y(() => {
|
|
19
|
+
t();
|
|
20
|
+
}, [t]);
|
|
21
|
+
const b = n((E) => {
|
|
22
|
+
$(E.message);
|
|
23
|
+
}, []), x = n(() => {
|
|
24
|
+
g(!0);
|
|
25
|
+
}, []);
|
|
26
|
+
return u || w ? /* @__PURE__ */ e(R, { height: "100vh", onTryAgain: t }) : k ? /* @__PURE__ */ e(F, { height: "100vh" }) : /* @__PURE__ */ o(
|
|
27
|
+
L,
|
|
28
|
+
{
|
|
29
|
+
className: "puzzle-app-container",
|
|
30
|
+
$background: `${i}_2`,
|
|
31
|
+
$alignItems: "center",
|
|
32
|
+
$justifyContent: "center",
|
|
33
|
+
$flexGapX: 1,
|
|
34
|
+
$gutterX: 1,
|
|
35
|
+
$height: "100%",
|
|
36
|
+
$visible: r,
|
|
37
|
+
children: [
|
|
38
|
+
r && /* @__PURE__ */ e(p, { $renderAs: "ab1-bold", children: m }),
|
|
39
|
+
c && /* @__PURE__ */ e(
|
|
40
|
+
C,
|
|
41
|
+
{
|
|
42
|
+
onWorksheetErrored: b,
|
|
43
|
+
worksheetData: c,
|
|
44
|
+
loggerRef: z,
|
|
45
|
+
imageHue: i,
|
|
46
|
+
onLoaded: x
|
|
47
|
+
}
|
|
48
|
+
),
|
|
49
|
+
r && /* @__PURE__ */ e(W, { children: l ? /* @__PURE__ */ o(T, { $renderAs: "ab2", children: [
|
|
50
|
+
/* @__PURE__ */ e("span", { children: "Tutor Remark:" }),
|
|
51
|
+
l
|
|
52
|
+
] }) : /* @__PURE__ */ o(h, { $flexDirection: "row", $alignItems: "center", $flexGap: 8, children: [
|
|
53
|
+
/* @__PURE__ */ e(h, { $width: 24, $height: 24, children: /* @__PURE__ */ e(j, {}) }),
|
|
54
|
+
/* @__PURE__ */ e(p, { $renderAs: "ab2", children: A })
|
|
55
|
+
] }) })
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
}, B = P(D);
|
|
60
|
+
export {
|
|
61
|
+
B as default
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=puzzle-app.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"puzzle-app.js","sources":["../../../../src/features/puzzles/app/puzzle-app.tsx"],"sourcesContent":["import type { IPuzzleAppProps } from './puzzle-app-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useEffect, useRef, useState } from 'react';\n\nimport Error from '../../ui/error/error';\nimport FlexView from '../../ui/layout/flex-view';\nimport AppLoader from '../../ui/loader/app-loader/app-loader';\nimport Text from '../../ui/text/text';\nimport { usePreviewWorksheetGet } from '../../worksheet/worksheet-preview/api/get-preview-worksheet';\nimport * as Styled from './puzzle-app-styled';\nimport PuzzleAppView from './puzzle-app-view';\n\nconst PuzzleApp: FC<IPuzzleAppProps> = ({ itemRef, title, imageHue, feedbackComments, tip }) => {\n const [error, setError] = useState<string>();\n const [worksheetRendered, setWorksheetRendered] = useState<boolean>(false);\n\n const { isProcessing, get, data: worksheetData, error: fetchError } = usePreviewWorksheetGet();\n const loggerRef = useRef(() => null);\n\n const tipInfo =\n tip || `Celebrate persistence more than correct answers - it's a life skill worth building.`;\n\n const fetchWorksheet = useCallback(() => {\n get('test', {\n action: 'review',\n node_type: 'PUZZLE_CARD',\n items: [itemRef],\n });\n }, [get, itemRef]);\n\n useEffect(() => {\n fetchWorksheet();\n }, [fetchWorksheet]);\n\n const handleWorksheetErrored = useCallback((err: { code?: number; message: string }) => {\n setError(err.message);\n }, []);\n\n const handleWorksheetLoaded = useCallback(() => {\n setWorksheetRendered(true);\n }, []);\n\n if (error || fetchError) {\n return <Error height=\"100vh\" onTryAgain={fetchWorksheet} />;\n }\n\n if (isProcessing) {\n return <AppLoader height=\"100vh\" />;\n }\n\n return (\n <Styled.PuzzleAppWrapper\n className=\"puzzle-app-container\"\n $background={`${imageHue}_2`}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $flexGapX={1}\n $gutterX={1}\n $height=\"100%\"\n $visible={worksheetRendered}\n >\n {worksheetRendered && <Text $renderAs=\"ab1-bold\">{title}</Text>}\n\n {worksheetData && (\n <PuzzleAppView\n onWorksheetErrored={handleWorksheetErrored}\n worksheetData={worksheetData}\n loggerRef={loggerRef}\n imageHue={imageHue}\n onLoaded={handleWorksheetLoaded}\n />\n )}\n\n {worksheetRendered && (\n <>\n {feedbackComments ? (\n <Styled.StyledFeedbackText $renderAs=\"ab2\">\n <span>Tutor Remark:</span>\n {feedbackComments}\n </Styled.StyledFeedbackText>\n ) : (\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $flexGap={8}>\n <FlexView $width={24} $height={24}>\n <Styled.StyledHintFillIcon />\n </FlexView>\n <Text $renderAs=\"ab2\">{tipInfo}</Text>\n </FlexView>\n )}\n </>\n )}\n </Styled.PuzzleAppWrapper>\n );\n};\n\nexport default memo(PuzzleApp);\n"],"names":["PuzzleApp","itemRef","title","imageHue","feedbackComments","tip","error","setError","useState","worksheetRendered","setWorksheetRendered","isProcessing","get","worksheetData","fetchError","usePreviewWorksheetGet","loggerRef","useRef","tipInfo","fetchWorksheet","useCallback","useEffect","handleWorksheetErrored","err","handleWorksheetLoaded","jsx","Error","AppLoader","jsxs","Styled.PuzzleAppWrapper","Text","PuzzleAppView","Styled.StyledFeedbackText","FlexView","Styled.StyledHintFillIcon","puzzleApp","memo"],"mappings":";;;;;;;;;AAaA,MAAMA,IAAiC,CAAC,EAAE,SAAAC,GAAS,OAAAC,GAAO,UAAAC,GAAU,kBAAAC,GAAkB,KAAAC,QAAU;AAC9F,QAAM,CAACC,GAAOC,CAAQ,IAAIC,EAAiB,GACrC,CAACC,GAAmBC,CAAoB,IAAIF,EAAkB,EAAK,GAEnE,EAAE,cAAAG,GAAc,KAAAC,GAAK,MAAMC,GAAe,OAAOC,MAAeC,KAChEC,IAAYC,EAAO,MAAM,IAAI,GAE7BC,IACJb,KAAO,uFAEHc,IAAiBC,EAAY,MAAM;AACvC,IAAAR,EAAI,QAAQ;AAAA,MACV,QAAQ;AAAA,MACR,WAAW;AAAA,MACX,OAAO,CAACX,CAAO;AAAA,IAAA,CAChB;AAAA,EAAA,GACA,CAACW,GAAKX,CAAO,CAAC;AAEjB,EAAAoB,EAAU,MAAM;AACC,IAAAF;EAAA,GACd,CAACA,CAAc,CAAC;AAEb,QAAAG,IAAyBF,EAAY,CAACG,MAA4C;AACtF,IAAAhB,EAASgB,EAAI,OAAO;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iB,IAAAC,EAAKpC,CAAS;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import t, { 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 = t.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:
|
|
17
|
-
`, s =
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
`, s = t.div`
|
|
18
18
|
height: 90%;
|
|
19
19
|
width: 90%;
|
|
20
20
|
position: absolute;
|
|
21
|
-
background: ${({ theme:
|
|
21
|
+
background: ${({ theme: i }) => i.colors.BLACK_1};
|
|
22
22
|
border-radius: 24px;
|
|
23
|
-
`, d =
|
|
23
|
+
`, d = t.div`
|
|
24
24
|
height: 90%;
|
|
25
25
|
width: 90%;
|
|
26
26
|
position: absolute;
|
|
27
|
-
background: ${({ theme:
|
|
27
|
+
background: ${({ theme: i }) => i.colors.RED};
|
|
28
28
|
border-radius: 32px;
|
|
29
29
|
animation: ${n}
|
|
30
|
-
${({ $blinkDelay:
|
|
31
|
-
`, c =
|
|
30
|
+
${({ $blinkDelay: i, $blinkDuration: e }) => `${e + i}ms linear infinite`};
|
|
31
|
+
`, c = t.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
|
+
`, p = t.div`
|
|
42
42
|
position: absolute;
|
|
43
43
|
top: 0;
|
|
44
44
|
left: 0;
|
|
45
45
|
bottom: 0;
|
|
46
46
|
right: 0;
|
|
47
|
-
`,
|
|
47
|
+
`, l = t.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
|
+
p as StreakImg,
|
|
55
55
|
s as StreakStaticBg,
|
|
56
56
|
a as StreakWrapper,
|
|
57
|
-
|
|
57
|
+
l 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
|
|
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`\n height: 32px;\n width: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n cursor: pointer;\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","StreakStaticBg","theme","StreakBg","$blinkDelay","$blinkDuration","StreakContent","StreakImg","StyledImg"],"mappings":";AAEA,MAAMA,IAAgBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASTC,IAAgBC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAUvBC,IAAiBD,EAAO;AAAA;AAAA;AAAA;AAAA,gBAIrB,CAAC,EAAE,OAAAE,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA,GAItCC,IAAWH,EAAO;AAAA;AAAA;AAAA;AAAA,gBAIf,CAAC,EAAE,OAAAE,EAAA,MAAYA,EAAM,OAAO,GAAG;AAAA;AAAA,eAEhCL,CAAa;AAAA,MACtB,CAAC,EAAE,aAAAO,GAAa,gBAAAC,QAAqB,GAAGA,IAAiBD,CAAW,oBAAoB;AAAA,GAGjFE,IAAgBN,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAYvBO,IAAYP,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQnBQ,IAAYR,EAAO;AAAA;AAAA;AAAA;"}
|
|
@@ -1,22 +1,20 @@
|
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
/* @__PURE__ */
|
|
13
|
-
|
|
14
|
-
/* @__PURE__ */ r(c, { $renderAs: "ab3-bold", $color: "WHITE", $align: "center", children: a })
|
|
15
|
-
] })
|
|
2
|
+
import { memo as n } from "react";
|
|
3
|
+
import i from "../../../assets/illustrations/streak-green.svg.js";
|
|
4
|
+
import S from "../../../assets/illustrations/streak-white.svg.js";
|
|
5
|
+
import l from "../text/text.js";
|
|
6
|
+
import { BLINK_DURATION as c, BLINK_DELAY as k } from "./constants.js";
|
|
7
|
+
import { StreakWrapper as p, StreakStaticBg as s, StreakBg as f, StreakContent as d, StreakImg as I, StyledImg as o } from "./streak-icon-styled.js";
|
|
8
|
+
const $ = n(({ value: a, blink: t = !1, ...m }) => /* @__PURE__ */ e(p, { ...m, children: [
|
|
9
|
+
/* @__PURE__ */ r(s, {}),
|
|
10
|
+
t && /* @__PURE__ */ r(f, { $blinkDuration: c, $blinkDelay: k }),
|
|
11
|
+
/* @__PURE__ */ e(d, { children: [
|
|
12
|
+
/* @__PURE__ */ r(I, { children: t ? /* @__PURE__ */ r(o, { src: S, alt: "Streak" }) : /* @__PURE__ */ r(o, { src: i, alt: "Streak" }) }),
|
|
13
|
+
/* @__PURE__ */ r(l, { $renderAs: "ab3-bold", $color: "WHITE", $align: "center", children: a })
|
|
16
14
|
] })
|
|
17
|
-
),
|
|
15
|
+
] })), A = $;
|
|
18
16
|
export {
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
$ as StreakIcon,
|
|
18
|
+
A as default
|
|
21
19
|
};
|
|
22
20
|
//# 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(
|
|
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 return (\n <S.StreakWrapper {...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\nexport default StreakIcon;\n"],"names":["StreakIcon","memo","value","blink","rest","jsxs","S.StreakWrapper","jsx","S.StreakStaticBg","S.StreakBg","BLINK_DURATION","BLINK_DELAY","S.StreakContent","S.StreakImg","S.StyledImg","StreakWhiteSVG","StreakGreenSVG","Text","StreakIcon$1"],"mappings":";;;;;;;AAUa,MAAAA,IAAyCC,EAAK,CAAC,EAAE,OAAAC,GAAO,OAAAC,IAAQ,IAAO,GAAGC,QAElF,gBAAAC,EAAAC,GAAA,EAAiB,GAAGF,GACnB,UAAA;AAAA,EAAC,gBAAAG,EAAAC,GAAA,EAAiB;AAAA,EACjBL,uBAAUM,GAAA,EAAW,gBAAgBC,GAAgB,aAAaC,GAAa;AAAA,EAChF,gBAAAN,EAACO,GAAA,EACC,UAAA;AAAA,IAAC,gBAAAL,EAAAM,GAAA,EACE,UAAAV,sBACEW,GAAA,EAAY,KAAKC,GAAgB,KAAI,UAAS,sBAE9CD,GAAA,EAAY,KAAKE,GAAgB,KAAI,SAAS,CAAA,GAEnD;AAAA,IACA,gBAAAT,EAACU,KAAK,WAAU,YAAW,QAAO,SAAQ,QAAO,UAC9C,UACHf,EAAA,CAAA;AAAA,EAAA,GACF;AACF,EAAA,CAAA,CAEH,GAEDgB,IAAelB;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -564,6 +564,8 @@ export declare const HelpIcon: React_2.FC<React_2.SVGProps<SVGSVGElement>>;
|
|
|
564
564
|
|
|
565
565
|
export declare const HighlighterIcon: React.FC<React.SVGProps<SVGSVGElement>>;
|
|
566
566
|
|
|
567
|
+
export declare const HintFillIcon: React.FC<React.SVGProps<SVGSVGElement>>;
|
|
568
|
+
|
|
567
569
|
export declare const HomeIcon: React_2.FC<React_2.SVGProps<SVGSVGElement>>;
|
|
568
570
|
|
|
569
571
|
export declare const HomeworkCardList: React_2.NamedExoticComponent<HWCardListProps>;
|
|
@@ -2824,6 +2826,14 @@ declare interface IPuzzle extends IBaseProject {
|
|
|
2824
2826
|
solved: boolean;
|
|
2825
2827
|
}
|
|
2826
2828
|
|
|
2829
|
+
declare interface IPuzzleAppProps {
|
|
2830
|
+
itemRef: string;
|
|
2831
|
+
title: string;
|
|
2832
|
+
imageHue: THueNames;
|
|
2833
|
+
feedbackComments?: string;
|
|
2834
|
+
tip?: string;
|
|
2835
|
+
}
|
|
2836
|
+
|
|
2827
2837
|
export declare interface IPuzzleCard {
|
|
2828
2838
|
sheetData: TLPARSheetData;
|
|
2829
2839
|
blockStatus?: TPuzzleCardBlockStatus | null;
|
|
@@ -2993,6 +3003,7 @@ export declare interface IReviewWorksheetModel {
|
|
|
2993
3003
|
title?: string;
|
|
2994
3004
|
worksheet_id?: string;
|
|
2995
3005
|
node_type: TNodeTypes;
|
|
3006
|
+
items?: TWorksheetItems[];
|
|
2996
3007
|
}
|
|
2997
3008
|
|
|
2998
3009
|
declare interface ISATSheetItemCallbacks {
|
|
@@ -3235,7 +3246,6 @@ declare interface IStepperProps {
|
|
|
3235
3246
|
declare interface IStreakIconProps extends React.HTMLProps<HTMLDivElement> {
|
|
3236
3247
|
value: number;
|
|
3237
3248
|
blink?: boolean;
|
|
3238
|
-
interactive?: boolean;
|
|
3239
3249
|
}
|
|
3240
3250
|
|
|
3241
3251
|
export declare interface IStreakLeaderboardDetails extends IBaseLeaderboardDetails {
|
|
@@ -4603,6 +4613,8 @@ declare const PUZZLE_CARD_STATE: {
|
|
|
4603
4613
|
|
|
4604
4614
|
declare const PUZZLE_CARDS: "puzzle_cards";
|
|
4605
4615
|
|
|
4616
|
+
export declare const PuzzleApp: NamedExoticComponent<IPuzzleAppProps>;
|
|
4617
|
+
|
|
4606
4618
|
export declare const PuzzleCard: FC<IPuzzleCardContainerProps>;
|
|
4607
4619
|
|
|
4608
4620
|
export declare const PuzzleFeedbackCelebration: FC;
|
|
@@ -5932,6 +5944,10 @@ export declare const Tutorial: ({ src, title, onCross, showProgress, onTutorialP
|
|
|
5932
5944
|
|
|
5933
5945
|
export declare const TutoringIcon: React_2.FC<React_2.SVGProps<SVGSVGElement>>;
|
|
5934
5946
|
|
|
5947
|
+
declare type TWorksheetItems = {
|
|
5948
|
+
ref: string;
|
|
5949
|
+
};
|
|
5950
|
+
|
|
5935
5951
|
declare type TWORKSHHET_QUESTION_MEDIA_TYPE = 'SIMULATION' | 'VIDEO' | 'AUDIO';
|
|
5936
5952
|
|
|
5937
5953
|
export declare type TZIndexMap = Record<keyof typeof ZINDEX, number>;
|