@tamagui/core 1.88.19 → 1.88.21
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/cjs/index.js +8 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/esm/index.js +9 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.mjs +3 -3
- package/dist/esm/index.native.js.map +1 -1
- package/dist/native.js +91 -68
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +86 -63
- package/dist/test.native.js.map +3 -3
- package/package.json +6 -6
- package/src/index.tsx +9 -6
- package/types/index.d.ts.map +1 -1
package/dist/test.native.js
CHANGED
|
@@ -2500,6 +2500,55 @@ var require_defaultComponentState_native = __commonJS({
|
|
|
2500
2500
|
}
|
|
2501
2501
|
});
|
|
2502
2502
|
|
|
2503
|
+
// ../web/dist/cjs/helpers/skipProps.native.js
|
|
2504
|
+
var require_skipProps_native = __commonJS({
|
|
2505
|
+
"../web/dist/cjs/helpers/skipProps.native.js"(exports2, module2) {
|
|
2506
|
+
"use strict";
|
|
2507
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = (target, all) => {
|
|
2508
|
+
for (var name in all)
|
|
2509
|
+
__defProp2(target, name, { get: all[name], enumerable: !0 });
|
|
2510
|
+
}, __copyProps2 = (to, from, except, desc) => {
|
|
2511
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
2512
|
+
for (let key of __getOwnPropNames2(from))
|
|
2513
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
2514
|
+
return to;
|
|
2515
|
+
}, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), skipProps_exports = {};
|
|
2516
|
+
__export2(skipProps_exports, {
|
|
2517
|
+
skipProps: () => skipProps
|
|
2518
|
+
});
|
|
2519
|
+
module2.exports = __toCommonJS2(skipProps_exports);
|
|
2520
|
+
var skipProps = {
|
|
2521
|
+
untilMeasured: 1,
|
|
2522
|
+
animation: 1,
|
|
2523
|
+
space: 1,
|
|
2524
|
+
animateOnly: 1,
|
|
2525
|
+
disableClassName: 1,
|
|
2526
|
+
debug: 1,
|
|
2527
|
+
componentName: 1,
|
|
2528
|
+
disableOptimization: 1,
|
|
2529
|
+
tag: 1,
|
|
2530
|
+
style: 1,
|
|
2531
|
+
// handled after loop so pseudos set usedKeys and override it if necessary
|
|
2532
|
+
group: 1
|
|
2533
|
+
};
|
|
2534
|
+
skipProps["data-test-renders"] = 1;
|
|
2535
|
+
Object.assign(skipProps, {
|
|
2536
|
+
whiteSpace: 1,
|
|
2537
|
+
wordWrap: 1,
|
|
2538
|
+
textOverflow: 1,
|
|
2539
|
+
textDecorationDistance: 1,
|
|
2540
|
+
cursor: 1,
|
|
2541
|
+
contain: 1,
|
|
2542
|
+
boxSizing: 1,
|
|
2543
|
+
boxShadow: 1,
|
|
2544
|
+
outlineStyle: 1,
|
|
2545
|
+
outlineOffset: 1,
|
|
2546
|
+
outlineWidth: 1,
|
|
2547
|
+
outlineColor: 1
|
|
2548
|
+
});
|
|
2549
|
+
}
|
|
2550
|
+
});
|
|
2551
|
+
|
|
2503
2552
|
// ../web/dist/cjs/constants/accessibilityDirectMap.native.js
|
|
2504
2553
|
var require_accessibilityDirectMap_native = __commonJS({
|
|
2505
2554
|
"../web/dist/cjs/constants/accessibilityDirectMap.native.js"(exports2, module2) {
|
|
@@ -3592,7 +3641,7 @@ var require_propMapper_native = __commonJS({
|
|
|
3592
3641
|
propMapper: () => propMapper
|
|
3593
3642
|
});
|
|
3594
3643
|
module2.exports = __toCommonJS2(propMapper_exports);
|
|
3595
|
-
var import_constants = require_index_native3(), import_helpers = require_index_native4(), import_config = require_config_native(), import_createVariable = require_createVariable_native(), import_expandStyle = require_expandStyle_native(), import_normalizeStyle = require_normalizeStyle_native(), import_getVariantExtras = require_getVariantExtras_native(), import_isObj = require_isObj_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), propMapper = (key, value, styleStateIn, subPropsIn) => {
|
|
3644
|
+
var import_constants = require_index_native3(), import_helpers = require_index_native4(), import_config = require_config_native(), import_createVariable = require_createVariable_native(), import_expandStyle = require_expandStyle_native(), import_normalizeStyle = require_normalizeStyle_native(), import_getVariantExtras = require_getVariantExtras_native(), import_isObj = require_isObj_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_skipProps = require_skipProps_native(), propMapper = (key, value, styleStateIn, subPropsIn) => {
|
|
3596
3645
|
var _a;
|
|
3597
3646
|
if (lastFontFamilyToken = null, !import_constants.isAndroid && key === "elevationAndroid")
|
|
3598
3647
|
return;
|
|
@@ -3673,37 +3722,39 @@ var require_propMapper_native = __commonJS({
|
|
|
3673
3722
|
let { conf, staticConfig, debug, theme } = styleState, { variants } = staticConfig, res = {};
|
|
3674
3723
|
for (let _key in value) {
|
|
3675
3724
|
let subKey = conf.shorthands[_key] || _key, val = value[_key];
|
|
3676
|
-
if (styleProps.
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
if (
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3725
|
+
if (!(!styleProps.noSkip && subKey in import_skipProps.skipProps)) {
|
|
3726
|
+
if (styleProps.noExpand)
|
|
3727
|
+
res[subKey] = val;
|
|
3728
|
+
else if (variants && subKey in variants) {
|
|
3729
|
+
if (styleState.curProps[subKey] = val, parentVariantKey && parentVariantKey === key)
|
|
3730
|
+
res[subKey] = // SYNC WITH *1
|
|
3731
|
+
val[0] === "$" ? getTokenForKey(subKey, val, styleProps.resolveValues, styleState) : val;
|
|
3732
|
+
else {
|
|
3733
|
+
let variantOut = resolveVariants(subKey, val, styleProps, styleState, key);
|
|
3734
|
+
if (variantOut)
|
|
3735
|
+
for (let [key2, val2] of variantOut)
|
|
3736
|
+
val2 != null && (key2 in import_pseudoDescriptors.pseudoDescriptors ? (res[key2] ?? (res[key2] = {}), Object.assign(res[key2], val2)) : res[key2] = val2);
|
|
3737
|
+
}
|
|
3738
|
+
continue;
|
|
3687
3739
|
}
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3740
|
+
if ((0, import_createVariable.isVariable)(val)) {
|
|
3741
|
+
res[subKey] = resolveVariableValue(subKey, val, styleProps.resolveValues);
|
|
3742
|
+
continue;
|
|
3743
|
+
}
|
|
3744
|
+
if (typeof val == "string") {
|
|
3745
|
+
let fVal = (
|
|
3746
|
+
// SYNC WITH *1
|
|
3747
|
+
val[0] === "$" ? getTokenForKey(subKey, val, styleProps.resolveValues, styleState) : val
|
|
3748
|
+
);
|
|
3749
|
+
res[subKey] = fVal;
|
|
3750
|
+
continue;
|
|
3751
|
+
}
|
|
3752
|
+
if ((0, import_isObj.isObj)(val)) {
|
|
3753
|
+
let subObject = resolveTokensAndVariants(subKey, val, styleProps, styleState, key);
|
|
3754
|
+
res[subKey] ?? (res[subKey] = {}), Object.assign(res[subKey], subObject);
|
|
3755
|
+
} else
|
|
3756
|
+
res[subKey] = val;
|
|
3701
3757
|
}
|
|
3702
|
-
if ((0, import_isObj.isObj)(val)) {
|
|
3703
|
-
let subObject = resolveTokensAndVariants(subKey, val, styleProps, styleState, key);
|
|
3704
|
-
res[subKey] ?? (res[subKey] = {}), Object.assign(res[subKey], subObject);
|
|
3705
|
-
} else
|
|
3706
|
-
res[subKey] = val;
|
|
3707
3758
|
}
|
|
3708
3759
|
return res;
|
|
3709
3760
|
}, tokenCats = ["size", "color", "radius", "space", "zIndex"].map((name) => ({
|
|
@@ -3810,7 +3861,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
3810
3861
|
useSplitStyles: () => useSplitStyles
|
|
3811
3862
|
});
|
|
3812
3863
|
module2.exports = __toCommonJS2(getSplitStyles_exports);
|
|
3813
|
-
var import_constants = require_index_native3(), import_helpers = require_index_native4(), import_react3 = require("react"), import_config = require_config_native(), import_accessibilityDirectMap = require_accessibilityDirectMap_native(), import_constants2 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_useMedia = require_useMedia_native(), import_createMediaStyle = require_createMediaStyle_native(), import_expandStyles = require_expandStyles_native(), import_getGroupPropParts = require_getGroupPropParts_native(), import_getStylesAtomic = require_getStylesAtomic_native(), import_insertStyleRule = require_insertStyleRule_native(), import_log = require_log_native(), import_normalizeValueWithProperty = require_normalizeValueWithProperty_native(), import_propMapper = require_propMapper_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_isObj = require_isObj_native(), IS_STATIC = process.env.IS_STATIC === "is_static", conf, PROP_SPLIT = "-";
|
|
3864
|
+
var import_constants = require_index_native3(), import_helpers = require_index_native4(), import_react3 = require("react"), import_config = require_config_native(), import_skipProps = require_skipProps_native(), import_accessibilityDirectMap = require_accessibilityDirectMap_native(), import_constants2 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_useMedia = require_useMedia_native(), import_createMediaStyle = require_createMediaStyle_native(), import_expandStyles = require_expandStyles_native(), import_getGroupPropParts = require_getGroupPropParts_native(), import_getStylesAtomic = require_getStylesAtomic_native(), import_insertStyleRule = require_insertStyleRule_native(), import_log = require_log_native(), import_normalizeValueWithProperty = require_normalizeValueWithProperty_native(), import_propMapper = require_propMapper_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_isObj = require_isObj_native(), IS_STATIC = process.env.IS_STATIC === "is_static", conf, PROP_SPLIT = "-";
|
|
3814
3865
|
function isValidStyleKey(key, staticConfig) {
|
|
3815
3866
|
var _a;
|
|
3816
3867
|
return (staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers.stylePropsText : import_helpers.validStyles))[key] || ((_a = staticConfig.acceptTokens) == null ? void 0 : _a[key]);
|
|
@@ -3845,7 +3896,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
3845
3896
|
};
|
|
3846
3897
|
for (let keyOg in props) {
|
|
3847
3898
|
let keyInit = keyOg, valInit = props[keyOg];
|
|
3848
|
-
if (styleProps.disableExpandShorthands || keyInit in shorthands && (keyInit = shorthands[keyInit]), keyInit === "className" || keyInit in usedKeys || keyInit in skipProps && !styleProps.noSkip && !isHOC)
|
|
3899
|
+
if (styleProps.disableExpandShorthands || keyInit in shorthands && (keyInit = shorthands[keyInit]), keyInit === "className" || keyInit in usedKeys || keyInit in import_skipProps.skipProps && !styleProps.noSkip && !isHOC)
|
|
3849
3900
|
continue;
|
|
3850
3901
|
let valInitType = typeof valInit, isValidStyleKeyInit = isValidStyleKey(keyInit, staticConfig);
|
|
3851
3902
|
if (valInit !== props[keyInit] && (styleState.curProps[keyInit] = valInit), !isValidStyleKeyInit) {
|
|
@@ -3903,8 +3954,8 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
3903
3954
|
if (isStyleProp && (props.asChild === "except-style" || props.asChild === "except-style-web"))
|
|
3904
3955
|
continue;
|
|
3905
3956
|
let shouldPassProp = !isStyleProp || // is in parent variants
|
|
3906
|
-
isHOC && (parentStaticConfig == null ? void 0 : parentStaticConfig.variants) && keyInit in parentStaticConfig.variants || (inlineProps == null ? void 0 : inlineProps.has(keyInit)), parentVariant = (_a = parentStaticConfig == null ? void 0 : parentStaticConfig.variants) == null ? void 0 : _a[keyInit], isHOCShouldPassThrough = !!(isHOC && (isShorthand || isValidStyleKeyInit || isMediaOrPseudo || parentVariant || keyInit in skipProps));
|
|
3907
|
-
if ((shouldPassProp || isHOCShouldPassThrough) && (passDownProp(viewProps, keyInit, valInit, isMediaOrPseudo), !isVariant) || !styleProps.noSkip && keyInit in skipProps)
|
|
3957
|
+
isHOC && (parentStaticConfig == null ? void 0 : parentStaticConfig.variants) && keyInit in parentStaticConfig.variants || (inlineProps == null ? void 0 : inlineProps.has(keyInit)), parentVariant = (_a = parentStaticConfig == null ? void 0 : parentStaticConfig.variants) == null ? void 0 : _a[keyInit], isHOCShouldPassThrough = !!(isHOC && (isShorthand || isValidStyleKeyInit || isMediaOrPseudo || parentVariant || keyInit in import_skipProps.skipProps));
|
|
3958
|
+
if ((shouldPassProp || isHOCShouldPassThrough) && (passDownProp(viewProps, keyInit, valInit, isMediaOrPseudo), !isVariant) || !styleProps.noSkip && keyInit in import_skipProps.skipProps)
|
|
3908
3959
|
continue;
|
|
3909
3960
|
if ((isText || isInput) && valInit && (keyInit === "fontFamily" || keyInit === shorthands.fontFamily) && valInit in conf.fontsParsed && (styleState.fontFamily = valInit), isValidStyleKeyInit && !variants && valInit !== "unset" && (valInitType === "number" || valInitType === "string" && valInit[0] !== "$")) {
|
|
3910
3961
|
style[keyInit] = valInit;
|
|
@@ -4141,7 +4192,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
4141
4192
|
let val = styleIn[key];
|
|
4142
4193
|
key = conf2.shorthands[key] || key;
|
|
4143
4194
|
let expanded = (0, import_propMapper.propMapper)(key, val, styleState, { ...props, ...props[subKey] });
|
|
4144
|
-
if (!(!expanded || !staticConfig.isHOC && key in skipProps && !styleProps.noSkip))
|
|
4195
|
+
if (!(!expanded || !staticConfig.isHOC && key in import_skipProps.skipProps && !styleProps.noSkip))
|
|
4145
4196
|
for (let [skey, sval] of expanded)
|
|
4146
4197
|
!avoidMergeTransform && skey in import_helpers.stylePropsTransform ? mergeTransform(styleOut, skey, sval) : styleOut[skey] = styleProps.noNormalize ? sval : (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(sval, key);
|
|
4147
4198
|
}
|
|
@@ -4161,35 +4212,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
4161
4212
|
}, mapTransformKeys = {
|
|
4162
4213
|
x: "translateX",
|
|
4163
4214
|
y: "translateY"
|
|
4164
|
-
}, skipProps = {
|
|
4165
|
-
untilMeasured: 1,
|
|
4166
|
-
animation: 1,
|
|
4167
|
-
space: 1,
|
|
4168
|
-
animateOnly: 1,
|
|
4169
|
-
disableClassName: 1,
|
|
4170
|
-
debug: 1,
|
|
4171
|
-
componentName: 1,
|
|
4172
|
-
disableOptimization: 1,
|
|
4173
|
-
tag: 1,
|
|
4174
|
-
style: 1,
|
|
4175
|
-
// handled after loop so pseudos set usedKeys and override it if necessary
|
|
4176
|
-
group: 1
|
|
4177
4215
|
};
|
|
4178
|
-
skipProps["data-test-renders"] = 1;
|
|
4179
|
-
Object.assign(skipProps, {
|
|
4180
|
-
whiteSpace: 1,
|
|
4181
|
-
wordWrap: 1,
|
|
4182
|
-
textOverflow: 1,
|
|
4183
|
-
textDecorationDistance: 1,
|
|
4184
|
-
cursor: 1,
|
|
4185
|
-
contain: 1,
|
|
4186
|
-
boxSizing: 1,
|
|
4187
|
-
boxShadow: 1,
|
|
4188
|
-
outlineStyle: 1,
|
|
4189
|
-
outlineOffset: 1,
|
|
4190
|
-
outlineWidth: 1,
|
|
4191
|
-
outlineColor: 1
|
|
4192
|
-
});
|
|
4193
4216
|
function passDownProp(viewProps, key, val, shouldMergeObject = !1) {
|
|
4194
4217
|
if (shouldMergeObject) {
|
|
4195
4218
|
let next = {
|