@magmamath/students-features 1.8.2 → 1.8.3-rc.0

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 (130) hide show
  1. package/dist/commonjs/features/pmProgress/shared/TreeNormalizer.js +5 -1
  2. package/dist/commonjs/features/pmProgress/shared/TreeNormalizer.js.map +1 -1
  3. package/dist/commonjs/i18n/i18n.js +1 -3
  4. package/dist/commonjs/i18n/i18n.js.map +1 -1
  5. package/dist/module/features/pmProgress/shared/TreeNormalizer.js +5 -1
  6. package/dist/module/features/pmProgress/shared/TreeNormalizer.js.map +1 -1
  7. package/dist/module/i18n/i18n.js +1 -3
  8. package/dist/module/i18n/i18n.js.map +1 -1
  9. package/dist/typescript/commonjs/features/fluency/hooks/useFluencyNumpad.d.ts +2 -1
  10. package/dist/typescript/commonjs/features/fluency/hooks/useFluencyNumpad.d.ts.map +1 -1
  11. package/dist/typescript/commonjs/features/pmProgress/shared/TreeNormalizer.d.ts +4 -0
  12. package/dist/typescript/commonjs/features/pmProgress/shared/TreeNormalizer.d.ts.map +1 -1
  13. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionController.d.ts +1 -1
  14. package/dist/typescript/commonjs/i18n/i18n.d.ts.map +1 -1
  15. package/dist/typescript/commonjs/lib/helpers/helpers.d.ts +1 -1
  16. package/dist/typescript/commonjs/lib/helpers/helpers.d.ts.map +1 -1
  17. package/dist/typescript/module/features/fluency/hooks/useFluencyNumpad.d.ts +2 -1
  18. package/dist/typescript/module/features/fluency/hooks/useFluencyNumpad.d.ts.map +1 -1
  19. package/dist/typescript/module/features/pmProgress/shared/TreeNormalizer.d.ts +4 -0
  20. package/dist/typescript/module/features/pmProgress/shared/TreeNormalizer.d.ts.map +1 -1
  21. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionController.d.ts +1 -1
  22. package/dist/typescript/module/i18n/i18n.d.ts.map +1 -1
  23. package/dist/typescript/module/lib/helpers/helpers.d.ts +1 -1
  24. package/dist/typescript/module/lib/helpers/helpers.d.ts.map +1 -1
  25. package/package.json +4 -4
  26. package/src/features/pmProgress/shared/TreeNormalizer.ts +5 -1
  27. package/src/i18n/.generated/schema.json +178 -0
  28. package/src/i18n/i18n.ts +1 -2
  29. package/dist/commonjs/features/exampleSolution/ExampleSolutionModal.js +0 -29
  30. package/dist/commonjs/features/exampleSolution/ExampleSolutionModal.js.map +0 -1
  31. package/dist/commonjs/features/exampleSolution/assets/grid.webp +0 -0
  32. package/dist/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.js +0 -97
  33. package/dist/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.js.map +0 -1
  34. package/dist/commonjs/features/exampleSolution/components/QuestionSection.js +0 -70
  35. package/dist/commonjs/features/exampleSolution/components/QuestionSection.js.map +0 -1
  36. package/dist/commonjs/features/exampleSolution/components/SolutionSection.js +0 -104
  37. package/dist/commonjs/features/exampleSolution/components/SolutionSection.js.map +0 -1
  38. package/dist/commonjs/features/exampleSolution/constants.js +0 -13
  39. package/dist/commonjs/features/exampleSolution/constants.js.map +0 -1
  40. package/dist/commonjs/features/exampleSolution/hooks/useExampleSolution.js +0 -61
  41. package/dist/commonjs/features/exampleSolution/hooks/useExampleSolution.js.map +0 -1
  42. package/dist/commonjs/features/exampleSolution/index.js +0 -39
  43. package/dist/commonjs/features/exampleSolution/index.js.map +0 -1
  44. package/dist/commonjs/features/exampleSolution/model/ExampleSolution.model.js +0 -24
  45. package/dist/commonjs/features/exampleSolution/model/ExampleSolution.model.js.map +0 -1
  46. package/dist/commonjs/features/exampleSolution/model/ExampleSolutionApi.js +0 -28
  47. package/dist/commonjs/features/exampleSolution/model/ExampleSolutionApi.js.map +0 -1
  48. package/dist/commonjs/features/exampleSolution/model/ExampleSolutionCache.js +0 -18
  49. package/dist/commonjs/features/exampleSolution/model/ExampleSolutionCache.js.map +0 -1
  50. package/dist/commonjs/features/exampleSolution/types.js +0 -6
  51. package/dist/commonjs/features/exampleSolution/types.js.map +0 -1
  52. package/dist/module/features/exampleSolution/ExampleSolutionModal.js +0 -23
  53. package/dist/module/features/exampleSolution/ExampleSolutionModal.js.map +0 -1
  54. package/dist/module/features/exampleSolution/assets/grid.webp +0 -0
  55. package/dist/module/features/exampleSolution/components/ExampleSolutionModalContent.js +0 -91
  56. package/dist/module/features/exampleSolution/components/ExampleSolutionModalContent.js.map +0 -1
  57. package/dist/module/features/exampleSolution/components/QuestionSection.js +0 -62
  58. package/dist/module/features/exampleSolution/components/QuestionSection.js.map +0 -1
  59. package/dist/module/features/exampleSolution/components/SolutionSection.js +0 -96
  60. package/dist/module/features/exampleSolution/components/SolutionSection.js.map +0 -1
  61. package/dist/module/features/exampleSolution/constants.js +0 -9
  62. package/dist/module/features/exampleSolution/constants.js.map +0 -1
  63. package/dist/module/features/exampleSolution/hooks/useExampleSolution.js +0 -56
  64. package/dist/module/features/exampleSolution/hooks/useExampleSolution.js.map +0 -1
  65. package/dist/module/features/exampleSolution/index.js +0 -6
  66. package/dist/module/features/exampleSolution/index.js.map +0 -1
  67. package/dist/module/features/exampleSolution/model/ExampleSolution.model.js +0 -19
  68. package/dist/module/features/exampleSolution/model/ExampleSolution.model.js.map +0 -1
  69. package/dist/module/features/exampleSolution/model/ExampleSolutionApi.js +0 -23
  70. package/dist/module/features/exampleSolution/model/ExampleSolutionApi.js.map +0 -1
  71. package/dist/module/features/exampleSolution/model/ExampleSolutionCache.js +0 -13
  72. package/dist/module/features/exampleSolution/model/ExampleSolutionCache.js.map +0 -1
  73. package/dist/module/features/exampleSolution/types.js +0 -4
  74. package/dist/module/features/exampleSolution/types.js.map +0 -1
  75. package/dist/typescript/commonjs/features/exampleSolution/ExampleSolutionModal.d.ts +0 -11
  76. package/dist/typescript/commonjs/features/exampleSolution/ExampleSolutionModal.d.ts.map +0 -1
  77. package/dist/typescript/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.d.ts +0 -8
  78. package/dist/typescript/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.d.ts.map +0 -1
  79. package/dist/typescript/commonjs/features/exampleSolution/components/QuestionSection.d.ts +0 -10
  80. package/dist/typescript/commonjs/features/exampleSolution/components/QuestionSection.d.ts.map +0 -1
  81. package/dist/typescript/commonjs/features/exampleSolution/components/SolutionSection.d.ts +0 -9
  82. package/dist/typescript/commonjs/features/exampleSolution/components/SolutionSection.d.ts.map +0 -1
  83. package/dist/typescript/commonjs/features/exampleSolution/constants.d.ts +0 -6
  84. package/dist/typescript/commonjs/features/exampleSolution/constants.d.ts.map +0 -1
  85. package/dist/typescript/commonjs/features/exampleSolution/hooks/useExampleSolution.d.ts +0 -9
  86. package/dist/typescript/commonjs/features/exampleSolution/hooks/useExampleSolution.d.ts.map +0 -1
  87. package/dist/typescript/commonjs/features/exampleSolution/index.d.ts +0 -4
  88. package/dist/typescript/commonjs/features/exampleSolution/index.d.ts.map +0 -1
  89. package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolution.model.d.ts +0 -10
  90. package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolution.model.d.ts.map +0 -1
  91. package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolutionApi.d.ts +0 -13
  92. package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolutionApi.d.ts.map +0 -1
  93. package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolutionCache.d.ts +0 -11
  94. package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolutionCache.d.ts.map +0 -1
  95. package/dist/typescript/commonjs/features/exampleSolution/types.d.ts +0 -27
  96. package/dist/typescript/commonjs/features/exampleSolution/types.d.ts.map +0 -1
  97. package/dist/typescript/module/features/exampleSolution/ExampleSolutionModal.d.ts +0 -11
  98. package/dist/typescript/module/features/exampleSolution/ExampleSolutionModal.d.ts.map +0 -1
  99. package/dist/typescript/module/features/exampleSolution/components/ExampleSolutionModalContent.d.ts +0 -8
  100. package/dist/typescript/module/features/exampleSolution/components/ExampleSolutionModalContent.d.ts.map +0 -1
  101. package/dist/typescript/module/features/exampleSolution/components/QuestionSection.d.ts +0 -10
  102. package/dist/typescript/module/features/exampleSolution/components/QuestionSection.d.ts.map +0 -1
  103. package/dist/typescript/module/features/exampleSolution/components/SolutionSection.d.ts +0 -9
  104. package/dist/typescript/module/features/exampleSolution/components/SolutionSection.d.ts.map +0 -1
  105. package/dist/typescript/module/features/exampleSolution/constants.d.ts +0 -6
  106. package/dist/typescript/module/features/exampleSolution/constants.d.ts.map +0 -1
  107. package/dist/typescript/module/features/exampleSolution/hooks/useExampleSolution.d.ts +0 -9
  108. package/dist/typescript/module/features/exampleSolution/hooks/useExampleSolution.d.ts.map +0 -1
  109. package/dist/typescript/module/features/exampleSolution/index.d.ts +0 -4
  110. package/dist/typescript/module/features/exampleSolution/index.d.ts.map +0 -1
  111. package/dist/typescript/module/features/exampleSolution/model/ExampleSolution.model.d.ts +0 -10
  112. package/dist/typescript/module/features/exampleSolution/model/ExampleSolution.model.d.ts.map +0 -1
  113. package/dist/typescript/module/features/exampleSolution/model/ExampleSolutionApi.d.ts +0 -13
  114. package/dist/typescript/module/features/exampleSolution/model/ExampleSolutionApi.d.ts.map +0 -1
  115. package/dist/typescript/module/features/exampleSolution/model/ExampleSolutionCache.d.ts +0 -11
  116. package/dist/typescript/module/features/exampleSolution/model/ExampleSolutionCache.d.ts.map +0 -1
  117. package/dist/typescript/module/features/exampleSolution/types.d.ts +0 -27
  118. package/dist/typescript/module/features/exampleSolution/types.d.ts.map +0 -1
  119. package/src/features/exampleSolution/ExampleSolutionModal.tsx +0 -23
  120. package/src/features/exampleSolution/assets/grid.webp +0 -0
  121. package/src/features/exampleSolution/components/ExampleSolutionModalContent.tsx +0 -80
  122. package/src/features/exampleSolution/components/QuestionSection.tsx +0 -61
  123. package/src/features/exampleSolution/components/SolutionSection.tsx +0 -117
  124. package/src/features/exampleSolution/constants.ts +0 -5
  125. package/src/features/exampleSolution/hooks/useExampleSolution.ts +0 -66
  126. package/src/features/exampleSolution/index.ts +0 -3
  127. package/src/features/exampleSolution/model/ExampleSolution.model.ts +0 -15
  128. package/src/features/exampleSolution/model/ExampleSolutionApi.ts +0 -29
  129. package/src/features/exampleSolution/model/ExampleSolutionCache.ts +0 -20
  130. package/src/features/exampleSolution/types.ts +0 -27
