@cuemath/leap 3.2.3 → 3.2.4-aa0
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/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/ui/modals/modal-styled.js +35 -28
- package/dist/features/ui/modals/modal-styled.js.map +1 -1
- package/dist/features/ui/modals/modal.js +24 -15
- package/dist/features/ui/modals/modal.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/worksheet-question/worksheet-question.js +226 -245
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-styled.js +37 -28
- package/dist/features/worksheet/worksheet/worksheet-styled.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet.js +166 -164
- package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
import { useMessageBrokerChannel as
|
|
2
|
-
import { useMemo as
|
|
3
|
-
const
|
|
1
|
+
import { useMessageBrokerChannel as $ } from "@cuemath/cue-message-broker";
|
|
2
|
+
import { useMemo as C, useState as j, useRef as z, useCallback as f } from "react";
|
|
3
|
+
const M = (e) => ({
|
|
4
4
|
userId: e.userId,
|
|
5
5
|
data: e.data,
|
|
6
6
|
height: e.height,
|
|
7
7
|
responseId: e.responseId
|
|
8
|
-
}),
|
|
9
|
-
var
|
|
8
|
+
}), A = (e) => {
|
|
9
|
+
var a, i;
|
|
10
10
|
const n = {};
|
|
11
11
|
if (!e) return n;
|
|
12
12
|
for (const { message: u } of e) {
|
|
13
|
-
const t = (
|
|
13
|
+
const t = (a = u.payload) == null ? void 0 : a.eventPayload, r = t == null ? void 0 : t.responseId;
|
|
14
14
|
if (!(t != null && t.responseId)) continue;
|
|
15
|
-
const
|
|
16
|
-
|
|
15
|
+
const c = M(t);
|
|
16
|
+
r && n[r] ? (i = n[r]) == null || i.push(c) : n[r] = [c];
|
|
17
17
|
}
|
|
18
18
|
return n;
|
|
19
|
-
},
|
|
20
|
-
const u =
|
|
21
|
-
() =>
|
|
22
|
-
[
|
|
23
|
-
), [t,
|
|
19
|
+
}, E = (e, n, a, i = "canvas") => {
|
|
20
|
+
const u = C(
|
|
21
|
+
() => A(a),
|
|
22
|
+
[a]
|
|
23
|
+
), [t, r] = j(void 0), c = z({}), g = i === "canvas" || e.includes("practice") ? 0 : 24, S = C(
|
|
24
24
|
() => ({
|
|
25
25
|
channelId: e,
|
|
26
|
-
ttl:
|
|
26
|
+
ttl: g,
|
|
27
27
|
logger: n
|
|
28
28
|
}),
|
|
29
|
-
[e, n,
|
|
30
|
-
),
|
|
31
|
-
|
|
32
|
-
}, []),
|
|
29
|
+
[e, n, g]
|
|
30
|
+
), b = f((k, l) => {
|
|
31
|
+
c.current = { ...c.current, [k]: l };
|
|
32
|
+
}, []), D = f(
|
|
33
33
|
(k, l) => {
|
|
34
34
|
const h = u;
|
|
35
|
-
k.forEach((
|
|
35
|
+
k.forEach((F) => {
|
|
36
36
|
var I;
|
|
37
|
-
const { payload:
|
|
38
|
-
if (!l &&
|
|
39
|
-
|
|
40
|
-
data:
|
|
41
|
-
height:
|
|
42
|
-
userId:
|
|
43
|
-
responseId:
|
|
37
|
+
const { payload: O } = F.message, { eventPayload: s } = O, o = s == null ? void 0 : s.responseId, v = s == null ? void 0 : s.data, H = s == null ? void 0 : s.userId, W = s == null ? void 0 : s.height, p = c.current[o];
|
|
38
|
+
if (!l && p)
|
|
39
|
+
p({
|
|
40
|
+
data: v,
|
|
41
|
+
height: W,
|
|
42
|
+
userId: H,
|
|
43
|
+
responseId: o
|
|
44
44
|
});
|
|
45
45
|
else {
|
|
46
|
-
const
|
|
47
|
-
|
|
46
|
+
const m = M(s);
|
|
47
|
+
o && h[o] ? (I = h[o]) == null || I.push(m) : h[o] = [m];
|
|
48
48
|
}
|
|
49
|
-
}),
|
|
49
|
+
}), r(h);
|
|
50
50
|
},
|
|
51
51
|
[u]
|
|
52
|
-
), { publish:
|
|
53
|
-
channelOptions:
|
|
54
|
-
consumerFn:
|
|
55
|
-
metadataRequired:
|
|
56
|
-
}),
|
|
52
|
+
), { publish: R, channelStatus: q, channel: d, channelMetadata: B, setChannelMetadata: w } = $({
|
|
53
|
+
channelOptions: S,
|
|
54
|
+
consumerFn: D,
|
|
55
|
+
metadataRequired: i === "whiteboard"
|
|
56
|
+
}), x = f(() => {
|
|
57
57
|
d && d.destroyChannel();
|
|
58
58
|
}, [d]);
|
|
59
59
|
return {
|
|
60
|
-
publishStrokes:
|
|
61
|
-
channelStatus:
|
|
62
|
-
closeChannel:
|
|
60
|
+
publishStrokes: R,
|
|
61
|
+
channelStatus: q,
|
|
62
|
+
closeChannel: x,
|
|
63
63
|
initialStrokesData: t,
|
|
64
|
-
registerCallback:
|
|
65
|
-
setChannelMetadata:
|
|
66
|
-
channelMetadata:
|
|
64
|
+
registerCallback: b,
|
|
65
|
+
setChannelMetadata: w,
|
|
66
|
+
channelMetadata: B
|
|
67
67
|
};
|
|
68
|
-
},
|
|
68
|
+
}, K = E;
|
|
69
69
|
export {
|
|
70
|
-
|
|
70
|
+
K as default
|
|
71
71
|
};
|
|
72
72
|
//# sourceMappingURL=use-canvas-sync-broker.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-canvas-sync-broker.js","sources":["../../../../src/features/cue-canvas/hooks/use-canvas-sync-broker.ts"],"sourcesContent":["import type {\n IActionData,\n ICanvasUpdateConfig,\n IPublishData,\n TCueCanvasChangeDataObject,\n TRenderAs,\n} from '../types/cue-canvas';\n\nimport { useMessageBrokerChannel, type IChannelMessage } from '@cuemath/cue-message-broker';\nimport { useMemo, useCallback, useState, useRef } from 'react';\n\ninterface IMessage {\n eventName: string;\n eventPayload: {\n responseId: string;\n data: TCueCanvasChangeDataObject;\n userId: string;\n height: number;\n };\n}\n\nconst extractStrokeData = (payload: IMessage['eventPayload']): IActionData => ({\n userId: payload.userId,\n data: payload.data,\n height: payload.height,\n responseId: payload.responseId,\n});\n\nconst getCanvasDataFromInitialData = (\n initialCanvasData: Array<IChannelMessage> | undefined,\n): Record<string, IActionData[]> => {\n const map: Record<string, IActionData[]> = {};\n\n if (!initialCanvasData) return map;\n\n for (const { message } of initialCanvasData) {\n const payload = (message.payload as IMessage)?.eventPayload;\n const qrId = payload?.responseId;\n\n if (!payload?.responseId) continue;\n\n const strokeData = extractStrokeData(payload);\n\n if (qrId && map[qrId]) {\n map[qrId]?.push(strokeData);\n } else {\n map[qrId] = [strokeData];\n }\n }\n\n return map;\n};\n\nconst useCanvasSyncBroker = (\n channelId: string,\n logEvent: (type: string, payload?: Record<string, unknown>) => void,\n initialCanvasData?: Array<IChannelMessage>,\n type: TRenderAs = 'canvas',\n) => {\n const initialCanvasDataMap = useMemo(\n () => getCanvasDataFromInitialData(initialCanvasData),\n [initialCanvasData],\n );\n const [initialStrokesData, setInitialStrokesData] = useState<\n Record<string, IActionData[]> | undefined\n >(undefined);\n const callbacksMapRef = useRef<Record<string, (data: IActionData) => void>>({});\n\n const channelOptions = useMemo(\n () => ({\n channelId,\n ttl:
|
|
1
|
+
{"version":3,"file":"use-canvas-sync-broker.js","sources":["../../../../src/features/cue-canvas/hooks/use-canvas-sync-broker.ts"],"sourcesContent":["import type {\n IActionData,\n ICanvasUpdateConfig,\n IPublishData,\n TCueCanvasChangeDataObject,\n TRenderAs,\n} from '../types/cue-canvas';\n\nimport { useMessageBrokerChannel, type IChannelMessage } from '@cuemath/cue-message-broker';\nimport { useMemo, useCallback, useState, useRef } from 'react';\n\ninterface IMessage {\n eventName: string;\n eventPayload: {\n responseId: string;\n data: TCueCanvasChangeDataObject;\n userId: string;\n height: number;\n };\n}\n\nconst extractStrokeData = (payload: IMessage['eventPayload']): IActionData => ({\n userId: payload.userId,\n data: payload.data,\n height: payload.height,\n responseId: payload.responseId,\n});\n\nconst getCanvasDataFromInitialData = (\n initialCanvasData: Array<IChannelMessage> | undefined,\n): Record<string, IActionData[]> => {\n const map: Record<string, IActionData[]> = {};\n\n if (!initialCanvasData) return map;\n\n for (const { message } of initialCanvasData) {\n const payload = (message.payload as IMessage)?.eventPayload;\n const qrId = payload?.responseId;\n\n if (!payload?.responseId) continue;\n\n const strokeData = extractStrokeData(payload);\n\n if (qrId && map[qrId]) {\n map[qrId]?.push(strokeData);\n } else {\n map[qrId] = [strokeData];\n }\n }\n\n return map;\n};\n\nconst useCanvasSyncBroker = (\n channelId: string,\n logEvent: (type: string, payload?: Record<string, unknown>) => void,\n initialCanvasData?: Array<IChannelMessage>,\n type: TRenderAs = 'canvas',\n) => {\n const initialCanvasDataMap = useMemo(\n () => getCanvasDataFromInitialData(initialCanvasData),\n [initialCanvasData],\n );\n const [initialStrokesData, setInitialStrokesData] = useState<\n Record<string, IActionData[]> | undefined\n >(undefined);\n const callbacksMapRef = useRef<Record<string, (data: IActionData) => void>>({});\n const ttl = type === 'canvas' ? 0 : channelId.includes('practice') ? 0 : 24;\n\n const channelOptions = useMemo(\n () => ({\n channelId,\n ttl: ttl,\n logger: logEvent,\n }),\n [channelId, logEvent, ttl],\n );\n\n const registerCallback = useCallback((qrId: string, cb: (data: IActionData) => void) => {\n callbacksMapRef.current = { ...callbacksMapRef.current, [qrId]: cb };\n }, []);\n\n const onMessageReceive = useCallback(\n (messages: Array<IChannelMessage>, initialData?: boolean) => {\n const strokesPerWidgetMap: Record<string, Array<IActionData>> = initialCanvasDataMap;\n\n messages.forEach(message => {\n const { payload } = message.message;\n const { eventPayload } = payload as IMessage;\n const qrId = eventPayload?.responseId as string;\n const strokes = eventPayload?.data;\n const userId = eventPayload?.userId;\n const canvasHeight = eventPayload?.height;\n const widgetOnReceiveCallback = callbacksMapRef.current[qrId];\n\n if (!initialData && widgetOnReceiveCallback) {\n widgetOnReceiveCallback({\n data: strokes,\n height: canvasHeight,\n userId,\n responseId: qrId,\n });\n } else {\n const strokeData = extractStrokeData(eventPayload);\n\n if (qrId && strokesPerWidgetMap[qrId]) {\n strokesPerWidgetMap[qrId]?.push(strokeData);\n } else {\n strokesPerWidgetMap[qrId] = [strokeData];\n }\n }\n });\n setInitialStrokesData(strokesPerWidgetMap);\n },\n [initialCanvasDataMap],\n );\n\n const { publish, channelStatus, channel, channelMetadata, setChannelMetadata } =\n useMessageBrokerChannel<IPublishData, ICanvasUpdateConfig>({\n channelOptions,\n consumerFn: onMessageReceive,\n metadataRequired: type === 'whiteboard',\n });\n\n const closeChannel = useCallback(() => {\n if (channel) {\n channel.destroyChannel();\n }\n }, [channel]);\n\n return {\n publishStrokes: publish,\n channelStatus,\n closeChannel,\n initialStrokesData,\n registerCallback,\n setChannelMetadata,\n channelMetadata,\n };\n};\n\nexport default useCanvasSyncBroker;\n"],"names":["extractStrokeData","payload","getCanvasDataFromInitialData","initialCanvasData","map","message","_a","qrId","strokeData","_b","useCanvasSyncBroker","channelId","logEvent","type","initialCanvasDataMap","useMemo","initialStrokesData","setInitialStrokesData","useState","callbacksMapRef","useRef","ttl","channelOptions","registerCallback","useCallback","cb","onMessageReceive","messages","initialData","strokesPerWidgetMap","eventPayload","strokes","userId","canvasHeight","widgetOnReceiveCallback","publish","channelStatus","channel","channelMetadata","setChannelMetadata","useMessageBrokerChannel","closeChannel","useCanvasSyncBroker$1"],"mappings":"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"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
const s =
|
|
3
|
-
({ theme: { colors:
|
|
1
|
+
import a from "styled-components";
|
|
2
|
+
const s = a.div(
|
|
3
|
+
({ theme: { colors: t, zIndex: o }, $isClosing: e }) => `
|
|
4
4
|
position: fixed;
|
|
5
5
|
top: 0;
|
|
6
6
|
left: 0;
|
|
7
7
|
right: 0;
|
|
8
8
|
bottom: 0;
|
|
9
|
-
background-color: ${
|
|
9
|
+
background-color: ${t.BLACK_T_60};
|
|
10
10
|
backdrop-filter: blur(40px);
|
|
11
11
|
display: flex;
|
|
12
|
-
animation: ${
|
|
13
|
-
z-index: ${
|
|
12
|
+
animation: ${e ? "backdropFadeOut" : "backdropFadeIn"} 0.2s ease-out forwards;
|
|
13
|
+
z-index: ${o.MODAL};
|
|
14
14
|
|
|
15
15
|
@keyframes backdropFadeIn {
|
|
16
16
|
from {
|
|
@@ -30,20 +30,20 @@ const s = o.div(
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
`
|
|
33
|
-
), l =
|
|
34
|
-
({ theme: { colors:
|
|
33
|
+
), l = a.div(
|
|
34
|
+
({ theme: { colors: t }, $isClosing: o, $width: e }) => `
|
|
35
35
|
position: relative;
|
|
36
36
|
align-self: center;
|
|
37
37
|
margin: 0 auto;
|
|
38
|
-
width: ${
|
|
39
|
-
background-color: ${
|
|
40
|
-
border: 1px solid ${
|
|
38
|
+
width: ${e};
|
|
39
|
+
background-color: ${t.WHITE_1};
|
|
40
|
+
border: 1px solid ${t.BLACK_1};
|
|
41
41
|
transform-origin: center center;
|
|
42
|
-
animation: ${
|
|
42
|
+
animation: ${o ? "modalDisappear" : "modalAppear"} 0.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;
|
|
43
43
|
box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.20);
|
|
44
44
|
|
|
45
45
|
/* Responsive behavior for smaller screens */
|
|
46
|
-
@media (max-width: calc(${
|
|
46
|
+
@media (max-width: calc(${e} + 80px)) {
|
|
47
47
|
width: 100%;
|
|
48
48
|
max-width: 100%;
|
|
49
49
|
height: 100%;
|
|
@@ -73,40 +73,46 @@ const s = o.div(
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
`
|
|
76
|
-
), c =
|
|
77
|
-
({ $modalWidth:
|
|
76
|
+
), c = a.div(
|
|
77
|
+
({ $modalWidth: t }) => `
|
|
78
78
|
max-height: calc(100vh - 142px);
|
|
79
79
|
overflow-y: auto;
|
|
80
80
|
|
|
81
|
-
@media (max-width: calc(${
|
|
81
|
+
@media (max-width: calc(${t} + 80px)) {
|
|
82
82
|
max-height: 100vh;
|
|
83
83
|
}
|
|
84
84
|
}`
|
|
85
|
-
),
|
|
86
|
-
({ theme: { colors:
|
|
85
|
+
), d = a.div(
|
|
86
|
+
({ theme: { colors: t }, $modalWidth: o }) => `
|
|
87
87
|
position: absolute;
|
|
88
88
|
top: -56px;
|
|
89
89
|
right: -40px;
|
|
90
|
-
color: ${
|
|
90
|
+
color: ${t.WHITE_1};
|
|
91
91
|
transition: all 0.2s ease;
|
|
92
92
|
|
|
93
93
|
&:hover {
|
|
94
94
|
transform: scale(1.05);
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
@media (max-width: calc(${
|
|
97
|
+
@media (max-width: calc(${o} + 80px)) {
|
|
98
98
|
top: 16px;
|
|
99
99
|
right: 16px;
|
|
100
|
-
color: ${
|
|
100
|
+
color: ${t.BLACK_1};
|
|
101
101
|
}
|
|
102
102
|
`
|
|
103
|
-
),
|
|
104
|
-
|
|
103
|
+
), m = a.div`
|
|
104
|
+
display: flex;
|
|
105
|
+
align-items: center;
|
|
106
|
+
justify-content: center;
|
|
107
|
+
height: 100vh;
|
|
108
|
+
width: 100%;
|
|
109
|
+
`, i = 720, r = 800, n = 500, h = a.div(
|
|
110
|
+
({ $isClosing: t }) => `
|
|
105
111
|
position: absolute;
|
|
106
|
-
width: ${
|
|
112
|
+
width: ${i}px;
|
|
107
113
|
height: 100%;
|
|
108
114
|
left: 50%;
|
|
109
|
-
margin-left: ${-(
|
|
115
|
+
margin-left: ${-(i / 2)}px;
|
|
110
116
|
clip-path: polygon(calc(50% - 100px) 0, calc(50% + 100px) 0, 100% 100%, 0 100%);
|
|
111
117
|
background: linear-gradient(
|
|
112
118
|
180deg,
|
|
@@ -118,7 +124,7 @@ const s = o.div(
|
|
|
118
124
|
animation-timing-function: linear;
|
|
119
125
|
animation-fill-mode: forwards;
|
|
120
126
|
opacity: 0;
|
|
121
|
-
${
|
|
127
|
+
${t ? `
|
|
122
128
|
animation: closeSpotlight;
|
|
123
129
|
animation-duration: ${n}ms;
|
|
124
130
|
animation-timing-function: linear;
|
|
@@ -148,8 +154,9 @@ const s = o.div(
|
|
|
148
154
|
export {
|
|
149
155
|
l as BaseModal,
|
|
150
156
|
c as BaseModalContent,
|
|
151
|
-
|
|
157
|
+
d as CloseButtonContainer,
|
|
152
158
|
s as ModalContainer,
|
|
153
|
-
|
|
159
|
+
m as ModalLoaderWrapper,
|
|
160
|
+
h as SpotlightModal
|
|
154
161
|
};
|
|
155
162
|
//# sourceMappingURL=modal-styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal-styled.js","sources":["../../../../src/features/ui/modals/modal-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nconst ModalContainer = styled.div<{ $isClosing?: boolean }>(\n ({ theme: { colors, zIndex }, $isClosing }) => `\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: ${colors.BLACK_T_60};\n backdrop-filter: blur(40px);\n display: flex;\n animation: ${$isClosing ? 'backdropFadeOut' : 'backdropFadeIn'} 0.2s ease-out forwards;\n z-index: ${zIndex.MODAL};\n\n @keyframes backdropFadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n \n @keyframes backdropFadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n }\n`,\n);\n\n/**\n * Base modal container with customizable width and animation state\n */\nconst BaseModal = styled.div<{\n $isClosing?: boolean;\n $width: string;\n}>(\n ({ theme: { colors }, $isClosing, $width }) => `\n position: relative;\n align-self: center;\n margin: 0 auto;\n width: ${$width};\n background-color: ${colors.WHITE_1};\n border: 1px solid ${colors.BLACK_1};\n transform-origin: center center;\n animation: ${\n $isClosing ? 'modalDisappear' : 'modalAppear'\n } 0.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;\n box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.20);\n \n /* Responsive behavior for smaller screens */\n @media (max-width: calc(${$width} + 80px)) {\n width: 100%;\n max-width: 100%;\n height: 100%;\n max-height: 100%;\n border: none;\n }\n \n @keyframes modalAppear {\n 0% {\n opacity: 0;\n transform: perspective(1200px) translateZ(-50px) translateY(10px) scale(0.98);\n }\n 100% {\n opacity: 1;\n transform: perspective(1200px) translateZ(0) translateY(0) scale(1);\n }\n }\n \n @keyframes modalDisappear {\n 0% {\n opacity: 1;\n transform: perspective(1200px) translateZ(0) translateY(0) scale(1);\n }\n 100% {\n opacity: 0;\n transform: perspective(1200px) translateZ(-50px) translateY(10px) scale(0.98);\n }\n }\n`,\n);\n\n/**\n * Scrollable content container inside the modal\n */\nconst BaseModalContent = styled.div<{ $modalWidth: string }>(\n ({ $modalWidth }) => `\n max-height: calc(100vh - 142px);\n overflow-y: auto;\n\n @media (max-width: calc(${$modalWidth} + 80px)) {\n max-height: 100vh;\n }\n}`,\n);\n\n/**\n * Container for the close button with responsive positioning\n */\nconst CloseButtonContainer = styled.div<{ $modalWidth: string }>(\n ({ theme: { colors }, $modalWidth }) => `\n position: absolute;\n top: -56px;\n right: -40px;\n color: ${colors.WHITE_1};\n transition: all 0.2s ease;\n \n &:hover {\n transform: scale(1.05);\n }\n\n @media (max-width: calc(${$modalWidth} + 80px)) {\n top: 16px;\n right: 16px;\n color: ${colors.BLACK_1};\n }\n`,\n);\n\nconst spotlightWidth = 720;\nconst spotlightAnimationStartDuration = 800;\nconst spotlightAnimationEndDuration = 500;\n\nconst SpotlightModal = styled.div<{\n $isClosing?: boolean;\n}>(\n ({ $isClosing }) => `\n position: absolute;\n width: ${spotlightWidth}px;\n height: 100%;\n left: 50%;\n margin-left: ${-(spotlightWidth / 2)}px;\n clip-path: polygon(calc(50% - 100px) 0, calc(50% + 100px) 0, 100% 100%, 0 100%);\n background: linear-gradient(\n 180deg,\n rgba(0, 0, 0, 1) 0%,\n rgba(0, 0, 0, 0) 100%\n );\n animation: openSpotlight;\n animation-duration: ${spotlightAnimationStartDuration}ms;\n animation-timing-function: linear;\n animation-fill-mode: forwards;\n opacity: 0;\n ${\n $isClosing\n ? `\n animation: closeSpotlight;\n animation-duration: ${spotlightAnimationEndDuration}ms;\n animation-timing-function: linear;\n animation-fill-mode: forwards;\n opacity: 1;\n `\n : ''\n }\n\n @keyframes openSpotlight {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n @keyframes closeSpotlight {\n from {\n transform: rotateY(0);\n }\n to {\n transform: rotateY(90deg);\n }\n }\n`,\n);\n\nexport {
|
|
1
|
+
{"version":3,"file":"modal-styled.js","sources":["../../../../src/features/ui/modals/modal-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../layout/flex-view';\n\nconst ModalContainer = styled.div<{ $isClosing?: boolean }>(\n ({ theme: { colors, zIndex }, $isClosing }) => `\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: ${colors.BLACK_T_60};\n backdrop-filter: blur(40px);\n display: flex;\n animation: ${$isClosing ? 'backdropFadeOut' : 'backdropFadeIn'} 0.2s ease-out forwards;\n z-index: ${zIndex.MODAL};\n\n @keyframes backdropFadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n \n @keyframes backdropFadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n }\n`,\n);\n\n/**\n * Base modal container with customizable width and animation state\n */\nconst BaseModal = styled.div<{\n $isClosing?: boolean;\n $width: string;\n}>(\n ({ theme: { colors }, $isClosing, $width }) => `\n position: relative;\n align-self: center;\n margin: 0 auto;\n width: ${$width};\n background-color: ${colors.WHITE_1};\n border: 1px solid ${colors.BLACK_1};\n transform-origin: center center;\n animation: ${\n $isClosing ? 'modalDisappear' : 'modalAppear'\n } 0.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;\n box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.20);\n \n /* Responsive behavior for smaller screens */\n @media (max-width: calc(${$width} + 80px)) {\n width: 100%;\n max-width: 100%;\n height: 100%;\n max-height: 100%;\n border: none;\n }\n \n @keyframes modalAppear {\n 0% {\n opacity: 0;\n transform: perspective(1200px) translateZ(-50px) translateY(10px) scale(0.98);\n }\n 100% {\n opacity: 1;\n transform: perspective(1200px) translateZ(0) translateY(0) scale(1);\n }\n }\n \n @keyframes modalDisappear {\n 0% {\n opacity: 1;\n transform: perspective(1200px) translateZ(0) translateY(0) scale(1);\n }\n 100% {\n opacity: 0;\n transform: perspective(1200px) translateZ(-50px) translateY(10px) scale(0.98);\n }\n }\n`,\n);\n\n/**\n * Scrollable content container inside the modal\n */\nconst BaseModalContent = styled.div<{ $modalWidth: string }>(\n ({ $modalWidth }) => `\n max-height: calc(100vh - 142px);\n overflow-y: auto;\n\n @media (max-width: calc(${$modalWidth} + 80px)) {\n max-height: 100vh;\n }\n}`,\n);\n\n/**\n * Container for the close button with responsive positioning\n */\nconst CloseButtonContainer = styled.div<{ $modalWidth: string }>(\n ({ theme: { colors }, $modalWidth }) => `\n position: absolute;\n top: -56px;\n right: -40px;\n color: ${colors.WHITE_1};\n transition: all 0.2s ease;\n \n &:hover {\n transform: scale(1.05);\n }\n\n @media (max-width: calc(${$modalWidth} + 80px)) {\n top: 16px;\n right: 16px;\n color: ${colors.BLACK_1};\n }\n`,\n);\n\nconst ModalLoaderWrapper = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100vh;\n width: 100%;\n`;\n\nconst spotlightWidth = 720;\nconst spotlightAnimationStartDuration = 800;\nconst spotlightAnimationEndDuration = 500;\n\nconst SpotlightModal = styled.div<{\n $isClosing?: boolean;\n}>(\n ({ $isClosing }) => `\n position: absolute;\n width: ${spotlightWidth}px;\n height: 100%;\n left: 50%;\n margin-left: ${-(spotlightWidth / 2)}px;\n clip-path: polygon(calc(50% - 100px) 0, calc(50% + 100px) 0, 100% 100%, 0 100%);\n background: linear-gradient(\n 180deg,\n rgba(0, 0, 0, 1) 0%,\n rgba(0, 0, 0, 0) 100%\n );\n animation: openSpotlight;\n animation-duration: ${spotlightAnimationStartDuration}ms;\n animation-timing-function: linear;\n animation-fill-mode: forwards;\n opacity: 0;\n ${\n $isClosing\n ? `\n animation: closeSpotlight;\n animation-duration: ${spotlightAnimationEndDuration}ms;\n animation-timing-function: linear;\n animation-fill-mode: forwards;\n opacity: 1;\n `\n : ''\n }\n\n @keyframes openSpotlight {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n @keyframes closeSpotlight {\n from {\n transform: rotateY(0);\n }\n to {\n transform: rotateY(90deg);\n }\n }\n`,\n);\n\nexport {\n ModalContainer,\n BaseModal,\n BaseModalContent,\n CloseButtonContainer,\n SpotlightModal,\n ModalLoaderWrapper,\n};\n"],"names":["ModalContainer","styled","colors","zIndex","$isClosing","BaseModal","$width","BaseModalContent","$modalWidth","CloseButtonContainer","ModalLoaderWrapper","spotlightWidth","spotlightAnimationStartDuration","spotlightAnimationEndDuration","SpotlightModal"],"mappings":";AAIA,MAAMA,IAAiBC,EAAO;AAAA,EAC5B,CAAC,EAAE,OAAO,EAAE,QAAAC,GAAQ,QAAAC,EAAO,GAAG,YAAAC,QAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAM3BF,EAAO,UAAU;AAAA;AAAA;AAAA,eAGxBE,IAAa,oBAAoB,gBAAgB;AAAA,aACnDD,EAAO,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBzB,GAKME,IAAYJ,EAAO;AAAA,EAIvB,CAAC,EAAE,OAAO,EAAE,QAAAC,EAAU,GAAA,YAAAE,GAAY,QAAAE,QAAa;AAAA;AAAA;AAAA;AAAA,WAItCA,CAAM;AAAA,sBACKJ,EAAO,OAAO;AAAA,sBACdA,EAAO,OAAO;AAAA;AAAA,eAGhCE,IAAa,mBAAmB,aAClC;AAAA;AAAA;AAAA;AAAA,4BAI0BE,CAAM;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;AA8BlC,GAKMC,IAAmBN,EAAO;AAAA,EAC9B,CAAC,EAAE,aAAAO,EAAA,MAAkB;AAAA;AAAA;AAAA;AAAA,4BAIKA,CAAW;AAAA;AAAA;AAAA;AAIvC,GAKMC,IAAuBR,EAAO;AAAA,EAClC,CAAC,EAAE,OAAO,EAAE,QAAAC,EAAO,GAAG,aAAAM,EAAkB,MAAA;AAAA;AAAA;AAAA;AAAA,WAI/BN,EAAO,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAOGM,CAAW;AAAA;AAAA;AAAA,aAG1BN,EAAO,OAAO;AAAA;AAAA;AAG3B,GAEMQ,IAAqBT,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQ5BU,IAAiB,KACjBC,IAAkC,KAClCC,IAAgC,KAEhCC,IAAiBb,EAAO;AAAA,EAG5B,CAAC,EAAE,YAAAG,EAAA,MAAiB;AAAA;AAAA,WAEXO,CAAc;AAAA;AAAA;AAAA,iBAGR,EAAEA,IAAiB,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAQdC,CAA+B;AAAA;AAAA;AAAA;AAAA,IAKnDR,IACI;AAAA;AAAA,4BAEoBS,CAA6B;AAAA;AAAA;AAAA;AAAA,QAKjD,EACN;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBF;"}
|
|
@@ -1,19 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { memo as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
/* @__PURE__ */
|
|
14
|
-
|
|
1
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import { memo as p, Suspense as t } from "react";
|
|
3
|
+
import { ErrorBoundary as a } from "react-error-boundary";
|
|
4
|
+
import C from "../../../assets/line-icons/icons/cross.js";
|
|
5
|
+
import d from "../error/error.js";
|
|
6
|
+
import b from "../buttons/clickable/clickable.js";
|
|
7
|
+
import h from "../loader/app-loader/app-loader.js";
|
|
8
|
+
import { ModalContainer as n, SpotlightModal as g, ModalLoaderWrapper as $, BaseModal as k, CloseButtonContainer as u, BaseModalContent as M } from "./modal-styled.js";
|
|
9
|
+
const L = p(({ modal: s, isClosing: o = !1, onClose: m }) => {
|
|
10
|
+
const { renderAs: c, element: e, modalWidth: l, isDismissable: f } = s;
|
|
11
|
+
return c === "spotlight" ? /* @__PURE__ */ r(a, { fallback: /* @__PURE__ */ r(d, { height: "100vh" }), children: /* @__PURE__ */ i(n, { $isClosing: o, children: [
|
|
12
|
+
/* @__PURE__ */ r(g, { $isClosing: o }),
|
|
13
|
+
/* @__PURE__ */ r(
|
|
14
|
+
t,
|
|
15
|
+
{
|
|
16
|
+
fallback: /* @__PURE__ */ r($, { children: /* @__PURE__ */ r(h, { height: "100vh" }) }),
|
|
17
|
+
children: e
|
|
18
|
+
}
|
|
19
|
+
)
|
|
20
|
+
] }) }) : /* @__PURE__ */ r(a, { fallback: /* @__PURE__ */ r(d, { height: "100vh" }), children: /* @__PURE__ */ r(n, { $isClosing: o, children: /* @__PURE__ */ i(k, { $isClosing: o, $width: l, children: [
|
|
21
|
+
f !== !1 && /* @__PURE__ */ r(u, { $modalWidth: l, children: /* @__PURE__ */ r(b, { label: "Close", onClick: m, children: /* @__PURE__ */ r(C, { width: 40, height: 40 }) }) }),
|
|
22
|
+
/* @__PURE__ */ r(M, { $modalWidth: l, children: /* @__PURE__ */ r(t, { fallback: /* @__PURE__ */ r(h, {}), children: e }) })
|
|
23
|
+
] }) }) });
|
|
15
24
|
});
|
|
16
25
|
export {
|
|
17
|
-
|
|
26
|
+
L as default
|
|
18
27
|
};
|
|
19
28
|
//# sourceMappingURL=modal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.js","sources":["../../../../src/features/ui/modals/modal.tsx"],"sourcesContent":["import type { IModalProps } from './modal-types';\nimport type { FC } from 'react';\n\nimport { memo } from 'react';\n\nimport CrossIcon from '../../../assets/line-icons/icons/cross';\nimport Clickable from '../buttons/clickable/clickable';\nimport * as Styled from './modal-styled';\n\n/**\n * Modal component that renders modal content with close button\n * Handles animation state for entry and exit transitions\n */\nconst Modal: FC<IModalProps> = memo(({ modal, isClosing = false, onClose }) => {\n const { renderAs, element, modalWidth, isDismissable } = modal;\n\n if (renderAs === 'spotlight') {\n return (\n <Styled.ModalContainer $isClosing={isClosing}>\n
|
|
1
|
+
{"version":3,"file":"modal.js","sources":["../../../../src/features/ui/modals/modal.tsx"],"sourcesContent":["import type { IModalProps } from './modal-types';\nimport type { FC } from 'react';\n\nimport { memo, Suspense } from 'react';\nimport { ErrorBoundary } from 'react-error-boundary';\n\nimport CrossIcon from '../../../assets/line-icons/icons/cross';\nimport Error from '../../ui/error/error';\nimport Clickable from '../buttons/clickable/clickable';\nimport AppLoader from '../loader/app-loader/app-loader';\nimport * as Styled from './modal-styled';\n\n/**\n * Modal component that renders modal content with close button\n * Handles animation state for entry and exit transitions\n */\nconst Modal: FC<IModalProps> = memo(({ modal, isClosing = false, onClose }) => {\n const { renderAs, element, modalWidth, isDismissable } = modal;\n\n if (renderAs === 'spotlight') {\n return (\n <ErrorBoundary fallback={<Error height=\"100vh\" />}>\n <Styled.ModalContainer $isClosing={isClosing}>\n <Styled.SpotlightModal $isClosing={isClosing} />\n <Suspense\n fallback={\n <Styled.ModalLoaderWrapper>\n <AppLoader height=\"100vh\" />\n </Styled.ModalLoaderWrapper>\n }\n >\n {element}\n </Suspense>\n </Styled.ModalContainer>\n </ErrorBoundary>\n );\n }\n\n return (\n <ErrorBoundary fallback={<Error height=\"100vh\" />}>\n <Styled.ModalContainer $isClosing={isClosing}>\n <Styled.BaseModal $isClosing={isClosing} $width={modalWidth}>\n {isDismissable !== false && (\n <Styled.CloseButtonContainer $modalWidth={modalWidth}>\n <Clickable label=\"Close\" onClick={onClose}>\n <CrossIcon width={40} height={40} />\n </Clickable>\n </Styled.CloseButtonContainer>\n )}\n <Styled.BaseModalContent $modalWidth={modalWidth}>\n <Suspense fallback={<AppLoader />}>{element}</Suspense>\n </Styled.BaseModalContent>\n </Styled.BaseModal>\n </Styled.ModalContainer>\n </ErrorBoundary>\n );\n});\n\nexport default Modal;\n"],"names":["Modal","memo","modal","isClosing","onClose","renderAs","element","modalWidth","isDismissable","jsx","ErrorBoundary","Error","jsxs","Styled.ModalContainer","Styled.SpotlightModal","Suspense","Styled.ModalLoaderWrapper","AppLoader","Styled.BaseModal","Styled.CloseButtonContainer","Clickable","CrossIcon","Styled.BaseModalContent"],"mappings":";;;;;;;;AAgBM,MAAAA,IAAyBC,EAAK,CAAC,EAAE,OAAAC,GAAO,WAAAC,IAAY,IAAO,SAAAC,QAAc;AAC7E,QAAM,EAAE,UAAAC,GAAU,SAAAC,GAAS,YAAAC,GAAY,eAAAC,MAAkBN;AAEzD,SAAIG,MAAa,cAEZ,gBAAAI,EAAAC,GAAA,EAAc,UAAU,gBAAAD,EAACE,GAAM,EAAA,QAAO,QAAQ,CAAA,GAC7C,UAAC,gBAAAC,EAAAC,GAAA,EAAsB,YAAYV,GACjC,UAAA;AAAA,IAAA,gBAAAM,EAACK,GAAA,EAAsB,YAAYX,EAAW,CAAA;AAAA,IAC9C,gBAAAM;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,4BACGC,GAAA,EACC,UAAC,gBAAAP,EAAAQ,GAAA,EAAU,QAAO,QAAQ,CAAA,GAC5B;AAAA,QAGD,UAAAX;AAAA,MAAA;AAAA,IACH;AAAA,EAAA,EACF,CAAA,EACF,CAAA,IAKF,gBAAAG,EAACC,KAAc,UAAU,gBAAAD,EAACE,KAAM,QAAO,SAAQ,GAC7C,UAAC,gBAAAF,EAAAI,GAAA,EAAsB,YAAYV,GACjC,UAAC,gBAAAS,EAAAM,GAAA,EAAiB,YAAYf,GAAW,QAAQI,GAC9C,UAAA;AAAA,IAAkBC,MAAA,wBAChBW,GAAA,EAA4B,aAAaZ,GACxC,4BAACa,GAAU,EAAA,OAAM,SAAQ,SAAShB,GAChC,4BAACiB,GAAU,EAAA,OAAO,IAAI,QAAQ,IAAI,GACpC,EACF,CAAA;AAAA,IAED,gBAAAZ,EAAAa,GAAA,EAAwB,aAAaf,GACpC,UAAC,gBAAAE,EAAAM,GAAA,EAAS,UAAU,gBAAAN,EAACQ,GAAU,CAAA,CAAA,GAAK,YAAQ,CAAA,GAC9C;AAAA,EAAA,GACF,GACF,EACF,CAAA;AAEJ,CAAC;"}
|
|
@@ -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;"}
|