tamagui 1.85.12 → 1.86.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/native.js +40 -40
- package/dist/native.js.map +1 -1
- package/dist/test.native.js +19 -16
- package/dist/test.native.js.map +1 -1
- package/package.json +52 -52
package/dist/native.js
CHANGED
|
@@ -2287,6 +2287,7 @@ var require_compose_refs_native = __commonJS({
|
|
|
2287
2287
|
)), __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), compose_refs_exports = {};
|
|
2288
2288
|
__export2(compose_refs_exports, {
|
|
2289
2289
|
composeRefs: () => composeRefs,
|
|
2290
|
+
setRef: () => setRef,
|
|
2290
2291
|
useComposedRefs: () => useComposedRefs
|
|
2291
2292
|
});
|
|
2292
2293
|
module2.exports = __toCommonJS2(compose_refs_exports);
|
|
@@ -4642,7 +4643,7 @@ var require_createComponent_native = __commonJS({
|
|
|
4642
4643
|
defaultPropsKeyOrder: defaultProps ? Object.keys(defaultProps) : []
|
|
4643
4644
|
});
|
|
4644
4645
|
let component = (0, import_react2.forwardRef)((propsIn, forwardedRef) => {
|
|
4645
|
-
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m
|
|
4646
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
4646
4647
|
let internalID = process.env.NODE_ENV === "development" ? (0, import_react2.useId)() : "";
|
|
4647
4648
|
if (process.env.NODE_ENV === "development" && startVisualizer && (startVisualizer(), startVisualizer = void 0), !hasSetupBaseViews) {
|
|
4648
4649
|
hasSetupBaseViews = !0;
|
|
@@ -4667,7 +4668,7 @@ var require_createComponent_native = __commonJS({
|
|
|
4667
4668
|
let debugProp = props.debug, componentName2 = props.componentName || staticConfig.componentName;
|
|
4668
4669
|
process.env.NODE_ENV === "development" && import_constants4.isClient && (0, import_react2.useEffect)(() => {
|
|
4669
4670
|
let overlay = null, debugVisualizerHandler = (show = !1) => {
|
|
4670
|
-
let node =
|
|
4671
|
+
let node = curState.host;
|
|
4671
4672
|
if (node)
|
|
4672
4673
|
if (show) {
|
|
4673
4674
|
overlay = document.createElement("span"), overlay.style.inset = "0px", overlay.style.zIndex = "1000000", overlay.style.position = "absolute", overlay.style.borderColor = "red", overlay.style.borderWidth = "1px", overlay.style.borderStyle = "dotted";
|
|
@@ -4680,11 +4681,9 @@ var require_createComponent_native = __commonJS({
|
|
|
4680
4681
|
debugKeyListeners == null || debugKeyListeners.delete(debugVisualizerHandler);
|
|
4681
4682
|
};
|
|
4682
4683
|
}, [componentName2]), process.env.NODE_ENV === "development" && time && time`start (ignore)`, process.env.NODE_ENV === "development" && time && time`did-finish-ssr`;
|
|
4683
|
-
let stateRef = (0, import_react2.useRef)(
|
|
4684
|
-
{}
|
|
4685
|
-
);
|
|
4684
|
+
let stateRef = (0, import_react2.useRef)({});
|
|
4686
4685
|
process.env.NODE_ENV === "development" && time && time`stateref`;
|
|
4687
|
-
let
|
|
4686
|
+
let animationsConfig = componentContext.animationDriver, useAnimations = animationsConfig == null ? void 0 : animationsConfig.useAnimations, hasAnimationProp = !!("animation" in props || props.style && hasAnimatedStyleValue(props.style)), supportsCSSVars = animationsConfig == null ? void 0 : animationsConfig.supportsCSSVars, curState = stateRef.current, willBeAnimatedClient = !!(hasAnimationProp && !isHOC && useAnimations || curState.hasAnimated), willBeAnimated = !import_constants4.isServer && willBeAnimatedClient;
|
|
4688
4687
|
willBeAnimated && !curState.hasAnimated && (curState.hasAnimated = !0);
|
|
4689
4688
|
let isHydrated = config != null && config.disableSSR ? !0 : (0, import_use_did_finish_ssr.useDidFinishSSR)(), presence = willBeAnimated && ((_c = animationsConfig == null ? void 0 : animationsConfig.usePresence) == null ? void 0 : _c.call(animationsConfig)) || null, presenceState = presence == null ? void 0 : presence[2], enterExitVariant = presenceState == null ? void 0 : presenceState.enterExitVariant, enterVariant = enterExitVariant ?? (presenceState == null ? void 0 : presenceState.enterVariant), hasEnterStyle = !!props.enterStyle, hasRNAnimation = hasAnimationProp && (animationsConfig == null ? void 0 : animationsConfig.isReactNative), isReactNative = staticConfig.isReactNative, isAnimated = willBeAnimated;
|
|
4690
4689
|
!isReactNative && hasRNAnimation && !isHOC && !isHydrated && (isAnimated = !1, curState.willHydrate = !0), process.env.NODE_ENV === "development" && time && time`pre-use-state`;
|
|
@@ -4801,8 +4800,8 @@ var require_createComponent_native = __commonJS({
|
|
|
4801
4800
|
styleProps,
|
|
4802
4801
|
theme: (_f = themeState.state) == null ? void 0 : _f.theme,
|
|
4803
4802
|
pseudos: pseudos || null,
|
|
4804
|
-
|
|
4805
|
-
|
|
4803
|
+
staticConfig,
|
|
4804
|
+
stateRef
|
|
4806
4805
|
});
|
|
4807
4806
|
(isAnimated || supportsCSSVars) && animations && (animationStyles = animations.style), process.env.NODE_ENV === "development" && time && time`animations`;
|
|
4808
4807
|
}
|
|
@@ -4852,11 +4851,12 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
4852
4851
|
_h,
|
|
4853
4852
|
elementType,
|
|
4854
4853
|
nonTamaguiProps,
|
|
4855
|
-
|
|
4854
|
+
stateRef,
|
|
4856
4855
|
curState.willHydrate
|
|
4857
|
-
)) ?? nonTamaguiProps
|
|
4858
|
-
|
|
4859
|
-
|
|
4856
|
+
)) ?? nonTamaguiProps, curState.composedRef || (curState.composedRef = (0, import_compose_refs.composeRefs)(
|
|
4857
|
+
(x) => stateRef.current.host = x,
|
|
4858
|
+
forwardedRef
|
|
4859
|
+
)), viewProps.ref = curState.composedRef, process.env.NODE_ENV === "development" && !isReactNative && !isText && import_constants4.isWeb && !isHOC && import_react2.Children.toArray(props.children).forEach((item) => {
|
|
4860
4860
|
typeof item == "string" && item !== `
|
|
4861
4861
|
` && console.error(
|
|
4862
4862
|
`Unexpected text node: ${item}. A text node cannot be a child of a <View>.`
|
|
@@ -5016,35 +5016,32 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
5016
5016
|
console.groupCollapsed(`render <${typeof elementType == "string" ? elementType : "Component"} /> (${internalID}) with props`);
|
|
5017
5017
|
try {
|
|
5018
5018
|
(0, import_log.log)("viewProps", viewProps), (0, import_log.log)("children", content), typeof window < "u" && ((0, import_log.log)("props in", propsIn, "mapped to", props, "in order", Object.keys(props)), (0, import_log.log)({
|
|
5019
|
-
shouldListenForMedia,
|
|
5020
|
-
mediaListeningKeys,
|
|
5021
|
-
isMediaArray,
|
|
5022
|
-
viewProps,
|
|
5023
|
-
hostRef,
|
|
5024
|
-
state,
|
|
5025
|
-
styleProps,
|
|
5026
|
-
themeState,
|
|
5027
|
-
isAnimated,
|
|
5028
|
-
defaultProps,
|
|
5029
|
-
splitStyles,
|
|
5030
5019
|
animationStyles,
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5020
|
+
classNames,
|
|
5021
|
+
content,
|
|
5022
|
+
defaultProps,
|
|
5023
|
+
elementType,
|
|
5035
5024
|
events,
|
|
5036
|
-
|
|
5025
|
+
initialState,
|
|
5026
|
+
isAnimated,
|
|
5027
|
+
isMediaArray,
|
|
5028
|
+
isStringElement,
|
|
5029
|
+
mediaListeningKeys,
|
|
5037
5030
|
pseudos,
|
|
5038
|
-
|
|
5031
|
+
shouldAttach,
|
|
5039
5032
|
shouldAvoidClasses,
|
|
5040
|
-
|
|
5033
|
+
shouldForcePseudo,
|
|
5034
|
+
shouldListenForMedia,
|
|
5035
|
+
splitStyles,
|
|
5041
5036
|
splitStylesStyle,
|
|
5037
|
+
state,
|
|
5038
|
+
stateRef,
|
|
5042
5039
|
staticConfig,
|
|
5040
|
+
styleProps,
|
|
5043
5041
|
tamaguiConfig,
|
|
5044
|
-
|
|
5045
|
-
|
|
5046
|
-
|
|
5047
|
-
classNames
|
|
5042
|
+
themeState,
|
|
5043
|
+
viewProps,
|
|
5044
|
+
willBeAnimated
|
|
5048
5045
|
}));
|
|
5049
5046
|
} catch {
|
|
5050
5047
|
}
|
|
@@ -7731,7 +7728,7 @@ var require_usePlatformMethods_native = __commonJS({
|
|
|
7731
7728
|
function usePlatformMethods(hostRef) {
|
|
7732
7729
|
(0, import_constants4.useIsomorphicLayoutEffect)(() => {
|
|
7733
7730
|
let node = hostRef.current;
|
|
7734
|
-
|
|
7731
|
+
node && (node.measure ||= (callback) => (0, import_useElementLayout.measureLayout)(node, null, callback), node.measureLayout ||= (relativeToNode, success) => (0, import_useElementLayout.measureLayout)(node, relativeToNode, success), node.measureInWindow ||= (callback) => {
|
|
7735
7732
|
node && setTimeout(() => {
|
|
7736
7733
|
let { height, left, top, width } = (0, import_getRect.getRect)(node);
|
|
7737
7734
|
callback(left, top, width, height);
|
|
@@ -7853,7 +7850,7 @@ var require_index_native15 = __commonJS({
|
|
|
7853
7850
|
var baseViews = (0, import_getBaseViews.getBaseViews)();
|
|
7854
7851
|
(0, import_web.setupHooks)({
|
|
7855
7852
|
getBaseViews: import_getBaseViews.getBaseViews,
|
|
7856
|
-
usePropsTransform(elementType, propsIn,
|
|
7853
|
+
usePropsTransform(elementType, propsIn, stateRef, willHydrate) {
|
|
7857
7854
|
},
|
|
7858
7855
|
useEvents(viewProps, events, { pseudos }, setStateShallow, staticConfig) {
|
|
7859
7856
|
if (events && (events.onFocus && (viewProps.onFocus = events.onFocus), events.onBlur && (viewProps.onBlur = events.onBlur)), staticConfig.isInput) {
|
|
@@ -10601,12 +10598,15 @@ var require_createSheet_native = __commonJS({
|
|
|
10601
10598
|
}
|
|
10602
10599
|
)
|
|
10603
10600
|
), Sheet = (0, import_react2.forwardRef)(function(props, ref) {
|
|
10604
|
-
let hydrated = (0, import_use_did_finish_ssr.useDidFinishSSR)(), { isShowingNonSheet } = (0, import_useSheetController.useSheetController)(), SheetImplementation = import_SheetImplementationCustom.SheetImplementationCustom;
|
|
10601
|
+
let hydrated = (0, import_use_did_finish_ssr.useDidFinishSSR)(), { isShowingNonSheet } = (0, import_useSheetController.useSheetController)(), SheetImplementation = import_SheetImplementationCustom.SheetImplementationCustom, modal = props.modal;
|
|
10605
10602
|
if (props.native && import_react_native4.Platform.OS === "ios") {
|
|
10606
|
-
|
|
10607
|
-
|
|
10603
|
+
modal = !1;
|
|
10604
|
+
{
|
|
10605
|
+
let impl = (0, import_nativeSheet.getNativeSheet)("ios");
|
|
10606
|
+
impl && (SheetImplementation = impl);
|
|
10607
|
+
}
|
|
10608
10608
|
}
|
|
10609
|
-
return isShowingNonSheet || !hydrated ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SheetImplementation, { ref, ...props });
|
|
10609
|
+
return isShowingNonSheet || !hydrated ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SheetImplementation, { ref, ...props, modal });
|
|
10610
10610
|
}), components = {
|
|
10611
10611
|
Frame: SheetFrame,
|
|
10612
10612
|
Overlay: SheetOverlay,
|