@tamagui/core 1.125.35 → 1.126.1
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/cjs/addNativeValidStyles.native.js.map +1 -1
- package/dist/cjs/createOptimizedView.native.js.map +1 -1
- package/dist/cjs/getBaseViews.native.js.map +1 -1
- package/dist/cjs/helpers/getBoundingClientRect.native.js.map +1 -1
- package/dist/cjs/helpers/getRect.native.js.map +1 -1
- package/dist/cjs/hooks/useElementLayout.native.js.map +1 -1
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/inject-styles.native.js.map +1 -1
- package/dist/cjs/reactNativeTypes.native.js.map +1 -1
- package/dist/cjs/vendor/Pressability.native.js.map +1 -1
- package/dist/esm/addNativeValidStyles.native.js.map +1 -1
- package/dist/esm/createOptimizedView.native.js.map +1 -1
- package/dist/esm/getBaseViews.native.js.map +1 -1
- package/dist/esm/vendor/Pressability.native.js.map +1 -1
- package/dist/native.js +105 -18
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +105 -18
- package/dist/test.native.js.map +3 -3
- package/package.json +7 -7
package/dist/test.native.js
CHANGED
|
@@ -2553,6 +2553,73 @@ var require_getShorthandValue_native = __commonJS({
|
|
|
2553
2553
|
}
|
|
2554
2554
|
});
|
|
2555
2555
|
|
|
2556
|
+
// ../web/dist/cjs/helpers/getDynamicVal.native.js
|
|
2557
|
+
var require_getDynamicVal_native = __commonJS({
|
|
2558
|
+
"../web/dist/cjs/helpers/getDynamicVal.native.js"(exports2, module2) {
|
|
2559
|
+
"use strict";
|
|
2560
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
2561
|
+
for (var name in all) __defProp2(target, name, {
|
|
2562
|
+
get: all[name],
|
|
2563
|
+
enumerable: !0
|
|
2564
|
+
});
|
|
2565
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
2566
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
2567
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
2568
|
+
for (var _loop = function() {
|
|
2569
|
+
var key = _step.value;
|
|
2570
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
2571
|
+
get: function() {
|
|
2572
|
+
return from[key];
|
|
2573
|
+
},
|
|
2574
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
2575
|
+
});
|
|
2576
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
2577
|
+
} catch (err) {
|
|
2578
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
2579
|
+
} finally {
|
|
2580
|
+
try {
|
|
2581
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
2582
|
+
} finally {
|
|
2583
|
+
if (_didIteratorError)
|
|
2584
|
+
throw _iteratorError;
|
|
2585
|
+
}
|
|
2586
|
+
}
|
|
2587
|
+
return to;
|
|
2588
|
+
}, __toCommonJS2 = function(mod) {
|
|
2589
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
2590
|
+
value: !0
|
|
2591
|
+
}), mod);
|
|
2592
|
+
}, getDynamicVal_exports = {};
|
|
2593
|
+
__export2(getDynamicVal_exports, {
|
|
2594
|
+
extractValueFromDynamic: function() {
|
|
2595
|
+
return extractValueFromDynamic;
|
|
2596
|
+
},
|
|
2597
|
+
getDynamicVal: function() {
|
|
2598
|
+
return getDynamicVal;
|
|
2599
|
+
},
|
|
2600
|
+
getOppositeScheme: function() {
|
|
2601
|
+
return getOppositeScheme;
|
|
2602
|
+
}
|
|
2603
|
+
});
|
|
2604
|
+
module2.exports = __toCommonJS2(getDynamicVal_exports);
|
|
2605
|
+
function getOppositeScheme(scheme) {
|
|
2606
|
+
return scheme === "dark" ? "light" : "dark";
|
|
2607
|
+
}
|
|
2608
|
+
function getDynamicVal(param) {
|
|
2609
|
+
var { scheme, val, oppositeVal } = param, oppositeScheme = getOppositeScheme(scheme);
|
|
2610
|
+
return {
|
|
2611
|
+
dynamic: {
|
|
2612
|
+
[scheme]: val,
|
|
2613
|
+
[oppositeScheme]: oppositeVal
|
|
2614
|
+
}
|
|
2615
|
+
};
|
|
2616
|
+
}
|
|
2617
|
+
function extractValueFromDynamic(val, scheme) {
|
|
2618
|
+
return val != null && val.dynamic ? val.dynamic[scheme] : val;
|
|
2619
|
+
}
|
|
2620
|
+
}
|
|
2621
|
+
});
|
|
2622
|
+
|
|
2556
2623
|
// ../web/dist/cjs/constants/accessibilityDirectMap.native.js
|
|
2557
2624
|
var require_accessibilityDirectMap_native = __commonJS({
|
|
2558
2625
|
"../web/dist/cjs/constants/accessibilityDirectMap.native.js"(exports2, module2) {
|
|
@@ -4952,7 +5019,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
4952
5019
|
}
|
|
4953
5020
|
});
|
|
4954
5021
|
module2.exports = __toCommonJS2(getSplitStyles_exports);
|
|
4955
|
-
var import_constants2 = require_index_native2(), import_helpers2 = require_index_native3(), 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 = "-";
|
|
5022
|
+
var import_constants2 = require_index_native2(), import_helpers2 = require_index_native3(), 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 = "-";
|
|
4956
5023
|
function isValidStyleKey(key, validStyles2, accept) {
|
|
4957
5024
|
return key in validStyles2 ? !0 : accept && key in accept;
|
|
4958
5025
|
}
|
|
@@ -5110,8 +5177,8 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5110
5177
|
}
|
|
5111
5178
|
} else {
|
|
5112
5179
|
var mergeMediaStyle2 = function(key5, val3) {
|
|
5113
|
-
var
|
|
5114
|
-
(
|
|
5180
|
+
var _styleState4;
|
|
5181
|
+
(_styleState4 = styleState).style || (_styleState4.style = {});
|
|
5115
5182
|
var didMerge = mergeMediaByImportance(styleState, mediaKeyShort, key5, val3, usedKeys, mediaState2[mediaKeyShort], importanceBump, debug);
|
|
5116
5183
|
didMerge && key5 === "fontFamily" && (styleState.fontFamily = mediaStyle1.fontFamily);
|
|
5117
5184
|
}, mergeMediaStyle = mergeMediaStyle2, isThemeMedia = isMedia === "theme", isGroupMedia = isMedia === "group", isPlatformMedia = isMedia === "platform";
|
|
@@ -5119,7 +5186,19 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5119
5186
|
return;
|
|
5120
5187
|
var mediaStyle1 = getSubStyle(styleState, key4, val2, !0), importanceBump = 0;
|
|
5121
5188
|
if (isThemeMedia) {
|
|
5122
|
-
if (dynamicThemeAccess = !0,
|
|
5189
|
+
if (dynamicThemeAccess = !0, import_constants2.isIos && (0, import_config.getSetting)("fastSchemeChange")) {
|
|
5190
|
+
var _styleState3;
|
|
5191
|
+
(_styleState3 = styleState).style || (_styleState3.style = {});
|
|
5192
|
+
var scheme = mediaKeyShort, oppositeScheme = (0, import_getDynamicVal.getOppositeScheme)(mediaKeyShort);
|
|
5193
|
+
for (var subKey1 in mediaStyle1) {
|
|
5194
|
+
var _$val1 = (0, import_getDynamicVal.extractValueFromDynamic)(mediaStyle1[subKey1], scheme), oppositeVal = (0, import_getDynamicVal.extractValueFromDynamic)(styleState.style[subKey1], oppositeScheme);
|
|
5195
|
+
mediaStyle1[subKey1] = (0, import_getDynamicVal.getDynamicVal)({
|
|
5196
|
+
scheme,
|
|
5197
|
+
val: _$val1,
|
|
5198
|
+
oppositeVal
|
|
5199
|
+
}), mergeStyle(styleState, subKey1, mediaStyle1[subKey1]);
|
|
5200
|
+
}
|
|
5201
|
+
} else if (!(themeName === mediaKeyShort || themeName.startsWith(mediaKeyShort))) return;
|
|
5123
5202
|
} else if (isGroupMedia) {
|
|
5124
5203
|
var _componentState_group, groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name, groupContext = context == null ? void 0 : context.groups.state[groupName];
|
|
5125
5204
|
if (!groupContext)
|
|
@@ -5145,15 +5224,15 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5145
5224
|
importanceBump = priority1;
|
|
5146
5225
|
}
|
|
5147
5226
|
}
|
|
5148
|
-
for (var
|
|
5149
|
-
if (
|
|
5227
|
+
for (var subKey2 in mediaStyle1) {
|
|
5228
|
+
if (subKey2 === "space") {
|
|
5150
5229
|
space = valInit.space;
|
|
5151
5230
|
continue;
|
|
5152
5231
|
}
|
|
5153
|
-
if (
|
|
5154
|
-
if (!(0, import_isActivePlatform.isActivePlatform)(
|
|
5155
|
-
for (var subSubKey in mediaStyle1[
|
|
5156
|
-
} else mergeMediaStyle2(
|
|
5232
|
+
if (subKey2[0] === "$") {
|
|
5233
|
+
if (!(0, import_isActivePlatform.isActivePlatform)(subKey2) || !(0, import_isActiveTheme.isActiveTheme)(subKey2, themeName)) continue;
|
|
5234
|
+
for (var subSubKey in mediaStyle1[subKey2]) mergeMediaStyle2(subSubKey, mediaStyle1[subKey2][subSubKey]);
|
|
5235
|
+
} else mergeMediaStyle2(subKey2, mediaStyle1[subKey2]);
|
|
5157
5236
|
}
|
|
5158
5237
|
}
|
|
5159
5238
|
return;
|
|
@@ -6013,7 +6092,7 @@ var require_getThemeProxied_native = __commonJS({
|
|
|
6013
6092
|
}
|
|
6014
6093
|
});
|
|
6015
6094
|
module2.exports = __toCommonJS2(getThemeProxied_exports);
|
|
6016
|
-
var import_constants2 = require_index_native2(), import_config = require_config_native(), import_createVariable = require_createVariable_native(), import_doesRootSchemeMatchSystem = require_doesRootSchemeMatchSystem_native(), cache2 = /* @__PURE__ */ new Map(), curKeys, curProps, curState, emptyObject = {};
|
|
6095
|
+
var import_constants2 = require_index_native2(), import_config = require_config_native(), import_createVariable = require_createVariable_native(), import_doesRootSchemeMatchSystem = require_doesRootSchemeMatchSystem_native(), import_getDynamicVal = require_getDynamicVal_native(), cache2 = /* @__PURE__ */ new Map(), curKeys, curProps, curState, emptyObject = {};
|
|
6017
6096
|
function getThemeProxied(_props, _state, _keys) {
|
|
6018
6097
|
if (!(_state != null && _state.theme)) return emptyObject;
|
|
6019
6098
|
if (curKeys = _keys, curProps = _props, curState = _state, cache2.has(curState.theme)) {
|
|
@@ -6034,12 +6113,11 @@ var require_getThemeProxied_native = __commonJS({
|
|
|
6034
6113
|
if (curState) {
|
|
6035
6114
|
var outVal = (0, import_createVariable.getVariable)(value), { name, scheme, inverses } = curState, shouldOptimize = scheme && platform !== "web" && import_constants2.isIos && !curProps.deopt && (0, import_config.getSetting)("fastSchemeChange") && inverses === 0 && (0, import_doesRootSchemeMatchSystem.doesRootSchemeMatchSystem)();
|
|
6036
6115
|
if (shouldOptimize) {
|
|
6037
|
-
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 = {
|
|
6038
|
-
|
|
6039
|
-
|
|
6040
|
-
|
|
6041
|
-
|
|
6042
|
-
};
|
|
6116
|
+
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)({
|
|
6117
|
+
scheme,
|
|
6118
|
+
val: color,
|
|
6119
|
+
oppositeVal: oppositeColor
|
|
6120
|
+
});
|
|
6043
6121
|
return dynamicVal;
|
|
6044
6122
|
}
|
|
6045
6123
|
return track(key), outVal;
|
|
@@ -6582,7 +6660,7 @@ var require_useComponentState_native = __commonJS({
|
|
|
6582
6660
|
...states[0],
|
|
6583
6661
|
[props.forceStyle]: !0
|
|
6584
6662
|
} : states[0], setState = states[1], isAnimated = willBeAnimated;
|
|
6585
|
-
import_constants2.isWeb && hasAnimationThatNeedsHydrate && !staticConfig.isHOC && !isHydrated && (isAnimated = !1, curStateRef.willHydrate = !0), disabled !== state.disabled && (
|
|
6663
|
+
import_constants2.isWeb && hasAnimationThatNeedsHydrate && !staticConfig.isHOC && !isHydrated && (isAnimated = !1, curStateRef.willHydrate = !0), disabled !== state.disabled && (disabled && Object.assign(state, import_defaultComponentState.defaultComponentStateMounted), state.disabled = disabled, setState({
|
|
6586
6664
|
...state
|
|
6587
6665
|
}));
|
|
6588
6666
|
var groupName = props.group, setStateShallow = (0, import_createShallowSetState.createShallowSetState)(setState, disabled ? [
|
|
@@ -7037,7 +7115,16 @@ var require_createComponent_native = __commonJS({
|
|
|
7037
7115
|
});
|
|
7038
7116
|
return;
|
|
7039
7117
|
}
|
|
7118
|
+
var tm;
|
|
7040
7119
|
if (state.unmounted) {
|
|
7120
|
+
var _config_animations2, _animationDriver_supportsCSSVars;
|
|
7121
|
+
if ((_animationDriver_supportsCSSVars = animationDriver == null ? void 0 : animationDriver.supportsCSSVars) !== null && _animationDriver_supportsCSSVars !== void 0 ? _animationDriver_supportsCSSVars : !(config == null || (_config_animations2 = config.animations) === null || _config_animations2 === void 0) && _config_animations2.supportsCSSVars) return tm = setTimeout(function() {
|
|
7122
|
+
setStateShallow({
|
|
7123
|
+
unmounted: !1
|
|
7124
|
+
});
|
|
7125
|
+
}), function() {
|
|
7126
|
+
return clearTimeout(tm);
|
|
7127
|
+
};
|
|
7041
7128
|
setStateShallow({
|
|
7042
7129
|
unmounted: !1
|
|
7043
7130
|
});
|