@tamagui/use-escape-keydown 3.0.7 → 3.0.9

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.
@@ -38,7 +38,7 @@ function useEscapeKeydown(onEscapeKeyDownProp) {
38
38
  })();
39
39
  var onEscapeKeyDown = (0, import_use_callback_ref.useCallbackRef)(onEscapeKeyDownProp);
40
40
  import_react.default.useEffect(function() {
41
- var handleKeyDown = function(event) {
41
+ var handleKeyDown = function handleKeyDown2(event) {
42
42
  if (event.key === "Escape") {
43
43
  onEscapeKeyDown(event);
44
44
  }
@@ -38,7 +38,7 @@ function useEscapeKeydown(onEscapeKeyDownProp) {
38
38
  })();
39
39
  var onEscapeKeyDown = (0, import_use_callback_ref.useCallbackRef)(onEscapeKeyDownProp);
40
40
  import_react.default.useEffect(function() {
41
- var handleKeyDown = function(event) {
41
+ var handleKeyDown = function handleKeyDown2(event) {
42
42
  if (event.key === "Escape") {
43
43
  onEscapeKeyDown(event);
44
44
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.js","names":[],"sources":["cjs/index.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\n__export(index_exports, {\n useEscapeKeydown: () => useEscapeKeydown\n});\nmodule.exports = __toCommonJS(index_exports);\nvar import_use_callback_ref = require(\"@tamagui/use-callback-ref\");\nvar import_react = __toESM(require(\"react\"), 1);\nfunction useEscapeKeydown(onEscapeKeyDownProp) {\n var ownerDocument = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : (function() {\n var _globalThis;\n return (_globalThis = globalThis) === null || _globalThis === void 0 ? void 0 : _globalThis.document;\n })();\n var onEscapeKeyDown = (0, import_use_callback_ref.useCallbackRef)(onEscapeKeyDownProp);\n import_react.default.useEffect(function() {\n var handleKeyDown = function(event) {\n if (event.key === \"Escape\") {\n onEscapeKeyDown(event);\n }\n };\n ownerDocument.addEventListener(\n \"keydown\",\n // @ts-expect-error\n handleKeyDown\n );\n return function() {\n ownerDocument.removeEventListener(\n \"keydown\",\n // @ts-expect-error\n handleKeyDown\n );\n };\n }, [\n onEscapeKeyDown,\n ownerDocument\n ]);\n}\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,O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F;CACF,GAAG,CACD,iBACA,aACF,CAAC;AACH"}
1
+ {"version":3,"file":"index.native.js","names":[],"sources":["cjs/index.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\n__export(index_exports, {\n useEscapeKeydown: () => useEscapeKeydown\n});\nmodule.exports = __toCommonJS(index_exports);\nvar import_use_callback_ref = require(\"@tamagui/use-callback-ref\");\nvar import_react = __toESM(require(\"react\"), 1);\nfunction useEscapeKeydown(onEscapeKeyDownProp) {\n var ownerDocument = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : (function() {\n var _globalThis;\n return (_globalThis = globalThis) === null || _globalThis === void 0 ? void 0 : _globalThis.document;\n })();\n var onEscapeKeyDown = (0, import_use_callback_ref.useCallbackRef)(onEscapeKeyDownProp);\n import_react.default.useEffect(function() {\n var handleKeyDown = function handleKeyDown2(event) {\n if (event.key === \"Escape\") {\n onEscapeKeyDown(event);\n }\n };\n ownerDocument.addEventListener(\n \"keydown\",\n // @ts-expect-error\n handleKeyDown\n );\n return function() {\n ownerDocument.removeEventListener(\n \"keydown\",\n // @ts-expect-error\n handleKeyDown\n );\n };\n }, [\n onEscapeKeyDown,\n ownerDocument\n ]);\n}\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,WAAW,KAAK,YAAY,YAAY,SAAS,OAAO,OAAO,SAAS,aAAa,GAAG,CAAC,IAAI,CAAC,GAAG,YAKnG,cAAc,CAAC,OAAO,CAAC,IAAI,aAAa,UAAU,QAAQ,WAAW;CAAE,OAAO;CAAK,YAAY;AAAK,CAAC,IAAI,QACzG,GACF;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gBAAgB,CAAC;AACrB,SAAS,eAAe,EACtB,wBAAwB,iBAC1B,CAAC;AACD,OAAO,UAAU,aAAa,aAAa;AAC3C,IAAI,0BAA0B,QAAQ,2BAA2B;AACjE,IAAI,eAAe,QAAQ,QAAQ,OAAO,GAAG,CAAC;AAC9C,SAAS,iBAAiB,qBAAqB;CAC7C,IAAI,gBAAgB,UAAU,SAAS,KAAK,UAAU,OAAO,KAAK,IAAI,UAAU,MAAM,WAAW;EAC/F,IAAI;EACJ,QAAQ,cAAc,gBAAgB,QAAQ,gBAAgB,KAAK,IAAI,KAAK,IAAI,YAAY;CAC9F,EAAC,CAAE;CACH,IAAI,mBAAmB,GAAG,wBAAwB,eAAc,CAAE,mBAAmB;CACrF,aAAa,QAAQ,UAAU,WAAW;EACxC,IAAI,gBAAgB,SAAS,eAAe,OAAO;GACjD,IAAI,MAAM,QAAQ,UAAU;IAC1B,gBAAgB,KAAK;GACvB;EACF;EACA,cAAc,iBACZ,WAEA,aACF;EACA,OAAO,WAAW;GAChB,cAAc,oBACZ,WAEA,aACF;EACF;CACF,GAAG,CACD,iBACA,aACF,CAAC;AACH"}
@@ -8,7 +8,7 @@ function useEscapeKeydown(onEscapeKeyDownProp) {
8
8
  })();
9
9
  var onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
10
10
  React.useEffect(function() {
11
- var handleKeyDown = function(event) {
11
+ var handleKeyDown = function handleKeyDown2(event) {
12
12
  if (event.key === "Escape") {
13
13
  onEscapeKeyDown(event);
14
14
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.js","names":[],"sources":["esm/index.native.js"],"sourcesContent":["import { useCallbackRef } from \"@tamagui/use-callback-ref\";\nimport React from \"react\";\nfunction useEscapeKeydown(onEscapeKeyDownProp) {\n var ownerDocument = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : (function() {\n var _globalThis;\n return (_globalThis = globalThis) === null || _globalThis === void 0 ? void 0 : _globalThis.document;\n })();\n var onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);\n React.useEffect(function() {\n var handleKeyDown = function(event) {\n if (event.key === \"Escape\") {\n onEscapeKeyDown(event);\n }\n };\n ownerDocument.addEventListener(\n \"keydown\",\n // @ts-expect-error\n handleKeyDown\n );\n return function() {\n ownerDocument.removeEventListener(\n \"keydown\",\n // @ts-expect-error\n handleKeyDown\n );\n };\n }, [\n onEscapeKeyDown,\n ownerDocument\n ]);\n}\nexport {\n useEscapeKeydown\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;AAEA,SAAS,iBAAiB,qBAAqB;CAC7C,IAAI,gBAAgB,UAAU,SAAS,KAAK,UAAU,OAAO,KAAK,IAAI,UAAU,MAAM,WAAW;EAC/F,IAAI;EACJ,QAAQ,cAAc,gBAAgB,QAAQ,gBAAgB,KAAK,IAAI,KAAK,IAAI,YAAY;CAC9F,EAAC,CAAE;CACH,IAAI,kBAAkB,eAAe,mBAAmB;CACxD,MAAM,UAAU,WAAW;EACzB,IAAI,gBAAgB,SAAS,OAAO;GAClC,IAAI,MAAM,QAAQ,UAAU;IAC1B,gBAAgB,KAAK;GACvB;EACF;EACA,cAAc,iBACZ,WAEA,aACF;EACA,OAAO,WAAW;GAChB,cAAc,oBACZ,WAEA,aACF;EACF;CACF,GAAG,CACD,iBACA,aACF,CAAC;AACH"}
1
+ {"version":3,"file":"index.native.js","names":[],"sources":["esm/index.native.js"],"sourcesContent":["import { useCallbackRef } from \"@tamagui/use-callback-ref\";\nimport React from \"react\";\nfunction useEscapeKeydown(onEscapeKeyDownProp) {\n var ownerDocument = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : (function() {\n var _globalThis;\n return (_globalThis = globalThis) === null || _globalThis === void 0 ? void 0 : _globalThis.document;\n })();\n var onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);\n React.useEffect(function() {\n var handleKeyDown = function handleKeyDown2(event) {\n if (event.key === \"Escape\") {\n onEscapeKeyDown(event);\n }\n };\n ownerDocument.addEventListener(\n \"keydown\",\n // @ts-expect-error\n handleKeyDown\n );\n return function() {\n ownerDocument.removeEventListener(\n \"keydown\",\n // @ts-expect-error\n handleKeyDown\n );\n };\n }, [\n onEscapeKeyDown,\n ownerDocument\n ]);\n}\nexport {\n useEscapeKeydown\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;AAEA,SAAS,iBAAiB,qBAAqB;CAC7C,IAAI,gBAAgB,UAAU,SAAS,KAAK,UAAU,OAAO,KAAK,IAAI,UAAU,MAAM,WAAW;EAC/F,IAAI;EACJ,QAAQ,cAAc,gBAAgB,QAAQ,gBAAgB,KAAK,IAAI,KAAK,IAAI,YAAY;CAC9F,EAAC,CAAE;CACH,IAAI,kBAAkB,eAAe,mBAAmB;CACxD,MAAM,UAAU,WAAW;EACzB,IAAI,gBAAgB,SAAS,eAAe,OAAO;GACjD,IAAI,MAAM,QAAQ,UAAU;IAC1B,gBAAgB,KAAK;GACvB;EACF;EACA,cAAc,iBACZ,WAEA,aACF;EACA,OAAO,WAAW;GAChB,cAAc,oBACZ,WAEA,aACF;EACF;CACF,GAAG,CACD,iBACA,aACF,CAAC;AACH"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/use-escape-keydown",
3
- "version": "3.0.7",
3
+ "version": "3.0.9",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "src",
@@ -34,10 +34,10 @@
34
34
  "clean:build": "tamagui-build clean:build"
35
35
  },
36
36
  "dependencies": {
37
- "@tamagui/use-callback-ref": "3.0.7"
37
+ "@tamagui/use-callback-ref": "3.0.9"
38
38
  },
39
39
  "devDependencies": {
40
- "@tamagui/build": "3.0.7",
40
+ "@tamagui/build": "3.0.9",
41
41
  "react": "19.2.3"
42
42
  },
43
43
  "peerDependencies": {
@@ -48,5 +48,5 @@
48
48
  "url": "git+https://github.com/tamagui/tamagui.git",
49
49
  "directory": "code/core/use-escape-keydown"
50
50
  },
51
- "releaseSourceCommit": "96f8bc1f222af0381729a2e2202370aa4a9808ef"
51
+ "releaseSourceCommit": "1971272fa9915450004c84ea48188100fdf278ff"
52
52
  }