import { type IconFamily } from '../core/icons/index.js'; import type { Config } from '../utils/config.js'; export declare const DEFAULT_REGISTRY_URL: string; /** * The icons a component draws, as the registry publishes them. * * `family` is the family the files are written in — anyone installing with a * different family in `components.json` learns from this field that they need * rewriting. Absent from items published before this property existed. */ export interface RegistryIcons { family: string; symbols: string[]; tokens: string[]; /** The icons that only appear in the demos. Absent from the index, which does not carry them. */ demos?: { symbols: string[]; tokens: string[]; }; } export interface RegistryItem { name: string; type: 'registry:component'; basePath?: string; files: Array<{ name: string; content: string; }>; dependencies?: string[]; devDependencies?: string[]; registryDependencies?: string[]; icons?: RegistryIcons; } export interface RegistryIndex { $schema: string; /** The file's shape. Absent from registries older than the field. */ schemaVersion?: number; name: string; homepage: string; version: string; items: Array<{ name: string; type: string; basePath?: string; dependencies?: string[]; devDependencies?: string[]; registryDependencies?: string[]; icons?: RegistryIcons; files: string[]; }>; } /** * The family the item's files are written in. * * An item with no `icons` — published before the property existed — is in * lucide, which was the only possibility. So is an unknown value: better the * right guess than refusing to install over an unfamiliar field. */ export declare function sourceFamilyOf(item: Pick): IconFamily; export declare function getRegistryUrl(config?: Config): string; export declare function validateRegistryUrl(url: string): void; export declare function fetchRegistryIndex(registryUrl?: string): Promise; export declare function invalidateRegistryCache(): void; export declare function fetchComponentFromRegistry(componentName: string, registryUrl?: string): Promise; export declare function getAvailableComponents(registryUrl?: string): Promise; export interface TransformOptions { /** * The destination came from `--path`, outside the configured alias. * * In that case the batch's components become neighbours on disk, and the * relative path is what resolves — the alias would point at the folder they are * not in. `utils` and `core` stay on the alias, because `init` installed them. */ readonly siblingComponents?: boolean; } export declare function transformContent(content: string, config: Config, options?: TransformOptions): string; export declare function fetchComponent(componentName: string, config: Config, registryUrl?: string, options?: TransformOptions): Promise; //# sourceMappingURL=registry.d.ts.map