/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import { type Scale, type ScaleBucket, type TimeResolution, type TimeWords } from "./scale.js"; import { type RulerScale } from "./use-ruler-fit.js"; type Styles = Record>; /** Group the visible scale into calendar periods without widening its domain. * Edge periods clip to the same window as the body; a truncated scale stops * at the last drawn bucket. Year ticks group into decades. */ export declare function timeRulerUnits(scale: Scale, words?: TimeWords, unit?: TimeResolution): RulerScale | undefined; /** * Where a scrolling timeline's view starts, as a store its sticky bands read (#1398, CL9): the instant at the start of * what its view shows, as an epoch — `undefined` before the timeline has laid out — published as it scrolls. */ export interface ViewStart { readonly get: () => number | undefined; /** Hears each move. */ readonly subscribe: (cb: () => void) => () => void; } /** A {@link ViewStart} its timeline publishes to. */ export interface ViewStartStore extends ViewStart { /** Publish where the view starts now: its readers hear only as that moves. */ readonly set: (at: number) => void; } /** * A store of where a timeline's view starts. * * @returns The store, before the timeline has laid out */ export declare function createViewStart(): ViewStartStore; /** A ruler band's props. */ interface TimeRulerRowProps { scale: RulerScale; styles: Styles; band: "units" | "ticks"; owner: "plan" | "plan-narrow" | "calendar" | "allocation"; /** * A scrolling timeline's band (#1398, CL9): where its view starts. The caption of the period it starts in sticks * inside its column beside the timeline's sticky column — that caption and its neighbours alone (`data-sticks`), its * host's recipe making them sticky; every other caption stands where its column starts, as one that cannot stick * stands. A sticky caption is a layer of the compositor's own: a band of them, one a period, was most of what a frame * of a timeline's scroll spent compositing. */ sticky?: ViewStart | undefined; highlight?: number | undefined; /** Buckets the host marks (`data-marked`): the Allocation's focus's hold. */ marked?: ((bucket: ScaleBucket) => boolean) | undefined; } /** A ruler band. Plan fits complete labels before paint; scrolling timelines * keep the caption of the period their view starts in sticky inside its own column instead. */ declare function TimeRulerRowOf({ scale, styles, band, owner, sticky, highlight, marked }: TimeRulerRowProps): import("react/jsx-runtime").JSX.Element; /** A ruler band (see {@link TimeRulerRowProps}): drawn again only as its props, or the period its view starts in, move. */ export declare const TimeRulerRow: typeof TimeRulerRowOf; export {}; //# sourceMappingURL=ruler.d.ts.map