import type { ComponentId } from '@ecsia/schema'; /** Canonical, sorted, de-duplicated component ids. Owned (never aliased) per archetype. */ export type Signature = Uint32Array & { readonly __ecsiaSignature: unique symbol; }; /** O(n) equality of two sorted signatures. */ export declare function sigEquals(a: Signature, b: Signature): boolean; /** FNV-1a over the sorted ids → 32-bit hash for the archetype lookup map. */ export declare function sigHash(a: Signature): number; /** Sort + de-dup an arbitrary id multiset into the canonical form ( holds). */ export declare function canonicalize(ids: Iterable): Signature; /** The neighbor signature reached by adding `c` (sorted insert). Idempotent if `c` already present. */ export declare function sigWithAdded(sig: Signature, c: ComponentId): Signature; /** The neighbor signature reached by removing `c`. Returns `sig` unchanged if `c` is absent. */ export declare function sigWithRemoved(sig: Signature, c: ComponentId): Signature; /** Packed membership words for fast bitwise-AND query matching. */ export declare function buildSigWords(sig: Signature, stride: number): Uint32Array; /** Exact membership test against the sorted signature array, O(log |sig|). */ export declare function sigHas(sig: Signature, c: ComponentId | number): boolean; /** One AND-term against a packed signature word. */ export interface MatchTerm { readonly wordIndex: number; readonly mask: number; } /** Signature-AND helper the query module calls; exposed for testing. */ export declare function signatureMatches(sigWords: Uint32Array, withW: readonly MatchTerm[], notW: readonly MatchTerm[], orW: readonly MatchTerm[]): boolean; //# sourceMappingURL=signature.d.ts.map