import { SurfaceRung } from '../../tokens/colors'; /** * What a `Surface` publishes to its descendants. * * This travels through React context, which — unlike the CSS custom properties * the same component emits — crosses portals. That difference is the whole * reason portalled overlays need to re-declare a rung: they can still *read* * where they came from, but the browser will not inherit the variables to them. * * Kept in its own module so `Surface.tsx` exports only a component and stays * eligible for fast refresh. */ export interface SurfaceContextValue { /** How many surfaces deep, counting this one. The app shell is 0. */ depth: number; /** The rung this surface resolved to. */ rung: SurfaceRung; } export declare const SurfaceContext: import('react').Context; /** The root defaults, used when a component is rendered outside any `Surface`. */ export declare const ROOT_SURFACE: SurfaceContextValue; /** * The rung of the nearest enclosing `Surface`, and how deep it is. * * Returns the root defaults outside any surface, so a component can call this * unconditionally. */ export declare function useSurface(): SurfaceContextValue; /** * The rung a portalled child of the current surface should render on. * * For overlay components that MUI reparents to `document.body`. See * `portalRung` for why it is `max(raised, host + 1)` rather than `host + 1`. */ export declare function usePortalRung(): SurfaceRung;