@magmamath/students-features 1.3.3 → 1.3.4-rc.1
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.
- package/dist/commonjs/features/keyboard/components/AlgebraLayout/AlgebraLayout.js +72 -20
- package/dist/commonjs/features/keyboard/components/AlgebraLayout/AlgebraLayout.js.map +1 -1
- package/dist/commonjs/features/keyboard/components/AlgebraLayout/helpers.js +41 -0
- package/dist/commonjs/features/keyboard/components/AlgebraLayout/helpers.js.map +1 -0
- package/dist/commonjs/features/keyboard/components/{SwitchableLayout → AlgebraLayout}/types.js +1 -1
- package/dist/commonjs/features/keyboard/components/AlgebraLayout/types.js.map +1 -0
- package/dist/commonjs/features/keyboard/constants/groups/index.js +0 -11
- package/dist/commonjs/features/keyboard/constants/groups/index.js.map +1 -1
- package/dist/commonjs/features/keyboard/constants/keyboard.constants.js +1 -6
- package/dist/commonjs/features/keyboard/constants/keyboard.constants.js.map +1 -1
- package/dist/commonjs/features/keyboard/constants/keyboard.helpers.js +0 -2
- package/dist/commonjs/features/keyboard/constants/keyboard.helpers.js.map +1 -1
- package/dist/commonjs/features/keyboard/constants/keyboardLayouts.js +8 -18
- package/dist/commonjs/features/keyboard/constants/keyboardLayouts.js.map +1 -1
- package/dist/commonjs/features/keyboard/constants/keys/geometry.constants.js +1 -86
- package/dist/commonjs/features/keyboard/constants/keys/geometry.constants.js.map +1 -1
- package/dist/commonjs/features/keyboard/constants/keys/text.constants.js +9 -9
- package/dist/commonjs/features/keyboard/constants/keys/units.constants.js +1 -2
- package/dist/commonjs/features/keyboard/constants/keys/units.constants.js.map +1 -1
- package/dist/commonjs/features/keyboard/types/types.js +0 -1
- package/dist/commonjs/features/keyboard/types/types.js.map +1 -1
- package/dist/commonjs/features/voice/constants.js +13 -3
- package/dist/commonjs/features/voice/constants.js.map +1 -1
- package/dist/commonjs/features/voice/recording/components/VoiceRecord.js +19 -5
- package/dist/commonjs/features/voice/recording/components/VoiceRecord.js.map +1 -1
- package/dist/commonjs/features/voice/recording/components/VoiceRecordButton.js +71 -20
- package/dist/commonjs/features/voice/recording/components/VoiceRecordButton.js.map +1 -1
- package/dist/commonjs/features/voice/recording/components/VoiceRecordDeleteButton.js +2 -2
- package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.js +3 -3
- package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.js.map +1 -1
- package/dist/commonjs/features/voice/recording/model/VoiceRecord.model.js +5 -0
- package/dist/commonjs/features/voice/recording/model/VoiceRecord.model.js.map +1 -1
- package/dist/commonjs/features/voice/types.js +6 -0
- package/dist/commonjs/features/voice/types.js.map +1 -1
- package/dist/commonjs/shared/icons/keyboard/AngleIcon.js +3 -4
- package/dist/commonjs/shared/icons/keyboard/AngleIcon.js.map +1 -1
- package/dist/commonjs/shared/icons/keyboard/BidirectionalSegmentIcon.js +8 -12
- package/dist/commonjs/shared/icons/keyboard/BidirectionalSegmentIcon.js.map +1 -1
- package/dist/commonjs/shared/icons/keyboard/LineSegmentIcon.js +6 -11
- package/dist/commonjs/shared/icons/keyboard/LineSegmentIcon.js.map +1 -1
- package/dist/commonjs/shared/icons/keyboard/RightDirectedSegmentIcon.js +8 -12
- package/dist/commonjs/shared/icons/keyboard/RightDirectedSegmentIcon.js.map +1 -1
- package/dist/module/features/keyboard/components/AlgebraLayout/AlgebraLayout.js +72 -21
- package/dist/module/features/keyboard/components/AlgebraLayout/AlgebraLayout.js.map +1 -1
- package/dist/module/features/keyboard/components/AlgebraLayout/helpers.js +36 -0
- package/dist/module/features/keyboard/components/AlgebraLayout/helpers.js.map +1 -0
- package/dist/module/features/keyboard/components/{SwitchableLayout → AlgebraLayout}/types.js +1 -1
- package/dist/module/features/keyboard/components/AlgebraLayout/types.js.map +1 -0
- package/dist/module/features/keyboard/constants/groups/index.js +0 -1
- package/dist/module/features/keyboard/constants/groups/index.js.map +1 -1
- package/dist/module/features/keyboard/constants/keyboard.constants.js +0 -5
- package/dist/module/features/keyboard/constants/keyboard.constants.js.map +1 -1
- package/dist/module/features/keyboard/constants/keyboard.helpers.js +1 -3
- package/dist/module/features/keyboard/constants/keyboard.helpers.js.map +1 -1
- package/dist/module/features/keyboard/constants/keyboardLayouts.js +9 -19
- package/dist/module/features/keyboard/constants/keyboardLayouts.js.map +1 -1
- package/dist/module/features/keyboard/constants/keys/geometry.constants.js +1 -86
- package/dist/module/features/keyboard/constants/keys/geometry.constants.js.map +1 -1
- package/dist/module/features/keyboard/constants/keys/text.constants.js +9 -9
- package/dist/module/features/keyboard/constants/keys/units.constants.js +1 -2
- package/dist/module/features/keyboard/constants/keys/units.constants.js.map +1 -1
- package/dist/module/features/keyboard/types/types.js +0 -1
- package/dist/module/features/keyboard/types/types.js.map +1 -1
- package/dist/module/features/voice/constants.js +12 -2
- package/dist/module/features/voice/constants.js.map +1 -1
- package/dist/module/features/voice/recording/components/VoiceRecord.js +20 -6
- package/dist/module/features/voice/recording/components/VoiceRecord.js.map +1 -1
- package/dist/module/features/voice/recording/components/VoiceRecordButton.js +73 -22
- package/dist/module/features/voice/recording/components/VoiceRecordButton.js.map +1 -1
- package/dist/module/features/voice/recording/components/VoiceRecordDeleteButton.js +2 -2
- package/dist/module/features/voice/recording/hooks/useVoiceRecorderAnimation.js +3 -3
- package/dist/module/features/voice/recording/hooks/useVoiceRecorderAnimation.js.map +1 -1
- package/dist/module/features/voice/recording/model/VoiceRecord.model.js +5 -0
- package/dist/module/features/voice/recording/model/VoiceRecord.model.js.map +1 -1
- package/dist/module/features/voice/types.js +5 -1
- package/dist/module/features/voice/types.js.map +1 -1
- package/dist/module/shared/icons/keyboard/AngleIcon.js +3 -4
- package/dist/module/shared/icons/keyboard/AngleIcon.js.map +1 -1
- package/dist/module/shared/icons/keyboard/BidirectionalSegmentIcon.js +9 -13
- package/dist/module/shared/icons/keyboard/BidirectionalSegmentIcon.js.map +1 -1
- package/dist/module/shared/icons/keyboard/LineSegmentIcon.js +7 -12
- package/dist/module/shared/icons/keyboard/LineSegmentIcon.js.map +1 -1
- package/dist/module/shared/icons/keyboard/RightDirectedSegmentIcon.js +9 -13
- package/dist/module/shared/icons/keyboard/RightDirectedSegmentIcon.js.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/components/AlgebraLayout/AlgebraLayout.d.ts +1 -1
- package/dist/typescript/commonjs/features/keyboard/components/AlgebraLayout/AlgebraLayout.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/components/AlgebraLayout/helpers.d.ts +15 -0
- package/dist/typescript/commonjs/features/keyboard/components/AlgebraLayout/helpers.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/keyboard/components/AlgebraLayout/types.d.ts +5 -0
- package/dist/typescript/commonjs/features/keyboard/components/AlgebraLayout/types.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/keyboard/constants/groups/index.d.ts +0 -1
- package/dist/typescript/commonjs/features/keyboard/constants/groups/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/constants/keyboard.constants.d.ts +0 -5
- package/dist/typescript/commonjs/features/keyboard/constants/keyboard.constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/constants/keyboard.helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/constants/keyboardLayouts.d.ts +4 -13
- package/dist/typescript/commonjs/features/keyboard/constants/keyboardLayouts.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/constants/keys/geometry.constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/constants/keys/units.constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/types/types.d.ts +0 -1
- package/dist/typescript/commonjs/features/keyboard/types/types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/constants.d.ts +12 -2
- package/dist/typescript/commonjs/features/voice/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecord.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordButton.d.ts +1 -3
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordButton.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts +2 -1
- package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecord.model.d.ts +3 -1
- package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecord.model.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/types.d.ts +4 -0
- package/dist/typescript/commonjs/features/voice/types.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/icons/keyboard/AngleIcon.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/icons/keyboard/BidirectionalSegmentIcon.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/icons/keyboard/LineSegmentIcon.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/icons/keyboard/RightDirectedSegmentIcon.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/components/AlgebraLayout/AlgebraLayout.d.ts +1 -1
- package/dist/typescript/module/features/keyboard/components/AlgebraLayout/AlgebraLayout.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/components/AlgebraLayout/helpers.d.ts +15 -0
- package/dist/typescript/module/features/keyboard/components/AlgebraLayout/helpers.d.ts.map +1 -0
- package/dist/typescript/module/features/keyboard/components/AlgebraLayout/types.d.ts +5 -0
- package/dist/typescript/module/features/keyboard/components/AlgebraLayout/types.d.ts.map +1 -0
- package/dist/typescript/module/features/keyboard/constants/groups/index.d.ts +0 -1
- package/dist/typescript/module/features/keyboard/constants/groups/index.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/constants/keyboard.constants.d.ts +0 -5
- package/dist/typescript/module/features/keyboard/constants/keyboard.constants.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/constants/keyboard.helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/constants/keyboardLayouts.d.ts +4 -13
- package/dist/typescript/module/features/keyboard/constants/keyboardLayouts.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/constants/keys/geometry.constants.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/constants/keys/units.constants.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/types/types.d.ts +0 -1
- package/dist/typescript/module/features/keyboard/types/types.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/constants.d.ts +12 -2
- package/dist/typescript/module/features/voice/constants.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/recording/components/VoiceRecord.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordButton.d.ts +1 -3
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordButton.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts +2 -1
- package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/recording/model/VoiceRecord.model.d.ts +3 -1
- package/dist/typescript/module/features/voice/recording/model/VoiceRecord.model.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/types.d.ts +4 -0
- package/dist/typescript/module/features/voice/types.d.ts.map +1 -1
- package/dist/typescript/module/shared/icons/keyboard/AngleIcon.d.ts.map +1 -1
- package/dist/typescript/module/shared/icons/keyboard/BidirectionalSegmentIcon.d.ts.map +1 -1
- package/dist/typescript/module/shared/icons/keyboard/LineSegmentIcon.d.ts.map +1 -1
- package/dist/typescript/module/shared/icons/keyboard/RightDirectedSegmentIcon.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/features/keyboard/components/AlgebraLayout/AlgebraLayout.tsx +73 -17
- package/src/features/keyboard/components/AlgebraLayout/helpers.tsx +52 -0
- package/src/features/keyboard/components/AlgebraLayout/types.ts +4 -0
- package/src/features/keyboard/constants/groups/index.ts +0 -1
- package/src/features/keyboard/constants/keyboard.constants.ts +0 -6
- package/src/features/keyboard/constants/keyboard.helpers.ts +0 -3
- package/src/features/keyboard/constants/keyboardLayouts.ts +5 -15
- package/src/features/keyboard/constants/keys/geometry.constants.tsx +1 -61
- package/src/features/keyboard/constants/keys/text.constants.tsx +9 -9
- package/src/features/keyboard/constants/keys/units.constants.tsx +0 -1
- package/src/features/keyboard/types/types.ts +0 -1
- package/src/features/voice/constants.ts +13 -2
- package/src/features/voice/recording/components/VoiceRecord.tsx +28 -5
- package/src/features/voice/recording/components/VoiceRecordButton.tsx +99 -30
- package/src/features/voice/recording/components/VoiceRecordDeleteButton.tsx +2 -2
- package/src/features/voice/recording/hooks/useVoiceRecorderAnimation.ts +8 -4
- package/src/features/voice/recording/model/VoiceRecord.model.ts +7 -0
- package/src/features/voice/types.ts +5 -0
- package/src/shared/icons/keyboard/AngleIcon.tsx +2 -4
- package/src/shared/icons/keyboard/BidirectionalSegmentIcon.tsx +8 -5
- package/src/shared/icons/keyboard/LineSegmentIcon.tsx +7 -6
- package/src/shared/icons/keyboard/RightDirectedSegmentIcon.tsx +8 -5
- package/.claude/settings.local.json +0 -25
- package/.editorconfig +0 -15
- package/.eslintignore +0 -2
- package/.eslintrc +0 -22
- package/.gitattributes +0 -3
- package/.github/actions/setup/action.yml +0 -37
- package/.github/workflows/ci.yml +0 -73
- package/.gitignore +0 -84
- package/.idea/.gitignore +0 -8
- package/.idea/codeStyles/Project.xml +0 -62
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/copilot.data.migration.agent.xml +0 -6
- package/.idea/copilot.data.migration.ask.xml +0 -6
- package/.idea/copilot.data.migration.ask2agent.xml +0 -6
- package/.idea/copilot.data.migration.edit.xml +0 -6
- package/.idea/inspectionProfiles/Project_Default.xml +0 -8
- package/.idea/jsLinters/eslint.xml +0 -6
- package/.idea/modules.xml +0 -8
- package/.idea/prettier.xml +0 -7
- package/.idea/students-features.iml +0 -12
- package/.idea/vcs.xml +0 -6
- package/.idea/workspace.xml +0 -667
- package/.nvmrc +0 -1
- package/.prettierrc +0 -11
- package/.release-it.json +0 -17
- package/.watchmanconfig +0 -1
- package/.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs +0 -541
- package/.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs +0 -28
- package/.yarn/releases/yarn-3.6.1.cjs +0 -874
- package/babel.config.js +0 -5
- package/bob.config.js +0 -25
- package/dist/commonjs/features/keyboard/components/GeometryLayout/GeometryLayout.js +0 -33
- package/dist/commonjs/features/keyboard/components/GeometryLayout/GeometryLayout.js.map +0 -1
- package/dist/commonjs/features/keyboard/components/SwitchableLayout/SwitchableLayout.js +0 -94
- package/dist/commonjs/features/keyboard/components/SwitchableLayout/SwitchableLayout.js.map +0 -1
- package/dist/commonjs/features/keyboard/components/SwitchableLayout/helpers.js +0 -25
- package/dist/commonjs/features/keyboard/components/SwitchableLayout/helpers.js.map +0 -1
- package/dist/commonjs/features/keyboard/components/SwitchableLayout/types.js.map +0 -1
- package/dist/commonjs/features/keyboard/constants/groups/geometry.constants.js +0 -11
- package/dist/commonjs/features/keyboard/constants/groups/geometry.constants.js.map +0 -1
- package/dist/commonjs/shared/icons/GeometryIcon.js +0 -32
- package/dist/commonjs/shared/icons/GeometryIcon.js.map +0 -1
- package/dist/commonjs/shared/icons/keyboard/ImpliesIcon.js +0 -30
- package/dist/commonjs/shared/icons/keyboard/ImpliesIcon.js.map +0 -1
- package/dist/commonjs/shared/icons/keyboard/LetterAIcon.js +0 -29
- package/dist/commonjs/shared/icons/keyboard/LetterAIcon.js.map +0 -1
- package/dist/commonjs/shared/icons/keyboard/LetterBIcon.js +0 -29
- package/dist/commonjs/shared/icons/keyboard/LetterBIcon.js.map +0 -1
- package/dist/commonjs/shared/icons/keyboard/LetterCIcon.js +0 -29
- package/dist/commonjs/shared/icons/keyboard/LetterCIcon.js.map +0 -1
- package/dist/commonjs/shared/icons/keyboard/ThereforeIcon.js +0 -42
- package/dist/commonjs/shared/icons/keyboard/ThereforeIcon.js.map +0 -1
- package/dist/commonjs/shared/icons/keyboard/TriangleIcon.js +0 -32
- package/dist/commonjs/shared/icons/keyboard/TriangleIcon.js.map +0 -1
- package/dist/module/features/keyboard/components/GeometryLayout/GeometryLayout.js +0 -27
- package/dist/module/features/keyboard/components/GeometryLayout/GeometryLayout.js.map +0 -1
- package/dist/module/features/keyboard/components/SwitchableLayout/SwitchableLayout.js +0 -87
- package/dist/module/features/keyboard/components/SwitchableLayout/SwitchableLayout.js.map +0 -1
- package/dist/module/features/keyboard/components/SwitchableLayout/helpers.js +0 -21
- package/dist/module/features/keyboard/components/SwitchableLayout/helpers.js.map +0 -1
- package/dist/module/features/keyboard/components/SwitchableLayout/types.js.map +0 -1
- package/dist/module/features/keyboard/constants/groups/geometry.constants.js +0 -7
- package/dist/module/features/keyboard/constants/groups/geometry.constants.js.map +0 -1
- package/dist/module/shared/icons/GeometryIcon.js +0 -24
- package/dist/module/shared/icons/GeometryIcon.js.map +0 -1
- package/dist/module/shared/icons/keyboard/ImpliesIcon.js +0 -22
- package/dist/module/shared/icons/keyboard/ImpliesIcon.js.map +0 -1
- package/dist/module/shared/icons/keyboard/LetterAIcon.js +0 -21
- package/dist/module/shared/icons/keyboard/LetterAIcon.js.map +0 -1
- package/dist/module/shared/icons/keyboard/LetterBIcon.js +0 -21
- package/dist/module/shared/icons/keyboard/LetterBIcon.js.map +0 -1
- package/dist/module/shared/icons/keyboard/LetterCIcon.js +0 -21
- package/dist/module/shared/icons/keyboard/LetterCIcon.js.map +0 -1
- package/dist/module/shared/icons/keyboard/ThereforeIcon.js +0 -34
- package/dist/module/shared/icons/keyboard/ThereforeIcon.js.map +0 -1
- package/dist/module/shared/icons/keyboard/TriangleIcon.js +0 -24
- package/dist/module/shared/icons/keyboard/TriangleIcon.js.map +0 -1
- package/dist/typescript/commonjs/features/keyboard/components/GeometryLayout/GeometryLayout.d.ts +0 -4
- package/dist/typescript/commonjs/features/keyboard/components/GeometryLayout/GeometryLayout.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/keyboard/components/SwitchableLayout/SwitchableLayout.d.ts +0 -4
- package/dist/typescript/commonjs/features/keyboard/components/SwitchableLayout/SwitchableLayout.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/keyboard/components/SwitchableLayout/helpers.d.ts +0 -12
- package/dist/typescript/commonjs/features/keyboard/components/SwitchableLayout/helpers.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/keyboard/components/SwitchableLayout/types.d.ts +0 -21
- package/dist/typescript/commonjs/features/keyboard/components/SwitchableLayout/types.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/keyboard/constants/groups/geometry.constants.d.ts +0 -3
- package/dist/typescript/commonjs/features/keyboard/constants/groups/geometry.constants.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/icons/GeometryIcon.d.ts +0 -4
- package/dist/typescript/commonjs/shared/icons/GeometryIcon.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/icons/keyboard/ImpliesIcon.d.ts +0 -4
- package/dist/typescript/commonjs/shared/icons/keyboard/ImpliesIcon.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/icons/keyboard/LetterAIcon.d.ts +0 -4
- package/dist/typescript/commonjs/shared/icons/keyboard/LetterAIcon.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/icons/keyboard/LetterBIcon.d.ts +0 -4
- package/dist/typescript/commonjs/shared/icons/keyboard/LetterBIcon.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/icons/keyboard/LetterCIcon.d.ts +0 -4
- package/dist/typescript/commonjs/shared/icons/keyboard/LetterCIcon.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/icons/keyboard/ThereforeIcon.d.ts +0 -4
- package/dist/typescript/commonjs/shared/icons/keyboard/ThereforeIcon.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/icons/keyboard/TriangleIcon.d.ts +0 -4
- package/dist/typescript/commonjs/shared/icons/keyboard/TriangleIcon.d.ts.map +0 -1
- package/dist/typescript/module/features/keyboard/components/GeometryLayout/GeometryLayout.d.ts +0 -4
- package/dist/typescript/module/features/keyboard/components/GeometryLayout/GeometryLayout.d.ts.map +0 -1
- package/dist/typescript/module/features/keyboard/components/SwitchableLayout/SwitchableLayout.d.ts +0 -4
- package/dist/typescript/module/features/keyboard/components/SwitchableLayout/SwitchableLayout.d.ts.map +0 -1
- package/dist/typescript/module/features/keyboard/components/SwitchableLayout/helpers.d.ts +0 -12
- package/dist/typescript/module/features/keyboard/components/SwitchableLayout/helpers.d.ts.map +0 -1
- package/dist/typescript/module/features/keyboard/components/SwitchableLayout/types.d.ts +0 -21
- package/dist/typescript/module/features/keyboard/components/SwitchableLayout/types.d.ts.map +0 -1
- package/dist/typescript/module/features/keyboard/constants/groups/geometry.constants.d.ts +0 -3
- package/dist/typescript/module/features/keyboard/constants/groups/geometry.constants.d.ts.map +0 -1
- package/dist/typescript/module/shared/icons/GeometryIcon.d.ts +0 -4
- package/dist/typescript/module/shared/icons/GeometryIcon.d.ts.map +0 -1
- package/dist/typescript/module/shared/icons/keyboard/ImpliesIcon.d.ts +0 -4
- package/dist/typescript/module/shared/icons/keyboard/ImpliesIcon.d.ts.map +0 -1
- package/dist/typescript/module/shared/icons/keyboard/LetterAIcon.d.ts +0 -4
- package/dist/typescript/module/shared/icons/keyboard/LetterAIcon.d.ts.map +0 -1
- package/dist/typescript/module/shared/icons/keyboard/LetterBIcon.d.ts +0 -4
- package/dist/typescript/module/shared/icons/keyboard/LetterBIcon.d.ts.map +0 -1
- package/dist/typescript/module/shared/icons/keyboard/LetterCIcon.d.ts +0 -4
- package/dist/typescript/module/shared/icons/keyboard/LetterCIcon.d.ts.map +0 -1
- package/dist/typescript/module/shared/icons/keyboard/ThereforeIcon.d.ts +0 -4
- package/dist/typescript/module/shared/icons/keyboard/ThereforeIcon.d.ts.map +0 -1
- package/dist/typescript/module/shared/icons/keyboard/TriangleIcon.d.ts +0 -4
- package/dist/typescript/module/shared/icons/keyboard/TriangleIcon.d.ts.map +0 -1
- package/example/.expo/README.md +0 -8
- package/example/.expo/devices.json +0 -3
- package/example/.expo/web/cache/production/images/favicon/favicon-24272cdaeff82cc5facdaccd982a6f05b60c4504704bbf94c19a6388659880bb-contain-transparent/favicon-48.png +0 -0
- package/example/app.json +0 -30
- package/example/assets/adaptive-icon.png +0 -0
- package/example/assets/favicon.png +0 -0
- package/example/assets/icon.png +0 -0
- package/example/assets/splash-icon.png +0 -0
- package/example/babel.config.js +0 -28
- package/example/index.js +0 -8
- package/example/metro.config.js +0 -18
- package/example/package.json +0 -25
- package/example/src/App.tsx +0 -8
- package/example/tsconfig.json +0 -6
- package/src/features/keyboard/components/GeometryLayout/GeometryLayout.tsx +0 -21
- package/src/features/keyboard/components/SwitchableLayout/SwitchableLayout.tsx +0 -100
- package/src/features/keyboard/components/SwitchableLayout/helpers.tsx +0 -31
- package/src/features/keyboard/components/SwitchableLayout/types.ts +0 -24
- package/src/features/keyboard/constants/groups/geometry.constants.ts +0 -25
- package/src/shared/icons/GeometryIcon.tsx +0 -18
- package/src/shared/icons/keyboard/ImpliesIcon.tsx +0 -16
- package/src/shared/icons/keyboard/LetterAIcon.tsx +0 -14
- package/src/shared/icons/keyboard/LetterBIcon.tsx +0 -14
- package/src/shared/icons/keyboard/LetterCIcon.tsx +0 -14
- package/src/shared/icons/keyboard/ThereforeIcon.tsx +0 -15
- package/src/shared/icons/keyboard/TriangleIcon.tsx +0 -18
- package/tsconfig.build.json +0 -4
- package/tsconfig.json +0 -34
- package/yarn.lock +0 -10957
|
@@ -5,15 +5,6 @@ import { DegreeIcon } from '../../../../shared/icons/keyboard/DegreeIcon'
|
|
|
5
5
|
import { AngleIcon } from '../../../../shared/icons/keyboard/AngleIcon'
|
|
6
6
|
import { ParallelIcon } from '../../../../shared/icons/keyboard/ParallelIcon'
|
|
7
7
|
import { PerpendicularIcon } from '../../../../shared/icons/keyboard/PerpendicularIcon'
|
|
8
|
-
import { TriangleIcon } from '../../../../shared/icons/keyboard/TriangleIcon'
|
|
9
|
-
import { ThereforeIcon } from '../../../../shared/icons/keyboard/ThereforeIcon'
|
|
10
|
-
import { ImpliesIcon } from '../../../../shared/icons/keyboard/ImpliesIcon'
|
|
11
|
-
import { LineSegmentIcon } from '../../../../shared/icons/keyboard/LineSegmentIcon'
|
|
12
|
-
import { RightDirectedSegmentIcon } from '../../../../shared/icons/keyboard/RightDirectedSegmentIcon'
|
|
13
|
-
import { BidirectionalSegmentIcon } from '../../../../shared/icons/keyboard/BidirectionalSegmentIcon'
|
|
14
|
-
import { LetterAIcon } from '../../../../shared/icons/keyboard/LetterAIcon'
|
|
15
|
-
import { LetterBIcon } from '../../../../shared/icons/keyboard/LetterBIcon'
|
|
16
|
-
import { LetterCIcon } from '../../../../shared/icons/keyboard/LetterCIcon'
|
|
17
8
|
import { DEFAULT_KEY_ICON_PROPS } from '../keyboard.constants'
|
|
18
9
|
|
|
19
10
|
export const MATH_GEOMETRY_SYMBOLS: MathOperatorsGroup = {
|
|
@@ -23,7 +14,7 @@ export const MATH_GEOMETRY_SYMBOLS: MathOperatorsGroup = {
|
|
|
23
14
|
katexValue: '°',
|
|
24
15
|
},
|
|
25
16
|
ANGLE: {
|
|
26
|
-
icon: <AngleIcon {...DEFAULT_KEY_ICON_PROPS}
|
|
17
|
+
icon: <AngleIcon {...DEFAULT_KEY_ICON_PROPS} />,
|
|
27
18
|
mathliveValue: '\\angle',
|
|
28
19
|
katexValue: '∠',
|
|
29
20
|
},
|
|
@@ -54,55 +45,4 @@ export const MATH_GEOMETRY_SYMBOLS: MathOperatorsGroup = {
|
|
|
54
45
|
},
|
|
55
46
|
},
|
|
56
47
|
},
|
|
57
|
-
TRIANGLE: {
|
|
58
|
-
icon: <TriangleIcon {...DEFAULT_KEY_ICON_PROPS} size={20} />,
|
|
59
|
-
mathliveValue: '\\triangle',
|
|
60
|
-
katexValue: '△',
|
|
61
|
-
},
|
|
62
|
-
THEREFORE: {
|
|
63
|
-
icon: <ThereforeIcon {...DEFAULT_KEY_ICON_PROPS} size={20} />,
|
|
64
|
-
mathliveValue: '\\therefore',
|
|
65
|
-
katexValue: '∴',
|
|
66
|
-
},
|
|
67
|
-
IMPLIES: {
|
|
68
|
-
icon: <ImpliesIcon {...DEFAULT_KEY_ICON_PROPS} size={20} />,
|
|
69
|
-
mathliveValue: '\\Rightarrow',
|
|
70
|
-
katexValue: '⇒',
|
|
71
|
-
},
|
|
72
|
-
LINE_SEGMENT: {
|
|
73
|
-
icon: <LineSegmentIcon {...DEFAULT_KEY_ICON_PROPS} size={20} />,
|
|
74
|
-
mathliveValue: '\\overline{\\placeholder{}}',
|
|
75
|
-
katexValue: 'LINE_SEGMENT',
|
|
76
|
-
spreadsheetValue: 'LINE_SEGMENT',
|
|
77
|
-
isSpecialSymbol: true,
|
|
78
|
-
},
|
|
79
|
-
RIGHT_DIRECTED_SEGMENT: {
|
|
80
|
-
icon: <RightDirectedSegmentIcon {...DEFAULT_KEY_ICON_PROPS} size={20} />,
|
|
81
|
-
mathliveValue: '\\overrightarrow{\\placeholder{}}',
|
|
82
|
-
katexValue: 'RIGHT_DIRECTED_SEGMENT',
|
|
83
|
-
spreadsheetValue: 'RIGHT_DIRECTED_SEGMENT',
|
|
84
|
-
isSpecialSymbol: true,
|
|
85
|
-
},
|
|
86
|
-
BIDIRECTIONAL_SEGMENT: {
|
|
87
|
-
icon: <BidirectionalSegmentIcon {...DEFAULT_KEY_ICON_PROPS} size={20} />,
|
|
88
|
-
mathliveValue: '\\overleftrightarrow{\\placeholder{}}',
|
|
89
|
-
katexValue: 'BIDIRECTIONAL_SEGMENT',
|
|
90
|
-
spreadsheetValue: 'BIDIRECTIONAL_SEGMENT',
|
|
91
|
-
isSpecialSymbol: true,
|
|
92
|
-
},
|
|
93
|
-
A: {
|
|
94
|
-
icon: <LetterAIcon {...DEFAULT_KEY_ICON_PROPS} />,
|
|
95
|
-
mathliveValue: '𝐴',
|
|
96
|
-
katexValue: 'A',
|
|
97
|
-
},
|
|
98
|
-
B: {
|
|
99
|
-
icon: <LetterBIcon {...DEFAULT_KEY_ICON_PROPS} />,
|
|
100
|
-
mathliveValue: '𝐵',
|
|
101
|
-
katexValue: 'B',
|
|
102
|
-
},
|
|
103
|
-
C: {
|
|
104
|
-
icon: <LetterCIcon {...DEFAULT_KEY_ICON_PROPS} />,
|
|
105
|
-
mathliveValue: '𝐶',
|
|
106
|
-
katexValue: 'C',
|
|
107
|
-
},
|
|
108
48
|
} as const
|
|
@@ -7,19 +7,19 @@ import { DEFAULT_KEY_ICON_PROPS } from '../keyboard.constants'
|
|
|
7
7
|
|
|
8
8
|
export const MATH_TEXT_SYMBOLS: MathOperatorsGroup = {
|
|
9
9
|
A: {
|
|
10
|
-
label: '
|
|
11
|
-
mathliveValue: '
|
|
12
|
-
katexValue: '
|
|
10
|
+
label: 'a',
|
|
11
|
+
mathliveValue: 'a',
|
|
12
|
+
katexValue: 'a',
|
|
13
13
|
},
|
|
14
14
|
B: {
|
|
15
|
-
label: '
|
|
16
|
-
mathliveValue: '
|
|
17
|
-
katexValue: '
|
|
15
|
+
label: 'b',
|
|
16
|
+
mathliveValue: 'b',
|
|
17
|
+
katexValue: 'b',
|
|
18
18
|
},
|
|
19
19
|
C: {
|
|
20
|
-
label: '
|
|
21
|
-
mathliveValue: '
|
|
22
|
-
katexValue: '
|
|
20
|
+
label: 'c',
|
|
21
|
+
mathliveValue: 'c',
|
|
22
|
+
katexValue: 'c',
|
|
23
23
|
},
|
|
24
24
|
F: {
|
|
25
25
|
label: 'f',
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
export const VOICE_RECORDER_CONTAINER_SIZES = {
|
|
2
|
-
COLLAPSED:
|
|
3
|
-
|
|
2
|
+
COLLAPSED: {
|
|
3
|
+
default: 61,
|
|
4
|
+
advanced: 52,
|
|
5
|
+
},
|
|
6
|
+
EXPANDED: {
|
|
7
|
+
default: 152,
|
|
8
|
+
advanced: 136,
|
|
9
|
+
},
|
|
4
10
|
}
|
|
5
11
|
export const VOICE_RECORDER_MAX_DURATION_MS = 60000 // 1 minute
|
|
6
12
|
export const VOICE_RECORDER_MIN_DURATION_MS = 300
|
|
@@ -13,3 +19,8 @@ export const DROPDOWN_MAX_CONTENT_HEIGHT = 330
|
|
|
13
19
|
export const TRANSCRIPT_RETRY_INTERVAL_MS = 4000
|
|
14
20
|
export const TRANSCRIPT_MAX_RETRIES = 15
|
|
15
21
|
export const NO_AUDIO_BE_MESSAGE = 'No audio'
|
|
22
|
+
|
|
23
|
+
export const VOICE_RECORD_SHAWODS = {
|
|
24
|
+
default: '0 1px 3px 0 rgba(51, 51, 51, 0.10), 0 0 1px 0 rgba(51, 51, 51, 0.40)',
|
|
25
|
+
advanced: '0 0 1px 0 rgba(51, 51, 51, 0.20), 0 3px 10px 0 rgba(51, 51, 51, 0.16)',
|
|
26
|
+
}
|
|
@@ -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
|
|
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
|
|
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={
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
31
|
-
|
|
32
|
-
|
|
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 (
|
|
47
|
+
if (hasInputs) return
|
|
42
48
|
e.preventDefault()
|
|
43
49
|
model.notification.warning(t('voice.noMicrophoneFound'))
|
|
44
50
|
}}
|
|
45
|
-
pointerEvents={!
|
|
51
|
+
pointerEvents={!hasInputs || isInitializing ? 'box-only' : 'auto'}
|
|
52
|
+
style={[isButtonDisabled ? styles.disabledCursor : undefined]}
|
|
46
53
|
>
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
)
|
|
58
|
-
|
|
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
|
+
})
|
|
@@ -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 = (
|
|
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) => ({
|
|
@@ -2,13 +2,11 @@ import React from 'react'
|
|
|
2
2
|
import { IconProps } from './icon.types'
|
|
3
3
|
import Svg, { Path } from 'react-native-svg'
|
|
4
4
|
|
|
5
|
-
const ASPECT_RATIO = 20 / 18
|
|
6
|
-
|
|
7
5
|
export const AngleIcon = ({ size = 20, color }: IconProps) => {
|
|
8
6
|
return (
|
|
9
|
-
<Svg width={size} height={size
|
|
7
|
+
<Svg width={size} height={size} viewBox="0 0 16 16" fill="none">
|
|
10
8
|
<Path
|
|
11
|
-
d="
|
|
9
|
+
d="M8.94912 6.74144C9.20676 6.46187 9.63941 6.41761 9.9501 6.65062C10.2606 6.88377 10.3389 7.31141 10.1425 7.63695L10.0995 7.70043L6.49991 12.5002H10.9999C11.4141 12.5002 11.7499 12.836 11.7499 13.2502C11.7499 13.6644 11.4141 14.0002 10.9999 14.0002H4.99991C4.71583 14.0002 4.45605 13.8393 4.32901 13.5852C4.20219 13.3312 4.22994 13.0272 4.4003 12.8L8.9003 6.80004L8.94912 6.74144Z"
|
|
12
10
|
fill={color}
|
|
13
11
|
/>
|
|
14
12
|
</Svg>
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { IconProps } from './icon.types'
|
|
3
|
-
import Svg, { Path
|
|
3
|
+
import Svg, { Path } from 'react-native-svg'
|
|
4
4
|
|
|
5
|
-
const ASPECT_RATIO =
|
|
5
|
+
const ASPECT_RATIO = 20 / 21
|
|
6
6
|
|
|
7
7
|
export const BidirectionalSegmentIcon = ({ size = 20, color }: IconProps) => {
|
|
8
8
|
return (
|
|
9
|
-
<Svg width={size} height={size
|
|
9
|
+
<Svg width={size * ASPECT_RATIO} height={size} viewBox="0 0 20 21" fill="none">
|
|
10
10
|
<Path
|
|
11
|
-
d="M16.
|
|
11
|
+
d="M16.6464 0.146692C16.8173 -0.0241721 17.0813 -0.0459256 17.2754 0.0822385L17.3535 0.146692L19.3535 2.14669L19.4179 2.22482C19.5461 2.4189 19.5243 2.68286 19.3535 2.85372L17.3535 4.85372C17.1582 5.04899 16.8417 5.04899 16.6464 4.85372C16.4512 4.65846 16.4512 4.34195 16.6464 4.14669L17.7929 3.00021H2.20699L3.35348 4.14669L3.41793 4.22482C3.5461 4.4189 3.52434 4.68286 3.35348 4.85372C3.18261 5.02459 2.91865 5.04634 2.72457 4.91818L2.64645 4.85372L0.646447 2.85372C0.451184 2.65846 0.451184 2.34195 0.646447 2.14669L2.64645 0.146692L2.72457 0.0822385C2.91865 -0.0459256 3.18261 -0.0241721 3.35348 0.146692C3.52434 0.317555 3.5461 0.581519 3.41793 0.775598L3.35348 0.853723L2.20699 2.00021H17.7929L16.6464 0.853723L16.582 0.775598C16.4538 0.581519 16.4756 0.317555 16.6464 0.146692Z"
|
|
12
|
+
fill={color}
|
|
13
|
+
/>
|
|
14
|
+
<Path
|
|
15
|
+
d="M8.07948 17L7.70148 14.55H3.52948L2.01748 17H0.407484L6.55348 7.2H7.91149L9.52148 17H8.07948ZM4.32748 13.22H7.51948L6.87548 9.09L4.32748 13.22ZM16.4822 7.2C18.0922 7.2 18.8762 8.236 18.8762 9.342C18.8762 10.434 18.1762 11.54 16.8322 11.82C17.9662 12.128 18.4842 12.996 18.4842 13.906C18.4842 15.432 17.1402 17 14.8162 17H11.0502L13.3182 7.2H16.4822ZM12.7582 15.698H14.9842C16.3842 15.698 17.0562 14.788 17.0562 13.906C17.0562 13.164 16.4822 12.506 15.4042 12.506H13.5002L12.7582 15.698ZM13.7522 11.358H15.5722C16.7762 11.358 17.4482 10.49 17.4482 9.692C17.4482 8.95 16.9862 8.502 16.0202 8.502H14.4102L13.7522 11.358Z"
|
|
12
16
|
fill={color}
|
|
13
17
|
/>
|
|
14
|
-
<Rect x="4.8801" y="8.87988" width="9.24" height="9.24" rx="1.548" stroke="#B3B3BC" />
|
|
15
18
|
</Svg>
|
|
16
19
|
)
|
|
17
20
|
}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { IconProps } from './icon.types'
|
|
3
|
-
import Svg, { Path
|
|
4
|
-
|
|
5
|
-
const ASPECT_RATIO = 19 / 20
|
|
3
|
+
import Svg, { Path } from 'react-native-svg'
|
|
6
4
|
|
|
7
5
|
export const LineSegmentIcon = ({ size = 20, color }: IconProps) => {
|
|
8
6
|
return (
|
|
9
|
-
<Svg width={size} height={size
|
|
7
|
+
<Svg width={size} height={size} viewBox="0 0 20 20" fill="none">
|
|
8
|
+
<Path
|
|
9
|
+
d="M19 1C19.2761 1 19.5 1.22386 19.5 1.5C19.5 1.77614 19.2761 2 19 2H1C0.723858 2 0.5 1.77614 0.5 1.5C0.5 1.22386 0.723858 1 1 1H19Z"
|
|
10
|
+
fill={color}
|
|
11
|
+
/>
|
|
10
12
|
<Path
|
|
11
|
-
d="
|
|
13
|
+
d="M8.07948 16L7.70148 13.55H3.52948L2.01748 16H0.407484L6.55348 6.2H7.91149L9.52148 16H8.07948ZM4.32748 12.22H7.51948L6.87548 8.09L4.32748 12.22ZM16.4822 6.2C18.0922 6.2 18.8762 7.236 18.8762 8.342C18.8762 9.434 18.1762 10.54 16.8322 10.82C17.9662 11.128 18.4842 11.996 18.4842 12.906C18.4842 14.432 17.1402 16 14.8162 16H11.0502L13.3182 6.2H16.4822ZM12.7582 14.698H14.9842C16.3842 14.698 17.0562 13.788 17.0562 12.906C17.0562 12.164 16.4822 11.506 15.4042 11.506H13.5002L12.7582 14.698ZM13.7522 10.358H15.5722C16.7762 10.358 17.4482 9.49 17.4482 8.692C17.4482 7.95 16.9862 7.502 16.0202 7.502H14.4102L13.7522 10.358Z"
|
|
12
14
|
fill={color}
|
|
13
15
|
/>
|
|
14
|
-
<Rect x="4.88" y="8.87988" width="9.24" height="9.24" rx="1.548" stroke="#B3B3BC" />
|
|
15
16
|
</Svg>
|
|
16
17
|
)
|
|
17
18
|
}
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { IconProps } from './icon.types'
|
|
3
|
-
import Svg, { Path
|
|
3
|
+
import Svg, { Path } from 'react-native-svg'
|
|
4
4
|
|
|
5
|
-
const ASPECT_RATIO =
|
|
5
|
+
const ASPECT_RATIO = 20 / 21
|
|
6
6
|
|
|
7
7
|
export const RightDirectedSegmentIcon = ({ size = 20, color }: IconProps) => {
|
|
8
8
|
return (
|
|
9
|
-
<Svg width={size} height={size
|
|
9
|
+
<Svg width={size * ASPECT_RATIO} height={size} viewBox="0 0 20 21" fill="none">
|
|
10
10
|
<Path
|
|
11
|
-
d="M16.
|
|
11
|
+
d="M16.6465 0.146692C16.8173 -0.0241721 17.0813 -0.0459256 17.2754 0.0822385L17.3535 0.146692L19.3535 2.14669L19.418 2.22482C19.5461 2.4189 19.5244 2.68286 19.3535 2.85372L17.3535 4.85372C17.1583 5.04899 16.8417 5.04899 16.6465 4.85372C16.4512 4.65846 16.4512 4.34195 16.6465 4.14669L17.793 3.00021H1C0.723858 3.00021 0.5 2.77635 0.5 2.50021C0.5 2.22406 0.723858 2.00021 1 2.00021H17.793L16.6465 0.853723L16.582 0.775598C16.4539 0.581519 16.4756 0.317555 16.6465 0.146692Z"
|
|
12
|
+
fill={color}
|
|
13
|
+
/>
|
|
14
|
+
<Path
|
|
15
|
+
d="M8.07948 17L7.70148 14.55H3.52948L2.01748 17H0.407484L6.55348 7.2H7.91149L9.52148 17H8.07948ZM4.32748 13.22H7.51948L6.87548 9.09L4.32748 13.22ZM16.4822 7.2C18.0922 7.2 18.8762 8.236 18.8762 9.342C18.8762 10.434 18.1762 11.54 16.8322 11.82C17.9662 12.128 18.4842 12.996 18.4842 13.906C18.4842 15.432 17.1402 17 14.8162 17H11.0502L13.3182 7.2H16.4822ZM12.7582 15.698H14.9842C16.3842 15.698 17.0562 14.788 17.0562 13.906C17.0562 13.164 16.4822 12.506 15.4042 12.506H13.5002L12.7582 15.698ZM13.7522 11.358H15.5722C16.7762 11.358 17.4482 10.49 17.4482 9.692C17.4482 8.95 16.9862 8.502 16.0202 8.502H14.4102L13.7522 11.358Z"
|
|
12
16
|
fill={color}
|
|
13
17
|
/>
|
|
14
|
-
<Rect x="4.8801" y="8.87988" width="9.24" height="9.24" rx="1.548" stroke="#B3B3BC" />
|
|
15
18
|
</Svg>
|
|
16
19
|
)
|
|
17
20
|
}
|
|
@@ -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
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
|
-
}
|