@tamagui/core 1.106.0 → 1.107.0
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 +20 -10
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +20 -10
- package/dist/test.native.js.map +2 -2
- package/package.json +6 -6
package/dist/native.js
CHANGED
|
@@ -5345,7 +5345,7 @@ var require_createMediaStyle_native = __commonJS({
|
|
|
5345
5345
|
return rule.replace(identifier, nextIdentifier);
|
|
5346
5346
|
}).join(";"), isHover = !1;
|
|
5347
5347
|
if (isNonWindowMedia) {
|
|
5348
|
-
var specificity = (priority || 0) + (isGroup ? 1 : 0);
|
|
5348
|
+
var specificity = (priority || 0) + (isGroup || isPlatform ? 1 : 0);
|
|
5349
5349
|
if (isTheme || isGroup) {
|
|
5350
5350
|
var _getGroupPropParts = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyIn), name = _getGroupPropParts.name, media = _getGroupPropParts.media, pseudo = _getGroupPropParts.pseudo;
|
|
5351
5351
|
groupMediaKey = media, isGroup && (containerName = name);
|
|
@@ -7999,10 +7999,8 @@ current`, _object_spread2({}, styleState.style)));
|
|
|
7999
7999
|
var importance = descriptor.priority;
|
|
8000
8000
|
for (var pkey in pseudoStyleObject) {
|
|
8001
8001
|
var val1 = pseudoStyleObject[pkey];
|
|
8002
|
-
if (isDisabled)
|
|
8003
|
-
|
|
8004
|
-
defaultValues != null && !(pkey in usedKeys) && (!styleState.style || !(pkey in styleState.style)) && mergeStyle(styleState, pkey, defaultValues);
|
|
8005
|
-
} else {
|
|
8002
|
+
if (isDisabled) applyDefaultStyle(pkey, styleState);
|
|
8003
|
+
else {
|
|
8006
8004
|
var curImportance = usedKeys[pkey] || 0, shouldMerge = importance >= curImportance;
|
|
8007
8005
|
if (shouldMerge) {
|
|
8008
8006
|
var _pseudos1, _key1;
|
|
@@ -8091,14 +8089,20 @@ current`, _object_spread2({}, styleState.style)));
|
|
|
8091
8089
|
if (groupMediaKey) {
|
|
8092
8090
|
mediaGroups || (mediaGroups = /* @__PURE__ */ new Set()), mediaGroups.add(groupMediaKey);
|
|
8093
8091
|
var mediaState1 = componentGroupState == null ? void 0 : componentGroupState.media, isActive = mediaState1 == null ? void 0 : mediaState1[groupMediaKey];
|
|
8094
|
-
if (!mediaState1 && groupContext.layout && (isActive = (0, import_useMedia.mediaKeyMatch)(groupMediaKey, groupContext.layout)), process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" \u{1F3D8}\uFE0F GROUP media ".concat(groupMediaKey, " active? ").concat(isActive)), !isActive)
|
|
8092
|
+
if (!mediaState1 && groupContext.layout && (isActive = (0, import_useMedia.mediaKeyMatch)(groupMediaKey, groupContext.layout)), process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" \u{1F3D8}\uFE0F GROUP media ".concat(groupMediaKey, " active? ").concat(isActive)), !isActive) {
|
|
8093
|
+
for (var pkey1 in mediaStyle1) applyDefaultStyle(pkey1, styleState);
|
|
8094
|
+
continue;
|
|
8095
|
+
}
|
|
8095
8096
|
importanceBump = 2;
|
|
8096
8097
|
}
|
|
8097
8098
|
if (groupPseudoKey) {
|
|
8098
8099
|
pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set()), pseudoGroups.add(groupName);
|
|
8099
8100
|
var componentGroupPseudoState = (componentGroupState || // fallback to context initially
|
|
8100
8101
|
context.groups.state[groupName]).pseudo, isActive1 = componentGroupPseudoState == null ? void 0 : componentGroupPseudoState[groupPseudoKey], priority1 = import_pseudoDescriptors.pseudoPriorities[groupPseudoKey];
|
|
8101
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" \u{1F3D8}\uFE0F GROUP pseudo ".concat(groupMediaKey, " active? ").concat(isActive1, ", priority ").concat(priority1)), !isActive1)
|
|
8102
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" \u{1F3D8}\uFE0F GROUP pseudo ".concat(groupMediaKey, " active? ").concat(isActive1, ", priority ").concat(priority1)), !isActive1) {
|
|
8103
|
+
for (var pkey2 in mediaStyle1) applyDefaultStyle(pkey2, styleState);
|
|
8104
|
+
continue;
|
|
8105
|
+
}
|
|
8102
8106
|
importanceBump = priority1;
|
|
8103
8107
|
}
|
|
8104
8108
|
}
|
|
@@ -8108,7 +8112,9 @@ current`, _object_spread2({}, styleState.style)));
|
|
|
8108
8112
|
space = valInit.space;
|
|
8109
8113
|
continue;
|
|
8110
8114
|
}
|
|
8111
|
-
(_styleState1 = styleState).style || (_styleState1.style = {})
|
|
8115
|
+
(_styleState1 = styleState).style || (_styleState1.style = {});
|
|
8116
|
+
var didMerge = mergeMediaByImportance(styleState, mediaKeyShort, subKey, mediaStyle1[subKey], usedKeys, mediaState2[mediaKeyShort], importanceBump, debug);
|
|
8117
|
+
didMerge && key === "fontFamily" && (styleState.fontFamily = mediaStyle1.fontFamily);
|
|
8112
8118
|
}
|
|
8113
8119
|
}
|
|
8114
8120
|
continue;
|
|
@@ -8357,6 +8363,10 @@ current`, _object_spread2({}, styleState.style)));
|
|
|
8357
8363
|
}
|
|
8358
8364
|
return import_constants.isWeb && Array.isArray(out.transform) && (out.transform = (0, import_transformsToString.transformsToString)(out.transform)), (0, import_expandStyles.fixStyles)(out), out;
|
|
8359
8365
|
}
|
|
8366
|
+
function applyDefaultStyle(pkey, styleState) {
|
|
8367
|
+
var defaultValues = animatableDefaults[pkey];
|
|
8368
|
+
defaultValues != null && !(pkey in styleState.usedKeys) && (!styleState.style || !(pkey in styleState.style)) && mergeStyle(styleState, pkey, defaultValues);
|
|
8369
|
+
}
|
|
8360
8370
|
}
|
|
8361
8371
|
});
|
|
8362
8372
|
|
|
@@ -10182,11 +10192,11 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
10182
10192
|
}, subscribeToContextGroup = function(param) {
|
|
10183
10193
|
var _param_disabled = param.disabled, disabled = _param_disabled === void 0 ? !1 : _param_disabled, setStateShallow = param.setStateShallow, pseudoGroups = param.pseudoGroups, mediaGroups = param.mediaGroups, componentContext = param.componentContext, state = param.state;
|
|
10184
10194
|
if (pseudoGroups || mediaGroups) {
|
|
10185
|
-
var _componentContext_groups, current = {
|
|
10195
|
+
var _componentContext_groups_subscribe, _componentContext_groups, current = {
|
|
10186
10196
|
pseudo: {},
|
|
10187
10197
|
media: {}
|
|
10188
10198
|
};
|
|
10189
|
-
return process.env.NODE_ENV === "development" && !componentContext.groups && console.debug("No context group found"), (_componentContext_groups = componentContext.groups) === null || _componentContext_groups === void 0 ? void 0 :
|
|
10199
|
+
return process.env.NODE_ENV === "development" && !componentContext.groups && console.debug("No context group found"), (_componentContext_groups = componentContext.groups) === null || _componentContext_groups === void 0 || (_componentContext_groups_subscribe = _componentContext_groups.subscribe) === null || _componentContext_groups_subscribe === void 0 ? void 0 : _componentContext_groups_subscribe.call(_componentContext_groups, function(name, param2) {
|
|
10190
10200
|
var layout = param2.layout, pseudo = param2.pseudo, persist = function() {
|
|
10191
10201
|
var group = _object_spread_props(_object_spread2({}, state.group), _define_property2({}, name, current));
|
|
10192
10202
|
setStateShallow({
|