import { type SignalScope } from './runtime.js'; import { type PathTable, type SparseMask } from './mask.js'; import type { BindingSpec } from './build-context.js'; /** Build a scope from collected specs and publish it to its build host (so * structural primitives created in that build can register child scopes). */ export declare function buildAndPublishScope(built: { specs: BindingSpec[]; host: { scope: SignalScope | null; }; }): SignalScope; /** A reusable scope shape: the `PathTable` + per-binding masks for one binding * structure. `each` rows from a {@link RowFactory} share the template, so their * specs carry identical `deps` (hence identical, immutable table + masks) — built * ONCE from the first row and reused, skipping per-row `buildPathTable`/`bindingMask`. */ export interface ScopeShape { table: PathTable; masks: readonly SparseMask[]; } /** Build a scope from specs. With `pre` (a cached {@link ScopeShape} from an * earlier row of the same template), the per-row `buildPathTable` + `bindingMask` * work is skipped — only the row's own produce/commit closures bind to the shared * masks. Returns the scope plus its shape (to seed the cache). */ export declare function scopeFromSpecs(specs: readonly BindingSpec[], pre?: ScopeShape): { scope: SignalScope; shape: ScopeShape; }; /** Build a chunked-mask reconciler scope over a set of collected bindings. */ export declare function buildScope(specs: readonly BindingSpec[]): SignalScope; /** Do these specs have the SAME dep structure (count + per-binding dep paths, in * order) as a cached signature? When true, a previously-built {@link ScopeShape} * (PathTable + masks, derived purely from deps) applies unchanged — so an authoring * `each` row can reuse it instead of rebuilding. A cheap array compare (no string * alloc) that returns false for data-conditional rows, which then build fresh. */ export declare function depsSignatureMatches(specs: readonly BindingSpec[], cached: ReadonlyArray): boolean; //# sourceMappingURL=scope-build.d.ts.map