@tamagui/use-escape-keydown 1.88.21 → 1.88.23

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.
@@ -1,27 +1,8 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: !0 });
9
- }, __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from == "object" || typeof from == "function")
11
- for (let key of __getOwnPropNames(from))
12
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
- return to;
14
- };
15
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
16
- var src_exports = {};
17
- __export(src_exports, {
18
- useEscapeKeydown: () => useEscapeKeydown
19
- });
20
- module.exports = __toCommonJS(src_exports);
21
- var import_use_callback_ref = require("@tamagui/use-callback-ref"), import_react = require("react");
1
+ import { useCallbackRef } from "@tamagui/use-callback-ref";
2
+ import { useEffect } from "react";
22
3
  function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
23
- const onEscapeKeyDown = (0, import_use_callback_ref.useCallbackRef)(onEscapeKeyDownProp);
24
- (0, import_react.useEffect)(() => {
4
+ const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
5
+ useEffect(() => {
25
6
  const handleKeyDown = (event) => {
26
7
  event.key === "Escape" && onEscapeKeyDown(event);
27
8
  };
@@ -30,8 +11,7 @@ function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis == nul
30
11
  };
31
12
  }, [onEscapeKeyDown, ownerDocument]);
32
13
  }
33
- // Annotate the CommonJS export names for ESM import in node:
34
- 0 && (module.exports = {
14
+ export {
35
15
  useEscapeKeydown
36
- });
16
+ };
37
17
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,8BAA+B,sCAC/B,eAA0B;AAKnB,SAAS,iBACd,qBACA,gBAA0B,yCAAY,UACtC;AACA,QAAM,sBAAkB,wCAAe,mBAAmB;AAE1D,8BAAU,MAAM;AACd,UAAM,gBAAgB,CAAC,UAAyB;AAC9C,MAAI,MAAM,QAAQ,YAChB,gBAAgB,KAAK;AAAA,IAEzB;AAEA,yBAAc,iBAAiB,WAAW,aAAa,GAEhD,MAAM;AACX,oBAAc,oBAAoB,WAAW,aAAa;AAAA,IAC5D;AAAA,EACF,GAAG,CAAC,iBAAiB,aAAa,CAAC;AACrC;",
4
+ "mappings": "AAEA,SAAS,sBAAsB;AAC/B,SAAS,iBAAiB;AAKnB,SAAS,iBACd,qBACA,gBAA0B,yCAAY,UACtC;AACA,QAAM,kBAAkB,eAAe,mBAAmB;AAE1D,YAAU,MAAM;AACd,UAAM,gBAAgB,CAAC,UAAyB;AAC9C,MAAI,MAAM,QAAQ,YAChB,gBAAgB,KAAK;AAAA,IAEzB;AAEA,yBAAc,iBAAiB,WAAW,aAAa,GAEhD,MAAM;AACX,oBAAc,oBAAoB,WAAW,aAAa;AAAA,IAC5D;AAAA,EACF,GAAG,CAAC,iBAAiB,aAAa,CAAC;AACrC;",
5
5
  "names": []
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/use-escape-keydown",
3
- "version": "1.88.21",
3
+ "version": "1.88.23",
4
4
  "types": "./types/index.d.ts",
5
5
  "main": "dist/cjs",
6
6
  "module": "dist/esm",
@@ -18,10 +18,10 @@
18
18
  "clean:build": "tamagui-build clean:build"
19
19
  },
20
20
  "dependencies": {
21
- "@tamagui/use-callback-ref": "1.88.21"
21
+ "@tamagui/use-callback-ref": "1.88.23"
22
22
  },
23
23
  "devDependencies": {
24
- "@tamagui/build": "1.88.21"
24
+ "@tamagui/build": "1.88.23"
25
25
  },
26
26
  "exports": {
27
27
  "./package.json": "./package.json",