@enact/spotlight 4.7.9 → 4.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports["default"] = exports.Accelerator = void 0;
7
7
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
8
8
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
9
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
10
- 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); }
9
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
10
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
11
11
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
12
12
  /**
13
13
  * Provides the {@link spotlight/Accelerator.Accelerator} class.
package/CHANGELOG.md CHANGED
@@ -2,10 +2,22 @@
2
2
 
3
3
  The following is a curated list of changes in the Enact spotlight module, newest changes on the top.
4
4
 
5
+ ## [4.8.0] - 2024-02-08
6
+
7
+ No significant changes.
8
+
5
9
  ## [4.7.9] - 2023-12-08
6
10
 
7
11
  No significant changes.
8
12
 
13
+ ## [4.5.6] - 2023-11-30
14
+
15
+ No significant changes.
16
+
17
+ ## [4.0.13] - 2022-11-29
18
+
19
+ No significant changes.
20
+
9
21
  ## [4.7.8] - 2023-11-17
10
22
 
11
23
  No significant changes.
package/Pause/Pause.js CHANGED
@@ -10,8 +10,8 @@ exports.resume = _resume;
10
10
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
11
11
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
12
12
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
13
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
14
- 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); }
13
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
14
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
15
15
  /**
16
16
  * Provides a class which allows consumers to safely pause and resume spotlight without resuming
17
17
  * another consumer's pause.
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
 
3
3
  var _Pause = _interopRequireWildcard(require("../Pause"));
4
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
5
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
4
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
5
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
6
6
  var PAUSED = 'Paused';
7
7
  var NOT_PAUSED = 'Not Paused';
8
8
  describe('Pause', function () {
package/README.md CHANGED
@@ -43,7 +43,7 @@ Spotlight is based on a fork of [JavaScript SpatialNavigation](https://github.co
43
43
  Unless otherwise specified, all content, including all source code files and
44
44
  documentation files in this repository are:
45
45
 
46
- Copyright (c) 2012-2023 LG Electronics
46
+ Copyright (c) 2012-2024 LG Electronics
47
47
 
48
48
  Unless otherwise specified or set forth in the NOTICE file, all content,
49
49
  including all source code files and documentation files in this repository are:
@@ -14,8 +14,8 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
14
14
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
15
15
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
16
16
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
17
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
18
- 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); }
17
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
18
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
19
19
  var isNewPointerPosition = function isNewPointerPosition(ev) {
20
20
  return (0, _pointer.hasPointerMoved)(ev.clientX, ev.clientY);
21
21
  };
@@ -26,8 +26,8 @@ var _excluded = ["navigableFilter", "preserveId"],
26
26
  * @exports SpotlightContainerDecorator
27
27
  */
28
28
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
29
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
30
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
29
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
30
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
31
31
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
32
32
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
33
33
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
@@ -41,8 +41,8 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
41
41
  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; }
42
42
  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; }
43
43
  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; }
44
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
45
- 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); }
44
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
45
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
46
46
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
47
47
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
48
48
  var callContext = function callContext(name) {
@@ -14,8 +14,8 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
14
14
  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; }
15
15
  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; }
16
16
  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; }
17
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
18
- 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); }
17
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
18
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
19
19
  var testId = 'test-spotlightContainerDecorator';
20
20
  describe('SpotlightContainerDecorator', function () {
21
21
  var hoverPosition = {
@@ -11,8 +11,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
11
11
  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; }
12
12
  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; }
13
13
  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; }
