/** * A place where the sky's names must not go, as the property `keepClear` of `` and `` takes it: a rectangle in the element's own CSS pixels from its top left, or an element of the page whose box is read (on a resize, not every frame). * * @example * ```ts * import type { SkyKeepClear } from "@johnmorrisdotca/chikyu-earth/realistic"; * * const areas: SkyKeepClear[] = [{ x: 24, y: 40, width: 480, height: 220 }]; * console.log(areas.length); * ``` */ export type SkyKeepClear = { x: number; y: number; width: number; height: number; } | { getBoundingClientRect(): { left: number; top: number; right: number; bottom: number; }; }; /** A keep-clear area as the layer holds it: its edges, from the picture's top left, in CSS pixels. */ export interface KeepBox { l: number; t: number; r: number; b: number; } /** * The edges of a keep-clear area, from the picture's top left. * * @param area - A rectangle in the picture's own pixels, or an element of the page. * @param own - The picture's box on the page (`getBoundingClientRect`), to read an element's box against. * @param into - The box to write, or one is made. * @returns The box. */ export declare function keepBox(area: SkyKeepClear, own: { left: number; top: number; }, into?: KeepBox): KeepBox; /** * Whether a box touches any of the keep-clear areas. * * @param areas - The areas, from `keepBox`. * @param left - The box's left. * @param top - The top. * @param right - The right. * @param bottom - The bottom. * @returns True where the box and an area overlap. */ export declare function touchesKeep(areas: readonly KeepBox[], left: number, top: number, right: number, bottom: number): boolean; /** * Whether a point is inside any of the keep-clear areas. * * @param areas - The areas, from `keepBox`. * @param x - The point's x. * @param y - The point's y. * @returns True where the point is in an area. */ export declare function inKeep(areas: readonly KeepBox[], x: number, y: number): boolean;