import { V as Node, o as Group } from "./nodes.js"; //#region src/component.d.ts /** One prop in a component's public surface — a manifest type + optionality. */ interface ComponentPropSpec { /** the §2.2 value-type / shape id this prop accepts (e.g. 'number', 'color', 'string', 'Node[]'). */ type: string; /** true when the factory REQUIRES it (default false). */ required?: boolean; } /** The props every component instance carries in addition to its own — a stable * id (REQUIRED, the collision-safety anchor) plus the base Group passthrough. */ interface ComponentBaseProps { /** Stable id — REQUIRED; every internal node is namespaced under it. */ id: string; } /** What an instance returns: the subtree + its id + the child-id helpers. */ interface ComponentInstance { /** the built subtree (a Group whose id === the instance id). */ readonly node: Group; /** the instance id (its own namespace root). */ readonly id: string; /** namespace a child id: `childId('bar')` → `'/bar'`; no arg → the root id. */ childId(sub?: string): string; /** ready-to-bind track targets for a child's prop: `['//']`. */ targets(child: string, prop: string): string[]; } interface ComponentDef

= Record> { /** the component's type name — surfaced in describe().components, must be unique. */ name: string; /** the public prop surface (names → type/optionality) for describe(). */ props: { readonly [prop: string]: ComponentPropSpec; }; /** * PURE build: given the instance props (incl. the required `id`) and a * child-id namer, return the subtree. Runs ONCE at construction; must not * read the playhead or any cross-frame state (bind children with tracks/ * PropInit closures like any node). */ build(props: P & ComponentBaseProps, childId: (sub?: string) => string): Group; } declare class ComponentError extends Error { constructor(message: string); } /** Join an instance id + a child sub-id into a namespaced target root. */ declare function childId(id: string, sub?: string): string; interface RegisteredComponent { readonly name: string; readonly props: { readonly [prop: string]: ComponentPropSpec; }; } /** Every component defined so far, in definition order — the seam describe() * reads to list `components` from the LIVE registry (can't drift). Pure read. */ declare function listComponents(): RegisteredComponent[]; /** * Define a reusable component. Returns a factory `(props) → ComponentInstance`. * Registers the component's name + prop surface so `describe().components` lists * it. A duplicate name throws (a component library can't silently shadow). */ declare function defineComponent

= Record>(def: ComponentDef

): (props: P & ComponentBaseProps) => ComponentInstance; /** re-export Node/Group types consumers of this entry name for their `build`. */ //#endregion export { ComponentBaseProps, ComponentDef, ComponentError, ComponentInstance, ComponentPropSpec, Group, type Node, RegisteredComponent, childId, defineComponent, listComponents };