@tamagui/core 1.85.9-1705340264375 → 1.85.10
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 +3 -5
- package/dist/native.js.map +1 -1
- package/dist/test.native.js +3 -5
- package/dist/test.native.js.map +1 -1
- package/package.json +6 -6
package/dist/native.js
CHANGED
|
@@ -1502,9 +1502,7 @@ var require_insertStyleRule_native = __commonJS({
|
|
|
1502
1502
|
theme: values
|
|
1503
1503
|
};
|
|
1504
1504
|
for (let selector of selectors) {
|
|
1505
|
-
let
|
|
1506
|
-
name.startsWith(scheme) && (name = name.slice(scheme.length + 1)), scheme === name && (scheme = "");
|
|
1507
|
-
let themeName = `${scheme}${scheme && name ? "_" : ""}${name}`;
|
|
1505
|
+
let matches = selector.match(/(.t_(light|dark))?[\s]?(.t_([a-z0-9_]+))[\s]*$/i) || [], [_0, _1, scheme, _2, name] = matches, themeName = name && scheme && scheme !== name ? `${scheme}_${name}` : name || scheme;
|
|
1508
1506
|
dedupedEntry.names.includes(themeName) || dedupedEntry.names.push(themeName);
|
|
1509
1507
|
}
|
|
1510
1508
|
return dedupedEntry;
|
|
@@ -1951,7 +1949,7 @@ var require_ThemeManager_native = __commonJS({
|
|
|
1951
1949
|
return this.updateState(nextState, shouldNotify), nextState;
|
|
1952
1950
|
}
|
|
1953
1951
|
updateState(nextState, shouldNotify = !0) {
|
|
1954
|
-
this.state = nextState, this._allKeys = null,
|
|
1952
|
+
this.state = nextState, this._allKeys = null, shouldNotify && this.notify();
|
|
1955
1953
|
}
|
|
1956
1954
|
getStateIfChanged(props = this.props, state = this.state, parentManager = this.parentManager) {
|
|
1957
1955
|
let _ = this.getState(props, parentManager);
|
|
@@ -1974,7 +1972,7 @@ var require_ThemeManager_native = __commonJS({
|
|
|
1974
1972
|
]), this._allKeys;
|
|
1975
1973
|
}
|
|
1976
1974
|
notify(forced = !1) {
|
|
1977
|
-
this.themeListeners.forEach((cb) => cb(this.state.name, this, forced));
|
|
1975
|
+
this.themeListeners.forEach((cb) => cb(this.state.name, this, forced)), process.env.NODE_ENV !== "production" && (this._numChangeEventsSent ??= 0, this._numChangeEventsSent++);
|
|
1978
1976
|
}
|
|
1979
1977
|
onChangeTheme(cb, debugId) {
|
|
1980
1978
|
return process.env.NODE_ENV !== "production" && debugId && (this._listeningIds ??= /* @__PURE__ */ new Set(), this._listeningIds.add(debugId)), this.themeListeners.add(cb), () => {
|