import type { SchemaNodeVisitor, SchemaWalkContext } from '#src/parser/walk-data-with-schema.js'; import type { DefinitionRefMeta } from './definition-ref-registry.js'; import type { ReferencePath } from './types.js'; export interface RefWalkContext extends SchemaWalkContext { /** Slot paths active at this node — maps slot symbol ID → path where that slot was registered. */ readonly activeSlotPaths: ReadonlyMap; } /** * A typed collector for the ref subsystem. */ export interface RefSchemaCollector { readonly kind: TKind; visit(meta: DefinitionRefMeta & { kind: TKind; }, data: unknown, ctx: RefWalkContext): void; } /** * Creates a typed `RefSchemaCollector` with the correct narrowed `meta` type * inferred from the `kind` field. */ export declare function createRefSchemaCollector(collector: RefSchemaCollector): RefSchemaCollector; /** * Creates a `SchemaNodeVisitor` for the ref subsystem. * * Uses the `visit()` + cleanup pattern: each call to `visit()` may return a * cleanup function that restores slot scope state after children are walked, * analogous to React's `useEffect` cleanup. * * When a `ref-context` annotation is encountered, the active slot map is * extended for all descendant nodes and restored on cleanup. */ export declare function createRefSchemaVisitor(collectors: readonly RefSchemaCollector[]): SchemaNodeVisitor; //# sourceMappingURL=ref-schema-visitor.d.ts.map