import type { ComponentDef, ComponentId, Schema } from '@ecsia/schema'; import type { ComponentRuntime } from './component/index.js'; export declare class ComponentRegistry { #private; constructor(..._legacy: readonly unknown[]); register(components: readonly ComponentDef[]): void; /** * Mint the next dense ComponentId WITHOUT binding a def (allocSyntheticComponentId). * Pair/presence/overflow ids draw from the SAME dense space as ordinary * components so storage, queries, and the bitmask treat them identically. Serial / main-thread. */ allocSyntheticId(): ComponentId; /** * Intern a synthetic ComponentDef (a relation presence/overflow def, or a per-pair def) at an id * already minted by `allocSyntheticId`, so `defOf`/`idOf` resolve it and storage can build its * ColumnSet. Serial / main-thread; relations is the only caller (the acyclic boundary holds — * the world exposes this through a seam, core never imports relations). */ registerSynthetic(def: ComponentDef, id: ComponentId): void; /** * Re-point an ALREADY-interned synthetic def at a different id. `registerSynthetic` is one-shot by * design (a def belongs to one world at one id); this is the rollback exception: a pair def is a * pure function of (relation, target), so relations keeps ONE canonical def per pair and re-binds * it when a rewound minting counter hands that pair a different id. Rebinding rather than minting * a fresh def is what keeps `idOf`'s map bounded by the world's pair space instead of by the * number of rollbacks. Both directions must move together — `idOf` is how storage resolves a * migration's target ids (Storage.#requireId). */ rebindSynthetic(def: ComponentDef, id: ComponentId): void; idOf(def: ComponentDef): ComponentId | undefined; /** How many defs `idOf` resolves — the census a rollback leak assertion watches. */ get registeredDefCount(): number; defOf(id: ComponentId): ComponentDef | undefined; /**: seeds the bitmask/sigWords fixed stride = ceil(nextComponentId/32) ( C4). */ get nextComponentId(): number; /** * ROLLBACK-ONLY rewind of the synthetic-id high-water mark. The counter is MONOTONIC during a * simulation; a rollback restore must wind it back to the checkpoint's value or the re-simulation * mints DIFFERENT pair ids for the same logical pairs, producing different archetype signatures. * Only ids above the restored mark are re-mintable, and those defs were dropped by the same * restore. */ set nextComponentId(next: number); } export type { ComponentRuntime }; //# sourceMappingURL=registry.d.ts.map