import type { EntityConstruction, NonEntityCreateResult } from '@flighthq/entity/contract'; import type { ImportDiagnostic } from '@flighthq/importdiagnostics/contract'; import type { DisplayObject } from '@flighthq/scene2d/contract'; import type { RiveArtboardGraph, RiveArtboardImportContext, RiveCoreObject, RiveCoreObjectHandler, RiveDocumentImportContext, RiveImportRegistry } from './contract.scene2d-formats-types.ts'; /** * Runs every registered artboard pass, once each, in registration order. * * A family may register one importer object under several type keys — a paint family covers fills, * strokes, gradients and their stops with the same handler — so passes are run per distinct importer * rather than per key, and registering a wider family never runs its pass twice. */ export declare function applyRiveArtboardHandlers(context: RiveArtboardImportContext): void; /** Runs every registered document pass, once each, in registration order. */ export declare function applyRiveDocumentHandlers(context: RiveDocumentImportContext): void; export declare function createRiveArtboardImportContext(registry: RiveImportRegistry, artboard: RiveArtboardGraph, objects: readonly Readonly[], root: DisplayObject, fontNames: readonly string[], diagnostics?: ImportDiagnostic[]): RiveArtboardImportContext; export declare function createRiveDocumentImportContext(registry: RiveImportRegistry, objects: readonly Readonly[], diagnostics?: ImportDiagnostic[]): RiveDocumentImportContext; export declare function createRiveImportRegistry(): NonEntityCreateResult; /** * The importer for `typeKey`, or for the nearest type it inherits from, or `null` when the file's * type is one this registry does not understand. * * Resolving up the chain is the whole point of keying by type: a `Star` is a `Polygon` is a * `ParametricPath` is a `Path`, so one registration for `Path` imports every parametric shape the * editor can author, including ones added after this code was written. The nearest registration wins, * which is what lets a narrower family — `Text` among drawables — override a wider one. */ export declare function getRiveCoreObjectHandler(registry: Readonly, typeKey: number): RiveCoreObjectHandler | null; /** * The importer for a core type that is read by the object above it and becomes no display object of * its own — a fill, a gradient stop, a clipping shape, a bone, a draw rule. * * Registering one of these is not a no-op even though it contributes nothing: an object with no * importer at all is reported as a type this import does not read, and these are read. */ export declare function importRiveCoreObjectAsData(): null; export declare function initializeRiveArtboardImportContext(out: EntityConstruction, registry: RiveImportRegistry, artboard: RiveArtboardGraph, objects: readonly Readonly[], root: DisplayObject, fontNames: readonly string[], diagnostics?: ImportDiagnostic[]): void; export declare function initializeRiveDocumentImportContext(out: EntityConstruction, registry: RiveImportRegistry, objects: readonly Readonly[], diagnostics?: ImportDiagnostic[]): void; /** * Installs one importer for a core type and every type derived from it. * * Last registration for a key wins, and a key registered again keeps its original position in the * pass order, so replacing one family's handler does not reshuffle the sequence around it. A caller * adding support for a type Flight does not read registers it here rather than editing this package. */ export declare function registerRiveCoreObjectHandler(registry: RiveImportRegistry, typeKey: number, importer: RiveCoreObjectHandler): void; //# sourceMappingURL=riveImportRegistry.d.ts.map