import type { MaterialVariant, Thickness, Layer, LayerAttr, ContentMaterial, Backdrop, Tier, DomTier, Engine, Transparency, Shape, EdgeStyle, MaterialRole, MaterialAttributes, SurfaceProps as ContractSurfaceProps, SurfaceGroupProps, EnvironmentProps, ScrollEdgeProps, ConcentricFrameProps } from '../contracts/material.js'; import type { RadiusToken, SpaceToken } from '../contracts/tokens.js'; export type { MaterialVariant, Thickness, Layer, LayerAttr, ContentMaterial, Backdrop, DomTier, Engine, Transparency, Shape, EdgeStyle, MaterialRole, MaterialAttributes, SurfaceGroupProps, EnvironmentProps, ScrollEdgeProps, ConcentricFrameProps, RadiusToken, SpaceToken, }; /** * Rendering tier. `lightweight | standard | enhanced` are written to `` * by `AuraGlassScript` (pre-paint) or a subtree override. `cinematic` is never returned by * core (`useMaterialTier` resolves it to `standard`); it exists only inside * `aura-glass-labs`, whose residents refract library-owned pixels (no DOM rasterisation, * ≤ 1 WebGL context per page, paused offscreen and when hidden) and fall back to the * standard `Surface` under `calm`/`none` motion, non-`glass` transparency, forced colours * or context loss. */ export type { Tier }; /** Component-internal size class (D-07): never a public prop; maps to thickness in resolveRole. */ export type SizeClass = 'control' | 'bar' | 'panel' | 'sheet'; /** SVG lens-map filter id (MAT-127): `ag-lens--`; 'sheet' is never present. */ export type LensId = `ag-lens-${Shape}-${'control' | 'bar' | 'panel'}`; /** CSS length literal used inside a MaterialSpec (compiled to token references). */ export type CssLength = `${number}px`; /** OKLCH colour derived from a token by relative colour syntax, e.g. * `oklch(from var(--ag-color-canvas) calc(l - 0.02) c h)` (REQ-MAT-18: no literal * colour in src; the token pipeline owns every colour value). */ export type OklchColor = `oklch(from var(--${string}) ${string})`; /** Token-relative OKLCH colour with alpha, e.g. * `oklch(from var(--ag-color-canvas) l c h / 0.6)`. */ export type OklchAlpha = `oklch(from var(--${string}) ${string} / ${number})`; export type CssAngle = `${number}deg`; /** Shadow token reference emitted into `--ag-shadow-{thin,regular,thick}`. */ export type ShadowSpec = { ambient: string; key: string; }; /** REQ-MAT-09 interaction-state values (the `state` field of MaterialSpec). */ export interface MaterialStateSpec { hoverSpecular: number; pressGlow: number; disabledAlpha: number; hoverFloor: number; pressFloor: number; selectedTint: number; loadingAlpha: number; draggingLift: string; draggingSpecular: number; dropTargetRim: CssLength; dropTargetFill: number; } /** * The single material definition (architecture §4.3, DTCG `$type: "glass-material"`). * `material/material.tokens.json` is the sole source; `defineMaterial` validates and * freezes a literal spec. `opacityFloor` is the *pre-solve* table — the compiler's * contrast-solve transform replaces every cell with the solved minimum alpha. */ export interface MaterialSpec { /** Backdrop blur per thickness; ≤ 32px everywhere (initial 12/20/32). */ blur: Record; /** One saturation value shared by every blurred cell (~1.6). */ saturation: number; /** Default (light-scheme) brightness; the dark value travels as a token mode. */ brightness: number; /** Tint alpha per declared backdrop (derived from sys.color.canvas, never authored per preset). */ tint: Record<'light' | 'dark' | 'media', number>; /** SOLVED minimum fill alpha per [transparency][thickness][backdrop] (REQ-MAT-10 output). */ opacityFloor: Record>>; /** Fill for a nested (inner) surface — never blurred. */ innerFill: Record<'light' | 'dark', OklchAlpha>; /** Content materials (D-08): opaque fills, no backdrop filter. */ content: Record>; rim: { width: Record; light: OklchAlpha; shade: OklchAlpha; }; specular: { intensity: number; spread: CssAngle; }; refraction: { bezel: Record; scale: Record; }; grain: { opacity: number; asset: 'ag-grain-128.avif'; }; /** Ambient + key per thickness, scheme-resolved (overlays always take `thick`). */ shadow: Record>; /** `modal` alpha for the scrim sibling; `blur` is capped at 12px (REQ-MAT-31). */ scrim: { clearOverBright: number; modal: number; blur: CssLength; }; /** Lightweight tier fill, alpha ≥ 0.85, scheme-resolved (never a black slab). */ fallbackFill: Record<'light' | 'dark', OklchAlpha>; state: MaterialStateSpec; } /** The 17 deleted 4.x optical props (REQ-MAT-24): each is a type error on SurfaceProps. */ export type DeletedGlassProp = 'caustics' | 'chromatic' | 'lighting' | 'ior' | 'tier' | 'depth' | 'tint' | 'glowIntensity' | 'glowColor' | 'optimization' | 'hardwareAcceleration' | 'intensity' | 'blur' | 'parallax' | 'adaptive' | 'magnet' | 'cursorHighlight'; /** * `Surface` props: the contract shape plus never-markers so the deleted 4.x props and * `as` fail type-checking even through a spread (REQ-MAT-24; `refraction` keeps its * boolean 5.0 meaning and is not deleted). */ export interface SurfaceProps extends ContractSurfaceProps { /** * Enhanced-tier edge refraction (bezel-band lens, D-05). Inert unless the provider mounted * `LensDefs` and the enhanced selector matches; ignored with a dev warning on non-chrome layers. * @preview Ships inert until L8 certification passes at RC-1; otherwise promoted in 5.1 (REQ-MAT-36). */ refraction?: boolean; as?: never; caustics?: never; chromatic?: never; lighting?: never; ior?: never; depth?: never; tint?: never; glowIntensity?: never; glowColor?: never; optimization?: never; hardwareAcceleration?: never; intensity?: never; blur?: never; parallax?: never; adaptive?: never; magnet?: never; cursorHighlight?: never; /** `tier` is deleted as a prop; the type name stays free for the Tier value. */ tier?: never; } //# sourceMappingURL=types.d.ts.map