@tamagui/use-event 1.79.12 → 1.79.13
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/useGet.js +2 -3
- package/dist/cjs/useGet.js.map +1 -1
- package/dist/cjs/useGet.native.js +2 -3
- package/dist/cjs/useGet.native.js.map +1 -1
- package/dist/esm/useGet.js +2 -2
- package/dist/esm/useGet.js.map +1 -1
- package/dist/esm/useGet.native.js +2 -2
- package/dist/esm/useGet.native.js.map +1 -1
- package/package.json +5 -2
- package/src/useGet.ts +2 -5
- package/types/useGet.d.ts.map +1 -1
package/dist/cjs/useGet.js
CHANGED
|
@@ -17,11 +17,10 @@ __export(useGet_exports, {
|
|
|
17
17
|
useGet: () => useGet
|
|
18
18
|
});
|
|
19
19
|
module.exports = __toCommonJS(useGet_exports);
|
|
20
|
-
var import_react = require("react");
|
|
21
|
-
const isWeb = !0, isClient = typeof window < "u", useIsomorphicLayoutEffect = !isWeb || isClient ? import_react.useLayoutEffect : import_react.useEffect;
|
|
20
|
+
var import_constants = require("@tamagui/constants"), import_react = require("react");
|
|
22
21
|
function useGet(currentValue, initialValue, forwardToFunction) {
|
|
23
22
|
const curRef = (0, import_react.useRef)(initialValue ?? currentValue);
|
|
24
|
-
return useIsomorphicLayoutEffect(() => {
|
|
23
|
+
return (0, import_constants.useIsomorphicLayoutEffect)(() => {
|
|
25
24
|
curRef.current = currentValue;
|
|
26
25
|
}), (0, import_react.useCallback)(
|
|
27
26
|
forwardToFunction ? (...args) => {
|
package/dist/cjs/useGet.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/useGet.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAA0C,+BAC1C,eAAoC;AAI7B,SAAS,OACd,cACA,cACA,mBACS;AACT,QAAM,aAAS,qBAAY,gBAAgB,YAAY;AACvD,yDAA0B,MAAM;AAC9B,WAAO,UAAU;AAAA,EACnB,CAAC,OAEM;AAAA,IACL,oBACI,IAAI,SAAM;AAjBlB;AAiBqB,0BAAO,YAAP,mBAAgB,MAAM,MAAM;AAAA,QACzC,MAAM,OAAO;AAAA,IACjB,CAAC;AAAA,EACH;AACF;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -18,11 +18,10 @@ __export(useGet_exports, {
|
|
|
18
18
|
useGet: () => useGet
|
|
19
19
|
});
|
|
20
20
|
module.exports = __toCommonJS(useGet_exports);
|
|
21
|
-
var import_react = require("react");
|
|
22
|
-
const isWeb = !1, isClient = typeof window < "u", useIsomorphicLayoutEffect = !isWeb || isClient ? import_react.useLayoutEffect : import_react.useEffect;
|
|
21
|
+
var import_constants = require("@tamagui/constants"), import_react = require("react");
|
|
23
22
|
function useGet(currentValue, initialValue, forwardToFunction) {
|
|
24
23
|
const curRef = (0, import_react.useRef)(initialValue ?? currentValue);
|
|
25
|
-
return useIsomorphicLayoutEffect(() => {
|
|
24
|
+
return (0, import_constants.useIsomorphicLayoutEffect)(() => {
|
|
26
25
|
curRef.current = currentValue;
|
|
27
26
|
}), (0, import_react.useCallback)(
|
|
28
27
|
forwardToFunction ? (...args) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/useGet.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAA0C,+BAC1C,eAAoC;AAI7B,SAAS,OACd,cACA,cACA,mBACS;AACT,QAAM,aAAS,qBAAY,gBAAgB,YAAY;AACvD,yDAA0B,MAAM;AAC9B,WAAO,UAAU;AAAA,EACnB,CAAC,OAEM;AAAA,IACL,oBACI,IAAI,SAAM;AAjBlB;AAiBqB,0BAAO,YAAP,mBAAgB,MAAM,MAAM;AAAA,QACzC,MAAM,OAAO;AAAA,IACjB,CAAC;AAAA,EACH;AACF;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
package/dist/esm/useGet.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { useIsomorphicLayoutEffect } from "@tamagui/constants";
|
|
2
|
+
import { useCallback, useRef } from "react";
|
|
3
3
|
function useGet(currentValue, initialValue, forwardToFunction) {
|
|
4
4
|
const curRef = useRef(initialValue ?? currentValue);
|
|
5
5
|
return useIsomorphicLayoutEffect(() => {
|
package/dist/esm/useGet.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/useGet.ts"],
|
|
4
|
-
"mappings": "AAAA,SAAS,
|
|
4
|
+
"mappings": "AAAA,SAAS,iCAAiC;AAC1C,SAAS,aAAa,cAAc;AAI7B,SAAS,OACd,cACA,cACA,mBACS;AACT,QAAM,SAAS,OAAY,gBAAgB,YAAY;AACvD,mCAA0B,MAAM;AAC9B,WAAO,UAAU;AAAA,EACnB,CAAC,GAEM;AAAA,IACL,oBACI,IAAI,SAAS,OAAO,SAAS,MAAM,MAAM,IAAI,IAC7C,MAAM,OAAO;AAAA,IACjB,CAAC;AAAA,EACH;AACF;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { useIsomorphicLayoutEffect } from "@tamagui/constants";
|
|
2
|
+
import { useCallback, useRef } from "react";
|
|
3
3
|
function useGet(currentValue, initialValue, forwardToFunction) {
|
|
4
4
|
const curRef = useRef(initialValue ?? currentValue);
|
|
5
5
|
return useIsomorphicLayoutEffect(() => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/useGet.ts"],
|
|
4
|
-
"mappings": "AAAA,SAAS,
|
|
4
|
+
"mappings": "AAAA,SAAS,iCAAiC;AAC1C,SAAS,aAAa,cAAc;AAI7B,SAAS,OACd,cACA,cACA,mBACS;AACT,QAAM,SAAS,OAAY,gBAAgB,YAAY;AACvD,mCAA0B,MAAM;AAC9B,WAAO,UAAU;AAAA,EACnB,CAAC,GAEM;AAAA,IACL,oBACI,IAAI,SAAS,OAAO,SAAS,MAAM,MAAM,IAAI,IAC7C,MAAM,OAAO;AAAA,IACjB,CAAC;AAAA,EACH;AACF;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/use-event",
|
|
3
|
-
"version": "1.79.
|
|
3
|
+
"version": "1.79.13",
|
|
4
4
|
"types": "./types/index.d.ts",
|
|
5
5
|
"main": "dist/cjs",
|
|
6
6
|
"module": "dist/esm",
|
|
@@ -18,9 +18,12 @@
|
|
|
18
18
|
"clean:build": "tamagui-build clean:build"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@tamagui/build": "1.79.
|
|
21
|
+
"@tamagui/build": "1.79.13",
|
|
22
22
|
"react": "^18.2.0"
|
|
23
23
|
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@tamagui/constants": "1.79.13"
|
|
26
|
+
},
|
|
24
27
|
"peerDependencies": {
|
|
25
28
|
"react": "*"
|
|
26
29
|
},
|
package/src/useGet.ts
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
const isWeb = process.env.TAMAGUI_TARGET === 'web'
|
|
4
|
-
const isClient = typeof window !== 'undefined'
|
|
5
|
-
const useIsomorphicLayoutEffect = !isWeb || isClient ? useLayoutEffect : useEffect
|
|
1
|
+
import { useIsomorphicLayoutEffect } from '@tamagui/constants'
|
|
2
|
+
import { useCallback, useRef } from 'react'
|
|
6
3
|
|
|
7
4
|
// keeps a reference to the current value easily
|
|
8
5
|
|
package/types/useGet.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGet.d.ts","sourceRoot":"","sources":["../src/useGet.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useGet.d.ts","sourceRoot":"","sources":["../src/useGet.ts"],"names":[],"mappings":"AAKA,wBAAgB,MAAM,CAAC,CAAC,EACtB,YAAY,EAAE,CAAC,EACf,YAAY,CAAC,EAAE,GAAG,EAClB,iBAAiB,CAAC,EAAE,OAAO,GAC1B,MAAM,CAAC,CAYT"}
|