@magmamath/students-features 1.3.3 → 1.3.4-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/dist/commonjs/features/voice/constants.js +13 -3
  2. package/dist/commonjs/features/voice/constants.js.map +1 -1
  3. package/dist/commonjs/features/voice/recording/components/VoiceRecord.js +19 -5
  4. package/dist/commonjs/features/voice/recording/components/VoiceRecord.js.map +1 -1
  5. package/dist/commonjs/features/voice/recording/components/VoiceRecordButton.js +71 -20
  6. package/dist/commonjs/features/voice/recording/components/VoiceRecordButton.js.map +1 -1
  7. package/dist/commonjs/features/voice/recording/components/VoiceRecordDeleteButton.js +2 -2
  8. package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.js +3 -3
  9. package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.js.map +1 -1
  10. package/dist/commonjs/features/voice/recording/model/VoiceRecord.model.js +5 -0
  11. package/dist/commonjs/features/voice/recording/model/VoiceRecord.model.js.map +1 -1
  12. package/dist/commonjs/features/voice/types.js +6 -0
  13. package/dist/commonjs/features/voice/types.js.map +1 -1
  14. package/dist/module/features/voice/constants.js +12 -2
  15. package/dist/module/features/voice/constants.js.map +1 -1
  16. package/dist/module/features/voice/recording/components/VoiceRecord.js +20 -6
  17. package/dist/module/features/voice/recording/components/VoiceRecord.js.map +1 -1
  18. package/dist/module/features/voice/recording/components/VoiceRecordButton.js +73 -22
  19. package/dist/module/features/voice/recording/components/VoiceRecordButton.js.map +1 -1
  20. package/dist/module/features/voice/recording/components/VoiceRecordDeleteButton.js +2 -2
  21. package/dist/module/features/voice/recording/hooks/useVoiceRecorderAnimation.js +3 -3
  22. package/dist/module/features/voice/recording/hooks/useVoiceRecorderAnimation.js.map +1 -1
  23. package/dist/module/features/voice/recording/model/VoiceRecord.model.js +5 -0
  24. package/dist/module/features/voice/recording/model/VoiceRecord.model.js.map +1 -1
  25. package/dist/module/features/voice/types.js +5 -1
  26. package/dist/module/features/voice/types.js.map +1 -1
  27. package/dist/typescript/commonjs/features/voice/constants.d.ts +12 -2
  28. package/dist/typescript/commonjs/features/voice/constants.d.ts.map +1 -1
  29. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecord.d.ts.map +1 -1
  30. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordButton.d.ts +1 -3
  31. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordButton.d.ts.map +1 -1
  32. package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts +2 -1
  33. package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts.map +1 -1
  34. package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecord.model.d.ts +3 -1
  35. package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecord.model.d.ts.map +1 -1
  36. package/dist/typescript/commonjs/features/voice/types.d.ts +4 -0
  37. package/dist/typescript/commonjs/features/voice/types.d.ts.map +1 -1
  38. package/dist/typescript/module/features/voice/constants.d.ts +12 -2
  39. package/dist/typescript/module/features/voice/constants.d.ts.map +1 -1
  40. package/dist/typescript/module/features/voice/recording/components/VoiceRecord.d.ts.map +1 -1
  41. package/dist/typescript/module/features/voice/recording/components/VoiceRecordButton.d.ts +1 -3
  42. package/dist/typescript/module/features/voice/recording/components/VoiceRecordButton.d.ts.map +1 -1
  43. package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts +2 -1
  44. package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts.map +1 -1
  45. package/dist/typescript/module/features/voice/recording/model/VoiceRecord.model.d.ts +3 -1
  46. package/dist/typescript/module/features/voice/recording/model/VoiceRecord.model.d.ts.map +1 -1
  47. package/dist/typescript/module/features/voice/types.d.ts +4 -0
  48. package/dist/typescript/module/features/voice/types.d.ts.map +1 -1
  49. package/package.json +1 -1
  50. package/src/features/voice/constants.ts +13 -2
  51. package/src/features/voice/recording/components/VoiceRecord.tsx +28 -5
  52. package/src/features/voice/recording/components/VoiceRecordButton.tsx +99 -30
  53. package/src/features/voice/recording/components/VoiceRecordDeleteButton.tsx +2 -2
  54. package/src/features/voice/recording/hooks/useVoiceRecorderAnimation.ts +8 -4
  55. package/src/features/voice/recording/model/VoiceRecord.model.ts +7 -0
  56. package/src/features/voice/types.ts +5 -0
  57. package/.claude/settings.local.json +0 -25
  58. package/.editorconfig +0 -15
  59. package/.eslintignore +0 -2
  60. package/.eslintrc +0 -22
  61. package/.gitattributes +0 -3
  62. package/.github/actions/setup/action.yml +0 -37
  63. package/.github/workflows/ci.yml +0 -73
  64. package/.gitignore +0 -84
  65. package/.idea/.gitignore +0 -8
  66. package/.idea/codeStyles/Project.xml +0 -62
  67. package/.idea/codeStyles/codeStyleConfig.xml +0 -5
  68. package/.idea/copilot.data.migration.agent.xml +0 -6
  69. package/.idea/copilot.data.migration.ask.xml +0 -6
  70. package/.idea/copilot.data.migration.ask2agent.xml +0 -6
  71. package/.idea/copilot.data.migration.edit.xml +0 -6
  72. package/.idea/inspectionProfiles/Project_Default.xml +0 -8
  73. package/.idea/jsLinters/eslint.xml +0 -6
  74. package/.idea/modules.xml +0 -8
  75. package/.idea/prettier.xml +0 -7
  76. package/.idea/students-features.iml +0 -12
  77. package/.idea/vcs.xml +0 -6
  78. package/.idea/workspace.xml +0 -667
  79. package/.nvmrc +0 -1
  80. package/.prettierrc +0 -11
  81. package/.release-it.json +0 -17
  82. package/.watchmanconfig +0 -1
  83. package/.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs +0 -541
  84. package/.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs +0 -28
  85. package/.yarn/releases/yarn-3.6.1.cjs +0 -874
  86. package/babel.config.js +0 -5
  87. package/bob.config.js +0 -25
  88. package/example/.expo/README.md +0 -8
  89. package/example/.expo/devices.json +0 -3
  90. package/example/.expo/web/cache/production/images/favicon/favicon-24272cdaeff82cc5facdaccd982a6f05b60c4504704bbf94c19a6388659880bb-contain-transparent/favicon-48.png +0 -0
  91. package/example/app.json +0 -30
  92. package/example/assets/adaptive-icon.png +0 -0
  93. package/example/assets/favicon.png +0 -0
  94. package/example/assets/icon.png +0 -0
  95. package/example/assets/splash-icon.png +0 -0
  96. package/example/babel.config.js +0 -28
  97. package/example/index.js +0 -8
  98. package/example/metro.config.js +0 -18
  99. package/example/package.json +0 -25
  100. package/example/src/App.tsx +0 -8
  101. package/example/tsconfig.json +0 -6
  102. package/tsconfig.build.json +0 -4
  103. package/tsconfig.json +0 -34
  104. package/yarn.lock +0 -10957
