Socket
Socket
Sign inDemoInstall

@tamagui/use-escape-keydown

Package Overview
Dependencies
Maintainers
1
Versions
419
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tamagui/use-escape-keydown - npm Package Compare versions

Comparing version 1.111.8 to 1.111.9

26

dist/esm/index.native.js
import React from "react";
import { useCallbackRef } from "@tamagui/use-callback-ref";
function useEscapeKeydown(onEscapeKeyDownProp) {
var ownerDocument = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : function() {
var _globalThis;
return (_globalThis = globalThis) === null || _globalThis === void 0 ? void 0 : _globalThis.document;
}(), onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
React.useEffect(function() {
var handleKeyDown = function(event) {
var ownerDocument = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : function () {
var _globalThis;
return (_globalThis = globalThis) === null || _globalThis === void 0 ? void 0 : _globalThis.document;
}(),
onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
React.useEffect(function () {
var handleKeyDown = function (event) {
event.key === "Escape" && onEscapeKeyDown(event);
};
return ownerDocument.addEventListener("keydown", handleKeyDown), function() {
return ownerDocument.addEventListener("keydown", handleKeyDown), function () {
ownerDocument.removeEventListener("keydown", handleKeyDown);
};
}, [
onEscapeKeyDown,
ownerDocument
]);
}, [onEscapeKeyDown, ownerDocument]);
}
export {
useEscapeKeydown
};
//# sourceMappingURL=index.js.map
export { useEscapeKeydown };
//# sourceMappingURL=index.native.js.map
{
"name": "@tamagui/use-escape-keydown",
"version": "1.111.8",
"version": "1.111.9",
"types": "./types/index.d.ts",

@@ -21,6 +21,6 @@ "main": "dist/cjs",

"dependencies": {
"@tamagui/use-callback-ref": "1.111.8"
"@tamagui/use-callback-ref": "1.111.9"
},
"devDependencies": {
"@tamagui/build": "1.111.8"
"@tamagui/build": "1.111.9"
},

@@ -30,3 +30,3 @@ "exports": {

".": {
"react-native-import": "./dist/esm/index.native.mjs",
"react-native-import": "./dist/esm/index.native.js",
"react-native": "./dist/cjs/index.native.js",

@@ -33,0 +33,0 @@ "types": "./types/index.d.ts",

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