@tamagui/use-event 2.0.0-rc.39 → 2.0.0-rc.40

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 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports","__reExport","require"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAP,YAAc,CAAAK,aAAA;AACdG,UAAA,CAAAH,aAAA,EAAcI,OAAA,wBADd,EAAAH,MAAA,CAAAC,OAAA","ignoreList":[]}
1
+ {"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__copyProps","to","from","except","desc","key","call","get","enumerable","__reExport","target","mod","secondTarget","__toCommonJS","value","index_exports","module","exports","require"],"sources":["index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\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 __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\nmodule.exports = __toCommonJS(index_exports);\n__reExport(index_exports, require(\"./useEvent\"), module.exports);\n__reExport(index_exports, require(\"./useGet\"), module.exports);\n//# sourceMappingURL=index.js.map\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,SAAS,GAAGC,MAAM,CAACC,cAAc;AACrC,IAAIC,gBAAgB,GAAGF,MAAM,CAACG,wBAAwB;AACtD,IAAIC,iBAAiB,GAAGJ,MAAM,CAACK,mBAAmB;AAClD,IAAIC,YAAY,GAAGN,MAAM,CAACO,SAAS,CAACC,cAAc;AAClD,IAAIC,WAAW,GAAGA,CAACC,EAAE,EAAEC,IAAI,EAAEC,MAAM,EAAEC,IAAI,KAAK;EAC5C,IAAIF,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,IAAI,OAAOA,IAAI,KAAK,UAAU,EAAE;IAClE,KAAK,IAAIG,GAAG,IAAIV,iBAAiB,CAACO,IAAI,CAAC,EACrC,IAAI,CAACL,YAAY,CAACS,IAAI,CAACL,EAAE,EAAEI,GAAG,CAAC,IAAIA,GAAG,KAAKF,MAAM,EAC/Cb,SAAS,CAACW,EAAE,EAAEI,GAAG,EAAE;MAAEE,GAAG,EAAEA,CAAA,KAAML,IAAI,CAACG,GAAG,CAAC;MAAEG,UAAU,EAAE,EAAEJ,IAAI,GAAGX,gBAAgB,CAACS,IAAI,EAAEG,GAAG,CAAC,CAAC,IAAID,IAAI,CAACI;IAAW,CAAC,CAAC;EACxH;EACA,OAAOP,EAAE;AACX,CAAC;AACD,IAAIQ,UAAU,GAAGA,CAACC,MAAM,EAAEC,GAAG,EAAEC,YAAY,MAAMZ,WAAW,CAACU,MAAM,EAAEC,GAAG,EAAE,SAAS,CAAC,EAAEC,YAAY,IAAIZ,WAAW,CAACY,YAAY,EAAED,GAAG,EAAE,SAAS,CAAC,CAAC;AAChJ,IAAIE,YAAY,GAAIF,GAAG,IAAKX,WAAW,CAACV,SAAS,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE;EAAEwB,KAAK,EAAE;AAAK,CAAC,CAAC,EAAEH,GAAG,CAAC;AAC1F,IAAII,aAAa,GAAG,CAAC,CAAC;AACtBC,MAAM,CAACC,OAAO,GAAGJ,YAAY,CAACE,aAAa,CAAC;AAC5CN,UAAU,CAACM,aAAa,EAAEG,OAAO,CAAC,sBAAY,CAAC,EAAEF,MAAM,CAACC,OAAO,CAAC;AAChER,UAAU,CAACM,aAAa,EAAEG,OAAO,CAAC,oBAAU,CAAC,EAAEF,MAAM,CAACC,OAAO,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","useEvent_exports","__export","useEvent","module","exports","import_useGet","require","callback","useGet","defaultValue","Error"],"sources":["../../src/useEvent.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,gBAAA;AAAAC,QAAA,CAAAD,gBAAA;EAAAE,QAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAAuB,CAAAK,gBAAA;AAIhB,IAAAK,aAAS,GAAgCC,OAAA,CAAiB;AAC/D,SAAAJ,QAAOA,CAAAK,QAAA;EACT,WAAAF,aAAA,CAAAG,MAAA,EAAAD,QAAA,EAAAE,YAAA;AAEA;AACE,IAAAA,YAAU,GAAM,SAAAA,CAAA;EAClB,UAAAC,KAAA","ignoreList":[]}
1
+ {"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","useEvent_exports","useEvent","module","exports","import_useGet","require","callback","useGet","defaultValue","Error"],"sources":["useEvent.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\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 __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar useEvent_exports = {};\n__export(useEvent_exports, {\n useEvent: () => useEvent\n});\nmodule.exports = __toCommonJS(useEvent_exports);\nvar import_useGet = require(\"./useGet\");\nfunction useEvent(callback) {\n return (0, import_useGet.useGet)(callback, defaultValue, true);\n}\nvar defaultValue = function() {\n throw new Error(\"Cannot call an event handler while rendering.\");\n};\n//# sourceMappingURL=useEvent.js.map\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,SAAS,GAAGC,MAAM,CAACC,cAAc;AACrC,IAAIC,gBAAgB,GAAGF,MAAM,CAACG,wBAAwB;AACtD,IAAIC,iBAAiB,GAAGJ,MAAM,CAACK,mBAAmB;AAClD,IAAIC,YAAY,GAAGN,MAAM,CAACO,SAAS,CAACC,cAAc;AAClD,IAAIC,QAAQ,GAAGA,CAACC,MAAM,EAAEC,GAAG,KAAK;EAC9B,KAAK,IAAIC,IAAI,IAAID,GAAG,EAClBZ,SAAS,CAACW,MAAM,EAAEE,IAAI,EAAE;IAAEC,GAAG,EAAEF,GAAG,CAACC,IAAI,CAAC;IAAEE,UAAU,EAAE;EAAK,CAAC,CAAC;AACjE,CAAC;AACD,IAAIC,WAAW,GAAGA,CAACC,EAAE,EAAEC,IAAI,EAAEC,MAAM,EAAEC,IAAI,KAAK;EAC5C,IAAIF,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,IAAI,OAAOA,IAAI,KAAK,UAAU,EAAE;IAClE,KAAK,IAAIG,GAAG,IAAIhB,iBAAiB,CAACa,IAAI,CAAC,EACrC,IAAI,CAACX,YAAY,CAACe,IAAI,CAACL,EAAE,EAAEI,GAAG,CAAC,IAAIA,GAAG,KAAKF,MAAM,EAC/CnB,SAAS,CAACiB,EAAE,EAAEI,GAAG,EAAE;MAAEP,GAAG,EAAEA,CAAA,KAAMI,IAAI,CAACG,GAAG,CAAC;MAAEN,UAAU,EAAE,EAAEK,IAAI,GAAGjB,gBAAgB,CAACe,IAAI,EAAEG,GAAG,CAAC,CAAC,IAAID,IAAI,CAACL;IAAW,CAAC,CAAC;EACxH;EACA,OAAOE,EAAE;AACX,CAAC;AACD,IAAIM,YAAY,GAAIC,GAAG,IAAKR,WAAW,CAAChB,SAAS,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE;EAAEyB,KAAK,EAAE;AAAK,CAAC,CAAC,EAAED,GAAG,CAAC;AAC1F,IAAIE,gBAAgB,GAAG,CAAC,CAAC;AACzBhB,QAAQ,CAACgB,gBAAgB,EAAE;EACzBC,QAAQ,EAAEA,CAAA,KAAMA;AAClB,CAAC,CAAC;AACFC,MAAM,CAACC,OAAO,GAAGN,YAAY,CAACG,gBAAgB,CAAC;AAC/C,IAAII,aAAa,GAAGC,OAAO,CAAC,oBAAU,CAAC;AACvC,SAASJ,QAAQA,CAACK,QAAQ,EAAE;EAC1B,OAAO,CAAC,CAAC,EAAEF,aAAa,CAACG,MAAM,EAAED,QAAQ,EAAEE,YAAY,EAAE,IAAI,CAAC;AAChE;AACA,IAAIA,YAAY,GAAG,SAAAA,CAAA,EAAW;EAC5B,MAAM,IAAIC,KAAK,CAAC,+CAA+C,CAAC;AAClE,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","useGet_exports","__export","useGet","module","exports","React","__toESM","require","isServer","window","useIsomorphicInsertionEffect","useEffect","useInsertionEffect","useLayoutEffect","currentValue","initialValue","forwardToFunction","curRef","useRef","current","useCallback","_len","arguments","length","args","Array","_key"],"sources":["../../src/useGet.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,cAAA;AAAAC,QAAA,CAAAD,cAAA;EAAAE,MAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAuB,GAAAT,YAAA,CAAAK,cAAA;AAEvB,IAAAK,KAAM,GAAAC,OAAW,CAAAC,OAAO,QAAW;AAMnC,IAAAC,QAAM,UAAAC,MAAA,gBAA+B;AAM9B,IAAAC,4BAEL,GAAAF,QAAA,GACAH,KAAA,CAAAM,SAAA,GACSN,KAAA,CAAAO,kBAAA,IAAAP,KAAA,CAAAQ,eAAA;AACT,SAAMX,OAAAY,YAAe,EAAYC,YAAA,EAAAC,iBAA4B;EAC7D,IAAAC,MAAA,GAAAZ,KAAA,CAAAa,MAAA,CAAAH,YAAmC,aAAAA,YAAA,cAAAA,YAAA,GAAAD,YAAA;EACjCJ,4BAAiB;IAClBO,MAAA,CAAAE,OAAA,GAAAL,YAAA;EAED;EAAa,OACXT,KAAA,CAAAe,WACI,CAAAJ,iBAAoB,eAAS;IAEjC,KAAC,IAAAK,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAC,IAAA,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;MACHF,IAAA,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;IACF","ignoreList":[]}
1
+ {"version":3,"names":["__create","Object","create","__defProp","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__getProtoOf","getPrototypeOf","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toESM","mod","isNodeMode","__esModule","value","__toCommonJS","useGet_exports","useGet","module","exports","React","require","isServer","window","useIsomorphicInsertionEffect","useEffect","useInsertionEffect","useLayoutEffect","currentValue","initialValue","forwardToFunction","curRef","useRef","current","useCallback","_len","arguments","length","args","Array","_key","_curRef_current","apply"],"sources":["useGet.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 useGet_exports = {};\n__export(useGet_exports, {\n useGet: () => useGet\n});\nmodule.exports = __toCommonJS(useGet_exports);\nvar React = __toESM(require(\"react\"), 1);\nvar isServer = typeof window === \"undefined\";\nvar useIsomorphicInsertionEffect = isServer ? React.useEffect : React.useInsertionEffect || React.useLayoutEffect;\nfunction useGet(currentValue, initialValue, forwardToFunction) {\n var curRef = React.useRef(initialValue !== null && initialValue !== void 0 ? initialValue : currentValue);\n useIsomorphicInsertionEffect(function() {\n curRef.current = currentValue;\n });\n return React.useCallback(forwardToFunction ? function() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n var _curRef_current;\n return (_curRef_current = curRef.current) === null || _curRef_current === void 0 ? void 0 : _curRef_current.apply(null, args);\n } : function() {\n return curRef.current;\n }, []);\n}\n//# sourceMappingURL=useGet.js.map\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,QAAQ,GAAGC,MAAM,CAACC,MAAM;AAC5B,IAAIC,SAAS,GAAGF,MAAM,CAACG,cAAc;AACrC,IAAIC,gBAAgB,GAAGJ,MAAM,CAACK,wBAAwB;AACtD,IAAIC,iBAAiB,GAAGN,MAAM,CAACO,mBAAmB;AAClD,IAAIC,YAAY,GAAGR,MAAM,CAACS,cAAc;AACxC,IAAIC,YAAY,GAAGV,MAAM,CAACW,SAAS,CAACC,cAAc;AAClD,IAAIC,QAAQ,GAAGA,CAACC,MAAM,EAAEC,GAAG,KAAK;EAC9B,KAAK,IAAIC,IAAI,IAAID,GAAG,EAClBb,SAAS,CAACY,MAAM,EAAEE,IAAI,EAAE;IAAEC,GAAG,EAAEF,GAAG,CAACC,IAAI,CAAC;IAAEE,UAAU,EAAE;EAAK,CAAC,CAAC;AACjE,CAAC;AACD,IAAIC,WAAW,GAAGA,CAACC,EAAE,EAAEC,IAAI,EAAEC,MAAM,EAAEC,IAAI,KAAK;EAC5C,IAAIF,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,IAAI,OAAOA,IAAI,KAAK,UAAU,EAAE;IAClE,KAAK,IAAIG,GAAG,IAAIlB,iBAAiB,CAACe,IAAI,CAAC,EACrC,IAAI,CAACX,YAAY,CAACe,IAAI,CAACL,EAAE,EAAEI,GAAG,CAAC,IAAIA,GAAG,KAAKF,MAAM,EAC/CpB,SAAS,CAACk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ACO,eAAe;AACjH,SAASV,MAAMA,CAACW,YAAY,EAAEC,YAAY,EAAEC,iBAAiB,EAAE;EAC7D,IAAIC,MAAM,GAAGX,KAAK,CAACY,MAAM,CAACH,YAAY,KAAK,IAAI,IAAIA,YAAY,KAAK,KAAK,CAAC,GAAGA,YAAY,GAAGD,YAAY,CAAC;EACzGJ,4BAA4B,CAAC,YAAW;IACtCO,MAAM,CAACE,OAAO,GAAGL,YAAY;EAC/B,CAAC,CAAC;EACF,OAAOR,KAAK,CAACc,WAAW,CAACJ,iBAAiB,GAAG,YAAW;IACtD,KAAK,IAAIK,IAAI,GAAGC,SAAS,CAACC,MAAM,EAAEC,IAAI,GAAG,IAAIC,KAAK,CAACJ,IAAI,CAAC,EAAEK,IAAI,GAAG,CAAC,EAAEA,IAAI,GAAGL,IAAI,EAAEK,IAAI,EAAE,EAAE;MACvFF,IAAI,CAACE,IAAI,CAAC,GAAGJ,SAAS,CAACI,IAAI,CAAC;IAC9B;IACA,IAAIC,eAAe;IACnB,OAAO,CAACA,eAAe,GAAGV,MAAM,CAACE,OAAO,MAAM,IAAI,IAAIQ,eAAe,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,eAAe,CAACC,KAAK,CAAC,IAAI,EAAEJ,IAAI,CAAC;EAC/H,CAAC,GAAG,YAAW;IACb,OAAOP,MAAM,CAACE,OAAO;EACvB,CAAC,EAAE,EAAE,CAAC;AACR","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/use-event",
3
- "version": "2.0.0-rc.39",
3
+ "version": "2.0.0-rc.40",
4
4
  "files": [
5
5
  "src",
6
6
  "types",
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "dependencies": {},
36
36
  "devDependencies": {
37
- "@tamagui/build": "2.0.0-rc.39",
37
+ "@tamagui/build": "2.0.0-rc.40",
38
38
  "react": ">=19"
39
39
  },
40
40
  "peerDependencies": {