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

@enact/spotlight

Package Overview
Dependencies
Maintainers
1
Versions
218
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@enact/spotlight - npm Package Compare versions

Comparing version 4.7.8 to 4.7.9

6

Accelerator/Accelerator.js

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

*/
var Accelerator = /*#__PURE__*/_createClass(
var Accelerator = exports.Accelerator = /*#__PURE__*/_createClass(
/**

@@ -170,4 +170,2 @@ * @constructor

});
exports.Accelerator = Accelerator;
var _default = Accelerator;
exports["default"] = _default;
var _default = exports["default"] = Accelerator;

@@ -5,2 +5,6 @@ # Change Log

## [4.7.9] - 2023-12-08
No significant changes.
## [4.7.8] - 2023-11-17

@@ -7,0 +11,0 @@

{
"name": "@enact/spotlight",
"version": "4.7.8",
"version": "4.7.9",
"description": "A focus management library",

@@ -27,6 +27,6 @@ "repository": {

"dependencies": {
"@enact/core": "^4.7.8",
"@enact/core": "^4.7.9",
"classnames": "^2.3.2",
"prop-types": "^15.8.1",
"ramda": "^0.29.0",
"ramda": "^0.29.1",
"react": "^18.2.0",

@@ -33,0 +33,0 @@ "react-dom": "^18.2.0",

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

*/
var Pause = /*#__PURE__*/function () {
var Pause = exports.Pause = /*#__PURE__*/function () {
/**

@@ -155,4 +155,2 @@ * Accepts a name for the instance

}();
exports.Pause = Pause;
var _default = Pause;
exports["default"] = _default;
var _default = exports["default"] = Pause;

@@ -11,4 +11,4 @@ "use strict";

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
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(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; }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

@@ -23,3 +23,3 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

};
var SpotlightContainer = /*#__PURE__*/function () {
var SpotlightContainer = exports.SpotlightContainer = /*#__PURE__*/function () {
function SpotlightContainer(_ref) {

@@ -151,4 +151,2 @@ var _this = this;

}();
exports.SpotlightContainer = SpotlightContainer;
var _default = SpotlightContainer;
exports["default"] = _default;
var _default = exports["default"] = SpotlightContainer;

@@ -41,4 +41,4 @@ "use strict";

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
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(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; }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

@@ -67,3 +67,3 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }

*/
var spotlightDefaultClass = 'spottable-default';
var spotlightDefaultClass = exports.spotlightDefaultClass = 'spottable-default';

@@ -76,3 +76,2 @@ /**

*/
exports.spotlightDefaultClass = spotlightDefaultClass;
var defaultConfig = {

@@ -200,3 +199,3 @@ /**

*/
var SpotlightContainerDecorator = (0, _hoc["default"])(defaultConfig, function (config, Wrapped) {
var SpotlightContainerDecorator = exports.SpotlightContainerDecorator = (0, _hoc["default"])(defaultConfig, function (config, Wrapped) {
var navigableFilter = config.navigableFilter,

@@ -296,4 +295,2 @@ preserveId = config.preserveId,

});
exports.SpotlightContainerDecorator = SpotlightContainerDecorator;
var _default = SpotlightContainerDecorator;
exports["default"] = _default;
var _default = exports["default"] = SpotlightContainerDecorator;

@@ -14,4 +14,4 @@ "use strict";

function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
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(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; }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

@@ -18,0 +18,0 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }

@@ -11,4 +11,4 @@ "use strict";

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
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(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; }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

@@ -15,0 +15,0 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }

@@ -120,3 +120,2 @@ "use strict";

}
var _default = useSpotlightContainer;
exports["default"] = _default;
var _default = exports["default"] = useSpotlightContainer;

@@ -36,4 +36,4 @@ "use strict";

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
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(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; }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

@@ -93,3 +93,3 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

*/
var SpotlightRootDecorator = (0, _hoc["default"])(defaultConfig, function (config, Wrapped) {
var SpotlightRootDecorator = exports.SpotlightRootDecorator = (0, _hoc["default"])(defaultConfig, function (config, Wrapped) {
var _class;

@@ -219,4 +219,2 @@ var noAutoFocus = config.noAutoFocus;

});
exports.SpotlightRootDecorator = SpotlightRootDecorator;
var _default = SpotlightRootDecorator;
exports["default"] = _default;
var _default = exports["default"] = SpotlightRootDecorator;

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

var _jsxRuntime = require("react/jsx-runtime");
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(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; }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

@@ -11,0 +11,0 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }

@@ -50,4 +50,4 @@ "use strict";

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
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(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; }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

@@ -126,3 +126,3 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }

*/
var Spottable = (0, _hoc["default"])(defaultConfig, function (config, Wrapped) {
var Spottable = exports.Spottable = (0, _hoc["default"])(defaultConfig, function (config, Wrapped) {
var emulateMouse = config.emulateMouse;

@@ -309,4 +309,2 @@ function SpottableBase(props) {

});
exports.Spottable = Spottable;
var _default = Spottable;
exports["default"] = _default;
var _default = exports["default"] = Spottable;

@@ -24,4 +24,3 @@ "use strict";

*/
var spottableClass = 'spottable';
exports.spottableClass = spottableClass;
var spottableClass = exports.spottableClass = 'spottable';
var isKeyboardAccessible = function isKeyboardAccessible(node) {

@@ -42,3 +41,3 @@ if (!node) return false;

var selectCancelled = false;
var SpottableCore = /*#__PURE__*/function () {
var SpottableCore = exports.SpottableCore = /*#__PURE__*/function () {
function SpottableCore(_ref) {

@@ -243,4 +242,2 @@ var _this = this;

}();
exports.SpottableCore = SpottableCore;
var _default = SpottableCore;
exports["default"] = _default;
var _default = exports["default"] = SpottableCore;

@@ -8,4 +8,4 @@ "use strict";

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
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(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; }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

@@ -12,0 +12,0 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }

@@ -27,4 +27,4 @@ "use strict";

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
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(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; }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

@@ -31,0 +31,0 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }

@@ -19,4 +19,4 @@ "use strict";

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
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(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; }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

@@ -78,3 +78,3 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }

var useSpottable = function useSpottable() {
var useSpottable = exports.useSpottable = function useSpottable() {
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},

@@ -126,4 +126,2 @@ spotRef = _ref.spotRef,

};
exports.useSpottable = useSpottable;
var _default = useSpottable;
exports["default"] = _default;
var _default = exports["default"] = useSpottable;

@@ -40,4 +40,4 @@ "use strict";

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
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(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; }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

@@ -57,4 +57,3 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }

*/
var containerAttribute = 'data-spotlight-id';
exports.containerAttribute = containerAttribute;
var containerAttribute = exports.containerAttribute = 'data-spotlight-id';
var containerConfigs = new Map();

@@ -65,4 +64,3 @@ var containerKey = 'spotlightId';

var containerSelector = '[data-spotlight-container]';
var rootContainerId = 'spotlightRootDecorator';
exports.rootContainerId = rootContainerId;
var rootContainerId = exports.rootContainerId = 'spotlightRootDecorator';
var reverseDirections = {

@@ -203,3 +201,3 @@ 'left': 'right',

*/
var getContainerConfig = function getContainerConfig(id) {
var getContainerConfig = exports.getContainerConfig = function getContainerConfig(id) {
return containerConfigs.get(id);

@@ -217,4 +215,3 @@ };

*/
exports.getContainerConfig = getContainerConfig;
var isContainer = function isContainer(nodeOrId) {
var isContainer = exports.isContainer = function isContainer(nodeOrId) {
if (typeof nodeOrId === 'string') {

@@ -235,3 +232,2 @@ return containerConfigs.has(nodeOrId);

*/
exports.isContainer = isContainer;
var isContainerEnabled = function isContainerEnabled(node) {

@@ -252,3 +248,3 @@ return mapContainers(node, function (container) {

*/
var getContainerId = function getContainerId(node) {
var getContainerId = exports.getContainerId = function getContainerId(node) {
return node.dataset[containerKey];

@@ -266,3 +262,2 @@ };

*/
exports.getContainerId = getContainerId;
var getContainerSelector = function getContainerSelector(node) {

@@ -300,3 +295,3 @@ if (isContainerNode(node)) {

*/
var getContainerNode = function getContainerNode(containerId) {
var getContainerNode = exports.getContainerNode = function getContainerNode(containerId) {
if (!containerId) {

@@ -321,3 +316,2 @@ return null;

*/
exports.getContainerNode = getContainerNode;
var navigableFilter = function navigableFilter(node, containerId) {

@@ -370,3 +364,3 @@ var nodeStyle = node && (0, _snapshot.isWindowReady)() && window.getComputedStyle(node);

*/
var getSpottableDescendants = function getSpottableDescendants(containerId) {
var getSpottableDescendants = exports.getSpottableDescendants = function getSpottableDescendants(containerId) {
var node = getContainerNode(containerId);

@@ -404,4 +398,3 @@

*/
exports.getSpottableDescendants = getSpottableDescendants;
var getDeepSpottableDescendants = function getDeepSpottableDescendants(containerId, excludedContainers) {
var getDeepSpottableDescendants = exports.getDeepSpottableDescendants = function getDeepSpottableDescendants(containerId, excludedContainers) {
return getSpottableDescendants(containerId).map(function (n) {

@@ -429,4 +422,3 @@ if (isContainer(n)) {

*/
exports.getDeepSpottableDescendants = getDeepSpottableDescendants;
var isContainer5WayHoldable = function isContainer5WayHoldable(containerId) {
var isContainer5WayHoldable = exports.isContainer5WayHoldable = function isContainer5WayHoldable(containerId) {
var config = getContainerConfig(containerId);

@@ -446,3 +438,2 @@ return config && config.continue5WayHold || false;

*/
exports.isContainer5WayHoldable = isContainer5WayHoldable;
function getContainersForNode(node) {

@@ -542,3 +533,3 @@ var containers = mapContainers(node, getContainerId);

*/
var configureContainer = function configureContainer() {
var configureContainer = exports.configureContainer = function configureContainer() {
var containerId, config;

@@ -575,4 +566,3 @@ if (typeof (arguments.length <= 0 ? undefined : arguments[0]) === 'object') {

*/
exports.configureContainer = configureContainer;
var addContainer = function addContainer() {
var addContainer = exports.addContainer = function addContainer() {
var containerId = configureContainer.apply(void 0, arguments);

@@ -593,4 +583,3 @@ var config = getContainerConfig(containerId);

*/
exports.addContainer = addContainer;
var removeContainer = function removeContainer(containerId) {
var removeContainer = exports.removeContainer = function removeContainer(containerId) {
containerConfigs["delete"](containerId);

@@ -606,4 +595,3 @@ };

*/
exports.removeContainer = removeContainer;
var removeAllContainers = function removeAllContainers() {
var removeAllContainers = exports.removeAllContainers = function removeAllContainers() {
containerConfigs.clear();

@@ -621,4 +609,3 @@ };

*/
exports.removeAllContainers = removeAllContainers;
var configureDefaults = function configureDefaults(config) {
var configureDefaults = exports.configureDefaults = function configureDefaults(config) {
GlobalConfig = mergeConfig(GlobalConfig, config);

@@ -638,4 +625,3 @@ };

*/
exports.configureDefaults = configureDefaults;
var isNavigable = function isNavigable(node, containerId, verify) {
var isNavigable = exports.isNavigable = function isNavigable(node, containerId, verify) {
if (!node ||

@@ -664,4 +650,3 @@ // jsdom reports all nodes as having no size so we must skip this condition in our tests

*/
exports.isNavigable = isNavigable;
var getAllContainerIds = function getAllContainerIds() {
var getAllContainerIds = exports.getAllContainerIds = function getAllContainerIds() {
var ids = [];

@@ -690,3 +675,2 @@ var keys = containerConfigs.keys();

*/
exports.getAllContainerIds = getAllContainerIds;
function getContainerDefaultElement(containerId, preferredEnterTo) {

@@ -693,0 +677,0 @@ var config = getContainerConfig(containerId);

@@ -23,7 +23,6 @@ "use strict";

};
var activateInputType = function activateInputType(activated) {
var activateInputType = exports.activateInputType = function activateInputType(activated) {
input.activated = activated;
};
exports.activateInputType = activateInputType;
var getInputType = function getInputType() {
var getInputType = exports.getInputType = function getInputType() {
return Object.keys(input.types).find(function (type) {

@@ -33,4 +32,3 @@ return input.types[type];

};
exports.getInputType = getInputType;
var setInputType = function setInputType(inputType) {
var setInputType = exports.setInputType = function setInputType(inputType) {
if (Object.prototype.hasOwnProperty.call(input.types, inputType) && !input.types[inputType]) {

@@ -44,4 +42,3 @@ Object.keys(input.types).map(function (type) {

};
exports.setInputType = setInputType;
var applyInputTypeToNode = function applyInputTypeToNode(node) {
var applyInputTypeToNode = exports.applyInputTypeToNode = function applyInputTypeToNode(node) {
Object.keys(input.types).map(function (type) {

@@ -52,4 +49,3 @@ node.classList.toggle('spotlight-input-' + type, input.types[type]);

};
exports.applyInputTypeToNode = applyInputTypeToNode;
var getInputInfo = function getInputInfo() {
var getInputInfo = exports.getInputInfo = function getInputInfo() {
return {

@@ -59,3 +55,2 @@ activated: input.activated,

};
};
exports.getInputInfo = getInputInfo;
};

@@ -350,3 +350,2 @@ "use strict";

}
var _default = navigate;
exports["default"] = _default;
var _default = exports["default"] = navigate;

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

*/
var setPointerMode = function setPointerMode(pointerMode) {
var setPointerMode = exports.setPointerMode = function setPointerMode(pointerMode) {
_pointerMode = pointerMode;

@@ -44,4 +44,3 @@ };

*/
exports.setPointerMode = setPointerMode;
var getPointerMode = function getPointerMode() {
var getPointerMode = exports.getPointerMode = function getPointerMode() {
return _pointerMode;

@@ -51,3 +50,2 @@ };

// Cached pointer position
exports.getPointerMode = getPointerMode;
var _pointerX = null;

@@ -66,3 +64,3 @@ var _pointerY = null;

*/
var hasPointerMoved = function hasPointerMoved(x, y) {
var hasPointerMoved = exports.hasPointerMoved = function hasPointerMoved(x, y) {
return x !== _pointerX || y !== _pointerY;

@@ -82,4 +80,3 @@ };

*/
exports.hasPointerMoved = hasPointerMoved;
var updatePointerPosition = function updatePointerPosition(x, y) {
var updatePointerPosition = exports.updatePointerPosition = function updatePointerPosition(x, y) {
// Chrome emits mousemove on scroll, but client coordinates do not change.

@@ -102,4 +99,3 @@ if (hasPointerMoved(x, y)) {

*/
exports.updatePointerPosition = updatePointerPosition;
var getLastPointerPosition = function getLastPointerPosition() {
var getLastPointerPosition = exports.getLastPointerPosition = function getLastPointerPosition() {
return {

@@ -115,3 +111,2 @@ x: _pointerX,

// event, but not too large that another unrelated event can be fired inside the window
exports.getLastPointerPosition = getLastPointerPosition;
var hidePointerJob = new _util.Job(function (callback) {

@@ -135,3 +130,3 @@ setPointerMode(false);

*/
var notifyPointerMove = function notifyPointerMove(current, target, x, y) {
var notifyPointerMove = exports.notifyPointerMove = function notifyPointerMove(current, target, x, y) {
var priorPointerMode = getPointerMode();

@@ -160,4 +155,3 @@ if (updatePointerPosition(x, y)) {

*/
exports.notifyPointerMove = notifyPointerMove;
var notifyKeyDown = function notifyKeyDown(keyCode, callback) {
var notifyKeyDown = exports.notifyKeyDown = function notifyKeyDown(keyCode, callback) {
var _window$webOSSystem;

@@ -177,3 +171,2 @@ var webOSSystem = (_window$webOSSystem = window.webOSSystem) !== null && _window$webOSSystem !== void 0 ? _window$webOSSystem : window.PalmSystem;

return false;
};
exports.notifyKeyDown = notifyKeyDown;
};

@@ -55,6 +55,5 @@ "use strict";

*/
var getDirection = function getDirection(keyCode) {
var getDirection = exports.getDirection = function getDirection(keyCode) {
return isDown(keyCode) && 'down' || isLeft(keyCode) && 'left' || isRight(keyCode) && 'right' || isUp(keyCode) && 'up';
};
exports.getDirection = getDirection;
var SpotlightAccelerator = new _Accelerator["default"]();

@@ -82,3 +81,3 @@

*/
var Spotlight = function () {
var Spotlight = exports.Spotlight = function () {
'use strict';

@@ -813,4 +812,2 @@

}();
exports.Spotlight = Spotlight;
var _default = Spotlight;
exports["default"] = _default;
var _default = exports["default"] = Spotlight;

@@ -19,4 +19,4 @@ "use strict";

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
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(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; }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

@@ -161,47 +161,48 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }

var _loop = function _loop() {
var overlappingContainerId = getContainerContainingRect(elementRects, positionRect);
var overlappingContainerId = getContainerContainingRect(elementRects, positionRect);
// if the pointer is within a container that is a candidate element, we need to ignore container
// `enterTo` preferences and retrieve its spottable descendants and try to navigate to them.
if (overlappingContainerId) {
next = getTargetInContainerByDirectionFromPosition(direction, overlappingContainerId, positionRect, elementContainerIds, boundingRect);
if (!next) {
// filter out the container and try again
elementRects = elementRects.filter(function (rect) {
return rect.element.dataset.spotlightId !== overlappingContainerId;
});
return "continue";
// if the pointer is within a container that is a candidate element, we need to ignore container
// `enterTo` preferences and retrieve its spottable descendants and try to navigate to them.
if (overlappingContainerId) {
next = getTargetInContainerByDirectionFromPosition(direction, overlappingContainerId, positionRect, elementContainerIds, boundingRect);
if (!next) {
// filter out the container and try again
elementRects = elementRects.filter(function (rect) {
return rect.element.dataset.spotlightId !== overlappingContainerId;
});
return 0; // continue
}
// found a target so break out and return
return 1; // break
}
// found a target so break out and return
return "break";
}
// try to navigate from position to one of the candidates in containerId
next = (0, _navigate["default"])(positionRect, direction, elementRects, (0, _container.getContainerConfig)(containerId));
// try to navigate from position to one of the candidates in containerId
next = (0, _navigate["default"])(positionRect, direction, elementRects, (0, _container.getContainerConfig)(containerId));
// if we match a container, recurse into it
if (next && (0, _container.isContainer)(next)) {
var nextContainerId = next.dataset.spotlightId;
// if we match a container, recurse into it
if (next && (0, _container.isContainer)(next)) {
var nextContainerId = next.dataset.spotlightId;
// need to cache this reference so we can filter it out later if necessary
var lastNavigated = next;
next = getTargetInContainerByDirectionFromPosition(direction, nextContainerId, positionRect, elementContainerIds, getOverflowContainerRect(nextContainerId) || boundingRect);
if (!next) {
// filter out the container and try again
elementRects = elementRects.filter(function (rect) {
return rect.element !== lastNavigated;
});
return "continue";
// need to cache this reference so we can filter it out later if necessary
var lastNavigated = next;
next = getTargetInContainerByDirectionFromPosition(direction, nextContainerId, positionRect, elementContainerIds, getOverflowContainerRect(nextContainerId) || boundingRect);
if (!next) {
// filter out the container and try again
elementRects = elementRects.filter(function (rect) {
return rect.element !== lastNavigated;
});
return 0; // continue
}
}
}
// If we've met every condition and haven't explicitly retried the search via `continue`,
// break out and return
return "break";
};
// If we've met every condition and haven't explicitly retried the search via `continue`,
// break out and return
return 1; // break
},
_ret;
while (elementRects.length > 0) {
var _ret = _loop();
if (_ret === "continue") continue;
if (_ret === "break") break;
_ret = _loop();
if (_ret === 0) continue;
if (_ret === 1) break;
}

@@ -232,65 +233,66 @@ return next;

var _loop2 = function _loop2() {
var overlappingContainerId = getContainerContainingRect(elementRects, elementRect);
var overlappingContainerId = getContainerContainingRect(elementRects, elementRect);
// if the next element is a container AND the current element is *visually* contained within
// one of the candidate elements, we need to ignore container `enterTo` preferences and
// retrieve its spottable descendants and try to navigate to them.
if (overlappingContainerId) {
next = getTargetInContainerByDirectionFromElement(direction, overlappingContainerId, element, elementRect, elementContainerIds, boundingRect);
if (!next) {
// filter out the container and try again
elementRects = elementRects.filter(function (rect) {
return rect.element.dataset.spotlightId !== overlappingContainerId;
});
return "continue";
// if the next element is a container AND the current element is *visually* contained within
// one of the candidate elements, we need to ignore container `enterTo` preferences and
// retrieve its spottable descendants and try to navigate to them.
if (overlappingContainerId) {
next = getTargetInContainerByDirectionFromElement(direction, overlappingContainerId, element, elementRect, elementContainerIds, boundingRect);
if (!next) {
// filter out the container and try again
elementRects = elementRects.filter(function (rect) {
return rect.element.dataset.spotlightId !== overlappingContainerId;
});
return 0; // continue
}
// found a target so break out and return
return 1; // break
}
// found a target so break out and return
return "break";
}
// If one of the downstream containers is configured for partition, we use that
// container's bounds as the partition rect for navigation.
var partitionContainer = elementContainerIds.slice(elementContainerIds.indexOf(containerId) + 1).find(function (id) {
var cfg = (0, _container.getContainerConfig)(id);
return cfg && cfg.partition;
});
var partitionRect = elementRect;
if (partitionContainer) {
partitionRect = (0, _utils.getContainerRect)(partitionContainer);
}
// If one of the downstream containers is configured for partition, we use that
// container's bounds as the partition rect for navigation.
var partitionContainer = elementContainerIds.slice(elementContainerIds.indexOf(containerId) + 1).find(function (id) {
var cfg = (0, _container.getContainerConfig)(id);
return cfg && cfg.partition;
});
var partitionRect = elementRect;
if (partitionContainer) {
partitionRect = (0, _utils.getContainerRect)(partitionContainer);
}
// try to navigate from element to one of the candidates in containerId
next = (0, _navigate["default"])(elementRect, direction, elementRects, (0, _container.getContainerConfig)(containerId), partitionRect);
// try to navigate from element to one of the candidates in containerId
next = (0, _navigate["default"])(elementRect, direction, elementRects, (0, _container.getContainerConfig)(containerId), partitionRect);
// if we match a container,
if (next && (0, _container.isContainer)(next)) {
var nextContainerId = next.dataset.spotlightId;
// if we match a container,
if (next && (0, _container.isContainer)(next)) {
var nextContainerId = next.dataset.spotlightId;
// need to cache this reference so we can filter it out later if necessary
var lastNavigated = next;
// need to cache this reference so we can filter it out later if necessary
var lastNavigated = next;
// and it is restricted, return its target
if (isRestrictedContainer(nextContainerId)) {
next = getTargetByContainer(nextContainerId);
} else {
// otherwise, recurse into it
next = getTargetInContainerByDirectionFromElement(direction, nextContainerId, element, elementRect, elementContainerIds, getOverflowContainerRect(nextContainerId) || boundingRect);
// and it is restricted, return its target
if (isRestrictedContainer(nextContainerId)) {
next = getTargetByContainer(nextContainerId);
} else {
// otherwise, recurse into it
next = getTargetInContainerByDirectionFromElement(direction, nextContainerId, element, elementRect, elementContainerIds, getOverflowContainerRect(nextContainerId) || boundingRect);
}
if (!next) {
elementRects = elementRects.filter(function (rect) {
return rect.element !== lastNavigated;
});
return 0; // continue
}
}
if (!next) {
elementRects = elementRects.filter(function (rect) {
return rect.element !== lastNavigated;
});
return "continue";
}
}
// If we've met every condition and haven't explicitly retried the search via `continue`,
// break out and return
return "break";
};
// If we've met every condition and haven't explicitly retried the search via `continue`,
// break out and return
return 1; // break
},
_ret2;
while (elementRects.length > 0) {
var _ret2 = _loop2();
if (_ret2 === "continue") continue;
if (_ret2 === "break") break;
_ret2 = _loop2();
if (_ret2 === 0) continue;
if (_ret2 === 1) break;
}

@@ -431,5 +433,4 @@ return next;

};
var getNearestTargetFromPosition = function getNearestTargetFromPosition(position, containerId) {
var getNearestTargetFromPosition = exports.getNearestTargetFromPosition = function getNearestTargetFromPosition(position, containerId) {
return getNavigableTarget(document.elementFromPoint(position.x, position.y)) || getNearestTargetInContainerFromPosition(position, containerId);
};
exports.getNearestTargetFromPosition = getNearestTargetFromPosition;
};

@@ -10,10 +10,9 @@ "use strict";

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
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(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; }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
var join = _ramda["default"].unapply(_ramda["default"].join('\n'));
exports.join = join;
var testScenario = function testScenario(scenario, callback) {
var join = exports.join = _ramda["default"].unapply(_ramda["default"].join('\n'));
var testScenario = exports.testScenario = function testScenario(scenario, callback) {
return function () {

@@ -32,8 +31,6 @@ var rootId = 'test-root';

};
exports.testScenario = testScenario;
var _id = 1;
var generateContainerId = function generateContainerId() {
var generateContainerId = exports.generateContainerId = function generateContainerId() {
return "".concat(_container.containerAttribute, "=").concat(_id++);
};
exports.generateContainerId = generateContainerId;
var coerceProps = function coerceProps(v) {

@@ -48,3 +45,3 @@ if (typeof v === 'object') {

};
var node = function node(props) {
var node = exports.node = function node(props) {
var children = '';

@@ -68,4 +65,3 @@ var attributes = '';

};
exports.node = node;
var spottable = function spottable(props) {
var spottable = exports.spottable = function spottable(props) {
return node(_objectSpread({

@@ -75,4 +71,3 @@ className: 'spottable'

};
exports.spottable = spottable;
var container = function container(props) {
var container = exports.container = function container(props) {
var _objectSpread2;

@@ -83,10 +78,5 @@ return node(_objectSpread((_objectSpread2 = {}, _defineProperty(_objectSpread2, _container.containerAttribute, _id++), _defineProperty(_objectSpread2, 'data-spotlight-container', true), _objectSpread2), coerceProps(props)));

// eslint-disable-next-line react-hooks/rules-of-hooks
exports.container = container;
var someNodes = _ramda["default"].useWith(_ramda["default"].compose(_ramda["default"].join('\n'), _ramda["default"].map), [_ramda["default"].identity, _ramda["default"].range(0)]);
exports.someNodes = someNodes;
var someSpottables = someNodes(spottable);
exports.someSpottables = someSpottables;
var someContainers = someNodes(container);
exports.someContainers = someContainers;
var someSpottablesAndContainers = _ramda["default"].converge(_ramda["default"].concat, [someSpottables, someContainers]);
exports.someSpottablesAndContainers = someSpottablesAndContainers;
var someNodes = exports.someNodes = _ramda["default"].useWith(_ramda["default"].compose(_ramda["default"].join('\n'), _ramda["default"].map), [_ramda["default"].identity, _ramda["default"].range(0)]);
var someSpottables = exports.someSpottables = someNodes(spottable);
var someContainers = exports.someContainers = someNodes(container);
var someSpottablesAndContainers = exports.someSpottablesAndContainers = _ramda["default"].converge(_ramda["default"].concat, [someSpottables, someContainers]);

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

}
var matchSelector = (0, _curry["default"])(function (selector, elem) {
var matchSelector = exports.matchSelector = (0, _curry["default"])(function (selector, elem) {
if (typeof selector === 'string') {

@@ -37,3 +37,2 @@ return elementMatchesSelector.call(elem, selector);

});
exports.matchSelector = matchSelector;
function parseSelector(selector) {

@@ -82,10 +81,8 @@ var result = [];

};
var intersects = (0, _curry["default"])(function (containerRect, elementRect) {
var intersects = exports.intersects = (0, _curry["default"])(function (containerRect, elementRect) {
return testIntersection('intersects', containerRect, elementRect);
});
exports.intersects = intersects;
var contains = (0, _curry["default"])(function (containerRect, elementRect) {
var contains = exports.contains = (0, _curry["default"])(function (containerRect, elementRect) {
return testIntersection('contains', containerRect, elementRect);
});
exports.contains = contains;
function getRect(elem) {

@@ -92,0 +89,0 @@ var cr = elem.getBoundingClientRect();

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