@tamagui/use-escape-keydown 1.135.4 → 1.135.6

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.
@@ -35,7 +35,7 @@ __export(index_exports, {
35
35
  });
36
36
  module.exports = __toCommonJS(index_exports);
37
37
  var import_use_callback_ref = require("@tamagui/use-callback-ref"),
38
- import_react = __toESM(require("react"));
38
+ import_react = __toESM(require("react"), 1);
39
39
  function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
40
40
  const onEscapeKeyDown = (0, import_use_callback_ref.useCallbackRef)(onEscapeKeyDownProp);
41
41
  import_react.default.useEffect(() => {
package/dist/cjs/index.js CHANGED
@@ -25,7 +25,7 @@ __export(index_exports, {
25
25
  useEscapeKeydown: () => useEscapeKeydown
26
26
  });
27
27
  module.exports = __toCommonJS(index_exports);
28
- var import_use_callback_ref = require("@tamagui/use-callback-ref"), import_react = __toESM(require("react"));
28
+ var import_use_callback_ref = require("@tamagui/use-callback-ref"), import_react = __toESM(require("react"), 1);
29
29
  function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
30
30
  const onEscapeKeyDown = (0, import_use_callback_ref.useCallbackRef)(onEscapeKeyDownProp);
31
31
  import_react.default.useEffect(() => {
@@ -1,51 +1,56 @@
1
1
  "use strict";
2
+
2
3
  var __create = Object.create;
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __getProtoOf = Object.getPrototypeOf,
8
+ __hasOwnProp = Object.prototype.hasOwnProperty;
7
9
  var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: !0 });
10
- }, __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from == "object" || typeof from == "function")
12
- for (let key of __getOwnPropNames(from))
13
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- return to;
15
- };
10
+ for (var name in all) __defProp(target, name, {
11
+ get: all[name],
12
+ enumerable: !0
13
+ });
14
+ },
15
+ __copyProps = (to, from, except, desc) => {
16
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
17
+ get: () => from[key],
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ return to;
21
+ };
16
22
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
23
  // If the importer is in node compatibility mode or this is not an ESM
18
24
  // file that has been converted to a CommonJS file using a Babel-
19
25
  // compatible transform (i.e. "__esModule" has not been set), then set
20
26
  // "default" to the CommonJS "module.exports" for node compatibility.
21
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
22
- mod
23
- )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
27
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
28
+ value: mod,
29
+ enumerable: !0
30
+ }) : target, mod)),
31
+ __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
+ value: !0
33
+ }), mod);
24
34
  var index_exports = {};
25
35
  __export(index_exports, {
26
36
  useEscapeKeydown: () => useEscapeKeydown
27
37
  });
28
38
  module.exports = __toCommonJS(index_exports);
