@magmamath/students-features 1.3.9 → 1.3.10-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 (120) hide show
  1. package/dist/commonjs/features/chatbot/helpers.js +1 -5
  2. package/dist/commonjs/features/chatbot/helpers.js.map +1 -1
  3. package/dist/commonjs/features/chatbot/model/ChatBotModel.js +0 -1
  4. package/dist/commonjs/features/chatbot/model/ChatBotModel.js.map +1 -1
  5. package/dist/commonjs/features/chatbot/types/model.types.js.map +1 -1
  6. package/dist/commonjs/features/interfaceMode/index.js +33 -0
  7. package/dist/commonjs/features/interfaceMode/index.js.map +1 -0
  8. package/dist/commonjs/features/interfaceMode/interfaceMode.constants.js +30 -0
  9. package/dist/commonjs/features/interfaceMode/interfaceMode.constants.js.map +1 -0
  10. package/dist/commonjs/features/interfaceMode/interfaceMode.helpers.js +56 -0
  11. package/dist/commonjs/features/interfaceMode/interfaceMode.helpers.js.map +1 -0
  12. package/dist/commonjs/features/interfaceMode/model/InterfaceModeModel.js +110 -0
  13. package/dist/commonjs/features/interfaceMode/model/InterfaceModeModel.js.map +1 -0
  14. package/dist/commonjs/types/answerTypes.js +15 -0
  15. package/dist/commonjs/types/answerTypes.js.map +1 -0
  16. package/dist/module/features/chatbot/helpers.js +1 -5
  17. package/dist/module/features/chatbot/helpers.js.map +1 -1
  18. package/dist/module/features/chatbot/model/ChatBotModel.js +0 -1
  19. package/dist/module/features/chatbot/model/ChatBotModel.js.map +1 -1
  20. package/dist/module/features/chatbot/types/model.types.js.map +1 -1
  21. package/dist/module/features/interfaceMode/index.js +6 -0
  22. package/dist/module/features/interfaceMode/index.js.map +1 -0
  23. package/dist/module/features/interfaceMode/interfaceMode.constants.js +26 -0
  24. package/dist/module/features/interfaceMode/interfaceMode.constants.js.map +1 -0
  25. package/dist/module/features/interfaceMode/interfaceMode.helpers.js +48 -0
  26. package/dist/module/features/interfaceMode/interfaceMode.helpers.js.map +1 -0
  27. package/dist/module/features/interfaceMode/model/InterfaceModeModel.js +105 -0
  28. package/dist/module/features/interfaceMode/model/InterfaceModeModel.js.map +1 -0
  29. package/dist/module/types/answerTypes.js +11 -0
  30. package/dist/module/types/answerTypes.js.map +1 -0
  31. package/dist/typescript/commonjs/features/chatbot/helpers.d.ts.map +1 -1
  32. package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
  33. package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts +0 -2
  34. package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts.map +1 -1
  35. package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts +0 -1
  36. package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts.map +1 -1
  37. package/dist/typescript/commonjs/features/interfaceMode/index.d.ts +4 -0
  38. package/dist/typescript/commonjs/features/interfaceMode/index.d.ts.map +1 -0
  39. package/dist/typescript/commonjs/features/interfaceMode/interfaceMode.constants.d.ts +22 -0
  40. package/dist/typescript/commonjs/features/interfaceMode/interfaceMode.constants.d.ts.map +1 -0
  41. package/dist/typescript/commonjs/features/interfaceMode/interfaceMode.helpers.d.ts +28 -0
  42. package/dist/typescript/commonjs/features/interfaceMode/interfaceMode.helpers.d.ts.map +1 -0
  43. package/dist/typescript/commonjs/features/interfaceMode/model/InterfaceModeModel.d.ts +33 -0
  44. package/dist/typescript/commonjs/features/interfaceMode/model/InterfaceModeModel.d.ts.map +1 -0
  45. package/dist/typescript/commonjs/types/answerTypes.d.ts +8 -0
  46. package/dist/typescript/commonjs/types/answerTypes.d.ts.map +1 -0
  47. package/dist/typescript/module/features/chatbot/helpers.d.ts.map +1 -1
  48. package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
  49. package/dist/typescript/module/features/chatbot/types/api.types.d.ts +0 -2
  50. package/dist/typescript/module/features/chatbot/types/api.types.d.ts.map +1 -1
  51. package/dist/typescript/module/features/chatbot/types/model.types.d.ts +0 -1
  52. package/dist/typescript/module/features/chatbot/types/model.types.d.ts.map +1 -1
  53. package/dist/typescript/module/features/interfaceMode/index.d.ts +4 -0
  54. package/dist/typescript/module/features/interfaceMode/index.d.ts.map +1 -0
  55. package/dist/typescript/module/features/interfaceMode/interfaceMode.constants.d.ts +22 -0
  56. package/dist/typescript/module/features/interfaceMode/interfaceMode.constants.d.ts.map +1 -0
  57. package/dist/typescript/module/features/interfaceMode/interfaceMode.helpers.d.ts +28 -0
  58. package/dist/typescript/module/features/interfaceMode/interfaceMode.helpers.d.ts.map +1 -0
  59. package/dist/typescript/module/features/interfaceMode/model/InterfaceModeModel.d.ts +33 -0
  60. package/dist/typescript/module/features/interfaceMode/model/InterfaceModeModel.d.ts.map +1 -0
  61. package/dist/typescript/module/types/answerTypes.d.ts +8 -0
  62. package/dist/typescript/module/types/answerTypes.d.ts.map +1 -0
  63. package/package.json +3 -1
  64. package/src/features/chatbot/helpers.ts +0 -2
  65. package/src/features/chatbot/model/ChatBotModel.ts +0 -1
  66. package/src/features/chatbot/types/api.types.ts +0 -2
  67. package/src/features/chatbot/types/model.types.ts +0 -1
  68. package/src/features/interfaceMode/index.ts +3 -0
  69. package/src/features/interfaceMode/interfaceMode.constants.ts +24 -0
  70. package/src/features/interfaceMode/interfaceMode.helpers.ts +79 -0
  71. package/src/features/interfaceMode/model/InterfaceModeModel.ts +115 -0
  72. package/src/types/answerTypes.ts +7 -0
  73. package/.claude/settings.local.json +0 -25
  74. package/.editorconfig +0 -15
  75. package/.eslintignore +0 -2
  76. package/.eslintrc +0 -22
  77. package/.gitattributes +0 -3
  78. package/.github/actions/setup/action.yml +0 -37
  79. package/.github/workflows/ci.yml +0 -73
  80. package/.gitignore +0 -84
  81. package/.idea/.gitignore +0 -8
  82. package/.idea/codeStyles/Project.xml +0 -62
  83. package/.idea/codeStyles/codeStyleConfig.xml +0 -5
  84. package/.idea/copilot.data.migration.agent.xml +0 -6
  85. package/.idea/copilot.data.migration.ask.xml +0 -6
  86. package/.idea/copilot.data.migration.ask2agent.xml +0 -6
  87. package/.idea/copilot.data.migration.edit.xml +0 -6
  88. package/.idea/inspectionProfiles/Project_Default.xml +0 -8
  89. package/.idea/jsLinters/eslint.xml +0 -6
  90. package/.idea/modules.xml +0 -8
  91. package/.idea/prettier.xml +0 -7
  92. package/.idea/students-features.iml +0 -12
  93. package/.idea/vcs.xml +0 -6
  94. package/.idea/workspace.xml +0 -675
  95. package/.nvmrc +0 -1
  96. package/.prettierrc +0 -11
  97. package/.release-it.json +0 -17
  98. package/.watchmanconfig +0 -1
  99. package/.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs +0 -541
  100. package/.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs +0 -28
  101. package/.yarn/releases/yarn-3.6.1.cjs +0 -874
  102. package/babel.config.js +0 -5
  103. package/bob.config.js +0 -25
  104. package/example/.expo/README.md +0 -8
  105. package/example/.expo/devices.json +0 -3
  106. package/example/.expo/web/cache/production/images/favicon/favicon-24272cdaeff82cc5facdaccd982a6f05b60c4504704bbf94c19a6388659880bb-contain-transparent/favicon-48.png +0 -0
  107. package/example/app.json +0 -30
  108. package/example/assets/adaptive-icon.png +0 -0
  109. package/example/assets/favicon.png +0 -0
  110. package/example/assets/icon.png +0 -0
  111. package/example/assets/splash-icon.png +0 -0
  112. package/example/babel.config.js +0 -28
  113. package/example/index.js +0 -8
  114. package/example/metro.config.js +0 -18
  115. package/example/package.json +0 -25
  116. package/example/src/App.tsx +0 -8
  117. package/example/tsconfig.json +0 -6
  118. package/tsconfig.build.json +0 -4
  119. package/tsconfig.json +0 -34
  120. package/yarn.lock +0 -10984
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magmamath/students-features",
3
- "version": "1.3.9",
3
+ "version": "1.3.10-rc.0",
4
4
  "description": "Magmamath features library",
