UNPKG

@alegendstale/holly-components

Version:

Reusable UI components created using lit

49 lines 1.98 kB
import { CommonColorTuple, CommonColoraTuple } from './colorsea-wrapper.js'; import { PaletteSettings, ColorPaletteSettings, CopyFormat } from "../components/color-palette/color-palette-utils.js"; /** * Get settings without their default values */ export declare function getModifiedSettings(settings: PaletteSettings): Partial<PaletteSettings> | undefined; /** * Checks if all settings are set to their default values */ export declare function areSettingsDefault(settings: PaletteSettings | ColorPaletteSettings): boolean; /** * Gets the modified settings as a string */ export declare function getModifiedSettingsAsString(settings: PaletteSettings): string | undefined; export declare function convertStringSettings(settings: PaletteSettings): any; /** * Parse input url & extract colors * @param url URL from color input * @returns Array of colors */ export declare function parseUrl(url: string): string[]; /** * Converts ColorPalette plugin settings to Palette settings */ export declare function pluginToPaletteSettings(pluginSettings: ColorPaletteSettings): PaletteSettings; /** * Creates a codeblock palette * @param input Either palette input or colors & settings object * @returns palette block string */ export declare function createPaletteBlock(input: { colors: string[]; settings?: Partial<PaletteSettings>; } | string): string; /** * Gets the appropriate foreground contrast color */ export declare function getForegroundColor(color: string): string; /** * Converts string array to newline separated string */ export declare function toNString(array: string[]): string; export declare function copyToClipboard(text: string, copyFormat?: CopyFormat): Promise<void>; /** * Calculate font size based on number of colors */ export declare function getAdjustedFontSize(colorsCount: number): number; export declare function isColorValid(color: string | CommonColorTuple | CommonColoraTuple): boolean; //# sourceMappingURL=basicUtils.d.ts.map