import type { ImportDiagnostic } from '@flighthq/importdiagnostics/contract'; import type { DisplayObject, Node2D } from '@flighthq/scene2d/contract'; import type { RiveArtboardGraph, RiveImportRegistry } from './contract.scene2d-formats-types.ts'; /** * Applies the artboard's draw rules, which override hierarchy order for the nodes they govern. * * A `DrawRules` is parented to the node it governs and names a `DrawTarget`, which in turn names the * drawable to sit beside and whether to land before or after it. That is exactly the shape of * `setNodeOrderListEntryBelow` / `Above`, so a rule needs no interpretation beyond resolving its two * ids. * * Ordering is a permutation **within one parent**, so a rule whose governed node and target drawable * are not siblings cannot be honored without reparenting — which would move the node out of the group * whose alpha, blend, and clip it composites under. Those are reported as fidelity loss rather than * approximated, and they are the minority: across the 41-file reference corpus, of 61 rules 33 are * honored, 13 cross a parent boundary, and 15 name an end that is not a display node. Sibling-ness is * a fact about the *display* tree, not the component tree — the two disagree, because a component * whose parent is not itself a display node reparents up to the nearest one. */ export declare function applyRiveDrawOrder(nodes: readonly (Node2D | null)[], artboard: Readonly, root: DisplayObject, diagnostics?: ImportDiagnostic[]): void; /** * Registers draw rules: a `DrawRules` on a node, and the `DrawTarget` it names. * * Both are data hanging off the nodes they reorder, and the reordering itself is a pass — a rule can * name a drawable that has not been read yet, and reordering siblings means the siblings must all * exist. Without this a file's authored paint order is silently replaced by hierarchy order. */ export declare function registerRiveDrawOrderHandlers(registry: RiveImportRegistry): void; //# sourceMappingURL=riveDrawOrder.d.ts.map