14
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
15
- 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); }
14
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
15
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
16
16
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
17
17
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
18
18
  function containerExists(id) {
@@ -83,6 +83,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
83
83
  * event flow.
84
84
  * @private
85
85
  */
86
+
86
87
  /**
87
88
  * Support Spotlight container
88
89
  *
@@ -39,8 +39,8 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
39
39
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
40
40
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
41
41
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
42
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
43
- 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); }
42
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
43
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
44
44
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
45
45
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
46
46
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
@@ -48,17 +48,17 @@ function _possibleConstructorReturn(self, call) { if (call && (typeof call === "
48
48
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
49
49
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
50
50
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } /**
51
- * Exports the {@link spotlight/SpotlightRootDecorator.SpotlightRootDecorator}
52
- * higher-order component.
53
- *
54
- * @module spotlight/SpotlightRootDecorator
55
- * @exports SpotlightRootDecorator
56
- */ /**
57
- * Default configuration for SpotlightRootDecorator
58
- *
59
- * @hocconfig
60
- * @memberof spotlight/SpotlightRootDecorator.SpotlightRootDecorator
61
- */
51
+ * Exports the {@link spotlight/SpotlightRootDecorator.SpotlightRootDecorator}
52
+ * higher-order component.
53
+ *
54
+ * @module spotlight/SpotlightRootDecorator
55
+ * @exports SpotlightRootDecorator
56
+ */ /**
57
+ * Default configuration for SpotlightRootDecorator
58
+ *
59
+ * @hocconfig
60
+ * @memberof spotlight/SpotlightRootDecorator.SpotlightRootDecorator
61
+ */
62
62
  var defaultConfig = {
63
63
  /**
64
64
  * When `true`, the contents of the component will not receive spotlight focus after being rendered.
@@ -7,8 +7,8 @@ var _jsxRuntime = require("react/jsx-runtime");
7
7
  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; }
8
8
  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; }
9
9
  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; }
10
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
11
- 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); }
10
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
11
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
12
12
  describe('SpotlightRootDecorator', function () {
13
13
  var AppBase = function AppBase(props) {
14
14
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", _objectSpread(_objectSpread({
@@ -35,8 +35,8 @@ var _excluded = ["className", "disabled", "handleForceUpdate", "onSpotlightDisap
35
35
  * @exports spottableClass
36
36
  */
37
37
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
38
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
39
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
38
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
39
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
40
40
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
41
41
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
42
42
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
@@ -50,8 +50,8 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
50
50
  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; }
51
51
  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; }
52
52
  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; }
53
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
54
- 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); }
53
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
54
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
55
55
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
56
56
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
57
57
  var forwardMouseDown = (0, _handle.forward)('onMouseDown'),
@@ -11,8 +11,8 @@ var _spotlight = require("../src/spotlight");
11
11
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
12
12
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
13
13
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
14
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
15
- 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); }
14
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
15
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
16
16
  var REMOTE_OK_KEY = 16777221;
17
17
 
18
18
  /**
@@ -8,8 +8,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
8
8
  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; }
9
9
  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; }
10
10
  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
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
12
- 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); }
11
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
12
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
13
13
  var id = 'test-spottable';
14
14
  describe('Spottable', function () {
15
15
  test('should add the spottable class', function () {
@@ -12,8 +12,8 @@ var _useSpottable = _interopRequireDefault(require("../useSpottable"));
12
12
  var _jsxRuntime = require("react/jsx-runtime");
13
13
  var _excluded = ["className", "component", "componentRef", "disabled", "emulateMouse", "onSelectionCancel", "onSpotlightDisappear", "onSpotlightDown", "onSpotlightLeft", "onSpotlightRight", "onSpotlightUp", "selectionKeys", "spotlightDisabled", "spotlightId"];
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
16
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
16
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
17
17
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
18
18
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
19
19
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
@@ -27,8 +27,8 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
27
27
  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; }
28
28
  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; }
29
29
  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; }
30
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
31
- 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); }
30
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
31
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
32
32
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
33
33
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
34
34
  var forwardMouseUp = (0, _handle.forward)('onMouseUp'),
@@ -19,8 +19,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
19
19
  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; }
20
20
  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; }
21
21
  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; }
22
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
23
- 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); }
22
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
23
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
24
24
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
25
25
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
26
26
  var ENTER_KEY = 13;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enact/spotlight",
3
- "version": "4.7.9",
3
+ "version": "4.8.0",
4
4
  "description": "A focus management library",
5
5
  "repository": {
6
6
  "type": "git",
@@ -11,6 +11,7 @@
11
11
  "main": "src/spotlight.js",
12
12
  "scripts": {
13
13
  "clean": "enact clean",
14
+ "interlink": "npm link ../core",
14
15
  "lint": "enact lint --strict",
15
16
  "test": "enact test",
16
17
  "test-json": "enact test --json",
@@ -24,8 +25,8 @@
24
25
  }
25
26
  },
26
27
  "dependencies": {
27
- "@enact/core": "^4.7.9",
28
- "classnames": "^2.3.2",
28
+ "@enact/core": "^4.8.0",
29
+ "classnames": "^2.5.1",
29
30
  "prop-types": "^15.8.1",
30
31
  "ramda": "^0.29.1",
31
32
  "react": "^18.2.0",
package/src/container.js CHANGED
@@ -40,19 +40,19 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
40
40
  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; }
41
41
  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; }
42
42
  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; }
43
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
44
- 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); }
43
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
44
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
45
45
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
46
46
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
47
47
  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); }
48
48
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
49
49
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
50
50
  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; } /**
51
- * Exports methods and members for creating and maintaining spotlight containers.
52
- *
53
- * @module spotlight/container
54
- * @private
55
- */
51
+ * Exports methods and members for creating and maintaining spotlight containers.
52
+ *
53
+ * @module spotlight/container
54
+ * @private
55
+ */
56
56
  var containerAttribute = exports.containerAttribute = 'data-spotlight-id';
