import type { MonolithConfig, MonolithModuleConfig } from './MonolithConfig.ts';
/** One or more `export *` targets (package, `#module`, or relative). */
export type ReexportTargets = string | string[];
export declare function normalizeReexportTargets(value: ReexportTargets | undefined): string[];
/** Package-like specifier: not a hash alias and not a relative/absolute path. */
export declare function isPackageLikeSpecifier(spec: string): boolean;
/** Configured `reexport` targets for a module, if any. */
export declare function moduleReexportTargets(mod: MonolithModuleConfig): string[];
export declare function moduleHasReexport(mod: MonolithModuleConfig): boolean;
/**
 * Master-barrel re-export targets for a module: explicit `barrelFrom`, else
 * `reexport`, else `#<name>`.
 */
export declare function moduleBarrelTargets(mod: MonolithModuleConfig): string[];
/**
 * Subpath shim re-export targets: explicit `shimFrom`, else `reexport`, else
 * `#<name>`.
 */
export declare function moduleShimTargets(mod: MonolithModuleConfig): string[];
/** Builds a pure star-reexport TypeScript (or mjs) source body (no header). */
export declare function buildStarReexportLines(targets: string[], options?: {
    semi?: boolean;
}): string;
/**
 * If `source` is only star re-exports (plus blank lines / `//` comments /
 * generated header), returns the targets in order. Otherwise `null`.
 */
export declare function parsePureStarReexports(source: string): string[] | null;
/**
 * Expands pure star-reexport targets until only package-like specifiers remain.
 * Returns `null` if any hop has local implementation or unreadable sources.
 */
export declare function expandToPackageReexportTargets(targets: string[], packageDir: string, config: MonolithConfig, seen?: Set<string>): string[] | null;
/**
 * Resolves pure package reexport targets for a module from config and/or source.
 */
export declare function resolveModulePackageReexports(mod: MonolithModuleConfig, packageDir: string, config: MonolithConfig): string[] | null;
/**
 * After esbuild, rewrite known pure package-facade entries to `export * from`
 * form. esbuild preserves star re-exports only on the entry file; multi-hop
 * `#module` chains become `__reExport` helpers that break Storybook/Vite
 * analysis. Returns the number of files rewritten.
 */
export declare function flattenPurePackageReexportMjs(distDir: string, packageDir: string, config: MonolithConfig): number;
//# sourceMappingURL=monolithReexport.d.ts.map