@cuemath/leap 2.9.7-rj-2 → 2.9.7-rj-3

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,217 +1,223 @@
1
- import { jsx as t, Fragment as L } from "react/jsx-runtime";
2
- import { useRef as O, useCallback as g, useMemo as ae, useEffect as de } from "react";
3
- import ee from "../../../../../assets/line-icons/icons/carat-right.js";
4
- import { PLATFORM_EVENTS_STUDENT as te } from "../../../../analytics-events/platform-events-student.js";
5
- import { JOURNEY_ID_STUDENT as se } from "../../../../journey/journey-id/journey-id-student.js";
1
+ import { jsx as t, Fragment as R } from "react/jsx-runtime";
2
+ import { useRef as L, useCallback as E, useMemo as de, useEffect as se } from "react";
3
+ import te from "../../../../../assets/line-icons/icons/carat-right.js";
4
+ import { PLATFORM_EVENTS_STUDENT as re } from "../../../../analytics-events/platform-events-student.js";
5
+ import { JOURNEY_ID_STUDENT as me } from "../../../../journey/journey-id/journey-id-student.js";
6
6
  import { IndicatorType as c } from "../../../../journey/use-journey/constants.js";
7
- import { useJourney as me } from "../../../../journey/use-journey/use-journey.js";
7
+ import { useJourney as Te } from "../../../../journey/use-journey/use-journey.js";
8
8
  import ne from "../../../../ui/buttons/icon-button/icon-button.js";
9
- import { useUIContext as he } from "../../../../ui/context/context.js";
10
- import R from "../../../../ui/layout/flex-view.js";
9
+ import { useUIContext as ue } from "../../../../ui/context/context.js";
10
+ import y from "../../../../ui/layout/flex-view.js";
11
11
  import a from "../../../../ui/text/text.js";
