@magmamath/students-features 0.6.14-rc.20 → 0.6.14-rc.21

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 (63) hide show
  1. package/dist/commonjs/features/exampleSolution/ExampleSolutionModal.js +1 -3
  2. package/dist/commonjs/features/exampleSolution/ExampleSolutionModal.js.map +1 -1
  3. package/dist/commonjs/features/exampleSolution/assets/grid.webp +0 -0
  4. package/dist/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.js +18 -11
  5. package/dist/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.js.map +1 -1
  6. package/dist/commonjs/features/exampleSolution/components/QuestionSection.js +7 -7
  7. package/dist/commonjs/features/exampleSolution/components/QuestionSection.js.map +1 -1
  8. package/dist/commonjs/features/exampleSolution/components/SolutionSection.js +55 -29
  9. package/dist/commonjs/features/exampleSolution/components/SolutionSection.js.map +1 -1
  10. package/dist/commonjs/features/exampleSolution/model/ExampleSolution.model.js +3 -1
  11. package/dist/commonjs/features/exampleSolution/model/ExampleSolution.model.js.map +1 -1
  12. package/dist/commonjs/features/formulaSheet/components/FormulaSheet.js +5 -4
  13. package/dist/commonjs/features/formulaSheet/components/FormulaSheet.js.map +1 -1
  14. package/dist/commonjs/shared/translation/localization/sw.json +1 -1
  15. package/dist/module/features/exampleSolution/ExampleSolutionModal.js +1 -3
  16. package/dist/module/features/exampleSolution/ExampleSolutionModal.js.map +1 -1
  17. package/dist/module/features/exampleSolution/assets/grid.webp +0 -0
  18. package/dist/module/features/exampleSolution/components/ExampleSolutionModalContent.js +19 -12
  19. package/dist/module/features/exampleSolution/components/ExampleSolutionModalContent.js.map +1 -1
  20. package/dist/module/features/exampleSolution/components/QuestionSection.js +9 -9
  21. package/dist/module/features/exampleSolution/components/QuestionSection.js.map +1 -1
  22. package/dist/module/features/exampleSolution/components/SolutionSection.js +57 -31
  23. package/dist/module/features/exampleSolution/components/SolutionSection.js.map +1 -1
  24. package/dist/module/features/exampleSolution/model/ExampleSolution.model.js +3 -1
  25. package/dist/module/features/exampleSolution/model/ExampleSolution.model.js.map +1 -1
  26. package/dist/module/features/formulaSheet/components/FormulaSheet.js +5 -4
  27. package/dist/module/features/formulaSheet/components/FormulaSheet.js.map +1 -1
  28. package/dist/module/shared/translation/localization/sw.json +1 -1
  29. package/dist/typescript/commonjs/features/exampleSolution/ExampleSolutionModal.d.ts.map +1 -1
  30. package/dist/typescript/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.d.ts +5 -1
  31. package/dist/typescript/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.d.ts.map +1 -1
  32. package/dist/typescript/commonjs/features/exampleSolution/components/QuestionSection.d.ts +2 -1
  33. package/dist/typescript/commonjs/features/exampleSolution/components/QuestionSection.d.ts.map +1 -1
  34. package/dist/typescript/commonjs/features/exampleSolution/components/SolutionSection.d.ts.map +1 -1
  35. package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolution.model.d.ts +3 -2
  36. package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolution.model.d.ts.map +1 -1
  37. package/dist/typescript/commonjs/features/exampleSolution/types.d.ts +2 -1
  38. package/dist/typescript/commonjs/features/exampleSolution/types.d.ts.map +1 -1
  39. package/dist/typescript/commonjs/features/formulaSheet/components/FormulaSheet.d.ts.map +1 -1
  40. package/dist/typescript/module/features/exampleSolution/ExampleSolutionModal.d.ts.map +1 -1
  41. package/dist/typescript/module/features/exampleSolution/components/ExampleSolutionModalContent.d.ts +5 -1
  42. package/dist/typescript/module/features/exampleSolution/components/ExampleSolutionModalContent.d.ts.map +1 -1
  43. package/dist/typescript/module/features/exampleSolution/components/QuestionSection.d.ts +2 -1
  44. package/dist/typescript/module/features/exampleSolution/components/QuestionSection.d.ts.map +1 -1
  45. package/dist/typescript/module/features/exampleSolution/components/SolutionSection.d.ts.map +1 -1
  46. package/dist/typescript/module/features/exampleSolution/model/ExampleSolution.model.d.ts +3 -2
  47. package/dist/typescript/module/features/exampleSolution/model/ExampleSolution.model.d.ts.map +1 -1
  48. package/dist/typescript/module/features/exampleSolution/types.d.ts +2 -1
  49. package/dist/typescript/module/features/exampleSolution/types.d.ts.map +1 -1
  50. package/dist/typescript/module/features/formulaSheet/components/FormulaSheet.d.ts.map +1 -1
  51. package/package.json +2 -2
  52. package/src/features/exampleSolution/ExampleSolutionModal.tsx +1 -7
  53. package/src/features/exampleSolution/assets/grid.webp +0 -0
  54. package/src/features/exampleSolution/components/ExampleSolutionModalContent.tsx +24 -12
  55. package/src/features/exampleSolution/components/QuestionSection.tsx +11 -7
  56. package/src/features/exampleSolution/components/SolutionSection.tsx +72 -29
  57. package/src/features/exampleSolution/model/ExampleSolution.model.ts +5 -2
  58. package/src/features/exampleSolution/types.ts +2 -1
  59. package/src/features/formulaSheet/components/FormulaSheet.tsx +6 -4
  60. package/src/shared/translation/localization/sw.json +1 -1
  61. package/dist/commonjs/features/exampleSolution/assets/grid.png +0 -0
  62. package/dist/module/features/exampleSolution/assets/grid.png +0 -0
  63. package/src/features/exampleSolution/assets/grid.png +0 -0
