@tamagui/core 1.120.1 → 1.121.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/native.js +75 -28
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +74 -26
- package/dist/test.native.js.map +3 -3
- package/package.json +9 -9
package/dist/native.js
CHANGED
|
@@ -1797,6 +1797,7 @@ var require_validStyleProps_native = __commonJS({
|
|
|
1797
1797
|
fontSize: !0,
|
|
1798
1798
|
fontStyle: !0,
|
|
1799
1799
|
fontWeight: !0,
|
|
1800
|
+
fontVariant: !0,
|
|
1800
1801
|
letterSpacing: !0,
|
|
1801
1802
|
lineHeight: !0,
|
|
1802
1803
|
textTransform: !0
|
|
@@ -3593,6 +3594,74 @@ var require_createShallowSetState_native = __commonJS({
|
|
|
3593
3594
|
}
|
|
3594
3595
|
});
|
|
3595
3596
|
|
|
3597
|
+
// ../web/dist/cjs/hooks/shouldDeoptDueToParentScheme.native.js
|
|
3598
|
+
var require_shouldDeoptDueToParentScheme_native = __commonJS({
|
|
3599
|
+
"../web/dist/cjs/hooks/shouldDeoptDueToParentScheme.native.js"(exports2, module2) {
|
|
3600
|
+
"use strict";
|
|
3601
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
3602
|
+
for (var name in all) __defProp2(target, name, {
|
|
3603
|
+
get: all[name],
|
|
3604
|
+
enumerable: !0
|
|
3605
|
+
});
|
|
3606
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
3607
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
3608
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
3609
|
+
for (var _loop = function() {
|
|
3610
|
+
var key = _step.value;
|
|
3611
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
3612
|
+
get: function() {
|
|
3613
|
+
return from[key];
|
|
3614
|
+
},
|
|
3615
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
3616
|
+
});
|
|
3617
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
3618
|
+
} catch (err) {
|
|
3619
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
3620
|
+
} finally {
|
|
3621
|
+
try {
|
|
3622
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
3623
|
+
} finally {
|
|
3624
|
+
if (_didIteratorError)
|
|
3625
|
+
throw _iteratorError;
|
|
3626
|
+
}
|
|
3627
|
+
}
|
|
3628
|
+
return to;
|
|
3629
|
+
}, __toCommonJS2 = function(mod) {
|
|
3630
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
3631
|
+
value: !0
|
|
3632
|
+
}), mod);
|
|
3633
|
+
}, shouldDeoptDueToParentScheme_native_exports = {};
|
|
3634
|
+
__export2(shouldDeoptDueToParentScheme_native_exports, {
|
|
3635
|
+
shouldDeoptDueToParentScheme: function() {
|
|
3636
|
+
return shouldDeoptDueToParentScheme;
|
|
3637
|
+
}
|
|
3638
|
+
});
|
|
3639
|
+
module2.exports = __toCommonJS2(shouldDeoptDueToParentScheme_native_exports);
|
|
3640
|
+
var import_react_native = require("react-native");
|
|
3641
|
+
function shouldDeoptDueToParentScheme(manager) {
|
|
3642
|
+
var _parents_, parents = ((manager == null ? void 0 : manager.getParents()) || []).reverse(), rootScheme = (_parents_ = parents[0]) === null || _parents_ === void 0 ? void 0 : _parents_.state.scheme;
|
|
3643
|
+
if (!rootScheme || import_react_native.Appearance.getColorScheme() !== rootScheme) return !0;
|
|
3644
|
+
var lastParentScheme = rootScheme, _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
3645
|
+
try {
|
|
3646
|
+
for (var _iterator = parents[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
3647
|
+
var parent = _step.value;
|
|
3648
|
+
if (parent.state.scheme !== lastParentScheme) return !0;
|
|
3649
|
+
lastParentScheme = parent.state.scheme;
|
|
3650
|
+
}
|
|
3651
|
+
} catch (err) {
|
|
3652
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
3653
|
+
} finally {
|
|
3654
|
+
try {
|
|
3655
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
3656
|
+
} finally {
|
|
3657
|
+
if (_didIteratorError) throw _iteratorError;
|
|
3658
|
+
}
|
|
3659
|
+
}
|
|
3660
|
+
return !1;
|
|
3661
|
+
}
|
|
3662
|
+
}
|
|
3663
|
+
});
|
|
3664
|
+
|
|
3596
3665
|
// ../web/dist/cjs/hooks/useTheme.native.js
|
|
3597
3666
|
var require_useTheme_native = __commonJS({
|
|
3598
3667
|
"../web/dist/cjs/hooks/useTheme.native.js"(exports2, module2) {
|
|
@@ -3663,7 +3732,7 @@ var require_useTheme_native = __commonJS({
|
|
|
3663
3732
|
}
|
|
3664
3733
|
});
|
|
3665
3734
|
module2.exports = __toCommonJS2(useTheme_exports);
|
|
3666
|
-
var import_react3 = __toESM2(require("react")), import_constants2 = require_index_native3(), import_config = require_config_native(), import_createVariable = require_createVariable_native(), import_ThemeManager = require_ThemeManager_native(), import_ThemeManagerContext = require_ThemeManagerContext_native(), import_createShallowSetState = require_createShallowSetState_native(), emptyProps = {
|
|
3735
|
+
var import_react3 = __toESM2(require("react")), import_constants2 = require_index_native3(), import_config = require_config_native(), import_createVariable = require_createVariable_native(), import_ThemeManager = require_ThemeManager_native(), import_ThemeManagerContext = require_ThemeManagerContext_native(), import_createShallowSetState = require_createShallowSetState_native(), import_shouldDeoptDueToParentScheme = require_shouldDeoptDueToParentScheme_native(), emptyProps = {
|
|
3667
3736
|
name: null
|
|
3668
3737
|
}, cached;
|
|
3669
3738
|
function getDefaultThemeProxied() {
|
|
@@ -3730,11 +3799,11 @@ If this is intended and you are using Tamagui without any themes, you can disabl
|
|
|
3730
3799
|
if (subkey === "val") globalThis.tamaguiAvoidTracking || (process.env.NODE_ENV === "development" && debug === "verbose" && console.info(" \u{1F3A8} useTheme() tracking new key because of .val access", new Error().stack), track(keyString));
|
|
3731
3800
|
else if (subkey === "get") return function(platform) {
|
|
3732
3801
|
var outVal = (0, import_createVariable.getVariable)(val);
|
|
3733
|
-
if (platform !== "web" && import_constants2.isIos && !deopt && (0, import_config.getSetting)("fastSchemeChange") && !shouldDeoptDueToParentScheme(themeManager) && scheme) {
|
|
3734
|
-
var _config_themes_name, _config_themes_oppositeName,
|
|
3802
|
+
if (platform !== "web" && import_constants2.isIos && !deopt && (0, import_config.getSetting)("fastSchemeChange") && !(0, import_shouldDeoptDueToParentScheme.shouldDeoptDueToParentScheme)(themeManager) && scheme) {
|
|
3803
|
+
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[keyString]), oppositeColor = (0, import_createVariable.getVariable)((_config_themes_oppositeName = config.themes[oppositeName]) === null || _config_themes_oppositeName === void 0 ? void 0 : _config_themes_oppositeName[keyString]), dynamicVal = {
|
|
3735
3804
|
dynamic: {
|
|
3736
|
-
|
|
3737
|
-
|
|
3805
|
+
[scheme]: color,
|
|
3806
|
+
[oppositeScheme]: oppositeColor
|
|
3738
3807
|
}
|
|
3739
3808
|
};
|
|
3740
3809
|
return dynamicVal;
|
|
@@ -3764,27 +3833,6 @@ If this is intended and you are using Tamagui without any themes, you can disabl
|
|
|
3764
3833
|
}
|
|
3765
3834
|
return !1;
|
|
3766
3835
|
}
|
|
3767
|
-
function shouldDeoptDueToParentScheme(manager) {
|
|
3768
|
-
var _parents_, parents = ((manager == null ? void 0 : manager.getParents()) || []).reverse(), rootScheme = (_parents_ = parents[0]) === null || _parents_ === void 0 ? void 0 : _parents_.state.scheme;
|
|
3769
|
-
if (!rootScheme) return !0;
|
|
3770
|
-
var lastParentScheme = rootScheme, _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
3771
|
-
try {
|
|
3772
|
-
for (var _iterator = parents[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
3773
|
-
var parent = _step.value;
|
|
3774
|
-
if (parent.state.scheme !== lastParentScheme) return !0;
|
|
3775
|
-
lastParentScheme = parent.state.scheme;
|
|
3776
|
-
}
|
|
3777
|
-
} catch (err) {
|
|
3778
|
-
_didIteratorError = !0, _iteratorError = err;
|
|
3779
|
-
} finally {
|
|
3780
|
-
try {
|
|
3781
|
-
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
3782
|
-
} finally {
|
|
3783
|
-
if (_didIteratorError) throw _iteratorError;
|
|
3784
|
-
}
|
|
3785
|
-
}
|
|
3786
|
-
return !1;
|
|
3787
|
-
}
|
|
3788
3836
|
var activeThemeManagers = /* @__PURE__ */ new Set(), _uidToManager = /* @__PURE__ */ new WeakMap(), _idToUID = {}, getId = function(id) {
|
|
3789
3837
|
return _idToUID[id];
|
|
3790
3838
|
}, getThemeManager = function(id) {
|
|
@@ -8402,7 +8450,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8402
8450
|
}
|
|
8403
8451
|
});
|
|
8404
8452
|
module2.exports = __toCommonJS2(createComponent_exports);
|
|
8405
|
-
var import_jsx_runtime = require("react/jsx-runtime"), import_compose_refs = require_index_native5(), import_constants2 = require_index_native3(), import_helpers = require_index_native4(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_constants22 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_ComponentContext = require_ComponentContext_native(), import_createVariable = require_createVariable_native(), import_defaultComponentState = require_defaultComponentState_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(), import_ThemeDebug = require_ThemeDebug_native(),
|
|
8453
|
+
var import_jsx_runtime = require("react/jsx-runtime"), import_compose_refs = require_index_native5(), import_constants2 = require_index_native3(), import_helpers = require_index_native4(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_constants22 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_ComponentContext = require_ComponentContext_native(), import_createVariable = require_createVariable_native(), import_defaultComponentState = require_defaultComponentState_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(), import_ThemeDebug = require_ThemeDebug_native(), time2, debugKeyListeners, startVisualizer, componentSetStates = /* @__PURE__ */ new Set();
|
|
8406
8454
|
typeof document < "u" && (cancelTouches = function() {
|
|
8407
8455
|
componentSetStates.forEach(function(setState) {
|
|
8408
8456
|
return setState(function(prev) {
|
|
@@ -8879,7 +8927,6 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
8879
8927
|
stateRef,
|
|
8880
8928
|
staticConfig,
|
|
8881
8929
|
styleProps,
|
|
8882
|
-
tamaguiConfig,
|
|
8883
8930
|
themeState,
|
|
8884
8931
|
viewProps,
|
|
8885
8932
|
willBeAnimated
|