shadcn-svelte
Version:
Add components to your apps.
92 lines (90 loc) • 3.35 kB
text/typescript
import { z } from "zod";
//#region src/utils/config/schema.d.ts
type ResolvedConfig = z.infer<typeof resolvedConfigSchema>;
declare const resolvedConfigSchema: z.ZodObject<{
aliases: z.ZodObject<{
components: z.ZodString;
utils: z.ZodString;
ui: z.ZodDefault<z.ZodString>;
hooks: z.ZodDefault<z.ZodString>;
lib: z.ZodDefault<z.ZodString>;
}, z.core.$strip>;
$schema: z.ZodOptional<z.ZodString>;
tailwind: z.ZodObject<{
css: z.ZodString;
baseColor: z.ZodString;
}, z.core.$strip>;
typescript: z.ZodDefault<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
config: z.ZodString;
}, z.core.$strip>]>>;
registry: z.ZodDefault<z.ZodString>;
sveltekit: z.ZodBoolean;
resolvedPaths: z.ZodObject<{
cwd: z.ZodString;
tailwindCss: z.ZodString;
utils: z.ZodString;
components: z.ZodString;
hooks: z.ZodString;
ui: z.ZodString;
lib: z.ZodString;
}, z.core.$strip>;
style: z.ZodDefault<z.ZodString>;
iconLibrary: z.ZodDefault<z.ZodEnum<{
lucide: "lucide";
tabler: "tabler";
hugeicons: "hugeicons";
phosphor: "phosphor";
remixicon: "remixicon";
}>>;
menuColor: z.ZodDefault<z.ZodEnum<{
default: "default";
inverted: "inverted";
"default-translucent": "default-translucent";
"inverted-translucent": "inverted-translucent";
}>>;
menuAccent: z.ZodDefault<z.ZodEnum<{
bold: "bold";
subtle: "subtle";
}>>;
}, z.core.$strip>;
//#endregion
//#region src/utils/transformers/transform-strip-types.d.ts
declare const transformStripTypes: Transformer;
//#endregion
//#region src/utils/transformers/transform-icons.d.ts
declare const transformIcons: Transformer;
//#endregion
//#region src/utils/transformers/transform-imports.d.ts
declare const transformImports: Transformer;
//#endregion
//#region src/utils/transformers/transform-menu.d.ts
/**
* Transforms cn-menu-target and cn-menu-translucent classes based on config.menuColor.
* If menuColor is "inverted", replaces cn-menu-target with "dark" and removes cn-menu-translucent.
* If menuColor is "default-translucent", removes cn-menu-target and inlines cn-menu-translucent styles.
* If menuColor is "inverted-translucent", replaces cn-menu-target with "dark" and inlines cn-menu-translucent styles.
* Otherwise, removes both cn-menu-target and cn-menu-translucent.
*/
declare const transformMenu: Transformer;
//#endregion
//#region src/utils/transformers/transform-font.d.ts
declare function rewriteFontMarkers(className: string, supportedMarkers: Set<string>): string;
declare const transformFont: Transformer;
//#endregion
//#region src/utils/transformers/index.d.ts
type TransformOptions = {
content: string;
filePath: string;
config: ResolvedConfig;
supportedFontMarkers?: string[];
};
type TransformerResult = {
content: string;
dependencies: string[];
devDependencies: string[];
filePath: string;
};
type Transformer = (opts: TransformOptions) => Promise<Partial<TransformerResult>>;
declare function transform(opts: TransformOptions, transformers: (Transformer | false | undefined)[]): Promise<TransformerResult>;
//#endregion
export { rewriteFontMarkers as a, transformImports as c, transform as i, transformIcons as l, Transformer as n, transformFont as o, TransformerResult as r, transformMenu as s, TransformOptions as t, transformStripTypes as u };