12
- import { getTheme as ue } from "../../../../ui/theme/get-theme.js";
13
- import { CIRCLE_ONBOARDING_ANALYTICS_STEPS as E } from "../../../enum/circle-onboarding-steps.js";
14
- import { useCircleSounds as Te } from "../../../hooks/use-circle-sounds/use-circle-sounds.js";
15
- import { SegmentedGameCard as ge } from "../../comps/segmented-game-card/segmented-game-card.js";
16
- import { GAME_LAUNCHER_ANALYTICS_EVENTS as re } from "../../game-launcher-analytics-events.js";
17
- import { GO_TO_NEXT_SLIDE_AFTER_MS as Ee, SHOW_LABEL_HIGHLIGHT_AFTER_MS as pe, SHOW_NUDGE_AFTER_MS as Ie, SLIDE_TO_LESSON_MS as _e } from "./constants.js";
18
- import { ProjectType as Ce } from "../../../games/web-view/enums/project-type-enum.js";
19
- const Ve = ({
20
- carouselRefs: r,
21
- onSegmentClick: y,
22
- onJourneyComplete: S
12
+ import { getTheme as he } from "../../../../ui/theme/get-theme.js";
13
+ import { CIRCLE_ONBOARDING_ANALYTICS_STEPS as p } from "../../../enum/circle-onboarding-steps.js";
14
+ import { useCircleSounds as ge } from "../../../hooks/use-circle-sounds/use-circle-sounds.js";
15
+ import { SegmentedGameCard as Ee } from "../../comps/segmented-game-card/segmented-game-card.js";
16
+ import { GAME_LAUNCHER_ANALYTICS_EVENTS as oe } from "../../game-launcher-analytics-events.js";
17
+ import { GO_TO_NEXT_SLIDE_AFTER_MS as pe, SHOW_LABEL_HIGHLIGHT_AFTER_MS as Ie, SHOW_NUDGE_AFTER_MS as _e, SLIDE_TO_LESSON_MS as Ce } from "./constants.js";
18
+ import { ProjectType as fe } from "../../../games/web-view/enums/project-type-enum.js";
19
+ const xe = ({
20
+ carouselRefs: n,
21
+ onSegmentClick: S,
22
+ onJourneyComplete: N
23
23
  }) => {
24
- const o = se.CIRCLE_ACTIVITIES_INTRO_JOURNEY, { breakpoints: oe } = ue(), p = window.innerWidth <= oe.MOBILE, i = O(null), n = O(null), l = O(null), I = O([]), { playButtonSound: b } = Te(), { nextCoachmark: d, setJourney: N, endJourney: P } = me(), { onEvent: _ } = he(), H = g(
24
+ const o = me.CIRCLE_ACTIVITIES_INTRO_JOURNEY, { breakpoints: ie } = he(), { isMobile: d } = ie, I = d ? "ab3-bold" : "ab2-bold", i = L(null), r = L(null), l = L(null), _ = L([]), { playButtonSound: b } = ge(), { nextCoachmark: s, setJourney: P, endJourney: H } = Te(), { onEvent: C } = ue(), k = E(
25
25
  (e) => {
26
- _(te.ONBOARDING_STEP_VIEWED, {
26
+ C(re.ONBOARDING_STEP_VIEWED, {
27
27
  step: e
28
28
  });
29
29
  },
30
- [_]
31
- ), w = g(
30
+ [C]
31
+ ), G = E(
32
32
  (e) => {
33
- _(te.ONBOARDING_STEP_COMPLETED, {
33
+ C(re.ONBOARDING_STEP_COMPLETED, {
34
34
  step: e
35
35
  });
36
36
  },
37
- [_]
38
- ), s = g(
39
- (e, C, f, A = !1) => {
40
- var h, u;
41
- A || (b(), (u = r.current) == null || u.goToIndex(((h = r.current) == null ? void 0 : h.currentIndex) + 1), d(o, !1, Ee)), H(e);
42
- const m = setTimeout(() => {
43
- clearTimeout(m), C.startLabelAnimation(f);
44
- }, pe);
45
- I.current.push(m), d(o, !0, Ie);
37
+ [C]
38
+ ), m = E(
39
+ (e, f, A, O = !1) => {
40
+ var u, h;
41
+ O || (b(), (h = n.current) == null || h.goToIndex(((u = n.current) == null ? void 0 : u.currentIndex) + 1), s(o, !1, pe)), k(e);
42
+ const T = setTimeout(() => {
43
+ clearTimeout(T), f.startLabelAnimation(A);
44
+ }, Ie);
45
+ _.current.push(T), s(o, !0, _e);
46
46
  },
47
- [r, o, d, b, H]
48
- ), k = g(
47
+ [n, o, s, b, k]
48
+ ), U = E(
49
49
  (e) => {
50
- y(e, Ce.PUZZLE), w(E.PUZZLE_ACTIVITY), P(o), S(o);
50
+ S(e, fe.PUZZLE), G(p.PUZZLE_ACTIVITY), H(o), N(o);
51
51
  },
52
- [P, o, S, y, w]
53
- ), G = g(
54
- (e, C) => {
55
- var Y, B, v, V, x, D, M, W, J, X, $, F, Z, j, K, q, Q, z;
56
- if (!((Y = r == null ? void 0 : r.current) != null && Y.nextBtnRef.current) || !((B = n == null ? void 0 : n.current) != null && B.segmentedCardWrapperRef.current) || !((v = i == null ? void 0 : i.current) != null && v.labelRef.current) || !((V = n == null ? void 0 : n.current) != null && V.labelRef.current) || !e)
52
+ [H, o, N, S, G]
53
+ ), Y = E(
54
+ (e, f) => {
55
+ var B, V, w, x, D, M, J, W, X, $, F, Z, j, K, q, Q, z, ee;
56
+ if (!((B = n == null ? void 0 : n.current) != null && B.nextBtnRef.current) || !((V = r == null ? void 0 : r.current) != null && V.segmentedCardWrapperRef.current) || !((w = i == null ? void 0 : i.current) != null && w.labelRef.current) || !((x = r == null ? void 0 : r.current) != null && x.labelRef.current) || !e)
57
57
  return;
58
- const f = ((M = (D = (x = l.current) == null ? void 0 : x.labelRef) == null ? void 0 : D.current) == null ? void 0 : M.getBoundingClientRect()) || {
58
+ const A = ((J = (M = (D = l.current) == null ? void 0 : D.labelRef) == null ? void 0 : M.current) == null ? void 0 : J.getBoundingClientRect()) || {
59
59
  height: 0,
60
60
  width: 0
61
- }, A = ((X = (J = (W = i.current) == null ? void 0 : W.labelRef) == null ? void 0 : J.current) == null ? void 0 : X.getBoundingClientRect()) || {
61
+ }, O = (($ = (X = (W = i.current) == null ? void 0 : W.labelRef) == null ? void 0 : X.current) == null ? void 0 : $.getBoundingClientRect()) || {
62
62
  height: 0,
63
63
  width: 0
64
- }, m = ((Z = (F = ($ = n.current) == null ? void 0 : $.labelRef) == null ? void 0 : F.current) == null ? void 0 : Z.getBoundingClientRect()) || {
64
+ }, T = ((j = (Z = (F = r.current) == null ? void 0 : F.labelRef) == null ? void 0 : Z.current) == null ? void 0 : j.getBoundingClientRect()) || {
65
65
  height: 0,
66
66
  width: 0
67
- }, h = ((q = (K = (j = n.current) == null ? void 0 : j.segmentedCardWrapperRef) == null ? void 0 : K.current) == null ? void 0 : q.getBoundingClientRect()) || {
67
+ }, u = ((Q = (q = (K = r.current) == null ? void 0 : K.segmentedCardWrapperRef) == null ? void 0 : q.current) == null ? void 0 : Q.getBoundingClientRect()) || {
68
68
  height: 0,
69
69
  width: 0
70
70
  };
71
- let u = [];
72
- C && l.current && (u = [
71
+ let h = [];
72
+ f && l.current && (h = [
73
73
  {
74
74
  originalElementToHighlightRef: l.current.labelRef,
75
75
  isActive: !1,
76
76
  type: c.TOOLTIP,
77
- elementToHighlight: /* @__PURE__ */ t(L, {}),
77
+ elementToHighlight: /* @__PURE__ */ t(R, {}),
78
78
  indicator: {
79
79
  position: "top",
80
80
  backgroundColor: "BLUE_4",
81
- width: 264,
82
- tooltipItem: /* @__PURE__ */ t(R, { children: /* @__PURE__ */ t(a, { $renderAs: "ab2-bold", children: "Get faster & stay ahead in school. Practice 3 new skills everyday." }) }),
83
- tooltipXCoOrdinates: f.width / 2,
84
- tooltipYCoOrdinates: f.height + 10
81
+ tooltipItem: /* @__PURE__ */ t(y, { children: /* @__PURE__ */ t(a, { $renderAs: I, children: "Get faster & stay ahead in school. Practice 3 new skills everyday." }) }),
82
+ tooltipXCoOrdinates: A.width / 2,
83
+ tooltipYCoOrdinates: A.height + 10
85
84
  }
86
85
  },
87
86
  {
88
- originalElementToHighlightRef: (Q = r.current) == null ? void 0 : Q.nextBtnRef,
87
+ originalElementToHighlightRef: (z = n.current) == null ? void 0 : z.nextBtnRef,
89
88
  isActive: !1,
90
89
  type: c.NUDGE,
91
90
  elementToHighlight: /* @__PURE__ */ t(
92
91
  ne,
93
92
  {
94
93
  renderAs: "secondary",
95
- Icon: ee,
96
- onClick: () => s(
97
- E.GAMES_ACTIVITY,
94
+ Icon: te,
95
+ onClick: () => m(
96
+ p.GAMES_ACTIVITY,
98
97
  i.current,
99
98
  "ORANGE_4"
100
99
  ),
101
- analyticsLabel: re.JOURNEY_NEXT_ACTIVITY
100
+ analyticsLabel: oe.JOURNEY_NEXT_ACTIVITY
102
101
  }
103
102
  ),
104
103
  indicator: {
105
104
  nudge: "click",
106
- content: !p && /* @__PURE__ */ t(a, { $renderAs: "ab1", $color: "WHITE", children: "Click to proceed" }),
105
+ content: !d && /* @__PURE__ */ t(a, { $renderAs: "ab1", $color: "WHITE", children: "Click to proceed" }),
107
106
  nudgePointerX: 0,
108
107
  nudgePointerY: 0
109
108
  }
110
109
  }
111
110
  ]);
112
- const le = [
111
+ const ce = [
113
112
  {
114
113
  originalElementToHighlightRef: i.current.labelRef,
115
114
  isActive: !1,
116
115
  type: c.TOOLTIP,
117
- elementToHighlight: /* @__PURE__ */ t(L, {}),
116
+ elementToHighlight: /* @__PURE__ */ t(R, {}),
118
117
  indicator: {
119
118
  position: "top",
120
119
  backgroundColor: "ORANGE_4",
121
- width: 264,
122
- tooltipItem: /* @__PURE__ */ t(R, { children: /* @__PURE__ */ t(a, { $renderAs: "ab2-bold", children: "Train to think deeper & plan ahead. Play 3 new games everyday." }) }),
123
- tooltipXCoOrdinates: A.width / 2,
124
- tooltipYCoOrdinates: A.height + 10
120
+ tooltipItem: /* @__PURE__ */ t(y, { children: /* @__PURE__ */ t(a, { $renderAs: I, children: "Train to think deeper & plan ahead. Play 3 new games everyday." }) }),
121
+ tooltipXCoOrdinates: O.width / 2,
122
+ tooltipYCoOrdinates: O.height + 10
125
123
  }
126
124
  },
127
125
  {
128
- originalElementToHighlightRef: r.current.nextBtnRef,
126
+ originalElementToHighlightRef: n.current.nextBtnRef,
129
127
  isActive: !1,
130
128
  type: c.NUDGE,
131
129
  elementToHighlight: /* @__PURE__ */ t(
132
130
  ne,
133
131
  {
134
132
  renderAs: "secondary",
135
- Icon: ee,
136
- onClick: () => s(
137
- E.PUZZLE_ACTIVITY,
138
- n.current,
133
+ Icon: te,
134
+ onClick: () => m(
135
+ p.PUZZLE_ACTIVITY,
136
+ r.current,
139
137
  "PURPLE_4"
140
138
  ),
141
- analyticsLabel: re.JOURNEY_NEXT_ACTIVITY
139
+ analyticsLabel: oe.JOURNEY_NEXT_ACTIVITY
142
140
  }
143
141
  ),
144
142
  indicator: {
145
143
  nudge: "click",
146
- content: !p && /* @__PURE__ */ t(a, { $renderAs: "ab1", $color: "WHITE", children: "Click to proceed" }),
144
+ content: !d && /* @__PURE__ */ t(a, { $renderAs: "ab1", $color: "WHITE", children: "Click to proceed" }),
147
145
  nudgePointerX: 0,
148
146
  nudgePointerY: 0
149
147
  }
150
148
  }
151
- ], ce = [
149
+ ], ae = [
152
150
  {
153
- originalElementToHighlightRef: n.current.labelRef,
151
+ originalElementToHighlightRef: r.current.labelRef,
154
152
  isActive: !1,
155
153
  type: c.TOOLTIP,
156
- elementToHighlight: /* @__PURE__ */ t(L, {}),
154
+ elementToHighlight: /* @__PURE__ */ t(R, {}),
157
155
  indicator: {
158
156
  position: "top",
159
157
  backgroundColor: "PURPLE_4",
160
- width: 264,
161
- tooltipItem: /* @__PURE__ */ t(R, { children: /* @__PURE__ */ t(a, { $renderAs: "ab2-bold", children: "Think in new ways & stay sharp. Solve 3 new puzzles everyday." }) }),
162
- tooltipXCoOrdinates: m.width / 2,
163
- tooltipYCoOrdinates: m.height + 10
158
+ tooltipItem: /* @__PURE__ */ t(y, { children: /* @__PURE__ */ t(a, { $renderAs: I, children: "Think in new ways & stay sharp. Solve 3 new puzzles everyday." }) }),
159
+ tooltipXCoOrdinates: T.width / 2,
160
+ tooltipYCoOrdinates: T.height + 10
164
161
  }
165
162
  },
166
163
  {
167
- originalElementToHighlightRef: n.current.segmentedCardWrapperRef,
164
+ originalElementToHighlightRef: r.current.segmentedCardWrapperRef,
168
165
  isActive: !1,
169
166
  type: c.NUDGE,
170
167
  elementToHighlight: /* @__PURE__ */ t(
171
- ge,
168
+ Ee,
172
169
  {
173
170
  label: "",
174
- value: e.data.filter((T) => T.solved).length,
171
+ value: e.data.filter((g) => g.solved).length,
175
172
  maxValue: e.data.length,
176
173
  initialValue: e.initialProgressValue,
177
- data: e.data.map((T) => ({
178
- card: T.cardLottie,
174
+ data: e.data.map((g) => ({
175
+ card: g.cardLottie,
179
176
  name: "",
180
177
  // We dont want to show the name of the puzzle in onboarding
181
- isCompleted: T.solved,
182
- onPress: () => k(T)
178
+ isCompleted: g.solved,
179
+ onPress: () => U(g)
183
180
  }))
184
181
  }
185
182
  ),
186
183
  indicator: {
187
184
  nudge: "click",
188
- content: !p && /* @__PURE__ */ t(a, { $renderAs: "ab1", $color: "WHITE", children: "Click to solve a puzzle" }),
189
- nudgePointerX: h.width * 0.6,
190
- nudgePointerY: h.height * 0.4
185
+ content: !d && /* @__PURE__ */ t(a, { $renderAs: "ab1", $color: "WHITE", children: "Click to solve a puzzle" }),
186
+ nudgePointerX: u.width * 0.6,
187
+ nudgePointerY: u.height * 0.4
191
188
  }
192
189
  }
193
190
  ];
194
- N(o, [...u, ...le, ...ce]), (z = r.current) == null || z.goToIndex(0);
195
- const U = setTimeout(() => {
196
- clearTimeout(U), d(o);
197
- }, _e);
198
- I.current.push(U), C && l.current ? s(E.SKILL_ACTIVITY, l.current, "BLUE_4", !0) : s(E.GAMES_ACTIVITY, i.current, "ORANGE_4", !0);
191
+ P(o, [...h, ...ce, ...ae]), (ee = n.current) == null || ee.goToIndex(0);
192
+ const v = setTimeout(() => {
193
+ clearTimeout(v), s(o);
194
+ }, Ce);
195
+ _.current.push(v), f && l.current ? m(p.SKILL_ACTIVITY, l.current, "BLUE_4", !0) : m(p.GAMES_ACTIVITY, i.current, "ORANGE_4", !0);
199
196
  },
200
- [r, p, N, o, s, k, d]
201
- ), ie = ae(
197
+ [
198
+ n,
199
+ I,
200
+ d,
201
+ P,
202
+ o,
203
+ m,
204
+ U,
205
+ s
206
+ ]
207
+ ), le = de(
202
208
  () => ({
203
209
  gameRefs: i,
204
- puzzleRefs: n,
210
+ puzzleRefs: r,
205
211
  lessonRefs: l,
206
- startJourney: G
212
+ startJourney: Y
207
213
  }),
208
- [G]
214
+ [Y]
209
215
  );
210
- return de(() => () => {
211
- I.current.forEach((e) => clearTimeout(e)), I.current = [];
212
- }, [r]), ie;
216
+ return se(() => () => {
217
+ _.current.forEach((e) => clearTimeout(e)), _.current = [];
218
+ }, [n]), le;
213
219
  };
214
220
  export {
215
- Ve as useGameLauncherJourney
221
+ xe as useGameLauncherJourney
216
222
  };
217
223
  //# sourceMappingURL=use-game-launcher-journey.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-game-launcher-journey.js","sources":["../../../../../../src/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.tsx"],"sourcesContent":["import type { ICoachmarkProps } from '../../../../journey/use-journey/journey-context-types';\nimport type { IArrowTooltipProps } from '../../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport type { INudgeProps } from '../../../../ui/nudge/nudge-types';\nimport type { TColorNames } from '../../../../ui/types';\nimport type { ISegmentedGameCardRefs } from '../../comps/segmented-game-card/segmented-game-card-types';\nimport type {\n IProject,\n Puzzle,\n} from '../../dal/use-get-circle-home-details-dal/use-get-circle-home-dal-types';\nimport type { IUseGameLauncherJourneyProps } from './use-game-launcher-journey-types';\n\nimport { useCallback, useEffect, useMemo, useRef } from 'react';\n\nimport CaratRightIcon from '../../../../../assets/line-icons/icons/carat-right';\nimport { PLATFORM_EVENTS_STUDENT as AnalyticsLabel } from '../../../../analytics-events/platform-events-student';\nimport { JOURNEY_ID_STUDENT } from '../../../../journey/journey-id/journey-id-student';\nimport { IndicatorType } from '../../../../journey/use-journey/constants';\nimport { useJourney } from '../../../../journey/use-journey/use-journey';\nimport IconButton from '../../../../ui/buttons/icon-button/icon-button';\nimport { useUIContext } from '../../../../ui/context/context';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\nimport { getTheme } from '../../../../ui/theme/get-theme';\nimport { CIRCLE_ONBOARDING_ANALYTICS_STEPS as ActionEvent } from '../../../enum/circle-onboarding-steps';\nimport { ProjectType } from '../../../games/web-view/enums';\nimport { useCircleSounds } from '../../../hooks/use-circle-sounds/use-circle-sounds';\nimport { SegmentedGameCard } from '../../comps/segmented-game-card/segmented-game-card';\nimport { GAME_LAUNCHER_ANALYTICS_EVENTS } from '../../game-launcher-analytics-events';\nimport {\n GO_TO_NEXT_SLIDE_AFTER_MS,\n SHOW_LABEL_HIGHLIGHT_AFTER_MS,\n SHOW_NUDGE_AFTER_MS,\n SLIDE_TO_LESSON_MS,\n} from './constants';\n\nexport const useGameLauncherJourney = ({\n carouselRefs,\n onSegmentClick,\n onJourneyComplete,\n}: IUseGameLauncherJourneyProps) => {\n const journeyId = JOURNEY_ID_STUDENT.CIRCLE_ACTIVITIES_INTRO_JOURNEY;\n\n const { breakpoints } = getTheme();\n const isMobile = window.innerWidth <= breakpoints.MOBILE;\n\n const gameRefs = useRef<ISegmentedGameCardRefs>(null);\n const puzzleRefs = useRef<ISegmentedGameCardRefs>(null);\n const lessonRefs = useRef<ISegmentedGameCardRefs>(null);\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n\n const { playButtonSound } = useCircleSounds();\n const { nextCoachmark, setJourney, endJourney } = useJourney();\n const { onEvent: trackAnalytics } = useUIContext();\n\n const trackEventViewed = useCallback(\n (step: ActionEvent) => {\n trackAnalytics(AnalyticsLabel.ONBOARDING_STEP_VIEWED, {\n step,\n });\n },\n [trackAnalytics],\n );\n const trackEventCompleted = useCallback(\n (step: ActionEvent) => {\n trackAnalytics(AnalyticsLabel.ONBOARDING_STEP_COMPLETED, {\n step,\n });\n },\n [trackAnalytics],\n );\n\n const goToNextCard = useCallback(\n (\n analyticsLabelViewed: ActionEvent,\n refOfNextSlide: ISegmentedGameCardRefs,\n color: TColorNames,\n isFirstSlide: boolean = false,\n ) => {\n if (!isFirstSlide) {\n playButtonSound();\n carouselRefs.current?.goToIndex(carouselRefs.current?.currentIndex + 1);\n nextCoachmark(journeyId, false, GO_TO_NEXT_SLIDE_AFTER_MS);\n }\n\n trackEventViewed(analyticsLabelViewed);\n\n const animateLabelTimer = setTimeout(() => {\n clearTimeout(animateLabelTimer);\n refOfNextSlide.startLabelAnimation(color);\n }, SHOW_LABEL_HIGHLIGHT_AFTER_MS);\n\n timerRefs.current.push(animateLabelTimer); // Store to cleanup later\n\n nextCoachmark(journeyId, true, SHOW_NUDGE_AFTER_MS);\n },\n [carouselRefs, journeyId, nextCoachmark, playButtonSound, trackEventViewed],\n );\n\n const handleEndJourney = useCallback(\n (puzzlesData: Puzzle) => {\n onSegmentClick(puzzlesData, ProjectType.PUZZLE);\n trackEventCompleted(ActionEvent.PUZZLE_ACTIVITY);\n endJourney(journeyId);\n onJourneyComplete(journeyId);\n },\n [endJourney, journeyId, onJourneyComplete, onSegmentClick, trackEventCompleted],\n );\n\n const startJourney = useCallback(\n (puzzlesData: IProject<Puzzle>, isLessonAvailable: boolean) => {\n // If element refs are not available return, this is just for type safety\n if (\n !carouselRefs?.current?.nextBtnRef.current ||\n !puzzleRefs?.current?.segmentedCardWrapperRef.current ||\n !gameRefs?.current?.labelRef.current ||\n !puzzleRefs?.current?.labelRef.current ||\n !puzzlesData\n ) {\n return;\n }\n\n const lessonLabelDims = lessonRefs.current?.labelRef?.current?.getBoundingClientRect() || {\n height: 0,\n width: 0,\n };\n const gameLabelDims = gameRefs.current?.labelRef?.current?.getBoundingClientRect() || {\n height: 0,\n width: 0,\n };\n const puzzleLabelDims = puzzleRefs.current?.labelRef?.current?.getBoundingClientRect() || {\n height: 0,\n width: 0,\n };\n\n const launcherDims =\n puzzleRefs.current?.segmentedCardWrapperRef?.current?.getBoundingClientRect() || {\n height: 0,\n width: 0,\n };\n\n let lessonSteps: ICoachmarkProps[] = [];\n\n if (isLessonAvailable && lessonRefs.current) {\n lessonSteps = [\n {\n originalElementToHighlightRef: lessonRefs.current.labelRef,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: <></>,\n indicator: {\n position: 'top',\n backgroundColor: 'BLUE_4',\n width: 264,\n tooltipItem: (\n <FlexView>\n <Text $renderAs=\"ab2-bold\">\n Get faster & stay ahead in school. Practice 3 new skills everyday.\n </Text>\n </FlexView>\n ),\n tooltipXCoOrdinates: lessonLabelDims.width / 2,\n tooltipYCoOrdinates: lessonLabelDims.height + 10,\n } as IArrowTooltipProps,\n },\n {\n originalElementToHighlightRef: carouselRefs.current?.nextBtnRef,\n isActive: false,\n type: IndicatorType.NUDGE,\n elementToHighlight: (\n <IconButton\n renderAs=\"secondary\"\n Icon={CaratRightIcon}\n onClick={() =>\n goToNextCard(\n ActionEvent.GAMES_ACTIVITY,\n gameRefs.current as ISegmentedGameCardRefs,\n 'ORANGE_4',\n )\n }\n analyticsLabel={GAME_LAUNCHER_ANALYTICS_EVENTS.JOURNEY_NEXT_ACTIVITY}\n />\n ),\n indicator: {\n nudge: 'click',\n content: !isMobile && (\n <Text $renderAs=\"ab1\" $color=\"WHITE\">\n Click to proceed\n </Text>\n ),\n nudgePointerX: 0,\n nudgePointerY: 0,\n } as INudgeProps,\n },\n ];\n }\n\n const gameSteps: ICoachmarkProps[] = [\n {\n originalElementToHighlightRef: gameRefs.current.labelRef,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: <></>,\n indicator: {\n position: 'top',\n backgroundColor: 'ORANGE_4',\n width: 264,\n tooltipItem: (\n <FlexView>\n <Text $renderAs=\"ab2-bold\">\n Train to think deeper & plan ahead. Play 3 new games everyday.\n </Text>\n </FlexView>\n ),\n tooltipXCoOrdinates: gameLabelDims.width / 2,\n tooltipYCoOrdinates: gameLabelDims.height + 10,\n } as IArrowTooltipProps,\n },\n {\n originalElementToHighlightRef: carouselRefs.current.nextBtnRef,\n isActive: false,\n type: IndicatorType.NUDGE,\n elementToHighlight: (\n <IconButton\n renderAs=\"secondary\"\n Icon={CaratRightIcon}\n onClick={() =>\n goToNextCard(\n ActionEvent.PUZZLE_ACTIVITY,\n puzzleRefs.current as ISegmentedGameCardRefs,\n 'PURPLE_4',\n )\n }\n analyticsLabel={GAME_LAUNCHER_ANALYTICS_EVENTS.JOURNEY_NEXT_ACTIVITY}\n />\n ),\n indicator: {\n nudge: 'click',\n content: !isMobile && (\n <Text $renderAs=\"ab1\" $color=\"WHITE\">\n Click to proceed\n </Text>\n ),\n nudgePointerX: 0,\n nudgePointerY: 0,\n } as INudgeProps,\n },\n ];\n\n const puzzleSteps: ICoachmarkProps[] = [\n {\n originalElementToHighlightRef: puzzleRefs.current.labelRef,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: <></>,\n indicator: {\n position: 'top',\n backgroundColor: 'PURPLE_4',\n width: 264,\n tooltipItem: (\n <FlexView>\n <Text $renderAs=\"ab2-bold\">\n Think in new ways & stay sharp. Solve 3 new puzzles everyday.\n </Text>\n </FlexView>\n ),\n tooltipXCoOrdinates: puzzleLabelDims.width / 2,\n tooltipYCoOrdinates: puzzleLabelDims.height + 10,\n } as IArrowTooltipProps,\n },\n {\n originalElementToHighlightRef: puzzleRefs.current.segmentedCardWrapperRef,\n isActive: false,\n type: IndicatorType.NUDGE,\n elementToHighlight: (\n <SegmentedGameCard\n label={''} // This is intentionally left blank to avoid showing the label\n value={puzzlesData.data.filter(puzzle => puzzle.solved).length}\n maxValue={puzzlesData.data.length}\n initialValue={puzzlesData.initialProgressValue}\n data={puzzlesData.data.map(puzzle => ({\n card: puzzle.cardLottie,\n name: '', // We dont want to show the name of the puzzle in onboarding\n isCompleted: puzzle.solved,\n onPress: () => handleEndJourney(puzzle),\n }))}\n />\n ),\n indicator: {\n nudge: 'click',\n content: !isMobile && (\n <Text $renderAs=\"ab1\" $color=\"WHITE\">\n Click to solve a puzzle\n </Text>\n ),\n nudgePointerX: launcherDims.width * 0.6,\n nudgePointerY: launcherDims.height * 0.4,\n } as INudgeProps,\n },\n ];\n\n setJourney(journeyId, [...lessonSteps, ...gameSteps, ...puzzleSteps]);\n\n carouselRefs.current?.goToIndex(0); // Always start from 0th Index no matter what the current index is\n\n const delayBeforeStart = setTimeout(() => {\n clearTimeout(delayBeforeStart);\n nextCoachmark(journeyId);\n }, SLIDE_TO_LESSON_MS);\n\n timerRefs.current.push(delayBeforeStart); // Store to cleanup later\n\n if (isLessonAvailable && lessonRefs.current) {\n goToNextCard(ActionEvent.SKILL_ACTIVITY, lessonRefs.current, 'BLUE_4', true);\n } else {\n goToNextCard(ActionEvent.GAMES_ACTIVITY, gameRefs.current, 'ORANGE_4', true);\n }\n },\n [carouselRefs, isMobile, setJourney, journeyId, goToNextCard, handleEndJourney, nextCoachmark],\n );\n\n const data = useMemo(\n () => ({\n gameRefs,\n puzzleRefs,\n lessonRefs,\n startJourney,\n }),\n [startJourney],\n );\n\n // Cleanup on unmount\n useEffect(() => {\n return () => {\n timerRefs.current.forEach(timer => clearTimeout(timer));\n timerRefs.current = [];\n };\n }, [carouselRefs]);\n\n return data;\n};\n"],"names":["useGameLauncherJourney","carouselRefs","onSegmentClick","onJourneyComplete","journeyId","JOURNEY_ID_STUDENT","breakpoints","getTheme","isMobile","gameRefs","useRef","puzzleRefs","lessonRefs","timerRefs","playButtonSound","useCircleSounds","nextCoachmark","setJourney","endJourney","useJourney","trackAnalytics","useUIContext","trackEventViewed","useCallback","step","AnalyticsLabel","trackEventCompleted","goToNextCard","analyticsLabelViewed","refOfNextSlide","color","isFirstSlide","_b","_a","GO_TO_NEXT_SLIDE_AFTER_MS","animateLabelTimer","SHOW_LABEL_HIGHLIGHT_AFTER_MS","SHOW_NUDGE_AFTER_MS","handleEndJourney","puzzlesData","ProjectType","ActionEvent","startJourney","isLessonAvailable","_c","_d","lessonLabelDims","_g","_f","_e","gameLabelDims","_j","_i","_h","puzzleLabelDims","_m","_l","_k","launcherDims","_p","_o","_n","lessonSteps","IndicatorType","jsx","Fragment","FlexView","Text","_q","IconButton","CaratRightIcon","GAME_LAUNCHER_ANALYTICS_EVENTS","gameSteps","puzzleSteps","SegmentedGameCard","puzzle","_r","delayBeforeStart","SLIDE_TO_LESSON_MS","data","useMemo","useEffect","timer"],"mappings":";;;;;;;;;;;;;;;;;;AAmCO,MAAMA,KAAyB,CAAC;AAAA,EACrC,cAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,mBAAAC;AACF,MAAoC;AAClC,QAAMC,IAAYC,GAAmB,iCAE/B,EAAE,aAAAC,OAAgBC,MAClBC,IAAW,OAAO,cAAcF,GAAY,QAE5CG,IAAWC,EAA+B,IAAI,GAC9CC,IAAaD,EAA+B,IAAI,GAChDE,IAAaF,EAA+B,IAAI,GAChDG,IAAYH,EAAwC,CAAA,CAAE,GAEtD,EAAE,iBAAAI,MAAoBC,MACtB,EAAE,eAAAC,GAAe,YAAAC,GAAY,YAAAC,MAA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ACpB,SAAS,MAAMrC,EAAiBqC,CAAM;AAAA,cAAA,EACtC;AAAA,YAAA;AAAA,UACJ;AAAA,UAEF,WAAW;AAAA,YACT,OAAO;AAAA,YACP,SAAS,CAACnE,KACR,gBAAAwD,EAACG,KAAK,WAAU,OAAM,QAAO,SAAQ,UAErC,0BAAA,CAAA;AAAA,YAEF,eAAeT,EAAa,QAAQ;AAAA,YACpC,eAAeA,EAAa,SAAS;AAAA,UACvC;AAAA,QACF;AAAA,MAAA;AAGS,MAAAzC,EAAAb,GAAW,CAAC,GAAG0D,GAAa,GAAGU,IAAW,GAAGC,EAAW,CAAC,IAEvDG,IAAA3E,EAAA,YAAA,QAAA2E,EAAS,UAAU;AAE1B,YAAAC,IAAmB,WAAW,MAAM;AACxC,qBAAaA,CAAgB,GAC7B7D,EAAcZ,CAAS;AAAA,SACtB0E,EAAkB;AAEX,MAAAjE,EAAA,QAAQ,KAAKgE,CAAgB,GAEnClC,KAAqB/B,EAAW,UAClCe,EAAac,EAAY,gBAAgB7B,EAAW,SAAS,UAAU,EAAI,IAE3Ee,EAAac,EAAY,gBAAgBhC,EAAS,SAAS,YAAY,EAAI;AAAA,IAE/E;AAAA,IACA,CAACR,GAAcO,GAAUS,GAAYb,GAAWuB,GAAcW,GAAkBtB,CAAa;AAAA,EAAA,GAGzF+D,KAAOC;AAAA,IACX,OAAO;AAAA,MACL,UAAAvE;AAAA,MACA,YAAAE;AAAA,MACA,YAAAC;AAAA,MACA,cAAA8B;AAAA,IAAA;AAAA,IAEF,CAACA,CAAY;AAAA,EAAA;AAIf,SAAAuC,GAAU,MACD,MAAM;AACX,IAAApE,EAAU,QAAQ,QAAQ,CAASqE,MAAA,aAAaA,CAAK,CAAC,GACtDrE,EAAU,UAAU;EAAC,GAEtB,CAACZ,CAAY,CAAC,GAEV8E;AACT;"}
1
+ {"version":3,"file":"use-game-launcher-journey.js","sources":["../../../../../../src/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.tsx"],"sourcesContent":["import type { ICoachmarkProps } from '../../../../journey/use-journey/journey-context-types';\nimport type { IArrowTooltipProps } from '../../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport type { INudgeProps } from '../../../../ui/nudge/nudge-types';\nimport type { TColorNames } from '../../../../ui/types';\nimport type { ISegmentedGameCardRefs } from '../../comps/segmented-game-card/segmented-game-card-types';\nimport type {\n IProject,\n Puzzle,\n} from '../../dal/use-get-circle-home-details-dal/use-get-circle-home-dal-types';\nimport type { IUseGameLauncherJourneyProps } from './use-game-launcher-journey-types';\n\nimport { useCallback, useEffect, useMemo, useRef } from 'react';\n\nimport CaratRightIcon from '../../../../../assets/line-icons/icons/carat-right';\nimport { PLATFORM_EVENTS_STUDENT as AnalyticsLabel } from '../../../../analytics-events/platform-events-student';\nimport { JOURNEY_ID_STUDENT } from '../../../../journey/journey-id/journey-id-student';\nimport { IndicatorType } from '../../../../journey/use-journey/constants';\nimport { useJourney } from '../../../../journey/use-journey/use-journey';\nimport IconButton from '../../../../ui/buttons/icon-button/icon-button';\nimport { useUIContext } from '../../../../ui/context/context';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\nimport { getTheme } from '../../../../ui/theme/get-theme';\nimport { CIRCLE_ONBOARDING_ANALYTICS_STEPS as ActionEvent } from '../../../enum/circle-onboarding-steps';\nimport { ProjectType } from '../../../games/web-view/enums';\nimport { useCircleSounds } from '../../../hooks/use-circle-sounds/use-circle-sounds';\nimport { SegmentedGameCard } from '../../comps/segmented-game-card/segmented-game-card';\nimport { GAME_LAUNCHER_ANALYTICS_EVENTS } from '../../game-launcher-analytics-events';\nimport {\n GO_TO_NEXT_SLIDE_AFTER_MS,\n SHOW_LABEL_HIGHLIGHT_AFTER_MS,\n SHOW_NUDGE_AFTER_MS,\n SLIDE_TO_LESSON_MS,\n} from './constants';\n\nexport const useGameLauncherJourney = ({\n carouselRefs,\n onSegmentClick,\n onJourneyComplete,\n}: IUseGameLauncherJourneyProps) => {\n const journeyId = JOURNEY_ID_STUDENT.CIRCLE_ACTIVITIES_INTRO_JOURNEY;\n\n const { breakpoints } = getTheme();\n const { isMobile } = breakpoints;\n const tooltipTextRenderAs = isMobile ? 'ab3-bold' : 'ab2-bold';\n\n const gameRefs = useRef<ISegmentedGameCardRefs>(null);\n const puzzleRefs = useRef<ISegmentedGameCardRefs>(null);\n const lessonRefs = useRef<ISegmentedGameCardRefs>(null);\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n\n const { playButtonSound } = useCircleSounds();\n const { nextCoachmark, setJourney, endJourney } = useJourney();\n const { onEvent: trackAnalytics } = useUIContext();\n\n const trackEventViewed = useCallback(\n (step: ActionEvent) => {\n trackAnalytics(AnalyticsLabel.ONBOARDING_STEP_VIEWED, {\n step,\n });\n },\n [trackAnalytics],\n );\n const trackEventCompleted = useCallback(\n (step: ActionEvent) => {\n trackAnalytics(AnalyticsLabel.ONBOARDING_STEP_COMPLETED, {\n step,\n });\n },\n [trackAnalytics],\n );\n\n const goToNextCard = useCallback(\n (\n analyticsLabelViewed: ActionEvent,\n refOfNextSlide: ISegmentedGameCardRefs,\n color: TColorNames,\n isFirstSlide: boolean = false,\n ) => {\n if (!isFirstSlide) {\n playButtonSound();\n carouselRefs.current?.goToIndex(carouselRefs.current?.currentIndex + 1);\n nextCoachmark(journeyId, false, GO_TO_NEXT_SLIDE_AFTER_MS);\n }\n\n trackEventViewed(analyticsLabelViewed);\n\n const animateLabelTimer = setTimeout(() => {\n clearTimeout(animateLabelTimer);\n refOfNextSlide.startLabelAnimation(color);\n }, SHOW_LABEL_HIGHLIGHT_AFTER_MS);\n\n timerRefs.current.push(animateLabelTimer); // Store to cleanup later\n\n nextCoachmark(journeyId, true, SHOW_NUDGE_AFTER_MS);\n },\n [carouselRefs, journeyId, nextCoachmark, playButtonSound, trackEventViewed],\n );\n\n const handleEndJourney = useCallback(\n (puzzlesData: Puzzle) => {\n onSegmentClick(puzzlesData, ProjectType.PUZZLE);\n trackEventCompleted(ActionEvent.PUZZLE_ACTIVITY);\n endJourney(journeyId);\n onJourneyComplete(journeyId);\n },\n [endJourney, journeyId, onJourneyComplete, onSegmentClick, trackEventCompleted],\n );\n\n const startJourney = useCallback(\n (puzzlesData: IProject<Puzzle>, isLessonAvailable: boolean) => {\n // If element refs are not available return, this is just for type safety\n if (\n !carouselRefs?.current?.nextBtnRef.current ||\n !puzzleRefs?.current?.segmentedCardWrapperRef.current ||\n !gameRefs?.current?.labelRef.current ||\n !puzzleRefs?.current?.labelRef.current ||\n !puzzlesData\n ) {\n return;\n }\n\n const lessonLabelDims = lessonRefs.current?.labelRef?.current?.getBoundingClientRect() || {\n height: 0,\n width: 0,\n };\n const gameLabelDims = gameRefs.current?.labelRef?.current?.getBoundingClientRect() || {\n height: 0,\n width: 0,\n };\n const puzzleLabelDims = puzzleRefs.current?.labelRef?.current?.getBoundingClientRect() || {\n height: 0,\n width: 0,\n };\n\n const launcherDims =\n puzzleRefs.current?.segmentedCardWrapperRef?.current?.getBoundingClientRect() || {\n height: 0,\n width: 0,\n };\n\n let lessonSteps: ICoachmarkProps[] = [];\n\n if (isLessonAvailable && lessonRefs.current) {\n lessonSteps = [\n {\n originalElementToHighlightRef: lessonRefs.current.labelRef,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: <></>,\n indicator: {\n position: 'top',\n backgroundColor: 'BLUE_4',\n tooltipItem: (\n <FlexView>\n <Text $renderAs={tooltipTextRenderAs}>\n Get faster & stay ahead in school. Practice 3 new skills everyday.\n </Text>\n </FlexView>\n ),\n tooltipXCoOrdinates: lessonLabelDims.width / 2,\n tooltipYCoOrdinates: lessonLabelDims.height + 10,\n } as IArrowTooltipProps,\n },\n {\n originalElementToHighlightRef: carouselRefs.current?.nextBtnRef,\n isActive: false,\n type: IndicatorType.NUDGE,\n elementToHighlight: (\n <IconButton\n renderAs=\"secondary\"\n Icon={CaratRightIcon}\n onClick={() =>\n goToNextCard(\n ActionEvent.GAMES_ACTIVITY,\n gameRefs.current as ISegmentedGameCardRefs,\n 'ORANGE_4',\n )\n }\n analyticsLabel={GAME_LAUNCHER_ANALYTICS_EVENTS.JOURNEY_NEXT_ACTIVITY}\n />\n ),\n indicator: {\n nudge: 'click',\n content: !isMobile && (\n <Text $renderAs=\"ab1\" $color=\"WHITE\">\n Click to proceed\n </Text>\n ),\n nudgePointerX: 0,\n nudgePointerY: 0,\n } as INudgeProps,\n },\n ];\n }\n\n const gameSteps: ICoachmarkProps[] = [\n {\n originalElementToHighlightRef: gameRefs.current.labelRef,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: <></>,\n indicator: {\n position: 'top',\n backgroundColor: 'ORANGE_4',\n tooltipItem: (\n <FlexView>\n <Text $renderAs={tooltipTextRenderAs}>\n Train to think deeper & plan ahead. Play 3 new games everyday.\n </Text>\n </FlexView>\n ),\n tooltipXCoOrdinates: gameLabelDims.width / 2,\n tooltipYCoOrdinates: gameLabelDims.height + 10,\n } as IArrowTooltipProps,\n },\n {\n originalElementToHighlightRef: carouselRefs.current.nextBtnRef,\n isActive: false,\n type: IndicatorType.NUDGE,\n elementToHighlight: (\n <IconButton\n renderAs=\"secondary\"\n Icon={CaratRightIcon}\n onClick={() =>\n goToNextCard(\n ActionEvent.PUZZLE_ACTIVITY,\n puzzleRefs.current as ISegmentedGameCardRefs,\n 'PURPLE_4',\n )\n }\n analyticsLabel={GAME_LAUNCHER_ANALYTICS_EVENTS.JOURNEY_NEXT_ACTIVITY}\n />\n ),\n indicator: {\n nudge: 'click',\n content: !isMobile && (\n <Text $renderAs=\"ab1\" $color=\"WHITE\">\n Click to proceed\n </Text>\n ),\n nudgePointerX: 0,\n nudgePointerY: 0,\n } as INudgeProps,\n },\n ];\n\n const puzzleSteps: ICoachmarkProps[] = [\n {\n originalElementToHighlightRef: puzzleRefs.current.labelRef,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: <></>,\n indicator: {\n position: 'top',\n backgroundColor: 'PURPLE_4',\n tooltipItem: (\n <FlexView>\n <Text $renderAs={tooltipTextRenderAs}>\n Think in new ways & stay sharp. Solve 3 new puzzles everyday.\n </Text>\n </FlexView>\n ),\n tooltipXCoOrdinates: puzzleLabelDims.width / 2,\n tooltipYCoOrdinates: puzzleLabelDims.height + 10,\n } as IArrowTooltipProps,\n },\n {\n originalElementToHighlightRef: puzzleRefs.current.segmentedCardWrapperRef,\n isActive: false,\n type: IndicatorType.NUDGE,\n elementToHighlight: (\n <SegmentedGameCard\n label={''} // This is intentionally left blank to avoid showing the label\n value={puzzlesData.data.filter(puzzle => puzzle.solved).length}\n maxValue={puzzlesData.data.length}\n initialValue={puzzlesData.initialProgressValue}\n data={puzzlesData.data.map(puzzle => ({\n card: puzzle.cardLottie,\n name: '', // We dont want to show the name of the puzzle in onboarding\n isCompleted: puzzle.solved,\n onPress: () => handleEndJourney(puzzle),\n }))}\n />\n ),\n indicator: {\n nudge: 'click',\n content: !isMobile && (\n <Text $renderAs=\"ab1\" $color=\"WHITE\">\n Click to solve a puzzle\n </Text>\n ),\n nudgePointerX: launcherDims.width * 0.6,\n nudgePointerY: launcherDims.height * 0.4,\n } as INudgeProps,\n },\n ];\n\n setJourney(journeyId, [...lessonSteps, ...gameSteps, ...puzzleSteps]);\n\n carouselRefs.current?.goToIndex(0); // Always start from 0th Index no matter what the current index is\n\n const delayBeforeStart = setTimeout(() => {\n clearTimeout(delayBeforeStart);\n nextCoachmark(journeyId);\n }, SLIDE_TO_LESSON_MS);\n\n timerRefs.current.push(delayBeforeStart); // Store to cleanup later\n\n if (isLessonAvailable && lessonRefs.current) {\n goToNextCard(ActionEvent.SKILL_ACTIVITY, lessonRefs.current, 'BLUE_4', true);\n } else {\n goToNextCard(ActionEvent.GAMES_ACTIVITY, gameRefs.current, 'ORANGE_4', true);\n }\n },\n [\n carouselRefs,\n tooltipTextRenderAs,\n isMobile,\n setJourney,\n journeyId,\n goToNextCard,\n handleEndJourney,\n nextCoachmark,\n ],\n );\n\n const data = useMemo(\n () => ({\n gameRefs,\n puzzleRefs,\n lessonRefs,\n startJourney,\n }),\n [startJourney],\n );\n\n // Cleanup on unmount\n useEffect(() => {\n return () => {\n timerRefs.current.forEach(timer => clearTimeout(timer));\n timerRefs.current = [];\n };\n }, [carouselRefs]);\n\n return data;\n};\n"],"names":["useGameLauncherJourney","carouselRefs","onSegmentClick","onJourneyComplete","journeyId","JOURNEY_ID_STUDENT","breakpoints","getTheme","isMobile","tooltipTextRenderAs","gameRefs","useRef","puzzleRefs","lessonRefs","timerRefs","playButtonSound","useCircleSounds","nextCoachmark","setJourney","endJourney","useJourney","trackAnalytics","useUIContext","trackEventViewed","useCallback","step","AnalyticsLabel","trackEventCompleted","goToNextCard","analyticsLabelViewed","refOfNextSlide","color","isFirstSlide","_b","_a","GO_TO_NEXT_SLIDE_AFTER_MS","animateLabelTimer","SHOW_LABEL_HIGHLIGHT_AFTER_MS","SHOW_NUDGE_AFTER_MS","handleEndJourney","puzzlesData","ProjectType","ActionEvent","startJourney","isLessonAvailable","_c","_d","lessonLabelDims","_g","_f","_e","gameLabelDims","_j","_i","_h","puzzleLabelDims","_m","_l","_k","launcherDims","_p","_o","_n","lessonSteps","IndicatorType","jsx","Fragment","FlexView","Text","_q","IconButton","CaratRightIcon","GAME_LAUNCHER_ANALYTICS_EVENTS","gameSteps","puzzleSteps","SegmentedGameCard","puzzle","_r","delayBeforeStart","SLIDE_TO_LESSON_MS","data","useMemo","useEffect","timer"],"mappings":";;;;;;;;;;;;;;;;;;AAmCO,MAAMA,KAAyB,CAAC;AAAA,EACrC,cAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,mBAAAC;AACF,MAAoC;AAClC,QAAMC,IAAYC,GAAmB,iCAE/B,EAAE,aAAAC,OAAgBC,MAClB,EAAE,UAAAC,EAAa,IAAAF,IACfG,IAAsBD,IAAW,aAAa,YAE9CE,IAAWC,EAA+B,IAAI,GAC9CC,IAAaD,EAA+B,IAAI,GAChDE,IAAaF,EAA+B,IAAI,GACh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+E;AACT;"}
@@ -1,122 +1,122 @@
1
1
  import { jsx as r, Fragment as O } from "react/jsx-runtime";
2
- import { useRef as R, useCallback as C, useEffect as K } from "react";
3
- import j from "../../../../../assets/line-icons/icons/carat-right.js";
2
+ import { useRef as N, useCallback as L, useEffect as j } from "react";
3
+ import Z from "../../../../../assets/line-icons/icons/carat-right.js";
4
4
  import { PLATFORM_EVENTS_STUDENT as M } from "../../../../analytics-events/platform-events-student.js";
5
- import { JOURNEY_ID_STUDENT as Z } from "../../../../journey/journey-id/journey-id-student.js";
5
+ import { JOURNEY_ID_STUDENT as q } from "../../../../journey/journey-id/journey-id-student.js";
6
6
  import { IndicatorType as d } from "../../../../journey/use-journey/constants.js";
7
- import { useJourney as q } from "../../../../journey/use-journey/use-journey.js";
8
- import z from "../../../../ui/buttons/icon-button/icon-button.js";
9
- import { useUIContext as Q } from "../../../../ui/context/context.js";
10
- import N from "../../../../ui/layout/flex-view.js";
11
- import m from "../../../../ui/text/text.js";
12
- import { getTheme as ee } from "../../../../ui/theme/get-theme.js";
13
- import { CIRCLE_ONBOARDING_ANALYTICS_STEPS as v } from "../../../enum/circle-onboarding-steps.js";
14
- import { useCircleSounds as te } from "../../../hooks/use-circle-sounds/use-circle-sounds.js";
15
- import { TablesCard as w } from "../../comps/tables-card/tables-card.js";
16
- import { GAME_LAUNCHER_ANALYTICS_EVENTS as re } from "../../game-launcher-analytics-events.js";
17
- import { SHOW_PICK_A_LEVEL_TOOLTIP_AFTER_MS as ne, SHOW_PICK_A_LEVEL_NUDGE_AFTER_MS as oe, START_ANIMATING_CLONED_ELEM as $, TABLE_CARD_INDEX as x, GO_TO_TABLE_LAUNCHER_DURATION_MS as ie, SHOW_CLICK_TABLE_NUDGE_AFTER_MS as le, PUZZLE_CARD_INDEX as ce, SHOW_INITIAL_COACHMARK_AFTER_MS as F, LESSON_CARD_INDEX as ae, SHOW_INITIAL_TOOLTIP_AFTER_MS as se } from "./constants.js";
18
- import { Indicator as de } from "./use-table-launcher-journey-styled.js";
19
- const Pe = ({
7
+ import { useJourney as z } from "../../../../journey/use-journey/use-journey.js";
8
+ import Q from "../../../../ui/buttons/icon-button/icon-button.js";
9
+ import { useUIContext as ee } from "../../../../ui/context/context.js";
10
+ import S from "../../../../ui/layout/flex-view.js";
11
+ import T from "../../../../ui/text/text.js";
12
+ import { getTheme as te } from "../../../../ui/theme/get-theme.js";
13
+ import { CIRCLE_ONBOARDING_ANALYTICS_STEPS as x } from "../../../enum/circle-onboarding-steps.js";
14
+ import { useCircleSounds as re } from "../../../hooks/use-circle-sounds/use-circle-sounds.js";
15
+ import { TablesCard as $ } from "../../comps/tables-card/tables-card.js";
16
+ import { GAME_LAUNCHER_ANALYTICS_EVENTS as ne } from "../../game-launcher-analytics-events.js";
17
+ import { SHOW_PICK_A_LEVEL_TOOLTIP_AFTER_MS as oe, SHOW_PICK_A_LEVEL_NUDGE_AFTER_MS as ie, START_ANIMATING_CLONED_ELEM as w, TABLE_CARD_INDEX as F, GO_TO_TABLE_LAUNCHER_DURATION_MS as le, SHOW_CLICK_TABLE_NUDGE_AFTER_MS as ce, PUZZLE_CARD_INDEX as ae, SHOW_INITIAL_COACHMARK_AFTER_MS as V, LESSON_CARD_INDEX as se, SHOW_INITIAL_TOOLTIP_AFTER_MS as de } from "./constants.js";
18
+ import { Indicator as ue } from "./use-table-launcher-journey-styled.js";
19
+ const He = ({
20
20
  carouselRefs: a,
21
- onTableSegmentClick: S,
22
- onJourneyComplete: P
21
+ onTableSegmentClick: P,
22
+ onJourneyComplete: H
23
23
  }) => {
24
- const e = Z.CIRCLE_TABLES_INTRO_JOURNEY, { breakpoints: V } = ee(), T = window.innerWidth <= V.MOBILE, t = R(null), f = R(null), g = R([]), { playButtonSound: H } = te(), { nextCoachmark: l, setJourney: L, addCoachmark: u, endJourney: y } = q(), { onEvent: A } = Q(), I = C(
24
+ const e = q.CIRCLE_TABLES_INTRO_JOURNEY, { breakpoints: X } = te(), { isMobile: u } = X, g = u ? "ab3-bold" : "ab2-bold", t = N(null), A = N(null), E = N([]), { playButtonSound: y } = re(), { nextCoachmark: l, setJourney: I, addCoachmark: m, endJourney: D } = z(), { onEvent: C } = ee(), R = L(
25
25
  (n) => {
26
26
  var c, o;
27
- y(e), n && S(n), A(M.ONBOARDING_STEP_COMPLETED, {
28
- step: v.TABLES
29
- }), (c = t == null ? void 0 : t.current) == null || c.setLabelVisiblity(!0), (o = t == null ? void 0 : t.current) == null || o.stopLabelAnimation(), P(e);
27
+ D(e), n && P(n), C(M.ONBOARDING_STEP_COMPLETED, {
28
+ step: x.TABLES
29
+ }), (c = t == null ? void 0 : t.current) == null || c.setLabelVisiblity(!0), (o = t == null ? void 0 : t.current) == null || o.stopLabelAnimation(), H(e);
30
30
  },
31
- [y, e, P, S, A]
32
- ), D = C(
31
+ [D, e, H, P, C]
32
+ ), W = L(
33
33
  (n, c) => {
34
- var E, h, p;
35
- if (!((E = t.current) != null && E.segmentedCardWrapperRef.current) || !((h = t.current) != null && h.labelRef.current))
34
+ var h, p, _;
35
+ if (!((h = t.current) != null && h.segmentedCardWrapperRef.current) || !((p = t.current) != null && p.labelRef.current))
36
36
  return;
37
- const o = t.current.labelRef.current.getBoundingClientRect(), i = (p = t.current) == null ? void 0 : p.segmentedCardWrapperRef.current.getBoundingClientRect();
38
- u(e, {
37
+ const o = t.current.labelRef.current.getBoundingClientRect(), i = (_ = t.current) == null ? void 0 : _.segmentedCardWrapperRef.current.getBoundingClientRect();
38
+ m(e, {
39
39
  originalElementToHighlightRef: t.current.segmentedCardWrapperRef,
40
40
  isActive: !1,
41
41
  type: d.TOOLTIP,
42
42
  elementToHighlight: /* @__PURE__ */ r(
43
- w,
43
+ $,
44
44
  {
45
- ref: f,
45
+ ref: A,
46
46
  defaultTable: c,
47
47
  label: n.label,
48
48
  data: n.data,
49
- onPress: I,
50
- onGoBackFromTableLevel: I
49
+ onPress: R,
50
+ onGoBackFromTableLevel: R
51
51
  }
52
52
  ),
53
53
  indicator: {
54
54
  position: "top",
55
55
  backgroundColor: "YELLOW_4",
56
56
  width: 236,
57
- tooltipItem: /* @__PURE__ */ r(N, { children: /* @__PURE__ */ r(m, { $renderAs: "ab2-bold", children: "Each table has 3 levels—clear them and earn 3 stars!" }) }),
57
+ tooltipItem: /* @__PURE__ */ r(S, { children: /* @__PURE__ */ r(T, { $renderAs: g, children: "Each table has 3 levels—clear them and earn 3 stars!" }) }),
58
58
  tooltipXCoOrdinates: o.width / 2,
59
59
  tooltipYCoOrdinates: 45
60
60
  }
61
- }), u(e, {
61
+ }), m(e, {
62
62
  originalElementToHighlightRef: t.current.segmentedCardWrapperRef,
63
63
  isActive: !1,
64
64
  type: d.NUDGE,
65
65
  indicator: {
66
66
  nudge: "click",
67
- content: !T && /* @__PURE__ */ r(m, { $renderAs: "ab1", $color: "WHITE", children: "Pick a level" }),
67
+ content: !u && /* @__PURE__ */ r(T, { $renderAs: "ab1", $color: "WHITE", children: "Pick a level" }),
68
68
  nudgePointerX: i.width / 2 + 50,
69
69
  nudgePointerY: i.height * 0.4
70
70
  },
71
71
  elementToHighlight: /* @__PURE__ */ r(O, {})
72
- }), l(e, !1, ne), l(e, !0, oe);
72
+ }), l(e, !1, oe), l(e, !0, ie);
73
73
  const s = setTimeout(() => {
74
- var _;
75
- clearTimeout(s), (_ = f.current) == null || _.startLabelAnimation("YELLOW_4");
76
- }, $);
77
- g.current.push(s);
74
+ var f;
75
+ clearTimeout(s), (f = A.current) == null || f.startLabelAnimation("YELLOW_4");
76
+ }, w);
77
+ E.current.push(s);
78
78
  },
79
- [u, I, T, e, l]
80
- ), b = C(() => {
79
+ [m, R, u, e, l, g]
80
+ ), b = L(() => {
81
81
  var o;
82
- H(), (o = a.current) == null || o.goToIndex(x), l(e, !1, ie), A(M.ONBOARDING_STEP_VIEWED, {
83
- step: v.TABLES
82
+ y(), (o = a.current) == null || o.goToIndex(F), l(e, !1, le), C(M.ONBOARDING_STEP_VIEWED, {
83
+ step: x.TABLES
84
84
  });
85
85
  const n = setTimeout(() => {
86
86
  var i;
87
87
  clearTimeout(n), (i = t.current) == null || i.setLabelVisiblity(!1), l(e, !0);
88
- }, le);
89
- g.current.push(n);
88
+ }, ce);
89
+ E.current.push(n);
90
90
  const c = setTimeout(() => {
91
91
  var i;
92
- clearTimeout(c), (i = f.current) == null || i.startLabelAnimation("YELLOW_4");
93
- }, $);
94
- g.current.push(c);
95
- }, [a, e, l, H, A]), X = C(
92
+ clearTimeout(c), (i = A.current) == null || i.startLabelAnimation("YELLOW_4");
93
+ }, w);
94
+ E.current.push(c);
95
+ }, [a, e, l, y, C]), J = L(
96
96
  (n, c = !1) => {
97
- var p, _, W, k, B, Y, U, G;
98
- const o = (p = a.current) == null ? void 0 : p.indicatorRefs, i = (_ = a.current) == null ? void 0 : _.nextBtnRef, s = o == null ? void 0 : o[x];
99
- if (!((W = t.current) != null && W.segmentedCardWrapperRef.current) || !((k = t.current) != null && k.labelRef.current) || !o || !(i != null && i.current) || !s || !s.current)
97
+ var _, f, k, Y, B, U, G, v;
98
+ const o = (_ = a.current) == null ? void 0 : _.indicatorRefs, i = (f = a.current) == null ? void 0 : f.nextBtnRef, s = o == null ? void 0 : o[F];
99
+ if (!((k = t.current) != null && k.segmentedCardWrapperRef.current) || !((Y = t.current) != null && Y.labelRef.current) || !o || !(i != null && i.current) || !s || !s.current)
100
100
  return;
101
- const E = t.current.labelRef.current.getBoundingClientRect(), h = (B = t.current) == null ? void 0 : B.segmentedCardWrapperRef.current.getBoundingClientRect();
102
- c ? (L(e, [
101
+ const h = t.current.labelRef.current.getBoundingClientRect(), p = (B = t.current) == null ? void 0 : B.segmentedCardWrapperRef.current.getBoundingClientRect();
102
+ c ? (I(e, [
103
103
  {
104
104
  originalElementToHighlightRef: s,
105
105
  isActive: !1,
106
106
  type: d.TOOLTIP,
107
- elementToHighlight: /* @__PURE__ */ r(de, { $isActive: !1 }),
107
+ elementToHighlight: /* @__PURE__ */ r(ue, { $isActive: !1 }),
108
108
  indicator: {
109
109
  position: "bottom",
110
110
  backgroundColor: "YELLOW_4",
111
111
  width: 52,
112
112
  tooltipItem: /* @__PURE__ */ r(
113
- N,
113
+ S,
114
114
  {
115
115
  $position: "absolute",
116
116
  $flexDirection: "row",
117
117
  style: { top: 6, left: 8, cursor: "pointer" },
118
118
  onClick: b,
119
- children: /* @__PURE__ */ r(m, { $renderAs: "ab2-bold", children: "NEW" })
119
+ children: /* @__PURE__ */ r(T, { $renderAs: g, children: "NEW" })
120
120
  }
121
121
  ),
122
122
  tooltipYCoOrdinates: 14
@@ -134,28 +134,28 @@ const Pe = ({
134
134
  },
135
135
  elementToHighlight: /* @__PURE__ */ r(O, {})
136
136
  }
137
- ]), (G = a.current) == null || G.goToIndex(ae), l(e, !1, F), l(e, !0, se)) : (L(e, [
137
+ ]), (v = a.current) == null || v.goToIndex(se), l(e, !1, V), l(e, !0, de)) : (I(e, [
138
138
  {
139
- originalElementToHighlightRef: (Y = a.current) == null ? void 0 : Y.nextBtnRef,
139
+ originalElementToHighlightRef: (U = a.current) == null ? void 0 : U.nextBtnRef,
140
140
  isActive: !1,
141
141
  type: d.NUDGE,
142
142
  indicator: {
143
143
  nudge: "click",
144
- content: !T && /* @__PURE__ */ r(m, { $renderAs: "ab1", $color: "WHITE", children: "Click to proceed" }),
144
+ content: !u && /* @__PURE__ */ r(T, { $renderAs: "ab1", $color: "WHITE", children: "Click to proceed" }),
145
145
  nudgePointerX: 0,
146
146
  nudgePointerY: 0
147
147
  },
148
148
  elementToHighlight: /* @__PURE__ */ r(
149
- z,
149
+ Q,
150
150
  {
151
151
  renderAs: "secondary",
152
- Icon: j,
152
+ Icon: Z,
153
153
  onClick: b,
154
- analyticsLabel: re.JOURNEY_NEXT_ACTIVITY
154
+ analyticsLabel: ne.JOURNEY_NEXT_ACTIVITY
155
155
  }
156
156
  )
157
157
  }
158
- ]), (U = a.current) == null || U.goToIndex(ce), l(e, !1, F)), u(e, {
158
+ ]), (G = a.current) == null || G.goToIndex(ae), l(e, !1, V)), m(e, {
159
159
  originalElementToHighlightRef: t.current.labelRef,
160
160
  isActive: !1,
161
161
  type: d.TOOLTIP,
@@ -164,52 +164,53 @@ const Pe = ({
164
164
  position: "top",
165
165
  backgroundColor: "YELLOW_4",
166
166
  width: 264,
167
- tooltipItem: /* @__PURE__ */ r(N, { children: /* @__PURE__ */ r(m, { $renderAs: "ab2-bold", children: "Get faster at multiplication! Practice everyday and become a Tables champ." }) }),
168
- tooltipXCoOrdinates: E.width / 2,
169
- tooltipYCoOrdinates: E.height + 10
167
+ tooltipItem: /* @__PURE__ */ r(S, { children: /* @__PURE__ */ r(T, { $renderAs: g, children: "Get faster at multiplication! Practice everyday and become a Tables champ." }) }),
168
+ tooltipXCoOrdinates: h.width / 2,
169
+ tooltipYCoOrdinates: h.height + 10
170
170
  }
171
- }), u(e, {
171
+ }), m(e, {
172
172
  originalElementToHighlightRef: t.current.segmentedCardWrapperRef,
173
173
  isActive: !1,
174
174
  type: d.NUDGE,
175
175
  indicator: {
176
176
  nudge: "click",
177
- content: !T && /* @__PURE__ */ r(m, { $renderAs: "ab1", $color: "WHITE", children: "Pick a table to start" }),
178
- nudgePointerX: h.width / 2 + 50,
179
- nudgePointerY: h.height / 2
177
+ content: !u && /* @__PURE__ */ r(T, { $renderAs: "ab1", $color: "WHITE", children: "Pick a table to start" }),
178
+ nudgePointerX: p.width / 2 + 50,
179
+ nudgePointerY: p.height / 2
180
180
  },
181
181
  elementToHighlight: /* @__PURE__ */ r(
182
- w,
182
+ $,
183
183
  {
184
- ref: f,
184
+ ref: A,
185
185
  label: n.label,
186
186
  data: n.data,
187
187
  onPress: () => {
188
188
  },
189
- onPressTableSegment: (J) => D(n, J)
189
+ onPressTableSegment: (K) => W(n, K)
190
190
  }
191
191
  )
192
192
  });
193
193
  },
194
194
  [
195
- u,
195
+ m,
196
196
  a,
197
197
  b,
198
- D,
199
- T,
198
+ W,
199
+ u,
200
200
  e,
201
201
  l,
202
- L
202
+ I,
203
+ g
203
204
  ]
204
205
  );
205
- return K(() => () => {
206
- g.current.forEach((n) => clearTimeout(n)), g.current = [];
206
+ return j(() => () => {
207
+ E.current.forEach((n) => clearTimeout(n)), E.current = [];
207
208
  }, [e]), {
208
209
  tableRef: t,
209
- startJourney: X
210
+ startJourney: J
210
211
  };
211
212
  };
212
213
  export {
213
- Pe as useTableLauncherJourney
214
+ He as useTableLauncherJourney
214
215
  };
215
216
  //# sourceMappingURL=use-table-launcher-journey.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-table-launcher-journey.js","sources":["../../../../../../src/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.tsx"],"sourcesContent":["/* eslint-disable react-native/no-inline-styles */\nimport type { IArrowTooltipProps } from '../../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport type { INudgeProps } from '../../../../ui/nudge/nudge-types';\nimport type { ITableCardRef, ITableDetails } from '../../comps/tables-card/tables-card-types';\nimport type {\n ITableInfo,\n ITables,\n} from '../../dal/use-get-circle-home-details-dal/use-get-circle-home-dal-types';\nimport type { IUseTableJourneyProps } from './use-table-launcher-journey-types';\n\nimport { useCallback, useEffect, useRef } from 'react';\n\nimport CaratRightIcon from '../../../../../assets/line-icons/icons/carat-right';\nimport { PLATFORM_EVENTS_STUDENT } from '../../../../analytics-events/platform-events-student';\nimport { JOURNEY_ID_STUDENT } from '../../../../journey/journey-id/journey-id-student';\nimport { IndicatorType } from '../../../../journey/use-journey/constants';\nimport { useJourney } from '../../../../journey/use-journey/use-journey';\nimport IconButton from '../../../../ui/buttons/icon-button/icon-button';\nimport { useUIContext } from '../../../../ui/context/context';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\nimport { getTheme } from '../../../../ui/theme/get-theme';\nimport { CIRCLE_ONBOARDING_ANALYTICS_STEPS as Action } from '../../../enum/circle-onboarding-steps';\nimport { useCircleSounds } from '../../../hooks/use-circle-sounds/use-circle-sounds';\nimport { TablesCard } from '../../comps/tables-card/tables-card';\nimport { GAME_LAUNCHER_ANALYTICS_EVENTS } from '../../game-launcher-analytics-events';\nimport {\n LESSON_CARD_INDEX,\n PUZZLE_CARD_INDEX,\n SHOW_PICK_A_LEVEL_NUDGE_AFTER_MS,\n SHOW_PICK_A_LEVEL_TOOLTIP_AFTER_MS,\n TABLE_CARD_INDEX,\n} from './constants';\nimport {\n GO_TO_TABLE_LAUNCHER_DURATION_MS,\n SHOW_CLICK_TABLE_NUDGE_AFTER_MS,\n SHOW_INITIAL_COACHMARK_AFTER_MS,\n SHOW_INITIAL_TOOLTIP_AFTER_MS,\n START_ANIMATING_CLONED_ELEM,\n} from './constants';\nimport * as S from './use-table-launcher-journey-styled';\n\nexport const useTableLauncherJourney = ({\n carouselRefs,\n onTableSegmentClick,\n onJourneyComplete,\n}: IUseTableJourneyProps) => {\n const journeyId = JOURNEY_ID_STUDENT.CIRCLE_TABLES_INTRO_JOURNEY;\n\n const { breakpoints } = getTheme();\n const isMobile = window.innerWidth <= breakpoints.MOBILE;\n\n const originalTableRef = useRef<ITableCardRef>(null);\n const highlightedTableRef = useRef<ITableCardRef>(null);\n\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n\n const { playButtonSound } = useCircleSounds();\n const { nextCoachmark, setJourney, addCoachmark, endJourney } = useJourney();\n const { onEvent: trackAnalytics } = useUIContext();\n\n const handleEndJourney = useCallback(\n (tableDetails?: ITableDetails) => {\n endJourney(journeyId);\n // Only when User clicked on play\n if (tableDetails) {\n onTableSegmentClick(tableDetails);\n }\n trackAnalytics(PLATFORM_EVENTS_STUDENT.ONBOARDING_STEP_COMPLETED, {\n step: Action.TABLES,\n });\n\n // Reset original table card ref label\n originalTableRef?.current?.setLabelVisiblity(true);\n originalTableRef?.current?.stopLabelAnimation();\n onJourneyComplete(journeyId);\n },\n [endJourney, journeyId, onJourneyComplete, onTableSegmentClick, trackAnalytics],\n );\n\n const handleTableSegmentClick = useCallback(\n (launcherData: ITables, tableData: ITableInfo) => {\n if (\n !originalTableRef.current?.segmentedCardWrapperRef.current ||\n !originalTableRef.current?.labelRef.current\n ) {\n return;\n }\n\n const segmentedCardDims = originalTableRef.current.labelRef.current.getBoundingClientRect();\n const tableCardDims =\n originalTableRef.current?.segmentedCardWrapperRef.current.getBoundingClientRect();\n\n addCoachmark(journeyId, {\n originalElementToHighlightRef: originalTableRef.current.segmentedCardWrapperRef,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: (\n <TablesCard\n ref={highlightedTableRef}\n defaultTable={tableData}\n label={launcherData.label}\n data={launcherData.data}\n onPress={handleEndJourney}\n onGoBackFromTableLevel={handleEndJourney}\n />\n ),\n indicator: {\n position: 'top',\n backgroundColor: 'YELLOW_4',\n width: 236,\n tooltipItem: (\n <FlexView>\n <Text $renderAs=\"ab2-bold\">Each table has 3 levels—clear them and earn 3 stars!</Text>\n </FlexView>\n ),\n tooltipXCoOrdinates: segmentedCardDims.width / 2,\n tooltipYCoOrdinates: 45,\n } as IArrowTooltipProps,\n });\n\n addCoachmark(journeyId, {\n originalElementToHighlightRef: originalTableRef.current.segmentedCardWrapperRef,\n isActive: false,\n type: IndicatorType.NUDGE,\n indicator: {\n nudge: 'click',\n content: !isMobile && (\n <Text $renderAs=\"ab1\" $color=\"WHITE\">\n Pick a level\n </Text>\n ),\n nudgePointerX: tableCardDims.width / 2 + 50,\n nudgePointerY: tableCardDims.height * 0.4,\n } as INudgeProps,\n elementToHighlight: <></>,\n });\n\n nextCoachmark(journeyId, false, SHOW_PICK_A_LEVEL_TOOLTIP_AFTER_MS); // Show coachmark => Each table has 3... and Hide the previous two\n nextCoachmark(journeyId, true, SHOW_PICK_A_LEVEL_NUDGE_AFTER_MS); // Show nudge => Pick a level\n\n const startAnimationOnLabelAgain = setTimeout(() => {\n clearTimeout(startAnimationOnLabelAgain);\n highlightedTableRef.current?.startLabelAnimation('YELLOW_4');\n }, START_ANIMATING_CLONED_ELEM);\n\n timerRefs.current.push(startAnimationOnLabelAgain);\n },\n [addCoachmark, handleEndJourney, isMobile, journeyId, nextCoachmark],\n );\n\n const goToTableLauncher = useCallback(() => {\n playButtonSound();\n carouselRefs.current?.goToIndex(TABLE_CARD_INDEX);\n nextCoachmark(journeyId, false, GO_TO_TABLE_LAUNCHER_DURATION_MS);\n\n trackAnalytics(PLATFORM_EVENTS_STUDENT.ONBOARDING_STEP_VIEWED, {\n step: Action.TABLES,\n });\n\n const showNudge = setTimeout(() => {\n clearTimeout(showNudge);\n originalTableRef.current?.setLabelVisiblity(false);\n nextCoachmark(journeyId, true);\n }, SHOW_CLICK_TABLE_NUDGE_AFTER_MS);\n\n timerRefs.current.push(showNudge);\n\n const animateLabel = setTimeout(() => {\n clearTimeout(animateLabel);\n highlightedTableRef.current?.startLabelAnimation('YELLOW_4');\n }, START_ANIMATING_CLONED_ELEM);\n\n timerRefs.current.push(animateLabel);\n }, [carouselRefs, journeyId, nextCoachmark, playButtonSound, trackAnalytics]);\n\n const startJourney = useCallback(\n (tablesData: ITables, isTutorialOnboardingDone: boolean = false) => {\n const paginationList = carouselRefs.current?.indicatorRefs;\n const carouselNextBtnRef = carouselRefs.current?.nextBtnRef;\n const tablePaginationRef = paginationList?.[TABLE_CARD_INDEX];\n\n if (\n !originalTableRef.current?.segmentedCardWrapperRef.current ||\n !originalTableRef.current?.labelRef.current ||\n !paginationList ||\n !carouselNextBtnRef?.current ||\n !tablePaginationRef ||\n !tablePaginationRef.current\n ) {\n return;\n }\n\n const labelDims = originalTableRef.current.labelRef.current.getBoundingClientRect();\n const tableCardDims =\n originalTableRef.current?.segmentedCardWrapperRef.current.getBoundingClientRect();\n\n // TAKE THE USER TO THE TABLE CARD\n if (!isTutorialOnboardingDone) {\n setJourney(journeyId, [\n {\n originalElementToHighlightRef: carouselRefs.current?.nextBtnRef,\n isActive: false,\n type: IndicatorType.NUDGE,\n indicator: {\n nudge: 'click',\n content: !isMobile && (\n <Text $renderAs=\"ab1\" $color=\"WHITE\">\n Click to proceed\n </Text>\n ),\n nudgePointerX: 0,\n nudgePointerY: 0,\n } as INudgeProps,\n elementToHighlight: (\n <IconButton\n renderAs=\"secondary\"\n Icon={CaratRightIcon}\n onClick={goToTableLauncher}\n analyticsLabel={GAME_LAUNCHER_ANALYTICS_EVENTS.JOURNEY_NEXT_ACTIVITY}\n />\n ),\n },\n ]);\n carouselRefs.current?.goToIndex(PUZZLE_CARD_INDEX);\n nextCoachmark(journeyId, false, SHOW_INITIAL_COACHMARK_AFTER_MS); // Show nudge => Click to proceed\n } else {\n setJourney(journeyId, [\n {\n originalElementToHighlightRef: tablePaginationRef as React.RefObject<HTMLDivElement>,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: <S.Indicator $isActive={false} />,\n indicator: {\n position: 'bottom',\n backgroundColor: 'YELLOW_4',\n width: 52,\n tooltipItem: (\n <FlexView\n $position=\"absolute\"\n $flexDirection=\"row\"\n style={{ top: 6, left: 8, cursor: 'pointer' }}\n onClick={goToTableLauncher}\n >\n <Text $renderAs=\"ab2-bold\">NEW</Text>\n </FlexView>\n ),\n tooltipYCoOrdinates: 14, // Need some offset in Y direction from top\n } as IArrowTooltipProps,\n },\n {\n originalElementToHighlightRef: tablePaginationRef as React.RefObject<HTMLDivElement>,\n isActive: false,\n type: IndicatorType.NUDGE,\n indicator: {\n nudge: 'click',\n content: '',\n nudgePointerY: 20,\n } as INudgeProps,\n elementToHighlight: <></>,\n },\n ]);\n carouselRefs.current?.goToIndex(LESSON_CARD_INDEX);\n nextCoachmark(journeyId, false, SHOW_INITIAL_COACHMARK_AFTER_MS); // Show Coachmark => NEW\n nextCoachmark(journeyId, true, SHOW_INITIAL_TOOLTIP_AFTER_MS); // Show Nudge over Coachmark\n }\n\n // SHOW THE USER SELECT A TABLE\n addCoachmark(journeyId, {\n originalElementToHighlightRef: originalTableRef.current.labelRef,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: <></>,\n indicator: {\n position: 'top',\n backgroundColor: 'YELLOW_4',\n width: 264,\n tooltipItem: (\n <FlexView>\n <Text $renderAs=\"ab2-bold\">\n Get faster at multiplication! Practice everyday and become a Tables champ.\n </Text>\n </FlexView>\n ),\n tooltipXCoOrdinates: labelDims.width / 2,\n tooltipYCoOrdinates: labelDims.height + 10,\n } as IArrowTooltipProps,\n });\n\n addCoachmark(journeyId, {\n originalElementToHighlightRef: originalTableRef.current.segmentedCardWrapperRef,\n isActive: false,\n type: IndicatorType.NUDGE,\n indicator: {\n nudge: 'click',\n content: !isMobile && (\n <Text $renderAs=\"ab1\" $color=\"WHITE\">\n {'Pick a table to start'}\n </Text>\n ),\n nudgePointerX: tableCardDims.width / 2 + 50,\n nudgePointerY: tableCardDims.height / 2,\n } as INudgeProps,\n elementToHighlight: (\n <TablesCard\n ref={highlightedTableRef}\n label={tablesData.label}\n data={tablesData.data}\n onPress={() => {}}\n onPressTableSegment={tableInfo => handleTableSegmentClick(tablesData, tableInfo)}\n />\n ),\n });\n },\n [\n addCoachmark,\n carouselRefs,\n goToTableLauncher,\n handleTableSegmentClick,\n isMobile,\n journeyId,\n nextCoachmark,\n setJourney,\n ],\n );\n\n // Cleanup on unmount\n useEffect(() => {\n return () => {\n timerRefs.current.forEach(timer => clearTimeout(timer));\n timerRefs.current = [];\n };\n }, [journeyId]);\n\n return {\n tableRef: originalTableRef,\n startJourney,\n };\n};\n"],"names":["useTableLauncherJourney","carouselRefs","onTableSegmentClick","onJourneyComplete","journeyId","JOURNEY_ID_STUDENT","breakpoints","getTheme","isMobile","originalTableRef","useRef","highlightedTableRef","timerRefs","playButtonSound","useCircleSounds","nextCoachmark","setJourney","addCoachmark","endJourney","useJourney","trackAnalytics","useUIContext","handleEndJourney","useCallback","tableDetails","PLATFORM_EVENTS_STUDENT","Action","_a","_b","handleTableSegmentClick","launcherData","tableData","segmentedCardDims","tableCardDims","_c","IndicatorType","jsx","TablesCard","FlexView","Text","Fragment","SHOW_PICK_A_LEVEL_TOOLTIP_AFTER_MS","SHOW_PICK_A_LEVEL_NUDGE_AFTER_MS","startAnimationOnLabelAgain","START_ANIMATING_CLONED_ELEM","goToTableLauncher","TABLE_CARD_INDEX","GO_TO_TABLE_LAUNCHER_DURATION_MS","showNudge","SHOW_CLICK_TABLE_NUDGE_AFTER_MS","animateLabel","startJourney","tablesData","isTutorialOnboardingDone","paginationList","carouselNextBtnRef","tablePaginationRef","_d","labelDims","_e","S.Indicator","_h","LESSON_CARD_INDEX","SHOW_INITIAL_COACHMARK_AFTER_MS","SHOW_INITIAL_TOOLTIP_AFTER_MS","_f","IconButton","CaratRightIcon","GAME_LAUNCHER_ANALYTICS_EVENTS","_g","PUZZLE_CARD_INDEX","tableInfo","useEffect","timer"],"mappings":";;;;;;;;;;;;;;;;;;AA0CO,MAAMA,KAA0B,CAAC;AAAA,EACtC,cAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,mBAAAC;AACF,MAA6B;AAC3B,QAAMC,IAAYC,EAAmB,6BAE/B,EAAE,aAAAC,MAAgBC,MAClBC,IAAW,OAAO,cAAcF,EAAY,QAE5CG,IAAmBC,EAAsB,IAAI,GAC7CC,IAAsBD,EAAsB,IAAI,GAEhDE,IAAYF,EAAwC,CAAA,CAAE,GAEtD,EAAE,iBAAAG,MAAoBC,MACtB,EAAE,eAAAC,GAAe,YAAAC,GAAY,cAAAC,GAAc,YAAAC,EAAA,IAAeC,KAC1D,EAAE,SAASC,EAAe,IAAIC,EAAa,GAE3CC,IAAmBC;AAAA,IACvB,CAACC,MAAiC;;AAChC,MAAAN,EAAWd,CAAS,GAEhBoB,KACFtB,EAAoBsB,CAAY,GAElCJ,EAAeK,EAAwB,2BAA2B;AAAA,QAChE,MAAMC,EAAO;AAAA,MAAA,CACd,IAGiBC,IAAAlB,KAAA,gBAAAA,EAAA,YAAA,QAAAkB,EAAS,kBAAkB,MAC7CC,IAAAnB,KAAA,gBAAAA,EAAkB,YAAlB,QAAAmB,EAA2B,sBAC3BzB,EAAkBC,CAAS;AAAA,IAC7B;AAAA,IACA,CAACc,GAAYd,GAAWD,GAAmBD,GA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,CAAA;AAAA,UAEF,eAAeN,EAAc,QAAQ,IAAI;AAAA,UACzC,eAAeA,EAAc,SAAS;AAAA,QACxC;AAAA,QACA,oBACE,gBAAAG;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,KAAK1B;AAAA,YACL,OAAOyC,EAAW;AAAA,YAClB,MAAMA,EAAW;AAAA,YACjB,SAAS,MAAM;AAAA,YAAC;AAAA,YAChB,qBAAqB,CAAAmB,MAAa1C,EAAwBuB,GAAYmB,CAAS;AAAA,UAAA;AAAA,QACjF;AAAA,MAAA,CAEH;AAAA,IACH;AAAA,IACA;AAAA,MACEtD;AAAA,MACAhB;AAAA,MACA4C;AAAA,MACAhB;AAAA,MACArB;AAAA,MACAJ;AAAA,MACAW;AAAA,MACAC;AAAA,IACF;AAAA,EAAA;AAIF,SAAAwD,EAAU,MACD,MAAM;AACX,IAAA5D,EAAU,QAAQ,QAAQ,CAAS6D,MAAA,aAAaA,CAAK,CAAC,GACtD7D,EAAU,UAAU;EAAC,GAEtB,CAACR,CAAS,CAAC,GAEP;AAAA,IACL,UAAUK;AAAA,IACV,cAAA0C;AAAA,EAAA;AAEJ;"}
1
+ {"version":3,"file":"use-table-launcher-journey.js","sources":["../../../../../../src/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.tsx"],"sourcesContent":["/* eslint-disable react-native/no-inline-styles */\nimport type { IArrowTooltipProps } from '../../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport type { INudgeProps } from '../../../../ui/nudge/nudge-types';\nimport type { ITableCardRef, ITableDetails } from '../../comps/tables-card/tables-card-types';\nimport type {\n ITableInfo,\n ITables,\n} from '../../dal/use-get-circle-home-details-dal/use-get-circle-home-dal-types';\nimport type { IUseTableJourneyProps } from './use-table-launcher-journey-types';\n\nimport { useCallback, useEffect, useRef } from 'react';\n\nimport CaratRightIcon from '../../../../../assets/line-icons/icons/carat-right';\nimport { PLATFORM_EVENTS_STUDENT } from '../../../../analytics-events/platform-events-student';\nimport { JOURNEY_ID_STUDENT } from '../../../../journey/journey-id/journey-id-student';\nimport { IndicatorType } from '../../../../journey/use-journey/constants';\nimport { useJourney } from '../../../../journey/use-journey/use-journey';\nimport IconButton from '../../../../ui/buttons/icon-button/icon-button';\nimport { useUIContext } from '../../../../ui/context/context';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\nimport { getTheme } from '../../../../ui/theme/get-theme';\nimport { CIRCLE_ONBOARDING_ANALYTICS_STEPS as Action } from '../../../enum/circle-onboarding-steps';\nimport { useCircleSounds } from '../../../hooks/use-circle-sounds/use-circle-sounds';\nimport { TablesCard } from '../../comps/tables-card/tables-card';\nimport { GAME_LAUNCHER_ANALYTICS_EVENTS } from '../../game-launcher-analytics-events';\nimport {\n LESSON_CARD_INDEX,\n PUZZLE_CARD_INDEX,\n SHOW_PICK_A_LEVEL_NUDGE_AFTER_MS,\n SHOW_PICK_A_LEVEL_TOOLTIP_AFTER_MS,\n TABLE_CARD_INDEX,\n} from './constants';\nimport {\n GO_TO_TABLE_LAUNCHER_DURATION_MS,\n SHOW_CLICK_TABLE_NUDGE_AFTER_MS,\n SHOW_INITIAL_COACHMARK_AFTER_MS,\n SHOW_INITIAL_TOOLTIP_AFTER_MS,\n START_ANIMATING_CLONED_ELEM,\n} from './constants';\nimport * as S from './use-table-launcher-journey-styled';\n\nexport const useTableLauncherJourney = ({\n carouselRefs,\n onTableSegmentClick,\n onJourneyComplete,\n}: IUseTableJourneyProps) => {\n const journeyId = JOURNEY_ID_STUDENT.CIRCLE_TABLES_INTRO_JOURNEY;\n\n const { breakpoints } = getTheme();\n const { isMobile } = breakpoints;\n const tooltipTextRenderAs = isMobile ? 'ab3-bold' : 'ab2-bold';\n\n const originalTableRef = useRef<ITableCardRef>(null);\n const highlightedTableRef = useRef<ITableCardRef>(null);\n\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n\n const { playButtonSound } = useCircleSounds();\n const { nextCoachmark, setJourney, addCoachmark, endJourney } = useJourney();\n const { onEvent: trackAnalytics } = useUIContext();\n\n const handleEndJourney = useCallback(\n (tableDetails?: ITableDetails) => {\n endJourney(journeyId);\n // Only when User clicked on play\n if (tableDetails) {\n onTableSegmentClick(tableDetails);\n }\n trackAnalytics(PLATFORM_EVENTS_STUDENT.ONBOARDING_STEP_COMPLETED, {\n step: Action.TABLES,\n });\n\n // Reset original table card ref label\n originalTableRef?.current?.setLabelVisiblity(true);\n originalTableRef?.current?.stopLabelAnimation();\n onJourneyComplete(journeyId);\n },\n [endJourney, journeyId, onJourneyComplete, onTableSegmentClick, trackAnalytics],\n );\n\n const handleTableSegmentClick = useCallback(\n (launcherData: ITables, tableData: ITableInfo) => {\n if (\n !originalTableRef.current?.segmentedCardWrapperRef.current ||\n !originalTableRef.current?.labelRef.current\n ) {\n return;\n }\n\n const segmentedCardDims = originalTableRef.current.labelRef.current.getBoundingClientRect();\n const tableCardDims =\n originalTableRef.current?.segmentedCardWrapperRef.current.getBoundingClientRect();\n\n addCoachmark(journeyId, {\n originalElementToHighlightRef: originalTableRef.current.segmentedCardWrapperRef,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: (\n <TablesCard\n ref={highlightedTableRef}\n defaultTable={tableData}\n label={launcherData.label}\n data={launcherData.data}\n onPress={handleEndJourney}\n onGoBackFromTableLevel={handleEndJourney}\n />\n ),\n indicator: {\n position: 'top',\n backgroundColor: 'YELLOW_4',\n width: 236,\n tooltipItem: (\n <FlexView>\n <Text $renderAs={tooltipTextRenderAs}>\n Each table has 3 levels—clear them and earn 3 stars!\n </Text>\n </FlexView>\n ),\n tooltipXCoOrdinates: segmentedCardDims.width / 2,\n tooltipYCoOrdinates: 45,\n } as IArrowTooltipProps,\n });\n\n addCoachmark(journeyId, {\n originalElementToHighlightRef: originalTableRef.current.segmentedCardWrapperRef,\n isActive: false,\n type: IndicatorType.NUDGE,\n indicator: {\n nudge: 'click',\n content: !isMobile && (\n <Text $renderAs=\"ab1\" $color=\"WHITE\">\n Pick a level\n </Text>\n ),\n nudgePointerX: tableCardDims.width / 2 + 50,\n nudgePointerY: tableCardDims.height * 0.4,\n } as INudgeProps,\n elementToHighlight: <></>,\n });\n\n nextCoachmark(journeyId, false, SHOW_PICK_A_LEVEL_TOOLTIP_AFTER_MS); // Show coachmark => Each table has 3... and Hide the previous two\n nextCoachmark(journeyId, true, SHOW_PICK_A_LEVEL_NUDGE_AFTER_MS); // Show nudge => Pick a level\n\n const startAnimationOnLabelAgain = setTimeout(() => {\n clearTimeout(startAnimationOnLabelAgain);\n highlightedTableRef.current?.startLabelAnimation('YELLOW_4');\n }, START_ANIMATING_CLONED_ELEM);\n\n timerRefs.current.push(startAnimationOnLabelAgain);\n },\n [addCoachmark, handleEndJourney, isMobile, journeyId, nextCoachmark, tooltipTextRenderAs],\n );\n\n const goToTableLauncher = useCallback(() => {\n playButtonSound();\n carouselRefs.current?.goToIndex(TABLE_CARD_INDEX);\n nextCoachmark(journeyId, false, GO_TO_TABLE_LAUNCHER_DURATION_MS);\n\n trackAnalytics(PLATFORM_EVENTS_STUDENT.ONBOARDING_STEP_VIEWED, {\n step: Action.TABLES,\n });\n\n const showNudge = setTimeout(() => {\n clearTimeout(showNudge);\n originalTableRef.current?.setLabelVisiblity(false);\n nextCoachmark(journeyId, true);\n }, SHOW_CLICK_TABLE_NUDGE_AFTER_MS);\n\n timerRefs.current.push(showNudge);\n\n const animateLabel = setTimeout(() => {\n clearTimeout(animateLabel);\n highlightedTableRef.current?.startLabelAnimation('YELLOW_4');\n }, START_ANIMATING_CLONED_ELEM);\n\n timerRefs.current.push(animateLabel);\n }, [carouselRefs, journeyId, nextCoachmark, playButtonSound, trackAnalytics]);\n\n const startJourney = useCallback(\n (tablesData: ITables, isTutorialOnboardingDone: boolean = false) => {\n const paginationList = carouselRefs.current?.indicatorRefs;\n const carouselNextBtnRef = carouselRefs.current?.nextBtnRef;\n const tablePaginationRef = paginationList?.[TABLE_CARD_INDEX];\n\n if (\n !originalTableRef.current?.segmentedCardWrapperRef.current ||\n !originalTableRef.current?.labelRef.current ||\n !paginationList ||\n !carouselNextBtnRef?.current ||\n !tablePaginationRef ||\n !tablePaginationRef.current\n ) {\n return;\n }\n\n const labelDims = originalTableRef.current.labelRef.current.getBoundingClientRect();\n const tableCardDims =\n originalTableRef.current?.segmentedCardWrapperRef.current.getBoundingClientRect();\n\n // TAKE THE USER TO THE TABLE CARD\n if (!isTutorialOnboardingDone) {\n setJourney(journeyId, [\n {\n originalElementToHighlightRef: carouselRefs.current?.nextBtnRef,\n isActive: false,\n type: IndicatorType.NUDGE,\n indicator: {\n nudge: 'click',\n content: !isMobile && (\n <Text $renderAs=\"ab1\" $color=\"WHITE\">\n Click to proceed\n </Text>\n ),\n nudgePointerX: 0,\n nudgePointerY: 0,\n } as INudgeProps,\n elementToHighlight: (\n <IconButton\n renderAs=\"secondary\"\n Icon={CaratRightIcon}\n onClick={goToTableLauncher}\n analyticsLabel={GAME_LAUNCHER_ANALYTICS_EVENTS.JOURNEY_NEXT_ACTIVITY}\n />\n ),\n },\n ]);\n carouselRefs.current?.goToIndex(PUZZLE_CARD_INDEX);\n nextCoachmark(journeyId, false, SHOW_INITIAL_COACHMARK_AFTER_MS); // Show nudge => Click to proceed\n } else {\n setJourney(journeyId, [\n {\n originalElementToHighlightRef: tablePaginationRef as React.RefObject<HTMLDivElement>,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: <S.Indicator $isActive={false} />,\n indicator: {\n position: 'bottom',\n backgroundColor: 'YELLOW_4',\n width: 52,\n tooltipItem: (\n <FlexView\n $position=\"absolute\"\n $flexDirection=\"row\"\n style={{ top: 6, left: 8, cursor: 'pointer' }}\n onClick={goToTableLauncher}\n >\n <Text $renderAs={tooltipTextRenderAs}>NEW</Text>\n </FlexView>\n ),\n tooltipYCoOrdinates: 14, // Need some offset in Y direction from top\n } as IArrowTooltipProps,\n },\n {\n originalElementToHighlightRef: tablePaginationRef as React.RefObject<HTMLDivElement>,\n isActive: false,\n type: IndicatorType.NUDGE,\n indicator: {\n nudge: 'click',\n content: '',\n nudgePointerY: 20,\n } as INudgeProps,\n elementToHighlight: <></>,\n },\n ]);\n carouselRefs.current?.goToIndex(LESSON_CARD_INDEX);\n nextCoachmark(journeyId, false, SHOW_INITIAL_COACHMARK_AFTER_MS); // Show Coachmark => NEW\n nextCoachmark(journeyId, true, SHOW_INITIAL_TOOLTIP_AFTER_MS); // Show Nudge over Coachmark\n }\n\n // SHOW THE USER SELECT A TABLE\n addCoachmark(journeyId, {\n originalElementToHighlightRef: originalTableRef.current.labelRef,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: <></>,\n indicator: {\n position: 'top',\n backgroundColor: 'YELLOW_4',\n width: 264,\n tooltipItem: (\n <FlexView>\n <Text $renderAs={tooltipTextRenderAs}>\n Get faster at multiplication! Practice everyday and become a Tables champ.\n </Text>\n </FlexView>\n ),\n tooltipXCoOrdinates: labelDims.width / 2,\n tooltipYCoOrdinates: labelDims.height + 10,\n } as IArrowTooltipProps,\n });\n\n addCoachmark(journeyId, {\n originalElementToHighlightRef: originalTableRef.current.segmentedCardWrapperRef,\n isActive: false,\n type: IndicatorType.NUDGE,\n indicator: {\n nudge: 'click',\n content: !isMobile && (\n <Text $renderAs=\"ab1\" $color=\"WHITE\">\n {'Pick a table to start'}\n </Text>\n ),\n nudgePointerX: tableCardDims.width / 2 + 50,\n nudgePointerY: tableCardDims.height / 2,\n } as INudgeProps,\n elementToHighlight: (\n <TablesCard\n ref={highlightedTableRef}\n label={tablesData.label}\n data={tablesData.data}\n onPress={() => {}}\n onPressTableSegment={tableInfo => handleTableSegmentClick(tablesData, tableInfo)}\n />\n ),\n });\n },\n [\n addCoachmark,\n carouselRefs,\n goToTableLauncher,\n handleTableSegmentClick,\n isMobile,\n journeyId,\n nextCoachmark,\n setJourney,\n tooltipTextRenderAs,\n ],\n );\n\n // Cleanup on unmount\n useEffect(() => {\n return () => {\n timerRefs.current.forEach(timer => clearTimeout(timer));\n timerRefs.current = [];\n };\n }, [journeyId]);\n\n return {\n tableRef: originalTableRef,\n startJourney,\n };\n};\n"],"names":["useTableLauncherJourney","carouselRefs","onTableSegmentClick","onJourneyComplete","journeyId","JOURNEY_ID_STUDENT","breakpoints","getTheme","isMobile","tooltipTextRenderAs","originalTableRef","useRef","highlightedTableRef","timerRefs","playButtonSound","useCircleSounds","nextCoachmark","setJourney","addCoachmark","endJourney","useJourney","trackAnalytics","useUIContext","handleEndJourney","useCallback","tableDetails","PLATFORM_EVENTS_STUDENT","Action","_a","_b","handleTableSegmentClick","launcherData","tableData","segmentedCardDims","tableCardDims","_c","IndicatorType","jsx","TablesCard","FlexView","Text","Fragment","SHOW_PICK_A_LEVEL_TOOLTIP_AFTER_MS","SHOW_PICK_A_LEVEL_NUDGE_AFTER_MS","startAnimationOnLabelAgain","START_ANIMATING_CLONED_ELEM","goToTableLauncher","TABLE_CARD_INDEX","GO_TO_TABLE_LAUNCHER_DURATION_MS","showNudge","SHOW_CLICK_TABLE_NUDGE_AFTER_MS","animateLabel","startJourney","tablesData","isTutorialOnboardingDone","paginationList","carouselNextBtnRef","tablePaginationRef","_d","labelDims","_e","S.Indicator","_h","LESSON_CARD_INDEX","SHOW_INITIAL_COACHMARK_AFTER_MS","SHOW_INITIAL_TOOLTIP_AFTER_MS","_f","IconButton","CaratRightIcon","GAME_LAUNCHER_ANALYTICS_EVENTS","_g","PUZZLE_CARD_INDEX","tableInfo","useEffect","timer"],"mappings":";;;;;;;;;;;;;;;;;;AA0CO,MAAMA,KAA0B,CAAC;AAAA,EACtC,cAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,mBAAAC;AACF,MAA6B;AAC3B,QAAMC,IAAYC,EAAmB,6BAE/B,EAAE,aAAAC,MAAgBC,MAClB,EAAE,UAAAC,EAAa,IAAAF,GACfG,IAAsBD,IAAW,aAAa,YAE9CE,IAAmBC,EAAsB,IAAI,GAC7CC,IAAsBD,EAAsB,IAAI,GAEhDE,IAAYF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EP;AAAA,IACL,UAAUM;AAAA,IACV,cAAA0C;AAAA,EAAA;AAEJ;"}
@@ -1,22 +1,22 @@
1
- import { jsx as o, jsxs as m, Fragment as f } from "react/jsx-runtime";
2
- import { useMemo as s } from "react";
3
- import T from "../../../ui/arrow-tooltip/arrow-tooltip.js";
1
+ import { jsx as e, jsxs as f, Fragment as T } from "react/jsx-runtime";
2
+ import { useMemo as p } from "react";
3
+ import h from "../../../ui/arrow-tooltip/arrow-tooltip.js";
4
4
  import O from "../../../ui/nudge/nudge.js";
5
5
  import { getTheme as P } from "../../../ui/theme/get-theme.js";
6
6
  import { IndicatorType as d } from "../../use-journey/constants.js";
7
7
  import { CoachmarkBody as $, ClonedElementWrapper as u } from "./coachmark-styled.js";
8
- import { toolTipGetXCoordinates as b } from "./coachmark-utils.js";
9
- const X = ({ coachmark: t }) => {
10
- const i = t.originalElementToHighlightRef.current, { top: r = 0, left: n = 0, height: h = 0, width: I = 0 } = (i == null ? void 0 : i.getBoundingClientRect()) || {}, { zIndex: C } = P(), p = C.JOURNEY_OVERLAY, l = s(() => () => i ? window.getComputedStyle(i).position === "absolute" : !1, [i]), g = s(() => {
11
- const e = t.indicator;
8
+ import { toolTipGetXCoordinates as w } from "./coachmark-utils.js";
9
+ const Y = ({ coachmark: t }) => {
10
+ const i = t.originalElementToHighlightRef.current, { top: r = 0, left: n = 0, height: I = 0, width: b = 0 } = (i == null ? void 0 : i.getBoundingClientRect()) || {}, { zIndex: C, breakpoints: c } = P(), { isMobile: g } = c, s = C.JOURNEY_OVERLAY, l = p(() => () => i ? window.getComputedStyle(i).position === "absolute" : !1, [i]), m = p(() => {
11
+ const o = t.indicator;
12
12
  return {
13
- width: 264,
13
+ width: g ? 246 : 264,
14
14
  // Can be over ridden
15
- tooltipXCoOrdinates: b(e.position) + (e.tooltipXCoOrdinates ?? 0),
15
+ tooltipXCoOrdinates: w(o.position) + (o.tooltipXCoOrdinates ?? 0),
16
16
  // For absolutely positioned elements
17
- zIndex: p + 1,
18
- ...e,
19
- tooltipItem: /* @__PURE__ */ o($, { children: e.tooltipItem }),
17
+ zIndex: s + 1,
18
+ ...o,
19
+ tooltipItem: /* @__PURE__ */ e($, { children: o.tooltipItem }),
20
20
  alwaysVisible: !0,
21
21
  renderAs: "primary",
22
22
  // Deprecate this
@@ -26,19 +26,19 @@ const X = ({ coachmark: t }) => {
26
26
  type: d.TOOLTIP,
27
27
  isAnimated: !0
28
28
  };
29
- }, [p, t.indicator]), y = s(() => {
30
- const e = t.indicator;
29
+ }, [s, t.indicator, g]), y = p(() => {
30
+ const o = t.indicator;
31
31
  return {
32
- ...e,
33
- nudgePointerX: n + (e.nudgePointerX ?? 0),
34
- nudgePointerY: r + (e.nudgePointerY ?? 0)
32
+ ...o,
33
+ nudgePointerX: n + (o.nudgePointerX ?? 0),
34
+ nudgePointerY: r + (o.nudgePointerY ?? 0)
35
35
  };
36
36
  }, [t.indicator, n, r]);
37
- return !i || !t.isActive ? null : t.type === d.TOOLTIP ? l() ? /* @__PURE__ */ m(f, { children: [
37
+ return !i || !t.isActive ? null : t.type === d.TOOLTIP ? l() ? /* @__PURE__ */ f(T, { children: [
38
38
  t.elementToHighlight,
39
- /* @__PURE__ */ o(u, { $position: "absolute", $top: r, $left: n, children: /* @__PURE__ */ o(T, { ...g, children: /* @__PURE__ */ o("div", { style: { height: h, width: I } }) }) })
40
- ] }) : /* @__PURE__ */ o(u, { $position: "absolute", $top: r, $left: n, children: /* @__PURE__ */ o(T, { ...g, children: t.elementToHighlight }) }) : t.type === d.NUDGE ? /* @__PURE__ */ m(f, { children: [
41
- /* @__PURE__ */ o(
39
+ /* @__PURE__ */ e(u, { $position: "absolute", $top: r, $left: n, children: /* @__PURE__ */ e(h, { ...m, children: /* @__PURE__ */ e("div", { style: { height: I, width: b } }) }) })
40
+ ] }) : /* @__PURE__ */ e(u, { $position: "absolute", $top: r, $left: n, children: /* @__PURE__ */ e(h, { ...m, children: t.elementToHighlight }) }) : t.type === d.NUDGE ? /* @__PURE__ */ f(T, { children: [
41
+ /* @__PURE__ */ e(
42
42
  u,
43
43
  {
44
44
  $top: l() ? 0 : r,
@@ -47,10 +47,10 @@ const X = ({ coachmark: t }) => {
47
47
  children: t.elementToHighlight
48
48
  }
49
49
  ),
50
- /* @__PURE__ */ o(O, { zIndex: p + 1, ...y })
50
+ /* @__PURE__ */ e(O, { zIndex: s + 1, ...y })
51
51
  ] }) : null;
52
52
  };
53
53
  export {
54
- X as Coachmark
54
+ Y as Coachmark
55
55
  };
56
56
  //# sourceMappingURL=coachmark.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"coachmark.js","sources":["../../../../../src/features/journey/comps/coachmark/coachmark.tsx"],"sourcesContent":["import type { IArrowTooltipProps } from '../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport type { INudgeProps } from '../../../ui/nudge/nudge-types';\nimport type { ICoachmarkProps } from '../../use-journey/journey-context-types';\n\nimport React, { useMemo } from 'react';\n\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport Nudge from '../../../ui/nudge/nudge';\nimport { getTheme } from '../../../ui/theme/get-theme';\nimport { IndicatorType } from '../../use-journey/constants';\nimport * as S from './coachmark-styled';\nimport { toolTipGetXCoordinates } from './coachmark-utils';\n\nexport const Coachmark: React.FC<{ coachmark: ICoachmarkProps }> = ({ coachmark }) => {\n const targetElement = coachmark.originalElementToHighlightRef.current;\n const { top = 0, left = 0, height = 0, width = 0 } = targetElement?.getBoundingClientRect() || {};\n\n const { zIndex } = getTheme();\n const BLUR_OVERLAY_Z_INDEX = zIndex.JOURNEY_OVERLAY;\n\n const isAbsolute = useMemo(() => {\n return () => {\n if (!targetElement) return false;\n\n return window.getComputedStyle(targetElement).position === 'absolute';\n };\n }, [targetElement]);\n\n const tooltipProps = useMemo(() => {\n const arrowToolTipProps = coachmark.indicator as IArrowTooltipProps;\n\n return {\n width: 264, // Can be over ridden\n tooltipXCoOrdinates:\n toolTipGetXCoordinates(arrowToolTipProps.position) +\n (arrowToolTipProps.tooltipXCoOrdinates ?? 0), // For absolutely positioned elements\n zIndex: BLUR_OVERLAY_Z_INDEX + 1,\n ...arrowToolTipProps,\n tooltipItem: <S.CoachmarkBody>{arrowToolTipProps.tooltipItem}</S.CoachmarkBody>,\n alwaysVisible: true,\n renderAs: 'primary', // Deprecate this\n borderWidth: 1,\n arrowColor: 'WHITE',\n borderColor: 'WHITE',\n type: IndicatorType.TOOLTIP,\n isAnimated: true,\n } as IArrowTooltipProps;\n }, [BLUR_OVERLAY_Z_INDEX, coachmark.indicator]);\n\n const nudgeProps = useMemo(() => {\n const props: INudgeProps = coachmark.indicator as INudgeProps;\n\n return {\n ...props,\n nudgePointerX: left + (props.nudgePointerX ?? 0),\n nudgePointerY: top + (props.nudgePointerY ?? 0),\n };\n }, [coachmark.indicator, left, top]);\n\n if (!targetElement || !coachmark.isActive) {\n return null;\n }\n\n if (coachmark.type === IndicatorType.TOOLTIP) {\n if (isAbsolute()) {\n return (\n <>\n {coachmark.elementToHighlight}\n <S.ClonedElementWrapper $position=\"absolute\" $top={top} $left={left}>\n <ArrowTooltip {...tooltipProps}>\n <div style={{ height, width }} />\n </ArrowTooltip>\n </S.ClonedElementWrapper>\n </>\n );\n }\n\n return (\n <S.ClonedElementWrapper $position=\"absolute\" $top={top} $left={left}>\n <ArrowTooltip {...tooltipProps}>{coachmark.elementToHighlight}</ArrowTooltip>\n </S.ClonedElementWrapper>\n );\n }\n\n if (coachmark.type === IndicatorType.NUDGE) {\n return (\n <>\n <S.ClonedElementWrapper\n $top={isAbsolute() ? 0 : top}\n $left={isAbsolute() ? 0 : left}\n $position={isAbsolute() ? 'relative' : 'absolute'}\n >\n {coachmark.elementToHighlight}\n </S.ClonedElementWrapper>\n <Nudge zIndex={BLUR_OVERLAY_Z_INDEX + 1} {...nudgeProps} />\n </>\n );\n }\n\n return null;\n};\n"],"names":["Coachmark","coachmark","targetElement","top","left","height","width","zIndex","getTheme","BLUR_OVERLAY_Z_INDEX","isAbsolute","useMemo","tooltipProps","arrowToolTipProps","toolTipGetXCoordinates","jsx","S.CoachmarkBody","IndicatorType","nudgeProps","props","jsxs","Fragment","S.ClonedElementWrapper","ArrowTooltip","Nudge"],"mappings":";;;;;;;;AAaO,MAAMA,IAAsD,CAAC,EAAE,WAAAC,QAAgB;AAC9E,QAAAC,IAAgBD,EAAU,8BAA8B,SACxD,EAAE,KAAAE,IAAM,GAAG,MAAAC,IAAO,GAAG,QAAAC,IAAS,GAAG,OAAAC,IAAQ,EAAE,KAAIJ,KAAA,gBAAAA,EAAe,4BAA2B,CAAA,GAEzF,EAAE,QAAAK,MAAWC,KACbC,IAAuBF,EAAO,iBAE9BG,IAAaC,EAAQ,MAClB,MACAT,IAEE,OAAO,iBAAiBA,CAAa,EAAE,aAAa,aAFhC,IAI5B,CAACA,CAAa,CAAC,GAEZU,IAAeD,EAAQ,MAAM;AACjC,UAAME,IAAoBZ,EAAU;AAE7B,WAAA;AAAA,MACL,OAAO;AAAA;AAAA,MACP,qBACEa,EAAuBD,EAAkB,QAAQ,KAChDA,EAAkB,uBAAuB;AAAA;AAAA,MAC5C,QAAQJ,IAAuB;AAAA,MAC/B,GAAGI;AAAA,MACH,aAAc,gBAAAE,EAAAC,GAAA,EAAiB,YAAkB,aAAY;AAAA,MAC7D,eAAe;AAAA,MACf,UAAU;AAAA;AAAA,MACV,aAAa;AAAA,MACb,YAAY;AAAA,MACZ,aAAa;AAAA,MACb,MAAMC,EAAc;AAAA,MACpB,YAAY;AAAA,IAAA;AAAA,EAEb,GAAA,CAACR,GAAsBR,EAAU,SAAS,CAAC,GAExCiB,IAAaP,EAAQ,MAAM;AAC/B,UAAMQ,IAAqBlB,EAAU;AAE9B,WAAA;AAAA,MACL,GAAGkB;AAAA,MACH,eAAef,KAAQe,EAAM,iBAAiB;AAAA,MAC9C,eAAehB,KAAOgB,EAAM,iBAAiB;AAAA,IAAA;AAAA,KAE9C,CAAClB,EAAU,WAAWG,GAAMD,CAAG,CAAC;AAEnC,SAAI,CAACD,KAAiB,CAACD,EAAU,WACxB,OAGLA,EAAU,SAASgB,EAAc,UAC/BP,MAGG,gBAAAU,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAUpB,EAAA;AAAA,IACX,gBAAAc,EAACO,GAAA,EAAuB,WAAU,YAAW,MAAMnB,GAAK,OAAOC,GAC7D,UAAA,gBAAAW,EAACQ,KAAc,GAAGX,GAChB,4BAAC,OAAI,EAAA,OAAO,EAAE,QAAAP,GAAQ,OAAAC,EAAA,GAAS,EAAA,CACjC,EACF,CAAA;AAAA,EACF,EAAA,CAAA,sBAKDgB,GAAA,EAAuB,WAAU,YAAW,MAAMnB,GAAK,OAAOC,GAC7D,4BAACmB,GAAc,EAAA,GAAGX,GAAe,UAAAX,EAAU,oBAAmB,EAChE,CAAA,IAIAA,EAAU,SAASgB,EAAc,QAG/B,gBAAAG,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAAN;AAAA,MAACO;AAAAA,MAAA;AAAA,QACC,MAAMZ,MAAe,IAAIP;AAAA,QACzB,OAAOO,MAAe,IAAIN;AAAA,QAC1B,WAAWM,MAAe,aAAa;AAAA,QAEtC,UAAUT,EAAA;AAAA,MAAA;AAAA,IACb;AAAA,sBACCuB,GAAM,EAAA,QAAQf,IAAuB,GAAI,GAAGS,GAAY;AAAA,EAC3D,EAAA,CAAA,IAIG;AACT;"}
1
+ {"version":3,"file":"coachmark.js","sources":["../../../../../src/features/journey/comps/coachmark/coachmark.tsx"],"sourcesContent":["import type { IArrowTooltipProps } from '../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport type { INudgeProps } from '../../../ui/nudge/nudge-types';\nimport type { ICoachmarkProps } from '../../use-journey/journey-context-types';\n\nimport React, { useMemo } from 'react';\n\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport Nudge from '../../../ui/nudge/nudge';\nimport { getTheme } from '../../../ui/theme/get-theme';\nimport { IndicatorType } from '../../use-journey/constants';\nimport * as S from './coachmark-styled';\nimport { toolTipGetXCoordinates } from './coachmark-utils';\n\nexport const Coachmark: React.FC<{ coachmark: ICoachmarkProps }> = ({ coachmark }) => {\n const targetElement = coachmark.originalElementToHighlightRef.current;\n const { top = 0, left = 0, height = 0, width = 0 } = targetElement?.getBoundingClientRect() || {};\n\n const { zIndex, breakpoints } = getTheme();\n const { isMobile } = breakpoints;\n\n const BLUR_OVERLAY_Z_INDEX = zIndex.JOURNEY_OVERLAY;\n\n const isAbsolute = useMemo(() => {\n return () => {\n if (!targetElement) return false;\n\n return window.getComputedStyle(targetElement).position === 'absolute';\n };\n }, [targetElement]);\n\n const tooltipProps = useMemo(() => {\n const arrowToolTipProps = coachmark.indicator as IArrowTooltipProps;\n\n return {\n width: isMobile ? 246 : 264, // Can be over ridden\n tooltipXCoOrdinates:\n toolTipGetXCoordinates(arrowToolTipProps.position) +\n (arrowToolTipProps.tooltipXCoOrdinates ?? 0), // For absolutely positioned elements\n zIndex: BLUR_OVERLAY_Z_INDEX + 1,\n ...arrowToolTipProps,\n tooltipItem: <S.CoachmarkBody>{arrowToolTipProps.tooltipItem}</S.CoachmarkBody>,\n alwaysVisible: true,\n renderAs: 'primary', // Deprecate this\n borderWidth: 1,\n arrowColor: 'WHITE',\n borderColor: 'WHITE',\n type: IndicatorType.TOOLTIP,\n isAnimated: true,\n } as IArrowTooltipProps;\n }, [BLUR_OVERLAY_Z_INDEX, coachmark.indicator, isMobile]);\n\n const nudgeProps = useMemo(() => {\n const props: INudgeProps = coachmark.indicator as INudgeProps;\n\n return {\n ...props,\n nudgePointerX: left + (props.nudgePointerX ?? 0),\n nudgePointerY: top + (props.nudgePointerY ?? 0),\n };\n }, [coachmark.indicator, left, top]);\n\n if (!targetElement || !coachmark.isActive) {\n return null;\n }\n\n if (coachmark.type === IndicatorType.TOOLTIP) {\n if (isAbsolute()) {\n return (\n <>\n {coachmark.elementToHighlight}\n <S.ClonedElementWrapper $position=\"absolute\" $top={top} $left={left}>\n <ArrowTooltip {...tooltipProps}>\n <div style={{ height, width }} />\n </ArrowTooltip>\n </S.ClonedElementWrapper>\n </>\n );\n }\n\n return (\n <S.ClonedElementWrapper $position=\"absolute\" $top={top} $left={left}>\n <ArrowTooltip {...tooltipProps}>{coachmark.elementToHighlight}</ArrowTooltip>\n </S.ClonedElementWrapper>\n );\n }\n\n if (coachmark.type === IndicatorType.NUDGE) {\n return (\n <>\n <S.ClonedElementWrapper\n $top={isAbsolute() ? 0 : top}\n $left={isAbsolute() ? 0 : left}\n $position={isAbsolute() ? 'relative' : 'absolute'}\n >\n {coachmark.elementToHighlight}\n </S.ClonedElementWrapper>\n <Nudge zIndex={BLUR_OVERLAY_Z_INDEX + 1} {...nudgeProps} />\n </>\n );\n }\n\n return null;\n};\n"],"names":["Coachmark","coachmark","targetElement","top","left","height","width","zIndex","breakpoints","getTheme","isMobile","BLUR_OVERLAY_Z_INDEX","isAbsolute","useMemo","tooltipProps","arrowToolTipProps","toolTipGetXCoordinates","jsx","S.CoachmarkBody","IndicatorType","nudgeProps","props","jsxs","Fragment","S.ClonedElementWrapper","ArrowTooltip","Nudge"],"mappings":";;;;;;;;AAaO,MAAMA,IAAsD,CAAC,EAAE,WAAAC,QAAgB;AAC9E,QAAAC,IAAgBD,EAAU,8BAA8B,SACxD,EAAE,KAAAE,IAAM,GAAG,MAAAC,IAAO,GAAG,QAAAC,IAAS,GAAG,OAAAC,IAAQ,EAAE,KAAIJ,KAAA,gBAAAA,EAAe,4BAA2B,CAAA,GAEzF,EAAE,QAAAK,GAAQ,aAAAC,EAAY,IAAIC,EAAS,GACnC,EAAE,UAAAC,EAAa,IAAAF,GAEfG,IAAuBJ,EAAO,iBAE9BK,IAAaC,EAAQ,MAClB,MACAX,IAEE,OAAO,iBAAiBA,CAAa,EAAE,aAAa,aAFhC,IAI5B,CAACA,CAAa,CAAC,GAEZY,IAAeD,EAAQ,MAAM;AACjC,UAAME,IAAoBd,EAAU;AAE7B,WAAA;AAAA,MACL,OAAOS,IAAW,MAAM;AA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A,MAAA;AAAA,QACC,MAAMZ,MAAe,IAAIT;AAAA,QACzB,OAAOS,MAAe,IAAIR;AAAA,QAC1B,WAAWQ,MAAe,aAAa;AAAA,QAEtC,UAAUX,EAAA;AAAA,MAAA;AAAA,IACb;AAAA,sBACCyB,GAAM,EAAA,QAAQf,IAAuB,GAAI,GAAGS,GAAY;AAAA,EAC3D,EAAA,CAAA,IAIG;AACT;"}
@@ -1,7 +1,11 @@
1
- const t = () => ({
2
- MOBILE: 600
3
- });
1
+ const n = () => {
2
+ const e = window.innerWidth <= 600 ? "MOBILE" : "DESKTOP";
3
+ return {
4
+ isMobile: e === "MOBILE",
5
+ isDesktop: e === "DESKTOP"
6
+ };
7
+ };
4
8
  export {
5
- t as getBreakpointsConfig
9
+ n as getBreakpointsConfig
6
10
  };
7
11
  //# sourceMappingURL=breakpoints.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"breakpoints.js","sources":["../../../../src/features/ui/theme/breakpoints.ts"],"sourcesContent":["export const getBreakpointsConfig = () => {\n return {\n MOBILE: 600,\n };\n};\n"],"names":["getBreakpointsConfig"],"mappings":"AAAO,MAAMA,IAAuB,OAC3B;AAAA,EACL,QAAQ;AAAA;"}
1
+ {"version":3,"file":"breakpoints.js","sources":["../../../../src/features/ui/theme/breakpoints.ts"],"sourcesContent":["export const getBreakpointsConfig = () => {\n const MOBILE_WIDTH = 600;\n const device = window.innerWidth <= MOBILE_WIDTH ? 'MOBILE' : 'DESKTOP';\n\n return {\n isMobile: device === 'MOBILE',\n isDesktop: device === 'DESKTOP',\n };\n};\n"],"names":["getBreakpointsConfig","device"],"mappings":"AAAO,MAAMA,IAAuB,MAAM;AAExC,QAAMC,IAAS,OAAO,cAAc,MAAe,WAAW;AAEvD,SAAA;AAAA,IACL,UAAUA,MAAW;AAAA,IACrB,WAAWA,MAAW;AAAA,EAAA;AAE1B;"}
package/dist/index.d.ts CHANGED
@@ -426,7 +426,8 @@ declare enum GENDER {
426
426
  declare const getArrowTooltipConfig: IGetArrowTooltipConfig;
427
427
 
428
428
  declare const getBreakpointsConfig: () => {
429
- MOBILE: number;
429
+ isMobile: boolean;
430
+ isDesktop: boolean;
430
431
  };
431
432
 
432
433
  declare const getButtonConfig: IGetButtonConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuemath/leap",
3
- "version": "2.9.7-rj-2",
3
+ "version": "2.9.7-rj-3",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"