@cuemath/leap 3.0.11-akm-5 → 3.0.11-akm-6
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.
@@ -1,16 +1,16 @@
|
|
1
1
|
import i, { keyframes as r, css as s } from "styled-components";
|
2
2
|
import { GAME_LAUNCHER_SIZE as t } from "../../circle-games/game-launcher/comps/card-container/constants.js";
|
3
3
|
import { GAME_LAUNCHER_ASSET_PADDING as n } from "../../circle-games/game-launcher/comps/segmented-game-card/constants.js";
|
4
|
-
import
|
5
|
-
import { STREAK_TOP_GREEN_SEGMENT_HEIGHT as
|
6
|
-
const
|
4
|
+
import x from "../../ui/text/text.js";
|
5
|
+
import { STREAK_TOP_GREEN_SEGMENT_HEIGHT as p, STREAK_CONTAINER_TOP_OFFSET as m } from "./constants.js";
|
6
|
+
const f = 50 * 84 / 100, l = r`
|
7
7
|
0%{
|
8
8
|
opacity: 0;
|
9
9
|
}
|
10
10
|
100%{
|
11
11
|
opacity: 1;
|
12
12
|
}
|
13
|
-
`,
|
13
|
+
`, c = r`
|
14
14
|
0%{
|
15
15
|
opacity: 1;
|
16
16
|
}
|
@@ -25,42 +25,42 @@ const m = 50 * 84 / 100, p = r`
|
|
25
25
|
justify-content: center;
|
26
26
|
align-items: center;
|
27
27
|
position: relative;
|
28
|
-
`,
|
28
|
+
`, y = i.div`
|
29
29
|
position: absolute;
|
30
30
|
border-radius: ${Math.ceil((t + n) / 2)}px;
|
31
31
|
height: ${t + n}px;
|
32
32
|
width: ${t + n}px;
|
33
33
|
z-index: 0;
|
34
|
-
`,
|
34
|
+
`, _ = i.div`
|
35
35
|
height: ${t + n}px;
|
36
36
|
width: ${t + n}px;
|
37
37
|
position: absolute;
|
38
38
|
z-index: 2;
|
39
|
-
`,
|
39
|
+
`, o = t - p, A = i.div`
|
40
40
|
position: absolute;
|
41
|
-
top: ${
|
41
|
+
top: ${p}px;
|
42
42
|
z-index: 2;
|
43
|
-
height: ${
|
43
|
+
height: ${o - m}px;
|
44
44
|
animation: ${({ $animationType: e, $duration: a }) => s`
|
45
|
-
${e === "fadein" ?
|
45
|
+
${e === "fadein" ? l : c} ${a}ms linear forwards
|
46
46
|
`};
|
47
47
|
overflow: hidden;
|
48
48
|
display: flex;
|
49
49
|
flex-direction: column;
|
50
50
|
align-items: center;
|
51
|
-
`,
|
51
|
+
`, T = i.div`
|
52
52
|
width: 100%;
|
53
53
|
display: flex;
|
54
54
|
flex-direction: column;
|
55
55
|
align-items: center;
|
56
|
-
height: ${
|
57
|
-
transition: ${({ $translateDuration: e }) =>
|
58
|
-
transform: ${({ $translate: e }) => e ?
|
59
|
-
`,
|
56
|
+
height: ${o * 2}px;
|
57
|
+
transition: transform ${({ $translateDuration: e }) => `${e}ms linear`};
|
58
|
+
transform: ${({ $translate: e }) => e ? `translateY(-${o}px)` : "translateY(0)"};
|
59
|
+
`, v = i(x)`
|
60
60
|
font-size: 123px;
|
61
61
|
line-height: 123px;
|
62
62
|
text-align: center;
|
63
|
-
height:
|
63
|
+
height: ${o}px;
|
64
64
|
flex-shrink: 0;
|
65
65
|
display: flex;
|
66
66
|
align-items: center;
|
@@ -69,17 +69,17 @@ const m = 50 * 84 / 100, p = r`
|
|
69
69
|
z-index: 2;
|
70
70
|
opacity: 0;
|
71
71
|
animation: ${({ $animationType: e, $duration: a, $delay: d }) => s`
|
72
|
-
${e === "fadein" ?
|
72
|
+
${e === "fadein" ? l : c} ${a}ms ${d}ms ease forwards
|
73
73
|
`};
|
74
|
-
transform: translateY(${(t +
|
74
|
+
transform: translateY(${(t + f) * 84 / 200 + 25}px);
|
75
75
|
`;
|
76
76
|
export {
|
77
|
-
|
77
|
+
y as SVGImgContainer,
|
78
78
|
S as Streak,
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
79
|
+
_ as StreakLottieView,
|
80
|
+
v as StreakValue,
|
81
|
+
T as StreakValueContainer,
|
82
|
+
A as StreakValueWrapper,
|
83
83
|
k as TextWrapper
|
84
84
|
};
|
85
85
|
//# 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 { 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';\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: ${
|
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 { 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';\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`;\nconst valueHeight = GAME_LAUNCHER_SIZE - STREAK_TOP_GREEN_SEGMENT_HEIGHT;\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: ${valueHeight - 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: ${valueHeight * 2}px;\n transition: transform ${({ $translateDuration }) => `${$translateDuration}ms linear`};\n transform: ${({ $translate }) =>\n $translate ? `translateY(-${valueHeight}px)` : 'translateY(0)'};\n`;\n\nexport const StreakValue = styled(Text)`\n font-size: 123px;\n line-height: 123px;\n text-align: center;\n height: ${valueHeight}px;\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","valueHeight","STREAK_TOP_GREEN_SEGMENT_HEIGHT","StreakValueWrapper","STREAK_CONTAINER_TOP_OFFSET","$animationType","$duration","css","StreakValueContainer","$translateDuration","$translate","StreakValue","Text","TextWrapper","$delay"],"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,IAASC,EAAO;AAAA,YACjBC,CAAkB;AAAA,WACnBA,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