@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,114 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.shouldRefreshGifs = exports.getProgressLineWidth = exports.getImagePath = exports.getGifLabel = exports.generateProblemsGifsTable = exports.generateGifsStructure = exports.findGroupForPercentage = exports.constrainDimension = void 0;
7
- var _constants = require("./constants.js");
8
- var _reactNative = require("react-native");
9
- /**
10
- * Number of problems When we show gif
11
- * <6 Never
12
- * 7-12 50% completion
13
- * 13-18 33%, 66% completion
14
- * 19-24 25%, 50%, 75 completion
15
- * 25-30 20%, 40%, 60%, 80% completion
16
- * .>30 15%, 30%, 45%, 60%, 75% completion
17
- *
18
- * We are also going to have different buckets with different gifs. The logic is as follows:
19
- * Group 1: 15%, 20%, 25%, 30% - Early celebrations
20
- * Group 2: 33%, 40%, 45%, 50% - Mid celebrations
21
- * Group 3: 60%, 66%, 75%, 80% - Party
22
- * or
23
- * Group 1: <=30% - Early celebrations
24
- * Group 2: >30% <60% - Mid celebrations
25
- * Group 3: >=60% - Party
26
- */
27
- const generateProblemsGifsTable = (problemsAmount, resolvedProblems, gifs) => {
28
- const percentageMilestones = getPercentageMilestones(problemsAmount);
29
- const result = {};
30
- for (const percentage of percentageMilestones) {
31
- const problemNumber = Math.ceil(problemsAmount * (percentage / 100));
32
- if (problemNumber <= resolvedProblems) continue;
33
- const groupKey = findGroupForPercentage(percentage);
34
- const gifsInGroup = gifs[groupKey];
35
- if (!gifsInGroup || gifsInGroup.length === 0) continue;
36
- const unshownGif = gifsInGroup.find(gif => !gif.isShown);
37
- const selectedGif = unshownGif || gifsInGroup[0];
38
- if (selectedGif) {
39
- result[problemNumber] = {
40
- url: selectedGif.url,
41
- group: groupKey
42
- };
43
- }
44
- }
45
- return result;
46
- };
47
- exports.generateProblemsGifsTable = generateProblemsGifsTable;
48
- const getPercentageMilestones = problemsAmount => {
49
- if (problemsAmount <= 12) return [50];
50
- if (problemsAmount <= 18) return [33, 66];
51
- if (problemsAmount <= 24) return [25, 50, 75];
52
- if (problemsAmount <= 30) return [20, 40, 60, 80];
53
- return [15, 30, 45, 60, 75];
54
- };
55
- const generateGifsStructure = gifs => Object.fromEntries(Object.entries(gifs).map(([key, value]) => [key, value.map(url => ({
56
- url,
57
- isShown: false,
58
- group: key
59
- }))]));
60
- exports.generateGifsStructure = generateGifsStructure;
61
- const getGifLabel = relatedGroup => {
62
- if (relatedGroup === 2) {
63
- return 'gifCelebrations.onTheWay';
64
- }
65
- if (relatedGroup === 3) {
66
- return 'gifCelebrations.almostThere';
67
- }
68
- return 'gifCelebrations.greatStart';
69
- };
70
- exports.getGifLabel = getGifLabel;
71
- const getProgressLineWidth = completedPercent => {
72
- if (completedPercent <= 9) {
73
- return _constants.MIN_WIDTH_FOR_ONE_DIGIT;
74
- }
75
- if (completedPercent <= 15) {
76
- return _constants.MIN_WIDTH_FOR_TWO_DIGITS;
77
- }
78
- return completedPercent;
79
- };
80
- exports.getProgressLineWidth = getProgressLineWidth;
81
- const findGroupForPercentage = percentage => {
82
- if (percentage <= 30) {
83
- return 'group1';
84
- }
85
- if (percentage < 60) {
86
- return 'group2';
87
- }
88
- return 'group3';
89
- };
90
- exports.findGroupForPercentage = findGroupForPercentage;
91
- const getImagePath = async (url, cacheMethod) => {
92
- if (cacheMethod) {
93
- const path = await cacheMethod(url);
94
- if (path) return path;
95
- } else {
96
- // @ts-ignore - Image.queryCache works only in web
97
- const isImagesStored = await _reactNative.Image.queryCache([url]).then(images => !!images[url]);
98
- if (isImagesStored) return url;
99
- }
100
- throw new Error('Image not found in cache');
101
- };
102
- exports.getImagePath = getImagePath;
103
- const constrainDimension = (value, min, max) => Math.max(min, Math.min(max, value));
104
- exports.constrainDimension = constrainDimension;
105
- const shouldRefreshGifs = timestamp => {
106
- if (!timestamp) return true;
107
- const REFRESH_INTERVAL_HOURS = 24;
108
- const lastFetchedDate = new Date(timestamp);
109
- const currentDate = new Date();
110
- const diffInHours = (currentDate.getTime() - lastFetchedDate.getTime()) / (1000 * 60 * 60);
111
- return diffInHours > REFRESH_INTERVAL_HOURS;
112
- };
113
- exports.shouldRefreshGifs = shouldRefreshGifs;
114
- //# sourceMappingURL=helpers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_constants","require","_reactNative","generateProblemsGifsTable","problemsAmount","resolvedProblems","gifs","percentageMilestones","getPercentageMilestones","result","percentage","problemNumber","Math","ceil","groupKey","findGroupForPercentage","gifsInGroup","length","unshownGif","find","gif","isShown","selectedGif","url","group","exports","generateGifsStructure","Object","fromEntries","entries","map","key","value","getGifLabel","relatedGroup","getProgressLineWidth","completedPercent","MIN_WIDTH_FOR_ONE_DIGIT","MIN_WIDTH_FOR_TWO_DIGITS","getImagePath","cacheMethod","path","isImagesStored","Image","queryCache","then","images","Error","constrainDimension","min","max","shouldRefreshGifs","timestamp","REFRESH_INTERVAL_HOURS","lastFetchedDate","Date","currentDate","diffInHours","getTime"],"sourceRoot":"../../../../src","sources":["features/gifCelebrations/helpers.ts"],"mappings":";;;;;;AASA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAME,yBAAyB,GAAGA,CACvCC,cAAsB,EACtBC,gBAAwB,EACxBC,IAAmB,KACG;EACtB,MAAMC,oBAAoB,GAAGC,uBAAuB,CAACJ,cAAc,CAAC;EAEpE,MAAMK,MAAyB,GAAG,CAAC,CAAC;EAEpC,KAAK,MAAMC,UAAU,IAAIH,oBAAoB,EAAE;IAC7C,MAAMI,aAAa,GAAGC,IAAI,CAACC,IAAI,CAACT,cAAc,IAAIM,UAAU,GAAG,GAAG,CAAC,CAAC;IAEpE,IAAIC,aAAa,IAAIN,gBAAgB,EAAE;IAEvC,MAAMS,QAAQ,GAAGC,sBAAsB,CAACL,UAAU,CAAC;IACnD,MAAMM,WAAW,GAAGV,IAAI,CAACQ,QAAQ,CAAC;IAElC,IAAI,CAACE,WAAW,IAAIA,WAAW,CAACC,MAAM,KAAK,CAAC,EAAE;IAE9C,MAAMC,UAAU,GAAGF,WAAW,CAACG,IAAI,CAAEC,GAAG,IAAK,CAACA,GAAG,CAACC,OAAO,CAAC;IAE1D,MAAMC,WAAW,GAAGJ,UAAU,IAAIF,WAAW,CAAC,CAAC,CAAC;IAEhD,IAAIM,WAAW,EAAE;MACfb,MAAM,CAACE,aAAa,CAAC,GAAG;QACtBY,GAAG,EAAED,WAAW,CAACC,GAAG;QACpBC,KAAK,EAAEV;MACT,CAAC;IACH;EACF;EAEA,OAAOL,MAAM;AACf,CAAC;AAAAgB,OAAA,CAAAtB,yBAAA,GAAAA,yBAAA;AACD,MAAMK,uBAAuB,GAAIJ,cAAsB,IAAe;EACpE,IAAIA,cAAc,IAAI,EAAE,EAAE,OAAO,CAAC,EAAE,CAAC;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AC,CAAC,GAAGJ,eAAe,CAACI,OAAO,CAAC,CAAC,KAAK,IAAI,GAAG,EAAE,GAAG,EAAE,CAAC;EAE1F,OAAOD,WAAW,GAAGJ,sBAAsB;AAC7C,CAAC;AAAA5B,OAAA,CAAA0B,iBAAA,GAAAA,iBAAA","ignoreList":[]}
@@ -1,20 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "GifCelebrations", {
7
- enumerable: true,
8
- get: function () {
9
- return _GifCelebrations.GifCelebrations;
10
- }
11
- });
12
- Object.defineProperty(exports, "GifCelebrationsModel", {
13
- enumerable: true,
14
- get: function () {
15
- return _GifCelebrationsModel.GifCelebrationsModel;
16
- }
17
- });
18
- var _GifCelebrations = require("./GifCelebrations.js");
19
- var _GifCelebrationsModel = require("./model/GifCelebrations.model.js");
20
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_GifCelebrations","require","_GifCelebrationsModel"],"sourceRoot":"../../../../src","sources":["features/gifCelebrations/index.ts"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;AACA,IAAAC,qBAAA,GAAAD,OAAA","ignoreList":[]}
@@ -1,38 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.GifCelebrationsCache = void 0;
7
- var _effector = require("effector");
8
- var _helpers = require("../helpers.js");
9
- var _reactNative = require("react-native");
10
- class GifCelebrationsCache {
11
- initialSet = (0, _effector.createEvent)();
12
- set = (0, _effector.createEvent)();
13
- reset = (0, _effector.createEvent)();
14
- prefetchAllGifs = (0, _effector.createEffect)(data => {
15
- Object.values(data).forEach(group => {
16
- group.forEach(gifUrl => {
17
- this.prefetchMethod(gifUrl);
18
- });
19
- });
20
- this.initialSet(data);
21
- });
22
- prefetchGifs = (0, _effector.createEffect)(gifs => {
23
- if (!gifs || gifs.length === 0) return;
24
- gifs.forEach(gifUrl => {
25
- this.prefetchMethod(gifUrl);
26
- });
27
- });
28
- $gifs = (0, _effector.createStore)(null).reset(this.reset).on(this.initialSet, (_, gifs) => (0, _helpers.generateGifsStructure)(gifs)).on(this.set, (_, gifs) => gifs);
29
- constructor({
30
- customGetCachePathMethod,
31
- customPrefetchMethod
32
- }) {
33
- this.prefetchMethod = customPrefetchMethod || _reactNative.Image.prefetch;
34
- this.getCachePathMethod = customGetCachePathMethod;
35
- }
36
- }
37
- exports.GifCelebrationsCache = GifCelebrationsCache;
38
- //# sourceMappingURL=GifCelebrations.cache.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_effector","require","_helpers","_reactNative","GifCelebrationsCache","initialSet","createEvent","set","reset","prefetchAllGifs","createEffect","data","Object","values","forEach","group","gifUrl","prefetchMethod","prefetchGifs","gifs","length","$gifs","createStore","on","_","generateGifsStructure","constructor","customGetCachePathMethod","customPrefetchMethod","Image","prefetch","getCachePathMethod","exports"],"sourceRoot":"../../../../../src","sources":["features/gifCelebrations/model/GifCelebrations.cache.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAOA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAOO,MAAMG,oBAAoB,CAAC;EAChBC,UAAU,GAAG,IAAAC,qBAAW,EAAa,CAAC;EACtCC,GAAG,GAAG,IAAAD,qBAAW,EAAgB,CAAC;EAClCE,KAAK,GAAG,IAAAF,qBAAW,EAAC,CAAC;EAKrBG,eAAe,GAAG,IAAAC,sBAAY,EAAoBC,IAAI,IAAK;IACzEC,MAAM,CAACC,MAAM,CAACF,IAAI,CAAC,CAACG,OAAO,CAAEC,KAAK,IAAK;MACrCA,KAAK,CAACD,OAAO,CAAEE,MAAM,IAAK;QACxB,IAAI,CAACC,cAAc,CAACD,MAAM,CAAC;MAC7B,CAAC,CAAC;IACJ,CAAC,CAAC;IAEF,IAAI,CAACX,UAAU,CAACM,IAAI,CAAC;EACvB,CAAC,CAAC;EAEcO,YAAY,GAAG,IAAAR,sBAAY,EAAkBS,IAAI,IAAK;IACpE,IAAI,CAACA,IAAI,IAAIA,IAAI,CAACC,MAAM,KAAK,CAAC,EAAE;IAEhCD,IAAI,CAACL,OAAO,CAAEE,MAAM,IAAK;MACvB,IAAI,CAACC,cAAc,CAACD,MAAM,CAAC;IAC7B,CAAC,CAAC;EACJ,CAAC,CAAC;EAEcK,KAAK,GAAG,IAAAC,qBAAW,EAAuB,IAAI,CAAC,CAC5Dd,KAAK,CAAC,IAAI,CAACA,KAAK,CAAC,CACjBe,EAAE,CAAC,IAAI,CAAClB,UAAU,EAAE,CAACmB,CAAC,EAAEL,IAAI,KAAK,IAAAM,8BAAqB,EAACN,IAAI,CAAC,CAAC,CAC7DI,EAAE,CAAC,IAAI,CAAChB,GAAG,EAAE,CAACiB,CAAC,EAAEL,IAAI,KAAKA,IAAI,CAAC;EAElCO,WAAWA,CAAC;IAAEC,wBAAwB;IAAEC;EAAgD,CAAC,EAAE;IACzF,IAAI,CAACX,cAAc,GAAGW,oBAAoB,IAAIC,kBAAK,CAACC,QAAQ;IAC5D,IAAI,CAACC,kBAAkB,GAAGJ,wBAAwB;EACpD;AACF;AAACK,OAAA,CAAA5B,oBAAA,GAAAA,oBAAA","ignoreList":[]}
@@ -1,150 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.GifCelebrationsModel = void 0;
7
- var _effector = require("effector");
8
- var _GifCelebrationsApi = require("./GifCelebrationsApi.js");
9
- var _GifCelebrationsCache = require("./GifCelebrations.cache.js");
10
- var _helpers = require("../helpers.js");
11
- var _constants = require("../constants.js");
12
- class GifCelebrationsModel {
13
- play = (0, _effector.createEvent)();
14
- stop = (0, _effector.createEvent)();
15
- resetGifTriggerable = (0, _effector.createEvent)();
16
- setGifTriggerable = (0, _effector.createEvent)();
17
- $isGifTriggerable = (0, _effector.createStore)(false).reset(this.resetGifTriggerable).reset(this.stop).on(this.setGifTriggerable, (_, isGifCelebrationMayBeTriggered) => isGifCelebrationMayBeTriggered);
18
- resetProblemsGifsTable = (0, _effector.createEvent)();
19
- $problemsGifsTable = (0, _effector.createStore)(null).reset(this.resetProblemsGifsTable);
20
- setActiveGif = (0, _effector.createEvent)();
21
- $activeGif = (0, _effector.createStore)(null).reset(this.stop).reset(this.resetGifTriggerable).on(this.setActiveGif, (_, gif) => gif);
22
- initialize = (0, _effector.createEvent)();
23
- constructor({
24
- api,
25
- problemsAmount,
26
- resolvedProblemsAmount,
27
- customLocalStorage,
28
- customGetCachePathMethod,
29
- customPrefetchMethod
30
- }) {
31
- this.api = new _GifCelebrationsApi.GifCelebrationsApi(api);
32
- this.cache = new _GifCelebrationsCache.GifCelebrationsCache({
33
- customGetCachePathMethod,
34
- customPrefetchMethod
35
- });
36
- this.$problemsAmount = problemsAmount;
37
- this.$resolvedProblemsAmount = resolvedProblemsAmount;
38
- this.localStorage = customLocalStorage || localStorage;
39
- this.setupEventHandlers();
40
- }
41
- failedGetGifxTimeout = null;
42
- setupEventHandlers() {
43
- (0, _effector.sample)({
44
- clock: this.initialize,
45
- source: this.cache.$gifs,
46
- filter: gifs => {
47
- if (!gifs) return true;
48
- const gifsFetchedTimestamp = this.localStorage.getItem(_constants.GIFS_FETCHED_KEY);
49
- return (0, _helpers.shouldRefreshGifs)(gifsFetchedTimestamp);
50
- },
51
- target: this.api.getGifsFx
52
- });
53
- (0, _effector.sample)({
54
- source: this.api.getGifsFx.doneData,
55
- filter: response => response.ok,
56
- fn: response => response.data,
57
- target: this.cache.initialSet
58
- });
59
- (0, _effector.sample)({
60
- source: this.api.getGifsFx.doneData,
61
- filter: response => response.ok,
62
- target: (0, _effector.createEffect)(() => {
63
- this.localStorage.setItem(_constants.GIFS_FETCHED_KEY, new Date().toISOString());
64
- })
65
- });
66
- (0, _effector.sample)({
67
- clock: [this.initialize, this.api.getGifsFx.doneData],
68
- source: {
69
- gifs: this.cache.$gifs,
70
- problemsAmount: this.$problemsAmount,
71
- resolvedProblemsAmount: this.$resolvedProblemsAmount
72
- },
73
- filter: ({
74
- problemsAmount,
75
- gifs
76
- }) => !!(problemsAmount >= _constants.MIN_PROBLEMS_TO_SHOW_GIF && gifs),
77
- fn: ({
78
- problemsAmount,
79
- resolvedProblemsAmount,
80
- gifs
81
- }) => {
82
- if (!gifs) return null;
83
- return (0, _helpers.generateProblemsGifsTable)(problemsAmount, resolvedProblemsAmount, gifs);
84
- },
85
- target: this.$problemsGifsTable
86
- });
87
- (0, _effector.sample)({
88
- source: this.$problemsGifsTable,
89
- filter: problemsGifsTable => !!problemsGifsTable,
90
- fn: problemsGifsTable => {
91
- if (!problemsGifsTable) return [];
92
- return Object.values(problemsGifsTable).map(gif => gif.url);
93
- },
94
- target: this.cache.prefetchGifs
95
- });
96
- (0, _effector.sample)({
97
- clock: this.play,
98
- source: {
99
- isGifCelebrationMayBeTriggered: this.$isGifTriggerable,
100
- gifsGroups: this.cache.$gifs,
101
- resolvedProblemsAmount: this.$resolvedProblemsAmount,
102
- problemsGifsTable: this.$problemsGifsTable
103
- },
104
- filter: ({
105
- isGifCelebrationMayBeTriggered,
106
- gifsGroups,
107
- resolvedProblemsAmount,
108
- problemsGifsTable
109
- }) => !!(isGifCelebrationMayBeTriggered && gifsGroups && resolvedProblemsAmount !== undefined && problemsGifsTable),
110
- fn: sources => sources,
111
- target: this.updateGifShownStatus
112
- });
113
- this.api.getGifsFx.fail.watch(() => {
114
- this.failedGetGifxTimeout = setTimeout(() => {
115
- this.api.getGifsFx();
116
- }, _constants.GET_GIFS_TIMEOUT);
117
- });
118
- this.api.getGifsFx.done.watch(() => {
119
- if (this.failedGetGifxTimeout) {
120
- clearTimeout(this.failedGetGifxTimeout);
121
- this.failedGetGifxTimeout = null;
122
- }
123
- });
124
- }
125
- updateGifShownStatus = (0, _effector.createEffect)(({
126
- gifsGroups,
127
- resolvedProblemsAmount,
128
- problemsGifsTable
129
- }) => {
130
- const gifToShow = problemsGifsTable[resolvedProblemsAmount];
131
- const groupName = gifToShow.group;
132
- const gifsInGroup = gifsGroups[groupName];
133
- const selectedGifIndex = gifsInGroup?.findIndex(gif => gif.url === gifToShow.url);
134
- if (!gifsInGroup || selectedGifIndex === -1) {
135
- console.warn(`Gif with URL ${gifToShow.url} not found in group ${groupName}`);
136
- return;
137
- }
138
- const updatedGifsInGroup = gifsInGroup.map((gif, index) => ({
139
- ...gif,
140
- isShown: index === selectedGifIndex ? true : gif.isShown
141
- }));
142
- this.cache.set({
143
- ...gifsGroups,
144
- [groupName]: updatedGifsInGroup
145
- });
146
- this.setActiveGif(gifToShow);
147
- });
148
- }
149
- exports.GifCelebrationsModel = GifCelebrationsModel;
150
- //# sourceMappingURL=GifCelebrations.model.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_effector","require","_GifCelebrationsApi","_GifCelebrationsCache","_helpers","_constants","GifCelebrationsModel","play","createEvent","stop","resetGifTriggerable","setGifTriggerable","$isGifTriggerable","createStore","reset","on","_","isGifCelebrationMayBeTriggered","resetProblemsGifsTable","$problemsGifsTable","setActiveGif","$activeGif","gif","initialize","constructor","api","problemsAmount","resolvedProblemsAmount","customLocalStorage","customGetCachePathMethod","customPrefetchMethod","GifCelebrationsApi","cache","GifCelebrationsCache","$problemsAmount","$resolvedProblemsAmount","localStorage","setupEventHandlers","failedGetGifxTimeout","sample","clock","source","$gifs","filter","gifs","gifsFetchedTimestamp","getItem","GIFS_FETCHED_KEY","shouldRefreshGifs","target","getGifsFx","doneData","response","ok","fn","data","initialSet","createEffect","setItem","Date","toISOString","MIN_PROBLEMS_TO_SHOW_GIF","generateProblemsGifsTable","problemsGifsTable","Object","values","map","url","prefetchGifs","gifsGroups","undefined","sources","updateGifShownStatus","fail","watch","setTimeout","GET_GIFS_TIMEOUT","done","clearTimeout","gifToShow","groupName","group","gifsInGroup","selectedGifIndex","findIndex","console","warn","updatedGifsInGroup","index","isShown","set","exports"],"sourceRoot":"../../../../../src","s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S,GAAGD,SAAS,CAACE,KAAK;IAEjC,MAAMC,WAAW,GAAGb,UAAU,CAACW,SAAS,CAAC;IACzC,MAAMG,gBAAgB,GAAGD,WAAW,EAAEE,SAAS,CAAE9D,GAAG,IAAKA,GAAG,CAAC6C,GAAG,KAAKY,SAAS,CAACZ,GAAG,CAAC;IAEnF,IAAI,CAACe,WAAW,IAAIC,gBAAgB,KAAK,CAAC,CAAC,EAAE;MAC3CE,OAAO,CAACC,IAAI,CAAC,gBAAgBP,SAAS,CAACZ,GAAG,uBAAuBa,SAAS,EAAE,CAAC;MAC7E;IACF;IAEA,MAAMO,kBAAkB,GAAGL,WAAW,CAAChB,GAAG,CAAC,CAAC5C,GAAG,EAAEkE,KAAK,MAAM;MAC1D,GAAGlE,GAAG;MACNmE,OAAO,EAAED,KAAK,KAAKL,gBAAgB,GAAG,IAAI,GAAG7D,GAAG,CAACmE;IACnD,CAAC,CAAC,CAAC;IAEH,IAAI,CAACzD,KAAK,CAAC0D,GAAG,CAAC;MACb,GAAGrB,UAAU;MACb,CAACW,SAAS,GAAGO;IACf,CAAC,CAAC;IAEF,IAAI,CAACnE,YAAY,CAAC2D,SAAS,CAAC;EAC9B,CACF,CAAC;AACH;AAACY,OAAA,CAAArF,oBAAA,GAAAA,oBAAA","ignoreList":[]}
@@ -1,14 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.GifCelebrationsApi = void 0;
7
- var _createControllerEffect = require("./../../../lib/effector/createControllerEffect.js");
8
- class GifCelebrationsApi {
9
- constructor(api) {
10
- this.getGifsFx = (0, _createControllerEffect.createControllerEffect)(() => api.getGifs());
11
- }
12
- }
13
- exports.GifCelebrationsApi = GifCelebrationsApi;
14
- //# sourceMappingURL=GifCelebrationsApi.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_createControllerEffect","require","GifCelebrationsApi","constructor","api","getGifsFx","createControllerEffect","getGifs","exports"],"sourceRoot":"../../../../../src","sources":["features/gifCelebrations/model/GifCelebrationsApi.ts"],"mappings":";;;;;;AAAA,IAAAA,uBAAA,GAAAC,OAAA;AAGO,MAAMC,kBAAkB,CAAC;EAG9BC,WAAWA,CAACC,GAA8B,EAAE;IAC1C,IAAI,CAACC,SAAS,GAAG,IAAAC,8CAAsB,EAAC,MAAMF,GAAG,CAACG,OAAO,CAAC,CAAC,CAAC;EAC9D;AACF;AAACC,OAAA,CAAAN,kBAAA,GAAAA,kBAAA","ignoreList":[]}
@@ -1,6 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- //# sourceMappingURL=model.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["features/gifCelebrations/types/model.types.ts"],"mappings":"","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- "use strict";
2
- //# sourceMappingURL=react-app-env.d.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sourceRoot":"../../src","sources":["react-app-env.d.ts"],"mappings":"","ignoreList":[]}
@@ -1,9 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.IS_WEB = void 0;
7
- var _reactNative = require("react-native");
8
- const IS_WEB = exports.IS_WEB = _reactNative.Platform.OS === 'web';
9
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactNative","require","IS_WEB","exports","Platform","OS"],"sourceRoot":"../../../src","sources":["shared/constants.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEO,MAAMC,MAAM,GAAAC,OAAA,CAAAD,MAAA,GAAGE,qBAAQ,CAACC,EAAE,KAAK,KAAK","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- "use strict";
2
- //# sourceMappingURL=common.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/common.types.ts"],"mappings":"","ignoreList":[]}
@@ -1,55 +0,0 @@
1
- "use strict";
2
-
3
- import React, { useEffect } from 'react';
4
- import { Gif } from "./components/Gif.js";
5
- import { Progress } from "./components/Progress.js";
6
- import { ContentContainer } from "./components/ContentContainer.js";
7
- import { Backdrop } from "./components/Backdrop.js";
8
- import { Easing, runOnJS, useSharedValue, withSequence, withTiming } from 'react-native-reanimated';
9
- import { useUnit } from 'effector-react';
10
- import { ANIMATION_DURATION } from "./constants.js";
11
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
12
- export const GifCelebrations = ({
13
- model,
14
- TextComponent
15
- }) => {
16
- const [problemsAmount, resolvedProblemsAmount, activeGif] = useUnit([model.$problemsAmount, model.$resolvedProblemsAmount, model.$activeGif]);
17
- const completedPercent = resolvedProblemsAmount && problemsAmount && Math.round(resolvedProblemsAmount / problemsAmount * 100);
18
- const progress = useSharedValue(0);
19
- const stopAnimation = () => {
20
- model.stop();
21
- progress.value = 0;
22
- };
23
- const playAnimation = () => {
24
- progress.value = withSequence(withTiming(1, {
25
- duration: ANIMATION_DURATION,
26
- easing: Easing.bezier(0.52, 0.16, 0.26, 0.77)
27
- }), withTiming(2, {
28
- duration: ANIMATION_DURATION,
29
- easing: Easing.bezier(0.71, 0.09, 0.49, 0.89)
30
- }, () => runOnJS(stopAnimation)()));
31
- };
32
- useEffect(() => {
33
- if (activeGif) {
34
- playAnimation();
35
- }
36
- }, [activeGif]);
37
- if (!activeGif) {
38
- return null;
39
- }
40
- return /*#__PURE__*/_jsx(Backdrop, {
41
- progress: progress,
42
- children: /*#__PURE__*/_jsxs(ContentContainer, {
43
- progress: progress,
44
- children: [/*#__PURE__*/_jsx(Gif, {
45
- gifObject: activeGif,
46
- getCachePathMethod: model.cache.getCachePathMethod,
47
- TextComponent: TextComponent
48
- }), /*#__PURE__*/_jsx(Progress, {
49
- progress: progress,
50
- completedPercent: completedPercent
51
- })]
52
- })
53
- });
54
- };
55
- //# sourceMappingURL=GifCelebrations.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","useEffect","Gif","Progress","ContentContainer","Backdrop","Easing","runOnJS","useSharedValue","withSequence","withTiming","useUnit","ANIMATION_DURATION","jsx","_jsx","jsxs","_jsxs","GifCelebrations","model","TextComponent","problemsAmount","resolvedProblemsAmount","activeGif","$problemsAmount","$resolvedProblemsAmount","$activeGif","completedPercent","Math","round","progress","stopAnimation","stop","value","playAnimation","duration","easing","bezier","children","gifObject","getCachePathMethod","cache"],"sourceRoot":"../../../../src","sources":["features/gifCelebrations/GifCelebrations.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,GAAG,QAAQ,qBAAkB;AACtC,SAASC,QAAQ,QAAQ,0BAAuB;AAChD,SAASC,gBAAgB,QAAQ,kCAA+B;AAChE,SAASC,QAAQ,QAAQ,0BAAuB;AAChD,SAASC,MAAM,EAAEC,OAAO,EAAEC,cAAc,EAAEC,YAAY,EAAEC,UAAU,QAAQ,yBAAyB;AACnG,SAASC,OAAO,QAAQ,gBAAgB;AACxC,SAASC,kBAAkB,QAAQ,gBAAa;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAShD,OAAO,MAAMC,eAAe,GAAGA,CAAC;EAAEC,KAAK;EAAEC;AAAoC,CAAC,KAAK;EACjF,MAAM,CAACC,cAAc,EAAEC,sBAAsB,EAAEC,SAAS,CAAC,GAAGX,OAAO,CAAC,CAClEO,KAAK,CAACK,eAAe,EACrBL,KAAK,CAACM,uBAAuB,EAC7BN,KAAK,CAACO,UAAU,CACjB,CAAC;EAEF,MAAMC,gBAAgB,GACpBL,sBAAsB,IACtBD,cAAc,IACdO,IAAI,CAACC,KAAK,CAAEP,sBAAsB,GAAGD,cAAc,GAAI,GAAG,CAAC;EAE7D,MAAMS,QAAQ,GAAGrB,cAAc,CAAgB,CAAC,CAAC;EAEjD,MAAMsB,aAAa,GAAGA,CAAA,KAAM;IAC1BZ,KAAK,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{ StyleSheet, useWindowDimensions } from 'react-native';
4
- import React from 'react';
5
- import Animated, { useAnimatedStyle, interpolateColor } from 'react-native-reanimated';
6
- import { BACKDROP_COLOR } from "../constants.js";
7
- import { jsx as _jsx } from "react/jsx-runtime";
8
- export const Backdrop = ({
9
- children,
10
- progress
11
- }) => {
12
- const {
13
- width,
14
- height
15
- } = useWindowDimensions();
16
- const backdropAnimatedStyle = useAnimatedStyle(() => ({
17
- backgroundColor: interpolateColor(progress.value, [0, 1, 2], [BACKDROP_COLOR.INITIAL, BACKDROP_COLOR.FINAL, BACKDROP_COLOR.INITIAL])
18
- }), [progress]);
19
- return /*#__PURE__*/_jsx(Animated.View, {
20
- style: [styles.backdrop, {
21
- width,
22
- height
23
- }, backdropAnimatedStyle],
24
- children: children
25
- });
26
- };
27
- const styles = StyleSheet.create({
28
- backdrop: {
29
- position: 'absolute',
30
- zIndex: 10100,
31
- justifyContent: 'center',
32
- alignItems: 'center',
33
- backgroundColor: 'rgba(51, 51, 51, 0.33);'
34
- }
35
- });
36
- //# sourceMappingURL=Backdrop.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["StyleSheet","useWindowDimensions","React","Animated","useAnimatedStyle","interpolateColor","BACKDROP_COLOR","jsx","_jsx","Backdrop","children","progress","width","height","backdropAnimatedStyle","backgroundColor","value","INITIAL","FINAL","View","style","styles","backdrop","create","position","zIndex","justifyContent","alignItems"],"sourceRoot":"../../../../../src","sources":["features/gifCelebrations/components/Backdrop.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,mBAAmB,QAAQ,cAAc;AAC9D,OAAOC,KAAK,MAAM,OAAO;AACzB,OAAOC,QAAQ,IAAIC,gBAAgB,EAAEC,gBAAgB,QAAqB,yBAAyB;AACnG,SAASC,cAAc,QAAQ,iBAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAQ7C,OAAO,MAAMC,QAAQ,GAAGA,CAAC;EAAEC,QAAQ;EAAEC;AAAwB,CAAC,KAAK;EACjE,MAAM;IAAEC,KAAK;IAAEC;EAAO,CAAC,GAAGZ,mBAAmB,CAAC,CAAC;EAE/C,MAAMa,qBAAqB,GAAGV,gBAAgB,CAC5C,OAAO;IACLW,eAAe,EAAEV,gBAAgB,CAC/BM,QAAQ,CAACK,KAAK,EACd,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EACT,CAACV,cAAc,CAACW,OAAO,EAAEX,cAAc,CAACY,KAAK,EAAEZ,cAAc,CAACW,OAAO,CACvE;EACF,CAAC,CAAC,EACF,CAACN,QAAQ,CACX,CAAC;EAED,oBACEH,IAAA,CAACL,QAAQ,CAACgB,IAAI;IAACC,KAAK,EAAE,CAACC,MAAM,CAACC,QAAQ,EAAE;MAAEV,KAAK;MAAEC;IAAO,CAAC,EAAEC,qBAAqB,CAAE;IAAAJ,QAAA,EAC/EA;EAAQ,CACI,CAAC;AAEpB,CAAC;AAED,MAAMW,MAAM,GAAGrB,UAAU,CAACuB,MAAM,CAAC;EAC/BD,QAAQ,EAAE;IACRE,QAAQ,EAAE,UAAU;IACpBC,MAAM,EAAE,KAAK;IACbC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBZ,eAAe,EAAE;EACnB;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,38 +0,0 @@
1
- "use strict";
2
-
3
- import { StyleSheet, useWindowDimensions } from 'react-native';
4
- import React from 'react';
5
- import { SPACING } from '@magmamath/react-native-ui';
6
- import Animated, { useAnimatedStyle, interpolate } from 'react-native-reanimated';
7
- import { CONTENT_CONTAINER } from "../constants.js";
8
- import { jsx as _jsx } from "react/jsx-runtime";
9
- export const ContentContainer = ({
10
- children,
11
- progress
12
- }) => {
13
- const {
14
- width
15
- } = useWindowDimensions();
16
- const RIGHT_POSITION = width / 2 + CONTENT_CONTAINER.CONTAINER_WIDTH / 2 + CONTENT_CONTAINER.ROTATION_PADDING;
17
- const LEFT_POSITION = -RIGHT_POSITION - CONTENT_CONTAINER.ROTATION_PADDING;
18
- const animatedStyles = useAnimatedStyle(() => ({
19
- transform: [{
20
- translateX: interpolate(progress.value, [0, 1, 2], [LEFT_POSITION, 0, RIGHT_POSITION])
21
- }, {
22
- rotate: `${interpolate(progress.value, [0, 1, 2], [-CONTENT_CONTAINER.ANGLE, 0, CONTENT_CONTAINER.ANGLE])}deg`
23
- }]
24
- }), [progress, RIGHT_POSITION, LEFT_POSITION]);
25
- return /*#__PURE__*/_jsx(Animated.View, {
26
- style: [styles.container, animatedStyles],
27
- children: children
28
- });
29
- };
30
- const styles = StyleSheet.create({
31
- container: {
32
- width: CONTENT_CONTAINER.CONTAINER_WIDTH,
33
- alignItems: 'center',
34
- gap: SPACING[800],
35
- position: 'absolute'
36
- }
37
- });
38
- //# sourceMappingURL=ContentContainer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["StyleSheet","useWindowDimensions","React","SPACING","Animated","useAnimatedStyle","interpolate","CONTENT_CONTAINER","jsx","_jsx","ContentContainer","children","progress","width","RIGHT_POSITION","CONTAINER_WIDTH","ROTATION_PADDING","LEFT_POSITION","animatedStyles","transform","translateX","value","rotate","ANGLE","View","style","styles","container","create","alignItems","gap","position"],"sourceRoot":"../../../../../src","sources":["features/gifCelebrations/components/ContentContainer.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,mBAAmB,QAAQ,cAAc;AAC9D,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,OAAO,QAAQ,4BAA4B;AACpD,OAAOC,QAAQ,IAAIC,gBAAgB,EAAEC,WAAW,QAAqB,yBAAyB;AAC9F,SAASC,iBAAiB,QAAQ,iBAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAQhD,OAAO,MAAMC,gBAAgB,GAAGA,CAAC;EAAEC,QAAQ;EAAEC;AAAgC,CAAC,KAAK;EACjF,MAAM;IAAEC;EAAM,CAAC,GAAGZ,mBAAmB,CAAC,CAAC;EAEvC,MAAMa,cAAc,GAClBD,KAAK,GAAG,CAAC,GAAGN,iBAA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