@tamagui/core 1.123.8 → 1.123.10
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 +31 -29
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +31 -29
- package/dist/test.native.js.map +3 -3
- package/package.json +8 -8
package/dist/test.native.js
CHANGED
|
@@ -676,7 +676,6 @@ var require_validStyleProps_native = __commonJS({
|
|
|
676
676
|
...textColors
|
|
677
677
|
}
|
|
678
678
|
}, stylePropsUnitless = {
|
|
679
|
-
perspective: !0,
|
|
680
679
|
WebkitLineClamp: !0,
|
|
681
680
|
animationIterationCount: !0,
|
|
682
681
|
aspectRatio: !0,
|
|
@@ -4324,9 +4323,9 @@ var require_expandStyles_native = __commonJS({
|
|
|
4324
4323
|
}
|
|
4325
4324
|
});
|
|
4326
4325
|
|
|
4327
|
-
// ../web/dist/cjs/helpers/
|
|
4328
|
-
var
|
|
4329
|
-
"../web/dist/cjs/helpers/
|
|
4326
|
+
// ../web/dist/cjs/helpers/getCSSStylesAtomic.native.js
|
|
4327
|
+
var require_getCSSStylesAtomic_native = __commonJS({
|
|
4328
|
+
"../web/dist/cjs/helpers/getCSSStylesAtomic.native.js"(exports2, module2) {
|
|
4330
4329
|
"use strict";
|
|
4331
4330
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
4332
4331
|
for (var name in all) __defProp2(target, name, {
|
|
@@ -4360,22 +4359,22 @@ var require_getStylesAtomic_native = __commonJS({
|
|
|
4360
4359
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
4361
4360
|
value: !0
|
|
4362
4361
|
}), mod);
|
|
4363
|
-
},
|
|
4364
|
-
__export2(
|
|
4362
|
+
}, getCSSStylesAtomic_native_exports = {};
|
|
4363
|
+
__export2(getCSSStylesAtomic_native_exports, {
|
|
4364
|
+
getCSSStylesAtomic: function() {
|
|
4365
|
+
return getCSSStylesAtomic;
|
|
4366
|
+
},
|
|
4365
4367
|
getStyleAtomic: function() {
|
|
4366
4368
|
return getStyleAtomic;
|
|
4367
4369
|
},
|
|
4368
|
-
getStylesAtomic: function() {
|
|
4369
|
-
return getStylesAtomic;
|
|
4370
|
-
},
|
|
4371
4370
|
styleToCSS: function() {
|
|
4372
4371
|
return styleToCSS;
|
|
4373
4372
|
}
|
|
4374
4373
|
});
|
|
4375
|
-
module2.exports = __toCommonJS2(
|
|
4374
|
+
module2.exports = __toCommonJS2(getCSSStylesAtomic_native_exports);
|
|
4376
4375
|
var empty = function() {
|
|
4377
4376
|
console.warn("no-op native");
|
|
4378
|
-
},
|
|
4377
|
+
}, getCSSStylesAtomic = empty, getStyleAtomic = empty, styleToCSS = empty;
|
|
4379
4378
|
}
|
|
4380
4379
|
});
|
|
4381
4380
|
|
|
@@ -5374,7 +5373,7 @@ var require_propMapper_native = __commonJS({
|
|
|
5374
5373
|
return;
|
|
5375
5374
|
}
|
|
5376
5375
|
}
|
|
5377
|
-
if (styleProps.disableExpandShorthands || key in conf.shorthands && (key = conf.shorthands[key]), value != null && (value[0] === "$" ? value = getTokenForKey(key, value, styleProps
|
|
5376
|
+
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) {
|
|
5378
5377
|
key === "fontFamily" && lastFontFamilyToken && (styleState.fontFamily = lastFontFamilyToken);
|
|
5379
5378
|
var expanded = styleProps.noExpand ? null : (0, import_expandStyle.expandStyle)(key, value);
|
|
5380
5379
|
if (expanded) for (var max = expanded.length, i = 0; i < max; i++) {
|
|
@@ -5428,7 +5427,7 @@ var require_propMapper_native = __commonJS({
|
|
|
5428
5427
|
if (styleProps.noExpand) res[subKey] = val;
|
|
5429
5428
|
else if (variants && subKey in variants) {
|
|
5430
5429
|
if (parentVariantKey && parentVariantKey === key) res[subKey] = // SYNC WITH *1
|
|
5431
|
-
val[0] === "$" ? getTokenForKey(subKey, val, styleProps
|
|
5430
|
+
val[0] === "$" ? getTokenForKey(subKey, val, styleProps, styleState) : val;
|
|
5432
5431
|
else {
|
|
5433
5432
|
var variantOut = resolveVariants(subKey, val, styleProps, styleState, key);
|
|
5434
5433
|
if (variantOut) {
|
|
@@ -5461,7 +5460,7 @@ var require_propMapper_native = __commonJS({
|
|
|
5461
5460
|
if (typeof val == "string") {
|
|
5462
5461
|
var fVal = (
|
|
5463
5462
|
// SYNC WITH *1
|
|
5464
|
-
val[0] === "$" ? getTokenForKey(subKey, val, styleProps
|
|
5463
|
+
val[0] === "$" ? getTokenForKey(subKey, val, styleProps, styleState) : val
|
|
5465
5464
|
);
|
|
5466
5465
|
res[subKey] = fVal;
|
|
5467
5466
|
continue;
|
|
@@ -5517,16 +5516,18 @@ var require_propMapper_native = __commonJS({
|
|
|
5517
5516
|
var fontShorthand = {
|
|
5518
5517
|
fontSize: "size",
|
|
5519
5518
|
fontWeight: "weight"
|
|
5520
|
-
}, lastFontFamilyToken = null, getTokenForKey = function(key, value) {
|
|
5521
|
-
var resolveAs =
|
|
5519
|
+
}, lastFontFamilyToken = null, getTokenForKey = function(key, value, styleProps, styleState) {
|
|
5520
|
+
var _staticConfig_accept, resolveAs = styleProps.resolveValues || "none";
|
|
5522
5521
|
if (resolveAs === "none") return value;
|
|
5523
5522
|
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];
|
|
5524
5523
|
if (customTokenAccept) {
|
|
5525
5524
|
var _theme_value, val = (_theme_value = theme == null ? void 0 : theme[value]) !== null && _theme_value !== void 0 ? _theme_value : tokensParsed[customTokenAccept][value];
|
|
5526
5525
|
val != null && (resolveAs = "value", valOrVar = val, hasSet = !0);
|
|
5527
5526
|
}
|
|
5528
|
-
if (theme && value in theme)
|
|
5529
|
-
|
|
5527
|
+
if (theme && value in theme) {
|
|
5528
|
+
if (resolveAs === "except-theme") return value;
|
|
5529
|
+
valOrVar = theme[value], hasSet = !0;
|
|
5530
|
+
} else {
|
|
5530
5531
|
if (value in conf.specificTokens) hasSet = !0, valOrVar = conf.specificTokens[value];
|
|
5531
5532
|
else {
|
|
5532
5533
|
switch (key) {
|
|
@@ -5676,6 +5677,7 @@ var require_transformsToString_native = __commonJS({
|
|
|
5676
5677
|
// { scale: 2 } => 'scale(2)'
|
|
5677
5678
|
// { translateX: 20 } => 'translateX(20px)'
|
|
5678
5679
|
// { matrix: [1,2,3,4,5,6] } => 'matrix(1,2,3,4,5,6)'
|
|
5680
|
+
// { perspective: 1000 } => perspective(1000px)
|
|
5679
5681
|
function(transform) {
|
|
5680
5682
|
var type = Object.keys(transform)[0], value = transform[type];
|
|
5681
5683
|
return type === "matrix" || type === "matrix3d" ? `${type}(${value.join(",")})` : `${type}(${(0, import_normalizeValueWithProperty.normalizeValueWithProperty)(value, type)})`;
|
|
@@ -5749,7 +5751,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5749
5751
|
}
|
|
5750
5752
|
});
|
|
5751
5753
|
module2.exports = __toCommonJS2(getSplitStyles_exports);
|
|
5752
|
-
var import_constants2 = require_index_native2(), import_helpers2 = require_index_native3(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_accessibilityDirectMap = require_accessibilityDirectMap_native(), import_constants22 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_useMedia = require_useMedia_native(), import_createMediaStyle = require_createMediaStyle_native(), import_expandStyles = require_expandStyles_native(),
|
|
5754
|
+
var import_constants2 = require_index_native2(), import_helpers2 = require_index_native3(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_accessibilityDirectMap = require_accessibilityDirectMap_native(), import_constants22 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_useMedia = require_useMedia_native(), import_createMediaStyle = require_createMediaStyle_native(), import_expandStyles = require_expandStyles_native(), import_getCSSStylesAtomic = require_getCSSStylesAtomic_native(), import_getGroupPropParts = require_getGroupPropParts_native(), import_insertStyleRule = require_insertStyleRule_native(), import_isActivePlatform = require_isActivePlatform_native(), import_isActiveTheme = require_isActiveTheme_native(), import_log = require_log_native(), import_normalizeValueWithProperty = require_normalizeValueWithProperty_native(), import_propMapper = require_propMapper_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_skipProps = require_skipProps_native(), import_sortString = require_sortString_native(), import_transformsToString = require_transformsToString_native(), consoleGroupCollapsed = import_constants2.isWeb ? console.groupCollapsed : console.info, conf, PROP_SPLIT = "-";
|
|
5753
5755
|
function isValidStyleKey(key, validStyles2, accept) {
|
|
5754
5756
|
return key in validStyles2 ? !0 : accept && key in accept;
|
|
5755
5757
|
}
|
|
@@ -5840,7 +5842,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5840
5842
|
var descriptor = import_pseudoDescriptors.pseudoDescriptors[key4], isEnter = key4 === "enterStyle", isExit = key4 === "exitStyle";
|
|
5841
5843
|
if (!descriptor) return;
|
|
5842
5844
|
if (shouldDoClasses && !isExit) {
|
|
5843
|
-
var pseudoStyles = (0,
|
|
5845
|
+
var pseudoStyles = (0, import_getCSSStylesAtomic.getStyleAtomic)(pseudoStyleObject, descriptor), _iteratorNormalCompletion2 = !0, _didIteratorError2 = !1, _iteratorError2 = void 0;
|
|
5844
5846
|
try {
|
|
5845
5847
|
for (var _iterator2 = pseudoStyles[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = !0) {
|
|
5846
5848
|
var psuedoStyle = _step2.value, fullKey = `${psuedoStyle[import_helpers2.StyleObjectProperty]}${PROP_SPLIT}${descriptor.name}`;
|
|
@@ -5891,7 +5893,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5891
5893
|
var importance1 = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKeyShort, "space", usedKeys, !0);
|
|
5892
5894
|
importance1 && (space = val2.space, usedKeys.space = importance1);
|
|
5893
5895
|
}
|
|
5894
|
-
var mediaStyles = (0,
|
|
5896
|
+
var mediaStyles = (0, import_getCSSStylesAtomic.getCSSStylesAtomic)(mediaStyle), priority = mediaStylesSeen;
|
|
5895
5897
|
mediaStylesSeen += 1;
|
|
5896
5898
|
var _iteratorNormalCompletion12 = !0, _didIteratorError12 = !1, _iteratorError12 = void 0;
|
|
5897
5899
|
try {
|
|
@@ -5968,7 +5970,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5968
5970
|
}
|
|
5969
5971
|
});
|
|
5970
5972
|
};
|
|
5971
|
-
|
|
5973
|
+
conf = conf || (0, import_config.getConfig)(), import_constants2.isWeb && styleProps.isAnimated && conf.animations.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
|
|
5972
5974
|
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), styleState = {
|
|
5973
5975
|
classNames,
|
|
5974
5976
|
conf,
|
|
@@ -5995,7 +5997,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5995
5997
|
for (var keyOg in props) _loop(keyOg);
|
|
5996
5998
|
var avoidNormalize = styleProps.noNormalize === !1;
|
|
5997
5999
|
if (!avoidNormalize) {
|
|
5998
|
-
if (styleState.style && ((0, import_expandStyles.fixStyles)(styleState.style), import_constants2.isWeb && !isReactNative && (0,
|
|
6000
|
+
if (styleState.style && ((0, import_expandStyles.fixStyles)(styleState.style), !styleProps.noExpand && !styleProps.noMergeStyle && import_constants2.isWeb && !isReactNative && (0, import_getCSSStylesAtomic.styleToCSS)(styleState.style)), styleState.flatTransforms) {
|
|
5999
6001
|
var _styleState;
|
|
6000
6002
|
(_styleState = styleState).style || (_styleState.style = {}), Object.entries(styleState.flatTransforms).sort(function(param, param1) {
|
|
6001
6003
|
var [a] = param, [b] = param1;
|
|
@@ -6015,7 +6017,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6015
6017
|
}
|
|
6016
6018
|
if (0) var _styleState_style, shouldStringifyTransforms;
|
|
6017
6019
|
if (0) {
|
|
6018
|
-
if (styleState.style && shouldDoClasses) {
|
|
6020
|
+
if (!styleProps.noMergeStyle && styleState.style && shouldDoClasses) {
|
|
6019
6021
|
var retainedStyles, shouldRetain;
|
|
6020
6022
|
if (!styleState.style.$$css) {
|
|
6021
6023
|
var atomic, _iteratorNormalCompletion, _didIteratorError, _iteratorError;
|
|
@@ -6035,7 +6037,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6035
6037
|
} else if (viewProps.tabIndex == null) var _viewProps_focusable, isFocusable, role;
|
|
6036
6038
|
}
|
|
6037
6039
|
var styleProp = props.style;
|
|
6038
|
-
if (styleProp) if (isHOC) viewProps.style = normalizeStyle(styleProp);
|
|
6040
|
+
if (!styleProps.noMergeStyle && styleProp) if (isHOC) viewProps.style = normalizeStyle(styleProp);
|
|
6039
6041
|
else for (var isArray = Array.isArray(styleProp), len = isArray ? styleProp.length : 1, i = 0; i < len; i++) {
|
|
6040
6042
|
var style = isArray ? styleProp[i] : styleProp;
|
|
6041
6043
|
if (style) if (style.$$css) Object.assign(styleState.classNames, style);
|
|
@@ -6065,11 +6067,11 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6065
6067
|
pseudoGroups,
|
|
6066
6068
|
mediaGroups
|
|
6067
6069
|
}, asChildExceptStyleLike = asChild === "except-style" || asChild === "except-style-web";
|
|
6068
|
-
if (!asChildExceptStyleLike) {
|
|
6070
|
+
if (!styleProps.noMergeStyle && !asChildExceptStyleLike) {
|
|
6069
6071
|
var style2 = styleState.style;
|
|
6070
6072
|
if (0) {
|
|
6071
6073
|
var _staticConfig_defaultProps, fontFamily, fontFamilyClassName, groupClassName, componentNameFinal, componentClassName, classList, finalClassName;
|
|
6072
|
-
if (!
|
|
6074
|
+
if (!(styleProps.isAnimated && !conf.animations.supportsCSSVars && isReactNative) && isReactNative) {
|
|
6073
6075
|
var cnStyles, _iteratorNormalCompletion1, _didIteratorError1, _iteratorError1;
|
|
6074
6076
|
try {
|
|
6075
6077
|
for (var _iterator1, _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = !0) var name;
|
|
@@ -6077,7 +6079,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6077
6079
|
} finally {
|
|
6078
6080
|
}
|
|
6079
6081
|
}
|
|
6080
|
-
} else style2 &&
|
|
6082
|
+
} else style2 && (viewProps.style = style2);
|
|
6081
6083
|
}
|
|
6082
6084
|
if (0)
|
|
6083
6085
|
try {
|
|
@@ -10131,7 +10133,7 @@ var require_index_native8 = __commonJS({
|
|
|
10131
10133
|
__reExport2(index_exports2, require_expandStyles_native(), module2.exports);
|
|
10132
10134
|
__reExport2(index_exports2, require_getExpandedShorthands_native(), module2.exports);
|
|
10133
10135
|
__reExport2(index_exports2, require_getSplitStyles_native(), module2.exports);
|
|
10134
|
-
__reExport2(index_exports2,
|
|
10136
|
+
__reExport2(index_exports2, require_getCSSStylesAtomic_native(), module2.exports);
|
|
10135
10137
|
__reExport2(index_exports2, require_createComponent_native(), module2.exports);
|
|
10136
10138
|
__reExport2(index_exports2, require_getThemeCSSRules_native(), module2.exports);
|
|
10137
10139
|
__reExport2(index_exports2, require_getVariantExtras_native(), module2.exports);
|