/**
 * Configuration for `compile.mode: 'monolith'` — a single package that hosts
 * many logical modules under `src/modules/<name>/`, cross-referenced through
 * `#module` package.json `imports` aliases and published with per-module
 * subpath exports plus platform-conditional shims.
 *
 * The monolith pipeline: layout sync (regenerate imports/paths/barrels/shims
 * from this config) → esbuild library compile with computed entries →
 * declaration import rewriting. See `monolithCompileLayout.ts`.
 */
/** One umbrella module living at `src/modules/<name>/`. */
export interface MonolithModuleConfig {
    /** Re-export from the master barrel (`src/index.ts`). */
    barrel?: boolean;
    /** Override the barrel re-export target (default `#<name>`). */
    barrelFrom?: string;
    /** Emit a root subpath shim `src/<name>.ts` (becomes a dist subpath export). */
    export?: boolean;
    /** Only usable via `#imports` inside the package; no shim, no barrel. */
    internal?: boolean;
    /** Module has a `model.ts` type barrel (adds `#<name>/model` and `src/<name>.model.ts`). */
    model?: boolean;
    /** Directory name under `src/modules/`. */
    name: string;
    /** Override the subpath shim re-export target (default `#<name>`). */
    shimFrom?: string;
}
/** Platform-conditional `#import`: package.json conditions + tsconfig fallback. */
export interface MonolithConditionalImportConfig {
    /**
     * Condition → dist path used for the package.json `imports` entry when
     * `moduleLinkage: 'external'`, e.g.
     * `{ node: './dist/node/hash.mjs', default: './dist/browser/hash.mjs' }`.
     * Required in external mode; ignored otherwise. Key order is preserved.
     */
    distImports?: Record<string, string>;
    /**
     * Condition → src path, e.g.
     * `{ node: './src/modules/platform/node/index.ts', default: './src/modules/platform/index-neutral.ts' }`.
     * Key order is preserved in the generated package.json `imports` entry.
     */
    package: Record<string, string>;
    /** Single src path used for the generated tsconfig `paths` (type-check fallback). */
    tsconfig: string;
}
export interface MonolithConfig {
    /** Extra `#alias` → src path imports (e.g. `'#object/index-un-deprecated'`). */
    aliasImports?: Record<string, string>;
    /** Per-import platform-conditional package.json `imports` entries. */
    conditionalImports?: Record<string, MonolithConditionalImportConfig>;
    /**
     * How cross-module `#imports` are linked in the compiled output.
     * `bundle` (default) inlines every referenced module into each entry —
     * self-contained files, but shared code is duplicated across entries so
     * object identity does not hold between subpaths. `external` keeps
     * `#module` specifiers in the emitted `.mjs` and resolves them at runtime
     * through a dist-pointing package.json `imports` map — each module has one
     * canonical bundle per platform, preserving `instanceof`/singleton
     * semantics across subpath imports (matches a real multi-package graph).
     * @default 'bundle'
     */
    moduleLinkage?: 'bundle' | 'external';
    modules: MonolithModuleConfig[];
    /**
     * Which platform hosts the per-module subpath entries (the `src/<name>.ts`
     * shims and, when any module declares a model, the model barrel).
     * `neutral` for platform-agnostic libraries; `browser` for React packages.
     * @default 'neutral'
     */
    modulesPlatform?: string;
    /**
     * Per-platform extra entry shims: platform → shim name → re-export target
     * (relative to the generated `src/<platform>/<name>.ts` file), e.g.
     * `{ node: { platform: '../modules/platform/node/index.ts' } }`.
     */
    platformEntries?: Record<string, Record<string, string>>;
    /**
     * Platforms to build. Every listed platform gets at least the master
     * barrel entry (`./index.ts`); `modulesPlatform` additionally gets the
     * module subpath entries, and `platformEntries` add their shims.
     * @default ['neutral', 'node', 'browser']
     */
    platforms?: string[];
}
//# sourceMappingURL=MonolithConfig.d.ts.map