@tamagui/core 1.123.9 → 1.123.11
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 +16 -16
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +16 -16
- package/dist/test.native.js.map +2 -2
- package/package.json +8 -8
package/dist/native.js
CHANGED
|
@@ -5711,7 +5711,7 @@ var require_propMapper_native = __commonJS({
|
|
|
5711
5711
|
return;
|
|
5712
5712
|
}
|
|
5713
5713
|
}
|
|
5714
|
-
if (styleProps.disableExpandShorthands || key in conf.shorthands && (key = conf.shorthands[key]), value != null && (value[0] === "$" ? value = getTokenForKey(key, value, styleProps
|
|
5714
|
+
if (styleProps.disableExpandShorthands || key in conf.shorthands && (key = conf.shorthands[key]), value != null && (value[0] === "$" ? value = getTokenForKey(key, value, styleProps, styleState) : (0, import_createVariable.isVariable)(value) && (value = resolveVariableValue(key, value, styleProps.resolveValues))), value != null) {
|
|
5715
5715
|
key === "fontFamily" && lastFontFamilyToken && (styleState.fontFamily = lastFontFamilyToken);
|
|
5716
5716
|
var expanded = styleProps.noExpand ? null : (0, import_expandStyle.expandStyle)(key, value);
|
|
5717
5717
|
if (expanded) for (var max = expanded.length, i = 0; i < max; i++) {
|
|
@@ -5773,7 +5773,7 @@ var require_propMapper_native = __commonJS({
|
|
|
5773
5773
|
if (styleProps.noExpand) res[subKey] = val;
|
|
5774
5774
|
else if (variants && subKey in variants) {
|
|
5775
5775
|
if (parentVariantKey && parentVariantKey === key) res[subKey] = // SYNC WITH *1
|
|
5776
|
-
val[0] === "$" ? getTokenForKey(subKey, val, styleProps
|
|
5776
|
+
val[0] === "$" ? getTokenForKey(subKey, val, styleProps, styleState) : val;
|
|
5777
5777
|
else {
|
|
5778
5778
|
var variantOut = resolveVariants(subKey, val, styleProps, styleState, key);
|
|
5779
5779
|
if (variantOut) {
|
|
@@ -5806,7 +5806,7 @@ var require_propMapper_native = __commonJS({
|
|
|
5806
5806
|
if (typeof val == "string") {
|
|
5807
5807
|
var fVal = (
|
|
5808
5808
|
// SYNC WITH *1
|
|
5809
|
-
val[0] === "$" ? getTokenForKey(subKey, val, styleProps
|
|
5809
|
+
val[0] === "$" ? getTokenForKey(subKey, val, styleProps, styleState) : val
|
|
5810
5810
|
);
|
|
5811
5811
|
res[subKey] = fVal;
|
|
5812
5812
|
continue;
|
|
@@ -5866,16 +5866,18 @@ var require_propMapper_native = __commonJS({
|
|
|
5866
5866
|
var fontShorthand = {
|
|
5867
5867
|
fontSize: "size",
|
|
5868
5868
|
fontWeight: "weight"
|
|
5869
|
-
}, lastFontFamilyToken = null, getTokenForKey = function(key, value) {
|
|
5870
|
-
var resolveAs =
|
|
5869
|
+
}, lastFontFamilyToken = null, getTokenForKey = function(key, value, styleProps, styleState) {
|
|
5870
|
+
var _staticConfig_accept, resolveAs = styleProps.resolveValues || "none";
|
|
5871
5871
|
if (resolveAs === "none") return value;
|
|
5872
5872
|
var { theme, conf = (0, import_config.getConfig)(), context, fontFamily, staticConfig } = styleState, tokensParsed = conf.tokensParsed, valOrVar, hasSet = !1, customTokenAccept = staticConfig == null || (_staticConfig_accept = staticConfig.accept) === null || _staticConfig_accept === void 0 ? void 0 : _staticConfig_accept[key];
|
|
5873
5873
|
if (customTokenAccept) {
|
|
5874
5874
|
var _theme_value, val = (_theme_value = theme == null ? void 0 : theme[value]) !== null && _theme_value !== void 0 ? _theme_value : tokensParsed[customTokenAccept][value];
|
|
5875
5875
|
val != null && (resolveAs = "value", valOrVar = val, hasSet = !0);
|
|
5876
5876
|
}
|
|
5877
|
-
if (theme && value in theme)
|
|
5878
|
-
|
|
5877
|
+
if (theme && value in theme) {
|
|
5878
|
+
if (resolveAs === "except-theme") return value;
|
|
5879
|
+
valOrVar = theme[value], process.env.NODE_ENV === "development" && styleState.debug === "verbose" && (globalThis.tamaguiAvoidTracking = !0, console.info(` - resolving ${key} to theme value ${value} resolveAs ${resolveAs}`, valOrVar), globalThis.tamaguiAvoidTracking = !1), hasSet = !0;
|
|
5880
|
+
} else {
|
|
5879
5881
|
if (value in conf.specificTokens) hasSet = !0, valOrVar = conf.specificTokens[value];
|
|
5880
5882
|
else {
|
|
5881
5883
|
switch (key) {
|
|
@@ -6381,7 +6383,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6381
6383
|
console.groupEnd();
|
|
6382
6384
|
}
|
|
6383
6385
|
};
|
|
6384
|
-
|
|
6386
|
+
conf = conf || (0, import_config.getConfig)(), import_constants2.isWeb && styleProps.isAnimated && conf.animations.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
|
|
6385
6387
|
var { shorthands } = conf, { isHOC, isText, isInput, variants, isReactNative, inlineProps, inlineWhenUnflattened, parentStaticConfig, acceptsClassName } = staticConfig, viewProps = {}, mediaState2 = styleProps.mediaState || import_useMedia.mediaState, usedKeys = {}, shouldDoClasses = acceptsClassName && import_constants2.isWeb && !styleProps.noClass, rulesToInsert = void 0, classNames = {}, transforms = {}, pseudos = null, space = props.space, hasMedia = !1, dynamicThemeAccess, pseudoGroups, mediaGroups, className = props.className || "", mediaStylesSeen = 0, validStyles2 = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers2.stylePropsText : import_helpers2.validStyles);
|
|
6386
6388
|
process.env.NODE_ENV === "development" && debug === "profile" && time`split-styles-setup`;
|
|
6387
6389
|
var styleState = {
|
|
@@ -7073,7 +7075,7 @@ var require_themeable_native = __commonJS({
|
|
|
7073
7075
|
module2.exports = __toCommonJS2(themeable_exports);
|
|
7074
7076
|
var import_jsx_runtime = require("react/jsx-runtime"), import_react3 = __toESM2(require("react")), import_Theme = require_Theme_native();
|
|
7075
7077
|
function themeable(Component, staticConfig) {
|
|
7076
|
-
var
|
|
7078
|
+
var optimize = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, withThemeComponent = function(props, ref) {
|
|
7077
7079
|
var { themeInverse, theme, componentName, themeReset, ...rest } = props, overriddenContextProps, context = staticConfig == null ? void 0 : staticConfig.context;
|
|
7078
7080
|
if (context) for (var key in context.props) {
|
|
7079
7081
|
var val = props[key];
|
|
@@ -7086,10 +7088,8 @@ var require_themeable_native = __commonJS({
|
|
|
7086
7088
|
...rest,
|
|
7087
7089
|
"data-disable-theme": !0
|
|
7088
7090
|
})
|
|
7089
|
-
), filteredProps =
|
|
7090
|
-
|
|
7091
|
-
};
|
|
7092
|
-
"debug" in props && (filteredProps.debug = props.debug), "theme" in props && (filteredProps.name = props.theme), "themeInverse" in props && (filteredProps.inverse = props.themeInverse), "themeReset" in props && (filteredProps.reset = themeReset);
|
|
7091
|
+
), filteredProps = null, compName = componentName || (staticConfig == null ? void 0 : staticConfig.componentName);
|
|
7092
|
+
if (compName && (filteredProps || (filteredProps = {}), filteredProps.componentName = compName), "debug" in props && (filteredProps || (filteredProps = {}), filteredProps.debug = props.debug), "theme" in props && (filteredProps || (filteredProps = {}), filteredProps.name = props.theme), "themeInverse" in props && (filteredProps || (filteredProps = {}), filteredProps.inverse = props.themeInverse), "themeReset" in props && (filteredProps || (filteredProps = {}), filteredProps.reset = themeReset), optimize && !filteredProps) return element;
|
|
7093
7093
|
var contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Theme.Theme, {
|
|
7094
7094
|
"disable-child-theme": !0,
|
|
7095
7095
|
...filteredProps,
|
|
@@ -7104,8 +7104,8 @@ var require_themeable_native = __commonJS({
|
|
|
7104
7104
|
});
|
|
7105
7105
|
}
|
|
7106
7106
|
return contents;
|
|
7107
|
-
}
|
|
7108
|
-
return withTheme.displayName = `Themed(${(Component == null ? void 0 : Component.displayName) || (Component == null ? void 0 : Component.name) || "Anonymous"})`, withTheme;
|
|
7107
|
+
}, withTheme = withThemeComponent;
|
|
7108
|
+
return withTheme.displayName = `Themed(${(Component == null ? void 0 : Component.displayName) || (Component == null ? void 0 : Component.name) || "Anonymous"})`, optimize ? withTheme : /* @__PURE__ */ import_react3.default.forwardRef(withTheme);
|
|
7109
7109
|
}
|
|
7110
7110
|
}
|
|
7111
7111
|
});
|
|
@@ -8039,7 +8039,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
8039
8039
|
}
|
|
8040
8040
|
function styleable(Component2, options) {
|
|
8041
8041
|
var _Component_render, isForwardedRefAlready = ((_Component_render = Component2.render) === null || _Component_render === void 0 ? void 0 : _Component_render.length) === 2, out = isForwardedRefAlready ? Component2 : /* @__PURE__ */ import_react3.default.forwardRef(Component2), extendedConfig = extendStyledConfig(options == null ? void 0 : options.staticConfig);
|
|
8042
|
-
return out = options != null && options.disableTheme ? out : (0, import_themeable.themeable)(out, extendedConfig), process.env.TAMAGUI_MEMOIZE_STYLEABLE && (out = /* @__PURE__ */ import_react3.default.memo(out)), out.staticConfig = extendedConfig, out.styleable = styleable, out;
|
|
8042
|
+
return out = options != null && options.disableTheme ? out : (0, import_themeable.themeable)(out, extendedConfig, !0), process.env.TAMAGUI_MEMOIZE_STYLEABLE && (out = /* @__PURE__ */ import_react3.default.memo(out)), out.staticConfig = extendedConfig, out.styleable = styleable, out;
|
|
8043
8043
|
}
|
|
8044
8044
|
return res.extractable = extractable, res.styleable = styleable, res;
|
|
8045
8045
|
}
|