5
5
  "source": "src/index.ts",
6
6
  "main": "src/index.ts",
@@ -19,6 +19,7 @@
19
19
  },
20
20
  "peerDependencies": {
21
21
  "@magmamath/frontend-config": "1.1.3",
22
+ "@magmamath/react-native-draw-board": "*",
22
23
  "@magmamath/react-native-ui": "*",
23
24
  "@matteappen/skills-utils": "^3.7.1",
24
25
  "@react-native-masked-view/masked-view": "*",
@@ -40,6 +41,7 @@
40
41
  },
41
42
  "devDependencies": {
42
43
  "@magmamath/frontend-config": "1.1.3",
44
+ "@magmamath/react-native-draw-board": "1.8.2-rc.3",
43
45
  "@magmamath/react-native-ui": "0.4.83",
44
46
  "@matteappen/skills-utils": "^3.7.1",
45
47
  "@react-native-masked-view/masked-view": "^0.3.2",
@@ -66,7 +66,6 @@ export function prepareChatRequestPayload(
66
66
  answerOptions,
67
67
  answer,
68
68
  chatHistory,
69
- assignmentGrade,
70
69
  } = payload
71
70
 
72
71
  if (freeTextMessage) {
@@ -107,7 +106,6 @@ export function prepareChatRequestPayload(
107
106
  ...(imageAltText && { altText: imageAltText }),
108
107
  ...(!!problemStandards?.length && { problemStandards }),
109
108
  ...(!!answerOptions?.length && { answerOptions }),
110
- ...(assignmentGrade !== undefined && { assignmentGrade }),
111
109
  },
112
110
  }
113
111
  }