@@ -1,7 +1,7 @@
1
1
  import { StyleProp, ViewStyle, StyleSheet } from 'react-native'
2
2
  import { VoiceRecordButton } from './VoiceRecordButton'
3
3
  import React, { useEffect } from 'react'
4
- import { COLORS, SPACING } from '@magmamath/react-native-ui'
4
+ import { BORDER_RADIUS, COLORS, SPACING } from '@magmamath/react-native-ui'
5
5
  import { VoiceRecordDeleteButton } from './VoiceRecordDeleteButton'
6
6
  import { VoiceRecordDivider } from './VoiceRecordDivider'
7
7
  import { VoiceRecordTimer } from './VoiceRecordTimer'
@@ -10,6 +10,8 @@ import { VoiceRecordModel } from '../model/VoiceRecord.model'
10
10
  import { useVoiceRecorder } from '../hooks/useVoiceRecorder'
11
11
  import { useVoiceRecorderAnimation } from '../hooks/useVoiceRecorderAnimation'
12
12
  import { useUnit } from 'effector-react'
13
+ import { RecordButtonVariant } from '../../types'
14
+ import { VOICE_RECORD_SHAWODS } from '../../constants'
13
15
 
14
16
  type VoiceRecordProps = {
15
17
  style?: StyleProp<ViewStyle>
@@ -20,7 +22,8 @@ export const VoiceRecord = ({ style, model }: VoiceRecordProps) => {
20
22
  const { recorderState } = useVoiceRecorder(model)
21
23
  const [isExpanded, isDisabled] = useUnit([model.$isExpanded, model.$isButtonDisabled])
22
24
 
23
- const { containerAnimatedStyle } = useVoiceRecorderAnimation(isExpanded)
25
+ const recordButtonVariant = model.recordButtonVariant
26
+ const { containerAnimatedStyle } = useVoiceRecorderAnimation(isExpanded, recordButtonVariant)
24
27
 
25
28
  useEffect(() => {
26
29
  return () => {
@@ -29,12 +32,23 @@ export const VoiceRecord = ({ style, model }: VoiceRecordProps) => {
29
32
  }, [model])
30
33
 
31
34
  return (
32
- <Animated.View style={[styles.container, style, containerAnimatedStyle]}>
35
+ <Animated.View
36
+ style={[
37
+ styles.container,
38
+ recordButtonVariant === RecordButtonVariant.ADVANCED && styles.advancedVariantContainer,
39
+ { boxShadow: VOICE_RECORD_SHAWODS[recordButtonVariant] },
40
+ style,
41
+ containerAnimatedStyle,
42
+ ]}
43
+ >
33
44
  <VoiceRecordButton model={model} />
34
45
  {isExpanded && (
35
46
  <Animated.View entering={FadeIn} exiting={FadeOut} style={styles.expendedContainer}>
36
47
  <VoiceRecordTimer
37
- style={styles.timer}
48
+ style={[
49
+ styles.timer,
50
+ recordButtonVariant === RecordButtonVariant.ADVANCED && styles.advancedVariantTimer,
51
+ ]}
38
52
  model={model}
39
53
  recordingFileDurationMs={recorderState.durationMillis}
40
54
  />
@@ -53,12 +67,21 @@ const styles = StyleSheet.create({
53
67
  paddingBottom: 6,
54
68
  backgroundColor: COLORS.NEUTRAL_3,
55
69
  borderRadius: 32,
56
- boxShadow: '0 1px 3px 0 rgba(51, 51, 51, 0.10), 0 0 1px 0 rgba(51, 51, 51, 0.40)',
70
+ },
71
+ advancedVariantContainer: {
72
+ borderRadius: BORDER_RADIUS[300],
73
+ padding: 0,
57
74
  overflow: 'hidden',
58
75
  },
59
76
  timer: {
60
77
  marginTop: SPACING[400],
61
78
  },
79
+ defaultTimer: {
80
+ marginTop: SPACING[300],
81
+ },
82
+ advancedVariantTimer: {
83
+ marginTop: SPACING[150],
84
+ },
62
85
  expendedContainer: {
63
86
  alignItems: 'center',
64
87
  },
@@ -1,25 +1,35 @@
1
- import React, { useMemo } from 'react'
1
+ import React from 'react'
2
2
  import {
3
+ BORDER_RADIUS,
3
4
  Button,
4
5
  ButtonColor,
5
6
  ButtonSize,
6
7
  ButtonStyle,
7
8
  ButtonVariant,
9
+ CheckIcon,
10
+ COLORS,
8
11
  IS_WEB,
12
+ MicrophoneIcon,
9
13
  } from '@magmamath/react-native-ui'
10
- import { Pressable } from 'react-native'
11
- import { MicrophoneIcon, CheckIcon } from '@magmamath/react-native-ui'
14
+ import { Pressable, StyleSheet, View } from 'react-native'
12
15
  import { VoiceRecordModel } from '../model/VoiceRecord.model'
13
16
  import { useUnit } from 'effector-react'
14
- import { VoiceRecorderState } from '../../constants'
17
+ import { VOICE_RECORD_SHAWODS, VoiceRecorderState } from '../../constants'
15
18
  import { useText } from '../../../../shared/translation'
19
+ import { RecordButtonVariant } from '../../types'
16
20
 
17
21
  type VoiceRecordButtonProps = {
18
- style?: ButtonStyle
19
22
  model: VoiceRecordModel
20
23
  }
21
24
 
22
- export const VoiceRecordButton = ({ style, model }: VoiceRecordButtonProps) => {
25
+ const defaultButtonStyles: ButtonStyle = {
26
+ button: {
27
+ width: 50,
28
+ height: 50,
29
+ },
30
+ }
31
+
32
+ export const VoiceRecordButton = ({ model }: VoiceRecordButtonProps) => {
23
33
  const t = useText()
24
34
 
25
35
  const availableInputs = useUnit(model.recorderModel.$availableInputs)
@@ -27,38 +37,97 @@ export const VoiceRecordButton = ({ style, model }: VoiceRecordButtonProps) => {
27
37
  const isButtonDisabled = useUnit(model.$isButtonDisabled)
28
38
  const isInitializing = useUnit(model.initializeRecording.pending)
29
39
 
30
- const combinedStyles = useMemo((): ButtonStyle => {
31
- return {
32
- button: [{ width: 50, height: 50 }, style?.button],
33
- container: [style?.container],
34
- text: [style?.text],
35
- }
36
- }, [style])
40
+ const isRecording = voiceRecordState === VoiceRecorderState.RECORDING
41
+ const isIdle = voiceRecordState === VoiceRecorderState.IDLE
42
+ const hasInputs = availableInputs.length > 0
37
43
 
38
44
  return (
39
45
  <Pressable
40
46
  onPressIn={(e) => {
41
- if (availableInputs.length) return
47
+ if (hasInputs) return
42
48
  e.preventDefault()
43
49
  model.notification.warning(t('voice.noMicrophoneFound'))
44
50
  }}
45
- pointerEvents={!availableInputs.length || isInitializing ? 'box-only' : 'auto'}
51
+ pointerEvents={!hasInputs || isInitializing ? 'box-only' : 'auto'}
52
+ style={[isButtonDisabled ? styles.disabledCursor : undefined]}
46
53
  >
47
- <Button
48
- disabled={isButtonDisabled || !availableInputs.length}
49
- onPressIn={() => model.recorderButtonHandler()}
50
- style={combinedStyles}
51
- size={ButtonSize.LARGE}
52
- variant={ButtonVariant.SECONDARY}
53
- colorScheme={ButtonColor.WHITE}
54
- icon={
55
- voiceRecordState === VoiceRecorderState.RECORDING ? (
56
- <CheckIcon size={25} />
57
- ) : (
58
- <MicrophoneIcon style={IS_WEB ? { width: 19 } : { minWidth: 23, minHeight: 23 }} />
59
- )
60
- }
61
- />
54
+ {model.recordButtonVariant === RecordButtonVariant.ADVANCED ? (
55
+ <AdvancedButton
56
+ isRecording={isRecording}
57
+ isIdle={isIdle}
58
+ disabled={isButtonDisabled}
59
+ onPressIn={() => model.recorderButtonHandler()}
60
+ />
61
+ ) : (
62
+ <Button
63
+ disabled={isButtonDisabled}
64
+ onPressIn={() => model.recorderButtonHandler()}
65
+ style={defaultButtonStyles}
66
+ size={ButtonSize.LARGE}
67
+ variant={ButtonVariant.SECONDARY}
68
+ colorScheme={ButtonColor.WHITE}
69
+ icon={
70
+ isRecording ? (
71
+ <CheckIcon size={25} />
72
+ ) : (
73
+ <MicrophoneIcon style={IS_WEB ? { width: 19 } : { minWidth: 23, minHeight: 23 }} />
74
+ )
75
+ }
76
+ />
77
+ )}
62
78
  </Pressable>
63
79
  )
64
80
  }
81
+
82
+ type AdvancedButtonProps = {
83
+ isRecording: boolean
84
+ isIdle: boolean
85
+ disabled: boolean
86
+ onPressIn: () => void
87
+ }
88
+
89
+ const AdvancedButton = ({ isRecording, isIdle, disabled, onPressIn }: AdvancedButtonProps) => (
90
+ <Pressable
91
+ style={[styles.advancedButtonContainer, disabled && styles.disabledCursor]}
92
+ onPressIn={onPressIn}
93
+ disabled={disabled}
94
+ >
95
+ <View
96
+ style={[
97
+ styles.advancedIconContainer,
98
+ !isIdle && { borderRadius: 32, backgroundColor: COLORS.PRIMARY_BLUE },
99
+ ]}
100
+ >
101
+ {isRecording ? (
102
+ <CheckIcon size={18} color={COLORS.NEUTRAL_1} />
103
+ ) : (
104
+ <MicrophoneIcon
105
+ style={{ width: 14, height: 19 }}
106
+ color={disabled ? COLORS.NEUTRAL_5 : isIdle ? COLORS.NEUTRAL_9 : COLORS.NEUTRAL_1}
107
+ />
108
+ )}
109
+ </View>
110
+ </Pressable>
111
+ )
112
+
113
+ const styles = StyleSheet.create({
114
+ advancedButtonContainer: {
115
+ width: 52,
116
+ height: 52,
117
+ backgroundColor: 'white',
118
+ alignItems: 'center',
119
+ justifyContent: 'center',
120
+ borderRadius: BORDER_RADIUS[300],
121
+ boxShadow: VOICE_RECORD_SHAWODS[RecordButtonVariant.ADVANCED],
122
+ },
123
+ advancedIconContainer: {
124
+ width: 36,
125
+ height: 36,
126
+ borderRadius: BORDER_RADIUS[300],
127
+ justifyContent: 'center',
128
+ alignItems: 'center',
129
+ },
130
+ disabledCursor: {
131
+ cursor: 'not-allowed' as 'auto',
132
+ },
133
+ })
@@ -17,8 +17,8 @@ export const VoiceRecordDeleteButton = ({ onPress, isDisabled }: VoiceRecordDele
17
17
 
18
18
  const styles = StyleSheet.create({
19
19
  container: {
20
- width: 36,
21
- height: 36,
20
+ width: 32,
21
+ height: 32,
22
22
  alignItems: 'center',
23
23
  justifyContent: 'center',
24
24
  },
@@ -1,19 +1,23 @@
1
1
  import { useAnimatedStyle, withTiming } from 'react-native-reanimated'
2
2
  import { VOICE_RECORDER_CONTAINER_SIZES } from '../../constants'
3
+ import { RecordButtonVariant } from '../../types'
3
4
 
4
- export const useVoiceRecorderAnimation = (isExpanded: boolean) => {
5
+ export const useVoiceRecorderAnimation = (
6
+ isExpanded: boolean,
7
+ recordButtonVariant: RecordButtonVariant,
8
+ ) => {
5
9
  const containerAnimatedStyle = useAnimatedStyle(() => {
6
10
  return {
7
11
  height: withTiming(
8
12
  isExpanded
9
- ? VOICE_RECORDER_CONTAINER_SIZES.EXPANDED
10
- : VOICE_RECORDER_CONTAINER_SIZES.COLLAPSED,
13
+ ? VOICE_RECORDER_CONTAINER_SIZES.EXPANDED[recordButtonVariant]
14
+ : VOICE_RECORDER_CONTAINER_SIZES.COLLAPSED[recordButtonVariant],
11
15
  {
12
16
  duration: 280,
13
17
  },
14
18
  ),
15
19
  }
16
- }, [isExpanded])
20
+ }, [isExpanded, recordButtonVariant])
17
21
 
18
22
  return { containerAnimatedStyle }
19
23
  }
@@ -4,6 +4,7 @@ import { VoiceRecordsCollection } from './VoiceRecordCollection'
4
4
  import { UploaderModel } from './Uploader.model'
5
5
  import { VoiceRecorderState } from '../../constants'
6
6
  import {
7
+ RecordButtonVariant,
7
8
  VoiceRecordCollectionItem,
8
9
  VoiceRecorderApi,
9
10
  VoiceRecordNotificationTypes,
@@ -58,6 +59,8 @@ export class VoiceRecordModel {
58
59
  public readonly events: VoiceRecordEvents
59
60
  private shouldDiscardRecording = false
60
61
 
62
+ public recordButtonVariant = RecordButtonVariant.DEFAULT
63
+
61
64
  public readonly setCurrentKey = createEvent<string>()
62
65
  public readonly setCurrentRecord = createEvent<any>()
63
66
  public readonly reset = createEvent()
@@ -82,6 +85,10 @@ export class VoiceRecordModel {
82
85
  await this.api.deleteAudioFile(audioFileId)
83
86
  })
84
87
 
88
+ public readonly setRecordButtonVariant = createEffect((variant: RecordButtonVariant) => {
89
+ this.recordButtonVariant = variant
90
+ })
91
+
85
92
  public readonly deleteCurrentRecording = attach({
86
93
  source: this.$currentKey,
87
94
  mapParams: (props: DeleteCurrentRecordingProps | void, currentKey) => ({
@@ -82,3 +82,8 @@ export type VoiceTranscriptionItem = {
82
82
  controller?: AbortController
83
83
  hasDrawing?: boolean
84
84
  }
85
+
86
+ export enum RecordButtonVariant {
87
+ DEFAULT = 'default',
88
+ ADVANCED = 'advanced',
89
+ }
@@ -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@v3
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@v3
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@v3
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@v3
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@v3
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@v3
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>