tamagui 1.123.0 → 1.123.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/native.js +48 -30
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +48 -30
- package/dist/test.native.js.map +2 -2
- package/package.json +54 -54
package/dist/native.js
CHANGED
|
@@ -1184,7 +1184,10 @@ var require_constants_native = __commonJS({
|
|
|
1184
1184
|
}
|
|
1185
1185
|
});
|
|
1186
1186
|
module2.exports = __toCommonJS2(constants_native_exports);
|
|
1187
|
-
var import_react3 = require("react"), isWeb6 = !1, isWindowDefined = !1, isServer2 = !1, isClient2 = !1, useIsomorphicLayoutEffect2 = import_react3.useLayoutEffect, isChrome2 = !1, isWebTouchable2 = !1, isTouchable2 = !0, isAndroid =
|
|
1187
|
+
var import_react3 = require("react"), import_react_native4 = require("react-native"), isWeb6 = !1, isWindowDefined = !1, isServer2 = !1, isClient2 = !1, useIsomorphicLayoutEffect2 = import_react3.useLayoutEffect, isChrome2 = !1, isWebTouchable2 = !1, isTouchable2 = !0, isAndroid = import_react_native4.Platform.OS === "android" || process.env.TEST_NATIVE_PLATFORM === "android", isIos = import_react_native4.Platform.OS === "ios" || process.env.TEST_NATIVE_PLATFORM === "ios", platforms = {
|
|
1188
|
+
ios: "ios",
|
|
1189
|
+
android: "android"
|
|
1190
|
+
}, currentPlatform = platforms[import_react_native4.Platform.OS] || "native";
|
|
1188
1191
|
}
|
|
1189
1192
|
});
|
|
1190
1193
|
|
|
@@ -3563,10 +3566,20 @@ var require_ThemeManager_native = __commonJS({
|
|
|
3563
3566
|
}
|
|
3564
3567
|
}
|
|
3565
3568
|
]), ThemeManager2;
|
|
3566
|
-
}();
|
|
3569
|
+
}(), cache = {};
|
|
3567
3570
|
function getState(props, manager) {
|
|
3568
|
-
if (props.name && props.reset) throw new Error(process.env.NODE_ENV === "production" ? "\u274C004" : "Cannot reset and set a new name at the same time.");
|
|
3569
3571
|
if (!getHasThemeUpdatingProps(props)) return null;
|
|
3572
|
+
var [allManagers] = getManagers(manager), cacheKey = `${props.name || ""}${props.componentName || ""}${props.inverse || ""}${props.reset || ""}${allManagers.map(function(x) {
|
|
3573
|
+
return (x == null ? void 0 : x.state.name) || ".";
|
|
3574
|
+
}).join("")}`, cached = cache[cacheKey];
|
|
3575
|
+
if (!cached) {
|
|
3576
|
+
var res = getStateUncached(props, manager);
|
|
3577
|
+
return cache[cacheKey] = res, res;
|
|
3578
|
+
}
|
|
3579
|
+
return cached;
|
|
3580
|
+
}
|
|
3581
|
+
function getStateUncached(props, manager) {
|
|
3582
|
+
if (props.name && props.reset) throw new Error(process.env.NODE_ENV === "production" ? "\u274C004" : "Cannot reset and set a new name at the same time.");
|
|
3570
3583
|
var themes = (0, import_config.getThemes)(), [allManagers, componentManagers] = getManagers(manager), isDirectParentAComponentTheme = !!(manager != null && manager.state.isComponent), startIndex = props.reset && !isDirectParentAComponentTheme ? 1 : 0, baseManager = allManagers[startIndex], parentManager = allManagers[startIndex + 1];
|
|
3571
3584
|
if (!baseManager && props.reset) return process.env.NODE_ENV !== "production" && console.warn("Cannot reset, no parent theme exists"), null;
|
|
3572
3585
|
var { componentName } = props, result = null, baseName = (baseManager == null ? void 0 : baseManager.state.name) || "";
|
|
@@ -13942,7 +13955,7 @@ var require_Pressability_native = __commonJS({
|
|
|
13942
13955
|
var require_addNativeValidStyles_native = __commonJS({
|
|
13943
13956
|
"../../core/core/dist/cjs/addNativeValidStyles.native.js"(exports2, module2) {
|
|
13944
13957
|
"use strict";
|
|
13945
|
-
var
|
|
13958
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
13946
13959
|
for (var name in all) __defProp2(target, name, {
|
|
13947
13960
|
get: all[name],
|
|
13948
13961
|
enumerable: !0
|
|
@@ -13970,18 +13983,6 @@ var require_addNativeValidStyles_native = __commonJS({
|
|
|
13970
13983
|
}
|
|
13971
13984
|
}
|
|
13972
13985
|
return to;
|
|
13973
|
-
}, __toESM2 = function(mod, isNodeMode, target) {
|
|
13974
|
-
return target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
13975
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
13976
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
13977
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
13978
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
13979
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", {
|
|
13980
|
-
value: mod,
|
|
13981
|
-
enumerable: !0
|
|
13982
|
-
}) : target,
|
|
13983
|
-
mod
|
|
13984
|
-
);
|
|
13985
13986
|
}, __toCommonJS2 = function(mod) {
|
|
13986
13987
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
13987
13988
|
value: !0
|
|
@@ -13993,21 +13994,38 @@ var require_addNativeValidStyles_native = __commonJS({
|
|
|
13993
13994
|
}
|
|
13994
13995
|
});
|
|
13995
13996
|
module2.exports = __toCommonJS2(addNativeValidStyles_native_exports);
|
|
13996
|
-
var import_helpers = require_index_native7()
|
|
13997
|
-
function
|
|
13998
|
-
|
|
13999
|
-
|
|
14000
|
-
|
|
14001
|
-
|
|
14002
|
-
|
|
14003
|
-
|
|
14004
|
-
outlineWidth: !0,
|
|
14005
|
-
outlineStyle: !0,
|
|
14006
|
-
outlineSpread: !0,
|
|
14007
|
-
outlineColor: !0
|
|
14008
|
-
};
|
|
14009
|
-
Object.assign(import_helpers.validStyles, additional), Object.assign(import_helpers.stylePropsAll, additional);
|
|
13997
|
+
var import_helpers = require_index_native7();
|
|
13998
|
+
function getReactNativeVersion() {
|
|
13999
|
+
var version = process.env.REACT_NATIVE_VERSION;
|
|
14000
|
+
if (!version) try {
|
|
14001
|
+
var ReactNativeOfficalVersion = require("react-native/Libraries/Core/ReactNativeVersion");
|
|
14002
|
+
if (ReactNativeOfficalVersion) {
|
|
14003
|
+
var { version: { major, minor, patch } } = ReactNativeOfficalVersion;
|
|
14004
|
+
version = `${major}.${minor}.${patch}`;
|
|
14010
14005
|
}
|
|
14006
|
+
} catch {
|
|
14007
|
+
} finally {
|
|
14008
|
+
version || (version = "0.77");
|
|
14009
|
+
}
|
|
14010
|
+
var [major1, minor1, patch1] = version.split(".");
|
|
14011
|
+
return [
|
|
14012
|
+
+major1,
|
|
14013
|
+
+minor1,
|
|
14014
|
+
+patch1
|
|
14015
|
+
];
|
|
14016
|
+
}
|
|
14017
|
+
function addNativeValidStyles() {
|
|
14018
|
+
var [major, minor] = getReactNativeVersion();
|
|
14019
|
+
if (major === 0 && minor >= 77) {
|
|
14020
|
+
var additional = {
|
|
14021
|
+
boxSizing: !0,
|
|
14022
|
+
mixBlendMode: !0,
|
|
14023
|
+
outlineWidth: !0,
|
|
14024
|
+
outlineStyle: !0,
|
|
14025
|
+
outlineSpread: !0,
|
|
14026
|
+
outlineColor: !0
|
|
14027
|
+
};
|
|
14028
|
+
Object.assign(import_helpers.validStyles, additional), Object.assign(import_helpers.stylePropsAll, additional);
|
|
14011
14029
|
}
|
|
14012
14030
|
}
|
|
14013
14031
|
}
|