@tamagui/core 1.125.13 → 1.125.15
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 +36 -34
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +36 -34
- package/dist/test.native.js.map +2 -2
- package/package.json +7 -7
package/dist/test.native.js
CHANGED
|
@@ -5561,22 +5561,19 @@ var require_createShallowSetState_native = __commonJS({
|
|
|
5561
5561
|
var import_react3 = require("react"), callImmediate = function(cb) {
|
|
5562
5562
|
return cb();
|
|
5563
5563
|
};
|
|
5564
|
-
function createShallowSetState(setter, onlyAllow, transition, debugIn
|
|
5565
|
-
var debug = !0;
|
|
5564
|
+
function createShallowSetState(setter, onlyAllow, transition, debugIn) {
|
|
5566
5565
|
return (0, import_react3.useCallback)(function(next) {
|
|
5567
5566
|
var wrap = transition ? import_react3.startTransition : callImmediate;
|
|
5568
5567
|
wrap(function() {
|
|
5569
5568
|
setter(function(prev) {
|
|
5570
|
-
|
|
5571
|
-
return callback == null || callback(out), out;
|
|
5569
|
+
return mergeIfNotShallowEqual(prev, next, onlyAllow, debugIn);
|
|
5572
5570
|
});
|
|
5573
5571
|
});
|
|
5574
5572
|
}, [
|
|
5575
5573
|
setter,
|
|
5576
5574
|
onlyAllow ? onlyAllow.join("") : "",
|
|
5577
5575
|
transition,
|
|
5578
|
-
|
|
5579
|
-
callback
|
|
5576
|
+
debugIn
|
|
5580
5577
|
]);
|
|
5581
5578
|
}
|
|
5582
5579
|
function mergeIfNotShallowEqual(prev, next, onlyAllow, debug) {
|
|
@@ -5640,15 +5637,15 @@ var require_subscribeToContextGroup_native = __commonJS({
|
|
|
5640
5637
|
}
|
|
5641
5638
|
});
|
|
5642
5639
|
module2.exports = __toCommonJS2(subscribeToContextGroup_exports);
|
|
5643
|
-
var
|
|
5640
|
+
var import_useMedia = require_useMedia_native(), import_createShallowSetState = require_createShallowSetState_native(), subscribeToContextGroup = function(param) {
|
|
5644
5641
|
var { setStateShallow, pseudoGroups, mediaGroups, componentContext, state } = param;
|
|
5645
5642
|
if (pseudoGroups || mediaGroups) {
|
|
5646
|
-
var _componentContext_groups_subscribe, _componentContext_groups
|
|
5647
|
-
pseudo: {},
|
|
5648
|
-
media: {}
|
|
5649
|
-
};
|
|
5643
|
+
var _componentContext_groups_subscribe, _componentContext_groups;
|
|
5650
5644
|
return (_componentContext_groups = componentContext.groups) === null || _componentContext_groups === void 0 || (_componentContext_groups_subscribe = _componentContext_groups.subscribe) === null || _componentContext_groups_subscribe === void 0 ? void 0 : _componentContext_groups_subscribe.call(_componentContext_groups, function(name, param2) {
|
|
5651
|
-
var { layout, pseudo } = param2
|
|
5645
|
+
var { layout, pseudo } = param2, _state_group, current = ((_state_group = state.group) === null || _state_group === void 0 ? void 0 : _state_group[name]) || {
|
|
5646
|
+
pseudo: {},
|
|
5647
|
+
media: {}
|
|
5648
|
+
};
|
|
5652
5649
|
if (pseudo && pseudoGroups != null && pseudoGroups.has(String(name))) Object.assign(current.pseudo, pseudo), persist();
|
|
5653
5650
|
else if (layout && mediaGroups) {
|
|
5654
5651
|
var mediaState2 = (0, import_useMedia.getMediaState)(mediaGroups, layout), next = (0, import_createShallowSetState.mergeIfNotShallowEqual)(current.media, mediaState2);
|
|
@@ -6559,7 +6556,7 @@ var require_useComponentState_native = __commonJS({
|
|
|
6559
6556
|
});
|
|
6560
6557
|
module2.exports = __toCommonJS2(useComponentState_exports);
|
|
6561
6558
|
var import_constants2 = require_index_native2(), import_use_did_finish_ssr = require_index_native6(), import_react3 = require("react"), import_defaultComponentState = require_defaultComponentState_native(), import_createShallowSetState = require_createShallowSetState_native(), import_isObj = require_isObj_native(), import_log = require_log_native(), useComponentState = function(props, param, staticConfig, config) {
|
|
6562
|
-
var { animationDriver
|
|
6559
|
+
var { animationDriver } = param, _animationDriver_usePresence, isHydrated = (0, import_use_did_finish_ssr.useDidFinishSSR)(), useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, stateRef = (0, import_react3.useRef)(void 0);
|
|
6563
6560
|
stateRef.current || (stateRef.current = {});
|
|
6564
6561
|
var hasAnimationProp = !!("animation" in props || props.style && hasAnimatedStyleValue(props.style)), supportsCSSVars = animationDriver == null ? void 0 : animationDriver.supportsCSSVars, curStateRef = stateRef.current, willBeAnimatedClient = function() {
|
|
6565
6562
|
var next = !!(hasAnimationProp && !staticConfig.isHOC && useAnimations);
|
|
@@ -6584,24 +6581,9 @@ var require_useComponentState_native = __commonJS({
|
|
|
6584
6581
|
import_constants2.isWeb && hasAnimationThatNeedsHydrate && !staticConfig.isHOC && !isHydrated && (isAnimated = !1, curStateRef.willHydrate = !0), disabled !== state.disabled && (state.disabled = disabled, disabled && Object.assign(state, import_defaultComponentState.defaultComponentStateMounted), setState({
|
|
6585
6582
|
...state
|
|
6586
6583
|
}));
|
|
6587
|
-
var groupName = props.group,
|
|
6588
|
-
if (groupContextState && groupName) return function(state2) {
|
|
6589
|
-
curStateRef.group.emit(groupName, {
|
|
6590
|
-
pseudo: state2
|
|
6591
|
-
});
|
|
6592
|
-
var next = {
|
|
6593
|
-
...groupContextState[groupName],
|
|
6594
|
-
...state2
|
|
6595
|
-
};
|
|
6596
|
-
groupContextState[groupName] = next;
|
|
6597
|
-
};
|
|
6598
|
-
}, [
|
|
6599
|
-
groupContextState,
|
|
6600
|
-
curStateRef,
|
|
6601
|
-
groupName
|
|
6602
|
-
]), setStateShallow = (0, import_createShallowSetState.createShallowSetState)(setState, disabled ? [
|
|
6584
|
+
var groupName = props.group, setStateShallow = (0, import_createShallowSetState.createShallowSetState)(setState, disabled ? [
|
|
6603
6585
|
"disabled"
|
|
6604
|
-
] : void 0, !1, props.debug
|
|
6586
|
+
] : void 0, !1, props.debug);
|
|
6605
6587
|
if (presenceState && isAnimated && isHydrated && staticConfig.variants) {
|
|
6606
6588
|
var { enterVariant, exitVariant, enterExitVariant, custom } = presenceState;
|
|
6607
6589
|
(0, import_isObj.isObj)(custom) && Object.assign(props, custom);
|
|
@@ -7026,8 +7008,9 @@ var require_createComponent_native = __commonJS({
|
|
|
7026
7008
|
(isAnimated || supportsCSSVars) && animations && (animationStyles = animations.style, viewProps.style = animationStyles, animations.className && (viewProps.className = `${state.unmounted === "should-enter" ? "t_unmounted " : ""}${viewProps.className || ""} ${animations.className}`));
|
|
7027
7009
|
}
|
|
7028
7010
|
groupName && (nonTamaguiProps.onLayout = (0, import_helpers2.composeEventHandlers)(nonTamaguiProps.onLayout, function(e) {
|
|
7029
|
-
|
|
7030
|
-
|
|
7011
|
+
var layout = e.nativeEvent.layout;
|
|
7012
|
+
stateRef.current.group.layout = layout, stateRef.current.group.emit(groupName, {
|
|
7013
|
+
layout
|
|
7031
7014
|
}), !stateRef.current.hasMeasured && props.untilMeasured === "hide" && setState(function(prev) {
|
|
7032
7015
|
return {
|
|
7033
7016
|
...prev
|
|
@@ -7076,6 +7059,25 @@ var require_createComponent_native = __commonJS({
|
|
|
7076
7059
|
mediaGroups ? Object.keys([
|
|
7077
7060
|
...mediaGroups
|
|
7078
7061
|
]).join("") : 0
|
|
7062
|
+
]), (0, import_constants2.useIsomorphicLayoutEffect)(function() {
|
|
7063
|
+
var _curStateRef_group;
|
|
7064
|
+
if (groupName) {
|
|
7065
|
+
curStateRef.group.emit(groupName, {
|
|
7066
|
+
pseudo: state,
|
|
7067
|
+
layout: (_curStateRef_group = curStateRef.group) === null || _curStateRef_group === void 0 ? void 0 : _curStateRef_group.layout
|
|
7068
|
+
});
|
|
7069
|
+
var groupContextState = componentContext == null ? void 0 : componentContext.groups;
|
|
7070
|
+
if (groupContextState) {
|
|
7071
|
+
var next = {
|
|
7072
|
+
...groupContextState[groupName],
|
|
7073
|
+
...state
|
|
7074
|
+
};
|
|
7075
|
+
groupContextState[groupName] = next;
|
|
7076
|
+
}
|
|
7077
|
+
}
|
|
7078
|
+
}, [
|
|
7079
|
+
groupName,
|
|
7080
|
+
state
|
|
7079
7081
|
]);
|
|
7080
7082
|
var runtimePressStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.pressStyle), runtimeFocusStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.focusStyle), runtimeFocusVisibleStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.focusVisibleStyle), attachFocus = !!(runtimePressStyle || runtimeFocusStyle || runtimeFocusVisibleStyle || onFocus || onBlur || componentContext.setParentFocusState), attachPress = !!(groupName || runtimePressStyle || onPress || onPressOut || onPressIn || onMouseDown || onMouseUp || onLongPress || onClick || pseudos != null && pseudos.focusVisibleStyle), runtimeHoverStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.hoverStyle), needsHoverState = !!(groupName || runtimeHoverStyle || onHoverIn || onHoverOut), attachHover = import_constants2.isWeb && !!(groupName || needsHoverState || onMouseEnter || onMouseLeave), shouldAttach = !disabled && !props.asChild && !!(attachFocus || attachPress || attachHover || runtimePressStyle || runtimeHoverStyle || runtimeFocusStyle), needsPressState = !!(groupName || runtimePressStyle), events = shouldAttach ? {
|
|
7081
7083
|
onPressOut: attachPress ? function(e) {
|
|
@@ -7185,7 +7187,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7185
7187
|
}, [
|
|
7186
7188
|
groupName
|
|
7187
7189
|
]);
|
|
7188
|
-
if ((
|
|
7190
|
+
if (("group" in props || propsIn.focusWithinStyle) && (content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ComponentContext.ComponentContext.Provider, {
|
|
7189
7191
|
...componentContext,
|
|
7190
7192
|
groups: subGroupContext,
|
|
7191
7193
|
setParentFocusState: setStateShallow,
|
|
@@ -7899,7 +7901,7 @@ var require_createFont_native = __commonJS({
|
|
|
7899
7901
|
];
|
|
7900
7902
|
}));
|
|
7901
7903
|
}, createFont = function(font) {
|
|
7902
|
-
var sizeKeys = Object.keys(font.size), processedFont = Object.fromEntries(Object.entries(font).map(function(param) {
|
|
7904
|
+
var sizeKeys = Object.keys(font.size || {}), processedFont = Object.fromEntries(Object.entries(font).map(function(param) {
|
|
7903
7905
|
var [key, section] = param;
|
|
7904
7906
|
return [
|
|
7905
7907
|
key,
|