@tamagui/use-event 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.
- package/dist/cjs/index.native.js +14 -14
- package/dist/cjs/index.native.js.map +1 -6
- package/dist/cjs/useEvent.native.js +19 -16
- package/dist/cjs/useEvent.native.js.map +1 -6
- package/dist/cjs/useGet.cjs +1 -1
- package/dist/cjs/useGet.js +1 -1
- package/dist/cjs/useGet.native.js +29 -23
- package/dist/cjs/useGet.native.js.map +1 -6
- package/package.json +4 -3
- package/types/useEvent.d.ts.map +2 -4
- package/types/useGet.d.ts +0 -1
- package/types/useGet.d.ts.map +2 -6
package/dist/cjs/index.native.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
7
|
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
9
|
+
get: () => from[key],
|
|
10
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
11
|
+
});
|
|
12
|
+
return to;
|
|
13
|
+
},
|
|
14
|
+
__reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
16
|
+
value: !0
|
|
17
|
+
}), mod);
|
|
13
18
|
var index_exports = {};
|
|
14
19
|
module.exports = __toCommonJS(index_exports);
|
|
15
|
-
__reExport(index_exports, require("./useEvent"), module.exports);
|
|
16
|
-
__reExport(index_exports, require("./useGet"), module.exports);
|
|
17
|
-
|
|
18
|
-
0 && (module.exports = {
|
|
19
|
-
...require("./useEvent"),
|
|
20
|
-
...require("./useGet")
|
|
21
|
-
});
|
|
22
|
-
//# sourceMappingURL=index.js.map
|
|
20
|
+
__reExport(index_exports, require("./useEvent.native.js"), module.exports);
|
|
21
|
+
__reExport(index_exports, require("./useGet.native.js"), module.exports);
|
|
22
|
+
//# sourceMappingURL=index.native.js.map
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/index.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;AAAA;AAAA;AAAA,0BAAc,uBAAd;AACA,0BAAc,qBADd;",
|
|
5
|
-
"names": []
|
|
6
|
-
}
|
|
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,32 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
7
|
var __export = (target, all) => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: !0
|
|
11
|
+
});
|
|
12
|
+
},
|
|
13
|
+
__copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: !0
|
|
22
|
+
}), mod);
|
|
16
23
|
var useEvent_exports = {};
|
|
17
24
|
__export(useEvent_exports, {
|
|
18
25
|
useEvent: () => useEvent
|
|
19
26
|
});
|
|
20
27
|
module.exports = __toCommonJS(useEvent_exports);
|
|
21
|
-
var import_useGet = require("./useGet");
|
|
28
|
+
var import_useGet = require("./useGet.native.js");
|
|
22
29
|
function useEvent(callback) {
|
|
23
30
|
return (0, import_useGet.useGet)(callback, defaultValue, !0);
|
|
24
31
|
}
|
|
25
|
-
var defaultValue = function() {
|
|
32
|
+
var defaultValue = function () {
|
|
26
33
|
throw new Error("Cannot call an event handler while rendering.");
|
|
27
34
|
};
|
|
28
|
-
|
|
29
|
-
0 && (module.exports = {
|
|
30
|
-
useEvent
|
|
31
|
-
});
|
|
32
|
-
//# sourceMappingURL=useEvent.js.map
|
|
35
|
+
//# sourceMappingURL=useEvent.native.js.map
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/useEvent.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAuB;AAChB,SAAS,SAAS,UAAU;AAC/B,aAAO,sBAAO,UAAU,cAAc,EAAI;AAC9C;AACA,IAAI,eAAe,WAAW;AAC1B,QAAM,IAAI,MAAM,+CAA+C;AACnE;",
|
|
5
|
-
"names": []
|
|
6
|
-
}
|
|
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":[]}
|
package/dist/cjs/useGet.cjs
CHANGED
|
@@ -35,7 +35,7 @@ __export(useGet_exports, {
|
|
|
35
35
|
});
|
|
36
36
|
module.exports = __toCommonJS(useGet_exports);
|
|
37
37
|
var import_constants = require("@tamagui/constants"),
|
|
38
|
-
React = __toESM(require("react"));
|
|
38
|
+
React = __toESM(require("react"), 1);
|
|
39
39
|
function useGet(currentValue, initialValue, forwardToFunction) {
|
|
40
40
|
const curRef = React.useRef(initialValue ?? currentValue);
|
|
41
41
|
return (0, import_constants.useIsomorphicLayoutEffect)(() => {
|
package/dist/cjs/useGet.js
CHANGED
|
@@ -25,7 +25,7 @@ __export(useGet_exports, {
|
|
|
25
25
|
useGet: () => useGet
|
|
26
26
|
});
|
|
27
27
|
module.exports = __toCommonJS(useGet_exports);
|
|
28
|
-
var import_constants = require("@tamagui/constants"), React = __toESM(require("react"));
|
|
28
|
+
var import_constants = require("@tamagui/constants"), React = __toESM(require("react"), 1);
|
|
29
29
|
function useGet(currentValue, initialValue, forwardToFunction) {
|
|
30
30
|
const curRef = React.useRef(initialValue ?? currentValue);
|
|
31
31
|
return (0, import_constants.useIsomorphicLayoutEffect)(() => {
|
|
@@ -1,47 +1,53 @@
|
|
|
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,
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf,
|
|
8
|
+
__hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
9
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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", {
|
|
22
|
-
|
|
23
|
-
|
|
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 useGet_exports = {};
|
|
25
35
|
__export(useGet_exports, {
|
|
26
36
|
useGet: () => useGet
|
|
27
37
|
});
|
|
28
38
|
module.exports = __toCommonJS(useGet_exports);
|
|
29
|
-
var import_constants = require("@tamagui/constants"),
|
|
39
|
+
var import_constants = require("@tamagui/constants"),
|
|
40
|
+
React = __toESM(require("react"), 1);
|
|
30
41
|
function useGet(currentValue, initialValue, forwardToFunction) {
|
|
31
42
|
var curRef = React.useRef(initialValue ?? currentValue);
|
|
32
|
-
return (0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
43
|
+
return (0, import_constants.useIsomorphicLayoutEffect)(function () {
|
|
33
44
|
curRef.current = currentValue;
|
|
34
|
-
}), React.useCallback(forwardToFunction ? function() {
|
|
35
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++)
|
|
36
|
-
args[_key] = arguments[_key];
|
|
45
|
+
}), React.useCallback(forwardToFunction ? function () {
|
|
46
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
|
|
37
47
|
var _curRef_current;
|
|
38
48
|
return (_curRef_current = curRef.current) === null || _curRef_current === void 0 ? void 0 : _curRef_current.apply(null, args);
|
|
39
|
-
} : function() {
|
|
49
|
+
} : function () {
|
|
40
50
|
return curRef.current;
|
|
41
51
|
}, []);
|
|
42
52
|
}
|
|
43
|
-
|
|
44
|
-
0 && (module.exports = {
|
|
45
|
-
useGet
|
|
46
|
-
});
|
|
47
|
-
//# sourceMappingURL=useGet.js.map
|
|
53
|
+
//# sourceMappingURL=useGet.native.js.map
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/useGet.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAA0C,+BAC1C,QAAuB;AAEhB,SAAS,OAAO,cAAc,cAAc,mBAAmB;AAClE,MAAI,SAAS,MAAM,OAAO,gBAAkE,YAAY;AACxG,yDAA0B,WAAW;AACjC,WAAO,UAAU;AAAA,EACrB,CAAC,GACM,MAAM,YAAY,oBAAoB,WAAW;AACpD,aAAQ,OAAO,UAAU,QAAQ,OAAO,IAAI,MAAM,IAAI,GAAG,OAAO,GAAG,OAAO,MAAM;AAC5E,WAAK,IAAI,IAAI,UAAU,IAAI;AAE/B,QAAI;AACJ,YAAQ,kBAAkB,OAAO,aAAa,QAAQ,oBAAoB,SAAS,SAAS,gBAAgB,MAAM,MAAM,IAAI;AAAA,EAChI,IAAI,WAAW;AACX,WAAO,OAAO;AAAA,EAClB,GAAG,CAAC,CAAC;AACT;",
|
|
5
|
-
"names": []
|
|
6
|
-
}
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","useGet_exports","__export","useGet","module","exports","import_constants","require","React","__toESM","currentValue","initialValue","forwardToFunction","curRef","useRef","useIsomorphicLayoutEffect","current","useCallback","_len","arguments","length","args","Array","_key","_curRef_current"],"sources":["../../src/useGet.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAA;EAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;IAAAC,KAAA;EAAA,IAAAH,GAAA;AAAA,IAAAI,cAAA;AAAAC,QAAA,CAAAD,cAAA;EAAAE,MAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAA0C,CAAAK,cAAA;AAKnC,IAAAK,gBACL,GAAAC,OACA,qBACA;EAAAC,KAAA,GAAAC,OACS,CAAAF,OAAA;AACT,SAAMJ,OAAAO,YAAe,EAAYC,YAAA,EAAAC,iBAA4B;EAC7D,IAAAC,MAAA,GAAAL,KAAA,CAAAM,MAAA,CAAAH,YAAA,IAAAD,YAAA,CAA0B;EACxB,SAAO,EAAAJ,gBAAU,CAAAS,yBAAA;IAClBF,MAEM,CAAAG,OAAM,GAAAN,YAAA;EAAA,EACX,EAAAF,KAAA,CAAAS,WAAA,CACIL,iBAAa,GAAO,YAAS;IAEjC,KAAC,IAAAM,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAC,IAAA,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA,IACHF,IAAA,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;IACF,IAAAC,eAAA","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/use-event",
|
|
3
|
-
"version": "1.135.
|
|
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,11 +19,11 @@
|
|
|
18
19
|
"clean:build": "tamagui-build clean:build"
|
|
19
20
|
},
|
|
20
21
|
"devDependencies": {
|
|
21
|
-
"@tamagui/build": "1.135.
|
|
22
|
+
"@tamagui/build": "1.135.6",
|
|
22
23
|
"react": "*"
|
|
23
24
|
},
|
|
24
25
|
"dependencies": {
|
|
25
|
-
"@tamagui/constants": "1.135.
|
|
26
|
+
"@tamagui/constants": "1.135.6"
|
|
26
27
|
},
|
|
27
28
|
"exports": {
|
|
28
29
|
"./package.json": "./package.json",
|
package/types/useEvent.d.ts.map
CHANGED
package/types/useGet.d.ts
CHANGED
package/types/useGet.d.ts.map
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"mappings": "
|
|
3
|
-
"names": [
|
|
4
|
-
"currentValue: A",
|
|
5
|
-
"initialValue?: any",
|
|
6
|
-
"forwardToFunction?: boolean"
|
|
7
|
-
],
|
|
2
|
+
"mappings": "AAKA,OAAO,iBAAS,OAAO,GACrB,cAAc,GACd,oBACA,oCACO",
|
|
3
|
+
"names": [],
|
|
8
4
|
"sources": [
|
|
9
5
|
"src/useGet.ts"
|
|
10
6
|
],
|