@magmamath/students-features 1.3.4-rc.1 → 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.
- package/dist/commonjs/features/keyboard/components/AlgebraLayout/AlgebraLayout.js +20 -72
- package/dist/commonjs/features/keyboard/components/AlgebraLayout/AlgebraLayout.js.map +1 -1
- package/dist/commonjs/features/keyboard/components/GeometryLayout/GeometryLayout.js +33 -0
- package/dist/commonjs/features/keyboard/components/GeometryLayout/GeometryLayout.js.map +1 -0
- package/dist/commonjs/features/keyboard/components/SwitchableLayout/SwitchableLayout.js +94 -0
- package/dist/commonjs/features/keyboard/components/SwitchableLayout/SwitchableLayout.js.map +1 -0
- package/dist/commonjs/features/keyboard/components/SwitchableLayout/helpers.js +25 -0
- package/dist/commonjs/features/keyboard/components/SwitchableLayout/helpers.js.map +1 -0
- package/dist/commonjs/features/keyboard/components/{AlgebraLayout → SwitchableLayout}/types.js +1 -1
- package/dist/commonjs/features/keyboard/components/SwitchableLayout/types.js.map +1 -0
- package/dist/commonjs/features/keyboard/constants/groups/geometry.constants.js +11 -0
- package/dist/commonjs/features/keyboard/constants/groups/geometry.constants.js.map +1 -0
- package/dist/commonjs/features/keyboard/constants/groups/index.js +11 -0
- package/dist/commonjs/features/keyboard/constants/groups/index.js.map +1 -1
- package/dist/commonjs/features/keyboard/constants/keyboard.constants.js +6 -1
- package/dist/commonjs/features/keyboard/constants/keyboard.constants.js.map +1 -1
- package/dist/commonjs/features/keyboard/constants/keyboard.helpers.js +2 -0
- package/dist/commonjs/features/keyboard/constants/keyboard.helpers.js.map +1 -1
- package/dist/commonjs/features/keyboard/constants/keyboardLayouts.js +18 -8
- package/dist/commonjs/features/keyboard/constants/keyboardLayouts.js.map +1 -1
- package/dist/commonjs/features/keyboard/constants/keys/geometry.constants.js +86 -1
- 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 +2 -1
- package/dist/commonjs/features/keyboard/constants/keys/units.constants.js.map +1 -1
- package/dist/commonjs/features/keyboard/types/types.js +1 -0
- package/dist/commonjs/features/keyboard/types/types.js.map +1 -1
- package/dist/commonjs/shared/icons/GeometryIcon.js +32 -0
- package/dist/commonjs/shared/icons/GeometryIcon.js.map +1 -0
- package/dist/commonjs/shared/icons/keyboard/AngleIcon.js +4 -3
- package/dist/commonjs/shared/icons/keyboard/AngleIcon.js.map +1 -1
- package/dist/commonjs/shared/icons/keyboard/BidirectionalSegmentIcon.js +12 -8
- package/dist/commonjs/shared/icons/keyboard/BidirectionalSegmentIcon.js.map +1 -1
- package/dist/commonjs/shared/icons/keyboard/ImpliesIcon.js +30 -0
- package/dist/commonjs/shared/icons/keyboard/ImpliesIcon.js.map +1 -0
- package/dist/commonjs/shared/icons/keyboard/LetterAIcon.js +29 -0
- package/dist/commonjs/shared/icons/keyboard/LetterAIcon.js.map +1 -0
- package/dist/commonjs/shared/icons/keyboard/LetterBIcon.js +29 -0
- package/dist/commonjs/shared/icons/keyboard/LetterBIcon.js.map +1 -0
- package/dist/commonjs/shared/icons/keyboard/LetterCIcon.js +29 -0
- package/dist/commonjs/shared/icons/keyboard/LetterCIcon.js.map +1 -0
- package/dist/commonjs/shared/icons/keyboard/LineSegmentIcon.js +11 -6
- package/dist/commonjs/shared/icons/keyboard/LineSegmentIcon.js.map +1 -1
- package/dist/commonjs/shared/icons/keyboard/RightDirectedSegmentIcon.js +12 -8
- package/dist/commonjs/shared/icons/keyboard/RightDirectedSegmentIcon.js.map +1 -1
- package/dist/commonjs/shared/icons/keyboard/ThereforeIcon.js +42 -0
- package/dist/commonjs/shared/icons/keyboard/ThereforeIcon.js.map +1 -0
- package/dist/commonjs/shared/icons/keyboard/TriangleIcon.js +32 -0
- package/dist/commonjs/shared/icons/keyboard/TriangleIcon.js.map +1 -0
- package/dist/module/features/keyboard/components/AlgebraLayout/AlgebraLayout.js +21 -72
- package/dist/module/features/keyboard/components/AlgebraLayout/AlgebraLayout.js.map +1 -1
- package/dist/module/features/keyboard/components/GeometryLayout/GeometryLayout.js +27 -0
- package/dist/module/features/keyboard/components/GeometryLayout/GeometryLayout.js.map +1 -0
- package/dist/module/features/keyboard/components/SwitchableLayout/SwitchableLayout.js +87 -0
- package/dist/module/features/keyboard/components/SwitchableLayout/SwitchableLayout.js.map +1 -0
- package/dist/module/features/keyboard/components/SwitchableLayout/helpers.js +21 -0
- package/dist/module/features/keyboard/components/SwitchableLayout/helpers.js.map +1 -0
- package/dist/module/features/keyboard/components/{AlgebraLayout → SwitchableLayout}/types.js +1 -1
- package/dist/module/features/keyboard/components/SwitchableLayout/types.js.map +1 -0
- package/dist/module/features/keyboard/constants/groups/geometry.constants.js +7 -0
- package/dist/module/features/keyboard/constants/groups/geometry.constants.js.map +1 -0
- package/dist/module/features/keyboard/constants/groups/index.js +1 -0
- package/dist/module/features/keyboard/constants/groups/index.js.map +1 -1
- package/dist/module/features/keyboard/constants/keyboard.constants.js +5 -0
- package/dist/module/features/keyboard/constants/keyboard.constants.js.map +1 -1
- package/dist/module/features/keyboard/constants/keyboard.helpers.js +3 -1
- package/dist/module/features/keyboard/constants/keyboard.helpers.js.map +1 -1
- package/dist/module/features/keyboard/constants/keyboardLayouts.js +19 -9
- package/dist/module/features/keyboard/constants/keyboardLayouts.js.map +1 -1
- package/dist/module/features/keyboard/constants/keys/geometry.constants.js +86 -1
- 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 +2 -1
- package/dist/module/features/keyboard/constants/keys/units.constants.js.map +1 -1
- package/dist/module/features/keyboard/types/types.js +1 -0
- package/dist/module/features/keyboard/types/types.js.map +1 -1
- package/dist/module/shared/icons/GeometryIcon.js +24 -0
- package/dist/module/shared/icons/GeometryIcon.js.map +1 -0
- package/dist/module/shared/icons/keyboard/AngleIcon.js +4 -3
- package/dist/module/shared/icons/keyboard/AngleIcon.js.map +1 -1
- package/dist/module/shared/icons/keyboard/BidirectionalSegmentIcon.js +13 -9
- package/dist/module/shared/icons/keyboard/BidirectionalSegmentIcon.js.map +1 -1
- package/dist/module/shared/icons/keyboard/ImpliesIcon.js +22 -0
- package/dist/module/shared/icons/keyboard/ImpliesIcon.js.map +1 -0
- package/dist/module/shared/icons/keyboard/LetterAIcon.js +21 -0
- package/dist/module/shared/icons/keyboard/LetterAIcon.js.map +1 -0
- package/dist/module/shared/icons/keyboard/LetterBIcon.js +21 -0
- package/dist/module/shared/icons/keyboard/LetterBIcon.js.map +1 -0
- package/dist/module/shared/icons/keyboard/LetterCIcon.js +21 -0
- package/dist/module/shared/icons/keyboard/LetterCIcon.js.map +1 -0
- package/dist/module/shared/icons/keyboard/LineSegmentIcon.js +12 -7
- package/dist/module/shared/icons/keyboard/LineSegmentIcon.js.map +1 -1
- package/dist/module/shared/icons/keyboard/RightDirectedSegmentIcon.js +13 -9
- package/dist/module/shared/icons/keyboard/RightDirectedSegmentIcon.js.map +1 -1
- package/dist/module/shared/icons/keyboard/ThereforeIcon.js +34 -0
- package/dist/module/shared/icons/keyboard/ThereforeIcon.js.map +1 -0
- package/dist/module/shared/icons/keyboard/TriangleIcon.js +24 -0
- package/dist/module/shared/icons/keyboard/TriangleIcon.js.map +1 -0
- 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/GeometryLayout/GeometryLayout.d.ts +4 -0
- package/dist/typescript/commonjs/features/keyboard/components/GeometryLayout/GeometryLayout.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/keyboard/components/SwitchableLayout/SwitchableLayout.d.ts +4 -0
- package/dist/typescript/commonjs/features/keyboard/components/SwitchableLayout/SwitchableLayout.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/keyboard/components/SwitchableLayout/helpers.d.ts +12 -0
- package/dist/typescript/commonjs/features/keyboard/components/SwitchableLayout/helpers.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/keyboard/components/SwitchableLayout/types.d.ts +21 -0
- package/dist/typescript/commonjs/features/keyboard/components/SwitchableLayout/types.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/keyboard/constants/groups/geometry.constants.d.ts +3 -0
- package/dist/typescript/commonjs/features/keyboard/constants/groups/geometry.constants.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/keyboard/constants/groups/index.d.ts +1 -0
- 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 +5 -0
- 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 +13 -4
- 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 +1 -0
- package/dist/typescript/commonjs/features/keyboard/types/types.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/icons/GeometryIcon.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/GeometryIcon.d.ts.map +1 -0
- 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/ImpliesIcon.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/keyboard/ImpliesIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/keyboard/LetterAIcon.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/keyboard/LetterAIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/keyboard/LetterBIcon.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/keyboard/LetterBIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/keyboard/LetterCIcon.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/keyboard/LetterCIcon.d.ts.map +1 -0
- 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/commonjs/shared/icons/keyboard/ThereforeIcon.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/keyboard/ThereforeIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/keyboard/TriangleIcon.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/keyboard/TriangleIcon.d.ts.map +1 -0
- 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/GeometryLayout/GeometryLayout.d.ts +4 -0
- package/dist/typescript/module/features/keyboard/components/GeometryLayout/GeometryLayout.d.ts.map +1 -0
- package/dist/typescript/module/features/keyboard/components/SwitchableLayout/SwitchableLayout.d.ts +4 -0
- package/dist/typescript/module/features/keyboard/components/SwitchableLayout/SwitchableLayout.d.ts.map +1 -0
- package/dist/typescript/module/features/keyboard/components/SwitchableLayout/helpers.d.ts +12 -0
- package/dist/typescript/module/features/keyboard/components/SwitchableLayout/helpers.d.ts.map +1 -0
- package/dist/typescript/module/features/keyboard/components/SwitchableLayout/types.d.ts +21 -0
- package/dist/typescript/module/features/keyboard/components/SwitchableLayout/types.d.ts.map +1 -0
- package/dist/typescript/module/features/keyboard/constants/groups/geometry.constants.d.ts +3 -0
- package/dist/typescript/module/features/keyboard/constants/groups/geometry.constants.d.ts.map +1 -0
- package/dist/typescript/module/features/keyboard/constants/groups/index.d.ts +1 -0
- 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 +5 -0
- 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 +13 -4
- 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 +1 -0
- package/dist/typescript/module/features/keyboard/types/types.d.ts.map +1 -1
- package/dist/typescript/module/shared/icons/GeometryIcon.d.ts +4 -0
- package/dist/typescript/module/shared/icons/GeometryIcon.d.ts.map +1 -0
- 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/ImpliesIcon.d.ts +4 -0
- package/dist/typescript/module/shared/icons/keyboard/ImpliesIcon.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/keyboard/LetterAIcon.d.ts +4 -0
- package/dist/typescript/module/shared/icons/keyboard/LetterAIcon.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/keyboard/LetterBIcon.d.ts +4 -0
- package/dist/typescript/module/shared/icons/keyboard/LetterBIcon.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/keyboard/LetterCIcon.d.ts +4 -0
- package/dist/typescript/module/shared/icons/keyboard/LetterCIcon.d.ts.map +1 -0
- 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/dist/typescript/module/shared/icons/keyboard/ThereforeIcon.d.ts +4 -0
- package/dist/typescript/module/shared/icons/keyboard/ThereforeIcon.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/keyboard/TriangleIcon.d.ts +4 -0
- package/dist/typescript/module/shared/icons/keyboard/TriangleIcon.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/features/keyboard/components/AlgebraLayout/AlgebraLayout.tsx +17 -73
- package/src/features/keyboard/components/GeometryLayout/GeometryLayout.tsx +21 -0
- package/src/features/keyboard/components/SwitchableLayout/SwitchableLayout.tsx +100 -0
- package/src/features/keyboard/components/SwitchableLayout/helpers.tsx +31 -0
- package/src/features/keyboard/components/SwitchableLayout/types.ts +24 -0
- package/src/features/keyboard/constants/groups/geometry.constants.ts +25 -0
- package/src/features/keyboard/constants/groups/index.ts +1 -0
- package/src/features/keyboard/constants/keyboard.constants.ts +6 -0
- package/src/features/keyboard/constants/keyboard.helpers.ts +3 -0
- package/src/features/keyboard/constants/keyboardLayouts.ts +15 -5
- package/src/features/keyboard/constants/keys/geometry.constants.tsx +61 -1
- package/src/features/keyboard/constants/keys/text.constants.tsx +9 -9
- package/src/features/keyboard/constants/keys/units.constants.tsx +1 -0
- package/src/features/keyboard/types/types.ts +1 -0
- package/src/shared/icons/GeometryIcon.tsx +18 -0
- package/src/shared/icons/keyboard/AngleIcon.tsx +4 -2
- package/src/shared/icons/keyboard/BidirectionalSegmentIcon.tsx +5 -8
- package/src/shared/icons/keyboard/ImpliesIcon.tsx +16 -0
- package/src/shared/icons/keyboard/LetterAIcon.tsx +14 -0
- package/src/shared/icons/keyboard/LetterBIcon.tsx +14 -0
- package/src/shared/icons/keyboard/LetterCIcon.tsx +14 -0
- package/src/shared/icons/keyboard/LineSegmentIcon.tsx +6 -7
- package/src/shared/icons/keyboard/RightDirectedSegmentIcon.tsx +5 -8
- package/src/shared/icons/keyboard/ThereforeIcon.tsx +15 -0
- package/src/shared/icons/keyboard/TriangleIcon.tsx +18 -0
- package/dist/commonjs/features/keyboard/components/AlgebraLayout/helpers.js +0 -41
- package/dist/commonjs/features/keyboard/components/AlgebraLayout/helpers.js.map +0 -1
- package/dist/commonjs/features/keyboard/components/AlgebraLayout/types.js.map +0 -1
- package/dist/module/features/keyboard/components/AlgebraLayout/helpers.js +0 -36
- package/dist/module/features/keyboard/components/AlgebraLayout/helpers.js.map +0 -1
- package/dist/module/features/keyboard/components/AlgebraLayout/types.js.map +0 -1
- package/dist/typescript/commonjs/features/keyboard/components/AlgebraLayout/helpers.d.ts +0 -15
- package/dist/typescript/commonjs/features/keyboard/components/AlgebraLayout/helpers.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/keyboard/components/AlgebraLayout/types.d.ts +0 -5
- package/dist/typescript/commonjs/features/keyboard/components/AlgebraLayout/types.d.ts.map +0 -1
- package/dist/typescript/module/features/keyboard/components/AlgebraLayout/helpers.d.ts +0 -15
- package/dist/typescript/module/features/keyboard/components/AlgebraLayout/helpers.d.ts.map +0 -1
- package/dist/typescript/module/features/keyboard/components/AlgebraLayout/types.d.ts +0 -5
- package/dist/typescript/module/features/keyboard/components/AlgebraLayout/types.d.ts.map +0 -1
- package/src/features/keyboard/components/AlgebraLayout/helpers.tsx +0 -52
- package/src/features/keyboard/components/AlgebraLayout/types.ts +0 -4
|
@@ -1,35 +1,44 @@
|
|
|
1
1
|
import { MyScriptMathCharacterTypes } from '../../../types/characterTypes';
|
|
2
2
|
export declare const KEYBOARD_LAYOUTS: {
|
|
3
3
|
AlgebraAdvanced: {
|
|
4
|
-
Component: (
|
|
4
|
+
Component: (props: import("../types/types").KeyboardLayoutProps) => import("react").JSX.Element;
|
|
5
5
|
characterTypes: MyScriptMathCharacterTypes[];
|
|
6
|
-
mobileBreakpoint:
|
|
6
|
+
mobileBreakpoint: 1300;
|
|
7
7
|
};
|
|
8
8
|
Basic: {
|
|
9
9
|
Component: ({ keys, ...props }: import("../types/types").KeyboardLayoutProps & import("react").PropsWithChildren) => import("react").JSX.Element | null;
|
|
10
10
|
characterTypes: MyScriptMathCharacterTypes[];
|
|
11
|
-
mobileBreakpoint:
|
|
11
|
+
mobileBreakpoint: 990;
|
|
12
12
|
};
|
|
13
13
|
BasicPlus: {
|
|
14
14
|
Component: ({ keys, ...props }: import("../types/types").KeyboardLayoutProps) => import("react").JSX.Element;
|
|
15
15
|
characterTypes: MyScriptMathCharacterTypes[];
|
|
16
|
+
mobileBreakpoint: number;
|
|
16
17
|
};
|
|
17
18
|
BasicTime: {
|
|
18
19
|
Component: ({ keys, ...props }: import("../types/types").KeyboardLayoutProps) => import("react").JSX.Element;
|
|
19
20
|
characterTypes: MyScriptMathCharacterTypes[];
|
|
21
|
+
mobileBreakpoint: number;
|
|
20
22
|
};
|
|
21
23
|
BasicCurrency: {
|
|
22
24
|
Component: ({ keys, ...props }: import("../types/types").KeyboardLayoutProps) => import("react").JSX.Element;
|
|
23
25
|
characterTypes: MyScriptMathCharacterTypes[];
|
|
26
|
+
mobileBreakpoint: number;
|
|
24
27
|
};
|
|
25
28
|
BasicUnits: {
|
|
26
29
|
Component: ({ onLayoutChange, keys, ...props }: import("../types/types").KeyboardLayoutProps) => import("react").JSX.Element;
|
|
27
30
|
characterTypes: MyScriptMathCharacterTypes[];
|
|
31
|
+
mobileBreakpoint: number;
|
|
28
32
|
};
|
|
29
33
|
BasicPlusPlus: {
|
|
30
34
|
Component: ({ keys, ...props }: import("../types/types").KeyboardLayoutProps) => import("react").JSX.Element;
|
|
31
35
|
characterTypes: MyScriptMathCharacterTypes[];
|
|
32
|
-
mobileBreakpoint:
|
|
36
|
+
mobileBreakpoint: 1220;
|
|
37
|
+
};
|
|
38
|
+
Geometry: {
|
|
39
|
+
Component: (props: import("../types/types").KeyboardLayoutProps) => import("react").JSX.Element;
|
|
40
|
+
characterTypes: MyScriptMathCharacterTypes[];
|
|
41
|
+
mobileBreakpoint: 1300;
|
|
33
42
|
};
|
|
34
43
|
};
|
|
35
44
|
export declare function getLayoutByCharType(charType?: number): ({ keys, ...props }: import("../types/types").KeyboardLayoutProps & import("react").PropsWithChildren) => import("react").JSX.Element | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyboardLayouts.d.ts","sourceRoot":"","sources":["../../../../../../src/features/keyboard/constants/keyboardLayouts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"keyboardLayouts.d.ts","sourceRoot":"","sources":["../../../../../../src/features/keyboard/constants/keyboardLayouts.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAA;AAI1E,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAkDH,0BAA0B,EAAE;;;;;;;;CAWrD,CAAA;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,CAAC,EAAE,MAAM,gJAWpD;AAED,wBAAgB,6BAA6B,CAAC,QAAQ,CAAC,EAAE,MAAM,UAW9D;AAED,wBAAgB,qBAAqB,CAAC,QAAQ,CAAC,EAAE,MAAM,WAStD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geometry.constants.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/keyboard/constants/keys/geometry.constants.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"geometry.constants.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/keyboard/constants/keys/geometry.constants.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAgBtD,eAAO,MAAM,qBAAqB,EAAE,kBAyF1B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"units.constants.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/keyboard/constants/keys/units.constants.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAStD,eAAO,MAAM,mBAAmB,EAAE,kBAqCxB,CAAA;AAEV,eAAO,MAAM,iBAAiB,EAAE,kBA0EtB,CAAA;AAEV,eAAO,MAAM,eAAe,EAAE,kBAsEpB,CAAA;AAEV,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmIpB,CAAA;AAEV,eAAO,MAAM,iBAAiB,EAAE,kBA6DtB,CAAA;AAEV,eAAO,MAAM,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"units.constants.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/keyboard/constants/keys/units.constants.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAStD,eAAO,MAAM,mBAAmB,EAAE,kBAqCxB,CAAA;AAEV,eAAO,MAAM,iBAAiB,EAAE,kBA0EtB,CAAA;AAEV,eAAO,MAAM,eAAe,EAAE,kBAsEpB,CAAA;AAEV,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAC,EAAE,iBAAiB,CAAA;IACzB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,YAAY,CAAC,EAAE,WAAW,EAAE,CAAA;CAC7B,CAAA"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/keyboard/types/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAEpD,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,aAAa,EAAE,MAAM,CAAA;IACrB,UAAU,EAAE,MAAM,CAAA;IAClB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAC5B,CAAA;AAED,oBAAY,YAAY;IACtB,eAAe,oBAAoB;IACnC,KAAK,UAAU;IACf,SAAS,cAAc;IACvB,eAAe,oBAAoB;IACnC,SAAS,cAAc;IACvB,aAAa,kBAAkB;IAC/B,UAAU,eAAe;IACzB,aAAa,kBAAkB;IAC/B,mBAAmB,wBAAwB;IAC3C,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,UAAU,eAAe;CAC1B;AAED,oBAAY,sBAAsB;IAChC,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,IAAI,SAAS;CACd;AAED,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;AAE5D,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,WAAW,EAAE,CA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,MAAM,uBAAuB,CAAA;AAGjD,eAAO,MAAM,YAAY,oBAA0B,SAAS,sBAa3D,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AngleIcon.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/icons/keyboard/AngleIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"AngleIcon.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/icons/keyboard/AngleIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAKxC,eAAO,MAAM,SAAS,oBAA0B,SAAS,sBASxD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BidirectionalSegmentIcon.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/icons/keyboard/BidirectionalSegmentIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAKxC,eAAO,MAAM,wBAAwB,oBAA0B,SAAS,
|
|
1
|
+
{"version":3,"file":"BidirectionalSegmentIcon.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/icons/keyboard/BidirectionalSegmentIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAKxC,eAAO,MAAM,wBAAwB,oBAA0B,SAAS,sBAUvE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImpliesIcon.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/icons/keyboard/ImpliesIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAKxC,eAAO,MAAM,WAAW,oBAA0B,SAAS,sBAS1D,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LetterAIcon.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/icons/keyboard/LetterAIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAGxC,eAAO,MAAM,WAAW,oBAA0B,SAAS,sBAS1D,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LetterBIcon.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/icons/keyboard/LetterBIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAGxC,eAAO,MAAM,WAAW,oBAA0B,SAAS,sBAS1D,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LetterCIcon.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/icons/keyboard/LetterCIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAGxC,eAAO,MAAM,WAAW,oBAA0B,SAAS,sBAS1D,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LineSegmentIcon.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/icons/keyboard/LineSegmentIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"LineSegmentIcon.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/icons/keyboard/LineSegmentIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAKxC,eAAO,MAAM,eAAe,oBAA0B,SAAS,sBAU9D,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RightDirectedSegmentIcon.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/icons/keyboard/RightDirectedSegmentIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAKxC,eAAO,MAAM,wBAAwB,oBAA0B,SAAS,
|
|
1
|
+
{"version":3,"file":"RightDirectedSegmentIcon.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/icons/keyboard/RightDirectedSegmentIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAKxC,eAAO,MAAM,wBAAwB,oBAA0B,SAAS,sBAUvE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThereforeIcon.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/icons/keyboard/ThereforeIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAKxC,eAAO,MAAM,aAAa,oBAA0B,SAAS,sBAQ5D,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TriangleIcon.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/icons/keyboard/TriangleIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAKxC,eAAO,MAAM,YAAY,oBAA0B,SAAS,sBAW3D,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,77 +1,21 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import {
|
|
3
|
-
import { StyleSheet, useWindowDimensions, View } from 'react-native'
|
|
4
|
-
import { COLORS, IS_MOBILE, SelectGroup, SelectOptionSize } from '@magmamath/react-native-ui'
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { COLORS } from '@magmamath/react-native-ui'
|
|
5
3
|
import { KeyboardLayoutProps, KeyboardType } from '../../types/types'
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
4
|
+
import { AlgebraIcon } from '../../../../shared/icons/AlgebraIcon'
|
|
5
|
+
import { IntegralABIcon } from '../../../../shared/icons/IntegralABIcon'
|
|
6
|
+
import { SwitchableLayout } from '../SwitchableLayout/SwitchableLayout'
|
|
7
|
+
import { SwitchableLayoutConfig } from '../SwitchableLayout/types'
|
|
10
8
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const algebra = getMainKeyboardGroup(keys, KeyboardType.AlgebraAdvanced)
|
|
20
|
-
const basic = getMainKeyboardGroup(
|
|
21
|
-
keys,
|
|
22
|
-
isDesktop ? KeyboardType.BasicPlusPlus : KeyboardType.BasicPlusPlusMobile,
|
|
23
|
-
)
|
|
24
|
-
|
|
25
|
-
return new Map([
|
|
26
|
-
[SelectedLayout.BASIC, basic],
|
|
27
|
-
[SelectedLayout.ALGEBRA, algebra],
|
|
28
|
-
])
|
|
29
|
-
}, [isDesktop, keys])
|
|
30
|
-
|
|
31
|
-
const currentKeys = keyboardGroups.get(selectedLayout)?.keys ?? []
|
|
32
|
-
|
|
33
|
-
return (
|
|
34
|
-
<View style={styles.container}>
|
|
35
|
-
{isDesktop && (
|
|
36
|
-
<SelectGroup
|
|
37
|
-
numOfRows={2}
|
|
38
|
-
options={selectOptions}
|
|
39
|
-
size={SelectOptionSize.SMALL}
|
|
40
|
-
style={{
|
|
41
|
-
container: styles.optionContainer,
|
|
42
|
-
option: { container: styles.option },
|
|
43
|
-
}}
|
|
44
|
-
color={props.color}
|
|
45
|
-
selectedOptions={[
|
|
46
|
-
selectedLayout === SelectedLayout.BASIC ? selectOptions[0] : selectOptions[1],
|
|
47
|
-
]}
|
|
48
|
-
/>
|
|
49
|
-
)}
|
|
50
|
-
<KeysList keys={currentKeys} numOfRows={3} {...props} />
|
|
51
|
-
</View>
|
|
52
|
-
)
|
|
9
|
+
const ALGEBRA_CONFIG: SwitchableLayoutConfig = {
|
|
10
|
+
secondaryKeyboardType: KeyboardType.AlgebraAdvanced,
|
|
11
|
+
BasicIcon: (isSelected) => (
|
|
12
|
+
<AlgebraIcon color={isSelected ? COLORS.NEUTRAL_1 : COLORS.NEUTRAL_9} size={22} />
|
|
13
|
+
),
|
|
14
|
+
SecondaryIcon: (isSelected) => (
|
|
15
|
+
<IntegralABIcon color={isSelected ? COLORS.NEUTRAL_1 : COLORS.NEUTRAL_9} size={25} />
|
|
16
|
+
),
|
|
53
17
|
}
|
|
54
18
|
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
flexDirection: 'row',
|
|
59
|
-
gap: 16,
|
|
60
|
-
paddingRight: 16,
|
|
61
|
-
},
|
|
62
|
-
optionContainer: {
|
|
63
|
-
flexGrow: 0,
|
|
64
|
-
flexShrink: 0,
|
|
65
|
-
flexBasis: IS_MOBILE ? 60 : 'auto',
|
|
66
|
-
width: 'auto',
|
|
67
|
-
paddingRight: 18,
|
|
68
|
-
borderRightWidth: 1,
|
|
69
|
-
borderRightColor: COLORS.NEUTRAL_3,
|
|
70
|
-
maxWidth: 65,
|
|
71
|
-
gap: 9,
|
|
72
|
-
},
|
|
73
|
-
option: {
|
|
74
|
-
flexBasis: 45,
|
|
75
|
-
width: 44,
|
|
76
|
-
},
|
|
77
|
-
})
|
|
19
|
+
export const AlgebraLayout = (props: KeyboardLayoutProps) => {
|
|
20
|
+
return <SwitchableLayout {...props} config={ALGEBRA_CONFIG} />
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { COLORS } from '@magmamath/react-native-ui'
|
|
3
|
+
import { KeyboardLayoutProps, KeyboardType } from '../../types/types'
|
|
4
|
+
import { AlgebraIcon } from '../../../../shared/icons/AlgebraIcon'
|
|
5
|
+
import { GeometryIcon } from '../../../../shared/icons/GeometryIcon'
|
|
6
|
+
import { SwitchableLayout } from '../SwitchableLayout/SwitchableLayout'
|
|
7
|
+
import { SwitchableLayoutConfig } from '../SwitchableLayout/types'
|
|
8
|
+
|
|
9
|
+
const GEOMETRY_CONFIG: SwitchableLayoutConfig = {
|
|
10
|
+
secondaryKeyboardType: KeyboardType.Geometry,
|
|
11
|
+
BasicIcon: (isSelected) => (
|
|
12
|
+
<AlgebraIcon color={isSelected ? COLORS.NEUTRAL_1 : COLORS.NEUTRAL_9} size={22} />
|
|
13
|
+
),
|
|
14
|
+
SecondaryIcon: (isSelected) => (
|
|
15
|
+
<GeometryIcon color={isSelected ? COLORS.NEUTRAL_1 : COLORS.NEUTRAL_9} size={16} />
|
|
16
|
+
),
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const GeometryLayout = (props: KeyboardLayoutProps) => {
|
|
20
|
+
return <SwitchableLayout {...props} config={GEOMETRY_CONFIG} />
|
|
21
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import React, { useMemo, useState } from 'react'
|
|
2
|
+
import { KeysList } from '../KeysList/KeysList'
|
|
3
|
+
import { StyleSheet, useWindowDimensions, View } from 'react-native'
|
|
4
|
+
import {
|
|
5
|
+
COLORS,
|
|
6
|
+
IS_MOBILE,
|
|
7
|
+
SelectGroup,
|
|
8
|
+
SelectOptionSize,
|
|
9
|
+
SPACING,
|
|
10
|
+
} from '@magmamath/react-native-ui'
|
|
11
|
+
import { KeyboardType } from '../../types/types'
|
|
12
|
+
import { SelectedLayout, SwitchableLayoutProps } from './types'
|
|
13
|
+
import { getMainKeyboardGroup } from '../../helpers'
|
|
14
|
+
import { getSelectOptions } from './helpers'
|
|
15
|
+
import { KEYBOARD_LAYOUTS } from '../../constants/keyboardLayouts'
|
|
16
|
+
|
|
17
|
+
export const SwitchableLayout = ({
|
|
18
|
+
onLayoutChange,
|
|
19
|
+
keys,
|
|
20
|
+
config,
|
|
21
|
+
...props
|
|
22
|
+
}: SwitchableLayoutProps) => {
|
|
23
|
+
const [selectedLayout, setSelectedLayout] = useState<SelectedLayout>(SelectedLayout.BASIC)
|
|
24
|
+
const { width } = useWindowDimensions()
|
|
25
|
+
const selectOptions = getSelectOptions({
|
|
26
|
+
selectedLayout,
|
|
27
|
+
onBasicPressIn: () => {
|
|
28
|
+
setSelectedLayout(SelectedLayout.BASIC)
|
|
29
|
+
onLayoutChange?.(false)
|
|
30
|
+
},
|
|
31
|
+
onSecondaryPressIn: () => {
|
|
32
|
+
setSelectedLayout(SelectedLayout.SECONDARY)
|
|
33
|
+
onLayoutChange?.(true)
|
|
34
|
+
},
|
|
35
|
+
BasicIcon: config.BasicIcon,
|
|
36
|
+
SecondaryIcon: config.SecondaryIcon,
|
|
37
|
+
})
|
|
38
|
+
const isDesktop =
|
|
39
|
+
width > KEYBOARD_LAYOUTS[config.secondaryKeyboardType].mobileBreakpoint && !IS_MOBILE
|
|
40
|
+
|
|
41
|
+
const keyboardGroups = useMemo(() => {
|
|
42
|
+
const secondary = getMainKeyboardGroup(keys, config.secondaryKeyboardType)
|
|
43
|
+
const basic = getMainKeyboardGroup(
|
|
44
|
+
keys,
|
|
45
|
+
isDesktop ? KeyboardType.BasicPlusPlus : KeyboardType.BasicPlusPlusMobile,
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
return new Map([
|
|
49
|
+
[SelectedLayout.BASIC, basic],
|
|
50
|
+
[SelectedLayout.SECONDARY, secondary],
|
|
51
|
+
])
|
|
52
|
+
}, [isDesktop, keys, config.secondaryKeyboardType])
|
|
53
|
+
|
|
54
|
+
const currentKeys = keyboardGroups.get(selectedLayout)?.keys ?? []
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<View style={styles.container}>
|
|
58
|
+
{isDesktop && (
|
|
59
|
+
<SelectGroup
|
|
60
|
+
numOfRows={2}
|
|
61
|
+
options={selectOptions}
|
|
62
|
+
size={SelectOptionSize.SMALL}
|
|
63
|
+
style={{
|
|
64
|
+
container: styles.optionContainer,
|
|
65
|
+
option: { container: styles.option },
|
|
66
|
+
}}
|
|
67
|
+
color={props.color}
|
|
68
|
+
selectedOptions={[
|
|
69
|
+
selectedLayout === SelectedLayout.BASIC ? selectOptions[0] : selectOptions[1],
|
|
70
|
+
]}
|
|
71
|
+
/>
|
|
72
|
+
)}
|
|
73
|
+
<KeysList keys={currentKeys} numOfRows={3} {...props} />
|
|
74
|
+
</View>
|
|
75
|
+
)
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const styles = StyleSheet.create({
|
|
79
|
+
container: {
|
|
80
|
+
display: 'flex',
|
|
81
|
+
flexDirection: 'row',
|
|
82
|
+
gap: SPACING[400],
|
|
83
|
+
paddingRight: SPACING[400],
|
|
84
|
+
},
|
|
85
|
+
optionContainer: {
|
|
86
|
+
flexGrow: 0,
|
|
87
|
+
flexShrink: 0,
|
|
88
|
+
flexBasis: IS_MOBILE ? 60 : 'auto',
|
|
89
|
+
width: 'auto',
|
|
90
|
+
paddingRight: 18,
|
|
91
|
+
borderRightWidth: 1,
|
|
92
|
+
borderRightColor: COLORS.NEUTRAL_3,
|
|
93
|
+
maxWidth: 65,
|
|
94
|
+
gap: 9,
|
|
95
|
+
},
|
|
96
|
+
option: {
|
|
97
|
+
flexBasis: 45,
|
|
98
|
+
width: 44,
|
|
99
|
+
},
|
|
100
|
+
})
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ReactNode } from 'react'
|
|
2
|
+
import { SelectedLayout, LayoutOption } from './types'
|
|
3
|
+
|
|
4
|
+
type GetSelectOptionsProps = {
|
|
5
|
+
selectedLayout: SelectedLayout
|
|
6
|
+
onBasicPressIn: () => void
|
|
7
|
+
onSecondaryPressIn: () => void
|
|
8
|
+
BasicIcon: (isSelected: boolean) => ReactNode
|
|
9
|
+
SecondaryIcon: (isSelected: boolean) => ReactNode
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function getSelectOptions({
|
|
13
|
+
selectedLayout,
|
|
14
|
+
onBasicPressIn,
|
|
15
|
+
onSecondaryPressIn,
|
|
16
|
+
BasicIcon,
|
|
17
|
+
SecondaryIcon,
|
|
18
|
+
}: GetSelectOptionsProps): LayoutOption[] {
|
|
19
|
+
return [
|
|
20
|
+
{
|
|
21
|
+
key: SelectedLayout.BASIC,
|
|
22
|
+
title: BasicIcon(selectedLayout === SelectedLayout.BASIC),
|
|
23
|
+
onPressIn: onBasicPressIn,
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
key: SelectedLayout.SECONDARY,
|
|
27
|
+
title: SecondaryIcon(selectedLayout === SelectedLayout.SECONDARY),
|
|
28
|
+
onPressIn: onSecondaryPressIn,
|
|
29
|
+
},
|
|
30
|
+
]
|
|
31
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ReactNode } from 'react'
|
|
2
|
+
import { KeyboardLayoutProps } from '../../types/types'
|
|
3
|
+
import { KEYBOARD_LAYOUTS } from '../../constants/keyboardLayouts'
|
|
4
|
+
|
|
5
|
+
export enum SelectedLayout {
|
|
6
|
+
BASIC = 'basic',
|
|
7
|
+
SECONDARY = 'secondary',
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export type LayoutOption = {
|
|
11
|
+
key: SelectedLayout
|
|
12
|
+
title: ReactNode
|
|
13
|
+
onPressIn: () => void
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type SwitchableLayoutConfig = {
|
|
17
|
+
secondaryKeyboardType: keyof typeof KEYBOARD_LAYOUTS
|
|
18
|
+
BasicIcon: (isSelected: boolean) => ReactNode
|
|
19
|
+
SecondaryIcon: (isSelected: boolean) => ReactNode
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type SwitchableLayoutProps = KeyboardLayoutProps & {
|
|
23
|
+
config: SwitchableLayoutConfig
|
|
24
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {
|
|
2
|
+
MATH_BASIC_OPERATORS,
|
|
3
|
+
MATH_GEOMETRY_SYMBOLS,
|
|
4
|
+
} from '../keys'
|
|
5
|
+
import { KeyboardGroup } from '../../types/types'
|
|
6
|
+
|
|
7
|
+
export const KEYBOARD_GEOMETRY: KeyboardGroup = {
|
|
8
|
+
keys: [
|
|
9
|
+
MATH_GEOMETRY_SYMBOLS.ANGLE,
|
|
10
|
+
MATH_GEOMETRY_SYMBOLS.TRIANGLE,
|
|
11
|
+
MATH_GEOMETRY_SYMBOLS.THEREFORE,
|
|
12
|
+
MATH_GEOMETRY_SYMBOLS.IMPLIES,
|
|
13
|
+
MATH_BASIC_OPERATORS.SIMILARITY,
|
|
14
|
+
MATH_GEOMETRY_SYMBOLS.LINE_SEGMENT,
|
|
15
|
+
MATH_GEOMETRY_SYMBOLS.RIGHT_DIRECTED_SEGMENT,
|
|
16
|
+
MATH_GEOMETRY_SYMBOLS.BIDIRECTIONAL_SEGMENT,
|
|
17
|
+
MATH_GEOMETRY_SYMBOLS.PERPENDICULAR,
|
|
18
|
+
MATH_BASIC_OPERATORS.APPROXIMATELY_EQUAL,
|
|
19
|
+
MATH_GEOMETRY_SYMBOLS.A,
|
|
20
|
+
MATH_GEOMETRY_SYMBOLS.B,
|
|
21
|
+
MATH_GEOMETRY_SYMBOLS.C,
|
|
22
|
+
MATH_GEOMETRY_SYMBOLS.PARALLEL,
|
|
23
|
+
MATH_BASIC_OPERATORS.CONGRUENT,
|
|
24
|
+
],
|
|
25
|
+
}
|
|
@@ -3,6 +3,7 @@ export * from './basic.constants'
|
|
|
3
3
|
export * from './basicPlus.constants'
|
|
4
4
|
export * from './basicPlusPlus.constants'
|
|
5
5
|
export * from './currency.constants'
|
|
6
|
+
export * from './geometry.constants'
|
|
6
7
|
export * from './numpad.constants'
|
|
7
8
|
export * from './time.constants'
|
|
8
9
|
export * from './underlined.constants'
|
|
@@ -7,6 +7,12 @@ export const DEFAULT_KEY_ICON_PROPS = {
|
|
|
7
7
|
|
|
8
8
|
export const MOBILE_LAYOUT_WIDTH = 1200
|
|
9
9
|
|
|
10
|
+
export const MOBILE_BREAKPOINT = {
|
|
11
|
+
LARGE: 1300,
|
|
12
|
+
MEDIUM: 1220,
|
|
13
|
+
SMALL: 990,
|
|
14
|
+
} as const
|
|
15
|
+
|
|
10
16
|
export const KEYBOARD_DEFAULT_TEXT_STYLE = {
|
|
11
17
|
fontSize: 14,
|
|
12
18
|
fontWeight: 700,
|
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
KEYBOARD_BASIC_PLUS,
|
|
19
19
|
KEYBOARD_BASIC_PLUS_PLUS,
|
|
20
20
|
KEYBOARD_CURRENCY,
|
|
21
|
+
KEYBOARD_GEOMETRY,
|
|
21
22
|
KEYBOARD_LENGTH,
|
|
22
23
|
KEYBOARD_NUMPAD,
|
|
23
24
|
KEYBOARD_TIME,
|
|
@@ -44,6 +45,7 @@ const PRESET_DOT_MIXED: KeyboardPresetConfig = {
|
|
|
44
45
|
[KeyboardType.BasicPlusPlusMobile]: KEYBOARD_BASIC_PLUS_PLUS.MOBILE_DOT,
|
|
45
46
|
[KeyboardType.BasicUnits]: { keys: KEYBOARD_LENGTH.MIXED.keys[0] },
|
|
46
47
|
[KeyboardType.AlgebraAdvanced]: KEYBOARD_ALGEBRA,
|
|
48
|
+
[KeyboardType.Geometry]: KEYBOARD_GEOMETRY,
|
|
47
49
|
[KeyboardType.Numpad]: KEYBOARD_NUMPAD.DOT,
|
|
48
50
|
[KeyboardType.Underlined]: KEYBOARD_UNDERLINED,
|
|
49
51
|
},
|
|
@@ -65,6 +67,7 @@ const PRESET_COMMA_METRIC: KeyboardPresetConfig = {
|
|
|
65
67
|
[KeyboardType.BasicPlusPlusMobile]: KEYBOARD_BASIC_PLUS_PLUS.MOBILE_COMMA,
|
|
66
68
|
[KeyboardType.BasicUnits]: { keys: KEYBOARD_LENGTH.METRIC.keys[0] },
|
|
67
69
|
[KeyboardType.AlgebraAdvanced]: KEYBOARD_ALGEBRA,
|
|
70
|
+
[KeyboardType.Geometry]: KEYBOARD_GEOMETRY,
|
|
68
71
|
[KeyboardType.Numpad]: KEYBOARD_NUMPAD.COMMA,
|
|
69
72
|
[KeyboardType.Underlined]: KEYBOARD_UNDERLINED,
|
|
70
73
|
},
|
|
@@ -5,8 +5,9 @@ import { TimeBasicLayout } from '../components/BasicLayout/TimeBasicLayout'
|
|
|
5
5
|
import { CurrencyBasicLayout } from '../components/BasicLayout/CurrencyBasicLayout'
|
|
6
6
|
import { UnitsLayout } from '../components/UnitsLayout/UnitsLayout'
|
|
7
7
|
import { BasicPlusPlusLayout } from '../components/BasicPlusPlusLayout/BasicPlusPlusLayout'
|
|
8
|
+
import { GeometryLayout } from '../components/GeometryLayout/GeometryLayout'
|
|
8
9
|
import { MyScriptMathCharacterTypes } from '../../../types/characterTypes'
|
|
9
|
-
import { MOBILE_LAYOUT_WIDTH } from './keyboard.constants'
|
|
10
|
+
import { MOBILE_BREAKPOINT, MOBILE_LAYOUT_WIDTH } from './keyboard.constants'
|
|
10
11
|
import { KeyboardType } from '../types/types'
|
|
11
12
|
|
|
12
13
|
export const KEYBOARD_LAYOUTS = {
|
|
@@ -19,12 +20,12 @@ export const KEYBOARD_LAYOUTS = {
|
|
|
19
20
|
MyScriptMathCharacterTypes.ALGEBRA_GREEK,
|
|
20
21
|
MyScriptMathCharacterTypes.GENERAL_MATH,
|
|
21
22
|
],
|
|
22
|
-
mobileBreakpoint:
|
|
23
|
+
mobileBreakpoint: MOBILE_BREAKPOINT.LARGE,
|
|
23
24
|
},
|
|
24
25
|
[KeyboardType.Basic]: {
|
|
25
26
|
Component: BasicLayout,
|
|
26
27
|
characterTypes: [MyScriptMathCharacterTypes.NUMBERS_WHOLE],
|
|
27
|
-
mobileBreakpoint:
|
|
28
|
+
mobileBreakpoint: MOBILE_BREAKPOINT.SMALL,
|
|
28
29
|
},
|
|
29
30
|
[KeyboardType.BasicPlus]: {
|
|
30
31
|
Component: BasicPlusLayout,
|
|
@@ -37,14 +38,17 @@ export const KEYBOARD_LAYOUTS = {
|
|
|
37
38
|
MyScriptMathCharacterTypes.PERCENT,
|
|
38
39
|
MyScriptMathCharacterTypes.NUMBERS_RATIONAL,
|
|
39
40
|
],
|
|
41
|
+
mobileBreakpoint: MOBILE_LAYOUT_WIDTH,
|
|
40
42
|
},
|
|
41
43
|
[KeyboardType.BasicTime]: {
|
|
42
44
|
Component: TimeBasicLayout,
|
|
43
45
|
characterTypes: [MyScriptMathCharacterTypes.TIME],
|
|
46
|
+
mobileBreakpoint: MOBILE_LAYOUT_WIDTH,
|
|
44
47
|
},
|
|
45
48
|
[KeyboardType.BasicCurrency]: {
|
|
46
49
|
Component: CurrencyBasicLayout,
|
|
47
50
|
characterTypes: [MyScriptMathCharacterTypes.CURRENCY],
|
|
51
|
+
mobileBreakpoint: MOBILE_LAYOUT_WIDTH,
|
|
48
52
|
},
|
|
49
53
|
[KeyboardType.BasicUnits]: {
|
|
50
54
|
Component: UnitsLayout,
|
|
@@ -52,14 +56,20 @@ export const KEYBOARD_LAYOUTS = {
|
|
|
52
56
|
MyScriptMathCharacterTypes.NUMBERS_AND_UNITS,
|
|
53
57
|
MyScriptMathCharacterTypes.UNITS,
|
|
54
58
|
],
|
|
59
|
+
mobileBreakpoint: MOBILE_LAYOUT_WIDTH,
|
|
55
60
|
},
|
|
56
61
|
[KeyboardType.BasicPlusPlus]: {
|
|
57
62
|
Component: BasicPlusPlusLayout,
|
|
63
|
+
characterTypes: [] as MyScriptMathCharacterTypes[],
|
|
64
|
+
mobileBreakpoint: MOBILE_BREAKPOINT.MEDIUM,
|
|
65
|
+
},
|
|
66
|
+
[KeyboardType.Geometry]: {
|
|
67
|
+
Component: GeometryLayout,
|
|
58
68
|
characterTypes: [
|
|
59
69
|
MyScriptMathCharacterTypes.GEOM_ANGLES,
|
|
60
70
|
MyScriptMathCharacterTypes.GEOM_COORDINATE,
|
|
61
71
|
],
|
|
62
|
-
mobileBreakpoint:
|
|
72
|
+
mobileBreakpoint: MOBILE_BREAKPOINT.LARGE,
|
|
63
73
|
},
|
|
64
74
|
}
|
|
65
75
|
|
|
@@ -95,7 +105,7 @@ export function isBasicPlusPlusLayout(charType?: number) {
|
|
|
95
105
|
}
|
|
96
106
|
|
|
97
107
|
return (
|
|
98
|
-
KEYBOARD_LAYOUTS[KeyboardType.
|
|
108
|
+
KEYBOARD_LAYOUTS[KeyboardType.Geometry].characterTypes.includes(charType) ||
|
|
99
109
|
KEYBOARD_LAYOUTS[KeyboardType.AlgebraAdvanced].characterTypes.includes(charType)
|
|
100
110
|
)
|
|
101
111
|
}
|