import { L as LanguageSlug } from './registry-LNKwlYez.cjs'; import { f as Locale, c as LanguageStatus, g as LocalizedLanguage } from './types-BRDmsib7.cjs'; type LanguageCategory = 'frontend' | 'backend' | 'fullstack' | 'systems' | 'data-science' | 'scripting' | 'other'; interface CategoryInfo { slug: LanguageCategory; name: string; description: string; aliases: string[]; } declare function getCategories(): LanguageCategory[]; interface EcosystemInfo { slug: string; name: string; description: string; aliases: string[]; } declare function getEcosystems(): EcosystemInfo[]; interface PackageManagerInfo { slug: string; name: string; website: string; logo: string; color: `#${string}`; aliases: string[]; } declare function getPackageManagers(): PackageManagerInfo[]; interface ParadigmInfo { slug: string; name: string; description: string; aliases: string[]; } declare function getParadigms(): ParadigmInfo[]; interface RuntimeInfo { slug: string; name: string; website: string; logo: string; color: `#${string}`; aliases: string[]; packageManagers: string[]; } declare function getRuntimes(): RuntimeInfo[]; type RuntimeLanguageSlug = LanguageSlug | (string & {}); interface LanguageRequest { /** * Sets the requested locale for this language lookup. * * Regional locales such as `es-PE` fall back to their base locale before English. */ locale(locale: Locale): LanguageRequest; /** * Reads a language from the in-memory catalog and localizes it. * * Returns `undefined` when the slug does not exist. */ get(): LocalizedLanguage | undefined; /** * Dynamically imports a language module and localizes it. * * Returns `undefined` when the slug does not exist. */ load(): Promise; } /** * A `LanguageRequest` for a slug that is statically known to exist in the catalog, * so `get()` and `load()` never return `undefined`. */ interface ResolvedLanguageRequest { /** Sets the requested locale for this language lookup. */ locale(locale: Locale): ResolvedLanguageRequest; /** Reads the language from the in-memory catalog and localizes it. */ get(): LocalizedLanguage; /** Dynamically imports the language module and localizes it. */ load(): Promise; } interface RuntimeRequest { /** Metadata about the matched runtime platform. Returns undefined for unknown values. */ info(): RuntimeInfo | undefined; /** Languages that run on or target this platform. */ langs(): LanguageCollectionRequest; /** Package managers available on this runtime platform. */ packageManagers(): PackageManagerInfo[]; } interface PackageManagerRequest { /** Metadata about the matched package manager. Returns undefined for unknown values. */ info(): PackageManagerInfo | undefined; /** Languages that use this package manager. */ langs(): LanguageCollectionRequest; /** Runtime platforms that include this package manager. */ runtimes(): RuntimeInfo[]; } interface CategoryRequest { /** Metadata about the matched category. Returns undefined for unknown values. */ info(): CategoryInfo | undefined; /** Languages that belong to this category. */ langs(): LanguageCollectionRequest; } interface ParadigmRequest { /** Metadata about the matched paradigm. Returns undefined for unknown values. */ info(): ParadigmInfo | undefined; /** Languages that use this programming paradigm. */ langs(): LanguageCollectionRequest; } interface EcosystemRequest { /** Metadata about the matched ecosystem. Returns undefined for unknown values. */ info(): EcosystemInfo | undefined; /** Languages that belong to this ecosystem. */ langs(): LanguageCollectionRequest; } interface ExtensionRequest { /** Languages whose extensions include this extension or exact filename. */ langs(): LanguageCollectionRequest; } interface StatusRequest { /** Languages with this lifecycle status. Languages without a status count as `active`. */ langs(): LanguageCollectionRequest; } interface RelatedRequest { /** Languages linked to the given language through `relations`, in either direction. */ langs(): LanguageCollectionRequest; } interface LanguageCollectionRequest { /** * Sets the requested locale for every language returned by this collection lookup. */ locale(locale: Locale): LanguageCollectionRequest; /** Narrows the collection to languages that belong to the given category. */ category(value: LanguageCategory): LanguageCollectionRequest; /** Narrows the collection to languages that use the given programming paradigm. */ paradigm(value: string): LanguageCollectionRequest; /** Narrows the collection to languages that run on or target the given platform. */ runtime(value: string): LanguageCollectionRequest; /** Narrows the collection to languages that use the given package manager. */ packageManager(value: string): LanguageCollectionRequest; /** Narrows the collection to languages that belong to the given ecosystem. */ ecosystem(value: string): LanguageCollectionRequest; /** Narrows the collection to languages registering the given extension or exact filename. */ extension(value: string): LanguageCollectionRequest; /** Narrows the collection to languages with the given lifecycle status. */ status(value: LanguageStatus): LanguageCollectionRequest; /** Narrows the collection to languages related to the given language through `relations`. */ related(slug: RuntimeLanguageSlug): LanguageCollectionRequest; /** Lists the matching catalog slugs without localizing. */ slugs(): string[]; /** Counts the matching languages without localizing. */ count(): number; /** Reads the first matching language from the in-memory catalog and localizes it. */ first(): LocalizedLanguage | undefined; /** * Reads every language from the in-memory catalog and localizes the result. */ get(): LocalizedLanguage[]; /** * Dynamically imports every language module and localizes the result. */ load(): Promise; } /** * Fluent API for localized language metadata, dynamic loading, and filename detection. * * Use `.get()` for synchronous catalog access or `.load()` to dynamically import only the * requested language modules. * * Language collections compose: chain `.category()`, `.paradigm()`, `.runtime()`, * `.packageManager()`, `.ecosystem()`, `.extension()`, `.status()`, or `.related()` on any * collection to intersect filters. * * @example * api.category('backend').langs().paradigm('functional').get(); * api.languages().runtime('node').status('active').locale('es').get(); */ declare const api: { /** * Selects a language by slug or alias. * * Input is normalized to the package slug format before lookup, and language * aliases such as `golang`, `C#`, or `wasm` resolve to their catalog slug. * When the slug is a known literal, `get()` and `load()` are typed as * always returning a language. * * @example * api.language("astro").locale("es-PE").get(); * api.language("golang").get()?.slug; // "go" */ language(slug: Slug): Slug extends LanguageSlug ? ResolvedLanguageRequest : LanguageRequest; /** * Selects every language in the catalog. * * @example * await api.languages().locale("en-US").load(); */ languages(): LanguageCollectionRequest; /** * Detects the first matching language for a filename or path. * * @example * api.detect("src/App.vue").locale("es").get(); */ detect(filename: string): LanguageRequest; /** * Selects every language that registers the given file extension or exact filename. * * Accepts values with or without the leading dot: `.ts`, `ts`, or `Dockerfile`. * Unlike `detect`, this matches the extension entry exactly instead of ranking * suffix matches, so `api.extension('.h')` returns both C and C++. * * @example * api.extension('.h').langs().get().map((language) => language.slug); // ["c", "cpp"] * api.extension('ts').langs().locale('es').get(); */ extension(value: string): ExtensionRequest; /** * Searches languages by name, slug, or alias with ranked results. * * Ranking: exact slug/alias/name match, then name or slug prefix, then name * substring, then slug or alias substring. Empty queries return no results. * * @example * api.search('type').get().map((language) => language.slug); // ["typescript", "typst", ...] * api.search('golang').get().at(0)?.slug; // "go" */ search(query: string): LanguageCollectionRequest; /** * Selects every language with the given lifecycle status. * * Languages without a `status` field count as `active`. * * @example * api.status('legacy').langs().get(); * api.status('experimental').langs().locale('es').get(); */ status(value: LanguageStatus): StatusRequest; /** * Selects every language related to the given language through `relations`, * in either direction. * * @example * api.related('javascript').langs().get(); // TypeScript, CoffeeScript, Elm, ... * api.related('typescript').langs().get(); // JavaScript */ related(slug: RuntimeLanguageSlug): RelatedRequest; /** * Selects every language that runs on or targets the given platform or runtime. * * Accepts common aliases: 'node', 'nodejs', 'bun', 'deno', '.net', 'jvm', 'android', 'ios', etc. * Searches both `tooling.runtimes` and `tooling.ecosystems`. * * @example * api.runtime('node').langs().locale('es').get(); * api.runtime('.net').info(); * api.runtime('node').packageManagers(); */ runtime(value: string): RuntimeRequest; /** * Selects every language that uses the given package manager. * * Accepts common aliases: 'npm', 'pnpm', 'yarn', 'pip', 'cargo', 'maven', 'nuget', etc. * Searches `tooling.packageManagers`. * * @example * api.packageManager('npm').langs().locale('es').get(); * api.packageManager('npm').runtimes(); */ packageManager(value: string): PackageManagerRequest; /** * Selects every language that belongs to the given category. * * Categories are inferred from each language's `tooling.runtimes` and `tooling.ecosystems`: * - `frontend` — targets the browser only (CSS, HTML, GLSL…) * - `backend` — runs on a server runtime (Python, Go, Ruby, PHP…) * - `fullstack` — targets both browser and server (JavaScript, TypeScript…) * - `systems` — low-level / native / embedded (C, C++, Rust, Zig…) * - `data-science`— data, ML, scientific computing (R, Julia, MATLAB…) * - `scripting` — shell and scripting languages (Bash, Zsh, PowerShell…) * - `other` — everything that does not match any of the above * * Categories are not mutually exclusive: Python appears in both `backend` and `data-science`. * * @example * api.category('backend').langs().locale('es').get(); * api.category('backend').info(); * await api.category('data-science').langs().load(); */ category(value: LanguageCategory): CategoryRequest; /** * Selects every language that uses the given programming paradigm. * * Accepts common aliases: 'functional', 'fp', 'object-oriented', 'oop', 'declarative', etc. * Searches `language.paradigms`. * * @example * api.paradigm('functional').langs().locale('es').get(); * api.paradigm('oop').info(); */ paradigm(value: string): ParadigmRequest; /** * Selects every language that belongs to the given ecosystem. * * Accepts common aliases: 'web', 'jvm', 'dotnet', 'devops', 'data-science', 'embedded', etc. * Searches `tooling.ecosystems`. * * @example * api.ecosystem('jvm').langs().locale('es').get(); * api.ecosystem('blockchain').info(); */ ecosystem(value: string): EcosystemRequest; /** * Detects every matching language for a filename or path. * * Useful for ambiguous extensions such as `.h`, which can match C and C++. */ detectAll(filename: string): LanguageCollectionRequest; }; /** Lists every lifecycle status usable with `api.status()`. */ declare function getStatuses(): LanguageStatus[]; export { type CategoryInfo as C, type EcosystemInfo as E, type LanguageCategory as L, type PackageManagerInfo as P, type RelatedRequest as R, type StatusRequest as S, type CategoryRequest as a, type EcosystemRequest as b, type ExtensionRequest as c, type ParadigmInfo as d, type ParadigmRequest as e, type ResolvedLanguageRequest as f, type RuntimeInfo as g, api as h, getCategories as i, getEcosystems as j, getPackageManagers as k, getParadigms as l, getRuntimes as m, getStatuses as n, type LanguageCollectionRequest as o, type LanguageRequest as p, type PackageManagerRequest as q, type RuntimeRequest as r };