57
57
  var containerConfigs = new Map();
58
58
  var containerKey = 'spotlightId';
package/src/target.js CHANGED
@@ -19,8 +19,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
19
19
  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; }
20
20
  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; }
21
21
  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; }
22
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
23
- 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); }
22
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
23
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
24
24
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
25
25
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
26
26
  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); }
@@ -362,7 +362,6 @@ function getNavigableTarget(target) {
362
362
  parent = target.parentNode;
363
363
  target = parent === document ? null : parent; // calling isNavigable on document is problematic
364
364
  }
365
-
366
365
  return target;
367
366
  }
368
367
  var getOffsetDistanceToTargetFromPosition = function getOffsetDistanceToTargetFromPosition(distance, direction, _ref, _ref2) {
@@ -2,10 +2,9 @@
2
2
 
3
3
  var _container17 = require("../container");
4
4
  var _utils = require("./utils");
5
- var _node, _container, _container2, _container3, _container4, _container5, _container6, _container7, _container8, _container9, _container10, _container11, _container12, _container13, _container15, _container16;
6
5
  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; }
7
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
8
- 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); }
6
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
7
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
9
8
  var nonSpottable = function nonSpottable() {
10
9
  return (0, _utils.node)({
11
10
  className: 'other'
@@ -17,50 +16,50 @@ var scenarios = {
17
16
  spottableAndContainers: (0, _utils.someSpottablesAndContainers)(5),
18
17
  nonSpottableSiblings: (0, _utils.join)((0, _utils.someSpottables)(5), (0, _utils.someNodes)(nonSpottable, 5)),
19
18
  nestedContainers: (0, _utils.container)((0, _utils.container)((0, _utils.container)())),
20
- disabledContainers: (0, _utils.join)((0, _utils.someSpottables)(5), (0, _utils.someContainers)(5), (0, _utils.node)((_node = {}, _defineProperty(_node, _container17.containerAttribute, 'disabled-container'), _defineProperty(_node, 'data-spotlight-container-disabled', true), _node))),
19
+ disabledContainers: (0, _utils.join)((0, _utils.someSpottables)(5), (0, _utils.someContainers)(5), (0, _utils.node)(_defineProperty(_defineProperty({}, _container17.containerAttribute, 'disabled-container'), 'data-spotlight-container-disabled', true))),
21
20
  nestedContainersWithSpottables: (0, _utils.join)((0, _utils.someSpottables)(5), (0, _utils.container)({
22
21
  children: (0, _utils.someSpottables)(5)
23
22
  })),
24
- siblingContainers: (0, _utils.join)((0, _utils.container)((_container = {}, _defineProperty(_container, _container17.containerAttribute, 'first'), _defineProperty(_container, "children", (0, _utils.someSpottables)(5)), _container)), (0, _utils.container)((_container2 = {}, _defineProperty(_container2, _container17.containerAttribute, 'second'), _defineProperty(_container2, "children", (0, _utils.someSpottables)(5)), _container2))),
25
- mixedOrder: (0, _utils.join)((0, _utils.container)((_container3 = {}, _defineProperty(_container3, _container17.containerAttribute, 'first'), _defineProperty(_container3, "name", 'c1'), _container3)), (0, _utils.spottable)({
23
+ siblingContainers: (0, _utils.join)((0, _utils.container)(_defineProperty(_defineProperty({}, _container17.containerAttribute, 'first'), "children", (0, _utils.someSpottables)(5))), (0, _utils.container)(_defineProperty(_defineProperty({}, _container17.containerAttribute, 'second'), "children", (0, _utils.someSpottables)(5)))),
24
+ mixedOrder: (0, _utils.join)((0, _utils.container)(_defineProperty(_defineProperty({}, _container17.containerAttribute, 'first'), "name", 'c1')), (0, _utils.spottable)({
26
25
  name: 's1'
27
- }), (0, _utils.container)((_container4 = {}, _defineProperty(_container4, _container17.containerAttribute, 'second'), _defineProperty(_container4, "name", 'c2'), _container4)), (0, _utils.spottable)({
26
+ }), (0, _utils.container)(_defineProperty(_defineProperty({}, _container17.containerAttribute, 'second'), "name", 'c2')), (0, _utils.spottable)({
28
27
  name: 's2'
29
28
  })),
30
- complexTree: (0, _utils.join)((0, _utils.spottable)(nonSpottable()), (0, _utils.container)((_container7 = {}, _defineProperty(_container7, _container17.containerAttribute, 'first-container'), _defineProperty(_container7, "children", (0, _utils.join)((0, _utils.someSpottables)(2), (0, _utils.container)((_container6 = {}, _defineProperty(_container6, _container17.containerAttribute, 'second-container'), _defineProperty(_container6, "children", (0, _utils.join)((0, _utils.spottable)({
29
+ complexTree: (0, _utils.join)((0, _utils.spottable)(nonSpottable()), (0, _utils.container)(_defineProperty(_defineProperty({}, _container17.containerAttribute, 'first-container'), "children", (0, _utils.join)((0, _utils.someSpottables)(2), (0, _utils.container)(_defineProperty(_defineProperty({}, _container17.containerAttribute, 'second-container'), "children", (0, _utils.join)((0, _utils.spottable)({
31
30
  id: 'secondContainerFirstSpottable'
32
- }), (0, _utils.someSpottables)(2), (0, _utils.container)((_container5 = {}, _defineProperty(_container5, _container17.containerAttribute, 'third-container'), _defineProperty(_container5, 'data-spotlight-container-disabled', true), _defineProperty(_container5, "children", (0, _utils.join)((0, _utils.someSpottables)(4), (0, _utils.node)({
31
+ }), (0, _utils.someSpottables)(2), (0, _utils.container)(_defineProperty(_defineProperty(_defineProperty({}, _container17.containerAttribute, 'third-container'), 'data-spotlight-container-disabled', true), "children", (0, _utils.join)((0, _utils.someSpottables)(4), (0, _utils.node)({
33
32
  id: 'child-of-third'
34
- }))), _container5)))), _container6)))), _container7))),
35
- spottablesInDisabledContainer: (0, _utils.container)((_container8 = {}, _defineProperty(_container8, _container17.containerAttribute, 'container'), _defineProperty(_container8, 'data-spotlight-container-disabled', true), _defineProperty(_container8, "children", (0, _utils.someSpottables)(5)), _container8)),
36
- spottablesInNestedDisabledContainer: (0, _utils.container)((_container10 = {}, _defineProperty(_container10, _container17.containerAttribute, 'container'), _defineProperty(_container10, 'data-spotlight-container-disabled', true), _defineProperty(_container10, "children", (0, _utils.container)((_container9 = {}, _defineProperty(_container9, _container17.containerAttribute, 'child'), _defineProperty(_container9, "children", (0, _utils.someSpottables)(5)), _container9))), _container10)),
37
- containerWithDefaultAndLastFocused: (0, _utils.container)((_container11 = {}, _defineProperty(_container11, _container17.containerAttribute, 'container'), _defineProperty(_container11, "children", (0, _utils.join)((0, _utils.spottable)({
33
+ }))))))))))),
34
+ spottablesInDisabledContainer: (0, _utils.container)(_defineProperty(_defineProperty(_defineProperty({}, _container17.containerAttribute, 'container'), 'data-spotlight-container-disabled', true), "children", (0, _utils.someSpottables)(5))),
35
+ spottablesInNestedDisabledContainer: (0, _utils.container)(_defineProperty(_defineProperty(_defineProperty({}, _container17.containerAttribute, 'container'), 'data-spotlight-container-disabled', true), "children", (0, _utils.container)(_defineProperty(_defineProperty({}, _container17.containerAttribute, 'child'), "children", (0, _utils.someSpottables)(5))))),
36
+ containerWithDefaultAndLastFocused: (0, _utils.container)(_defineProperty(_defineProperty({}, _container17.containerAttribute, 'container'), "children", (0, _utils.join)((0, _utils.spottable)({
38
37
  id: 'firstSpottable'
39
38
  }), (0, _utils.someSpottables)(5), (0, _utils.node)({
40
39
  id: 'spottableDefault',
41
40
  className: 'spottable spottable-default'
42
41
  }), (0, _utils.spottable)({
43
42
  id: 'lastFocused'
44
- }))), _container11)),
45
- nestedContainersWithDefaultAndLastFocused: (0, _utils.container)((_container13 = {}, _defineProperty(_container13, _container17.containerAttribute, 'container'), _defineProperty(_container13, "children", (0, _utils.join)((0, _utils.spottable)({
43
+ })))),
44
+ nestedContainersWithDefaultAndLastFocused: (0, _utils.container)(_defineProperty(_defineProperty({}, _container17.containerAttribute, 'container'), "children", (0, _utils.join)((0, _utils.spottable)({
46
45
  id: 'firstSpottable'
47
- }), (0, _utils.someSpottables)(5), (0, _utils.container)((_container12 = {}, _defineProperty(_container12, _container17.containerAttribute, 'child'), _defineProperty(_container12, "id", 'spottableDefault'), _defineProperty(_container12, "className", 'spottable-default'), _defineProperty(_container12, "children", (0, _utils.join)((0, _utils.spottable)({
46
+ }), (0, _utils.someSpottables)(5), (0, _utils.container)(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, _container17.containerAttribute, 'child'), "id", 'spottableDefault'), "className", 'spottable-default'), "children", (0, _utils.join)((0, _utils.spottable)({
48
47
  id: 'firstChildSpottable'
49
48
  }), (0, _utils.someSpottables)(5), (0, _utils.spottable)({
50
49
  id: 'lastChildFocused'
51
- }))), _container12)), (0, _utils.spottable)({
50
+ })))), (0, _utils.spottable)({
52
51
  id: 'lastFocused'
53
- }))), _container13)),
54
- emptySubcontainer: (0, _utils.container)((_container15 = {}, _defineProperty(_container15, _container17.containerAttribute, 'container'), _defineProperty(_container15, "children", (0, _utils.join)((0, _utils.container)(_defineProperty({}, _container17.containerAttribute, 'subcontainer')), (0, _utils.spottable)({
52
+ })))),
53
+ emptySubcontainer: (0, _utils.container)(_defineProperty(_defineProperty({}, _container17.containerAttribute, 'container'), "children", (0, _utils.join)((0, _utils.container)(_defineProperty({}, _container17.containerAttribute, 'subcontainer')), (0, _utils.spottable)({
55
54
  id: 'afterSubcontainer'
56
- }))), _container15)),
55
+ })))),
57
56
  owned: (0, _utils.join)((0, _utils.spottable)({
58
57
  id: 's1'
59
58
  }), (0, _utils.node)({
60
59
  id: 'n1'
61
- }), (0, _utils.container)((_container16 = {}, _defineProperty(_container16, _container17.containerAttribute, 'container'), _defineProperty(_container16, 'aria-owns', 's1 n1'), _defineProperty(_container16, "children", (0, _utils.spottable)({
60
+ }), (0, _utils.container)(_defineProperty(_defineProperty(_defineProperty({}, _container17.containerAttribute, 'container'), 'aria-owns', 's1 n1'), "children", (0, _utils.spottable)({
62
61
  id: 's2'
63
- })), _container16)))
62
+ }))))
64
63
  };
