Socket
Socket
Sign inDemoInstall

@tamagui/use-escape-keydown

Package Overview
Dependencies
Maintainers
0
Versions
405
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.107.0 to 1.108.0-1722728147390

16

dist/cjs/index.js

@@ -0,5 +1,6 @@

var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {

@@ -14,3 +15,10 @@ for (var name in all)

};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
mod
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var src_exports = {};

@@ -21,6 +29,6 @@ __export(src_exports, {

module.exports = __toCommonJS(src_exports);
var import_use_callback_ref = require("@tamagui/use-callback-ref"), import_react = require("react");
var import_react = __toESM(require("react")), import_use_callback_ref = require("@tamagui/use-callback-ref");
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
const onEscapeKeyDown = (0, import_use_callback_ref.useCallbackRef)(onEscapeKeyDownProp);
(0, import_react.useEffect)(() => {
import_react.default.useEffect(() => {
const handleKeyDown = (event) => {

@@ -27,0 +35,0 @@ event.key === "Escape" && onEscapeKeyDown(event);

"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {

@@ -15,3 +16,10 @@ for (var name in all)

};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
mod
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var src_exports = {};

@@ -22,3 +30,3 @@ __export(src_exports, {

module.exports = __toCommonJS(src_exports);
var import_use_callback_ref = require("@tamagui/use-callback-ref"), import_react = require("react");
var import_react = __toESM(require("react")), import_use_callback_ref = require("@tamagui/use-callback-ref");
function useEscapeKeydown(onEscapeKeyDownProp) {

@@ -29,3 +37,3 @@ var ownerDocument = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : function() {

}(), onEscapeKeyDown = (0, import_use_callback_ref.useCallbackRef)(onEscapeKeyDownProp);
(0, import_react.useEffect)(function() {
import_react.default.useEffect(function() {
var handleKeyDown = function(event) {

@@ -32,0 +40,0 @@ event.key === "Escape" && onEscapeKeyDown(event);

@@ -0,6 +1,6 @@

import React from "react";
import { useCallbackRef } from "@tamagui/use-callback-ref";
import { useEffect } from "react";
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
useEffect(() => {
React.useEffect(() => {
const handleKeyDown = (event) => {

@@ -7,0 +7,0 @@ event.key === "Escape" && onEscapeKeyDown(event);

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

import React from "react";
import { useCallbackRef } from "@tamagui/use-callback-ref";
import { useEffect } from "react";
function useEscapeKeydown(onEscapeKeyDownProp) {

@@ -8,3 +8,3 @@ var ownerDocument = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : function() {

}(), onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
useEffect(function() {
React.useEffect(function() {
var handleKeyDown = function(event) {

@@ -11,0 +11,0 @@ event.key === "Escape" && onEscapeKeyDown(event);

{
"name": "@tamagui/use-escape-keydown",
"version": "1.107.0",
"version": "1.108.0-1722728147390",
"types": "./types/index.d.ts",

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

"dependencies": {
"@tamagui/use-callback-ref": "1.107.0"
"@tamagui/use-callback-ref": "1.108.0-1722728147390"
},
"devDependencies": {
"@tamagui/build": "1.107.0"
"@tamagui/build": "1.108.0-1722728147390"
},

@@ -27,0 +27,0 @@ "exports": {

@@ -1,5 +0,4 @@

// via radix-ui
import React from 'react' // via radix-ui
import { useCallbackRef } from '@tamagui/use-callback-ref'
import { useEffect } from 'react'

@@ -15,3 +14,3 @@ /**

useEffect(() => {
React.useEffect(() => {
const handleKeyDown = (event: KeyboardEvent) => {

@@ -18,0 +17,0 @@ if (event.key === 'Escape') {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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