/** * createGauge - the HEADLESS core behind . A gauge is a display control, * so this core is light: value in, computed arc/needle geometry out, plus a * `rootProps()` with `role="meter"` + `aria-valuenow/min/max`. The styled * (or your own SVG) reads the geometry and draws it. * * ```svelte * *
* * * *
* ``` */ export type GaugePoint = { x: number; y: number; }; /** Reactive inputs are passed as getters so the core tracks live prop changes. */ export type GaugeConfig = { value: () => number; min?: () => number; max?: () => number; /** Sweep angle in degrees (default 270, a classic dashboard gauge). */ sweep?: () => number; size?: () => number; thickness?: () => number; ariaLabel?: () => string | undefined; }; export declare function createGauge(config: GaugeConfig): { /** Value clamped into [min, max]. */ readonly clamped: number; readonly startAngle: number; readonly cx: number; readonly cy: number; readonly r: number; /** Needle tip point (for ``). */ readonly needleEnd: GaugePoint; frac: (v: number) => number; angleOf: (v: number) => number; polar: (angleDeg: number, radius: number) => GaugePoint; arcPath: (v0: number, v1: number, radius: number) => string; /** Spread onto the gauge root element. */ rootProps: () => { role: "meter"; 'aria-valuenow': number; 'aria-valuemin': number; 'aria-valuemax': number; 'aria-label': string; }; }; export type Gauge = ReturnType;