@magmamath/students-features 0.6.7-rc.1 → 0.6.7-rc.2

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 (182) hide show
  1. package/dist/commonjs/features/endOfAssignment/components/Modal/Modal.js +1 -0
  2. package/dist/commonjs/features/endOfAssignment/components/Modal/Modal.js.map +1 -1
  3. package/dist/commonjs/index.js +0 -12
  4. package/dist/commonjs/index.js.map +1 -1
  5. package/dist/commonjs/lib/effector/createControllerEffect.js.map +1 -1
  6. package/dist/commonjs/lib/helpers/helpers.js.map +1 -1
  7. package/dist/commonjs/shared/translation/localization/en.json +0 -5
  8. package/dist/commonjs/shared/translation/localization/gb.json +0 -5
  9. package/dist/commonjs/shared/translation/localization/sw.json +0 -5
  10. package/dist/module/features/endOfAssignment/components/Modal/Modal.js +2 -1
  11. package/dist/module/features/endOfAssignment/components/Modal/Modal.js.map +1 -1
  12. package/dist/module/index.js +0 -1
  13. package/dist/module/index.js.map +1 -1
  14. package/dist/module/lib/effector/createControllerEffect.js.map +1 -1
  15. package/dist/module/shared/translation/localization/en.json +0 -5
  16. package/dist/module/shared/translation/localization/gb.json +0 -5
  17. package/dist/module/shared/translation/localization/sw.json +0 -5
  18. package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/Modal.d.ts.map +1 -1
  19. package/dist/typescript/commonjs/index.d.ts +0 -1
  20. package/dist/typescript/commonjs/index.d.ts.map +1 -1
  21. package/dist/typescript/commonjs/lib/effector/createControllerEffect.d.ts +1 -1
  22. package/dist/typescript/commonjs/lib/effector/createControllerEffect.d.ts.map +1 -1
  23. package/dist/typescript/commonjs/lib/helpers/helpers.d.ts.map +1 -1
  24. package/dist/typescript/commonjs/shared/translation/constants.d.ts +0 -15
  25. package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
  26. package/dist/typescript/commonjs/shared/translation/model.d.ts +0 -10
  27. package/dist/typescript/commonjs/shared/translation/model.d.ts.map +1 -1
  28. package/dist/typescript/module/features/endOfAssignment/components/Modal/Modal.d.ts.map +1 -1
  29. package/dist/typescript/module/index.d.ts +0 -1
  30. package/dist/typescript/module/index.d.ts.map +1 -1
  31. package/dist/typescript/module/lib/effector/createControllerEffect.d.ts +1 -1
  32. package/dist/typescript/module/lib/effector/createControllerEffect.d.ts.map +1 -1
  33. package/dist/typescript/module/lib/helpers/helpers.d.ts.map +1 -1
  34. package/dist/typescript/module/shared/translation/constants.d.ts +0 -15
  35. package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
  36. package/dist/typescript/module/shared/translation/model.d.ts +0 -10
  37. package/dist/typescript/module/shared/translation/model.d.ts.map +1 -1
  38. package/package.json +5 -3
  39. package/src/features/endOfAssignment/components/Modal/Modal.tsx +2 -1
  40. package/src/index.ts +0 -1
  41. package/src/lib/effector/createControllerEffect.ts +41 -41
  42. package/src/lib/helpers/helpers.ts +1 -1
  43. package/src/shared/translation/localization/en.json +0 -5
  44. package/src/shared/translation/localization/gb.json +0 -5
  45. package/src/shared/translation/localization/sw.json +0 -5
  46. package/dist/commonjs/features/gifCelebrations/GifCelebrations.js +0 -62
  47. package/dist/commonjs/features/gifCelebrations/GifCelebrations.js.map +0 -1
  48. package/dist/commonjs/features/gifCelebrations/assets/confetti.webp +0 -0
  49. package/dist/commonjs/features/gifCelebrations/assets/gifFallback.gif +0 -0
  50. package/dist/commonjs/features/gifCelebrations/components/Backdrop.js +0 -44
  51. package/dist/commonjs/features/gifCelebrations/components/Backdrop.js.map +0 -1
  52. package/dist/commonjs/features/gifCelebrations/components/ContentContainer.js +0 -46
  53. package/dist/commonjs/features/gifCelebrations/components/ContentContainer.js.map +0 -1
  54. package/dist/commonjs/features/gifCelebrations/components/Gif.js +0 -91
  55. package/dist/commonjs/features/gifCelebrations/components/Gif.js.map +0 -1
  56. package/dist/commonjs/features/gifCelebrations/components/Progress.js +0 -96
  57. package/dist/commonjs/features/gifCelebrations/components/Progress.js.map +0 -1
  58. package/dist/commonjs/features/gifCelebrations/constants.js +0 -34
  59. package/dist/commonjs/features/gifCelebrations/constants.js.map +0 -1
  60. package/dist/commonjs/features/gifCelebrations/helpers.js +0 -114
  61. package/dist/commonjs/features/gifCelebrations/helpers.js.map +0 -1
  62. package/dist/commonjs/features/gifCelebrations/index.js +0 -20
  63. package/dist/commonjs/features/gifCelebrations/index.js.map +0 -1
  64. package/dist/commonjs/features/gifCelebrations/model/GifCelebrations.cache.js +0 -38
  65. package/dist/commonjs/features/gifCelebrations/model/GifCelebrations.cache.js.map +0 -1
  66. package/dist/commonjs/features/gifCelebrations/model/GifCelebrations.model.js +0 -150
  67. package/dist/commonjs/features/gifCelebrations/model/GifCelebrations.model.js.map +0 -1
  68. package/dist/commonjs/features/gifCelebrations/model/GifCelebrationsApi.js +0 -14
  69. package/dist/commonjs/features/gifCelebrations/model/GifCelebrationsApi.js.map +0 -1
  70. package/dist/commonjs/features/gifCelebrations/types/model.types.js +0 -6
  71. package/dist/commonjs/features/gifCelebrations/types/model.types.js.map +0 -1
  72. package/dist/commonjs/react-app-env.d.js +0 -2
  73. package/dist/commonjs/react-app-env.d.js.map +0 -1
  74. package/dist/commonjs/shared/constants.js +0 -9
  75. package/dist/commonjs/shared/constants.js.map +0 -1
  76. package/dist/commonjs/types/common.types.js +0 -2
  77. package/dist/commonjs/types/common.types.js.map +0 -1
  78. package/dist/module/features/gifCelebrations/GifCelebrations.js +0 -55
  79. package/dist/module/features/gifCelebrations/GifCelebrations.js.map +0 -1
  80. package/dist/module/features/gifCelebrations/assets/confetti.webp +0 -0
  81. package/dist/module/features/gifCelebrations/assets/gifFallback.gif +0 -0
  82. package/dist/module/features/gifCelebrations/components/Backdrop.js +0 -36
  83. package/dist/module/features/gifCelebrations/components/Backdrop.js.map +0 -1
  84. package/dist/module/features/gifCelebrations/components/ContentContainer.js +0 -38
  85. package/dist/module/features/gifCelebrations/components/ContentContainer.js.map +0 -1
  86. package/dist/module/features/gifCelebrations/components/Gif.js +0 -83
  87. package/dist/module/features/gifCelebrations/components/Gif.js.map +0 -1
  88. package/dist/module/features/gifCelebrations/components/Progress.js +0 -88
  89. package/dist/module/features/gifCelebrations/components/Progress.js.map +0 -1
  90. package/dist/module/features/gifCelebrations/constants.js +0 -30
  91. package/dist/module/features/gifCelebrations/constants.js.map +0 -1
  92. package/dist/module/features/gifCelebrations/helpers.js +0 -103
  93. package/dist/module/features/gifCelebrations/helpers.js.map +0 -1
  94. package/dist/module/features/gifCelebrations/index.js +0 -5
  95. package/dist/module/features/gifCelebrations/index.js.map +0 -1
  96. package/dist/module/features/gifCelebrations/model/GifCelebrations.cache.js +0 -33
  97. package/dist/module/features/gifCelebrations/model/GifCelebrations.cache.js.map +0 -1
  98. package/dist/module/features/gifCelebrations/model/GifCelebrations.model.js +0 -145
  99. package/dist/module/features/gifCelebrations/model/GifCelebrations.model.js.map +0 -1
  100. package/dist/module/features/gifCelebrations/model/GifCelebrationsApi.js +0 -9
  101. package/dist/module/features/gifCelebrations/model/GifCelebrationsApi.js.map +0 -1
  102. package/dist/module/features/gifCelebrations/types/model.types.js +0 -4
  103. package/dist/module/features/gifCelebrations/types/model.types.js.map +0 -1
  104. package/dist/module/react-app-env.d.js +0 -2
  105. package/dist/module/react-app-env.d.js.map +0 -1
  106. package/dist/module/shared/constants.js +0 -5
  107. package/dist/module/shared/constants.js.map +0 -1
  108. package/dist/module/types/common.types.js +0 -2
  109. package/dist/module/types/common.types.js.map +0 -1
  110. package/dist/typescript/commonjs/features/gifCelebrations/GifCelebrations.d.ts +0 -10
  111. package/dist/typescript/commonjs/features/gifCelebrations/GifCelebrations.d.ts.map +0 -1
  112. package/dist/typescript/commonjs/features/gifCelebrations/components/Backdrop.d.ts +0 -10
  113. package/dist/typescript/commonjs/features/gifCelebrations/components/Backdrop.d.ts.map +0 -1
  114. package/dist/typescript/commonjs/features/gifCelebrations/components/ContentContainer.d.ts +0 -10
  115. package/dist/typescript/commonjs/features/gifCelebrations/components/ContentContainer.d.ts.map +0 -1
  116. package/dist/typescript/commonjs/features/gifCelebrations/components/Gif.d.ts +0 -10
  117. package/dist/typescript/commonjs/features/gifCelebrations/components/Gif.d.ts.map +0 -1
  118. package/dist/typescript/commonjs/features/gifCelebrations/components/Progress.d.ts +0 -10
  119. package/dist/typescript/commonjs/features/gifCelebrations/components/Progress.d.ts.map +0 -1
  120. package/dist/typescript/commonjs/features/gifCelebrations/constants.d.ts +0 -26
  121. package/dist/typescript/commonjs/features/gifCelebrations/constants.d.ts.map +0 -1
  122. package/dist/typescript/commonjs/features/gifCelebrations/helpers.d.ts +0 -29
  123. package/dist/typescript/commonjs/features/gifCelebrations/helpers.d.ts.map +0 -1
  124. package/dist/typescript/commonjs/features/gifCelebrations/index.d.ts +0 -3
  125. package/dist/typescript/commonjs/features/gifCelebrations/index.d.ts.map +0 -1
  126. package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrations.cache.d.ts +0 -19
  127. package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrations.cache.d.ts.map +0 -1
  128. package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrations.model.d.ts +0 -26
  129. package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrations.model.d.ts.map +0 -1
  130. package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrationsApi.d.ts +0 -6
  131. package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrationsApi.d.ts.map +0 -1
  132. package/dist/typescript/commonjs/features/gifCelebrations/types/model.types.d.ts +0 -45
  133. package/dist/typescript/commonjs/features/gifCelebrations/types/model.types.d.ts.map +0 -1
  134. package/dist/typescript/commonjs/shared/constants.d.ts +0 -2
  135. package/dist/typescript/commonjs/shared/constants.d.ts.map +0 -1
  136. package/dist/typescript/commonjs/types/common.types.d.ts +0 -5
  137. package/dist/typescript/commonjs/types/common.types.d.ts.map +0 -1
  138. package/dist/typescript/module/features/gifCelebrations/GifCelebrations.d.ts +0 -10
  139. package/dist/typescript/module/features/gifCelebrations/GifCelebrations.d.ts.map +0 -1
  140. package/dist/typescript/module/features/gifCelebrations/components/Backdrop.d.ts +0 -10
  141. package/dist/typescript/module/features/gifCelebrations/components/Backdrop.d.ts.map +0 -1
  142. package/dist/typescript/module/features/gifCelebrations/components/ContentContainer.d.ts +0 -10
  143. package/dist/typescript/module/features/gifCelebrations/components/ContentContainer.d.ts.map +0 -1
  144. package/dist/typescript/module/features/gifCelebrations/components/Gif.d.ts +0 -10
  145. package/dist/typescript/module/features/gifCelebrations/components/Gif.d.ts.map +0 -1
  146. package/dist/typescript/module/features/gifCelebrations/components/Progress.d.ts +0 -10
  147. package/dist/typescript/module/features/gifCelebrations/components/Progress.d.ts.map +0 -1
  148. package/dist/typescript/module/features/gifCelebrations/constants.d.ts +0 -26
  149. package/dist/typescript/module/features/gifCelebrations/constants.d.ts.map +0 -1
  150. package/dist/typescript/module/features/gifCelebrations/helpers.d.ts +0 -29
  151. package/dist/typescript/module/features/gifCelebrations/helpers.d.ts.map +0 -1
  152. package/dist/typescript/module/features/gifCelebrations/index.d.ts +0 -3
  153. package/dist/typescript/module/features/gifCelebrations/index.d.ts.map +0 -1
  154. package/dist/typescript/module/features/gifCelebrations/model/GifCelebrations.cache.d.ts +0 -19
  155. package/dist/typescript/module/features/gifCelebrations/model/GifCelebrations.cache.d.ts.map +0 -1
  156. package/dist/typescript/module/features/gifCelebrations/model/GifCelebrations.model.d.ts +0 -26
  157. package/dist/typescript/module/features/gifCelebrations/model/GifCelebrations.model.d.ts.map +0 -1
  158. package/dist/typescript/module/features/gifCelebrations/model/GifCelebrationsApi.d.ts +0 -6
  159. package/dist/typescript/module/features/gifCelebrations/model/GifCelebrationsApi.d.ts.map +0 -1
  160. package/dist/typescript/module/features/gifCelebrations/types/model.types.d.ts +0 -45
  161. package/dist/typescript/module/features/gifCelebrations/types/model.types.d.ts.map +0 -1
  162. package/dist/typescript/module/shared/constants.d.ts +0 -2
  163. package/dist/typescript/module/shared/constants.d.ts.map +0 -1
  164. package/dist/typescript/module/types/common.types.d.ts +0 -5
  165. package/dist/typescript/module/types/common.types.d.ts.map +0 -1
  166. package/src/features/gifCelebrations/GifCelebrations.tsx +0 -75
  167. package/src/features/gifCelebrations/assets/confetti.webp +0 -0
  168. package/src/features/gifCelebrations/assets/gifFallback.gif +0 -0
  169. package/src/features/gifCelebrations/components/Backdrop.tsx +0 -41
  170. package/src/features/gifCelebrations/components/ContentContainer.tsx +0 -44
  171. package/src/features/gifCelebrations/components/Gif.tsx +0 -89
  172. package/src/features/gifCelebrations/components/Progress.tsx +0 -106
  173. package/src/features/gifCelebrations/constants.ts +0 -32
  174. package/src/features/gifCelebrations/helpers.ts +0 -144
  175. package/src/features/gifCelebrations/index.ts +0 -2
  176. package/src/features/gifCelebrations/model/GifCelebrations.cache.ts +0 -51
  177. package/src/features/gifCelebrations/model/GifCelebrations.model.ts +0 -192
  178. package/src/features/gifCelebrations/model/GifCelebrationsApi.ts +0 -10
  179. package/src/features/gifCelebrations/types/model.types.ts +0 -53
  180. package/src/react-app-env.d.ts +0 -6
  181. package/src/shared/constants.ts +0 -3
  182. package/src/types/common.types.ts +0 -4
