UNPKG

ranui

Version:

A framework-agnostic Web Components UI library built on native custom elements, with TypeScript types, light/dark theming, SSR and PWA support.

16 lines (15 loc) 721 B
export interface RimRenderer { /** Corner radius, in CSS px, matching the `radius` attribute. */ setRadius(radius: number): void; /** Tears down whichever backend is active and removes its canvas(es). */ destroy(): void; } /** * Mounts the rim canvas(es) into `container` (the `.ran-glass-specular` div) * and keeps them sized to it via `ResizeObserver`. Always returns a working * renderer object — even when neither backend is available the returned * object is just inert (its canvas stays blank, so the plain CSS specular * gradient remains the only highlight; there's nothing for the caller to * branch on). */ export declare function createRimRenderer(container: HTMLElement): RimRenderer;