@tamagui/core 1.90.0 → 1.90.2
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 +228 -232
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +169 -177
- package/dist/test.native.js.map +2 -2
- package/package.json +6 -6
package/dist/native.js
CHANGED
|
@@ -3138,9 +3138,6 @@ var require_useMedia_native = __commonJS({
|
|
|
3138
3138
|
mediaState: function() {
|
|
3139
3139
|
return mediaState2;
|
|
3140
3140
|
},
|
|
3141
|
-
mergeMediaByImportance: function() {
|
|
3142
|
-
return mergeMediaByImportance;
|
|
3143
|
-
},
|
|
3144
3141
|
setMediaShouldUpdate: function() {
|
|
3145
3142
|
return setMediaShouldUpdate;
|
|
3146
3143
|
},
|
|
@@ -3359,10 +3356,6 @@ var require_useMedia_native = __commonJS({
|
|
|
3359
3356
|
var conf = (0, import_config.getConfig)(), importance = isSizeMedia && !conf.settings.mediaPropOrder ? getMediaKeyImportance(mediaKey) : defaultMediaImportance;
|
|
3360
3357
|
return !importancesUsed[key] || importance > importancesUsed[key] ? importance : null;
|
|
3361
3358
|
};
|
|
3362
|
-
function mergeMediaByImportance(onto, mediaKey, key, value, importancesUsed, isSizeMedia, importanceBump) {
|
|
3363
|
-
var importance = getMediaImportanceIfMoreImportant(mediaKey, key, importancesUsed, isSizeMedia);
|
|
3364
|
-
return importanceBump && (importance = (importance || 0) + importanceBump), importance === null ? !1 : (importancesUsed[key] = importance, onto[key] = value, !0);
|
|
3365
|
-
}
|
|
3366
3359
|
function camelToHyphen(str) {
|
|
3367
3360
|
return str.replace(/[A-Z]/g, function(m) {
|
|
3368
3361
|
return "-".concat(m.toLowerCase());
|
|
@@ -7721,253 +7714,252 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7721
7714
|
isHOCShouldPassThrough,
|
|
7722
7715
|
curProps: _object_spread2({}, styleState.curProps),
|
|
7723
7716
|
parentStaticConfig
|
|
7724
|
-
})),
|
|
7725
|
-
|
|
7726
|
-
|
|
7727
|
-
|
|
7728
|
-
|
|
7729
|
-
|
|
7730
|
-
|
|
7731
|
-
|
|
7732
|
-
|
|
7733
|
-
|
|
7734
|
-
|
|
7735
|
-
|
|
7736
|
-
|
|
7737
|
-
|
|
7738
|
-
|
|
7739
|
-
|
|
7740
|
-
|
|
7741
|
-
|
|
7742
|
-
|
|
7743
|
-
|
|
7744
|
-
|
|
7745
|
-
|
|
7746
|
-
|
|
7747
|
-
|
|
7717
|
+
})), shouldPassThrough && (passDownProp(viewProps, keyInit, valInit, isMediaOrPseudo1), !isVariant)) {
|
|
7718
|
+
process.env.NODE_ENV === "development" && debug === "verbose" && console.groupEnd();
|
|
7719
|
+
continue;
|
|
7720
|
+
}
|
|
7721
|
+
if (!styleProps.noSkip && keyInit in import_skipProps.skipProps) {
|
|
7722
|
+
process.env.NODE_ENV === "development" && debug === "verbose" && console.groupEnd();
|
|
7723
|
+
continue;
|
|
7724
|
+
}
|
|
7725
|
+
(isText || isInput) && valInit && (keyInit === "fontFamily" || keyInit === shorthands.fontFamily) && valInit in conf.fontsParsed && (styleState.fontFamily = valInit);
|
|
7726
|
+
var avoidPropMap = isMediaOrPseudo1 || !isVariant && !isValidStyleKeyInit, expanded = avoidPropMap ? null : (0, import_propMapper.propMapper)(keyInit, valInit, styleState);
|
|
7727
|
+
if (!avoidPropMap) {
|
|
7728
|
+
if (!expanded)
|
|
7729
|
+
continue;
|
|
7730
|
+
var next = (0, import_propMapper.getPropMappedFontFamily)(expanded);
|
|
7731
|
+
next && (styleState.fontFamily = next);
|
|
7732
|
+
}
|
|
7733
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
7734
|
+
console.groupCollapsed(" \u{1F4A0} expanded", keyInit, valInit);
|
|
7735
|
+
try {
|
|
7736
|
+
!import_constants.isServer && import_isDevTools.isDevTools && ((0, import_log.log)({
|
|
7737
|
+
expanded,
|
|
7738
|
+
styleProps,
|
|
7739
|
+
componentState,
|
|
7740
|
+
isVariant,
|
|
7741
|
+
variant: variants == null ? void 0 : variants[keyInit],
|
|
7742
|
+
shouldPassProp,
|
|
7743
|
+
isHOCShouldPassThrough,
|
|
7744
|
+
theme,
|
|
7745
|
+
usedKeys: _object_spread2({}, usedKeys),
|
|
7746
|
+
curProps: _object_spread2({}, styleState.curProps)
|
|
7747
|
+
}), (0, import_log.log)("expanded", expanded, `
|
|
7748
7748
|
usedKeys`, _object_spread2({}, usedKeys), `
|
|
7749
7749
|
current`, _object_spread2({}, styleState.style)));
|
|
7750
|
-
|
|
7751
|
-
|
|
7752
|
-
|
|
7750
|
+
} catch {
|
|
7751
|
+
}
|
|
7752
|
+
console.groupEnd();
|
|
7753
|
+
}
|
|
7754
|
+
for (var key = keyInit, val = valInit, max = expanded ? expanded.length : 1, i = 0; i < max; i++) {
|
|
7755
|
+
var _parentStaticConfig_variants1;
|
|
7756
|
+
if (expanded) {
|
|
7757
|
+
var _expanded_i = _sliced_to_array(expanded[i], 2), k = _expanded_i[0], v = _expanded_i[1];
|
|
7758
|
+
key = k, val = v;
|
|
7753
7759
|
}
|
|
7754
|
-
|
|
7755
|
-
|
|
7756
|
-
|
|
7757
|
-
|
|
7758
|
-
key = k, val = v;
|
|
7760
|
+
if (val != null && !(key in usedKeys)) {
|
|
7761
|
+
if (isPseudo = key in import_helpers.validPseudoKeys, isMedia = !isPseudo && !isValidStyleKeyInit && (0, import_useMedia.isMediaKey)(key), isMediaOrPseudo1 = !!(isMedia || isPseudo), isVariant = variants && key in variants, inlineProps != null && inlineProps.has(key) || IS_STATIC && inlineWhenUnflattened != null && inlineWhenUnflattened.has(key)) {
|
|
7762
|
+
var _props_key;
|
|
7763
|
+
viewProps[key] = (_props_key = props[key]) !== null && _props_key !== void 0 ? _props_key : val;
|
|
7759
7764
|
}
|
|
7760
|
-
|
|
7761
|
-
|
|
7762
|
-
|
|
7763
|
-
|
|
7764
|
-
|
|
7765
|
-
|
|
7766
|
-
|
|
7767
|
-
|
|
7768
|
-
|
|
7769
|
-
|
|
7770
|
-
}), console.groupEnd());
|
|
7765
|
+
var shouldPassThrough1 = styleProps.noExpand && isPseudo || isHOC && (isMediaOrPseudo1 || (parentStaticConfig == null || (_parentStaticConfig_variants1 = parentStaticConfig.variants) === null || _parentStaticConfig_variants1 === void 0 ? void 0 : _parentStaticConfig_variants1[keyInit]));
|
|
7766
|
+
if (shouldPassThrough1) {
|
|
7767
|
+
passDownProp(viewProps, key, val, isMediaOrPseudo1), process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed(" - passing down prop ".concat(key)), (0, import_log.log)({
|
|
7768
|
+
val,
|
|
7769
|
+
after: _object_spread2({}, viewProps[key])
|
|
7770
|
+
}), console.groupEnd());
|
|
7771
|
+
continue;
|
|
7772
|
+
}
|
|
7773
|
+
if (isPseudo) {
|
|
7774
|
+
if (!val)
|
|
7771
7775
|
continue;
|
|
7772
|
-
|
|
7773
|
-
if (
|
|
7774
|
-
|
|
7775
|
-
|
|
7776
|
-
var
|
|
7777
|
-
if (
|
|
7776
|
+
var pseudoStyleObject = getSubStyle(styleState, key, val, styleProps.noClassNames), descriptor = import_pseudoDescriptors.pseudoDescriptors[key], isEnter = key === "enterStyle", isExit = key === "exitStyle";
|
|
7777
|
+
if (!descriptor)
|
|
7778
|
+
continue;
|
|
7779
|
+
if (!shouldDoClasses || IS_STATIC) {
|
|
7780
|
+
var _pseudos, _key;
|
|
7781
|
+
if (pseudos || (pseudos = {}), (_pseudos = pseudos)[_key = key] || (_pseudos[_key] = {}), IS_STATIC) {
|
|
7782
|
+
Object.assign(pseudos[key], pseudoStyleObject);
|
|
7778
7783
|
continue;
|
|
7779
|
-
if (!shouldDoClasses || IS_STATIC) {
|
|
7780
|
-
var _pseudos, _key;
|
|
7781
|
-
if (pseudos || (pseudos = {}), (_pseudos = pseudos)[_key = key] || (_pseudos[_key] = {}), IS_STATIC) {
|
|
7782
|
-
Object.assign(pseudos[key], pseudoStyleObject);
|
|
7783
|
-
continue;
|
|
7784
|
-
}
|
|
7785
7784
|
}
|
|
7786
|
-
|
|
7787
|
-
|
|
7788
|
-
|
|
7789
|
-
|
|
7790
|
-
|
|
7791
|
-
|
|
7792
|
-
|
|
7785
|
+
}
|
|
7786
|
+
if (shouldDoClasses && !isExit) {
|
|
7787
|
+
var pseudoStyles = (0, import_getStylesAtomic.getStyleAtomic)(pseudoStyleObject, descriptor);
|
|
7788
|
+
process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed("pseudo (classes)", key), (0, import_log.log)({
|
|
7789
|
+
pseudoStyleObject,
|
|
7790
|
+
pseudoStyles
|
|
7791
|
+
}), console.groupEnd());
|
|
7792
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
7793
|
+
try {
|
|
7794
|
+
for (var _iterator = pseudoStyles[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
7795
|
+
var psuedoStyle = _step.value, fullKey = "".concat(psuedoStyle.property).concat(PROP_SPLIT).concat(descriptor.name);
|
|
7796
|
+
fullKey in usedKeys || mergeClassName(transforms, classNames, fullKey, psuedoStyle.identifier, isMediaOrPseudo1, !0);
|
|
7797
|
+
}
|
|
7798
|
+
} catch (err) {
|
|
7799
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
7800
|
+
} finally {
|
|
7793
7801
|
try {
|
|
7794
|
-
|
|
7795
|
-
var psuedoStyle = _step.value, fullKey = "".concat(psuedoStyle.property).concat(PROP_SPLIT).concat(descriptor.name);
|
|
7796
|
-
fullKey in usedKeys || mergeClassName(transforms, classNames, fullKey, psuedoStyle.identifier, isMediaOrPseudo1, !0);
|
|
7797
|
-
}
|
|
7798
|
-
} catch (err) {
|
|
7799
|
-
_didIteratorError = !0, _iteratorError = err;
|
|
7802
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
7800
7803
|
} finally {
|
|
7801
|
-
|
|
7802
|
-
|
|
7803
|
-
} finally {
|
|
7804
|
-
if (_didIteratorError)
|
|
7805
|
-
throw _iteratorError;
|
|
7806
|
-
}
|
|
7804
|
+
if (_didIteratorError)
|
|
7805
|
+
throw _iteratorError;
|
|
7807
7806
|
}
|
|
7808
7807
|
}
|
|
7809
|
-
|
|
7810
|
-
|
|
7811
|
-
|
|
7812
|
-
|
|
7813
|
-
|
|
7814
|
-
|
|
7815
|
-
|
|
7816
|
-
|
|
7817
|
-
|
|
7818
|
-
|
|
7819
|
-
|
|
7820
|
-
|
|
7821
|
-
|
|
7822
|
-
|
|
7823
|
-
|
|
7824
|
-
|
|
7825
|
-
|
|
7826
|
-
|
|
7827
|
-
|
|
7828
|
-
|
|
7829
|
-
|
|
7830
|
-
}
|
|
7831
|
-
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" subKey", pkey, shouldMerge, {
|
|
7832
|
-
importance,
|
|
7833
|
-
curImportance,
|
|
7834
|
-
pkey,
|
|
7835
|
-
val: val1,
|
|
7836
|
-
transforms: _object_spread2({}, styleState.transforms)
|
|
7837
|
-
});
|
|
7808
|
+
}
|
|
7809
|
+
if (!shouldDoClasses || isExit || isEnter) {
|
|
7810
|
+
var descriptorKey = descriptor.stateKey || descriptor.name, isDisabled = componentState[descriptorKey] === !1;
|
|
7811
|
+
isExit && (isDisabled = !styleProps.isExiting), isEnter && (isDisabled = componentState.unmounted === "should-enter" ? !0 : !componentState.unmounted), process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed("pseudo", key, {
|
|
7812
|
+
isDisabled
|
|
7813
|
+
}), (0, import_log.log)({
|
|
7814
|
+
pseudoStyleObject,
|
|
7815
|
+
isDisabled,
|
|
7816
|
+
descriptor,
|
|
7817
|
+
componentState
|
|
7818
|
+
}), console.groupEnd());
|
|
7819
|
+
var importance = descriptor.priority;
|
|
7820
|
+
for (var pkey in pseudoStyleObject) {
|
|
7821
|
+
var val1 = pseudoStyleObject[pkey];
|
|
7822
|
+
if (isDisabled) {
|
|
7823
|
+
var defaultValues = animatableDefaults[pkey];
|
|
7824
|
+
defaultValues != null && !(pkey in usedKeys) && (!styleState.style || !(pkey in styleState.style)) && mergeStyle(styleState, pkey, defaultValues);
|
|
7825
|
+
} else {
|
|
7826
|
+
var curImportance = usedKeys[pkey] || 0, shouldMerge = importance >= curImportance;
|
|
7827
|
+
if (shouldMerge) {
|
|
7828
|
+
var _pseudos1, _key1;
|
|
7829
|
+
pseudos || (pseudos = {}), (_pseudos1 = pseudos)[_key1 = key] || (_pseudos1[_key1] = {}), pseudos[key][pkey] = val1, mergeStyle(styleState, pkey, val1);
|
|
7838
7830
|
}
|
|
7831
|
+
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" subKey", pkey, shouldMerge, {
|
|
7832
|
+
importance,
|
|
7833
|
+
curImportance,
|
|
7834
|
+
pkey,
|
|
7835
|
+
val: val1
|
|
7836
|
+
});
|
|
7839
7837
|
}
|
|
7840
|
-
if (!isDisabled)
|
|
7841
|
-
for (var key1 in val) {
|
|
7842
|
-
var k1 = shorthands[key1] || key1;
|
|
7843
|
-
usedKeys[k1] = Math.max(importance, usedKeys[k1] || 0);
|
|
7844
|
-
}
|
|
7845
7838
|
}
|
|
7846
|
-
|
|
7839
|
+
if (!isDisabled)
|
|
7840
|
+
for (var key1 in val) {
|
|
7841
|
+
var k1 = shorthands[key1] || key1;
|
|
7842
|
+
usedKeys[k1] = Math.max(importance, usedKeys[k1] || 0);
|
|
7843
|
+
}
|
|
7847
7844
|
}
|
|
7848
|
-
|
|
7849
|
-
|
|
7845
|
+
continue;
|
|
7846
|
+
}
|
|
7847
|
+
if (isMedia) {
|
|
7848
|
+
if (!val)
|
|
7849
|
+
continue;
|
|
7850
|
+
if (isMedia === "platform") {
|
|
7851
|
+
var platform = key.slice(10);
|
|
7852
|
+
if (
|
|
7853
|
+
// supports web, ios, android
|
|
7854
|
+
platform !== import_constants.currentPlatform && // supports web, native
|
|
7855
|
+
platform !== "native"
|
|
7856
|
+
)
|
|
7850
7857
|
continue;
|
|
7851
|
-
|
|
7852
|
-
|
|
7853
|
-
|
|
7854
|
-
|
|
7855
|
-
|
|
7856
|
-
|
|
7857
|
-
|
|
7858
|
-
|
|
7858
|
+
}
|
|
7859
|
+
hasMedia || (hasMedia = !0);
|
|
7860
|
+
var mediaKeyShort = key.slice(1);
|
|
7861
|
+
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" \u{1F4FA} ".concat(key), {
|
|
7862
|
+
key,
|
|
7863
|
+
val,
|
|
7864
|
+
props,
|
|
7865
|
+
shouldDoClasses,
|
|
7866
|
+
acceptsClassName,
|
|
7867
|
+
componentState
|
|
7868
|
+
});
|
|
7869
|
+
var hasSpace = val.space;
|
|
7870
|
+
if ((hasSpace || !shouldDoClasses) && (Array.isArray(hasMedia) || (hasMedia = []), hasMedia.push(mediaKeyShort)), shouldDoClasses) {
|
|
7871
|
+
var mediaStyle = getSubStyle(styleState, key, val, !1);
|
|
7872
|
+
if (hasSpace && (delete mediaStyle.space, mediaState2[mediaKeyShort])) {
|
|
7873
|
+
var importance1 = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKeyShort, "space", usedKeys, !0);
|
|
7874
|
+
importance1 && (space = val.space, usedKeys.space = importance1, process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)("Found more important space for current media ".concat(mediaKeyShort, ": ").concat(val, " (importance: ").concat(importance1, ")")));
|
|
7859
7875
|
}
|
|
7860
|
-
|
|
7861
|
-
|
|
7862
|
-
|
|
7863
|
-
|
|
7864
|
-
|
|
7865
|
-
|
|
7866
|
-
|
|
7867
|
-
|
|
7868
|
-
|
|
7869
|
-
key,
|
|
7870
|
-
val,
|
|
7871
|
-
mediaStyle,
|
|
7872
|
-
props,
|
|
7873
|
-
shouldDoClasses,
|
|
7874
|
-
acceptsClassName,
|
|
7875
|
-
componentState
|
|
7876
|
-
});
|
|
7877
|
-
var hasSpace = val.space;
|
|
7878
|
-
if ((hasSpace || !shouldDoClasses) && (Array.isArray(hasMedia) || (hasMedia = []), hasMedia.push(mediaKeyShort)), shouldDoClasses) {
|
|
7879
|
-
if (hasSpace && (delete mediaStyle.space, mediaState2[mediaKeyShort])) {
|
|
7880
|
-
var importance1 = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKeyShort, "space", usedKeys, !0);
|
|
7881
|
-
importance1 && (space = val.space, usedKeys.space = importance1, process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)("Found more important space for current media ".concat(mediaKeyShort, ": ").concat(val, " (importance: ").concat(importance1, ")")));
|
|
7876
|
+
var mediaStyles = (0, import_getStylesAtomic.getStylesAtomic)(mediaStyle), priority = mediaStylesSeen;
|
|
7877
|
+
mediaStylesSeen += 1;
|
|
7878
|
+
var _iteratorNormalCompletion1 = !0, _didIteratorError1 = !1, _iteratorError1 = void 0;
|
|
7879
|
+
try {
|
|
7880
|
+
for (var _iterator1 = mediaStyles[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = !0) {
|
|
7881
|
+
var style = _step1.value, out = (0, import_createMediaStyle.createMediaStyle)(style, mediaKeyShort, import_useMedia.mediaQueryConfig, isMedia, !1, priority);
|
|
7882
|
+
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)("\u{1F4FA} media style:", out);
|
|
7883
|
+
var fullKey1 = "".concat(style.property).concat(PROP_SPLIT).concat(mediaKeyShort).concat(style.pseudo || "");
|
|
7884
|
+
fullKey1 in usedKeys || mergeClassName(transforms, classNames, fullKey1, out.identifier, !0, !0);
|
|
7882
7885
|
}
|
|
7883
|
-
|
|
7884
|
-
|
|
7885
|
-
|
|
7886
|
+
} catch (err) {
|
|
7887
|
+
_didIteratorError1 = !0, _iteratorError1 = err;
|
|
7888
|
+
} finally {
|
|
7886
7889
|
try {
|
|
7887
|
-
|
|
7888
|
-
var style = _step1.value, out = (0, import_createMediaStyle.createMediaStyle)(style, mediaKeyShort, import_useMedia.mediaQueryConfig, isMedia, !1, priority);
|
|
7889
|
-
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)("\u{1F4FA} media style:", out);
|
|
7890
|
-
var fullKey1 = "".concat(style.property).concat(PROP_SPLIT).concat(mediaKeyShort).concat(style.pseudo || "");
|
|
7891
|
-
fullKey1 in usedKeys || mergeClassName(transforms, classNames, fullKey1, out.identifier, !0, !0);
|
|
7892
|
-
}
|
|
7893
|
-
} catch (err) {
|
|
7894
|
-
_didIteratorError1 = !0, _iteratorError1 = err;
|
|
7890
|
+
!_iteratorNormalCompletion1 && _iterator1.return != null && _iterator1.return();
|
|
7895
7891
|
} finally {
|
|
7896
|
-
|
|
7897
|
-
|
|
7898
|
-
} finally {
|
|
7899
|
-
if (_didIteratorError1)
|
|
7900
|
-
throw _iteratorError1;
|
|
7901
|
-
}
|
|
7892
|
+
if (_didIteratorError1)
|
|
7893
|
+
throw _iteratorError1;
|
|
7902
7894
|
}
|
|
7903
|
-
}
|
|
7904
|
-
|
|
7905
|
-
|
|
7895
|
+
}
|
|
7896
|
+
} else {
|
|
7897
|
+
var mediaStyle1 = getSubStyle(styleState, key, val, !0), isThemeMedia = isMedia === "theme", isGroupMedia = isMedia === "group", isPlatformMedia = isMedia === "platform";
|
|
7898
|
+
if (!isThemeMedia && !isPlatformMedia && !isGroupMedia && !mediaState2[mediaKeyShort])
|
|
7899
|
+
continue;
|
|
7900
|
+
var importanceBump = 0;
|
|
7901
|
+
if (isThemeMedia) {
|
|
7902
|
+
dynamicThemeAccess = !0;
|
|
7903
|
+
var mediaThemeName = mediaKeyShort.slice(6);
|
|
7904
|
+
if (!(themeName === mediaThemeName || themeName.startsWith(mediaThemeName)))
|
|
7906
7905
|
continue;
|
|
7907
|
-
|
|
7908
|
-
|
|
7909
|
-
|
|
7910
|
-
|
|
7911
|
-
|
|
7912
|
-
|
|
7913
|
-
|
|
7914
|
-
|
|
7915
|
-
|
|
7916
|
-
|
|
7906
|
+
} else if (isGroupMedia) {
|
|
7907
|
+
var _componentState_group, groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name, groupContext = context == null ? void 0 : context.groups.state[groupName];
|
|
7908
|
+
if (!groupContext) {
|
|
7909
|
+
process.env.NODE_ENV === "development" && debug && console.warn("No parent with group prop, skipping styles: ".concat(groupName));
|
|
7910
|
+
continue;
|
|
7911
|
+
}
|
|
7912
|
+
var groupPseudoKey = groupInfo.pseudo, groupMediaKey = groupInfo.media, componentGroupState = (_componentState_group = componentState.group) === null || _componentState_group === void 0 ? void 0 : _componentState_group[groupName];
|
|
7913
|
+
if (groupMediaKey) {
|
|
7914
|
+
mediaGroups || (mediaGroups = /* @__PURE__ */ new Set()), mediaGroups.add(groupMediaKey);
|
|
7915
|
+
var mediaState1 = componentGroupState == null ? void 0 : componentGroupState.media, isActive = mediaState1 == null ? void 0 : mediaState1[groupMediaKey];
|
|
7916
|
+
if (!mediaState1 && groupContext.layout && (isActive = (0, import_useMedia.mediaKeyMatch)(groupMediaKey, groupContext.layout)), !isActive)
|
|
7917
7917
|
continue;
|
|
7918
|
-
|
|
7919
|
-
var groupPseudoKey = groupInfo.pseudo, groupMediaKey = groupInfo.media, componentGroupState = (_componentState_group = componentState.group) === null || _componentState_group === void 0 ? void 0 : _componentState_group[groupName];
|
|
7920
|
-
if (groupMediaKey) {
|
|
7921
|
-
mediaGroups || (mediaGroups = /* @__PURE__ */ new Set()), mediaGroups.add(groupMediaKey);
|
|
7922
|
-
var mediaState1 = componentGroupState == null ? void 0 : componentGroupState.media, isActive = mediaState1 == null ? void 0 : mediaState1[groupMediaKey];
|
|
7923
|
-
if (!mediaState1 && groupContext.layout && (isActive = (0, import_useMedia.mediaKeyMatch)(groupMediaKey, groupContext.layout)), !isActive)
|
|
7924
|
-
continue;
|
|
7925
|
-
importanceBump = 2;
|
|
7926
|
-
}
|
|
7927
|
-
if (groupPseudoKey) {
|
|
7928
|
-
pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set()), pseudoGroups.add(groupName);
|
|
7929
|
-
var componentGroupPseudoState = (componentGroupState || // fallback to context initially
|
|
7930
|
-
context.groups.state[groupName]).pseudo, isActive1 = componentGroupPseudoState == null ? void 0 : componentGroupPseudoState[groupPseudoKey];
|
|
7931
|
-
if (!isActive1)
|
|
7932
|
-
continue;
|
|
7933
|
-
var priority1 = import_pseudoDescriptors.pseudoPriorities[groupPseudoKey];
|
|
7934
|
-
importanceBump = priority1;
|
|
7935
|
-
}
|
|
7918
|
+
importanceBump = 2;
|
|
7936
7919
|
}
|
|
7937
|
-
|
|
7938
|
-
|
|
7939
|
-
|
|
7940
|
-
|
|
7920
|
+
if (groupPseudoKey) {
|
|
7921
|
+
pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set()), pseudoGroups.add(groupName);
|
|
7922
|
+
var componentGroupPseudoState = (componentGroupState || // fallback to context initially
|
|
7923
|
+
context.groups.state[groupName]).pseudo, isActive1 = componentGroupPseudoState == null ? void 0 : componentGroupPseudoState[groupPseudoKey];
|
|
7924
|
+
if (!isActive1)
|
|
7941
7925
|
continue;
|
|
7942
|
-
|
|
7943
|
-
|
|
7926
|
+
var priority1 = import_pseudoDescriptors.pseudoPriorities[groupPseudoKey];
|
|
7927
|
+
importanceBump = priority1;
|
|
7944
7928
|
}
|
|
7945
7929
|
}
|
|
7946
|
-
|
|
7947
|
-
|
|
7948
|
-
|
|
7949
|
-
|
|
7950
|
-
|
|
7951
|
-
|
|
7952
|
-
|
|
7953
|
-
|
|
7954
|
-
// this fixes issues where style prop got merged with wrong priority
|
|
7955
|
-
!isHOC && (isValidStyleKey(key, staticConfig) || import_constants.isAndroid && key === "elevation")
|
|
7956
|
-
) {
|
|
7957
|
-
mergeStyle(styleState, key, val);
|
|
7958
|
-
continue;
|
|
7930
|
+
for (var subKey in mediaStyle1) {
|
|
7931
|
+
var _styleState2;
|
|
7932
|
+
if (subKey === "space") {
|
|
7933
|
+
space = valInit.space;
|
|
7934
|
+
continue;
|
|
7935
|
+
}
|
|
7936
|
+
(_styleState2 = styleState).style || (_styleState2.style = {}), mergeMediaByImportance(styleState, mediaKeyShort, subKey, mediaStyle1[subKey], usedKeys, mediaState2[mediaKeyShort], importanceBump), key === "fontFamily" && (styleState.fontFamily = mediaStyle1.fontFamily);
|
|
7937
|
+
}
|
|
7959
7938
|
}
|
|
7960
|
-
|
|
7939
|
+
continue;
|
|
7961
7940
|
}
|
|
7962
|
-
|
|
7963
|
-
|
|
7964
|
-
|
|
7965
|
-
(0, import_log.log)(" \u2714\uFE0F expand complete", keyInit), (0, import_log.log)("style", _object_spread2({}, styleState.style)), (0, import_log.log)("transforms", _object_spread2({}, transforms)), (0, import_log.log)("viewProps", _object_spread2({}, viewProps));
|
|
7966
|
-
} catch {
|
|
7941
|
+
if (key === "pointerEvents") {
|
|
7942
|
+
viewProps[key] = val;
|
|
7943
|
+
continue;
|
|
7967
7944
|
}
|
|
7968
|
-
|
|
7945
|
+
if (
|
|
7946
|
+
// is HOC we can just pass through the styles as props
|
|
7947
|
+
// this fixes issues where style prop got merged with wrong priority
|
|
7948
|
+
!isHOC && (isValidStyleKey(key, staticConfig) || import_constants.isAndroid && key === "elevation")
|
|
7949
|
+
) {
|
|
7950
|
+
mergeStyle(styleState, key, val);
|
|
7951
|
+
continue;
|
|
7952
|
+
}
|
|
7953
|
+
isVariant || (viewProps[key] = val);
|
|
7969
7954
|
}
|
|
7970
7955
|
}
|
|
7956
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
7957
|
+
try {
|
|
7958
|
+
(0, import_log.log)(" \u2714\uFE0F expand complete", keyInit), (0, import_log.log)("style", _object_spread2({}, styleState.style)), (0, import_log.log)("transforms", _object_spread2({}, transforms)), (0, import_log.log)("viewProps", _object_spread2({}, viewProps));
|
|
7959
|
+
} catch {
|
|
7960
|
+
}
|
|
7961
|
+
console.groupEnd();
|
|
7962
|
+
}
|
|
7971
7963
|
}
|
|
7972
7964
|
}
|
|
7973
7965
|
}
|
|
@@ -8000,9 +7992,9 @@ current`, _object_spread2({}, styleState.style)));
|
|
|
8000
7992
|
}
|
|
8001
7993
|
var avoidNormalize = styleProps.noNormalize === !1;
|
|
8002
7994
|
if (!avoidNormalize) {
|
|
8003
|
-
if (styleState.style && ((0, import_expandStyles.fixStyles)(styleState.style), import_constants.isWeb && !staticConfig.isReactNative && (0, import_getStylesAtomic.styleToCSS)(styleState.style)), styleState.
|
|
7995
|
+
if (styleState.style && ((0, import_expandStyles.fixStyles)(styleState.style), import_constants.isWeb && !staticConfig.isReactNative && (0, import_getStylesAtomic.styleToCSS)(styleState.style)), styleState.flatTransforms) {
|
|
8004
7996
|
var _styleState4;
|
|
8005
|
-
(_styleState4 = styleState).style || (_styleState4.style = {}), Object.entries(styleState.
|
|
7997
|
+
(_styleState4 = styleState).style || (_styleState4.style = {}), Object.entries(styleState.flatTransforms).sort(function(param, param1) {
|
|
8006
7998
|
var _param = _sliced_to_array(param, 1), a = _param[0], _param1 = _sliced_to_array(param1, 1), b = _param1[0];
|
|
8007
7999
|
return a.localeCompare(b);
|
|
8008
8000
|
}).forEach(function(param) {
|
|
@@ -8120,7 +8112,7 @@ current`, _object_spread2({}, styleState.style)));
|
|
|
8120
8112
|
classNames[key] = val, (_usedKeys = usedKeys)[_key = key] || (_usedKeys[_key] = 1);
|
|
8121
8113
|
} else if (key in import_helpers.stylePropsTransform) {
|
|
8122
8114
|
var _styleState;
|
|
8123
|
-
(_styleState = styleState).
|
|
8115
|
+
(_styleState = styleState).flatTransforms || (_styleState.flatTransforms = {}), styleState.flatTransforms[key] = val;
|
|
8124
8116
|
} else {
|
|
8125
8117
|
var shouldNormalize = import_constants.isWeb && !disableNormalize && !styleProps.noNormalize, out = shouldNormalize ? (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(val, key) : val;
|
|
8126
8118
|
if (
|
|
@@ -8191,6 +8183,10 @@ current`, _object_spread2({}, styleState.style)));
|
|
|
8191
8183
|
} else
|
|
8192
8184
|
viewProps[key] = val;
|
|
8193
8185
|
}
|
|
8186
|
+
function mergeMediaByImportance(styleState, mediaKey, key, value, importancesUsed, isSizeMedia, importanceBump) {
|
|
8187
|
+
var importance = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKey, key, importancesUsed, isSizeMedia);
|
|
8188
|
+
return importanceBump && (importance = (importance || 0) + importanceBump), importance === null ? !1 : (importancesUsed[key] = importance, mergeStyle(styleState, key, value), !0);
|
|
8189
|
+
}
|
|
8194
8190
|
}
|
|
8195
8191
|
});
|
|
8196
8192
|
|
|
@@ -9517,9 +9513,9 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
9517
9513
|
};
|
|
9518
9514
|
disposeGroupsListener = componentContext.groups.subscribe(function(name2, param) {
|
|
9519
9515
|
var layout = param.layout, pseudo = param.pseudo, persist = function() {
|
|
9516
|
+
var group = _object_spread_props(_object_spread2({}, state.group), _define_property2({}, name2, current));
|
|
9520
9517
|
setStateShallow({
|
|
9521
|
-
|
|
9522
|
-
group: _object_spread_props(_object_spread2({}, state.group), _define_property2({}, name2, current))
|
|
9518
|
+
group
|
|
9523
9519
|
});
|
|
9524
9520
|
};
|
|
9525
9521
|
if (pseudo && pseudoGroups != null && pseudoGroups.has(name2))
|
|
@@ -9538,20 +9534,20 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
9538
9534
|
pseudoGroups ? Object.keys(_to_consumable_array(pseudoGroups)).join("") : 0,
|
|
9539
9535
|
mediaGroups ? Object.keys(_to_consumable_array(mediaGroups)).join("") : 0
|
|
9540
9536
|
]);
|
|
9541
|
-
var runtimePressStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.pressStyle), runtimeFocusStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.focusStyle), attachFocus = !!(runtimePressStyle || runtimeFocusStyle || onFocus || onBlur), attachPress = !!(groupName || runtimePressStyle || onPress || onPressOut || onPressIn || onMouseDown || onMouseUp || onLongPress || onClick), runtimeHoverStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.hoverStyle), needsHoverState = runtimeHoverStyle || onHoverIn || onHoverOut,
|
|
9537
|
+
var runtimePressStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.pressStyle), runtimeFocusStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.focusStyle), attachFocus = !!(runtimePressStyle || runtimeFocusStyle || onFocus || onBlur), attachPress = !!(groupName || runtimePressStyle || onPress || onPressOut || onPressIn || onMouseDown || onMouseUp || onLongPress || onClick), runtimeHoverStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.hoverStyle), needsHoverState = !!(groupName || runtimeHoverStyle || onHoverIn || onHoverOut), attachHover = import_constants.isWeb && !!(groupName || needsHoverState || onMouseEnter || onMouseLeave), shouldAttach = !!(attachFocus || attachPress || attachHover || runtimePressStyle || runtimeHoverStyle || runtimeFocusStyle), needsPressState = !!(groupName || runtimeHoverStyle);
|
|
9542
9538
|
process.env.NODE_ENV === "development" && time && time(_templateObject14());
|
|
9543
9539
|
var events = shouldAttach && !isDisabled && !props.asChild ? _object_spread2(_object_spread_props(_object_spread2({
|
|
9544
9540
|
onPressOut: attachPress ? function(e) {
|
|
9545
9541
|
unPress(), onPressOut == null || onPressOut(e), onMouseUp == null || onMouseUp(e);
|
|
9546
9542
|
} : void 0
|
|
9547
|
-
}, (
|
|
9543
|
+
}, (attachHover || attachPress) && {
|
|
9548
9544
|
onMouseEnter: function(e) {
|
|
9549
9545
|
var next = {};
|
|
9550
|
-
needsHoverState && (next.hover = !0),
|
|
9546
|
+
needsHoverState && (next.hover = !0), needsPressState && state.pressIn && (next.press = !0), setStateShallow(next), onHoverIn == null || onHoverIn(e), onMouseEnter == null || onMouseEnter(e);
|
|
9551
9547
|
},
|
|
9552
9548
|
onMouseLeave: function(e) {
|
|
9553
9549
|
var next = {};
|
|
9554
|
-
mouseUps.add(unPress), needsHoverState && (next.hover = !1),
|
|
9550
|
+
mouseUps.add(unPress), needsHoverState && (next.hover = !1), needsPressState && state.pressIn && (next.press = !1, next.pressIn = !1), setStateShallow(next), onHoverOut == null || onHoverOut(e), onMouseLeave == null || onMouseLeave(e);
|
|
9555
9551
|
}
|
|
9556
9552
|
}), {
|
|
9557
9553
|
onPressIn: attachPress ? function(e) {
|
|
@@ -9594,7 +9590,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
9594
9590
|
}
|
|
9595
9591
|
process.env.NODE_ENV === "development" && time && time(_templateObject15()), process.env.NODE_ENV === "development" && debugProp === "verbose" && (0, import_log.log)("events", {
|
|
9596
9592
|
events,
|
|
9597
|
-
|
|
9593
|
+
attachHover,
|
|
9598
9594
|
attachPress
|
|
9599
9595
|
}), (_hooks_useEvents = import_setupHooks.hooks.useEvents) === null || _hooks_useEvents === void 0 || _hooks_useEvents.call(import_setupHooks.hooks, viewProps, events, splitStyles, setStateShallow, staticConfig);
|
|
9600
9596
|
var direction = props.spaceDirection || "both";
|