UNPKG

mytril

Version:

Mytril Svelte library component for rapidly building modern websites based on Svelte and Sveltekit

56 lines (55 loc) 2.09 kB
import type { MytrilConfig } from '../../types/mytril.js'; /** * Converts a given configuration object into a CSS string. * * This function generates CSS based on the provided `MytrilConfig` object. * It processes various configuration options such as typography, shape, and display settings, * and generates corresponding CSS classes and media queries. * * @param {MytrilConfig} config - The configuration object containing settings for generating CSS. * @returns {string} The generated CSS string based on the provided configuration. */ export declare const convertJStoCSS_Utilities: (config: MytrilConfig, data: string) => string; /** * Converts JavaScript configuration and data into a CSS string. * * @param {MytrilConfig} config - The configuration object for Mytril. * @param {string} data - The data to be converted into CSS. * @returns {string} The generated CSS string. */ export declare const convertJStoCSS_Components: (config: MytrilConfig, data: string) => string; /** * Converts a JavaScript theme configuration to CSS. * * @param {MytrilConfig} config - The configuration object for the theme. * @param {string} config.defaultTheme - The default theme name. * @param {object} config.colors - An object containing color definitions. * @param {string | string[]} config.themes - A string or array of strings representing theme names. * @param {string} config.colorScheme - The system color scheme with navigator or user params. * @returns {string} The generated CSS string. * * @example * const config = { * themes: ['default', 'demo'] * defaultTheme: 'default', * colorScheme: 'system', * colors: { * default: { * primary: { * light: '#ffffff', * dark: '#000000', * }, * secondary: '#ff00ff', * tertiary:{ * _default: '#ffffff', * container: { * light: '#ffffff', * dark: '#000000', * }, * } * } * }, * }; * const css = convertJStoCSS_Theme(config); */ export declare const convertJStoCSS_Theme: (config: MytrilConfig) => string;