tamagui 1.90.1 → 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 +230 -233
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +171 -178
- package/dist/test.native.js.map +2 -2
- package/package.json +54 -54
package/dist/native.js
CHANGED
|
@@ -497,7 +497,8 @@ var require_PresenceChild_native = __commonJS({
|
|
|
497
497
|
* we want to make a new context value to ensure they get re-rendered
|
|
498
498
|
* so they can detect that layout change.
|
|
499
499
|
*/
|
|
500
|
-
|
|
500
|
+
// @ts-expect-error its ok
|
|
501
|
+
presenceAffectsLayout ? void 0 : [
|
|
501
502
|
isPresent,
|
|
502
503
|
exitVariant,
|
|
503
504
|
enterVariant
|
|
@@ -3234,9 +3235,6 @@ var require_useMedia_native = __commonJS({
|
|
|
3234
3235
|
mediaState: function() {
|
|
3235
3236
|
return mediaState3;
|
|
3236
3237
|
},
|
|
3237
|
-
mergeMediaByImportance: function() {
|
|
3238
|
-
return mergeMediaByImportance;
|
|
3239
|
-
},
|
|
3240
3238
|
setMediaShouldUpdate: function() {
|
|
3241
3239
|
return setMediaShouldUpdate;
|
|
3242
3240
|
},
|
|
@@ -3455,10 +3453,6 @@ var require_useMedia_native = __commonJS({
|
|
|
3455
3453
|
var conf = (0, import_config.getConfig)(), importance = isSizeMedia && !conf.settings.mediaPropOrder ? getMediaKeyImportance(mediaKey) : defaultMediaImportance;
|
|
3456
3454
|
return !importancesUsed[key] || importance > importancesUsed[key] ? importance : null;
|
|
3457
3455
|
};
|
|
3458
|
-
function mergeMediaByImportance(onto, mediaKey, key, value, importancesUsed, isSizeMedia, importanceBump) {
|
|
3459
|
-
var importance = getMediaImportanceIfMoreImportant(mediaKey, key, importancesUsed, isSizeMedia);
|
|
3460
|
-
return importanceBump && (importance = (importance || 0) + importanceBump), importance === null ? !1 : (importancesUsed[key] = importance, onto[key] = value, !0);
|
|
3461
|
-
}
|
|
3462
3456
|
function camelToHyphen(str) {
|
|
3463
3457
|
return str.replace(/[A-Z]/g, function(m) {
|
|
3464
3458
|
return "-".concat(m.toLowerCase());
|
|
@@ -7817,253 +7811,252 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7817
7811
|
isHOCShouldPassThrough,
|
|
7818
7812
|
curProps: _object_spread9({}, styleState.curProps),
|
|
7819
7813
|
parentStaticConfig
|
|
7820
|
-
})),
|
|
7821
|
-
|
|
7822
|
-
|
|
7823
|
-
|
|
7824
|
-
|
|
7825
|
-
|
|
7826
|
-
|
|
7827
|
-
|
|
7828
|
-
|
|
7829
|
-
|
|
7830
|
-
|
|
7831
|
-
|
|
7832
|
-
|
|
7833
|
-
|
|
7834
|
-
|
|
7835
|
-
|
|
7836
|
-
|
|
7837
|
-
|
|
7838
|
-
|
|
7839
|
-
|
|
7840
|
-
|
|
7841
|
-
|
|
7842
|
-
|
|
7843
|
-
|
|
7814
|
+
})), shouldPassThrough && (passDownProp(viewProps, keyInit, valInit, isMediaOrPseudo1), !isVariant)) {
|
|
7815
|
+
process.env.NODE_ENV === "development" && debug === "verbose" && console.groupEnd();
|
|
7816
|
+
continue;
|
|
7817
|
+
}
|
|
7818
|
+
if (!styleProps.noSkip && keyInit in import_skipProps.skipProps) {
|
|
7819
|
+
process.env.NODE_ENV === "development" && debug === "verbose" && console.groupEnd();
|
|
7820
|
+
continue;
|
|
7821
|
+
}
|
|
7822
|
+
(isText || isInput) && valInit && (keyInit === "fontFamily" || keyInit === shorthands.fontFamily) && valInit in conf.fontsParsed && (styleState.fontFamily = valInit);
|
|
7823
|
+
var avoidPropMap = isMediaOrPseudo1 || !isVariant && !isValidStyleKeyInit, expanded = avoidPropMap ? null : (0, import_propMapper.propMapper)(keyInit, valInit, styleState);
|
|
7824
|
+
if (!avoidPropMap) {
|
|
7825
|
+
if (!expanded)
|
|
7826
|
+
continue;
|
|
7827
|
+
var next = (0, import_propMapper.getPropMappedFontFamily)(expanded);
|
|
7828
|
+
next && (styleState.fontFamily = next);
|
|
7829
|
+
}
|
|
7830
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
7831
|
+
console.groupCollapsed(" \u{1F4A0} expanded", keyInit, valInit);
|
|
7832
|
+
try {
|
|
7833
|
+
!import_constants4.isServer && import_isDevTools.isDevTools && ((0, import_log.log)({
|
|
7834
|
+
expanded,
|
|
7835
|
+
styleProps,
|
|
7836
|
+
componentState,
|
|
7837
|
+
isVariant,
|
|
7838
|
+
variant: variants == null ? void 0 : variants[keyInit],
|
|
7839
|
+
shouldPassProp,
|
|
7840
|
+
isHOCShouldPassThrough,
|
|
7841
|
+
theme,
|
|
7842
|
+
usedKeys: _object_spread9({}, usedKeys),
|
|
7843
|
+
curProps: _object_spread9({}, styleState.curProps)
|
|
7844
|
+
}), (0, import_log.log)("expanded", expanded, `
|
|
7844
7845
|
usedKeys`, _object_spread9({}, usedKeys), `
|
|
7845
7846
|
current`, _object_spread9({}, styleState.style)));
|
|
7846
|
-
|
|
7847
|
-
|
|
7848
|
-
|
|
7847
|
+
} catch {
|
|
7848
|
+
}
|
|
7849
|
+
console.groupEnd();
|
|
7850
|
+
}
|
|
7851
|
+
for (var key = keyInit, val = valInit, max2 = expanded ? expanded.length : 1, i = 0; i < max2; i++) {
|
|
7852
|
+
var _parentStaticConfig_variants1;
|
|
7853
|
+
if (expanded) {
|
|
7854
|
+
var _expanded_i = _sliced_to_array(expanded[i], 2), k = _expanded_i[0], v = _expanded_i[1];
|
|
7855
|
+
key = k, val = v;
|
|
7849
7856
|
}
|
|
7850
|
-
|
|
7851
|
-
|
|
7852
|
-
|
|
7853
|
-
|
|
7854
|
-
key = k, val = v;
|
|
7857
|
+
if (val != null && !(key in usedKeys)) {
|
|
7858
|
+
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)) {
|
|
7859
|
+
var _props_key;
|
|
7860
|
+
viewProps[key] = (_props_key = props[key]) !== null && _props_key !== void 0 ? _props_key : val;
|
|
7855
7861
|
}
|
|
7856
|
-
|
|
7857
|
-
|
|
7858
|
-
|
|
7859
|
-
|
|
7860
|
-
|
|
7861
|
-
|
|
7862
|
-
|
|
7863
|
-
|
|
7864
|
-
|
|
7865
|
-
|
|
7866
|
-
}), console.groupEnd());
|
|
7862
|
+
var shouldPassThrough1 = styleProps.noExpand && isPseudo || isHOC && (isMediaOrPseudo1 || (parentStaticConfig == null || (_parentStaticConfig_variants1 = parentStaticConfig.variants) === null || _parentStaticConfig_variants1 === void 0 ? void 0 : _parentStaticConfig_variants1[keyInit]));
|
|
7863
|
+
if (shouldPassThrough1) {
|
|
7864
|
+
passDownProp(viewProps, key, val, isMediaOrPseudo1), process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed(" - passing down prop ".concat(key)), (0, import_log.log)({
|
|
7865
|
+
val,
|
|
7866
|
+
after: _object_spread9({}, viewProps[key])
|
|
7867
|
+
}), console.groupEnd());
|
|
7868
|
+
continue;
|
|
7869
|
+
}
|
|
7870
|
+
if (isPseudo) {
|
|
7871
|
+
if (!val)
|
|
7867
7872
|
continue;
|
|
7868
|
-
|
|
7869
|
-
if (
|
|
7870
|
-
|
|
7871
|
-
|
|
7872
|
-
var
|
|
7873
|
-
if (
|
|
7873
|
+
var pseudoStyleObject = getSubStyle(styleState, key, val, styleProps.noClassNames), descriptor = import_pseudoDescriptors.pseudoDescriptors[key], isEnter = key === "enterStyle", isExit = key === "exitStyle";
|
|
7874
|
+
if (!descriptor)
|
|
7875
|
+
continue;
|
|
7876
|
+
if (!shouldDoClasses || IS_STATIC) {
|
|
7877
|
+
var _pseudos, _key;
|
|
7878
|
+
if (pseudos || (pseudos = {}), (_pseudos = pseudos)[_key = key] || (_pseudos[_key] = {}), IS_STATIC) {
|
|
7879
|
+
Object.assign(pseudos[key], pseudoStyleObject);
|
|
7874
7880
|
continue;
|
|
7875
|
-
if (!shouldDoClasses || IS_STATIC) {
|
|
7876
|
-
var _pseudos, _key;
|
|
7877
|
-
if (pseudos || (pseudos = {}), (_pseudos = pseudos)[_key = key] || (_pseudos[_key] = {}), IS_STATIC) {
|
|
7878
|
-
Object.assign(pseudos[key], pseudoStyleObject);
|
|
7879
|
-
continue;
|
|
7880
|
-
}
|
|
7881
7881
|
}
|
|
7882
|
-
|
|
7883
|
-
|
|
7884
|
-
|
|
7885
|
-
|
|
7886
|
-
|
|
7887
|
-
|
|
7888
|
-
|
|
7882
|
+
}
|
|
7883
|
+
if (shouldDoClasses && !isExit) {
|
|
7884
|
+
var pseudoStyles = (0, import_getStylesAtomic.getStyleAtomic)(pseudoStyleObject, descriptor);
|
|
7885
|
+
process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed("pseudo (classes)", key), (0, import_log.log)({
|
|
7886
|
+
pseudoStyleObject,
|
|
7887
|
+
pseudoStyles
|
|
7888
|
+
}), console.groupEnd());
|
|
7889
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
7890
|
+
try {
|
|
7891
|
+
for (var _iterator = pseudoStyles[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
7892
|
+
var psuedoStyle = _step.value, fullKey = "".concat(psuedoStyle.property).concat(PROP_SPLIT).concat(descriptor.name);
|
|
7893
|
+
fullKey in usedKeys || mergeClassName(transforms, classNames, fullKey, psuedoStyle.identifier, isMediaOrPseudo1, !0);
|
|
7894
|
+
}
|
|
7895
|
+
} catch (err) {
|
|
7896
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
7897
|
+
} finally {
|
|
7889
7898
|
try {
|
|
7890
|
-
|
|
7891
|
-
var psuedoStyle = _step.value, fullKey = "".concat(psuedoStyle.property).concat(PROP_SPLIT).concat(descriptor.name);
|
|
7892
|
-
fullKey in usedKeys || mergeClassName(transforms, classNames, fullKey, psuedoStyle.identifier, isMediaOrPseudo1, !0);
|
|
7893
|
-
}
|
|
7894
|
-
} catch (err) {
|
|
7895
|
-
_didIteratorError = !0, _iteratorError = err;
|
|
7899
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
7896
7900
|
} finally {
|
|
7897
|
-
|
|
7898
|
-
|
|
7899
|
-
} finally {
|
|
7900
|
-
if (_didIteratorError)
|
|
7901
|
-
throw _iteratorError;
|
|
7902
|
-
}
|
|
7901
|
+
if (_didIteratorError)
|
|
7902
|
+
throw _iteratorError;
|
|
7903
7903
|
}
|
|
7904
7904
|
}
|
|
7905
|
-
|
|
7906
|
-
|
|
7907
|
-
|
|
7908
|
-
|
|
7909
|
-
|
|
7910
|
-
|
|
7911
|
-
|
|
7912
|
-
|
|
7913
|
-
|
|
7914
|
-
|
|
7915
|
-
|
|
7916
|
-
|
|
7917
|
-
|
|
7918
|
-
|
|
7919
|
-
|
|
7920
|
-
|
|
7921
|
-
|
|
7922
|
-
|
|
7923
|
-
|
|
7924
|
-
|
|
7925
|
-
|
|
7926
|
-
}
|
|
7927
|
-
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" subKey", pkey, shouldMerge, {
|
|
7928
|
-
importance,
|
|
7929
|
-
curImportance,
|
|
7930
|
-
pkey,
|
|
7931
|
-
val: val1,
|
|
7932
|
-
transforms: _object_spread9({}, styleState.transforms)
|
|
7933
|
-
});
|
|
7905
|
+
}
|
|
7906
|
+
if (!shouldDoClasses || isExit || isEnter) {
|
|
7907
|
+
var descriptorKey = descriptor.stateKey || descriptor.name, isDisabled = componentState[descriptorKey] === !1;
|
|
7908
|
+
isExit && (isDisabled = !styleProps.isExiting), isEnter && (isDisabled = componentState.unmounted === "should-enter" ? !0 : !componentState.unmounted), process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed("pseudo", key, {
|
|
7909
|
+
isDisabled
|
|
7910
|
+
}), (0, import_log.log)({
|
|
7911
|
+
pseudoStyleObject,
|
|
7912
|
+
isDisabled,
|
|
7913
|
+
descriptor,
|
|
7914
|
+
componentState
|
|
7915
|
+
}), console.groupEnd());
|
|
7916
|
+
var importance = descriptor.priority;
|
|
7917
|
+
for (var pkey in pseudoStyleObject) {
|
|
7918
|
+
var val1 = pseudoStyleObject[pkey];
|
|
7919
|
+
if (isDisabled) {
|
|
7920
|
+
var defaultValues = animatableDefaults[pkey];
|
|
7921
|
+
defaultValues != null && !(pkey in usedKeys) && (!styleState.style || !(pkey in styleState.style)) && mergeStyle(styleState, pkey, defaultValues);
|
|
7922
|
+
} else {
|
|
7923
|
+
var curImportance = usedKeys[pkey] || 0, shouldMerge = importance >= curImportance;
|
|
7924
|
+
if (shouldMerge) {
|
|
7925
|
+
var _pseudos1, _key1;
|
|
7926
|
+
pseudos || (pseudos = {}), (_pseudos1 = pseudos)[_key1 = key] || (_pseudos1[_key1] = {}), pseudos[key][pkey] = val1, mergeStyle(styleState, pkey, val1);
|
|
7934
7927
|
}
|
|
7928
|
+
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" subKey", pkey, shouldMerge, {
|
|
7929
|
+
importance,
|
|
7930
|
+
curImportance,
|
|
7931
|
+
pkey,
|
|
7932
|
+
val: val1
|
|
7933
|
+
});
|
|
7935
7934
|
}
|
|
7936
|
-
if (!isDisabled)
|
|
7937
|
-
for (var key1 in val) {
|
|
7938
|
-
var k1 = shorthands[key1] || key1;
|
|
7939
|
-
usedKeys[k1] = Math.max(importance, usedKeys[k1] || 0);
|
|
7940
|
-
}
|
|
7941
7935
|
}
|
|
7942
|
-
|
|
7936
|
+
if (!isDisabled)
|
|
7937
|
+
for (var key1 in val) {
|
|
7938
|
+
var k1 = shorthands[key1] || key1;
|
|
7939
|
+
usedKeys[k1] = Math.max(importance, usedKeys[k1] || 0);
|
|
7940
|
+
}
|
|
7943
7941
|
}
|
|
7944
|
-
|
|
7945
|
-
|
|
7942
|
+
continue;
|
|
7943
|
+
}
|
|
7944
|
+
if (isMedia) {
|
|
7945
|
+
if (!val)
|
|
7946
|
+
continue;
|
|
7947
|
+
if (isMedia === "platform") {
|
|
7948
|
+
var platform = key.slice(10);
|
|
7949
|
+
if (
|
|
7950
|
+
// supports web, ios, android
|
|
7951
|
+
platform !== import_constants4.currentPlatform && // supports web, native
|
|
7952
|
+
platform !== "native"
|
|
7953
|
+
)
|
|
7946
7954
|
continue;
|
|
7947
|
-
|
|
7948
|
-
|
|
7949
|
-
|
|
7950
|
-
|
|
7951
|
-
|
|
7952
|
-
|
|
7953
|
-
|
|
7954
|
-
|
|
7955
|
+
}
|
|
7956
|
+
hasMedia || (hasMedia = !0);
|
|
7957
|
+
var mediaKeyShort = key.slice(1);
|
|
7958
|
+
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" \u{1F4FA} ".concat(key), {
|
|
7959
|
+
key,
|
|
7960
|
+
val,
|
|
7961
|
+
props,
|
|
7962
|
+
shouldDoClasses,
|
|
7963
|
+
acceptsClassName,
|
|
7964
|
+
componentState
|
|
7965
|
+
});
|
|
7966
|
+
var hasSpace = val.space;
|
|
7967
|
+
if ((hasSpace || !shouldDoClasses) && (Array.isArray(hasMedia) || (hasMedia = []), hasMedia.push(mediaKeyShort)), shouldDoClasses) {
|
|
7968
|
+
var mediaStyle = getSubStyle(styleState, key, val, !1);
|
|
7969
|
+
if (hasSpace && (delete mediaStyle.space, mediaState3[mediaKeyShort])) {
|
|
7970
|
+
var importance1 = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKeyShort, "space", usedKeys, !0);
|
|
7971
|
+
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, ")")));
|
|
7955
7972
|
}
|
|
7956
|
-
|
|
7957
|
-
|
|
7958
|
-
|
|
7959
|
-
|
|
7960
|
-
|
|
7961
|
-
|
|
7962
|
-
|
|
7963
|
-
|
|
7964
|
-
|
|
7965
|
-
key,
|
|
7966
|
-
val,
|
|
7967
|
-
mediaStyle,
|
|
7968
|
-
props,
|
|
7969
|
-
shouldDoClasses,
|
|
7970
|
-
acceptsClassName,
|
|
7971
|
-
componentState
|
|
7972
|
-
});
|
|
7973
|
-
var hasSpace = val.space;
|
|
7974
|
-
if ((hasSpace || !shouldDoClasses) && (Array.isArray(hasMedia) || (hasMedia = []), hasMedia.push(mediaKeyShort)), shouldDoClasses) {
|
|
7975
|
-
if (hasSpace && (delete mediaStyle.space, mediaState3[mediaKeyShort])) {
|
|
7976
|
-
var importance1 = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKeyShort, "space", usedKeys, !0);
|
|
7977
|
-
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, ")")));
|
|
7973
|
+
var mediaStyles = (0, import_getStylesAtomic.getStylesAtomic)(mediaStyle), priority = mediaStylesSeen;
|
|
7974
|
+
mediaStylesSeen += 1;
|
|
7975
|
+
var _iteratorNormalCompletion1 = !0, _didIteratorError1 = !1, _iteratorError1 = void 0;
|
|
7976
|
+
try {
|
|
7977
|
+
for (var _iterator1 = mediaStyles[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = !0) {
|
|
7978
|
+
var style = _step1.value, out = (0, import_createMediaStyle.createMediaStyle)(style, mediaKeyShort, import_useMedia.mediaQueryConfig, isMedia, !1, priority);
|
|
7979
|
+
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)("\u{1F4FA} media style:", out);
|
|
7980
|
+
var fullKey1 = "".concat(style.property).concat(PROP_SPLIT).concat(mediaKeyShort).concat(style.pseudo || "");
|
|
7981
|
+
fullKey1 in usedKeys || mergeClassName(transforms, classNames, fullKey1, out.identifier, !0, !0);
|
|
7978
7982
|
}
|
|
7979
|
-
|
|
7980
|
-
|
|
7981
|
-
|
|
7983
|
+
} catch (err) {
|
|
7984
|
+
_didIteratorError1 = !0, _iteratorError1 = err;
|
|
7985
|
+
} finally {
|
|
7982
7986
|
try {
|
|
7983
|
-
|
|
7984
|
-
var style = _step1.value, out = (0, import_createMediaStyle.createMediaStyle)(style, mediaKeyShort, import_useMedia.mediaQueryConfig, isMedia, !1, priority);
|
|
7985
|
-
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)("\u{1F4FA} media style:", out);
|
|
7986
|
-
var fullKey1 = "".concat(style.property).concat(PROP_SPLIT).concat(mediaKeyShort).concat(style.pseudo || "");
|
|
7987
|
-
fullKey1 in usedKeys || mergeClassName(transforms, classNames, fullKey1, out.identifier, !0, !0);
|
|
7988
|
-
}
|
|
7989
|
-
} catch (err) {
|
|
7990
|
-
_didIteratorError1 = !0, _iteratorError1 = err;
|
|
7987
|
+
!_iteratorNormalCompletion1 && _iterator1.return != null && _iterator1.return();
|
|
7991
7988
|
} finally {
|
|
7992
|
-
|
|
7993
|
-
|
|
7994
|
-
} finally {
|
|
7995
|
-
if (_didIteratorError1)
|
|
7996
|
-
throw _iteratorError1;
|
|
7997
|
-
}
|
|
7989
|
+
if (_didIteratorError1)
|
|
7990
|
+
throw _iteratorError1;
|
|
7998
7991
|
}
|
|
7999
|
-
}
|
|
8000
|
-
|
|
8001
|
-
|
|
7992
|
+
}
|
|
7993
|
+
} else {
|
|
7994
|
+
var mediaStyle1 = getSubStyle(styleState, key, val, !0), isThemeMedia = isMedia === "theme", isGroupMedia = isMedia === "group", isPlatformMedia = isMedia === "platform";
|
|
7995
|
+
if (!isThemeMedia && !isPlatformMedia && !isGroupMedia && !mediaState3[mediaKeyShort])
|
|
7996
|
+
continue;
|
|
7997
|
+
var importanceBump = 0;
|
|
7998
|
+
if (isThemeMedia) {
|
|
7999
|
+
dynamicThemeAccess = !0;
|
|
8000
|
+
var mediaThemeName = mediaKeyShort.slice(6);
|
|
8001
|
+
if (!(themeName === mediaThemeName || themeName.startsWith(mediaThemeName)))
|
|
8002
8002
|
continue;
|
|
8003
|
-
|
|
8004
|
-
|
|
8005
|
-
|
|
8006
|
-
|
|
8007
|
-
|
|
8008
|
-
|
|
8009
|
-
|
|
8010
|
-
|
|
8011
|
-
|
|
8012
|
-
|
|
8003
|
+
} else if (isGroupMedia) {
|
|
8004
|
+
var _componentState_group, groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name, groupContext = context == null ? void 0 : context.groups.state[groupName];
|
|
8005
|
+
if (!groupContext) {
|
|
8006
|
+
process.env.NODE_ENV === "development" && debug && console.warn("No parent with group prop, skipping styles: ".concat(groupName));
|
|
8007
|
+
continue;
|
|
8008
|
+
}
|
|
8009
|
+
var groupPseudoKey = groupInfo.pseudo, groupMediaKey = groupInfo.media, componentGroupState = (_componentState_group = componentState.group) === null || _componentState_group === void 0 ? void 0 : _componentState_group[groupName];
|
|
8010
|
+
if (groupMediaKey) {
|
|
8011
|
+
mediaGroups || (mediaGroups = /* @__PURE__ */ new Set()), mediaGroups.add(groupMediaKey);
|
|
8012
|
+
var mediaState1 = componentGroupState == null ? void 0 : componentGroupState.media, isActive = mediaState1 == null ? void 0 : mediaState1[groupMediaKey];
|
|
8013
|
+
if (!mediaState1 && groupContext.layout && (isActive = (0, import_useMedia.mediaKeyMatch)(groupMediaKey, groupContext.layout)), !isActive)
|
|
8013
8014
|
continue;
|
|
8014
|
-
|
|
8015
|
-
var groupPseudoKey = groupInfo.pseudo, groupMediaKey = groupInfo.media, componentGroupState = (_componentState_group = componentState.group) === null || _componentState_group === void 0 ? void 0 : _componentState_group[groupName];
|
|
8016
|
-
if (groupMediaKey) {
|
|
8017
|
-
mediaGroups || (mediaGroups = /* @__PURE__ */ new Set()), mediaGroups.add(groupMediaKey);
|
|
8018
|
-
var mediaState1 = componentGroupState == null ? void 0 : componentGroupState.media, isActive = mediaState1 == null ? void 0 : mediaState1[groupMediaKey];
|
|
8019
|
-
if (!mediaState1 && groupContext.layout && (isActive = (0, import_useMedia.mediaKeyMatch)(groupMediaKey, groupContext.layout)), !isActive)
|
|
8020
|
-
continue;
|
|
8021
|
-
importanceBump = 2;
|
|
8022
|
-
}
|
|
8023
|
-
if (groupPseudoKey) {
|
|
8024
|
-
pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set()), pseudoGroups.add(groupName);
|
|
8025
|
-
var componentGroupPseudoState = (componentGroupState || // fallback to context initially
|
|
8026
|
-
context.groups.state[groupName]).pseudo, isActive1 = componentGroupPseudoState == null ? void 0 : componentGroupPseudoState[groupPseudoKey];
|
|
8027
|
-
if (!isActive1)
|
|
8028
|
-
continue;
|
|
8029
|
-
var priority1 = import_pseudoDescriptors.pseudoPriorities[groupPseudoKey];
|
|
8030
|
-
importanceBump = priority1;
|
|
8031
|
-
}
|
|
8015
|
+
importanceBump = 2;
|
|
8032
8016
|
}
|
|
8033
|
-
|
|
8034
|
-
|
|
8035
|
-
|
|
8036
|
-
|
|
8017
|
+
if (groupPseudoKey) {
|
|
8018
|
+
pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set()), pseudoGroups.add(groupName);
|
|
8019
|
+
var componentGroupPseudoState = (componentGroupState || // fallback to context initially
|
|
8020
|
+
context.groups.state[groupName]).pseudo, isActive1 = componentGroupPseudoState == null ? void 0 : componentGroupPseudoState[groupPseudoKey];
|
|
8021
|
+
if (!isActive1)
|
|
8037
8022
|
continue;
|
|
8038
|
-
|
|
8039
|
-
|
|
8023
|
+
var priority1 = import_pseudoDescriptors.pseudoPriorities[groupPseudoKey];
|
|
8024
|
+
importanceBump = priority1;
|
|
8040
8025
|
}
|
|
8041
8026
|
}
|
|
8042
|
-
|
|
8043
|
-
|
|
8044
|
-
|
|
8045
|
-
|
|
8046
|
-
|
|
8047
|
-
|
|
8048
|
-
|
|
8049
|
-
|
|
8050
|
-
// this fixes issues where style prop got merged with wrong priority
|
|
8051
|
-
!isHOC && (isValidStyleKey(key, staticConfig) || import_constants4.isAndroid && key === "elevation")
|
|
8052
|
-
) {
|
|
8053
|
-
mergeStyle(styleState, key, val);
|
|
8054
|
-
continue;
|
|
8027
|
+
for (var subKey in mediaStyle1) {
|
|
8028
|
+
var _styleState2;
|
|
8029
|
+
if (subKey === "space") {
|
|
8030
|
+
space = valInit.space;
|
|
8031
|
+
continue;
|
|
8032
|
+
}
|
|
8033
|
+
(_styleState2 = styleState).style || (_styleState2.style = {}), mergeMediaByImportance(styleState, mediaKeyShort, subKey, mediaStyle1[subKey], usedKeys, mediaState3[mediaKeyShort], importanceBump), key === "fontFamily" && (styleState.fontFamily = mediaStyle1.fontFamily);
|
|
8034
|
+
}
|
|
8055
8035
|
}
|
|
8056
|
-
|
|
8036
|
+
continue;
|
|
8057
8037
|
}
|
|
8058
|
-
|
|
8059
|
-
|
|
8060
|
-
|
|
8061
|
-
(0, import_log.log)(" \u2714\uFE0F expand complete", keyInit), (0, import_log.log)("style", _object_spread9({}, styleState.style)), (0, import_log.log)("transforms", _object_spread9({}, transforms)), (0, import_log.log)("viewProps", _object_spread9({}, viewProps));
|
|
8062
|
-
} catch {
|
|
8038
|
+
if (key === "pointerEvents") {
|
|
8039
|
+
viewProps[key] = val;
|
|
8040
|
+
continue;
|
|
8063
8041
|
}
|
|
8064
|
-
|
|
8042
|
+
if (
|
|
8043
|
+
// is HOC we can just pass through the styles as props
|
|
8044
|
+
// this fixes issues where style prop got merged with wrong priority
|
|
8045
|
+
!isHOC && (isValidStyleKey(key, staticConfig) || import_constants4.isAndroid && key === "elevation")
|
|
8046
|
+
) {
|
|
8047
|
+
mergeStyle(styleState, key, val);
|
|
8048
|
+
continue;
|
|
8049
|
+
}
|
|
8050
|
+
isVariant || (viewProps[key] = val);
|
|
8065
8051
|
}
|
|
8066
8052
|
}
|
|
8053
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
8054
|
+
try {
|
|
8055
|
+
(0, import_log.log)(" \u2714\uFE0F expand complete", keyInit), (0, import_log.log)("style", _object_spread9({}, styleState.style)), (0, import_log.log)("transforms", _object_spread9({}, transforms)), (0, import_log.log)("viewProps", _object_spread9({}, viewProps));
|
|
8056
|
+
} catch {
|
|
8057
|
+
}
|
|
8058
|
+
console.groupEnd();
|
|
8059
|
+
}
|
|
8067
8060
|
}
|
|
8068
8061
|
}
|
|
8069
8062
|
}
|
|
@@ -8096,9 +8089,9 @@ current`, _object_spread9({}, styleState.style)));
|
|
|
8096
8089
|
}
|
|
8097
8090
|
var avoidNormalize = styleProps.noNormalize === !1;
|
|
8098
8091
|
if (!avoidNormalize) {
|
|
8099
|
-
if (styleState.style && ((0, import_expandStyles.fixStyles)(styleState.style), import_constants4.isWeb && !staticConfig.isReactNative && (0, import_getStylesAtomic.styleToCSS)(styleState.style)), styleState.
|
|
8092
|
+
if (styleState.style && ((0, import_expandStyles.fixStyles)(styleState.style), import_constants4.isWeb && !staticConfig.isReactNative && (0, import_getStylesAtomic.styleToCSS)(styleState.style)), styleState.flatTransforms) {
|
|
8100
8093
|
var _styleState4;
|
|
8101
|
-
(_styleState4 = styleState).style || (_styleState4.style = {}), Object.entries(styleState.
|
|
8094
|
+
(_styleState4 = styleState).style || (_styleState4.style = {}), Object.entries(styleState.flatTransforms).sort(function(param, param1) {
|
|
8102
8095
|
var _param = _sliced_to_array(param, 1), a = _param[0], _param1 = _sliced_to_array(param1, 1), b = _param1[0];
|
|
8103
8096
|
return a.localeCompare(b);
|
|
8104
8097
|
}).forEach(function(param) {
|
|
@@ -8216,7 +8209,7 @@ current`, _object_spread9({}, styleState.style)));
|
|
|
8216
8209
|
classNames[key] = val, (_usedKeys = usedKeys)[_key = key] || (_usedKeys[_key] = 1);
|
|
8217
8210
|
} else if (key in import_helpers.stylePropsTransform) {
|
|
8218
8211
|
var _styleState;
|
|
8219
|
-
(_styleState = styleState).
|
|
8212
|
+
(_styleState = styleState).flatTransforms || (_styleState.flatTransforms = {}), styleState.flatTransforms[key] = val;
|
|
8220
8213
|
} else {
|
|
8221
8214
|
var shouldNormalize = import_constants4.isWeb && !disableNormalize && !styleProps.noNormalize, out = shouldNormalize ? (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(val, key) : val;
|
|
8222
8215
|
if (
|
|
@@ -8287,6 +8280,10 @@ current`, _object_spread9({}, styleState.style)));
|
|
|
8287
8280
|
} else
|
|
8288
8281
|
viewProps[key] = val;
|
|
8289
8282
|
}
|
|
8283
|
+
function mergeMediaByImportance(styleState, mediaKey, key, value, importancesUsed, isSizeMedia, importanceBump) {
|
|
8284
|
+
var importance = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKey, key, importancesUsed, isSizeMedia);
|
|
8285
|
+
return importanceBump && (importance = (importance || 0) + importanceBump), importance === null ? !1 : (importancesUsed[key] = importance, mergeStyle(styleState, key, value), !0);
|
|
8286
|
+
}
|
|
8290
8287
|
}
|
|
8291
8288
|
});
|
|
8292
8289
|
|
|
@@ -9613,9 +9610,9 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
9613
9610
|
};
|
|
9614
9611
|
disposeGroupsListener = componentContext.groups.subscribe(function(name2, param) {
|
|
9615
9612
|
var layout = param.layout, pseudo = param.pseudo, persist = function() {
|
|
9613
|
+
var group = _object_spread_props8(_object_spread9({}, state.group), _define_property9({}, name2, current));
|
|
9616
9614
|
setStateShallow({
|
|
9617
|
-
|
|
9618
|
-
group: _object_spread_props8(_object_spread9({}, state.group), _define_property9({}, name2, current))
|
|
9615
|
+
group
|
|
9619
9616
|
});
|
|
9620
9617
|
};
|
|
9621
9618
|
if (pseudo && pseudoGroups != null && pseudoGroups.has(name2))
|
|
@@ -9634,20 +9631,20 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
9634
9631
|
pseudoGroups ? Object.keys(_to_consumable_array2(pseudoGroups)).join("") : 0,
|
|
9635
9632
|
mediaGroups ? Object.keys(_to_consumable_array2(mediaGroups)).join("") : 0
|
|
9636
9633
|
]);
|
|
9637
|
-
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,
|
|
9634
|
+
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_constants4.isWeb && !!(groupName || needsHoverState || onMouseEnter || onMouseLeave), shouldAttach = !!(attachFocus || attachPress || attachHover || runtimePressStyle || runtimeHoverStyle || runtimeFocusStyle), needsPressState = !!(groupName || runtimeHoverStyle);
|
|
9638
9635
|
process.env.NODE_ENV === "development" && time && time(_templateObject14());
|
|
9639
9636
|
var events = shouldAttach && !isDisabled && !props.asChild ? _object_spread9(_object_spread_props8(_object_spread9({
|
|
9640
9637
|
onPressOut: attachPress ? function(e) {
|
|
9641
9638
|
unPress(), onPressOut == null || onPressOut(e), onMouseUp == null || onMouseUp(e);
|
|
9642
9639
|
} : void 0
|
|
9643
|
-
}, (
|
|
9640
|
+
}, (attachHover || attachPress) && {
|
|
9644
9641
|
onMouseEnter: function(e) {
|
|
9645
9642
|
var next = {};
|
|
9646
|
-
needsHoverState && (next.hover = !0),
|
|
9643
|
+
needsHoverState && (next.hover = !0), needsPressState && state.pressIn && (next.press = !0), setStateShallow(next), onHoverIn == null || onHoverIn(e), onMouseEnter == null || onMouseEnter(e);
|
|
9647
9644
|
},
|
|
9648
9645
|
onMouseLeave: function(e) {
|
|
9649
9646
|
var next = {};
|
|
9650
|
-
mouseUps.add(unPress), needsHoverState && (next.hover = !1),
|
|
9647
|
+
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);
|
|
9651
9648
|
}
|
|
9652
9649
|
}), {
|
|
9653
9650
|
onPressIn: attachPress ? function(e) {
|
|
@@ -9690,7 +9687,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
9690
9687
|
}
|
|
9691
9688
|
process.env.NODE_ENV === "development" && time && time(_templateObject15()), process.env.NODE_ENV === "development" && debugProp === "verbose" && (0, import_log.log)("events", {
|
|
9692
9689
|
events,
|
|
9693
|
-
|
|
9690
|
+
attachHover,
|
|
9694
9691
|
attachPress
|
|
9695
9692
|
}), (_hooks_useEvents = import_setupHooks.hooks.useEvents) === null || _hooks_useEvents === void 0 || _hooks_useEvents.call(import_setupHooks.hooks, viewProps, events, splitStyles, setStateShallow, staticConfig);
|
|
9696
9693
|
var direction = props.spaceDirection || "both";
|