/** * `DictionaryRecipe` — the locale-aware phrase library kind. * * Split out of `kinds/site.ts` when this kind graduated to the stable * `./recipe` entry. It used to share that file with `SiteRecipe` and * `SiteTemplateRecipe`, which stayed unstable — so one file held schemas * on both sides of the stability boundary and a careless refactor could * cross the line invisibly. The schemas never shared internals * (`SiteTemplateTaxonomyEntry` belongs to SiteTemplate, `SiteGrouping` to * Site), so file layout now matches the stability boundary. */ import { z } from "zod"; /** * One phrase in a `DictionaryRecipe`. The primary-locale value is * always required; additional locales land as translations keyed by * ISO code (e.g. `"en"`, `"fr-CA"`). When a site renders in a locale * that has no entry on the phrase, the primary-locale `defaultValue` * is the fallback. * * Mirrors the registry's `DictionaryPhrase`. MUST stay in sync. */ export declare const DictionaryPhraseSchema: z.ZodObject<{ defaultValue: z.ZodString; translations: z.ZodOptional>; description: z.ZodOptional; }, z.core.$strip>; export type DictionaryPhrase = z.infer; /** * A reusable, locale-aware phrase library — UI labels, form copy, CTA * strings — that one or more `SiteTemplateRecipe`s pull in via their * `dictionaries: HandleString[]` ref list. * * **Where the phrases land in Sitecore.** Each `DictionaryRecipe` is * scoped to a single `site` via the `site: HandleString` ref. At * install time the compiler materialises a Dictionary Folder named * after this recipe under `/Dictionary//`, with * one Dictionary Entry item per `phrases` key. Each entry carries * one Sitecore item version per locale present in * `phrases[*].translations`, plus the primary-locale version from * `defaultValue`. * * **How sharing works.** Point the `site` ref at a `SiteRecipe` whose * `siteRole: "shared"` and the dictionary becomes the shared phrase * library every sibling site in the same collection inherits via * SXA's resolution chain. Point it at a regular `SiteRecipe` and the * dictionary is private to that one site. There's no extra wiring — * the inheritance behaviour comes from the site's role, not the * dictionary itself. * * **Composition.** `SiteTemplateRecipe` references dictionaries by * handle (`dictionaries: HandleString[]`); multiple templates can * reference the same `DictionaryRecipe`. Brand-specific dictionaries * layer on top of base ones by handle order (last-wins for duplicate * phrase keys). Per-site authoring tweaks live on * `SiteRecipe.dictionaryOverrides`. * * **Phrase-key contract.** Keys are stable identifiers (e.g. * `cta-learn-more`, `form-submit-label`). Renaming a key breaks every * consuming component. Add new keys freely; never repurpose an * existing one for a different meaning. * * Mirrors the registry's `DictionaryRecipe`. MUST stay in sync. */ export declare const DictionaryRecipeSchema: z.ZodObject<{ kind: z.ZodLiteral<"dictionary">; schemaVersion: z.ZodLiteral<"1">; handle: z.ZodString; name: z.ZodString; displayName: z.ZodString; description: z.ZodOptional; site: z.ZodOptional; primaryLocale: z.ZodOptional; phrases: z.ZodDefault>; description: z.ZodOptional; }, z.core.$strip>>>; }, z.core.$strip>; export type DictionaryRecipe = z.input;