@@ -1,66 +1,66 @@
1
1
  import { createEffect, type Effect } from 'effector'
2
2
 
3
3
  type LikeCanceledError = {
4
- code?: string
4
+ code?: string
5
5
  }
6
6
 
7
7
  export type ControlledEffect<P, T> = Effect<P, T> & {
8
- controller: AbortController
8
+ controller: AbortController
9
9
  }
10
10
 
11
11
  type ControlledRequestProps<P> = {
12
- data: P
13
- controller?: AbortController
14
- abortAfter?: number
12
+ data: P
13
+ controller?: AbortController
14
+ abortAfter?: number
15
15
  }
16
16
 
17
17
  type RequestOptionalConfig = { signal?: AbortSignal }
18
18
 
19
19
  export function controlledRequest<R = void, P = void>(
20
- request: (props: P, config?: RequestOptionalConfig) => Promise<R>,
20
+ request: (props: P, config?: RequestOptionalConfig) => Promise<R>,
21
21
  ) {
22
- return async ({
23
- data,
24
- controller = new AbortController(),
25
- abortAfter = 20000,
26
- }: ControlledRequestProps<P>) => {
27
- let timeout: ReturnType<typeof setTimeout> | null = null
22
+ return async ({
23
+ data,
24
+ controller = new AbortController(),
25
+ abortAfter = 20000,
26
+ }: ControlledRequestProps<P>) => {
27
+ let timeout: ReturnType<typeof setTimeout> | null = null
28
28
 
29
- if (abortAfter) {
30
- timeout = setTimeout(() => {
31
- controller.abort('timeout')
32
- }, abortAfter)
33
- }
34
-
35
- try {
36
- const response = await request(data, { signal: controller?.signal })
37
- if (timeout !== null) clearTimeout(timeout)
38
- return response
39
- } catch (error: unknown) {
40
- if ((error as LikeCanceledError).code === 'ERR_CANCELED') {
41
- if (controller.signal.reason === 'timeout') {
42
- throw new Error('Request timed out')
29
+ if (abortAfter) {
30
+ timeout = setTimeout(() => {
31
+ controller.abort('timeout')
32
+ }, abortAfter)
43
33
  }
44
- throw new Error('Request aborted manually')
45
- }
46
34
 
47
- throw error
35
+ try {
36
+ const response = await request(data, { signal: controller?.signal })
37
+ if (timeout !== null) clearTimeout(timeout)
38
+ return response
39
+ } catch (error: unknown) {
40
+ if ((error as LikeCanceledError).code === 'ERR_CANCELED') {
41
+ if (controller.signal.reason === 'timeout') {
42
+ throw new Error('Request timed out')
43
+ }
44
+ throw new Error('Request aborted manually')
45
+ }
46
+
47
+ throw error
48
+ }
48
49
  }
49
- }
50
50
  }
51
51
 
52
- export const createControllerEffect = <T, P = void>(
53
- fn: (props: P, config?: RequestOptionalConfig) => Promise<T>,
52
+ export const createControllerEffect = <T, P>(
53
+ fn: (props: P, config?: RequestOptionalConfig) => Promise<T>,
54
54
  ) => {
55
- const request = controlledRequest<T, P>(fn)
56
- const effect = createEffect((data: P) =>
57
- request({ data, controller: effect.controller }),
58
- ) as ControlledEffect<P, T>
59
- effect.controller = new AbortController()
60
-
61
- effect.fail.watch(() => {
55
+ const request = controlledRequest<T, P>(fn)
56
+ const effect = createEffect((data: P) =>
57
+ request({ data, controller: effect.controller }),
58
+ ) as ControlledEffect<P, T>
62
59
  effect.controller = new AbortController()
63
- })
64
60
 
65
- return effect
61
+ effect.fail.watch(() => {
62
+ effect.controller = new AbortController()
63
+ })
64
+
65
+ return effect
66
66
  }
@@ -1,6 +1,6 @@
1
1
  import { getText } from '../../shared/translation/helpers'
2
2
 
3
- export const noop = () => {}
3
+ export const noop = () => {};
4
4
 
5
5
  export const generateRandomId = () =>
6
6
  Date.now().toString(36) + Math.random().toString(36).substring(2)
@@ -18,10 +18,5 @@
18
18
  "errorMessage": "Something went wrong! Try again",
19
19
  "howCanIHelp": "Hi! Do you want help?",
20
20
  "showError": "Show error"
21
- },
22
- "gifCelebrations": {
23
- "greatStart": "Great start!",
24
- "onTheWay": "On the way!",
25
- "almostThere": "Almost there"
26
21
  }
27
22
  }
@@ -18,10 +18,5 @@
18
18
  "errorMessage": "Something went wrong! Try again",
19
19
  "howCanIHelp": "Hi! Do you want help?",
20
20
  "showError": "Show error"
21
- },
22
- "gifCelebrations": {
23
- "greatStart": "Great start!",
24
- "onTheWay": "On the way!",
25
- "almostThere": "Almost there"
26
21
  }
