@tamagui/core 1.79.6 → 1.79.8
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 -3
- package/dist/native.js.map +1 -1
- package/dist/test.native.js +4 -3
- package/dist/test.native.js.map +1 -1
- package/package.json +6 -6
package/dist/native.js
CHANGED
|
@@ -1902,7 +1902,7 @@ var require_useMedia_native = __commonJS({
|
|
|
1902
1902
|
return listeners.add(subscriber), () => listeners.delete(subscriber);
|
|
1903
1903
|
}
|
|
1904
1904
|
function useMedia2(uid, componentContext) {
|
|
1905
|
-
let internal = (0, import_react3.useRef)(), initialState = ((componentContext ? (0, import_useDisableSSR.getDisableSSR)(componentContext) : (0, import_useDisableSSR.useDisableSSR)()) ? mediaState2 : initState) || {}, state = (0, import_react3.useSyncExternalStore)(
|
|
1905
|
+
let internal = (0, import_react3.useRef)(), initialState = ((componentContext ? (0, import_useDisableSSR.getDisableSSR)(componentContext) : (0, import_useDisableSSR.useDisableSSR)()) || !import_constants2.isWeb ? mediaState2 : initState) || {}, state = (0, import_react3.useSyncExternalStore)(
|
|
1906
1906
|
subscribe,
|
|
1907
1907
|
() => {
|
|
1908
1908
|
if (!internal.current)
|
|
@@ -4402,7 +4402,7 @@ If this is intended and you are using Tamagui without any themes, you can disabl
|
|
|
4402
4402
|
if (forceShouldChange || next && !(forceUpdate !== !0 && !manager.getStateShouldChange(next, prevState)))
|
|
4403
4403
|
return next;
|
|
4404
4404
|
}
|
|
4405
|
-
if (import_constants2.isServer || ((0, import_react3.
|
|
4405
|
+
if (import_constants2.isServer || ((0, import_react3.useEffect)(() => {
|
|
4406
4406
|
if (!themeManager)
|
|
4407
4407
|
return;
|
|
4408
4408
|
if (props.inverse && !mounted) {
|
|
@@ -4418,7 +4418,7 @@ If this is intended and you are using Tamagui without any themes, you can disabl
|
|
|
4418
4418
|
}), disposeChangeListener = parentManager == null ? void 0 : parentManager.onChangeTheme(
|
|
4419
4419
|
(name, manager, forced) => {
|
|
4420
4420
|
let force = forced || (shouldUpdate == null ? void 0 : shouldUpdate()) || props.deopt || props["disable-child-theme"], shouldTryUpdate = force ?? !!(keys != null && keys.length || isNewTheme);
|
|
4421
|
-
process.env.NODE_ENV === "development" && props.debug === "verbose" && console.info(" \u{1F538} onChange", themeManager.id, { force, shouldTryUpdate, props, name, manager, keys }), shouldTryUpdate && setThemeState(createState);
|
|
4421
|
+
process.env.NODE_ENV === "development" && props.debug === "verbose" && console.info(" \u{1F538} onChange", themeManager.id, { force, shouldTryUpdate, props, name, manager, keys }), shouldTryUpdate && setThemeState((prev) => createState(prev, force));
|
|
4422
4422
|
},
|
|
4423
4423
|
themeManager.id
|
|
4424
4424
|
);
|