import { EnvironmentName } from './constants'; /** * Deployment information displayed by `nv-environmentindicator`. * * Every field is optional: an app provides whatever its build pipeline can * expose. `environment` accepts any alias understood by * {@link normalizeEnvironment} (`Development`, `staging`, `acc`...). */ export interface EnvironmentInfo { /** Environment name or alias. Production / unknown values render nothing. */ environment?: string | null; /** Custom label (max 6 characters), e.g. `TEST-2`. */ label?: string | null; /** First tooltip line. Defaults to the full environment name. */ tooltip?: string | null; /** Application version, e.g. `v4.12.0`. */ version?: string | null; /** Build number, e.g. `2841`. */ build?: string | null; /** Short commit hash, e.g. `a3f9c1`. */ commit?: string | null; /** Pre-formatted deployment date, e.g. `17 Sep 2026, 14:02`. */ deployedAt?: string | null; } /** Full display names, used as the default tooltip line. */ export declare const ENVIRONMENT_FULL_NAMES: Record<`${EnvironmentName}`, string>; /** * Accepted aliases (lower-case) for each environment. Anything else — * including every production alias — resolves to `null`, which means the * indicator is not rendered. */ export declare const ENVIRONMENT_ALIASES: Record<`${EnvironmentName}`, string[]>; /** Name of the global a runtime config script can set. */ export declare const ENVIRONMENT_GLOBAL_KEY = "__NOVA_ENVIRONMENT__"; /** Prefix of the `` tags read by {@link readEnvironmentFromDocument}. */ export declare const ENVIRONMENT_META_PREFIX = "nova-"; /** * Maps any environment name or alias to one of the supported environments. * * @param {string | null | undefined} value Raw environment value (case-insensitive). * @returns {`${EnvironmentName}` | null} The supported environment, or `null` * for production, empty or unknown values. */ export declare function normalizeEnvironment(value: string | null | undefined): `${EnvironmentName}` | null; /** * Normalizes a custom label: trimmed, upper-case, max 6 characters. * * @param {string | null | undefined} value The raw label. * @returns {string | null} The normalized label, or `null` when empty. */ export declare function normalizeEnvironmentLabel(value: string | null | undefined): string | null; /** * Reads deployment information from the page, without any build tooling: * 1. `window.__NOVA_ENVIRONMENT__` (e.g. set by a runtime `env-config.js` * generated by the container entrypoint); * 2. `` and the sibling tags * `nova-environment-label`, `nova-environment-tooltip`, `nova-version`, * `nova-build`, `nova-commit`, `nova-deployed-at`. * * The global wins over meta tags, field by field. * * @param {Document} doc The document to read (defaults to the current one). * @returns {EnvironmentInfo} The detected values (empty when nothing is set). */ export declare function readEnvironmentFromDocument(doc?: Document | undefined): EnvironmentInfo; /** * Merges explicit configuration over the values detected in the page. * Explicit values that are `undefined`, `null` or empty are ignored. * * @param {EnvironmentInfo} explicit Values passed by the application. * @param {Document} doc The document to read (defaults to the current one). * @returns {EnvironmentInfo} The merged information. */ export declare function resolveEnvironmentInfo(explicit?: EnvironmentInfo, doc?: Document): EnvironmentInfo; /** * Builds the text copied to the clipboard by the indicator, e.g. * `ACC v4.12.0 / build 2841 / a3f9c1 - Deployed 17 Sep 2026, 14:02`. * * @param {string} label The displayed label. * @param {EnvironmentInfo} info The build metadata. * @returns {string} The clipboard text. */ export declare function formatEnvironmentClipboard(label: string, info: EnvironmentInfo): string; /** * Builds the ` / build / ` line, skipping missing parts. * * @param {EnvironmentInfo} info The build metadata. * @returns {string} The formatted line (empty when nothing is available). */ export declare function formatEnvironmentBuildLine(info: EnvironmentInfo): string;