@cuemath/leap 3.4.3 → 3.4.4-akm-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 +7 -0
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/features/auth/pla-signup/pla-analytics-events.js +1 -1
- package/dist/features/auth/pla-signup/pla-analytics-events.js.map +1 -1
- package/dist/features/auth/pla-signup/signup-options/signup-options.js +46 -37
- package/dist/features/auth/pla-signup/signup-options/signup-options.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/segmented-game-card/constants.js +2 -9
- package/dist/features/circle-games/game-launcher/comps/segmented-game-card/constants.js.map +1 -1
- package/dist/features/circle-games/game-launcher/game-launcher-analytics-events.js +6 -8
- package/dist/features/circle-games/game-launcher/game-launcher-analytics-events.js.map +1 -1
- package/dist/features/circle-games/{game-launcher → game-launcher-v2}/api/get-content-for-today/constants.js +1 -1
- package/dist/features/circle-games/game-launcher-v2/api/get-content-for-today/constants.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/api/get-content-for-today/get-circle-home-api.js +10 -0
- package/dist/features/circle-games/game-launcher-v2/api/get-content-for-today/get-circle-home-api.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/card-container/card-container-styled.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/card-container/card-container.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/card-container/constants.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/carousel/carousel-styled.js +120 -0
- package/dist/features/circle-games/game-launcher-v2/comps/carousel/carousel-styled.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/carousel/carousel.js +57 -0
- package/dist/features/circle-games/game-launcher-v2/comps/carousel/carousel.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/carousel-badge/carousel-badge-style.js +20 -0
- package/dist/features/circle-games/game-launcher-v2/comps/carousel-badge/carousel-badge-style.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/carousel-badge/carousel-badge.js +17 -0
- package/dist/features/circle-games/game-launcher-v2/comps/carousel-badge/carousel-badge.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/carousel-badge/carousel-single-badge.js +20 -0
- package/dist/features/circle-games/game-launcher-v2/comps/carousel-badge/carousel-single-badge.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/circular-game-card/circular-game-card-styled.js +48 -0
- package/dist/features/circle-games/game-launcher-v2/comps/circular-game-card/circular-game-card-styled.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/circular-game-card/circular-game-card.js +66 -0
- package/dist/features/circle-games/game-launcher-v2/comps/circular-game-card/circular-game-card.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/circular-game-card/constants.js +7 -0
- package/dist/features/circle-games/game-launcher-v2/comps/circular-game-card/constants.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/game-card-content/constants.js +6 -0
- package/dist/features/circle-games/game-launcher-v2/comps/game-card-content/constants.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/game-card-content/game-card-content-styled.js +62 -0
- package/dist/features/circle-games/game-launcher-v2/comps/game-card-content/game-card-content-styled.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/game-card-content/game-card-content.js +13 -0
- package/dist/features/circle-games/game-launcher-v2/comps/game-card-content/game-card-content.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/tables-card/constants.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/tables-card/infinite-button/infinite-mode-launcher-button.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/tables-card/spl-events-text/constants.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/tables-card/spl-events-text/spl-events-text-style.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/tables-card/spl-events-text/spl-events-text-types.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/tables-card/spl-events-text/spl-events-text.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/tables-card/table-mode/table-mode-styled.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/tables-card/table-mode/table-mode.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/tables-card/table-mode-star/constants.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/tables-card/table-mode-star/table-mode-star-styled.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/tables-card/table-mode-star/table-mode-star.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/tables-card/table-segment-star/table-segment-star-styled.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/tables-card/table-segment-star/table-segment-star.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/tables-card/tables-card-styled.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/comps/tables-card/tables-card.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/dal/use-get-circle-home-details-dal/helper.js +94 -0
- package/dist/features/circle-games/game-launcher-v2/dal/use-get-circle-home-details-dal/helper.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js +37 -0
- package/dist/features/circle-games/game-launcher-v2/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/game-launcher-analytics-events.js +7 -0
- package/dist/features/circle-games/game-launcher-v2/game-launcher-analytics-events.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/game-launcher-v2.js +242 -0
- package/dist/features/circle-games/game-launcher-v2/game-launcher-v2.js.map +1 -0
- package/dist/features/circle-games/game-launcher-v2/helpers.js +8 -0
- package/dist/features/circle-games/game-launcher-v2/helpers.js.map +1 -0
- package/dist/features/milestone/create/milestone-create-helpers.js +6 -2
- package/dist/features/milestone/create/milestone-create-helpers.js.map +1 -1
- package/dist/features/post-game-stats/accuracy/accuracy-comps.js.map +1 -1
- package/dist/features/post-game-stats/accuracy/accuracy-styled.js +2 -2
- package/dist/features/post-game-stats/accuracy/accuracy-styled.js.map +1 -1
- package/dist/features/post-game-stats/clock/clock-styled.js +2 -2
- package/dist/features/post-game-stats/clock/clock-styled.js.map +1 -1
- package/dist/features/post-game-stats/digital-meter/constants.js +1 -1
- package/dist/features/post-game-stats/digital-meter/constants.js.map +1 -1
- package/dist/features/post-game-stats/digital-meter/digital-meter-styled.js +1 -1
- package/dist/features/post-game-stats/digital-meter/digital-meter-styled.js.map +1 -1
- package/dist/features/post-game-stats/digital-meter/digital-meter.js +1 -1
- package/dist/features/post-game-stats/digital-meter/digital-meter.js.map +1 -1
- package/dist/features/post-game-stats/points/points.js +5 -4
- package/dist/features/post-game-stats/points/points.js.map +1 -1
- package/dist/features/post-game-stats/post-game-stats-styled.js +9 -8
- package/dist/features/post-game-stats/post-game-stats-styled.js.map +1 -1
- package/dist/features/post-game-stats/post-game-stats.js +107 -105
- package/dist/features/post-game-stats/post-game-stats.js.map +1 -1
- package/dist/features/post-game-stats/score/score-styled.js +2 -2
- package/dist/features/post-game-stats/score/score-styled.js.map +1 -1
- package/dist/features/post-game-stats/streak/constants.js +1 -1
- package/dist/features/post-game-stats/streak/constants.js.map +1 -1
- package/dist/features/post-game-stats/streak/streak-styled.js +2 -2
- package/dist/features/post-game-stats/streak/streak-styled.js.map +1 -1
- package/dist/features/stickers/sticker-selector/hooks/use-stickers-journey/use-stickers-journey.js +37 -20
- package/dist/features/stickers/sticker-selector/hooks/use-stickers-journey/use-stickers-journey.js.map +1 -1
- package/dist/index.d.ts +91 -9
- package/dist/index.js +274 -267
- package/dist/index.js.map +1 -1
- package/dist/static/accuracy-badge.2e161f00.svg +1 -0
- package/dist/static/clock-badge.0adb4ba6.svg +1 -0
- package/dist/static/down-arrow-badge.f462f615.svg +1 -0
- package/dist/static/green-tick.43b94c3a.svg +1 -0
- package/dist/static/points-badge.96bdecc9.svg +1 -0
- package/dist/static/star-badge.5450c267.svg +1 -0
- package/dist/static/up-arrow-badge.71fe7ad1.svg +1 -0
- package/package.json +1 -1
- package/dist/assets/line-icons/icons/carat-left.js +0 -26
- package/dist/assets/line-icons/icons/carat-left.js.map +0 -1
- package/dist/assets/line-icons/icons/carat-right.js +0 -26
- package/dist/assets/line-icons/icons/carat-right.js.map +0 -1
- package/dist/features/circle-games/game-launcher/api/get-content-for-today/constants.js.map +0 -1
- package/dist/features/circle-games/game-launcher/api/get-content-for-today/get-circle-home-api.js +0 -10
- package/dist/features/circle-games/game-launcher/api/get-content-for-today/get-circle-home-api.js.map +0 -1
- 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.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/card-container/constants.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/carousel/carousel-styled.js +0 -39
- package/dist/features/circle-games/game-launcher/comps/carousel/carousel-styled.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/carousel/carousel.js +0 -85
- package/dist/features/circle-games/game-launcher/comps/carousel/carousel.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card-styled.js +0 -138
- package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card-styled.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card.js +0 -105
- package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card.js.map +0 -1
- 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/infinite-button/infinite-mode-launcher-button.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/spl-events-text/constants.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/spl-events-text/spl-events-text-style.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/spl-events-text/spl-events-text-types.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/spl-events-text/spl-events-text.js.map +0 -1
- 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.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode-star/constants.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode-star/table-mode-star-styled.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode-star/table-mode-star.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-segment-star/table-segment-star-styled.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-segment-star/table-segment-star.js.map +0 -1
- 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.map +0 -1
- package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/helper.js +0 -73
- package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/helper.js.map +0 -1
- package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js +0 -36
- package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js.map +0 -1
- package/dist/features/circle-games/game-launcher/game-launcher.js +0 -219
- package/dist/features/circle-games/game-launcher/game-launcher.js.map +0 -1
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/constants.js +0 -8
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/constants.js.map +0 -1
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js +0 -286
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js.map +0 -1
- package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/constants.js +0 -10
- package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/constants.js.map +0 -1
- package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey-styled.js +0 -13
- package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey-styled.js.map +0 -1
- package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey.js +0 -137
- package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey.js.map +0 -1
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/constants.js +0 -14
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/constants.js.map +0 -1
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey-styled.js +0 -13
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey-styled.js.map +0 -1
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js +0 -230
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js.map +0 -1
- /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/card-container/card-container-styled.js +0 -0
- /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/card-container/card-container.js +0 -0
- /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/card-container/constants.js +0 -0
- /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/constants.js +0 -0
- /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/infinite-button/infinite-mode-launcher-button.js +0 -0
- /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/spl-events-text/constants.js +0 -0
- /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/spl-events-text/spl-events-text-style.js +0 -0
- /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/spl-events-text/spl-events-text-types.js +0 -0
- /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/spl-events-text/spl-events-text.js +0 -0
- /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/table-mode/table-mode-styled.js +0 -0
- /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/table-mode/table-mode.js +0 -0
- /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/table-mode-star/constants.js +0 -0
- /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/table-mode-star/table-mode-star-styled.js +0 -0
- /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/table-mode-star/table-mode-star.js +0 -0
- /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/table-segment-star/table-segment-star-styled.js +0 -0
- /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/table-segment-star/table-segment-star.js +0 -0
- /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/tables-card-styled.js +0 -0
- /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/tables-card.js +0 -0
|
@@ -1,110 +1,112 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { Accuracy as
|
|
4
|
-
import { Clock as
|
|
5
|
-
import { DigitalMeter as
|
|
1
|
+
import { jsx as n, jsxs as y } from "react/jsx-runtime";
|
|
2
|
+
import { memo as S, forwardRef as d, useState as C, useMemo as u, useCallback as s, useImperativeHandle as v } from "react";
|
|
3
|
+
import { Accuracy as g } from "./accuracy/accuracy.js";
|
|
4
|
+
import { Clock as A } from "./clock/clock.js";
|
|
5
|
+
import { DigitalMeter as R } from "./digital-meter/digital-meter.js";
|
|
6
6
|
import { EPostGameStat as t } from "./enums/post-game-stats-enum.js";
|
|
7
|
-
import { Points as
|
|
8
|
-
import { StatsWrapper as
|
|
9
|
-
import { Score as
|
|
10
|
-
import { Streak as
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
/* @__PURE__ */
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
7
|
+
import { Points as I } from "./points/points.js";
|
|
8
|
+
import { StatsWrapper as P, BlackBg as w } from "./post-game-stats-styled.js";
|
|
9
|
+
import { Score as E } from "./score/score.js";
|
|
10
|
+
import { Streak as k } from "./streak/streak.js";
|
|
11
|
+
const Y = S(
|
|
12
|
+
d(
|
|
13
|
+
({ stats: p, show: h, offsetY: T, onComplete: a }, c) => {
|
|
14
|
+
const [o, x] = C(0), e = u(() => p[o], [o, p]), m = s(() => {
|
|
15
|
+
var r;
|
|
16
|
+
if ((r = e == null ? void 0 : e.onComplete) == null || r.call(e), o === p.length - 1) {
|
|
17
|
+
a == null || a();
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
x((i) => i + 1);
|
|
21
|
+
}, [o, a, p.length, e]), l = s(() => {
|
|
22
|
+
e != null && e.stopAtEnd || m();
|
|
23
|
+
}, [e, m]);
|
|
24
|
+
v(c, () => ({
|
|
25
|
+
moveToNextAndPlay: m
|
|
26
|
+
}));
|
|
27
|
+
const f = u(() => {
|
|
28
|
+
if (!e)
|
|
29
|
+
return null;
|
|
30
|
+
const r = `${e.type}-${o}`;
|
|
31
|
+
return {
|
|
32
|
+
[t.SCORE]: /* @__PURE__ */ n(
|
|
33
|
+
E,
|
|
34
|
+
{
|
|
35
|
+
currentScore: e.value,
|
|
36
|
+
highScore: e.targetValue ?? 0,
|
|
37
|
+
show: e.type === t.SCORE,
|
|
38
|
+
onComplete: l,
|
|
39
|
+
helperText: e.helperText
|
|
40
|
+
},
|
|
41
|
+
r
|
|
42
|
+
),
|
|
43
|
+
[t.POINT]: /* @__PURE__ */ n(
|
|
44
|
+
I,
|
|
45
|
+
{
|
|
46
|
+
point: e.value,
|
|
47
|
+
show: e.type === t.POINT,
|
|
48
|
+
onComplete: l,
|
|
49
|
+
onReveal: e.onReveal
|
|
50
|
+
},
|
|
51
|
+
r
|
|
52
|
+
),
|
|
53
|
+
[t.DIGITAL_METER]: /* @__PURE__ */ n(
|
|
54
|
+
R,
|
|
55
|
+
{
|
|
56
|
+
value: e.value,
|
|
57
|
+
maxValue: e.maxValue ?? 1,
|
|
58
|
+
targetValue: e.targetValue,
|
|
59
|
+
displayText: e.displayText ?? "",
|
|
60
|
+
progressType: e.progressType ?? "linear",
|
|
61
|
+
helperTextPrimary: e.helperTextPrimary ?? "",
|
|
62
|
+
helperTextSecondary: e.helperTextSecondary ?? "",
|
|
63
|
+
actAsTimer: e.actAsTimer,
|
|
64
|
+
show: !0,
|
|
65
|
+
onComplete: l
|
|
66
|
+
},
|
|
67
|
+
r
|
|
68
|
+
),
|
|
69
|
+
[t.STREAK]: /* @__PURE__ */ n(
|
|
70
|
+
k,
|
|
71
|
+
{
|
|
72
|
+
currStreak: e.value,
|
|
73
|
+
show: !0,
|
|
74
|
+
onComplete: l,
|
|
75
|
+
helperText: e.helperText,
|
|
76
|
+
onReveal: e.onReveal
|
|
77
|
+
},
|
|
78
|
+
r
|
|
79
|
+
),
|
|
80
|
+
[t.ACCURACY]: /* @__PURE__ */ n(
|
|
81
|
+
g,
|
|
82
|
+
{
|
|
83
|
+
accuracy: e.value,
|
|
84
|
+
show: !0,
|
|
85
|
+
onComplete: l,
|
|
86
|
+
helperText: e.helperText
|
|
87
|
+
},
|
|
88
|
+
r
|
|
89
|
+
),
|
|
90
|
+
[t.CLOCK]: /* @__PURE__ */ n(
|
|
91
|
+
A,
|
|
92
|
+
{
|
|
93
|
+
timeInMs: e.value,
|
|
94
|
+
show: !0,
|
|
95
|
+
onComplete: l,
|
|
96
|
+
helperText: e.helperText
|
|
97
|
+
},
|
|
98
|
+
r
|
|
99
|
+
)
|
|
100
|
+
}[e.type] ?? null;
|
|
101
|
+
}, [e, o, l]);
|
|
102
|
+
return !h || p.length === 0 || o >= p.length ? null : /* @__PURE__ */ y(P, { $translateY: T, children: [
|
|
103
|
+
/* @__PURE__ */ n(w, {}),
|
|
104
|
+
f
|
|
105
|
+
] });
|
|
106
|
+
}
|
|
107
|
+
)
|
|
106
108
|
);
|
|
107
109
|
export {
|
|
108
|
-
|
|
110
|
+
Y as PostGameStats
|
|
109
111
|
};
|
|
110
112
|
//# sourceMappingURL=post-game-stats.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post-game-stats.js","sources":["../../../src/features/post-game-stats/post-game-stats.tsx"],"sourcesContent":["import { useState, memo, useCallback, forwardRef, useImperativeHandle, useMemo } from 'react';\n\nimport { Accuracy } from './accuracy/accuracy';\nimport { Clock } from './clock/clock';\nimport { DigitalMeter } from './digital-meter/digital-meter';\nimport { EPostGameStat } from './enums/post-game-stats-enum';\nimport { Points } from './points/points';\nimport * as Styled from './post-game-stats-styled';\nimport type { IPostGameStatsProps, IPostGameStatsRef } from './post-game-stats-types';\nimport { Score } from './score/score';\nimport { Streak } from './streak/streak';\n\nexport const PostGameStats = memo(\n forwardRef<IPostGameStatsRef, IPostGameStatsProps>(({ stats, show, onComplete }, ref) => {\n
|
|
1
|
+
{"version":3,"file":"post-game-stats.js","sources":["../../../src/features/post-game-stats/post-game-stats.tsx"],"sourcesContent":["import { useState, memo, useCallback, forwardRef, useImperativeHandle, useMemo } from 'react';\n\nimport { Accuracy } from './accuracy/accuracy';\nimport { Clock } from './clock/clock';\nimport { DigitalMeter } from './digital-meter/digital-meter';\nimport { EPostGameStat } from './enums/post-game-stats-enum';\nimport { Points } from './points/points';\nimport * as Styled from './post-game-stats-styled';\nimport type { IPostGameStatsProps, IPostGameStatsRef } from './post-game-stats-types';\nimport { Score } from './score/score';\nimport { Streak } from './streak/streak';\n\nexport const PostGameStats = memo(\n forwardRef<IPostGameStatsRef, IPostGameStatsProps>(\n ({ stats, show, offsetY, onComplete }, ref) => {\n const [currStatIndex, setCurrentStatIndex] = useState(0);\n const currStatData = useMemo(() => stats[currStatIndex], [currStatIndex, stats]);\n\n const moveToNextAndPlay = useCallback(() => {\n currStatData?.onComplete?.();\n\n if (currStatIndex === stats.length - 1) {\n onComplete?.();\n\n return;\n }\n setCurrentStatIndex(prev => prev + 1);\n }, [currStatIndex, onComplete, stats.length, currStatData]);\n\n const onStatAnimationComplete = useCallback(() => {\n if (currStatData?.stopAtEnd) {\n return;\n }\n moveToNextAndPlay(); // Autoplay since stopAtEnd is false\n }, [currStatData, moveToNextAndPlay]);\n\n useImperativeHandle(ref, () => ({\n moveToNextAndPlay,\n }));\n\n const renderCurrentStat = useMemo(() => {\n if (!currStatData) {\n return null;\n }\n\n const key = `${currStatData.type}-${currStatIndex}`;\n\n const renderStat = {\n [EPostGameStat.SCORE]: (\n <Score\n key={key}\n currentScore={currStatData.value}\n highScore={currStatData.targetValue ?? 0}\n show={currStatData.type === EPostGameStat.SCORE}\n onComplete={onStatAnimationComplete}\n helperText={currStatData.helperText}\n />\n ),\n\n [EPostGameStat.POINT]: (\n <Points\n key={key}\n point={currStatData.value}\n show={currStatData.type === EPostGameStat.POINT}\n onComplete={onStatAnimationComplete}\n onReveal={currStatData.onReveal}\n />\n ),\n [EPostGameStat.DIGITAL_METER]: (\n <DigitalMeter\n key={key}\n value={currStatData.value}\n maxValue={currStatData.maxValue ?? 1}\n targetValue={currStatData.targetValue}\n displayText={currStatData.displayText ?? ''}\n progressType={currStatData.progressType ?? 'linear'}\n helperTextPrimary={currStatData.helperTextPrimary ?? ''}\n helperTextSecondary={currStatData.helperTextSecondary ?? ''}\n actAsTimer={currStatData.actAsTimer}\n show={true}\n onComplete={onStatAnimationComplete}\n />\n ),\n [EPostGameStat.STREAK]: (\n <Streak\n key={key}\n currStreak={currStatData.value}\n show={true}\n onComplete={onStatAnimationComplete}\n helperText={currStatData.helperText}\n onReveal={currStatData.onReveal}\n />\n ),\n [EPostGameStat.ACCURACY]: (\n <Accuracy\n key={key}\n accuracy={currStatData.value}\n show={true}\n onComplete={onStatAnimationComplete}\n helperText={currStatData.helperText}\n />\n ),\n [EPostGameStat.CLOCK]: (\n <Clock\n key={key}\n timeInMs={currStatData.value}\n show={true}\n onComplete={onStatAnimationComplete}\n helperText={currStatData.helperText}\n />\n ),\n };\n\n return renderStat[currStatData.type] ?? null;\n }, [currStatData, currStatIndex, onStatAnimationComplete]);\n\n if (!show || stats.length === 0 || currStatIndex >= stats.length) {\n return null;\n }\n\n return (\n <Styled.StatsWrapper $translateY={offsetY}>\n <Styled.BlackBg />\n\n {renderCurrentStat}\n </Styled.StatsWrapper>\n );\n },\n ),\n);\n"],"names":["PostGameStats","memo","forwardRef","stats","show","offsetY","onComplete","ref","currStatIndex","setCurrentStatIndex","useState","currStatData","useMemo","moveToNextAndPlay","useCallback","_a","prev","onStatAnimationComplete","useImperativeHandle","renderCurrentStat","key","EPostGameStat","jsx","Score","Points","DigitalMeter","Streak","Accuracy","Clock","jsxs","Styled.StatsWrapper","Styled.BlackBg"],"mappings":";;;;;;;;;;AAYO,MAAMA,IAAgBC;AAAA,EAC3BC;AAAA,IACE,CAAC,EAAE,OAAAC,GAAO,MAAAC,GAAM,SAAAC,GAAS,YAAAC,EAAA,GAAcC,MAAQ;AAC7C,YAAM,CAACC,GAAeC,CAAmB,IAAIC,EAAS,CAAC,GACjDC,IAAeC,EAAQ,MAAMT,EAAMK,CAAa,GAAG,CAACA,GAAeL,CAAK,CAAC,GAEzEU,IAAoBC,EAAY,MAAM;;AAGtC,aAFJC,IAAAJ,KAAA,gBAAAA,EAAc,eAAd,QAAAI,EAAA,KAAAJ,IAEIH,MAAkBL,EAAM,SAAS,GAAG;AACzB,UAAAG,KAAA,QAAAA;AAEb;AAAA,QACF;AACoB,QAAAG,EAAA,CAAAO,MAAQA,IAAO,CAAC;AAAA,MAAA,GACnC,CAACR,GAAeF,GAAYH,EAAM,QAAQQ,CAAY,CAAC,GAEpDM,IAA0BH,EAAY,MAAM;AAChD,QAAIH,KAAA,QAAAA,EAAc,aAGAE;MAAA,GACjB,CAACF,GAAcE,CAAiB,CAAC;AAEpC,MAAAK,EAAoBX,GAAK,OAAO;AAAA,QAC9B,mBAAAM;AAAA,MACA,EAAA;AAEI,YAAAM,IAAoBP,EAAQ,MAAM;AACtC,YAAI,CAACD;AACI,iBAAA;AAGT,cAAMS,IAAM,GAAGT,EAAa,IAAI,IAAIH,CAAa;AAoE1C,eAlEY;AAAA,UACjB,CAACa,EAAc,KAAK,GAClB,gBAAAC;AAAA,YAACC;AAAA,YAAA;AAAA,cAEC,cAAcZ,EAAa;AAAA,cAC3B,WAAWA,EAAa,eAAe;AAAA,cACvC,MAAMA,EAAa,SAASU,EAAc;AAAA,cAC1C,YAAYJ;AAAA,cACZ,YAAYN,EAAa;AAAA,YAAA;AAAA,YALpBS;AAAA,UAMP;AAAA,UAGF,CAACC,EAAc,KAAK,GAClB,gBAAAC;AAAA,YAACE;AAAA,YAAA;AAAA,cAEC,OAAOb,EAAa;AAAA,cACpB,MAAMA,EAAa,SAASU,EAAc;AAAA,cAC1C,YAAYJ;AAAA,cACZ,UAAUN,EAAa;AAAA,YAAA;AAAA,YAJlBS;AAAA,UAKP;AAAA,UAEF,CAACC,EAAc,aAAa,GAC1B,gBAAAC;AAAA,YAACG;AAAA,YAAA;AAAA,cAEC,OAAOd,EAAa;AAAA,cACpB,UAAUA,EAAa,YAAY;AAAA,cACnC,aAAaA,EAAa;AAAA,cAC1B,aAAaA,EAAa,eAAe;AAAA,cACzC,cAAcA,EAAa,gBAAgB;AAAA,cAC3C,mBAAmBA,EAAa,qBAAqB;AAAA,cACrD,qBAAqBA,EAAa,uBAAuB;AAAA,cACzD,YAAYA,EAAa;AAAA,cACzB,MAAM;AAAA,cACN,YAAYM;AAAA,YAAA;AAAA,YAVPG;AAAA,UAWP;AAAA,UAEF,CAACC,EAAc,MAAM,GACnB,gBAAAC;AAAA,YAACI;AAAA,YAAA;AAAA,cAEC,YAAYf,EAAa;AAAA,cACzB,MAAM;AAAA,cACN,YAAYM;AAAA,cACZ,YAAYN,EAAa;AAAA,cACzB,UAAUA,EAAa;AAAA,YAAA;AAAA,YALlBS;AAAA,UAMP;AAAA,UAEF,CAACC,EAAc,QAAQ,GACrB,gBAAAC;AAAA,YAACK;AAAA,YAAA;AAAA,cAEC,UAAUhB,EAAa;AAAA,cACvB,MAAM;AAAA,cACN,YAAYM;AAAA,cACZ,YAAYN,EAAa;AAAA,YAAA;AAAA,YAJpBS;AAAA,UAKP;AAAA,UAEF,CAACC,EAAc,KAAK,GAClB,gBAAAC;AAAA,YAACM;AAAA,YAAA;AAAA,cAEC,UAAUjB,EAAa;AAAA,cACvB,MAAM;AAAA,cACN,YAAYM;AAAA,cACZ,YAAYN,EAAa;AAAA,YAAA;AAAA,YAJpBS;AAAA,UAKP;AAAA,QAAA,EAIcT,EAAa,IAAI,KAAK;AAAA,MACvC,GAAA,CAACA,GAAcH,GAAeS,CAAuB,CAAC;AAEzD,aAAI,CAACb,KAAQD,EAAM,WAAW,KAAKK,KAAiBL,EAAM,SACjD,OAIN,gBAAA0B,EAAAC,GAAA,EAAoB,aAAazB,GAChC,UAAA;AAAA,QAAC,gBAAAiB,EAAAS,GAAA,EAAe;AAAA,QAEfZ;AAAA,MACH,EAAA,CAAA;AAAA,IAEJ;AAAA,EACF;AACF;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import o, { keyframes as r, css as a } 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 e } from "../../circle-games/game-launcher/comps/
|
|
2
|
+
import { GAME_LAUNCHER_SIZE as t } from "../../circle-games/game-launcher-v2/comps/card-container/constants.js";
|
|
3
|
+
import { GAME_LAUNCHER_ASSET_PADDING as e } from "../../circle-games/game-launcher-v2/comps/circular-game-card/constants.js";
|
|
4
4
|
import s from "../../ui/text/text.js";
|
|
5
5
|
const p = r`
|
|
6
6
|
0%{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"score-styled.js","sources":["../../../../src/features/post-game-stats/score/score-styled.tsx"],"sourcesContent":["import styled, { css, keyframes } 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/
|
|
1
|
+
{"version":3,"file":"score-styled.js","sources":["../../../../src/features/post-game-stats/score/score-styled.tsx"],"sourcesContent":["import styled, { css, keyframes } from 'styled-components';\n\nimport { GAME_LAUNCHER_SIZE } from '../../circle-games/game-launcher-v2/comps/card-container/constants';\nimport { GAME_LAUNCHER_ASSET_PADDING } from '../../circle-games/game-launcher-v2/comps/circular-game-card/constants';\nimport Text from '../../ui/text/text';\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 HighScore = styled.div`\n height: ${GAME_LAUNCHER_SIZE}px;\n width: ${GAME_LAUNCHER_SIZE}px;\n border: 2px solid #fff;\n border-radius: 50%;\n background: transparent;\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n`;\n\nexport const HighScoreConfetti = 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 transform: scale(1.13);\n z-index: 0;\n`;\n\nexport const HighScoreTextAnimation = styled.div<{ opacity: number }>`\n z-index: 2;\n opacity: ${({ opacity }) => opacity};\n position: absolute;\n margin: 0 auto;\n top: calc(100% - 35px);\n width: ${GAME_LAUNCHER_SIZE}px;\n`;\n\nexport const HighScoreValueWrapper = styled.div<{\n $duration: number;\n $animationType: 'fadein' | 'fadeout';\n}>`\n z-index: 2;\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 ScoreText = styled(Text)`\n position: absolute;\n top: 50%;\n transform: translateY(32px);\n`;\n"],"names":["fadeIn","keyframes","fadeOut","HighScore","styled","GAME_LAUNCHER_SIZE","HighScoreConfetti","GAME_LAUNCHER_ASSET_PADDING","HighScoreTextAnimation","opacity","HighScoreValueWrapper","$animationType","$duration","css","ScoreText","Text"],"mappings":";;;;AAMA,MAAMA,IAASC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASTC,IAAUD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASHE,IAAYC,EAAO;AAAA,YACpBC,CAAkB;AAAA,WACnBA,CAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAUhBC,IAAoBF,EAAO;AAAA,YAC5BC,IAAqBE,CAA2B;AAAA,WACjDF,IAAqBE,CAA2B;AAAA;AAAA;AAAA;AAAA,GAM9CC,IAAyBJ,EAAO;AAAA;AAAA,aAEhC,CAAC,EAAE,SAAAK,EAAQ,MAAMA,CAAO;AAAA;AAAA;AAAA;AAAA,WAI1BJ,CAAkB;AAAA,GAGhBK,IAAwBN,EAAO;AAAA;AAAA,eAK7B,CAAC,EAAE,gBAAAO,GAAgB,WAAAC,EAAA,MAAgBC;AAAA,MAC5CF,MAAmB,WAAWX,IAASE,CAAO,IAAIU,CAAS;AAAA,GAC9D;AAAA;AAAA;AAAA;AAAA;AAAA,GAOUE,IAAYV,EAAOW,CAAI;AAAA;AAAA;AAAA;AAAA;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GAME_LAUNCHER_SIZE as A } from "../../circle-games/game-launcher/comps/card-container/constants.js";
|
|
1
|
+
import { GAME_LAUNCHER_SIZE as A } from "../../circle-games/game-launcher-v2/comps/card-container/constants.js";
|
|
2
2
|
const R = [15, 27], I = [29, 40], N = 400, O = 2e3, S = 333, o = 400, t = 200, c = 1200, n = 133, T = 50, E = 20, s = A - T - E;
|
|
3
3
|
export {
|
|
4
4
|
R as IN_FRAMES,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["../../../../src/features/post-game-stats/streak/constants.ts"],"sourcesContent":["import type { AnimationSegment } from 'lottie-web';\n\nimport { GAME_LAUNCHER_SIZE } from '../../circle-games/game-launcher/comps/card-container/constants';\n\nexport const IN_FRAMES = [15, 27] as unknown as AnimationSegment[];\nexport const OUT_FRAMES = [29, 40] as unknown as AnimationSegment[];\n\n// streak number durations in ms\nexport const STREAK_APPEAR_ANIMATION_DURATION = 400;\nexport const STREAK_WAIT_DURATION = 2000;\nexport const STREAK_DISAPPEAR_ANIMATION_DURATION = 333;\nexport const STREAK_SCROLL_ANIMATION_DURATION = 400;\n\n// test dureations in ms\nexport const TEXT_APPEAR_DURATION = 200;\nexport const TEXT_DISAPPEAR_DELAY = 1200;\nexport const TEXT_DISAPPEAR_DURATION = 133;\n\nexport const STREAK_TOP_GREEN_SEGMENT_HEIGHT = 50;\nexport const STREAK_CONTAINER_TOP_OFFSET = 20;\n\nexport const STREAK_CONTAINER_HEIGHT =\n GAME_LAUNCHER_SIZE - STREAK_TOP_GREEN_SEGMENT_HEIGHT - STREAK_CONTAINER_TOP_OFFSET;\n"],"names":["IN_FRAMES","OUT_FRAMES","STREAK_APPEAR_ANIMATION_DURATION","STREAK_WAIT_DURATION","STREAK_DISAPPEAR_ANIMATION_DURATION","STREAK_SCROLL_ANIMATION_DURATION","TEXT_APPEAR_DURATION","TEXT_DISAPPEAR_DELAY","TEXT_DISAPPEAR_DURATION","STREAK_TOP_GREEN_SEGMENT_HEIGHT","STREAK_CONTAINER_TOP_OFFSET","STREAK_CONTAINER_HEIGHT","GAME_LAUNCHER_SIZE"],"mappings":";AAIa,MAAAA,IAAY,CAAC,IAAI,EAAE,GACnBC,IAAa,CAAC,IAAI,EAAE,GAGpBC,IAAmC,KACnCC,IAAuB,KACvBC,IAAsC,KACtCC,IAAmC,KAGnCC,IAAuB,KACvBC,IAAuB,MACvBC,IAA0B,KAE1BC,IAAkC,IAClCC,IAA8B,IAE9BC,IACXC,IAAqBH,IAAkCC;"}
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../src/features/post-game-stats/streak/constants.ts"],"sourcesContent":["import type { AnimationSegment } from 'lottie-web';\n\nimport { GAME_LAUNCHER_SIZE } from '../../circle-games/game-launcher-v2/comps/card-container/constants';\n\nexport const IN_FRAMES = [15, 27] as unknown as AnimationSegment[];\nexport const OUT_FRAMES = [29, 40] as unknown as AnimationSegment[];\n\n// streak number durations in ms\nexport const STREAK_APPEAR_ANIMATION_DURATION = 400;\nexport const STREAK_WAIT_DURATION = 2000;\nexport const STREAK_DISAPPEAR_ANIMATION_DURATION = 333;\nexport const STREAK_SCROLL_ANIMATION_DURATION = 400;\n\n// test dureations in ms\nexport const TEXT_APPEAR_DURATION = 200;\nexport const TEXT_DISAPPEAR_DELAY = 1200;\nexport const TEXT_DISAPPEAR_DURATION = 133;\n\nexport const STREAK_TOP_GREEN_SEGMENT_HEIGHT = 50;\nexport const STREAK_CONTAINER_TOP_OFFSET = 20;\n\nexport const STREAK_CONTAINER_HEIGHT =\n GAME_LAUNCHER_SIZE - STREAK_TOP_GREEN_SEGMENT_HEIGHT - STREAK_CONTAINER_TOP_OFFSET;\n"],"names":["IN_FRAMES","OUT_FRAMES","STREAK_APPEAR_ANIMATION_DURATION","STREAK_WAIT_DURATION","STREAK_DISAPPEAR_ANIMATION_DURATION","STREAK_SCROLL_ANIMATION_DURATION","TEXT_APPEAR_DURATION","TEXT_DISAPPEAR_DELAY","TEXT_DISAPPEAR_DURATION","STREAK_TOP_GREEN_SEGMENT_HEIGHT","STREAK_CONTAINER_TOP_OFFSET","STREAK_CONTAINER_HEIGHT","GAME_LAUNCHER_SIZE"],"mappings":";AAIa,MAAAA,IAAY,CAAC,IAAI,EAAE,GACnBC,IAAa,CAAC,IAAI,EAAE,GAGpBC,IAAmC,KACnCC,IAAuB,KACvBC,IAAsC,KACtCC,IAAmC,KAGnCC,IAAuB,KACvBC,IAAuB,MACvBC,IAA0B,KAE1BC,IAAkC,IAClCC,IAA8B,IAE9BC,IACXC,IAAqBH,IAAkCC;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
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-container/constants.js";
|
|
3
|
-
import { GAME_LAUNCHER_ASSET_PADDING as n } from "../../circle-games/game-launcher/comps/
|
|
2
|
+
import { GAME_LAUNCHER_SIZE as t } from "../../circle-games/game-launcher-v2/comps/card-container/constants.js";
|
|
3
|
+
import { GAME_LAUNCHER_ASSET_PADDING as n } from "../../circle-games/game-launcher-v2/comps/circular-game-card/constants.js";
|
|
4
4
|
import c from "../../ui/text/text.js";
|
|
5
5
|
import { STREAK_TOP_GREEN_SEGMENT_HEIGHT as x, STREAK_CONTAINER_HEIGHT as o } from "./constants.js";
|
|
6
6
|
const m = 50 * 84 / 100, p = r`
|
|
@@ -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/
|
|
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-v2/comps/card-container/constants';\nimport { GAME_LAUNCHER_ASSET_PADDING } from '../../circle-games/game-launcher-v2/comps/circular-game-card/constants';\nimport Text from '../../ui/text/text';\nimport { STREAK_CONTAINER_HEIGHT, 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`;\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: ${STREAK_CONTAINER_HEIGHT}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: ${STREAK_CONTAINER_HEIGHT * 2}px;\n transition: transform ${({ $translateDuration }) => `${$translateDuration}ms linear`};\n transform: ${({ $translate }) =>\n $translate ? `translateY(-${STREAK_CONTAINER_HEIGHT}px)` : 'translateY(0)'};\n`;\n\nexport const StreakValue = styled(Text)`\n font-size: 123px;\n line-height: 123px;\n text-align: center;\n height: ${STREAK_CONTAINER_HEIGHT}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","StreakValueWrapper","STREAK_TOP_GREEN_SEGMENT_HEIGHT","STREAK_CONTAINER_HEIGHT","$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,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,GAI9CE,IAAqBL,EAAO;AAAA;AAAA,SAKhCM,CAA+B;AAAA;AAAA,YAE5BC,CAAuB;AAAA,eACpB,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,YAQ/BO,IAA0B,CAAC;AAAA,0BACb,CAAC,EAAE,oBAAAK,EAAyB,MAAA,GAAGA,CAAkB,WAAW;AAAA,eACvE,CAAC,EAAE,YAAAC,EAAW,MACzBA,IAAa,eAAeN,CAAuB,QAAQ,eAAe;AAAA,GAGjEO,IAAcd,EAAOe,CAAI;AAAA;AAAA;AAAA;AAAA,YAI1BR,CAAuB;AAAA;AAAA;AAAA;AAAA;AAAA,GAOtBS,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;"}
|
package/dist/features/stickers/sticker-selector/hooks/use-stickers-journey/use-stickers-journey.js
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { jsxs as l, jsx as e
|
|
1
|
+
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback as m, useMemo as h } from "react";
|
|
3
3
|
import { JOURNEY_ID_TEACHER as t } from "../../../../journey/journey-id/journey-id-teacher.js";
|
|
4
4
|
import { IndicatorType as C } from "../../../../journey/use-journey/constants.js";
|
|
5
5
|
import { useJourney as T } from "../../../../journey/use-journey/use-journey.js";
|
|
6
6
|
import y from "../../../../ui/buttons/button/button.js";
|
|
7
|
-
import
|
|
7
|
+
import O from "../../../../ui/layout/flex-view.js";
|
|
8
8
|
import S from "../../../../ui/separator/separator.js";
|
|
9
|
-
import
|
|
9
|
+
import u from "../../../../ui/text/text.js";
|
|
10
10
|
const x = ({
|
|
11
11
|
triggerRef: o,
|
|
12
|
+
triggerElement: n,
|
|
12
13
|
tooltipConfig: r
|
|
13
14
|
}) => {
|
|
14
|
-
const { setJourney:
|
|
15
|
-
|
|
16
|
-
}, [
|
|
15
|
+
const { setJourney: a, nextCoachmark: s, endJourney: i } = T(), d = m(() => {
|
|
16
|
+
i(t.STICKERS_INTRO_JOURNEY);
|
|
17
|
+
}, [i]), c = m(() => {
|
|
17
18
|
if (!o.current) return;
|
|
18
19
|
const p = {
|
|
19
20
|
position: r.position,
|
|
@@ -24,9 +25,9 @@ const x = ({
|
|
|
24
25
|
borderColor: "BLACK",
|
|
25
26
|
arrowColor: "BLACK",
|
|
26
27
|
backgroundColor: "PURPLE_4",
|
|
27
|
-
tooltipItem: /* @__PURE__ */ l(
|
|
28
|
-
/* @__PURE__ */ e(
|
|
29
|
-
|
|
28
|
+
tooltipItem: /* @__PURE__ */ l(O, { children: [
|
|
29
|
+
/* @__PURE__ */ e(O, { children: /* @__PURE__ */ l(
|
|
30
|
+
u,
|
|
30
31
|
{
|
|
31
32
|
$renderOnMobileAs: "ab3",
|
|
32
33
|
$renderAs: "ab3",
|
|
@@ -34,7 +35,7 @@ const x = ({
|
|
|
34
35
|
$inline: !0,
|
|
35
36
|
$whiteSpace: "normal",
|
|
36
37
|
children: [
|
|
37
|
-
/* @__PURE__ */ e(
|
|
38
|
+
/* @__PURE__ */ e(u, { $renderAs: "ab3-bold", as: "span", $inline: !0, children: "New Stickers" }),
|
|
38
39
|
" ",
|
|
39
40
|
"- Use them to celebrate little moments of joy!"
|
|
40
41
|
]
|
|
@@ -48,20 +49,36 @@ const x = ({
|
|
|
48
49
|
label: "Got It",
|
|
49
50
|
size: "xsmall",
|
|
50
51
|
width: "50%",
|
|
51
|
-
onClick:
|
|
52
|
+
onClick: d
|
|
52
53
|
}
|
|
53
54
|
)
|
|
54
55
|
] })
|
|
55
56
|
};
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
57
|
+
a(
|
|
58
|
+
t.STICKERS_INTRO_JOURNEY,
|
|
59
|
+
[
|
|
60
|
+
{
|
|
61
|
+
originalElementToHighlightRef: o,
|
|
62
|
+
type: C.TOOLTIP,
|
|
63
|
+
elementToHighlight: n,
|
|
64
|
+
indicator: p
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
void 0,
|
|
68
|
+
!1
|
|
69
|
+
), s(t.STICKERS_INTRO_JOURNEY);
|
|
70
|
+
}, [
|
|
71
|
+
o,
|
|
72
|
+
n,
|
|
73
|
+
r.position,
|
|
74
|
+
r.tooltipXCoOrdinates,
|
|
75
|
+
r.tooltipYCoOrdinates,
|
|
76
|
+
r.arrowXCoOrdinates,
|
|
77
|
+
r.arrowYCoOrdinates,
|
|
78
|
+
d,
|
|
79
|
+
a,
|
|
80
|
+
s
|
|
81
|
+
]);
|
|
65
82
|
return h(
|
|
66
83
|
() => ({
|
|
67
84
|
startTeacherStickersJourney: c
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-stickers-journey.js","sources":["../../../../../../src/features/stickers/sticker-selector/hooks/use-stickers-journey/use-stickers-journey.tsx"],"sourcesContent":["import { useCallback, useMemo } from 'react';\n\nimport { JOURNEY_ID_TEACHER } from '../../../../journey/journey-id/journey-id-teacher';\nimport { IndicatorType } from '../../../../journey/use-journey/constants';\nimport { useJourney } from '../../../../journey/use-journey/use-journey';\nimport type { IArrowTooltipProps } from '../../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport Button from '../../../../ui/buttons/button/button';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Separator from '../../../../ui/separator/separator';\nimport Text from '../../../../ui/text/text';\nimport type { IUseTeacherStickersJourneyProps } from './use-stickers-journey-types';\n\nexport const useStickersJourney = ({\n triggerRef,\n tooltipConfig,\n}: IUseTeacherStickersJourneyProps) => {\n const { setJourney, nextCoachmark, endJourney } = useJourney();\n\n const endTeacherStickersOnboarding = useCallback(() => {\n endJourney(JOURNEY_ID_TEACHER.STICKERS_INTRO_JOURNEY);\n }, [endJourney]);\n\n const startTeacherStickersJourney = useCallback(() => {\n if (!triggerRef.current) return;\n\n const indicatorPayload = {\n position: tooltipConfig.position,\n tooltipXCoOrdinates: tooltipConfig.tooltipXCoOrdinates,\n tooltipYCoOrdinates: tooltipConfig.tooltipYCoOrdinates,\n arrowXCoOrdinates: tooltipConfig.arrowXCoOrdinates,\n arrowYCoOrdinates: tooltipConfig.arrowYCoOrdinates,\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n backgroundColor: 'PURPLE_4',\n tooltipItem: (\n <FlexView>\n <FlexView>\n <Text\n $renderOnMobileAs=\"ab3\"\n $renderAs=\"ab3\"\n as=\"span\"\n $inline={true}\n $whiteSpace=\"normal\"\n >\n <Text $renderAs=\"ab3-bold\" as=\"span\" $inline={true}>\n New Stickers\n </Text>{' '}\n - Use them to celebrate little moments of joy!\n </Text>\n </FlexView>\n <Separator height={10} />\n <Button\n renderAs=\"secondary\"\n label=\"Got It\"\n size=\"xsmall\"\n width=\"50%\"\n onClick={endTeacherStickersOnboarding}\n />\n </FlexView>\n ),\n } as IArrowTooltipProps;\n\n setJourney(JOURNEY_ID_TEACHER.STICKERS_INTRO_JOURNEY
|
|
1
|
+
{"version":3,"file":"use-stickers-journey.js","sources":["../../../../../../src/features/stickers/sticker-selector/hooks/use-stickers-journey/use-stickers-journey.tsx"],"sourcesContent":["import { useCallback, useMemo } from 'react';\n\nimport { JOURNEY_ID_TEACHER } from '../../../../journey/journey-id/journey-id-teacher';\nimport { IndicatorType } from '../../../../journey/use-journey/constants';\nimport { useJourney } from '../../../../journey/use-journey/use-journey';\nimport type { IArrowTooltipProps } from '../../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport Button from '../../../../ui/buttons/button/button';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Separator from '../../../../ui/separator/separator';\nimport Text from '../../../../ui/text/text';\nimport type { IUseTeacherStickersJourneyProps } from './use-stickers-journey-types';\n\nexport const useStickersJourney = ({\n triggerRef,\n triggerElement,\n tooltipConfig,\n}: IUseTeacherStickersJourneyProps) => {\n const { setJourney, nextCoachmark, endJourney } = useJourney();\n\n const endTeacherStickersOnboarding = useCallback(() => {\n endJourney(JOURNEY_ID_TEACHER.STICKERS_INTRO_JOURNEY);\n }, [endJourney]);\n\n const startTeacherStickersJourney = useCallback(() => {\n if (!triggerRef.current) return;\n\n const indicatorPayload = {\n position: tooltipConfig.position,\n tooltipXCoOrdinates: tooltipConfig.tooltipXCoOrdinates,\n tooltipYCoOrdinates: tooltipConfig.tooltipYCoOrdinates,\n arrowXCoOrdinates: tooltipConfig.arrowXCoOrdinates,\n arrowYCoOrdinates: tooltipConfig.arrowYCoOrdinates,\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n backgroundColor: 'PURPLE_4',\n tooltipItem: (\n <FlexView>\n <FlexView>\n <Text\n $renderOnMobileAs=\"ab3\"\n $renderAs=\"ab3\"\n as=\"span\"\n $inline={true}\n $whiteSpace=\"normal\"\n >\n <Text $renderAs=\"ab3-bold\" as=\"span\" $inline={true}>\n New Stickers\n </Text>{' '}\n - Use them to celebrate little moments of joy!\n </Text>\n </FlexView>\n <Separator height={10} />\n <Button\n renderAs=\"secondary\"\n label=\"Got It\"\n size=\"xsmall\"\n width=\"50%\"\n onClick={endTeacherStickersOnboarding}\n />\n </FlexView>\n ),\n } as IArrowTooltipProps;\n\n setJourney(\n JOURNEY_ID_TEACHER.STICKERS_INTRO_JOURNEY,\n [\n {\n originalElementToHighlightRef: triggerRef,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: triggerElement,\n indicator: indicatorPayload,\n },\n ],\n undefined,\n false,\n );\n\n nextCoachmark(JOURNEY_ID_TEACHER.STICKERS_INTRO_JOURNEY);\n }, [\n triggerRef,\n triggerElement,\n tooltipConfig.position,\n tooltipConfig.tooltipXCoOrdinates,\n tooltipConfig.tooltipYCoOrdinates,\n tooltipConfig.arrowXCoOrdinates,\n tooltipConfig.arrowYCoOrdinates,\n endTeacherStickersOnboarding,\n setJourney,\n nextCoachmark,\n ]);\n\n const stickerJourney = useMemo(\n () => ({\n startTeacherStickersJourney,\n }),\n [startTeacherStickersJourney],\n );\n\n return stickerJourney;\n};\n"],"names":["useStickersJourney","triggerRef","triggerElement","tooltipConfig","setJourney","nextCoachmark","endJourney","useJourney","endTeacherStickersOnboarding","useCallback","JOURNEY_ID_TEACHER","startTeacherStickersJourney","indicatorPayload","FlexView","jsx","jsxs","Text","Separator","Button","IndicatorType","useMemo"],"mappings":";;;;;;;;;AAYO,MAAMA,IAAqB,CAAC;AAAA,EACjC,YAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,eAAAC;AACF,MAAuC;AACrC,QAAM,EAAE,YAAAC,GAAY,eAAAC,GAAe,YAAAC,MAAeC,EAAW,GAEvDC,IAA+BC,EAAY,MAAM;AACrD,IAAAH,EAAWI,EAAmB,sBAAsB;AAAA,EAAA,GACnD,CAACJ,CAAU,CAAC,GAETK,IAA8BF,EAAY,MAAM;AAChD,QAAA,CAACR,EAAW,QAAS;AAEzB,UAAMW,IAAmB;AAAA,MACvB,UAAUT,EAAc;AAAA,MACxB,qBAAqBA,EAAc;AAAA,MACnC,qBAAqBA,EAAc;AAAA,MACnC,mBAAmBA,EAAc;AAAA,MACjC,mBAAmBA,EAAc;AAAA,MACjC,aAAa;AAAA,MACb,YAAY;AAAA,MACZ,iBAAiB;AAAA,MACjB,+BACGU,GACC,EAAA,UAAA;AAAA,QAAA,gBAAAC,EAACD,GACC,EAAA,UAAA,gBAAAE;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,mBAAkB;AAAA,YAClB,WAAU;AAAA,YACV,IAAG;AAAA,YACH,SAAS;AAAA,YACT,aAAY;AAAA,YAEZ,UAAA;AAAA,cAAA,gBAAAF,EAACE,KAAK,WAAU,YAAW,IAAG,QAAO,SAAS,IAAM,UAEpD,eAAA,CAAA;AAAA,cAAQ;AAAA,cAAI;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA,GAGhB;AAAA,QACA,gBAAAF,EAACG,GAAU,EAAA,QAAQ,GAAI,CAAA;AAAA,QACvB,gBAAAH;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,UAAS;AAAA,YACT,OAAM;AAAA,YACN,MAAK;AAAA,YACL,OAAM;AAAA,YACN,SAASV;AAAA,UAAA;AAAA,QACX;AAAA,MAAA,GACF;AAAA,IAAA;AAIJ,IAAAJ;AAAA,MACEM,EAAmB;AAAA,MACnB;AAAA,QACE;AAAA,UACE,+BAA+BT;AAAA,UAC/B,MAAMkB,EAAc;AAAA,UACpB,oBAAoBjB;AAAA,UACpB,WAAWU;AAAA,QACb;AAAA,MACF;AAAA,MACA;AAAA,MACA;AAAA,IAAA,GAGFP,EAAcK,EAAmB,sBAAsB;AAAA,EAAA,GACtD;AAAA,IACDT;AAAA,IACAC;AAAA,IACAC,EAAc;AAAA,IACdA,EAAc;AAAA,IACdA,EAAc;AAAA,IACdA,EAAc;AAAA,IACdA,EAAc;AAAA,IACdK;AAAA,IACAJ;AAAA,IACAC;AAAA,EAAA,CACD;AASM,SAPgBe;AAAA,IACrB,OAAO;AAAA,MACL,6BAAAT;AAAA,IAAA;AAAA,IAEF,CAACA,CAA2B;AAAA,EAAA;AAIhC;"}
|