tamagui 1.126.0 → 1.126.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/native.js +96 -18
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +96 -18
- package/dist/test.native.js.map +3 -3
- package/package.json +55 -55
package/dist/test.native.js
CHANGED
|
@@ -3652,6 +3652,73 @@ var require_getShorthandValue_native = __commonJS({
|
|
|
3652
3652
|
}
|
|
3653
3653
|
});
|
|
3654
3654
|
|
|
3655
|
+
// ../../core/web/dist/cjs/helpers/getDynamicVal.native.js
|
|
3656
|
+
var require_getDynamicVal_native = __commonJS({
|
|
3657
|
+
"../../core/web/dist/cjs/helpers/getDynamicVal.native.js"(exports2, module2) {
|
|
3658
|
+
"use strict";
|
|
3659
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
3660
|
+
for (var name in all) __defProp2(target, name, {
|
|
3661
|
+
get: all[name],
|
|
3662
|
+
enumerable: !0
|
|
3663
|
+
});
|
|
3664
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
3665
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
3666
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
3667
|
+
for (var _loop = function() {
|
|
3668
|
+
var key = _step.value;
|
|
3669
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
3670
|
+
get: function() {
|
|
3671
|
+
return from[key];
|
|
3672
|
+
},
|
|
3673
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
3674
|
+
});
|
|
3675
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
3676
|
+
} catch (err) {
|
|
3677
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
3678
|
+
} finally {
|
|
3679
|
+
try {
|
|
3680
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
3681
|
+
} finally {
|
|
3682
|
+
if (_didIteratorError)
|
|
3683
|
+
throw _iteratorError;
|
|
3684
|
+
}
|
|
3685
|
+
}
|
|
3686
|
+
return to;
|
|
3687
|
+
}, __toCommonJS2 = function(mod) {
|
|
3688
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
3689
|
+
value: !0
|
|
3690
|
+
}), mod);
|
|
3691
|
+
}, getDynamicVal_exports = {};
|
|
3692
|
+
__export2(getDynamicVal_exports, {
|
|
3693
|
+
extractValueFromDynamic: function() {
|
|
3694
|
+
return extractValueFromDynamic;
|
|
3695
|
+
},
|
|
3696
|
+
getDynamicVal: function() {
|
|
3697
|
+
return getDynamicVal;
|
|
3698
|
+
},
|
|
3699
|
+
getOppositeScheme: function() {
|
|
3700
|
+
return getOppositeScheme;
|
|
3701
|
+
}
|
|
3702
|
+
});
|
|
3703
|
+
module2.exports = __toCommonJS2(getDynamicVal_exports);
|
|
3704
|
+
function getOppositeScheme(scheme) {
|
|
3705
|
+
return scheme === "dark" ? "light" : "dark";
|
|
3706
|
+
}
|
|
3707
|
+
function getDynamicVal(param) {
|
|
3708
|
+
var { scheme, val, oppositeVal } = param, oppositeScheme = getOppositeScheme(scheme);
|
|
3709
|
+
return {
|
|
3710
|
+
dynamic: {
|
|
3711
|
+
[scheme]: val,
|
|
3712
|
+
[oppositeScheme]: oppositeVal
|
|
3713
|
+
}
|
|
3714
|
+
};
|
|
3715
|
+
}
|
|
3716
|
+
function extractValueFromDynamic(val, scheme) {
|
|
3717
|
+
return val != null && val.dynamic ? val.dynamic[scheme] : val;
|
|
3718
|
+
}
|
|
3719
|
+
}
|
|
3720
|
+
});
|
|
3721
|
+
|
|
3655
3722
|
// ../../core/web/dist/cjs/constants/accessibilityDirectMap.native.js
|
|
3656
3723
|
var require_accessibilityDirectMap_native = __commonJS({
|
|
3657
3724
|
"../../core/web/dist/cjs/constants/accessibilityDirectMap.native.js"(exports2, module2) {
|
|
@@ -6051,7 +6118,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6051
6118
|
}
|
|
6052
6119
|
});
|
|
6053
6120
|
module2.exports = __toCommonJS2(getSplitStyles_exports);
|
|
6054
|
-
var import_constants4 = require_index_native6(), import_helpers = require_index_native7(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_accessibilityDirectMap = require_accessibilityDirectMap_native(), import_constants22 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_useMedia = require_useMedia_native(), import_consoleLog = require_consoleLog_native(), import_createMediaStyle = require_createMediaStyle_native(), import_expandStyles = require_expandStyles_native(), import_getCSSStylesAtomic = require_getCSSStylesAtomic_native(), import_getGroupPropParts = require_getGroupPropParts_native(), import_insertStyleRule = require_insertStyleRule_native(), import_isActivePlatform = require_isActivePlatform_native(), import_isActiveTheme = require_isActiveTheme_native(), import_log = require_log_native(), import_normalizeValueWithProperty = require_normalizeValueWithProperty_native(), import_propMapper = require_propMapper_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_skipProps = require_skipProps_native(), import_sortString = require_sortString_native(), import_transformsToString = require_transformsToString_native(), conf, PROP_SPLIT = "-";
|
|
6121
|
+
var import_constants4 = require_index_native6(), import_helpers = require_index_native7(), import_react3 = __toESM2(require("react")), import_getDynamicVal = require_getDynamicVal_native(), import_config = require_config_native(), import_accessibilityDirectMap = require_accessibilityDirectMap_native(), import_constants22 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_useMedia = require_useMedia_native(), import_consoleLog = require_consoleLog_native(), import_createMediaStyle = require_createMediaStyle_native(), import_expandStyles = require_expandStyles_native(), import_getCSSStylesAtomic = require_getCSSStylesAtomic_native(), import_getGroupPropParts = require_getGroupPropParts_native(), import_insertStyleRule = require_insertStyleRule_native(), import_isActivePlatform = require_isActivePlatform_native(), import_isActiveTheme = require_isActiveTheme_native(), import_log = require_log_native(), import_normalizeValueWithProperty = require_normalizeValueWithProperty_native(), import_propMapper = require_propMapper_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_skipProps = require_skipProps_native(), import_sortString = require_sortString_native(), import_transformsToString = require_transformsToString_native(), conf, PROP_SPLIT = "-";
|
|
6055
6122
|
function isValidStyleKey(key, validStyles, accept) {
|
|
6056
6123
|
return key in validStyles ? !0 : accept && key in accept;
|
|
6057
6124
|
}
|
|
@@ -6209,8 +6276,8 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6209
6276
|
}
|
|
6210
6277
|
} else {
|
|
6211
6278
|
var mergeMediaStyle2 = function(key5, val3) {
|
|
6212
|
-
var
|
|
6213
|
-
(
|
|
6279
|
+
var _styleState4;
|
|
6280
|
+
(_styleState4 = styleState).style || (_styleState4.style = {});
|
|
6214
6281
|
var didMerge = mergeMediaByImportance(styleState, mediaKeyShort, key5, val3, usedKeys, mediaState3[mediaKeyShort], importanceBump, debug);
|
|
6215
6282
|
didMerge && key5 === "fontFamily" && (styleState.fontFamily = mediaStyle1.fontFamily);
|
|
6216
6283
|
}, mergeMediaStyle = mergeMediaStyle2, isThemeMedia = isMedia === "theme", isGroupMedia = isMedia === "group", isPlatformMedia = isMedia === "platform";
|
|
@@ -6218,7 +6285,19 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6218
6285
|
return;
|
|
6219
6286
|
var mediaStyle1 = getSubStyle(styleState, key4, val2, !0), importanceBump = 0;
|
|
6220
6287
|
if (isThemeMedia) {
|
|
6221
|
-
if (dynamicThemeAccess = !0,
|
|
6288
|
+
if (dynamicThemeAccess = !0, import_constants4.isIos && (0, import_config.getSetting)("fastSchemeChange")) {
|
|
6289
|
+
var _styleState3;
|
|
6290
|
+
(_styleState3 = styleState).style || (_styleState3.style = {});
|
|
6291
|
+
var scheme = mediaKeyShort, oppositeScheme = (0, import_getDynamicVal.getOppositeScheme)(mediaKeyShort);
|
|
6292
|
+
for (var subKey1 in mediaStyle1) {
|
|
6293
|
+
var _$val1 = (0, import_getDynamicVal.extractValueFromDynamic)(mediaStyle1[subKey1], scheme), oppositeVal = (0, import_getDynamicVal.extractValueFromDynamic)(styleState.style[subKey1], oppositeScheme);
|
|
6294
|
+
mediaStyle1[subKey1] = (0, import_getDynamicVal.getDynamicVal)({
|
|
6295
|
+
scheme,
|
|
6296
|
+
val: _$val1,
|
|
6297
|
+
oppositeVal
|
|
6298
|
+
}), mergeStyle(styleState, subKey1, mediaStyle1[subKey1]);
|
|
6299
|
+
}
|
|
6300
|
+
} else if (!(themeName === mediaKeyShort || themeName.startsWith(mediaKeyShort))) return;
|
|
6222
6301
|
} else if (isGroupMedia) {
|
|
6223
6302
|
var _componentState_group, groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name, groupContext = context == null ? void 0 : context.groups.state[groupName];
|
|
6224
6303
|
if (!groupContext)
|
|
@@ -6244,15 +6323,15 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6244
6323
|
importanceBump = priority1;
|
|
6245
6324
|
}
|
|
6246
6325
|
}
|
|
6247
|
-
for (var
|
|
6248
|
-
if (
|
|
6326
|
+
for (var subKey2 in mediaStyle1) {
|
|
6327
|
+
if (subKey2 === "space") {
|
|
6249
6328
|
space = valInit.space;
|
|
6250
6329
|
continue;
|
|
6251
6330
|
}
|
|
6252
|
-
if (
|
|
6253
|
-
if (!(0, import_isActivePlatform.isActivePlatform)(
|
|
6254
|
-
for (var subSubKey in mediaStyle1[
|
|
6255
|
-
} else mergeMediaStyle2(
|
|
6331
|
+
if (subKey2[0] === "$") {
|
|
6332
|
+
if (!(0, import_isActivePlatform.isActivePlatform)(subKey2) || !(0, import_isActiveTheme.isActiveTheme)(subKey2, themeName)) continue;
|
|
6333
|
+
for (var subSubKey in mediaStyle1[subKey2]) mergeMediaStyle2(subSubKey, mediaStyle1[subKey2][subSubKey]);
|
|
6334
|
+
} else mergeMediaStyle2(subKey2, mediaStyle1[subKey2]);
|
|
6256
6335
|
}
|
|
6257
6336
|
}
|
|
6258
6337
|
return;
|
|
@@ -7112,7 +7191,7 @@ var require_getThemeProxied_native = __commonJS({
|
|
|
7112
7191
|
}
|
|
7113
7192
|
});
|
|
7114
7193
|
module2.exports = __toCommonJS2(getThemeProxied_exports);
|
|
7115
|
-
var import_constants4 = require_index_native6(), import_config = require_config_native(), import_createVariable = require_createVariable_native(), import_doesRootSchemeMatchSystem = require_doesRootSchemeMatchSystem_native(), cache = /* @__PURE__ */ new Map(), curKeys, curProps, curState, emptyObject = {};
|
|
7194
|
+
var import_constants4 = require_index_native6(), import_config = require_config_native(), import_createVariable = require_createVariable_native(), import_doesRootSchemeMatchSystem = require_doesRootSchemeMatchSystem_native(), import_getDynamicVal = require_getDynamicVal_native(), cache = /* @__PURE__ */ new Map(), curKeys, curProps, curState, emptyObject = {};
|
|
7116
7195
|
function getThemeProxied(_props, _state, _keys) {
|
|
7117
7196
|
if (!(_state != null && _state.theme)) return emptyObject;
|
|
7118
7197
|
if (curKeys = _keys, curProps = _props, curState = _state, cache.has(curState.theme)) {
|
|
@@ -7133,12 +7212,11 @@ var require_getThemeProxied_native = __commonJS({
|
|
|
7133
7212
|
if (curState) {
|
|
7134
7213
|
var outVal = (0, import_createVariable.getVariable)(value), { name, scheme, inverses } = curState, shouldOptimize = scheme && platform2 !== "web" && import_constants4.isIos && !curProps.deopt && (0, import_config.getSetting)("fastSchemeChange") && inverses === 0 && (0, import_doesRootSchemeMatchSystem.doesRootSchemeMatchSystem)();
|
|
7135
7214
|
if (shouldOptimize) {
|
|
7136
|
-
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 = {
|
|
7137
|
-
|
|
7138
|
-
|
|
7139
|
-
|
|
7140
|
-
|
|
7141
|
-
};
|
|
7215
|
+
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)({
|
|
7216
|
+
scheme,
|
|
7217
|
+
val: color,
|
|
7218
|
+
oppositeVal: oppositeColor
|
|
7219
|
+
});
|
|
7142
7220
|
return dynamicVal;
|
|
7143
7221
|
}
|
|
7144
7222
|
return track(key), outVal;
|
|
@@ -7681,7 +7759,7 @@ var require_useComponentState_native = __commonJS({
|
|
|
7681
7759
|
...states[0],
|
|
7682
7760
|
[props.forceStyle]: !0
|
|
7683
7761
|
} : states[0], setState = states[1], isAnimated = willBeAnimated;
|
|
7684
|
-
import_constants4.isWeb && hasAnimationThatNeedsHydrate && !staticConfig.isHOC && !isHydrated && (isAnimated = !1, curStateRef.willHydrate = !0), disabled !== state.disabled && (
|
|
7762
|
+
import_constants4.isWeb && hasAnimationThatNeedsHydrate && !staticConfig.isHOC && !isHydrated && (isAnimated = !1, curStateRef.willHydrate = !0), disabled !== state.disabled && (disabled && Object.assign(state, import_defaultComponentState.defaultComponentStateMounted), state.disabled = disabled, setState({
|
|
7685
7763
|
...state
|
|
7686
7764
|
}));
|
|
7687
7765
|
var groupName = props.group, setStateShallow = (0, import_createShallowSetState.createShallowSetState)(setState, disabled ? [
|