Files
lcbp3.np-dms.work/frontend/node_modules/shadcn/dist/index-jrlOVvd4.d.ts
2025-09-21 20:29:15 +07:00

312 lines
12 KiB
TypeScript
Executable File

import { configSchema, registryIndexSchema, registryItemSchema } from './schema/index.js';
import { z } from 'zod';
type Config = z.infer<typeof configSchema>;
declare function getRegistry(name: string, options?: {
config?: Partial<Config>;
useCache?: boolean;
}): Promise<{
name: string;
homepage: string;
items: {
type: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:page" | "registry:file" | "registry:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
name: string;
tailwind?: {
config?: {
content?: string[] | undefined;
theme?: Record<string, any> | undefined;
plugins?: string[] | undefined;
} | undefined;
} | undefined;
$schema?: string | undefined;
extends?: string | undefined;
title?: 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:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
path: string;
content?: string | undefined;
target?: string | undefined;
})[] | undefined;
cssVars?: {
theme?: Record<string, string> | undefined;
light?: Record<string, string> | undefined;
dark?: Record<string, string> | undefined;
} | undefined;
css?: Record<string, any> | 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<{
type: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:page" | "registry:file" | "registry:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
name: string;
tailwind?: {
config?: {
content?: string[] | undefined;
theme?: Record<string, any> | undefined;
plugins?: string[] | undefined;
} | undefined;
} | undefined;
$schema?: string | undefined;
extends?: string | undefined;
title?: 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:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
path: string;
content?: string | undefined;
target?: string | undefined;
})[] | undefined;
cssVars?: {
theme?: Record<string, string> | undefined;
light?: Record<string, string> | undefined;
dark?: Record<string, string> | undefined;
} | undefined;
css?: Record<string, any> | 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<{
tailwind?: {
config?: {
content?: string[] | undefined;
theme?: Record<string, any> | undefined;
plugins?: string[] | undefined;
} | undefined;
} | undefined;
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:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
path: string;
content?: string | undefined;
target?: string | undefined;
})[] | undefined;
cssVars?: {
theme?: Record<string, string> | undefined;
light?: Record<string, string> | undefined;
dark?: Record<string, string> | undefined;
} | undefined;
css?: Record<string, any> | undefined;
envVars?: Record<string, string> | undefined;
docs?: string | undefined;
} | null>;
declare function getRegistriesConfig(cwd: string, options?: {
useCache?: boolean;
}): Promise<{
registries: Record<string, string | {
url: string;
params?: Record<string, string> | undefined;
headers?: Record<string, string> | undefined;
}>;
}>;
declare function getShadcnRegistryIndex(): Promise<{
type: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:page" | "registry:file" | "registry:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
name: string;
tailwind?: {
config?: {
content?: string[] | undefined;
theme?: Record<string, any> | undefined;
plugins?: string[] | undefined;
} | undefined;
} | undefined;
$schema?: string | undefined;
extends?: string | undefined;
title?: 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:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
path: string;
content?: string | undefined;
target?: string | undefined;
})[] | undefined;
cssVars?: {
theme?: Record<string, string> | undefined;
light?: Record<string, string> | undefined;
dark?: Record<string, string> | undefined;
} | undefined;
css?: Record<string, any> | 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<{
type: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:page" | "registry:file" | "registry:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
name: string;
tailwind?: {
config?: {
content?: string[] | undefined;
theme?: Record<string, any> | undefined;
plugins?: string[] | undefined;
} | undefined;
} | undefined;
$schema?: string | undefined;
extends?: string | undefined;
title?: 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:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
path: string;
content?: string | undefined;
target?: string | undefined;
})[] | undefined;
cssVars?: {
theme?: Record<string, string> | undefined;
light?: Record<string, string> | undefined;
dark?: Record<string, string> | undefined;
} | undefined;
css?: Record<string, any> | 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<{
type: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:page" | "registry:file" | "registry:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
name: string;
tailwind?: {
config?: {
content?: string[] | undefined;
theme?: Record<string, any> | undefined;
plugins?: string[] | undefined;
} | undefined;
} | undefined;
$schema?: string | undefined;
extends?: string | undefined;
title?: 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:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
path: string;
content?: string | undefined;
target?: string | undefined;
})[] | undefined;
cssVars?: {
theme?: Record<string, string> | undefined;
light?: Record<string, string> | undefined;
dark?: Record<string, string> | undefined;
} | undefined;
css?: Record<string, any> | 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>>;
export { type Config as C, getRegistry as a, getRegistriesIndex as b, getRegistriesConfig as c, getShadcnRegistryIndex as d, getRegistryStyles as e, getRegistryIcons as f, getRegistryItems as g, getRegistryBaseColors as h, getRegistryBaseColor as i, resolveTree as j, fetchTree as k, getItemTargetPath as l, resolveRegistryItems as r };