/** * Ambient types for the import queries provided by the Lit Vite plugin. * * Reference via tsconfig (`"types": ["@oddsquad/vite-plugin-lit/client"]`) or * `/// `. */ declare module '*.css?hmr-url' { const href: string; export default href; } declare module '*.css?css-sheet' { const sheet: CSSStyleSheet; export default sheet; } declare module 'virtual:lit-plugin/timeline' { export interface TimelineLayer { id: string; label: string; /** 0xRRGGBB */ color: number; } export interface TimelineEvent { layerId: string; /** Milliseconds since the current recording started. */ time: number; data: TData; title?: string; subtitle?: string; /** Pairs a start event with its matching end event in the same update group. */ groupId?: number | string; logType?: 'default' | 'warning' | 'error'; /** Set by the plugin's built-in capture layers; not needed for custom events. */ meta?: { elementId?: number; tagName?: string; source?: {file: string; line: number}; }; } /** * What `addTimelineEvent` takes: a `TimelineEvent` whose `time` is a * `performance.now()` value, or absent to stamp the event as it is added. * The runtime moves it onto the recording's clock. */ export type TimelineEventInput = Omit< TimelineEvent, 'time' > & { time?: number; }; /** * Emit a custom timeline event from app code. No-ops in production or * when the `timeline` option is disabled. */ export function addTimelineEvent(event: TimelineEventInput): void; /** * Register a custom timeline layer and announce it to the panel. * Idempotent — duplicate ids are ignored. */ export function addTimelineLayer(layer: TimelineLayer): void; }