import type { ComponentId } from '@ecsia/schema'; import type { Buffers } from '../memory/index.js'; import type { Signature } from '../storage/signature.js'; /** Main-thread / serial-phase gate. Workers establish membership from the archetype signature. */ export type PhaseGate = () => 'serial' | 'wave'; export declare class Bitmask { #private; constructor(buffers: Buffers, componentCount: number, maxEntities: number, phase: PhaseGate); get stride(): number; /** O(1) membership point test for a single entity index. */ bitmaskHas(index: number, c: ComponentId): boolean; /** Coherence with the table: set added bits, clear removed bits, after a serial migration. */ bitmaskApplyDelta(index: number, fromSig: Signature, toSig: Signature): void; /** Clear all of an entity's membership words on despawn. O(stride). */ bitmaskClear(index: number): void; /** Zero-copy view of one entity's fixed-stride shape words (for the single-entity matcher ). */ entityShapeWords(index: number): Uint32Array; /** * ROLLBACK-ONLY (@ecsia/rollback capture): copy the membership words of entity indices * [0, indexCount) into `out` and clone the out-of-stride overflow into `outSparse`. Returns the * number of words written. There is NO rebuild-from-archetypes path for either half, so both are * part of the image. */ captureInto(out: Uint32Array, indexCount: number, outSparse: Map>): number; /** * ROLLBACK-ONLY (@ecsia/rollback restore): write the captured words back over indices * [0, indexCount) and ZERO [indexCount, clearThroughIndex) — indices minted after the checkpoint * must lose their bits, or a recycled slot inherits membership it never had. */ restoreFrom(src: Uint32Array, indexCount: number, clearThroughIndex: number, sparse: ReadonlyMap>): void; /** Re-publish the region view after a fallback grow (the region length-tracks on the primary path). */ rebind(): void; } //# sourceMappingURL=bitmask.d.ts.map