shadcn-vue
Version:
Add components to your apps.
313 lines (311 loc) • 12.6 kB
TypeScript
import { h as registryItemSchema, r as configSchema, u as registryIndexSchema } from "./index-BW6V-RlM.js";
import { z } from "zod";
//#region src/utils/get-config.d.ts
type Config = z.infer<typeof configSchema>;
//#endregion
//#region src/registry/api.d.ts
declare function getRegistry(name: string, options?: {
config?: Partial<Config>;
useCache?: boolean;
}): Promise<{
name: string;
homepage: string;
items: {
name: string;
type: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:composable" | "registry:page" | "registry:file" | "registry:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
title?: string | undefined;
$schema?: string | undefined;
extends?: string | undefined;
author?: string | undefined;
description?: string | undefined;
dependencies?: string[] | undefined;
devDependencies?: string[] | undefined;
registryDependencies?: string[] | undefined;
files?: ({
type: "registry:page" | "registry:file";
path: string;
target: string;
content?: string | undefined;
} | {
type: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:composable" | "registry:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
path: string;
content?: string | undefined;
target?: string | undefined;
})[] | undefined;
tailwind?: {
config?: {
content?: string[] | undefined;
theme?: Record<string, any> | undefined;
plugins?: string[] | undefined;
} | undefined;
} | undefined;
cssVars?: {
theme?: Record<string, string> | undefined;
light?: Record<string, string> | undefined;
dark?: Record<string, string> | undefined;
} | undefined;
css?: Record<string, string | Record<string, string | Record<string, string>>> | undefined;
envVars?: Record<string, string> | undefined;
meta?: Record<string, any> | undefined;
docs?: string | undefined;
categories?: string[] | undefined;
}[];
}>;
declare function getRegistryItems(items: string[], options?: {
config?: Partial<Config>;
useCache?: boolean;
}): Promise<{
name: string;
type: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:composable" | "registry:page" | "registry:file" | "registry:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
title?: string | undefined;
$schema?: string | undefined;
extends?: string | undefined;
author?: string | undefined;
description?: string | undefined;
dependencies?: string[] | undefined;
devDependencies?: string[] | undefined;
registryDependencies?: string[] | undefined;
files?: ({
type: "registry:page" | "registry:file";
path: string;
target: string;
content?: string | undefined;
} | {
type: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:composable" | "registry:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
path: string;
content?: string | undefined;
target?: string | undefined;
})[] | undefined;
tailwind?: {
config?: {
content?: string[] | undefined;
theme?: Record<string, any> | undefined;
plugins?: string[] | undefined;
} | undefined;
} | undefined;
cssVars?: {
theme?: Record<string, string> | undefined;
light?: Record<string, string> | undefined;
dark?: Record<string, string> | undefined;
} | undefined;
css?: Record<string, string | Record<string, string | Record<string, string>>> | undefined;
envVars?: Record<string, string> | undefined;
meta?: Record<string, any> | undefined;
docs?: string | undefined;
categories?: string[] | undefined;
}[]>;
declare function resolveRegistryItems(items: string[], options?: {
config?: Partial<Config>;
useCache?: boolean;
}): Promise<{
dependencies?: string[] | undefined;
devDependencies?: string[] | undefined;
files?: ({
type: "registry:page" | "registry:file";
path: string;
target: string;
content?: string | undefined;
} | {
type: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:composable" | "registry:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
path: string;
content?: string | undefined;
target?: string | undefined;
})[] | undefined;
tailwind?: {
config?: {
content?: string[] | undefined;
theme?: Record<string, any> | undefined;
plugins?: string[] | undefined;
} | undefined;
} | undefined;
cssVars?: {
theme?: Record<string, string> | undefined;
light?: Record<string, string> | undefined;
dark?: Record<string, string> | undefined;
} | undefined;
css?: Record<string, string | Record<string, string | Record<string, string>>> | undefined;
envVars?: Record<string, string> | undefined;
docs?: string | undefined;
} | null>;
declare function getRegistriesConfig(cwd: string): Promise<{
registries: Record<string, string | {
url: string;
params?: Record<string, string> | undefined;
headers?: Record<string, string> | undefined;
}>;
}>;
declare function getShadcnRegistryIndex(): Promise<{
name: string;
type: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:composable" | "registry:page" | "registry:file" | "registry:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
title?: string | undefined;
$schema?: string | undefined;
extends?: string | undefined;
author?: string | undefined;
description?: string | undefined;
dependencies?: string[] | undefined;
devDependencies?: string[] | undefined;
registryDependencies?: string[] | undefined;
files?: ({
type: "registry:page" | "registry:file";
path: string;
target: string;
content?: string | undefined;
} | {
type: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:composable" | "registry:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
path: string;
content?: string | undefined;
target?: string | undefined;
})[] | undefined;
tailwind?: {
config?: {
content?: string[] | undefined;
theme?: Record<string, any> | undefined;
plugins?: string[] | undefined;
} | undefined;
} | undefined;
cssVars?: {
theme?: Record<string, string> | undefined;
light?: Record<string, string> | undefined;
dark?: Record<string, string> | undefined;
} | undefined;
css?: Record<string, string | Record<string, string | Record<string, string>>> | undefined;
envVars?: Record<string, string> | undefined;
meta?: Record<string, any> | undefined;
docs?: string | undefined;
categories?: string[] | undefined;
}[] | undefined>;
declare function getRegistryStyles(): Promise<{
name: string;
label: string;
}[]>;
declare function getRegistryIcons(): Promise<Record<string, Record<string, string>>>;
declare function getRegistryBaseColors(): Promise<readonly [{
readonly name: "neutral";
readonly label: "Neutral";
}, {
readonly name: "gray";
readonly label: "Gray";
}, {
readonly name: "zinc";
readonly label: "Zinc";
}, {
readonly name: "stone";
readonly label: "Stone";
}, {
readonly name: "slate";
readonly label: "Slate";
}]>;
declare function getRegistryBaseColor(baseColor: string): Promise<{
cssVars: {
theme?: Record<string, string> | undefined;
light?: Record<string, string> | undefined;
dark?: Record<string, string> | undefined;
};
inlineColors: {
light: Record<string, string>;
dark: Record<string, string>;
};
inlineColorsTemplate: string;
cssVarsTemplate: string;
cssVarsV4?: {
theme?: Record<string, string> | undefined;
light?: Record<string, string> | undefined;
dark?: Record<string, string> | undefined;
} | undefined;
} | undefined>;
/**
* @deprecated This function is deprecated and will be removed in a future version.
*/
declare function resolveTree(index: z.infer<typeof registryIndexSchema>, names: string[]): Promise<{
name: string;
type: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:composable" | "registry:page" | "registry:file" | "registry:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
title?: string | undefined;
$schema?: string | undefined;
extends?: string | undefined;
author?: string | undefined;
description?: string | undefined;
dependencies?: string[] | undefined;
devDependencies?: string[] | undefined;
registryDependencies?: string[] | undefined;
files?: ({
type: "registry:page" | "registry:file";
path: string;
target: string;
content?: string | undefined;
} | {
type: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:composable" | "registry:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
path: string;
content?: string | undefined;
target?: string | undefined;
})[] | undefined;
tailwind?: {
config?: {
content?: string[] | undefined;
theme?: Record<string, any> | undefined;
plugins?: string[] | undefined;
} | undefined;
} | undefined;
cssVars?: {
theme?: Record<string, string> | undefined;
light?: Record<string, string> | undefined;
dark?: Record<string, string> | undefined;
} | undefined;
css?: Record<string, string | Record<string, string | Record<string, string>>> | undefined;
envVars?: Record<string, string> | undefined;
meta?: Record<string, any> | undefined;
docs?: string | undefined;
categories?: string[] | undefined;
}[]>;
/**
* @deprecated This function is deprecated and will be removed in a future version.
*/
declare function fetchTree(style: string, tree: z.infer<typeof registryIndexSchema>): Promise<{
name: string;
type: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:composable" | "registry:page" | "registry:file" | "registry:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
title?: string | undefined;
$schema?: string | undefined;
extends?: string | undefined;
author?: string | undefined;
description?: string | undefined;
dependencies?: string[] | undefined;
devDependencies?: string[] | undefined;
registryDependencies?: string[] | undefined;
files?: ({
type: "registry:page" | "registry:file";
path: string;
target: string;
content?: string | undefined;
} | {
type: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:composable" | "registry:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
path: string;
content?: string | undefined;
target?: string | undefined;
})[] | undefined;
tailwind?: {
config?: {
content?: string[] | undefined;
theme?: Record<string, any> | undefined;
plugins?: string[] | undefined;
} | undefined;
} | undefined;
cssVars?: {
theme?: Record<string, string> | undefined;
light?: Record<string, string> | undefined;
dark?: Record<string, string> | undefined;
} | undefined;
css?: Record<string, string | Record<string, string | Record<string, string>>> | undefined;
envVars?: Record<string, string> | undefined;
meta?: Record<string, any> | undefined;
docs?: string | undefined;
categories?: string[] | undefined;
}[]>;
/**
* @deprecated This function is deprecated and will be removed in a future version.
*/
declare function getItemTargetPath(config: Config, item: Pick<z.infer<typeof registryItemSchema>, "type">, override?: string): Promise<string | null>;
declare function getRegistriesIndex(options?: {
useCache?: boolean;
}): Promise<Record<string, string>>;
//#endregion
export { getRegistry as a, getRegistryIcons as c, getShadcnRegistryIndex as d, resolveRegistryItems as f, getRegistriesIndex as i, getRegistryItems as l, Config as m, getItemTargetPath as n, getRegistryBaseColor as o, resolveTree as p, getRegistriesConfig as r, getRegistryBaseColors as s, fetchTree as t, getRegistryStyles as u };
//# sourceMappingURL=api-0c_jvwiW.d.ts.map