UNPKG

@chakra-ui/cli

Version:

Generate theme typings for autocomplete

64 lines (63 loc) 1.95 kB
import { z } from "zod"; import type { SearchItem } from "./schema"; interface ChakraProBlockVariant { id: string; name: string; categoryId: string; accessLevel: "free" | "pro"; } interface ChakraProBlock { id: string; name: string; group: string; description: string; figmaNodeId: string; variants: ChakraProBlockVariant[]; } interface ChakraProBlocksResponse { data: ChakraProBlock[]; } export declare function fetchCompositions(): Promise<{ type: string; id: string; file: string; component: string; npmDependencies: string[]; fileDependencies: string[]; }[]>; export declare function fetchComposition(id: string): Promise<{ type: string; id: string; file: { name: string; content: string; }; component: string; npmDependencies: string[]; fileDependencies: string[]; }>; export declare function fetchProBlocks(): Promise<ChakraProBlocksResponse>; export declare function fetchComponentList(): Promise<{ components: string[]; charts: string[]; }>; export declare function fetchComponentProps(component: string): Promise<unknown>; export declare function fetchComponentExample(component: string): Promise<unknown>; export declare function fetchTheme(): Promise<{ key: string; values?: unknown; }[]>; export declare function searchDocs(query: string): Promise<SearchItem[]>; export declare function fetchProBlock(category: string, id: string, apiKey: string): Promise<z.objectInputType<{ files: z.ZodOptional<z.ZodArray<z.ZodObject<{ filename: z.ZodOptional<z.ZodString>; content: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { content?: string | undefined; filename?: string | undefined; }, { content?: string | undefined; filename?: string | undefined; }>, "many">>; }, z.ZodTypeAny, "passthrough">>; export type { SearchItem } from "./schema";