import type { AnimationClip, AnimationTrack } from '@flighthq/animation/contract'; import type { EntityConstruction } from '@flighthq/entity/contract'; import type { ImportDiagnostic } from '@flighthq/importdiagnostics/contract'; import type { DisplayObject, Node2D } from '@flighthq/scene2d/contract'; import type { LottieAdvancedBlend, LottieAnimatable, LottieDocument, LottieDocumentImportOptions, LottieDocumentImportResult, LottieImportContext, LottieKeyframe, LottieLayer, LottieMask, LottieRegistry, LottieTransform } from './contract.scene2d-formats-types.ts'; /** * The document core: JSON validation, import context, the ordered layer walk, and the animation plumbing every * feature shares. * * ★ WHAT IS NOT HERE IS THE POINT. Six layer interpretations and nine shape-item interpretations used to live in this * file; each now lives in the module that owns it, and this one keeps only what more than one of them needs — the * transform reader, the keyframe/track machinery, the numeric and colour conversions, and the diagnostic reports. * `createScene2DFromLottieDocumentWithRegistry` takes its handlers as an argument and names no default, so nothing * here reaches a preset. */ export declare function appendLottieLayers(root: DisplayObject, layers: readonly Readonly[], context: LottieImportContext): void; export declare function applyAnimationClipToLottieDocument(clip: Readonly, time: number): void; /** * Dispatches a layer's masks to the registered mask family. * * ★ THE CORE PICKS THE KEY AND NOTHING ELSE. Disabled masks are dropped here because `mode: 'n'` is the format saying * "not a mask", so it cannot be the dispatch key; everything else — which compositions can be carried, what happens to * an inverted one — belongs to the handler. An unregistered mode is silently unmasked, exactly as an uncarried * composition was before masks became a family, so no document gains or loses a diagnostic. */ export declare function applyLottieMaskFamily(target: Node2D, masks: readonly Readonly[], context: LottieImportContext): void; export declare function applyLottieTransform(target: Node2D, transform: Readonly | undefined, context: LottieImportContext, includeOpacity?: boolean, autoOrient?: boolean): void; export declare function bindMutableLottieNumericProperty(property: Readonly>, current: number[], convert: (value: number, component: number) => number, onChange: () => void, context: LottieImportContext): void; export declare function createLottieTrack(keyframes: readonly Readonly>[], components: number, context: LottieImportContext, valueOf: (value: T | undefined, keyframe: number) => number[], easingComponent: number, spatialTangents?: boolean, tangentOf?: (value: number, component: number) => number): AnimationTrack; /** * The Lottie import, over a handler registry it is GIVEN rather than one it resolves. * * ★ THIS MODULE MUST NOT KNOW THE DEFAULT FAMILY. `createScene2DFromLottieDocument` in `lottieImport.ts` owns that * edge, which is what keeps this module free of the fifteen feature modules and of the path, text and image code * behind them. A `?? _defaultLayerHandlers()` here would name every handler from the orchestrator, and a caller * asking for null and solid layers alone would link all of it anyway — the property the registry exists to provide. * * Everything else is unchanged: JSON validation and its reject diagnostic, the context, the layer walk, the marker * events, and the clip the result carries. */ /** * Imports a Bodymovin/Lottie document into a display subtree and target-bound AnimationClip. * Playback remains explicit: call applyAnimationClipToLottieDocument with the returned clip. */ export declare function createScene2DFromLottieDocumentWithRegistry(source: string | Readonly, registry: Readonly, diagnostics?: ImportDiagnostic[], options?: Readonly): LottieDocumentImportResult; export declare function hasComponentSpecificLottieEasing(keyframes: readonly Readonly>[], components: number): boolean; export declare function initializeLottieDocumentImportResult(out: EntityConstruction, root: DisplayObject, advancedBlends: LottieAdvancedBlend[], clip: AnimationClip, duration: number, frameRate: number): void; export declare function initialLottieValue(property: Readonly> | undefined): T | undefined; /** * Whether a property carries keyframes, decided by its **structure** rather than its `a` flag. * * Real Bodymovin exports routinely omit `a` on animated properties — across a corpus of eighteen, * 2,714 keyframed properties state no flag against 730 that do. Trusting the flag reads those as * static and hands the caller the raw keyframe array as if it were a value, which yields nonsense * for a number and no `v` at all for a shape path. * * The structure is unambiguous: a keyframe list holds objects that state a frame `t`, where a static * value is a number, an array of numbers, or a bare path object. */ export declare function isAnimatedLottieProperty(property: Readonly>): property is Readonly<{ a: 1; k: LottieKeyframe[]; x?: string; }>; export declare function lottieClamp(value: number, minimum: number, maximum: number): number; export declare function lottieDegreesToRadians(value: number): number; export declare function lottieNumericValue(value: unknown, components: number): number[]; export declare function lottieRgba(color: readonly number[]): number; export declare function reportLottieDrop(context: Readonly, kind: string, origin: string, detail?: Record): void; export declare function reportLottieExpression(value: unknown, context: LottieImportContext): void; export declare function reportLottieSkip(context: Readonly, kind: string, origin: string, detail?: Record): void; //# sourceMappingURL=lottieDocument.d.ts.map