message: feat: Inject resolved scheme into ConfigProviderContext when scheme=inherit
diff: -import { FC, useRef } from 'react';
  +import { FC, useRef, useState, useEffect } from 'react';
  import { canUseDOM, useDOM } from '../../lib/dom';
  import {
  ConfigProviderContext,
  @@ -19,6 +19,24 @@ export interface ConfigProviderProps extends ConfigProviderContextInterface {
  scheme?: AppearanceScheme;
  }
  +function useInheritResolver(scheme: ConfigProviderProps['scheme']): string {
  + const inherit = scheme === 'inherit';
  + const getScheme = () => inherit ? document.body.getAttribute('scheme') : scheme;
  + const [realScheme, setScheme] = useState(getScheme());
  + useEffect(() => {
  + if (!inherit) {
  + return noop;
  + }
  + setScheme(getScheme);
  + const observer = new MutationObserver(() => {
  + setScheme(getScheme());
  + });
  + observer.observe(document.body);
  + return () => observer.disconnect();
  + }, [inherit]);
  + return realScheme;
  +}
  +
  function normalizeScheme(scheme: AppearanceScheme, platform: PlatformType): AppearanceScheme {
  if (scheme === 'inherit') {
  return scheme;
  @@ -56,7 +74,8 @@ const ConfigProvider: FC<ConfigProviderProps> = ({ children, ...config }) => {
  return scheme === 'inherit' ? noop : () => document.body.removeAttribute('scheme');
  }, [scheme]);
  - const configContext = useObjectMemo(config);
  + const resolvedScheme = useInheritResolver(scheme);
  + const configContext = useObjectMemo({ ...config, scheme: resolvedScheme });
  return (
  <ConfigProviderContext.Provider value={configContext}>
  