@tamagui/core 1.74.2 → 1.74.4
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.js.map +1 -1
- package/dist/cjs/hooks/useElementLayout.native.js.map +1 -1
- package/dist/cjs/native.js +20 -0
- package/dist/cjs/native.js.map +6 -0
- package/dist/esm/getBaseViews.native.js +11 -0
- package/dist/esm/getBaseViews.native.js.map +6 -0
- package/dist/esm/helpers/getBoundingClientRect.native.js +8 -0
- package/dist/esm/helpers/getBoundingClientRect.native.js.map +6 -0
- package/dist/esm/helpers/getRect.native.js +12 -0
- package/dist/esm/helpers/getRect.native.js.map +6 -0
- package/dist/esm/hooks/useElementLayout.js.map +1 -1
- package/dist/esm/hooks/useElementLayout.native.js +44 -0
- package/dist/esm/hooks/useElementLayout.native.js.map +6 -0
- package/dist/esm/hooks/usePlatformMethods.native.js +18 -0
- package/dist/esm/hooks/usePlatformMethods.native.js.map +6 -0
- package/dist/esm/index.native.js +92 -0
- package/dist/esm/index.native.js.map +6 -0
- package/dist/esm/inject-styles.native.js +12 -0
- package/dist/esm/inject-styles.native.js.map +6 -0
- package/dist/esm/reactNativeTypes.native.js +1 -0
- package/dist/esm/reactNativeTypes.native.js.map +6 -0
- package/dist/esm/vendor/Pressability.native.js +6 -0
- package/dist/esm/vendor/Pressability.native.js.map +6 -0
- package/dist/native.js +57 -37
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +48 -33
- package/dist/test.native.js.map +3 -3
- package/package.json +6 -6
- package/src/hooks/useElementLayout.tsx +0 -1
- package/types/hooks/useElementLayout.d.ts.map +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/hooks/useElementLayout.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAA0C,+
|
|
4
|
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CAAC,kBAAkB,CAAC;AAAU;AAClC,UAAM,OAAO,IAAI;AACjB,QAAK;AACL,4BAAe,IAAI,MAAM,QAAQ,GACjC,eAAe,QAAQ,IAAI,GACpB,MAAM;AACX,iDAAgB,UAAU;AAAA,MAC5B;AAAA,EACF,GAAG,CAAC,KAAK,QAAQ,CAAC;AACpB;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
return to;
|
|
11
|
+
}, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
12
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
13
|
+
var native_exports = {};
|
|
14
|
+
module.exports = __toCommonJS(native_exports);
|
|
15
|
+
__reExport(native_exports, require("./index"), module.exports);
|
|
16
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
17
|
+
0 && (module.exports = {
|
|
18
|
+
...require("./index")
|
|
19
|
+
});
|
|
20
|
+
//# sourceMappingURL=native.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { getBoundingClientRect } from "./getBoundingClientRect";
|
|
2
|
+
const getRect = (node) => {
|
|
3
|
+
const rect = getBoundingClientRect(node);
|
|
4
|
+
if (!rect)
|
|
5
|
+
return;
|
|
6
|
+
const { x, y, top, left } = rect;
|
|
7
|
+
return { x, y, width: node.offsetWidth, height: node.offsetHeight, top, left };
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
getRect
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=getRect.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/helpers/getRect.tsx"],
|
|
4
|
+
"mappings": "AAAA,SAAS,6BAA6B;AAE/B,MAAM,UAAU,CAAC,SAAsB;AAC5C,QAAM,OAAO,sBAAsB,IAAI;AACvC,MAAI,CAAC;AAAM;AACX,QAAM,EAAE,GAAG,GAAG,KAAK,KAAK,IAAI;AAC5B,SAAO,EAAE,GAAG,GAAG,OAAO,KAAK,aAAa,QAAQ,KAAK,cAAc,KAAK,KAAK;AAC/E;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/hooks/useElementLayout.tsx"],
|
|
4
|
-
"mappings": "AAAA,SAAS,iCAAiC;
|
|
4
|
+
"mappings": "AAAA,SAAS,iCAAiC;AAG1C,SAAS,6BAA6B;AACtC,SAAS,eAAe;AAExB,MAAM,iBAAiB,oBAAI,QAA2B;AAmBtD,IAAI,iBAAwC;AAExC,OAAO,SAAW,OAAe,oBAAoB,WACvD,iBAAiB,IAAI,eAAe,CAAC,YAAY;AAC/C,aAAW,EAAE,OAAO,KAAK,SAAS;AAChC,UAAM,WAAW,eAAe,IAAI,MAAM;AAC1C,QAAI,OAAO,YAAa;AAAY;AACpC,kBAAc,QAAuB,MAAM,CAAC,GAAG,GAAG,OAAO,QAAQ,MAAM,QAAQ;AAC7E,eAAS;AAAA,QACP,aAAa;AAAA,UACX,QAAQ,EAAE,GAAG,GAAG,OAAO,QAAQ,MAAM,IAAI;AAAA,UACzC;AAAA,QACF;AAAA,QACA,WAAW,KAAK,IAAI;AAAA,MACtB,CAAC;AAAA,IACH,CAAC;AAAA,EACH;AACF,CAAC;AAGI,MAAM,gBAAgB,CAC3B,MACA,YACA,aACG;AACH,QAAM,eAAe,cAAc,MAAM;AACzC,EAAI,wBAAwB,eAC1B,WAAW,MAAM;AACf,UAAM,eAAe,sBAAsB,YAAY,GACjD,EAAE,QAAQ,MAAM,KAAK,MAAM,IAAI,QAAQ,IAAI,GAC3C,IAAI,OAAO,aAAa,MACxB,IAAI,MAAM,aAAa;AAC7B,aAAS,GAAG,GAAG,OAAO,QAAQ,MAAM,GAAG;AAAA,EACzC,GAAG,CAAC;AAER;AAEO,SAAS,iBACd,KACA,UACA;AACA,4BAA0B,MAAM;AAC9B,QAAI,CAAC,kBAAkB,CAAC;AAAU;AAClC,UAAM,OAAO,IAAI;AACjB,QAAK;AACL,4BAAe,IAAI,MAAM,QAAQ,GACjC,eAAe,QAAQ,IAAI,GACpB,MAAM;AACX,wBAAgB,UAAU,IAAI;AAAA,MAChC;AAAA,EACF,GAAG,CAAC,KAAK,QAAQ,CAAC;AACpB;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { useIsomorphicLayoutEffect } from "@tamagui/constants";
|
|
2
|
+
import { getBoundingClientRect } from "../helpers/getBoundingClientRect";
|
|
3
|
+
import { getRect } from "../helpers/getRect";
|
|
4
|
+
const LayoutHandlers = /* @__PURE__ */ new WeakMap();
|
|
5
|
+
let resizeObserver = null;
|
|
6
|
+
typeof window < "u" && "ResizeObserver" in window && (resizeObserver = new ResizeObserver((entries) => {
|
|
7
|
+
for (const { target } of entries) {
|
|
8
|
+
const onLayout = LayoutHandlers.get(target);
|
|
9
|
+
if (typeof onLayout != "function")
|
|
10
|
+
return;
|
|
11
|
+
measureLayout(target, null, (x, y, width, height, left, top) => {
|
|
12
|
+
onLayout({
|
|
13
|
+
nativeEvent: {
|
|
14
|
+
layout: { x, y, width, height, left, top },
|
|
15
|
+
target
|
|
16
|
+
},
|
|
17
|
+
timeStamp: Date.now()
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}));
|
|
22
|
+
const measureLayout = (node, relativeTo, callback) => {
|
|
23
|
+
const relativeNode = relativeTo || node?.parentNode;
|
|
24
|
+
relativeNode instanceof HTMLElement && setTimeout(() => {
|
|
25
|
+
const relativeRect = getBoundingClientRect(relativeNode), { height, left, top, width } = getRect(node), x = left - relativeRect.left, y = top - relativeRect.top;
|
|
26
|
+
callback(x, y, width, height, left, top);
|
|
27
|
+
}, 0);
|
|
28
|
+
};
|
|
29
|
+
function useElementLayout(ref, onLayout) {
|
|
30
|
+
useIsomorphicLayoutEffect(() => {
|
|
31
|
+
if (!resizeObserver || !onLayout)
|
|
32
|
+
return;
|
|
33
|
+
const node = ref.current;
|
|
34
|
+
if (node)
|
|
35
|
+
return LayoutHandlers.set(node, onLayout), resizeObserver.observe(node), () => {
|
|
36
|
+
resizeObserver?.unobserve(node);
|
|
37
|
+
};
|
|
38
|
+
}, [ref, onLayout]);
|
|
39
|
+
}
|
|
40
|
+
export {
|
|
41
|
+
measureLayout,
|
|
42
|
+
useElementLayout
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=useElementLayout.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/hooks/useElementLayout.tsx"],
|
|
4
|
+
"mappings": "AAAA,SAAS,iCAAiC;AAG1C,SAAS,6BAA6B;AACtC,SAAS,eAAe;AAExB,MAAM,iBAAiB,oBAAI,QAA2B;AAmBtD,IAAI,iBAAwC;AAExC,OAAO,SAAW,OAAe,oBAAoB,WACvD,iBAAiB,IAAI,eAAe,CAAC,YAAY;AAC/C,aAAW,EAAE,OAAO,KAAK,SAAS;AAChC,UAAM,WAAW,eAAe,IAAI,MAAM;AAC1C,QAAI,OAAO,YAAa;AAAY;AACpC,kBAAc,QAAuB,MAAM,CAAC,GAAG,GAAG,OAAO,QAAQ,MAAM,QAAQ;AAC7E,eAAS;AAAA,QACP,aAAa;AAAA,UACX,QAAQ,EAAE,GAAG,GAAG,OAAO,QAAQ,MAAM,IAAI;AAAA,UACzC;AAAA,QACF;AAAA,QACA,WAAW,KAAK,IAAI;AAAA,MACtB,CAAC;AAAA,IACH,CAAC;AAAA,EACH;AACF,CAAC;AAGI,MAAM,gBAAgB,CAC3B,MACA,YACA,aACG;AACH,QAAM,eAAe,cAAc,MAAM;AACzC,EAAI,wBAAwB,eAC1B,WAAW,MAAM;AACf,UAAM,eAAe,sBAAsB,YAAY,GACjD,EAAE,QAAQ,MAAM,KAAK,MAAM,IAAI,QAAQ,IAAI,GAC3C,IAAI,OAAO,aAAa,MACxB,IAAI,MAAM,aAAa;AAC7B,aAAS,GAAG,GAAG,OAAO,QAAQ,MAAM,GAAG;AAAA,EACzC,GAAG,CAAC;AAER;AAEO,SAAS,iBACd,KACA,UACA;AACA,4BAA0B,MAAM;AAC9B,QAAI,CAAC,kBAAkB,CAAC;AAAU;AAClC,UAAM,OAAO,IAAI;AACjB,QAAK;AACL,4BAAe,IAAI,MAAM,QAAQ,GACjC,eAAe,QAAQ,IAAI,GACpB,MAAM;AACX,wBAAgB,UAAU,IAAI;AAAA,MAChC;AAAA,EACF,GAAG,CAAC,KAAK,QAAQ,CAAC;AACpB;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useIsomorphicLayoutEffect } from "@tamagui/web";
|
|
2
|
+
import { getRect } from "../helpers/getRect";
|
|
3
|
+
import { measureLayout } from "./useElementLayout";
|
|
4
|
+
function usePlatformMethods(hostRef) {
|
|
5
|
+
useIsomorphicLayoutEffect(() => {
|
|
6
|
+
const node = hostRef.current;
|
|
7
|
+
node && (node.measure = (callback) => measureLayout(node, null, callback), node.measureLayout = (relativeToNode, success) => measureLayout(node, relativeToNode, success), node.measureInWindow = (callback) => {
|
|
8
|
+
node && setTimeout(() => {
|
|
9
|
+
const { height, left, top, width } = getRect(node);
|
|
10
|
+
callback(left, top, width, height);
|
|
11
|
+
}, 0);
|
|
12
|
+
});
|
|
13
|
+
}, [hostRef]);
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
usePlatformMethods
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=usePlatformMethods.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/hooks/usePlatformMethods.ts"],
|
|
4
|
+
"mappings": "AAAA,SAAS,iCAAiC;AAG1C,SAAS,eAAe;AACxB,SAAS,qBAAqB;AAGvB,SAAS,mBAAmB,SAA6B;AAC9D,4BAA0B,MAAM;AAC9B,UAAM,OAAO,QAAQ;AACrB,IAAK,SAEL,KAAK,UAAU,CAAC,aAAa,cAAc,MAAM,MAAM,QAAQ,GAE/D,KAAK,gBAAgB,CAAC,gBAAgB,YACpC,cAAc,MAAqB,gBAAgB,OAAO,GAE5D,KAAK,kBAAkB,CAAC,aAAa;AACnC,MAAK,QACL,WAAW,MAAM;AACf,cAAM,EAAE,QAAQ,MAAM,KAAK,MAAM,IAAI,QAAQ,IAAmB;AAChE,iBAAS,MAAM,KAAK,OAAO,MAAM;AAAA,MACnC,GAAG,CAAC;AAAA,IACN;AAAA,EACF,GAAG,CAAC,OAAO,CAAC;AACd;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { useResponderEvents } from "@tamagui/react-native-use-responder-events";
|
|
2
|
+
import {
|
|
3
|
+
Stack as WebStack,
|
|
4
|
+
Text as WebText,
|
|
5
|
+
composeEventHandlers,
|
|
6
|
+
setupHooks
|
|
7
|
+
} from "@tamagui/web";
|
|
8
|
+
import { getBaseViews } from "./getBaseViews";
|
|
9
|
+
import { useElementLayout } from "./hooks/useElementLayout";
|
|
10
|
+
import { usePlatformMethods } from "./hooks/usePlatformMethods";
|
|
11
|
+
import { usePressability } from "./vendor/Pressability";
|
|
12
|
+
export * from "@tamagui/web";
|
|
13
|
+
export * from "./reactNativeTypes";
|
|
14
|
+
const Stack = WebStack, Text = WebText;
|
|
15
|
+
setupHooks({
|
|
16
|
+
getBaseViews,
|
|
17
|
+
usePropsTransform(elementType, propsIn, hostRef) {
|
|
18
|
+
const {
|
|
19
|
+
// event props
|
|
20
|
+
onMoveShouldSetResponder,
|
|
21
|
+
onMoveShouldSetResponderCapture,
|
|
22
|
+
onResponderEnd,
|
|
23
|
+
onResponderGrant,
|
|
24
|
+
onResponderMove,
|
|
25
|
+
onResponderReject,
|
|
26
|
+
onResponderRelease,
|
|
27
|
+
onResponderStart,
|
|
28
|
+
onResponderTerminate,
|
|
29
|
+
onResponderTerminationRequest,
|
|
30
|
+
onScrollShouldSetResponder,
|
|
31
|
+
onScrollShouldSetResponderCapture,
|
|
32
|
+
onSelectionChangeShouldSetResponder,
|
|
33
|
+
onSelectionChangeShouldSetResponderCapture,
|
|
34
|
+
onStartShouldSetResponder,
|
|
35
|
+
onStartShouldSetResponderCapture,
|
|
36
|
+
// android
|
|
37
|
+
collapsable,
|
|
38
|
+
focusable,
|
|
39
|
+
// deprecated,
|
|
40
|
+
accessible,
|
|
41
|
+
accessibilityDisabled,
|
|
42
|
+
onLayout,
|
|
43
|
+
hrefAttrs,
|
|
44
|
+
...viewProps
|
|
45
|
+
} = propsIn;
|
|
46
|
+
if (usePlatformMethods(hostRef), useElementLayout(hostRef, onLayout), useResponderEvents(hostRef, {
|
|
47
|
+
onMoveShouldSetResponder,
|
|
48
|
+
onMoveShouldSetResponderCapture,
|
|
49
|
+
onResponderEnd,
|
|
50
|
+
onResponderGrant,
|
|
51
|
+
onResponderMove,
|
|
52
|
+
onResponderReject,
|
|
53
|
+
onResponderRelease,
|
|
54
|
+
onResponderStart,
|
|
55
|
+
onResponderTerminate,
|
|
56
|
+
onResponderTerminationRequest,
|
|
57
|
+
onScrollShouldSetResponder,
|
|
58
|
+
onScrollShouldSetResponderCapture,
|
|
59
|
+
onSelectionChangeShouldSetResponder,
|
|
60
|
+
onSelectionChangeShouldSetResponderCapture,
|
|
61
|
+
onStartShouldSetResponder,
|
|
62
|
+
onStartShouldSetResponderCapture
|
|
63
|
+
}), viewProps.href !== void 0 && hrefAttrs !== void 0) {
|
|
64
|
+
const { download, rel, target } = hrefAttrs;
|
|
65
|
+
download != null && (viewProps.download = download), rel != null && (viewProps.rel = rel), typeof target == "string" && (viewProps.target = target.charAt(0) !== "_" ? `_${target}` : target);
|
|
66
|
+
}
|
|
67
|
+
return viewProps;
|
|
68
|
+
},
|
|
69
|
+
useEvents(viewProps, events, { pseudos }, setStateShallow) {
|
|
70
|
+
{
|
|
71
|
+
!!pseudos?.focusStyle && (viewProps.onFocus = composeEventHandlers(viewProps.onFocus, () => {
|
|
72
|
+
setStateShallow({ focus: !0 });
|
|
73
|
+
}), viewProps.onBlur = composeEventHandlers(viewProps.onBlur, () => {
|
|
74
|
+
setStateShallow({ focus: !1 });
|
|
75
|
+
})), events && viewProps.hitSlop && (events.hitSlop = viewProps.hitSlop);
|
|
76
|
+
const pressability = usePressability(events || null);
|
|
77
|
+
if (events && events.onPress)
|
|
78
|
+
for (const key in pressability) {
|
|
79
|
+
const og = viewProps[key], val = pressability[key];
|
|
80
|
+
viewProps[key] = og && !dontComposePressabilityKeys[key] ? composeEventHandlers(og, val) : val;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
const dontComposePressabilityKeys = {
|
|
86
|
+
onClick: !0
|
|
87
|
+
};
|
|
88
|
+
export {
|
|
89
|
+
Stack,
|
|
90
|
+
Text
|
|
91
|
+
};
|
|
92
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.ts"],
|
|
4
|
+
"mappings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AC,CAAC,SAAS,eAE7B,UAAU,UAAU,qBAAqB,UAAU,SAAS,MAAM;AAChE,wBAAgB,EAAE,OAAO,GAAK,CAAC;AAAA,MACjC,CAAC,GACD,UAAU,SAAS,qBAAqB,UAAU,QAAQ,MAAM;AAC9D,wBAAgB,EAAE,OAAO,GAAM,CAAC;AAAA,MAClC,CAAC,IAKC,UAAU,UAAU,YACtB,OAAO,UAAU,UAAU;AAG7B,YAAM,eAAe,gBAAgB,UAAU,IAAI;AAEnD,UAAI,UACE,OAAO;AACT,mBAAW,OAAO,cAAc;AAC9B,gBAAM,KAAK,UAAU,GAAG,GAClB,MAAM,aAAa,GAAG;AAC5B,oBAAU,GAAG,IACX,MAAM,CAAC,4BAA4B,GAAG,IAClC,qBAAqB,IAAI,GAAG,IAC5B;AAAA,QACR;AAAA,IAGN;AAAA,EACF;AACF,CAAC;AAED,MAAM,8BAA8B;AAAA,EAClC,SAAS;AACX;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const stylesheets = {}, injectStyles = ({ filePath, css }) => {
|
|
2
|
+
let stylesheet = stylesheets[filePath];
|
|
3
|
+
if (!stylesheet) {
|
|
4
|
+
const styleEl = document.createElement("style");
|
|
5
|
+
styleEl.setAttribute("data-file", filePath), styleEl.setAttribute("type", "text/css"), stylesheet = stylesheets[filePath] = styleEl, document.head.appendChild(styleEl);
|
|
6
|
+
}
|
|
7
|
+
stylesheet.innerHTML = css;
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
injectStyles
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=inject-styles.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/inject-styles.ts"],
|
|
4
|
+
"mappings": "AAEA,MAAM,cAA2C,CAAC,GAOrC,eAAe,CAAC,EAAE,UAAU,IAAI,MAA2B;AACtE,MAAI,aAAa,YAAY,QAAQ;AACrC,MAAI,CAAC,YAAY;AACf,UAAM,UAAU,SAAS,cAAc,OAAO;AAC9C,YAAQ,aAAa,aAAa,QAAQ,GAC1C,QAAQ,aAAa,QAAQ,UAAU,GACvC,aAAa,YAAY,QAAQ,IAAI,SACrC,SAAS,KAAK,YAAY,OAAO;AAAA,EACnC;AACA,aAAW,YAAY;AACzB;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=reactNativeTypes.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
const Pressability = require("react-native/Libraries/Pressability/Pressability").default, usePressability = require("react-native/Libraries/Pressability/usePressability").default;
|
|
2
|
+
export {
|
|
3
|
+
Pressability,
|
|
4
|
+
usePressability
|
|
5
|
+
};
|
|
6
|
+
//# sourceMappingURL=Pressability.native.js.map
|
package/dist/native.js
CHANGED
|
@@ -817,9 +817,9 @@ var require_concatClassName_native = __commonJS({
|
|
|
817
817
|
}
|
|
818
818
|
});
|
|
819
819
|
|
|
820
|
-
// ../constants/dist/cjs/
|
|
821
|
-
var
|
|
822
|
-
"../constants/dist/cjs/
|
|
820
|
+
// ../constants/dist/cjs/constants.native.js
|
|
821
|
+
var require_constants_native = __commonJS({
|
|
822
|
+
"../constants/dist/cjs/constants.native.js"(exports, module2) {
|
|
823
823
|
"use strict";
|
|
824
824
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = (target, all) => {
|
|
825
825
|
for (var name in all)
|
|
@@ -829,8 +829,8 @@ var require_index_native2 = __commonJS({
|
|
|
829
829
|
for (let key of __getOwnPropNames2(from))
|
|
830
830
|
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
831
831
|
return to;
|
|
832
|
-
}, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod),
|
|
833
|
-
__export2(
|
|
832
|
+
}, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), constants_native_exports = {};
|
|
833
|
+
__export2(constants_native_exports, {
|
|
834
834
|
currentPlatform: () => currentPlatform,
|
|
835
835
|
isAndroid: () => isAndroid,
|
|
836
836
|
isChrome: () => isChrome,
|
|
@@ -843,11 +843,26 @@ var require_index_native2 = __commonJS({
|
|
|
843
843
|
isWindowDefined: () => isWindowDefined,
|
|
844
844
|
useIsomorphicLayoutEffect: () => useIsomorphicLayoutEffect3
|
|
845
845
|
});
|
|
846
|
-
module2.exports = __toCommonJS2(
|
|
846
|
+
module2.exports = __toCommonJS2(constants_native_exports);
|
|
847
847
|
var import_react = require("react"), isWeb = !1, isWindowDefined = !1, isServer = !1, isClient = !1, useIsomorphicLayoutEffect3 = import_react.useLayoutEffect, isChrome = !1, isWebTouchable = !1, isTouchable = !0, isAndroid = !1, isIos = !1, currentPlatform = "native";
|
|
848
848
|
}
|
|
849
849
|
});
|
|
850
850
|
|
|
851
|
+
// ../constants/dist/cjs/index.native.js
|
|
852
|
+
var require_index_native2 = __commonJS({
|
|
853
|
+
"../constants/dist/cjs/index.native.js"(exports, module2) {
|
|
854
|
+
"use strict";
|
|
855
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = (to, from, except, desc) => {
|
|
856
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
857
|
+
for (let key of __getOwnPropNames2(from))
|
|
858
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
859
|
+
return to;
|
|
860
|
+
}, __reExport2 = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default")), __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), src_exports2 = {};
|
|
861
|
+
module2.exports = __toCommonJS2(src_exports2);
|
|
862
|
+
__reExport2(src_exports2, require_constants_native(), module2.exports);
|
|
863
|
+
}
|
|
864
|
+
});
|
|
865
|
+
|
|
851
866
|
// ../helpers/dist/cjs/validStyleProps.native.js
|
|
852
867
|
var require_validStyleProps_native = __commonJS({
|
|
853
868
|
"../helpers/dist/cjs/validStyleProps.native.js"(exports, module2) {
|
|
@@ -2050,7 +2065,7 @@ var require_index_native6 = __commonJS({
|
|
|
2050
2065
|
});
|
|
2051
2066
|
|
|
2052
2067
|
// ../web/dist/cjs/constants/constants.native.js
|
|
2053
|
-
var
|
|
2068
|
+
var require_constants_native2 = __commonJS({
|
|
2054
2069
|
"../web/dist/cjs/constants/constants.native.js"(exports, module2) {
|
|
2055
2070
|
"use strict";
|
|
2056
2071
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = (target, all) => {
|
|
@@ -3215,7 +3230,7 @@ var require_propMapper_native = __commonJS({
|
|
|
3215
3230
|
return variantValue;
|
|
3216
3231
|
}
|
|
3217
3232
|
let shouldReturn = !1;
|
|
3218
|
-
if (styleProps.disableExpandShorthands || key in conf.shorthands && (shouldReturn = !0, key = conf.shorthands[key]), value && (value[0] === "$" ? value = getTokenForKey(key, value, styleProps.resolveValues, styleState) : (0, import_createVariable.isVariable)(value) && (value = resolveVariableValue(value, styleProps.resolveValues))), shouldReturn || value != null)
|
|
3233
|
+
if (styleProps.disableExpandShorthands || key in conf.shorthands && (shouldReturn = !0, key = conf.shorthands[key]), value && (value[0] === "$" ? value = getTokenForKey(key, value, styleProps.resolveValues, styleState) : (0, import_createVariable.isVariable)(value) && (value = resolveVariableValue(key, value, styleProps.resolveValues))), shouldReturn || value != null)
|
|
3219
3234
|
return (styleProps.noExpand ? null : (0, import_expandStyle.expandStyle)(key, value)) || [[key, value]];
|
|
3220
3235
|
}, resolveVariants = (key, value, styleProps, styleState, parentVariantKey) => {
|
|
3221
3236
|
let { staticConfig, conf, debug } = styleState, { variants } = staticConfig;
|
|
@@ -3274,16 +3289,16 @@ var require_propMapper_native = __commonJS({
|
|
|
3274
3289
|
var _a;
|
|
3275
3290
|
let { conf, staticConfig, debug, theme } = styleState, { variants } = staticConfig, res = {};
|
|
3276
3291
|
process.env.NODE_ENV === "development" && debug === "verbose" && console.log(" - resolveTokensAndVariants", key, value);
|
|
3277
|
-
for (let
|
|
3278
|
-
let
|
|
3292
|
+
for (let _key in value) {
|
|
3293
|
+
let subKey = conf.shorthands[_key] || _key, val = value[_key];
|
|
3279
3294
|
if (styleProps.noExpand)
|
|
3280
|
-
res[
|
|
3281
|
-
else if (variants &&
|
|
3282
|
-
if (styleState.curProps[
|
|
3283
|
-
res[
|
|
3284
|
-
val[0] === "$" ? getTokenForKey(
|
|
3295
|
+
res[subKey] = val;
|
|
3296
|
+
else if (variants && subKey in variants) {
|
|
3297
|
+
if (styleState.curProps[subKey] = val, parentVariantKey && parentVariantKey === key)
|
|
3298
|
+
res[subKey] = // SYNC WITH *1
|
|
3299
|
+
val[0] === "$" ? getTokenForKey(subKey, val, styleProps.resolveValues, styleState) : val;
|
|
3285
3300
|
else {
|
|
3286
|
-
let variantOut = resolveVariants(
|
|
3301
|
+
let variantOut = resolveVariants(subKey, val, styleProps, styleState, key);
|
|
3287
3302
|
if (variantOut)
|
|
3288
3303
|
for (let [key2, val2] of variantOut)
|
|
3289
3304
|
val2 != null && (key2 in import_pseudoDescriptors.pseudoDescriptors ? (res[key2] ??= {}, Object.assign(res[key2], val2)) : res[key2] = val2);
|
|
@@ -3291,23 +3306,28 @@ var require_propMapper_native = __commonJS({
|
|
|
3291
3306
|
continue;
|
|
3292
3307
|
}
|
|
3293
3308
|
if ((0, import_createVariable.isVariable)(val)) {
|
|
3294
|
-
res[
|
|
3309
|
+
res[subKey] = resolveVariableValue(subKey, val, styleProps.resolveValues);
|
|
3295
3310
|
continue;
|
|
3296
3311
|
}
|
|
3297
3312
|
if (typeof val == "string") {
|
|
3298
3313
|
let fVal = (
|
|
3299
3314
|
// SYNC WITH *1
|
|
3300
|
-
val[0] === "$" ? getTokenForKey(
|
|
3315
|
+
val[0] === "$" ? getTokenForKey(subKey, val, styleProps.resolveValues, styleState) : val
|
|
3301
3316
|
);
|
|
3302
|
-
res[
|
|
3317
|
+
res[subKey] = fVal;
|
|
3303
3318
|
continue;
|
|
3304
3319
|
}
|
|
3305
3320
|
if ((0, import_isObj.isObj)(val)) {
|
|
3306
|
-
let subObject = resolveTokensAndVariants(
|
|
3307
|
-
process.env.NODE_ENV === "development" && debug === "verbose" && console.log("object",
|
|
3321
|
+
let subObject = resolveTokensAndVariants(subKey, val, styleProps, styleState, key);
|
|
3322
|
+
process.env.NODE_ENV === "development" && debug === "verbose" && console.log("object", subKey, subObject), res[subKey] ??= {}, Object.assign(res[subKey], subObject);
|
|
3308
3323
|
} else
|
|
3309
|
-
res[
|
|
3310
|
-
process.env.NODE_ENV === "development" && debug && ((_a = res[
|
|
3324
|
+
res[subKey] = val;
|
|
3325
|
+
process.env.NODE_ENV === "development" && debug && ((_a = res[subKey]) == null ? void 0 : _a[0]) === "$" && console.warn(
|
|
3326
|
+
`\u26A0\uFE0F Missing token in theme ${theme.name}:`,
|
|
3327
|
+
subKey,
|
|
3328
|
+
res[subKey],
|
|
3329
|
+
theme
|
|
3330
|
+
);
|
|
3311
3331
|
}
|
|
3312
3332
|
return res;
|
|
3313
3333
|
}, tokenCats = ["size", "color", "radius", "space", "zIndex"].map((name) => ({
|
|
@@ -3372,19 +3392,19 @@ var require_propMapper_native = __commonJS({
|
|
|
3372
3392
|
}
|
|
3373
3393
|
}
|
|
3374
3394
|
if (hasSet) {
|
|
3375
|
-
let out = resolveVariableValue(valOrVar, resolveAs);
|
|
3395
|
+
let out = resolveVariableValue(key, valOrVar, resolveAs);
|
|
3376
3396
|
return process.env.NODE_ENV === "development" && styleState.debug === "verbose" && console.log("resolved", resolveAs, valOrVar.get, out), out;
|
|
3377
3397
|
}
|
|
3378
3398
|
return process.env.NODE_ENV === "development" && import_isDevTools.isDevTools && styleState.debug === "verbose" && (console.groupCollapsed(" \uFE52 propMap (val)", key, value), console.log({ valOrVar, theme, hasSet }, theme ? theme[key] : ""), console.groupEnd()), value;
|
|
3379
3399
|
};
|
|
3380
|
-
function resolveVariableValue(valOrVar, resolveValues) {
|
|
3400
|
+
function resolveVariableValue(key, valOrVar, resolveValues) {
|
|
3381
3401
|
if (resolveValues === "none")
|
|
3382
3402
|
return valOrVar;
|
|
3383
3403
|
if ((0, import_createVariable.isVariable)(valOrVar)) {
|
|
3384
3404
|
if (resolveValues === "value")
|
|
3385
3405
|
return valOrVar.val;
|
|
3386
3406
|
let get = valOrVar.get;
|
|
3387
|
-
return typeof get == "function" ? get() : valOrVar.val;
|
|
3407
|
+
return key !== "shadowColor" && typeof get == "function" ? get(resolveValues === "web" ? "web" : void 0) : valOrVar.val;
|
|
3388
3408
|
}
|
|
3389
3409
|
return valOrVar;
|
|
3390
3410
|
}
|
|
@@ -3998,7 +4018,7 @@ var require_ThemeManager_native = __commonJS({
|
|
|
3998
4018
|
getNonComponentParentManager: () => getNonComponentParentManager
|
|
3999
4019
|
});
|
|
4000
4020
|
module2.exports = __toCommonJS2(ThemeManager_exports);
|
|
4001
|
-
var import_constants2 = require_index_native2(), import_config = require_config_native(), import_constants22 =
|
|
4021
|
+
var import_constants2 = require_index_native2(), import_config = require_config_native(), import_constants22 = require_constants_native2(), emptyState = { name: "" };
|
|
4002
4022
|
function getHasThemeUpdatingProps(props) {
|
|
4003
4023
|
return props.name || props.componentName || props.inverse || props.reset;
|
|
4004
4024
|
}
|
|
@@ -4250,9 +4270,9 @@ If this is intended and you are using Tamagui without any themes, you can disabl
|
|
|
4250
4270
|
if (subkey === "val")
|
|
4251
4271
|
track(keyString);
|
|
4252
4272
|
else if (subkey === "get")
|
|
4253
|
-
return () => {
|
|
4273
|
+
return (platform) => {
|
|
4254
4274
|
let outVal = (0, import_createVariable.getVariable)(val);
|
|
4255
|
-
if (import_constants2.isIos && !deopt && config.settings.fastSchemeChange) {
|
|
4275
|
+
if (platform !== "web" && import_constants2.isIos && !deopt && config.settings.fastSchemeChange) {
|
|
4256
4276
|
let isDark = name.startsWith("dark"), isLight = !isDark && name.startsWith("light");
|
|
4257
4277
|
if (isDark || isLight) {
|
|
4258
4278
|
let oppositeThemeName = name.replace(
|
|
@@ -4306,15 +4326,15 @@ If this is intended and you are using Tamagui without any themes, you can disabl
|
|
|
4306
4326
|
let selfListenerDispose = themeManager.onChangeTheme((_a, _b, forced) => {
|
|
4307
4327
|
forced && setThemeState((prev) => createState(prev, !0));
|
|
4308
4328
|
}), disposeChangeListener = parentManager == null ? void 0 : parentManager.onChangeTheme((name, manager) => {
|
|
4309
|
-
let force = (shouldUpdate == null ? void 0 : shouldUpdate()) || props.deopt || props["disable-child-theme"],
|
|
4329
|
+
let force = (shouldUpdate == null ? void 0 : shouldUpdate()) || props.deopt || props["disable-child-theme"], shouldTryUpdate = force ?? !!(keys != null && keys.length || isNewTheme);
|
|
4310
4330
|
process.env.NODE_ENV === "development" && props.debug && console.log(" \u{1F538} onChange", themeManager.id, {
|
|
4311
4331
|
force,
|
|
4312
|
-
|
|
4332
|
+
shouldTryUpdate,
|
|
4313
4333
|
props,
|
|
4314
4334
|
name,
|
|
4315
4335
|
manager,
|
|
4316
4336
|
keys
|
|
4317
|
-
}),
|
|
4337
|
+
}), shouldTryUpdate && setThemeState(createState);
|
|
4318
4338
|
}, themeManager.id);
|
|
4319
4339
|
return () => {
|
|
4320
4340
|
selfListenerDispose(), disposeChangeListener == null || disposeChangeListener(), activeThemeManagers.delete(themeManager);
|
|
@@ -4667,7 +4687,7 @@ var require_createComponent_native = __commonJS({
|
|
|
4667
4687
|
spacedChildren: () => spacedChildren
|
|
4668
4688
|
});
|
|
4669
4689
|
module2.exports = __toCommonJS2(createComponent_exports);
|
|
4670
|
-
var import_compose_refs = require_index_native5(), import_constants2 = require_index_native2(), import_helpers = require_index_native4(), import_use_did_finish_ssr = require_index_native6(), import_react = __toESM2(require("react")), import_config = require_config_native(), import_constants22 =
|
|
4690
|
+
var import_compose_refs = require_index_native5(), import_constants2 = require_index_native2(), import_helpers = require_index_native4(), import_use_did_finish_ssr = require_index_native6(), import_react = __toESM2(require("react")), import_config = require_config_native(), import_constants22 = require_constants_native2(), import_ComponentContext = require_ComponentContext_native(), import_createVariable = require_createVariable_native(), import_defaultComponentState = require_defaultComponentState_native(), import_createShallowSetState = require_createShallowSetState_native(), import_getSplitStyles = require_getSplitStyles_native(), import_mergeProps = require_mergeProps_native(), import_proxyThemeVariables = require_proxyThemeVariables_native(), import_themeable = require_themeable_native(), import_useMedia = require_useMedia_native(), import_useTheme = require_useTheme_native(), import_setupHooks = require_setupHooks_native(), import_Slot = require_Slot_native(), import_Theme = require_Theme_native(), import_ThemeDebug = require_ThemeDebug_native(), import_jsx_runtime = require("react/jsx-runtime"), tamaguiConfig, AnimatedText, AnimatedView, initialTheme, time, debugKeyListeners, startVisualizer, mouseUps = /* @__PURE__ */ new Set();
|
|
4671
4691
|
if (typeof document < "u") {
|
|
4672
4692
|
let cancelTouches = () => {
|
|
4673
4693
|
mouseUps.forEach((x) => x()), mouseUps.clear();
|
|
@@ -5056,7 +5076,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
5056
5076
|
isZStack,
|
|
5057
5077
|
debug: debugProp
|
|
5058
5078
|
});
|
|
5059
|
-
asChild && (elementType = import_Slot.Slot), process.env.NODE_ENV === "development" && time && time`spaced-as-child`, // in test mode disable perf unwrapping so react-testing-library finds Text properly
|
|
5079
|
+
asChild && (elementType = import_Slot.Slot, Object.assign(viewProps, { onPress, onLongPress })), process.env.NODE_ENV === "development" && time && time`spaced-as-child`, // in test mode disable perf unwrapping so react-testing-library finds Text properly
|
|
5060
5080
|
process.env.NODE_ENV !== "test" && (elementType === BaseText || elementType === BaseView) ? process.env.TAMAGUI_OPTIMIZE_NATIVE_VIEWS ? (viewProps.children = content, content = (0, import_react.createElement)(
|
|
5061
5081
|
elementType === BaseText ? "RCTText" : "RCTView",
|
|
5062
5082
|
viewProps
|
|
@@ -6240,7 +6260,7 @@ var require_Stack_native = __commonJS({
|
|
|
6240
6260
|
Stack: () => Stack2
|
|
6241
6261
|
});
|
|
6242
6262
|
module2.exports = __toCommonJS2(Stack_exports);
|
|
6243
|
-
var import_helpers = require_index_native4(), import_constants2 =
|
|
6263
|
+
var import_helpers = require_index_native4(), import_constants2 = require_constants_native2(), import_createComponent = require_createComponent_native(), Stack2 = (0, import_createComponent.createComponent)({
|
|
6244
6264
|
acceptsClassName: !0,
|
|
6245
6265
|
defaultProps: import_constants2.stackDefaultStyles,
|
|
6246
6266
|
validStyles: import_helpers.validStyles
|
|
@@ -6398,7 +6418,7 @@ var require_ThemeProvider_native = __commonJS({
|
|
|
6398
6418
|
ThemeProvider: () => ThemeProvider
|
|
6399
6419
|
});
|
|
6400
6420
|
module2.exports = __toCommonJS2(ThemeProvider_exports);
|
|
6401
|
-
var import_constants2 = require_index_native2(), import_react = require("react"), import_constants22 =
|
|
6421
|
+
var import_constants2 = require_index_native2(), import_react = require("react"), import_constants22 = require_constants_native2(), import_Theme = require_Theme_native(), import_jsx_runtime = require("react/jsx-runtime"), ThemeProvider = (props) => (import_constants2.isClient && (0, import_react.useLayoutEffect)(() => {
|
|
6402
6422
|
if (props.disableRootThemeClass)
|
|
6403
6423
|
return;
|
|
6404
6424
|
let cn = `${import_constants22.THEME_CLASSNAME_PREFIX}${props.defaultTheme}`, target = props.themeClassNameOnRoot ? document.documentElement : document.body;
|
|
@@ -6635,7 +6655,7 @@ var require_index_native9 = __commonJS({
|
|
|
6635
6655
|
__reExport2(src_exports2, require_types_native3(), module2.exports);
|
|
6636
6656
|
__reExport2(src_exports2, require_GetRef_native(), module2.exports);
|
|
6637
6657
|
var import_config = require_config_native();
|
|
6638
|
-
__reExport2(src_exports2,
|
|
6658
|
+
__reExport2(src_exports2, require_constants_native2(), module2.exports);
|
|
6639
6659
|
__reExport2(src_exports2, require_ComponentContext_native(), module2.exports);
|
|
6640
6660
|
__reExport2(src_exports2, require_createStyledContext_native(), module2.exports);
|
|
6641
6661
|
__reExport2(src_exports2, require_expandStyles_native(), module2.exports);
|