import { C as CompositionVariable, T as TimelineElement, a as CanvasResolution, K as Keyframe, S as StageZoomKeyframe, V as ValidationResult } from './types-ewozML_N.js'; export { A as AddElementData, b as Asset, B as BooleanVariable, c as CANVAS_DIMENSIONS, d as COMPOSITION_VARIABLE_TYPES, e as ColorVariable, f as CompositionAPI, g as CompositionAsset, h as CompositionSpec, i as CompositionVariableBase, j as CompositionVariableType, D as DEFAULT_DURATIONS, E as ElementKeyframes, k as EnumVariable, F as FontVariable, I as ImageVariable, l as KeyframeProperties, M as MediaElementType, m as MediaFile, N as NumberVariable, P as PlayerAPI, R as ResolvedResolutionFlag, n as StageZoom, o as StringVariable, p as TIMELINE_COLORS, q as TimelineCompositionElement, r as TimelineElementBase, s as TimelineElementType, t as TimelineMediaElement, u as TimelineTextElement, v as VALID_CANVAS_RESOLUTIONS, W as WaveformData, w as getDefaultStageZoom, x as isAspectAgnosticResolutionAlias, y as isCompositionElement, z as isMediaElement, G as isTextElement, H as normalizeResolutionFlag, J as resolveResolutionFlagPair } from './types-ewozML_N.js'; export { A as ArcPathConfig, a as ArcPathSegment, G as GsapAnimation, b as GsapKeyframesData, c as GsapMethod, d as GsapPercentageKeyframe, e as GsapProvenance, f as GsapProvenanceKind, K as KeyframeEditability, P as ParsedGsap, S as SourcedGsapPercentageKeyframe, g as SplitAnimationsOptions, h as SplitAnimationsResult, i as editabilityForProvenance, j as getAnimationsForElementId, k as gsapAnimationsToKeyframes, l as keyframesToGsapAnimations, s as serializeGsapAnimations, v as validateCompositionGsap } from './gsapSerialize-DQW1kZ2G.js'; export { isStudioHoldSet } from './gsapParser.js'; export { PROPERTY_GROUPS, PropertyGroupName, SUPPORTED_EASES, SUPPORTED_PROPS, classifyPropertyGroup, classifyTweenPropertyGroup } from './gsapConstants.js'; export { SPRING_PRESETS, SpringPreset, generateSpringEaseData } from './springEase.js'; export { parseGsapScriptAcorn as parseGsapScript } from './gsapParserAcorn.js'; export { EXCLUDED_TAGS, ensureHfIds, isCompositionTemplate, mintHfId, walkCompositionDescendants } from './hfIds.js'; export { ParsableDocumentLike, SubCompositionValidity, SubCompositionValidityReason, checkSubCompositionUsability } from './subCompositionValidity.js'; export { CANONICAL_AUTHORED_TIMING_ATTRIBUTES, COMPOSITION_ATTRIBUTES, COMPOSITION_CONTRACT_VERSION, ClipAttributeReader, ClipAttributeWriter, ClipTiming, ClipTimingDiagnostic, ClipTimingDiagnosticCode, ClipTimingUpdate, ClipTimingWriteError, DERIVED_TIMING_ATTRIBUTES, LEGACY_TIMING_ATTRIBUTES, ReadClipTimingOptions, ReferenceExpression, parseNumeric, parseStartExpression, readClipTiming, writeClipTiming } from './compositionContract.js'; export { CANONICAL_FONT_DISPLAY_NAMES, FONT_ALIAS_KEYS, FONT_ALIAS_MAP, VariableUsageScan, decodeUrlPathVariants, parseCompositionVariables, resolveAliasDisplayName, scanVariableUsage } from './composition.js'; /** * Thrown by htmlParser functions when the input HTML is empty or does not * parse to a document with a `documentElement` — the condition that, * unguarded, previously surfaced as a raw * `Cannot read properties of null (reading '...')` / * `Cannot destructure property 'firstElementChild' of 'documentElement' as * it is null` crash deep inside the DOM implementation instead of a clear, * catchable error naming which function received bad input. */ declare class CompositionHtmlParseError extends Error { constructor(message: string); } interface ParsedHtml { elements: TimelineElement[]; gsapScript: string | null; styles: string | null; resolution: CanvasResolution; keyframes: Record; stageZoomKeyframes: StageZoomKeyframe[]; } declare function parseHtml(html: string): ParsedHtml; declare function updateElementInHtml(html: string, elementId: string, updates: Partial): string; declare function addElementToHtml(html: string, element: Omit & { id?: string; }): { html: string; id: string; }; declare function removeElementFromHtml(html: string, elementId: string): string; interface CompositionMetadata { compositionId: string | null; compositionDuration: number | null; variables: CompositionVariable[]; } declare function extractCompositionMetadata(html: string): CompositionMetadata; declare function validateCompositionHtml(html: string): ValidationResult; /** * Shared "is this `outputResolution` preset compatible with the composition?" * check. * * The `--resolution` render flag (a `CanvasResolution` preset) is chosen * independently of the composition it renders, so a portrait composition * (1080×1920) rendered with `--resolution landscape` (1920×1080) is a common * mistake — especially from AI agents that pick a preset by habit rather than * by inspecting the composition. Historically this surfaced as a cryptic * `Error` thrown deep inside the render compiler (`resolveDeviceScaleFactor` * in `@hyperframes/producer`), after the browser and ffmpeg had already spun * up, with a message that named the mismatch but not the fix. * * This module gives every consumer (the render pre-flight in the CLI, the * producer's `resolveDeviceScaleFactor`, and any future lint rule) a single, * dependency-free definition of "is this preset usable for this composition" * — including a suggested preset when there's an unambiguously-correct swap — * so the same check can run *before* a render is attempted (loud, actionable, * cheap) and again as defense-in-depth inside the pipeline. * * It lives in `@hyperframes/parsers` (rather than `@hyperframes/core`) because * both `core`/`producer` and `lint` may need it, and `lint` cannot depend on * `core`. The geometry it needs (`CANVAS_DIMENSIONS`) already lives here. */ type OutputResolutionIssueKind = "hdr-incompatible" | "alpha-incompatible" | "aspect-mismatch" | "downsampling" | "non-integer-scale"; interface OutputResolutionCompatibility { ok: boolean; /** Present when `ok` is false. */ kind?: OutputResolutionIssueKind; /** Human-readable, actionable message suitable for direct display. */ message?: string; /** * A preset whose orientation/aspect ratio matches the composition, when one * exists and is an unambiguous swap for the user's intent. Present only for * `aspect-mismatch`. Consumers may surface this as a suggestion ("did you * mean `--resolution portrait`?"); it is intentionally *not* auto-applied — * silently swapping a user-supplied flag changes their stated intent. */ suggestedResolution?: CanvasResolution; } /** * Find the preset that shares the composition's aspect ratio and resolution * tier (HD vs 4K) as the user's chosen preset. E.g. a portrait composition * with `--resolution landscape-4k` suggests `portrait-4k`, not `portrait`, * preserving the user's intent to render at 4K while fixing the orientation. * * Returns `undefined` when no preset matches the composition's aspect ratio * (e.g. a custom, non-preset composition aspect ratio) — in that case there * is no unambiguous swap to suggest. * * Exported so that consumers with permission to auto-apply the swap (see the * `--resolution 1080p` aspect-agnostic path in the CLI/producer) can share the * same sibling-lookup logic as this module's user-facing "did you mean?" hint, * without duplicating the tier-preserving fallback rules. */ declare function suggestMatchingPreset(compositionWidth: number, compositionHeight: number, chosen: CanvasResolution): CanvasResolution | undefined; /** * Check whether rendering a composition of the given dimensions with the given * `outputResolution` preset (and alpha/HDR modes) is supported. * * Pure and dependency-free — the single source of truth for the constraints * `resolveDeviceScaleFactor` enforces, so the CLI can run the exact same check * as a pre-flight before any browser/ffmpeg work. * * @param outputResolution The chosen preset, or `undefined` when the render * uses the composition's native dimensions (always compatible). */ declare function checkOutputResolutionCompatibility(input: { compositionWidth: number; compositionHeight: number; outputResolution: CanvasResolution | undefined; alphaRequested?: boolean; hdrRequested?: boolean; }): OutputResolutionCompatibility; /** * Rewrite `script` so top-level helper calls / loops that build the timeline * become explicit literal tweens. Returns the original script unchanged when * there is nothing statically-resolvable to unroll. */ declare function unrollComputedTimeline(script: string): string; declare function queryByAttr(root: ParentNode, attr: string, value: string, tag?: string): Element | null; export { CanvasResolution, CompositionHtmlParseError, type CompositionMetadata, CompositionVariable, Keyframe, type OutputResolutionCompatibility, type OutputResolutionIssueKind, type ParsedHtml, StageZoomKeyframe, TimelineElement, ValidationResult, addElementToHtml, checkOutputResolutionCompatibility, extractCompositionMetadata, parseHtml, queryByAttr, removeElementFromHtml, suggestMatchingPreset, unrollComputedTimeline, updateElementInHtml, validateCompositionHtml };