65
64
  var setupContainers = function setupContainers() {
66
65
  (0, _container17.configureDefaults)({
@@ -3,11 +3,10 @@
3
3
  var _container4 = require("../container");
4
4
  var _spotlight = _interopRequireDefault(require("../spotlight"));
5
5
  var _utils = require("./utils");
6
- var _container, _container2, _container3;
7
6
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
8
7
  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; }
9
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
10
- 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); }
8
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
9
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
11
10
  var nonSpottable = function nonSpottable() {
12
11
  return (0, _utils.node)({
13
12
  className: 'other'
@@ -16,11 +15,11 @@ var nonSpottable = function nonSpottable() {
16
15
  var scenarios = {
17
16
  complexTree: (0, _utils.join)((0, _utils.spottable)({
18
17
  'data-spotlight-id': 's1'
19
- }), (0, _utils.spottable)(nonSpottable()), (0, _utils.container)((_container3 = {}, _defineProperty(_container3, _container4.containerAttribute, 'first-container'), _defineProperty(_container3, "children", (0, _utils.join)((0, _utils.someSpottables)(2), (0, _utils.container)((_container2 = {}, _defineProperty(_container2, _container4.containerAttribute, 'second-container'), _defineProperty(_container2, "children", (0, _utils.join)((0, _utils.spottable)({
18
+ }), (0, _utils.spottable)(nonSpottable()), (0, _utils.container)(_defineProperty(_defineProperty({}, _container4.containerAttribute, 'first-container'), "children", (0, _utils.join)((0, _utils.someSpottables)(2), (0, _utils.container)(_defineProperty(_defineProperty({}, _container4.containerAttribute, 'second-container'), "children", (0, _utils.join)((0, _utils.spottable)({
20
19
  id: 'secondContainerFirstSpottable'
21
- }), (0, _utils.someSpottables)(2), (0, _utils.container)((_container = {}, _defineProperty(_container, _container4.containerAttribute, 'third-container'), _defineProperty(_container, 'data-spotlight-container-disabled', true), _defineProperty(_container, "children", (0, _utils.join)((0, _utils.someSpottables)(4), (0, _utils.node)({
20
+ }), (0, _utils.someSpottables)(2), (0, _utils.container)(_defineProperty(_defineProperty(_defineProperty({}, _container4.containerAttribute, 'third-container'), 'data-spotlight-container-disabled', true), "children", (0, _utils.join)((0, _utils.someSpottables)(4), (0, _utils.node)({
22
21
  id: 'child-of-third'
23
- }))), _container)))), _container2)))), _container3)))
22
+ })))))))))))
24
23
  };
25
24
  var setupContainers = function setupContainers() {
26
25
  _spotlight["default"].setPointerMode(false);
@@ -3,10 +3,9 @@
3
3
  var _container12 = require("../container");
4
4
  var _target = require("../target");
5
5
  var _utils = require("./utils");
6
- var _container2, _container3, _container4, _container5, _container6, _container7, _container8, _container9, _container10, _container11;
7
6
  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; }
8
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
9
- 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); }
7
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
8
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
10
9
  var nonSpottable = function nonSpottable() {
11
10
  return (0, _utils.node)({
12
11
  className: 'other'
@@ -22,18 +21,17 @@ var positionedSpottable = function positionedSpottable(id, top, left) {
22
21
  });
23
22
  };
24
23
  var grid = function grid() {
25
- var _container;
26
- return (0, _utils.container)((_container = {}, _defineProperty(_container, _container12.containerAttribute, 'grid'), _defineProperty(_container, "style", 'position: relative; height: 30px; width: 30px;'), _defineProperty(_container, "children", (0, _utils.join)(positionedSpottable('top-left', 0, 0), positionedSpottable('top-center', 0, 10), positionedSpottable('top-right', 0, 20), positionedSpottable('middle-left', 10, 0), positionedSpottable('middle-center', 10, 10), positionedSpottable('middle-right', 10, 20), positionedSpottable('bottom-left', 20, 0), positionedSpottable('bottom-center', 20, 10), positionedSpottable('bottom-right', 20, 20))), _container));
24
+ return (0, _utils.container)(_defineProperty(_defineProperty(_defineProperty({}, _container12.containerAttribute, 'grid'), "style", 'position: relative; height: 30px; width: 30px;'), "children", (0, _utils.join)(positionedSpottable('top-left', 0, 0), positionedSpottable('top-center', 0, 10), positionedSpottable('top-right', 0, 20), positionedSpottable('middle-left', 10, 0), positionedSpottable('middle-center', 10, 10), positionedSpottable('middle-right', 10, 20), positionedSpottable('bottom-left', 20, 0), positionedSpottable('bottom-center', 20, 10), positionedSpottable('bottom-right', 20, 20))));
27
25
  };
28
26
  var scenarios = {
29
- complexTree: (0, _utils.join)((0, _utils.spottable)(nonSpottable()), (0, _utils.container)((_container4 = {}, _defineProperty(_container4, _container12.containerAttribute, 'first-container'), _defineProperty(_container4, "children", (0, _utils.join)((0, _utils.someSpottables)(2), (0, _utils.container)((_container3 = {}, _defineProperty(_container3, _container12.containerAttribute, 'second-container'), _defineProperty(_container3, "children", (0, _utils.join)((0, _utils.someSpottables)(3), (0, _utils.container)((_container2 = {}, _defineProperty(_container2, _container12.containerAttribute, 'third-container'), _defineProperty(_container2, 'data-spotlight-container-disabled', true), _defineProperty(_container2, "children", (0, _utils.join)((0, _utils.someSpottables)(4), (0, _utils.node)({
27
+ complexTree: (0, _utils.join)((0, _utils.spottable)(nonSpottable()), (0, _utils.container)(_defineProperty(_defineProperty({}, _container12.containerAttribute, 'first-container'), "children", (0, _utils.join)((0, _utils.someSpottables)(2), (0, _utils.container)(_defineProperty(_defineProperty({}, _container12.containerAttribute, 'second-container'), "children", (0, _utils.join)((0, _utils.someSpottables)(3), (0, _utils.container)(_defineProperty(_defineProperty(_defineProperty({}, _container12.containerAttribute, 'third-container'), 'data-spotlight-container-disabled', true), "children", (0, _utils.join)((0, _utils.someSpottables)(4), (0, _utils.node)({
30
28
  id: 'child-of-third'
31
- }))), _container2)))), _container3)))), _container4))),
29
+ }))))))))))),
32
30
  nonSpottableInContainer: (0, _utils.join)((0, _utils.spottable)({
33
31
  id: 'in-root'
34
- }), (0, _utils.container)((_container5 = {}, _defineProperty(_container5, _container12.containerAttribute, 'first'), _defineProperty(_container5, "children", (0, _utils.join)(nonSpottable(), (0, _utils.spottable)({
32
+ }), (0, _utils.container)(_defineProperty(_defineProperty({}, _container12.containerAttribute, 'first'), "children", (0, _utils.join)(nonSpottable(), (0, _utils.spottable)({
35
33
  id: 'in-first'
36
- }))), _container5)), (0, _utils.container)((_container6 = {}, _defineProperty(_container6, _container12.containerAttribute, 'second'), _defineProperty(_container6, "children", (0, _utils.join)(nonSpottable())), _container6))),
34
+ })))), (0, _utils.container)(_defineProperty(_defineProperty({}, _container12.containerAttribute, 'second'), "children", (0, _utils.join)(nonSpottable())))),
37
35
  grid: (0, _utils.join)((0, _utils.spottable)({
38
36
  id: 'before-grid',
39
37
  style: 'height: 10px'
@@ -53,7 +51,7 @@ var scenarios = {
53
51
  }), (0, _utils.node)({
54
52
  // allocate some empty space so that overflow items would be otherwise navigable
55
53
  style: 'height: 100px'
56
- }), (0, _utils.container)((_container7 = {}, _defineProperty(_container7, _container12.containerAttribute, 'overflow-container'), _defineProperty(_container7, "style", 'position: relative; height: 30px; width: 30px;'), _defineProperty(_container7, "children", (0, _utils.join)((0, _utils.spottable)({
54
+ }), (0, _utils.container)(_defineProperty(_defineProperty(_defineProperty({}, _container12.containerAttribute, 'overflow-container'), "style", 'position: relative; height: 30px; width: 30px;'), "children", (0, _utils.join)((0, _utils.spottable)({
57
55
  id: 'overflow-above',
58
56
  style: 'position: absolute; top: -10px; left: 0px; height: 10px; width: 10px;'
59
57
  }), (0, _utils.spottable)({
@@ -62,23 +60,23 @@ var scenarios = {
62
60
  }), (0, _utils.spottable)({
63
61
  id: 'overflow-within',
64
62
  style: 'position: absolute; top: 0px; left: 0px; height: 10px; width: 10px;'
65
- }))), _container7))),
63
+ }))))),
66
64
  overflowLargeSubContainer: (0, _utils.join)((0, _utils.spottable)({
67
65
  id: 'outside-overflow'
68
66
  }), (0, _utils.node)({
69
67
  // allocate some empty space so that overflow items would be otherwise navigable
70
68
  style: 'height: 100px'
71
- }), (0, _utils.container)((_container9 = {}, _defineProperty(_container9, _container12.containerAttribute, 'overflow-container'), _defineProperty(_container9, "style", 'position: relative; height: 30px; width: 30px;'), _defineProperty(_container9, "children", (0, _utils.join)((0, _utils.container)((_container8 = {}, _defineProperty(_container8, _container12.containerAttribute, 'inside'), _defineProperty(_container8, "style", 'position: absolute; top: -10px; left: 0px; height: 50px; width: 10px;'), _defineProperty(_container8, "children", (0, _utils.join)((0, _utils.node)({
69
+ }), (0, _utils.container)(_defineProperty(_defineProperty(_defineProperty({}, _container12.containerAttribute, 'overflow-container'), "style", 'position: relative; height: 30px; width: 30px;'), "children", (0, _utils.join)((0, _utils.container)(_defineProperty(_defineProperty(_defineProperty({}, _container12.containerAttribute, 'inside'), "style", 'position: absolute; top: -10px; left: 0px; height: 50px; width: 10px;'), "children", (0, _utils.join)((0, _utils.node)({
72
70
  // allocate space to push following spottable into view
73
71
  style: 'height: 10px'
74
72
  }), (0, _utils.spottable)({
75
73
  id: 'in-large-container'
76
- }))), _container8)), (0, _utils.spottable)({
74
+ })))), (0, _utils.spottable)({
77
75
  id: 'below-large-container',
78
76
  style: 'position: absolute; top: 40px; left: 0px; height: 10px; width: 10px;'
79
- }))), _container9))),
80
- emptyContainer: (0, _utils.join)(positionedSpottable('above', 0, 10), (0, _utils.container)((_container10 = {}, _defineProperty(_container10, _container12.containerAttribute, 'empty-container'), _defineProperty(_container10, "style", position(10, 10)), _container10)), positionedSpottable('below', 30, 0)),
81
- emptyContainerOverlap: (0, _utils.join)(positionedSpottable('above', 5, 10), (0, _utils.container)((_container11 = {}, _defineProperty(_container11, _container12.containerAttribute, 'empty-container'), _defineProperty(_container11, "style", position(10, 10)), _container11)), positionedSpottable('below', 30, 0))
77
+ }))))),
78
+ emptyContainer: (0, _utils.join)(positionedSpottable('above', 0, 10), (0, _utils.container)(_defineProperty(_defineProperty({}, _container12.containerAttribute, 'empty-container'), "style", position(10, 10))), positionedSpottable('below', 30, 0)),
79
+ emptyContainerOverlap: (0, _utils.join)(positionedSpottable('above', 5, 10), (0, _utils.container)(_defineProperty(_defineProperty({}, _container12.containerAttribute, 'empty-container'), "style", position(10, 10))), positionedSpottable('below', 30, 0))
82
80
  };
