tamagui 1.90.2 → 1.90.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/native.js +47 -52
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +47 -52
- package/dist/test.native.js.map +2 -2
- package/package.json +54 -54
package/dist/test.native.js
CHANGED
|
@@ -327,7 +327,7 @@ var require_usePresence_native = __commonJS({
|
|
|
327
327
|
null,
|
|
328
328
|
context
|
|
329
329
|
];
|
|
330
|
-
var isPresent2 = context.isPresent, onExitComplete = context.onExitComplete, register = context.register
|
|
330
|
+
var id = context.id, isPresent2 = context.isPresent, onExitComplete = context.onExitComplete, register = context.register;
|
|
331
331
|
(0, import_react2.useEffect)(function() {
|
|
332
332
|
return register(id);
|
|
333
333
|
}, []);
|
|
@@ -453,7 +453,7 @@ var require_PresenceChild_native = __commonJS({
|
|
|
453
453
|
}
|
|
454
454
|
});
|
|
455
455
|
module2.exports = __toCommonJS2(PresenceChild_exports);
|
|
456
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_use_constant = require_index_native2(), import_use_presence = require_index_native3(), React2 = __toESM2(require("react")), import_react2 = require("react"), PresenceChild = function(param) {
|
|
456
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_use_constant = require_index_native2(), import_use_presence = require_index_native3(), React2 = __toESM2(require("react")), import_react2 = require("react"), PresenceChild = /* @__PURE__ */ React2.memo(function(param) {
|
|
457
457
|
var children = param.children, initial = param.initial, isPresent = param.isPresent, onExitComplete = param.onExitComplete, exitVariant = param.exitVariant, enterVariant = param.enterVariant, enterExitVariant = param.enterExitVariant, presenceAffectsLayout = param.presenceAffectsLayout, custom = param.custom, presenceChildren = (0, import_use_constant.useConstant)(newChildrenMap), id = (0, import_react2.useId)() || "", context = React2.useMemo(
|
|
458
458
|
function() {
|
|
459
459
|
return {
|
|
@@ -464,8 +464,8 @@ var require_PresenceChild_native = __commonJS({
|
|
|
464
464
|
exitVariant,
|
|
465
465
|
enterVariant,
|
|
466
466
|
enterExitVariant,
|
|
467
|
-
onExitComplete: function(
|
|
468
|
-
presenceChildren.set(
|
|
467
|
+
onExitComplete: function() {
|
|
468
|
+
presenceChildren.set(id, !0);
|
|
469
469
|
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
470
470
|
try {
|
|
471
471
|
for (var _iterator = presenceChildren.values()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
@@ -485,9 +485,9 @@ var require_PresenceChild_native = __commonJS({
|
|
|
485
485
|
}
|
|
486
486
|
onExitComplete == null || onExitComplete();
|
|
487
487
|
},
|
|
488
|
-
register: function(
|
|
489
|
-
return presenceChildren.set(
|
|
490
|
-
return presenceChildren.delete(
|
|
488
|
+
register: function() {
|
|
489
|
+
return presenceChildren.set(id, !1), function() {
|
|
490
|
+
return presenceChildren.delete(id);
|
|
491
491
|
};
|
|
492
492
|
}
|
|
493
493
|
};
|
|
@@ -518,7 +518,7 @@ var require_PresenceChild_native = __commonJS({
|
|
|
518
518
|
value: context,
|
|
519
519
|
children
|
|
520
520
|
});
|
|
521
|
-
};
|
|
521
|
+
});
|
|
522
522
|
function newChildrenMap() {
|
|
523
523
|
return /* @__PURE__ */ new Map();
|
|
524
524
|
}
|
|
@@ -7599,8 +7599,6 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7599
7599
|
mergeTransform(styleState.style, key6, val4, !0);
|
|
7600
7600
|
});
|
|
7601
7601
|
}
|
|
7602
|
-
if (0)
|
|
7603
|
-
var _styleState_style;
|
|
7604
7602
|
if (parentSplitStyles) {
|
|
7605
7603
|
if (0)
|
|
7606
7604
|
for (var key2 in parentSplitStyles.classNames)
|
|
@@ -7612,6 +7610,8 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7612
7610
|
}
|
|
7613
7611
|
}
|
|
7614
7612
|
}
|
|
7613
|
+
if (0)
|
|
7614
|
+
var _styleState_style, shouldStringifyTransforms;
|
|
7615
7615
|
if (0) {
|
|
7616
7616
|
if (styleState.style && shouldDoClasses) {
|
|
7617
7617
|
var retainedStyles, shouldRetain;
|
|
@@ -8702,7 +8702,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8702
8702
|
groupContextState[groupName] = next;
|
|
8703
8703
|
};
|
|
8704
8704
|
}
|
|
8705
|
-
var hasTextAncestor = !!(import_constants4.isWeb && isText && componentContext.inText), _props_disabled, isDisabled = (_props_disabled = props.disabled) !== null && _props_disabled !== void 0 ? _props_disabled : (_props_accessibilityState = props.accessibilityState) === null || _props_accessibilityState === void 0 ? void 0 : _props_accessibilityState.disabled, isTaggable = !Component || typeof Component == "string", element = import_constants4.isWeb && isTaggable &&
|
|
8705
|
+
var hasTextAncestor = !!(import_constants4.isWeb && isText && componentContext.inText), _props_disabled, isDisabled = (_props_disabled = props.disabled) !== null && _props_disabled !== void 0 ? _props_disabled : (_props_accessibilityState = props.accessibilityState) === null || _props_accessibilityState === void 0 ? void 0 : _props_accessibilityState.disabled, isTaggable = !Component || typeof Component == "string", tagProp = props.tag, element = import_constants4.isWeb && isTaggable && tagProp || Component, BaseTextComponent = BaseText || element || "span", BaseViewComponent = BaseView || element || (hasTextAncestor ? "span" : "div"), elementType = isText ? BaseTextComponent : BaseViewComponent;
|
|
8706
8706
|
animationsConfig && isAnimated && (elementType = animationsConfig[isText ? "Text" : "View"] || elementType);
|
|
8707
8707
|
var disableThemeProp = !1, disableTheme = disableThemeProp || isHOC;
|
|
8708
8708
|
props.themeShallow && (curState.themeShallow = !0);
|
|
@@ -8769,7 +8769,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8769
8769
|
"theme",
|
|
8770
8770
|
"defaultVariants"
|
|
8771
8771
|
]), viewProps = nonTamaguiProps;
|
|
8772
|
-
isHOC && _themeProp && (viewProps.theme = _themeProp);
|
|
8772
|
+
isHOC && _themeProp && (viewProps.theme = _themeProp), elementType.acceptTagProp && (viewProps.tag = tagProp);
|
|
8773
8773
|
var animationStyles;
|
|
8774
8774
|
if (
|
|
8775
8775
|
// if it supports css vars we run it on server too to get matching initial style
|
|
@@ -8797,9 +8797,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8797
8797
|
}), !stateRef.current.hasMeasured && props.untilMeasured === "hide" && setState(function(prev) {
|
|
8798
8798
|
return _object_spread9({}, prev);
|
|
8799
8799
|
}), stateRef.current.hasMeasured = !0;
|
|
8800
|
-
}))
|
|
8801
|
-
var _hooks_usePropsTransform1;
|
|
8802
|
-
viewProps = (_hooks_usePropsTransform1 = (_hooks_usePropsTransform = import_setupHooks.hooks.usePropsTransform) === null || _hooks_usePropsTransform === void 0 ? void 0 : _hooks_usePropsTransform.call(import_setupHooks.hooks, elementType, nonTamaguiProps, stateRef, curState.willHydrate)) !== null && _hooks_usePropsTransform1 !== void 0 ? _hooks_usePropsTransform1 : nonTamaguiProps, curState.composedRef || (curState.composedRef = (0, import_compose_refs.composeRefs)(function(x) {
|
|
8800
|
+
})), viewProps = ((_hooks_usePropsTransform = import_setupHooks.hooks.usePropsTransform) === null || _hooks_usePropsTransform === void 0 ? void 0 : _hooks_usePropsTransform.call(import_setupHooks.hooks, elementType, nonTamaguiProps, stateRef, curState.willHydrate)) || nonTamaguiProps, curState.composedRef || (curState.composedRef = (0, import_compose_refs.composeRefs)(function(x) {
|
|
8803
8801
|
return stateRef.current.host = x;
|
|
8804
8802
|
}, forwardedRef)), viewProps.ref = curState.composedRef;
|
|
8805
8803
|
var pseudoGroups = splitStyles.pseudoGroups, mediaGroups = splitStyles.mediaGroups;
|
|
@@ -20460,6 +20458,7 @@ var require_Dialog_native = __commonJS({
|
|
|
20460
20458
|
var PORTAL_NAME = "DialogPortal", _createDialogContext1 = _sliced_to_array(createDialogContext(PORTAL_NAME, {
|
|
20461
20459
|
forceMount: void 0
|
|
20462
20460
|
}), 2), PortalProvider2 = _createDialogContext1[0], usePortalContext = _createDialogContext1[1], DialogPortalFrame = (0, import_core12.styled)(import_stacks3.YStack, {
|
|
20461
|
+
pointerEvents: "none",
|
|
20463
20462
|
variants: {
|
|
20464
20463
|
unstyled: {
|
|
20465
20464
|
false: _object_spread9({
|
|
@@ -20509,10 +20508,10 @@ var require_Dialog_native = __commonJS({
|
|
|
20509
20508
|
"children"
|
|
20510
20509
|
]), context = useDialogContext(PORTAL_NAME, __scopeDialog), isShowing = forceMount || context.open, _React_useState = _sliced_to_array(React2.useState(!isShowing), 2), isFullyHidden = _React_useState[0], setIsFullyHidden = _React_useState[1];
|
|
20511
20510
|
isShowing && isFullyHidden && setIsFullyHidden(!1);
|
|
20512
|
-
var
|
|
20513
|
-
|
|
20514
|
-
|
|
20515
|
-
|
|
20511
|
+
var handleExitComplete = React2.useCallback(function() {
|
|
20512
|
+
setIsFullyHidden(!0);
|
|
20513
|
+
}, []), contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.AnimatePresence, {
|
|
20514
|
+
onExitComplete: handleExitComplete,
|
|
20516
20515
|
children: isShowing ? children : null
|
|
20517
20516
|
}), isSheet = useShowDialogSheet(context);
|
|
20518
20517
|
if (isSheet)
|
|
@@ -25852,7 +25851,7 @@ var require_Group_native = __commonJS({
|
|
|
25852
25851
|
}
|
|
25853
25852
|
});
|
|
25854
25853
|
function createGroup(verticalDefault) {
|
|
25855
|
-
return (0, import_helpers.withStaticProperties)(
|
|
25854
|
+
return (0, import_helpers.withStaticProperties)(GroupFrame.styleable(function(props, ref) {
|
|
25856
25855
|
var activeProps = (0, import_core12.useProps)(props), __scopeGroup = activeProps.__scopeGroup, childrenProp = activeProps.children, space = activeProps.space, _activeProps_size = activeProps.size, size3 = _activeProps_size === void 0 ? "$true" : _activeProps_size, spaceDirection = activeProps.spaceDirection, separator = activeProps.separator, scrollable = activeProps.scrollable, _activeProps_axis = activeProps.axis, axis = _activeProps_axis === void 0 ? verticalDefault ? "vertical" : "horizontal" : _activeProps_axis, _activeProps_orientation = activeProps.orientation, orientation = _activeProps_orientation === void 0 ? axis : _activeProps_orientation, disabledProp = activeProps.disabled, disablePassBorderRadiusProp = activeProps.disablePassBorderRadius, borderRadius = activeProps.borderRadius, forceUseItem = activeProps.forceUseItem, restProps = _object_without_properties5(activeProps, [
|
|
25857
25856
|
"__scopeGroup",
|
|
25858
25857
|
"children",
|
|
@@ -27097,8 +27096,11 @@ var require_Animate_native = __commonJS({
|
|
|
27097
27096
|
enterVariant: props.enterVariant,
|
|
27098
27097
|
exitVariant: props.exitVariant,
|
|
27099
27098
|
enterExitVariant: props.enterExitVariant,
|
|
27100
|
-
|
|
27099
|
+
// BUGFIX: this causes continous re-renders if keepChildrenMounted is true, see HeaderMenu
|
|
27100
|
+
// but since we always re-render this component on open changes this should be fine to leave off?
|
|
27101
|
+
presenceAffectsLayout: !1,
|
|
27101
27102
|
isPresent: props.present,
|
|
27103
|
+
custom: props.custom,
|
|
27102
27104
|
children
|
|
27103
27105
|
}) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.AnimatePresence, _object_spread_props8(_object_spread9({}, props), {
|
|
27104
27106
|
children: props.present ? children : null
|
|
@@ -29929,40 +29931,35 @@ var require_Popover_native = __commonJS({
|
|
|
29929
29931
|
"disableRemoveScroll",
|
|
29930
29932
|
"freezeContentsWhenHidden",
|
|
29931
29933
|
"setIsFullyHidden"
|
|
29932
|
-
]), context = usePopoverContext(__scopePopover), open = context.open, keepChildrenMounted = context.keepChildrenMounted, popperContext = (0, import_popper.usePopperContext)(__scopePopover || POPOVER_SCOPE), contents =
|
|
29933
|
-
|
|
29934
|
-
style: {
|
|
29935
|
-
display: "contents"
|
|
29936
|
-
},
|
|
29937
|
-
children
|
|
29938
|
-
}) : children;
|
|
29939
|
-
}, [
|
|
29934
|
+
]), context = usePopoverContext(__scopePopover), open = context.open, keepChildrenMounted = context.keepChildrenMounted, popperContext = (0, import_popper.usePopperContext)(__scopePopover || POPOVER_SCOPE), contents = import_constants4.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
|
|
29935
|
+
style: dspContentsStyle,
|
|
29940
29936
|
children
|
|
29941
|
-
|
|
29937
|
+
}) : children;
|
|
29942
29938
|
if (context.breakpointActive) {
|
|
29943
29939
|
var childrenWithoutScrollView = React2.Children.toArray(children).map(function(child) {
|
|
29944
29940
|
return /* @__PURE__ */ React2.isValidElement(child) && child.type === import_react_native4.ScrollView ? child.props.children : child;
|
|
29945
|
-
}), content =
|
|
29946
|
-
|
|
29941
|
+
}), content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.ResetPresence, {
|
|
29942
|
+
children: childrenWithoutScrollView
|
|
29943
|
+
});
|
|
29944
|
+
return (import_react_native4.Platform.OS === "android" || import_react_native4.Platform.OS === "ios") && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContext.Provider, _object_spread_props8(_object_spread9({
|
|
29947
29945
|
scope: __scopePopover || POPOVER_SCOPE
|
|
29948
29946
|
}, popperContext), {
|
|
29949
|
-
children:
|
|
29950
|
-
|
|
29951
|
-
})
|
|
29952
|
-
})) : content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.ResetPresence, {
|
|
29953
|
-
children: content
|
|
29954
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalItem, {
|
|
29947
|
+
children: childrenWithoutScrollView
|
|
29948
|
+
}))), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalItem, {
|
|
29955
29949
|
hostName: "".concat(context.id, "PopoverContents"),
|
|
29956
29950
|
children: content
|
|
29957
29951
|
});
|
|
29958
29952
|
}
|
|
29953
|
+
var handleExitComplete = React2.useCallback(function() {
|
|
29954
|
+
setIsFullyHidden == null || setIsFullyHidden(!0);
|
|
29955
|
+
}, [
|
|
29956
|
+
setIsFullyHidden
|
|
29957
|
+
]);
|
|
29959
29958
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate.Animate, {
|
|
29960
29959
|
type: "presence",
|
|
29961
29960
|
present: !!open,
|
|
29962
29961
|
keepChildrenMounted,
|
|
29963
|
-
onExitComplete:
|
|
29964
|
-
setIsFullyHidden && setIsFullyHidden(!0);
|
|
29965
|
-
},
|
|
29962
|
+
onExitComplete: handleExitComplete,
|
|
29966
29963
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContent, _object_spread_props8(_object_spread9({
|
|
29967
29964
|
__scopePopper: __scopePopover || POPOVER_SCOPE,
|
|
29968
29965
|
"data-state": getState(open),
|
|
@@ -29974,9 +29971,7 @@ var require_Popover_native = __commonJS({
|
|
|
29974
29971
|
allowPinchZoom: !0,
|
|
29975
29972
|
// causes lots of bugs on touch web on site
|
|
29976
29973
|
removeScrollBar: !1,
|
|
29977
|
-
style:
|
|
29978
|
-
display: "contents"
|
|
29979
|
-
},
|
|
29974
|
+
style: dspContentsStyle,
|
|
29980
29975
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.ResetPresence, {
|
|
29981
29976
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_focus_scope.FocusScope, {
|
|
29982
29977
|
loop: !0,
|
|
@@ -29990,7 +29985,9 @@ var require_Popover_native = __commonJS({
|
|
|
29990
29985
|
})
|
|
29991
29986
|
}), context.contentId)
|
|
29992
29987
|
});
|
|
29993
|
-
}),
|
|
29988
|
+
}), dspContentsStyle = {
|
|
29989
|
+
display: "contents"
|
|
29990
|
+
}, PopoverClose = /* @__PURE__ */ React2.forwardRef(function(props, forwardedRef) {
|
|
29994
29991
|
var __scopePopover = props.__scopePopover, rest = _object_without_properties5(props, [
|
|
29995
29992
|
"__scopePopover"
|
|
29996
29993
|
]), context = usePopoverContext(__scopePopover);
|
|
@@ -30033,11 +30030,11 @@ var require_Popover_native = __commonJS({
|
|
|
30033
30030
|
onChange: function(val) {
|
|
30034
30031
|
onOpenChange == null || onOpenChange(val, viaRef.current);
|
|
30035
30032
|
}
|
|
30036
|
-
}), 2), open = _useControllableState[0], setOpen = _useControllableState[1],
|
|
30033
|
+
}), 2), open = _useControllableState[0], setOpen = _useControllableState[1], handleOpenChange = (0, import_core12.useEvent)(function(val, via) {
|
|
30034
|
+
viaRef.current = via, setOpen(val);
|
|
30035
|
+
}), sheetActive = useSheetBreakpointActive(sheetBreakpoint), floatingContext = (0, import_useFloatingContext.useFloatingContext)({
|
|
30037
30036
|
open,
|
|
30038
|
-
setOpen:
|
|
30039
|
-
viaRef.current = via, setOpen(val);
|
|
30040
|
-
},
|
|
30037
|
+
setOpen: handleOpenChange,
|
|
30041
30038
|
disable: sheetActive,
|
|
30042
30039
|
hoverable,
|
|
30043
30040
|
disableFocus
|
|
@@ -30054,9 +30051,7 @@ var require_Popover_native = __commonJS({
|
|
|
30054
30051
|
triggerRef,
|
|
30055
30052
|
open,
|
|
30056
30053
|
breakpointActive: sheetActive,
|
|
30057
|
-
onOpenChange:
|
|
30058
|
-
viaRef.current = via, setOpen(val);
|
|
30059
|
-
},
|
|
30054
|
+
onOpenChange: handleOpenChange,
|
|
30060
30055
|
onOpenToggle: (0, import_core12.useEvent)(function() {
|
|
30061
30056
|
open && sheetActive || setOpen(!open);
|
|
30062
30057
|
}),
|