import { IntlayerConfig } from "@intlayer/types/config"; //#region src/buildIntlayerDictionary/writeNestedDictionary.d.ts /** * Subdirectory of `dictionariesDir` holding the companion modules. Nested under * the compiled dictionaries so both stay together and are cleaned as one, and * because the `**\/*.json` globs listing compiled dictionaries never match the * `.mjs` / `.cjs` files written here. */ export declare const NESTED_DICTIONARIES_SUBDIR = "nested"; /** * Path of the companion module carrying the `nest()` targets of a dictionary. * * Shared with the bundler plugins, which re-point the static import they inject * at a `useIntlayer` call site to this module whenever the dictionary has nest * targets. * * @param dictionariesDir - The compiled dictionaries directory. * @param key - The dictionary key. * @param extension - Module extension, `'mjs'` (default) or `'cjs'`. */ export declare const getNestedDictionaryPath: (dictionariesDir: string, key: string, extension?: 'mjs' | 'cjs') => string; /** * Generates a companion module that re-exports a compiled dictionary with its * `nest()` targets attached. * * The optimizer imports this instead of the raw JSON, so `getNesting` resolves * the reference from `nestedDictionaries` rather from the global registry * — which lets the registry be stripped, and puts each nest target in the same * chunk as the dictionary that references it. * * @param key - The dictionary key. * @param nestedKeys - Keys of the dictionaries it references, transitively. * @param format - Output module format. * * @example * ```js * import _dictionary from '../dashboard.json' with { type: 'json' }; * import _1a2b3c from '../common.json' with { type: 'json' }; * * export default { ..._dictionary, nestedDictionaries: { 'common': _1a2b3c } }; * ``` */ export declare const generateNestedDictionaryEntryPoint: (key: string, nestedKeys: string[], format?: 'cjs' | 'esm') => string; /** * Writes one companion module per dictionary holding `nest()` references. * * @param nestedDictionaryGraph - Dictionary key → keys it nests, transitively. * @param configuration - The resolved intlayer configuration. * @param formats - Module formats to emit. */ export declare const writeNestedDictionaries: (nestedDictionaryGraph: Map>, configuration: IntlayerConfig, formats?: ('cjs' | 'esm')[]) => Promise; //#endregion //# sourceMappingURL=writeNestedDictionary.d.ts.map