29
- var import_use_callback_ref = require("@tamagui/use-callback-ref"), import_react = __toESM(require("react"));
39
+ var import_use_callback_ref = require("@tamagui/use-callback-ref"),
40
+ import_react = __toESM(require("react"), 1);
30
41
  function useEscapeKeydown(onEscapeKeyDownProp) {
31
- var ownerDocument = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : function() {
32
- var _globalThis;
33
- return (_globalThis = globalThis) === null || _globalThis === void 0 ? void 0 : _globalThis.document;
34
- }(), onEscapeKeyDown = (0, import_use_callback_ref.useCallbackRef)(onEscapeKeyDownProp);
35
- import_react.default.useEffect(function() {
36
- var handleKeyDown = function(event) {
42
+ var ownerDocument = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : function () {
43
+ var _globalThis;
44
+ return (_globalThis = globalThis) === null || _globalThis === void 0 ? void 0 : _globalThis.document;
45
+ }(),
46
+ onEscapeKeyDown = (0, import_use_callback_ref.useCallbackRef)(onEscapeKeyDownProp);
47
+ import_react.default.useEffect(function () {
48
+ var handleKeyDown = function (event) {
37
49
  event.key === "Escape" && onEscapeKeyDown(event);
38
50
  };
39
- return ownerDocument.addEventListener("keydown", handleKeyDown), function() {
51
+ return ownerDocument.addEventListener("keydown", handleKeyDown), function () {
40
52
  ownerDocument.removeEventListener("keydown", handleKeyDown);
41
53
  };
42
- }, [
43
- onEscapeKeyDown,
44
- ownerDocument
45
- ]);
54
+ }, [onEscapeKeyDown, ownerDocument]);
46
55
  }
47
- // Annotate the CommonJS export names for ESM import in node:
48
- 0 && (module.exports = {
49
- useEscapeKeydown
50
- });
51
- //# sourceMappingURL=index.js.map
56
+ //# sourceMappingURL=index.native.js.map
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/index.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,8BAA+B,sCAC/B,eAAkB;AAGP,SAAS,iBAAiB,qBAAqB;AACtD,MAAI,gBAAgB,UAAU,SAAS,KAAK,UAAU,CAAC,MAAM,SAAS,UAAU,CAAC,IAAI,WAAW;AAC5F,QAAI;AACJ,YAAQ,cAAc,gBAAgB,QAAQ,gBAAgB,SAAS,SAAS,YAAY;AAAA,EAChG,EAAE,GACE,sBAAkB,wCAAe,mBAAmB;AACxD,eAAAA,QAAM,UAAU,WAAW;AACvB,QAAI,gBAAgB,SAAS,OAAO;AAChC,MAAI,MAAM,QAAQ,YACd,gBAAgB,KAAK;AAAA,IAE7B;AACA,yBAAc,iBAAiB,WAAW,aAAa,GAChD,WAAW;AACd,oBAAc,oBAAoB,WAAW,aAAa;AAAA,IAC9D;AAAA,EACJ,GAAG;AAAA,IACC;AAAA,IACA;AAAA,EACJ,CAAC;AACL;",
5
- "names": ["React"]
6
- }
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","__export","useEscapeKeydown","module","exports","import_use_callback_ref","require","import_react","__toESM","onEscapeKeyDownProp","ownerDocument","arguments","length","_globalThis","globalThis","document","onEscapeKeyDown","useCallbackRef","default","useEffect","handleKeyDown","event","key","addEventListener"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAA;EAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;IAAAC,KAAA;EAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,QAAA,CAAAD,aAAA;EAAAE,gBAAA,EAAAA,CAAA,KAAAA;AAAA;AACAC,MAAA,CAAAC,OAAA,GAAAT,YAAA,CAA+BK,aAAA;AAMxB,IAAAK,uBACL,GAAAC,OAAA,4BAC0B;EAAAC,YAAY,GAAAC,OAChC,CAAAF,OAAA;AACN,SAAMJ,iBAAAO,mBAAkB;EAExB,IAAAC,aAAA,GAAAC,SAAM,CAAAC,MAAU,GAAM,KAAAD,SAAA,iBAAAA,SAAA;MACpB,IAAAE,WAAM;MACJ,OAAI,CAAMA,WAAQ,GAAAC,UAChB,cAAgBD,WAAK,uBAAAA,WAAA,CAAAE,QAAA;IAAA,EAEzB;IAAAC,eAAA,OAAAX,uBAAA,CAAAY,cAAA,EAAAR,mBAAA;EAEAF,YAAA,CAAAW,OAAA,CAAAC,SAAc,aAAiB;IAG7B,IAAAC,aAAc,YAAAA,CAAAC,KAAA,EAAoB;MACpCA,KAAA,CAAAC,GAAA,iBAAAN,eAAA,CAAAK,KAAA;IACF,CAAG;IACL,OAAAX,aAAA,CAAAa,gBAAA,YAAAH,aAAA","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@tamagui/use-escape-keydown",
3
- "version": "1.135.4",
3
+ "version": "1.135.6",
4
+ "type": "module",
4
5
  "types": "./types/index.d.ts",
5
6
  "main": "dist/cjs",
6
7
  "module": "dist/esm",
@@ -18,10 +19,10 @@
18
19
  "clean:build": "tamagui-build clean:build"
19
20
  },
20
21
  "dependencies": {
21
- "@tamagui/use-callback-ref": "1.135.4"
22
+ "@tamagui/use-callback-ref": "1.135.6"
22
23
  },
23
24
  "devDependencies": {
24
- "@tamagui/build": "1.135.4",
25
+ "@tamagui/build": "1.135.6",
25
26
  "react": "*"
26
27
  },
27
28
  "exports": {
@@ -1,10 +1,6 @@
1
1
  {
2
- "mappings": ";;;AAOA,OAAO,iBAAS,iBACdA,uBAAuBC,OAAO,wBAC9BC,gBAAe",
3
- "names": [
4
- "onEscapeKeyDownProp?: (event: KeyboardEvent) => void",
5
- "event: KeyboardEvent",
6
- "ownerDocument: Document"
7
- ],
2
+ "mappings": ";;;AAOA,OAAO,iBAAS,iBACd,uBAAuB,OAAO,wBAC9B,gBAAe",
3
+ "names": [],
8
4
  "sources": [
9
5
  "src/index.ts"
10
6
  ],