import type { ImportDiagnostic } from '@flighthq/importdiagnostics/contract'; import type { DisplayObject } from '@flighthq/scene2d/contract'; import type { RiveArtboardGraph, RiveArtboardImportContext, RiveImportRegistry, RiveLayoutImport } from './contract.scene2d-formats-types.ts'; /** * Translates each independent Rive layout root into the flat descriptors consumed by * `@flighthq/layout`. * * Rive's own runtime deliberately has separate `applyContainerStyle` and `applyItemStyle` passes. * This importer keeps the same boundary: every LayoutComponent's own style becomes its * `containerStyle`, while its sizing fields become the `itemStyle` interpreted by the descriptor's * parent. LayoutParticipant is attached to its parent display node rather than emitted as a phantom * target. Natural sizes remain absent by design; `RiveLayoutImport.targets` tells the caller what to * measure for the intrinsic-size buffer. */ export declare function createRiveLayoutImports(artboard: Readonly, nodes: ReadonlyArray, diagnostics?: ImportDiagnostic[]): RiveLayoutImport[]; /** * A `LayoutComponent` is a container that arranges its children; the arrangement itself is described * by the style objects hanging off it, and resolved once the whole artboard exists. */ export declare function importRiveLayoutComponent(context: RiveArtboardImportContext, index: number): DisplayObject | null; /** * Registers authored layout: the `LayoutComponent` container, the sizing styles that describe it, and * the grid tracks and placements a grid layout is built from. * * The descriptors are produced rather than applied — the caller measures each target's natural size * and owns the resolved rectangles — so this pass only builds the trees and the node lists paired * with them. Without it a layout component still imports as a container holding its children, at the * size and position they were authored at. */ export declare function registerRiveLayoutHandlers(registry: RiveImportRegistry): void; //# sourceMappingURL=riveLayout.d.ts.map