@cuemath/leap 3.2.17-pzd-0.1 → 3.2.18-mb

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.
Files changed (241) hide show
  1. package/dist/assets/illustrations/illustrations.js +5 -6
  2. package/dist/assets/illustrations/illustrations.js.map +1 -1
  3. package/dist/assets/lottie/lottie.js +1 -6
  4. package/dist/assets/lottie/lottie.js.map +1 -1
  5. package/dist/features/analytics-events/platform-events-student.js +1 -2
  6. package/dist/features/analytics-events/platform-events-student.js.map +1 -1
  7. package/dist/features/analytics-events/platform-events-teacher.js +4 -6
  8. package/dist/features/analytics-events/platform-events-teacher.js.map +1 -1
  9. package/dist/features/analytics-events/whitelist-events.js +8 -10
  10. package/dist/features/analytics-events/whitelist-events.js.map +1 -1
  11. package/dist/features/auth/account-selector/account-selector.js +25 -26
  12. package/dist/features/auth/account-selector/account-selector.js.map +1 -1
  13. package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js +14 -15
  14. package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js.map +1 -1
  15. package/dist/features/auth/comps/user-list/user-item/user-item.js +31 -30
  16. package/dist/features/auth/comps/user-list/user-item/user-item.js.map +1 -1
  17. package/dist/features/auth/comps/user-list/user-list.js +34 -35
  18. package/dist/features/auth/comps/user-list/user-list.js.map +1 -1
  19. package/dist/features/auth/forgot-password/forgot-password-styled.js +15 -14
  20. package/dist/features/auth/forgot-password/forgot-password-styled.js.map +1 -1
  21. package/dist/features/auth/login/identifier-otp-form/identifier-otp-form-styled.js +7 -6
  22. package/dist/features/auth/login/identifier-otp-form/identifier-otp-form-styled.js.map +1 -1
  23. package/dist/features/auth/login/login-styled.js +9 -8
  24. package/dist/features/auth/login/login-styled.js.map +1 -1
  25. package/dist/features/chapters-v2/utils/node-card-utils.js +9 -9
  26. package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -1
  27. package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card-styled.js +4 -4
  28. package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card-styled.js.map +1 -1
  29. package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card.js +85 -85
  30. package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card.js.map +1 -1
  31. package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js +98 -121
  32. package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js.map +1 -1
  33. package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey.js +28 -29
  34. package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey.js.map +1 -1
  35. package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js +42 -43
  36. package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js.map +1 -1
  37. package/dist/features/circle-games/games/tutorial/tutorial.js +35 -43
  38. package/dist/features/circle-games/games/tutorial/tutorial.js.map +1 -1
  39. package/dist/features/circle-games/sign-up/comp/grade-input/grade-input-styled.js +2 -2
  40. package/dist/features/circle-games/sign-up/comp/grade-input/grade-input-styled.js.map +1 -1
  41. package/dist/features/circle-games/sign-up/comp/grade-input/grade-input.js +1 -1
  42. package/dist/features/circle-games/sign-up/comp/grade-input/grade-input.js.map +1 -1
  43. package/dist/features/circle-games/sign-up/comp/username-input/username-input.js +24 -26
  44. package/dist/features/circle-games/sign-up/comp/username-input/username-input.js.map +1 -1
  45. package/dist/features/circle-games/sign-up/constants.js +1 -3
  46. package/dist/features/circle-games/sign-up/constants.js.map +1 -1
  47. package/dist/features/communication/pub-sub/constants.js +4 -7
  48. package/dist/features/communication/pub-sub/constants.js.map +1 -1
  49. package/dist/features/cue-canvas/hooks/use-canvas-sync-broker.js +42 -42
  50. package/dist/features/cue-canvas/hooks/use-canvas-sync-broker.js.map +1 -1
  51. package/dist/features/homework/homework-card-view.js +97 -85
  52. package/dist/features/homework/homework-card-view.js.map +1 -1
  53. package/dist/features/homework/homework-card.js +42 -44
  54. package/dist/features/homework/homework-card.js.map +1 -1
  55. package/dist/features/homework/hw-card-list/hw-card-list-view.js +29 -31
  56. package/dist/features/homework/hw-card-list/hw-card-list-view.js.map +1 -1
  57. package/dist/features/homework/hw-card-list/hw-card-list.js +48 -54
  58. package/dist/features/homework/hw-card-list/hw-card-list.js.map +1 -1
  59. package/dist/features/homework/utils.js +27 -33
  60. package/dist/features/homework/utils.js.map +1 -1
  61. package/dist/features/hooks/use-viewport/use-viewport.js +22 -0
  62. package/dist/features/hooks/use-viewport/use-viewport.js.map +1 -0
  63. package/dist/features/journey/comps/coachmark/coachmark.js +27 -29
  64. package/dist/features/journey/comps/coachmark/coachmark.js.map +1 -1
  65. package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js +11 -17
  66. package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js.map +1 -1
  67. package/dist/features/journey/journey-id/journey-id-student.js +2 -2
  68. package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
  69. package/dist/features/journey/journey-id/journey-id-teacher.js +2 -2
  70. package/dist/features/journey/journey-id/journey-id-teacher.js.map +1 -1
  71. package/dist/features/journey/use-journey/journey-context-provider.js +72 -73
  72. package/dist/features/journey/use-journey/journey-context-provider.js.map +1 -1
  73. package/dist/features/journey/use-journey/journey-styled.js +4 -6
  74. package/dist/features/journey/use-journey/journey-styled.js.map +1 -1
  75. package/dist/features/puzzles/comps/puzzle-card-styled.js +69 -24
  76. package/dist/features/puzzles/comps/puzzle-card-styled.js.map +1 -1
  77. package/dist/features/puzzles/comps/puzzle-card.js +30 -79
  78. package/dist/features/puzzles/comps/puzzle-card.js.map +1 -1
  79. package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js +25 -55
  80. package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js.map +1 -1
  81. package/dist/features/puzzles/puzzle-container/puzzle-container.js +107 -100
  82. package/dist/features/puzzles/puzzle-container/puzzle-container.js.map +1 -1
  83. package/dist/features/puzzles/puzzle-feedback-celebration/puzzle-feedback-celebration.js +1 -1
  84. package/dist/features/puzzles/puzzle-feedback-celebration/puzzle-feedback-celebration.js.map +1 -1
  85. package/dist/features/puzzles/utils/puzzle-pattern.js +13 -28
  86. package/dist/features/puzzles/utils/puzzle-pattern.js.map +1 -1
  87. package/dist/features/stickers/sticker-data.js +234 -0
  88. package/dist/features/stickers/sticker-data.js.map +1 -0
  89. package/dist/features/{ui/sticker-grid/sticker-grid-styles.js → stickers/sticker-selector/sticker-selector-styles.js} +4 -3
  90. package/dist/features/stickers/sticker-selector/sticker-selector-styles.js.map +1 -0
  91. package/dist/features/stickers/sticker-selector/sticker-selector.js +25 -0
  92. package/dist/features/stickers/sticker-selector/sticker-selector.js.map +1 -0
  93. package/dist/features/stickers/sticker-selector/sticker.js +57 -0
  94. package/dist/features/stickers/sticker-selector/sticker.js.map +1 -0
  95. package/dist/features/{ui/stickers/stickers-effects.js → stickers/stickers-effects/effects.js} +6 -6
  96. package/dist/features/stickers/stickers-effects/effects.js.map +1 -0
  97. package/dist/features/{ui/stickers/stickers-styled.js → stickers/stickers-effects/stickers-effects-styled.js} +2 -2
  98. package/dist/features/stickers/stickers-effects/stickers-effects-styled.js.map +1 -0
  99. package/dist/features/stickers/stickers-effects/stickers-effects-utils.js +93 -0
  100. package/dist/features/stickers/stickers-effects/stickers-effects-utils.js.map +1 -0
  101. package/dist/features/stickers/stickers-effects/stickers-effects.js +39 -0
  102. package/dist/features/stickers/stickers-effects/stickers-effects.js.map +1 -0
  103. package/dist/features/ui/arrow-tooltip/arrow-tooltip-styled.js +60 -12
  104. package/dist/features/ui/arrow-tooltip/arrow-tooltip-styled.js.map +1 -1
  105. package/dist/features/ui/arrow-tooltip/arrow-tooltip.js +77 -72
  106. package/dist/features/ui/arrow-tooltip/arrow-tooltip.js.map +1 -1
  107. package/dist/features/ui/error/error.js +27 -65
  108. package/dist/features/ui/error/error.js.map +1 -1
  109. package/dist/features/ui/lottie-animation/lottie-animation.js +29 -25
  110. package/dist/features/ui/lottie-animation/lottie-animation.js.map +1 -1
  111. package/dist/features/ui/modals/modal-styled.js +58 -34
  112. package/dist/features/ui/modals/modal-styled.js.map +1 -1
  113. package/dist/features/ui/modals/modal.js +14 -40
  114. package/dist/features/ui/modals/modal.js.map +1 -1
  115. package/dist/features/ui/nudge/nudge-styled.js +7 -14
  116. package/dist/features/ui/nudge/nudge-styled.js.map +1 -1
  117. package/dist/features/ui/nudge/nudge.js +12 -13
  118. package/dist/features/ui/nudge/nudge.js.map +1 -1
  119. package/dist/features/ui/streak-icon/streak-icon-styled.js +13 -13
  120. package/dist/features/ui/streak-icon/streak-icon-styled.js.map +1 -1
  121. package/dist/features/ui/streak-icon/streak-icon.js +15 -17
  122. package/dist/features/ui/streak-icon/streak-icon.js.map +1 -1
  123. package/dist/features/ui/text/text.js +36 -40
  124. package/dist/features/ui/text/text.js.map +1 -1
  125. package/dist/features/ui/theme/constants.js +2 -4
  126. package/dist/features/ui/theme/constants.js.map +1 -1
  127. package/dist/features/ui/theme/get-device.js +3 -3
  128. package/dist/features/ui/theme/get-device.js.map +1 -1
  129. package/dist/features/worksheet/worksheet/constants.js +13 -12
  130. package/dist/features/worksheet/worksheet/constants.js.map +1 -1
  131. package/dist/features/worksheet/worksheet/worksheet-helpers.js +19 -20
  132. package/dist/features/worksheet/worksheet/worksheet-helpers.js.map +1 -1
  133. package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js +25 -29
  134. package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js.map +1 -1
  135. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js +47 -101
  136. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js.map +1 -1
  137. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +255 -244
  138. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
  139. package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js +207 -242
  140. package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js.map +1 -1
  141. package/dist/features/worksheet/worksheet/worksheet-styled.js +36 -45
  142. package/dist/features/worksheet/worksheet/worksheet-styled.js.map +1 -1
  143. package/dist/features/worksheet/worksheet/worksheet-types.js.map +1 -1
  144. package/dist/features/worksheet/worksheet/worksheet.js +325 -321
  145. package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
  146. package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js +1 -1
  147. package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js.map +1 -1
  148. package/dist/features/worksheet/worksheet-preview/worksheet-preview.js +35 -44
  149. package/dist/features/worksheet/worksheet-preview/worksheet-preview.js.map +1 -1
  150. package/dist/index.d.ts +56 -152
  151. package/dist/index.js +539 -563
  152. package/dist/index.js.map +1 -1
  153. package/dist/static/nudge-tap.5cb30093.json +1057 -0
  154. package/dist/static/puzzle-pattern-blue.f4bea1ee.svg +1 -0
  155. package/dist/static/puzzle-pattern-green.c9f84bbc.svg +1 -0
  156. package/dist/static/puzzle-pattern-orange.3da09665.svg +1 -0
  157. package/dist/static/puzzle-pattern-purple.5fb5a319.svg +1 -0
  158. package/dist/static/puzzle-pattern-yellow.aadbf457.svg +1 -0
  159. package/package.json +1 -1
  160. package/dist/assets/line-icons/icons/cue-board-filled.js +0 -33
  161. package/dist/assets/line-icons/icons/cue-board-filled.js.map +0 -1
  162. package/dist/assets/line-icons/icons/cue-board.js +0 -23
  163. package/dist/assets/line-icons/icons/cue-board.js.map +0 -1
  164. package/dist/assets/line-icons/icons/hint-fill.js +0 -35
  165. package/dist/assets/line-icons/icons/hint-fill.js.map +0 -1
  166. package/dist/assets/line-icons/icons/screen-grab-filled.js +0 -35
  167. package/dist/assets/line-icons/icons/screen-grab-filled.js.map +0 -1
  168. package/dist/assets/line-icons/icons/screen-grab.js +0 -23
  169. package/dist/assets/line-icons/icons/screen-grab.js.map +0 -1
  170. package/dist/assets/line-icons/icons/sticker-filled.js +0 -64
  171. package/dist/assets/line-icons/icons/sticker-filled.js.map +0 -1
  172. package/dist/assets/line-icons/icons/sticker.js +0 -46
  173. package/dist/assets/line-icons/icons/sticker.js.map +0 -1
  174. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js +0 -72
  175. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js.map +0 -1
  176. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js +0 -59
  177. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js.map +0 -1
  178. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js +0 -63
  179. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js.map +0 -1
  180. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js +0 -67
  181. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js.map +0 -1
  182. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js +0 -70
  183. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js.map +0 -1
  184. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js +0 -59
  185. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js.map +0 -1
  186. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js +0 -59
  187. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js.map +0 -1
  188. package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js +0 -70
  189. package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js.map +0 -1
  190. package/dist/features/puzzles/api/puzzle-dashboard.js +0 -10
  191. package/dist/features/puzzles/api/puzzle-dashboard.js.map +0 -1
  192. package/dist/features/puzzles/app/puzzle-app-styled.js +0 -85
  193. package/dist/features/puzzles/app/puzzle-app-styled.js.map +0 -1
  194. package/dist/features/puzzles/app/puzzle-app-view.js +0 -120
  195. package/dist/features/puzzles/app/puzzle-app-view.js.map +0 -1
  196. package/dist/features/puzzles/app/puzzle-app.js +0 -62
  197. package/dist/features/puzzles/app/puzzle-app.js.map +0 -1
  198. package/dist/features/puzzles/constants/puzzle-container.js +0 -8
  199. package/dist/features/puzzles/constants/puzzle-container.js.map +0 -1
  200. package/dist/features/puzzles/puzzle-analytics-events.js +0 -11
  201. package/dist/features/puzzles/puzzle-analytics-events.js.map +0 -1
  202. package/dist/features/puzzles/puzzle-container/puzzle-container-view.js +0 -55
  203. package/dist/features/puzzles/puzzle-container/puzzle-container-view.js.map +0 -1
  204. package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js +0 -37
  205. package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js.map +0 -1
  206. package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js +0 -110
  207. package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js.map +0 -1
  208. package/dist/features/ui/arrow-tooltip/arrow-tooltip-constants.js +0 -6
  209. package/dist/features/ui/arrow-tooltip/arrow-tooltip-constants.js.map +0 -1
  210. package/dist/features/ui/arrow-tooltip/comps/tooltip-body-styled.js +0 -63
  211. package/dist/features/ui/arrow-tooltip/comps/tooltip-body-styled.js.map +0 -1
  212. package/dist/features/ui/arrow-tooltip/comps/tooltip-body.js +0 -21
  213. package/dist/features/ui/arrow-tooltip/comps/tooltip-body.js.map +0 -1
  214. package/dist/features/ui/sticker-grid/sticker-grid-styles.js.map +0 -1
  215. package/dist/features/ui/sticker-grid/sticker-grid.js +0 -24
  216. package/dist/features/ui/sticker-grid/sticker-grid.js.map +0 -1
  217. package/dist/features/ui/sticker-grid/sticker.js +0 -57
  218. package/dist/features/ui/sticker-grid/sticker.js.map +0 -1
  219. package/dist/features/ui/stickers/constants.js +0 -6
  220. package/dist/features/ui/stickers/constants.js.map +0 -1
  221. package/dist/features/ui/stickers/stickers-effects.js.map +0 -1
  222. package/dist/features/ui/stickers/stickers-styled.js.map +0 -1
  223. package/dist/features/ui/stickers/stickers-utils.js +0 -91
  224. package/dist/features/ui/stickers/stickers-utils.js.map +0 -1
  225. package/dist/features/ui/stickers/stickers.js +0 -40
  226. package/dist/features/ui/stickers/stickers.js.map +0 -1
  227. package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js +0 -28
  228. package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js.map +0 -1
  229. package/dist/static/nudge-tap.0591aef4.json +0 -1
  230. package/dist/static/puzzle-blue-lottie.7017e2e8.json +0 -1
  231. package/dist/static/puzzle-blue-lottie.bf64ebc5.json +0 -12760
  232. package/dist/static/puzzle-dashboard-banner.b7956519.svg +0 -1
  233. package/dist/static/puzzle-green-lottie.1da90698.json +0 -1
  234. package/dist/static/puzzle-orange-lottie.cfcf3724.json +0 -1
  235. package/dist/static/puzzle-pattern-blue.abff0164.svg +0 -1
  236. package/dist/static/puzzle-pattern-green.b8ba1840.svg +0 -1
  237. package/dist/static/puzzle-pattern-orange.3f5a17ff.svg +0 -1
  238. package/dist/static/puzzle-pattern-purple.14b09759.svg +0 -1
  239. package/dist/static/puzzle-pattern-yellow.50917fab.svg +0 -1
  240. package/dist/static/puzzle-purple-lottie.e70de110.json +0 -9860
  241. package/dist/static/puzzle-yellow-lottie.275b5cf4.json +0 -1
