import * as React from 'react'; import { DefaultTheme } from '@mui/system'; import { StorageManager } from '@mui/system/cssVars'; import { CssThemeVariables } from './types'; import type { NovaPigmentTheme } from '../types/theme'; import { Locale } from '../Locale'; type ThemeProviderCssVariablesProps = CssThemeVariables extends { enabled: true; } ? { /** * The node for attaching the `theme.colorSchemeSelector`. * @default document */ colorSchemeNode?: Element | null; /** * If `true`, the provider creates its own context and generate stylesheet as if it is a root `ThemeProvider`. */ disableNestedContext?: boolean; /** * If `true`, the style sheet for CSS theme variables won't be generated. * * This is useful for controlling nested ThemeProvider behavior. * @default false */ disableStyleSheetGeneration?: boolean; /** * If `true`, theme values are recalculated when the mode changes. * The `theme.colorSchemes.{mode}.*` nodes will be shallow merged to the top-level of the theme. * @default false */ forceThemeRerender?: boolean; } : object; export interface ThemeProviderProps extends ThemeProviderCssVariablesProps { children?: React.ReactNode; theme?: Partial | ((outerTheme: Theme) => Theme) | Partial; /** * The locales which will be used throughout components. * @default en-US resource */ locale?: Locale; /** * Indicate if rtl layout should be applied. * @default false */ rtl?: boolean; /** * The document used to perform `disableTransitionOnChange` feature * @default document */ documentNode?: Document | null; /** * The default mode when the local storage has no mode yet, * requires the theme to have `colorSchemes` with light and dark. * @default 'system' */ defaultMode?: 'light' | 'dark' | 'system'; /** * The window that attaches the 'storage' event listener * @default window */ storageWindow?: Window | null; /** * The storage manager to be used for storing the mode and color scheme * @default using `window.localStorage` */ storageManager?: StorageManager | null; /** * localStorage key used to store application `mode` * @default 'nova-mode' */ modeStorageKey?: string; /** * localStorage key used to store `colorScheme` * @default 'nova-color-scheme' */ colorSchemeStorageKey?: string; noSsr?: boolean; /** * Disable CSS transitions when switching between modes or color schemes * @default false */ disableTransitionOnChange?: boolean; } export default function ThemeProvider({ theme, locale, rtl, ...props }: ThemeProviderProps): import("react/jsx-runtime").JSX.Element; export declare function NovaThemeProvider({ children, ...props }: Omit): import("react/jsx-runtime").JSX.Element; export {};