@tamagui/core 1.113.1 → 1.114.0
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/esm/createOptimizedView.native.js +25 -57
- package/dist/esm/createOptimizedView.native.js.map +6 -1
- package/dist/esm/getBaseViews.native.js +4 -4
- package/dist/esm/getBaseViews.native.js.map +6 -1
- package/dist/esm/helpers/getBoundingClientRect.native.js +7 -4
- package/dist/esm/helpers/getBoundingClientRect.native.js.map +6 -1
- package/dist/esm/helpers/getRect.native.js +7 -10
- package/dist/esm/helpers/getRect.native.js.map +6 -1
- package/dist/esm/hooks/useElementLayout.native.js +80 -97
- package/dist/esm/hooks/useElementLayout.native.js.map +6 -1
- package/dist/esm/index.native.js +36 -44
- package/dist/esm/index.native.js.map +6 -1
- package/dist/esm/inject-styles.native.js +12 -15
- package/dist/esm/inject-styles.native.js.map +6 -1
- package/dist/esm/reactNativeTypes.native.js +1 -2
- package/dist/esm/reactNativeTypes.native.js.map +6 -1
- package/dist/esm/vendor/Pressability.native.js +5 -3
- package/dist/esm/vendor/Pressability.native.js.map +6 -1
- package/dist/native.js +40 -27
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +36 -25
- package/dist/test.native.js.map +2 -2
- package/package.json +6 -6
|
@@ -1,41 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
function createOptimizedView(children, viewProps, baseViews) {
|
|
3
|
-
var TextAncestor = baseViews.TextAncestor,
|
|
4
|
-
ViewNativeComponent = baseViews.View,
|
|
5
|
-
{
|
|
6
|
-
accessibilityElementsHidden,
|
|
7
|
-
accessibilityLabel,
|
|
8
|
-
accessibilityLabelledBy,
|
|
9
|
-
accessibilityLiveRegion,
|
|
10
|
-
accessibilityRole,
|
|
11
|
-
accessibilityState,
|
|
12
|
-
accessibilityValue,
|
|
13
|
-
"aria-busy": ariaBusy,
|
|
14
|
-
"aria-checked": ariaChecked,
|
|
15
|
-
"aria-disabled": ariaDisabled,
|
|
16
|
-
"aria-expanded": ariaExpanded,
|
|
17
|
-
"aria-hidden": ariaHidden,
|
|
18
|
-
"aria-label": ariaLabel,
|
|
19
|
-
"aria-labelledby": ariaLabelledBy,
|
|
20
|
-
"aria-live": ariaLive,
|
|
21
|
-
"aria-selected": ariaSelected,
|
|
22
|
-
"aria-valuemax": ariaValueMax,
|
|
23
|
-
"aria-valuemin": ariaValueMin,
|
|
24
|
-
"aria-valuenow": ariaValueNow,
|
|
25
|
-
"aria-valuetext": ariaValueText,
|
|
26
|
-
focusable,
|
|
27
|
-
id,
|
|
28
|
-
importantForAccessibility,
|
|
29
|
-
nativeID,
|
|
30
|
-
pointerEvents,
|
|
31
|
-
role,
|
|
32
|
-
tabIndex
|
|
33
|
-
} =
|
|
3
|
+
var TextAncestor = baseViews.TextAncestor, ViewNativeComponent = baseViews.View, { accessibilityElementsHidden, accessibilityLabel, accessibilityLabelledBy, accessibilityLiveRegion, accessibilityRole, accessibilityState, accessibilityValue, "aria-busy": ariaBusy, "aria-checked": ariaChecked, "aria-disabled": ariaDisabled, "aria-expanded": ariaExpanded, "aria-hidden": ariaHidden, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-live": ariaLive, "aria-selected": ariaSelected, "aria-valuemax": ariaValueMax, "aria-valuemin": ariaValueMin, "aria-valuenow": ariaValueNow, "aria-valuetext": ariaValueText, focusable, id, importantForAccessibility, nativeID, pointerEvents, role, tabIndex } = (
|
|
34
4
|
// ...otherProps
|
|
35
|
-
viewProps
|
|
36
|
-
|
|
37
|
-
_accessibilityLabelledBy = (_ariaLabelledBy_split = ariaLabelledBy?.split(/\s*,\s*/g)) !== null && _ariaLabelledBy_split !== void 0 ? _ariaLabelledBy_split : accessibilityLabelledBy,
|
|
38
|
-
_accessibilityState;
|
|
5
|
+
viewProps
|
|
6
|
+
), _ariaLabelledBy_split, _accessibilityLabelledBy = (_ariaLabelledBy_split = ariaLabelledBy?.split(/\s*,\s*/g)) !== null && _ariaLabelledBy_split !== void 0 ? _ariaLabelledBy_split : accessibilityLabelledBy, _accessibilityState;
|
|
39
7
|
(accessibilityState != null || ariaBusy != null || ariaChecked != null || ariaDisabled != null || ariaExpanded != null || ariaSelected != null) && (_accessibilityState = {
|
|
40
8
|
busy: ariaBusy ?? accessibilityState?.busy,
|
|
41
9
|
checked: ariaChecked ?? accessibilityState?.checked,
|
|
@@ -50,27 +18,24 @@ function createOptimizedView(children, viewProps, baseViews) {
|
|
|
50
18
|
now: ariaValueNow ?? accessibilityValue?.now,
|
|
51
19
|
text: ariaValueText ?? accessibilityValue?.text
|
|
52
20
|
});
|
|
53
|
-
var style = Array.isArray(viewProps.style) ? baseViews.StyleSheet.flatten(viewProps.style) : viewProps.style,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
var isInText = React.useContext(TextAncestor),
|
|
72
|
-
finalElement = /* @__PURE__ */React.createElement(ViewNativeComponent, finalProps, children);
|
|
73
|
-
return isInText ? /* @__PURE__ */React.createElement(TextAncestor.Provider, {
|
|
21
|
+
var style = Array.isArray(viewProps.style) ? baseViews.StyleSheet.flatten(viewProps.style) : viewProps.style, newPointerEvents = style?.pointerEvents || pointerEvents, finalProps = viewProps, extras = {
|
|
22
|
+
accessibilityLiveRegion: ariaLive === "off" ? "none" : ariaLive ?? accessibilityLiveRegion,
|
|
23
|
+
accessibilityLabel: ariaLabel ?? accessibilityLabel,
|
|
24
|
+
focusable: tabIndex !== void 0 ? !tabIndex : focusable,
|
|
25
|
+
accessibilityState: _accessibilityState,
|
|
26
|
+
accessibilityRole: role ? getAccessibilityRoleFromRole(role) : accessibilityRole,
|
|
27
|
+
accessibilityElementsHidden: ariaHidden ?? accessibilityElementsHidden,
|
|
28
|
+
accessibilityLabelledBy: _accessibilityLabelledBy,
|
|
29
|
+
accessibilityValue: _accessibilityValue,
|
|
30
|
+
importantForAccessibility: ariaHidden === !0 ? "no-hide-descendants" : importantForAccessibility,
|
|
31
|
+
nativeID: id ?? nativeID,
|
|
32
|
+
style,
|
|
33
|
+
pointerEvents: newPointerEvents
|
|
34
|
+
};
|
|
35
|
+
for (var key in extras)
|
|
36
|
+
extras[key] != null && (finalProps[key] = extras[key]);
|
|
37
|
+
var isInText = React.useContext(TextAncestor), finalElement = /* @__PURE__ */ React.createElement(ViewNativeComponent, finalProps, children);
|
|
38
|
+
return isInText ? /* @__PURE__ */ React.createElement(TextAncestor.Provider, {
|
|
74
39
|
value: !1
|
|
75
40
|
}, finalElement) : finalElement;
|
|
76
41
|
}
|
|
@@ -208,5 +173,8 @@ function getAccessibilityRoleFromRole(role) {
|
|
|
208
173
|
return;
|
|
209
174
|
}
|
|
210
175
|
}
|
|
211
|
-
export {
|
|
176
|
+
export {
|
|
177
|
+
createOptimizedView,
|
|
178
|
+
getAccessibilityRoleFromRole
|
|
179
|
+
};
|
|
212
180
|
//# sourceMappingURL=createOptimizedView.native.js.map
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/Users/n8/tamagui/code/core/core/src/createOptimizedView.native.tsx"],
|
|
4
|
+
"mappings": "AAAA,OAAOA,WAAW;AAYX,SAASC,oBACdC,UACAC,WACAC,WAAc;AAEd,MAAMC,eAAeD,UAAUC,cACzBC,sBAAsBF,UAAUG,MAIhC,EACJC,6BACAC,oBACAC,yBACAC,yBACAC,mBACAC,oBACAC,oBACA,aAAaC,UACb,gBAAgBC,aAChB,iBAAiBC,cACjB,iBAAiBC,cACjB,eAAeC,YACf,cAAcC,WACd,mBAAmBC,gBACnB,aAAaC,UACb,iBAAiBC,cACjB,iBAAiBC,cACjB,iBAAiBC,cACjB,iBAAiBC,cACjB,kBAA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ACH,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": ["React", "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
|
+
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
function getBaseViews() {
|
|
2
|
-
var native = require("react-native"),
|
|
3
|
-
View,
|
|
4
|
-
TextAncestor;
|
|
2
|
+
var native = require("react-native"), View, TextAncestor;
|
|
5
3
|
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), {
|
|
6
4
|
View,
|
|
7
5
|
Text: native.Text || native.default.Text,
|
|
@@ -10,5 +8,7 @@ function getBaseViews() {
|
|
|
10
8
|
Pressable: native.Pressable || native.default.Pressable
|
|
11
9
|
};
|
|
12
10
|
}
|
|
13
|
-
export {
|
|
11
|
+
export {
|
|
12
|
+
getBaseViews
|
|
13
|
+
};
|
|
14
14
|
//# sourceMappingURL=getBaseViews.native.js.map
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/Users/n8/tamagui/code/core/core/src/getBaseViews.native.ts"],
|
|
4
|
+
"mappings": "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
|
+
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
var getBoundingClientRect = function
|
|
1
|
+
var getBoundingClientRect = function(node) {
|
|
2
2
|
var _node_getBoundingClientRect;
|
|
3
|
-
if (!(!node || node.nodeType !== 1))
|
|
3
|
+
if (!(!node || node.nodeType !== 1))
|
|
4
|
+
return (_node_getBoundingClientRect = node.getBoundingClientRect) === null || _node_getBoundingClientRect === void 0 ? void 0 : _node_getBoundingClientRect.call(node);
|
|
4
5
|
};
|
|
5
|
-
export {
|
|
6
|
-
|
|
6
|
+
export {
|
|
7
|
+
getBoundingClientRect
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=getBoundingClientRect.js.map
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/helpers/Users/n8/tamagui/code/core/core/src/helpers/getBoundingClientRect.tsx"],
|
|
4
|
+
"mappings": "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
|
+
}
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import { getBoundingClientRect } from "./getBoundingClientRect
|
|
2
|
-
var getRect = function
|
|
1
|
+
import { getBoundingClientRect } from "./getBoundingClientRect";
|
|
2
|
+
var getRect = function(node) {
|
|
3
3
|
var rect = getBoundingClientRect(node);
|
|
4
4
|
if (rect) {
|
|
5
|
-
var {
|
|
6
|
-
x,
|
|
7
|
-
y,
|
|
8
|
-
top,
|
|
9
|
-
left
|
|
10
|
-
} = rect;
|
|
5
|
+
var { x, y, top, left } = rect;
|
|
11
6
|
return {
|
|
12
7
|
x,
|
|
13
8
|
y,
|
|
@@ -18,5 +13,7 @@ var getRect = function (node) {
|
|
|
18
13
|
};
|
|
19
14
|
}
|
|
20
15
|
};
|
|
21
|
-
export {
|
|
22
|
-
|
|
16
|
+
export {
|
|
17
|
+
getRect
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=getRect.js.map
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/helpers/Users/n8/tamagui/code/core/core/src/helpers/getRect.tsx"],
|
|
4
|
+
"mappings": "AAAA,SAASA,6BAA6B;AAE/B,IAAMC,UAAU,SAACC,MAAAA;AACtB,MAAMC,OAAOH,sBAAsBE,IAAAA;AACnC,MAAKC,MACL;QAAM,EAAEC,GAAGC,GAAGC,KAAKC,KAAI,IAAKJ;AAC5B,WAAO;MAAEC;MAAGC;MAAGG,OAAON,KAAKO;MAAaC,QAAQR,KAAKS;MAAcL;MAAKC;IAAK;;AAC/E;",
|
|
5
|
+
"names": ["getBoundingClientRect", "getRect", "node", "rect", "x", "y", "top", "left", "width", "offsetWidth", "height", "offsetHeight"]
|
|
6
|
+
}
|
|
@@ -1,30 +1,22 @@
|
|
|
1
1
|
import { useIsomorphicLayoutEffect } from "@tamagui/constants";
|
|
2
|
-
import { getBoundingClientRect } from "../helpers/getBoundingClientRect
|
|
2
|
+
import { getBoundingClientRect } from "../helpers/getBoundingClientRect";
|
|
3
3
|
function _type_of(obj) {
|
|
4
4
|
"@swc/helpers - typeof";
|
|
5
|
-
|
|
6
5
|
return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
7
6
|
}
|
|
8
|
-
var LayoutHandlers = /* @__PURE__ */new WeakMap(),
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
if (typeof window < "u" && "ResizeObserver" in window && (resizeObserver = new ResizeObserver(function (entries) {
|
|
12
|
-
var _iteratorNormalCompletion = !0,
|
|
13
|
-
_didIteratorError = !1,
|
|
14
|
-
_iteratorError = void 0;
|
|
7
|
+
var LayoutHandlers = /* @__PURE__ */ new WeakMap(), resizeListeners = /* @__PURE__ */ new Set(), resizeObserver = null;
|
|
8
|
+
if (typeof window < "u" && "ResizeObserver" in window && (resizeObserver = new ResizeObserver(function(entries) {
|
|
9
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
15
10
|
try {
|
|
16
|
-
for (var _loop = function
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
onLayout(event);
|
|
26
|
-
});
|
|
27
|
-
}, _iterator = entries[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
11
|
+
for (var _loop = function() {
|
|
12
|
+
var { target } = _step.value, onLayout = LayoutHandlers.get(target);
|
|
13
|
+
if (typeof onLayout != "function") return {
|
|
14
|
+
v: void 0
|
|
15
|
+
};
|
|
16
|
+
measureElement(target).then(function(event) {
|
|
17
|
+
onLayout(event);
|
|
18
|
+
});
|
|
19
|
+
}, _iterator = entries[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
28
20
|
var _ret = _loop();
|
|
29
21
|
if (_type_of(_ret) === "object") return _ret.v;
|
|
30
22
|
}
|
|
@@ -34,111 +26,102 @@ if (typeof window < "u" && "ResizeObserver" in window && (resizeObserver = new R
|
|
|
34
26
|
try {
|
|
35
27
|
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
36
28
|
} finally {
|
|
37
|
-
if (_didIteratorError)
|
|
29
|
+
if (_didIteratorError)
|
|
30
|
+
throw _iteratorError;
|
|
38
31
|
}
|
|
39
32
|
}
|
|
40
33
|
}), typeof window.addEventListener == "function")) {
|
|
41
34
|
var tm;
|
|
42
|
-
window.addEventListener("resize", function
|
|
43
|
-
clearTimeout(tm), tm = setTimeout(function
|
|
44
|
-
resizeListeners.forEach(function
|
|
35
|
+
window.addEventListener("resize", function() {
|
|
36
|
+
clearTimeout(tm), tm = setTimeout(function() {
|
|
37
|
+
resizeListeners.forEach(function(cb) {
|
|
45
38
|
return cb();
|
|
46
39
|
});
|
|
47
40
|
}, 4);
|
|
48
41
|
});
|
|
49
42
|
}
|
|
50
|
-
var measureElement = async function
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
x,
|
|
57
|
-
y,
|
|
58
|
-
width,
|
|
59
|
-
height,
|
|
60
|
-
left,
|
|
61
|
-
top
|
|
62
|
-
},
|
|
63
|
-
target
|
|
64
|
-
},
|
|
65
|
-
timeStamp: Date.now()
|
|
66
|
-
});
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
|
-
},
|
|
70
|
-
cache = /* @__PURE__ */new WeakMap(),
|
|
71
|
-
measureLayout = function (node, relativeTo, callback) {
|
|
72
|
-
var relativeNode = relativeTo || node?.parentNode;
|
|
73
|
-
if (relativeNode instanceof HTMLElement) {
|
|
74
|
-
var now = Date.now();
|
|
75
|
-
cache.set(node, now), Promise.all([getBoundingClientRectAsync(node), getBoundingClientRectAsync(relativeNode)]).then(function (param) {
|
|
76
|
-
var [nodeDim, relativeNodeDim] = param;
|
|
77
|
-
if (relativeNodeDim && nodeDim && cache.get(node) === now) {
|
|
78
|
-
var {
|
|
43
|
+
var measureElement = async function(target) {
|
|
44
|
+
return new Promise(function(res) {
|
|
45
|
+
measureLayout(target, null, function(x, y, width, height, left, top) {
|
|
46
|
+
res({
|
|
47
|
+
nativeEvent: {
|
|
48
|
+
layout: {
|
|
79
49
|
x,
|
|
80
50
|
y,
|
|
81
51
|
width,
|
|
82
52
|
height,
|
|
83
53
|
left,
|
|
84
54
|
top
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
}
|
|
55
|
+
},
|
|
56
|
+
target
|
|
57
|
+
},
|
|
58
|
+
timeStamp: Date.now()
|
|
88
59
|
});
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
width,
|
|
104
|
-
height,
|
|
105
|
-
left,
|
|
106
|
-
top
|
|
107
|
-
};
|
|
108
|
-
},
|
|
109
|
-
getBoundingClientRectAsync = function (element) {
|
|
110
|
-
return new Promise(function (resolve) {
|
|
111
|
-
function fallbackToSync() {
|
|
112
|
-
resolve(getBoundingClientRect(element));
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
}, cache = /* @__PURE__ */ new WeakMap(), measureLayout = function(node, relativeTo, callback) {
|
|
63
|
+
var relativeNode = relativeTo || node?.parentNode;
|
|
64
|
+
if (relativeNode instanceof HTMLElement) {
|
|
65
|
+
var now = Date.now();
|
|
66
|
+
cache.set(node, now), Promise.all([
|
|
67
|
+
getBoundingClientRectAsync(node),
|
|
68
|
+
getBoundingClientRectAsync(relativeNode)
|
|
69
|
+
]).then(function(param) {
|
|
70
|
+
var [nodeDim, relativeNodeDim] = param;
|
|
71
|
+
if (relativeNodeDim && nodeDim && cache.get(node) === now) {
|
|
72
|
+
var { x, y, width, height, left, top } = getRelativeDimensions(nodeDim, relativeNodeDim);
|
|
73
|
+
callback(x, y, width, height, left, top);
|
|
113
74
|
}
|
|
114
|
-
var tm = setTimeout(fallbackToSync, 10),
|
|
115
|
-
observer = new IntersectionObserver(function (entries, ob) {
|
|
116
|
-
var _entries_;
|
|
117
|
-
clearTimeout(tm), ob.disconnect(), resolve((_entries_ = entries[0]) === null || _entries_ === void 0 ? void 0 : _entries_.boundingClientRect);
|
|
118
|
-
}, {
|
|
119
|
-
threshold: 1e-4
|
|
120
|
-
});
|
|
121
|
-
observer.observe(element);
|
|
122
75
|
});
|
|
76
|
+
}
|
|
77
|
+
}, getRelativeDimensions = function(a, b) {
|
|
78
|
+
var { height, left, top, width } = a, x = left - b.left, y = top - b.top;
|
|
79
|
+
return {
|
|
80
|
+
x,
|
|
81
|
+
y,
|
|
82
|
+
width,
|
|
83
|
+
height,
|
|
84
|
+
left,
|
|
85
|
+
top
|
|
123
86
|
};
|
|
87
|
+
}, getBoundingClientRectAsync = function(element) {
|
|
88
|
+
return new Promise(function(resolve) {
|
|
89
|
+
function fallbackToSync() {
|
|
90
|
+
resolve(getBoundingClientRect(element));
|
|
91
|
+
}
|
|
92
|
+
var tm = setTimeout(fallbackToSync, 10), observer = new IntersectionObserver(function(entries, ob) {
|
|
93
|
+
var _entries_;
|
|
94
|
+
clearTimeout(tm), ob.disconnect(), resolve((_entries_ = entries[0]) === null || _entries_ === void 0 ? void 0 : _entries_.boundingClientRect);
|
|
95
|
+
}, {
|
|
96
|
+
threshold: 1e-4
|
|
97
|
+
});
|
|
98
|
+
observer.observe(element);
|
|
99
|
+
});
|
|
100
|
+
};
|
|
124
101
|
function useElementLayout(ref, onLayout) {
|
|
125
|
-
var _ref_current,
|
|
126
|
-
|
|
127
|
-
node && onLayout && LayoutHandlers.set(node, onLayout), useIsomorphicLayoutEffect(function () {
|
|
102
|
+
var _ref_current, node = (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.host;
|
|
103
|
+
node && onLayout && LayoutHandlers.set(node, onLayout), useIsomorphicLayoutEffect(function() {
|
|
128
104
|
var _ref_current2;
|
|
129
105
|
if (!(!resizeObserver || !onLayout)) {
|
|
130
106
|
var node2 = (_ref_current2 = ref.current) === null || _ref_current2 === void 0 ? void 0 : _ref_current2.host;
|
|
131
107
|
if (node2) {
|
|
132
108
|
LayoutHandlers.set(node2, onLayout);
|
|
133
|
-
var onResize = function
|
|
109
|
+
var onResize = function() {
|
|
134
110
|
measureElement(node2).then(onLayout);
|
|
135
111
|
};
|
|
136
|
-
return resizeListeners.add(onResize), resizeObserver.observe(node2), function
|
|
112
|
+
return resizeListeners.add(onResize), resizeObserver.observe(node2), function() {
|
|
137
113
|
LayoutHandlers.delete(node2), resizeListeners.delete(onResize), resizeObserver?.unobserve(node2);
|
|
138
114
|
};
|
|
139
115
|
}
|
|
140
116
|
}
|
|
141
|
-
}, [
|
|
117
|
+
}, [
|
|
118
|
+
ref,
|
|
119
|
+
!!onLayout
|
|
120
|
+
]);
|
|
142
121
|
}
|
|
143
|
-
export {
|
|
144
|
-
|
|
122
|
+
export {
|
|
123
|
+
measureElement,
|
|
124
|
+
measureLayout,
|
|
125
|
+
useElementLayout
|
|
126
|
+
};
|
|
127
|
+
//# sourceMappingURL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;AAFRS,mBAAaD,EAAAA,GACbuC,GAAGC,WAAU,GACbL,SAAQ3C,YAAAA,QAAQ,CAAA,OAAE,QAAVA,cAAAA,SAAAA,SAAAA,UAAYiD,kBAAkB;IACxC,GACA;MACEC,WAAW;IACb,CAAA;AAEFL,aAASM,QAAQT,OAAAA;EACnB,CAAA;AACF;AAEO,SAASU,iBACdC,KACAnD,UAA4C;MAE/BmD,cAAPzB,QAAOyB,eAAAA,IAAIC,aAAO,QAAXD,iBAAAA,SAAAA,SAAAA,aAAaE;AAG1B,EAAI3B,QAAQ1B,YACVT,eAAeyC,IAAIN,MAAM1B,QAAAA,GAG3BX,0BAA0B,WAAA;QAEX8D;AADb,QAAI,GAACxD,kBAAkB,CAACK,WACxB;UAAM0B,SAAOyB,gBAAAA,IAAIC,aAAO,QAAXD,kBAAAA,SAAAA,SAAAA,cAAaE;AAC1B,UAAK3B,OAGLnC;uBAAeyC,IAAIN,OAAM1B,QAAAA;AAEzB,YAAMsD,WAAW,WAAA;AACfpD,yBAAewB,KAAAA,EAAqBvB,KAAKH,QAAAA;QAC3C;AAEAP,+BAAgB8D,IAAID,QAAAA,GACpB3D,eAAesD,QAAQvB,KAAAA,GAEhB,WAAA;AACLnC,yBAAeiE,OAAO9B,KAAAA,GACtBjC,gBAAgB+D,OAAOF,QAAAA,GACvB3D,gBAAgB8D,UAAU/B,KAAAA;QAC5B;;;EACF,GAAG;IAACyB;IAAK,CAAC,CAACnD;GAAS;AACtB;",
|
|
5
|
+
"names": ["useIsomorphicLayoutEffect", "getBoundingClientRect", "LayoutHandlers", "WeakMap", "resizeListeners", "Set", "resizeObserver", "window", "ResizeObserver", "entries", "target", "onLayout", "get", "measureElement", "then", "event", "addEventListener", "tm", "clearTimeout", "setTimeout", "forEach", "cb", "Promise", "res", "measureLayout", "x", "y", "width", "height", "left", "top", "nativeEvent", "layout", "timeStamp", "Date", "now", "cache", "node", "relativeTo", "callback", "relativeNode", "parentNode", "HTMLElement", "set", "all", "getBoundingClientRectAsync", "nodeDim", "relativeNodeDim", "getRelativeDimensions", "a", "b", "element", "resolve", "fallbackToSync", "observer", "IntersectionObserver", "ob", "disconnect", "boundingClientRect", "threshold", "observe", "useElementLayout", "ref", "current", "host", "onResize", "add", "delete", "unobserve"]
|
|
6
|
+
}
|
package/dist/esm/index.native.js
CHANGED
|
@@ -1,31 +1,26 @@
|
|
|
1
1
|
import "@tamagui/react-native-use-responder-events";
|
|
2
2
|
import { Stack as WebStack, Text as WebText, View as WebView, composeEventHandlers, setupHooks } from "@tamagui/web";
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { createOptimizedView } from "./createOptimizedView
|
|
5
|
-
import { getBaseViews } from "./getBaseViews
|
|
6
|
-
import { getRect } from "./helpers/getRect
|
|
7
|
-
import { measureLayout } from "./hooks/useElementLayout
|
|
8
|
-
import { usePressability } from "./vendor/Pressability
|
|
4
|
+
import { createOptimizedView } from "./createOptimizedView";
|
|
5
|
+
import { getBaseViews } from "./getBaseViews";
|
|
6
|
+
import { getRect } from "./helpers/getRect";
|
|
7
|
+
import { measureLayout } from "./hooks/useElementLayout";
|
|
8
|
+
import { usePressability } from "./vendor/Pressability";
|
|
9
9
|
export * from "@tamagui/web";
|
|
10
|
-
export * from "./reactNativeTypes
|
|
10
|
+
export * from "./reactNativeTypes";
|
|
11
11
|
var baseViews = getBaseViews();
|
|
12
12
|
setupHooks({
|
|
13
13
|
getBaseViews,
|
|
14
|
-
setElementProps: function
|
|
14
|
+
setElementProps: function(node) {
|
|
15
15
|
if (node && !node.measure) {
|
|
16
16
|
var _node, _node1, _node2;
|
|
17
|
-
(_node = node).measure || (_node.measure = function
|
|
17
|
+
(_node = node).measure || (_node.measure = function(callback) {
|
|
18
18
|
return measureLayout(node, null, callback);
|
|
19
|
-
}), (_node1 = node).measureLayout || (_node1.measureLayout = function
|
|
19
|
+
}), (_node1 = node).measureLayout || (_node1.measureLayout = function(relativeToNode, success) {
|
|
20
20
|
return measureLayout(node, relativeToNode, success);
|
|
21
|
-
}), (_node2 = node).measureInWindow || (_node2.measureInWindow = function
|
|
22
|
-
setTimeout(function
|
|
23
|
-
var {
|
|
24
|
-
height,
|
|
25
|
-
left,
|
|
26
|
-
top,
|
|
27
|
-
width
|
|
28
|
-
} = getRect(node);
|
|
21
|
+
}), (_node2 = node).measureInWindow || (_node2.measureInWindow = function(callback) {
|
|
22
|
+
setTimeout(function() {
|
|
23
|
+
var { height, left, top, width } = getRect(node);
|
|
29
24
|
callback(left, top, width, height);
|
|
30
25
|
}, 0);
|
|
31
26
|
});
|
|
@@ -34,48 +29,45 @@ setupHooks({
|
|
|
34
29
|
usePropsTransform(elementType, propsIn, stateRef, willHydrate) {
|
|
35
30
|
if (0) {
|
|
36
31
|
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;
|
|
37
|
-
if (isDOM && plainDOMProps.href && hrefAttrs)
|
|
32
|
+
if (isDOM && plainDOMProps.href && hrefAttrs)
|
|
33
|
+
var download, rel, target;
|
|
38
34
|
}
|
|
39
35
|
},
|
|
40
36
|
useEvents(viewProps, events, param, setStateShallow, staticConfig) {
|
|
41
|
-
var {
|
|
42
|
-
pseudos
|
|
43
|
-
} = param;
|
|
37
|
+
var { pseudos } = param;
|
|
44
38
|
if (events && (events.onFocus && (viewProps.onFocus = events.onFocus), events.onBlur && (viewProps.onBlur = events.onBlur)), staticConfig.isInput) {
|
|
45
39
|
if (events) {
|
|
46
|
-
var {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
} = events,
|
|
51
|
-
inputEvents = {
|
|
52
|
-
onPressIn,
|
|
53
|
-
onPressOut: onPressOut || onPress
|
|
54
|
-
};
|
|
40
|
+
var { onPressIn, onPressOut, onPress } = events, inputEvents = {
|
|
41
|
+
onPressIn,
|
|
42
|
+
onPressOut: onPressOut || onPress
|
|
43
|
+
};
|
|
55
44
|
onPressOut && onPress && (inputEvents.onPressOut = composeEventHandlers(onPress, onPressOut)), Object.assign(viewProps, inputEvents);
|
|
56
45
|
}
|
|
57
46
|
} else {
|
|
58
47
|
events && viewProps.hitSlop && (events.hitSlop = viewProps.hitSlop);
|
|
59
48
|
var pressability = usePressability(events);
|
|
60
|
-
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))
|
|
61
|
-
var
|
|
62
|
-
val = pressability[key];
|
|
63
|
-
|
|
64
|
-
|
|
49
|
+
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))
|
|
50
|
+
for (var key in pressability) {
|
|
51
|
+
var og = viewProps[key], val = pressability[key];
|
|
52
|
+
viewProps[key] = og && !dontComposePressabilityKeys[key] ? composeEventHandlers(og, val) : val;
|
|
53
|
+
}
|
|
65
54
|
}
|
|
66
55
|
},
|
|
67
56
|
useChildren(elementType, children, viewProps, events, staticConfig) {
|
|
68
57
|
if (process.env.NODE_ENV !== "test") {
|
|
69
|
-
if (elementType === baseViews.View)
|
|
70
|
-
|
|
58
|
+
if (elementType === baseViews.View)
|
|
59
|
+
return createOptimizedView(children, viewProps, baseViews);
|
|
60
|
+
if (process.env.TAMAGUI_OPTIMIZE_NATIVE_VIEWS && elementType === baseViews.Text)
|
|
61
|
+
return viewProps.children = children, /* @__PURE__ */ React.createElement("RCTText", viewProps);
|
|
71
62
|
}
|
|
72
63
|
}
|
|
73
64
|
});
|
|
74
65
|
var dontComposePressabilityKeys = {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
Stack
|
|
79
|
-
Text
|
|
80
|
-
|
|
81
|
-
|
|
66
|
+
onClick: !0
|
|
67
|
+
}, View = WebView, Stack = WebStack, Text = WebText;
|
|
68
|
+
export {
|
|
69
|
+
Stack,
|
|
70
|
+
Text,
|
|
71
|
+
View
|
|
72
|
+
};
|
|
73
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/Users/n8/tamagui/code/core/core/src/index.tsx"],
|
|
4
|
+
"mappings": "AAAA,OAAmC;AAYnC,SACEA,SAASC,UACTC,QAAQC,SACRC,QAAQC,SACRC,sBACAC,kBACK;AACP,OAAOC,WAAW;AAElB,SAASC,2BAA2B;AACpC,SAASC,oBAAoB;AAC7B,SAASC,eAAe;AACxB,SAASC,qBAAuC;AAEhD,SAASC,uBAAuB;AA+BhC,cAAc;AAGd,cAAc;AAEd,IAAMC,YAAYJ,aAAAA;AAIlBH,WAAW;EACTG;EAEAK,iBAAiB,SAACC,MAAAA;AAEhB,QAAIA,QAAQ,CAACA,KAAK,SAAY;UAE5BA,OAEAA,QAGAA;AALAA,OAAAA,QAAAA,MAAKC,YAALD,MAAKC,UAAY,SAACC,UAAAA;eAAaN,cAAcI,MAAM,MAAME,QAAAA;WAEzDF,SAAAA,MAAKJ,kBAALI,OAAKJ,gBAAkB,SAACO,gBAAgBC,SAAAA;eACtCR,cAAcI,MAAqBG,gBAAgBC,OAAAA;WAErDJ,SAAAA,MAAKK,oBAALL,OAAKK,kBAAoB,SAACH,UAAAA;AACxBI,mBAAW,WAAA;AACT,cAAM,EAAEC,QAAQC,MAAMC,KAAKC,MAAK,IAAKf,QAAQK,IAAAA;AAC7CE,mBAASM,MAAMC,KAAKC,OAAOH,MAAAA;QAC7B,GAAG,CAAA;MACL;IACF;EACF;EAEAI,kBAAkBC,aAAaC,SAASC,UAAUC,aAAW;AAC3D,QAAIC,GAA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IjC,QAAQ8C,IAAIC,aAAa,QAK7B;UAAInD,gBAAgBd,UAAUV;AAE5B,eAAOK,oBAAoB+E,UAAU1B,WAAWhD,SAAAA;AAGlD,UAAIkB,QAAQ8C,IAAIW,iCACV7D,gBAAgBd,UAAUZ;AAE5B4D,yBAAU0B,WAAWA,UACdhF,sBAAMkF,cAAc,WAAW5B,SAAAA;;EAG5C;AAEJ,CAAA;AAEA,IAAMwB,8BAA8B;EAClCK,SAAS;AACX,GAIavF,OAAOC,SACPL,QAAQC,UACRC,OAAOC;",
|
|
5
|
+
"names": ["Stack", "WebStack", "Text", "WebText", "View", "WebView", "composeEventHandlers", "setupHooks", "React", "createOptimizedView", "getBaseViews", "getRect", "measureLayout", "usePressability", "baseViews", "setElementProps", "node", "measure", "callback", "relativeToNode", "success", "measureInWindow", "setTimeout", "height", "left", "top", "width", "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", "href", "download", "rel", "target", "useEvents", "viewProps", "events", "setStateShallow", "staticConfig", "pseudos", "onFocus", "onBlur", "isInput", "onPressIn", "onPressOut", "onPress", "inputEvents", "Object", "assign", "hitSlop", "pressability", "env", "NODE_ENV", "console", "info", "keys", "key", "og", "val", "dontComposePressabilityKeys", "useChildren", "children", "TAMAGUI_OPTIMIZE_NATIVE_VIEWS", "createElement", "onClick"]
|
|
6
|
+
}
|