shadcn-svelte
Version:
Add components to your apps.
189 lines • 6.67 kB
text/typescript
//#region src/preset/preset.d.ts
declare const PRESET_STYLES: readonly ["nova", "vega", "maia", "lyra", "mira", "luma", "sera", "rhea"];
declare const PRESET_BASE_COLORS: {
readonly neutral: {
readonly name: "Neutral";
readonly color: "#737373";
};
readonly stone: {
readonly name: "Stone";
readonly color: "#79716B";
};
readonly zinc: {
readonly name: "Zinc";
readonly color: "#71717B";
};
readonly mauve: {
readonly name: "Mauve";
readonly color: "#79697B";
};
readonly olive: {
readonly name: "Olive";
readonly color: "#7C7C67";
};
readonly mist: {
readonly name: "Mist";
readonly color: "#67787C";
};
readonly taupe: {
readonly name: "Taupe";
readonly color: "#7C6D67";
};
};
declare const PRESET_BASE_COLOR_KEYS: ("neutral" | "stone" | "zinc" | "mauve" | "olive" | "mist" | "taupe")[];
declare const PRESET_THEMES: {
readonly neutral: {
readonly name: "Neutral";
readonly color: "#737373";
};
readonly stone: {
readonly name: "Stone";
readonly color: "#78716c";
};
readonly zinc: {
readonly name: "Zinc";
readonly color: "#71717a";
};
readonly amber: {
readonly name: "Amber";
readonly color: "#FD9A00";
};
readonly blue: {
readonly name: "Blue";
readonly color: "#2B7FFF";
};
readonly cyan: {
readonly name: "Cyan";
readonly color: "#00B8DB";
};
readonly emerald: {
readonly name: "Emerald";
readonly color: "#00BC7D";
};
readonly fuchsia: {
readonly name: "Fuchsia";
readonly color: "#E12AFB";
};
readonly green: {
readonly name: "Green";
readonly color: "#00C950";
};
readonly indigo: {
readonly name: "Indigo";
readonly color: "#615FFF";
};
readonly lime: {
readonly name: "Lime";
readonly color: "#7CCF00";
};
readonly orange: {
readonly name: "Orange";
readonly color: "#FF6900";
};
readonly pink: {
readonly name: "Pink";
readonly color: "#F6339A";
};
readonly purple: {
readonly name: "Purple";
readonly color: "#AD46FF";
};
readonly red: {
readonly name: "Red";
readonly color: "#FB2C36";
};
readonly rose: {
readonly name: "Rose";
readonly color: "#FF2056";
};
readonly sky: {
readonly name: "Sky";
readonly color: "#00A6F4";
};
readonly teal: {
readonly name: "Teal";
readonly color: "#00BBA7";
};
readonly violet: {
readonly name: "Violet";
readonly color: "#8E51FF";
};
readonly yellow: {
readonly name: "Yellow";
readonly color: "#EFB100";
};
readonly mauve: {
readonly name: "Mauve";
readonly color: "#79697b";
};
readonly olive: {
readonly name: "Olive";
readonly color: "#7c7c67";
};
readonly mist: {
readonly name: "Mist";
readonly color: "#67787c";
};
readonly taupe: {
readonly name: "Taupe";
readonly color: "#7c6d67";
};
};
declare const PRESET_THEME_KEYS: ("neutral" | "stone" | "zinc" | "mauve" | "olive" | "mist" | "taupe" | "amber" | "blue" | "cyan" | "emerald" | "fuchsia" | "green" | "indigo" | "lime" | "orange" | "pink" | "purple" | "red" | "rose" | "sky" | "teal" | "violet" | "yellow")[];
declare const PRESET_CHART_COLORS: ("neutral" | "stone" | "zinc" | "mauve" | "olive" | "mist" | "taupe" | "amber" | "blue" | "cyan" | "emerald" | "fuchsia" | "green" | "indigo" | "lime" | "orange" | "pink" | "purple" | "red" | "rose" | "sky" | "teal" | "violet" | "yellow")[];
declare const PRESET_ICON_LIBRARIES: ("lucide" | "tabler" | "hugeicons" | "phosphor" | "remixicon")[];
declare const PRESET_FONTS: readonly ["inter", "noto-sans", "nunito-sans", "figtree", "roboto", "raleway", "dm-sans", "public-sans", "outfit", "jetbrains-mono", "geist", "geist-mono", "lora", "merriweather", "playfair-display", "noto-serif", "roboto-slab", "oxanium", "manrope", "space-grotesk", "montserrat", "ibm-plex-sans", "source-sans-3", "instrument-sans", "eb-garamond", "instrument-serif"];
declare const PRESET_FONT_HEADINGS: readonly ["inherit", "inter", "noto-sans", "nunito-sans", "figtree", "roboto", "raleway", "dm-sans", "public-sans", "outfit", "jetbrains-mono", "geist", "geist-mono", "lora", "merriweather", "playfair-display", "noto-serif", "roboto-slab", "oxanium", "manrope", "space-grotesk", "montserrat", "ibm-plex-sans", "source-sans-3", "instrument-sans", "eb-garamond", "instrument-serif"];
declare const PRESET_RADII: {
readonly default: {
readonly name: "default";
readonly label: "Default";
readonly value: "0.5rem";
};
readonly none: {
readonly name: "none";
readonly label: "None";
readonly value: "0rem";
};
readonly small: {
readonly name: "small";
readonly label: "Small";
readonly value: "0.45rem";
};
readonly medium: {
readonly name: "medium";
readonly label: "Medium";
readonly value: "0.625rem";
};
readonly large: {
readonly name: "large";
readonly label: "Large";
readonly value: "0.875rem";
};
};
declare const PRESET_RADII_KEYS: ("default" | "small" | "none" | "medium" | "large")[];
declare const PRESET_MENU_ACCENTS: readonly ["subtle", "bold"];
declare const PRESET_MENU_COLORS: readonly ["default", "inverted", "default-translucent", "inverted-translucent"];
type PresetConfig = {
style: (typeof PRESET_STYLES)[number];
baseColor: (typeof PRESET_BASE_COLOR_KEYS)[number];
theme: (typeof PRESET_THEME_KEYS)[number];
chartColor?: (typeof PRESET_CHART_COLORS)[number];
iconLibrary: (typeof PRESET_ICON_LIBRARIES)[number];
font: (typeof PRESET_FONTS)[number];
fontHeading: (typeof PRESET_FONT_HEADINGS)[number];
radius: (typeof PRESET_RADII_KEYS)[number];
menuAccent: (typeof PRESET_MENU_ACCENTS)[number];
menuColor: (typeof PRESET_MENU_COLORS)[number];
};
declare const DEFAULT_PRESET_CONFIG: PresetConfig;
declare function toBase62(num: number): string;
declare function fromBase62(str: string): number;
declare function encodePreset(config: Partial<PresetConfig>): string;
declare function decodePreset(code: string): PresetConfig | null;
declare function isPresetCode(value: string): boolean;
declare function isValidPreset(code: string): boolean;
declare function generateRandomConfig(): PresetConfig;
declare function generateRandomPreset(): string;
//#endregion
export { DEFAULT_PRESET_CONFIG, PRESET_BASE_COLORS, PRESET_BASE_COLOR_KEYS, PRESET_CHART_COLORS, PRESET_FONTS, PRESET_ICON_LIBRARIES, PRESET_MENU_ACCENTS, PRESET_MENU_COLORS, PRESET_RADII, PRESET_STYLES, PRESET_THEMES, PRESET_THEME_KEYS, type PresetConfig, decodePreset, encodePreset, fromBase62, generateRandomConfig, generateRandomPreset, isPresetCode, isValidPreset, toBase62 };