@tamagui/core 1.132.12 → 1.132.14
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 +178 -174
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +167 -162
- package/dist/test.native.js.map +2 -2
- package/package.json +10 -10
package/dist/test.native.js
CHANGED
|
@@ -150,9 +150,9 @@ var require_clamp_native = __commonJS({
|
|
|
150
150
|
}
|
|
151
151
|
});
|
|
152
152
|
module2.exports = __toCommonJS2(clamp_exports);
|
|
153
|
-
function clamp(
|
|
153
|
+
function clamp(value2, param) {
|
|
154
154
|
var [min, max] = param;
|
|
155
|
-
return Math.min(max, Math.max(min,
|
|
155
|
+
return Math.min(max, Math.max(min, value2));
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
});
|
|
@@ -1269,22 +1269,22 @@ var require_config_native = __commonJS({
|
|
|
1269
1269
|
{}
|
|
1270
1270
|
), { tokens, tokensParsed } = conf;
|
|
1271
1271
|
return prefixed === !1 ? tokens : prefixed === !0 ? tokensParsed : tokensMerged;
|
|
1272
|
-
}, getTokenObject = function(
|
|
1272
|
+
}, getTokenObject = function(value2, group) {
|
|
1273
1273
|
var _tokensMerged_group, _tokensMerged_, _conf_specificTokens_value;
|
|
1274
|
-
return (_conf_specificTokens_value = conf.specificTokens[
|
|
1275
|
-
return tokensMerged[cat][
|
|
1276
|
-
}) || ""]) === null || _tokensMerged_ === void 0 ? void 0 : _tokensMerged_[
|
|
1277
|
-
}, getToken2 = function(
|
|
1278
|
-
var useVariable = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : import_constants.isWeb, token = getTokenObject(
|
|
1274
|
+
return (_conf_specificTokens_value = conf.specificTokens[value2]) !== null && _conf_specificTokens_value !== void 0 ? _conf_specificTokens_value : group ? (_tokensMerged_group = tokensMerged[group]) === null || _tokensMerged_group === void 0 ? void 0 : _tokensMerged_group[value2] : (_tokensMerged_ = tokensMerged[Object.keys(tokensMerged).find(function(cat) {
|
|
1275
|
+
return tokensMerged[cat][value2];
|
|
1276
|
+
}) || ""]) === null || _tokensMerged_ === void 0 ? void 0 : _tokensMerged_[value2];
|
|
1277
|
+
}, getToken2 = function(value2, group) {
|
|
1278
|
+
var useVariable = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : import_constants.isWeb, token = getTokenObject(value2, group);
|
|
1279
1279
|
return useVariable ? token == null ? void 0 : token.variable : token == null ? void 0 : token.val;
|
|
1280
|
-
}, getTokenValue2 = function(
|
|
1281
|
-
if (!(
|
|
1280
|
+
}, getTokenValue2 = function(value2, group) {
|
|
1281
|
+
if (!(value2 === "unset" || value2 === "auto")) return getToken2(value2, group, !1);
|
|
1282
1282
|
}, useTokens = getTokens2, getThemes2 = function() {
|
|
1283
1283
|
return conf.themes;
|
|
1284
1284
|
}, configListeners = /* @__PURE__ */ new Set(), onConfiguredOnce = function(cb) {
|
|
1285
1285
|
conf ? cb(conf) : configListeners.add(cb);
|
|
1286
|
-
}, updateConfig2 = function(key,
|
|
1287
|
-
Object.assign(conf[key],
|
|
1286
|
+
}, updateConfig2 = function(key, value2) {
|
|
1287
|
+
Object.assign(conf[key], value2);
|
|
1288
1288
|
}, getFont = function(name) {
|
|
1289
1289
|
var _Object_entries_find, conf2 = getConfig2(), _conf_fontsParsed_name;
|
|
1290
1290
|
return (_conf_fontsParsed_name = conf2.fontsParsed[name]) !== null && _conf_fontsParsed_name !== void 0 ? _conf_fontsParsed_name : (_Object_entries_find = Object.entries(conf2.fontsParsed).find(function(param) {
|
|
@@ -1423,9 +1423,9 @@ var require_createVariable_native = __commonJS({
|
|
|
1423
1423
|
var includeVar = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, name = (0, import_helpers2.simpleHash)(nameProp, 60);
|
|
1424
1424
|
return includeVar ? constructCSSVariableName(name) : name;
|
|
1425
1425
|
};
|
|
1426
|
-
function px(
|
|
1426
|
+
function px(value2) {
|
|
1427
1427
|
return {
|
|
1428
|
-
val:
|
|
1428
|
+
val: value2,
|
|
1429
1429
|
needsPx: !0
|
|
1430
1430
|
};
|
|
1431
1431
|
}
|
|
@@ -1512,8 +1512,8 @@ var require_insertStyleRule_native = __commonJS({
|
|
|
1512
1512
|
function addTransform(identifier, css, rule) {
|
|
1513
1513
|
var s = css.indexOf("transform:");
|
|
1514
1514
|
if (s !== -1) {
|
|
1515
|
-
var startI = s + 10, endI = css.indexOf(";"),
|
|
1516
|
-
if (!insertedTransforms[identifier]) return insertedTransforms[identifier] =
|
|
1515
|
+
var startI = s + 10, endI = css.indexOf(";"), value2 = css.slice(startI, endI);
|
|
1516
|
+
if (!insertedTransforms[identifier]) return insertedTransforms[identifier] = value2, !0;
|
|
1517
1517
|
}
|
|
1518
1518
|
}
|
|
1519
1519
|
function scanAllSheets() {
|
|
@@ -2004,8 +2004,8 @@ var require_useMedia_native = __commonJS({
|
|
|
2004
2004
|
if (typeof query == "string") return query;
|
|
2005
2005
|
if (cache.has(query)) return cache.get(query);
|
|
2006
2006
|
var res = Object.entries(query).map(function(param) {
|
|
2007
|
-
var [feature,
|
|
2008
|
-
return feature = camelToHyphen(feature), typeof
|
|
2007
|
+
var [feature, value2] = param;
|
|
2008
|
+
return feature = camelToHyphen(feature), typeof value2 == "string" ? `(${feature}: ${value2})` : (typeof value2 == "number" && /[height|width]$/.test(feature) && (value2 = `${value2}px`), `(${feature}: ${value2})`);
|
|
2009
2009
|
}).join(" and ");
|
|
2010
2010
|
return key && (cachedMediaKeyToQuery[key] = res), cache.set(query, res), res;
|
|
2011
2011
|
}
|
|
@@ -2088,8 +2088,8 @@ var require_Tamagui_native = __commonJS({
|
|
|
2088
2088
|
var TamaguiManager;
|
|
2089
2089
|
}(), identifierToValue = /* @__PURE__ */ new Map(), getValueFromIdentifier = function(identifier) {
|
|
2090
2090
|
return identifierToValue.get(identifier);
|
|
2091
|
-
}, setIdentifierValue = function(identifier,
|
|
2092
|
-
identifierToValue.set(identifier,
|
|
2091
|
+
}, setIdentifierValue = function(identifier, value2) {
|
|
2092
|
+
identifierToValue.set(identifier, value2);
|
|
2093
2093
|
};
|
|
2094
2094
|
}
|
|
2095
2095
|
});
|
|
@@ -2156,8 +2156,8 @@ var require_compose_refs_native = __commonJS({
|
|
|
2156
2156
|
});
|
|
2157
2157
|
module2.exports = __toCommonJS2(compose_refs_exports);
|
|
2158
2158
|
var React3 = __toESM2(require("react"));
|
|
2159
|
-
function setRef(ref,
|
|
2160
|
-
typeof ref == "function" ? ref(
|
|
2159
|
+
function setRef(ref, value2) {
|
|
2160
|
+
typeof ref == "function" ? ref(value2) : ref && (ref.current = value2);
|
|
2161
2161
|
}
|
|
2162
2162
|
function composeRefs() {
|
|
2163
2163
|
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) refs[_key] = arguments[_key];
|
|
@@ -2479,8 +2479,8 @@ var require_createStyledContext_native = __commonJS({
|
|
|
2479
2479
|
})
|
|
2480
2480
|
});
|
|
2481
2481
|
}, useStyledContext = function() {
|
|
2482
|
-
var scopeIn = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", lastScopeInNamespace = (0, import_react3.useContext)(LastScopeInNamespace), scope = namespace ? scopeIn ? getNamespacedScope(scopeIn) : lastScopeInNamespace : scopeIn, context = scope ? getOrCreateScopedContext(scope) : OGContext,
|
|
2483
|
-
return
|
|
2482
|
+
var scopeIn = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", lastScopeInNamespace = (0, import_react3.useContext)(LastScopeInNamespace), scope = namespace ? scopeIn ? getNamespacedScope(scopeIn) : lastScopeInNamespace : scopeIn, context = scope ? getOrCreateScopedContext(scope) : OGContext, value2 = import_react3.default.useContext(context);
|
|
2483
|
+
return value2;
|
|
2484
2484
|
};
|
|
2485
2485
|
return Context.Provider = Provider, Context.props = defaultValues, Context.context = OGContext, Context.useStyledContext = useStyledContext, Context;
|
|
2486
2486
|
}
|
|
@@ -4022,11 +4022,11 @@ var require_normalizeValueWithProperty_native = __commonJS({
|
|
|
4022
4022
|
translateX: !0,
|
|
4023
4023
|
translateY: !0
|
|
4024
4024
|
};
|
|
4025
|
-
function normalizeValueWithProperty(
|
|
4025
|
+
function normalizeValueWithProperty(value2) {
|
|
4026
4026
|
var property = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
|
|
4027
|
-
if (!import_constants.isWeb || import_helpers2.stylePropsUnitless[property] || property && !stylePropsAllPlusTransforms[property] || typeof
|
|
4028
|
-
var res =
|
|
4029
|
-
return
|
|
4027
|
+
if (!import_constants.isWeb || import_helpers2.stylePropsUnitless[property] || property && !stylePropsAllPlusTransforms[property] || typeof value2 == "boolean") return value2;
|
|
4028
|
+
var res = value2;
|
|
4029
|
+
return value2 && typeof value2 == "object" ? value2 : (typeof value2 == "number" ? res = `${value2}px` : property && (res = `${res}`), res);
|
|
4030
4030
|
}
|
|
4031
4031
|
}
|
|
4032
4032
|
});
|
|
@@ -4290,26 +4290,26 @@ var require_expandStyle_native = __commonJS({
|
|
|
4290
4290
|
return `${prefix}${k}`;
|
|
4291
4291
|
});
|
|
4292
4292
|
};
|
|
4293
|
-
function expandStyle(key,
|
|
4293
|
+
function expandStyle(key, value2) {
|
|
4294
4294
|
if (import_constants.isAndroid && key === "elevationAndroid") return [
|
|
4295
4295
|
[
|
|
4296
4296
|
"elevation",
|
|
4297
|
-
|
|
4297
|
+
value2
|
|
4298
4298
|
]
|
|
4299
4299
|
];
|
|
4300
4300
|
if (key in EXPANSIONS) return EXPANSIONS[key].map(function(key2) {
|
|
4301
4301
|
return [
|
|
4302
4302
|
key2,
|
|
4303
|
-
|
|
4303
|
+
value2
|
|
4304
4304
|
];
|
|
4305
4305
|
});
|
|
4306
4306
|
if (key in import_webToNativeProps.webToNativeExpansion) return import_webToNativeProps.webToNativeExpansion[key].map(function(key2) {
|
|
4307
4307
|
return [
|
|
4308
4308
|
key2,
|
|
4309
|
-
|
|
4309
|
+
value2
|
|
4310
4310
|
];
|
|
4311
4311
|
});
|
|
4312
|
-
if (key in import_webToNativeProps.webToNativeDynamicExpansion) return import_webToNativeProps.webToNativeDynamicExpansion[key](
|
|
4312
|
+
if (key in import_webToNativeProps.webToNativeDynamicExpansion) return import_webToNativeProps.webToNativeDynamicExpansion[key](value2);
|
|
4313
4313
|
}
|
|
4314
4314
|
var all = [
|
|
4315
4315
|
"Top",
|
|
@@ -4554,8 +4554,8 @@ var require_normalizeStyle_native = __commonJS({
|
|
|
4554
4554
|
res[key] = normalizeStyle(prop, disableNormalize);
|
|
4555
4555
|
continue;
|
|
4556
4556
|
}
|
|
4557
|
-
var
|
|
4558
|
-
out ? Object.assign(res, Object.fromEntries(out)) : res[key] =
|
|
4557
|
+
var value2 = disableNormalize ? prop : (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(prop, key), out = (0, import_expandStyle.expandStyle)(key, value2);
|
|
4558
|
+
out ? Object.assign(res, Object.fromEntries(out)) : res[key] = value2;
|
|
4559
4559
|
}
|
|
4560
4560
|
}
|
|
4561
4561
|
return (0, import_expandStyles.fixStyles)(res), res;
|
|
@@ -4774,18 +4774,18 @@ var require_propMapper_native = __commonJS({
|
|
|
4774
4774
|
}
|
|
4775
4775
|
});
|
|
4776
4776
|
module2.exports = __toCommonJS2(propMapper_exports);
|
|
4777
|
-
var import_constants = require_index_native2(), import_helpers2 = require_index_native3(), import_config = require_config_native(), import_createVariable = require_createVariable_native(), import_expandStyle = require_expandStyle_native(), import_getVariantExtras = require_getVariantExtras_native(), import_isObj = require_isObj_native(), import_normalizeStyle = require_normalizeStyle_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_skipProps = require_skipProps_native(), propMapper = function(key,
|
|
4778
|
-
if (disabled) return map(key,
|
|
4777
|
+
var import_constants = require_index_native2(), import_helpers2 = require_index_native3(), import_config = require_config_native(), import_createVariable = require_createVariable_native(), import_expandStyle = require_expandStyle_native(), import_getVariantExtras = require_getVariantExtras_native(), import_isObj = require_isObj_native(), import_normalizeStyle = require_normalizeStyle_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_skipProps = require_skipProps_native(), propMapper = function(key, value2, styleState, disabled, map) {
|
|
4778
|
+
if (disabled) return map(key, value2);
|
|
4779
4779
|
if (lastFontFamilyToken = null, !(!import_constants.isAndroid && key === "elevationAndroid")) {
|
|
4780
4780
|
var { conf, styleProps, staticConfig } = styleState;
|
|
4781
|
-
if (
|
|
4781
|
+
if (value2 === "unset") {
|
|
4782
4782
|
var _conf_unset, unsetVal = (_conf_unset = conf.unset) === null || _conf_unset === void 0 ? void 0 : _conf_unset[key];
|
|
4783
|
-
if (unsetVal != null)
|
|
4783
|
+
if (unsetVal != null) value2 = unsetVal;
|
|
4784
4784
|
else return;
|
|
4785
4785
|
}
|
|
4786
4786
|
var { variants } = staticConfig;
|
|
4787
4787
|
if (!styleProps.noExpand && variants && key in variants) {
|
|
4788
|
-
var variantValue = resolveVariants(key,
|
|
4788
|
+
var variantValue = resolveVariants(key, value2, styleProps, styleState, "");
|
|
4789
4789
|
if (variantValue) {
|
|
4790
4790
|
variantValue.forEach(function(param) {
|
|
4791
4791
|
var [_$key, _$value] = param;
|
|
@@ -4794,30 +4794,30 @@ var require_propMapper_native = __commonJS({
|
|
|
4794
4794
|
return;
|
|
4795
4795
|
}
|
|
4796
4796
|
}
|
|
4797
|
-
if (styleProps.disableExpandShorthands || key in conf.shorthands && (key = conf.shorthands[key]),
|
|
4797
|
+
if (styleProps.disableExpandShorthands || key in conf.shorthands && (key = conf.shorthands[key]), value2 != null && (value2[0] === "$" ? value2 = getTokenForKey(key, value2, styleProps, styleState) : (0, import_createVariable.isVariable)(value2) && (value2 = resolveVariableValue(key, value2, styleProps.resolveValues))), value2 != null) {
|
|
4798
4798
|
key === "fontFamily" && lastFontFamilyToken && (styleState.fontFamily = lastFontFamilyToken);
|
|
4799
|
-
var expanded = styleProps.noExpand ? null : (0, import_expandStyle.expandStyle)(key,
|
|
4799
|
+
var expanded = styleProps.noExpand ? null : (0, import_expandStyle.expandStyle)(key, value2);
|
|
4800
4800
|
if (expanded) for (var max = expanded.length, i = 0; i < max; i++) {
|
|
4801
4801
|
var [nkey, nvalue] = expanded[i];
|
|
4802
4802
|
map(nkey, nvalue);
|
|
4803
4803
|
}
|
|
4804
|
-
else map(key,
|
|
4804
|
+
else map(key, value2);
|
|
4805
4805
|
}
|
|
4806
4806
|
}
|
|
4807
|
-
}, resolveVariants = function(key,
|
|
4807
|
+
}, resolveVariants = function(key, value2, styleProps, styleState, parentVariantKey) {
|
|
4808
4808
|
var { staticConfig, conf, debug } = styleState, { variants } = staticConfig;
|
|
4809
4809
|
if (variants) {
|
|
4810
|
-
var variantValue = getVariantDefinition(variants[key],
|
|
4810
|
+
var variantValue = getVariantDefinition(variants[key], value2, conf);
|
|
4811
4811
|
if (!variantValue) {
|
|
4812
|
-
if (process.env.TAMAGUI_WARN_ON_MISSING_VARIANT === "1" && typeof
|
|
4812
|
+
if (process.env.TAMAGUI_WARN_ON_MISSING_VARIANT === "1" && typeof value2 != "boolean") {
|
|
4813
4813
|
var name = staticConfig.componentName || "[UnnamedComponent]";
|
|
4814
|
-
console.warn(`No variant found: ${name} has variant "${key}", but no matching value "${
|
|
4814
|
+
console.warn(`No variant found: ${name} has variant "${key}", but no matching value "${value2}"`);
|
|
4815
4815
|
}
|
|
4816
4816
|
return;
|
|
4817
4817
|
}
|
|
4818
4818
|
if (typeof variantValue == "function") {
|
|
4819
4819
|
var fn = variantValue, extras = (0, import_getVariantExtras.getVariantExtras)(styleState);
|
|
4820
|
-
variantValue = fn(
|
|
4820
|
+
variantValue = fn(value2, extras);
|
|
4821
4821
|
}
|
|
4822
4822
|
var fontFamilyResult;
|
|
4823
4823
|
if ((0, import_isObj.isObj)(variantValue)) {
|
|
@@ -4840,10 +4840,10 @@ var require_propMapper_native = __commonJS({
|
|
|
4840
4840
|
}
|
|
4841
4841
|
} else if (typeof input == "string" && input[0] === "$") return input;
|
|
4842
4842
|
}
|
|
4843
|
-
var variableToFontNameCache = /* @__PURE__ */ new WeakMap(), resolveTokensAndVariants = function(key,
|
|
4843
|
+
var variableToFontNameCache = /* @__PURE__ */ new WeakMap(), resolveTokensAndVariants = function(key, value2, styleProps, styleState, parentVariantKey) {
|
|
4844
4844
|
var { conf, staticConfig, debug, theme } = styleState, { variants } = staticConfig, res = {};
|
|
4845
|
-
for (var _key in
|
|
4846
|
-
var subKey = conf.shorthands[_key] || _key, val =
|
|
4845
|
+
for (var _key in value2) {
|
|
4846
|
+
var subKey = conf.shorthands[_key] || _key, val = value2[_key];
|
|
4847
4847
|
if (!(!styleProps.noSkip && subKey in import_skipProps.skipProps)) {
|
|
4848
4848
|
if (styleProps.noExpand) res[subKey] = val;
|
|
4849
4849
|
else if (variants && subKey in variants) {
|
|
@@ -4907,17 +4907,17 @@ var require_propMapper_native = __commonJS({
|
|
|
4907
4907
|
spreadName: `...${name}`
|
|
4908
4908
|
};
|
|
4909
4909
|
});
|
|
4910
|
-
function getVariantDefinition(variant,
|
|
4910
|
+
function getVariantDefinition(variant, value2, conf) {
|
|
4911
4911
|
if (variant) {
|
|
4912
4912
|
if (typeof variant == "function") return variant;
|
|
4913
|
-
var exact = variant[
|
|
4913
|
+
var exact = variant[value2];
|
|
4914
4914
|
if (exact) return exact;
|
|
4915
|
-
if (
|
|
4915
|
+
if (value2 != null) {
|
|
4916
4916
|
var { tokensParsed } = conf, _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
4917
4917
|
try {
|
|
4918
4918
|
for (var _iterator = tokenCats[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
4919
4919
|
var { name, spreadName } = _step.value;
|
|
4920
|
-
if (spreadName in variant && name in tokensParsed &&
|
|
4920
|
+
if (spreadName in variant && name in tokensParsed && value2 in tokensParsed[name]) return variant[spreadName];
|
|
4921
4921
|
}
|
|
4922
4922
|
} catch (err) {
|
|
4923
4923
|
_didIteratorError = !0, _iteratorError = err;
|
|
@@ -4929,32 +4929,32 @@ var require_propMapper_native = __commonJS({
|
|
|
4929
4929
|
}
|
|
4930
4930
|
}
|
|
4931
4931
|
var fontSizeVariant = variant["...fontSize"];
|
|
4932
|
-
if (fontSizeVariant && conf.fontSizeTokens.has(
|
|
4932
|
+
if (fontSizeVariant && conf.fontSizeTokens.has(value2)) return fontSizeVariant;
|
|
4933
4933
|
}
|
|
4934
|
-
return variant[`:${typeof
|
|
4934
|
+
return variant[`:${typeof value2}`] || variant["..."];
|
|
4935
4935
|
}
|
|
4936
4936
|
}
|
|
4937
4937
|
var fontShorthand = {
|
|
4938
4938
|
fontSize: "size",
|
|
4939
4939
|
fontWeight: "weight"
|
|
4940
|
-
}, lastFontFamilyToken = null, getTokenForKey = function(key,
|
|
4940
|
+
}, lastFontFamilyToken = null, getTokenForKey = function(key, value2, styleProps, styleState) {
|
|
4941
4941
|
var _staticConfig_accept, resolveAs = styleProps.resolveValues || "none";
|
|
4942
|
-
if (resolveAs === "none") return
|
|
4943
|
-
var { theme, conf = (0, import_config.getConfig)(), context, fontFamily, staticConfig } = styleState, themeValue = theme ? theme[
|
|
4942
|
+
if (resolveAs === "none") return value2;
|
|
4943
|
+
var { theme, conf = (0, import_config.getConfig)(), context, fontFamily, staticConfig } = styleState, themeValue = theme ? theme[value2] || theme[value2.slice(1)] : void 0, tokensParsed = conf.tokensParsed, valOrVar, hasSet = !1, customTokenAccept = staticConfig == null || (_staticConfig_accept = staticConfig.accept) === null || _staticConfig_accept === void 0 ? void 0 : _staticConfig_accept[key];
|
|
4944
4944
|
if (customTokenAccept) {
|
|
4945
|
-
var val = themeValue ?? tokensParsed[customTokenAccept][
|
|
4945
|
+
var val = themeValue ?? tokensParsed[customTokenAccept][value2];
|
|
4946
4946
|
val != null && (resolveAs = "value", valOrVar = val, hasSet = !0);
|
|
4947
4947
|
}
|
|
4948
4948
|
if (themeValue) {
|
|
4949
|
-
if (resolveAs === "except-theme") return
|
|
4949
|
+
if (resolveAs === "except-theme") return value2;
|
|
4950
4950
|
valOrVar = themeValue, hasSet = !0;
|
|
4951
4951
|
} else {
|
|
4952
|
-
if (
|
|
4952
|
+
if (value2 in conf.specificTokens) hasSet = !0, valOrVar = conf.specificTokens[value2];
|
|
4953
4953
|
else {
|
|
4954
4954
|
switch (key) {
|
|
4955
4955
|
case "fontFamily": {
|
|
4956
4956
|
var _fontsParsed_value, fontsParsed = context != null && context.language ? (0, import_getVariantExtras.getFontsForLanguage)(conf.fontsParsed, context.language) : conf.fontsParsed;
|
|
4957
|
-
valOrVar = ((_fontsParsed_value = fontsParsed[
|
|
4957
|
+
valOrVar = ((_fontsParsed_value = fontsParsed[value2]) === null || _fontsParsed_value === void 0 ? void 0 : _fontsParsed_value.family) || value2, lastFontFamilyToken = value2, hasSet = !0;
|
|
4958
4958
|
break;
|
|
4959
4959
|
}
|
|
4960
4960
|
case "fontSize":
|
|
@@ -4964,18 +4964,18 @@ var require_propMapper_native = __commonJS({
|
|
|
4964
4964
|
var fam = fontFamily || conf.defaultFontToken;
|
|
4965
4965
|
if (fam) {
|
|
4966
4966
|
var _font_, fontsParsed1 = context != null && context.language ? (0, import_getVariantExtras.getFontsForLanguage)(conf.fontsParsed, context.language) : conf.fontsParsed, font = fontsParsed1[fam] || fontsParsed1[conf.defaultFontToken];
|
|
4967
|
-
valOrVar = (font == null || (_font_ = font[fontShorthand[key] || key]) === null || _font_ === void 0 ? void 0 : _font_[
|
|
4967
|
+
valOrVar = (font == null || (_font_ = font[fontShorthand[key] || key]) === null || _font_ === void 0 ? void 0 : _font_[value2]) || value2, hasSet = !0;
|
|
4968
4968
|
}
|
|
4969
4969
|
break;
|
|
4970
4970
|
}
|
|
4971
4971
|
}
|
|
4972
4972
|
for (var cat in import_helpers2.tokenCategories) if (key in import_helpers2.tokenCategories[cat]) {
|
|
4973
|
-
var res = tokensParsed[cat][
|
|
4973
|
+
var res = tokensParsed[cat][value2];
|
|
4974
4974
|
res != null && (valOrVar = res, hasSet = !0);
|
|
4975
4975
|
}
|
|
4976
4976
|
}
|
|
4977
4977
|
if (!hasSet) {
|
|
4978
|
-
var spaceVar = tokensParsed.space[
|
|
4978
|
+
var spaceVar = tokensParsed.space[value2];
|
|
4979
4979
|
spaceVar != null && (valOrVar = spaceVar, hasSet = !0);
|
|
4980
4980
|
}
|
|
4981
4981
|
}
|
|
@@ -5100,8 +5100,8 @@ var require_transformsToString_native = __commonJS({
|
|
|
5100
5100
|
// { matrix: [1,2,3,4,5,6] } => 'matrix(1,2,3,4,5,6)'
|
|
5101
5101
|
// { perspective: 1000 } => perspective(1000px)
|
|
5102
5102
|
function(transform) {
|
|
5103
|
-
var type = Object.keys(transform)[0],
|
|
5104
|
-
return type === "matrix" || type === "matrix3d" ? `${type}(${
|
|
5103
|
+
var type = Object.keys(transform)[0], value2 = transform[type];
|
|
5104
|
+
return type === "matrix" || type === "matrix3d" ? `${type}(${value2.join(",")})` : `${type}(${(0, import_normalizeValueWithProperty.normalizeValueWithProperty)(value2, type)})`;
|
|
5105
5105
|
}
|
|
5106
5106
|
).join(" ");
|
|
5107
5107
|
}
|
|
@@ -5352,10 +5352,12 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5352
5352
|
}
|
|
5353
5353
|
} else if (!(themeName === mediaKeyShort || themeName.startsWith(mediaKeyShort))) return;
|
|
5354
5354
|
} else if (isGroupMedia) {
|
|
5355
|
-
var _groupContext_groupName, _componentState_group, groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name, groupState = groupContext == null || (_groupContext_groupName = groupContext[groupName]) === null || _groupContext_groupName === void 0 ? void 0 : _groupContext_groupName.state;
|
|
5356
|
-
if (!groupState)
|
|
5355
|
+
var _groupContext_groupName, _componentState_group, groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name, groupState = groupContext == null || (_groupContext_groupName = groupContext[groupName]) === null || _groupContext_groupName === void 0 ? void 0 : _groupContext_groupName.state, groupPseudoKey = groupInfo.pseudo, groupMediaKey = groupInfo.media;
|
|
5356
|
+
if (!groupState) {
|
|
5357
|
+
pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set());
|
|
5357
5358
|
return;
|
|
5358
|
-
|
|
5359
|
+
}
|
|
5360
|
+
var componentGroupState = (_componentState_group = componentState.group) === null || _componentState_group === void 0 ? void 0 : _componentState_group[groupName];
|
|
5359
5361
|
if (groupMediaKey) {
|
|
5360
5362
|
mediaGroups || (mediaGroups = /* @__PURE__ */ new Set()), mediaGroups.add(groupMediaKey);
|
|
5361
5363
|
var mediaState1 = componentGroupState == null ? void 0 : componentGroupState.media, isActive = mediaState1 == null ? void 0 : mediaState1[groupMediaKey];
|
|
@@ -5446,7 +5448,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5446
5448
|
if (!styleState.style.$$css) {
|
|
5447
5449
|
var atomic, _iteratorNormalCompletion, _didIteratorError, _iteratorError;
|
|
5448
5450
|
try {
|
|
5449
|
-
for (var _iterator, _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) var atomicStyle, _props_animateOnly, _props_animateOnly1, key2,
|
|
5451
|
+
for (var _iterator, _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) var atomicStyle, _props_animateOnly, _props_animateOnly1, key2, value2, identifier, isAnimatedAndAnimateOnly, nonAnimatedAnimateOnly;
|
|
5450
5452
|
} catch (err) {
|
|
5451
5453
|
} finally {
|
|
5452
5454
|
}
|
|
@@ -5608,14 +5610,14 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5608
5610
|
delete viewProps[key], viewProps[key] = next;
|
|
5609
5611
|
} else viewProps[key] = val;
|
|
5610
5612
|
}
|
|
5611
|
-
function mergeMediaByImportance(styleState, mediaKey, key,
|
|
5613
|
+
function mergeMediaByImportance(styleState, mediaKey, key, value2, isSizeMedia, importanceBump, debugProp) {
|
|
5612
5614
|
var usedKeys = styleState.usedKeys, importance = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKey, key, styleState, isSizeMedia);
|
|
5613
5615
|
if (importanceBump && (importance = (importance || 0) + importanceBump), importance === null) return !1;
|
|
5614
5616
|
if (key in import_pseudoDescriptors.pseudoDescriptors) {
|
|
5615
5617
|
var descriptor = import_pseudoDescriptors.pseudoDescriptors[key], descriptorKey = descriptor.stateKey || descriptor.name, isDisabled = styleState.componentState[descriptorKey] === !1;
|
|
5616
5618
|
if (isDisabled) return !1;
|
|
5617
|
-
for (var subKey in
|
|
5618
|
-
} else mergeStyle(styleState, key,
|
|
5619
|
+
for (var subKey in value2) mergeStyle(styleState, subKey, value2[subKey], importance);
|
|
5620
|
+
} else mergeStyle(styleState, key, value2, importance);
|
|
5619
5621
|
return !0;
|
|
5620
5622
|
}
|
|
5621
5623
|
function normalizeStyle(style) {
|
|
@@ -5825,7 +5827,9 @@ var require_subscribeToContextGroup_native = __commonJS({
|
|
|
5825
5827
|
}
|
|
5826
5828
|
}, createGroupListener = function(name, param) {
|
|
5827
5829
|
var { setStateShallow, pseudoGroups, mediaGroups, groupContext } = param, parent = groupContext == null ? void 0 : groupContext[name];
|
|
5828
|
-
|
|
5830
|
+
if (!parent) return function() {
|
|
5831
|
+
};
|
|
5832
|
+
var dispose = parent.subscribe(function(param2) {
|
|
5829
5833
|
var { layout, pseudo } = param2;
|
|
5830
5834
|
setStateShallow(function(prev) {
|
|
5831
5835
|
var _prev_group, didChange = !1, group = ((_prev_group = prev.group) === null || _prev_group === void 0 ? void 0 : _prev_group[name]) || {
|
|
@@ -5850,7 +5854,11 @@ var require_subscribeToContextGroup_native = __commonJS({
|
|
|
5850
5854
|
}
|
|
5851
5855
|
} : prev;
|
|
5852
5856
|
});
|
|
5853
|
-
})
|
|
5857
|
+
});
|
|
5858
|
+
return function() {
|
|
5859
|
+
dispose(), setStateShallow({
|
|
5860
|
+
group: {}
|
|
5861
|
+
});
|
|
5854
5862
|
};
|
|
5855
5863
|
};
|
|
5856
5864
|
}
|
|
@@ -6219,14 +6227,14 @@ var require_getThemeProxied_native = __commonJS({
|
|
|
6219
6227
|
curKeys && (curKeys.current || (curKeys.current = /* @__PURE__ */ new Set()), curKeys.current.add(key));
|
|
6220
6228
|
}
|
|
6221
6229
|
var proxied1 = Object.fromEntries(Object.entries(_state.theme).flatMap(function(param) {
|
|
6222
|
-
var [key,
|
|
6223
|
-
...
|
|
6230
|
+
var [key, value2] = param, proxied2 = {
|
|
6231
|
+
...value2,
|
|
6224
6232
|
get val() {
|
|
6225
|
-
return globalThis.tamaguiAvoidTracking || track(key),
|
|
6233
|
+
return globalThis.tamaguiAvoidTracking || track(key), value2.val;
|
|
6226
6234
|
},
|
|
6227
6235
|
get(platform) {
|
|
6228
6236
|
if (curState) {
|
|
6229
|
-
var outVal = (0, import_createVariable.getVariable)(
|
|
6237
|
+
var outVal = (0, import_createVariable.getVariable)(value2), { name, scheme, inverses } = curState, shouldOptimize = scheme && platform !== "web" && import_constants.isIos && !curProps.deopt && (0, import_config.getSetting)("fastSchemeChange") && inverses === 0 && (0, import_doesRootSchemeMatchSystem.doesRootSchemeMatchSystem)();
|
|
6230
6238
|
if (shouldOptimize) {
|
|
6231
6239
|
var _config_themes_name, _config_themes_oppositeName, oppositeScheme = scheme === "dark" ? "light" : "dark", oppositeName = name.replace(scheme, oppositeScheme), color = (0, import_createVariable.getVariable)((_config_themes_name = config.themes[name]) === null || _config_themes_name === void 0 ? void 0 : _config_themes_name[key]), oppositeColor = (0, import_createVariable.getVariable)((_config_themes_oppositeName = config.themes[oppositeName]) === null || _config_themes_oppositeName === void 0 ? void 0 : _config_themes_oppositeName[key]), dynamicVal = (0, import_getDynamicVal.getDynamicVal)({
|
|
6232
6240
|
scheme,
|
|
@@ -6695,9 +6703,9 @@ var require_ClientOnly_native = __commonJS({
|
|
|
6695
6703
|
});
|
|
6696
6704
|
module2.exports = __toCommonJS2(ClientOnly_exports);
|
|
6697
6705
|
var import_jsx_runtime2 = require("react/jsx-runtime"), import_react3 = require("react"), ClientOnlyContext2 = /* @__PURE__ */ (0, import_react3.createContext)(!1), ClientOnly2 = function(param) {
|
|
6698
|
-
var { children,
|
|
6706
|
+
var { children, enabled } = param, existingValue = (0, import_react3.useContext)(ClientOnlyContext2);
|
|
6699
6707
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ClientOnlyContext2.Provider, {
|
|
6700
|
-
value,
|
|
6708
|
+
value: enabled ?? existingValue,
|
|
6701
6709
|
children
|
|
6702
6710
|
});
|
|
6703
6711
|
};
|
|
@@ -6774,13 +6782,13 @@ var require_index_native7 = __commonJS({
|
|
|
6774
6782
|
var React3 = __toESM2(require("react")), import_ClientOnly = require_ClientOnly_native(), import_ClientOnly2 = require_ClientOnly_native(), useIsClientOnly = function() {
|
|
6775
6783
|
return React3.useContext(import_ClientOnly.ClientOnlyContext);
|
|
6776
6784
|
};
|
|
6777
|
-
function useDidFinishSSR(
|
|
6785
|
+
function useDidFinishSSR() {
|
|
6778
6786
|
var clientOnly = React3.useContext(import_ClientOnly.ClientOnlyContext);
|
|
6779
|
-
return value
|
|
6787
|
+
return value != null ? value : !0;
|
|
6780
6788
|
}
|
|
6781
|
-
function useClientValue(
|
|
6789
|
+
function useClientValue(value1) {
|
|
6782
6790
|
var done = useDidFinishSSR();
|
|
6783
|
-
return done ? typeof
|
|
6791
|
+
return done ? typeof value1 == "function" ? value1() : value1 : void 0;
|
|
6784
6792
|
}
|
|
6785
6793
|
}
|
|
6786
6794
|
});
|
|
@@ -6829,24 +6837,22 @@ var require_useComponentState_native = __commonJS({
|
|
|
6829
6837
|
});
|
|
6830
6838
|
module2.exports = __toCommonJS2(useComponentState_exports);
|
|
6831
6839
|
var import_constants = require_index_native2(), import_is_equal_shallow = require_index_native5(), import_use_did_finish_ssr = require_index_native7(), import_react3 = require("react"), import_defaultComponentState = require_defaultComponentState_native(), import_isObj = require_isObj_native(), import_log = require_log_native(), useComponentState = function(props, animationDriver, staticConfig, config) {
|
|
6832
|
-
var _animationDriver_usePresence, isHydrated = (0, import_use_did_finish_ssr.useDidFinishSSR)(), needsHydration = !(0, import_use_did_finish_ssr.useIsClientOnly)(), [startedUnhydrated] = (0, import_react3.useState)(needsHydration && !isHydrated), useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, stateRef = (0, import_react3.useRef)(void 0
|
|
6833
|
-
stateRef.current || (stateRef.current = {});
|
|
6834
|
-
var hasAnimationProp = !!("animation" in props || props.style && hasAnimatedStyleValue(props.style)), supportsCSS = animationDriver == null ? void 0 : animationDriver.supportsCSS, curStateRef = stateRef.current;
|
|
6840
|
+
var _animationDriver_usePresence, isHydrated = (0, import_use_did_finish_ssr.useDidFinishSSR)(), needsHydration = !(0, import_use_did_finish_ssr.useIsClientOnly)(), [startedUnhydrated] = (0, import_react3.useState)(needsHydration && !isHydrated), useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, { isHOC } = staticConfig, stateRef = (0, import_react3.useRef)({}), hasAnimationProp = !!(!isHOC && "animation" in props || props.style && hasAnimatedStyleValue(props.style)), supportsCSS = animationDriver == null ? void 0 : animationDriver.supportsCSS, curStateRef = stateRef.current;
|
|
6835
6841
|
!needsHydration && hasAnimationProp && (curStateRef.hasAnimated = !0);
|
|
6836
6842
|
var willBeAnimatedClient = function() {
|
|
6837
|
-
var next = !!(hasAnimationProp && !
|
|
6843
|
+
var next = !!(hasAnimationProp && !isHOC && useAnimations);
|
|
6838
6844
|
return !!(next || curStateRef.hasAnimated);
|
|
6839
6845
|
}(), willBeAnimated = !import_constants.isServer && willBeAnimatedClient;
|
|
6840
6846
|
willBeAnimated && !curStateRef.hasAnimated && (curStateRef.hasAnimated = !0);
|
|
6841
|
-
var { disableClassName } = props, presence = willBeAnimated && props.animatePresence !== !1 && (animationDriver == null || (_animationDriver_usePresence = animationDriver.usePresence) === null || _animationDriver_usePresence === void 0 ? void 0 : _animationDriver_usePresence.call(animationDriver)) || null, presenceState = presence == null ? void 0 : presence[2], isExiting = (presenceState == null ? void 0 : presenceState.isPresent) === !1, isEntering = (presenceState == null ? void 0 : presenceState.isPresent) === !0 && presenceState.initial !== !1, hasEnterStyle = !!props.enterStyle, hasAnimationThatNeedsHydrate = hasAnimationProp && !isHydrated && ((animationDriver == null ? void 0 : animationDriver.isReactNative) || !supportsCSS),
|
|
6847
|
+
var { disableClassName } = props, presence = !isHOC && willBeAnimated && props.animatePresence !== !1 && (animationDriver == null || (_animationDriver_usePresence = animationDriver.usePresence) === null || _animationDriver_usePresence === void 0 ? void 0 : _animationDriver_usePresence.call(animationDriver)) || null, presenceState = presence == null ? void 0 : presence[2], isExiting = (presenceState == null ? void 0 : presenceState.isPresent) === !1, isEntering = (presenceState == null ? void 0 : presenceState.isPresent) === !0 && presenceState.initial !== !1, hasEnterStyle = !!props.enterStyle, hasAnimationThatNeedsHydrate = hasAnimationProp && !isHydrated && ((animationDriver == null ? void 0 : animationDriver.isReactNative) || !supportsCSS), canImmediatelyEnter = hasEnterStyle || isEntering, shouldEnter = !isHOC && (hasEnterStyle || isEntering || hasAnimationThatNeedsHydrate || // disableClassName doesnt work server side, only client, so needs hydrate
|
|
6842
6848
|
// this is just for a better ux, supports css variables for light/dark, media queries, etc
|
|
6843
|
-
disableClassName, initialState = shouldEnter ? (
|
|
6849
|
+
disableClassName), initialState = shouldEnter ? (
|
|
6844
6850
|
// on the very first render we switch all spring animation drivers to css rendering
|
|
6845
6851
|
// this is because we need to use css variables, which they don't support to do proper SSR
|
|
6846
6852
|
// without flickers of the wrong colors.
|
|
6847
6853
|
// but once we do that initial hydration and we are in client side rendering mode,
|
|
6848
6854
|
// we can avoid the extra re-render on mount
|
|
6849
|
-
|
|
6855
|
+
canImmediatelyEnter ? import_defaultComponentState.defaultComponentStateShouldEnter : import_defaultComponentState.defaultComponentState
|
|
6850
6856
|
) : import_defaultComponentState.defaultComponentStateMounted, disabled = isDisabled(props);
|
|
6851
6857
|
disabled != null && (initialState.disabled = disabled);
|
|
6852
6858
|
var states = (0, import_react3.useState)(initialState), state = props.forceStyle ? {
|
|
@@ -7120,7 +7126,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7120
7126
|
}
|
|
7121
7127
|
});
|
|
7122
7128
|
module2.exports = __toCommonJS2(createComponent_exports);
|
|
7123
|
-
var import_jsx_runtime2 = require("react/jsx-runtime"), import_compose_refs = require_index_native4(), import_constants = require_index_native2(), import_helpers2 = require_index_native3(), import_is_equal_shallow = require_index_native5(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_constants2 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_ComponentContext = require_ComponentContext_native(), import_GroupContext = require_GroupContext_native(), import_createVariable = require_createVariable_native(), import_defaultComponentState = require_defaultComponentState_native(), import_getShorthandValue = require_getShorthandValue_native(), import_getSplitStyles = require_getSplitStyles_native(), import_log = require_log_native(), import_mergeProps = require_mergeProps_native(), import_setElementProps = require_setElementProps_native(), import_subscribeToContextGroup = require_subscribeToContextGroup_native(), import_themeable = require_themeable_native(), import_wrapStyleTags = require_wrapStyleTags_native(), import_useComponentState = require_useComponentState_native(), import_useMedia = require_useMedia_native(), import_useTheme = require_useTheme_native(), import_setupHooks = require_setupHooks_native(), import_Slot = require_Slot_native(), import_Theme = require_Theme_native(),
|
|
7129
|
+
var import_jsx_runtime2 = require("react/jsx-runtime"), import_compose_refs = require_index_native4(), import_constants = require_index_native2(), import_helpers2 = require_index_native3(), import_is_equal_shallow = require_index_native5(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_constants2 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_ComponentContext = require_ComponentContext_native(), import_GroupContext = require_GroupContext_native(), import_createVariable = require_createVariable_native(), import_defaultComponentState = require_defaultComponentState_native(), import_getShorthandValue = require_getShorthandValue_native(), import_getSplitStyles = require_getSplitStyles_native(), import_log = require_log_native(), import_mergeProps = require_mergeProps_native(), import_objectIdentityKey = require_objectIdentityKey_native(), import_setElementProps = require_setElementProps_native(), import_subscribeToContextGroup = require_subscribeToContextGroup_native(), import_themeable = require_themeable_native(), import_wrapStyleTags = require_wrapStyleTags_native(), import_useComponentState = require_useComponentState_native(), import_useMedia = require_useMedia_native(), import_useTheme = require_useTheme_native(), import_setupHooks = require_setupHooks_native(), import_Slot = require_Slot_native(), import_Theme = require_Theme_native(), componentSetStates = /* @__PURE__ */ new Set(), avoidReRenderKeys = /* @__PURE__ */ new Set([
|
|
7124
7130
|
"hover",
|
|
7125
7131
|
"press",
|
|
7126
7132
|
"pressIn",
|
|
@@ -7184,16 +7190,15 @@ var require_createComponent_native = __commonJS({
|
|
|
7184
7190
|
} : defaultProps, props = propsIn;
|
|
7185
7191
|
curDefaultProps && (props = (0, import_mergeProps.mergeProps)(curDefaultProps, propsIn));
|
|
7186
7192
|
var componentName2 = props.componentName || staticConfig.componentName, componentContext = import_react3.default.useContext(import_ComponentContext.ComponentContext), groupContextParent = import_react3.default.useContext(import_GroupContext.GroupContext), animationDriver = componentContext.animationDriver, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, componentState = (0, import_useComponentState.useComponentState)(props, animationDriver, staticConfig, config), { disabled, groupName, hasAnimationProp, hasEnterStyle, isAnimated, isExiting, isHydrated, presence, presenceState, setState, noClass, state, stateRef, supportsCSS, willBeAnimated, willBeAnimatedClient, startedUnhydrated } = componentState;
|
|
7187
|
-
|
|
7188
|
-
var pendingState =
|
|
7189
|
-
pendingState && (
|
|
7190
|
-
}
|
|
7193
|
+
hasAnimationProp && animationDriver != null && animationDriver.avoidReRenders && (0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
7194
|
+
var pendingState = stateRef.current.nextState;
|
|
7195
|
+
pendingState && (stateRef.current.nextState = void 0, componentState.setStateShallow(pendingState));
|
|
7196
|
+
});
|
|
7191
7197
|
var allGroupContexts = (0, import_react3.useMemo)(function() {
|
|
7192
|
-
var _stateRef_current_group;
|
|
7198
|
+
var _stateRef_current_group_listeners, _stateRef_current_group;
|
|
7193
7199
|
if (!groupName || props.passThrough) return groupContextParent;
|
|
7194
|
-
(_stateRef_current_group = stateRef.current.group) === null || _stateRef_current_group === void 0 || _stateRef_current_group.listeners.clear();
|
|
7195
7200
|
var listeners = /* @__PURE__ */ new Set();
|
|
7196
|
-
return stateRef.current.group = {
|
|
7201
|
+
return (_stateRef_current_group = stateRef.current.group) === null || _stateRef_current_group === void 0 || (_stateRef_current_group_listeners = _stateRef_current_group.listeners) === null || _stateRef_current_group_listeners === void 0 || _stateRef_current_group_listeners.clear(), stateRef.current.group = {
|
|
7197
7202
|
listeners,
|
|
7198
7203
|
emit(state2) {
|
|
7199
7204
|
listeners.forEach(function(l) {
|
|
@@ -7262,8 +7267,8 @@ var require_createComponent_native = __commonJS({
|
|
|
7262
7267
|
isAnimated,
|
|
7263
7268
|
willBeAnimated,
|
|
7264
7269
|
styledContextProps
|
|
7265
|
-
}, themeName = (themeState == null ? void 0 : themeState.name) || "", splitStyles = (0, import_getSplitStyles.useSplitStyles)(props, staticConfig, theme, themeName, state, styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp), groupContext = groupName && (allGroupContexts == null ? void 0 : allGroupContexts[groupName]) || null;
|
|
7266
|
-
if (
|
|
7270
|
+
}, themeName = (themeState == null ? void 0 : themeState.name) || "", splitStyles = (0, import_getSplitStyles.useSplitStyles)(props, staticConfig, theme, themeName, state, styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp), isPassthrough = !splitStyles, groupContext = groupName && (allGroupContexts == null ? void 0 : allGroupContexts[groupName]) || null;
|
|
7271
|
+
if (!isPassthrough && groupContext && // avoids onLayout if we don't need it
|
|
7267
7272
|
props.containerType !== "normal") {
|
|
7268
7273
|
var groupState = groupContext == null ? void 0 : groupContext.state;
|
|
7269
7274
|
if (groupState && groupState.layout === void 0) {
|
|
@@ -7274,31 +7279,35 @@ var require_createComponent_native = __commonJS({
|
|
|
7274
7279
|
});
|
|
7275
7280
|
}
|
|
7276
7281
|
}
|
|
7277
|
-
if (
|
|
7278
|
-
var
|
|
7282
|
+
if (!isPassthrough && (hasAnimationProp || groupName) && animationDriver != null && animationDriver.avoidReRenders) {
|
|
7283
|
+
var updateGroupListeners2 = function() {
|
|
7284
|
+
var updatedState = stateRef.current.nextState;
|
|
7285
|
+
if (groupContext) {
|
|
7286
|
+
var { group, hasDynGroupChildren, unmounted, animation, ...childrenGroupState } = updatedState;
|
|
7287
|
+
notifyGroupSubscribers(groupContext, stateRef.current.group || null, childrenGroupState);
|
|
7288
|
+
}
|
|
7289
|
+
}, updateGroupListeners = updateGroupListeners2, _componentContext, ogSetStateShallow = setStateShallow;
|
|
7279
7290
|
stateRef.current.updateStyleListener = function() {
|
|
7280
|
-
var updatedState =
|
|
7281
|
-
groupContext && notifyGroupSubscribers(groupContext, stateRef.current.group || null, childrenGroupState);
|
|
7282
|
-
var nextStyles = (0, import_getSplitStyles.getSplitStyles)(props, staticConfig, theme, themeName, updatedState, mediaState22 ? {
|
|
7291
|
+
var updatedState = stateRef.current.nextState || state, mediaState22 = stateRef.current.nextMedia, nextStyles = (0, import_getSplitStyles.getSplitStyles)(props, staticConfig, theme, themeName, updatedState, mediaState22 ? {
|
|
7283
7292
|
...styleProps,
|
|
7284
7293
|
mediaState: mediaState22
|
|
7285
7294
|
} : styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp), useStyleListener = stateRef.current.useStyleListener;
|
|
7286
7295
|
useStyleListener == null || useStyleListener((nextStyles == null ? void 0 : nextStyles.style) || {});
|
|
7287
7296
|
}, (_componentContext = componentContext).mediaEmit || (_componentContext.mediaEmit = function(next) {
|
|
7288
7297
|
var _stateRef_current_updateStyleListener, _stateRef_current;
|
|
7289
|
-
|
|
7298
|
+
stateRef.current.nextMedia = next, (_stateRef_current_updateStyleListener = (_stateRef_current = stateRef.current).updateStyleListener) === null || _stateRef_current_updateStyleListener === void 0 || _stateRef_current_updateStyleListener.call(_stateRef_current);
|
|
7290
7299
|
}), stateRef.current.setStateShallow = function(nextOrGetNext) {
|
|
7291
|
-
var prev =
|
|
7300
|
+
var prev = stateRef.current.nextState || state, next = typeof nextOrGetNext == "function" ? nextOrGetNext(prev) : nextOrGetNext;
|
|
7292
7301
|
if (!(next === prev || (0, import_is_equal_shallow.isEqualShallow)(prev, next))) {
|
|
7293
7302
|
var canAvoidReRender = Object.keys(next).every(function(key3) {
|
|
7294
7303
|
return avoidReRenderKeys.has(key3);
|
|
7295
|
-
})
|
|
7296
|
-
|
|
7297
|
-
|
|
7298
|
-
|
|
7299
|
-
|
|
7300
|
-
|
|
7301
|
-
|
|
7304
|
+
}), updatedState = {
|
|
7305
|
+
...prev,
|
|
7306
|
+
...next
|
|
7307
|
+
};
|
|
7308
|
+
if (stateRef.current.nextState = updatedState, canAvoidReRender) {
|
|
7309
|
+
var _stateRef_current_updateStyleListener, _stateRef_current;
|
|
7310
|
+
updateGroupListeners2(), (_stateRef_current_updateStyleListener = (_stateRef_current = stateRef.current).updateStyleListener) === null || _stateRef_current_updateStyleListener === void 0 || _stateRef_current_updateStyleListener.call(_stateRef_current);
|
|
7302
7311
|
} else ogSetStateShallow(next);
|
|
7303
7312
|
}
|
|
7304
7313
|
}, setStateShallow = function(state2) {
|
|
@@ -7366,7 +7375,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7366
7375
|
});
|
|
7367
7376
|
animations && (animations.ref && (animatedRef = animations.ref), isHydrated && animations && (animationStyles = animations.style, viewProps.style = animationStyles, animations.className && (viewProps.className = `${state.unmounted === "should-enter" ? "t_unmounted " : ""}${viewProps.className || ""} ${animations.className}`)));
|
|
7368
7377
|
}
|
|
7369
|
-
|
|
7378
|
+
!isPassthrough && groupContext && // avoids onLayout if we don't need it
|
|
7370
7379
|
props.containerType !== "normal" && (nonTamaguiProps.onLayout = (0, import_helpers2.composeEventHandlers)(nonTamaguiProps.onLayout, function(e) {
|
|
7371
7380
|
var _stateRef_current_group, layout = e.nativeEvent.layout;
|
|
7372
7381
|
groupContext.state.layout = layout, (_stateRef_current_group = stateRef.current.group) === null || _stateRef_current_group === void 0 || _stateRef_current_group.emit({
|
|
@@ -7422,12 +7431,8 @@ var require_createComponent_native = __commonJS({
|
|
|
7422
7431
|
}, [
|
|
7423
7432
|
allGroupContexts,
|
|
7424
7433
|
disabled,
|
|
7425
|
-
pseudoGroups ?
|
|
7426
|
-
|
|
7427
|
-
]).join("") : 0,
|
|
7428
|
-
mediaGroups ? Object.keys([
|
|
7429
|
-
...mediaGroups
|
|
7430
|
-
]).join("") : 0
|
|
7434
|
+
pseudoGroups ? (0, import_objectIdentityKey.objectIdentityKey)(pseudoGroups) : 0,
|
|
7435
|
+
mediaGroups ? (0, import_objectIdentityKey.objectIdentityKey)(mediaGroups) : 0
|
|
7431
7436
|
]);
|
|
7432
7437
|
var groupEmitter = stateRef.current.group;
|
|
7433
7438
|
(0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
@@ -7508,7 +7513,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7508
7513
|
onPress,
|
|
7509
7514
|
onLongPress
|
|
7510
7515
|
});
|
|
7511
|
-
|
|
7516
|
+
isPassthrough && (content = propsIn.children, elementType = BaseViewComponent, viewProps = {
|
|
7512
7517
|
style: {
|
|
7513
7518
|
display: "contents"
|
|
7514
7519
|
}
|
|
@@ -8252,10 +8257,10 @@ var require_createFont_native = __commonJS({
|
|
|
8252
8257
|
...sectionKeys
|
|
8253
8258
|
])
|
|
8254
8259
|
].map(function(key) {
|
|
8255
|
-
var _section_key, _ref,
|
|
8256
|
-
return fillValue =
|
|
8260
|
+
var _section_key, _ref, value2 = (_ref = (_section_key = section[key]) !== null && _section_key !== void 0 ? _section_key : defaultValue) !== null && _ref !== void 0 ? _ref : fillValue;
|
|
8261
|
+
return fillValue = value2, defaultValue = value2, [
|
|
8257
8262
|
key,
|
|
8258
|
-
|
|
8263
|
+
value2
|
|
8259
8264
|
];
|
|
8260
8265
|
}));
|
|
8261
8266
|
}, createFont = function(font) {
|
|
@@ -9922,6 +9927,7 @@ var require_TamaguiProvider_native = __commonJS({
|
|
|
9922
9927
|
})
|
|
9923
9928
|
});
|
|
9924
9929
|
return (0, import_config.getSetting)("disableSSR") && (contents = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_use_did_finish_ssr.ClientOnly, {
|
|
9930
|
+
enabled: !0,
|
|
9925
9931
|
children: contents
|
|
9926
9932
|
})), /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, {
|
|
9927
9933
|
children: [
|
|
@@ -10002,16 +10008,15 @@ var require_Configuration_native = __commonJS({
|
|
|
10002
10008
|
});
|
|
10003
10009
|
module2.exports = __toCommonJS2(Configuration_exports);
|
|
10004
10010
|
var import_jsx_runtime2 = require("react/jsx-runtime"), import_use_did_finish_ssr = require_index_native7(), import_react3 = __toESM2(require("react")), import_ComponentContext = require_ComponentContext_native(), Configuration = function(props) {
|
|
10005
|
-
var current = import_react3.default.useContext(import_ComponentContext.ComponentContext);
|
|
10011
|
+
var current = import_react3.default.useContext(import_ComponentContext.ComponentContext), _props_disableSSR;
|
|
10006
10012
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_use_did_finish_ssr.ClientOnly, {
|
|
10007
|
-
|
|
10013
|
+
enabled: (_props_disableSSR = props.disableSSR) !== null && _props_disableSSR !== void 0 ? _props_disableSSR : current.disableSSR,
|
|
10008
10014
|
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ComponentContext.ComponentContext.Provider, {
|
|
10009
10015
|
...current,
|
|
10010
10016
|
...props
|
|
10011
10017
|
})
|
|
10012
10018
|
});
|
|
10013
10019
|
};
|
|
10014
|
-
Configuration.displayName = "Configuration";
|
|
10015
10020
|
}
|
|
10016
10021
|
});
|
|
10017
10022
|
|
|
@@ -10405,41 +10410,41 @@ var require_matchQuery_native = __commonJS({
|
|
|
10405
10410
|
var inverse = query.inverse, typeMatch = query.type === "all" || values.type === query.type;
|
|
10406
10411
|
if (typeMatch && inverse || !(typeMatch || inverse)) return !1;
|
|
10407
10412
|
var expressionsMatch = query.expressions.every(function(expression) {
|
|
10408
|
-
var feature = expression.feature, modifier = expression.modifier, expValue = expression.value,
|
|
10409
|
-
if (!
|
|
10413
|
+
var feature = expression.feature, modifier = expression.modifier, expValue = expression.value, value2 = values[feature];
|
|
10414
|
+
if (!value2) return !1;
|
|
10410
10415
|
switch (feature) {
|
|
10411
10416
|
case "orientation":
|
|
10412
10417
|
case "scan":
|
|
10413
|
-
return
|
|
10418
|
+
return value2.toLowerCase() === expValue.toLowerCase();
|
|
10414
10419
|
case "width":
|
|
10415
10420
|
case "height":
|
|
10416
10421
|
case "device-width":
|
|
10417
10422
|
case "device-height":
|
|
10418
|
-
expValue = toPx(expValue),
|
|
10423
|
+
expValue = toPx(expValue), value2 = toPx(value2);
|
|
10419
10424
|
break;
|
|
10420
10425
|
case "resolution":
|
|
10421
|
-
expValue = toDpi(expValue),
|
|
10426
|
+
expValue = toDpi(expValue), value2 = toDpi(value2);
|
|
10422
10427
|
break;
|
|
10423
10428
|
case "aspect-ratio":
|
|
10424
10429
|
case "device-aspect-ratio":
|
|
10425
10430
|
case /* Deprecated */
|
|
10426
10431
|
"device-pixel-ratio":
|
|
10427
|
-
expValue = toDecimal(expValue),
|
|
10432
|
+
expValue = toDecimal(expValue), value2 = toDecimal(value2);
|
|
10428
10433
|
break;
|
|
10429
10434
|
case "grid":
|
|
10430
10435
|
case "color":
|
|
10431
10436
|
case "color-index":
|
|
10432
10437
|
case "monochrome":
|
|
10433
|
-
expValue = Number.parseInt(expValue, 10) || 1,
|
|
10438
|
+
expValue = Number.parseInt(expValue, 10) || 1, value2 = Number.parseInt(value2, 10) || 0;
|
|
10434
10439
|
break;
|
|
10435
10440
|
}
|
|
10436
10441
|
switch (modifier) {
|
|
10437
10442
|
case "min":
|
|
10438
|
-
return
|
|
10443
|
+
return value2 >= expValue;
|
|
10439
10444
|
case "max":
|
|
10440
|
-
return
|
|
10445
|
+
return value2 <= expValue;
|
|
10441
10446
|
default:
|
|
10442
|
-
return
|
|
10447
|
+
return value2 === expValue;
|
|
10443
10448
|
}
|
|
10444
10449
|
});
|
|
10445
10450
|
return expressionsMatch && !inverse || !expressionsMatch && inverse;
|
|
@@ -10471,35 +10476,35 @@ var require_matchQuery_native = __commonJS({
|
|
|
10471
10476
|
return decimal || (numbers = ratio.match(/^(\d+)\s*\/\s*(\d+)$/), decimal = numbers[1] / numbers[2]), decimal;
|
|
10472
10477
|
}
|
|
10473
10478
|
function toDpi(resolution) {
|
|
10474
|
-
var _String_match,
|
|
10479
|
+
var _String_match, value2 = Number.parseFloat(resolution), units = (_String_match = String(resolution).match(RE_RESOLUTION_UNIT)) === null || _String_match === void 0 ? void 0 : _String_match[1];
|
|
10475
10480
|
switch (units) {
|
|
10476
10481
|
case "dpcm":
|
|
10477
|
-
return
|
|
10482
|
+
return value2 / 2.54;
|
|
10478
10483
|
case "dppx":
|
|
10479
|
-
return
|
|
10484
|
+
return value2 * 96;
|
|
10480
10485
|
default:
|
|
10481
|
-
return
|
|
10486
|
+
return value2;
|
|
10482
10487
|
}
|
|
10483
10488
|
}
|
|
10484
10489
|
function toPx(length) {
|
|
10485
|
-
var _String_match,
|
|
10490
|
+
var _String_match, value2 = Number.parseFloat(length), units = (_String_match = String(length).match(RE_LENGTH_UNIT)) === null || _String_match === void 0 ? void 0 : _String_match[1];
|
|
10486
10491
|
switch (units) {
|
|
10487
10492
|
case "em":
|
|
10488
|
-
return
|
|
10493
|
+
return value2 * 16;
|
|
10489
10494
|
case "rem":
|
|
10490
|
-
return
|
|
10495
|
+
return value2 * 16;
|
|
10491
10496
|
case "cm":
|
|
10492
|
-
return
|
|
10497
|
+
return value2 * 96 / 2.54;
|
|
10493
10498
|
case "mm":
|
|
10494
|
-
return
|
|
10499
|
+
return value2 * 96 / 2.54 / 10;
|
|
10495
10500
|
case "in":
|
|
10496
|
-
return
|
|
10501
|
+
return value2 * 96;
|
|
10497
10502
|
case "pt":
|
|
10498
|
-
return
|
|
10503
|
+
return value2 * 72;
|
|
10499
10504
|
case "pc":
|
|
10500
|
-
return
|
|
10505
|
+
return value2 * 72 / 12;
|
|
10501
10506
|
default:
|
|
10502
|
-
return
|
|
10507
|
+
return value2;
|
|
10503
10508
|
}
|
|
10504
10509
|
}
|
|
10505
10510
|
}
|
|
@@ -10561,13 +10566,13 @@ var require_mediaQueryList_native = __commonJS({
|
|
|
10561
10566
|
function _create_class(Constructor, protoProps, staticProps) {
|
|
10562
10567
|
return protoProps && _defineProperties(Constructor.prototype, protoProps), staticProps && _defineProperties(Constructor, staticProps), Constructor;
|
|
10563
10568
|
}
|
|
10564
|
-
function _define_property(obj, key,
|
|
10569
|
+
function _define_property(obj, key, value2) {
|
|
10565
10570
|
return key in obj ? Object.defineProperty(obj, key, {
|
|
10566
|
-
value,
|
|
10571
|
+
value: value2,
|
|
10567
10572
|
enumerable: !0,
|
|
10568
10573
|
configurable: !0,
|
|
10569
10574
|
writable: !0
|
|
10570
|
-
}) : obj[key] =
|
|
10575
|
+
}) : obj[key] = value2, obj;
|
|
10571
10576
|
}
|
|
10572
10577
|
var NativeMediaQueryList = /* @__PURE__ */ function() {
|
|
10573
10578
|
"use strict";
|
|
@@ -11237,13 +11242,13 @@ var require_ResponderTouchHistoryStore_native = __commonJS({
|
|
|
11237
11242
|
function _create_class(Constructor, protoProps, staticProps) {
|
|
11238
11243
|
return protoProps && _defineProperties(Constructor.prototype, protoProps), staticProps && _defineProperties(Constructor, staticProps), Constructor;
|
|
11239
11244
|
}
|
|
11240
|
-
function _define_property(obj, key,
|
|
11245
|
+
function _define_property(obj, key, value2) {
|
|
11241
11246
|
return key in obj ? Object.defineProperty(obj, key, {
|
|
11242
|
-
value,
|
|
11247
|
+
value: value2,
|
|
11243
11248
|
enumerable: !0,
|
|
11244
11249
|
configurable: !0,
|
|
11245
11250
|
writable: !0
|
|
11246
|
-
}) : obj[key] =
|
|
11251
|
+
}) : obj[key] = value2, obj;
|
|
11247
11252
|
}
|
|
11248
11253
|
var ResponderTouchHistoryStore = /* @__PURE__ */ function() {
|
|
11249
11254
|
"use strict";
|