@@ -1,84 +1,35 @@
1
- import { jsx as i, jsxs as f } from "react/jsx-runtime";
2
- import { memo as P, useRef as _, useMemo as y, useCallback as s } from "react";
3
- import S from "../../ui/buttons/clickable/clickable.js";
4
- import b from "../../ui/image/image.js";
5
- import A from "../../ui/layout/flex-view.js";
6
- import Z from "../../ui/lottie-animation/lottie-animation.js";
7
- import { PUZZLE_ANALYTICS_EVENTS as k } from "../puzzle-analytics-events.js";
8
- import { getPuzzleStickerLottie as x } from "../utils/puzzle-feedback-celebration.js";
9
- import { PuzzleWrapper as M, Title as j, StickerWrapper as v } from "./puzzle-card-styled.js";
10
- const R = {
11
- autoplay: !1,
12
- loop: !0,
13
- renderer: "canvas"
14
- }, G = P(
1
+ import { jsx as h } from "react/jsx-runtime";
2
+ import { memo as p } from "react";
3
+ import { PuzzleWrapper as s } from "./puzzle-card-styled.js";
4
+ const c = p(
15
5
  ({
16
- imageHue: c,
17
- imageUrl: u,
18
- title: h,
19
- height: $ = "100%",
20
- width: z = "100%",
21
- onCardClick: n,
22
- userNodeId: o,
23
- rewards: r,
24
- studentId: a,
25
- nodeId: m
26
- }) => {
27
- const { sticker: p } = (r == null ? void 0 : r[0]) || {}, l = _(null), L = y(
28
- () => ({
29
- node_id: m,
30
- student_id: a,
31
- node_type: "PUZZLE_CARD"
32
- }),
33
- [m, a]
34
- ), e = p ? x(p) : void 0, g = s(() => {
35
- o && (n == null || n(o));
36
- }, [n, o]), E = s(() => {
37
- var t;
38
- e && ((t = l.current) == null || t.play());
39
- }, [e]), d = s(() => {
40
- var t;
41
- e && ((t = l.current) == null || t.stop());
42
- }, [e]);
43
- return /* @__PURE__ */ i(
44
- S,
45
- {
46
- label: "",
47
- analyticsLabel: k.PUZZLE_VIEWED,
48
- analyticsProps: L,
49
- onClick: g,
50
- children: /* @__PURE__ */ f(
51
- M,
52
- {
53
- $width: z,
54
- $height: $,
55
- $justifyContent: "center",
56
- $alignItems: "center",
57
- $imageHue: c,
58
- $background: `${c}_2`,
59
- onMouseEnter: E,
60
- onMouseLeave: d,
61
- children: [
62
- /* @__PURE__ */ f(A, { $justifyContent: "center", $alignItems: "center", $flexGap: 12, children: [
63
- /* @__PURE__ */ i(b, { src: u ?? "", width: 68, height: 68, withLoader: !1, alt: "Puzzle" }),
64
- /* @__PURE__ */ i(j, { $renderAs: "ab3", $align: "center", $width: "80%", children: h })
65
- ] }),
66
- e && /* @__PURE__ */ i(v, { $widthX: 2.5, $heightX: 2.5, children: /* @__PURE__ */ i(
67
- Z,
68
- {
69
- src: e,
70
- ref: l,
71
- settings: R
72
- }
73
- ) })
74
- ]
75
- }
76
- )
77
- }
78
- );
79
- }
6
+ children: e,
7
+ imageHue: t,
8
+ onAnimationEnd: r,
9
+ animationPhase: o,
10
+ width: i,
11
+ widthX: m,
12
+ height: n,
13
+ heightX: $,
14
+ backgroundColor: a
15
+ }) => /* @__PURE__ */ h(
16
+ s,
17
+ {
18
+ $animationPhase: o,
19
+ onAnimationEnd: r,
20
+ $width: i,
21
+ $height: n,
22
+ $widthX: m,
23
+ $heightX: $,
24
+ $alignItems: "center",
25
+ $justifyContent: "center",
26
+ $imageHue: t,
27
+ $background: a ?? `${t}_6`,
28
+ children: e
29
+ }
30
+ )
80
31
  );
