@cuemath/leap 2.8.36-hg3 → 2.8.36-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 +2 -0
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/lottie/lottie.js +0 -6
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/assets/sounds/sounds.js +7 -0
- package/dist/assets/sounds/sounds.js.map +1 -0
- package/dist/features/circle-games/game-launcher/comps/segmented-game-card/constants.js +6 -6
- package/dist/features/circle-games/game-launcher/comps/segmented-game-card/constants.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card-styled.js +73 -29
- package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card-styled.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card.js +85 -87
- package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card.js.map +1 -1
- package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js +15 -25
- package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js.map +1 -1
- package/dist/features/circle-games/game-launcher/game-launcher.js +65 -108
- package/dist/features/circle-games/game-launcher/game-launcher.js.map +1 -1
- package/dist/features/circle-games/games/web-view/enums/project-ids-enum.js +14 -0
- package/dist/features/circle-games/games/web-view/enums/project-ids-enum.js.map +1 -0
- package/dist/features/circle-games/games/web-view/enums/project-type-enum.js +1 -1
- package/dist/features/circle-games/games/web-view/enums/project-type-enum.js.map +1 -1
- package/dist/features/circle-games/games/web-view/web-view-types.js.map +1 -1
- package/dist/features/circle-games/games/web-view/web-view.js +82 -69
- package/dist/features/circle-games/games/web-view/web-view.js.map +1 -1
- package/dist/features/post-game-stats/accuracy/accuracy-styled.js +16 -17
- package/dist/features/post-game-stats/accuracy/accuracy-styled.js.map +1 -1
- package/dist/features/post-game-stats/clock/clock-styled.js +10 -11
- package/dist/features/post-game-stats/clock/clock-styled.js.map +1 -1
- package/dist/features/post-game-stats/points/points.js +24 -25
- package/dist/features/post-game-stats/points/points.js.map +1 -1
- package/dist/features/post-game-stats/post-game-stats-styled.js +1 -1
- package/dist/features/post-game-stats/post-game-stats-styled.js.map +1 -1
- package/dist/features/post-game-stats/streak/streak-styled.js +17 -18
- package/dist/features/post-game-stats/streak/streak-styled.js.map +1 -1
- package/dist/features/talk-meter/helper.js +11 -0
- package/dist/features/talk-meter/helper.js.map +1 -0
- package/dist/features/talk-meter/hooks/use-talk-meter.js +112 -0
- package/dist/features/talk-meter/hooks/use-talk-meter.js.map +1 -0
- package/dist/features/talk-meter/ripple/index.js +62 -0
- package/dist/features/talk-meter/ripple/index.js.map +1 -0
- package/dist/features/talk-meter/talk-meter-styled.js +89 -0
- package/dist/features/talk-meter/talk-meter-styled.js.map +1 -0
- package/dist/features/talk-meter/talk-meter-view/talk-meter-view-styled.js +22 -0
- package/dist/features/talk-meter/talk-meter-view/talk-meter-view-styled.js.map +1 -0
- package/dist/features/talk-meter/talk-meter-view/talk-meter-view.js +101 -0
- package/dist/features/talk-meter/talk-meter-view/talk-meter-view.js.map +1 -0
- package/dist/features/talk-meter/talk-meter.js +73 -0
- package/dist/features/talk-meter/talk-meter.js.map +1 -0
- package/dist/features/trial-session/comps/trial-circle-game/constants.js.map +1 -1
- package/dist/features/trial-session/comps/trial-circle-game/trial-circle-game.js.map +1 -1
- package/dist/index.d.ts +141 -78
- package/dist/index.js +201 -194
- package/dist/index.js.map +1 -1
- package/dist/static/female-avatar.b8cd1012.svg +1 -0
- package/dist/static/male-avatar.2febc9eb.svg +1 -0
- package/package.json +2 -3
- package/dist/features/circle-games/game-launcher/comps/card-container/card-container-styled.js +0 -53
- package/dist/features/circle-games/game-launcher/comps/card-container/card-container-styled.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/card-container/card-container.js +0 -24
- package/dist/features/circle-games/game-launcher/comps/card-container/card-container.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/card-container/constants.js +0 -7
- package/dist/features/circle-games/game-launcher/comps/card-container/constants.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/constants.js +0 -20
- package/dist/features/circle-games/game-launcher/comps/tables-card/constants.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode/table-mode-styled.js +0 -24
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode/table-mode-styled.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode/table-mode.js +0 -54
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode/table-mode.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-star/table-star-styled.js +0 -11
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-star/table-star-styled.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-star/table-star.js +0 -16
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-star/table-star.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card-styled.js +0 -161
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card-styled.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card.js +0 -225
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card.js.map +0 -1
- package/dist/static/advance-mode-segment-lottie.51ff6707.json +0 -1
- package/dist/static/infinite-button-bg.5909225e.json +0 -1
- package/dist/static/infinite-button-symbol.aa31350c.json +0 -1
- package/dist/static/random-mode-segment-lottie.79cf1c07.json +0 -1
- package/dist/static/sequence-mode-segment-lottie.11ac49e9.json +0 -1
- package/dist/static/table-mode-reveal.b44a82c3.json +0 -1
@@ -1,102 +1,115 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import { forwardRef as
|
3
|
-
import { useUIContext as
|
1
|
+
import { jsx as G } from "react/jsx-runtime";
|
2
|
+
import { forwardRef as M, useRef as W, useMemo as j, useCallback as A, useImperativeHandle as H, useEffect as V } from "react";
|
3
|
+
import { useUIContext as $ } from "../../../ui/context/context.js";
|
4
4
|
import { ALLOWED_ORIGIN as N } from "./constants.js";
|
5
|
-
import { ProjectType as
|
6
|
-
import { WebViewEvent as
|
7
|
-
const
|
5
|
+
import { ProjectType as I } from "./enums/project-type-enum.js";
|
6
|
+
import { WebViewEvent as i } from "./enums/web-view-events-enum.js";
|
7
|
+
const q = M((C, P) => {
|
8
8
|
const {
|
9
|
-
baseUrl:
|
10
|
-
projectDetails:
|
11
|
-
playerDetails:
|
9
|
+
baseUrl: R,
|
10
|
+
projectDetails: v,
|
11
|
+
playerDetails: T,
|
12
12
|
onGameLoad: a,
|
13
|
-
onGamePlayFinish:
|
14
|
-
handleInfoMessage:
|
15
|
-
onBack:
|
16
|
-
parentDomain:
|
17
|
-
...
|
18
|
-
} = C, l = W(null),
|
19
|
-
let
|
20
|
-
const { onEvent:
|
21
|
-
|
22
|
-
const m =
|
23
|
-
const {
|
13
|
+
onGamePlayFinish: c,
|
14
|
+
handleInfoMessage: f,
|
15
|
+
onBack: p,
|
16
|
+
parentDomain: g,
|
17
|
+
...b
|
18
|
+
} = C, l = W(null), w = j(() => T, [T]), o = j(() => v, [v]);
|
19
|
+
let u = "";
|
20
|
+
const { onEvent: D } = $();
|
21
|
+
o.projectType === I.LESSON && (u = o.miniGameIdentifier);
|
22
|
+
const m = A(() => {
|
23
|
+
const {
|
24
|
+
enableCloseButton: r = !0,
|
25
|
+
enablePlayerTurnIndicators: s = !1,
|
26
|
+
enableSync: t = !1,
|
27
|
+
joinByRoomId: E = ""
|
28
|
+
} = o;
|
24
29
|
let e = {
|
25
|
-
|
30
|
+
joinByRoomId: E,
|
31
|
+
enableCloseButton: r,
|
32
|
+
enablePlayerTurnIndicators: s,
|
33
|
+
enableSync: t
|
26
34
|
};
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
35
|
+
if (o.projectType === I.PUZZLE) {
|
36
|
+
const n = o;
|
37
|
+
e = {
|
38
|
+
...e,
|
39
|
+
question: n.question,
|
40
|
+
askHintPermission: n.askHintPermission
|
41
|
+
};
|
42
|
+
}
|
43
|
+
if (o.projectType === I.LESSON) {
|
44
|
+
const n = o;
|
45
|
+
e = {
|
46
|
+
...e,
|
47
|
+
miniGameIdentifier: n.miniGameIdentifier,
|
48
|
+
sessionId: n.sessionId,
|
49
|
+
targetQuestions: n.targetQuestions
|
50
|
+
};
|
51
|
+
}
|
52
|
+
return e;
|
53
|
+
}, [o]), d = A(() => {
|
54
|
+
var s, t;
|
55
|
+
const r = m();
|
56
|
+
(t = (s = l.current) == null ? void 0 : s.contentWindow) == null || t.postMessage(
|
44
57
|
JSON.stringify({
|
45
|
-
event:
|
46
|
-
payload:
|
58
|
+
event: i.GAME_DATA,
|
59
|
+
payload: r
|
47
60
|
}),
|
48
61
|
N
|
49
62
|
);
|
50
|
-
}, [m]),
|
51
|
-
var
|
52
|
-
const
|
53
|
-
(
|
63
|
+
}, [m]), O = A(() => {
|
64
|
+
var s, t;
|
65
|
+
const r = m();
|
66
|
+
(t = (s = l.current) == null ? void 0 : s.contentWindow) == null || t.postMessage(
|
54
67
|
JSON.stringify({
|
55
|
-
event:
|
68
|
+
event: i.SET_CONFIG,
|
56
69
|
payload: {
|
57
|
-
user:
|
58
|
-
projectConfig:
|
59
|
-
parentDomain:
|
70
|
+
user: w,
|
71
|
+
projectConfig: r,
|
72
|
+
parentDomain: g
|
60
73
|
}
|
61
74
|
}),
|
62
75
|
N
|
63
76
|
);
|
64
|
-
}, [
|
65
|
-
return
|
66
|
-
const
|
67
|
-
var
|
68
|
-
const
|
69
|
-
if (
|
70
|
-
const { pattern:
|
71
|
-
(
|
77
|
+
}, [w, m, g]);
|
78
|
+
return H(P, () => l.current, []), V(() => {
|
79
|
+
const r = (s) => {
|
80
|
+
var S, _;
|
81
|
+
const t = s.data, E = typeof t == "string" ? JSON.parse(t) : t, { event: e, payload: n = null } = E;
|
82
|
+
if (e === i.VIBRATE) {
|
83
|
+
const { pattern: y } = n;
|
84
|
+
(_ = (S = window.navigator).vibrate) == null || _.call(S, y);
|
72
85
|
}
|
73
|
-
if (
|
74
|
-
const { eventName:
|
75
|
-
|
86
|
+
if (e === i.GAME_BACK && (p == null || p()), e === i.HIDE_LOADER && (a == null || a()), e === i.LOAD_DATA_FROM_APP && (d == null || d()), e === i.GET_CONFIG && O(), e === i.UPDATE_STATS && (c == null || c(n)), e === i.SHOW_SNACKBAR && (f == null || f(n)), e === i.TRACK_EVENT) {
|
87
|
+
const { eventName: y, properties: L } = n;
|
88
|
+
D(y, L);
|
76
89
|
}
|
77
90
|
};
|
78
|
-
return window.addEventListener("message",
|
79
|
-
window.removeEventListener("message",
|
91
|
+
return window.addEventListener("message", r), () => {
|
92
|
+
window.removeEventListener("message", r);
|
80
93
|
};
|
81
94
|
}, [
|
82
|
-
c,
|
83
95
|
f,
|
84
96
|
p,
|
97
|
+
c,
|
85
98
|
a,
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
]), /* @__PURE__ */
|
99
|
+
O,
|
100
|
+
d,
|
101
|
+
D
|
102
|
+
]), /* @__PURE__ */ G(
|
90
103
|
"iframe",
|
91
104
|
{
|
92
|
-
...
|
105
|
+
...b,
|
93
106
|
ref: l,
|
94
|
-
src: `${
|
107
|
+
src: `${R}/play-game/${o.projectId}/${o.variant}${u ? `/${u}` : ""}?version=2`,
|
95
108
|
allow: "autoplay"
|
96
109
|
}
|
97
110
|
);
|
98
111
|
});
|
99
112
|
export {
|
100
|
-
|
113
|
+
q as WebView
|
101
114
|
};
|
102
115
|
//# sourceMappingURL=web-view.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"web-view.js","sources":["../../../../../src/features/circle-games/games/web-view/web-view.tsx"],"sourcesContent":["import type {\n IInfoMessage,\n ILessonWebGameProps,\n IMessageProps,\n IMultiplayerWebGameProps,\n IPlayerStats,\n IPuzzleWebGameProps,\n
|
1
|
+
{"version":3,"file":"web-view.js","sources":["../../../../../src/features/circle-games/games/web-view/web-view.tsx"],"sourcesContent":["import type {\n IInfoMessage,\n ILessonWebGameProps,\n IMessageProps,\n IMultiplayerWebGameProps,\n IPlayerStats,\n IPuzzleWebGameProps,\n IVibrationPattern,\n IWebViewProps,\n} from './web-view-types';\nimport type { ForwardedRef } from 'react';\n\nimport { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef } from 'react';\n\nimport { useUIContext } from '../../../ui/context/context';\nimport { ALLOWED_ORIGIN } from './constants';\nimport { ProjectType, WebViewEvent } from './enums';\n\nexport const WebView = forwardRef((props: IWebViewProps, ref: ForwardedRef<HTMLIFrameElement>) => {\n const {\n baseUrl,\n projectDetails,\n playerDetails,\n onGameLoad,\n onGamePlayFinish,\n handleInfoMessage,\n onBack,\n parentDomain,\n ...rest\n } = props;\n const webViewRef = useRef<HTMLIFrameElement>(null);\n const memoizedPlayerDetails = useMemo(() => playerDetails, [playerDetails]);\n const memoizedProjectDetails = useMemo(() => projectDetails, [projectDetails]);\n\n let miniGameIdentifier = '';\n const { onEvent: trackEvent } = useUIContext();\n\n if (memoizedProjectDetails.projectType === ProjectType.LESSON) {\n miniGameIdentifier = (memoizedProjectDetails as ILessonWebGameProps).miniGameIdentifier;\n }\n\n const getProjectDetails = useCallback(() => {\n const {\n enableCloseButton = true,\n enablePlayerTurnIndicators = false,\n enableSync = false,\n joinByRoomId = '',\n } = memoizedProjectDetails;\n\n let payload = {\n joinByRoomId,\n enableCloseButton,\n enablePlayerTurnIndicators,\n enableSync,\n } as IMultiplayerWebGameProps | IPuzzleWebGameProps | ILessonWebGameProps;\n\n if (memoizedProjectDetails.projectType === ProjectType.PUZZLE) {\n const details = memoizedProjectDetails as IPuzzleWebGameProps;\n\n payload = {\n ...payload,\n question: details.question,\n askHintPermission: details.askHintPermission,\n } as IPuzzleWebGameProps;\n }\n\n if (memoizedProjectDetails.projectType === ProjectType.LESSON) {\n const details = memoizedProjectDetails as ILessonWebGameProps;\n\n payload = {\n ...payload,\n miniGameIdentifier: details.miniGameIdentifier,\n sessionId: details.sessionId,\n targetQuestions: details.targetQuestions,\n } as ILessonWebGameProps;\n }\n\n return payload;\n }, [memoizedProjectDetails]);\n\n const sendGamesData = useCallback(() => {\n const payload = getProjectDetails();\n\n webViewRef.current?.contentWindow?.postMessage(\n JSON.stringify({\n event: WebViewEvent.GAME_DATA,\n payload,\n }),\n ALLOWED_ORIGIN,\n );\n }, [getProjectDetails]);\n\n const setConfig = useCallback(() => {\n const projectConfig = getProjectDetails();\n\n webViewRef.current?.contentWindow?.postMessage(\n JSON.stringify({\n event: WebViewEvent.SET_CONFIG,\n payload: {\n user: memoizedPlayerDetails,\n projectConfig,\n parentDomain,\n },\n }),\n ALLOWED_ORIGIN,\n );\n }, [memoizedPlayerDetails, getProjectDetails, parentDomain]);\n\n useImperativeHandle(ref, () => webViewRef.current as HTMLIFrameElement, []);\n\n useEffect(() => {\n const handleMessage = (e: MessageEvent) => {\n const data: string = e.data;\n const parsedData = typeof data === 'string' ? JSON.parse(data) : (data as IMessageProps);\n\n const { event, payload = null } = parsedData;\n\n if (event === WebViewEvent.VIBRATE) {\n const { pattern } = payload as IVibrationPattern;\n\n window.navigator.vibrate?.(pattern);\n }\n\n if (event === WebViewEvent.GAME_BACK) {\n onBack?.();\n }\n\n if (event === WebViewEvent.HIDE_LOADER) {\n onGameLoad?.();\n }\n\n if (event === WebViewEvent.LOAD_DATA_FROM_APP) {\n sendGamesData?.();\n }\n\n if (event === WebViewEvent.GET_CONFIG) {\n setConfig();\n }\n\n if (event === WebViewEvent.UPDATE_STATS) {\n onGamePlayFinish?.(payload as IPlayerStats);\n }\n\n if (event === WebViewEvent.SHOW_SNACKBAR) {\n handleInfoMessage?.(payload as IInfoMessage);\n }\n\n if (event === WebViewEvent.TRACK_EVENT) {\n const { eventName, properties } = payload;\n\n trackEvent(eventName, properties);\n }\n };\n\n window.addEventListener('message', handleMessage);\n\n return () => {\n window.removeEventListener('message', handleMessage);\n };\n }, [\n handleInfoMessage,\n onBack,\n onGamePlayFinish,\n onGameLoad,\n setConfig,\n sendGamesData,\n trackEvent,\n ]);\n\n return (\n <iframe\n {...rest}\n ref={webViewRef}\n src={`${baseUrl}/play-game/${memoizedProjectDetails.projectId}/${\n memoizedProjectDetails.variant\n }${miniGameIdentifier ? `/${miniGameIdentifier}` : ''}?version=2`}\n allow=\"autoplay\"\n />\n );\n});\n"],"names":["WebView","forwardRef","props","ref","baseUrl","projectDetails","playerDetails","onGameLoad","onGamePlayFinish","handleInfoMessage","onBack","parentDomain","rest","webViewRef","useRef","memoizedPlayerDetails","useMemo","memoizedProjectDetails","miniGameIdentifier","trackEvent","useUIContext","ProjectType","getProjectDetails","useCallback","enableCloseButton","enablePlayerTurnIndicators","enableSync","joinByRoomId","payload","details","sendGamesData","_b","_a","WebViewEvent","ALLOWED_ORIGIN","setConfig","projectConfig","useImperativeHandle","useEffect","handleMessage","e","data","parsedData","event","pattern","eventName","properties","jsx"],"mappings":"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"}
|
@@ -1,21 +1,20 @@
|
|
1
|
-
import o, { keyframes as
|
2
|
-
import { GAME_LAUNCHER_SIZE as t } from "../../circle-games/game-launcher/comps/card
|
3
|
-
|
4
|
-
const p = 50 * 84 / 100, c = r`
|
1
|
+
import o, { keyframes as s, css as r } from "styled-components";
|
2
|
+
import { GAME_LAUNCHER_SIZE as t, GAME_LAUNCHER_ASSET_PADDING as a } from "../../circle-games/game-launcher/comps/segmented-game-card/constants.js";
|
3
|
+
const p = 50 * 84 / 100, c = s`
|
5
4
|
0%{
|
6
5
|
opacity: 0;
|
7
6
|
}
|
8
7
|
100%{
|
9
8
|
opacity: 1;
|
10
9
|
}
|
11
|
-
`, d =
|
10
|
+
`, d = s`
|
12
11
|
0%{
|
13
12
|
opacity: 1;
|
14
13
|
}
|
15
14
|
100%{
|
16
15
|
opacity: 0;
|
17
16
|
}
|
18
|
-
`,
|
17
|
+
`, f = o.div`
|
19
18
|
height: ${t}px;
|
20
19
|
width: ${t}px;
|
21
20
|
background: transparent;
|
@@ -29,40 +28,40 @@ const p = 50 * 84 / 100, c = r`
|
|
29
28
|
position: absolute;
|
30
29
|
flex: 1;
|
31
30
|
z-index: 1;
|
32
|
-
`,
|
31
|
+
`, m = o.div`
|
33
32
|
height: ${t + a}px;
|
34
33
|
width: ${t + a}px;
|
35
34
|
position: absolute;
|
36
35
|
z-index: 2;
|
37
36
|
transform: ${({ $translateX: e = 0, $translateY: i = 0, $rotate: n = 0 }) => `translateX(${e}px) translateY(${i}px) rotate(${n}deg)`};
|
38
|
-
`,
|
37
|
+
`, y = o.div`
|
39
38
|
height: 100%;
|
40
39
|
width: 100%;
|
41
|
-
`,
|
40
|
+
`, A = o.div`
|
42
41
|
z-index: 2;
|
43
42
|
opacity: 0;
|
44
43
|
position: absolute;
|
45
|
-
animation: ${({ $animationType: e, $duration: i, $delay: n }) =>
|
44
|
+
animation: ${({ $animationType: e, $duration: i, $delay: n }) => r`
|
46
45
|
${e === "fadein" ? c : d} ${i}ms ${n}ms ease forwards
|
47
46
|
`};
|
48
47
|
transform: translateY(${(t + p) * 84 / 200 + 25}px);
|
49
|
-
`,
|
48
|
+
`, h = o.div`
|
50
49
|
position: absolute;
|
51
50
|
z-index: 20;
|
52
51
|
display: flex;
|
53
52
|
flex-direction: row;
|
54
53
|
align-items: flex-end;
|
55
54
|
|
56
|
-
${({ $animationType: e, $duration: i }) => e && i &&
|
55
|
+
${({ $animationType: e, $duration: i }) => e && i && r`
|
57
56
|
animation: ${e === "fadein" ? c : d} ${i}ms linear forwards;
|
58
57
|
`}
|
59
58
|
`;
|
60
59
|
export {
|
61
|
-
|
60
|
+
f as Accuracy,
|
62
61
|
$ as AccuracyMeterLottie,
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
62
|
+
y as AccuracyNeedleLottie,
|
63
|
+
m as AnimatedAccuracyNeedleContainer,
|
64
|
+
h as PercentTextWrapper,
|
65
|
+
A as TextWrapper
|
67
66
|
};
|
68
67
|
//# sourceMappingURL=accuracy-styled.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"accuracy-styled.js","sources":["../../../../src/features/post-game-stats/accuracy/accuracy-styled.tsx"],"sourcesContent":["import styled, { keyframes, css } from 'styled-components';\n\nimport {
|
1
|
+
{"version":3,"file":"accuracy-styled.js","sources":["../../../../src/features/post-game-stats/accuracy/accuracy-styled.tsx"],"sourcesContent":["import styled, { keyframes, css } from 'styled-components';\n\nimport {\n GAME_LAUNCHER_ASSET_PADDING,\n GAME_LAUNCHER_SIZE,\n} from '../../circle-games/game-launcher/comps/segmented-game-card/constants';\n\nconst MASK_PADDING = (50 * 84) / 100;\n\nconst fadeIn = keyframes`\n 0%{\n opacity: 0;\n }\n 100%{\n opacity: 1;\n }\n`;\n\nconst fadeOut = keyframes`\n 0%{\n opacity: 1;\n }\n 100%{\n opacity: 0;\n }\n`;\n\nexport const Accuracy = styled.div`\n height: ${GAME_LAUNCHER_SIZE}px;\n width: ${GAME_LAUNCHER_SIZE}px;\n background: transparent;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n`;\n\nexport const AccuracyMeterLottie = styled.div`\n height: ${GAME_LAUNCHER_SIZE + GAME_LAUNCHER_ASSET_PADDING}px;\n width: ${GAME_LAUNCHER_SIZE + GAME_LAUNCHER_ASSET_PADDING}px;\n position: absolute;\n flex: 1;\n z-index: 1;\n`;\n\nexport const AnimatedAccuracyNeedleContainer = styled.div<{\n $translateX?: number;\n $translateY?: number;\n $rotate?: number;\n}>`\n height: ${GAME_LAUNCHER_SIZE + GAME_LAUNCHER_ASSET_PADDING}px;\n width: ${GAME_LAUNCHER_SIZE + GAME_LAUNCHER_ASSET_PADDING}px;\n position: absolute;\n z-index: 2;\n transform: ${({ $translateX = 0, $translateY = 0, $rotate = 0 }) =>\n `translateX(${$translateX}px) translateY(${$translateY}px) rotate(${$rotate}deg)`};\n`;\n\nexport const AccuracyNeedleLottie = styled.div`\n height: 100%;\n width: 100%;\n`;\n\nexport const TextWrapper = styled.div<{\n $duration: number;\n $delay: number;\n $animationType: 'fadein' | 'fadeout';\n}>`\n z-index: 2;\n opacity: 0;\n position: absolute;\n animation: ${({ $animationType, $duration, $delay }) => css`\n ${$animationType === 'fadein' ? fadeIn : fadeOut} ${$duration}ms ${$delay}ms ease forwards\n `};\n transform: translateY(${((GAME_LAUNCHER_SIZE + MASK_PADDING) * 84) / 200 + 25}px);\n`;\n\nexport const PercentTextWrapper = styled.div<{\n $animationType?: 'fadein' | 'fadeout';\n $duration?: number;\n}>`\n position: absolute;\n z-index: 20;\n display: flex;\n flex-direction: row;\n align-items: flex-end;\n\n ${({ $animationType, $duration }) =>\n $animationType &&\n $duration &&\n css`\n animation: ${$animationType === 'fadein' ? fadeIn : fadeOut} ${$duration}ms linear forwards;\n `}\n`;\n"],"names":["MASK_PADDING","fadeIn","keyframes","fadeOut","Accuracy","styled","GAME_LAUNCHER_SIZE","AccuracyMeterLottie","GAME_LAUNCHER_ASSET_PADDING","AnimatedAccuracyNeedleContainer","$translateX","$translateY","$rotate","AccuracyNeedleLottie","TextWrapper","$animationType","$duration","$delay","css","PercentTextWrapper"],"mappings":";;AAOA,MAAMA,IAAgB,KAAK,KAAM,KAE3BC,IAASC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASTC,IAAUD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASHE,IAAWC,EAAO;AAAA,YACnBC,CAAkB;AAAA,WACnBA,CAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQhBC,IAAsBF,EAAO;AAAA,YAC9BC,IAAqBE,CAA2B;AAAA,WACjDF,IAAqBE,CAA2B;AAAA;AAAA;AAAA;AAAA,GAM9CC,IAAkCJ,EAAO;AAAA,YAK1CC,IAAqBE,CAA2B;AAAA,WACjDF,IAAqBE,CAA2B;AAAA;AAAA;AAAA,eAG5C,CAAC,EAAE,aAAAE,IAAc,GAAG,aAAAC,IAAc,GAAG,SAAAC,IAAU,EAAE,MAC5D,cAAcF,CAAW,kBAAkBC,CAAW,cAAcC,CAAO,MAAM;AAAA,GAGxEC,IAAuBR,EAAO;AAAA;AAAA;AAAA,GAK9BS,IAAcT,EAAO;AAAA;AAAA;AAAA;AAAA,eAQnB,CAAC,EAAE,gBAAAU,GAAgB,WAAAC,GAAW,QAAAC,QAAaC;AAAA,MACpDH,MAAmB,WAAWd,IAASE,CAAO,IAAIa,CAAS,MAAMC,CAAM;AAAA,GAC1E;AAAA,2BACyBX,IAAqBN,KAAgB,KAAM,MAAM,EAAE;AAAA,GAGlEmB,IAAqBd,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUrC,CAAC,EAAE,gBAAAU,GAAgB,WAAAC,EAAU,MAC7BD,KACAC,KACAE;AAAA,mBACeH,MAAmB,WAAWd,IAASE,CAAO,IAAIa,CAAS;AAAA,KACzE;AAAA;"}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import o, { keyframes as e, css as p } from "styled-components";
|
2
|
-
import { GAME_LAUNCHER_SIZE as t } from "../../circle-games/game-launcher/comps/card
|
3
|
-
|
4
|
-
const r = 50 * 84 / 100, c = e`
|
2
|
+
import { GAME_LAUNCHER_SIZE as t, GAME_LAUNCHER_ASSET_PADDING as i } from "../../circle-games/game-launcher/comps/segmented-game-card/constants.js";
|
3
|
+
const c = 50 * 84 / 100, r = e`
|
5
4
|
0%{
|
6
5
|
opacity: 0;
|
7
6
|
}
|
@@ -15,7 +14,7 @@ const r = 50 * 84 / 100, c = e`
|
|
15
14
|
100%{
|
16
15
|
opacity: 0;
|
17
16
|
}
|
18
|
-
`,
|
17
|
+
`, m = o.div`
|
19
18
|
height: ${t}px;
|
20
19
|
width: ${t}px;
|
21
20
|
background: transparent;
|
@@ -28,24 +27,24 @@ const r = 50 * 84 / 100, c = e`
|
|
28
27
|
width: ${t + i}px;
|
29
28
|
position: absolute;
|
30
29
|
z-index: 1;
|
31
|
-
`,
|
30
|
+
`, f = o.div`
|
32
31
|
height: ${t + i}px;
|
33
32
|
width: ${t + i}px;
|
34
33
|
position: absolute;
|
35
34
|
z-index: 2;
|
36
|
-
`,
|
35
|
+
`, h = o.div`
|
37
36
|
z-index: 2;
|
38
37
|
opacity: 0;
|
39
38
|
position: absolute;
|
40
39
|
animation: ${({ $animationType: n, $duration: s, $delay: a }) => p`
|
41
|
-
${n === "fadein" ?
|
40
|
+
${n === "fadein" ? r : d} ${s}ms ${a}ms ease forwards
|
42
41
|
`};
|
43
|
-
transform: translateY(${(t +
|
42
|
+
transform: translateY(${(t + c) * 84 / 200 + 25}px);
|
44
43
|
`;
|
45
44
|
export {
|
46
|
-
|
45
|
+
m as Clock,
|
47
46
|
$ as ClockLottie,
|
48
|
-
|
49
|
-
|
47
|
+
f as ClockTimeSpentLottie,
|
48
|
+
h as TextWrapper
|
50
49
|
};
|
51
50
|
//# sourceMappingURL=clock-styled.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"clock-styled.js","sources":["../../../../src/features/post-game-stats/clock/clock-styled.tsx"],"sourcesContent":["import styled, { keyframes, css } from 'styled-components';\n\nimport {
|
1
|
+
{"version":3,"file":"clock-styled.js","sources":["../../../../src/features/post-game-stats/clock/clock-styled.tsx"],"sourcesContent":["import styled, { keyframes, css } from 'styled-components';\n\nimport {\n GAME_LAUNCHER_ASSET_PADDING,\n GAME_LAUNCHER_SIZE,\n} from '../../circle-games/game-launcher/comps/segmented-game-card/constants';\n\nconst MASK_PADDING = (50 * 84) / 100;\n\nconst fadeIn = keyframes`\n 0%{\n opacity: 0;\n }\n 100%{\n opacity: 1;\n }\n`;\n\nconst fadeOut = keyframes`\n 0%{\n opacity: 1;\n }\n 100%{\n opacity: 0;\n }\n`;\n\nexport const Clock = styled.div`\n height: ${GAME_LAUNCHER_SIZE}px;\n width: ${GAME_LAUNCHER_SIZE}px;\n background: transparent;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n`;\n\nexport const ClockLottie = styled.div`\n height: ${GAME_LAUNCHER_SIZE + GAME_LAUNCHER_ASSET_PADDING}px;\n width: ${GAME_LAUNCHER_SIZE + GAME_LAUNCHER_ASSET_PADDING}px;\n position: absolute;\n z-index: 1;\n`;\n\nexport const ClockTimeSpentLottie = styled.div`\n height: ${GAME_LAUNCHER_SIZE + GAME_LAUNCHER_ASSET_PADDING}px;\n width: ${GAME_LAUNCHER_SIZE + GAME_LAUNCHER_ASSET_PADDING}px;\n position: absolute;\n z-index: 2;\n`;\n\nexport const TextWrapper = styled.div<{\n $duration: number;\n $delay: number;\n $animationType: 'fadein' | 'fadeout';\n}>`\n z-index: 2;\n opacity: 0;\n position: absolute;\n animation: ${({ $animationType, $duration, $delay }) => css`\n ${$animationType === 'fadein' ? fadeIn : fadeOut} ${$duration}ms ${$delay}ms ease forwards\n `};\n transform: translateY(${((GAME_LAUNCHER_SIZE + MASK_PADDING) * 84) / 200 + 25}px);\n`;\n"],"names":["MASK_PADDING","fadeIn","keyframes","fadeOut","Clock","styled","GAME_LAUNCHER_SIZE","ClockLottie","GAME_LAUNCHER_ASSET_PADDING","ClockTimeSpentLottie","TextWrapper","$animationType","$duration","$delay","css"],"mappings":";;AAOA,MAAMA,IAAgB,KAAK,KAAM,KAE3BC,IAASC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASTC,IAAUD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASHE,IAAQC,EAAO;AAAA,YAChBC,CAAkB;AAAA,WACnBA,CAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQhBC,IAAcF,EAAO;AAAA,YACtBC,IAAqBE,CAA2B;AAAA,WACjDF,IAAqBE,CAA2B;AAAA;AAAA;AAAA,GAK9CC,IAAuBJ,EAAO;AAAA,YAC/BC,IAAqBE,CAA2B;AAAA,WACjDF,IAAqBE,CAA2B;AAAA;AAAA;AAAA,GAK9CE,IAAcL,EAAO;AAAA;AAAA;AAAA;AAAA,eAQnB,CAAC,EAAE,gBAAAM,GAAgB,WAAAC,GAAW,QAAAC,QAAaC;AAAA,MACpDH,MAAmB,WAAWV,IAASE,CAAO,IAAIS,CAAS,MAAMC,CAAM;AAAA,GAC1E;AAAA,2BACyBP,IAAqBN,KAAgB,KAAM,MAAM,EAAE;AAAA;"}
|
@@ -1,49 +1,48 @@
|
|
1
1
|
import { jsx as N } from "react/jsx-runtime";
|
2
2
|
import { memo as P, useEffect as T } from "react";
|
3
|
-
import { LOTTIE as
|
4
|
-
import { GAME_LAUNCHER_SIZE as a } from "../../circle-games/game-launcher/comps/card
|
5
|
-
import {
|
6
|
-
import {
|
7
|
-
import { CircleSoundKey as E } from "../../circle-games/hooks/use-circle-sounds/use-circle-sounds-enums.js";
|
3
|
+
import { LOTTIE as t } from "../../../assets/lottie/lottie.js";
|
4
|
+
import { GAME_LAUNCHER_SIZE as a, GAME_LAUNCHER_ASSET_PADDING as O, GAME_LAUNCHER_PROGRESS_RING_STROKE_WIDTH as c } from "../../circle-games/game-launcher/comps/segmented-game-card/constants.js";
|
5
|
+
import { useCircleSounds as E } from "../../circle-games/hooks/use-circle-sounds/use-circle-sounds.js";
|
6
|
+
import { CircleSoundKey as f } from "../../circle-games/hooks/use-circle-sounds/use-circle-sounds-enums.js";
|
8
7
|
import A from "../../ui/lottie-animation/lottie-animation.js";
|
9
8
|
const _ = {
|
10
|
-
point1:
|
11
|
-
point5:
|
12
|
-
point10:
|
13
|
-
point15:
|
14
|
-
point20:
|
15
|
-
point25:
|
16
|
-
point30:
|
17
|
-
point35:
|
18
|
-
point40:
|
19
|
-
point45:
|
20
|
-
point50:
|
21
|
-
point60:
|
22
|
-
point100:
|
9
|
+
point1: t.POINT1,
|
10
|
+
point5: t.POINT5,
|
11
|
+
point10: t.POINT10,
|
12
|
+
point15: t.POINT15,
|
13
|
+
point20: t.POINT20,
|
14
|
+
point25: t.POINT25,
|
15
|
+
point30: t.POINT30,
|
16
|
+
point35: t.POINT35,
|
17
|
+
point40: t.POINT40,
|
18
|
+
point45: t.POINT45,
|
19
|
+
point50: t.POINT50,
|
20
|
+
point60: t.POINT60,
|
21
|
+
point100: t.POINT100
|
23
22
|
}, r = a + O - c, l = {
|
24
23
|
loop: !1,
|
25
24
|
autoplay: !0,
|
26
25
|
renderer: "canvas"
|
27
|
-
},
|
28
|
-
const { point: m = 0, onReveal: n, onComplete: i, show: e } = p, { play: s } =
|
26
|
+
}, d = P((p) => {
|
27
|
+
const { point: m = 0, onReveal: n, onComplete: i, show: e } = p, { play: s } = E(), o = _[`point${m}`], I = {
|
29
28
|
name: "complete",
|
30
29
|
callback: i
|
31
30
|
};
|
32
31
|
return T(() => {
|
33
|
-
|
34
|
-
}, [
|
32
|
+
o || i(), e && o && (n == null || n());
|
33
|
+
}, [o, i, n, e]), e && o ? /* @__PURE__ */ N(
|
35
34
|
A,
|
36
35
|
{
|
37
36
|
width: r,
|
38
37
|
height: r,
|
39
|
-
src:
|
38
|
+
src: o,
|
40
39
|
settings: l,
|
41
40
|
eventListener: I,
|
42
|
-
onRender: () => s(
|
41
|
+
onRender: () => s(f.POINTS_AWARDED)
|
43
42
|
}
|
44
43
|
) : null;
|
45
44
|
});
|
46
45
|
export {
|
47
|
-
|
46
|
+
d as Points
|
48
47
|
};
|
49
48
|
//# sourceMappingURL=points.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"points.js","sources":["../../../../src/features/post-game-stats/points/points.tsx"],"sourcesContent":["import type { IPointsProps } from './points-types';\nimport type { AnimationEventName } from 'lottie-web';\nimport type { FC } from 'react';\n\nimport { memo, useEffect } from 'react';\n\nimport { LOTTIE } from '../../../assets/lottie/lottie';\nimport {
|
1
|
+
{"version":3,"file":"points.js","sources":["../../../../src/features/post-game-stats/points/points.tsx"],"sourcesContent":["import type { IPointsProps } from './points-types';\nimport type { AnimationEventName } from 'lottie-web';\nimport type { FC } from 'react';\n\nimport { memo, useEffect } from 'react';\n\nimport { LOTTIE } from '../../../assets/lottie/lottie';\nimport {\n GAME_LAUNCHER_ASSET_PADDING,\n GAME_LAUNCHER_PROGRESS_RING_STROKE_WIDTH,\n GAME_LAUNCHER_SIZE,\n} from '../../circle-games/game-launcher/comps/segmented-game-card/constants';\nimport { useCircleSounds } from '../../circle-games/hooks/use-circle-sounds/use-circle-sounds';\nimport { CircleSoundKey } from '../../circle-games/hooks/use-circle-sounds/use-circle-sounds-enums';\nimport LottieAnimation from '../../ui/lottie-animation/lottie-animation';\n\nconst POINTS_MAP: Record<string, string> = {\n point1: LOTTIE.POINT1,\n point5: LOTTIE.POINT5,\n point10: LOTTIE.POINT10,\n point15: LOTTIE.POINT15,\n point20: LOTTIE.POINT20,\n point25: LOTTIE.POINT25,\n point30: LOTTIE.POINT30,\n point35: LOTTIE.POINT35,\n point40: LOTTIE.POINT40,\n point45: LOTTIE.POINT45,\n point50: LOTTIE.POINT50,\n point60: LOTTIE.POINT60,\n point100: LOTTIE.POINT100,\n};\nconst animationDimension =\n GAME_LAUNCHER_SIZE + GAME_LAUNCHER_ASSET_PADDING - GAME_LAUNCHER_PROGRESS_RING_STROKE_WIDTH;\nconst animationSettings = {\n loop: false,\n autoplay: true,\n renderer: 'canvas',\n};\n\nexport const Points: FC<IPointsProps> = memo(props => {\n const { point = 0, onReveal, onComplete, show } = props;\n\n const { play } = useCircleSounds();\n\n const animationPath = POINTS_MAP[`point${point}`];\n const animationEventListener = {\n name: 'complete' as AnimationEventName,\n callback: onComplete,\n };\n\n useEffect(() => {\n if (!animationPath) onComplete();\n\n if (show && animationPath) onReveal?.();\n }, [animationPath, onComplete, onReveal, show]);\n\n if (show && animationPath) {\n return (\n <LottieAnimation\n width={animationDimension}\n height={animationDimension}\n src={animationPath}\n settings={animationSettings}\n eventListener={animationEventListener}\n onRender={() => play(CircleSoundKey.POINTS_AWARDED)}\n />\n );\n }\n\n return null;\n});\n"],"names":["POINTS_MAP","LOTTIE","animationDimension","GAME_LAUNCHER_SIZE","GAME_LAUNCHER_ASSET_PADDING","GAME_LAUNCHER_PROGRESS_RING_STROKE_WIDTH","animationSettings","Points","memo","props","point","onReveal","onComplete","show","play","useCircleSounds","animationPath","animationEventListener","useEffect","jsx","LottieAnimation","CircleSoundKey"],"mappings":";;;;;;;AAgBA,MAAMA,IAAqC;AAAA,EACzC,QAAQC,EAAO;AAAA,EACf,QAAQA,EAAO;AAAA,EACf,SAASA,EAAO;AAAA,EAChB,SAASA,EAAO;AAAA,EAChB,SAASA,EAAO;AAAA,EAChB,SAASA,EAAO;AAAA,EAChB,SAASA,EAAO;AAAA,EAChB,SAASA,EAAO;AAAA,EAChB,SAASA,EAAO;AAAA,EAChB,SAASA,EAAO;AAAA,EAChB,SAASA,EAAO;AAAA,EAChB,SAASA,EAAO;AAAA,EAChB,UAAUA,EAAO;AACnB,GACMC,IACJC,IAAqBC,IAA8BC,GAC/CC,IAAoB;AAAA,EACxB,MAAM;AAAA,EACN,UAAU;AAAA,EACV,UAAU;AACZ,GAEaC,IAA2BC,EAAK,CAASC,MAAA;AACpD,QAAM,EAAE,OAAAC,IAAQ,GAAG,UAAAC,GAAU,YAAAC,GAAY,MAAAC,EAAS,IAAAJ,GAE5C,EAAE,MAAAK,MAASC,KAEXC,IAAgBhB,EAAW,QAAQU,CAAK,EAAE,GAC1CO,IAAyB;AAAA,IAC7B,MAAM;AAAA,IACN,UAAUL;AAAA,EAAA;AASZ,SANAM,EAAU,MAAM;AACV,IAACF,KAA0BJ,KAE3BC,KAAQG,MAA0BL,KAAA,QAAAA;AAAA,KACrC,CAACK,GAAeJ,GAAYD,GAAUE,CAAI,CAAC,GAE1CA,KAAQG,IAER,gBAAAG;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAOlB;AAAA,MACP,QAAQA;AAAA,MACR,KAAKc;AAAA,MACL,UAAUV;AAAA,MACV,eAAeW;AAAA,MACf,UAAU,MAAMH,EAAKO,EAAe,cAAc;AAAA,IAAA;AAAA,EAAA,IAKjD;AACT,CAAC;"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import o from "styled-components";
|
2
|
-
import { GAME_LAUNCHER_SIZE as t } from "../circle-games/game-launcher/comps/card
|
2
|
+
import { GAME_LAUNCHER_SIZE as t } from "../circle-games/game-launcher/comps/segmented-game-card/constants.js";
|
3
3
|
const n = o.div`
|
4
4
|
flex: 1;
|
5
5
|
position: absolute;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"post-game-stats-styled.js","sources":["../../../src/features/post-game-stats/post-game-stats-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport { GAME_LAUNCHER_SIZE } from '../circle-games/game-launcher/comps/card
|
1
|
+
{"version":3,"file":"post-game-stats-styled.js","sources":["../../../src/features/post-game-stats/post-game-stats-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport { GAME_LAUNCHER_SIZE } from '../circle-games/game-launcher/comps/segmented-game-card/constants';\n\nexport const StatsWrapper = styled.div`\n flex: 1;\n position: absolute;\n align-items: center;\n justify-content: center;\n top: 0;\n right: 0;\n left: 0;\n bottom: 0;\n z-index: 1000;\n background: transparent;\n width: 100%;\n height: 100%;\n display: flex;\n`;\n\nexport const BlackBg = styled.div`\n height: ${GAME_LAUNCHER_SIZE}px;\n width: ${GAME_LAUNCHER_SIZE}px;\n background: ${({ theme }) => theme.colors.BLACK_1};\n border-radius: ${GAME_LAUNCHER_SIZE / 2}px;\n position: absolute;\n z-index: -1;\n`;\n"],"names":["StatsWrapper","styled","BlackBg","GAME_LAUNCHER_SIZE","theme"],"mappings":";;AAIO,MAAMA,IAAeC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAgBtBC,IAAUD,EAAO;AAAA,YAClBE,CAAkB;AAAA,WACnBA,CAAkB;AAAA,gBACb,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA,mBAChCD,IAAqB,CAAC;AAAA;AAAA;AAAA;"}
|
@@ -1,9 +1,8 @@
|
|
1
1
|
import i, { keyframes as r, css as s } from "styled-components";
|
2
|
-
import { GAME_LAUNCHER_SIZE as t } from "../../circle-games/game-launcher/comps/card
|
3
|
-
import { GAME_LAUNCHER_ASSET_PADDING as n } from "../../circle-games/game-launcher/comps/segmented-game-card/constants.js";
|
2
|
+
import { GAME_LAUNCHER_SIZE as t, GAME_LAUNCHER_ASSET_PADDING as n } from "../../circle-games/game-launcher/comps/segmented-game-card/constants.js";
|
4
3
|
import c from "../../ui/text/text.js";
|
5
4
|
import { STREAK_TOP_GREEN_SEGMENT_HEIGHT as o, STREAK_CONTAINER_TOP_OFFSET as x } from "./constants.js";
|
6
|
-
const
|
5
|
+
const f = 50 * 84 / 100, p = r`
|
7
6
|
0%{
|
8
7
|
opacity: 0;
|
9
8
|
}
|
@@ -17,7 +16,7 @@ const m = 50 * 84 / 100, p = r`
|
|
17
16
|
100%{
|
18
17
|
opacity: 0;
|
19
18
|
}
|
20
|
-
`,
|
19
|
+
`, g = i.div`
|
21
20
|
height: ${t}px;
|
22
21
|
width: ${t}px;
|
23
22
|
background: transparent;
|
@@ -25,18 +24,18 @@ const m = 50 * 84 / 100, p = r`
|
|
25
24
|
justify-content: center;
|
26
25
|
align-items: center;
|
27
26
|
position: relative;
|
28
|
-
`,
|
27
|
+
`, S = i.div`
|
29
28
|
position: absolute;
|
30
29
|
border-radius: ${Math.ceil((t + n) / 2)}px;
|
31
30
|
height: ${t + n}px;
|
32
31
|
width: ${t + n}px;
|
33
32
|
z-index: 0;
|
34
|
-
`,
|
33
|
+
`, u = i.div`
|
35
34
|
height: ${t + n}px;
|
36
35
|
width: ${t + n}px;
|
37
36
|
position: absolute;
|
38
37
|
z-index: 2;
|
39
|
-
`,
|
38
|
+
`, y = i.div`
|
40
39
|
position: absolute;
|
41
40
|
top: ${o}px;
|
42
41
|
z-index: 2;
|
@@ -48,7 +47,7 @@ const m = 50 * 84 / 100, p = r`
|
|
48
47
|
display: flex;
|
49
48
|
flex-direction: column;
|
50
49
|
align-items: center;
|
51
|
-
`,
|
50
|
+
`, _ = i.div`
|
52
51
|
width: 100%;
|
53
52
|
display: flex;
|
54
53
|
flex-direction: column;
|
@@ -56,7 +55,7 @@ const m = 50 * 84 / 100, p = r`
|
|
56
55
|
height: ${(t - o) * 2}px;
|
57
56
|
transition: ${({ $translateDuration: e }) => `all ${e}ms linear`};
|
58
57
|
transform: ${({ $translate: e }) => e ? "translateY(-100%)" : "translateY(0%)"};
|
59
|
-
`,
|
58
|
+
`, A = i(c)`
|
60
59
|
font-size: 123px;
|
61
60
|
line-height: 123px;
|
62
61
|
text-align: center;
|
@@ -65,21 +64,21 @@ const m = 50 * 84 / 100, p = r`
|
|
65
64
|
display: flex;
|
66
65
|
align-items: center;
|
67
66
|
justify-content: center;
|
68
|
-
`,
|
67
|
+
`, T = i.div`
|
69
68
|
z-index: 2;
|
70
69
|
opacity: 0;
|
71
70
|
animation: ${({ $animationType: e, $duration: a, $delay: d }) => s`
|
72
71
|
${e === "fadein" ? p : l} ${a}ms ${d}ms ease forwards
|
73
72
|
`};
|
74
|
-
transform: translateY(${(t +
|
73
|
+
transform: translateY(${(t + f) * 84 / 200 + 25}px);
|
75
74
|
`;
|
76
75
|
export {
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
76
|
+
S as SVGImgContainer,
|
77
|
+
g as Streak,
|
78
|
+
u as StreakLottieView,
|
79
|
+
A as StreakValue,
|
80
|
+
_ as StreakValueContainer,
|
81
|
+
y as StreakValueWrapper,
|
82
|
+
T as TextWrapper
|
84
83
|
};
|
85
84
|
//# sourceMappingURL=streak-styled.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"streak-styled.js","sources":["../../../../src/features/post-game-stats/streak/streak-styled.tsx"],"sourcesContent":["import styled, { keyframes, css } from 'styled-components';\n\nimport {
|
1
|
+
{"version":3,"file":"streak-styled.js","sources":["../../../../src/features/post-game-stats/streak/streak-styled.tsx"],"sourcesContent":["import styled, { keyframes, css } from 'styled-components';\n\nimport {\n GAME_LAUNCHER_ASSET_PADDING,\n GAME_LAUNCHER_SIZE,\n} from '../../circle-games/game-launcher/comps/segmented-game-card/constants';\nimport Text from '../../ui/text/text';\nimport { STREAK_CONTAINER_TOP_OFFSET, STREAK_TOP_GREEN_SEGMENT_HEIGHT } from './constants';\n\nconst MASK_PADDING = (50 * 84) / 100;\n\nconst fadeIn = keyframes`\n 0%{\n opacity: 0;\n }\n 100%{\n opacity: 1;\n }\n`;\n\nconst fadeOut = keyframes`\n 0%{\n opacity: 1;\n }\n 100%{\n opacity: 0;\n }\n`;\n\nexport const Streak = styled.div`\n height: ${GAME_LAUNCHER_SIZE}px;\n width: ${GAME_LAUNCHER_SIZE}px;\n background: transparent;\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n`;\n\nexport const SVGImgContainer = styled.div`\n position: absolute;\n border-radius: ${Math.ceil((GAME_LAUNCHER_SIZE + GAME_LAUNCHER_ASSET_PADDING) / 2)}px;\n height: ${GAME_LAUNCHER_SIZE + GAME_LAUNCHER_ASSET_PADDING}px;\n width: ${GAME_LAUNCHER_SIZE + GAME_LAUNCHER_ASSET_PADDING}px;\n z-index: 0;\n`;\n\nexport const StreakLottieView = styled.div`\n height: ${GAME_LAUNCHER_SIZE + GAME_LAUNCHER_ASSET_PADDING}px;\n width: ${GAME_LAUNCHER_SIZE + GAME_LAUNCHER_ASSET_PADDING}px;\n position: absolute;\n z-index: 2;\n`;\n\nexport const StreakValueWrapper = styled.div<{\n $duration: number;\n $animationType: 'fadein' | 'fadeout';\n}>`\n position: absolute;\n top: ${STREAK_TOP_GREEN_SEGMENT_HEIGHT}px;\n z-index: 2;\n height: ${GAME_LAUNCHER_SIZE - STREAK_TOP_GREEN_SEGMENT_HEIGHT - STREAK_CONTAINER_TOP_OFFSET}px;\n animation: ${({ $animationType, $duration }) => css`\n ${$animationType === 'fadein' ? fadeIn : fadeOut} ${$duration}ms linear forwards\n `};\n overflow: hidden;\n display: flex;\n flex-direction: column;\n align-items: center;\n`;\n\nexport const StreakValueContainer = styled.div<{\n $translate: boolean;\n $translateDuration: number;\n}>`\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n height: ${(GAME_LAUNCHER_SIZE - STREAK_TOP_GREEN_SEGMENT_HEIGHT) * 2}px;\n transition: ${({ $translateDuration }) => `all ${$translateDuration}ms linear`};\n transform: ${({ $translate }) => ($translate ? 'translateY(-100%)' : 'translateY(0%)')};\n`;\n\nexport const StreakValue = styled(Text)`\n font-size: 123px;\n line-height: 123px;\n text-align: center;\n height: 100%;\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\nexport const TextWrapper = styled.div<{\n $duration: number;\n $delay: number;\n $animationType: 'fadein' | 'fadeout';\n}>`\n z-index: 2;\n opacity: 0;\n animation: ${({ $animationType, $duration, $delay }) => css`\n ${$animationType === 'fadein' ? fadeIn : fadeOut} ${$duration}ms ${$delay}ms ease forwards\n `};\n transform: translateY(${((GAME_LAUNCHER_SIZE + MASK_PADDING) * 84) / 200 + 25}px);\n`;\n"],"names":["MASK_PADDING","fadeIn","keyframes","fadeOut","Streak","styled","GAME_LAUNCHER_SIZE","SVGImgContainer","GAME_LAUNCHER_ASSET_PADDING","StreakLottieView","StreakValueWrapper","STREAK_TOP_GREEN_SEGMENT_HEIGHT","STREAK_CONTAINER_TOP_OFFSET","$animationType","$duration","css","StreakValueContainer","$translateDuration","$translate","StreakValue","Text","TextWrapper","$delay"],"mappings":";;;;AASA,MAAMA,IAAgB,KAAK,KAAM,KAE3BC,IAASC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASTC,IAAUD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASHE,IAASC,EAAO;AAAA,YACjBC,CAAkB;AAAA,WACnBA,CAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQhBC,IAAkBF,EAAO;AAAA;AAAA,mBAEnB,KAAK,MAAMC,IAAqBE,KAA+B,CAAC,CAAC;AAAA,YACxEF,IAAqBE,CAA2B;AAAA,WACjDF,IAAqBE,CAA2B;AAAA;AAAA,GAI9CC,IAAmBJ,EAAO;AAAA,YAC3BC,IAAqBE,CAA2B;AAAA,WACjDF,IAAqBE,CAA2B;AAAA;AAAA;AAAA,GAK9CE,IAAqBL,EAAO;AAAA;AAAA,SAKhCM,CAA+B;AAAA;AAAA,YAE5BL,IAAqBK,IAAkCC,CAA2B;AAAA,eAC/E,CAAC,EAAE,gBAAAC,GAAgB,WAAAC,EAAA,MAAgBC;AAAA,MAC5CF,MAAmB,WAAWZ,IAASE,CAAO,IAAIW,CAAS;AAAA,GAC9D;AAAA;AAAA;AAAA;AAAA;AAAA,GAOUE,IAAuBX,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA,aAQ9BC,IAAqBK,KAAmC,CAAC;AAAA,gBACtD,CAAC,EAAE,oBAAAM,EAAyB,MAAA,OAAOA,CAAkB,WAAW;AAAA,eACjE,CAAC,EAAE,YAAAC,EAAA,MAAkBA,IAAa,sBAAsB,gBAAiB;AAAA,GAG3EC,IAAcd,EAAOe,CAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAWzBC,IAAchB,EAAO;AAAA;AAAA;AAAA,eAOnB,CAAC,EAAE,gBAAAQ,GAAgB,WAAAC,GAAW,QAAAQ,QAAaP;AAAA,MACpDF,MAAmB,WAAWZ,IAASE,CAAO,IAAIW,CAAS,MAAMQ,CAAM;AAAA,GAC1E;AAAA,2BACyBhB,IAAqBN,KAAgB,KAAM,MAAM,EAAE;AAAA;"}
|