83
81
  var safeTarget = function safeTarget(n, fn) {
84
82
  return n ? fn(n) : 'NOT FOUND';
@@ -10,8 +10,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
10
10
  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; }
11
11
  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; }
12
12
  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; }
13
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
14
- 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); }
13
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
14
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
15
15
  var join = exports.join = _ramda["default"].unapply(_ramda["default"].join('\n'));
16
16
  var testScenario = exports.testScenario = function testScenario(scenario, callback) {
17
17
  return function () {
@@ -65,8 +65,7 @@ var spottable = exports.spottable = function spottable(props) {
65
65
  }, coerceProps(props)));
66
66
  };
67
67
  var container = exports.container = function container(props) {
68
- var _objectSpread2;
69
- return node(_objectSpread((_objectSpread2 = {}, _defineProperty(_objectSpread2, _container.containerAttribute, _id++), _defineProperty(_objectSpread2, 'data-spotlight-container', true), _objectSpread2), coerceProps(props)));
68
+ return node(_objectSpread(_defineProperty(_defineProperty({}, _container.containerAttribute, _id++), 'data-spotlight-container', true), coerceProps(props)));
70
69
  };
71
70
 
72
71
  // eslint-disable-next-line react-hooks/rules-of-hooks
package/src/utils.js CHANGED
@@ -73,7 +73,6 @@ var testIntersection = function testIntersection(type, containerRect, elementRec
73
73
  b > T - epsilon && b < B + epsilon // bottom
74
74
  ;
75
75
  }
76
-
77
76
  return true;
78
77
  };
79
78
  var intersects = exports.intersects = (0, _curry["default"])(function (containerRect, elementRect) {