//#region src/index.d.ts /** * Common options for clock components. */ interface CommonClockOptions { /** Hide the second hand */ hideSeconds?: boolean; /** Hide hour numbers */ hideNumbers?: boolean; /** Use Roman numerals instead of Arabic */ useRoman?: boolean; /** Show only cardinal hour numbers (3, 6, 9, 12) */ cardinalOnly?: boolean; /** Remove clock border */ noBorder?: boolean; /** Hide all ticks */ hideTicks?: boolean; /** Hide major ticks (hour marks) */ hideMajorTicks?: boolean; /** Hide minor ticks (minute marks) */ hideMinorTicks?: boolean; /** Enable dual-tone styling */ dualTone?: boolean; } /** * Options for the base clock component. */ interface BaseClockOptions extends CommonClockOptions { /** * Text rendered inside the clock face's info window, e.g. the date. * Omit or pass an empty string to hide the window. */ info?: string; /** Hour to display (0-23) */ hours: number; /** Minutes to display (0-59) */ minutes: number; /** Seconds to display (0-59) */ seconds?: number; /** Milliseconds for precise positioning */ milliseconds?: number; } /** * Options for the live clock component. */ interface LiveClockOptions extends CommonClockOptions { /** * How long the second hand takes to swing to each new mark, in * milliseconds. Defaults to 600. `0` snaps with no swing. Ignored in * sweep mode, which moves continuously. */ tickDuration?: number; /** Smooth second hand movement */ smoothSweep?: boolean; /** Timezone for the clock */ timezone?: string; /** Hide date display */ hideDate?: boolean; } /** * Live clock UI component that displays the current time and updates in real-time. */ declare class LiveClockUI { private clockWork; private options; private domClock; private frameId; /** * A continuously sweeping hand is exactly what prefers-reduced-motion asks * us not to do, so sweep mode falls back to ticking when the user opts out. * The query is resolved once — `matches` stays live on the returned object. */ private motionQuery; private prefersReducedMotion; /** Current hour */ hours: number; /** Current minute */ minutes: number; /** Current second */ seconds: number; /** Current millisecond */ milliseconds: number; /** Current date timestamp */ currentDate: number; /** * @param {HTMLElement | string} el - The element or selector to render the clock in * @param {LiveClockOptions} options - Configuration options for the clock */ constructor(el: HTMLElement | string, options: LiveClockOptions); private updateTime; private loop; /** * Start the live clock animation. */ start(): void; /** * Stop the live clock animation. */ stop(): void; /** * Change the timezone dynamically. * @param {string} timezone - The new timezone string */ setTimezone(timezone: string): void; /** * Destroy the clock and clean up resources. */ destroy(): void; } /** * Base clock UI component for displaying a static clock. */ declare class BaseClockUI { private options; private el; private width; private resizeObserver?; private handHour; private handMinute; private handSecond?; private info; private angles; private shadows; /** * @param {HTMLElement | string} el - The element or selector to render the clock in * @param {BaseClockOptions} options - Configuration options for the clock */ constructor(el: HTMLElement | string, options: BaseClockOptions); private init; private observeSize; private renderClock; private renderTicks; private renderNumbers; /** * Update the clock display with new options. * @param {Partial} [options] - Partial options to update */ update(options?: Partial): void; /** * Destroy the clock and clean up resources. */ destroy(): void; private applyStyles; } //#endregion export { BaseClockOptions, BaseClockUI, CommonClockOptions, LiveClockOptions, LiveClockUI };