@tamagui/core 1.89.25 → 1.89.27-1708112217600
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/createOptimizedView.native.js +8 -37
- package/dist/cjs/createOptimizedView.native.js.map +3 -3
- package/dist/cjs/getBaseViews.native.js +1 -2
- package/dist/cjs/getBaseViews.native.js.map +3 -3
- package/dist/cjs/helpers/getBoundingClientRect.native.js +3 -3
- package/dist/cjs/helpers/getBoundingClientRect.native.js.map +3 -3
- package/dist/cjs/helpers/getRect.native.js +13 -7
- package/dist/cjs/helpers/getRect.native.js.map +3 -3
- package/dist/cjs/hooks/useElementLayout.native.js +135 -50
- package/dist/cjs/hooks/useElementLayout.native.js.map +3 -3
- package/dist/cjs/hooks/usePlatformMethods.native.js +18 -9
- package/dist/cjs/hooks/usePlatformMethods.native.js.map +3 -3
- package/dist/cjs/index.native.js +42 -18
- package/dist/cjs/index.native.js.map +3 -3
- package/dist/cjs/inject-styles.native.js +3 -3
- package/dist/cjs/inject-styles.native.js.map +3 -3
- package/dist/cjs/reactNativeTypes.native.js.map +2 -2
- package/dist/cjs/vendor/Pressability.native.js +1 -1
- package/dist/cjs/vendor/Pressability.native.js.map +3 -3
- package/dist/esm/createOptimizedView.native.js +8 -37
- package/dist/esm/createOptimizedView.native.js.map +3 -3
- package/dist/esm/getBaseViews.native.js +1 -2
- package/dist/esm/getBaseViews.native.js.map +3 -3
- package/dist/esm/helpers/getBoundingClientRect.native.js +3 -3
- package/dist/esm/helpers/getBoundingClientRect.native.js.map +3 -3
- package/dist/esm/helpers/getRect.native.js +13 -6
- package/dist/esm/helpers/getRect.native.js.map +3 -3
- package/dist/esm/hooks/useElementLayout.native.js +135 -50
- package/dist/esm/hooks/useElementLayout.native.js.map +3 -3
- package/dist/esm/hooks/usePlatformMethods.native.js +18 -9
- package/dist/esm/hooks/usePlatformMethods.native.js.map +3 -3
- package/dist/esm/index.native.js +43 -25
- package/dist/esm/index.native.js.map +3 -3
- package/dist/esm/inject-styles.native.js +3 -3
- package/dist/esm/inject-styles.native.js.map +3 -3
- package/dist/esm/vendor/Pressability.native.js +1 -1
- package/dist/esm/vendor/Pressability.native.js.map +3 -3
- package/dist/native.js +9098 -3274
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +8559 -3011
- package/dist/test.native.js.map +3 -3
- package/package.json +6 -6
|
@@ -21,37 +21,7 @@ __export(createOptimizedView_native_exports, {
|
|
|
21
21
|
module.exports = __toCommonJS(createOptimizedView_native_exports);
|
|
22
22
|
var import_react = require("react");
|
|
23
23
|
function createOptimizedView(children, viewProps, baseViews) {
|
|
24
|
-
|
|
25
|
-
accessibilityElementsHidden,
|
|
26
|
-
accessibilityLabel,
|
|
27
|
-
accessibilityLabelledBy,
|
|
28
|
-
accessibilityLiveRegion,
|
|
29
|
-
accessibilityRole,
|
|
30
|
-
accessibilityState,
|
|
31
|
-
accessibilityValue,
|
|
32
|
-
"aria-busy": ariaBusy,
|
|
33
|
-
"aria-checked": ariaChecked,
|
|
34
|
-
"aria-disabled": ariaDisabled,
|
|
35
|
-
"aria-expanded": ariaExpanded,
|
|
36
|
-
"aria-hidden": ariaHidden,
|
|
37
|
-
"aria-label": ariaLabel,
|
|
38
|
-
"aria-labelledby": ariaLabelledBy,
|
|
39
|
-
"aria-live": ariaLive,
|
|
40
|
-
"aria-selected": ariaSelected,
|
|
41
|
-
"aria-valuemax": ariaValueMax,
|
|
42
|
-
"aria-valuemin": ariaValueMin,
|
|
43
|
-
"aria-valuenow": ariaValueNow,
|
|
44
|
-
"aria-valuetext": ariaValueText,
|
|
45
|
-
focusable,
|
|
46
|
-
id,
|
|
47
|
-
importantForAccessibility,
|
|
48
|
-
nativeID,
|
|
49
|
-
pointerEvents,
|
|
50
|
-
role,
|
|
51
|
-
tabIndex
|
|
52
|
-
// ...otherProps
|
|
53
|
-
} = viewProps, _accessibilityLabelledBy = (ariaLabelledBy == null ? void 0 : ariaLabelledBy.split(/\s*,\s*/g)) ?? accessibilityLabelledBy;
|
|
54
|
-
let _accessibilityState;
|
|
24
|
+
var TextAncestor = baseViews.TextAncestor, ViewNativeComponent = baseViews.View, accessibilityElementsHidden = viewProps.accessibilityElementsHidden, accessibilityLabel = viewProps.accessibilityLabel, accessibilityLabelledBy = viewProps.accessibilityLabelledBy, accessibilityLiveRegion = viewProps.accessibilityLiveRegion, accessibilityRole = viewProps.accessibilityRole, accessibilityState = viewProps.accessibilityState, accessibilityValue = viewProps.accessibilityValue, ariaBusy = viewProps["aria-busy"], ariaChecked = viewProps["aria-checked"], ariaDisabled = viewProps["aria-disabled"], ariaExpanded = viewProps["aria-expanded"], ariaHidden = viewProps["aria-hidden"], ariaLabel = viewProps["aria-label"], ariaLabelledBy = viewProps["aria-labelledby"], ariaLive = viewProps["aria-live"], ariaSelected = viewProps["aria-selected"], ariaValueMax = viewProps["aria-valuemax"], ariaValueMin = viewProps["aria-valuemin"], ariaValueNow = viewProps["aria-valuenow"], ariaValueText = viewProps["aria-valuetext"], focusable = viewProps.focusable, id = viewProps.id, importantForAccessibility = viewProps.importantForAccessibility, nativeID = viewProps.nativeID, pointerEvents = viewProps.pointerEvents, role = viewProps.role, tabIndex = viewProps.tabIndex, _ariaLabelledBy_split, _accessibilityLabelledBy = (_ariaLabelledBy_split = ariaLabelledBy == null ? void 0 : ariaLabelledBy.split(/\s*,\s*/g)) !== null && _ariaLabelledBy_split !== void 0 ? _ariaLabelledBy_split : accessibilityLabelledBy, _accessibilityState;
|
|
55
25
|
(accessibilityState != null || ariaBusy != null || ariaChecked != null || ariaDisabled != null || ariaExpanded != null || ariaSelected != null) && (_accessibilityState = {
|
|
56
26
|
busy: ariaBusy ?? (accessibilityState == null ? void 0 : accessibilityState.busy),
|
|
57
27
|
checked: ariaChecked ?? (accessibilityState == null ? void 0 : accessibilityState.checked),
|
|
@@ -59,15 +29,14 @@ function createOptimizedView(children, viewProps, baseViews) {
|
|
|
59
29
|
expanded: ariaExpanded ?? (accessibilityState == null ? void 0 : accessibilityState.expanded),
|
|
60
30
|
selected: ariaSelected ?? (accessibilityState == null ? void 0 : accessibilityState.selected)
|
|
61
31
|
});
|
|
62
|
-
|
|
32
|
+
var _accessibilityValue;
|
|
63
33
|
(accessibilityValue != null || ariaValueMax != null || ariaValueMin != null || ariaValueNow != null || ariaValueText != null) && (_accessibilityValue = {
|
|
64
34
|
max: ariaValueMax ?? (accessibilityValue == null ? void 0 : accessibilityValue.max),
|
|
65
35
|
min: ariaValueMin ?? (accessibilityValue == null ? void 0 : accessibilityValue.min),
|
|
66
36
|
now: ariaValueNow ?? (accessibilityValue == null ? void 0 : accessibilityValue.now),
|
|
67
37
|
text: ariaValueText ?? (accessibilityValue == null ? void 0 : accessibilityValue.text)
|
|
68
38
|
});
|
|
69
|
-
|
|
70
|
-
const newPointerEvents = (style == null ? void 0 : style.pointerEvents) || pointerEvents, finalProps = viewProps, extras = {
|
|
39
|
+
var style = Array.isArray(viewProps.style) ? baseViews.StyleSheet.flatten(viewProps.style) : viewProps.style, newPointerEvents = (style == null ? void 0 : style.pointerEvents) || pointerEvents, finalProps = viewProps, extras = {
|
|
71
40
|
accessibilityLiveRegion: ariaLive === "off" ? "none" : ariaLive ?? accessibilityLiveRegion,
|
|
72
41
|
accessibilityLabel: ariaLabel ?? accessibilityLabel,
|
|
73
42
|
focusable: tabIndex !== void 0 ? !tabIndex : focusable,
|
|
@@ -81,10 +50,12 @@ function createOptimizedView(children, viewProps, baseViews) {
|
|
|
81
50
|
style,
|
|
82
51
|
pointerEvents: newPointerEvents
|
|
83
52
|
};
|
|
84
|
-
for (
|
|
53
|
+
for (var key in extras)
|
|
85
54
|
extras[key] != null && (finalProps[key] = extras[key]);
|
|
86
|
-
|
|
87
|
-
return isInText ? (0, import_react.createElement)(TextAncestor.Provider, {
|
|
55
|
+
var isInText = (0, import_react.useContext)(TextAncestor), finalElement = /* @__PURE__ */ (0, import_react.createElement)(ViewNativeComponent, finalProps, children);
|
|
56
|
+
return isInText ? /* @__PURE__ */ (0, import_react.createElement)(TextAncestor.Provider, {
|
|
57
|
+
value: !1
|
|
58
|
+
}, finalElement) : finalElement;
|
|
88
59
|
}
|
|
89
60
|
function getAccessibilityRoleFromRole(role) {
|
|
90
61
|
switch (role) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/createOptimizedView.native.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;AAAA
|
|
5
|
-
"names": []
|
|
3
|
+
"sources": ["../../src/Users/n8/tamagui/packages/core/src/createOptimizedView.native.tsx"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;;;;;;AAEA,mBAA0C;AAYnC,SAASA,oBACdC,UACAC,WACAC,WAAc;AAEd,MAAMC,eAAeD,UAAUC,cACzBC,sBAAsBF,UAAUG,MAKpCC,8BA4BEL,UA5BFK,6BACAC,qBA2BEN,UA3BFM,oBACAC,0BA0BEP,UA1BFO,yBACAC,0BAyBER,UAzBFQ,yBACAC,oBAwBET,UAxBFS,mBACAC,qBAuBEV,UAvBFU,oBACAC,qBAsBEX,UAtBFW,oBACaC,WAqBXZ,UArBF,WAAA,GACgBa,cAoBdb,UApBF,cAAA,GACiBc,eAmBfd,UAnBF,eAAA,GACiBe,eAkBff,UAlBF,eAAA,GACegB,aAiBbhB,UAjBF,aAAA,GACciB,YAgBZjB,UAhBF,YAAA,GACmBkB,iBAejBlB,UAfF,iBAAA,GACamB,WAcXnB,UAdF,WAAA,GACiBoB,eAafpB,UAbF,eAAA,GACiBqB,eAYfrB,UAZF,eAAA,GACiBsB,eAWftB,UAXF,eAAA,GACiBuB,eAUfvB,UAVF,eAAA,GACkBwB,gBAShBxB,UATF,gBAAA,GACAyB,YAQEzB,UARFyB,WACAC,KAOE1B,UAPF0B,IACAC,4BAME3B,UANF2B,2BACAC,WAKE5B,UALF4B,UACAC,gBAIE7B,UAJF6B,eACAC,OAGE9B,UAHF8B,MACA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AACH,aAAO;IACT,KAAK;AACH,aAAO;IACT,KAAK;AACH,aAAO;IACT,KAAK;AACH,aAAO;IACT,KAAK;AACH;IACF,KAAK;AACH;IACF,KAAK;AACH;IACF,KAAK;AACH;IACF,KAAK;AACH,aAAO;IACT,KAAK;AACH,aAAO;IACT,KAAK;AACH;IACF,KAAK;AACH,aAAO;IACT,KAAK;AACH,aAAO;IACT,KAAK;AACH;IACF,KAAK;AACH,aAAO;IACT,KAAK;AACH,aAAO;IACT,KAAK;AACH,aAAO;IACT,KAAK;AACH;IACF,KAAK;AACH,aAAO;IACT,KAAK;AACH;IACF,KAAK;AACH;IACF,KAAK;AACH,aAAO;IACT,KAAK;AACH,aAAO;IACT,KAAK;AACH;IACF,KAAK;AACH;IACF,KAAK;AACH;IACF,KAAK;AACH;EACJ;AAGF;",
|
|
5
|
+
"names": ["createOptimizedView", "children", "viewProps", "baseViews", "TextAncestor", "ViewNativeComponent", "View", "accessibilityElementsHidden", "accessibilityLabel", "accessibilityLabelledBy", "accessibilityLiveRegion", "accessibilityRole", "accessibilityState", "accessibilityValue", "ariaBusy", "ariaChecked", "ariaDisabled", "ariaExpanded", "ariaHidden", "ariaLabel", "ariaLabelledBy", "ariaLive", "ariaSelected", "ariaValueMax", "ariaValueMin", "ariaValueNow", "ariaValueText", "focusable", "id", "importantForAccessibility", "nativeID", "pointerEvents", "role", "tabIndex", "_accessibilityLabelledBy", "split", "_accessibilityState", "busy", "checked", "disabled", "expanded", "selected", "_accessibilityValue", "max", "min", "now", "text", "style", "Array", "isArray", "StyleSheet", "flatten", "newPointerEvents", "finalProps", "extras", "undefined", "getAccessibilityRoleFromRole", "key", "isInText", "useContext", "finalElement", "createElement", "Provider", "value"]
|
|
6
6
|
}
|
|
@@ -19,8 +19,7 @@ __export(getBaseViews_native_exports, {
|
|
|
19
19
|
});
|
|
20
20
|
module.exports = __toCommonJS(getBaseViews_native_exports);
|
|
21
21
|
function getBaseViews() {
|
|
22
|
-
|
|
23
|
-
let View, TextAncestor;
|
|
22
|
+
var native = require("react-native"), View, TextAncestor;
|
|
24
23
|
return process.env.NODE_ENV !== "test" && (View = require("react-native/Libraries/Components/View/ViewNativeComponent").default, TextAncestor = require("react-native/Libraries/Text/TextAncestor")), View || (View = native.View || native.default.View), {
|
|
25
24
|
View,
|
|
26
25
|
Text: native.Text || native.default.Text,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/getBaseViews.native.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;AAAA
|
|
5
|
-
"names": []
|
|
3
|
+
"sources": ["../../src/Users/n8/tamagui/packages/core/src/getBaseViews.native.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;;;;;AAAO,SAASA,eAAAA;AACd,MAAMC,SAASC,QAAQ,cAAA,GAEnBC,MACAC;AAEJ,SAAIC,QAAQC,IAAIC,aAAa,WAC3BJ,OAAOD,QAAQ,4DAAA,EAA8DM,SAC7EJ,eAAeF,QAAQ,0CAAA,IAGpBC,SACHA,OAAOF,OAAOE,QAAQF,OAAOO,QAAQL,OAGhC;IACLA;IACAM,MAAMR,OAAOQ,QAAQR,OAAOO,QAAQC;IACpCC,YAAYT,OAAOS,cAAcT,OAAOO,QAAQE;IAChDN;IACAO,WAAWV,OAAOU,aAAaV,OAAOO,QAAQG;EAChD;AACF;",
|
|
5
|
+
"names": ["getBaseViews", "native", "require", "View", "TextAncestor", "process", "env", "NODE_ENV", "default", "Text", "StyleSheet", "Pressable"]
|
|
6
6
|
}
|
|
@@ -18,10 +18,10 @@ __export(getBoundingClientRect_exports, {
|
|
|
18
18
|
getBoundingClientRect: () => getBoundingClientRect
|
|
19
19
|
});
|
|
20
20
|
module.exports = __toCommonJS(getBoundingClientRect_exports);
|
|
21
|
-
|
|
22
|
-
var
|
|
21
|
+
var getBoundingClientRect = function(node) {
|
|
22
|
+
var _node_getBoundingClientRect;
|
|
23
23
|
if (!(!node || node.nodeType !== 1))
|
|
24
|
-
return (
|
|
24
|
+
return (_node_getBoundingClientRect = node.getBoundingClientRect) === null || _node_getBoundingClientRect === void 0 ? void 0 : _node_getBoundingClientRect.call(node);
|
|
25
25
|
};
|
|
26
26
|
// Annotate the CommonJS export names for ESM import in node:
|
|
27
27
|
0 && (module.exports = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/helpers/getBoundingClientRect.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;AAAA
|
|
5
|
-
"names": []
|
|
3
|
+
"sources": ["../../../src/helpers/Users/n8/tamagui/packages/core/src/helpers/getBoundingClientRect.tsx"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;;;;;AAAO,IAAMA,wBAAwB,SAACC,MAAAA;MAE7BA;AADP,MAAI,GAACA,QAAQA,KAAKC,aAAa;AAC/B,YAAOD,8BAAAA,KAAKD,2BAAqB,QAA1BC,gCAAAA,SAAAA,SAAAA,4BAAAA,KAAAA,IAAAA;AACT;",
|
|
5
|
+
"names": ["getBoundingClientRect", "node", "nodeType"]
|
|
6
6
|
}
|
|
@@ -18,13 +18,19 @@ __export(getRect_exports, {
|
|
|
18
18
|
getRect: () => getRect
|
|
19
19
|
});
|
|
20
20
|
module.exports = __toCommonJS(getRect_exports);
|
|
21
|
-
var import_getBoundingClientRect = require("./getBoundingClientRect")
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
var import_getBoundingClientRect = require("./getBoundingClientRect"), getRect = function(node) {
|
|
22
|
+
var rect = (0, import_getBoundingClientRect.getBoundingClientRect)(node);
|
|
23
|
+
if (rect) {
|
|
24
|
+
var x = rect.x, y = rect.y, top = rect.top, left = rect.left;
|
|
25
|
+
return {
|
|
26
|
+
x,
|
|
27
|
+
y,
|
|
28
|
+
width: node.offsetWidth,
|
|
29
|
+
height: node.offsetHeight,
|
|
30
|
+
top,
|
|
31
|
+
left
|
|
32
|
+
};
|
|
33
|
+
}
|
|
28
34
|
};
|
|
29
35
|
// Annotate the CommonJS export names for ESM import in node:
|
|
30
36
|
0 && (module.exports = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/helpers/getRect.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;AAAA
|
|
5
|
-
"names": []
|
|
3
|
+
"sources": ["../../../src/helpers/Users/n8/tamagui/packages/core/src/helpers/getRect.tsx"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;;;;;mCAAsC,oCAEzBA,UAAU,SAACC,MAAAA;AACtB,MAAMC,WAAOC,oDAAsBF,IAAAA;AACnC,MAAKC,MACL;QAAQE,IAAoBF,KAApBE,GAAGC,IAAiBH,KAAjBG,GAAGC,MAAcJ,KAAdI,KAAKC,OAASL,KAATK;AACnB,WAAO;MAAEH;MAAGC;MAAGG,OAAOP,KAAKQ;MAAaC,QAAQT,KAAKU;MAAcL;MAAKC;IAAK;;AAC/E;",
|
|
5
|
+
"names": ["getRect", "node", "rect", "getBoundingClientRect", "x", "y", "top", "left", "width", "offsetWidth", "height", "offsetHeight"]
|
|
6
6
|
}
|
|
@@ -20,69 +20,154 @@ __export(useElementLayout_exports, {
|
|
|
20
20
|
});
|
|
21
21
|
module.exports = __toCommonJS(useElementLayout_exports);
|
|
22
22
|
var import_constants = require("@tamagui/constants"), import_getBoundingClientRect = require("../helpers/getBoundingClientRect");
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
23
|
+
function _array_like_to_array(arr, len) {
|
|
24
|
+
(len == null || len > arr.length) && (len = arr.length);
|
|
25
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
26
|
+
arr2[i] = arr[i];
|
|
27
|
+
return arr2;
|
|
28
|
+
}
|
|
29
|
+
function _array_with_holes(arr) {
|
|
30
|
+
if (Array.isArray(arr))
|
|
31
|
+
return arr;
|
|
32
|
+
}
|
|
33
|
+
function _instanceof(left, right) {
|
|
34
|
+
return right != null && typeof Symbol < "u" && right[Symbol.hasInstance] ? !!right[Symbol.hasInstance](left) : left instanceof right;
|
|
35
|
+
}
|
|
36
|
+
function _iterable_to_array_limit(arr, i) {
|
|
37
|
+
var _i = arr == null ? null : typeof Symbol < "u" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
38
|
+
if (_i != null) {
|
|
39
|
+
var _arr = [], _n = !0, _d = !1, _s, _e;
|
|
40
|
+
try {
|
|
41
|
+
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done) && (_arr.push(_s.value), !(i && _arr.length === i)); _n = !0)
|
|
42
|
+
;
|
|
43
|
+
} catch (err) {
|
|
44
|
+
_d = !0, _e = err;
|
|
45
|
+
} finally {
|
|
46
|
+
try {
|
|
47
|
+
!_n && _i.return != null && _i.return();
|
|
48
|
+
} finally {
|
|
49
|
+
if (_d)
|
|
50
|
+
throw _e;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return _arr;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function _non_iterable_rest() {
|
|
57
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
58
|
+
}
|
|
59
|
+
function _sliced_to_array(arr, i) {
|
|
60
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
61
|
+
}
|
|
62
|
+
function _type_of(obj) {
|
|
63
|
+
"@swc/helpers - typeof";
|
|
64
|
+
return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
65
|
+
}
|
|
66
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
67
|
+
if (o) {
|
|
68
|
+
if (typeof o == "string")
|
|
69
|
+
return _array_like_to_array(o, minLen);
|
|
70
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
71
|
+
if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set")
|
|
72
|
+
return Array.from(n);
|
|
73
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
74
|
+
return _array_like_to_array(o, minLen);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
var LayoutHandlers = /* @__PURE__ */ new WeakMap();
|
|
78
|
+
var resizeObserver = null;
|
|
79
|
+
typeof window < "u" && "ResizeObserver" in window && (resizeObserver = new ResizeObserver(function(entries) {
|
|
80
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
81
|
+
try {
|
|
82
|
+
for (var _loop = function() {
|
|
83
|
+
var target = _step.value.target, onLayout = LayoutHandlers.get(target);
|
|
84
|
+
if (typeof onLayout != "function")
|
|
85
|
+
return {
|
|
86
|
+
v: void 0
|
|
87
|
+
};
|
|
88
|
+
measureLayout(target, null, function(x, y, width, height, left, top) {
|
|
89
|
+
onLayout({
|
|
90
|
+
nativeEvent: {
|
|
91
|
+
layout: {
|
|
92
|
+
x,
|
|
93
|
+
y,
|
|
94
|
+
width,
|
|
95
|
+
height,
|
|
96
|
+
left,
|
|
97
|
+
top
|
|
98
|
+
},
|
|
99
|
+
target
|
|
100
|
+
},
|
|
101
|
+
timeStamp: Date.now()
|
|
102
|
+
});
|
|
37
103
|
});
|
|
38
|
-
});
|
|
104
|
+
}, _iterator = entries[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
105
|
+
var _ret = _loop();
|
|
106
|
+
if (_type_of(_ret) === "object")
|
|
107
|
+
return _ret.v;
|
|
108
|
+
}
|
|
109
|
+
} catch (err) {
|
|
110
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
111
|
+
} finally {
|
|
112
|
+
try {
|
|
113
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
114
|
+
} finally {
|
|
115
|
+
if (_didIteratorError)
|
|
116
|
+
throw _iteratorError;
|
|
117
|
+
}
|
|
39
118
|
}
|
|
40
119
|
}));
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
if (relativeNode
|
|
44
|
-
|
|
120
|
+
var cache = /* @__PURE__ */ new WeakMap(), measureLayout = function(node, relativeTo, callback) {
|
|
121
|
+
var relativeNode = relativeTo || (node == null ? void 0 : node.parentNode);
|
|
122
|
+
if (_instanceof(relativeNode, HTMLElement)) {
|
|
123
|
+
var now = Date.now();
|
|
45
124
|
cache.set(node, now), Promise.all([
|
|
46
125
|
getBoundingClientRectAsync(node),
|
|
47
126
|
getBoundingClientRectAsync(relativeNode)
|
|
48
|
-
]).then((
|
|
127
|
+
]).then(function(param) {
|
|
128
|
+
var _param = _sliced_to_array(param, 2), nodeDim = _param[0], relativeNodeDim = _param[1];
|
|
49
129
|
if (relativeNodeDim && nodeDim && cache.get(node) === now) {
|
|
50
|
-
|
|
51
|
-
nodeDim,
|
|
52
|
-
relativeNodeDim
|
|
53
|
-
);
|
|
130
|
+
var _getRelativeDimensions = getRelativeDimensions(nodeDim, relativeNodeDim), x = _getRelativeDimensions.x, y = _getRelativeDimensions.y, width = _getRelativeDimensions.width, height = _getRelativeDimensions.height, left = _getRelativeDimensions.left, top = _getRelativeDimensions.top;
|
|
54
131
|
callback(x, y, width, height, left, top);
|
|
55
132
|
}
|
|
56
133
|
});
|
|
57
134
|
}
|
|
58
|
-
}, getRelativeDimensions = (a, b)
|
|
59
|
-
|
|
60
|
-
return {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
135
|
+
}, getRelativeDimensions = function(a, b) {
|
|
136
|
+
var height = a.height, left = a.left, top = a.top, width = a.width, x = left - b.left, y = top - b.top;
|
|
137
|
+
return {
|
|
138
|
+
x,
|
|
139
|
+
y,
|
|
140
|
+
width,
|
|
141
|
+
height,
|
|
142
|
+
left,
|
|
143
|
+
top
|
|
144
|
+
};
|
|
145
|
+
}, getBoundingClientRectAsync = function(element) {
|
|
146
|
+
return new Promise(function(resolve) {
|
|
147
|
+
var fallbackToSync = function() {
|
|
148
|
+
resolve((0, import_getBoundingClientRect.getBoundingClientRect)(element));
|
|
149
|
+
}, tm = setTimeout(fallbackToSync, 10), observer = new IntersectionObserver(function(entries, ob) {
|
|
150
|
+
var _entries_;
|
|
151
|
+
clearTimeout(tm), ob.disconnect(), resolve((_entries_ = entries[0]) === null || _entries_ === void 0 ? void 0 : _entries_.boundingClientRect);
|
|
152
|
+
}, {
|
|
72
153
|
threshold: 1e-4
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
});
|
|
154
|
+
});
|
|
155
|
+
observer.observe(element);
|
|
156
|
+
});
|
|
157
|
+
};
|
|
76
158
|
function useElementLayout(ref, onLayout) {
|
|
77
|
-
(0, import_constants.useIsomorphicLayoutEffect)(()
|
|
78
|
-
if (!resizeObserver || !onLayout)
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}, [
|
|
159
|
+
(0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
160
|
+
if (!(!resizeObserver || !onLayout)) {
|
|
161
|
+
var node = ref.current;
|
|
162
|
+
if (node)
|
|
163
|
+
return LayoutHandlers.set(node, onLayout), resizeObserver.observe(node), function() {
|
|
164
|
+
resizeObserver == null || resizeObserver.unobserve(node);
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
}, [
|
|
168
|
+
ref,
|
|
169
|
+
onLayout
|
|
170
|
+
]);
|
|
86
171
|
}
|
|
87
172
|
// Annotate the CommonJS export names for ESM import in node:
|
|
88
173
|
0 && (module.exports = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/hooks/useElementLayout.tsx"],
|
|
4
|
-
"mappings": "
|
|
5
|
-
"names": []
|
|
3
|
+
"sources": ["../../../src/hooks/Users/n8/tamagui/packages/core/src/hooks/useElementLayout.tsx"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA,uBAA0C,+BAE1C,+BAAsC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtC,IAAMA,iBAAiB,oBAAIC,QAAAA;AAoB3B,IAAIC,iBAAwC;AAExC,OAAOC,SAAW,OAAe,oBAAoBA,WACvDD,iBAAiB,IAAIE,eAAe,SAACC,SAAAA;MAC9B,4BAAA,IAAA,oBAAA,IAAA,iBAAA;;AAAL;AAAK,UAAQC,SAAR,MAAA,MAAQA,QACLC,WAAWC,eAAeC,IAAIH,MAAAA;AACpC,UAAI,OAAOC,YAAa;AAAY,eAAA;;QAAK;AACzCG,oBAAcJ,QAAuB,MAAM,SAACK,GAAGC,GAAGC,OAAOC,QAAQC,MAAMC,KAAAA;AACrET,iBAAS;UACPU,aAAa;YACXC,QAAQ;cAAEP;cAAGC;cAAGC;cAAOC;cAAQC;cAAMC;YAAI;YACzCV;UACF;UACAa,WAAWC,KAAKC,IAAG;QACrB,CAAA;MACF,CAAA;IACF,GAZK,YAAoBhB,QAAAA,OAAAA,QAAAA,EAAAA,GAApB,OAAA,EAAA,6BAAA,QAAA,UAAA,KAAA,GAAA,OAAA,4BAAA,IAAA;;;;;;AAAA,wBAAA,IAAA,iBAAA;;;OAAA,6BAAA,UAAA,UAAA,QAAA,UAAA,OAAA;;UAAA;cAAA;;;AAaP,CAAA;AAGF,IAAMiB,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C,IAAAA;UAGA3C;AAFR4C,mBAAaL,EAAAA,GACbI,GAAGE,WAAU,GACbT,SAAQpC,YAAAA,QAAQ,CAAA,OAAE,QAAVA,cAAAA,SAAAA,SAAAA,UAAY8C,kBAAkB;IACxC,GACA;MACEC,WAAW;IACb,CAAA;AAEFN,aAASO,QAAQb,OAAAA;EACnB,CAAA;AACF;AAEO,SAASc,iBACdC,KACAhD,UAA4C;AAE5CiD,kDAA0B,WAAA;AACxB,QAAI,GAACtD,kBAAkB,CAACK,WACxB;UAAMiB,OAAO+B,IAAIE;AACjB,UAAKjC;AACLhB,8BAAesB,IAAIN,MAAMjB,QAAAA,GACzBL,eAAemD,QAAQ7B,IAAAA,GAChB,WAAA;AACLtB,4BAAAA,QAAAA,eAAgBwD,UAAUlC,IAAAA;QAC5B;;EACF,GAAG;IAAC+B;IAAKhD;GAAS;AACpB;",
|
|
5
|
+
"names": ["LayoutHandlers", "WeakMap", "resizeObserver", "window", "ResizeObserver", "entries", "target", "onLayout", "LayoutHandlers", "get", "measureLayout", "x", "y", "width", "height", "left", "top", "nativeEvent", "layout", "timeStamp", "Date", "now", "cache", "WeakMap", "node", "relativeTo", "callback", "relativeNode", "parentNode", "HTMLElement", "set", "Promise", "all", "getBoundingClientRectAsync", "then", "nodeDim", "relativeNodeDim", "getRelativeDimensions", "a", "b", "element", "resolve", "fallbackToSync", "getBoundingClientRect", "tm", "setTimeout", "observer", "IntersectionObserver", "ob", "clearTimeout", "disconnect", "boundingClientRect", "threshold", "observe", "useElementLayout", "ref", "useIsomorphicLayoutEffect", "current", "unobserve"]
|
|
6
6
|
}
|
|
@@ -20,15 +20,24 @@ __export(usePlatformMethods_exports, {
|
|
|
20
20
|
module.exports = __toCommonJS(usePlatformMethods_exports);
|
|
21
21
|
var import_constants = require("@tamagui/constants"), import_getRect = require("../helpers/getRect"), import_useElementLayout = require("./useElementLayout");
|
|
22
22
|
function usePlatformMethods(hostRef) {
|
|
23
|
-
(0, import_constants.useIsomorphicLayoutEffect)(()
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
(0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
24
|
+
var node = hostRef.current;
|
|
25
|
+
if (node) {
|
|
26
|
+
var _node, _node1, _node2;
|
|
27
|
+
(_node = node).measure || (_node.measure = function(callback) {
|
|
28
|
+
return (0, import_useElementLayout.measureLayout)(node, null, callback);
|
|
29
|
+
}), (_node1 = node).measureLayout || (_node1.measureLayout = function(relativeToNode, success) {
|
|
30
|
+
return (0, import_useElementLayout.measureLayout)(node, relativeToNode, success);
|
|
31
|
+
}), (_node2 = node).measureInWindow || (_node2.measureInWindow = function(callback) {
|
|
32
|
+
node && setTimeout(function() {
|
|
33
|
+
var _getRect = (0, import_getRect.getRect)(node), height = _getRect.height, left = _getRect.left, top = _getRect.top, width = _getRect.width;
|
|
34
|
+
callback(left, top, width, height);
|
|
35
|
+
}, 0);
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}, [
|
|
39
|
+
hostRef
|
|
40
|
+
]);
|
|
32
41
|
}
|
|
33
42
|
// Annotate the CommonJS export names for ESM import in node:
|
|
34
43
|
0 && (module.exports = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/hooks/usePlatformMethods.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;AAAA
|
|
5
|
-
"names": []
|
|
3
|
+
"sources": ["../../../src/hooks/Users/n8/tamagui/packages/core/src/hooks/usePlatformMethods.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;;;;;uBAA0C,+BAG1C,iBAAwB,+BACxB,0BAA8B;AAGvB,SAASA,mBAAmBC,SAA2B;AAC5DC,kDAA0B,WAAA;AACxB,QAAMC,OAAOF,QAAQG;AACrB,QAAID,MAAM;UAERA,OAEAA,QAGAA;AALAA,OAAAA,QAAAA,MAAKE,YAALF,MAAKE,UAAY,SAACC,UAAAA;mBAAaC,uCAAcJ,MAAM,MAAMG,QAAAA;WAEzDH,SAAAA,MAAKI,kBAALJ,OAAKI,gBAAkB,SAACC,gBAAgBC,SAAAA;mBACtCF,uCAAcJ,MAAqBK,gBAAgBC,OAAAA;WAErDN,SAAAA,MAAKO,oBAALP,OAAKO,kBAAoB,SAACJ,UAAAA;AACxB,QAAKH,QACLQ,WAAW,WAAA;AACT,cAAqCC,eAAAA,wBAAQT,IAAAA,GAArCU,SAA6BD,SAA7BC,QAAQC,OAAqBF,SAArBE,MAAMC,MAAeH,SAAfG,KAAKC,QAAUJ,SAAVI;AAC3BV,mBAASQ,MAAMC,KAAKC,OAAOH,MAAAA;QAC7B,GAAG,CAAA;MACL;IACF;EACF,GAAG;IAACZ;GAAQ;AACd;",
|
|
5
|
+
"names": ["usePlatformMethods", "hostRef", "useIsomorphicLayoutEffect", "node", "current", "measure", "callback", "measureLayout", "relativeToNode", "success", "measureInWindow", "setTimeout", "getRect", "height", "left", "top", "width"]
|
|
6
6
|
}
|
package/dist/cjs/index.native.js
CHANGED
|
@@ -23,15 +23,42 @@ module.exports = __toCommonJS(src_exports);
|
|
|
23
23
|
var import_react_native_use_responder_events = require("@tamagui/react-native-use-responder-events"), import_web = require("@tamagui/web"), import_react = require("react"), import_createOptimizedView = require("./createOptimizedView"), import_getBaseViews = require("./getBaseViews"), import_useElementLayout = require("./hooks/useElementLayout"), import_usePlatformMethods = require("./hooks/usePlatformMethods"), import_Pressability = require("./vendor/Pressability");
|
|
24
24
|
__reExport(src_exports, require("@tamagui/web"), module.exports);
|
|
25
25
|
__reExport(src_exports, require("./reactNativeTypes"), module.exports);
|
|
26
|
-
|
|
27
|
-
(
|
|
26
|
+
function _define_property(obj, key, value) {
|
|
27
|
+
return key in obj ? Object.defineProperty(obj, key, {
|
|
28
|
+
value,
|
|
29
|
+
enumerable: !0,
|
|
30
|
+
configurable: !0,
|
|
31
|
+
writable: !0
|
|
32
|
+
}) : obj[key] = value, obj;
|
|
33
|
+
}
|
|
34
|
+
function _object_spread(target) {
|
|
35
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
36
|
+
var source = arguments[i] != null ? arguments[i] : {}, ownKeys = Object.keys(source);
|
|
37
|
+
typeof Object.getOwnPropertySymbols == "function" && (ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
38
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
39
|
+
}))), ownKeys.forEach(function(key) {
|
|
40
|
+
_define_property(target, key, source[key]);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
return target;
|
|
44
|
+
}
|
|
45
|
+
var baseViews = (0, import_getBaseViews.getBaseViews)();
|
|
46
|
+
(0, import_web.setupHooks)(_object_spread({
|
|
28
47
|
getBaseViews: import_getBaseViews.getBaseViews,
|
|
29
|
-
usePropsTransform(elementType, propsIn, stateRef, willHydrate) {
|
|
48
|
+
usePropsTransform: function(elementType, propsIn, stateRef, willHydrate) {
|
|
49
|
+
if (0) {
|
|
50
|
+
var isDOM, onMoveShouldSetResponder, onMoveShouldSetResponderCapture, onResponderEnd, onResponderGrant, onResponderMove, onResponderReject, onResponderRelease, onResponderStart, onResponderTerminate, onResponderTerminationRequest, onScrollShouldSetResponder, onScrollShouldSetResponderCapture, onSelectionChangeShouldSetResponder, onSelectionChangeShouldSetResponderCapture, onStartShouldSetResponder, onStartShouldSetResponderCapture, collapsable, focusable, accessible, accessibilityDisabled, onLayout, hrefAttrs, plainDOMProps;
|
|
51
|
+
if (willHydrate || isDOM)
|
|
52
|
+
var hostRef;
|
|
53
|
+
if (isDOM && plainDOMProps.href && hrefAttrs)
|
|
54
|
+
var download, rel, target;
|
|
55
|
+
}
|
|
30
56
|
},
|
|
31
|
-
useEvents(viewProps, events,
|
|
57
|
+
useEvents: function(viewProps, events, param, setStateShallow, staticConfig) {
|
|
58
|
+
var pseudos = param.pseudos;
|
|
32
59
|
if (events && (events.onFocus && (viewProps.onFocus = events.onFocus), events.onBlur && (viewProps.onBlur = events.onBlur)), staticConfig.isInput) {
|
|
33
60
|
if (events) {
|
|
34
|
-
|
|
61
|
+
var onPressIn = events.onPressIn, onPressOut = events.onPressOut, onPress = events.onPress, inputEvents = {
|
|
35
62
|
onPressIn,
|
|
36
63
|
onPressOut: onPressOut || onPress
|
|
37
64
|
};
|
|
@@ -39,28 +66,25 @@ const baseViews = (0, import_getBaseViews.getBaseViews)();
|
|
|
39
66
|
}
|
|
40
67
|
} else {
|
|
41
68
|
events && viewProps.hitSlop && (events.hitSlop = viewProps.hitSlop);
|
|
42
|
-
|
|
43
|
-
if (events && (process.env.NODE_ENV === "development" && viewProps.debug && console.info(
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
)}`
|
|
47
|
-
), events.onPress))
|
|
48
|
-
for (const key in pressability) {
|
|
49
|
-
const og = viewProps[key], val = pressability[key];
|
|
69
|
+
var pressability = (0, import_Pressability.usePressability)(events);
|
|
70
|
+
if (events && (process.env.NODE_ENV === "development" && viewProps.debug && console.info("Checking for press ".concat(!!events.onPress, " then applying pressability props: ").concat(Object.keys(pressability || {}))), events.onPress))
|
|
71
|
+
for (var key in pressability) {
|
|
72
|
+
var og = viewProps[key], val = pressability[key];
|
|
50
73
|
viewProps[key] = og && !dontComposePressabilityKeys[key] ? (0, import_web.composeEventHandlers)(og, val) : val;
|
|
51
74
|
}
|
|
52
75
|
}
|
|
53
|
-
}
|
|
54
|
-
|
|
76
|
+
}
|
|
77
|
+
}, {
|
|
78
|
+
useChildren: function(elementType, children, viewProps, events, staticConfig) {
|
|
55
79
|
if (process.env.NODE_ENV !== "test") {
|
|
56
80
|
if (elementType === baseViews.View)
|
|
57
81
|
return (0, import_createOptimizedView.createOptimizedView)(children, viewProps, baseViews);
|
|
58
82
|
if (process.env.TAMAGUI_OPTIMIZE_NATIVE_VIEWS && elementType === baseViews.Text)
|
|
59
|
-
return viewProps.children = children, (0, import_react.createElement)("RCTText", viewProps);
|
|
83
|
+
return viewProps.children = children, /* @__PURE__ */ (0, import_react.createElement)("RCTText", viewProps);
|
|
60
84
|
}
|
|
61
85
|
}
|
|
62
|
-
});
|
|
63
|
-
|
|
86
|
+
}));
|
|
87
|
+
var dontComposePressabilityKeys = {
|
|
64
88
|
onClick: !0
|
|
65
89
|
}, View = import_web.View, Stack = import_web.Stack, Text = import_web.Text;
|
|
66
90
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/index.tsx"],
|
|
4
|
-
"mappings": "
|
|
5
|
-
"names": ["WebView", "WebStack", "WebText"]
|
|
3
|
+
"sources": ["../../src/Users/n8/tamagui/packages/core/src/index.tsx"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAmC,uDAYnC,aAMO,yBACP,eAAuC,kBAEvC,6BAAoC,kCACpC,sBAA6B,2BAC7B,0BAAiC,qCACjC,4BAAmC,uCAEnC,sBAAgC;AA+BhC,wBAAc;AAGd,wBAAc;;;;;;;;;;;;;;;;;;;;AAEd,IAAMA,gBAAYC,kCAAAA;IAIlBC,uBAAW,eAAA;EACTD,cAAAA;EAEAE,mBAAAA,SAAkBC,aAAaC,SAASC,UAAUC,aAAW;AAC3D,QAAIC,GAAsC;AACxC,UAAMC,OAKJC,0BACAC,iCACAC,gBACAC,kBACAC,iBACAC,mBACAC,oBACAC,kBACAC,sBACAC,+BACAC,4BACAC,mCACAC,qCACAC,4CACAC,2BACAC,kCAGAC,aACAC,WAGAC,YACAC,uBAEAC,UACAC,WAEGC;AAGL,UAAIzB,eAAeE;AAEjB,YAAMwB;AAmCR,UAAIxB,SAEEuB,cAAcE,QAAQH;AACxB,YAAQI,UAAUC,KAAKC;IAa7B;EACF;EAEAC,WAAAA,SAAUC,WAAWC,QAAQ,OAAaC,iBAAiBC,cAAY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A;AAGF,IAAM0B,8BAA8B;EAClCQ,SAAS;AACX,GAIaL,OAAOM,WAAAA,MACPC,QAAQC,WAAAA,OACRL,OAAOM,WAAAA;",
|
|
5
|
+
"names": ["baseViews", "getBaseViews", "setupHooks", "usePropsTransform", "elementType", "propsIn", "stateRef", "willHydrate", "process", "isDOM", "onMoveShouldSetResponder", "onMoveShouldSetResponderCapture", "onResponderEnd", "onResponderGrant", "onResponderMove", "onResponderReject", "onResponderRelease", "onResponderStart", "onResponderTerminate", "onResponderTerminationRequest", "onScrollShouldSetResponder", "onScrollShouldSetResponderCapture", "onSelectionChangeShouldSetResponder", "onSelectionChangeShouldSetResponderCapture", "onStartShouldSetResponder", "onStartShouldSetResponderCapture", "collapsable", "focusable", "accessible", "accessibilityDisabled", "onLayout", "hrefAttrs", "plainDOMProps", "hostRef", "href", "download", "rel", "target", "useEvents", "viewProps", "events", "setStateShallow", "staticConfig", "pseudos", "onFocus", "onBlur", "isInput", "onPressIn", "onPressOut", "onPress", "inputEvents", "composeEventHandlers", "Object", "assign", "hitSlop", "pressability", "usePressability", "env", "NODE_ENV", "console", "info", "keys", "key", "og", "val", "dontComposePressabilityKeys", "useChildren", "children", "View", "createOptimizedView", "TAMAGUI_OPTIMIZE_NATIVE_VIEWS", "Text", "createElement", "onClick", "WebView", "Stack", "WebStack", "WebText"]
|
|
6
6
|
}
|