27
22
  }
@@ -18,10 +18,5 @@
18
18
  "errorMessage": "Något gick snett! Försök igen",
19
19
  "howCanIHelp": "Hej! Hur kan jag hjälpa dig?",
20
20
  "showError": "Visa fel"
21
- },
22
- "gifCelebrations": {
23
- "greatStart": "Bra start!",
24
- "onTheWay": "På god väg!",
25
- "almostThere": "Nästan där"
26
21
  }
27
22
  }
@@ -1,62 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.GifCelebrations = void 0;
7
- var _react = _interopRequireWildcard(require("react"));
8
- var _Gif = require("./components/Gif.js");
9
- var _Progress = require("./components/Progress.js");
10
- var _ContentContainer = require("./components/ContentContainer.js");
11
- var _Backdrop = require("./components/Backdrop.js");
12
- var _reactNativeReanimated = require("react-native-reanimated");
13
- var _effectorReact = require("effector-react");
14
- var _constants = require("./constants.js");
15
- var _jsxRuntime = require("react/jsx-runtime");
16
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
17
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
18
- const GifCelebrations = ({
19
- model,
20
- TextComponent
21
- }) => {
22
- const [problemsAmount, resolvedProblemsAmount, activeGif] = (0, _effectorReact.useUnit)([model.$problemsAmount, model.$resolvedProblemsAmount, model.$activeGif]);
23
- const completedPercent = resolvedProblemsAmount && problemsAmount && Math.round(resolvedProblemsAmount / problemsAmount * 100);
24
- const progress = (0, _reactNativeReanimated.useSharedValue)(0);
25
- const stopAnimation = () => {
26
- model.stop();
27
- progress.value = 0;
28
- };
29
- const playAnimation = () => {
30
- progress.value = (0, _reactNativeReanimated.withSequence)((0, _reactNativeReanimated.withTiming)(1, {
31
- duration: _constants.ANIMATION_DURATION,
32
- easing: _reactNativeReanimated.Easing.bezier(0.52, 0.16, 0.26, 0.77)
33
- }), (0, _reactNativeReanimated.withTiming)(2, {
34
- duration: _constants.ANIMATION_DURATION,
35
- easing: _reactNativeReanimated.Easing.bezier(0.71, 0.09, 0.49, 0.89)
36
- }, () => (0, _reactNativeReanimated.runOnJS)(stopAnimation)()));
37
- };
38
- (0, _react.useEffect)(() => {
39
- if (activeGif) {
40
- playAnimation();
41
- }
42
- }, [activeGif]);
43
- if (!activeGif) {
44
- return null;
45
- }
46
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Backdrop.Backdrop, {
47
- progress: progress,
48
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ContentContainer.ContentContainer, {
49
- progress: progress,
50
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Gif.Gif, {
51
- gifObject: activeGif,
52
- getCachePathMethod: model.cache.getCachePathMethod,
53
- TextComponent: TextComponent
54
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Progress.Progress, {
55
- progress: progress,
56
- completedPercent: completedPercent
57
- })]
58
- })
59
- });
60
- };
61
- exports.GifCelebrations = GifCelebrations;
62
- //# sourceMappingURL=GifCelebrations.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_Gif","_Progress","_ContentContainer","_Backdrop","_reactNativeReanimated","_effectorReact","_constants","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","GifCelebrations","model","TextComponent","problemsAmount","resolvedProblemsAmount","activeGif","useUnit","$problemsAmount","$resolvedProblemsAmount","$activeGif","completedPercent","Math","round","progress","useSharedValue","stopAnimation","stop","value","playAnimation","withSequence","withTiming","duration","ANIMATION_DURATION","easing","Easing","bezier","runOnJS","useEffect","jsx","Backdrop","children","jsxs","ContentContainer","Gif","gifObject","getCachePathMethod","cache","Progress","exports"],"sourceRoot":"../../../../src","sources":["features/gifCelebrations/GifCelebrations.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,IAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,sBAAA,GAAAL,OAAA;AACA,IAAAM,cAAA,GAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AAAgD,IAAAQ,WAAA,GAAAR,OAAA;AAAA,SAAAS,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAA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A,gBACnC,IAAAnD,WAAA,CAAAiD,GAAA,EAACxD,IAAA,CAAA6D,GAAG;QACFC,SAAS,EAAE7B,SAAU;QACrB8B,kBAAkB,EAAElC,KAAK,CAACmC,KAAK,CAACD,kBAAmB;QACnDjC,aAAa,EAAEA;MAAc,CAC9B,CAAC,eACF,IAAAvB,WAAA,CAAAiD,GAAA,EAACvD,SAAA,CAAAgE,QAAQ;QAACxB,QAAQ,EAAEA,QAAS;QAACH,gBAAgB,EAAEA;MAAiB,CAAE,CAAC;IAAA,CACpD;EAAC,CACX,CAAC;AAEf,CAAC;AAAA4B,OAAA,CAAAtC,eAAA,GAAAA,eAAA","ignoreList":[]}
@@ -1,44 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.Backdrop = void 0;
7
- var _reactNative = require("react-native");
8
- var _react = _interopRequireDefault(require("react"));
9
- var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
10
- var _constants = require("../constants.js");
11
- var _jsxRuntime = require("react/jsx-runtime");
12
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
13
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
14
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
- const Backdrop = ({
16
- children,
17
- progress
18
- }) => {
19
- const {
20
- width,
21
- height
22
- } = (0, _reactNative.useWindowDimensions)();
23
- const backdropAnimatedStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
24
- backgroundColor: (0, _reactNativeReanimated.interpolateColor)(progress.value, [0, 1, 2], [_constants.BACKDROP_COLOR.INITIAL, _constants.BACKDROP_COLOR.FINAL, _constants.BACKDROP_COLOR.INITIAL])
25
- }), [progress]);
26
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
27
- style: [styles.backdrop, {
28
- width,
29
- height
30
- }, backdropAnimatedStyle],
31
- children: children
32
- });
33
- };
34
- exports.Backdrop = Backdrop;
35
- const styles = _reactNative.StyleSheet.create({
36
- backdrop: {
37
- position: 'absolute',
38
- zIndex: 10100,
39
- justifyContent: 'center',
40
- alignItems: 'center',
41
- backgroundColor: 'rgba(51, 51, 51, 0.33);'
42
- }
43
- });
44
- //# sourceMappingURL=Backdrop.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactNative","require","_react","_interopRequireDefault","_reactNativeReanimated","_interopRequireWildcard","_constants","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","Backdrop","children","progress","width","height","useWindowDimensions","backdropAnimatedStyle","useAnimatedStyle","backgroundColor","interpolateColor","value","BACKDROP_COLOR","INITIAL","FINAL","jsx","View","style","styles","backdrop","exports","StyleSheet","create","position","zIndex","justifyContent","alignItems"],"sourceRoot":"../../../../../src","sources":["features/gifCelebrations/components/Backdrop.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,sBAAA,GAAAC,uBAAA,CAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AAA6C,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAO,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE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AG,IAAAC,gCAAmB,EAAC,CAAC;EAE/C,MAAMC,qBAAqB,GAAG,IAAAC,uCAAgB,EAC5C,OAAO;IACLC,eAAe,EAAE,IAAAC,uCAAgB,EAC/BP,QAAQ,CAACQ,KAAK,EACd,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EACT,CAACC,yBAAc,CAACC,OAAO,EAAED,yBAAc,CAACE,KAAK,EAAEF,yBAAc,CAACC,OAAO,CACvE;EACF,CAAC,CAAC,EACF,CAACV,QAAQ,CACX,CAAC;EAED,oBACE,IAAAvB,WAAA,CAAAmC,GAAA,EAACtC,sBAAA,CAAAU,OAAQ,CAAC6B,IAAI;IAACC,KAAK,EAAE,CAACC,MAAM,CAACC,QAAQ,EAAE;MAAEf,KAAK;MAAEC;IAAO,CAAC,EAAEE,qBAAqB,CAAE;IAAAL,QAAA,EAC/EA;EAAQ,CACI,CAAC;AAEpB,CAAC;AAAAkB,OAAA,CAAAnB,QAAA,GAAAA,QAAA;AAED,MAAMiB,MAAM,GAAGG,uBAAU,CAACC,MAAM,CAAC;EAC/BH,QAAQ,EAAE;IACRI,QAAQ,EAAE,UAAU;IACpBC,MAAM,EAAE,KAAK;IACbC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBjB,eAAe,EAAE;EACnB;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,46 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.ContentContainer = void 0;
7
- var _reactNative = require("react-native");
8
- var _react = _interopRequireDefault(require("react"));
9
- var _reactNativeUi = require("@magmamath/react-native-ui");
10
- var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
11
- var _constants = require("../constants.js");
12
- var _jsxRuntime = require("react/jsx-runtime");
13
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
14
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
15
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
16
- const ContentContainer = ({
17
- children,
18
- progress
19
- }) => {
20
- const {
21
- width
22
- } = (0, _reactNative.useWindowDimensions)();
23
- const RIGHT_POSITION = width / 2 + _constants.CONTENT_CONTAINER.CONTAINER_WIDTH / 2 + _constants.CONTENT_CONTAINER.ROTATION_PADDING;
24
- const LEFT_POSITION = -RIGHT_POSITION - _constants.CONTENT_CONTAINER.ROTATION_PADDING;
25
- const animatedStyles = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
26
- transform: [{
27
- translateX: (0, _reactNativeReanimated.interpolate)(progress.value, [0, 1, 2], [LEFT_POSITION, 0, RIGHT_POSITION])
28
- }, {
29
- rotate: `${(0, _reactNativeReanimated.interpolate)(progress.value, [0, 1, 2], [-_constants.CONTENT_CONTAINER.ANGLE, 0, _constants.CONTENT_CONTAINER.ANGLE])}deg`
30
- }]
31
- }), [progress, RIGHT_POSITION, LEFT_POSITION]);
32
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
33
- style: [styles.container, animatedStyles],
34
- children: children
35
- });
36
- };
37
- exports.ContentContainer = ContentContainer;
38
- const styles = _reactNative.StyleSheet.create({
39
- container: {
40
- width: _constants.CONTENT_CONTAINER.CONTAINER_WIDTH,
41
- alignItems: 'center',
42
- gap: _reactNativeUi.SPACING[800],
43
- position: 'absolute'
44
- }
45
- });
46
- //# sourceMappingURL=ContentContainer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactNative","require","_react","_interopRequireDefault","_reactNativeUi","_reactNativeReanimated","_interopRequireWildcard","_constants","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ContentContainer","children","progress","width","useWindowDimensions","RIGHT_POSITION","CONTENT_CONTAINER","CONTAINER_WIDTH","ROTATION_PADDING","LEFT_POSITION","animatedStyles","useAnimatedStyle","transform","translateX","interpolate","value","rotate","ANGLE","jsx","View","style","styles","container","exports","StyleSheet","create","alignItems","gap","SPACING","position"],"sourceRoot":"../../../../../src","sources":["features/gifCelebrations/components/ContentContainer.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,sBAAA,GAAAC,uBAAA,CAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AAAgD,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAQ,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAJ,wBAAAI,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA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,EACD;MACEW,MAAM,EAAE,GAAG,IAAAF,kCAAW,EAACZ,QAAQ,CAACa,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAACT,4BAAiB,CAACW,KAAK,EAAE,CAAC,EAAEX,4BAAiB,CAACW,KAAK,CAAC,CAAC;IAC3G,CAAC;EAEL,CAAC,CAAC,EACF,CAACf,QAAQ,EAAEG,cAAc,EAAEI,aAAa,CAC1C,CAAC;EAED,oBAAO,IAAA9B,WAAA,CAAAuC,GAAA,EAAC1C,sBAAA,CAAAU,OAAQ,CAACiC,IAAI;IAACC,KAAK,EAAE,CAACC,MAAM,CAACC,SAAS,EAAEZ,cAAc,CAAE;IAAAT,QAAA,EAAEA;EAAQ,CAAgB,CAAC;AAC7F,CAAC;AAAAsB,OAAA,CAAAvB,gBAAA,GAAAA,gBAAA;AAED,MAAMqB,MAAM,GAAGG,uBAAU,CAACC,MAAM,CAAC;EAC/BH,SAAS,EAAE;IACTnB,KAAK,EAAEG,4BAAiB,CAACC,eAAe;IACxCmB,UAAU,EAAE,QAAQ;IACpBC,GAAG,EAAEC,sBAAO,CAAC,GAAG,CAAC;IACjBC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,91 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.Gif = void 0;
7
- var _reactNative = require("react-native");
8
- var _react = _interopRequireWildcard(require("react"));
9
- var _reactNativeUi = require("@magmamath/react-native-ui");
10
- var _constants = require("../constants.js");
11
- var _index = require("../../../shared/translation/index.js");
12
- var _helpers = require("../helpers.js");
13
- var _gifFallback = _interopRequireDefault(require("../assets/gifFallback.gif"));
14
- var _constants2 = require("../../../shared/constants.js");
15
- var _jsxRuntime = require("react/jsx-runtime");
16
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
17
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
18
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
19
- const Gif = ({
20
- gifObject,
21
- getCachePathMethod,
22
- TextComponent
23
- }) => {
24
- const [size, setSize] = (0, _react.useState)(null);
25
- const [pathOrUri, setPathOrUri] = (0, _react.useState)('');
26
- const t = (0, _index.useText)();
27
- const gifGroupNumber = Number(gifObject.group.replace('group', ''));
28
- const gifLabel = (0, _helpers.getGifLabel)(gifGroupNumber);
29
- (0, _react.useLayoutEffect)(() => {
30
- const loadImageSize = async () => {
31
- let localPath;
32
- try {
33
- localPath = await (0, _helpers.getImagePath)(gifObject.url, getCachePathMethod);
34
- } catch (error) {
35
- localPath = _constants2.IS_WEB ? _gifFallback.default : _reactNative.Image.resolveAssetSource(_gifFallback.default).uri;
36
- console.error('Error fetching image from cache:', error);
37
- }
38
- _reactNative.Image.getSize(localPath, (width, height) => {
39
- setSize({
40
- width: (0, _helpers.constrainDimension)(width, _constants.MIN_GIF_SIZE, _constants.MAX_GIF_SIZE.WIDTH),
41
- height: (0, _helpers.constrainDimension)(height, _constants.MIN_GIF_SIZE, _constants.MAX_GIF_SIZE.HEIGHT)
42
- });
43
- setPathOrUri(localPath);
44
- });
45
- };
46
- loadImageSize();
47
- }, [gifObject.url]);
48
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
49
- style: styles.backgroundContainer,
50
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
51
- style: styles.container,
52
- children: [size && pathOrUri && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
53
- alt: "Funny celebration animated image",
54
- source: {
55
- uri: pathOrUri
56
- },
57
- width: size.width,
58
- height: size.height,
59
- style: [styles.image, {
60
- width: size.width,
61
- height: size.height
62
- }] //this sizes duplication is needed for compatibility with web and rn
63
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
64
- style: styles.textContainer,
65
- children: TextComponent(t(gifLabel))
66
- })]
67
- })
68
- });
69
- };
70
- exports.Gif = Gif;
71
- const styles = _reactNative.StyleSheet.create({
72
- backgroundContainer: {
73
- backgroundColor: 'rgba(255, 255, 255, 0.6)',
74
- borderRadius: 23,
75
- padding: _reactNativeUi.SPACING[200]
76
- },
77
- container: {
78
- padding: _reactNativeUi.SPACING[1600],
79
- borderRadius: _reactNativeUi.BORDER_RADIUS[400],
80
- backgroundColor: _reactNativeUi.COLORS.NEUTRAL_1
81
- },
82
- image: {
83
- borderRadius: _reactNativeUi.BORDER_RADIUS[100]
84
- },
85
- textContainer: {
86
- position: 'absolute',
87
- bottom: 74,
88
- alignSelf: 'center'
89
- }
90
- });
91
- //# sourceMappingURL=Gif.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactNative","require","_react","_interopRequireWildcard","_reactNativeUi","_constants","_index","_helpers","_gifFallback","_interopRequireDefault","_constants2","_jsxRuntime","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","Gif","gifObject","getCachePathMethod","TextComponent","size","setSize","useState","pathOrUri","setPathOrUri","useText","gifGroupNumber","Number","group","replace","gifLabel","getGifLabel","useLayoutEffect","loadImageSize","localPath","getImagePath","url","error","IS_WEB","gifFallback","Image","resolveAssetSource","uri","console","getSize","width","height","constrainDimension","MIN_GIF_SIZE","MAX_GIF_SIZE","WIDTH","HEIGHT","jsx","View","style","styles","backgroundContainer","children","jsxs","container","alt","source","image","textContainer","exports","StyleSheet","create","backgroundColor","borderRadius","padding","SPACING","BORDER_RADIUS","COLORS","NEUTRAL_1","position","bottom","alignSelf"],"sourceRoot":"../../../../../src","sources":["features/gifCelebrations/components/Gif.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AAEA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAC,sBAAA,CAAAR,OAAA;AACA,IAAAS,WAAA,GAAAT,OAAA;AAAkD,IAAAU,WAAA,GAAAV,OAAA;AAAA,SAAAQ,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,yBAAAH,CAAA,6BAAAI,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAD,wBAAA,YAAAA,CAAAH,CAAA,WAAAA,CAAA,GAAAM,CAAA,GAAAD,CAAA,KAAAL,CAAA;AAAA,SAAAT,wBAAAS,CAAA,EAAAK,CAAA,SAAAA,CAAA,IAAAL,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAE,OAAA,EAAAF,CAAA,QAAAM,CAAA,GAAAH,wBAAA,CAAAE,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAC,GAAA,CAAAP,CAAA,UAAAM,CAAA,CAAAE,GAAA,CAAAR,CAAA,OAAAS,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAf,CAAA,oBA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EAACpE,YAAA,CAAAqE,IAAI;QAACC,KAAK,EAAEC,MAAM,CAACQ,aAAc;QAAAN,QAAA,EAAEtC,aAAa,CAACjB,CAAC,CAAC4B,QAAQ,CAAC;MAAC,CAAO,CAAC;IAAA,CAClE;EAAC,CACH,CAAC;AAEX,CAAC;AAAAkC,OAAA,CAAAhD,GAAA,GAAAA,GAAA;AAED,MAAMuC,MAAM,GAAGU,uBAAU,CAACC,MAAM,CAAC;EAC/BV,mBAAmB,EAAE;IACnBW,eAAe,EAAE,0BAA0B;IAC3CC,YAAY,EAAE,EAAE;IAChBC,OAAO,EAAEC,sBAAO,CAAC,GAAG;EACtB,CAAC;EACDX,SAAS,EAAE;IACTU,OAAO,EAAEC,sBAAO,CAAC,IAAI,CAAC;IACtBF,YAAY,EAAEG,4BAAa,CAAC,GAAG,CAAC;IAChCJ,eAAe,EAAEK,qBAAM,CAACC;EAC1B,CAAC;EACDX,KAAK,EAAE;IACLM,YAAY,EAAEG,4BAAa,CAAC,GAAG;EACjC,CAAC;EACDR,aAAa,EAAE;IACbW,QAAQ,EAAE,UAAU;IACpBC,MAAM,EAAE,EAAE;IACVC,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,96 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.Progress = void 0;
7
- var _reactNative = require("react-native");
8
- var _react = _interopRequireDefault(require("react"));
9
- var _reactNativeUi = require("@magmamath/react-native-ui");
10
- var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
11
- var _confetti = _interopRequireDefault(require("../assets/confetti.webp"));
12
- var _helpers = require("../helpers.js");
13
- var _jsxRuntime = require("react/jsx-runtime");
14
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
15
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
16
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
17
- const Progress = ({
18
- progress,
19
- completedPercent
20
- }) => {
21
- const progressLineWidth = (0, _helpers.getProgressLineWidth)(completedPercent);
22
- const animatedStyles = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
23
- width: `${(0, _reactNativeReanimated.interpolate)(progress.value, [0, 1, 2], [0, progressLineWidth, progressLineWidth])}%`
24
- }), [progress, progressLineWidth]);
25
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
26
- style: styles.backgroundContainer,
27
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
28
- style: styles.container,
29
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
30
- style: styles.progressContainer,
31
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
32
- style: [styles.progress, animatedStyles],
33
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Typography, {
34
- variant: _reactNativeUi.HeadingVariants.H1,
35
- style: styles.percent,
36
- children: `${completedPercent}%`
37
- })
38
- })
39
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
40
- source: _reactNativeUi.IS_WEB ? {
41
- uri: _confetti.default
42
- } : require('../assets/confetti.webp'),
43
- style: styles.confetti
44
- })]
45
- })
46
- });
47
- };
48
- exports.Progress = Progress;
49
- const styles = _reactNative.StyleSheet.create({
50
- backgroundContainer: {
51
- backgroundColor: 'rgba(255, 255, 255, 0.6)',
52
- borderRadius: 23,
53
- padding: _reactNativeUi.SPACING[200],
54
- width: '100%'
55
- },
56
- container: {
57
- width: '100%',
58
- height: 116,
59
- flexDirection: 'row',
60
- alignItems: 'center',
61
- borderRadius: _reactNativeUi.BORDER_RADIUS[400],
62
- backgroundColor: _reactNativeUi.COLORS.NEUTRAL_1,
63
- paddingLeft: _reactNativeUi.SPACING[400],
64
- paddingRight: _reactNativeUi.SPACING[200],
65
- gap: _reactNativeUi.SPACING[100]
66
- },
67
- progressContainer: {
68
- height: 50,
69
- flexGrow: 1,
70
- backgroundColor: _reactNativeUi.COLORS.NEUTRAL_5,
71
- borderRadius: 90,
72
- overflow: 'hidden'
73
- },
74
- progress: {
75
- position: 'absolute',
76
- height: '100%',
77
- backgroundColor: _reactNativeUi.COLORS.PRIMARY_BLUE,
78
- borderRadius: _reactNativeUi.BORDER_RADIUS[200],
79
- justifyContent: 'center',
80
- alignItems: 'flex-end',
81
- paddingRight: 10.6,
82
- overflow: 'hidden'
83
- },
84
- confetti: {
85
- width: 75,
86
- height: 70,
87
- marginHorizontal: _reactNativeUi.SPACING[200]
88
- },
89
- percent: {
90
- position: 'absolute',
91
- paddingRight: 10,
92
- color: _reactNativeUi.COLORS.NEUTRAL_1,
93
- fontWeight: '700'
94
- }
95
- });
96
- //# sourceMappingURL=Progress.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactNative","require","_react","_interopRequireDefault","_reactNativeUi","_reactNativeReanimated","_interopRequireWildcard","_confetti","_helpers","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","Progress","progress","completedPercent","progressLineWidth","getProgressLineWidth","animatedStyles","useAnimatedStyle","width","interpolate","value","jsx","View","style","styles","backgroundContainer","children","jsxs","container","progressContainer","Typography","variant","HeadingVariants","H1","percent","Image","source","IS_WEB","uri","confettiImage","confetti","exports","StyleSheet","create","backgroundColor","borderRadius","padding","SPACING","height","flexDirection","alignItems","BORDER_RADIUS","COLORS","NEUTRAL_1","paddingLeft","paddingRight","gap","flexGrow","NEUTRAL_5","overflow","position","PRIMARY_BLUE","justifyContent","marginHorizontal","color","fontWeight"],"sourceRoot":"../../../../../src","sources":["features/gifCelebrations/components/Progress.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AAQA,IAAAI,sBAAA,GAAAC,uBAAA,CAAAL,OAAA;AACA,IAAAM,SAAA,GAAAJ,sBAAA,CAAAF,OAAA;AAEA,IAAAO,QAAA,GAAAP,OAAA;AAAiD,IAAAQ,WAAA,GAAAR,OAAA;AAAA,SAAAS,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAL,wBAAAK,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,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BmB,MAAM,EAAE,EAAE;IACVS,QAAQ,EAAE,CAAC;IACXb,eAAe,EAAEQ,qBAAM,CAACM,SAAS;IACjCb,YAAY,EAAE,EAAE;IAChBc,QAAQ,EAAE;EACZ,CAAC;EACD/C,QAAQ,EAAE;IACRgD,QAAQ,EAAE,UAAU;IACpBZ,MAAM,EAAE,MAAM;IACdJ,eAAe,EAAEQ,qBAAM,CAACS,YAAY;IACpChB,YAAY,EAAEM,4BAAa,CAAC,GAAG,CAAC;IAChCW,cAAc,EAAE,QAAQ;IACxBZ,UAAU,EAAE,UAAU;IACtBK,YAAY,EAAE,IAAI;IAClBI,QAAQ,EAAE;EACZ,CAAC;EACDnB,QAAQ,EAAE;IACRtB,KAAK,EAAE,EAAE;IACT8B,MAAM,EAAE,EAAE;IACVe,gBAAgB,EAAEhB,sBAAO,CAAC,GAAG;EAC/B,CAAC;EACDb,OAAO,EAAE;IACP0B,QAAQ,EAAE,UAAU;IACpBL,YAAY,EAAE,EAAE;IAChBS,KAAK,EAAEZ,qBAAM,CAACC,SAAS;IACvBY,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,34 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.MIN_WIDTH_FOR_TWO_DIGITS = exports.MIN_WIDTH_FOR_ONE_DIGIT = exports.MIN_PROBLEMS_TO_SHOW_GIF = exports.MIN_GIF_SIZE = exports.MAX_GIF_SIZE = exports.GROUPS_PERCENTAGES = exports.GIFS_FETCHED_KEY = exports.GET_GIFS_TIMEOUT = exports.CONTENT_CONTAINER = exports.BACKDROP_COLOR = exports.ANIMATION_DURATION = void 0;
7
- const BACKDROP_COLOR = exports.BACKDROP_COLOR = {
8
- INITIAL: 'rgba(51, 51, 51, 0)',
9
- FINAL: 'rgba(51, 51, 51, 0.66)'
10
- };
11
- const CONTENT_CONTAINER = exports.CONTENT_CONTAINER = {
12
- ANGLE: 5,
13
- CONTAINER_WIDTH: 769,
14
- ROTATION_PADDING: 44 // to be sure that the content is not cut off on the edges because of rotate transform
15
- };
16
- const ANIMATION_DURATION = exports.ANIMATION_DURATION = 1750;
17
- const MIN_PROBLEMS_TO_SHOW_GIF = exports.MIN_PROBLEMS_TO_SHOW_GIF = 7;
18
- const MAX_GIF_SIZE = exports.MAX_GIF_SIZE = {
19
- WIDTH: 480,
20
- HEIGHT: 300
21
- };
22
- const MIN_GIF_SIZE = exports.MIN_GIF_SIZE = 300;
23
- const GROUPS_PERCENTAGES = exports.GROUPS_PERCENTAGES = {
24
- group1: [15, 20, 25, 30],
25
- // Early celebrations
26
- group2: [33, 40, 45, 50],
27
- // Mid celebrations
28
- group3: [60, 66, 75, 80] // Party
29
- };
30
- const MIN_WIDTH_FOR_ONE_DIGIT = exports.MIN_WIDTH_FOR_ONE_DIGIT = 12;
31
- const MIN_WIDTH_FOR_TWO_DIGITS = exports.MIN_WIDTH_FOR_TWO_DIGITS = 15;
32
- const GET_GIFS_TIMEOUT = exports.GET_GIFS_TIMEOUT = 5000;
33
- const GIFS_FETCHED_KEY = exports.GIFS_FETCHED_KEY = 'gifsFetchedTimestamp';
34
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["BACKDROP_COLOR","exports","INITIAL","FINAL","CONTENT_CONTAINER","ANGLE","CONTAINER_WIDTH","ROTATION_PADDING","ANIMATION_DURATION","MIN_PROBLEMS_TO_SHOW_GIF","MAX_GIF_SIZE","WIDTH","HEIGHT","MIN_GIF_SIZE","GROUPS_PERCENTAGES","group1","group2","group3","MIN_WIDTH_FOR_ONE_DIGIT","MIN_WIDTH_FOR_TWO_DIGITS","GET_GIFS_TIMEOUT","GIFS_FETCHED_KEY"],"sourceRoot":"../../../../src","sources":["features/gifCelebrations/constants.ts"],"mappings":";;;;;;AAAO,MAAMA,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG;EAC5BE,OAAO,EAAE,qBAAqB;EAC9BC,KAAK,EAA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