@tamagui/core 1.132.14 → 1.132.16
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 +127 -125
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +117 -115
- 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(value, param) {
|
|
154
154
|
var [min, max] = param;
|
|
155
|
-
return Math.min(max, Math.max(min,
|
|
155
|
+
return Math.min(max, Math.max(min, value));
|
|
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(value, 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[value]) !== null && _conf_specificTokens_value !== void 0 ? _conf_specificTokens_value : group ? (_tokensMerged_group = tokensMerged[group]) === null || _tokensMerged_group === void 0 ? void 0 : _tokensMerged_group[value] : (_tokensMerged_ = tokensMerged[Object.keys(tokensMerged).find(function(cat) {
|
|
1275
|
+
return tokensMerged[cat][value];
|
|
1276
|
+
}) || ""]) === null || _tokensMerged_ === void 0 ? void 0 : _tokensMerged_[value];
|
|
1277
|
+
}, getToken2 = function(value, group) {
|
|
1278
|
+
var useVariable = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : import_constants.isWeb, token = getTokenObject(value, 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(value, group) {
|
|
1281
|
+
if (!(value === "unset" || value === "auto")) return getToken2(value, 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, value) {
|
|
1287
|
+
Object.assign(conf[key], value);
|
|
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(value) {
|
|
1427
1427
|
return {
|
|
1428
|
-
val:
|
|
1428
|
+
val: value,
|
|
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(";"), value = css.slice(startI, endI);
|
|
1516
|
+
if (!insertedTransforms[identifier]) return insertedTransforms[identifier] = value, !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, value] = param;
|
|
2008
|
+
return feature = camelToHyphen(feature), typeof value == "string" ? `(${feature}: ${value})` : (typeof value == "number" && /[height|width]$/.test(feature) && (value = `${value}px`), `(${feature}: ${value})`);
|
|
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, value) {
|
|
2092
|
+
identifierToValue.set(identifier, value);
|
|
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, value) {
|
|
2160
|
+
typeof ref == "function" ? ref(value) : ref && (ref.current = value);
|
|
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, value = import_react3.default.useContext(context);
|
|
2483
|
+
return value;
|
|
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(value) {
|
|
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 value == "boolean") return value;
|
|
4028
|
+
var res = value;
|
|
4029
|
+
return value && typeof value == "object" ? value : (typeof value == "number" ? res = `${value}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, value) {
|
|
4294
4294
|
if (import_constants.isAndroid && key === "elevationAndroid") return [
|
|
4295
4295
|
[
|
|
4296
4296
|
"elevation",
|
|
4297
|
-
|
|
4297
|
+
value
|
|
4298
4298
|
]
|
|
4299
4299
|
];
|
|
4300
4300
|
if (key in EXPANSIONS) return EXPANSIONS[key].map(function(key2) {
|
|
4301
4301
|
return [
|
|
4302
4302
|
key2,
|
|
4303
|
-
|
|
4303
|
+
value
|
|
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
|
+
value
|
|
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](value);
|
|
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 value = disableNormalize ? prop : (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(prop, key), out = (0, import_expandStyle.expandStyle)(key, value);
|
|
4558
|
+
out ? Object.assign(res, Object.fromEntries(out)) : res[key] = value;
|
|
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, value, styleState, disabled, map) {
|
|
4778
|
+
if (disabled) return map(key, value);
|
|
4779
4779
|
if (lastFontFamilyToken = null, !(!import_constants.isAndroid && key === "elevationAndroid")) {
|
|
4780
4780
|
var { conf, styleProps, staticConfig } = styleState;
|
|
4781
|
-
if (
|
|
4781
|
+
if (value === "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) value = 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, value, 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]), value != null && (value[0] === "$" ? value = getTokenForKey(key, value, styleProps, styleState) : (0, import_createVariable.isVariable)(value) && (value = resolveVariableValue(key, value, styleProps.resolveValues))), value != 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, value);
|
|
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, value);
|
|
4805
4805
|
}
|
|
4806
4806
|
}
|
|
4807
|
-
}, resolveVariants = function(key,
|
|
4807
|
+
}, resolveVariants = function(key, value, 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], value, 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 value != "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 "${value}"`);
|
|
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(value, 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, value, 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 value) {
|
|
4846
|
+
var subKey = conf.shorthands[_key] || _key, val = value[_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, value, conf) {
|
|
4911
4911
|
if (variant) {
|
|
4912
4912
|
if (typeof variant == "function") return variant;
|
|
4913
|
-
var exact = variant[
|
|
4913
|
+
var exact = variant[value];
|
|
4914
4914
|
if (exact) return exact;
|
|
4915
|
-
if (
|
|
4915
|
+
if (value != 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 && value 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(value)) return fontSizeVariant;
|
|
4933
4933
|
}
|
|
4934
|
-
return variant[`:${typeof
|
|
4934
|
+
return variant[`:${typeof value}`] || 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, value, 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 value;
|
|
4943
|
+
var { theme, conf = (0, import_config.getConfig)(), context, fontFamily, staticConfig } = styleState, themeValue = theme ? theme[value] || theme[value.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][value];
|
|
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 value;
|
|
4950
4950
|
valOrVar = themeValue, hasSet = !0;
|
|
4951
4951
|
} else {
|
|
4952
|
-
if (
|
|
4952
|
+
if (value in conf.specificTokens) hasSet = !0, valOrVar = conf.specificTokens[value];
|
|
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[value]) === null || _fontsParsed_value === void 0 ? void 0 : _fontsParsed_value.family) || value, lastFontFamilyToken = value, 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_[value]) || value, 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][value];
|
|
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[value];
|
|
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], value = transform[type];
|
|
5104
|
+
return type === "matrix" || type === "matrix3d" ? `${type}(${value.join(",")})` : `${type}(${(0, import_normalizeValueWithProperty.normalizeValueWithProperty)(value, type)})`;
|
|
5105
5105
|
}
|
|
5106
5106
|
).join(" ");
|
|
5107
5107
|
}
|
|
@@ -5448,7 +5448,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5448
5448
|
if (!styleState.style.$$css) {
|
|
5449
5449
|
var atomic, _iteratorNormalCompletion, _didIteratorError, _iteratorError;
|
|
5450
5450
|
try {
|
|
5451
|
-
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, value, identifier, isAnimatedAndAnimateOnly, nonAnimatedAnimateOnly;
|
|
5452
5452
|
} catch (err) {
|
|
5453
5453
|
} finally {
|
|
5454
5454
|
}
|
|
@@ -5610,14 +5610,14 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5610
5610
|
delete viewProps[key], viewProps[key] = next;
|
|
5611
5611
|
} else viewProps[key] = val;
|
|
5612
5612
|
}
|
|
5613
|
-
function mergeMediaByImportance(styleState, mediaKey, key,
|
|
5613
|
+
function mergeMediaByImportance(styleState, mediaKey, key, value, isSizeMedia, importanceBump, debugProp) {
|
|
5614
5614
|
var usedKeys = styleState.usedKeys, importance = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKey, key, styleState, isSizeMedia);
|
|
5615
5615
|
if (importanceBump && (importance = (importance || 0) + importanceBump), importance === null) return !1;
|
|
5616
5616
|
if (key in import_pseudoDescriptors.pseudoDescriptors) {
|
|
5617
5617
|
var descriptor = import_pseudoDescriptors.pseudoDescriptors[key], descriptorKey = descriptor.stateKey || descriptor.name, isDisabled = styleState.componentState[descriptorKey] === !1;
|
|
5618
5618
|
if (isDisabled) return !1;
|
|
5619
|
-
for (var subKey in
|
|
5620
|
-
} else mergeStyle(styleState, key,
|
|
5619
|
+
for (var subKey in value) mergeStyle(styleState, subKey, value[subKey], importance);
|
|
5620
|
+
} else mergeStyle(styleState, key, value, importance);
|
|
5621
5621
|
return !0;
|
|
5622
5622
|
}
|
|
5623
5623
|
function normalizeStyle(style) {
|
|
@@ -6227,14 +6227,14 @@ var require_getThemeProxied_native = __commonJS({
|
|
|
6227
6227
|
curKeys && (curKeys.current || (curKeys.current = /* @__PURE__ */ new Set()), curKeys.current.add(key));
|
|
6228
6228
|
}
|
|
6229
6229
|
var proxied1 = Object.fromEntries(Object.entries(_state.theme).flatMap(function(param) {
|
|
6230
|
-
var [key,
|
|
6231
|
-
...
|
|
6230
|
+
var [key, value] = param, proxied2 = {
|
|
6231
|
+
...value,
|
|
6232
6232
|
get val() {
|
|
6233
|
-
return globalThis.tamaguiAvoidTracking || track(key),
|
|
6233
|
+
return globalThis.tamaguiAvoidTracking || track(key), value.val;
|
|
6234
6234
|
},
|
|
6235
6235
|
get(platform) {
|
|
6236
6236
|
if (curState) {
|
|
6237
|
-
var outVal = (0, import_createVariable.getVariable)(
|
|
6237
|
+
var outVal = (0, import_createVariable.getVariable)(value), { name, scheme, inverses } = curState, shouldOptimize = scheme && platform !== "web" && import_constants.isIos && !curProps.deopt && (0, import_config.getSetting)("fastSchemeChange") && inverses === 0 && (0, import_doesRootSchemeMatchSystem.doesRootSchemeMatchSystem)();
|
|
6238
6238
|
if (shouldOptimize) {
|
|
6239
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)({
|
|
6240
6240
|
scheme,
|
|
@@ -6784,11 +6784,11 @@ var require_index_native7 = __commonJS({
|
|
|
6784
6784
|
};
|
|
6785
6785
|
function useDidFinishSSR() {
|
|
6786
6786
|
var clientOnly = React3.useContext(import_ClientOnly.ClientOnlyContext);
|
|
6787
|
-
return
|
|
6787
|
+
return !0;
|
|
6788
6788
|
}
|
|
6789
|
-
function useClientValue(
|
|
6789
|
+
function useClientValue(value) {
|
|
6790
6790
|
var done = useDidFinishSSR();
|
|
6791
|
-
return done ? typeof
|
|
6791
|
+
return done ? typeof value == "function" ? value() : value : void 0;
|
|
6792
6792
|
}
|
|
6793
6793
|
}
|
|
6794
6794
|
});
|
|
@@ -8257,10 +8257,10 @@ var require_createFont_native = __commonJS({
|
|
|
8257
8257
|
...sectionKeys
|
|
8258
8258
|
])
|
|
8259
8259
|
].map(function(key) {
|
|
8260
|
-
var _section_key, _ref,
|
|
8261
|
-
return fillValue =
|
|
8260
|
+
var _section_key, _ref, value = (_ref = (_section_key = section[key]) !== null && _section_key !== void 0 ? _section_key : defaultValue) !== null && _ref !== void 0 ? _ref : fillValue;
|
|
8261
|
+
return fillValue = value, defaultValue = value, [
|
|
8262
8262
|
key,
|
|
8263
|
-
|
|
8263
|
+
value
|
|
8264
8264
|
];
|
|
8265
8265
|
}));
|
|
8266
8266
|
}, createFont = function(font) {
|
|
@@ -8476,7 +8476,7 @@ var require_createTamagui_native = __commonJS({
|
|
|
8476
8476
|
var sep;
|
|
8477
8477
|
if (fontDeclarations) for (var key22 in fontDeclarations) var name1, declarations1, language1, fontSelector, langSelector, selectors, specificRuleSet;
|
|
8478
8478
|
}
|
|
8479
|
-
var themesIn = configIn.themes, dedupedThemes = foundThemes ?? getThemesDeduped(themesIn), themes = (0, import_proxyThemeToParents.proxyThemesToParents)(dedupedThemes);
|
|
8479
|
+
var themesIn = configIn.themes, dedupedThemes = foundThemes ?? getThemesDeduped(themesIn, tokens.color), themes = (0, import_proxyThemeToParents.proxyThemesToParents)(dedupedThemes);
|
|
8480
8480
|
return {
|
|
8481
8481
|
themes,
|
|
8482
8482
|
cssRuleSets,
|
|
@@ -8578,7 +8578,7 @@ var require_createTamagui_native = __commonJS({
|
|
|
8578
8578
|
var _process_env_DEBUG;
|
|
8579
8579
|
return config;
|
|
8580
8580
|
}
|
|
8581
|
-
function getThemesDeduped(themes) {
|
|
8581
|
+
function getThemesDeduped(themes, colorTokens) {
|
|
8582
8582
|
var dedupedThemes = [], existing = /* @__PURE__ */ new Map();
|
|
8583
8583
|
for (var themeName in themes) {
|
|
8584
8584
|
var darkOrLightSpecificPrefix = themeName.startsWith("dark") ? "dark" : themeName.startsWith("light") ? "light" : "", rawTheme = themes[themeName], key = darkOrLightSpecificPrefix + JSON.stringify(rawTheme);
|
|
@@ -8590,6 +8590,7 @@ var require_createTamagui_native = __commonJS({
|
|
|
8590
8590
|
var theme = {
|
|
8591
8591
|
...rawTheme
|
|
8592
8592
|
};
|
|
8593
|
+
colorTokens && Object.assign(theme, colorTokens);
|
|
8593
8594
|
for (var key1 in theme) (0, import_themes.ensureThemeVariable)(theme, key1);
|
|
8594
8595
|
var deduped = {
|
|
8595
8596
|
names: [
|
|
@@ -9828,12 +9829,13 @@ var require_FontLanguage_native = __commonJS({
|
|
|
9828
9829
|
});
|
|
9829
9830
|
module2.exports = __toCommonJS2(FontLanguage_native_exports);
|
|
9830
9831
|
var import_jsx_runtime2 = require("react/jsx-runtime"), import_react3 = __toESM2(require("react")), import_ComponentContext = require_ComponentContext_native(), FontLanguage = function(param) {
|
|
9831
|
-
var { children, ...props } = param, language = import_react3.default.useMemo(function() {
|
|
9832
|
+
var { children, ...props } = param, parentProps = import_react3.default.useContext(import_ComponentContext.ComponentContext), language = import_react3.default.useMemo(function() {
|
|
9832
9833
|
return props;
|
|
9833
9834
|
}, [
|
|
9834
9835
|
JSON.stringify(props)
|
|
9835
9836
|
]);
|
|
9836
9837
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ComponentContext.ComponentContext.Provider, {
|
|
9838
|
+
...parentProps,
|
|
9837
9839
|
language,
|
|
9838
9840
|
children
|
|
9839
9841
|
});
|
|
@@ -10410,41 +10412,41 @@ var require_matchQuery_native = __commonJS({
|
|
|
10410
10412
|
var inverse = query.inverse, typeMatch = query.type === "all" || values.type === query.type;
|
|
10411
10413
|
if (typeMatch && inverse || !(typeMatch || inverse)) return !1;
|
|
10412
10414
|
var expressionsMatch = query.expressions.every(function(expression) {
|
|
10413
|
-
var feature = expression.feature, modifier = expression.modifier, expValue = expression.value,
|
|
10414
|
-
if (!
|
|
10415
|
+
var feature = expression.feature, modifier = expression.modifier, expValue = expression.value, value = values[feature];
|
|
10416
|
+
if (!value) return !1;
|
|
10415
10417
|
switch (feature) {
|
|
10416
10418
|
case "orientation":
|
|
10417
10419
|
case "scan":
|
|
10418
|
-
return
|
|
10420
|
+
return value.toLowerCase() === expValue.toLowerCase();
|
|
10419
10421
|
case "width":
|
|
10420
10422
|
case "height":
|
|
10421
10423
|
case "device-width":
|
|
10422
10424
|
case "device-height":
|
|
10423
|
-
expValue = toPx(expValue),
|
|
10425
|
+
expValue = toPx(expValue), value = toPx(value);
|
|
10424
10426
|
break;
|
|
10425
10427
|
case "resolution":
|
|
10426
|
-
expValue = toDpi(expValue),
|
|
10428
|
+
expValue = toDpi(expValue), value = toDpi(value);
|
|
10427
10429
|
break;
|
|
10428
10430
|
case "aspect-ratio":
|
|
10429
10431
|
case "device-aspect-ratio":
|
|
10430
10432
|
case /* Deprecated */
|
|
10431
10433
|
"device-pixel-ratio":
|
|
10432
|
-
expValue = toDecimal(expValue),
|
|
10434
|
+
expValue = toDecimal(expValue), value = toDecimal(value);
|
|
10433
10435
|
break;
|
|
10434
10436
|
case "grid":
|
|
10435
10437
|
case "color":
|
|
10436
10438
|
case "color-index":
|
|
10437
10439
|
case "monochrome":
|
|
10438
|
-
expValue = Number.parseInt(expValue, 10) || 1,
|
|
10440
|
+
expValue = Number.parseInt(expValue, 10) || 1, value = Number.parseInt(value, 10) || 0;
|
|
10439
10441
|
break;
|
|
10440
10442
|
}
|
|
10441
10443
|
switch (modifier) {
|
|
10442
10444
|
case "min":
|
|
10443
|
-
return
|
|
10445
|
+
return value >= expValue;
|
|
10444
10446
|
case "max":
|
|
10445
|
-
return
|
|
10447
|
+
return value <= expValue;
|
|
10446
10448
|
default:
|
|
10447
|
-
return
|
|
10449
|
+
return value === expValue;
|
|
10448
10450
|
}
|
|
10449
10451
|
});
|
|
10450
10452
|
return expressionsMatch && !inverse || !expressionsMatch && inverse;
|
|
@@ -10476,35 +10478,35 @@ var require_matchQuery_native = __commonJS({
|
|
|
10476
10478
|
return decimal || (numbers = ratio.match(/^(\d+)\s*\/\s*(\d+)$/), decimal = numbers[1] / numbers[2]), decimal;
|
|
10477
10479
|
}
|
|
10478
10480
|
function toDpi(resolution) {
|
|
10479
|
-
var _String_match,
|
|
10481
|
+
var _String_match, value = Number.parseFloat(resolution), units = (_String_match = String(resolution).match(RE_RESOLUTION_UNIT)) === null || _String_match === void 0 ? void 0 : _String_match[1];
|
|
10480
10482
|
switch (units) {
|
|
10481
10483
|
case "dpcm":
|
|
10482
|
-
return
|
|
10484
|
+
return value / 2.54;
|
|
10483
10485
|
case "dppx":
|
|
10484
|
-
return
|
|
10486
|
+
return value * 96;
|
|
10485
10487
|
default:
|
|
10486
|
-
return
|
|
10488
|
+
return value;
|
|
10487
10489
|
}
|
|
10488
10490
|
}
|
|
10489
10491
|
function toPx(length) {
|
|
10490
|
-
var _String_match,
|
|
10492
|
+
var _String_match, value = Number.parseFloat(length), units = (_String_match = String(length).match(RE_LENGTH_UNIT)) === null || _String_match === void 0 ? void 0 : _String_match[1];
|
|
10491
10493
|
switch (units) {
|
|
10492
10494
|
case "em":
|
|
10493
|
-
return
|
|
10495
|
+
return value * 16;
|
|
10494
10496
|
case "rem":
|
|
10495
|
-
return
|
|
10497
|
+
return value * 16;
|
|
10496
10498
|
case "cm":
|
|
10497
|
-
return
|
|
10499
|
+
return value * 96 / 2.54;
|
|
10498
10500
|
case "mm":
|
|
10499
|
-
return
|
|
10501
|
+
return value * 96 / 2.54 / 10;
|
|
10500
10502
|
case "in":
|
|
10501
|
-
return
|
|
10503
|
+
return value * 96;
|
|
10502
10504
|
case "pt":
|
|
10503
|
-
return
|
|
10505
|
+
return value * 72;
|
|
10504
10506
|
case "pc":
|
|
10505
|
-
return
|
|
10507
|
+
return value * 72 / 12;
|
|
10506
10508
|
default:
|
|
10507
|
-
return
|
|
10509
|
+
return value;
|
|
10508
10510
|
}
|
|
10509
10511
|
}
|
|
10510
10512
|
}
|
|
@@ -10566,13 +10568,13 @@ var require_mediaQueryList_native = __commonJS({
|
|
|
10566
10568
|
function _create_class(Constructor, protoProps, staticProps) {
|
|
10567
10569
|
return protoProps && _defineProperties(Constructor.prototype, protoProps), staticProps && _defineProperties(Constructor, staticProps), Constructor;
|
|
10568
10570
|
}
|
|
10569
|
-
function _define_property(obj, key,
|
|
10571
|
+
function _define_property(obj, key, value) {
|
|
10570
10572
|
return key in obj ? Object.defineProperty(obj, key, {
|
|
10571
|
-
value
|
|
10573
|
+
value,
|
|
10572
10574
|
enumerable: !0,
|
|
10573
10575
|
configurable: !0,
|
|
10574
10576
|
writable: !0
|
|
10575
|
-
}) : obj[key] =
|
|
10577
|
+
}) : obj[key] = value, obj;
|
|
10576
10578
|
}
|
|
10577
10579
|
var NativeMediaQueryList = /* @__PURE__ */ function() {
|
|
10578
10580
|
"use strict";
|
|
@@ -11242,13 +11244,13 @@ var require_ResponderTouchHistoryStore_native = __commonJS({
|
|
|
11242
11244
|
function _create_class(Constructor, protoProps, staticProps) {
|
|
11243
11245
|
return protoProps && _defineProperties(Constructor.prototype, protoProps), staticProps && _defineProperties(Constructor, staticProps), Constructor;
|
|
11244
11246
|
}
|
|
11245
|
-
function _define_property(obj, key,
|
|
11247
|
+
function _define_property(obj, key, value) {
|
|
11246
11248
|
return key in obj ? Object.defineProperty(obj, key, {
|
|
11247
|
-
value
|
|
11249
|
+
value,
|
|
11248
11250
|
enumerable: !0,
|
|
11249
11251
|
configurable: !0,
|
|
11250
11252
|
writable: !0
|
|
11251
|
-
}) : obj[key] =
|
|
11253
|
+
}) : obj[key] = value, obj;
|
|
11252
11254
|
}
|
|
11253
11255
|
var ResponderTouchHistoryStore = /* @__PURE__ */ function() {
|
|
11254
11256
|
"use strict";
|