81
32
  export {
82
- G as default
33
+ c as default
83
34
  };
84
35
  //# sourceMappingURL=puzzle-card.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"puzzle-card.js","sources":["../../../../src/features/puzzles/comps/puzzle-card.tsx"],"sourcesContent":["import type { ILottieAnimationRef } from '../../ui/lottie-animation/types';\nimport type { IPuzzleCardProps } from './puzzle-card-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useMemo, useRef } from 'react';\n\nimport Clickable from '../../ui/buttons/clickable/clickable';\nimport Image from '../../ui/image/image';\nimport FlexView from '../../ui/layout/flex-view';\nimport LottieAnimation from '../../ui/lottie-animation/lottie-animation';\nimport { PUZZLE_ANALYTICS_EVENTS } from '../puzzle-analytics-events';\nimport { getPuzzleStickerLottie } from '../utils/puzzle-feedback-celebration';\nimport * as Styled from './puzzle-card-styled';\n\nconst puzzleStickerLottieSettings = {\n autoplay: false,\n loop: true,\n renderer: 'canvas',\n};\n\nconst PuzzleCard: FC<IPuzzleCardProps> = memo(\n ({\n imageHue,\n imageUrl,\n title,\n height = '100%',\n width = '100%',\n onCardClick,\n userNodeId,\n rewards,\n studentId,\n nodeId,\n }) => {\n const { sticker } = rewards?.[0] || {};\n\n const lottieAnimationRef = useRef<ILottieAnimationRef | null>(null);\n\n const analyticsProps = useMemo(\n () => ({\n node_id: nodeId,\n student_id: studentId,\n node_type: 'PUZZLE_CARD',\n }),\n [nodeId, studentId],\n );\n\n const puzzleStickerLottie = sticker ? getPuzzleStickerLottie(sticker) : undefined;\n\n const handleCardClick = useCallback(() => {\n if (userNodeId) {\n onCardClick?.(userNodeId);\n }\n }, [onCardClick, userNodeId]);\n\n const handleOnMouseEnter = useCallback(() => {\n if (puzzleStickerLottie) lottieAnimationRef.current?.play();\n }, [puzzleStickerLottie]);\n\n const handleOnMouseLeave = useCallback(() => {\n if (puzzleStickerLottie) lottieAnimationRef.current?.stop();\n }, [puzzleStickerLottie]);\n\n return (\n <Clickable\n label=\"\"\n analyticsLabel={PUZZLE_ANALYTICS_EVENTS.PUZZLE_VIEWED}\n analyticsProps={analyticsProps}\n onClick={handleCardClick}\n >\n <Styled.PuzzleWrapper\n $width={width}\n $height={height}\n $justifyContent=\"center\"\n $alignItems=\"center\"\n $imageHue={imageHue}\n $background={`${imageHue}_2`}\n onMouseEnter={handleOnMouseEnter}\n onMouseLeave={handleOnMouseLeave}\n >\n <FlexView $justifyContent=\"center\" $alignItems=\"center\" $flexGap={12}>\n <Image src={imageUrl ?? ''} width={68} height={68} withLoader={false} alt=\"Puzzle\" />\n\n <Styled.Title $renderAs=\"ab3\" $align=\"center\" $width=\"80%\">\n {title}\n </Styled.Title>\n </FlexView>\n\n {puzzleStickerLottie && (\n <Styled.StickerWrapper $widthX={2.5} $heightX={2.5}>\n <LottieAnimation\n src={puzzleStickerLottie}\n ref={lottieAnimationRef}\n settings={puzzleStickerLottieSettings}\n />\n </Styled.StickerWrapper>\n )}\n </Styled.PuzzleWrapper>\n </Clickable>\n );\n },\n);\n\nexport default PuzzleCard;\n"],"names":["puzzleStickerLottieSettings","PuzzleCard","memo","imageHue","imageUrl","title","height","width","onCardClick","userNodeId","rewards","studentId","nodeId","sticker","lottieAnimationRef","useRef","analyticsProps","useMemo","puzzleStickerLottie","getPuzzleStickerLottie","handleCardClick","useCallback","handleOnMouseEnter","_a","handleOnMouseLeave","jsx","Clickable","PUZZLE_ANALYTICS_EVENTS","jsxs","Styled.PuzzleWrapper","FlexView","Image","Styled.Title","Styled.StickerWrapper","LottieAnimation"],"mappings":";;;;;;;;;AAcA,MAAMA,IAA8B;AAAA,EAClC,UAAU;AAAA,EACV,MAAM;AAAA,EACN,UAAU;AACZ,GAEMC,IAAmCC;AAAA,EACvC,CAAC;AAAA,IACC,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC,IAAS;AAAA,IACT,OAAAC,IAAQ;AAAA,IACR,aAAAC;AAAA,IACA,YAAAC;AAAA,IACA,SAAAC;AAAA,IACA,WAAAC;AAAA,IACA,QAAAC;AAAA,EAAA,MACI;AACJ,UAAM,EAAE,SAAAC,EAAQ,KAAIH,KAAA,gBAAAA,EAAU,OAAM,CAAA,GAE9BI,IAAqBC,EAAmC,IAAI,GAE5DC,IAAiBC;AAAA,MACrB,OAAO;AAAA,QACL,SAASL;AAAA,QACT,YAAYD;AAAA,QACZ,WAAW;AAAA,MAAA;AAAA,MAEb,CAACC,GAAQD,CAAS;AAAA,IAAA,GAGdO,IAAsBL,IAAUM,EAAuBN,CAAO,IAAI,QAElEO,IAAkBC,EAAY,MAAM;AACxC,MAAIZ,MACFD,KAAA,QAAAA,EAAcC;AAAA,IAChB,GACC,CAACD,GAAaC,CAAU,CAAC,GAEtBa,IAAqBD,EAAY,MAAM;;AACvC,MAAAH,OAAwCK,IAAAT,EAAA,YAAA,QAAAS,EAAS;AAAA,IAAK,GACzD,CAACL,CAAmB,CAAC,GAElBM,IAAqBH,EAAY,MAAM;;AACvC,MAAAH,OAAwCK,IAAAT,EAAA,YAAA,QAAAS,EAAS;AAAA,IAAK,GACzD,CAACL,CAAmB,CAAC;AAGtB,WAAA,gBAAAO;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,OAAM;AAAA,QACN,gBAAgBC,EAAwB;AAAA,QACxC,gBAAAX;AAAA,QACA,SAASI;AAAA,QAET,UAAA,gBAAAQ;AAAA,UAACC;AAAAA,UAAA;AAAA,YACC,QAAQtB;AAAA,YACR,SAASD;AAAA,YACT,iBAAgB;AAAA,YAChB,aAAY;AAAA,YACZ,WAAWH;AAAA,YACX,aAAa,GAAGA,CAAQ;AAAA,YACxB,cAAcmB;AAAA,YACd,cAAcE;AAAA,YAEd,UAAA;AAAA,cAAA,gBAAAI,EAACE,KAAS,iBAAgB,UAAS,aAAY,UAAS,UAAU,IAChE,UAAA;AAAA,gBAAC,gBAAAL,EAAAM,GAAA,EAAM,KAAK3B,KAAY,IAAI,OAAO,IAAI,QAAQ,IAAI,YAAY,IAAO,KAAI,SAAS,CAAA;AAAA,gBAEnF,gBAAAqB,EAACO,GAAA,EAAa,WAAU,OAAM,QAAO,UAAS,QAAO,OAClD,UACH3B,EAAA,CAAA;AAAA,cAAA,GACF;AAAA,cAECa,uBACEe,GAAA,EAAsB,SAAS,KAAK,UAAU,KAC7C,UAAA,gBAAAR;AAAA,gBAACS;AAAA,gBAAA;AAAA,kBACC,KAAKhB;AAAA,kBACL,KAAKJ;AAAA,kBACL,UAAUd;AAAA,gBAAA;AAAA,cAAA,GAEd;AAAA,YAAA;AAAA,UAAA;AAAA,QAEJ;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;"}
