import { o as Group } from "./nodes.js"; //#region src/gauge.d.ts declare class GaugeError extends Error { constructor(message: string); } /** One categorical zone: an angular `extent` (degrees), a color, an optional label. */ interface GaugeZone { /** `[start, end]` in degrees (0 = up, + = clockwise). start < end. */ readonly extent: readonly [number, number]; /** the zone arc's stroke color. */ readonly color: string; /** optional label drawn at the zone's mid-angle (its own addressable node). */ readonly label?: string; /** * per-label style override (family / size / fill / weight) — layered OVER the * computed default (uniform size/fill + the apex size-up). Lets a consumer keep * a per-episode text override AND restyle any single `label-{i}`. */ readonly labelStyle?: { readonly family?: string; readonly size?: number; readonly fill?: string; readonly weight?: number; }; } interface GaugeSpec { /** stable id — every child is namespaced under it. */ id: string; /** arc radius (px), measured to the centerline of the zone band. */ radius: number; /** the categorical zones, in angular order. At least one. */ zones: readonly GaugeZone[]; /** zone-arc stroke width (px). Default `radius * 0.14`. */ thickness?: number; /** degrees trimmed off EACH side of every zone boundary (a visual gap). Default 0. */ gap?: number; /** draw a needle (default true). Object form overrides its geometry. */ needle?: boolean | { length?: number; width?: number; color?: string; }; /** authored initial needle angle (deg, 0 = up). Ignored when `value` is set. */ needleAngle?: number; /** * Meter mode: a value (or `() => value` signal) mapped through `domain` across * the gauge's total sweep → the needle angle. A function binds live (the needle * follows the signal); a number sets the initial angle. Omit for authored mode. */ value?: number | (() => number); /** value domain for Meter mode (default `[0, 1]`). */ domain?: readonly [number, number]; /** total angular sweep `[start, end]` the value maps across. Default = zone union. */ sweep?: readonly [number, number]; /** draw boundary ticks at each distinct zone edge (default true). */ ticks?: boolean; /** label font size (px). Default `radius * 0.13`. The mid zone's label is a size up. */ labelSize?: number; /** label color. Default `#eaf1ff`. */ labelFill?: string; /** label font family. Default `sans-serif`. */ fontFamily?: string; /** * emphasize the apex zone's label (the one straddling straight-up): `true` * (default) = ×1.18 size + bold; `false` = no size-up (portrait-safe — the * narrower stage can't afford the bump); a number = a custom size scale + bold. * Gauge is a build-time factory and can't see the stage aspect, so gate this on * your own `isPortrait(size)`. */ apexEmphasis?: boolean | number; /** * add a center glow Circle (`glow` sub-id, opacity 0 — author animates it). * By default it's a HARD-edged disc; pass `{ blur }` for a soft falloff (a * Gaussian blur filter, stdDeviation px) so it reads as a real center-glow. */ glow?: boolean | { color?: string; radius?: number; blur?: number; }; /** where to place the gauge center in the parent (default the parent origin). */ position?: readonly [number, number]; } interface GaugeResult { /** the built subtree (a Group whose id === the gauge id). */ readonly node: Group; readonly id: string; /** namespace a child id: `childId('needle')` → `'/needle'`; no arg → the root id. */ childId(sub?: string): string; /** ready-to-bind track targets: `targets('needle','rotation')` → `['/needle/rotation']`. */ targets(sub: string, prop: string): string[]; } /** * Build a radial arc gauge. Returns the subtree + the child-id/target helpers. * Pure: runs once at construction, emits ordinary nodes, nothing at play time. */ declare function Gauge(spec: GaugeSpec): GaugeResult; /** * `Meter()` — the Gauge value preset: a single value (or signal) mapped through a * domain to the needle across a colored track. Convenience over * `Gauge({ value, domain, zones })`; the same result shape + sub-ids. */ declare function Meter(spec: Omit & { value: number | (() => number); }): GaugeResult; //#endregion export { Gauge, GaugeError, GaugeResult, GaugeSpec, GaugeZone, Meter };