@tamagui/core 1.138.3 → 1.138.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.cjs +35 -24
- package/dist/test.native.cjs +35 -24
- package/package.json +11 -11
package/dist/native.cjs
CHANGED
|
@@ -2662,12 +2662,12 @@ var variableToFontNameCache = /* @__PURE__ */ new WeakMap(), resolveTokensAndVar
|
|
|
2662
2662
|
for (var _key in value) {
|
|
2663
2663
|
var subKey = conf2.shorthands[_key] || _key, val = value[_key];
|
|
2664
2664
|
if (!(!styleProps.noSkip && subKey in skipProps)) {
|
|
2665
|
+
if (staticConfig) {
|
|
2666
|
+
var _staticConfig_context, _staticConfig_parentStaticConfig_context, _staticConfig_parentStaticConfig, contextProps = ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.props) || ((_staticConfig_parentStaticConfig = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig === void 0 || (_staticConfig_parentStaticConfig_context = _staticConfig_parentStaticConfig.context) === null || _staticConfig_parentStaticConfig_context === void 0 ? void 0 : _staticConfig_parentStaticConfig_context.props);
|
|
2667
|
+
contextProps && subKey in contextProps && (styleState.overriddenContextProps || (styleState.overriddenContextProps = {}), styleState.overriddenContextProps[subKey] = val);
|
|
2668
|
+
}
|
|
2665
2669
|
if (styleProps.noExpand) res[subKey] = val;
|
|
2666
2670
|
else if (variants && subKey in variants) {
|
|
2667
|
-
if (staticConfig) {
|
|
2668
|
-
var _staticConfig_context, _staticConfig_parentStaticConfig_context, _staticConfig_parentStaticConfig, contextProps = ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.props) || ((_staticConfig_parentStaticConfig = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig === void 0 || (_staticConfig_parentStaticConfig_context = _staticConfig_parentStaticConfig.context) === null || _staticConfig_parentStaticConfig_context === void 0 ? void 0 : _staticConfig_parentStaticConfig_context.props);
|
|
2669
|
-
contextProps && subKey in contextProps && (styleState.resolvedContextVariants || (styleState.resolvedContextVariants = {}), styleState.resolvedContextVariants[subKey] = val);
|
|
2670
|
-
}
|
|
2671
2671
|
if (parentVariantKey && parentVariantKey === key) res[subKey] = // SYNC WITH *1
|
|
2672
2672
|
val[0] === "$" ? getTokenForKey(subKey, val, styleProps, styleState) : val;
|
|
2673
2673
|
else {
|
|
@@ -3109,6 +3109,10 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
3109
3109
|
(_styleState2 = styleState).style || (_styleState2.style = {}), Object.assign(styleState.style, normalizeStyle(style));
|
|
3110
3110
|
}
|
|
3111
3111
|
}
|
|
3112
|
+
if (viewProps.tabIndex === 0) {
|
|
3113
|
+
var _viewProps1, _accessible1;
|
|
3114
|
+
(_accessible1 = (_viewProps1 = viewProps).accessible) !== null && _accessible1 !== void 0 || (_viewProps1.accessible = true);
|
|
3115
|
+
}
|
|
3112
3116
|
var style1 = styleState.style;
|
|
3113
3117
|
if (style1 == null ? void 0 : style1.fontFamily) {
|
|
3114
3118
|
var _getFont, faceInfo = (_getFont = getFont(style1.fontFamily)) === null || _getFont === void 0 ? void 0 : _getFont.face;
|
|
@@ -3129,7 +3133,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
3129
3133
|
dynamicThemeAccess,
|
|
3130
3134
|
pseudoGroups,
|
|
3131
3135
|
mediaGroups,
|
|
3132
|
-
|
|
3136
|
+
overriddenContextProps: styleState.overriddenContextProps
|
|
3133
3137
|
}, asChildExceptStyleLike = asChild === "except-style" || asChild === "except-style-web";
|
|
3134
3138
|
if (!styleProps.noMergeStyle && !asChildExceptStyleLike) {
|
|
3135
3139
|
var style2 = styleState.style;
|
|
@@ -3147,26 +3151,33 @@ function mergeFlatTransforms(target, flatTransforms) {
|
|
|
3147
3151
|
});
|
|
3148
3152
|
}
|
|
3149
3153
|
function mergeStyle(styleState, key, val, importance) {
|
|
3150
|
-
var {
|
|
3154
|
+
var _staticConfig_context, _staticConfig_parentStaticConfig_context, _staticConfig_parentStaticConfig, {
|
|
3151
3155
|
viewProps,
|
|
3152
3156
|
styleProps,
|
|
3153
3157
|
staticConfig,
|
|
3154
3158
|
usedKeys
|
|
3155
3159
|
} = styleState, existingImportance = usedKeys[key] || 0;
|
|
3156
|
-
if (!(existingImportance > importance))
|
|
3157
|
-
var
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
staticConfig.accept && key in staticConfig.accept
|
|
3164
|
-
) viewProps[key] = out;
|
|
3165
|
-
else {
|
|
3160
|
+
if (!(existingImportance > importance)) {
|
|
3161
|
+
var contextProps = ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.props) || ((_staticConfig_parentStaticConfig = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig === void 0 || (_staticConfig_parentStaticConfig_context = _staticConfig_parentStaticConfig.context) === null || _staticConfig_parentStaticConfig_context === void 0 ? void 0 : _staticConfig_parentStaticConfig_context.props);
|
|
3162
|
+
if (contextProps && key in contextProps) {
|
|
3163
|
+
var _styleState;
|
|
3164
|
+
(_styleState = styleState).overriddenContextProps || (_styleState.overriddenContextProps = {}), styleState.overriddenContextProps[key] = val;
|
|
3165
|
+
}
|
|
3166
|
+
if (key in stylePropsTransform) {
|
|
3166
3167
|
var _styleState1;
|
|
3167
|
-
(_styleState1 = styleState).
|
|
3168
|
-
|
|
3169
|
-
|
|
3168
|
+
(_styleState1 = styleState).flatTransforms || (_styleState1.flatTransforms = {}), usedKeys[key] = importance, styleState.flatTransforms[key] = val;
|
|
3169
|
+
} else {
|
|
3170
|
+
var shouldNormalize = isWeb, out = shouldNormalize ? normalizeValueWithProperty(val) : val;
|
|
3171
|
+
if (
|
|
3172
|
+
// accept is for props not styles
|
|
3173
|
+
staticConfig.accept && key in staticConfig.accept
|
|
3174
|
+
) viewProps[key] = out;
|
|
3175
|
+
else {
|
|
3176
|
+
var _styleState2;
|
|
3177
|
+
(_styleState2 = styleState).style || (_styleState2.style = {}), usedKeys[key] = importance, styleState.style[key] = // if you dont do this you'll be passing props.transform arrays directly here and then mutating them
|
|
3178
|
+
// if theres any flatTransforms later, causing issues (mutating props is bad, in strict mode styles get borked)
|
|
3179
|
+
key === "transform" && Array.isArray(out) ? [...out] : out;
|
|
3180
|
+
}
|
|
3170
3181
|
}
|
|
3171
3182
|
}
|
|
3172
3183
|
}
|
|
@@ -3689,11 +3700,11 @@ function createComponent(staticConfig) {
|
|
|
3689
3700
|
styledContext: styledContextValue
|
|
3690
3701
|
}, themeName = (themeState == null ? void 0 : themeState.name) || "";
|
|
3691
3702
|
var splitStyles = useSplitStyles(props, staticConfig, theme, themeName, state, styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp), isPassthrough = !splitStyles, contextForOverride = staticConfig.context;
|
|
3692
|
-
if (splitStyles == null ? void 0 : splitStyles.
|
|
3693
|
-
var _staticConfig_parentStaticConfig,
|
|
3694
|
-
if (
|
|
3695
|
-
for (var key in splitStyles.
|
|
3696
|
-
staticConfig.context || (contextForOverride =
|
|
3703
|
+
if (splitStyles == null ? void 0 : splitStyles.overriddenContextProps) {
|
|
3704
|
+
var _staticConfig_parentStaticConfig, contextForProps = staticConfig.context || ((_staticConfig_parentStaticConfig = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig === void 0 ? void 0 : _staticConfig_parentStaticConfig.context);
|
|
3705
|
+
if (contextForProps) {
|
|
3706
|
+
for (var key in splitStyles.overriddenContextProps) overriddenContextProps || (overriddenContextProps = {}), overriddenContextProps[key] = splitStyles.overriddenContextProps[key];
|
|
3707
|
+
staticConfig.context || (contextForOverride = contextForProps);
|
|
3697
3708
|
}
|
|
3698
3709
|
}
|
|
3699
3710
|
var groupContext = groupName && (allGroupContexts == null ? void 0 : allGroupContexts[groupName]) || null;
|
package/dist/test.native.cjs
CHANGED
|
@@ -2487,12 +2487,12 @@ var variableToFontNameCache = /* @__PURE__ */ new WeakMap(), resolveTokensAndVar
|
|
|
2487
2487
|
for (var _key in value) {
|
|
2488
2488
|
var subKey = conf2.shorthands[_key] || _key, val = value[_key];
|
|
2489
2489
|
if (!(!styleProps.noSkip && subKey in skipProps)) {
|
|
2490
|
+
if (staticConfig) {
|
|
2491
|
+
var _staticConfig_context, _staticConfig_parentStaticConfig_context, _staticConfig_parentStaticConfig, contextProps = ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.props) || ((_staticConfig_parentStaticConfig = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig === void 0 || (_staticConfig_parentStaticConfig_context = _staticConfig_parentStaticConfig.context) === null || _staticConfig_parentStaticConfig_context === void 0 ? void 0 : _staticConfig_parentStaticConfig_context.props);
|
|
2492
|
+
contextProps && subKey in contextProps && (styleState.overriddenContextProps || (styleState.overriddenContextProps = {}), styleState.overriddenContextProps[subKey] = val);
|
|
2493
|
+
}
|
|
2490
2494
|
if (styleProps.noExpand) res[subKey] = val;
|
|
2491
2495
|
else if (variants && subKey in variants) {
|
|
2492
|
-
if (staticConfig) {
|
|
2493
|
-
var _staticConfig_context, _staticConfig_parentStaticConfig_context, _staticConfig_parentStaticConfig, contextProps = ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.props) || ((_staticConfig_parentStaticConfig = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig === void 0 || (_staticConfig_parentStaticConfig_context = _staticConfig_parentStaticConfig.context) === null || _staticConfig_parentStaticConfig_context === void 0 ? void 0 : _staticConfig_parentStaticConfig_context.props);
|
|
2494
|
-
contextProps && subKey in contextProps && (styleState.resolvedContextVariants || (styleState.resolvedContextVariants = {}), styleState.resolvedContextVariants[subKey] = val);
|
|
2495
|
-
}
|
|
2496
2496
|
if (parentVariantKey && parentVariantKey === key) res[subKey] = // SYNC WITH *1
|
|
2497
2497
|
val[0] === "$" ? getTokenForKey(subKey, val, styleProps, styleState) : val;
|
|
2498
2498
|
else {
|
|
@@ -2935,6 +2935,10 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
2935
2935
|
(_styleState2 = styleState).style || (_styleState2.style = {}), Object.assign(styleState.style, normalizeStyle(style));
|
|
2936
2936
|
}
|
|
2937
2937
|
}
|
|
2938
|
+
if (viewProps.tabIndex === 0) {
|
|
2939
|
+
var _viewProps1, _accessible1;
|
|
2940
|
+
(_accessible1 = (_viewProps1 = viewProps).accessible) !== null && _accessible1 !== void 0 || (_viewProps1.accessible = true);
|
|
2941
|
+
}
|
|
2938
2942
|
var style1 = styleState.style;
|
|
2939
2943
|
if (style1 == null ? void 0 : style1.fontFamily) {
|
|
2940
2944
|
var _getFont, faceInfo = (_getFont = getFont(style1.fontFamily)) === null || _getFont === void 0 ? void 0 : _getFont.face;
|
|
@@ -2955,7 +2959,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
2955
2959
|
dynamicThemeAccess,
|
|
2956
2960
|
pseudoGroups,
|
|
2957
2961
|
mediaGroups,
|
|
2958
|
-
|
|
2962
|
+
overriddenContextProps: styleState.overriddenContextProps
|
|
2959
2963
|
}, asChildExceptStyleLike = asChild === "except-style" || asChild === "except-style-web";
|
|
2960
2964
|
if (!styleProps.noMergeStyle && !asChildExceptStyleLike) {
|
|
2961
2965
|
var style2 = styleState.style;
|
|
@@ -2973,26 +2977,33 @@ function mergeFlatTransforms(target, flatTransforms) {
|
|
|
2973
2977
|
});
|
|
2974
2978
|
}
|
|
2975
2979
|
function mergeStyle(styleState, key, val, importance) {
|
|
2976
|
-
var {
|
|
2980
|
+
var _staticConfig_context, _staticConfig_parentStaticConfig_context, _staticConfig_parentStaticConfig, {
|
|
2977
2981
|
viewProps,
|
|
2978
2982
|
styleProps,
|
|
2979
2983
|
staticConfig,
|
|
2980
2984
|
usedKeys
|
|
2981
2985
|
} = styleState, existingImportance = usedKeys[key] || 0;
|
|
2982
|
-
if (!(existingImportance > importance))
|
|
2983
|
-
var
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
staticConfig.accept && key in staticConfig.accept
|
|
2990
|
-
) viewProps[key] = out;
|
|
2991
|
-
else {
|
|
2986
|
+
if (!(existingImportance > importance)) {
|
|
2987
|
+
var contextProps = ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.props) || ((_staticConfig_parentStaticConfig = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig === void 0 || (_staticConfig_parentStaticConfig_context = _staticConfig_parentStaticConfig.context) === null || _staticConfig_parentStaticConfig_context === void 0 ? void 0 : _staticConfig_parentStaticConfig_context.props);
|
|
2988
|
+
if (contextProps && key in contextProps) {
|
|
2989
|
+
var _styleState;
|
|
2990
|
+
(_styleState = styleState).overriddenContextProps || (_styleState.overriddenContextProps = {}), styleState.overriddenContextProps[key] = val;
|
|
2991
|
+
}
|
|
2992
|
+
if (key in stylePropsTransform) {
|
|
2992
2993
|
var _styleState1;
|
|
2993
|
-
(_styleState1 = styleState).
|
|
2994
|
-
|
|
2995
|
-
|
|
2994
|
+
(_styleState1 = styleState).flatTransforms || (_styleState1.flatTransforms = {}), usedKeys[key] = importance, styleState.flatTransforms[key] = val;
|
|
2995
|
+
} else {
|
|
2996
|
+
var shouldNormalize = isWeb, out = shouldNormalize ? normalizeValueWithProperty(val) : val;
|
|
2997
|
+
if (
|
|
2998
|
+
// accept is for props not styles
|
|
2999
|
+
staticConfig.accept && key in staticConfig.accept
|
|
3000
|
+
) viewProps[key] = out;
|
|
3001
|
+
else {
|
|
3002
|
+
var _styleState2;
|
|
3003
|
+
(_styleState2 = styleState).style || (_styleState2.style = {}), usedKeys[key] = importance, styleState.style[key] = // if you dont do this you'll be passing props.transform arrays directly here and then mutating them
|
|
3004
|
+
// if theres any flatTransforms later, causing issues (mutating props is bad, in strict mode styles get borked)
|
|
3005
|
+
key === "transform" && Array.isArray(out) ? [...out] : out;
|
|
3006
|
+
}
|
|
2996
3007
|
}
|
|
2997
3008
|
}
|
|
2998
3009
|
}
|
|
@@ -3519,11 +3530,11 @@ function createComponent(staticConfig) {
|
|
|
3519
3530
|
styledContext: styledContextValue
|
|
3520
3531
|
}, themeName = (themeState == null ? void 0 : themeState.name) || "";
|
|
3521
3532
|
var splitStyles = useSplitStyles(props, staticConfig, theme, themeName, state, styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp), isPassthrough = !splitStyles, contextForOverride = staticConfig.context;
|
|
3522
|
-
if (splitStyles == null ? void 0 : splitStyles.
|
|
3523
|
-
var _staticConfig_parentStaticConfig,
|
|
3524
|
-
if (
|
|
3525
|
-
for (var key in splitStyles.
|
|
3526
|
-
staticConfig.context || (contextForOverride =
|
|
3533
|
+
if (splitStyles == null ? void 0 : splitStyles.overriddenContextProps) {
|
|
3534
|
+
var _staticConfig_parentStaticConfig, contextForProps = staticConfig.context || ((_staticConfig_parentStaticConfig = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig === void 0 ? void 0 : _staticConfig_parentStaticConfig.context);
|
|
3535
|
+
if (contextForProps) {
|
|
3536
|
+
for (var key in splitStyles.overriddenContextProps) overriddenContextProps || (overriddenContextProps = {}), overriddenContextProps[key] = splitStyles.overriddenContextProps[key];
|
|
3537
|
+
staticConfig.context || (contextForOverride = contextForProps);
|
|
3527
3538
|
}
|
|
3528
3539
|
}
|
|
3529
3540
|
var groupContext = groupName && (allGroupContexts == null ? void 0 : allGroupContexts[groupName]) || null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/core",
|
|
3
|
-
"version": "1.138.
|
|
3
|
+
"version": "1.138.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"source": "src/index.tsx",
|
|
6
6
|
"main": "dist/cjs",
|
|
@@ -33,18 +33,18 @@
|
|
|
33
33
|
"native-test.d.ts"
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@tamagui/helpers": "1.138.
|
|
37
|
-
"@tamagui/react-native-media-driver": "1.138.
|
|
38
|
-
"@tamagui/react-native-use-pressable": "1.138.
|
|
39
|
-
"@tamagui/react-native-use-responder-events": "1.138.
|
|
40
|
-
"@tamagui/use-element-layout": "1.138.
|
|
41
|
-
"@tamagui/use-event": "1.138.
|
|
42
|
-
"@tamagui/web": "1.138.
|
|
36
|
+
"@tamagui/helpers": "1.138.4",
|
|
37
|
+
"@tamagui/react-native-media-driver": "1.138.4",
|
|
38
|
+
"@tamagui/react-native-use-pressable": "1.138.4",
|
|
39
|
+
"@tamagui/react-native-use-responder-events": "1.138.4",
|
|
40
|
+
"@tamagui/use-element-layout": "1.138.4",
|
|
41
|
+
"@tamagui/use-event": "1.138.4",
|
|
42
|
+
"@tamagui/web": "1.138.4"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@tamagui/build": "1.138.
|
|
46
|
-
"@tamagui/native-bundle": "1.138.
|
|
47
|
-
"@tamagui/react-native-web-lite": "1.138.
|
|
45
|
+
"@tamagui/build": "1.138.4",
|
|
46
|
+
"@tamagui/native-bundle": "1.138.4",
|
|
47
|
+
"@tamagui/react-native-web-lite": "1.138.4",
|
|
48
48
|
"@testing-library/react": "^16.1.0",
|
|
49
49
|
"csstype": "^3.0.10",
|
|
50
50
|
"react": "*",
|