@@ -1,96 +0,0 @@
1
- "use strict";
2
-
3
- import { StyleSheet, View, Image, ImageBackground, ScrollView, useWindowDimensions } from 'react-native';
4
- import React from 'react';
5
- import { COLORS, IS_WEB, SPACING } from '@magmamath/react-native-ui';
6
- import Animated, { FadeIn } from 'react-native-reanimated';
7
- import { ExampleSolutionStatuses } from "../constants.js";
8
- import gridImage from '../assets/grid.webp';
9
- import { TEST_IDS } from '@magmamath/students-qa';
10
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
11
- const CONTAINER_SIZES = {
12
- width: 489,
13
- height: 543
14
- };
15
- const BORDER_WIDTH = 1;
16
- const CONTAINER_HEIGHT_OFFSET = 160;
17
- const gridImagePath = !IS_WEB ? Image.resolveAssetSource(gridImage).uri : gridImage;
18
- export const SolutionSection = ({
19
- answer,
20
- status
21
- }) => {
22
- const {
23
- height
24
- } = useWindowDimensions();
25
- const shouldShowAnswer = answer && (status === ExampleSolutionStatuses.DONE_DATA || status === ExampleSolutionStatuses.CACHE);
26
- return /*#__PURE__*/_jsx(View, {
27
- style: [styles.container, IS_WEB && {
28
- maxHeight: height - CONTAINER_HEIGHT_OFFSET
29
- }],
30
- testID: TEST_IDS.EXAMPLE_SOLUTION_SOLUTION_SECTION,
31
- children: /*#__PURE__*/_jsx(ScrollView, {
32
- style: styles.solutionScroll,
33
- contentContainerStyle: styles.solutionScrollContent,
34
- bounces: true,
35
- children: IS_WEB ? /*#__PURE__*/_jsx(ImageBackground, {
36
- resizeMode: "repeat",
37
- style: [styles.gridImageWeb],
38
- source: {
39
- uri: gridImagePath
40
- },
41
- children: shouldShowAnswer && /*#__PURE__*/_jsx(Animated.Text, {
42
- entering: status === 'cache' ? undefined : FadeIn.delay(1000).duration(500),
43
- style: styles.solutionText,
44
- children: answer
45
- })
46
- }) : /*#__PURE__*/_jsxs(_Fragment, {
47
- children: [/*#__PURE__*/_jsx(ImageBackground, {
48
- resizeMode: "repeat",
49
- style: styles.gridImageRn,
50
- source: {
51
- uri: gridImagePath
52
- }
53
- }), shouldShowAnswer && /*#__PURE__*/_jsx(Animated.Text, {
54
- entering: status === 'cache' ? undefined : FadeIn.delay(1000).duration(500),
55
- style: styles.solutionText,
56
- children: answer
57
- })]
58
- })
59
- })
60
- });
61
- };
62
- const styles = StyleSheet.create({
63
- container: {
64
- width: CONTAINER_SIZES.width,
65
- height: CONTAINER_SIZES.height,
66
- overflow: 'hidden',
67
- borderRadius: 8,
68
- borderWidth: BORDER_WIDTH,
69
- borderColor: COLORS.NEUTRAL_5
70
- },
71
- gridImageRn: {
72
- top: -327,
73
- width: '100%',
74
- height: '150%',
75
- position: 'absolute'
76
- },
77
- gridImageWeb: {
78
- width: '100%',
79
- height: '100%'
80
- },
81
- solutionScroll: {
82
- flex: 1
83
- },
84
- solutionScrollContent: {
85
- minHeight: CONTAINER_SIZES.height - BORDER_WIDTH * 2,
86
- width: '100%'
87
- },
88
- solutionText: {
89
- fontFamily: 'PlaypenSans-Light',
90
- fontSize: 28,
91
- marginHorizontal: SPACING[800],
92
- marginVertical: SPACING[400],
93
- lineHeight: 36
94
- }
95
- });
96
- //# sourceMappingURL=SolutionSection.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["StyleSheet","View","Image","ImageBackground","ScrollView","useWindowDimensions","React","COLORS","IS_WEB","SPACING","Animated","FadeIn","ExampleSolutionStatuses","gridImage","TEST_IDS","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","CONTAINER_SIZES","width","height","BORDER_WIDTH","CONTAINER_HEIGHT_OFFSET","gridImagePath","resolveAssetSource","uri","SolutionSection","answer","status","shouldShowAnswer","DONE_DATA","CACHE","style","styles","container","maxHeight","testID","EXAMPLE_SOLUTION_SOLUTION_SECTION","children","solutionScroll","contentContainerStyle","solutionScrollContent","bounces","resizeMode","gridImageWeb","source","Text","entering","undefined","delay","duration","solutionText","gridImageRn","create","overflow","borderRadius","borderWidth","borderColor","NEUTRAL_5","top","position","flex","minHeight","fontFamily","fontSize","marginHorizontal","marginVertical","lineHeight"],"sourceRoot":"../../../../../src","sources":["features/exampleSolution/components/SolutionSection.tsx"],"mappings":"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","ignoreList":[]}
@@ -1,9 +0,0 @@
1
- "use strict";
2
-
3
- export let ExampleSolutionStatuses = /*#__PURE__*/function (ExampleSolutionStatuses) {
4
- ExampleSolutionStatuses["LOADING"] = "loading";
5
- ExampleSolutionStatuses["DONE_DATA"] = "doneData";
6
- ExampleSolutionStatuses["CACHE"] = "cache";
7
- return ExampleSolutionStatuses;
8
- }({});
9
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["ExampleSolutionStatuses"],"sourceRoot":"../../../../src","sources":["features/exampleSolution/constants.ts"],"mappings":";;AAAA,WAAkBA,uBAAuB,0BAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAA,OAAvBA,uBAAuB;AAAA","ignoreList":[]}
@@ -1,56 +0,0 @@
1
- "use strict";
2
-
3
- import { useEffect, useState } from 'react';
4
- import { useUnit } from 'effector-react';
5
- import { ExampleSolutionStatuses } from "../constants.js";
6
- const ANIMATION_DELAY = 600;
7
- export const useExampleSolution = ({
8
- model,
9
- payload,
10
- cacheKey
11
- }) => {
12
- const exampleSolutionsCache = useUnit(model.cache.$state);
13
- const [result, setResult] = useState(null);
14
- const [status, setStatus] = useState(ExampleSolutionStatuses.LOADING);
15
- useEffect(() => {
16
- let timer = null;
17
- const fetchExampleSolution = async () => {
18
- try {
19
- if (exampleSolutionsCache[cacheKey]) {
20
- setResult(exampleSolutionsCache[cacheKey]);
21
- setStatus(ExampleSolutionStatuses.CACHE);
22
- return;
23
- }
24
- const startTime = Date.now();
25
- const response = await model.api.generateExampleSolutionFx(payload);
26
- setResult(response);
27
- model.cache.addExampleSolution({
28
- cacheKey,
29
- response
30
- });
31
- const elapsedTime = Date.now() - startTime;
32
- if (elapsedTime >= ANIMATION_DELAY) {
33
- setStatus(ExampleSolutionStatuses.DONE_DATA);
34
- } else {
35
- timer = setTimeout(() => {
36
- setStatus(ExampleSolutionStatuses.DONE_DATA);
37
- }, ANIMATION_DELAY - elapsedTime);
38
- }
39
- } catch (error) {
40
- console.error('Failed to fetch example solution:', error);
41
- setStatus(ExampleSolutionStatuses.DONE_DATA);
42
- }
43
- };
44
- fetchExampleSolution();
45
- return () => {
46
- if (timer) {
47
- clearTimeout(timer);
48
- }
49
- };
50
- }, []);
51
- return {
52
- result,
53
- status
54
- };
55
- };
56
- //# sourceMappingURL=useExampleSolution.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useEffect","useState","useUnit","ExampleSolutionStatuses","ANIMATION_DELAY","useExampleSolution","model","payload","cacheKey","exampleSolutionsCache","cache","$state","result","setResult","status","setStatus","LOADING","timer","fetchExampleSolution","CACHE","startTime","Date","now","response","api","generateExampleSolutionFx","addExampleSolution","elapsedTime","DONE_DATA","setTimeout","error","console","clearTimeout"],"sourceRoot":"../../../../../src","sources":["features/exampleSolution/hooks/useExampleSolution.ts"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,SAASC,OAAO,QAAQ,gBAAgB;AAExC,SAASC,uBAAuB,QAAQ,iBAAc;AAEtD,MAAMC,eAAe,GAAG,GAAG;AAO3B,OAAO,MAAMC,kBAAkB,GAAGA,CAAC;EACjCC,KAAK;EACLC,OAAO;EACPC;AAC0B,CAAC,KAA+B;EAC1D,MAAMC,qBAAqB,GAAGP,OAAO,CAACI,KAAK,CAACI,KAAK,CAACC,MAAM,CAAC;EACzD,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAGZ,QAAQ,CAAiC,IAAI,CAAC;EAC1E,MAAM,CAACa,MAAM,EAAEC,SAAS,CAAC,GAAGd,QAAQ,CAA0BE,uBAAuB,CAACa,OAAO,CAAC;EAE9FhB,SAAS,CAAC,MAAM;IACd,IAAIiB,KAA4B,GAAG,IAAI;IAEvC,MAAMC,oBAAoB,GAAG,MAAAA,CAAA,KAAY;MACvC,IAAI;QACF,IAAIT,qBAAqB,CAACD,QAAQ,CAAC,EAAE;UACnCK,SAAS,CAACJ,qBAAqB,CAACD,QAAQ,CAAC,CAAC;UAC1CO,SAAS,CAACZ,uBAAuB,CAACgB,KAAK,CAAC;UACxC;QACF;QAEA,MAAMC,SAAS,GAAGC,IAAI,CAACC,GAAG,CAAC,CAAC;QAC5B,MAAMC,QAAQ,GAAG,MAAMjB,KAAK,CAACkB,GAAG,CAACC,yBAAyB,CAAClB,OAAO,CAAC;QAEnEM,SAAS,CAACU,QAAQ,CAAC;QACnBjB,KAAK,CAACI,KAAK,CAACgB,kBAAkB,CAAC;UAAElB,QAAQ;UAAEe;QAAS,CAAC,CAAC;QAEtD,MAAMI,WAAW,GAAGN,IAAI,CAACC,GAAG,CAAC,CAAC,GAAGF,SAAS;QAC1C,IAAIO,WAAW,IAAIvB,eAAe,EAAE;UAClCW,SAAS,CAACZ,uBAAuB,CAACyB,SAAS,CAAC;QAC9C,CAAC,MAAM;UACLX,KAAK,GAAGY,UAAU,CAAC,MAAM;YACvBd,SAAS,CAACZ,uBAAuB,CAACyB,SAAS,CAAC;UAC9C,CAAC,EAAExB,eAAe,GAAGuB,WAAW,CAAC;QACnC;MACF,CAAC,CAAC,OAAOG,KAAK,EAAE;QACdC,OAAO,CAACD,KAAK,CAAC,mCAAmC,EAAEA,KAAK,CAAC;QACzDf,SAAS,CAACZ,uBAAuB,CAACyB,SAAS,CAAC;MAC9C;IACF,CAAC;IAEDV,oBAAoB,CAAC,CAAC;IAEtB,OAAO,MAAM;MACX,IAAID,KAAK,EAAE;QACTe,YAAY,CAACf,KAAK,CAAC;MACrB;IACF,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;EAEN,OAAO;IACLL,MAAM;IACNE;EACF,CAAC;AACH,CAAC","ignoreList":[]}
@@ -1,6 +0,0 @@
1
- "use strict";
2
-
3
- export * from "./ExampleSolutionModal.js";
4
- export * from "./model/ExampleSolution.model.js";
5
- export * from "./types.js";
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["features/exampleSolution/index.ts"],"mappings":";;AAAA,cAAc,2BAAwB;AACtC,cAAc,kCAA+B;AAC7C,cAAc,YAAS","ignoreList":[]}
@@ -1,19 +0,0 @@
1
- "use strict";
2
-
3
- import { ExampleSolutionsApi } from "./ExampleSolutionApi.js";
4
- import { ExampleSolutionCache } from "./ExampleSolutionCache.js";
5
- export class ExampleSolutionModel {
6
- cache = new ExampleSolutionCache();
7
- constructor({
8
- api,
9
- errorHandler,
10
- renderKatexComponent
11
- }) {
12
- this.api = new ExampleSolutionsApi({
13
- api,
14
- errorHandler
15
- });
16
- this.renderKatexComponent = renderKatexComponent;
17
- }
18
- }
19
- //# sourceMappingURL=ExampleSolution.model.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["ExampleSolutionsApi","ExampleSolutionCache","ExampleSolutionModel","cache","constructor","api","errorHandler","renderKatexComponent"],"sourceRoot":"../../../../../src","sources":["features/exampleSolution/model/ExampleSolution.model.ts"],"mappings":";;AACA,SAASA,mBAAmB,QAAQ,yBAAsB;AAC1D,SAASC,oBAAoB,QAAQ,2BAAwB;AAE7D,OAAO,MAAMC,oBAAoB,CAAC;EAEhBC,KAAK,GAAG,IAAIF,oBAAoB,CAAC,CAAC;EAIlDG,WAAWA,CAAC;IAAEC,GAAG;IAAEC,YAAY;IAAEC;EAAgD,CAAC,EAAE;IAClF,IAAI,CAACF,GAAG,GAAG,IAAIL,mBAAmB,CAAC;MAAEK,GAAG;MAAEC;IAAa,CAAC,CAAC;IACzD,IAAI,CAACC,oBAAoB,GAAGA,oBAAoB;EAClD;AACF","ignoreList":[]}
@@ -1,23 +0,0 @@
1
- "use strict";
2
-
3
- import { createControllerEffect } from "./../../../lib/effector/createControllerEffect.js";
4
- import { createEffect, sample } from 'effector';
5
- import { getText } from "../../../i18n/i18n.js";
6
- export class ExampleSolutionsApi {
7
- errorHandlingFx = createEffect(() => {
8
- if (!this.errorHandlerFx) return;
9
- this.errorHandlerFx(getText('exampleSolution.errorMessage'));
10
- });
11
- constructor({
12
- api,
13
- errorHandler
14
- }) {
15
- this.generateExampleSolutionFx = createControllerEffect(api.generateExampleSolution);
16
- this.errorHandlerFx = errorHandler;
17
- sample({
18
- clock: this.generateExampleSolutionFx.fail,
19
- target: this.errorHandlingFx
20
- });
21
- }
22
- }
23
- //# sourceMappingURL=ExampleSolutionApi.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["createControllerEffect","createEffect","sample","getText","ExampleSolutionsApi","errorHandlingFx","errorHandlerFx","constructor","api","errorHandler","generateExampleSolutionFx","generateExampleSolution","clock","fail","target"],"sourceRoot":"../../../../../src","sources":["features/exampleSolution/model/ExampleSolutionApi.ts"],"mappings":";;AAAA,SAASA,sBAAsB,QAAQ,mDAAgD;AAEvF,SAASC,YAAY,EAAEC,MAAM,QAAQ,UAAU;AAC/C,SAASC,OAAO,QAAQ,uBAAoB;AAO5C,OAAO,MAAMC,mBAAmB,CAAC;EAIfC,eAAe,GAAGJ,YAAY,CAAC,MAAM;IACnD,IAAI,CAAC,IAAI,CAACK,cAAc,EAAE;IAC1B,IAAI,CAACA,cAAc,CAACH,OAAO,CAAC,8BAA8B,CAAC,CAAC;EAC9D,CAAC,CAAC;EAEFI,WAAWA,CAAC;IAAEC,GAAG;IAAEC;EAAsC,CAAC,EAAE;IAC1D,IAAI,CAACC,yBAAyB,GAAGV,sBAAsB,CAACQ,GAAG,CAACG,uBAAuB,CAAC;IACpF,IAAI,CAACL,cAAc,GAAGG,YAAY;IAElCP,MAAM,CAAC;MACLU,KAAK,EAAE,IAAI,CAACF,yBAAyB,CAACG,IAAI;MAC1CC,MAAM,EAAE,IAAI,CAACT;IACf,CAAC,CAAC;EACJ;AACF","ignoreList":[]}
@@ -1,13 +0,0 @@
1
- "use strict";
2
-
3
- import { createEvent, createStore } from 'effector';
4
- export class ExampleSolutionCache {
5
- addExampleSolution = createEvent();
6
- $state = createStore({}).on(this.addExampleSolution, (state, exampleSolution) => {
7
- return {
8
- ...state,
9
- [exampleSolution.cacheKey]: exampleSolution.response
10
- };
11
- });
12
- }
13
- //# sourceMappingURL=ExampleSolutionCache.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["createEvent","createStore","ExampleSolutionCache","addExampleSolution","$state","on","state","exampleSolution","cacheKey","response"],"sourceRoot":"../../../../../src","sources":["features/exampleSolution/model/ExampleSolutionCache.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,WAAW,QAAQ,UAAU;AAQnD,OAAO,MAAMC,oBAAoB,CAAC;EAChBC,kBAAkB,GAAGH,WAAW,CAAqB,CAAC;EACtDI,MAAM,GAAGH,WAAW,CAA0C,CAAC,CAAC,CAAC,CAACI,EAAE,CAClF,IAAI,CAACF,kBAAkB,EACvB,CAACG,KAAK,EAAEC,eAAe,KAAK;IAC1B,OAAO;MACL,GAAGD,KAAK;MACR,CAACC,eAAe,CAACC,QAAQ,GAAGD,eAAe,CAACE;IAC9C,CAAC;EACH,CACF,CAAC;AACH","ignoreList":[]}
@@ -1,4 +0,0 @@
1
- "use strict";
2
-
3
- export {};
4
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["features/exampleSolution/types.ts"],"mappings":"","ignoreList":[]}
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import { ExampleSolutionModalParams } from './types';
3
- type ExampleSolutionModalComponentProps = {
4
- modal: {
5
- closeModal: () => void;
6
- params: ExampleSolutionModalParams;
7
- };
8
- };
9
- export declare const ExampleSolutionModal: ({ modal: { closeModal, params }, }: ExampleSolutionModalComponentProps) => React.JSX.Element;
10
- export {};
11
- //# sourceMappingURL=ExampleSolutionModal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExampleSolutionModal.d.ts","sourceRoot":"","sources":["../../../../../src/features/exampleSolution/ExampleSolutionModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAA;AAEpD,KAAK,kCAAkC,GAAG;IACxC,KAAK,EAAE;QACL,UAAU,EAAE,MAAM,IAAI,CAAA;QACtB,MAAM,EAAE,0BAA0B,CAAA;KACnC,CAAA;CACF,CAAA;AAED,eAAO,MAAM,oBAAoB,uCAE9B,kCAAkC,sBAQpC,CAAA"}
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { ExampleSolutionModalParams } from '../types';
3
- type ExampleSolutionModalContentProps = {
4
- params: ExampleSolutionModalParams;
5
- };
6
- export declare const ExampleSolutionModalContent: ({ params: { model, payload, cacheKey }, }: ExampleSolutionModalContentProps) => React.JSX.Element;
7
- export {};
8
- //# sourceMappingURL=ExampleSolutionModalContent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExampleSolutionModalContent.d.ts","sourceRoot":"","sources":["../../../../../../src/features/exampleSolution/components/ExampleSolutionModalContent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAA;AAOrD,KAAK,gCAAgC,GAAG;IACtC,MAAM,EAAE,0BAA0B,CAAA;CACnC,CAAA;AAID,eAAO,MAAM,2BAA2B,8CAErC,gCAAgC,sBAyBlC,CAAA"}
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { ExampleSolutionStatuses } from '../constants';
3
- type QuestionSectionProps = {
4
- question?: string;
5
- status: ExampleSolutionStatuses;
6
- renderKatexComponent: (katexString: string) => React.ReactNode;
7
- };
8
- export declare const QuestionSection: ({ question, status, renderKatexComponent, }: QuestionSectionProps) => React.JSX.Element;
9
- export {};
10
- //# sourceMappingURL=QuestionSection.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"QuestionSection.d.ts","sourceRoot":"","sources":["../../../../../../src/features/exampleSolution/components/QuestionSection.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAGtD,KAAK,oBAAoB,GAAG;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,uBAAuB,CAAA;IAC/B,oBAAoB,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAA;CAC/D,CAAA;AAED,eAAO,MAAM,eAAe,gDAIzB,oBAAoB,sBAWtB,CAAA"}
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import { ExampleSolutionStatuses } from '../constants';
3
- type SolutionSectionProps = {
4
- answer?: string;
5
- status: ExampleSolutionStatuses;
6
- };
7
- export declare const SolutionSection: ({ answer, status }: SolutionSectionProps) => React.JSX.Element;
8
- export {};
9
- //# sourceMappingURL=SolutionSection.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SolutionSection.d.ts","sourceRoot":"","sources":["../../../../../../src/features/exampleSolution/components/SolutionSection.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAItD,KAAK,oBAAoB,GAAG;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,uBAAuB,CAAA;CAChC,CAAA;AAWD,eAAO,MAAM,eAAe,uBAAwB,oBAAoB,sBAoDvE,CAAA"}
@@ -1,6 +0,0 @@
1
- export declare const enum ExampleSolutionStatuses {
2
- LOADING = "loading",
3
- DONE_DATA = "doneData",
4
- CACHE = "cache"
5
- }
6
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/features/exampleSolution/constants.ts"],"names":[],"mappings":"AAAA,0BAAkB,uBAAuB;IACvC,OAAO,YAAY;IACnB,SAAS,aAAa;IACtB,KAAK,UAAU;CAChB"}
@@ -1,9 +0,0 @@
1
- import { ExampleSolutionModalParams, ExampleSolutionResponse } from '../types';
2
- import { ExampleSolutionStatuses } from '../constants';
3
- type UseExampleSolutionReturn = {
4
- result: ExampleSolutionResponse | null;
5
- status: ExampleSolutionStatuses;
6
- };
7
- export declare const useExampleSolution: ({ model, payload, cacheKey, }: ExampleSolutionModalParams) => UseExampleSolutionReturn;
8
- export {};
9
- //# sourceMappingURL=useExampleSolution.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useExampleSolution.d.ts","sourceRoot":"","sources":["../../../../../../src/features/exampleSolution/hooks/useExampleSolution.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAA;AAC9E,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAItD,KAAK,wBAAwB,GAAG;IAC9B,MAAM,EAAE,uBAAuB,GAAG,IAAI,CAAA;IACtC,MAAM,EAAE,uBAAuB,CAAA;CAChC,CAAA;AAED,eAAO,MAAM,kBAAkB,kCAI5B,0BAA0B,KAAG,wBAiD/B,CAAA"}
@@ -1,4 +0,0 @@
1
- export * from './ExampleSolutionModal';
2
- export * from './model/ExampleSolution.model';
3
- export * from './types';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/exampleSolution/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAA;AACtC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,SAAS,CAAA"}
@@ -1,10 +0,0 @@
1
- import { ExampleSolutionModelProps } from '../types';
2
- import { ExampleSolutionsApi } from './ExampleSolutionApi';
3
- import { ExampleSolutionCache } from './ExampleSolutionCache';
4
- export declare class ExampleSolutionModel {
5
- readonly api: ExampleSolutionsApi;
6
- readonly cache: ExampleSolutionCache;
7
- readonly renderKatexComponent: (katexString: string) => React.ReactNode;
8
- constructor({ api, errorHandler, renderKatexComponent }: ExampleSolutionModelProps);
9
- }
10
- //# sourceMappingURL=ExampleSolution.model.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExampleSolution.model.d.ts","sourceRoot":"","sources":["../../../../../../src/features/exampleSolution/model/ExampleSolution.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAA;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAE7D,qBAAa,oBAAoB;IAC/B,SAAgB,GAAG,sBAAA;IACnB,SAAgB,KAAK,uBAA6B;IAElD,SAAgB,oBAAoB,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAA;gBAElE,EAAE,GAAG,EAAE,YAAY,EAAE,oBAAoB,EAAE,EAAE,yBAAyB;CAInF"}
@@ -1,13 +0,0 @@
1
- import { ExampleSolutionApiRequests, ExampleSolutionErrorHandler } from '../types';
2
- type ExampleSolutionApiProps = {
3
- api: ExampleSolutionApiRequests;
4
- errorHandler?: ExampleSolutionErrorHandler;
5
- };
6
- export declare class ExampleSolutionsApi {
7
- readonly generateExampleSolutionFx: import("./../../../lib/effector/createControllerEffect").ControlledEffect<import("../types").ExampleSolutionPayload, import("../types").ExampleSolutionResponse>;
8
- readonly errorHandlerFx?: ExampleSolutionErrorHandler;
9
- readonly errorHandlingFx: import("effector").Effect<void, void, Error>;
10
- constructor({ api, errorHandler }: ExampleSolutionApiProps);
11
- }
12
- export {};
13
- //# sourceMappingURL=ExampleSolutionApi.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExampleSolutionApi.d.ts","sourceRoot":"","sources":["../../../../../../src/features/exampleSolution/model/ExampleSolutionApi.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAA;AAIlF,KAAK,uBAAuB,GAAG;IAC7B,GAAG,EAAE,0BAA0B,CAAA;IAC/B,YAAY,CAAC,EAAE,2BAA2B,CAAA;CAC3C,CAAA;AAED,qBAAa,mBAAmB;IAC9B,SAAgB,yBAAyB,mKAAA;IACzC,SAAgB,cAAc,CAAC,EAAE,2BAA2B,CAAA;IAE5D,SAAgB,eAAe,+CAG7B;gBAEU,EAAE,GAAG,EAAE,YAAY,EAAE,EAAE,uBAAuB;CAS3D"}
@@ -1,11 +0,0 @@
1
- import { ExampleSolutionResponse } from '../types';
2
- type AddExampleSolution = {
3
- cacheKey: string;
4
- response: ExampleSolutionResponse;
5
- };
6
- export declare class ExampleSolutionCache {
7
- readonly addExampleSolution: import("effector").EventCallable<AddExampleSolution>;
8
- readonly $state: import("effector").StoreWritable<Record<string, ExampleSolutionResponse>>;
9
- }
10
- export {};
11
- //# sourceMappingURL=ExampleSolutionCache.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExampleSolutionCache.d.ts","sourceRoot":"","sources":["../../../../../../src/features/exampleSolution/model/ExampleSolutionCache.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAA;AAElD,KAAK,kBAAkB,GAAG;IACxB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,uBAAuB,CAAA;CAClC,CAAA;AAED,qBAAa,oBAAoB;IAC/B,SAAgB,kBAAkB,uDAAoC;IACtE,SAAgB,MAAM,4EAQrB;CACF"}
@@ -1,27 +0,0 @@
1
- import { ExampleSolutionModel } from './model/ExampleSolution.model';
2
- export type ExampleSolutionPayload = {
3
- question: string;
4
- answer: string;
5
- language: string;
6
- altText?: string;
7
- imageCdnId?: string;
8
- };
9
- export type ExampleSolutionResponse = {
10
- question: string;
11
- answer: string;
12
- };
13
- export type ExampleSolutionApiRequests = {
14
- generateExampleSolution: (body: ExampleSolutionPayload) => Promise<ExampleSolutionResponse>;
15
- };
16
- export type ExampleSolutionErrorHandler = (errorMessage: string) => void;
17
- export type ExampleSolutionModelProps = {
18
- api: ExampleSolutionApiRequests;
19
- errorHandler?: ExampleSolutionErrorHandler;
20
- renderKatexComponent: (katexString: string) => React.ReactNode;
21
- };
22
- export type ExampleSolutionModalParams = {
23
- cacheKey: string;
24
- payload: ExampleSolutionPayload;
25
- model: ExampleSolutionModel;
26
- };
27
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/features/exampleSolution/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAA;AAEpE,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAA;AACD,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AACD,MAAM,MAAM,0BAA0B,GAAG;IACvC,uBAAuB,EAAE,CAAC,IAAI,EAAE,sBAAsB,KAAK,OAAO,CAAC,uBAAuB,CAAC,CAAA;CAC5F,CAAA;AACD,MAAM,MAAM,2BAA2B,GAAG,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAA;AACxE,MAAM,MAAM,yBAAyB,GAAG;IACtC,GAAG,EAAE,0BAA0B,CAAA;IAC/B,YAAY,CAAC,EAAE,2BAA2B,CAAA;IAC1C,oBAAoB,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAA;CAC/D,CAAA;AACD,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,sBAAsB,CAAA;IAC/B,KAAK,EAAE,oBAAoB,CAAA;CAC5B,CAAA"}
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import { ExampleSolutionModalParams } from './types';
3
- type ExampleSolutionModalComponentProps = {
4
- modal: {
5
- closeModal: () => void;
6
- params: ExampleSolutionModalParams;
7
- };
8
- };
9
- export declare const ExampleSolutionModal: ({ modal: { closeModal, params }, }: ExampleSolutionModalComponentProps) => React.JSX.Element;
10
- export {};
11
- //# sourceMappingURL=ExampleSolutionModal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExampleSolutionModal.d.ts","sourceRoot":"","sources":["../../../../../src/features/exampleSolution/ExampleSolutionModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAA;AAEpD,KAAK,kCAAkC,GAAG;IACxC,KAAK,EAAE;QACL,UAAU,EAAE,MAAM,IAAI,CAAA;QACtB,MAAM,EAAE,0BAA0B,CAAA;KACnC,CAAA;CACF,CAAA;AAED,eAAO,MAAM,oBAAoB,uCAE9B,kCAAkC,sBAQpC,CAAA"}
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { ExampleSolutionModalParams } from '../types';
3
- type ExampleSolutionModalContentProps = {
4
- params: ExampleSolutionModalParams;
5
- };
6
- export declare const ExampleSolutionModalContent: ({ params: { model, payload, cacheKey }, }: ExampleSolutionModalContentProps) => React.JSX.Element;
7
- export {};
8
- //# sourceMappingURL=ExampleSolutionModalContent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExampleSolutionModalContent.d.ts","sourceRoot":"","sources":["../../../../../../src/features/exampleSolution/components/ExampleSolutionModalContent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAA;AAOrD,KAAK,gCAAgC,GAAG;IACtC,MAAM,EAAE,0BAA0B,CAAA;CACnC,CAAA;AAID,eAAO,MAAM,2BAA2B,8CAErC,gCAAgC,sBAyBlC,CAAA"}
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { ExampleSolutionStatuses } from '../constants';
3
- type QuestionSectionProps = {
4
- question?: string;
5
- status: ExampleSolutionStatuses;
6
- renderKatexComponent: (katexString: string) => React.ReactNode;
7
- };
8
- export declare const QuestionSection: ({ question, status, renderKatexComponent, }: QuestionSectionProps) => React.JSX.Element;
9
- export {};
10
- //# sourceMappingURL=QuestionSection.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"QuestionSection.d.ts","sourceRoot":"","sources":["../../../../../../src/features/exampleSolution/components/QuestionSection.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAGtD,KAAK,oBAAoB,GAAG;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,uBAAuB,CAAA;IAC/B,oBAAoB,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAA;CAC/D,CAAA;AAED,eAAO,MAAM,eAAe,gDAIzB,oBAAoB,sBAWtB,CAAA"}
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import { ExampleSolutionStatuses } from '../constants';
3
- type SolutionSectionProps = {
4
- answer?: string;
5
- status: ExampleSolutionStatuses;
6
- };
7
- export declare const SolutionSection: ({ answer, status }: SolutionSectionProps) => React.JSX.Element;
8
- export {};
9
- //# sourceMappingURL=SolutionSection.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SolutionSection.d.ts","sourceRoot":"","sources":["../../../../../../src/features/exampleSolution/components/SolutionSection.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAItD,KAAK,oBAAoB,GAAG;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,uBAAuB,CAAA;CAChC,CAAA;AAWD,eAAO,MAAM,eAAe,uBAAwB,oBAAoB,sBAoDvE,CAAA"}
@@ -1,6 +0,0 @@
1
- export declare const enum ExampleSolutionStatuses {
2
- LOADING = "loading",
3
- DONE_DATA = "doneData",
4
- CACHE = "cache"
5
- }
6
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/features/exampleSolution/constants.ts"],"names":[],"mappings":"AAAA,0BAAkB,uBAAuB;IACvC,OAAO,YAAY;IACnB,SAAS,aAAa;IACtB,KAAK,UAAU;CAChB"}
@@ -1,9 +0,0 @@
1
- import { ExampleSolutionModalParams, ExampleSolutionResponse } from '../types';
2
- import { ExampleSolutionStatuses } from '../constants';
3
- type UseExampleSolutionReturn = {
4
- result: ExampleSolutionResponse | null;
5
- status: ExampleSolutionStatuses;
6
- };
7
- export declare const useExampleSolution: ({ model, payload, cacheKey, }: ExampleSolutionModalParams) => UseExampleSolutionReturn;
8
- export {};
9
- //# sourceMappingURL=useExampleSolution.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useExampleSolution.d.ts","sourceRoot":"","sources":["../../../../../../src/features/exampleSolution/hooks/useExampleSolution.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAA;AAC9E,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAItD,KAAK,wBAAwB,GAAG;IAC9B,MAAM,EAAE,uBAAuB,GAAG,IAAI,CAAA;IACtC,MAAM,EAAE,uBAAuB,CAAA;CAChC,CAAA;AAED,eAAO,MAAM,kBAAkB,kCAI5B,0BAA0B,KAAG,wBAiD/B,CAAA"}
@@ -1,4 +0,0 @@
1
- export * from './ExampleSolutionModal';
2
- export * from './model/ExampleSolution.model';
3
- export * from './types';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/exampleSolution/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAA;AACtC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,SAAS,CAAA"}
@@ -1,10 +0,0 @@
1
- import { ExampleSolutionModelProps } from '../types';
2
- import { ExampleSolutionsApi } from './ExampleSolutionApi';
3
- import { ExampleSolutionCache } from './ExampleSolutionCache';
4
- export declare class ExampleSolutionModel {
5
- readonly api: ExampleSolutionsApi;
6
- readonly cache: ExampleSolutionCache;
7
- readonly renderKatexComponent: (katexString: string) => React.ReactNode;
8
- constructor({ api, errorHandler, renderKatexComponent }: ExampleSolutionModelProps);
9
- }
10
- //# sourceMappingURL=ExampleSolution.model.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExampleSolution.model.d.ts","sourceRoot":"","sources":["../../../../../../src/features/exampleSolution/model/ExampleSolution.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAA;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAE7D,qBAAa,oBAAoB;IAC/B,SAAgB,GAAG,sBAAA;IACnB,SAAgB,KAAK,uBAA6B;IAElD,SAAgB,oBAAoB,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAA;gBAElE,EAAE,GAAG,EAAE,YAAY,EAAE,oBAAoB,EAAE,EAAE,yBAAyB;CAInF"}
@@ -1,13 +0,0 @@
1
- import { ExampleSolutionApiRequests, ExampleSolutionErrorHandler } from '../types';
2
- type ExampleSolutionApiProps = {
3
- api: ExampleSolutionApiRequests;
4
- errorHandler?: ExampleSolutionErrorHandler;
5
- };
6
- export declare class ExampleSolutionsApi {
7
- readonly generateExampleSolutionFx: import("./../../../lib/effector/createControllerEffect").ControlledEffect<import("../types").ExampleSolutionPayload, import("../types").ExampleSolutionResponse>;
8
- readonly errorHandlerFx?: ExampleSolutionErrorHandler;
9
- readonly errorHandlingFx: import("effector").Effect<void, void, Error>;
10
- constructor({ api, errorHandler }: ExampleSolutionApiProps);
11
- }
12
- export {};
13
- //# sourceMappingURL=ExampleSolutionApi.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExampleSolutionApi.d.ts","sourceRoot":"","sources":["../../../../../../src/features/exampleSolution/model/ExampleSolutionApi.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAA;AAIlF,KAAK,uBAAuB,GAAG;IAC7B,GAAG,EAAE,0BAA0B,CAAA;IAC/B,YAAY,CAAC,EAAE,2BAA2B,CAAA;CAC3C,CAAA;AAED,qBAAa,mBAAmB;IAC9B,SAAgB,yBAAyB,mKAAA;IACzC,SAAgB,cAAc,CAAC,EAAE,2BAA2B,CAAA;IAE5D,SAAgB,eAAe,+CAG7B;gBAEU,EAAE,GAAG,EAAE,YAAY,EAAE,EAAE,uBAAuB;CAS3D"}
@@ -1,11 +0,0 @@
1
- import { ExampleSolutionResponse } from '../types';
2
- type AddExampleSolution = {
3
- cacheKey: string;
4
- response: ExampleSolutionResponse;
5
- };
6
- export declare class ExampleSolutionCache {
7
- readonly addExampleSolution: import("effector").EventCallable<AddExampleSolution>;
8
- readonly $state: import("effector").StoreWritable<Record<string, ExampleSolutionResponse>>;
9
- }
10
- export {};
11
- //# sourceMappingURL=ExampleSolutionCache.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExampleSolutionCache.d.ts","sourceRoot":"","sources":["../../../../../../src/features/exampleSolution/model/ExampleSolutionCache.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAA;AAElD,KAAK,kBAAkB,GAAG;IACxB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,uBAAuB,CAAA;CAClC,CAAA;AAED,qBAAa,oBAAoB;IAC/B,SAAgB,kBAAkB,uDAAoC;IACtE,SAAgB,MAAM,4EAQrB;CACF"}