1
+ {"version":3,"file":"puzzle-card.js","sources":["../../../../src/features/puzzles/comps/puzzle-card.tsx"],"sourcesContent":["import type { IPuzzleCardProps } from './puzzle-card-types';\nimport type { FC } from 'react';\n\nimport { memo } from 'react';\n\nimport * as Styled from './puzzle-card-styled';\n\nconst PuzzleCard: FC<IPuzzleCardProps> = memo(\n ({\n children,\n imageHue,\n onAnimationEnd,\n animationPhase,\n width,\n widthX,\n height,\n heightX,\n backgroundColor,\n }) => {\n return (\n <Styled.PuzzleWrapper\n $animationPhase={animationPhase}\n onAnimationEnd={onAnimationEnd}\n $width={width}\n $height={height}\n $widthX={widthX}\n $heightX={heightX}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $imageHue={imageHue}\n $background={backgroundColor ?? `${imageHue}_6`}\n >\n {children}\n </Styled.PuzzleWrapper>\n );\n },\n);\n\nexport default PuzzleCard;\n"],"names":["PuzzleCard","memo","children","imageHue","onAnimationEnd","animationPhase","width","widthX","height","heightX","backgroundColor","jsx","Styled.PuzzleWrapper"],"mappings":";;;AAOA,MAAMA,IAAmCC;AAAA,EACvC,CAAC;AAAA,IACC,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,QAAAC;AAAA,IACA,SAAAC;AAAA,IACA,iBAAAC;AAAA,EAAA,MAGE,gBAAAC;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,iBAAiBP;AAAA,MACjB,gBAAAD;AAAA,MACA,QAAQE;AAAA,MACR,SAASE;AAAA,MACT,SAASD;AAAA,MACT,UAAUE;AAAA,MACV,aAAY;AAAA,MACZ,iBAAgB;AAAA,MAChB,WAAWN;AAAA,MACX,aAAaO,KAAmB,GAAGP,CAAQ;AAAA,MAE1C,UAAAD;AAAA,IAAA;AAAA,EAAA;AAIT;"}
@@ -1,77 +1,47 @@
1
- import e from "styled-components";
2
- import r from "../../ui/layout/flex-view.js";
3
- import { getPuzzleCardPattern as s } from "../utils/puzzle-pattern.js";
4
- const c = e(r)(({ theme: t, $assigned: o }) => {
5
- const { colors: i, layout: n } = t;
6
- return `
7
- cursor: pointer;
8
- width: ${n.gutter * 15.9375}px;
9
- height: ${n.gutter * 19.125}px;
10
- position: relative;
11
- left: ${o ? "0" : "50px"};
12
- top: ${o ? "0" : "50px"};
1
+ import o from "styled-components";
2
+ import t from "../../ui/layout/flex-view.js";
3
+ const p = o(t)`
4
+ cursor: pointer;
13
5
 
14
- &:hover {
15
- outline: 2px solid ${i.BLACK_1};
16
- }
17
- `;
18
- }), x = e(r)(({ theme: t, $assigned: o, $assigning: i }) => {
19
- const { colors: n, layout: p } = t;
6
+ &:hover {
7
+ outline: 2px solid ${({ theme: e }) => e.colors.BLACK_1};
8
+ }
9
+ `, l = o(t)(({ theme: e, $disabled: n }) => {
10
+ const { colors: r } = e;
20
11
  return `
21
- cursor: pointer;
22
- width: ${p.gutter * 15.9375}px;
23
12
  position: absolute;
24
- left: ${o ? "0" : "50px"};
25
- bottom: ${o ? "-50px" : "11px"};
13
+ bottom: -48px;
14
+ cursor: pointer;
15
+ z-index: -1;
26
16
 
27
- ${(o || i) && `
28
- background: ${n.WHITE_4};
29
- border: 2px solid ${n.WHITE_5};
17
+ ${n && `
18
+ background: ${r.WHITE_4};
19
+ border: 2px solid ${r.WHITE_5};
30
20
  border-top: 0;
31
21
  pointer-events: none;
32
22
  `}
33
23
  `;
34
- });
35
- e(r)`
24
+ }), c = o(t)`
36
25
  position: relative;
37
26
  top: -8px;
38
27
  height: 100%;
39
28
  width: 100%;
40
- `;
41
- e(r)`
29
+ `, u = o(t)`
42
30
  border-radius: 50%;
43
- `;
44
- const d = e(r)`
31
+ `, a = o(t)`
45
32
  position: relative;
46
33
  transition: height 0.3s ease-out;
47
- `, g = e(r)`
34
+ `, d = o(t)`
48
35
  position: absolute;
49
36
  top: 0;
50
37
  right: 0;
51
- `, h = e(r)(({ $visible: t, theme: o }) => {
52
- const { layout: i } = o;
53
- return `
54
- width: ${i.gutter * 22.1875}px;
55
- height: ${i.gutter * 26}px;
56
- left: 0;
57
- opacity: ${t ? 1 : 0};
58
- pointer-events: ${t ? "auto" : "none"};
59
- transition: opacity 0.2s ease-out;
60
- `;
61
- }), $ = e(r)`
62
- position: relative;
63
-
64
- box-shadow: inset 0px 0px 0px 4px ${({ theme: t, $imageHue: o }) => t.colors[`${o}_4`]};
65
-
66
- background-image: ${({ $imageHue: t }) => `url(${s(t)})`};
67
- background-size: cover;
68
38
  `;
69
39
  export {
70
- g as AssignedTag,
71
- $ as PuzzleAssignedWrapper,
72
- x as PuzzleButton,
73
- d as PuzzleContainer,
74
- c as PuzzleContent,
75
- h as PuzzleContentWrapper
40
+ d as AssignedTag,
41
+ u as CheckMarkIcon,
42
+ l as PuzzleButton,
43
+ a as PuzzleContainer,
44
+ p as PuzzleContent,
45
+ c as PuzzleText
76
46
  };
77
47
  //# sourceMappingURL=puzzle-container-styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"puzzle-container-styled.js","sources":["../../../../src/features/puzzles/puzzle-container/puzzle-container-styled.tsx"],"sourcesContent":["import type { THueNames } from '../../ui/types';\n\nimport styled from 'styled-components';\n\nimport FlexView from '../../ui/layout/flex-view';\nimport { getPuzzleCardPattern } from '../utils/puzzle-pattern';\n\ninterface IPuzzleProps {\n $assigned?: boolean;\n $assigning?: boolean;\n}\n\nconst PuzzleContent = styled(FlexView)<IPuzzleProps>(({ theme, $assigned }) => {\n const { colors, layout } = theme;\n\n return `\n cursor: pointer;\n width: ${layout.gutter * 15.9375}px;\n height: ${layout.gutter * 19.125}px;\n position: relative;\n left: ${$assigned ? '0' : '50px'};\n top: ${$assigned ? '0' : '50px'};\n\n &:hover {\n outline: 2px solid ${colors.BLACK_1};\n }\n `;\n});\n\nconst PuzzleButton = styled(FlexView)<IPuzzleProps>(({ theme, $assigned, $assigning }) => {\n const { colors, layout } = theme;\n\n return `\n cursor: pointer;\n width: ${layout.gutter * 15.9375}px;\n position: absolute;\n left: ${$assigned ? '0' : '50px'};\n bottom: ${$assigned ? '-50px' : '11px'};\n \n ${\n ($assigned || $assigning) &&\n `\n background: ${colors.WHITE_4};\n border: 2px solid ${colors.WHITE_5};\n border-top: 0;\n pointer-events: none;\n `\n }\n `;\n});\n\nconst PuzzleText = styled(FlexView)`\n position: relative;\n top: -8px;\n height: 100%;\n width: 100%;\n`;\n\nconst CheckMarkIcon = styled(FlexView)`\n border-radius: 50%;\n`;\n\nconst PuzzleContainer = styled(FlexView)`\n position: relative;\n transition: height 0.3s ease-out;\n`;\n\nconst AssignedTag = styled(FlexView)`\n position: absolute;\n top: 0;\n right: 0;\n`;\n\ninterface IPuzzleContentWrapper {\n $visible?: boolean;\n}\n\nconst PuzzleContentWrapper = styled(FlexView)<IPuzzleContentWrapper>(({ $visible, theme }) => {\n const { layout } = theme;\n\n return `\n width: ${layout.gutter * 22.1875}px;\n height: ${layout.gutter * 26}px;\n left: 0;\n opacity: ${$visible ? 1 : 0};\n pointer-events: ${$visible ? 'auto' : 'none'};\n transition: opacity 0.2s ease-out;\n `;\n});\n\nconst PuzzleAssignedWrapper = styled(FlexView)<{ $imageHue: THueNames }>`\n position: relative;\n\n box-shadow: inset 0px 0px 0px 4px ${({ theme, $imageHue }) => theme.colors[`${$imageHue}_4`]};\n\n background-image: ${({ $imageHue }) => `url(${getPuzzleCardPattern($imageHue)})`};\n background-size: cover;\n`;\n\nexport {\n PuzzleContainer,\n PuzzleContentWrapper,\n PuzzleContent,\n PuzzleButton,\n PuzzleText,\n CheckMarkIcon,\n AssignedTag,\n PuzzleAssignedWrapper,\n};\n"],"names":["PuzzleContent","styled","FlexView","theme","$assigned","colors","layout","PuzzleButton","$assigning","PuzzleContainer","AssignedTag","PuzzleContentWrapper","$visible","PuzzleAssignedWrapper","$imageHue","getPuzzleCardPattern"],"mappings":";;;AAYM,MAAAA,IAAgBC,EAAOC,CAAQ,EAAgB,CAAC,EAAE,OAAAC,GAAO,WAAAC,QAAgB;AACvE,QAAA,EAAE,QAAAC,GAAQ,QAAAC,EAAW,IAAAH;AAEpB,SAAA;AAAA;AAAA,aAEIG,EAAO,SAAS,OAAO;AAAA,cACtBA,EAAO,SAAS,MAAM;AAAA;AAAA,YAExBF,IAAY,MAAM,MAAM;AAAA,WACzBA,IAAY,MAAM,MAAM;AAAA;AAAA;AAAA,2BAGRC,EAAO,OAAO;AAAA;AAAA;AAGzC,CAAC,GAEKE,IAAeN,EAAOC,CAAQ,EAAgB,CAAC,EAAE,OAAAC,GAAO,WAAAC,GAAW,YAAAI,QAAiB;AAClF,QAAA,EAAE,QAAAH,GAAQ,QAAAC,EAAW,IAAAH;AAEpB,SAAA;AAAA;AAAA,aAEIG,EAAO,SAAS,OAAO;AAAA;AAAA,YAExBF,IAAY,MAAM,MAAM;AAAA,cACtBA,IAAY,UAAU,MAAM;AAAA;AAAA,OAGnCA,KAAaI,MACd;AAAA,oBACcH,EAAO,OAAO;AAAA,0BACRA,EAAO,OAAO;AAAA;AAAA;AAAA,KAIpC;AAAA;AAEJ,CAAC;AAEkBJ,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAOZD,EAAOC,CAAQ;AAAA;AAAA;AAI/B,MAAAO,IAAkBR,EAAOC,CAAQ;AAAA;AAAA;AAAA,GAKjCQ,IAAcT,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA,GAU7BS,IAAuBV,EAAOC,CAAQ,EAAyB,CAAC,EAAE,UAAAU,GAAU,OAAAT,QAAY;AACtF,QAAA,EAAE,QAAAG,EAAW,IAAAH;AAEZ,SAAA;AAAA,aACIG,EAAO,SAAS,OAAO;AAAA,cACtBA,EAAO,SAAS,EAAE;AAAA;AAAA,eAEjBM,IAAW,IAAI,CAAC;AAAA,sBACTA,IAAW,SAAS,MAAM;AAAA;AAAA;AAGhD,CAAC,GAEKC,IAAwBZ,EAAOC,CAAQ;AAAA;AAAA;AAAA,sCAGP,CAAC,EAAE,OAAAC,GAAO,WAAAW,QAAgBX,EAAM,OAAO,GAAGW,CAAS,IAAI,CAAC;AAAA;AAAA,sBAExE,CAAC,EAAE,WAAAA,EAAU,MAAM,OAAOC,EAAqBD,CAAS,CAAC,GAAG;AAAA;AAAA;"}
1
+ {"version":3,"file":"puzzle-container-styled.js","sources":["../../../../src/features/puzzles/puzzle-container/puzzle-container-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../ui/layout/flex-view';\n\nconst PuzzleContent = styled(FlexView)`\n cursor: pointer;\n\n &:hover {\n outline: 2px solid ${({ theme }) => theme.colors.BLACK_1};\n }\n`;\n\ninterface IPuzzleButton {\n $disabled?: boolean;\n}\n\nconst PuzzleButton = styled(FlexView)<IPuzzleButton>(({ theme, $disabled }) => {\n const { colors } = theme;\n\n return `\n position: absolute;\n bottom: -48px;\n cursor: pointer;\n z-index: -1;\n \n ${\n $disabled &&\n `\n background: ${colors.WHITE_4};\n border: 2px solid ${colors.WHITE_5};\n border-top: 0;\n pointer-events: none;\n `\n }\n `;\n});\n\nconst PuzzleText = styled(FlexView)`\n position: relative;\n top: -8px;\n height: 100%;\n width: 100%;\n`;\n\nconst CheckMarkIcon = styled(FlexView)`\n border-radius: 50%;\n`;\n\nconst PuzzleContainer = styled(FlexView)`\n position: relative;\n transition: height 0.3s ease-out;\n`;\n\nconst AssignedTag = styled(FlexView)`\n position: absolute;\n top: 0;\n right: 0;\n`;\n\nexport { PuzzleContainer, PuzzleContent, PuzzleButton, PuzzleText, CheckMarkIcon, AssignedTag };\n"],"names":["PuzzleContent","styled","FlexView","theme","PuzzleButton","$disabled","colors","PuzzleText","CheckMarkIcon","PuzzleContainer","AssignedTag"],"mappings":";;AAIM,MAAAA,IAAgBC,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA,yBAIZ,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA,GAQtDC,IAAeH,EAAOC,CAAQ,EAAiB,CAAC,EAAE,OAAAC,GAAO,WAAAE,QAAgB;AACvE,QAAA,EAAE,QAAAC,EAAW,IAAAH;AAEZ,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAOHE,KACA;AAAA,oBACcC,EAAO,OAAO;AAAA,0BACRA,EAAO,OAAO;AAAA;AAAA;AAAA,KAIpC;AAAA;AAEJ,CAAC,GAEKC,IAAaN,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,GAO5BM,IAAgBP,EAAOC,CAAQ;AAAA;AAAA,GAI/BO,IAAkBR,EAAOC,CAAQ;AAAA;AAAA;AAAA,GAKjCQ,IAAcT,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA;"}
@@ -1,120 +1,127 @@
1
- import { jsx as n, jsxs as T } from "react/jsx-runtime";
2
- import { memo as Z, useState as j, useRef as k, useMemo as u, useEffect as O, useCallback as m } from "react";
3
- import U from "../../ui/layout/flex-view.js";
4
- import v from "../../ui/lottie-animation/lottie-animation.js";
5
- import { usePostPuzzleToAssign as y } from "../api/puzzle-assign.js";
6
- import { PUZZLE_ASSIGN_ANIMATION as c } from "../constants/puzzle-container.js";
7
- import { getPuzzleCardLottie as D } from "../utils/puzzle-pattern.js";
8
- import { PuzzleContainer as E, PuzzleAssignedWrapper as G, PuzzleContentWrapper as M } from "./puzzle-container-styled.js";
9
- import S from "./puzzle-container-view.js";
10
- const W = {
11
- loop: !1,
12
- renderer: "svg",
13
- autoPlay: !1
14
- }, X = Z(
1
+ import { jsx as i, jsxs as l, Fragment as w } from "react/jsx-runtime";
2
+ import { memo as X, useState as z, useRef as j, useEffect as C, useCallback as c } from "react";
3
+ import L from "../../../assets/line-icons/icons/check2.js";
4
+ import O from "../../ui/image/image.js";
5
+ import r from "../../ui/text/text.js";
6
+ import { usePostPuzzleToAssign as B } from "../api/puzzle-assign.js";
7
+ import D from "../comps/puzzle-card.js";
8
+ import { PuzzleContainer as W, PuzzleContent as G, AssignedTag as K, PuzzleButton as S, PuzzleText as U, CheckMarkIcon as H } from "./puzzle-container-styled.js";
9
+ const N = 1500, M = X(
15
10
  ({
16
- triggerReveal: l = !1,
17
- onFullyHidden: o,
18
- onPuzzleClick: f,
19
- puzzleData: $,
20
- courseStream: z,
21
- studentId: p
11
+ userType: A,
12
+ triggerReveal: o = !1,
13
+ onFullyHidden: s,
14
+ onPuzzleClick: d,
15
+ puzzleData: p,
16
+ courseStream: g,
17
+ studentId: u
22
18
  }) => {
23
19
  const {
24
- image_hue: i,
25
- image_url: g,
26
- assigned: s,
27
- title: d,
28
- id: P,
29
- node_id: A,
30
- student_elo_rating: h,
31
- current_elo_rating: _
32
- } = $, [I, a] = j(s), r = k(null), w = u(() => D(i), [i]), R = u(
33
- () => ({
34
- node_id: A,
35
- node_type: "PUZZLE_CARD",
36
- student_elo_rating: h,
37
- current_elo_rating: _
38
- }),
39
- [A, h, _]
40
- ), { post: C, isProcessing: b } = y({
41
- onComplete: (e) => {
42
- var t;
43
- e ? a(!0) : ((t = r.current) == null || t.playSegments(c.REVEAL_ASSIGNED, !1), a(!1));
20
+ image_hue: m,
21
+ image_url: b,
22
+ assigned: e,
23
+ title: I,
24
+ id: h
25
+ } = p, [n, t] = z("hidden"), [f, P] = z(!1), a = j(null), { post: $, isProcessing: k } = B({
26
+ onComplete: (x) => {
27
+ x ? t("visible") : n === "visible" && t("assigning");
44
28
  }
45
29
  });
46
- O(() => {
47
- var e, t;
48
- s || (l ? (e = r.current) == null || e.playSegments(c.REVEAL, !0) : ((t = r.current) == null || t.stop(), a(!1)));
49
- }, [s, l]);
50
- const x = m(() => {
51
- s || C(
30
+ C(() => {
31
+ e || (o ? f ? t("assigned") : n === "hidden" && t("movingIn") : n !== "hidden" && n !== "movingOut" && t("movingOut"));
32
+ }, [o, f, e]), C(() => (n === "assigned" && !e && (a.current = setTimeout(() => {
33
+ t("movingOut");
34
+ }, N)), () => {
35
+ a.current && clearTimeout(a.current);
36
+ }), [n, e]);
37
+ const T = c(() => {
38
+ switch (n) {
39
+ case "movingIn":
40
+ t("revealing");
41
+ break;
42
+ case "revealing":
43
+ t("visible");
44
+ break;
45
+ case "assigning":
46
+ t("assigned"), P(!0);
47
+ break;
48
+ case "movingOut":
49
+ t("hidden"), s == null || s();
50
+ break;
51
+ }
52
+ }, [n, s]), v = c(() => {
53
+ e || $(
52
54
  {
53
- puzzle_id: P
55
+ puzzle_id: h
54
56
  },
55
57
  {
56
- studentId: p,
57
- courseStream: z
58
+ studentId: u,
59
+ courseStream: g
58
60
  }
59
61
  );
60
- }, [z, s, C, P, p]), L = m(() => {
61
- f();
62
- }, [f]), V = m(() => {
63
- var e;
64
- (e = r.current) == null || e.playSegments(c.REVEAL, !0);
65
- }, []), N = u(
66
- () => ({
67
- name: "enterFrame",
68
- callback: (e) => {
69
- const { currentTime: t } = e;
70
- t === 49 && a(!0), t === 101 && (o == null || o());
71
- }
72
- }),
73
- [o]
74
- );
75
- return l ? s ? /* @__PURE__ */ n(E, { $justifyContent: "center", children: /* @__PURE__ */ n(
76
- G,
77
- {
78
- $imageHue: i,
79
- $background: `${i}_2`,
80
- $widthX: 15.9375,
81
- children: /* @__PURE__ */ n(
82
- S,
83
- {
84
- imageUrl: g,
85
- handleOnPuzzleClick: L,
86
- title: d,
87
- assigned: !0
88
- }
89
- )
90
- }
91
- ) }) : /* @__PURE__ */ n(E, { children: /* @__PURE__ */ T(U, { $heightX: 26, children: [
92
- /* @__PURE__ */ n(
93
- v,
62
+ }, [g, e, $, h, u]), _ = c(() => {
63
+ d();
64
+ }, [d]), E = () => n === "visible" || e ? /* @__PURE__ */ l(w, { children: [
65
+ /* @__PURE__ */ l(
66
+ G,
94
67
  {
95
- src: w,
96
- ref: r,
97
- settings: W,
98
- onRender: V,
99
- eventListener: N,
100
- animateOnIntersect: !0
68
+ $justifyContent: "center",
69
+ $alignItems: "center",
70
+ $width: "100%",
71
+ $height: "100%",
72
+ onClick: _,
73
+ title: "Click to preview",
74
+ $flexGapX: 1.5,
75
+ children: [
76
+ /* @__PURE__ */ i(O, { width: 136, height: 136, src: b, withLoader: !1, alt: "Puzzle" }),
77
+ /* @__PURE__ */ i(r, { $renderAs: "h4", children: I }),
78
+ e && /* @__PURE__ */ i(K, { $gap: 4, $gutter: 8, $background: "BLACK_1", children: /* @__PURE__ */ i(r, { $renderAs: "ac4", $color: "WHITE_1", children: "Assigned" }) })
79
+ ]
101
80
  }
102
81
  ),
103
- /* @__PURE__ */ n(M, { $visible: I, $position: "absolute", children: /* @__PURE__ */ n(
82
+ A === "TEACHER" && /* @__PURE__ */ i(
104
83
  S,
105
84
  {
106
- imageUrl: g,
107
- title: d,
108
- handleOnPuzzleClick: L,
109
- handleAssign: x,
110
- assigning: b,
111
- analyticsProps: R
85
+ $background: "BLACK_1",
86
+ $widthX: 15.75,
87
+ $alignItems: "center",
88
+ $justifyContent: "center",
89
+ $gapX: 0.75,
90
+ $gutterX: 1,
91
+ onClick: v,
92
+ $disabled: e || k,
93
+ children: /* @__PURE__ */ i(r, { $renderAs: "ub1-bold", $color: e ? "BLACK_T_38" : "WHITE_1", children: e ? "Discuss in next class" : "Assign" })
112
94
  }
113
- ) })
114
- ] }) }) : null;
95
+ )
96
+ ] }) : n === "assigned" ? /* @__PURE__ */ l(U, { $alignItems: "center", $justifyContent: "center", $flexGap: 8, children: [
97
+ /* @__PURE__ */ i(
98
+ H,
99
+ {
100
+ $widthX: 2.5,
101
+ $heightX: 2.5,
102
+ $background: "WHITE",
103
+ $alignItems: "center",
104
+ $justifyContent: "center",
105
+ children: /* @__PURE__ */ i(L, {})
106
+ }
107
+ ),
108
+ /* @__PURE__ */ i(r, { $renderAs: "ab1-bold", $align: "center", $color: "WHITE", children: "Puzzle assigned" })
109
+ ] }) : null;
110
+ return n === "hidden" && !o ? null : /* @__PURE__ */ i(W, { children: /* @__PURE__ */ i(
111
+ D,
112
+ {
113
+ animationPhase: e ? void 0 : n,
114
+ onAnimationEnd: T,
115
+ imageHue: m ?? "BLUE",
116
+ heightX: 19,
117
+ widthX: 15.75,
118
+ backgroundColor: e ? `${m}_2` : void 0,
119
+ children: E()
120
+ }
121
+ ) });
115
122
  }
116
- ), te = X;
123
+ ), F = M;
117
124
  export {
118
- te as default
125
+ F as default
119
126
  };
120
127
  //# sourceMappingURL=puzzle-container.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"puzzle-container.js","sources":["../../../../src/features/puzzles/puzzle-container/puzzle-container.tsx"],"sourcesContent":["import type { ILottieAnimationRef } from '../../ui/lottie-animation/types';\nimport type { IPuzzleCardContainerProps } from './puzzle-container-types';\nimport type { AnimationEventName, BMEnterFrameEvent } from 'lottie-web';\nimport type { FC } from 'react';\n\nimport { useState, useCallback, useEffect, useRef, memo, useMemo } from 'react';\n\nimport FlexView from '../../ui/layout/flex-view';\nimport LottieAnimation from '../../ui/lottie-animation/lottie-animation';\nimport { usePostPuzzleToAssign } from '../api/puzzle-assign';\nimport { PUZZLE_ASSIGN_ANIMATION } from '../constants/puzzle-container';\nimport { getPuzzleCardLottie } from '../utils/puzzle-pattern';\nimport * as Styled from './puzzle-container-styled';\nimport PuzzleAssigned from './puzzle-container-view';\n\nconst modeRevealAnimationSettings = {\n loop: false,\n renderer: 'svg',\n autoPlay: false,\n};\n\nconst PuzzleCardContainer: FC<IPuzzleCardContainerProps> = memo(\n ({\n triggerReveal = false,\n onFullyHidden,\n onPuzzleClick,\n puzzleData,\n courseStream,\n studentId,\n }) => {\n const {\n image_hue: imageHue,\n image_url: imageUrl,\n assigned: externalAssigned,\n title,\n id: puzzleId,\n node_id: nodeId,\n student_elo_rating,\n current_elo_rating,\n } = puzzleData;\n\n const [showPuzzleInfo, setShowPuzzleInfo] = useState(externalAssigned);\n\n const assignLottieRef = useRef<ILottieAnimationRef | null>(null);\n const puzzleLottieSrc = useMemo(() => getPuzzleCardLottie(imageHue), [imageHue]);\n\n const analyticsProps = useMemo(\n () => ({\n node_id: nodeId,\n node_type: 'PUZZLE_CARD',\n student_elo_rating,\n current_elo_rating,\n }),\n [nodeId, student_elo_rating, current_elo_rating],\n );\n\n const { post: postPuzzleToAssign, isProcessing } = usePostPuzzleToAssign({\n onComplete: (error: string | null) => {\n if (error) {\n // Handle error (e.g., show a notification)\n setShowPuzzleInfo(true);\n } else {\n assignLottieRef.current?.playSegments(PUZZLE_ASSIGN_ANIMATION.REVEAL_ASSIGNED, false);\n\n setShowPuzzleInfo(false);\n }\n },\n });\n\n useEffect(() => {\n if (!externalAssigned) {\n if (triggerReveal) {\n assignLottieRef.current?.playSegments(PUZZLE_ASSIGN_ANIMATION.REVEAL, true);\n } else {\n assignLottieRef.current?.stop();\n setShowPuzzleInfo(false);\n }\n }\n }, [externalAssigned, triggerReveal]);\n\n const handleAssign = useCallback(() => {\n if (externalAssigned) return;\n\n postPuzzleToAssign(\n {\n puzzle_id: puzzleId,\n },\n {\n studentId,\n courseStream,\n },\n );\n }, [courseStream, externalAssigned, postPuzzleToAssign, puzzleId, studentId]);\n\n const handleOnPuzzleClick = useCallback(() => {\n onPuzzleClick();\n }, [onPuzzleClick]);\n\n const showPuzzleLottie = useCallback(() => {\n assignLottieRef.current?.playSegments(PUZZLE_ASSIGN_ANIMATION.REVEAL, true);\n }, []);\n\n const onAnimationFinish = useMemo(\n () => ({\n name: 'enterFrame' as AnimationEventName,\n callback: (event: BMEnterFrameEvent) => {\n const { currentTime } = event;\n\n if (currentTime === 49) {\n setShowPuzzleInfo(true);\n }\n\n if (currentTime === 101) {\n onFullyHidden?.();\n }\n },\n }),\n [onFullyHidden],\n );\n\n if (!triggerReveal) {\n return null;\n }\n\n if (externalAssigned) {\n return (\n <Styled.PuzzleContainer $justifyContent=\"center\">\n <Styled.PuzzleAssignedWrapper\n $imageHue={imageHue}\n $background={`${imageHue}_2`}\n $widthX={15.9375}\n >\n <PuzzleAssigned\n imageUrl={imageUrl}\n handleOnPuzzleClick={handleOnPuzzleClick}\n title={title}\n assigned\n />\n </Styled.PuzzleAssignedWrapper>\n </Styled.PuzzleContainer>\n );\n }\n\n return (\n <Styled.PuzzleContainer>\n <FlexView $heightX={26}>\n <LottieAnimation\n src={puzzleLottieSrc}\n ref={assignLottieRef}\n settings={modeRevealAnimationSettings}\n onRender={showPuzzleLottie}\n eventListener={onAnimationFinish}\n animateOnIntersect\n />\n\n <Styled.PuzzleContentWrapper $visible={showPuzzleInfo} $position=\"absolute\">\n <PuzzleAssigned\n imageUrl={imageUrl}\n title={title}\n handleOnPuzzleClick={handleOnPuzzleClick}\n handleAssign={handleAssign}\n assigning={isProcessing}\n analyticsProps={analyticsProps}\n />\n </Styled.PuzzleContentWrapper>\n </FlexView>\n </Styled.PuzzleContainer>\n );\n },\n);\n\nexport default PuzzleCardContainer;\n"],"names":["modeRevealAnimationSettings","PuzzleCardContainer","memo","triggerReveal","onFullyHidden","onPuzzleClick","puzzleData","courseStream","studentId","imageHue","imageUrl","externalAssigned","title","puzzleId","nodeId","student_elo_rating","current_elo_rating","showPuzzleInfo","setShowPuzzleInfo","useState","assignLottieRef","useRef","puzzleLottieSrc","useMemo","getPuzzleCardLottie","analyticsProps","postPuzzleToAssign","isProcessing","usePostPuzzleToAssign","error","_a","PUZZLE_ASSIGN_ANIMATION","useEffect","_b","handleAssign","useCallback","handleOnPuzzleClick","showPuzzleLottie","onAnimationFinish","event","currentTime","jsx","Styled.PuzzleContainer","Styled.PuzzleAssignedWrapper","PuzzleAssigned","jsxs","FlexView","LottieAnimation","Styled.PuzzleContentWrapper","PuzzleCardContainer$1"],"mappings":";;;;;;;;;AAeA,MAAMA,IAA8B;AAAA,EAClC,MAAM;AAAA,EACN,UAAU;AAAA,EACV,UAAU;AACZ,GAEMC,IAAqDC;AAAA,EACzD,CAAC;AAAA,IACC,eAAAC,IAAgB;AAAA,IAChB,eAAAC;AAAA,IACA,eAAAC;AAAA,IACA,YAAAC;AAAA,IACA,cAAAC;AAAA,IACA,WAAAC;AAAA,EAAA,MACI;AACE,UAAA;AAAA,MACJ,WAAWC;AAAA,MACX,WAAWC;AAAA,MACX,UAAUC;AAAA,MACV,OAAAC;AAAA,MACA,IAAIC;AAAA,MACJ,SAASC;AAAA,MACT,oBAAAC;AAAA,MACA,oBAAAC;AAAA,IACE,IAAAV,GAEE,CAACW,GAAgBC,CAAiB,IAAIC,EAASR,CAAgB,GAE/DS,IAAkBC,EAAmC,IAAI,GACzDC,IAAkBC,EAAQ,MAAMC,EAAoBf,CAAQ,GAAG,CAACA,CAAQ,CAAC,GAEzEgB,IAAiBF;AAAA,MACrB,OAAO;AAAA,QACL,SAAST;AAAA,QACT,WAAW;AAAA,QACX,oBAAAC;AAAA,QACA,oBAAAC;AAAA,MAAA;AAAA,MAEF,CAACF,GAAQC,GAAoBC,CAAkB;AAAA,IAAA,GAG3C,EA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BAAAD;AAAA,MAACE;AAAAA,MAAA;AAAA,QACC,WAAWlC;AAAA,QACX,aAAa,GAAGA,CAAQ;AAAA,QACxB,SAAS;AAAA,QAET,UAAA,gBAAAgC;AAAA,UAACG;AAAAA,UAAA;AAAA,YACC,UAAAlC;AAAA,YACA,qBAAA0B;AAAA,YACA,OAAAxB;AAAA,YACA,UAAQ;AAAA,UAAA;AAAA,QACV;AAAA,MAAA;AAAA,IAEJ,EAAA,CAAA,sBAKD8B,GAAA,EACC,UAAC,gBAAAG,EAAAC,GAAA,EAAS,UAAU,IAClB,UAAA;AAAA,MAAA,gBAAAL;AAAA,QAACM;AAAA,QAAA;AAAA,UACC,KAAKzB;AAAA,UACL,KAAKF;AAAA,UACL,UAAUpB;AAAA,UACV,UAAUqC;AAAA,UACV,eAAeC;AAAA,UACf,oBAAkB;AAAA,QAAA;AAAA,MACpB;AAAA,wBAECU,GAAA,EAA4B,UAAU/B,GAAgB,WAAU,YAC/D,UAAA,gBAAAwB;AAAA,QAACG;AAAAA,QAAA;AAAA,UACC,UAAAlC;AAAA,UACA,OAAAE;AAAA,UACA,qBAAAwB;AAAA,UACA,cAAAF;AAAA,UACA,WAAWP;AAAA,UACX,gBAAAF;AAAA,QAAA;AAAA,MAAA,GAEJ;AAAA,IAAA,EACF,CAAA,EACF,CAAA,IA7CO;AAAA,EA+CX;AACF,GAEAwB,KAAehD;"}
1
+ {"version":3,"file":"puzzle-container.js","sources":["../../../../src/features/puzzles/puzzle-container/puzzle-container.tsx"],"sourcesContent":["import type { TPuzzleCardAnimationPhases } from '../comps/puzzle-card-types';\nimport type { IPuzzleCardContainerProps } from './puzzle-container-types';\nimport type { FC } from 'react';\n\nimport { useState, useCallback, useEffect, useRef, memo } from 'react';\n\nimport Check2Icon from '../../../assets/line-icons/icons/check2';\nimport Image from '../../ui/image/image';\nimport Text from '../../ui/text/text';\nimport { usePostPuzzleToAssign } from '../api/puzzle-assign';\nimport PuzzleCard from '../comps/puzzle-card';\nimport * as Styled from './puzzle-container-styled';\n\nconst ASSIGNED_DISPLAY_DURATION = 1500; // ms\n\nconst PuzzleCardContainer: FC<IPuzzleCardContainerProps> = memo(\n ({\n userType,\n triggerReveal = false,\n onFullyHidden,\n onPuzzleClick,\n puzzleData,\n courseStream,\n studentId,\n }) => {\n const {\n image_hue: imageHue,\n image_url: imageUrl,\n assigned: externalAssigned,\n title,\n id: puzzleId,\n } = puzzleData;\n\n const [animationPhase, setAnimationPhase] = useState<TPuzzleCardAnimationPhases>('hidden');\n const [isAssigned, setIsAssigned] = useState(false);\n\n const assignedTimer = useRef<NodeJS.Timeout | null>(null);\n\n const { post: postPuzzleToAssign, isProcessing } = usePostPuzzleToAssign({\n onComplete: (error: string | null) => {\n if (error) {\n // Handle error (e.g., show a notification)\n setAnimationPhase('visible'); // Reset to visible if assignment fails\n } else {\n if (animationPhase === 'visible') {\n setAnimationPhase('assigning');\n }\n }\n },\n });\n\n // Main trigger to start or hide the card\n useEffect(() => {\n if (!externalAssigned) {\n if (triggerReveal) {\n if (isAssigned) {\n setAnimationPhase('assigned'); // Already assigned, show statically\n } else if (animationPhase === 'hidden') {\n setAnimationPhase('movingIn'); // Start the animation sequence\n }\n } else {\n // If trigger is removed, start hiding (unless already hidden/hiding)\n if (animationPhase !== 'hidden' && animationPhase !== 'movingOut') {\n setAnimationPhase('movingOut');\n }\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [triggerReveal, isAssigned, externalAssigned]);\n\n // Timer to auto-hide after the 'assigned' phase\n useEffect(() => {\n if (animationPhase === 'assigned' && !externalAssigned) {\n assignedTimer.current = setTimeout(() => {\n setAnimationPhase('movingOut');\n }, ASSIGNED_DISPLAY_DURATION);\n }\n\n return () => {\n if (assignedTimer.current) clearTimeout(assignedTimer.current);\n };\n }, [animationPhase, externalAssigned]);\n\n // State machine for animations\n const handleAnimationEnd = useCallback(() => {\n switch (animationPhase) {\n case 'movingIn':\n setAnimationPhase('revealing');\n break;\n case 'revealing':\n setAnimationPhase('visible');\n break;\n case 'assigning':\n setAnimationPhase('assigned');\n setIsAssigned(true);\n break;\n case 'movingOut':\n setAnimationPhase('hidden');\n onFullyHidden?.();\n break;\n default:\n break;\n }\n }, [animationPhase, onFullyHidden]);\n\n const handleAssign = useCallback(() => {\n if (externalAssigned) return; // Do nothing if already assigned\n\n postPuzzleToAssign(\n {\n puzzle_id: puzzleId,\n },\n {\n studentId,\n courseStream,\n },\n );\n }, [courseStream, externalAssigned, postPuzzleToAssign, puzzleId, studentId]);\n\n const handleOnPuzzleClick = useCallback(() => {\n onPuzzleClick();\n }, [onPuzzleClick]);\n\n // Render content only during specific phases\n const renderContent = () => {\n if (animationPhase === 'visible' || externalAssigned) {\n return (\n <>\n <Styled.PuzzleContent\n $justifyContent=\"center\"\n $alignItems=\"center\"\n $width=\"100%\"\n $height=\"100%\"\n onClick={handleOnPuzzleClick}\n title=\"Click to preview\"\n $flexGapX={1.5}\n >\n <Image width={136} height={136} src={imageUrl} withLoader={false} alt=\"Puzzle\" />\n <Text $renderAs=\"h4\">{title}</Text>\n\n {externalAssigned && (\n <Styled.AssignedTag $gap={4} $gutter={8} $background=\"BLACK_1\">\n <Text $renderAs=\"ac4\" $color=\"WHITE_1\">\n Assigned\n </Text>\n </Styled.AssignedTag>\n )}\n </Styled.PuzzleContent>\n\n {userType === 'TEACHER' && (\n <Styled.PuzzleButton\n $background=\"BLACK_1\"\n $widthX={15.75}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $gapX={0.75}\n $gutterX={1}\n onClick={handleAssign}\n $disabled={externalAssigned || isProcessing}\n >\n <Text $renderAs=\"ub1-bold\" $color={externalAssigned ? 'BLACK_T_38' : 'WHITE_1'}>\n {externalAssigned ? 'Discuss in next class' : 'Assign'}\n </Text>\n </Styled.PuzzleButton>\n )}\n </>\n );\n }\n\n if (animationPhase === 'assigned') {\n return (\n <Styled.PuzzleText $alignItems=\"center\" $justifyContent=\"center\" $flexGap={8}>\n <Styled.CheckMarkIcon\n $widthX={2.5}\n $heightX={2.5}\n $background=\"WHITE\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n <Check2Icon />\n </Styled.CheckMarkIcon>\n\n <Text $renderAs=\"ab1-bold\" $align=\"center\" $color=\"WHITE\">\n Puzzle assigned\n </Text>\n </Styled.PuzzleText>\n );\n }\n\n // No content during animations\n return null;\n };\n\n if (animationPhase === 'hidden' && !triggerReveal) {\n return null;\n }\n\n return (\n <Styled.PuzzleContainer>\n <PuzzleCard\n animationPhase={!externalAssigned ? animationPhase : undefined}\n onAnimationEnd={handleAnimationEnd}\n imageHue={imageHue ?? 'BLUE'}\n heightX={19}\n widthX={15.75}\n backgroundColor={externalAssigned ? `${imageHue}_2` : undefined}\n >\n {renderContent()}\n </PuzzleCard>\n </Styled.PuzzleContainer>\n );\n },\n);\n\nexport default PuzzleCardContainer;\n"],"names":["ASSIGNED_DISPLAY_DURATION","PuzzleCardContainer","memo","userType","triggerReveal","onFullyHidden","onPuzzleClick","puzzleData","courseStream","studentId","imageHue","imageUrl","externalAssigned","title","puzzleId","animationPhase","setAnimationPhase","useState","isAssigned","setIsAssigned","assignedTimer","useRef","postPuzzleToAssign","isProcessing","usePostPuzzleToAssign","error","useEffect","handleAnimationEnd","useCallback","handleAssign","handleOnPuzzleClick","renderContent","jsxs","Fragment","Styled.PuzzleContent","jsx","Image","Text","Styled.AssignedTag","Styled.PuzzleButton","Styled.PuzzleText","Styled.CheckMarkIcon","Check2Icon","Styled.PuzzleContainer","PuzzleCard","PuzzleCardContainer$1"],"mappings":";;;;;;;;AAaA,MAAMA,IAA4B,MAE5BC,IAAqDC;AAAA,EACzD,CAAC;AAAA,IACC,UAAAC;AAAA,IACA,eAAAC,IAAgB;AAAA,IAChB,eAAAC;AAAA,IACA,eAAAC;AAAA,IACA,YAAAC;AAAA,IACA,cAAAC;AAAA,IACA,WAAAC;AAAA,EAAA,MACI;AACE,UAAA;AAAA,MACJ,WAAWC;AAAA,MACX,WAAWC;AAAA,MACX,UAA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AAA,IAIAG,MAAmB,aAEnB,gBAAAiB,EAACQ,GAAA,EAAkB,aAAY,UAAS,iBAAgB,UAAS,UAAU,GACzE,UAAA;AAAA,MAAA,gBAAAL;AAAA,QAACM;AAAAA,QAAA;AAAA,UACC,SAAS;AAAA,UACT,UAAU;AAAA,UACV,aAAY;AAAA,UACZ,aAAY;AAAA,UACZ,iBAAgB;AAAA,UAEhB,4BAACC,GAAW,EAAA;AAAA,QAAA;AAAA,MACd;AAAA,MAEA,gBAAAP,EAACE,KAAK,WAAU,YAAW,QAAO,UAAS,QAAO,SAAQ,UAE1D,kBAAA,CAAA;AAAA,IACF,EAAA,CAAA,IAKG;AAGL,WAAAtB,MAAmB,YAAY,CAACX,IAC3B,OAIP,gBAAA+B,EAACQ,GAAA,EACC,UAAA,gBAAAR;AAAA,MAACS;AAAA,MAAA;AAAA,QACC,gBAAiBhC,IAAoC,SAAjBG;AAAA,QACpC,gBAAgBY;AAAA,QAChB,UAAUjB,KAAY;AAAA,QACtB,SAAS;AAAA,QACT,QAAQ;AAAA,QACR,iBAAiBE,IAAmB,GAAGF,CAAQ,OAAO;AAAA,QAErD,UAAcqB,EAAA;AAAA,MAAA;AAAA,IAEnB,EAAA,CAAA;AAAA,EAEJ;AACF,GAEAc,IAAe5C;"}
@@ -46,7 +46,7 @@ const v = {
46
46
  _,
47
47
  {
48
48
  $width: "80%",
49
- $renderAs: "ah4",
49
+ $renderAs: "ah3",
50
50
  $color: "WHITE_1",
51
51
  $align: "center",
52
52
  $show: h,
@@ -1 +1 @@
1
- {"version":3,"file":"puzzle-feedback-celebration.js","sources":["../../../../src/features/puzzles/puzzle-feedback-celebration/puzzle-feedback-celebration.tsx"],"sourcesContent":["import type { IPuzzleFeedbackCelebration } from './puzzle-feedback-celebration-types';\nimport type { FC } from 'react';\n\nimport { useCallback, useEffect, useState } from 'react';\n\nimport CrossIcon from '../../../assets/line-icons/icons/cross';\nimport IconButton from '../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../ui/layout/flex-view';\nimport LottieAnimation from '../../ui/lottie-animation/lottie-animation';\nimport useModalActions from '../../ui/modals/use-modal-actions';\nimport useModalParams from '../../ui/modals/use-modal-params';\nimport { getPuzzleStickerLottie } from '../utils/puzzle-feedback-celebration';\nimport * as Styled from './puzzle-feedback-celebration-styled';\n\nconst puzzleStickerLottieSettings = {\n autoplay: true,\n loop: true,\n renderer: 'canvas',\n};\n\nconst PuzzleFeedbackCelebration: FC = () => {\n const { closeModal } = useModalActions();\n const { feedbackComments, rewards, onCloseModal } = useModalParams<IPuzzleFeedbackCelebration>();\n\n const [showHeader, setShowHeader] = useState(false);\n const [showLottie, setShowLottie] = useState(false);\n const [showText, setShowText] = useState(false);\n const [showButton, setShowButton] = useState(false);\n\n const { sticker } = rewards[0] || {};\n\n const stickerLottie = sticker ? getPuzzleStickerLottie(sticker) : undefined;\n\n const handleCloseModal = useCallback(() => {\n onCloseModal?.();\n closeModal();\n }, [closeModal, onCloseModal]);\n\n useEffect(() => {\n // Sequence: Header -> Lottie -> Text -> Button\n const headerTimer = setTimeout(() => {\n setShowHeader(true);\n }, 100);\n\n const lottieTimer = setTimeout(() => {\n setShowLottie(true);\n }, 400);\n\n const textTimer = setTimeout(() => {\n setShowText(true);\n }, 1000);\n\n const buttonTimer = setTimeout(() => {\n setShowButton(true);\n }, 1500);\n\n // Close modal after 4000ms\n const closeModalTimer = setTimeout(() => {\n handleCloseModal();\n }, 5500);\n\n return () => {\n clearTimeout(headerTimer);\n clearTimeout(lottieTimer);\n clearTimeout(textTimer);\n clearTimeout(buttonTimer);\n clearTimeout(closeModalTimer);\n };\n }, [handleCloseModal]);\n\n return (\n <FlexView $justifyContent=\"center\" $alignItems=\"center\" $width=\"100%\">\n <Styled.PuzzleFeedbackModalWrapper $flexGapX={2.5} $widthX={33.5} $alignItems=\"center\">\n <Styled.ShimmerText $renderAs=\"ac2-black\" $show={showHeader}>\n Puzzle Reviewed\n </Styled.ShimmerText>\n\n <Styled.LottieContainer $widthX={12.5} $heightX={12.5} $show={showLottie}>\n {stickerLottie && (\n <LottieAnimation\n width={200}\n height={200}\n src={stickerLottie}\n settings={puzzleStickerLottieSettings}\n />\n )}\n </Styled.LottieContainer>\n\n <Styled.FeedbackText\n $width=\"80%\"\n $renderAs=\"ah4\"\n $color=\"WHITE_1\"\n $align=\"center\"\n $show={showText}\n >\n {feedbackComments}\n </Styled.FeedbackText>\n\n <Styled.CloseButtonWrapper $show={showButton}>\n <IconButton\n renderAs=\"secondary\"\n Icon={CrossIcon}\n size=\"small\"\n analyticsLabel=\"close_puzzle_feedback_modal\"\n onClick={handleCloseModal}\n />\n </Styled.CloseButtonWrapper>\n </Styled.PuzzleFeedbackModalWrapper>\n </FlexView>\n );\n};\n\nexport default PuzzleFeedbackCelebration;\n"],"names":["puzzleStickerLottieSettings","PuzzleFeedbackCelebration","closeModal","useModalActions","feedbackComments","rewards","onCloseModal","useModalParams","showHeader","setShowHeader","useState","showLottie","setShowLottie","showText","setShowText","showButton","setShowButton","sticker","stickerLottie","getPuzzleStickerLottie","handleCloseModal","useCallback","useEffect","headerTimer","lottieTimer","textTimer","buttonTimer","closeModalTimer","FlexView","jsxs","Styled.PuzzleFeedbackModalWrapper","jsx","Styled.ShimmerText","Styled.LottieContainer","LottieAnimation","Styled.FeedbackText","Styled.CloseButtonWrapper","IconButton","CrossIcon","PuzzleFeedbackCelebration$1"],"mappings":";;;;;;;;;;AAcA,MAAMA,IAA8B;AAAA,EAClC,UAAU;AAAA,EACV,MAAM;AAAA,EACN,UAAU;AACZ,GAEMC,IAAgC,MAAM;AACpC,QAAA,EAAE,YAAAC,MAAeC,KACjB,EAAE,kBAAAC,GAAkB,SAAAC,GAAS,cAAAC,MAAiBC,EAA2C,GAEzF,CAACC,GAAYC,CAAa,IAAIC,EAAS,EAAK,GAC5C,CAACC,GAAYC,CAAa,IAAIF,EAAS,EAAK,GAC5C,CAACG,GAAUC,CAAW,IAAIJ,EAAS,EAAK,GACxC,CAACK,GAAYC,CAA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ACI;AAAAA,MAAA;AAAA,QACC,QAAO;AAAA,QACP,WAAU;AAAA,QACV,QAAO;AAAA,QACP,QAAO;AAAA,QACP,OAAOtB;AAAA,QAEN,UAAAT;AAAA,MAAA;AAAA,IACH;AAAA,IAEC,gBAAA2B,EAAAK,GAAA,EAA0B,OAAOrB,GAChC,UAAA,gBAAAgB;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,UAAS;AAAA,QACT,MAAMC;AAAA,QACN,MAAK;AAAA,QACL,gBAAe;AAAA,QACf,SAASlB;AAAA,MAAA;AAAA,IAAA,GAEb;AAAA,EAAA,EACF,CAAA,EACF,CAAA;AAEJ,GAEAmB,IAAetC;"}
1
+ {"version":3,"file":"puzzle-feedback-celebration.js","sources":["../../../../src/features/puzzles/puzzle-feedback-celebration/puzzle-feedback-celebration.tsx"],"sourcesContent":["import type { IPuzzleFeedbackCelebration } from './puzzle-feedback-celebration-types';\nimport type { FC } from 'react';\n\nimport { useCallback, useEffect, useState } from 'react';\n\nimport CrossIcon from '../../../assets/line-icons/icons/cross';\nimport IconButton from '../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../ui/layout/flex-view';\nimport LottieAnimation from '../../ui/lottie-animation/lottie-animation';\nimport useModalActions from '../../ui/modals/use-modal-actions';\nimport useModalParams from '../../ui/modals/use-modal-params';\nimport { getPuzzleStickerLottie } from '../utils/puzzle-feedback-celebration';\nimport * as Styled from './puzzle-feedback-celebration-styled';\n\nconst puzzleStickerLottieSettings = {\n autoplay: true,\n loop: true,\n renderer: 'canvas',\n};\n\nconst PuzzleFeedbackCelebration: FC = () => {\n const { closeModal } = useModalActions();\n const { feedbackComments, rewards, onCloseModal } = useModalParams<IPuzzleFeedbackCelebration>();\n\n const [showHeader, setShowHeader] = useState(false);\n const [showLottie, setShowLottie] = useState(false);\n const [showText, setShowText] = useState(false);\n const [showButton, setShowButton] = useState(false);\n\n const { sticker } = rewards[0] || {};\n\n const stickerLottie = sticker ? getPuzzleStickerLottie(sticker) : undefined;\n\n const handleCloseModal = useCallback(() => {\n onCloseModal?.();\n closeModal();\n }, [closeModal, onCloseModal]);\n\n useEffect(() => {\n // Sequence: Header -> Lottie -> Text -> Button\n const headerTimer = setTimeout(() => {\n setShowHeader(true);\n }, 100);\n\n const lottieTimer = setTimeout(() => {\n setShowLottie(true);\n }, 400);\n\n const textTimer = setTimeout(() => {\n setShowText(true);\n }, 1000);\n\n const buttonTimer = setTimeout(() => {\n setShowButton(true);\n }, 1500);\n\n // Close modal after 4000ms\n const closeModalTimer = setTimeout(() => {\n handleCloseModal();\n }, 5500);\n\n return () => {\n clearTimeout(headerTimer);\n clearTimeout(lottieTimer);\n clearTimeout(textTimer);\n clearTimeout(buttonTimer);\n clearTimeout(closeModalTimer);\n };\n }, [handleCloseModal]);\n\n return (\n <FlexView $justifyContent=\"center\" $alignItems=\"center\" $width=\"100%\">\n <Styled.PuzzleFeedbackModalWrapper $flexGapX={2.5} $widthX={33.5} $alignItems=\"center\">\n <Styled.ShimmerText $renderAs=\"ac2-black\" $show={showHeader}>\n Puzzle Reviewed\n </Styled.ShimmerText>\n\n <Styled.LottieContainer $widthX={12.5} $heightX={12.5} $show={showLottie}>\n {stickerLottie && (\n <LottieAnimation\n width={200}\n height={200}\n src={stickerLottie}\n settings={puzzleStickerLottieSettings}\n />\n )}\n </Styled.LottieContainer>\n\n <Styled.FeedbackText\n $width=\"80%\"\n $renderAs=\"ah3\"\n $color=\"WHITE_1\"\n $align=\"center\"\n $show={showText}\n >\n {feedbackComments}\n </Styled.FeedbackText>\n\n <Styled.CloseButtonWrapper $show={showButton}>\n <IconButton\n renderAs=\"secondary\"\n Icon={CrossIcon}\n size=\"small\"\n analyticsLabel=\"close_puzzle_feedback_modal\"\n onClick={handleCloseModal}\n />\n </Styled.CloseButtonWrapper>\n </Styled.PuzzleFeedbackModalWrapper>\n </FlexView>\n );\n};\n\nexport default PuzzleFeedbackCelebration;\n"],"names":["puzzleStickerLottieSettings","PuzzleFeedbackCelebration","closeModal","useModalActions","feedbackComments","rewards","onCloseModal","useModalParams","showHeader","setShowHeader","useState","showLottie","setShowLottie","showText","setShowText","showButton","setShowButton","sticker","stickerLottie","getPuzzleStickerLottie","handleCloseModal","useCallback","useEffect","headerTimer","lottieTimer","textTimer","buttonTimer","closeModalTimer","FlexView","jsxs","Styled.PuzzleFeedbackModalWrapper","jsx","Styled.ShimmerText","Styled.LottieContainer","LottieAnimation","Styled.FeedbackText","Styled.CloseButtonWrapper","IconButton","CrossIcon","PuzzleFeedbackCelebration$1"],"mappings":";;;;;;;;;;AAcA,MAAMA,IAA8B;AAAA,EAClC,UAAU;AAAA,EACV,MAAM;AAAA,EACN,UAAU;AACZ,GAEMC,IAAgC,MAAM;AACpC,QAAA,EAAE,YAAAC,MAAeC,KACjB,EAAE,kBAAAC,GAAkB,SAAAC,GAAS,cAAAC,MAAiBC,EAA2C,GAEzF,CAACC,GAAYC,CAAa,IAAIC,EAAS,EAAK,GAC5C,CAACC,GAAYC,CAAa,IAAIF,EAAS,EAAK,GAC5C,CAACG,GAAUC,CAAW,IAAIJ,EAAS,EAAK,GACxC,CAACK,GAAYC,CAAa,IAAIN,EAAS,EAAK,GAE5C,EAAE,SAAAO,EAAQ,IAAIZ,EAAQ,CAAC,KAAK,CAAA,GAE5Ba,IAAgBD,IAAUE,EAAuBF,CAAO,IAAI,QAE5DG,IAAmBC,EAAY,MAAM;AAC1B,IAAAf,KAAA,QAAAA,KACJJ;EAAA,GACV,CAACA,GAAYI,CAAY,CAAC;AAE7B,SAAAgB,EAAU,MAAM;AAER,UAAAC,IAAc,WAAW,MAAM;AACnC,MAAAd,EAAc,EAAI;AAAA,OACjB,GAAG,GAEAe,IAAc,WAAW,MAAM;AACnC,MAAAZ,EAAc,EAAI;AAAA,OACjB,GAAG,GAEAa,IAAY,WAAW,MAAM;AACjC,MAAAX,EAAY,EAAI;AAAA,OACf,GAAI,GAEDY,IAAc,WAAW,MAAM;AACnC,MAAAV,EAAc,EAAI;AAAA,OACjB,IA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