Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

test-keyboard

Package Overview
Dependencies
Maintainers
1
Versions
263
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

test-keyboard - npm Package Compare versions

Comparing version 1.0.0-next.34 to 1.0.0-next.35

10

CHANGELOG.md
# test-keyboard
## 1.0.0-next.35
> 2020-09-13
### Patch Changes
- Updated dependencies [[`725df02b`](https://github.com/remirror/remirror/commit/725df02b53fa16b9c7a3768b0c9464e739e35813), [`4fee3e94`](https://github.com/remirror/remirror/commit/4fee3e9400dd5557ddb24f6256e6d7219cef34ec)]:
- @remirror/core-helpers@1.0.0-next.35
- @remirror/core-types@1.0.0-next.35
## 1.0.0-next.34

@@ -4,0 +14,0 @@

44

dist/test-keyboard.browser.cjs.js

@@ -5,2 +5,4 @@ 'use strict';

var _createForOfIteratorHelper = require('@babel/runtime/helpers/createForOfIteratorHelper');
var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
var _defineProperty = require('@babel/runtime/helpers/defineProperty');

@@ -11,2 +13,4 @@ var coreHelpers = require('@remirror/core-helpers');

var _createForOfIteratorHelper__default = /*#__PURE__*/_interopDefault(_createForOfIteratorHelper);
var _objectSpread__default = /*#__PURE__*/_interopDefault(_objectSpread);
var _defineProperty__default = /*#__PURE__*/_interopDefault(_defineProperty);

@@ -1371,11 +1375,2 @@

function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default['default'](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
/**

@@ -1388,3 +1383,3 @@ * Creates a keyboard event which can be dispatched into the DOM

var createKeyboardEvent = (type, options) => new KeyboardEvent(type, _objectSpread(_objectSpread({}, options), {}, {
var createKeyboardEvent = (type, options) => new KeyboardEvent(type, _objectSpread__default['default'](_objectSpread__default['default']({}, options), {}, {
bubbles: true

@@ -1411,3 +1406,3 @@ }));

var _iterator = _createForOfIteratorHelper(modifiers),
var _iterator = _createForOfIteratorHelper__default['default'](modifiers),
_step;

@@ -1453,11 +1448,2 @@

function _createForOfIteratorHelper$1(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$1(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
function _unsupportedIterableToArray$1(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$1(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen); }
function _arrayLikeToArray$1(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1(Object(source), true).forEach(function (key) { _defineProperty__default['default'](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
class Keyboard {

@@ -1612,3 +1598,3 @@ static create(params) {

typing = _ref6.typing;
options = _objectSpread$1(_objectSpread$1({}, options), isUSKeyboardCharacter(text) ? cleanKey(text) : {
options = _objectSpread__default['default'](_objectSpread__default['default']({}, options), isUSKeyboardCharacter(text) ? cleanKey(text) : {
key: text

@@ -1640,3 +1626,3 @@ });

var _iterator = _createForOfIteratorHelper$1(text),
var _iterator = _createForOfIteratorHelper__default['default'](text),
_step;

@@ -1695,3 +1681,3 @@

text: result,
options: _objectSpread$1(_objectSpread$1({}, options), info)
options: _objectSpread__default['default'](_objectSpread__default['default']({}, options), info)
});

@@ -1749,3 +1735,3 @@ this.fireModifierEvents(info, 'keyup');

event({
options: _objectSpread$1(_objectSpread$1({}, this.defaultOptions), cleanKey('Shift'))
options: _objectSpread__default['default'](_objectSpread__default['default']({}, this.defaultOptions), cleanKey('Shift'))
});

@@ -1757,7 +1743,7 @@ }

event({
options: _objectSpread$1(_objectSpread$1({}, this.defaultOptions), cleanKey('Meta'))
options: _objectSpread__default['default'](_objectSpread__default['default']({}, this.defaultOptions), cleanKey('Meta'))
});
} else {
event({
options: _objectSpread$1(_objectSpread$1({}, this.defaultOptions), cleanKey('Control'))
options: _objectSpread__default['default'](_objectSpread__default['default']({}, this.defaultOptions), cleanKey('Control'))
});

@@ -1769,3 +1755,3 @@ }

event({
options: _objectSpread$1(_objectSpread$1({}, this.defaultOptions), cleanKey('Control'))
options: _objectSpread__default['default'](_objectSpread__default['default']({}, this.defaultOptions), cleanKey('Control'))
});

@@ -1776,3 +1762,3 @@ }

event({
options: _objectSpread$1(_objectSpread$1({}, this.defaultOptions), cleanKey('Alt'))
options: _objectSpread__default['default'](_objectSpread__default['default']({}, this.defaultOptions), cleanKey('Alt'))
});

@@ -1795,3 +1781,3 @@ }

var event = createKeyboardEvent(type, _objectSpread$1(_objectSpread$1({}, this.defaultOptions), options));
var event = createKeyboardEvent(type, _objectSpread__default['default'](_objectSpread__default['default']({}, this.defaultOptions), options));

@@ -1798,0 +1784,0 @@ var dispatch = () => {

@@ -0,1 +1,3 @@

import _createForOfIteratorHelper from '@babel/runtime/helpers/esm/createForOfIteratorHelper';
import _objectSpread from '@babel/runtime/helpers/esm/objectSpread2';
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';

@@ -1361,11 +1363,2 @@ import { isString, omit, object, take, includes } from '@remirror/core-helpers';

function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
/**

@@ -1441,11 +1434,2 @@ * Creates a keyboard event which can be dispatched into the DOM

function _createForOfIteratorHelper$1(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$1(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
function _unsupportedIterableToArray$1(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$1(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen); }
function _arrayLikeToArray$1(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
class Keyboard {

@@ -1600,3 +1584,3 @@ static create(params) {

typing = _ref6.typing;
options = _objectSpread$1(_objectSpread$1({}, options), isUSKeyboardCharacter(text) ? cleanKey(text) : {
options = _objectSpread(_objectSpread({}, options), isUSKeyboardCharacter(text) ? cleanKey(text) : {
key: text

@@ -1628,3 +1612,3 @@ });

var _iterator = _createForOfIteratorHelper$1(text),
var _iterator = _createForOfIteratorHelper(text),
_step;

@@ -1683,3 +1667,3 @@

text: result,
options: _objectSpread$1(_objectSpread$1({}, options), info)
options: _objectSpread(_objectSpread({}, options), info)
});

@@ -1737,3 +1721,3 @@ this.fireModifierEvents(info, 'keyup');

event({
options: _objectSpread$1(_objectSpread$1({}, this.defaultOptions), cleanKey('Shift'))
options: _objectSpread(_objectSpread({}, this.defaultOptions), cleanKey('Shift'))
});

@@ -1745,7 +1729,7 @@ }

event({
options: _objectSpread$1(_objectSpread$1({}, this.defaultOptions), cleanKey('Meta'))
options: _objectSpread(_objectSpread({}, this.defaultOptions), cleanKey('Meta'))
});
} else {
event({
options: _objectSpread$1(_objectSpread$1({}, this.defaultOptions), cleanKey('Control'))
options: _objectSpread(_objectSpread({}, this.defaultOptions), cleanKey('Control'))
});

@@ -1757,3 +1741,3 @@ }

event({
options: _objectSpread$1(_objectSpread$1({}, this.defaultOptions), cleanKey('Control'))
options: _objectSpread(_objectSpread({}, this.defaultOptions), cleanKey('Control'))
});

@@ -1764,3 +1748,3 @@ }

event({
options: _objectSpread$1(_objectSpread$1({}, this.defaultOptions), cleanKey('Alt'))
options: _objectSpread(_objectSpread({}, this.defaultOptions), cleanKey('Alt'))
});

@@ -1783,3 +1767,3 @@ }

var event = createKeyboardEvent(type, _objectSpread$1(_objectSpread$1({}, this.defaultOptions), options));
var event = createKeyboardEvent(type, _objectSpread(_objectSpread({}, this.defaultOptions), options));

@@ -1786,0 +1770,0 @@ var dispatch = () => {

@@ -5,2 +5,4 @@ 'use strict';

var _createForOfIteratorHelper = require('@babel/runtime/helpers/createForOfIteratorHelper');
var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
var _defineProperty = require('@babel/runtime/helpers/defineProperty');

@@ -11,2 +13,4 @@ var coreHelpers = require('@remirror/core-helpers');

var _createForOfIteratorHelper__default = /*#__PURE__*/_interopDefault(_createForOfIteratorHelper);
var _objectSpread__default = /*#__PURE__*/_interopDefault(_objectSpread);
var _defineProperty__default = /*#__PURE__*/_interopDefault(_defineProperty);

@@ -1371,11 +1375,2 @@

function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default['default'](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
/**

@@ -1388,3 +1383,3 @@ * Creates a keyboard event which can be dispatched into the DOM

var createKeyboardEvent = (type, options) => new KeyboardEvent(type, _objectSpread(_objectSpread({}, options), {}, {
var createKeyboardEvent = (type, options) => new KeyboardEvent(type, _objectSpread__default['default'](_objectSpread__default['default']({}, options), {}, {
bubbles: true

@@ -1411,3 +1406,3 @@ }));

var _iterator = _createForOfIteratorHelper(modifiers),
var _iterator = _createForOfIteratorHelper__default['default'](modifiers),
_step;

@@ -1453,11 +1448,2 @@

function _createForOfIteratorHelper$1(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$1(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
function _unsupportedIterableToArray$1(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$1(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen); }
function _arrayLikeToArray$1(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1(Object(source), true).forEach(function (key) { _defineProperty__default['default'](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
class Keyboard {

@@ -1612,3 +1598,3 @@ static create(params) {

typing = _ref6.typing;
options = _objectSpread$1(_objectSpread$1({}, options), isUSKeyboardCharacter(text) ? cleanKey(text) : {
options = _objectSpread__default['default'](_objectSpread__default['default']({}, options), isUSKeyboardCharacter(text) ? cleanKey(text) : {
key: text

@@ -1640,3 +1626,3 @@ });

var _iterator = _createForOfIteratorHelper$1(text),
var _iterator = _createForOfIteratorHelper__default['default'](text),
_step;

@@ -1695,3 +1681,3 @@

text: result,
options: _objectSpread$1(_objectSpread$1({}, options), info)
options: _objectSpread__default['default'](_objectSpread__default['default']({}, options), info)
});

@@ -1749,3 +1735,3 @@ this.fireModifierEvents(info, 'keyup');

event({
options: _objectSpread$1(_objectSpread$1({}, this.defaultOptions), cleanKey('Shift'))
options: _objectSpread__default['default'](_objectSpread__default['default']({}, this.defaultOptions), cleanKey('Shift'))
});

@@ -1757,7 +1743,7 @@ }

event({
options: _objectSpread$1(_objectSpread$1({}, this.defaultOptions), cleanKey('Meta'))
options: _objectSpread__default['default'](_objectSpread__default['default']({}, this.defaultOptions), cleanKey('Meta'))
});
} else {
event({
options: _objectSpread$1(_objectSpread$1({}, this.defaultOptions), cleanKey('Control'))
options: _objectSpread__default['default'](_objectSpread__default['default']({}, this.defaultOptions), cleanKey('Control'))
});

@@ -1769,3 +1755,3 @@ }

event({
options: _objectSpread$1(_objectSpread$1({}, this.defaultOptions), cleanKey('Control'))
options: _objectSpread__default['default'](_objectSpread__default['default']({}, this.defaultOptions), cleanKey('Control'))
});

@@ -1776,3 +1762,3 @@ }

event({
options: _objectSpread$1(_objectSpread$1({}, this.defaultOptions), cleanKey('Alt'))
options: _objectSpread__default['default'](_objectSpread__default['default']({}, this.defaultOptions), cleanKey('Alt'))
});

@@ -1795,3 +1781,3 @@ }

var event = createKeyboardEvent(type, _objectSpread$1(_objectSpread$1({}, this.defaultOptions), options));
var event = createKeyboardEvent(type, _objectSpread__default['default'](_objectSpread__default['default']({}, this.defaultOptions), options));

@@ -1798,0 +1784,0 @@ var dispatch = () => {

@@ -7,3 +7,3 @@ "use strict";

var _defineProperty = require("@babel/runtime/helpers/defineProperty"), coreHelpers = require("@remirror/core-helpers");
var _createForOfIteratorHelper = require("@babel/runtime/helpers/createForOfIteratorHelper"), _objectSpread = require("@babel/runtime/helpers/objectSpread2"), _defineProperty = require("@babel/runtime/helpers/defineProperty"), coreHelpers = require("@remirror/core-helpers");

@@ -16,3 +16,3 @@ function _interopDefault(e) {

var _defineProperty__default = _interopDefault(_defineProperty), rawUSKeyboardLayout = {
var _createForOfIteratorHelper__default = _interopDefault(_createForOfIteratorHelper), _objectSpread__default = _interopDefault(_objectSpread), _defineProperty__default = _interopDefault(_defineProperty), rawUSKeyboardLayout = {
0: {

@@ -1356,88 +1356,3 @@ keyCode: 48,

}
}, noKeyPress = [ "Power", "Eject", "Abort", "Help", "Backspace", "Tab", "Numpad5", "NumpadEnter", "Enter", "ShiftLeft", "ShiftRight", "ControlLeft", "ControlRight", "AltLeft", "AltRight", "Pause", "CapsLock", "Escape", "Convert", "NonConvert", "Space", "PageUp", "PageDown", "End", "Home", "ArrowLeft", "ArrowRight", "ArrowDown", "Select", "Open", "PrintScreen", "Delete", "MetaLeft", "MetaRight", "ContextMenu", "NumLock", "ScrollLock", "AudioVolumeMute", "AudioVolumeDown", "AudioVolumeUp", "MediaTrackNext", "MediaTrackPrevious", "MediaStop", "MediaPlayPause", "AltGraph", "Props", "Cancel", "Clear", "Shift", "Control", "Alt", "Accept", "ModeChange", "Print", "Execute", "Meta", "Attn", "CrSel", "ExSel", "EraseEof", "Play", "ZoomOut" ], noKeyUp = [ "CapsLock", "NumLock", "ScrollLock" ], usKeyboardLayout = rawUSKeyboardLayout, isUSKeyboardCharacter = char => coreHelpers.isString(char) && Object.keys(rawUSKeyboardLayout).includes(char);
function _createForOfIteratorHelper(o, allowArrayLike) {
var it;
if ("undefined" == typeof Symbol || null == o[Symbol.iterator]) {
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && "number" == typeof o.length) {
it && (o = it);
var i = 0, F = function() {};
return {
s: F,
n: function() {
return i >= o.length ? {
done: !0
} : {
done: !1,
value: o[i++]
};
},
e: function(_e) {
throw _e;
},
f: F
};
}
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
var err, normalCompletion = !0, didErr = !1;
return {
s: function() {
it = o[Symbol.iterator]();
},
n: function() {
var step = it.next();
return normalCompletion = step.done, step;
},
e: function(_e2) {
didErr = !0, err = _e2;
},
f: function() {
try {
normalCompletion || null == it.return || it.return();
} finally {
if (didErr) throw err;
}
}
};
}
function _unsupportedIterableToArray(o, minLen) {
if (o) {
if ("string" == typeof o) return _arrayLikeToArray(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
return "Object" === n && o.constructor && (n = o.constructor.name), "Map" === n || "Set" === n ? Array.from(o) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? _arrayLikeToArray(o, minLen) : void 0;
}
}
function _arrayLikeToArray(arr, len) {
(null == len || len > arr.length) && (len = arr.length);
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
return arr2;
}
function ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
enumerableOnly && (symbols = symbols.filter((function(sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
}))), keys.push.apply(keys, symbols);
}
return keys;
}
function _objectSpread(target) {
for (var i = 1; i < arguments.length; i++) {
var source = null != arguments[i] ? arguments[i] : {};
i % 2 ? ownKeys(Object(source), !0).forEach((function(key) {
_defineProperty__default.default(target, key, source[key]);
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach((function(key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
}));
}
return target;
}
var createKeyboardEvent = (type, options) => new KeyboardEvent(type, _objectSpread(_objectSpread({}, options), {}, {
}, noKeyPress = [ "Power", "Eject", "Abort", "Help", "Backspace", "Tab", "Numpad5", "NumpadEnter", "Enter", "ShiftLeft", "ShiftRight", "ControlLeft", "ControlRight", "AltLeft", "AltRight", "Pause", "CapsLock", "Escape", "Convert", "NonConvert", "Space", "PageUp", "PageDown", "End", "Home", "ArrowLeft", "ArrowRight", "ArrowDown", "Select", "Open", "PrintScreen", "Delete", "MetaLeft", "MetaRight", "ContextMenu", "NumLock", "ScrollLock", "AudioVolumeMute", "AudioVolumeDown", "AudioVolumeUp", "MediaTrackNext", "MediaTrackPrevious", "MediaStop", "MediaPlayPause", "AltGraph", "Props", "Cancel", "Clear", "Shift", "Control", "Alt", "Accept", "ModeChange", "Print", "Execute", "Meta", "Attn", "CrSel", "ExSel", "EraseEof", "Play", "ZoomOut" ], noKeyUp = [ "CapsLock", "NumLock", "ScrollLock" ], usKeyboardLayout = rawUSKeyboardLayout, isUSKeyboardCharacter = char => coreHelpers.isString(char) && Object.keys(rawUSKeyboardLayout).includes(char), createKeyboardEvent = (type, options) => new KeyboardEvent(type, _objectSpread__default.default(_objectSpread__default.default({}, options), {}, {
bubbles: !0

@@ -1450,3 +1365,3 @@ })), getModifierInformation = _ref => {

metaKey: !1
}, _iterator = _createForOfIteratorHelper(modifiers);
}, _iterator = _createForOfIteratorHelper__default.default(modifiers);
try {

@@ -1468,85 +1383,2 @@ for (_iterator.s(); !(_step = _iterator.n()).done; ) {

function _createForOfIteratorHelper$1(o, allowArrayLike) {
var it;
if ("undefined" == typeof Symbol || null == o[Symbol.iterator]) {
if (Array.isArray(o) || (it = _unsupportedIterableToArray$1(o)) || allowArrayLike && o && "number" == typeof o.length) {
it && (o = it);
var i = 0, F = function() {};
return {
s: F,
n: function() {
return i >= o.length ? {
done: !0
} : {
done: !1,
value: o[i++]
};
},
e: function(_e) {
throw _e;
},
f: F
};
}
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
var err, normalCompletion = !0, didErr = !1;
return {
s: function() {
it = o[Symbol.iterator]();
},
n: function() {
var step = it.next();
return normalCompletion = step.done, step;
},
e: function(_e2) {
didErr = !0, err = _e2;
},
f: function() {
try {
normalCompletion || null == it.return || it.return();
} finally {
if (didErr) throw err;
}
}
};
}
function _unsupportedIterableToArray$1(o, minLen) {
if (o) {
if ("string" == typeof o) return _arrayLikeToArray$1(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
return "Object" === n && o.constructor && (n = o.constructor.name), "Map" === n || "Set" === n ? Array.from(o) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? _arrayLikeToArray$1(o, minLen) : void 0;
}
}
function _arrayLikeToArray$1(arr, len) {
(null == len || len > arr.length) && (len = arr.length);
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
return arr2;
}
function ownKeys$1(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
enumerableOnly && (symbols = symbols.filter((function(sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
}))), keys.push.apply(keys, symbols);
}
return keys;
}
function _objectSpread$1(target) {
for (var i = 1; i < arguments.length; i++) {
var source = null != arguments[i] ? arguments[i] : {};
i % 2 ? ownKeys$1(Object(source), !0).forEach((function(key) {
_defineProperty__default.default(target, key, source[key]);
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach((function(key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
}));
}
return target;
}
class Keyboard {

@@ -1609,3 +1441,3 @@ static create(params) {

var text = _ref6.text, options = _ref6.options, typing = _ref6.typing;
return options = _objectSpread$1(_objectSpread$1({}, options), isUSKeyboardCharacter(text) ? cleanKey(text) : {
return options = _objectSpread__default.default(_objectSpread__default.default({}, options), isUSKeyboardCharacter(text) ? cleanKey(text) : {
key: text

@@ -1618,3 +1450,3 @@ }), this.fireAllEvents({

type(_ref7) {
var _step, text = _ref7.text, _ref7$options = _ref7.options, options = void 0 === _ref7$options ? coreHelpers.object() : _ref7$options, _iterator = _createForOfIteratorHelper$1(text);
var _step, text = _ref7.text, _ref7$options = _ref7.options, options = void 0 === _ref7$options ? coreHelpers.object() : _ref7$options, _iterator = _createForOfIteratorHelper__default.default(text);
try {

@@ -1645,3 +1477,3 @@ for (_iterator.s(); !(_step = _iterator.n()).done; ) {

text: result,
options: _objectSpread$1(_objectSpread$1({}, options), info)
options: _objectSpread__default.default(_objectSpread__default.default({}, options), info)
}), this.fireModifierEvents(info, "keyup"), this;

@@ -1662,11 +1494,11 @@ }

shiftKey && event({
options: _objectSpread$1(_objectSpread$1({}, this.defaultOptions), cleanKey("Shift"))
options: _objectSpread__default.default(_objectSpread__default.default({}, this.defaultOptions), cleanKey("Shift"))
}), metaKey && (this.isMac ? event({
options: _objectSpread$1(_objectSpread$1({}, this.defaultOptions), cleanKey("Meta"))
options: _objectSpread__default.default(_objectSpread__default.default({}, this.defaultOptions), cleanKey("Meta"))
}) : event({
options: _objectSpread$1(_objectSpread$1({}, this.defaultOptions), cleanKey("Control"))
options: _objectSpread__default.default(_objectSpread__default.default({}, this.defaultOptions), cleanKey("Control"))
})), ctrlKey && event({
options: _objectSpread$1(_objectSpread$1({}, this.defaultOptions), cleanKey("Control"))
options: _objectSpread__default.default(_objectSpread__default.default({}, this.defaultOptions), cleanKey("Control"))
}), altKey && event({
options: _objectSpread$1(_objectSpread$1({}, this.defaultOptions), cleanKey("Alt"))
options: _objectSpread__default.default(_objectSpread__default.default({}, this.defaultOptions), cleanKey("Alt"))
});

@@ -1676,3 +1508,3 @@ }

this.started || this.start();
var event = createKeyboardEvent(type, _objectSpread$1(_objectSpread$1({}, this.defaultOptions), options)), dispatch = () => {
var event = createKeyboardEvent(type, _objectSpread__default.default(_objectSpread__default.default({}, this.defaultOptions), options)), dispatch = () => {
this.target.dispatchEvent(event), this.onEventDispatch && this.onEventDispatch(event);

@@ -1679,0 +1511,0 @@ };

@@ -0,1 +1,3 @@

import _createForOfIteratorHelper from '@babel/runtime/helpers/esm/createForOfIteratorHelper';
import _objectSpread from '@babel/runtime/helpers/esm/objectSpread2';
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';

@@ -1361,11 +1363,2 @@ import { isString, omit, object, take, includes } from '@remirror/core-helpers';

function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
/**

@@ -1441,11 +1434,2 @@ * Creates a keyboard event which can be dispatched into the DOM

function _createForOfIteratorHelper$1(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$1(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
function _unsupportedIterableToArray$1(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$1(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen); }
function _arrayLikeToArray$1(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
class Keyboard {

@@ -1600,3 +1584,3 @@ static create(params) {

typing = _ref6.typing;
options = _objectSpread$1(_objectSpread$1({}, options), isUSKeyboardCharacter(text) ? cleanKey(text) : {
options = _objectSpread(_objectSpread({}, options), isUSKeyboardCharacter(text) ? cleanKey(text) : {
key: text

@@ -1628,3 +1612,3 @@ });

var _iterator = _createForOfIteratorHelper$1(text),
var _iterator = _createForOfIteratorHelper(text),
_step;

@@ -1683,3 +1667,3 @@

text: result,
options: _objectSpread$1(_objectSpread$1({}, options), info)
options: _objectSpread(_objectSpread({}, options), info)
});

@@ -1737,3 +1721,3 @@ this.fireModifierEvents(info, 'keyup');

event({
options: _objectSpread$1(_objectSpread$1({}, this.defaultOptions), cleanKey('Shift'))
options: _objectSpread(_objectSpread({}, this.defaultOptions), cleanKey('Shift'))
});

@@ -1745,7 +1729,7 @@ }

event({
options: _objectSpread$1(_objectSpread$1({}, this.defaultOptions), cleanKey('Meta'))
options: _objectSpread(_objectSpread({}, this.defaultOptions), cleanKey('Meta'))
});
} else {
event({
options: _objectSpread$1(_objectSpread$1({}, this.defaultOptions), cleanKey('Control'))
options: _objectSpread(_objectSpread({}, this.defaultOptions), cleanKey('Control'))
});

@@ -1757,3 +1741,3 @@ }

event({
options: _objectSpread$1(_objectSpread$1({}, this.defaultOptions), cleanKey('Control'))
options: _objectSpread(_objectSpread({}, this.defaultOptions), cleanKey('Control'))
});

@@ -1764,3 +1748,3 @@ }

event({
options: _objectSpread$1(_objectSpread$1({}, this.defaultOptions), cleanKey('Alt'))
options: _objectSpread(_objectSpread({}, this.defaultOptions), cleanKey('Alt'))
});

@@ -1783,3 +1767,3 @@ }

var event = createKeyboardEvent(type, _objectSpread$1(_objectSpread$1({}, this.defaultOptions), options));
var event = createKeyboardEvent(type, _objectSpread(_objectSpread({}, this.defaultOptions), options));

@@ -1786,0 +1770,0 @@ var dispatch = () => {

{
"name": "test-keyboard",
"version": "1.0.0-next.34",
"version": "1.0.0-next.35",
"description": "A test keyboard for composing fake keyboard events",

@@ -30,4 +30,4 @@ "keywords": [

"@babel/runtime": "^7.11.0",
"@remirror/core-helpers": "1.0.0-next.34",
"@remirror/core-types": "1.0.0-next.34"
"@remirror/core-helpers": "1.0.0-next.35",
"@remirror/core-types": "1.0.0-next.35"
},

@@ -34,0 +34,0 @@ "publishConfig": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc