/** * Environment-aware URL building for the handle.me ecosystem. * * The rule (from the apps' `getSubDomain()`): mainnet drops the prefix, preview/preprod prefix it — * `merch.handle.me` (mainnet) vs `preview.merch.handle.me` / `preprod.merch.handle.me`. * * Unlike the Next apps (which read NEXT_PUBLIC_NETWORK at build time), a framework-agnostic * component can't see build-time env vars. So we derive the environment at runtime from the host * the site is served on (it IS served from `preview.x.handle.me`), with an explicit override for * SSR or non-standard hosts. */ export type KoraNetwork = "mainnet" | "preview" | "preprod"; export declare const KORA_BASE_DOMAIN = "handle.me"; /** Derive the network from a hostname (defaults to the current document's host). */ export declare function getEnvironment(hostname?: string): KoraNetwork; /** "" for mainnet, else "preview." / "preprod." */ export declare function subdomainPrefix(env: KoraNetwork): string; export interface KoraUrlOptions { /** Subdomain label, e.g. "mint", "hal", "merch". Omit for the handle.me root. */ sub?: string; path?: string; /** Force a network. Defaults to one derived from `hostname`. */ env?: KoraNetwork; /** Hostname to derive the env from (for SSR). Defaults to the current document's host. */ hostname?: string; } export declare function koraUrl(options?: KoraUrlOptions): string; /** Logical site → subdomain label ("" = the handle.me root / portal). */ export declare const KORA_SUBDOMAINS: { readonly portal: ""; readonly mint: "mint"; readonly hal: "hal"; readonly marketplace: "marketplace"; readonly merch: "merch"; readonly auth: "auth"; readonly docs: "docs"; readonly bff: "bff"; readonly api: "api"; }; export type KoraSite = keyof typeof KORA_SUBDOMAINS; export interface KoraSiteUrlOptions { path?: string; env?: KoraNetwork; hostname?: string; } export declare function siteUrl(site: KoraSite, opts?: KoraSiteUrlOptions): string; export declare function portalUrl(handle: string, opts?: KoraSiteUrlOptions): string; export declare function personalizeUrl(handle: string, opts?: KoraSiteUrlOptions): string; export declare function subhandlesUrl(handle: string, opts?: KoraSiteUrlOptions): string; export * from "./links.js"; //# sourceMappingURL=index.d.ts.map