tamagui 1.125.34 → 1.125.35
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 +6 -6
- package/dist/native.js.map +1 -1
- package/dist/test.native.js +6 -6
- package/dist/test.native.js.map +1 -1
- package/package.json +55 -55
package/dist/test.native.js
CHANGED
|
@@ -6968,12 +6968,12 @@ var require_useThemeState_native = __commonJS({
|
|
|
6968
6968
|
function getNewThemeName() {
|
|
6969
6969
|
var parentName = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", { name, reset, componentName, inverse, debug } = arguments.length > 1 ? arguments[1] : void 0, forceUpdate = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
|
|
6970
6970
|
if (name && reset) throw new Error("Cannot reset and set a new name at the same time.");
|
|
6971
|
+
var { themes: themes2 } = (0, import_config.getConfig)();
|
|
6971
6972
|
if (reset) {
|
|
6972
|
-
|
|
6973
|
-
|
|
6974
|
-
return lastPartIndex <= 0 ? parentName : parentName.slice(lastPartIndex);
|
|
6973
|
+
var lastPartIndex = parentName.lastIndexOf("_"), name1 = lastPartIndex <= 0 ? parentName : parentName.slice(lastPartIndex), scheme = parentName.slice(0, lastPartIndex), result = themes2[name1] ? name1 : scheme;
|
|
6974
|
+
return result;
|
|
6975
6975
|
}
|
|
6976
|
-
var
|
|
6976
|
+
var parentParts = parentName.split("_"), lastName = parentParts[parentParts.length - 1];
|
|
6977
6977
|
lastName && lastName[0].toLowerCase() !== lastName[0] && parentParts.pop();
|
|
6978
6978
|
for (var subNames = [
|
|
6979
6979
|
name && componentName ? `${name}_${componentName}` : void 0,
|
|
@@ -7002,8 +7002,8 @@ var require_useThemeState_native = __commonJS({
|
|
|
7002
7002
|
}
|
|
7003
7003
|
if (inverse) {
|
|
7004
7004
|
found || (found = parentName);
|
|
7005
|
-
var
|
|
7006
|
-
found = found.replace(new RegExp(`^${
|
|
7005
|
+
var scheme1 = found.split("_")[0];
|
|
7006
|
+
found = found.replace(new RegExp(`^${scheme1}`), scheme1 === "light" ? "dark" : "light");
|
|
7007
7007
|
}
|
|
7008
7008
|
return !forceUpdate && found === parentName && // if its a scheme only sub-theme, we always consider it "new" because it likely inverses
|
|
7009
7009
|
// and we want to avoid reparenting
|