import { ReactNode } from 'react'; import { Color } from '../types.js'; /** * Tracks the surface depth of the current React subtree. Each `Surface` publishes its own * level (or `currentLevel - 1` for `variant="transparent"`) so nested surfaces can resolve * relative levels (e.g. `"+1"`/`"-1"`) and pick appropriate background tones. */ interface SurfaceContextValue { /** Current surface depth (1–5). `0` outside any `Surface`. */ level: number; /** * Accent color of the nearest enclosing colored surface, mirroring the * `cladd-color-{name}` CSS cascade so descendants can read the region color in * JS (e.g. `Segmented` picks its active color from it). `''` when no surface up * the tree set a color. */ color: Color; } interface SurfaceContextProviderProps { /** Surface depth published to descendants. */ level: number; /** Region color published to descendants. Defaults to `''` (no region color). */ color?: Color; /** Subtree to publish the values to. */ children: ReactNode; } export declare const SurfaceContext: import("react").Context; export declare function SurfaceContextProvider(props: SurfaceContextProviderProps): import("react/jsx-runtime").JSX.Element; /** * Resets the region `color` to `''` while preserving the surface `level`, for use at * portal boundaries. React context crosses portals but the `cladd-color-{name}` CSS * cascade does not — without this, a portaled overlay would inherit a colored * ancestor's region color through context while its DOM renders neutral. */ export declare function SurfaceColorReset(props: { children: ReactNode; }): import("react/jsx-runtime").JSX.Element; export {}; //# sourceMappingURL=SurfaceContext.d.ts.map