import type { SatelliteRef } from "../satellites/types.ts"; import { type SatelliteState } from "./satellite-layer.ts"; /** The faint orbit is on unless `hover-path` is `off`. Left unset, it follows `names-on-hover` (itself on unless `off`). */ export declare const hoverPathOn: (path: string | null, names: string | null) => boolean; /** A name is shown when the pointer rests on a satellite, unless `names-on-hover` is `off`. */ export declare const namesOnHover: (value: string | null) => boolean; export interface HoverPlace { x: number; y: number; visible: boolean; } /** What the element hands the hover: the satellite state, how to find a satellite, and where to put its name. */ export interface SatelliteHoverHost { element: HTMLElement; state: SatelliteState; pick(x: number, y: number): SatelliteRef | null; place(ref: SatelliteRef): HoverPlace | null; name(ref: SatelliteRef): string | undefined; selected(): SatelliteRef | null; request(): void; labelParent(): HTMLElement | null; pathOn(): boolean; namesOn(): boolean; style(): { color: string; opacity: number; }; } export interface SatelliteHover { /** Read the attributes again (they changed, or the element just connected). */ sync(): void; /** Move the name to where the last draw put the satellite. Does not ask for a draw. */ follow(place: HoverPlace | null): void; stop(): void; } /** * Show a satellite's name, and ask for its faint orbit, while a mouse rests on it. One at a time. Leaving fades both; reduced motion takes them away at once. * Nothing is asked of the picture while the pointer is still. */ export declare function bindSatelliteHover(host: SatelliteHoverHost): SatelliteHover; /** A blank custom property is the default. `Number("")` is 0, which would hide the orbit. */ export declare const hoverOpacityOf: (text: string) => number; /** Colour and opacity from the element's own custom properties, or the faint orbit's own. */ export declare function hoverStyleOf(element: HTMLElement): { color: string; opacity: number; };