import type { AnimStyle } from './animation.js'; import { type MediaClip, type TextClipStyle, type TimelineAspectRatio, type TimelineClip, type TimelineProject, type TimelineTrack } from '../types/timeline.js'; /** Inline-style object with camelCase CSS property names — usable as a React * `style` prop, with `Object.assign(el.style, …)`, or via `toCssText`. */ export type CssProperties = Record; /** Project length in frames: the end of the last clip (0 when empty). */ export declare function projectDurationF(project: TimelineProject): number; /** Whether the clip is on screen/audible at `t` seconds: `[start, end)`. */ export declare function isClipActive(clip: TimelineClip, t: number, fps: number): boolean; /** Position inside the clip's SOURCE media (seconds) for timeline time `t`. */ export declare function clipSourceSec(clip: MediaClip, t: number, fps: number): number; /** All clips on visible tracks, bottom → top. Track array order is z-order * (index 0 = bottom); `zIndex` is that track index. Hidden tracks are skipped. */ export declare function layeredClips(project: TimelineProject): { clip: TimelineClip; zIndex: number; }[]; /** The clips visible at `t` seconds, bottom → top. */ export declare function visibleClipsAt(project: TimelineProject, t: number): { clip: TimelineClip; zIndex: number; }[]; /** Width / height, e.g. `'16:9'` → 1.777… */ export declare function aspectRatioValue(aspectRatio: TimelineAspectRatio): number; /** Largest stage that fits `containerWidth × containerHeight` at the aspect ratio. */ export declare function fitStage(aspectRatio: TimelineAspectRatio, containerWidth: number, containerHeight: number): { width: number; height: number; }; /** Output pixel size whose SHORT side is `shortSide` (16:9 → 1920×1080 by default). */ export declare function compositionSize(aspectRatio: TimelineAspectRatio, shortSide?: number): { width: number; height: number; }; /** Track audibility: any solo → only soloed tracks play; mute always silences * its own track, even when soloed. */ export declare function trackAudible(project: TimelineProject, track: TimelineTrack | undefined): boolean; /** Whether the clip should be heard at all (track mute/solo, detached audio, * zero volume). Timing is separate — see `isClipActive`. */ export declare function clipAudible(project: TimelineProject, clip: TimelineClip): boolean; /** Output gain in [0,1] at `t` seconds: clip volume × linear fade-in/out ramps * relative to the clip edges. Does not apply mute/solo — see `clipAudible`. */ export declare function clipGain(clip: MediaClip, t: number, fps: number): number; /** `#rrggbb` + opacity → `rgba(r, g, b, a)`. */ export declare function hexToRgba(hex: string, opacity: number): string; /** Full-bleed media layer (video/image): covers the stage, plus the clip's * enter/exit animation when `anim` is given. */ export declare function mediaClipCss(anim?: AnimStyle): CssProperties; /** * A text clip's box, positioned inside a stage of `stageHeight` px (the stage * itself must be `position: relative`). All sizes are % of stage height, so the * result scales to any output resolution. Pass the clip's `clipAnimStyle` as * `anim` to include its enter/exit animation. */ export declare function textClipCss(style: TextClipStyle, stageHeight: number, anim?: AnimStyle): CssProperties; /** Serialize a `CssProperties` object to an inline `style` string. */ export declare function toCssText(css: CssProperties): string;