Compare commits

...

64 Commits

Author SHA1 Message Date
Francisco Hodge
3162cc80f8 Build update 2019-06-05 22:23:36 -04:00
Francisco Hodge
de2100cb7b npm update 2019-06-05 21:09:14 -04:00
Francisco Hodge
04a3c186f0 Added disableButtonHold option 2019-06-05 21:08:53 -04:00
dependabot-preview[bot]
5fa612a923 Merge pull request #99 from hodgef/dependabot/npm_and_yarn/webpack-4.33.0 2019-06-05 13:15:09 +00:00
dependabot-preview[bot]
9a34b6eb37 Merge pull request #97 from hodgef/dependabot/npm_and_yarn/resolve-1.11.1 2019-06-05 13:14:41 +00:00
dependabot-preview[bot]
66fa632ca4 Bump resolve from 1.11.0 to 1.11.1
Bumps [resolve](https://github.com/browserify/resolve) from 1.11.0 to 1.11.1.
- [Release notes](https://github.com/browserify/resolve/releases)
- [Commits](https://github.com/browserify/resolve/compare/v1.11.0...v1.11.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-05 13:08:22 +00:00
dependabot-preview[bot]
51d6d66fc6 Bump webpack from 4.32.2 to 4.33.0
Bumps [webpack](https://github.com/webpack/webpack) from 4.32.2 to 4.33.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v4.32.2...v4.33.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-05 13:08:19 +00:00
dependabot-preview[bot]
84d2c45887 Merge pull request #98 from hodgef/dependabot/npm_and_yarn/webpack-dev-server-3.5.1 2019-06-05 13:05:48 +00:00
dependabot-preview[bot]
966bfd47db Merge pull request #96 from hodgef/dependabot/npm_and_yarn/postcss-normalize-8.0.0 2019-06-05 12:58:38 +00:00
dependabot-preview[bot]
02d88bae10 Bump webpack-dev-server from 3.5.0 to 3.5.1
Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server) from 3.5.0 to 3.5.1.
- [Release notes](https://github.com/webpack/webpack-dev-server/releases)
- [Changelog](https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-server/compare/v3.5.0...v3.5.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-05 12:57:16 +00:00
dependabot-preview[bot]
6802c1f9dc Bump postcss-normalize from 7.0.1 to 8.0.0
Bumps [postcss-normalize](https://github.com/csstools/postcss-normalize) from 7.0.1 to 8.0.0.
- [Release notes](https://github.com/csstools/postcss-normalize/releases)
- [Changelog](https://github.com/csstools/postcss-normalize/blob/master/CHANGELOG.md)
- [Commits](https://github.com/csstools/postcss-normalize/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-05 12:55:34 +00:00
Francisco Hodge
b490481761 Build update 2019-06-02 03:04:55 -04:00
Francisco Hodge
8795232092 Added destroy method 2019-06-02 02:56:24 -04:00
dependabot-preview[bot]
ba20077e7a Merge pull request #94 from hodgef/dependabot/npm_and_yarn/mini-css-extract-plugin-0.7.0 2019-06-01 09:26:16 +00:00
dependabot-preview[bot]
f175c1dcb8 Merge pull request #93 from hodgef/dependabot/npm_and_yarn/@svgr/webpack-4.3.0 2019-06-01 09:23:27 +00:00
dependabot-preview[bot]
abd2471119 Merge pull request #92 from hodgef/dependabot/npm_and_yarn/webpack-dev-server-3.5.0 2019-06-01 09:21:18 +00:00
dependabot-preview[bot]
d25b70fc3d Merge pull request #91 from hodgef/dependabot/npm_and_yarn/semver-6.1.1 2019-06-01 09:18:32 +00:00
dependabot-preview[bot]
d274abf755 Bump mini-css-extract-plugin from 0.6.0 to 0.7.0
Bumps [mini-css-extract-plugin](https://github.com/webpack-contrib/mini-css-extract-plugin) from 0.6.0 to 0.7.0.
- [Release notes](https://github.com/webpack-contrib/mini-css-extract-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/mini-css-extract-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v0.6.0...v0.7.0)
2019-06-01 09:16:19 +00:00
dependabot-preview[bot]
922c865d0f Bump @svgr/webpack from 4.2.0 to 4.3.0
Bumps [@svgr/webpack](https://github.com/smooth-code/svgr) from 4.2.0 to 4.3.0.
- [Release notes](https://github.com/smooth-code/svgr/releases)
- [Changelog](https://github.com/smooth-code/svgr/blob/master/CHANGELOG.md)
- [Commits](https://github.com/smooth-code/svgr/compare/v4.2.0...v4.3.0)
2019-06-01 09:15:29 +00:00
dependabot-preview[bot]
5735215b0a Bump webpack-dev-server from 3.4.1 to 3.5.0
Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server) from 3.4.1 to 3.5.0.
- [Release notes](https://github.com/webpack/webpack-dev-server/releases)
- [Changelog](https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-server/compare/v3.4.1...v3.5.0)
2019-06-01 09:14:36 +00:00
dependabot-preview[bot]
d007a76fa0 Bump semver from 6.1.0 to 6.1.1
Bumps [semver](https://github.com/npm/node-semver) from 6.1.0 to 6.1.1.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/master/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v6.1.0...v6.1.1)
2019-06-01 09:13:44 +00:00
Francisco Hodge
d561c8b666 Build update 2019-05-25 17:46:21 -04:00
dependabot-preview[bot]
78cc636d32 Merge pull request #88 from hodgef/dependabot/npm_and_yarn/eslint-plugin-flowtype-3.9.1 2019-05-25 09:41:50 +00:00
dependabot-preview[bot]
5907eb3baa Merge pull request #86 from hodgef/dependabot/npm_and_yarn/terser-webpack-plugin-1.3.0 2019-05-25 09:38:09 +00:00
dependabot-preview[bot]
4e7ea1f687 Bump eslint-plugin-flowtype from 3.9.0 to 3.9.1
Bumps [eslint-plugin-flowtype](https://github.com/gajus/eslint-plugin-flowtype) from 3.9.0 to 3.9.1.
- [Release notes](https://github.com/gajus/eslint-plugin-flowtype/releases)
- [Commits](https://github.com/gajus/eslint-plugin-flowtype/compare/v3.9.0...v3.9.1)
2019-05-25 09:31:39 +00:00
dependabot-preview[bot]
4388f26cb6 Merge pull request #87 from hodgef/dependabot/npm_and_yarn/eslint-plugin-import-2.17.3 2019-05-25 09:29:23 +00:00
dependabot-preview[bot]
2c524f82ff Bump terser-webpack-plugin from 1.2.4 to 1.3.0
Bumps [terser-webpack-plugin](https://github.com/webpack-contrib/terser-webpack-plugin) from 1.2.4 to 1.3.0.
- [Release notes](https://github.com/webpack-contrib/terser-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/terser-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/terser-webpack-plugin/compare/v1.2.4...v1.3.0)
2019-05-25 09:27:10 +00:00
dependabot-preview[bot]
2911bb5022 Merge pull request #85 from hodgef/dependabot/npm_and_yarn/semver-6.1.0 2019-05-25 09:24:56 +00:00
dependabot-preview[bot]
3fe39dc9e3 Merge pull request #84 from hodgef/dependabot/npm_and_yarn/webpack-4.32.2 2019-05-25 09:22:48 +00:00
dependabot-preview[bot]
ab9839f94f Merge pull request #83 from hodgef/dependabot/npm_and_yarn/@babel/core-7.4.5 2019-05-25 09:20:05 +00:00
dependabot-preview[bot]
b4c21693bd Merge pull request #82 from hodgef/dependabot/npm_and_yarn/@babel/runtime-7.4.5 2019-05-25 09:18:14 +00:00
dependabot-preview[bot]
7a647f16ab Bump eslint-plugin-import from 2.17.2 to 2.17.3
Bumps [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) from 2.17.2 to 2.17.3.
- [Release notes](https://github.com/benmosher/eslint-plugin-import/releases)
- [Changelog](https://github.com/benmosher/eslint-plugin-import/blob/master/CHANGELOG.md)
- [Commits](https://github.com/benmosher/eslint-plugin-import/compare/v2.17.2...v2.17.3)
2019-05-25 09:17:25 +00:00
dependabot-preview[bot]
619991b4ba Bump semver from 6.0.0 to 6.1.0
Bumps [semver](https://github.com/npm/node-semver) from 6.0.0 to 6.1.0.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/master/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v6.0.0...v6.1.0)
2019-05-25 09:15:50 +00:00
dependabot-preview[bot]
e7fa7fb1fd Merge pull request #81 from hodgef/dependabot/npm_and_yarn/@babel/preset-env-7.4.5 2019-05-25 09:15:13 +00:00
dependabot-preview[bot]
31fa3d0592 Bump webpack from 4.31.0 to 4.32.2
Bumps [webpack](https://github.com/webpack/webpack) from 4.31.0 to 4.32.2.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v4.31.0...v4.32.2)
2019-05-25 09:15:03 +00:00
dependabot-preview[bot]
bcef967a20 Bump @babel/core from 7.4.4 to 7.4.5
Bumps [@babel/core](https://github.com/babel/babel) from 7.4.4 to 7.4.5.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/compare/v7.4.4...v7.4.5)
2019-05-25 09:14:15 +00:00
dependabot-preview[bot]
267838c299 Bump @babel/runtime from 7.4.4 to 7.4.5
Bumps [@babel/runtime](https://github.com/babel/babel) from 7.4.4 to 7.4.5.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/compare/v7.4.4...v7.4.5)
2019-05-25 09:13:27 +00:00
dependabot-preview[bot]
c5ad9d2240 Bump @babel/preset-env from 7.4.4 to 7.4.5
Bumps [@babel/preset-env](https://github.com/babel/babel) from 7.4.4 to 7.4.5.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/compare/v7.4.4...v7.4.5)
2019-05-25 09:12:40 +00:00
Francisco Hodge
8a865aed53 Build update 2019-05-21 00:02:15 -04:00
dependabot[bot]
a0f603597c Merge pull request #78 from hodgef/dependabot/npm_and_yarn/webpack-dev-server-3.4.1 2019-05-18 09:18:21 +00:00
dependabot[bot]
0a814d0a7b Bump webpack-dev-server from 3.3.1 to 3.4.1
Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server) from 3.3.1 to 3.4.1.
- [Release notes](https://github.com/webpack/webpack-dev-server/releases)
- [Changelog](https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-server/compare/v3.3.1...v3.4.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-18 09:12:52 +00:00
dependabot[bot]
513db7f056 Merge pull request #71 from hodgef/dependabot/npm_and_yarn/babel-loader-8.0.6 2019-05-17 00:06:00 +00:00
dependabot[bot]
1d863c4f81 Merge pull request #72 from hodgef/dependabot/npm_and_yarn/@typescript-eslint/eslint-plugin-1.9.0 2019-05-17 00:03:55 +00:00
dependabot[bot]
9443d6a91a Merge pull request #77 from hodgef/dependabot/npm_and_yarn/eslint-plugin-flowtype-3.9.0 2019-05-17 00:01:25 +00:00
dependabot[bot]
f19bf3c933 Merge pull request #76 from hodgef/dependabot/npm_and_yarn/terser-webpack-plugin-1.2.4 2019-05-17 00:00:26 +00:00
dependabot[bot]
55f96064e0 Merge pull request #75 from hodgef/dependabot/npm_and_yarn/uglifyjs-webpack-plugin-2.1.3 2019-05-16 23:57:47 +00:00
dependabot[bot]
44e4d00111 Merge pull request #74 from hodgef/dependabot/npm_and_yarn/prettier-1.17.1 2019-05-16 23:56:57 +00:00
dependabot[bot]
13f80bdcbe Merge pull request #73 from hodgef/dependabot/npm_and_yarn/fs-extra-8.0.1 2019-05-16 23:54:39 +00:00
dependabot[bot]
17016588d6 Bump babel-loader from 8.0.5 to 8.0.6
Bumps [babel-loader](https://github.com/babel/babel-loader) from 8.0.5 to 8.0.6.
- [Release notes](https://github.com/babel/babel-loader/releases)
- [Changelog](https://github.com/babel/babel-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel-loader/compare/v8.0.5...v8.0.6)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-16 23:50:03 +00:00
dependabot[bot]
a63e3cce76 Bump @typescript-eslint/eslint-plugin from 1.7.0 to 1.9.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint) from 1.7.0 to 1.9.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/compare/v1.7.0...v1.9.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-16 23:49:53 +00:00
dependabot[bot]
46b1c9bfda Bump eslint-plugin-flowtype from 3.8.1 to 3.9.0
Bumps [eslint-plugin-flowtype](https://github.com/gajus/eslint-plugin-flowtype) from 3.8.1 to 3.9.0.
- [Release notes](https://github.com/gajus/eslint-plugin-flowtype/releases)
- [Commits](https://github.com/gajus/eslint-plugin-flowtype/compare/v3.8.1...v3.9.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-16 23:48:19 +00:00
dependabot[bot]
f523d6ae51 Bump terser-webpack-plugin from 1.2.3 to 1.2.4
Bumps [terser-webpack-plugin](https://github.com/webpack-contrib/terser-webpack-plugin) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/webpack-contrib/terser-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/terser-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/terser-webpack-plugin/compare/v1.2.3...v1.2.4)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-16 23:47:50 +00:00
dependabot[bot]
68dfc94ea7 Merge pull request #70 from hodgef/dependabot/npm_and_yarn/@typescript-eslint/parser-1.9.0 2019-05-16 23:46:58 +00:00
dependabot[bot]
2274108619 Bump uglifyjs-webpack-plugin from 2.1.2 to 2.1.3
Bumps [uglifyjs-webpack-plugin](https://github.com/webpack-contrib/uglifyjs-webpack-plugin) from 2.1.2 to 2.1.3.
- [Release notes](https://github.com/webpack-contrib/uglifyjs-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/uglifyjs-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/uglifyjs-webpack-plugin/compare/v2.1.2...v2.1.3)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-16 23:46:35 +00:00
dependabot[bot]
7d5417ab2a Bump prettier from 1.17.0 to 1.17.1
Bumps [prettier](https://github.com/prettier/prettier) from 1.17.0 to 1.17.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/1.17.0...1.17.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-16 23:45:51 +00:00
dependabot[bot]
1a29880ef8 Bump fs-extra from 7.0.1 to 8.0.1
Bumps [fs-extra](https://github.com/jprichardson/node-fs-extra) from 7.0.1 to 8.0.1.
- [Release notes](https://github.com/jprichardson/node-fs-extra/releases)
- [Changelog](https://github.com/jprichardson/node-fs-extra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jprichardson/node-fs-extra/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-16 23:44:57 +00:00
dependabot[bot]
319eaa22cf Merge pull request #69 from hodgef/dependabot/npm_and_yarn/resolve-1.11.0 2019-05-16 23:44:27 +00:00
dependabot[bot]
c8bafdb517 Bump @typescript-eslint/parser from 1.7.0 to 1.9.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint) from 1.7.0 to 1.9.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/compare/v1.7.0...v1.9.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-16 23:42:40 +00:00
dependabot[bot]
fb7008d04b Bump resolve from 1.10.1 to 1.11.0
Bumps [resolve](https://github.com/browserify/resolve) from 1.10.1 to 1.11.0.
- [Release notes](https://github.com/browserify/resolve/releases)
- [Commits](https://github.com/browserify/resolve/compare/v1.10.1...v1.11.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-16 23:41:38 +00:00
Francisco Hodge
69706bd8f6 Build update 2019-05-16 19:38:38 -04:00
Francisco Hodge
ad4af7cde0 npm update 2019-05-16 19:31:31 -04:00
Francisco Hodge
a0c24db9d2 Updated types 2019-05-16 19:18:46 -04:00
Francisco Hodge
f702184e15 build update 2019-05-10 18:51:45 -04:00
Francisco Hodge
45d2f5b50d Updated dev dependencies 2019-05-10 18:47:38 -04:00
13 changed files with 2114 additions and 7263 deletions

View File

@@ -1,6 +1,6 @@
language: node_js
node_js:
- '11.2'
- node
install:
- npm install -g codecov
- npm install

View File

@@ -1,6 +1,6 @@
/*!
*
* simple-keyboard v2.21.0
* simple-keyboard v2.23.0
* https://github.com/hodgef/simple-keyboard
*
* Copyright (c) Francisco Hodge (https://github.com/hodgef)
@@ -8,5 +8,5 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/body,html{margin:0;padding:0}.simple-keyboard{font-family:HelveticaNeue-Light,Helvetica Neue Light,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box;overflow:hidden;touch-action:manipulation}.simple-keyboard .hg-row{display:-webkit-flex;display:flex}.simple-keyboard .hg-row:not(:last-child){margin-bottom:5px}.simple-keyboard .hg-row .hg-button-container,.simple-keyboard .hg-row .hg-button:not(:last-child){margin-right:5px}.simple-keyboard .hg-row>div:last-child{margin-right:0}.simple-keyboard .hg-row .hg-button-container{display:-webkit-flex;display:flex}.simple-keyboard .hg-button{display:inline-block;-webkit-flex-grow:1;flex-grow:1;cursor:pointer}.simple-keyboard .hg-button span{pointer-events:none}.simple-keyboard.hg-theme-default{background-color:rgba(0,0,0,.1);padding:5px;border-radius:5px}.simple-keyboard.hg-theme-default .hg-button{box-shadow:0 0 3px -1px rgba(0,0,0,.3);height:40px;border-radius:5px;box-sizing:border-box;padding:5px;background:#fff;border-bottom:1px solid #b5b5b5;cursor:pointer;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center}.simple-keyboard button.hg-button{border-width:0;outline:0;font-size:inherit}.simple-keyboard.hg-theme-default:not(.hg-touch-events) .hg-button:active{background:#e4e4e4}.simple-keyboard.hg-theme-default.hg-layout-numeric .hg-button{width:33.3%;height:60px;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center}.simple-keyboard.hg-theme-default .hg-button.hg-button-numpadadd,.simple-keyboard.hg-theme-default .hg-button.hg-button-numpadenter{height:85px}.simple-keyboard.hg-theme-default .hg-button.hg-button-numpad0{width:105px}.simple-keyboard.hg-theme-default .hg-button.hg-button-com{max-width:85px}.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn.hg-button-at{max-width:45px}.simple-keyboard.hg-theme-default .hg-button.hg-selectedButton{background:rgba(5,25,70,.53);color:#fff}.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=".com"]{max-width:82px}.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn[data-skbtn="@"]{max-width:60px}
*/body,html{margin:0;padding:0}.simple-keyboard{font-family:HelveticaNeue-Light,Helvetica Neue Light,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box;overflow:hidden;touch-action:manipulation}.simple-keyboard .hg-row{display:flex}.simple-keyboard .hg-row:not(:last-child){margin-bottom:5px}.simple-keyboard .hg-row .hg-button-container,.simple-keyboard .hg-row .hg-button:not(:last-child){margin-right:5px}.simple-keyboard .hg-row>div:last-child{margin-right:0}.simple-keyboard .hg-row .hg-button-container{display:flex}.simple-keyboard .hg-button{display:inline-block;flex-grow:1;cursor:pointer}.simple-keyboard .hg-button span{pointer-events:none}.simple-keyboard.hg-theme-default{background-color:rgba(0,0,0,.1);padding:5px;border-radius:5px}.simple-keyboard.hg-theme-default .hg-button{box-shadow:0 0 3px -1px rgba(0,0,0,.3);height:40px;border-radius:5px;box-sizing:border-box;padding:5px;background:#fff;border-bottom:1px solid #b5b5b5;cursor:pointer;display:flex;align-items:center;justify-content:center}.simple-keyboard button.hg-button{border-width:0;outline:0;font-size:inherit}.simple-keyboard.hg-theme-default:not(.hg-touch-events) .hg-button:active{background:#e4e4e4}.simple-keyboard.hg-theme-default.hg-layout-numeric .hg-button{width:33.3%;height:60px;align-items:center;display:flex;justify-content:center}.simple-keyboard.hg-theme-default .hg-button.hg-button-numpadadd,.simple-keyboard.hg-theme-default .hg-button.hg-button-numpadenter{height:85px}.simple-keyboard.hg-theme-default .hg-button.hg-button-numpad0{width:105px}.simple-keyboard.hg-theme-default .hg-button.hg-button-com{max-width:85px}.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn.hg-button-at{max-width:45px}.simple-keyboard.hg-theme-default .hg-button.hg-selectedButton{background:rgba(5,25,70,.53);color:#fff}.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=".com"]{max-width:82px}.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn[data-skbtn="@"]{max-width:60px}
/*# sourceMappingURL=index.css.map */

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
/*!
*
* simple-keyboard v2.21.0 (Non-minified build)
* simple-keyboard v2.23.0 (Non-minified build)
* https://github.com/hodgef/simple-keyboard
*
* Copyright (c) Francisco Hodge (https://github.com/hodgef)
@@ -8,4 +8,4 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/body,html{margin:0;padding:0}.simple-keyboard{font-family:HelveticaNeue-Light,Helvetica Neue Light,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box;overflow:hidden;touch-action:manipulation}.simple-keyboard .hg-row{display:-webkit-flex;display:flex}.simple-keyboard .hg-row:not(:last-child){margin-bottom:5px}.simple-keyboard .hg-row .hg-button-container,.simple-keyboard .hg-row .hg-button:not(:last-child){margin-right:5px}.simple-keyboard .hg-row>div:last-child{margin-right:0}.simple-keyboard .hg-row .hg-button-container{display:-webkit-flex;display:flex}.simple-keyboard .hg-button{display:inline-block;-webkit-flex-grow:1;flex-grow:1;cursor:pointer}.simple-keyboard .hg-button span{pointer-events:none}.simple-keyboard.hg-theme-default{background-color:rgba(0,0,0,.1);padding:5px;border-radius:5px}.simple-keyboard.hg-theme-default .hg-button{box-shadow:0 0 3px -1px rgba(0,0,0,.3);height:40px;border-radius:5px;box-sizing:border-box;padding:5px;background:#fff;border-bottom:1px solid #b5b5b5;cursor:pointer;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center}.simple-keyboard button.hg-button{border-width:0;outline:0;font-size:inherit}.simple-keyboard.hg-theme-default:not(.hg-touch-events) .hg-button:active{background:#e4e4e4}.simple-keyboard.hg-theme-default.hg-layout-numeric .hg-button{width:33.3%;height:60px;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center}.simple-keyboard.hg-theme-default .hg-button.hg-button-numpadadd,.simple-keyboard.hg-theme-default .hg-button.hg-button-numpadenter{height:85px}.simple-keyboard.hg-theme-default .hg-button.hg-button-numpad0{width:105px}.simple-keyboard.hg-theme-default .hg-button.hg-button-com{max-width:85px}.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn.hg-button-at{max-width:45px}.simple-keyboard.hg-theme-default .hg-button.hg-selectedButton{background:rgba(5,25,70,.53);color:#fff}.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=".com"]{max-width:82px}.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn[data-skbtn="@"]{max-width:60px}
*/body,html{margin:0;padding:0}.simple-keyboard{font-family:HelveticaNeue-Light,Helvetica Neue Light,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box;overflow:hidden;touch-action:manipulation}.simple-keyboard .hg-row{display:flex}.simple-keyboard .hg-row:not(:last-child){margin-bottom:5px}.simple-keyboard .hg-row .hg-button-container,.simple-keyboard .hg-row .hg-button:not(:last-child){margin-right:5px}.simple-keyboard .hg-row>div:last-child{margin-right:0}.simple-keyboard .hg-row .hg-button-container{display:flex}.simple-keyboard .hg-button{display:inline-block;flex-grow:1;cursor:pointer}.simple-keyboard .hg-button span{pointer-events:none}.simple-keyboard.hg-theme-default{background-color:rgba(0,0,0,.1);padding:5px;border-radius:5px}.simple-keyboard.hg-theme-default .hg-button{box-shadow:0 0 3px -1px rgba(0,0,0,.3);height:40px;border-radius:5px;box-sizing:border-box;padding:5px;background:#fff;border-bottom:1px solid #b5b5b5;cursor:pointer;display:flex;align-items:center;justify-content:center}.simple-keyboard button.hg-button{border-width:0;outline:0;font-size:inherit}.simple-keyboard.hg-theme-default:not(.hg-touch-events) .hg-button:active{background:#e4e4e4}.simple-keyboard.hg-theme-default.hg-layout-numeric .hg-button{width:33.3%;height:60px;align-items:center;display:flex;justify-content:center}.simple-keyboard.hg-theme-default .hg-button.hg-button-numpadadd,.simple-keyboard.hg-theme-default .hg-button.hg-button-numpadenter{height:85px}.simple-keyboard.hg-theme-default .hg-button.hg-button-numpad0{width:105px}.simple-keyboard.hg-theme-default .hg-button.hg-button-com{max-width:85px}.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn.hg-button-at{max-width:45px}.simple-keyboard.hg-theme-default .hg-button.hg-selectedButton{background:rgba(5,25,70,.53);color:#fff}.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=".com"]{max-width:82px}.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn[data-skbtn="@"]{max-width:60px}

12
build/index.d.ts vendored
View File

@@ -1,7 +1,7 @@
declare module 'simple-keyboard' {
interface KeyboardLayoutObject {
default: string[];
shift?: string[];
shift?: any;
[key: string]: string[];
}
@@ -123,6 +123,11 @@ declare module 'simple-keyboard' {
*/
useMouseEvents?: boolean;
/**
* Disable button hold action.
*/
disableButtonHold?: boolean;
/**
* Executes the callback function on key press. Returns button layout name (i.e.: "{shift}").
*/
@@ -220,6 +225,11 @@ declare module 'simple-keyboard' {
* @param {string} button The button layout name to select
*/
getButtonElement(button: string): HTMLElement | HTMLElement[];
/**
* Clears keyboard listeners and DOM elements.
*/
destroy(): void;
}
export default Keyboard;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
/*!
*
* simple-keyboard v2.21.0 (Non-minified build)
* simple-keyboard v2.23.0 (Non-minified build)
* https://github.com/hodgef/simple-keyboard
*
* Copyright (c) Francisco Hodge (https://github.com/hodgef)
@@ -823,6 +823,8 @@
* @property {boolean} useTouchEvents Instructs simple-keyboard to use touch events instead of click events.
* @property {boolean} autoUseTouchEvents Enable useTouchEvents automatically when touch device is detected.
* @property {boolean} useMouseEvents Opt out of PointerEvents handling, falling back to the prior mouse event logic.
* @property {function} destroy Clears keyboard listeners and DOM elements.
* @property {boolean} disableButtonHold Disable button hold action.
*/ this.options = options;
this.options.layoutName = this.options.layoutName || "default";
this.options.theme = this.options.theme || "hg-theme-default";
@@ -958,15 +960,17 @@
/**
* @type {object} Time to wait until a key hold is detected
*/ }
this.holdTimeout = setTimeout(function() {
if (_this2.isMouseHold && (!button.includes("{") && !button.includes("}") || button === "{delete}" || button === "{backspace}" || button === "{bksp}" || button === "{space}" || button === "{tab}")) {
if (_this2.options.debug) {
console.log("Button held:", button);
if (!this.options.disableButtonHold) {
this.holdTimeout = setTimeout(function() {
if (_this2.isMouseHold && (!button.includes("{") && !button.includes("}") || button === "{delete}" || button === "{backspace}" || button === "{bksp}" || button === "{space}" || button === "{tab}")) {
if (_this2.options.debug) {
console.log("Button held:", button);
}
_this2.handleButtonHold(button, e);
}
_this2.handleButtonHold(button, e);
}
clearTimeout(_this2.holdTimeout);
}, 500);
clearTimeout(_this2.holdTimeout);
}, 500);
}
}
/**
* Handles button mouseup
@@ -1294,6 +1298,20 @@
});
}
/**
* Destroy keyboard listeners and DOM elements
*/ }, {
key: "destroy",
value: function destroy() {
/**
* Remove listeners
*/ document.removeEventListener("keyup", this.caretEventHandler);
document.removeEventListener("mouseup", this.caretEventHandler);
document.removeEventListener("touchend", this.caretEventHandler);
/**
* Clear DOM
*/ this.clear();
}
/**
* Process buttonTheme option
*/ }, {
key: "getButtonTheme",

9171
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "simple-keyboard",
"version": "2.21.0",
"version": "2.23.0",
"description": "On-screen Javascript Virtual Keyboard",
"main": "build/index.js",
"types": "build/index.d.ts",
@@ -40,65 +40,66 @@
],
"license": "MIT",
"devDependencies": {
"@babel/core": "7.4.4",
"@babel/core": "7.4.5",
"@babel/plugin-proposal-class-properties": "^7.4.4",
"@babel/preset-env": "^7.4.4",
"@babel/preset-react": "^7.0.0",
"@svgr/webpack": "4.2.0",
"@typescript-eslint/eslint-plugin": "1.7.0",
"@typescript-eslint/parser": "1.7.0",
"@babel/runtime": "^7.4.4",
"@svgr/webpack": "4.3.0",
"@typescript-eslint/eslint-plugin": "1.9.0",
"@typescript-eslint/parser": "1.9.0",
"babel-eslint": "10.0.1",
"babel-jest": "24.7.1",
"babel-loader": "8.0.5",
"babel-jest": "24.8.0",
"babel-loader": "8.0.6",
"babel-plugin-named-asset-import": "^0.3.2",
"babel-preset-react-app": "^8.0.0",
"babel-preset-react-app": "^9.0.0",
"case-sensitive-paths-webpack-plugin": "2.2.0",
"copy-webpack-plugin": "^5.0.2",
"copy-webpack-plugin": "^5.0.3",
"css-loader": "2.1.1",
"dotenv": "7.0.0",
"dotenv": "8.0.0",
"dotenv-expand": "5.1.0",
"eslint": "^5.16.0",
"eslint-config-react-app": "^4.0.0",
"eslint-config-react-app": "^4.0.1",
"eslint-loader": "2.1.2",
"eslint-plugin-flowtype": "3.6.1",
"eslint-plugin-import": "2.17.2",
"eslint-plugin-flowtype": "3.9.1",
"eslint-plugin-import": "2.17.3",
"eslint-plugin-jsx-a11y": "6.2.1",
"eslint-plugin-react": "7.12.4",
"eslint-plugin-react": "7.13.0",
"eslint-plugin-react-hooks": "^1.5.0",
"file-loader": "3.0.1",
"fs-extra": "7.0.1",
"fs-extra": "8.0.1",
"html-webpack-plugin": "4.0.0-beta.5",
"identity-obj-proxy": "3.0.0",
"is-wsl": "^2.0.0",
"jest": "24.7.1",
"jest": "24.8.0",
"jest-environment-jsdom-fourteen": "0.1.0",
"jest-resolve": "24.7.1",
"jest-watch-typeahead": "0.3.0",
"mini-css-extract-plugin": "0.6.0",
"jest-resolve": "24.8.0",
"jest-watch-typeahead": "0.3.1",
"mini-css-extract-plugin": "0.7.0",
"optimize-css-assets-webpack-plugin": "5.0.1",
"pnp-webpack-plugin": "1.4.3",
"postcss-flexbugs-fixes": "4.1.0",
"postcss-loader": "3.0.0",
"postcss-normalize": "7.0.1",
"postcss-normalize": "7.0.0",
"postcss-preset-env": "6.6.0",
"postcss-safe-parser": "4.0.1",
"prettier": "^1.17.0",
"prettier-webpack-plugin": "^1.2.0",
"react": "^16.8.6",
"react-app-polyfill": "^1.0.0",
"react-dev-utils": "^9.0.0",
"react-app-polyfill": "^1.0.1",
"react-dev-utils": "^9.0.1",
"react-dom": "^16.8.6",
"resolve": "1.10.1",
"resolve": "1.11.1",
"sass-loader": "7.1.0",
"semver": "6.0.0",
"semver": "6.1.1",
"style-loader": "0.23.1",
"terser-webpack-plugin": "1.2.3",
"terser-webpack-plugin": "1.3.0",
"uglifyjs-webpack-plugin": "^2.1.2",
"url-loader": "1.1.2",
"webpack": "4.30.0",
"webpack-dev-server": "3.3.1",
"webpack": "4.33.0",
"webpack-dev-server": "3.5.1",
"webpack-manifest-plugin": "2.0.4",
"workbox-webpack-plugin": "4.3.0"
"workbox-webpack-plugin": "4.3.1"
},
"eslintConfig": {
"extends": "react-app",

View File

@@ -1,7 +1,7 @@
declare module 'simple-keyboard' {
interface KeyboardLayoutObject {
default: string[];
shift?: string[];
shift?: any;
[key: string]: string[];
}
@@ -123,6 +123,11 @@ declare module 'simple-keyboard' {
*/
useMouseEvents?: boolean;
/**
* Disable button hold action.
*/
disableButtonHold?: boolean;
/**
* Executes the callback function on key press. Returns button layout name (i.e.: "{shift}").
*/
@@ -220,6 +225,11 @@ declare module 'simple-keyboard' {
* @param {string} button The button layout name to select
*/
getButtonElement(button: string): HTMLElement | HTMLElement[];
/**
* Clears keyboard listeners and DOM elements.
*/
destroy(): void;
}
export default Keyboard;

View File

@@ -64,6 +64,8 @@ class SimpleKeyboard {
* @property {boolean} useTouchEvents Instructs simple-keyboard to use touch events instead of click events.
* @property {boolean} autoUseTouchEvents Enable useTouchEvents automatically when touch device is detected.
* @property {boolean} useMouseEvents Opt out of PointerEvents handling, falling back to the prior mouse event logic.
* @property {function} destroy Clears keyboard listeners and DOM elements.
* @property {boolean} disableButtonHold Disable button hold action.
*/
this.options = options;
this.options.layoutName = this.options.layoutName || "default";
@@ -244,22 +246,24 @@ class SimpleKeyboard {
/**
* @type {object} Time to wait until a key hold is detected
*/
this.holdTimeout = setTimeout(() => {
if (
this.isMouseHold &&
((!button.includes("{") && !button.includes("}")) ||
button === "{delete}" ||
button === "{backspace}" ||
button === "{bksp}" ||
button === "{space}" ||
button === "{tab}")
) {
if (this.options.debug) console.log("Button held:", button);
if (!this.options.disableButtonHold) {
this.holdTimeout = setTimeout(() => {
if (
this.isMouseHold &&
((!button.includes("{") && !button.includes("}")) ||
button === "{delete}" ||
button === "{backspace}" ||
button === "{bksp}" ||
button === "{space}" ||
button === "{tab}")
) {
if (this.options.debug) console.log("Button held:", button);
this.handleButtonHold(button, e);
}
clearTimeout(this.holdTimeout);
}, 500);
this.handleButtonHold(button, e);
}
clearTimeout(this.holdTimeout);
}, 500);
}
}
/**
@@ -646,6 +650,23 @@ class SimpleKeyboard {
});
}
/**
* Destroy keyboard listeners and DOM elements
*/
destroy() {
/**
* Remove listeners
*/
document.removeEventListener("keyup", this.caretEventHandler);
document.removeEventListener("mouseup", this.caretEventHandler);
document.removeEventListener("touchend", this.caretEventHandler);
/**
* Clear DOM
*/
this.clear();
}
/**
* Process buttonTheme option
*/

View File

@@ -1222,4 +1222,24 @@ it('Keyboard inputName change will trigget caretPosition reset', () => {
keyboard.getButtonElement("b").onpointerdown();
expect(keyboard.caretPosition).toBe(null);
});
it('Keyboard destroy will work', () => {
testUtil.setDOM();
let keyboard = new Keyboard();
keyboard.destroy();
expect(keyboard.keyboardDOM.innerHTML).toBeFalsy();
});
it('Keyboard disableButtonHold will work', () => {
testUtil.setDOM();
let keyboard = new Keyboard({
disableButtonHold: true
});
expect(keyboard.options.disableButtonHold).toBe(true);
});