UNPKG

stylesh

Version:

A powerful and elegant terminal styling library with colors, gradients, borders, themes, and animations for Node.js

59 lines 1.84 kB
/** * String prototype extensions for convenient usage */ import { StringStyler } from '../core/StringStyler'; import { Alignment, BorderStyle, BorderDirection } from '../core/types'; declare global { interface String { /** * Set text color */ color(colorName: string): StringStyler; /** * Set background color */ bg(colorName: string): StringStyler; /** * Apply gradient text colors */ gradient(colorGroup: string | string[]): StringStyler; /** * Apply gradient background colors */ bgGradient(colorGroup: string | string[]): StringStyler; /** * Apply a predefined theme */ theme(themeName: string): StringStyler; /** * Apply theme and create border box */ themeBox(themeName: string): string; /** * Create a solid border */ createSolidBorder(colorName?: string, alignment?: Alignment): string; /** * Create a rounded border */ createRoundedBorder(colorName?: string, alignment?: Alignment): string; /** * Create a double border */ createDoubleBorder(colorName?: string, alignment?: Alignment): string; /** * Create a dashed border */ createDashedBorder(colorName?: string, alignment?: Alignment): string; /** * Create a dotted border */ createDottedBorder(colorName?: string, alignment?: Alignment): string; /** * Create a custom border */ createCustomBorder(style?: BorderStyle, colorName?: string, direction?: BorderDirection, alignment?: Alignment): string; } } export {}; //# sourceMappingURL=string.extensions.d.ts.map