@@ -1,67 +1,93 @@
1
1
  "use strict";
2
2
 
3
- import { StyleSheet, View, Image, Text } from 'react-native';
3
+ import { StyleSheet, View, Image, ImageBackground, ScrollView, useWindowDimensions } from 'react-native';
4
4
  import React from 'react';
5
5
  import { COLORS, IS_WEB, SPACING } from '@magmamath/react-native-ui';
6
6
  import Animated, { FadeIn } from 'react-native-reanimated';
7
7
  import { ExampleSolutionStatuses } from "../constants.js";
8
- import gridImage from '../assets/grid.png';
9
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
+ import gridImage from '../assets/grid.webp';
9
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
10
+ const CONTAINER_SIZES = {
11
+ width: 489,
12
+ height: 543
13
+ };
14
+ const BORDER_WIDTH = 1;
15
+ const CONTAINER_HEIGHT_OFFSET = 160;
10
16
  const gridImagePath = !IS_WEB ? Image.resolveAssetSource(gridImage).uri : gridImage;
11
17
  export const SolutionSection = ({
12
18
  answer,
13
19
  status
14
20
  }) => {
21
+ const {
22
+ height
23
+ } = useWindowDimensions();
15
24
  const shouldShowAnswer = answer && (status === ExampleSolutionStatuses.DONE_DATA || status === ExampleSolutionStatuses.CACHE);
16
- return /*#__PURE__*/_jsxs(View, {
17
- style: styles.container,
18
- children: [/*#__PURE__*/_jsx(Image, {
19
- source: {
20
- uri: gridImagePath
21
- },
22
- style: [styles.gridImage, IS_WEB && styles.gridImageWeb]
23
- }), shouldShowAnswer && /*#__PURE__*/_jsx(Animated.ScrollView, {
25
+ return /*#__PURE__*/_jsx(View, {
26
+ style: [styles.container, IS_WEB && {
27
+ maxHeight: height - CONTAINER_HEIGHT_OFFSET
28
+ }],
29
+ children: /*#__PURE__*/_jsx(ScrollView, {
24
30
  style: styles.solutionScroll,
25
31
  contentContainerStyle: styles.solutionScrollContent,
26
- entering: status === 'cache' ? undefined : FadeIn.delay(1000).duration(500),
27
- children: /*#__PURE__*/_jsx(Text, {
28
- style: styles.solutionText,
29
- children: answer
32
+ bounces: true,
33
+ children: IS_WEB ? /*#__PURE__*/_jsx(ImageBackground, {
34
+ resizeMode: "repeat",
35
+ style: [styles.gridImageWeb],
36
+ source: {
37
+ uri: gridImagePath
38
+ },
39
+ children: shouldShowAnswer && /*#__PURE__*/_jsx(Animated.Text, {
40
+ entering: status === 'cache' ? undefined : FadeIn.delay(1000).duration(500),
41
+ style: styles.solutionText,
42
+ children: answer
43
+ })
44
+ }) : /*#__PURE__*/_jsxs(_Fragment, {
45
+ children: [/*#__PURE__*/_jsx(ImageBackground, {
46
+ resizeMode: "repeat",
47
+ style: styles.gridImageRn,
48
+ source: {
49
+ uri: gridImagePath
50
+ }
51
+ }), shouldShowAnswer && /*#__PURE__*/_jsx(Animated.Text, {
52
+ entering: status === 'cache' ? undefined : FadeIn.delay(1000).duration(500),
53
+ style: styles.solutionText,
54
+ children: answer
55
+ })]
30
56
  })
31
- })]
57
+ })
32
58
  });
33
59
  };
34
60
  const styles = StyleSheet.create({
35
61
  container: {
36
- width: 500,
62
+ width: CONTAINER_SIZES.width,
63
+ height: CONTAINER_SIZES.height,
37
64
  overflow: 'hidden',
38
65
  borderRadius: 8,
39
- borderWidth: 1,
66
+ borderWidth: BORDER_WIDTH,
40
67
  borderColor: COLORS.NEUTRAL_5
41
68
  },
42
- gridImage: {
69
+ gridImageRn: {
70
+ top: -327,
43
71
  width: '100%',
44
- height: '100%',
45
- resizeMode: 'cover',
46
- aspectRatio: 28 / 8
72
+ height: '150%',
73
+ position: 'absolute'
47
74
  },
48
75
  gridImageWeb: {
49
- transform: [{
50
- scale: 3.5
51
- }]
52
- },
53
- solutionScroll: {
54
- position: 'absolute',
55
76
  width: '100%',
56
77
  height: '100%'
57
78
  },
79
+ solutionScroll: {
80
+ flex: 1
81
+ },
58
82
  solutionScrollContent: {
59
- paddingHorizontal: SPACING[800],
60
- paddingVertical: SPACING[400]
83
+ minHeight: CONTAINER_SIZES.height - BORDER_WIDTH * 2,
84
+ width: '100%'
61
85
  },
62
86
  solutionText: {
63
87
  fontFamily: 'PlaypenSans-Light',
64
- fontSize: 22
88
+ fontSize: 28,
89
+ marginHorizontal: SPACING[800],
90
+ marginVertical: SPACING[400]
65
91
  }
66
92
  });
67
93
  //# sourceMappingURL=SolutionSection.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["StyleSheet","View","Image","Text","React","COLORS","IS_WEB","SPACING","Animated","FadeIn","ExampleSolutionStatuses","gridImage","jsx","_jsx","jsxs","_jsxs","gridImagePath","resolveAssetSource","uri","SolutionSection","answer","status","shouldShowAnswer","DONE_DATA","CACHE","style","styles","container","children","source","gridImageWeb","ScrollView","solutionScroll","contentContainerStyle","solutionScrollContent","entering","undefined","delay","duration","solutionText","create","width","overflow","borderRadius","borderWidth","borderColor","NEUTRAL_5","height","resizeMode","aspectRatio","transform","scale","position","paddingHorizontal","paddingVertical","fontFamily","fontSize"],"sourceRoot":"../../../../../src","sources":["features/exampleSolution/components/SolutionSection.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,IAAI,EAAEC,KAAK,EAAEC,IAAI,QAAQ,cAAc;AAC5D,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,MAAM,EAAEC,MAAM,EAAEC,OAAO,QAAQ,4BAA4B;AACpE,OAAOC,QAAQ,IAAIC,MAAM,QAAQ,yBAAyB;AAC1D,SAASC,uBAAuB,QAAQ,iBAAc;AACtD,OAAOC,SAAS,MAAM,oBAAoB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAO1C,MAAMC,aAAa,GAAG,CAACV,MAAM,GAAGJ,KAAK,CAACe,kBAAkB,CAACN,SAAS,CAAC,CAACO,GAAG,GAAGP,SAAS;AAEnF,OAAO,MAAMQ,eAAe,GAAGA,CAAC;EAAEC,MAAM;EAAEC;AAA6B,CAAC,KAAK;EAC3E,MAAMC,gBAAgB,GACpBF,MAAM,KACLC,MAAM,KAAKX,uBAAuB,CAACa,SAAS,IAAIF,MAAM,KAAKX,uBAAuB,CAACc,KAAK,CAAC;EAE5F,oBACET,KAAA,CAACd,IAAI;IAACwB,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,gBAC5Bf,IAAA,CAACX,KAAK;MACJ2B,MAAM,EAAE;QAAEX,GAAG,EAAEF;MAAc,CAAE;MAC/BS,KAAK,EAAE,CAACC,MAAM,CAACf,SAAS,EAAEL,MAAM,IAAIoB,MAAM,CAACI,YAAY;IAAE,CAC1D,CAAC,EACDR,gBAAgB,iBACfT,IAAA,CAACL,QAAQ,CAACuB,UAAU;MAClBN,KAAK,EAAEC,MAAM,CAACM,cAAe;MAC7BC,qBAAqB,EAAEP,MAAM,CAACQ,qBAAsB;MACpDC,QAAQ,EAAEd,MAAM,KAAK,OAAO,GAAGe,SAAS,GAAG3B,MAAM,CAAC4B,KAAK,CAAC,IAAI,CAAC,CAACC,QAAQ,CAAC,GAAG,CAAE;MAAAV,QAAA,eAE5Ef,IAAA,CAACV,IAAI;QAACsB,KAAK,EAAEC,MAAM,CAACa,YAAa;QAAAX,QAAA,EAAER;MAAM,CAAO;IAAC,CAC9B,CACtB;EAAA,CACG,CAAC;AAEX,CAAC;AAED,MAAMM,MAAM,GAAG1B,UAAU,CAACwC,MAAM,CAAC;EAC/Bb,SAAS,EAAE;IACTc,KAAK,EAAE,GAAG;IACVC,QAAQ,EAAE,QAAQ;IAClBC,YAAY,EAAE,CAAC;IACfC,WAAW,EAAE,CAAC;IACdC,WAAW,EAAExC,MAAM,CAACyC;EACtB,CAAC;EACDnC,SAAS,EAAE;IACT8B,KAAK,EAAE,MAAM;IACbM,MAAM,EAAE,MAAM;IACdC,UAAU,EAAE,OAAO;IACnBC,WAAW,EAAE,EAAE,GAAG;EACpB,CAAC;EACDnB,YAAY,EAAE;IACZoB,SAAS,EAAE,CAAC;MAAEC,KAAK,EAAE;IAAI,CAAC;EAC5B,CAAC;EACDnB,cAAc,EAAE;IACdoB,QAAQ,EAAE,UAAU;IACpBX,KAAK,EAAE,MAAM;IACbM,MAAM,EAAE;EACV,CAAC;EACDb,qBAAqB,EAAE;IACrBmB,iBAAiB,EAAE9C,OAAO,CAAC,GAAG,CAAC;IAC/B+C,eAAe,EAAE/C,OAAO,CAAC,GAAG;EAC9B,CAAC;EACDgC,YAAY,EAAE;IACZgB,UAAU,EAAE,mBAAmB;IAC/BC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["StyleSheet","View","Image","ImageBackground","ScrollView","useWindowDimensions","React","COLORS","IS_WEB","SPACING","Animated","FadeIn","ExampleSolutionStatuses","gridImage","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","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"],"sourceRoot":"../../../../../src","sources":["features/exampleSolution/components/SolutionSection.tsx"],"mappings":"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","ignoreList":[]}
@@ -6,12 +6,14 @@ export class ExampleSolutionModel {
6
6
  cache = new ExampleSolutionCache();
7
7
  constructor({
8
8
  api,
9
- errorHandler
9
+ errorHandler,
10
+ renderKatexComponent
10
11
  }) {
11
12
  this.api = new ExampleSolutionsApi({
12
13
  api,
13
14
  errorHandler
14
15
  });
16
+ this.renderKatexComponent = renderKatexComponent;
15
17
  }
16
18
  }
17
19
  //# sourceMappingURL=ExampleSolution.model.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["ExampleSolutionsApi","ExampleSolutionCache","ExampleSolutionModel","cache","constructor","api","errorHandler"],"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;EAElDG,WAAWA,CAAC;IAAEC,GAAG;IAAEC;EAAwC,CAAC,EAAE;IAC5D,IAAI,CAACD,GAAG,GAAG,IAAIL,mBAAmB,CAAC;MAAEK,GAAG;MAAEC;IAAa,CAAC,CAAC;EAC3D;AACF","ignoreList":[]}
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":[]}
@@ -18,6 +18,10 @@ export const FormulaSheet = /*#__PURE__*/forwardRef(({
18
18
  const isOpen = useUnit(model.modal.$isOpen);
19
19
  const sheetFileBlob = useUnit(model.file.$blob);
20
20
  const isRequestPending = useUnit(model.api.getPDFFileBlobFx.pending);
21
+ const onPressHandler = () => {
22
+ model.modal.toggle();
23
+ onPress?.();
24
+ };
21
25
  useEffect(() => {
22
26
  model.file.setId(fileId ?? null);
23
27
  }, [fileId]);
@@ -28,10 +32,7 @@ export const FormulaSheet = /*#__PURE__*/forwardRef(({
28
32
  variant: ButtonVariant.SECONDARY,
29
33
  colorScheme: buttonColor,
30
34
  isActive: isOpen,
31
- onPress: () => {
32
- model.modal.toggle();
33
- onPress?.();
34
- },
35
+ onPress: () => onPressHandler(),
35
36
  icon: /*#__PURE__*/_jsx(TheoryIcon, {
36
37
  color: isOpen ? COLORS.NEUTRAL_1 : undefined,
37
38
  size: 20
@@ -1 +1 @@
1
- {"version":3,"names":["React","forwardRef","useEffect","useUnit","Button","ButtonColor","ButtonSize","ButtonVariant","COLORS","TheoryIcon","LoaderColor","FormulaSheetModal","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","FormulaSheet","model","fileId","renderer","buttonSize","MEDIUM","buttonColor","BLUE","loaderColor","onPress","style","ref","isOpen","modal","$isOpen","sheetFileBlob","file","$blob","isRequestPending","api","getPDFFileBlobFx","pending","setId","children","size","variant","SECONDARY","colorScheme","isActive","toggle","icon","color","NEUTRAL_1","undefined","isLoading","onClose","setIsOpen"],"sourceRoot":"../../../../../src","sources":["features/formulaSheet/components/FormulaSheet.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,UAAU,EAAaC,SAAS,QAAQ,OAAO;AAC/D,SAASC,OAAO,QAAQ,gBAAgB;AACxC,SACEC,MAAM,EACNC,WAAW,EACXC,UAAU,EACVC,aAAa,EACbC,MAAM,EACNC,UAAU,EAEVC,WAAW,QAEN,4BAA4B;AAEnC,SAASC,iBAAiB,QAAQ,wBAAqB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAavD,OAAO,MAAMC,YAAY,gBAAGjB,UAAU,CACpC,CACE;EACEkB,KAAK;EACLC,MAAM;EACNC,QAAQ;EACRC,UAAU,GAAGhB,UAAU,CAACiB,MAAM;EAC9BC,WAAW,GAAGnB,WAAW,CAACoB,IAAI;EAC9BC,WAAW,GAAGhB,WAAW,CAACe,IAAI;EAC9BE,OAAO;EACPC;AACF,CAAC,EACDC,GAAG,KACA;EACH,MAAMC,MAAM,GAAG3B,OAAO,CAACgB,KAAK,CAACY,KAAK,CAACC,OAAO,CAAC;EAC3C,MAAMC,aAAa,GAAG9B,OAAO,CAACgB,KAAK,CAACe,IAAI,CAACC,KAAK,CAAC;EAC/C,MAAMC,gBAAgB,GAAGjC,OAAO,CAACgB,KAAK,CAACkB,GAAG,CAACC,gBAAgB,CAACC,OAAO,CAAC;EAEpErC,SAAS,CAAC,MAAM;IACdiB,KAAK,CAACe,IAAI,CAACM,KAAK,CAACpB,MAAM,IAAI,IAAI,CAAC;EAClC,CAAC,EAAE,CAACA,MAAM,CAAC,CAAC;EAEZ,oBACEH,KAAA,CAAAF,SAAA;IAAA0B,QAAA,gBACE5B,IAAA,CAACT,MAAM;MACLyB,GAAG,EAAEA,GAAI;MACTa,IAAI,EAAEpB,UAAW;MACjBqB,OAAO,EAAEpC,aAAa,CAACqC,SAAU;MACjCC,WAAW,EAAErB,WAAY;MACzBsB,QAAQ,EAAEhB,MAAO;MACjBH,OAAO,EAAEA,CAAA,KAAM;QACbR,KAAK,CAACY,KAAK,CAACgB,MAAM,CAAC,CAAC;QACpBpB,OAAO,GAAG,CAAC;MACb,CAAE;MACFqB,IAAI,eAAEnC,IAAA,CAACJ,UAAU;QAACwC,KAAK,EAAEnB,MAAM,GAAGtB,MAAM,CAAC0C,SAAS,GAAGC,SAAU;QAACT,IAAI,EAAE;MAAG,CAAE,CAAE;MAC7Ed,KAAK,EAAEA;IAAM,CACd,CAAC,EAEDE,MAAM,iBACLjB,IAAA,CAACF,iBAAiB;MAChByC,SAAS,EAAEhB,gBAAiB;MAC5BV,WAAW,EAAEA,WAAY;MACzB2B,OAAO,EAAEA,CAAA,KAAMlC,KAAK,CAACY,KAAK,CAACuB,SAAS,CAAC,KAAK,CAAE;MAAAb,QAAA,EAE3CpB,QAAQ,CAACY,aAAa,IAAI,EAAE;IAAC,CACb,CACpB;EAAA,CACD,CAAC;AAEP,CACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","forwardRef","useEffect","useUnit","Button","ButtonColor","ButtonSize","ButtonVariant","COLORS","TheoryIcon","LoaderColor","FormulaSheetModal","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","FormulaSheet","model","fileId","renderer","buttonSize","MEDIUM","buttonColor","BLUE","loaderColor","onPress","style","ref","isOpen","modal","$isOpen","sheetFileBlob","file","$blob","isRequestPending","api","getPDFFileBlobFx","pending","onPressHandler","toggle","setId","children","size","variant","SECONDARY","colorScheme","isActive","icon","color","NEUTRAL_1","undefined","isLoading","onClose","setIsOpen"],"sourceRoot":"../../../../../src","sources":["features/formulaSheet/components/FormulaSheet.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,UAAU,EAAaC,SAAS,QAAQ,OAAO;AAC/D,SAASC,OAAO,QAAQ,gBAAgB;AACxC,SACEC,MAAM,EACNC,WAAW,EACXC,UAAU,EACVC,aAAa,EACbC,MAAM,EACNC,UAAU,EAEVC,WAAW,QAEN,4BAA4B;AAEnC,SAASC,iBAAiB,QAAQ,wBAAqB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAavD,OAAO,MAAMC,YAAY,gBAAGjB,UAAU,CACpC,CACE;EACEkB,KAAK;EACLC,MAAM;EACNC,QAAQ;EACRC,UAAU,GAAGhB,UAAU,CAACiB,MAAM;EAC9BC,WAAW,GAAGnB,WAAW,CAACoB,IAAI;EAC9BC,WAAW,GAAGhB,WAAW,CAACe,IAAI;EAC9BE,OAAO;EACPC;AACF,CAAC,EACDC,GAAG,KACA;EACH,MAAMC,MAAM,GAAG3B,OAAO,CAACgB,KAAK,CAACY,KAAK,CAACC,OAAO,CAAC;EAC3C,MAAMC,aAAa,GAAG9B,OAAO,CAACgB,KAAK,CAACe,IAAI,CAACC,KAAK,CAAC;EAC/C,MAAMC,gBAAgB,GAAGjC,OAAO,CAACgB,KAAK,CAACkB,GAAG,CAACC,gBAAgB,CAACC,OAAO,CAAC;EAEpE,MAAMC,cAAc,GAAGA,CAAA,KAAM;IAC3BrB,KAAK,CAACY,KAAK,CAACU,MAAM,CAAC,CAAC;IACpBd,OAAO,GAAG,CAAC;EACb,CAAC;EAEDzB,SAAS,CAAC,MAAM;IACdiB,KAAK,CAACe,IAAI,CAACQ,KAAK,CAACtB,MAAM,IAAI,IAAI,CAAC;EAClC,CAAC,EAAE,CAACA,MAAM,CAAC,CAAC;EAEZ,oBACEH,KAAA,CAAAF,SAAA;IAAA4B,QAAA,gBACE9B,IAAA,CAACT,MAAM;MACLyB,GAAG,EAAEA,GAAI;MACTe,IAAI,EAAEtB,UAAW;MACjBuB,OAAO,EAAEtC,aAAa,CAACuC,SAAU;MACjCC,WAAW,EAAEvB,WAAY;MACzBwB,QAAQ,EAAElB,MAAO;MACjBH,OAAO,EAAEA,CAAA,KAAMa,cAAc,CAAC,CAAE;MAChCS,IAAI,eAAEpC,IAAA,CAACJ,UAAU;QAACyC,KAAK,EAAEpB,MAAM,GAAGtB,MAAM,CAAC2C,SAAS,GAAGC,SAAU;QAACR,IAAI,EAAE;MAAG,CAAE,CAAE;MAC7EhB,KAAK,EAAEA;IAAM,CACd,CAAC,EAEDE,MAAM,iBACLjB,IAAA,CAACF,iBAAiB;MAChB0C,SAAS,EAAEjB,gBAAiB;MAC5BV,WAAW,EAAEA,WAAY;MACzB4B,OAAO,EAAEA,CAAA,KAAMnC,KAAK,CAACY,KAAK,CAACwB,SAAS,CAAC,KAAK,CAAE;MAAAZ,QAAA,EAE3CtB,QAAQ,CAACY,aAAa,IAAI,EAAE;IAAC,CACb,CACpB;EAAA,CACD,CAAC;AAEP,CACF,CAAC","ignoreList":[]}
@@ -26,7 +26,7 @@
26
26
  "almostThere": "Nästan där"
27
27
  },
28
28
  "exampleSolution": {
29
- "exampleSolution": "Lösnings exempel",
29
+ "exampleSolution": "Lösningsexempel",
30
30
  "letMeThink": "Låt mig tänka...",
31
31
  "aha": "Aha!",
32
32
  "errorMessage": "Något gick snett med att generera en exempellösning"
@@ -1 +1 @@
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,sBAcpC,CAAA"}
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,4 +1,8 @@
1
1
  import React from 'react';
2
2
  import { ExampleSolutionModalParams } from '../types';
3
- export declare const ExampleSolutionModalContent: ({ model, payload, cacheKey, }: ExampleSolutionModalParams) => React.JSX.Element;
3
+ type ExampleSolutionModalContentProps = {
4
+ params: ExampleSolutionModalParams;
5
+ };
6
+ export declare const ExampleSolutionModalContent: ({ params: { model, payload, cacheKey }, }: ExampleSolutionModalContentProps) => React.JSX.Element;
7
+ export {};
4
8
  //# sourceMappingURL=ExampleSolutionModalContent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExampleSolutionModalContent.d.ts","sourceRoot":"","sources":["../../../../../../src/features/exampleSolution/components/ExampleSolutionModalContent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,OAAO,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAA;AAKrD,eAAO,MAAM,2BAA2B,kCAIrC,0BAA0B,sBAiB5B,CAAA"}
1
+ {"version":3,"file":"ExampleSolutionModalContent.d.ts","sourceRoot":"","sources":["../../../../../../src/features/exampleSolution/components/ExampleSolutionModalContent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,OAAO,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAA;AAKrD,KAAK,gCAAgC,GAAG;IACtC,MAAM,EAAE,0BAA0B,CAAA;CACnC,CAAA;AAID,eAAO,MAAM,2BAA2B,8CAErC,gCAAgC,sBA0BlC,CAAA"}
@@ -3,7 +3,8 @@ import { ExampleSolutionStatuses } from '../constants';
3
3
  type QuestionSectionProps = {
4
4
  question?: string;
5
5
  status: ExampleSolutionStatuses;
6
+ renderKatexComponent: (katexString: string) => React.ReactNode;
6
7
  };
7
- export declare const QuestionSection: ({ question, status }: QuestionSectionProps) => React.JSX.Element;
8
+ export declare const QuestionSection: ({ question, status, renderKatexComponent, }: QuestionSectionProps) => React.JSX.Element;
8
9
  export {};
9
10
  //# sourceMappingURL=QuestionSection.d.ts.map
@@ -1 +1 @@
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;AAEtD,KAAK,oBAAoB,GAAG;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,uBAAuB,CAAA;CAChC,CAAA;AAED,eAAO,MAAM,eAAe,yBAA0B,oBAAoB,sBAazE,CAAA"}
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;AAEtD,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 +1 @@
1
- {"version":3,"file":"SolutionSection.d.ts","sourceRoot":"","sources":["../../../../../../src/features/exampleSolution/components/SolutionSection.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAGtD,KAAK,oBAAoB,GAAG;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,uBAAuB,CAAA;CAChC,CAAA;AAID,eAAO,MAAM,eAAe,uBAAwB,oBAAoB,sBAsBvE,CAAA"}
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;AAGtD,KAAK,oBAAoB,GAAG;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,uBAAuB,CAAA;CAChC,CAAA;AAWD,eAAO,MAAM,eAAe,uBAAwB,oBAAoB,sBAiDvE,CAAA"}
@@ -1,9 +1,10 @@
1
- import { GifCelebrationsModelProps } from '../types';
1
+ import { ExampleSolutionModelProps } from '../types';
2
2
  import { ExampleSolutionsApi } from './ExampleSolutionApi';
3
3
  import { ExampleSolutionCache } from './ExampleSolutionCache';
4
4
  export declare class ExampleSolutionModel {
5
5
  readonly api: ExampleSolutionsApi;
6
6
  readonly cache: ExampleSolutionCache;
7
- constructor({ api, errorHandler }: GifCelebrationsModelProps);
7
+ readonly renderKatexComponent: (katexString: string) => React.ReactNode;
8
+ constructor({ api, errorHandler, renderKatexComponent }: ExampleSolutionModelProps);
8
9
  }
9
10
  //# sourceMappingURL=ExampleSolution.model.d.ts.map
@@ -1 +1 @@
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;gBAEtC,EAAE,GAAG,EAAE,YAAY,EAAE,EAAE,yBAAyB;CAG7D"}
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"}
@@ -14,9 +14,10 @@ export type ExampleSolutionApiRequests = {
14
14
  generateExampleSolution: (body: ExampleSolutionPayload) => Promise<ExampleSolutionResponse>;
15
15
  };
16
16
  export type ExampleSolutionErrorHandler = (errorMessage: string) => void;
17
- export type GifCelebrationsModelProps = {
17
+ export type ExampleSolutionModelProps = {
18
18
  api: ExampleSolutionApiRequests;
19
19
  errorHandler?: ExampleSolutionErrorHandler;
20
+ renderKatexComponent: (katexString: string) => React.ReactNode;
20
21
  };
21
22
  export type ExampleSolutionModalParams = {
22
23
  cacheKey: string;
@@ -1 +1 @@
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;CAC3C,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
+ {"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 +1 @@
1
- {"version":3,"file":"FormulaSheet.d.ts","sourceRoot":"","sources":["../../../../../../src/features/formulaSheet/components/FormulaSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAc,SAAS,EAAa,MAAM,OAAO,CAAA;AAE/D,OAAO,EAEL,WAAW,EACX,UAAU,EAIV,SAAS,EACT,WAAW,EACX,WAAW,EACZ,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAGlD,KAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,iBAAiB,CAAA;IACxB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,SAAS,CAAA;IACzC,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,WAAW,EAAE,WAAW,CAAA;IACxB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,KAAK,CAAC,EAAE,WAAW,CAAA;CACpB,CAAA;AAED,eAAO,MAAM,YAAY,4FAkDxB,CAAA"}
1
+ {"version":3,"file":"FormulaSheet.d.ts","sourceRoot":"","sources":["../../../../../../src/features/formulaSheet/components/FormulaSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAc,SAAS,EAAa,MAAM,OAAO,CAAA;AAE/D,OAAO,EAEL,WAAW,EACX,UAAU,EAIV,SAAS,EACT,WAAW,EACX,WAAW,EACZ,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAGlD,KAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,iBAAiB,CAAA;IACxB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,SAAS,CAAA;IACzC,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,WAAW,EAAE,WAAW,CAAA;IACxB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,KAAK,CAAC,EAAE,WAAW,CAAA;CACpB,CAAA;AAED,eAAO,MAAM,YAAY,4FAoDxB,CAAA"}
@@ -1 +1 @@
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,sBAcpC,CAAA"}
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,4 +1,8 @@
1
1
  import React from 'react';
2
2
  import { ExampleSolutionModalParams } from '../types';
3
- export declare const ExampleSolutionModalContent: ({ model, payload, cacheKey, }: ExampleSolutionModalParams) => React.JSX.Element;
3
+ type ExampleSolutionModalContentProps = {
4
+ params: ExampleSolutionModalParams;
5
+ };
6
+ export declare const ExampleSolutionModalContent: ({ params: { model, payload, cacheKey }, }: ExampleSolutionModalContentProps) => React.JSX.Element;
7
+ export {};
4
8
  //# sourceMappingURL=ExampleSolutionModalContent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExampleSolutionModalContent.d.ts","sourceRoot":"","sources":["../../../../../../src/features/exampleSolution/components/ExampleSolutionModalContent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,OAAO,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAA;AAKrD,eAAO,MAAM,2BAA2B,kCAIrC,0BAA0B,sBAiB5B,CAAA"}
1
+ {"version":3,"file":"ExampleSolutionModalContent.d.ts","sourceRoot":"","sources":["../../../../../../src/features/exampleSolution/components/ExampleSolutionModalContent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,OAAO,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAA;AAKrD,KAAK,gCAAgC,GAAG;IACtC,MAAM,EAAE,0BAA0B,CAAA;CACnC,CAAA;AAID,eAAO,MAAM,2BAA2B,8CAErC,gCAAgC,sBA0BlC,CAAA"}
@@ -3,7 +3,8 @@ import { ExampleSolutionStatuses } from '../constants';
3
3
  type QuestionSectionProps = {
4
4
  question?: string;
5
5
  status: ExampleSolutionStatuses;
6
+ renderKatexComponent: (katexString: string) => React.ReactNode;
6
7
  };
7
- export declare const QuestionSection: ({ question, status }: QuestionSectionProps) => React.JSX.Element;
8
+ export declare const QuestionSection: ({ question, status, renderKatexComponent, }: QuestionSectionProps) => React.JSX.Element;
8
9
  export {};
9
10
  //# sourceMappingURL=QuestionSection.d.ts.map
@@ -1 +1 @@
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;AAEtD,KAAK,oBAAoB,GAAG;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,uBAAuB,CAAA;CAChC,CAAA;AAED,eAAO,MAAM,eAAe,yBAA0B,oBAAoB,sBAazE,CAAA"}
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;AAEtD,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 +1 @@
1
- {"version":3,"file":"SolutionSection.d.ts","sourceRoot":"","sources":["../../../../../../src/features/exampleSolution/components/SolutionSection.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAGtD,KAAK,oBAAoB,GAAG;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,uBAAuB,CAAA;CAChC,CAAA;AAID,eAAO,MAAM,eAAe,uBAAwB,oBAAoB,sBAsBvE,CAAA"}
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;AAGtD,KAAK,oBAAoB,GAAG;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,uBAAuB,CAAA;CAChC,CAAA;AAWD,eAAO,MAAM,eAAe,uBAAwB,oBAAoB,sBAiDvE,CAAA"}
@@ -1,9 +1,10 @@
1
- import { GifCelebrationsModelProps } from '../types';
1
+ import { ExampleSolutionModelProps } from '../types';
2
2
  import { ExampleSolutionsApi } from './ExampleSolutionApi';
3
3
  import { ExampleSolutionCache } from './ExampleSolutionCache';
4
4
  export declare class ExampleSolutionModel {
5
5
  readonly api: ExampleSolutionsApi;
6
6
  readonly cache: ExampleSolutionCache;
7
- constructor({ api, errorHandler }: GifCelebrationsModelProps);
7
+ readonly renderKatexComponent: (katexString: string) => React.ReactNode;
8
+ constructor({ api, errorHandler, renderKatexComponent }: ExampleSolutionModelProps);
8
9
  }
9
10
  //# sourceMappingURL=ExampleSolution.model.d.ts.map
@@ -1 +1 @@
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;gBAEtC,EAAE,GAAG,EAAE,YAAY,EAAE,EAAE,yBAAyB;CAG7D"}
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"}
@@ -14,9 +14,10 @@ export type ExampleSolutionApiRequests = {
14
14
  generateExampleSolution: (body: ExampleSolutionPayload) => Promise<ExampleSolutionResponse>;
15
15
  };
16
16
  export type ExampleSolutionErrorHandler = (errorMessage: string) => void;
17
- export type GifCelebrationsModelProps = {
17
+ export type ExampleSolutionModelProps = {
18
18
  api: ExampleSolutionApiRequests;
19
19
  errorHandler?: ExampleSolutionErrorHandler;
20
+ renderKatexComponent: (katexString: string) => React.ReactNode;
20
21
  };
21
22
  export type ExampleSolutionModalParams = {
22
23
  cacheKey: string;
@@ -1 +1 @@
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;CAC3C,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
+ {"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 +1 @@
1
- {"version":3,"file":"FormulaSheet.d.ts","sourceRoot":"","sources":["../../../../../../src/features/formulaSheet/components/FormulaSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAc,SAAS,EAAa,MAAM,OAAO,CAAA;AAE/D,OAAO,EAEL,WAAW,EACX,UAAU,EAIV,SAAS,EACT,WAAW,EACX,WAAW,EACZ,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAGlD,KAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,iBAAiB,CAAA;IACxB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,SAAS,CAAA;IACzC,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,WAAW,EAAE,WAAW,CAAA;IACxB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,KAAK,CAAC,EAAE,WAAW,CAAA;CACpB,CAAA;AAED,eAAO,MAAM,YAAY,4FAkDxB,CAAA"}
1
+ {"version":3,"file":"FormulaSheet.d.ts","sourceRoot":"","sources":["../../../../../../src/features/formulaSheet/components/FormulaSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAc,SAAS,EAAa,MAAM,OAAO,CAAA;AAE/D,OAAO,EAEL,WAAW,EACX,UAAU,EAIV,SAAS,EACT,WAAW,EACX,WAAW,EACZ,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAGlD,KAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,iBAAiB,CAAA;IACxB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,SAAS,CAAA;IACzC,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,WAAW,EAAE,WAAW,CAAA;IACxB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,KAAK,CAAC,EAAE,WAAW,CAAA;CACpB,CAAA;AAED,eAAO,MAAM,YAAY,4FAoDxB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magmamath/students-features",
3
- "version": "0.6.14-rc.20",
3
+ "version": "0.6.14-rc.21",
4
4
  "description": "Magmamath features library",
5
5
  "source": "src/index.ts",
6
6
  "main": "src/index.ts",
@@ -29,7 +29,7 @@
29
29
  "react-native-modalfy": "*"
30
30
  },
31
31
  "devDependencies": {
32
- "@magmamath/react-native-ui": "0.4.37",
32
+ "@magmamath/react-native-ui": "0.4.44",
33
33
  "effector": "^23.2.3",
34
34
  "effector-react": "^23.2.1",
35
35
  "@react-native/eslint-config": "^0.73.1",
@@ -18,12 +18,6 @@ export const ExampleSolutionModal = ({
18
18
  container: { paddingHorizontal: SPACING[800] },
19
19
  }}
20
20
  onClose={closeModal}
21
- content={
22
- <ExampleSolutionModalContent
23
- model={params.model}
24
- payload={params.payload}
25
- cacheKey={params.cacheKey}
26
- />
27
- }
21
+ content={<ExampleSolutionModalContent params={params} />}
28
22
  />
29
23
  )
@@ -1,6 +1,6 @@
1
1
  import { StyleSheet, View } from 'react-native'
2
2
  import React from 'react'
3
- import { COLORS, HeadingVariants, SPACING, Typography } from '@magmamath/react-native-ui'
3
+ import { COLORS, HeadingVariants, IS_WEB, SPACING, Typography } from '@magmamath/react-native-ui'
4
4
  import { useUnit } from 'effector-react'
5
5
  import { $localization } from '../../../shared/translation'
6
6
  import { MessageBlock } from './MessageBlock'
@@ -10,21 +10,34 @@ import { QuestionSection } from './QuestionSection'
10
10
  import { SolutionSection } from './SolutionSection'
11
11
  import { useExampleSolution } from '../hooks/useExampleSolution'
12
12
 
13
+ type ExampleSolutionModalContentProps = {
14
+ params: ExampleSolutionModalParams
15
+ }
16
+
17
+ const CONTAINER_HEIGHT = 593
18
+
13
19
  export const ExampleSolutionModalContent = ({
14
- model,
15
- payload,
16
- cacheKey,
17
- }: ExampleSolutionModalParams) => {
20
+ params: { model, payload, cacheKey },
21
+ }: ExampleSolutionModalContentProps) => {
18
22
  const { result, status } = useExampleSolution({ model, payload, cacheKey })
19
23
  const localization = useUnit($localization)
20
24
 
21
25
  return (
22
- <View style={styles.container}>
26
+ <View
27
+ style={[
28
+ styles.container,
29
+ IS_WEB ? { maxHeight: CONTAINER_HEIGHT } : { height: CONTAINER_HEIGHT },
30
+ ]}
31
+ >
23
32
  <Typography align="center" variant={HeadingVariants.H2} style={{ color: COLORS.NEUTRAL_9 }}>
24
33
  {localization.exampleSolution.exampleSolution}
25
34
  </Typography>
26
35
  <View style={styles.content}>
27
- <QuestionSection status={status} question={result?.question} />
36
+ <QuestionSection
37
+ status={status}
38
+ question={result?.question}
39
+ renderKatexComponent={model.renderKatexComponent}
40
+ />
28
41
  <SolutionSection status={status} answer={result?.answer} />
29
42
  </View>
30
43
  <MessageBlock status={status} style={styles.messageBlock} />
@@ -36,7 +49,6 @@ export const ExampleSolutionModalContent = ({
36
49
  const styles = StyleSheet.create({
37
50
  container: {
38
51
  width: 880,
39
- height: 593,
40
52
  },
41
53
  content: {
42
54
  flex: 1,
@@ -53,8 +65,8 @@ const styles = StyleSheet.create({
53
65
  },
54
66
  lavaIconContainer: {
55
67
  position: 'absolute',
56
- bottom: -54,
57
- right: -50,
68
+ bottom: -24,
69
+ right: -26,
58
70
  },
59
71
  loaderContainer: {
60
72
  paddingTop: 34,
@@ -65,7 +77,7 @@ const styles = StyleSheet.create({
65
77
  },
66
78
  messageBlock: {
67
79
  position: 'absolute',
68
- right: 38,
69
- bottom: -22,
80
+ right: 58,
81
+ bottom: -12,
70
82
  },
71
83
  })
@@ -1,20 +1,23 @@
1
- import { StyleSheet, View, ScrollView } from 'react-native'
1
+ import { StyleSheet, View } from 'react-native'
2
2
  import React from 'react'
3
- import { COLORS, Loader, LoaderColor, SPACING, Typography } from '@magmamath/react-native-ui'
3
+ import { COLORS, Loader, LoaderColor, SPACING } from '@magmamath/react-native-ui'
4
4
  import Animated, { FadeOut } from 'react-native-reanimated'
5
5
  import { ExampleSolutionStatuses } from '../constants'
6
6
 
7
7
  type QuestionSectionProps = {
8
8
  question?: string
9
9
  status: ExampleSolutionStatuses
10
+ renderKatexComponent: (katexString: string) => React.ReactNode
10
11
  }
11
12
 
12
- export const QuestionSection = ({ question, status }: QuestionSectionProps) => {
13
+ export const QuestionSection = ({
14
+ question,
15
+ status,
16
+ renderKatexComponent,
17
+ }: QuestionSectionProps) => {
13
18
  return (
14
19
  <View style={styles.container}>
15
- <ScrollView style={styles.scrollView}>
16
- <Typography>{question}</Typography>
17
- </ScrollView>
20
+ {question && <View style={styles.katexContainer}>{renderKatexComponent(question)}</View>}
18
21
  {status === ExampleSolutionStatuses.LOADING && (
19
22
  <Animated.View exiting={FadeOut} style={styles.loaderContainer}>
20
23
  <Loader size="large" color={LoaderColor.BLUE} />
@@ -28,12 +31,13 @@ const styles = StyleSheet.create({
28
31
  container: {
29
32
  flex: 1,
30
33
  },
31
- scrollView: {
34
+ katexContainer: {
32
35
  flex: 1,
33
36
  },
34
37
  loaderContainer: {
35
38
  paddingTop: 34,
36
39
  position: 'absolute',
40
+ zIndex: 100,
37
41
  width: '100%',
38
42
  height: '100%',
39
43
  backgroundColor: COLORS.NEUTRAL_1,