import { type OperationIr } from "./ir/operations.js"; import { type Recipe } from "./schema/recipe.js"; import { compileComponentSectionRecipe } from "./compile/component-section.js"; import { compileComponentTemplateRecipe } from "./compile/component-template.js"; import { compileContentTemplateRecipe } from "./compile/content-template.js"; import { compileDesignParametersTemplateRecipe } from "./compile/design-parameters-template.js"; import { compilePartialDesignRecipe } from "./compile/partial-design.js"; import { compilePageDesignRecipe } from "./compile/page-design.js"; import { compilePageTemplateRecipe } from "./compile/page-template.js"; import { compilePageRecipe } from "./compile/page.js"; import { compilePlaceholderRecipe } from "./compile/placeholder.js"; import { compileContentItemRecipe } from "./compile/content-item.js"; import { compileSiteTemplateRecipe } from "./compile/site-template.js"; import { compileSiteRecipe } from "./compile/site.js"; import { compileDictionaryRecipe } from "./compile/dictionary.js"; import { compileEnumerationRecipe } from "./compile/enumeration.js"; import { compileWorkflowRecipe } from "./compile/workflow.js"; import { compileWebhookAuthorizationRecipe } from "./compile/webhook-authorization.js"; import { compileVariantRecipe } from "./compile/variant.js"; import { type CompileContext } from "./compile/shared.js"; export { compileComponentSectionRecipe, compileComponentTemplateRecipe, compileContentTemplateRecipe, compileDesignParametersTemplateRecipe, compilePartialDesignRecipe, compilePageDesignRecipe, compilePageTemplateRecipe, compilePageRecipe, compilePlaceholderRecipe, compileContentItemRecipe, compileSiteTemplateRecipe, compileSiteRecipe, compileDictionaryRecipe, compileEnumerationRecipe, compileWorkflowRecipe, compileWebhookAuthorizationRecipe, compileVariantRecipe, }; export type { CompileContext } from "./compile/shared.js"; export { AVAILABLE_RENDERINGS_AGGREGATE_HANDLE, COMPONENT_SECTION_OWNERSHIP_AGGREGATE_HANDLE, ENUMERATIONS_ROOT_AGGREGATE_HANDLE, PLACEHOLDER_SETTINGS_AGGREGATE_HANDLE, SHARED_DATA_FOLDER_INSERT_OPTIONS_AGGREGATE_HANDLE, SHARED_DATA_FOLDERS_AGGREGATE_HANDLE, SITE_DATA_ROOT_AGGREGATE_HANDLE, } from "./compile/aggregates.js"; /** * Stable handle for the synthetic IR `compileRecipeSet` emits to * materialise the combined `SetField(TemplatesMapping)` write on the * Page Designs root. Same `__…__` compiler-synthesized convention as the * aggregate handles in `./compile/aggregates`. * * The convention is load-bearing: author handles match * `[a-z][a-z0-9-]*@\d+` so leading underscores are unrepresentable in * author input — `__foo__` is reserved for the compiler, greps cleanly * in plan output, and gets explicit apply-rank slots below. */ export declare const TEMPLATES_MAPPING_AGGREGATE_HANDLE = "__templates-mapping__"; /** * Append every cross-recipe aggregate IR (other than the prepended * shared-data-folder templates) to `irs` in apply-order. * * Ordering is load-bearing: each aggregate's `ref-recipe-list` resolves * against the captured-itemId map seeded by the per-recipe IRs that ran * earlier in the push, so these come AFTER the per-recipe IRs. The * component-section ownership prune MUST be last — see the invariant * guard in `compileRecipeSet`. */ /** * The synthetic aggregate handle inventory, split by IR-list position. * Consumed by `recipe list --json` so a batch driver knows which handles * a `--handles`-scoped push drops and where to re-add them: * * - FRONT aggregates compile BEFORE the per-recipe IRs (they create * templates per-recipe items reference via `templateOf`) — a driver * carries them with its FIRST chunk. * - TAIL aggregates compile AFTER (their ref-lists reference per-recipe * items) — a driver pushes them once after every chunk has applied * (or uses `--aggregates-only`). * * Static inventory, not per-set: a builder may return null for a given * set, but pushing an absent handle is a logged no-op, so drivers can * pass the full list unconditionally. MUST stay in sync with * `compileRecipeSet` / `appendTrailingAggregates` below — the unit test * cross-checks membership against the exported aggregate constants. */ export declare const FRONT_AGGREGATE_HANDLES: readonly string[]; export declare const TAIL_AGGREGATE_HANDLES: readonly string[]; /** * Compile a coherent set of recipes to a list of Operation IRs. * * Returns one IR per recipe (ordered by cross-recipe apply-rank then * intra-rank topo-sort), wrapped by the cross-recipe aggregates: shared * Data Folder templates are PREPENDED (so per-recipe folder ITEMs whose * `templateOf` is the shared template resolve), and the remaining * aggregates (templates-mapping, available-renderings, insert-options * roots, placeholder settings, ownership prunes) are APPENDED in * apply-order. The prune aggregate runs last; `assertPruneOrderingInvariant` * proves it at compile time. */ export declare function compileRecipeSet(recipes: readonly Recipe[], context: CompileContext): OperationIr[]; /** Front-door dispatcher — accepts any registered recipe kind. */ export declare function compileRecipe(input: Recipe, context: CompileContext): OperationIr;