@cuemath/leap 2.8.35 → 2.8.36-hg1
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/lottie/lottie.js +6 -0
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/card-container/card-container-styled.js +53 -0
- package/dist/features/circle-games/game-launcher/comps/card-container/card-container-styled.js.map +1 -0
- package/dist/features/circle-games/game-launcher/comps/card-container/card-container.js +24 -0
- package/dist/features/circle-games/game-launcher/comps/card-container/card-container.js.map +1 -0
- package/dist/features/circle-games/game-launcher/comps/card-container/constants.js +7 -0
- package/dist/features/circle-games/game-launcher/comps/card-container/constants.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 +29 -73
- 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 +87 -85
- 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/comps/tables-card/constants.js +20 -0
- package/dist/features/circle-games/game-launcher/comps/tables-card/constants.js.map +1 -0
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode/table-mode-styled.js +24 -0
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode/table-mode-styled.js.map +1 -0
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode/table-mode.js +54 -0
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode/table-mode.js.map +1 -0
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-star/table-star-styled.js +11 -0
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-star/table-star-styled.js.map +1 -0
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-star/table-star.js +16 -0
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-star/table-star.js.map +1 -0
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card-styled.js +161 -0
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card-styled.js.map +1 -0
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card.js +209 -0
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card.js.map +1 -0
- package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js +25 -15
- 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 +103 -61
- package/dist/features/circle-games/game-launcher/game-launcher.js.map +1 -1
- 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 +69 -82
- package/dist/features/circle-games/games/web-view/web-view.js.map +1 -1
- package/dist/features/post-game-stats/accuracy/accuracy-styled.js +17 -16
- package/dist/features/post-game-stats/accuracy/accuracy-styled.js.map +1 -1
- package/dist/features/post-game-stats/clock/clock-styled.js +11 -10
- package/dist/features/post-game-stats/clock/clock-styled.js.map +1 -1
- package/dist/features/post-game-stats/points/points.js +25 -24
- 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 +18 -17
- package/dist/features/post-game-stats/streak/streak-styled.js.map +1 -1
- 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 +78 -109
- package/dist/index.js +194 -199
- package/dist/static/advance-mode-segment-lottie.51ff6707.json +1 -0
- package/dist/static/infinite-button-bg.5909225e.json +1 -0
- package/dist/static/infinite-button-symbol.aa31350c.json +1 -0
- package/dist/static/random-mode-segment-lottie.79cf1c07.json +1 -0
- package/dist/static/sequence-mode-segment-lottie.11ac49e9.json +1 -0
- package/dist/static/table-mode-reveal.b44a82c3.json +1 -0
- package/package.json +1 -1
- package/dist/features/circle-games/games/web-view/enums/project-ids-enum.js +0 -14
- package/dist/features/circle-games/games/web-view/enums/project-ids-enum.js.map +0 -1
@@ -1,115 +1,102 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import { forwardRef as
|
3
|
-
import { useUIContext as
|
1
|
+
import { jsx as P } from "react/jsx-runtime";
|
2
|
+
import { forwardRef as G, useRef as W, useMemo as _, useCallback as T, useImperativeHandle as V, useEffect as $ } from "react";
|
3
|
+
import { useUIContext as B } 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 s } from "./enums/project-type-enum.js";
|
6
|
+
import { WebViewEvent as o } from "./enums/web-view-events-enum.js";
|
7
|
+
const F = G((C, I) => {
|
8
8
|
const {
|
9
|
-
baseUrl:
|
10
|
-
projectDetails:
|
11
|
-
playerDetails:
|
9
|
+
baseUrl: L,
|
10
|
+
projectDetails: y,
|
11
|
+
playerDetails: v,
|
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 {
|
24
|
-
enableCloseButton: r = !0,
|
25
|
-
enablePlayerTurnIndicators: s = !1,
|
26
|
-
enableSync: t = !1,
|
27
|
-
joinByRoomId: E = ""
|
28
|
-
} = o;
|
13
|
+
onGamePlayFinish: p,
|
14
|
+
handleInfoMessage: c,
|
15
|
+
onBack: f,
|
16
|
+
parentDomain: w,
|
17
|
+
...R
|
18
|
+
} = C, l = W(null), D = _(() => v, [v]), t = _(() => y, [y]);
|
19
|
+
let A = "";
|
20
|
+
const { onEvent: O } = B();
|
21
|
+
t.projectType === s.LESSON && (A = t.miniGameIdentifier);
|
22
|
+
const m = T(() => {
|
23
|
+
const { enableCloseButton: n = !0 } = t;
|
29
24
|
let e = {
|
30
|
-
|
31
|
-
enableCloseButton: r,
|
32
|
-
enablePlayerTurnIndicators: s,
|
33
|
-
enableSync: t
|
25
|
+
enableCloseButton: n
|
34
26
|
};
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
e
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
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(
|
27
|
+
return t.projectType === s.GAME && (e = {
|
28
|
+
...e,
|
29
|
+
...t
|
30
|
+
}), t.projectType === s.PUZZLE && (e = {
|
31
|
+
...e,
|
32
|
+
...t
|
33
|
+
}), t.projectType === s.LESSON && (e = {
|
34
|
+
...e,
|
35
|
+
...t
|
36
|
+
}), t.projectType === s.TABLE && (e = {
|
37
|
+
...e,
|
38
|
+
...t
|
39
|
+
}), e;
|
40
|
+
}, [t]), E = T(() => {
|
41
|
+
var e, r;
|
42
|
+
const n = m();
|
43
|
+
(r = (e = l.current) == null ? void 0 : e.contentWindow) == null || r.postMessage(
|
57
44
|
JSON.stringify({
|
58
|
-
event:
|
59
|
-
payload:
|
45
|
+
event: o.GAME_DATA,
|
46
|
+
payload: n
|
60
47
|
}),
|
61
48
|
N
|
62
49
|
);
|
63
|
-
}, [m]),
|
64
|
-
var
|
65
|
-
const
|
66
|
-
(
|
50
|
+
}, [m]), g = T(() => {
|
51
|
+
var e, r;
|
52
|
+
const n = m();
|
53
|
+
(r = (e = l.current) == null ? void 0 : e.contentWindow) == null || r.postMessage(
|
67
54
|
JSON.stringify({
|
68
|
-
event:
|
55
|
+
event: o.SET_CONFIG,
|
69
56
|
payload: {
|
70
|
-
user:
|
71
|
-
projectConfig:
|
72
|
-
parentDomain:
|
57
|
+
user: D,
|
58
|
+
projectConfig: n,
|
59
|
+
parentDomain: w
|
73
60
|
}
|
74
61
|
}),
|
75
62
|
N
|
76
63
|
);
|
77
|
-
}, [
|
78
|
-
return
|
79
|
-
const
|
80
|
-
var
|
81
|
-
const
|
82
|
-
if (
|
83
|
-
const { pattern:
|
84
|
-
(
|
64
|
+
}, [D, m, w]);
|
65
|
+
return V(I, () => l.current, []), $(() => {
|
66
|
+
const n = (e) => {
|
67
|
+
var j, S;
|
68
|
+
const r = e.data, b = typeof r == "string" ? JSON.parse(r) : r, { event: i, payload: d = null } = b;
|
69
|
+
if (i === o.VIBRATE) {
|
70
|
+
const { pattern: u } = d;
|
71
|
+
(S = (j = window.navigator).vibrate) == null || S.call(j, u);
|
85
72
|
}
|
86
|
-
if (
|
87
|
-
const { eventName:
|
88
|
-
|
73
|
+
if (i === o.GAME_BACK && (f == null || f()), i === o.HIDE_LOADER && (a == null || a()), i === o.LOAD_DATA_FROM_APP && (E == null || E()), i === o.GET_CONFIG && g(), i === o.UPDATE_STATS && (p == null || p(d)), i === o.SHOW_SNACKBAR && (c == null || c(d)), i === o.TRACK_EVENT) {
|
74
|
+
const { eventName: u, properties: M } = d;
|
75
|
+
O(u, M);
|
89
76
|
}
|
90
77
|
};
|
91
|
-
return window.addEventListener("message",
|
92
|
-
window.removeEventListener("message",
|
78
|
+
return window.addEventListener("message", n), () => {
|
79
|
+
window.removeEventListener("message", n);
|
93
80
|
};
|
94
81
|
}, [
|
82
|
+
c,
|
95
83
|
f,
|
96
84
|
p,
|
97
|
-
c,
|
98
85
|
a,
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
]), /* @__PURE__ */
|
86
|
+
g,
|
87
|
+
E,
|
88
|
+
O
|
89
|
+
]), /* @__PURE__ */ P(
|
103
90
|
"iframe",
|
104
91
|
{
|
105
|
-
...
|
92
|
+
...R,
|
106
93
|
ref: l,
|
107
|
-
src: `${
|
94
|
+
src: `${L}/play-game/${t.projectId}/${t.variant}${A ? `/${A}` : ""}?version=2`,
|
108
95
|
allow: "autoplay"
|
109
96
|
}
|
110
97
|
);
|
111
98
|
});
|
112
99
|
export {
|
113
|
-
|
100
|
+
F as WebView
|
114
101
|
};
|
115
102
|
//# 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 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 {
|
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 ITableWebGameProps,\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 { enableCloseButton = true } = memoizedProjectDetails;\n\n let payload = {\n enableCloseButton,\n } as IMultiplayerWebGameProps | IPuzzleWebGameProps | ILessonWebGameProps;\n\n if (memoizedProjectDetails.projectType === ProjectType.GAME) {\n payload = {\n ...payload,\n ...memoizedProjectDetails,\n } as IMultiplayerWebGameProps;\n }\n\n if (memoizedProjectDetails.projectType === ProjectType.PUZZLE) {\n payload = {\n ...payload,\n ...memoizedProjectDetails,\n } as IPuzzleWebGameProps;\n }\n\n if (memoizedProjectDetails.projectType === ProjectType.LESSON) {\n payload = {\n ...payload,\n ...memoizedProjectDetails,\n } as ILessonWebGameProps;\n }\n\n if (memoizedProjectDetails.projectType === ProjectType.TABLE) {\n payload = {\n ...payload,\n ...memoizedProjectDetails,\n } as ITableWebGameProps;\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","payload","sendGamesData","_b","_a","WebViewEvent","ALLOWED_ORIGIN","setConfig","projectConfig","useImperativeHandle","useEffect","handleMessage","data","parsedData","event","pattern","eventName","properties","jsx"],"mappings":";;;;;;AAmBO,MAAMA,IAAUC,EAAW,CAACC,GAAsBC,MAAyC;AAC1F,QAAA;AAAA,IACJ,SAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,eAAAC;AAAA,IACA,YAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,QAAAC;AAAA,IACA,cAAAC;AAAA,IACA,GAAGC;AAAA,EACD,IAAAV,GACEW,IAAaC,EAA0B,IAAI,GAC3CC,IAAwBC,EAAQ,MAAMV,GAAe,CAACA,CAAa,CAAC,GACpEW,IAAyBD,EAAQ,MAAMX,GAAgB,CAACA,CAAc,CAAC;AAE7E,MAAIa,IAAqB;AACzB,QAAM,EAAE,SAASC,EAAW,IAAIC,EAAa;AAEzC,EAAAH,EAAuB,gBAAgBI,EAAY,WACrDH,IAAsBD,EAA+C;AAGjE,QAAAK,IAAoBC,EAAY,MAAM;AACpC,UAAA,EAAE,mBAAAC,IAAoB,GA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t
|
3
|
-
|
1
|
+
import o, { keyframes as r, css as s } from "styled-components";
|
2
|
+
import { GAME_LAUNCHER_SIZE as t } from "../../circle-games/game-launcher/comps/card-container/constants.js";
|
3
|
+
import { GAME_LAUNCHER_ASSET_PADDING as a } from "../../circle-games/game-launcher/comps/segmented-game-card/constants.js";
|
4
|
+
const p = 50 * 84 / 100, c = r`
|
4
5
|
0%{
|
5
6
|
opacity: 0;
|
6
7
|
}
|
7
8
|
100%{
|
8
9
|
opacity: 1;
|
9
10
|
}
|
10
|
-
`, d =
|
11
|
+
`, d = r`
|
11
12
|
0%{
|
12
13
|
opacity: 1;
|
13
14
|
}
|
14
15
|
100%{
|
15
16
|
opacity: 0;
|
16
17
|
}
|
17
|
-
`,
|
18
|
+
`, m = o.div`
|
18
19
|
height: ${t}px;
|
19
20
|
width: ${t}px;
|
20
21
|
background: transparent;
|
@@ -28,40 +29,40 @@ const p = 50 * 84 / 100, c = s`
|
|
28
29
|
position: absolute;
|
29
30
|
flex: 1;
|
30
31
|
z-index: 1;
|
31
|
-
`,
|
32
|
+
`, y = o.div`
|
32
33
|
height: ${t + a}px;
|
33
34
|
width: ${t + a}px;
|
34
35
|
position: absolute;
|
35
36
|
z-index: 2;
|
36
37
|
transform: ${({ $translateX: e = 0, $translateY: i = 0, $rotate: n = 0 }) => `translateX(${e}px) translateY(${i}px) rotate(${n}deg)`};
|
37
|
-
`,
|
38
|
+
`, A = o.div`
|
38
39
|
height: 100%;
|
39
40
|
width: 100%;
|
40
|
-
`,
|
41
|
+
`, h = o.div`
|
41
42
|
z-index: 2;
|
42
43
|
opacity: 0;
|
43
44
|
position: absolute;
|
44
|
-
animation: ${({ $animationType: e, $duration: i, $delay: n }) =>
|
45
|
+
animation: ${({ $animationType: e, $duration: i, $delay: n }) => s`
|
45
46
|
${e === "fadein" ? c : d} ${i}ms ${n}ms ease forwards
|
46
47
|
`};
|
47
48
|
transform: translateY(${(t + p) * 84 / 200 + 25}px);
|
48
|
-
`,
|
49
|
+
`, u = o.div`
|
49
50
|
position: absolute;
|
50
51
|
z-index: 20;
|
51
52
|
display: flex;
|
52
53
|
flex-direction: row;
|
53
54
|
align-items: flex-end;
|
54
55
|
|
55
|
-
${({ $animationType: e, $duration: i }) => e && i &&
|
56
|
+
${({ $animationType: e, $duration: i }) => e && i && s`
|
56
57
|
animation: ${e === "fadein" ? c : d} ${i}ms linear forwards;
|
57
58
|
`}
|
58
59
|
`;
|
59
60
|
export {
|
60
|
-
|
61
|
+
m as Accuracy,
|
61
62
|
$ as AccuracyMeterLottie,
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
63
|
+
A as AccuracyNeedleLottie,
|
64
|
+
y as AnimatedAccuracyNeedleContainer,
|
65
|
+
u as PercentTextWrapper,
|
66
|
+
h as TextWrapper
|
66
67
|
};
|
67
68
|
//# 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 { GAME_LAUNCHER_SIZE } from '../../circle-games/game-launcher/comps/card-container/constants';\nimport { GAME_LAUNCHER_ASSET_PADDING } 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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CHER_SIZE as t } from "../../circle-games/game-launcher/comps/card-container/constants.js";
|
3
|
+
import { GAME_LAUNCHER_ASSET_PADDING as i } from "../../circle-games/game-launcher/comps/segmented-game-card/constants.js";
|
4
|
+
const r = 50 * 84 / 100, c = e`
|
4
5
|
0%{
|
5
6
|
opacity: 0;
|
6
7
|
}
|
@@ -14,7 +15,7 @@ const c = 50 * 84 / 100, r = e`
|
|
14
15
|
100%{
|
15
16
|
opacity: 0;
|
16
17
|
}
|
17
|
-
`,
|
18
|
+
`, f = o.div`
|
18
19
|
height: ${t}px;
|
19
20
|
width: ${t}px;
|
20
21
|
background: transparent;
|
@@ -27,24 +28,24 @@ const c = 50 * 84 / 100, r = e`
|
|
27
28
|
width: ${t + i}px;
|
28
29
|
position: absolute;
|
29
30
|
z-index: 1;
|
30
|
-
`,
|
31
|
+
`, h = o.div`
|
31
32
|
height: ${t + i}px;
|
32
33
|
width: ${t + i}px;
|
33
34
|
position: absolute;
|
34
35
|
z-index: 2;
|
35
|
-
`,
|
36
|
+
`, y = o.div`
|
36
37
|
z-index: 2;
|
37
38
|
opacity: 0;
|
38
39
|
position: absolute;
|
39
40
|
animation: ${({ $animationType: n, $duration: s, $delay: a }) => p`
|
40
|
-
${n === "fadein" ?
|
41
|
+
${n === "fadein" ? c : d} ${s}ms ${a}ms ease forwards
|
41
42
|
`};
|
42
|
-
transform: translateY(${(t +
|
43
|
+
transform: translateY(${(t + r) * 84 / 200 + 25}px);
|
43
44
|
`;
|
44
45
|
export {
|
45
|
-
|
46
|
+
f as Clock,
|
46
47
|
$ as ClockLottie,
|
47
|
-
|
48
|
-
|
48
|
+
h as ClockTimeSpentLottie,
|
49
|
+
y as TextWrapper
|
49
50
|
};
|
50
51
|
//# 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 { GAME_LAUNCHER_SIZE } from '../../circle-games/game-launcher/comps/card-container/constants';\nimport { GAME_LAUNCHER_ASSET_PADDING } 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":";;;AAKA,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,48 +1,49 @@
|
|
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
|
5
|
-
import {
|
6
|
-
import {
|
3
|
+
import { LOTTIE as o } from "../../../assets/lottie/lottie.js";
|
4
|
+
import { GAME_LAUNCHER_SIZE as a } from "../../circle-games/game-launcher/comps/card-container/constants.js";
|
5
|
+
import { 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";
|
6
|
+
import { useCircleSounds as f } from "../../circle-games/hooks/use-circle-sounds/use-circle-sounds.js";
|
7
|
+
import { CircleSoundKey as E } from "../../circle-games/hooks/use-circle-sounds/use-circle-sounds-enums.js";
|
7
8
|
import A from "../../ui/lottie-animation/lottie-animation.js";
|
8
9
|
const _ = {
|
9
|
-
point1:
|
10
|
-
point5:
|
11
|
-
point10:
|
12
|
-
point15:
|
13
|
-
point20:
|
14
|
-
point25:
|
15
|
-
point30:
|
16
|
-
point35:
|
17
|
-
point40:
|
18
|
-
point45:
|
19
|
-
point50:
|
20
|
-
point60:
|
21
|
-
point100:
|
10
|
+
point1: o.POINT1,
|
11
|
+
point5: o.POINT5,
|
12
|
+
point10: o.POINT10,
|
13
|
+
point15: o.POINT15,
|
14
|
+
point20: o.POINT20,
|
15
|
+
point25: o.POINT25,
|
16
|
+
point30: o.POINT30,
|
17
|
+
point35: o.POINT35,
|
18
|
+
point40: o.POINT40,
|
19
|
+
point45: o.POINT45,
|
20
|
+
point50: o.POINT50,
|
21
|
+
point60: o.POINT60,
|
22
|
+
point100: o.POINT100
|
22
23
|
}, r = a + O - c, l = {
|
23
24
|
loop: !1,
|
24
25
|
autoplay: !0,
|
25
26
|
renderer: "canvas"
|
26
|
-
},
|
27
|
-
const { point: m = 0, onReveal: n, onComplete: i, show: e } = p, { play: s } =
|
27
|
+
}, h = P((p) => {
|
28
|
+
const { point: m = 0, onReveal: n, onComplete: i, show: e } = p, { play: s } = f(), t = _[`point${m}`], I = {
|
28
29
|
name: "complete",
|
29
30
|
callback: i
|
30
31
|
};
|
31
32
|
return T(() => {
|
32
|
-
|
33
|
-
}, [
|
33
|
+
t || i(), e && t && (n == null || n());
|
34
|
+
}, [t, i, n, e]), e && t ? /* @__PURE__ */ N(
|
34
35
|
A,
|
35
36
|
{
|
36
37
|
width: r,
|
37
38
|
height: r,
|
38
|
-
src:
|
39
|
+
src: t,
|
39
40
|
settings: l,
|
40
41
|
eventListener: I,
|
41
|
-
onRender: () => s(
|
42
|
+
onRender: () => s(E.POINTS_AWARDED)
|
42
43
|
}
|
43
44
|
) : null;
|
44
45
|
});
|
45
46
|
export {
|
46
|
-
|
47
|
+
h as Points
|
47
48
|
};
|
48
49
|
//# 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 {\n GAME_LAUNCHER_ASSET_PADDING,\n GAME_LAUNCHER_PROGRESS_RING_STROKE_WIDTH,\n
|
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 { GAME_LAUNCHER_SIZE } from '../../circle-games/game-launcher/comps/card-container/constants';\nimport {\n GAME_LAUNCHER_ASSET_PADDING,\n GAME_LAUNCHER_PROGRESS_RING_STROKE_WIDTH,\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/
|
2
|
+
import { GAME_LAUNCHER_SIZE as t } from "../circle-games/game-launcher/comps/card-container/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/
|
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-container/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,8 +1,9 @@
|
|
1
1
|
import i, { keyframes as r, css as s } from "styled-components";
|
2
|
-
import { GAME_LAUNCHER_SIZE as t
|
2
|
+
import { GAME_LAUNCHER_SIZE as t } from "../../circle-games/game-launcher/comps/card-container/constants.js";
|
3
|
+
import { GAME_LAUNCHER_ASSET_PADDING as n } from "../../circle-games/game-launcher/comps/segmented-game-card/constants.js";
|
3
4
|
import c from "../../ui/text/text.js";
|
4
5
|
import { STREAK_TOP_GREEN_SEGMENT_HEIGHT as o, STREAK_CONTAINER_TOP_OFFSET as x } from "./constants.js";
|
5
|
-
const
|
6
|
+
const m = 50 * 84 / 100, p = r`
|
6
7
|
0%{
|
7
8
|
opacity: 0;
|
8
9
|
}
|
@@ -16,7 +17,7 @@ const f = 50 * 84 / 100, p = r`
|
|
16
17
|
100%{
|
17
18
|
opacity: 0;
|
18
19
|
}
|
19
|
-
`,
|
20
|
+
`, S = i.div`
|
20
21
|
height: ${t}px;
|
21
22
|
width: ${t}px;
|
22
23
|
background: transparent;
|
@@ -24,18 +25,18 @@ const f = 50 * 84 / 100, p = r`
|
|
24
25
|
justify-content: center;
|
25
26
|
align-items: center;
|
26
27
|
position: relative;
|
27
|
-
`,
|
28
|
+
`, u = i.div`
|
28
29
|
position: absolute;
|
29
30
|
border-radius: ${Math.ceil((t + n) / 2)}px;
|
30
31
|
height: ${t + n}px;
|
31
32
|
width: ${t + n}px;
|
32
33
|
z-index: 0;
|
33
|
-
`,
|
34
|
+
`, y = i.div`
|
34
35
|
height: ${t + n}px;
|
35
36
|
width: ${t + n}px;
|
36
37
|
position: absolute;
|
37
38
|
z-index: 2;
|
38
|
-
`,
|
39
|
+
`, _ = i.div`
|
39
40
|
position: absolute;
|
40
41
|
top: ${o}px;
|
41
42
|
z-index: 2;
|
@@ -47,7 +48,7 @@ const f = 50 * 84 / 100, p = r`
|
|
47
48
|
display: flex;
|
48
49
|
flex-direction: column;
|
49
50
|
align-items: center;
|
50
|
-
`,
|
51
|
+
`, A = i.div`
|
51
52
|
width: 100%;
|
52
53
|
display: flex;
|
53
54
|
flex-direction: column;
|
@@ -55,7 +56,7 @@ const f = 50 * 84 / 100, p = r`
|
|
55
56
|
height: ${(t - o) * 2}px;
|
56
57
|
transition: ${({ $translateDuration: e }) => `all ${e}ms linear`};
|
57
58
|
transform: ${({ $translate: e }) => e ? "translateY(-100%)" : "translateY(0%)"};
|
58
|
-
`,
|
59
|
+
`, T = i(c)`
|
59
60
|
font-size: 123px;
|
60
61
|
line-height: 123px;
|
61
62
|
text-align: center;
|
@@ -64,21 +65,21 @@ const f = 50 * 84 / 100, p = r`
|
|
64
65
|
display: flex;
|
65
66
|
align-items: center;
|
66
67
|
justify-content: center;
|
67
|
-
`,
|
68
|
+
`, k = i.div`
|
68
69
|
z-index: 2;
|
69
70
|
opacity: 0;
|
70
71
|
animation: ${({ $animationType: e, $duration: a, $delay: d }) => s`
|
71
72
|
${e === "fadein" ? p : l} ${a}ms ${d}ms ease forwards
|
72
73
|
`};
|
73
|
-
transform: translateY(${(t +
|
74
|
+
transform: translateY(${(t + m) * 84 / 200 + 25}px);
|
74
75
|
`;
|
75
76
|
export {
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
77
|
+
u as SVGImgContainer,
|
78
|
+
S as Streak,
|
79
|
+
y as StreakLottieView,
|
80
|
+
T as StreakValue,
|
81
|
+
A as StreakValueContainer,
|
82
|
+
_ as StreakValueWrapper,
|
83
|
+
k as TextWrapper
|
83
84
|
};
|
84
85
|
//# sourceMappingURL=streak-styled.js.map
|