@@ -245,7 +245,6 @@ export class ChatbotModel {
245
245
  imageAltText: context.imageDescription,
246
246
  imageCdnId: context.imageCdnId,
247
247
  conversationId: cache[key].conversationId,
248
- assignmentGrade: context.assignmentGrade,
249
248
  ...(isFreeText && { freeTextMessage: message }),
250
249
  ...(context.assignmentId && {
251
250
  chatHistory: {
@@ -64,7 +64,6 @@ export type PostMessagePayload = {
64
64
  freeTextMessage?: string
65
65
  conversationId?: string | null
66
66
  chatHistory?: ChatHistory
67
- assignmentGrade?: number
68
67
  }
69
68
 
70
69
  export type PostMessageResponse = {
@@ -129,7 +128,6 @@ export type ChatHintPayload = {
129
128
  hintNumber: number
130
129
  studentInput: string
131
130
  answerOptions?: string[]
132
- assignmentGrade?: number
133
131
  }
134
132
 
135
133
  export type ChatHintResponse = {
@@ -152,7 +152,6 @@ export type ChatbotContext = {
152
152
  problemStandards?: ProblemStandard[]
153
153
  assignmentId?: string
154
154
  problemId?: string
155
- assignmentGrade?: number
156
155
  }
157
156
 
158
157
  export type ReinitConversationProps = {
@@ -0,0 +1,3 @@
1
+ export { isSimpleGrade } from './interfaceMode.helpers'
2
+ export { InterfaceMode, MAX_SIMPLE_MODE_GRADE } from './interfaceMode.constants'
3
+ export { InterfaceModeModel } from './model/InterfaceModeModel'
@@ -0,0 +1,24 @@
1
+ export const MAX_SIMPLE_MODE_GRADE = 2
2
+
3
+ export enum Grade {
4
+ OTHER = -1,
5
+ K = 0,
6
+ FIRST = 1,
7
+ SECOND = 2,
8
+ THIRD = 3,
9
+ FOURTH = 4,
10
+ FIFTH = 5,
11
+ SIXTH = 6,
12
+ SEVENTH = 7,
13
+ EIGHTH = 8,
14
+ NINTH = 9,
15
+ TENTH = 10,
16
+ ELEVENTH = 11,
17
+ TWELFTH = 12,
18
+ }
19
+
20
+ export enum InterfaceMode {
21
+ REGULAR = 'REGULAR',
22
+ SIMPLE = 'SIMPLE',
23
+ }
24
+
@@ -0,0 +1,79 @@
1
+ import { Grade, InterfaceMode } from './interfaceMode.constants'
2
+ import { AnswerType } from '../../types/answerTypes'
3
+ import { MyScriptMathCharacterTypes } from '../../types/characterTypes'
4
+ import { ToolBarVariants } from '@magmamath/react-native-draw-board'
5
+ import { Locale } from '@magmamath/frontend-config'
6
+
7
+ const isValidGrade = (grade: Grade | null | undefined): grade is Grade => {
8
+ return grade !== null && grade !== undefined
9
+ }
10
+
11
+ export const isSimpleGrade = (grade: Grade | null | undefined) => {
12
+ return isValidGrade(grade) && grade >= Grade.K && grade <= Grade.SECOND
13
+ }
14
+
15
+ type GetIsSimpleModeProps = {
16
+ userGrade: Grade | null | undefined
17
+ isPracticeMode: boolean
18
+ practiceModeGrade: Grade | null | undefined
19
+ assignmentClassGrade: Grade | null | undefined
20
+ }
21
+
22
+ export const getIsSimpleMode = ({
23
+ userGrade,
24
+ isPracticeMode,
25
+ practiceModeGrade,
26
+ assignmentClassGrade,
27
+ }: GetIsSimpleModeProps): boolean => {
28
+ if (isPracticeMode) return isSimpleGrade(practiceModeGrade)
29
+ const grade =
30
+ !isValidGrade(userGrade) || userGrade === Grade.OTHER
31
+ ? assignmentClassGrade
32
+ : userGrade
33
+
34
+ return isSimpleGrade(grade)
35
+ }
36
+
37
+ type GetAnswerAreaModeProps = {
38
+ isPracticeMode: boolean
39
+ answerType: AnswerType
40
+ characterType: MyScriptMathCharacterTypes
41
+ hasAnswerVariants: boolean
42
+ }
43
+
44
+ export const getAnswerAreaMode = ({
45
+ isPracticeMode,
46
+ answerType,
47
+ characterType,
48
+ hasAnswerVariants,
49
+ }: GetAnswerAreaModeProps): InterfaceMode => {
50
+ const isHandwritingNumbersWhole =
51
+ answerType === AnswerType.HANDWRITING &&
52
+ characterType === MyScriptMathCharacterTypes.NUMBERS_WHOLE
53
+
54
+ if (isPracticeMode || hasAnswerVariants || isHandwritingNumbersWhole) {
55
+ return InterfaceMode.SIMPLE
56
+ }
57
+
58
+ return InterfaceMode.REGULAR
59
+ }
60
+
61
+ type GetToolbarModeProps = {
62
+ isSimpleModeGrade: boolean
63
+ grade: Grade | null | undefined
64
+ locale: Locale
65
+ }
66
+
67
+ export const getToolbarMode = ({
68
+ isSimpleModeGrade,
69
+ grade,
70
+ locale,
71
+ }: GetToolbarModeProps): ToolBarVariants => {
72
+ const isUSOrCA = locale === Locale.US || locale === Locale.CA
73
+ const gradeThreshold = isUSOrCA ? Grade.SIXTH : Grade.SEVENTH
74
+ const isAdvanced = isValidGrade(grade) && grade >= gradeThreshold
75
+
76
+ if (isAdvanced) return ToolBarVariants.ADVANCED
77
+ if (isSimpleModeGrade) return ToolBarVariants.SIMPLE
78
+ return ToolBarVariants.COMMON
79
+ }
@@ -0,0 +1,115 @@
1
+ import { createStore, sample, Store } from 'effector'
2
+ import { Grade, InterfaceMode } from '../interfaceMode.constants'
3
+ import { getAnswerAreaMode, getIsSimpleMode, getToolbarMode } from '../interfaceMode.helpers'
4
+ import { ToolBarVariants } from '@magmamath/react-native-draw-board'
5
+ import { AnswerType } from '../../../types/answerTypes'
6
+ import { MyScriptMathCharacterTypes } from '../../../types/characterTypes'
7
+ import { Locale } from '@magmamath/frontend-config'
8
+
9
+ const INITIAL_STATE = {
10
+ toolbar: ToolBarVariants.COMMON,
11
+ answerArea: InterfaceMode.REGULAR,
12
+ general: InterfaceMode.REGULAR,
13
+ }
14
+
15
+ type NullableGrade = Grade | null
16
+
17
+ export class InterfaceModeModel {
18
+ public readonly $mode = createStore(INITIAL_STATE)
19
+
20
+ private $userGrade: Store<NullableGrade> = createStore<NullableGrade>(null)
21
+ private $isPracticeMode: Store<boolean> = createStore(false)
22
+ private $practiceModeGrade: Store<NullableGrade> = createStore<NullableGrade>(null)
23
+ private $classGrade: Store<NullableGrade> = createStore<NullableGrade>(null)
24
+ private $locale: Store<Locale> = createStore(Locale.US)
25
+ private $answerType: Store<AnswerType> = createStore(AnswerType.HANDWRITING)
26
+ private $characterType: Store<MyScriptMathCharacterTypes> = createStore(MyScriptMathCharacterTypes.NUMBERS_WHOLE)
27
+ private $hasAnswerVariants: Store<boolean> = createStore(false)
28
+
29
+ bindUserGrade($store: Store<NullableGrade>) {
30
+ this.$userGrade = $store
31
+ return this
32
+ }
33
+
34
+ bindPracticeMode($store: Store<boolean>) {
35
+ this.$isPracticeMode = $store
36
+ return this
37
+ }
38
+
39
+ bindPracticeModeGrade($store: Store<NullableGrade>) {
40
+ this.$practiceModeGrade = $store
41
+ return this
42
+ }
43
+
44
+ bindClassGrade($store: Store<NullableGrade>) {
45
+ this.$classGrade = $store
46
+ return this
47
+ }
48
+
49
+ bindLocale($store: Store<Locale>) {
50
+ this.$locale = $store
51
+ return this
52
+ }
53
+
54
+ bindAnswerType($store: Store<AnswerType>) {
55
+ this.$answerType = $store
56
+ return this
57
+ }
58
+
59
+ bindCharacterType($store: Store<MyScriptMathCharacterTypes>) {
60
+ this.$characterType = $store
61
+ return this
62
+ }
63
+
64
+ bindHasAnswerVariants($store: Store<boolean>) {
65
+ this.$hasAnswerVariants = $store
66
+ return this
67
+ }
68
+
69
+ init() {
70
+ sample({
71
+ source: {
72
+ userGrade: this.$userGrade,
73
+ locale: this.$locale,
74
+ isPracticeMode: this.$isPracticeMode,
75
+ practiceModeGrade: this.$practiceModeGrade,
76
+ assignmentClassGrade: this.$classGrade,
77
+ answerType: this.$answerType,
78
+ characterType: this.$characterType,
79
+ hasAnswerVariants: this.$hasAnswerVariants,
80
+ },
81
+ fn: ({
82
+ locale,
83
+ userGrade,
84
+ isPracticeMode,
85
+ practiceModeGrade,
86
+ assignmentClassGrade,
87
+ answerType,
88
+ characterType,
89
+ hasAnswerVariants,
90
+ }) => {
91
+ const isSimpleMode = getIsSimpleMode({
92
+ userGrade,
93
+ isPracticeMode,
94
+ practiceModeGrade,
95
+ assignmentClassGrade,
96
+ })
97
+
98
+ return {
99
+ general: isSimpleMode ? InterfaceMode.SIMPLE : InterfaceMode.REGULAR,
100
+ toolbar: getToolbarMode({
101
+ isSimpleModeGrade: isSimpleMode,
102
+ grade: assignmentClassGrade ?? practiceModeGrade,
103
+ locale,
104
+ }),
105
+ answerArea: isSimpleMode
106
+ ? getAnswerAreaMode({ isPracticeMode, answerType, characterType, hasAnswerVariants })
107
+ : InterfaceMode.REGULAR,
108
+ }
109
+ },
110
+ target: this.$mode,
111
+ })
112
+
113
+ return this
114
+ }
115
+ }
@@ -0,0 +1,7 @@
1
+ export enum AnswerType {
2
+ HANDWRITING = 0,
3
+ SINGLE_CHOICE = 1,
4
+ MULTIPLE_CHOICE = 2,
5
+ ORDERED_CHOICE = 3,
6
+ OPEN_ENDED = 11,
7
+ }
@@ -1,25 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "Bash(npx tsc:*)",
5
- "Bash(find /Users/alesiaskarakhod/Work/students-features -name rn-draw-area -o -name *draw*area*)",
6
- "Bash(grep:*)",
7
- "Bash(find /Users/alesiaskarakhod/Work/magmamath-tools -type f -name \"*.ts*\" ! -path \"*/node_modules/*\" ! -path \"*/.next/*\" ! -path \"*/dist/*\" -exec grep -l \"convertLatexToBrackets\\\\|convertBracketsToLatex\" {})",
8
- "Bash(find /Users/alesiaskarakhod/Work/magmamath-tools -type f \\\\\\(-name *.test.ts* -o -name *.spec.ts* \\\\\\))",
9
- "Bash(ls jest.config* vitest.config* tsconfig*)",
10
- "Bash(npm ls:*)",
11
- "Read(//Users/alesiaskarakhod/node_modules/.bin/**)",
12
- "Bash(yarn add:*)",
13
- "Bash(npx jest:*)",
14
- "Bash(node:*)",
15
- "Bash(npx ts-node:*)",
16
- "Bash(find /Users/alesiaskarakhod/Work/magmamath-tools/packages -name jest.config.* -o -name *.test.ts -o -name *.test.js -o -name *.spec.ts)",
17
- "Bash(find /Users/alesiaskarakhod/Work/magmamath-tools/packages -maxdepth 3 -type f \\\\\\(-name *.test.ts -o -name *.spec.ts -o -name *.test.tsx -o -name *.spec.tsx \\\\\\))",
18
- "Bash(find /Users/alesiaskarakhod/Work/magmamath-tools -type f \\\\\\(-name *.test.ts -o -name *.test.tsx -o -name *.spec.ts -o -name *.spec.tsx \\\\\\))",
19
- "Bash(yarn test:*)",
20
- "Bash(npx vitest:*)",
21
- "Bash(npx tsup:*)",
22
- "Bash(find /Users/alesiaskarakhod/Work/react-native/node_modules/@magmamath/frontend-config -name *.d.ts -o -name *.js)"
23
- ]
24
- }
25
- }
package/.editorconfig DELETED
@@ -1,15 +0,0 @@
1
- # EditorConfig helps developers define and maintain consistent
2
- # coding styles between different editors and IDEs
3
- # editorconfig.org
4
-
5
- root = true
6
-
7
- [*]
8
-
9
- indent_style = space
10
- indent_size = 2
11
-
12
- end_of_line = lf
13
- charset = utf-8
14
- trim_trailing_whitespace = true
15
- insert_final_newline = true
package/.eslintignore DELETED
@@ -1,2 +0,0 @@
1
- node_modules/
2
- ./lib/
package/.eslintrc DELETED
@@ -1,22 +0,0 @@
1
- {
2
- "env": {
3
- "browser": true,
4
- "es2020": true
5
- },
6
- "extends": [
7
- "eslint:recommended",
8
- "plugin:@typescript-eslint/recommended",
9
- "plugin:react-hooks/recommended",
10
- "plugin:storybook/recommended",
11
- "prettier"
12
- ],
13
- "parser": "@typescript-eslint/parser",
14
- "parserOptions": {
15
- "ecmaVersion": "latest",
16
- "sourceType": "module"
17
- },
18
- "plugins": ["react-refresh"],
19
- "rules": {
20
- "react-refresh/only-export-components": "warn"
21
- }
22
- }
package/.gitattributes DELETED
@@ -1,3 +0,0 @@
1
- *.pbxproj -text
2
- # specific for windows script files
3
- *.bat text eol=crlf
@@ -1,37 +0,0 @@
1
- name: Setup
2
- description: Setup Node.js and install dependencies
3
-
4
- inputs:
5
- npmrc-auth-token:
6
- required: true
7
-
8
- runs:
9
- using: composite
10
- steps:
11
- - name: Setup Node.js
12
- uses: actions/setup-node@v4
13
- with:
14
- node-version-file: .nvmrc
15
-
16
- - name: Create .npmrc
17
- shell: bash
18
- run: |
19
- echo "registry=https://registry.npmjs.org" > .npmrc
20
- echo "//registry.npmjs.org/:_authToken=${{ inputs.npmrc-auth-token }}" >> .npmrc
21
-
22
- - name: Cache dependencies
23
- id: yarn-cache
24
- uses: actions/cache@v4
25
- with:
26
- path: |
27
- **/node_modules
28
- .yarn/install-state.gz
29
- key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }}
30
- restore-keys: |
31
- ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
32
- ${{ runner.os }}-yarn-
33
-
34
- - name: Install dependencies
35
- if: steps.yarn-cache.outputs.cache-hit != 'true'
36
- run: yarn install --immutable
37
- shell: bash
@@ -1,73 +0,0 @@
1
- name: CI
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
- pull_request:
8
- branches:
9
- - main
10
- merge_group:
11
- types:
12
- - checks_requested
13
-
14
- jobs:
15
- lint:
16
- runs-on: ubuntu-latest
17
- steps:
18
- - name: Checkout
19
- uses: actions/checkout@v4
20
-
21
- - name: Setup
22
- uses: ./.github/actions/setup
23
- with:
24
- npmrc-auth-token: ${{ secrets.MAGMA_NPMRC_TOKEN }}
25
-
26
- - name: Lint files
27
- run: yarn lint
28
-
29
- - name: Typecheck files
30
- run: yarn typecheck
31
-
32
- test:
33
- runs-on: ubuntu-latest
34
- steps:
35
- - name: Checkout
36
- uses: actions/checkout@v4
37
-
38
- - name: Setup
39
- uses: ./.github/actions/setup
40
- with:
41
- npmrc-auth-token: ${{ secrets.MAGMA_NPMRC_TOKEN }}
42
-
43
- - name: Run unit tests
44
- run: yarn test --maxWorkers=2 --coverage
45
-
46
- build-library:
47
- runs-on: ubuntu-latest
48
- steps:
49
- - name: Checkout
50
- uses: actions/checkout@v4
51
-
52
- - name: Setup
53
- uses: ./.github/actions/setup
54
- with:
55
- npmrc-auth-token: ${{ secrets.MAGMA_NPMRC_TOKEN }}
56
-
57
- - name: Build package
58
- run: yarn prepare
59
-
60
- build-web:
61
- runs-on: ubuntu-latest
62
- steps:
63
- - name: Checkout
64
- uses: actions/checkout@v4
65
-
66
- - name: Setup
67
- uses: ./.github/actions/setup
68
- with:
69
- npmrc-auth-token: ${{ secrets.MAGMA_NPMRC_TOKEN }}
70
-
71
- - name: Build example for Web
72
- run: |
73
- yarn example expo export --platform web
package/.gitignore DELETED
@@ -1,84 +0,0 @@
1
- # OSX
2
- #
3
- .DS_Store
4
-
5
- # XDE
6
- .expo/
7
-
8
- # VSCode
9
- .vscode/
10
- jsconfig.json
11
-
12
- # Xcode
13
- #
14
- build/
15
- *.pbxuser
16
- !default.pbxuser
17
- *.mode1v3
18
- !default.mode1v3
19
- *.mode2v3
20
- !default.mode2v3
21
- *.perspectivev3
22
- !default.perspectivev3
23
- xcuserdata
24
- *.xccheckout
25
- *.moved-aside
26
- DerivedData
27
- *.hmap
28
- *.ipa
29
- *.xcuserstate
30
- project.xcworkspace
31
-
32
- # Android/IJ
33
- #
34
- .classpath
35
- .cxx
36
- .gradle
37
- .idea
38
- .project
39
- .settings
40
- local.properties
41
- android.iml
42
-
43
- # Cocoapods
44
- #
45
- example/ios/Pods
46
-
47
- # Ruby
48
- example/vendor/
49
-
50
- # node.js
51
- #
52
- node_modules/
53
- npm-debug.log
54
- yarn-debug.log
55
- yarn-error.log
56
-
57
- # BUCK
58
- buck-out/
59
- \.buckd/
60
- android/app/libs
61
- android/keystores/debug.keystore
62
-
63
- # Yarn
64
- .yarn/*
65
- !.yarn/patches
66
- !.yarn/plugins
67
- !.yarn/releases
68
- !.yarn/sdks
69
- !.yarn/versions
70
-
71
- # Expo
72
- .expo/
73
-
74
- # Turborepo
75
- .turbo/
76
-
77
- # generated by bob
78
- dist/
79
- !src/lib/
80
-
81
- # React Native Codegen
82
- ios/generated
83
- android/generated
84
- .npmrc
package/.idea/.gitignore DELETED
@@ -1,8 +0,0 @@
1
- # Default ignored files
2
- /shelf/
3
- /workspace.xml
4
- # Editor-based HTTP Client requests
5
- /httpRequests/
6
- # Datasource local storage ignored files
7
- /dataSources/
8
- /dataSources.local.xml
@@ -1,62 +0,0 @@
1
- <component name="ProjectCodeStyleConfiguration">
2
- <code_scheme name="Project" version="173">
3
- <option name="LINE_SEPARATOR" value="&#10;" />
4
- <HTMLCodeStyleSettings>
5
- <option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" />
6
- </HTMLCodeStyleSettings>
7
- <JSCodeStyleSettings version="0">
8
- <option name="USE_SEMICOLON_AFTER_STATEMENT" value="false" />
9
- <option name="FORCE_SEMICOLON_STYLE" value="true" />
10
- <option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
11
- <option name="USE_DOUBLE_QUOTES" value="false" />
12
- <option name="FORCE_QUOTE_STYlE" value="true" />
13
- <option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
14
- <option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
15
- <option name="SPACES_WITHIN_IMPORTS" value="true" />
16
- </JSCodeStyleSettings>
17
- <TypeScriptCodeStyleSettings version="0">
18
- <option name="USE_SEMICOLON_AFTER_STATEMENT" value="false" />
19
- <option name="FORCE_SEMICOLON_STYLE" value="true" />
20
- <option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
21
- <option name="USE_DOUBLE_QUOTES" value="false" />
22
- <option name="FORCE_QUOTE_STYlE" value="true" />
23
- <option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
24
- <option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
25
- <option name="SPACES_WITHIN_IMPORTS" value="true" />
26
- </TypeScriptCodeStyleSettings>
27
- <VueCodeStyleSettings>
28
- <option name="INTERPOLATION_NEW_LINE_AFTER_START_DELIMITER" value="false" />
29
- <option name="INTERPOLATION_NEW_LINE_BEFORE_END_DELIMITER" value="false" />
30
- </VueCodeStyleSettings>
31
- <codeStyleSettings language="HTML">
32
- <option name="SOFT_MARGINS" value="100" />
33
- <indentOptions>
34
- <option name="INDENT_SIZE" value="2" />
35
- <option name="CONTINUATION_INDENT_SIZE" value="2" />
36
- <option name="TAB_SIZE" value="2" />
37
- </indentOptions>
38
- </codeStyleSettings>
39
- <codeStyleSettings language="JavaScript">
40
- <option name="SOFT_MARGINS" value="100" />
41
- <indentOptions>
42
- <option name="INDENT_SIZE" value="2" />
43
- <option name="CONTINUATION_INDENT_SIZE" value="2" />
44
- <option name="TAB_SIZE" value="2" />
45
- </indentOptions>
46
- </codeStyleSettings>
47
- <codeStyleSettings language="TypeScript">
48
- <option name="SOFT_MARGINS" value="100" />
49
- <indentOptions>
50
- <option name="INDENT_SIZE" value="2" />
51
- <option name="CONTINUATION_INDENT_SIZE" value="2" />
52
- <option name="TAB_SIZE" value="2" />
53
- </indentOptions>
54
- </codeStyleSettings>
55
- <codeStyleSettings language="Vue">
56
- <option name="SOFT_MARGINS" value="100" />
57
- <indentOptions>
58
- <option name="CONTINUATION_INDENT_SIZE" value="2" />
59
- </indentOptions>
60
- </codeStyleSettings>
61
- </code_scheme>
62
- </component>
@@ -1,5 +0,0 @@
1
- <component name="ProjectCodeStyleConfiguration">
2
- <state>
3
- <option name="USE_PER_PROJECT_SETTINGS" value="true" />
4
- </state>
5
- </component>
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="AgentMigrationStateService">
4
- <option name="migrationStatus" value="COMPLETED" />
5
- </component>
6
- </project>
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="AskMigrationStateService">
4
- <option name="migrationStatus" value="COMPLETED" />
5
- </component>
6
- </project>
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="Ask2AgentMigrationStateService">
4
- <option name="migrationStatus" value="COMPLETED" />
5
- </component>
6
- </project>