import { type ReactNode, type RefObject } from "react"; import { View, type StyleProp, type ViewStyle, type ViewProps } from "react-native"; import type * as ExpoBlurTypes from "expo-blur"; import { type ColorTokens } from "../tokens.js"; export interface GlassSurfaceProps { /** The skin's shape + fill style (radius, padding, border, shadow, and the skin's * own opaque fill). The fill is stripped under glass; the material supplies its own * (the `glass-tint` token, or `tint` below). */ style?: StyleProp; children?: ReactNode; pointerEvents?: ViewProps["pointerEvents"]; /** Layout callback forwarded to the ROOT element of every material branch, so * a shell built on GlassSurface (a navbar measuring itself for its narrow * collapse) can use the container-measurement hooks. */ onLayout?: ViewProps["onLayout"]; /** E2E hook forwarded to the root element. */ testID?: string; /** * Landmark role for the root element, e.g. `"navigation"` for a sidebar shell or * `"banner"` for a top bar. Glass surfaces ARE the app's bar and sidebar shells, so * without this the chrome is an unlabelled stack of divs and every control inside it * fails axe's `region` rule for living outside a landmark. Spelled with RN's universal * `role` prop, which React Native Web turns into the matching HTML element and native * maps onto its own traits, so it needs no per-platform branch. Omit for decorative * surfaces such as popovers and menus, which already carry their own role. */ role?: ViewProps["role"]; /** * Render the material as an INTERACTIVE control surface: on iOS 26 the native * Liquid Glass responds to touch with its fluid press animation (Apple's * `isInteractive`). Use for glass that is itself a tappable control (e.g. an * account-trigger avatar), not for passive shells like navbars. Ignored on the * frost/solid fallbacks, which have no interactive material. Defaults to false. */ interactive?: boolean; /** * Render a SHEER (more see-through) frost: a lighter blur and a thinner tint so * whatever animates behind the surface reads clearly through it. For CONTENT-layer * surfaces that float over a live backdrop and do NOT need to occlude what is behind * them (the docs' example stages, tables, and cards over the Canvas Universe). Do NOT * use it on functional overlays (menus, dropdowns, dialogs), which must stay opaque * enough to occlude the content they open over. Defaults to false (the full frost). */ sheer?: boolean; /** * Override the translucent UNDER-FILL painted behind the material (the fill that gives * a bare glass panel a body). Defaults to the active scheme's `glass-tint` token, the * material's own fill, which suits every panel and bar. Pass a brighter value for a * small glass CONTROL that must read as a bright puck rather than a tinted blob: the * Slider's Liquid Glass handle passes an opaque white here so the knob looks like glass * on both schemes. * Ignored on the solid + module-absent fallbacks (PlainSurface keeps the skin's own * opaque fill). */ tint?: string; } export declare const GlassBlurTargetContext: import("react").Context | null>; export declare const GlassWindowBlurTargetContext: import("react").Context | null>; /** * Re-publish the window-level Android blur target inside an RN Modal, so the * Modal's frost surfaces (a sheet, a drawer panel) blur the main window's content. * A Modal renders in its own native window, which is never a descendant of the * main-window target — the one arrangement expo-blur 57's Android API can blur * without the ancestor-target render-node cycle. A no-op (provides null) on every * other platform and when no published a target. */ export declare function GlassModalBlurTarget({ children }: { children?: ReactNode; }): import("react").JSX.Element; export interface GlassBlurTargetHostProps { /** The provider wrapper's style (OverlayProvider's [FILL, style]). */ style?: StyleProp; /** Attached to the BlurTargetView on Android when expo-blur 57+ is installed; * left unattached (current stays null) everywhere else. */ targetRef: RefObject; /** The overlay outlet subtree; rendered after (and never inside) the target. */ outlet: ReactNode; children?: ReactNode; } export declare function frostMethodProps(supportsBlurTarget: boolean, target: RefObject | null): Partial; export declare const GLASS_INTENSITY = 80; export declare const SHEER_INTENSITY = 50; export declare const SHEER_FILL_OPACITY = 0.75; export declare const CONTRAST_BORDER_WIDTH = 1; export declare function contrastBorder(tokens: ColorTokens): ViewStyle; interface Split { outer: ViewStyle; clip: ViewStyle; } export declare function splitSurfaceStyle(style: StyleProp): Split; export declare function GlassBox({ style, children, pointerEvents, testID, role, onLayout, material, }: GlassSurfaceProps & { material: ReactNode; }): import("react").JSX.Element; export declare function PlainSurface({ style, children, pointerEvents, testID, role, onLayout }: GlassSurfaceProps): import("react").JSX.Element; export declare function degradedGlassSurface(flags: { increasedContrast: boolean; reducedTransparency: boolean; tokens: ColorTokens; }, props: GlassSurfaceProps): ReactNode | null; export declare const MATERIAL_FILL: ViewStyle; export declare const SPECULAR_RIM: { readonly light: "inset 0 1px 1px rgba(255,255,255,0.55), inset 0 0 0 0.5px rgba(255,255,255,0.40), inset 0 -1px 1.5px rgba(0,0,0,0.06)"; readonly dark: "inset 0 1px 1px rgba(255,255,255,0.16), inset 0 0 0 0.5px rgba(255,255,255,0.10), inset 0 -1px 1.5px rgba(0,0,0,0.22)"; }; export declare function specularRim(style: StyleProp, dark: boolean): ViewStyle; export declare function materialFill(style: StyleProp): ViewStyle; export {}; //# sourceMappingURL=glass-surface.shared.d.ts.map