react-simple-keyboard 3.7.153 → 3.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.vscode/launch.json +13 -0
- package/LICENSE +21 -21
- package/README.md +57 -57
- package/build/components/Keyboard.d.ts +5 -5
- package/build/components/KeyboardModern.d.ts +5 -5
- package/build/css/index.css +2 -2
- package/build/index.d.ts +5 -5
- package/build/index.js +2 -2
- package/build/index.modern.d.ts +4 -4
- package/build/index.modern.esm.js +2 -2
- package/build/index.modern.esm.js.map +1 -1
- package/build/index.modern.js +2 -2
- package/build/index.modern.js.map +1 -1
- package/build/interfaces.d.ts +770 -766
- package/build/services/Utilities.d.ts +58 -57
- package/package.json +132 -130
|
@@ -1,57 +1,58 @@
|
|
|
1
|
-
import { KeyboardReactInterface } from "../interfaces";
|
|
2
|
-
export declare const parseProps: (props: KeyboardReactInterface["options"]) => {
|
|
3
|
-
theme: string;
|
|
4
|
-
layout?: import("../interfaces").KeyboardLayoutObject | undefined;
|
|
5
|
-
layoutName?: string | undefined;
|
|
6
|
-
display?: {
|
|
7
|
-
[button: string]: string;
|
|
8
|
-
} | undefined;
|
|
9
|
-
mergeDisplay?: boolean | undefined;
|
|
10
|
-
buttonTheme?: import("../interfaces").KeyboardButtonTheme[] | undefined;
|
|
11
|
-
buttonAttributes?: import("../interfaces").KeyboardButtonAttributes[] | undefined;
|
|
12
|
-
debug?: boolean | undefined;
|
|
13
|
-
newLineOnEnter?: boolean | undefined;
|
|
14
|
-
tabCharOnTab?: boolean | undefined;
|
|
15
|
-
inputName?: string | undefined;
|
|
16
|
-
maxLength?: any;
|
|
17
|
-
syncInstanceInputs?: boolean | undefined;
|
|
18
|
-
physicalKeyboardHighlight?: boolean | undefined;
|
|
19
|
-
physicalKeyboardHighlightPress?: boolean | undefined;
|
|
20
|
-
physicalKeyboardHighlightPressUseClick?: boolean | undefined;
|
|
21
|
-
physicalKeyboardHighlightPressUsePointerEvents?: boolean | undefined;
|
|
22
|
-
physicalKeyboardHighlightTextColor?: string | undefined;
|
|
23
|
-
physicalKeyboardHighlightBgColor?: string | undefined;
|
|
24
|
-
physicalKeyboardHighlightPreventDefault?: boolean | undefined;
|
|
25
|
-
preventMouseDownDefault?: boolean | undefined;
|
|
26
|
-
preventMouseUpDefault?: boolean | undefined;
|
|
27
|
-
stopMouseDownPropagation?: boolean | undefined;
|
|
28
|
-
stopMouseUpPropagation?: boolean | undefined;
|
|
29
|
-
useButtonTag?: boolean | undefined;
|
|
30
|
-
disableCaretPositioning?: boolean | undefined;
|
|
31
|
-
inputPattern?: any;
|
|
32
|
-
useTouchEvents?: boolean | undefined;
|
|
33
|
-
autoUseTouchEvents?: boolean | undefined;
|
|
34
|
-
useMouseEvents?: boolean | undefined;
|
|
35
|
-
disableButtonHold?: boolean | undefined;
|
|
36
|
-
rtl?: boolean | undefined;
|
|
37
|
-
enableLayoutCandidates?: boolean | undefined;
|
|
38
|
-
layoutCandidates?: {
|
|
39
|
-
[key: string]: string;
|
|
40
|
-
} | undefined;
|
|
41
|
-
excludeFromLayout?: {
|
|
42
|
-
[key: string]: string[];
|
|
43
|
-
} | undefined;
|
|
44
|
-
layoutCandidatesPageSize?: number | undefined;
|
|
45
|
-
layoutCandidatesCaseSensitiveMatch?: boolean | undefined;
|
|
46
|
-
disableCandidateNormalization?: boolean | undefined;
|
|
47
|
-
enableLayoutCandidatesKeyPress?: boolean | undefined;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
1
|
+
import { KeyboardReactInterface } from "../interfaces";
|
|
2
|
+
export declare const parseProps: (props: KeyboardReactInterface["options"]) => {
|
|
3
|
+
theme: string;
|
|
4
|
+
layout?: import("../interfaces").KeyboardLayoutObject | undefined;
|
|
5
|
+
layoutName?: string | undefined;
|
|
6
|
+
display?: {
|
|
7
|
+
[button: string]: string;
|
|
8
|
+
} | undefined;
|
|
9
|
+
mergeDisplay?: boolean | undefined;
|
|
10
|
+
buttonTheme?: import("../interfaces").KeyboardButtonTheme[] | undefined;
|
|
11
|
+
buttonAttributes?: import("../interfaces").KeyboardButtonAttributes[] | undefined;
|
|
12
|
+
debug?: boolean | undefined;
|
|
13
|
+
newLineOnEnter?: boolean | undefined;
|
|
14
|
+
tabCharOnTab?: boolean | undefined;
|
|
15
|
+
inputName?: string | undefined;
|
|
16
|
+
maxLength?: any;
|
|
17
|
+
syncInstanceInputs?: boolean | undefined;
|
|
18
|
+
physicalKeyboardHighlight?: boolean | undefined;
|
|
19
|
+
physicalKeyboardHighlightPress?: boolean | undefined;
|
|
20
|
+
physicalKeyboardHighlightPressUseClick?: boolean | undefined;
|
|
21
|
+
physicalKeyboardHighlightPressUsePointerEvents?: boolean | undefined;
|
|
22
|
+
physicalKeyboardHighlightTextColor?: string | undefined;
|
|
23
|
+
physicalKeyboardHighlightBgColor?: string | undefined;
|
|
24
|
+
physicalKeyboardHighlightPreventDefault?: boolean | undefined;
|
|
25
|
+
preventMouseDownDefault?: boolean | undefined;
|
|
26
|
+
preventMouseUpDefault?: boolean | undefined;
|
|
27
|
+
stopMouseDownPropagation?: boolean | undefined;
|
|
28
|
+
stopMouseUpPropagation?: boolean | undefined;
|
|
29
|
+
useButtonTag?: boolean | undefined;
|
|
30
|
+
disableCaretPositioning?: boolean | undefined;
|
|
31
|
+
inputPattern?: any;
|
|
32
|
+
useTouchEvents?: boolean | undefined;
|
|
33
|
+
autoUseTouchEvents?: boolean | undefined;
|
|
34
|
+
useMouseEvents?: boolean | undefined;
|
|
35
|
+
disableButtonHold?: boolean | undefined;
|
|
36
|
+
rtl?: boolean | undefined;
|
|
37
|
+
enableLayoutCandidates?: boolean | undefined;
|
|
38
|
+
layoutCandidates?: {
|
|
39
|
+
[key: string]: string;
|
|
40
|
+
} | undefined;
|
|
41
|
+
excludeFromLayout?: {
|
|
42
|
+
[key: string]: string[];
|
|
43
|
+
} | undefined;
|
|
44
|
+
layoutCandidatesPageSize?: number | undefined;
|
|
45
|
+
layoutCandidatesCaseSensitiveMatch?: boolean | undefined;
|
|
46
|
+
disableCandidateNormalization?: boolean | undefined;
|
|
47
|
+
enableLayoutCandidatesKeyPress?: boolean | undefined;
|
|
48
|
+
updateCaretOnSelectionChange?: boolean | undefined;
|
|
49
|
+
onRender?: ((instance: import("../interfaces").SimpleKeyboard) => void) | undefined;
|
|
50
|
+
onInit?: ((instance: import("../interfaces").SimpleKeyboard) => void) | undefined;
|
|
51
|
+
onChange?: ((input: string, e?: MouseEvent | undefined) => any) | undefined;
|
|
52
|
+
onChangeAll?: ((inputObj: import("../interfaces").KeyboardInput, e?: MouseEvent | undefined) => any) | undefined;
|
|
53
|
+
onKeyPress?: ((button: string, e?: MouseEvent | undefined) => any) | undefined;
|
|
54
|
+
onKeyReleased?: ((button: string, e?: MouseEvent | undefined) => any) | undefined;
|
|
55
|
+
beforeInputUpdate?: ((instance: import("../interfaces").SimpleKeyboard) => void) | undefined;
|
|
56
|
+
keyboardRef?: ((r: any) => void) | undefined;
|
|
57
|
+
};
|
|
58
|
+
export declare const changedProps: (prevProps: KeyboardReactInterface["options"], props: KeyboardReactInterface["options"]) => string[];
|
package/package.json
CHANGED
|
@@ -1,130 +1,132 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "react-simple-keyboard",
|
|
3
|
-
"version": "3.
|
|
4
|
-
"description": "React.js Virtual Keyboard",
|
|
5
|
-
"main": "build/index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"start": "webpack serve --config webpack.config.demo.js",
|
|
8
|
-
"build": "npm run generate-types && webpack && npm run build-modern && npm run build-modern-esm && tsc",
|
|
9
|
-
"build-modern": "webpack --config webpack.config.modern.js",
|
|
10
|
-
"build-modern-esm": "webpack --config webpack.config.modern_esm.js",
|
|
11
|
-
"test": "jest --silent",
|
|
12
|
-
"coverage": "npm run test -- --coverage",
|
|
13
|
-
"prepare": "npm run build",
|
|
14
|
-
"generate-types": "node scripts/generateKeyboardTypes.js"
|
|
15
|
-
},
|
|
16
|
-
"repository": {
|
|
17
|
-
"type": "git",
|
|
18
|
-
"url": "https://github.com/hodgef/react-simple-keyboard"
|
|
19
|
-
},
|
|
20
|
-
"author": "Francisco Hodge <hello@franciscohodge.com> (https://github.com/hodgef)",
|
|
21
|
-
"bugs": {
|
|
22
|
-
"url": "https://github.com/hodgef/react-simple-keyboard/issues"
|
|
23
|
-
},
|
|
24
|
-
"homepage": "https://virtual-keyboard.js.org/",
|
|
25
|
-
"keywords": [
|
|
26
|
-
"react",
|
|
27
|
-
"reactjs",
|
|
28
|
-
"digital",
|
|
29
|
-
"keyboard",
|
|
30
|
-
"onscreen",
|
|
31
|
-
"virtual",
|
|
32
|
-
"component",
|
|
33
|
-
"screen-keyboard",
|
|
34
|
-
"component",
|
|
35
|
-
"virtual-keyboard",
|
|
36
|
-
"touchscreen",
|
|
37
|
-
"touch-screen",
|
|
38
|
-
"kiosk",
|
|
39
|
-
"osk",
|
|
40
|
-
"js"
|
|
41
|
-
],
|
|
42
|
-
"license": "MIT",
|
|
43
|
-
"devDependencies": {
|
|
44
|
-
"@babel/cli": "^7.25.6",
|
|
45
|
-
"@babel/core": "^7.25.2",
|
|
46
|
-
"@babel/plugin-proposal-class-properties": "^7.16.7",
|
|
47
|
-
"@babel/plugin-transform-typescript": "^7.24.7",
|
|
48
|
-
"@babel/preset-env": "^7.25.4",
|
|
49
|
-
"@babel/preset-react": "^7.24.7",
|
|
50
|
-
"@babel/preset-typescript": "^7.24.1",
|
|
51
|
-
"@types/enzyme": "^3.10.12",
|
|
52
|
-
"@types/jest": "^
|
|
53
|
-
"@types/react": "^18.0.9",
|
|
54
|
-
"@types/react-dom": "^18.0.3",
|
|
55
|
-
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
|
56
|
-
"@typescript-eslint/parser": "^4.32.0",
|
|
57
|
-
"@wojtekmaj/enzyme-adapter-react-17": "^0.8.0",
|
|
58
|
-
"autoprefixer": "^10.4.20",
|
|
59
|
-
"babel-eslint": "^10.1.0",
|
|
60
|
-
"babel-loader": "^9.1.3",
|
|
61
|
-
"babel-preset-minify": "^0.5.2",
|
|
62
|
-
"copy-webpack-plugin": "^12.0.2",
|
|
63
|
-
"core-js": "^3.38.1",
|
|
64
|
-
"css-loader": "^7.1.2",
|
|
65
|
-
"css-minimizer-webpack-plugin": "^7.0.0",
|
|
66
|
-
"dts-bundle": "^0.7.3",
|
|
67
|
-
"enzyme": "^3.11.0",
|
|
68
|
-
"eslint": "^7.32.0",
|
|
69
|
-
"file-loader": "^6.2.0",
|
|
70
|
-
"html-webpack-plugin": "^5.6.0",
|
|
71
|
-
"jest": "^
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"postcss
|
|
75
|
-
"
|
|
76
|
-
"react
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"webpack
|
|
84
|
-
"webpack-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
"react
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
"
|
|
98
|
-
"!src
|
|
99
|
-
"!src/
|
|
100
|
-
"!src/
|
|
101
|
-
"!src
|
|
102
|
-
"
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
"web.
|
|
121
|
-
"
|
|
122
|
-
"web.
|
|
123
|
-
"
|
|
124
|
-
"
|
|
125
|
-
"
|
|
126
|
-
"
|
|
127
|
-
"
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "react-simple-keyboard",
|
|
3
|
+
"version": "3.8.0",
|
|
4
|
+
"description": "React.js Virtual Keyboard",
|
|
5
|
+
"main": "build/index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"start": "webpack serve --config webpack.config.demo.js",
|
|
8
|
+
"build": "npm run generate-types && webpack && npm run build-modern && npm run build-modern-esm && tsc",
|
|
9
|
+
"build-modern": "webpack --config webpack.config.modern.js",
|
|
10
|
+
"build-modern-esm": "webpack --config webpack.config.modern_esm.js",
|
|
11
|
+
"test": "jest --silent",
|
|
12
|
+
"coverage": "npm run test -- --coverage",
|
|
13
|
+
"prepare": "npm run build",
|
|
14
|
+
"generate-types": "node scripts/generateKeyboardTypes.js"
|
|
15
|
+
},
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "https://github.com/hodgef/react-simple-keyboard"
|
|
19
|
+
},
|
|
20
|
+
"author": "Francisco Hodge <hello@franciscohodge.com> (https://github.com/hodgef)",
|
|
21
|
+
"bugs": {
|
|
22
|
+
"url": "https://github.com/hodgef/react-simple-keyboard/issues"
|
|
23
|
+
},
|
|
24
|
+
"homepage": "https://virtual-keyboard.js.org/",
|
|
25
|
+
"keywords": [
|
|
26
|
+
"react",
|
|
27
|
+
"reactjs",
|
|
28
|
+
"digital",
|
|
29
|
+
"keyboard",
|
|
30
|
+
"onscreen",
|
|
31
|
+
"virtual",
|
|
32
|
+
"component",
|
|
33
|
+
"screen-keyboard",
|
|
34
|
+
"component",
|
|
35
|
+
"virtual-keyboard",
|
|
36
|
+
"touchscreen",
|
|
37
|
+
"touch-screen",
|
|
38
|
+
"kiosk",
|
|
39
|
+
"osk",
|
|
40
|
+
"js"
|
|
41
|
+
],
|
|
42
|
+
"license": "MIT",
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@babel/cli": "^7.25.6",
|
|
45
|
+
"@babel/core": "^7.25.2",
|
|
46
|
+
"@babel/plugin-proposal-class-properties": "^7.16.7",
|
|
47
|
+
"@babel/plugin-transform-typescript": "^7.24.7",
|
|
48
|
+
"@babel/preset-env": "^7.25.4",
|
|
49
|
+
"@babel/preset-react": "^7.24.7",
|
|
50
|
+
"@babel/preset-typescript": "^7.24.1",
|
|
51
|
+
"@types/enzyme": "^3.10.12",
|
|
52
|
+
"@types/jest": "^29.5.13",
|
|
53
|
+
"@types/react": "^18.0.9",
|
|
54
|
+
"@types/react-dom": "^18.0.3",
|
|
55
|
+
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
|
56
|
+
"@typescript-eslint/parser": "^4.32.0",
|
|
57
|
+
"@wojtekmaj/enzyme-adapter-react-17": "^0.8.0",
|
|
58
|
+
"autoprefixer": "^10.4.20",
|
|
59
|
+
"babel-eslint": "^10.1.0",
|
|
60
|
+
"babel-loader": "^9.1.3",
|
|
61
|
+
"babel-preset-minify": "^0.5.2",
|
|
62
|
+
"copy-webpack-plugin": "^12.0.2",
|
|
63
|
+
"core-js": "^3.38.1",
|
|
64
|
+
"css-loader": "^7.1.2",
|
|
65
|
+
"css-minimizer-webpack-plugin": "^7.0.0",
|
|
66
|
+
"dts-bundle": "^0.7.3",
|
|
67
|
+
"enzyme": "^3.11.0",
|
|
68
|
+
"eslint": "^7.32.0",
|
|
69
|
+
"file-loader": "^6.2.0",
|
|
70
|
+
"html-webpack-plugin": "^5.6.0",
|
|
71
|
+
"jest": "^29.7.0",
|
|
72
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
73
|
+
"mini-css-extract-plugin": "^2.9.1",
|
|
74
|
+
"postcss": "^8.4.45",
|
|
75
|
+
"postcss-loader": "^8.1.1",
|
|
76
|
+
"react": "^16.0.0 || ^17.0.0 || ^18.0.0",
|
|
77
|
+
"react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0",
|
|
78
|
+
"simple-keyboard": "3.8.1",
|
|
79
|
+
"style-loader": "^4.0.0",
|
|
80
|
+
"terser-webpack-plugin": "^5.3.10",
|
|
81
|
+
"typescript": "^4.9.5",
|
|
82
|
+
"url-loader": "^4.1.1",
|
|
83
|
+
"webpack": "^5.94.0",
|
|
84
|
+
"webpack-cli": "^5.1.4",
|
|
85
|
+
"webpack-dev-server": "4.13.3"
|
|
86
|
+
},
|
|
87
|
+
"peerDependencies": {
|
|
88
|
+
"react": "^16.0.0 || ^17.0.0 || ^18.0.0",
|
|
89
|
+
"react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0"
|
|
90
|
+
},
|
|
91
|
+
"jest": {
|
|
92
|
+
"testEnvironment": "jsdom",
|
|
93
|
+
"roots": [
|
|
94
|
+
"<rootDir>/src"
|
|
95
|
+
],
|
|
96
|
+
"collectCoverageFrom": [
|
|
97
|
+
"src/**/*.{js,jsx,ts,tsx}",
|
|
98
|
+
"!src/**/*.d.ts",
|
|
99
|
+
"!src/lib/index.js",
|
|
100
|
+
"!src/lib/polyfills.js",
|
|
101
|
+
"!src/demo/**",
|
|
102
|
+
"!src/utils/**",
|
|
103
|
+
"!src/**/*.d.ts",
|
|
104
|
+
"!**/tests/**"
|
|
105
|
+
],
|
|
106
|
+
"testMatch": [
|
|
107
|
+
"<rootDir>/src/**/__tests__/**/*.{js,jsx,ts,tsx}",
|
|
108
|
+
"<rootDir>/src/**/*.{spec,test}.{js,jsx,ts,tsx}"
|
|
109
|
+
],
|
|
110
|
+
"transformIgnorePatterns": [
|
|
111
|
+
"[/\\\\]node_modules[/\\\\].+\\.(js|jsx|ts|tsx)$",
|
|
112
|
+
"^.+\\.module\\.(css|sass|scss)$"
|
|
113
|
+
],
|
|
114
|
+
"modulePaths": [],
|
|
115
|
+
"moduleNameMapper": {
|
|
116
|
+
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/scripts/testMock.js",
|
|
117
|
+
"\\.(css|less)$": "<rootDir>/scripts/testMock.js"
|
|
118
|
+
},
|
|
119
|
+
"moduleFileExtensions": [
|
|
120
|
+
"web.js",
|
|
121
|
+
"js",
|
|
122
|
+
"web.ts",
|
|
123
|
+
"ts",
|
|
124
|
+
"web.tsx",
|
|
125
|
+
"tsx",
|
|
126
|
+
"json",
|
|
127
|
+
"web.jsx",
|
|
128
|
+
"jsx",
|
|
129
|
+
"node"
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
}
|