New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@enact/spotlight

Package Overview
Dependencies
Maintainers
1
Versions
219
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 3.4.8 to 3.4.9-experimental-1

10

CHANGELOG.md

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

## [3.4.9-experimental-1] - 2020-11-19
### Changed
- `spotlight/SpotlightRootDecorator` to remove focus effect when touching up
## [3.4.9] - 2020-10-30
No significant changes.
## [3.4.8] - 2020-10-08

@@ -7,0 +17,0 @@

4

package.json
{
"name": "@enact/spotlight",
"version": "3.4.8",
"version": "3.4.9-experimental-1",
"description": "A focus management library",

@@ -21,3 +21,3 @@ "main": "src/spotlight.js",

"dependencies": {
"@enact/core": "^3.4.8",
"@enact/core": "^3.4.9-experimental-1",
"prop-types": "^15.7.2",

@@ -24,0 +24,0 @@ "ramda": "^0.24.1",

@@ -92,4 +92,26 @@ "use strict";

_this = _super.call(this, props);
_this = _super.call(this, props); // In other modules, this reference DOM element could be referred by `#root > div`.
_this.handlePointerOver = function (ev) {
if (ev.pointerType === 'touch') {
_this.containerRef.current.classList.remove('non-touch-mode');
_this.containerRef.current.classList.add('touch-mode');
} else if (ev.pointerType === 'mouse') {
_this.containerRef.current.classList.add('non-touch-mode');
_this.containerRef.current.classList.remove('touch-mode');
} else {
_this.containerRef.current.classList.remove('non-touch-mode');
_this.containerRef.current.classList.remove('touch-mode');
}
};
_this.handleKeyDown = function () {
_this.containerRef.current.classList.add('non-touch-mode');
_this.containerRef.current.classList.remove('touch-mode');
};
_this.navigableFilter = function (elem) {

@@ -102,2 +124,4 @@ while (elem && elem !== document && elem.nodeType === 1) {

_this.containerRef = /*#__PURE__*/_react["default"].createRef();
if (typeof window === 'object') {

@@ -123,2 +147,10 @@ _spotlight["default"].initialize({

}
this.containerRef.current.classList.add('non-touch-mode');
document.addEventListener('pointerover', this.handlePointerOver, {
capture: true
});
document.addEventListener('keydown', this.handleKeyDown, {
capture: true
});
}

@@ -129,2 +161,9 @@ }, {

_spotlight["default"].terminate();
document.removeEventListener('pointerover', this.handlePointerOver, {
capture: true
});
document.removeEventListener('keydown', this.handleKeyDown, {
capture: true
});
}

@@ -134,3 +173,5 @@ }, {

value: function render() {
return /*#__PURE__*/_react["default"].createElement(Wrapped, this.props);
return /*#__PURE__*/_react["default"].createElement("div", {
ref: this.containerRef
}, /*#__PURE__*/_react["default"].createElement(Wrapped, this.props));
}

@@ -137,0 +178,0 @@ }]);

Sorry, the diff of this file is not supported yet

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