@tamagui/core 1.126.13 → 1.126.14
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/hooks/useElementLayout.cjs +58 -64
- package/dist/cjs/hooks/useElementLayout.js +50 -63
- package/dist/cjs/hooks/useElementLayout.js.map +1 -1
- package/dist/cjs/hooks/useElementLayout.native.js +58 -95
- package/dist/cjs/hooks/useElementLayout.native.js.map +2 -2
- package/dist/cjs/index.cjs +4 -2
- package/dist/cjs/index.js +3 -2
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/index.native.js +4 -2
- package/dist/cjs/index.native.js.map +2 -2
- package/dist/esm/hooks/useElementLayout.js +54 -64
- package/dist/esm/hooks/useElementLayout.js.map +1 -1
- package/dist/esm/hooks/useElementLayout.mjs +59 -65
- package/dist/esm/hooks/useElementLayout.mjs.map +1 -1
- package/dist/esm/hooks/useElementLayout.native.js +74 -107
- package/dist/esm/hooks/useElementLayout.native.js.map +1 -1
- package/dist/esm/index.js +5 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.mjs +2 -1
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/index.native.js +2 -1
- package/dist/esm/index.native.js.map +1 -1
- package/dist/native.js +102 -118
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +99 -117
- package/dist/test.native.js.map +2 -2
- package/package.json +7 -7
- package/src/hooks/useElementLayout.tsx +97 -88
- package/src/index.tsx +6 -0
- package/types/hooks/useElementLayout.d.ts +2 -2
- package/types/hooks/useElementLayout.d.ts.map +1 -1
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -14,6 +14,9 @@ import { getRect } from "./helpers/getRect";
|
|
|
14
14
|
import { measureLayout, useElementLayout } from "./hooks/useElementLayout";
|
|
15
15
|
import "./vendor/Pressability";
|
|
16
16
|
import { addNativeValidStyles } from "./addNativeValidStyles";
|
|
17
|
+
import {
|
|
18
|
+
getElementLayoutEvent
|
|
19
|
+
} from "./hooks/useElementLayout";
|
|
17
20
|
export * from "@tamagui/web";
|
|
18
21
|
export * from "./reactNativeTypes";
|
|
19
22
|
addNativeValidStyles();
|
|
@@ -75,6 +78,7 @@ export {
|
|
|
75
78
|
Stack,
|
|
76
79
|
Text,
|
|
77
80
|
View,
|
|
78
|
-
createTamagui
|
|
81
|
+
createTamagui,
|
|
82
|
+
getElementLayoutEvent
|
|
79
83
|
};
|
|
80
84
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.tsx"],
|
|
4
|
-
"mappings": "AAAA,OAA4B;AAC5B,SAAS,0BAA0B;AAYnC;AAAA,EACE,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AAAA,EAER,iBAAiB;AAAA,EACjB;AAAA,OACK;AACP,OAAkB;AAElB,OAAoC;AACpC,SAAS,oBAAoB;AAC7B,SAAS,eAAe;AACxB,SAAS,eAAe,wBAAwB;AAEhD,OAAgC;AAChC,SAAS,4BAA4B;
|
|
4
|
+
"mappings": "AAAA,OAA4B;AAC5B,SAAS,0BAA0B;AAYnC;AAAA,EACE,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AAAA,EAER,iBAAiB;AAAA,EACjB;AAAA,OACK;AACP,OAAkB;AAElB,OAAoC;AACpC,SAAS,oBAAoB;AAC7B,SAAS,eAAe;AACxB,SAAS,eAAe,wBAAwB;AAEhD,OAAgC;AAChC,SAAS,4BAA4B;AAGrC;AAAA,EACE;AAAA,OAEK;AAkCP,cAAc;AAGd,cAAc;AAlCd,qBAAqB;AAqCd,MAAM,gBAAyC,CAAC,SAM9C,iBAAiB,IAAI,GAGxB,YAAY,aAAa;AAI/B,WAAW;AAAA,EACT;AAAA,EAEA,iBAAiB,CAAC,SAAS;AAEzB,IAAI,QAAQ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AQ,UACR,OAAO;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -8,6 +8,7 @@ import { getRect } from "./helpers/getRect.mjs";
|
|
|
8
8
|
import { measureLayout, useElementLayout } from "./hooks/useElementLayout.mjs";
|
|
9
9
|
import "./vendor/Pressability.mjs";
|
|
10
10
|
import { addNativeValidStyles } from "./addNativeValidStyles.mjs";
|
|
11
|
+
import { getElementLayoutEvent } from "./hooks/useElementLayout.mjs";
|
|
11
12
|
export * from "@tamagui/web";
|
|
12
13
|
export * from "./reactNativeTypes.mjs";
|
|
13
14
|
addNativeValidStyles();
|
|
@@ -79,5 +80,5 @@ setupHooks({
|
|
|
79
80
|
const View = WebView,
|
|
80
81
|
Stack = WebStack,
|
|
81
82
|
Text = WebText;
|
|
82
|
-
export { Stack, Text, View, createTamagui };
|
|
83
|
+
export { Stack, Text, View, createTamagui, getElementLayoutEvent };
|
|
83
84
|
//# sourceMappingURL=index.mjs.map
|
package/dist/esm/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useResponderEvents","Stack","WebStack","Text","WebText","View","WebView","createTamagui","createTamaguiWeb","setupHooks","getBaseViews","getRect","measureLayout","useElementLayout","addNativeValidStyles","conf","baseViews","setElementProps","node","measure","callback","relativeToNode","success","measureInWindow","setTimeout","height","left","top","width","usePropsTransform","elementType","propsIn","stateRef","willHydrate","isDOM","onMoveShouldSetResponder","onMoveShouldSetResponderCapture","onResponderEnd","onResponderGrant","onResponderMove","onResponderReject","onResponderRelease","onResponderStart","onResponderTerminate","onResponderTerminationRequest","onScrollShouldSetResponder","onScrollShouldSetResponderCapture","onSelectionChangeShouldSetResponder","onSelectionChangeShouldSetResponderCapture","onStartShouldSetResponder","onStartShouldSetResponderCapture","collapsable","focusable","accessible","accessibilityDisabled","onLayout","hrefAttrs","plainDOMProps","href","download","rel","target","charAt","useEvents","viewProps","events","pseudos","setStateShallow","staticConfig"],"sources":["../../src/index.tsx"],"sourcesContent":[null],"mappings":"AAAA,OAA4B;AAC5B,SAASA,kBAAA,QAA0B;AAYnC,SACEC,KAAA,IAASC,QAAA,EACTC,IAAA,IAAQC,OAAA,EACRC,IAAA,IAAQC,OAAA,EAERC,aAAA,IAAiBC,gBAAA,EACjBC,UAAA,QACK;AACP,OAAkB;AAElB,OAAoC;AACpC,SAASC,YAAA,QAAoB;AAC7B,SAASC,OAAA,QAAe;AACxB,SAASC,aAAA,EAAeC,gBAAA,QAAwB;AAEhD,OAAgC;AAChC,SAASC,oBAAA,QAA4B;
|
|
1
|
+
{"version":3,"names":["useResponderEvents","Stack","WebStack","Text","WebText","View","WebView","createTamagui","createTamaguiWeb","setupHooks","getBaseViews","getRect","measureLayout","useElementLayout","addNativeValidStyles","getElementLayoutEvent","conf","baseViews","setElementProps","node","measure","callback","relativeToNode","success","measureInWindow","setTimeout","height","left","top","width","usePropsTransform","elementType","propsIn","stateRef","willHydrate","isDOM","onMoveShouldSetResponder","onMoveShouldSetResponderCapture","onResponderEnd","onResponderGrant","onResponderMove","onResponderReject","onResponderRelease","onResponderStart","onResponderTerminate","onResponderTerminationRequest","onScrollShouldSetResponder","onScrollShouldSetResponderCapture","onSelectionChangeShouldSetResponder","onSelectionChangeShouldSetResponderCapture","onStartShouldSetResponder","onStartShouldSetResponderCapture","collapsable","focusable","accessible","accessibilityDisabled","onLayout","hrefAttrs","plainDOMProps","href","download","rel","target","charAt","useEvents","viewProps","events","pseudos","setStateShallow","staticConfig"],"sources":["../../src/index.tsx"],"sourcesContent":[null],"mappings":"AAAA,OAA4B;AAC5B,SAASA,kBAAA,QAA0B;AAYnC,SACEC,KAAA,IAASC,QAAA,EACTC,IAAA,IAAQC,OAAA,EACRC,IAAA,IAAQC,OAAA,EAERC,aAAA,IAAiBC,gBAAA,EACjBC,UAAA,QACK;AACP,OAAkB;AAElB,OAAoC;AACpC,SAASC,YAAA,QAAoB;AAC7B,SAASC,OAAA,QAAe;AACxB,SAASC,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UAEAC,QAAA;UACAC,SAAA;UAEA,GAAGC;QACL,IAAI1B,OAAA;MAOJ,KALIE,WAAA,IAAeC,KAAA,MACjBtB,gBAAA,CAAiBoB,QAAA,EAAWE,KAAA,GAAqBqB,QAAA,GAAb,MAA6B,GACjExD,kBAAA,CAAmBiC,QAAA,EAAWE,KAAA,GAAoBH,OAAA,GAAZ,MAAmB,IAGvDG,KAAA,EAAO;QAET,IAAIuB,aAAA,CAAcC,IAAA,IAAQF,SAAA,EAAW;UACnC,MAAM;YAAEG,QAAA;YAAUC,GAAA;YAAKC;UAAO,IAAIL,SAAA;UAC9BG,QAAA,IAAY,SACdF,aAAA,CAAcE,QAAA,GAAWA,QAAA,GAEvBC,GAAA,KACFH,aAAA,CAAcG,GAAA,GAAMA,GAAA,GAElB,OAAOC,MAAA,IAAW,aACpBJ,aAAA,CAAcI,MAAA,GAASA,MAAA,CAAOC,MAAA,CAAO,CAAC,MAAM,MAAM,IAAID,MAAM,KAAKA,MAAA;QAErE;QACA,OAAOJ,aAAA;MACT;IACF;EACF;EAEAM,UAAUC,SAAA,EAAWC,MAAA,EAAQ;IAAEC;EAAQ,GAAGC,eAAA,EAAiBC,YAAA,EAAc,CA0DzE;AAwBF,CAAC;AAQM,MAAMhE,IAAA,GAAOC,OAAA;EACPL,KAAA,GAAQC,QAAA;EACRC,IAAA,GAAOC,OAAA","ignoreList":[]}
|
package/dist/esm/index.native.js
CHANGED
|
@@ -8,6 +8,7 @@ import { getRect } from "./helpers/getRect.native.js";
|
|
|
8
8
|
import { measureLayout } from "./hooks/useElementLayout.native.js";
|
|
9
9
|
import { usePressability } from "./vendor/Pressability.native.js";
|
|
10
10
|
import { addNativeValidStyles } from "./addNativeValidStyles.native.js";
|
|
11
|
+
import { getElementLayoutEvent } from "./hooks/useElementLayout.native.js";
|
|
11
12
|
export * from "@tamagui/web";
|
|
12
13
|
export * from "./reactNativeTypes.native.js";
|
|
13
14
|
addNativeValidStyles();
|
|
@@ -83,5 +84,5 @@ var dontComposePressabilityKeys = {
|
|
|
83
84
|
View = WebView,
|
|
84
85
|
Stack = WebStack,
|
|
85
86
|
Text = WebText;
|
|
86
|
-
export { Stack, Text, View, createTamagui };
|
|
87
|
+
export { Stack, Text, View, createTamagui, getElementLayoutEvent };
|
|
87
88
|
//# sourceMappingURL=index.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createMedia","Stack","WebStack","Text","WebText","View","WebView","composeEventHandlers","createTamagui","createTamaguiWeb","setupHooks","React","createOptimizedView","getBaseViews","getRect","measureLayout","usePressability","addNativeValidStyles","conf","media","baseViews","setElementProps","node","measure","_node","_node1","_node2","callback","relativeToNode","success","measureInWindow","setTimeout","height","left","top","width","usePropsTransform","elementType","propsIn","stateRef","willHydrate","isDOM","onMoveShouldSetResponder","onMoveShouldSetResponderCapture","onResponderEnd","onResponderGrant","onResponderMove","onResponderReject","onResponderRelease","onResponderStart","onResponderTerminate","onResponderTerminationRequest","onScrollShouldSetResponder","onScrollShouldSetResponderCapture","onSelectionChangeShouldSetResponder","onSelectionChangeShouldSetResponderCapture","onStartShouldSetResponder","onStartShouldSetResponderCapture","collapsable","focusable","accessible","accessibilityDisabled","onLayout","hrefAttrs","plainDOMProps","href","download","rel","target","useEvents","viewProps","events","param","setStateShallow","staticConfig","pseudos","onFocus","onBlur","isInput","onPressIn","onPressOut","onPress","inputEvents","Object","assign","hitSlop","pressability","process","env","NODE_ENV","debug","console","info","keys","key","og","val","dontComposePressabilityKeys","useChildren","children","TAMAGUI_OPTIMIZE_NATIVE_VIEWS","createElement","onClick"],"sources":["../../src/index.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAA4BA,WAAA;AAC5B,mDAAmC;AAYnC,SAAAC,KAAA,IAAAC,QAAA,EAAAC,IAAA,IAAAC,OAAA,EAAAC,IAAA,IAAAC,OAAA,EAAAC,oBAAA,EAAAC,aAAA,IAAAC,gBAAA,EAAAC,UAAA;AAAA,OACEC,KAAS;AAAA,SACTC,mBAAQ;AAAA,SACRC,YAAQ;AAAA,SAERC,OAAA,QAAiB;AAAA,SACjBC,aAAA;AAAA,SACKC,eAAA;AACP,SAAkBC,oBAAA;AAElB,
|
|
1
|
+
{"version":3,"names":["createMedia","Stack","WebStack","Text","WebText","View","WebView","composeEventHandlers","createTamagui","createTamaguiWeb","setupHooks","React","createOptimizedView","getBaseViews","getRect","measureLayout","usePressability","addNativeValidStyles","getElementLayoutEvent","conf","media","baseViews","setElementProps","node","measure","_node","_node1","_node2","callback","relativeToNode","success","measureInWindow","setTimeout","height","left","top","width","usePropsTransform","elementType","propsIn","stateRef","willHydrate","isDOM","onMoveShouldSetResponder","onMoveShouldSetResponderCapture","onResponderEnd","onResponderGrant","onResponderMove","onResponderReject","onResponderRelease","onResponderStart","onResponderTerminate","onResponderTerminationRequest","onScrollShouldSetResponder","onScrollShouldSetResponderCapture","onSelectionChangeShouldSetResponder","onSelectionChangeShouldSetResponderCapture","onStartShouldSetResponder","onStartShouldSetResponderCapture","collapsable","focusable","accessible","accessibilityDisabled","onLayout","hrefAttrs","plainDOMProps","href","download","rel","target","useEvents","viewProps","events","param","setStateShallow","staticConfig","pseudos","onFocus","onBlur","isInput","onPressIn","onPressOut","onPress","inputEvents","Object","assign","hitSlop","pressability","process","env","NODE_ENV","debug","console","info","keys","key","og","val","dontComposePressabilityKeys","useChildren","children","TAMAGUI_OPTIMIZE_NATIVE_VIEWS","createElement","onClick"],"sources":["../../src/index.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAA4BA,WAAA;AAC5B,mDAAmC;AAYnC,SAAAC,KAAA,IAAAC,QAAA,EAAAC,IAAA,IAAAC,OAAA,EAAAC,IAAA,IAAAC,OAAA,EAAAC,oBAAA,EAAAC,aAAA,IAAAC,gBAAA,EAAAC,UAAA;AAAA,OACEC,KAAS;AAAA,SACTC,mBAAQ;AAAA,SACRC,YAAQ;AAAA,SAERC,OAAA,QAAiB;AAAA,SACjBC,aAAA;AAAA,SACKC,eAAA;AACP,SAA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B,MAAA,CAAAU,OAAA,sCAAAE,MAAA,CAAAU,IAAA,CAAAP,YAAA,YAAAf,MAAA,CAAAU,OAAA,GACA,SAAAa,GAAA,IAAAR,YAAA;QAAA,IAAAS,EAAA,GAAAzB,SAAA,CAAAwB,GAAA;UAAAE,GAAA,GAAAV,YAAA,CAAAQ,GAAA;QAGAxB,SAAA,CAAAwB,GAAA,IAAAC,EAAA,KAAAE,2BAAA,CAAAH,GAAA,IAAAxF,oBAAA,CAAAyF,EAAA,EAAAC,GAAA,IAAAA,GAAA;MACA;IAAA;EAEA;EACAE,WAEGA,CAAA7D,WAAA,EAAA8D,QAAA,EAAA7B,SAAA;IAAA,IACLiB,OAAI,CAAAC,GAAA,CAAAC,QAAA;MAOJ,IAAApD,WALI,KAAejB,SAAA,CAAAhB,IACjB,EAMA,OAAIO,mBAAsB,CAAAwF,QAAA,EAAW7B,SAAA,EAAAlD,SAAA;MACnC,IAAAmE,OAAM,CAAEC,GAAA,CAAAY,6BAA0B,IAAA/D,WAAA,KAAAjB,SAAA,CAAAlB,IAAA,EAClC,OAAIoE,SAAY,CAAA6B,QACd,GAAAA,QAAA,EAAc,eAAWzF,KAEvB,CAAA2F,aACF,UAAc,EAAA/B,SAEZ;IAC+D;EAGrE;AAAO;AACT,IACF2B,2BAAA;IACFK,OAAA;EAAA;EAEAlG,IAAA,GAAAC,OAAU;EAAAL,KAAW,GAAAC,QAAU;EAAAC,IAAQ,GAAGC,OAAA;AAA+B,SAkF1EH,KAAA,EAQME,IAAM,E","ignoreList":[]}
|
package/dist/native.js
CHANGED
|
@@ -70,9 +70,9 @@ var require_index_native = __commonJS({
|
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
72
|
module2.exports = __toCommonJS2(index_exports2);
|
|
73
|
-
var
|
|
73
|
+
var cache = /* @__PURE__ */ new Map(), cacheSize = 0, simpleHash = function(strIn) {
|
|
74
74
|
var hashMin = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 10;
|
|
75
|
-
if (
|
|
75
|
+
if (cache.has(strIn)) return cache.get(strIn);
|
|
76
76
|
var str = strIn;
|
|
77
77
|
str[0] === "v" && str.startsWith("var(") && (str = str.slice(6, str.length - 1));
|
|
78
78
|
for (var hash = 0, valids = "", added = 0, len = str.length, i = 0; i < len; i++) {
|
|
@@ -90,7 +90,7 @@ var require_index_native = __commonJS({
|
|
|
90
90
|
hash = hashChar(hash, str[i]);
|
|
91
91
|
}
|
|
92
92
|
var res = valids + (hash ? Math.abs(hash) : "");
|
|
93
|
-
return cacheSize > 1e4 && (
|
|
93
|
+
return cacheSize > 1e4 && (cache.clear(), cacheSize = 0), cache.set(strIn, res), cacheSize++, res;
|
|
94
94
|
}, hashChar = function(hash, c) {
|
|
95
95
|
return Math.imul(31, hash) + c.charCodeAt(0) | 0;
|
|
96
96
|
};
|
|
@@ -403,7 +403,7 @@ var require_constants_native = __commonJS({
|
|
|
403
403
|
return isChrome;
|
|
404
404
|
},
|
|
405
405
|
isClient: function() {
|
|
406
|
-
return
|
|
406
|
+
return isClient2;
|
|
407
407
|
},
|
|
408
408
|
isIos: function() {
|
|
409
409
|
return isIos;
|
|
@@ -428,7 +428,7 @@ var require_constants_native = __commonJS({
|
|
|
428
428
|
}
|
|
429
429
|
});
|
|
430
430
|
module2.exports = __toCommonJS2(constants_native_exports);
|
|
431
|
-
var import_react3 = require("react"), import_react_native = require("react-native"), isWeb = !1, isWindowDefined = !1, isServer = !1,
|
|
431
|
+
var import_react3 = require("react"), import_react_native = require("react-native"), isWeb = !1, isWindowDefined = !1, isServer = !1, isClient2 = !1, useIsomorphicLayoutEffect2 = import_react3.useLayoutEffect, isChrome = !1, isWebTouchable = !1, isTouchable = !0, isAndroid = import_react_native.Platform.OS === "android" || process.env.TEST_NATIVE_PLATFORM === "android", isIos = import_react_native.Platform.OS === "ios" || process.env.TEST_NATIVE_PLATFORM === "ios", platforms = {
|
|
432
432
|
ios: "ios",
|
|
433
433
|
android: "android"
|
|
434
434
|
}, currentPlatform = platforms[import_react_native.Platform.OS] || "native";
|
|
@@ -2114,15 +2114,15 @@ var require_useMedia_native = __commonJS({
|
|
|
2114
2114
|
return `-${m.toLowerCase()}`;
|
|
2115
2115
|
}).toLowerCase();
|
|
2116
2116
|
}
|
|
2117
|
-
var
|
|
2117
|
+
var cache = /* @__PURE__ */ new WeakMap(), cachedMediaKeyToQuery = {};
|
|
2118
2118
|
function mediaObjectToString2(query, key) {
|
|
2119
2119
|
if (typeof query == "string") return query;
|
|
2120
|
-
if (
|
|
2120
|
+
if (cache.has(query)) return cache.get(query);
|
|
2121
2121
|
var res = Object.entries(query).map(function(param) {
|
|
2122
2122
|
var [feature, value] = param;
|
|
2123
2123
|
return feature = camelToHyphen(feature), typeof value == "string" ? `(${feature}: ${value})` : (typeof value == "number" && /[height|width]$/.test(feature) && (value = `${value}px`), `(${feature}: ${value})`);
|
|
2124
2124
|
}).join(" and ");
|
|
2125
|
-
return key && (cachedMediaKeyToQuery[key] = res),
|
|
2125
|
+
return key && (cachedMediaKeyToQuery[key] = res), cache.set(query, res), res;
|
|
2126
2126
|
}
|
|
2127
2127
|
function mediaKeyToQuery(key) {
|
|
2128
2128
|
return cachedMediaKeyToQuery[key] || mediaObjectToString2(mediaQueryConfig2[key], key);
|
|
@@ -2498,15 +2498,15 @@ var require_objectIdentityKey_native = __commonJS({
|
|
|
2498
2498
|
k += key;
|
|
2499
2499
|
var arg = obj[key], type = typeof arg;
|
|
2500
2500
|
if (!arg || type !== "object" && type !== "function") k += type + arg;
|
|
2501
|
-
else if (
|
|
2501
|
+
else if (cache.has(arg)) k += cache.get(arg);
|
|
2502
2502
|
else {
|
|
2503
2503
|
var v = Math.random();
|
|
2504
|
-
|
|
2504
|
+
cache.set(arg, v), k += v;
|
|
2505
2505
|
}
|
|
2506
2506
|
}
|
|
2507
2507
|
return k;
|
|
2508
2508
|
}
|
|
2509
|
-
var
|
|
2509
|
+
var cache = /* @__PURE__ */ new WeakMap();
|
|
2510
2510
|
}
|
|
2511
2511
|
});
|
|
2512
2512
|
|
|
@@ -4533,8 +4533,8 @@ var require_getVariantExtras_native = __commonJS({
|
|
|
4533
4533
|
}
|
|
4534
4534
|
});
|
|
4535
4535
|
module2.exports = __toCommonJS2(getVariantExtras_exports);
|
|
4536
|
-
var import_createVariable = require_createVariable_native(),
|
|
4537
|
-
if (
|
|
4536
|
+
var import_createVariable = require_createVariable_native(), cache = /* @__PURE__ */ new WeakMap(), getVariantExtras = function(styleState) {
|
|
4537
|
+
if (cache.has(styleState)) return cache.get(styleState);
|
|
4538
4538
|
var { props, conf, context, theme } = styleState, fonts = conf.fontsParsed;
|
|
4539
4539
|
context != null && context.language && (fonts = getFontsForLanguage(conf.fontsParsed, context.language));
|
|
4540
4540
|
var next = {
|
|
@@ -4549,7 +4549,7 @@ var require_getVariantExtras_native = __commonJS({
|
|
|
4549
4549
|
},
|
|
4550
4550
|
props
|
|
4551
4551
|
};
|
|
4552
|
-
return
|
|
4552
|
+
return cache.set(styleState, next), next;
|
|
4553
4553
|
}, fontLanguageCache = /* @__PURE__ */ new WeakMap();
|
|
4554
4554
|
function getFontsForLanguage(fonts, language) {
|
|
4555
4555
|
if (fontLanguageCache.has(language)) return fontLanguageCache.get(language);
|
|
@@ -6005,7 +6005,7 @@ var require_createShallowSetState_native = __commonJS({
|
|
|
6005
6005
|
return createShallowSetState;
|
|
6006
6006
|
},
|
|
6007
6007
|
isEqualShallow: function() {
|
|
6008
|
-
return
|
|
6008
|
+
return isEqualShallow2;
|
|
6009
6009
|
},
|
|
6010
6010
|
mergeIfNotShallowEqual: function() {
|
|
6011
6011
|
return mergeIfNotShallowEqual;
|
|
@@ -6036,7 +6036,7 @@ var require_createShallowSetState_native = __commonJS({
|
|
|
6036
6036
|
for (var key in next) onlyAllow.includes(key) && (allowed[key] = next[key]);
|
|
6037
6037
|
next = allowed;
|
|
6038
6038
|
}
|
|
6039
|
-
if (!prev || !next ||
|
|
6039
|
+
if (!prev || !next || isEqualShallow2(prev, next)) return prev || next;
|
|
6040
6040
|
if (process.env.NODE_ENV === "development" && debug && (console.info("setStateShallow CHANGE", {
|
|
6041
6041
|
prev,
|
|
6042
6042
|
next
|
|
@@ -6046,7 +6046,7 @@ var require_createShallowSetState_native = __commonJS({
|
|
|
6046
6046
|
...next
|
|
6047
6047
|
};
|
|
6048
6048
|
}
|
|
6049
|
-
function
|
|
6049
|
+
function isEqualShallow2(prev, next) {
|
|
6050
6050
|
for (var key in next) if (prev[key] !== next[key]) return !1;
|
|
6051
6051
|
return !0;
|
|
6052
6052
|
}
|
|
@@ -6487,11 +6487,11 @@ var require_getThemeProxied_native = __commonJS({
|
|
|
6487
6487
|
}
|
|
6488
6488
|
});
|
|
6489
6489
|
module2.exports = __toCommonJS2(getThemeProxied_exports);
|
|
6490
|
-
var import_constants2 = require_index_native2(), import_config = require_config_native(), import_createVariable = require_createVariable_native(), import_doesRootSchemeMatchSystem = require_doesRootSchemeMatchSystem_native(), import_getDynamicVal = require_getDynamicVal_native(),
|
|
6490
|
+
var import_constants2 = require_index_native2(), import_config = require_config_native(), import_createVariable = require_createVariable_native(), import_doesRootSchemeMatchSystem = require_doesRootSchemeMatchSystem_native(), import_getDynamicVal = require_getDynamicVal_native(), cache = /* @__PURE__ */ new Map(), curKeys, curProps, curState, emptyObject = {};
|
|
6491
6491
|
function getThemeProxied(_props, _state, _keys) {
|
|
6492
6492
|
if (!(_state != null && _state.theme)) return emptyObject;
|
|
6493
|
-
if (curKeys = _keys, curProps = _props, curState = _state,
|
|
6494
|
-
var proxied =
|
|
6493
|
+
if (curKeys = _keys, curProps = _props, curState = _state, cache.has(curState.theme)) {
|
|
6494
|
+
var proxied = cache.get(curState.theme);
|
|
6495
6495
|
return proxied;
|
|
6496
6496
|
}
|
|
6497
6497
|
var config = (0, import_config.getConfig)();
|
|
@@ -6535,7 +6535,7 @@ var require_getThemeProxied_native = __commonJS({
|
|
|
6535
6535
|
]
|
|
6536
6536
|
];
|
|
6537
6537
|
}));
|
|
6538
|
-
return
|
|
6538
|
+
return cache.set(_state.theme, proxied1), proxied1;
|
|
6539
6539
|
}
|
|
6540
6540
|
}
|
|
6541
6541
|
});
|
|
@@ -8175,9 +8175,9 @@ var require_createVariables_native = __commonJS({
|
|
|
8175
8175
|
}
|
|
8176
8176
|
});
|
|
8177
8177
|
module2.exports = __toCommonJS2(createVariables_exports);
|
|
8178
|
-
var import_helpers2 = require_index_native3(), import_createVariable = require_createVariable_native(),
|
|
8178
|
+
var import_helpers2 = require_index_native3(), import_createVariable = require_createVariable_native(), cache = /* @__PURE__ */ new WeakMap(), createVariables = function(tokens) {
|
|
8179
8179
|
var parentPath = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "", isFont = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
|
|
8180
|
-
if (
|
|
8180
|
+
if (cache.has(tokens)) return tokens;
|
|
8181
8181
|
var res = {}, i = 0;
|
|
8182
8182
|
for (var keyIn in tokens) {
|
|
8183
8183
|
i++;
|
|
@@ -8198,7 +8198,7 @@ var require_createVariables_native = __commonJS({
|
|
|
8198
8198
|
});
|
|
8199
8199
|
res[key] = finalValue;
|
|
8200
8200
|
}
|
|
8201
|
-
return
|
|
8201
|
+
return cache.set(res, !0), res;
|
|
8202
8202
|
};
|
|
8203
8203
|
}
|
|
8204
8204
|
});
|
|
@@ -10195,13 +10195,25 @@ var require_TamaguiProvider_native = __commonJS({
|
|
|
10195
10195
|
__export2(TamaguiProvider_exports, {
|
|
10196
10196
|
TamaguiProvider: function() {
|
|
10197
10197
|
return TamaguiProvider;
|
|
10198
|
+
},
|
|
10199
|
+
___onDidFinishClientRender: function() {
|
|
10200
|
+
return ___onDidFinishClientRender2;
|
|
10198
10201
|
}
|
|
10199
10202
|
});
|
|
10200
10203
|
module2.exports = __toCommonJS2(TamaguiProvider_exports);
|
|
10201
|
-
var import_jsx_runtime = require("react/jsx-runtime"), import_constants2 = require_index_native2(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_ComponentContext = require_ComponentContext_native(), import_ThemeProvider = require_ThemeProvider_native(), import_useMedia = require_useMedia_native();
|
|
10204
|
+
var import_jsx_runtime = require("react/jsx-runtime"), import_constants2 = require_index_native2(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_ComponentContext = require_ComponentContext_native(), import_ThemeProvider = require_ThemeProvider_native(), import_useMedia = require_useMedia_native(), listeners = /* @__PURE__ */ new Set(), didRender = !1;
|
|
10205
|
+
function ___onDidFinishClientRender2(cb) {
|
|
10206
|
+
didRender ? cb() : listeners.add(cb);
|
|
10207
|
+
}
|
|
10202
10208
|
function TamaguiProvider(param) {
|
|
10203
10209
|
var { children, disableInjectCSS, config, className, defaultTheme, disableRootThemeClass, reset, themeClassNameOnRoot } = param;
|
|
10204
|
-
return
|
|
10210
|
+
return (0, import_react3.useEffect)(function() {
|
|
10211
|
+
return listeners.forEach(function(cb) {
|
|
10212
|
+
return cb();
|
|
10213
|
+
}), didRender = !0, function() {
|
|
10214
|
+
didRender = !1;
|
|
10215
|
+
};
|
|
10216
|
+
}, []), process.env.TAMAGUI_REACT_19 || import_constants2.isClient && (0, import_constants2.useIsomorphicLayoutEffect)(function() {
|
|
10205
10217
|
if (config && !disableInjectCSS) {
|
|
10206
10218
|
var style = document.createElement("style");
|
|
10207
10219
|
return style.appendChild(document.createTextNode(config.getCSS())), document.head.appendChild(style), function() {
|
|
@@ -11023,9 +11035,9 @@ var require_createMedia_native = __commonJS({
|
|
|
11023
11035
|
}
|
|
11024
11036
|
});
|
|
11025
11037
|
module2.exports = __toCommonJS2(createMedia_exports);
|
|
11026
|
-
var
|
|
11038
|
+
var import_web3 = require_index_native8(), import_matchMedia = require_matchMedia_native2();
|
|
11027
11039
|
function createMedia2(media) {
|
|
11028
|
-
return (0,
|
|
11040
|
+
return (0, import_web3.setupMatchMedia)(import_matchMedia.matchMedia), media;
|
|
11029
11041
|
}
|
|
11030
11042
|
}
|
|
11031
11043
|
});
|
|
@@ -12082,10 +12094,11 @@ __export(index_exports, {
|
|
|
12082
12094
|
Stack: () => Stack,
|
|
12083
12095
|
Text: () => Text,
|
|
12084
12096
|
View: () => View,
|
|
12085
|
-
createTamagui: () => createTamagui
|
|
12097
|
+
createTamagui: () => createTamagui,
|
|
12098
|
+
getElementLayoutEvent: () => getElementLayoutEvent
|
|
12086
12099
|
});
|
|
12087
12100
|
module.exports = __toCommonJS(index_exports);
|
|
12088
|
-
var import_react_native_media_driver = __toESM(require_index_native9()), import_react_native_use_responder_events = __toESM(require_index_native10()),
|
|
12101
|
+
var import_react_native_media_driver = __toESM(require_index_native9()), import_react_native_use_responder_events = __toESM(require_index_native10()), import_web2 = __toESM(require_index_native8()), import_react2 = __toESM(require("react"));
|
|
12089
12102
|
|
|
12090
12103
|
// src/createOptimizedView.native.tsx
|
|
12091
12104
|
var import_react = __toESM(require("react"));
|
|
@@ -12304,77 +12317,60 @@ var getRect = function(node) {
|
|
|
12304
12317
|
};
|
|
12305
12318
|
|
|
12306
12319
|
// src/hooks/useElementLayout.tsx
|
|
12307
|
-
var import_constants = __toESM(require_index_native2());
|
|
12308
|
-
|
|
12309
|
-
|
|
12310
|
-
|
|
12311
|
-
|
|
12312
|
-
|
|
12313
|
-
|
|
12314
|
-
|
|
12315
|
-
|
|
12316
|
-
|
|
12317
|
-
|
|
12318
|
-
|
|
12319
|
-
|
|
12320
|
-
|
|
12321
|
-
|
|
12322
|
-
|
|
12323
|
-
|
|
12324
|
-
|
|
12325
|
-
|
|
12326
|
-
|
|
12327
|
-
|
|
12328
|
-
|
|
12329
|
-
|
|
12330
|
-
|
|
12331
|
-
|
|
12332
|
-
|
|
12333
|
-
|
|
12334
|
-
|
|
12335
|
-
|
|
12336
|
-
|
|
12337
|
-
|
|
12338
|
-
|
|
12339
|
-
|
|
12340
|
-
|
|
12341
|
-
|
|
12342
|
-
|
|
12343
|
-
|
|
12344
|
-
|
|
12345
|
-
var tm, measureElement = async function(target) {
|
|
12346
|
-
return new Promise(function(res) {
|
|
12347
|
-
measureLayout(target, null, function(x, y, width, height, left, top) {
|
|
12348
|
-
res({
|
|
12349
|
-
nativeEvent: {
|
|
12350
|
-
layout: {
|
|
12351
|
-
x,
|
|
12352
|
-
y,
|
|
12353
|
-
width,
|
|
12354
|
-
height,
|
|
12355
|
-
left,
|
|
12356
|
-
top
|
|
12357
|
-
},
|
|
12358
|
-
target
|
|
12320
|
+
var import_constants = __toESM(require_index_native2()), import_web = __toESM(require_index_native8()), LayoutHandlers = /* @__PURE__ */ new WeakMap(), Nodes = /* @__PURE__ */ new Set(), NodeRectCache = /* @__PURE__ */ new WeakMap(), ParentRectCache = /* @__PURE__ */ new WeakMap(), rAF = typeof window < "u" ? window.requestAnimationFrame : void 0;
|
|
12321
|
+
if (import_constants.isClient)
|
|
12322
|
+
if (rAF) {
|
|
12323
|
+
let updateLayoutIfChanged = function(node) {
|
|
12324
|
+
var nodeRect = node.getBoundingClientRect(), parentNode = node.parentElement, parentRect = parentNode == null ? void 0 : parentNode.getBoundingClientRect(), onLayout = LayoutHandlers.get(node);
|
|
12325
|
+
if (typeof onLayout == "function") {
|
|
12326
|
+
var cachedRect = NodeRectCache.get(node), cachedParentRect = parentNode ? NodeRectCache.get(parentNode) : null;
|
|
12327
|
+
if (!cachedRect || // has changed one rect
|
|
12328
|
+
!(0, import_web.isEqualShallow)(cachedRect, nodeRect) && (!cachedParentRect || !(0, import_web.isEqualShallow)(cachedParentRect, parentRect))) {
|
|
12329
|
+
NodeRectCache.set(node, nodeRect), parentRect && parentNode && ParentRectCache.set(parentNode, parentRect);
|
|
12330
|
+
var event = getElementLayoutEvent(node);
|
|
12331
|
+
avoidUpdates ? queuedUpdates.set(node, function() {
|
|
12332
|
+
return onLayout(event);
|
|
12333
|
+
}) : onLayout(event);
|
|
12334
|
+
}
|
|
12335
|
+
}
|
|
12336
|
+
}, layoutOnAnimationFrame = function() {
|
|
12337
|
+
Nodes.forEach(updateLayoutIfChanged), rAF(layoutOnAnimationFrame);
|
|
12338
|
+
};
|
|
12339
|
+
updateLayoutIfChanged2 = updateLayoutIfChanged, layoutOnAnimationFrame2 = layoutOnAnimationFrame, avoidUpdates = !0, queuedUpdates = /* @__PURE__ */ new Map(), (0, import_web.___onDidFinishClientRender)(function() {
|
|
12340
|
+
avoidUpdates = !1, queuedUpdates && (queuedUpdates.forEach(function(cb) {
|
|
12341
|
+
return cb();
|
|
12342
|
+
}), queuedUpdates.clear());
|
|
12343
|
+
}), rAF(layoutOnAnimationFrame);
|
|
12344
|
+
} else
|
|
12345
|
+
process.env.NODE_ENV === "development" && console.warn("No requestAnimationFrame - please polyfill for onLayout to work correctly");
|
|
12346
|
+
var avoidUpdates, queuedUpdates, updateLayoutIfChanged2, layoutOnAnimationFrame2, getElementLayoutEvent = function(target) {
|
|
12347
|
+
var res = null;
|
|
12348
|
+
if (measureLayout(target, null, function(x, y, width, height, left, top) {
|
|
12349
|
+
res = {
|
|
12350
|
+
nativeEvent: {
|
|
12351
|
+
layout: {
|
|
12352
|
+
x,
|
|
12353
|
+
y,
|
|
12354
|
+
width,
|
|
12355
|
+
height,
|
|
12356
|
+
left,
|
|
12357
|
+
top
|
|
12359
12358
|
},
|
|
12360
|
-
|
|
12361
|
-
}
|
|
12362
|
-
|
|
12363
|
-
|
|
12364
|
-
}
|
|
12365
|
-
|
|
12359
|
+
target
|
|
12360
|
+
},
|
|
12361
|
+
timeStamp: Date.now()
|
|
12362
|
+
};
|
|
12363
|
+
}), !res)
|
|
12364
|
+
throw new Error("\u203C\uFE0F");
|
|
12365
|
+
return res;
|
|
12366
|
+
}, measureLayout = function(node, relativeTo, callback) {
|
|
12367
|
+
var relativeNode = relativeTo || (node == null ? void 0 : node.parentElement);
|
|
12366
12368
|
if (relativeNode instanceof HTMLElement) {
|
|
12367
|
-
var
|
|
12368
|
-
|
|
12369
|
-
|
|
12370
|
-
|
|
12371
|
-
|
|
12372
|
-
var [nodeDim, relativeNodeDim] = param;
|
|
12373
|
-
if (relativeNodeDim && nodeDim && cache.get(node) === now) {
|
|
12374
|
-
var { x, y, width, height, left, top } = getRelativeDimensions(nodeDim, relativeNodeDim);
|
|
12375
|
-
callback(x, y, width, height, left, top);
|
|
12376
|
-
}
|
|
12377
|
-
});
|
|
12369
|
+
var nodeDim = node.getBoundingClientRect(), relativeNodeDim = relativeNode.getBoundingClientRect();
|
|
12370
|
+
if (relativeNodeDim && nodeDim) {
|
|
12371
|
+
var { x, y, width, height, left, top } = getRelativeDimensions(nodeDim, relativeNodeDim);
|
|
12372
|
+
callback(x, y, width, height, left, top);
|
|
12373
|
+
}
|
|
12378
12374
|
}
|
|
12379
12375
|
}, getRelativeDimensions = function(a, b) {
|
|
12380
12376
|
var { height, left, top, width } = a, x = left - b.left, y = top - b.top;
|
|
@@ -12386,19 +12382,6 @@ var tm, measureElement = async function(target) {
|
|
|
12386
12382
|
left,
|
|
12387
12383
|
top
|
|
12388
12384
|
};
|
|
12389
|
-
}, getBoundingClientRectAsync = function(element) {
|
|
12390
|
-
return new Promise(function(resolve) {
|
|
12391
|
-
function fallbackToSync() {
|
|
12392
|
-
resolve(getBoundingClientRect(element));
|
|
12393
|
-
}
|
|
12394
|
-
var tm = setTimeout(fallbackToSync, 10), observer = new IntersectionObserver(function(entries, ob) {
|
|
12395
|
-
var _entries_;
|
|
12396
|
-
clearTimeout(tm), ob.disconnect(), resolve((_entries_ = entries[0]) === null || _entries_ === void 0 ? void 0 : _entries_.boundingClientRect);
|
|
12397
|
-
}, {
|
|
12398
|
-
threshold: 1e-4
|
|
12399
|
-
});
|
|
12400
|
-
observer.observe(element);
|
|
12401
|
-
});
|
|
12402
12385
|
};
|
|
12403
12386
|
|
|
12404
12387
|
// src/vendor/Pressability.native.tsx
|
|
@@ -12445,9 +12428,9 @@ function addNativeValidStyles() {
|
|
|
12445
12428
|
__reExport(index_exports, __toESM(require_index_native8()), module.exports);
|
|
12446
12429
|
addNativeValidStyles();
|
|
12447
12430
|
var createTamagui = function(conf) {
|
|
12448
|
-
return conf.media && (conf.media = (0, import_react_native_media_driver.createMedia)(conf.media)), (0,
|
|
12431
|
+
return conf.media && (conf.media = (0, import_react_native_media_driver.createMedia)(conf.media)), (0, import_web2.createTamagui)(conf);
|
|
12449
12432
|
}, baseViews = getBaseViews();
|
|
12450
|
-
(0,
|
|
12433
|
+
(0, import_web2.setupHooks)({
|
|
12451
12434
|
getBaseViews,
|
|
12452
12435
|
setElementProps: function(node) {
|
|
12453
12436
|
if (node && !node.measure) {
|
|
@@ -12479,7 +12462,7 @@ var createTamagui = function(conf) {
|
|
|
12479
12462
|
onPressIn,
|
|
12480
12463
|
onPressOut: onPressOut || onPress
|
|
12481
12464
|
};
|
|
12482
|
-
onPressOut && onPress && (inputEvents.onPressOut = (0,
|
|
12465
|
+
onPressOut && onPress && (inputEvents.onPressOut = (0, import_web2.composeEventHandlers)(onPress, onPressOut)), Object.assign(viewProps, inputEvents);
|
|
12483
12466
|
}
|
|
12484
12467
|
} else {
|
|
12485
12468
|
events && viewProps.hitSlop && (events.hitSlop = viewProps.hitSlop);
|
|
@@ -12487,7 +12470,7 @@ var createTamagui = function(conf) {
|
|
|
12487
12470
|
if (events && (process.env.NODE_ENV === "development" && viewProps.debug && console.info(`Checking for press ${!!events.onPress} then applying pressability props: ${Object.keys(pressability || {})}`), events.onPress))
|
|
12488
12471
|
for (var key in pressability) {
|
|
12489
12472
|
var og = viewProps[key], val = pressability[key];
|
|
12490
|
-
viewProps[key] = og && !dontComposePressabilityKeys[key] ? (0,
|
|
12473
|
+
viewProps[key] = og && !dontComposePressabilityKeys[key] ? (0, import_web2.composeEventHandlers)(og, val) : val;
|
|
12491
12474
|
}
|
|
12492
12475
|
}
|
|
12493
12476
|
},
|
|
@@ -12502,12 +12485,13 @@ var createTamagui = function(conf) {
|
|
|
12502
12485
|
});
|
|
12503
12486
|
var dontComposePressabilityKeys = {
|
|
12504
12487
|
onClick: !0
|
|
12505
|
-
}, View =
|
|
12488
|
+
}, View = import_web2.View, Stack = import_web2.Stack, Text = import_web2.Text;
|
|
12506
12489
|
// Annotate the CommonJS export names for ESM import in node:
|
|
12507
12490
|
0 && (module.exports = {
|
|
12508
12491
|
Stack,
|
|
12509
12492
|
Text,
|
|
12510
12493
|
View,
|
|
12511
|
-
createTamagui
|
|
12494
|
+
createTamagui,
|
|
12495
|
+
getElementLayoutEvent
|
|
12512
12496
|
});
|
|
12513
12497
|
//# sourceMappingURL=native.js.map
|