/** * Style implementation for termenv. * Port of github.com/muesli/termenv style.go to TypeScript. */ import { type Color, Profile } from './types.js'; export declare const ResetSeq = "0"; export declare const BoldSeq = "1"; export declare const FaintSeq = "2"; export declare const ItalicSeq = "3"; export declare const UnderlineSeq = "4"; export declare const BlinkSeq = "5"; export declare const ReverseSeq = "7"; export declare const CrossOutSeq = "9"; export declare const OverlineSeq = "53"; /** * Style is a string that various rendering styles can be applied to. * Direct port of Go Style struct */ export declare class Style { profile: Profile; string: string; styles: string[]; constructor(profile: Profile, text?: string); /** * String returns the styled string */ toString(): string; /** * String returns the styled string - Go-compatible method name */ String(): string; /** * Styled renders s with all applied styles - matches Go Styled method */ styled(s: string): string; /** * Foreground sets a foreground color - matches Go Foreground method */ foreground(c: Color | null): Style; /** * Background sets a background color - matches Go Background method */ background(c: Color | null): Style; /** * Bold enables bold rendering - matches Go Bold method */ bold(): Style; /** * Faint enables faint rendering - matches Go Faint method */ faint(): Style; /** * Italic enables italic rendering - matches Go Italic method */ italic(): Style; /** * Underline enables underline rendering - matches Go Underline method */ underline(): Style; /** * Overline enables overline rendering - matches Go Overline method */ overline(): Style; /** * Blink enables blink mode - matches Go Blink method */ blink(): Style; /** * Reverse enables reverse color mode - matches Go Reverse method */ reverse(): Style; /** * CrossOut enables crossed-out rendering - matches Go CrossOut method */ crossOut(): Style; /** * Width returns the width required to print all runes in Style * Uses @tsports/uniseg for width calculation like Go version */ width(): number; /** * Create a copy of this style */ private copy; /** * Foreground sets a foreground color - Go-compatible method name */ Foreground(c: Color | null): Style; /** * Background sets a background color - Go-compatible method name */ Background(c: Color | null): Style; /** * Bold enables bold rendering - Go-compatible method name */ Bold(): Style; /** * Faint enables faint rendering - Go-compatible method name */ Faint(): Style; /** * Italic enables italic rendering - Go-compatible method name */ Italic(): Style; /** * Underline enables underline rendering - Go-compatible method name */ Underline(): Style; /** * Overline enables overline rendering - Go-compatible method name */ Overline(): Style; /** * Blink enables blink mode - Go-compatible method name */ Blink(): Style; /** * Reverse enables reverse color mode - Go-compatible method name */ Reverse(): Style; /** * CrossOut enables crossed-out rendering - Go-compatible method name */ CrossOut(): Style; /** * Width returns the width required to print all runes in Style - Go-compatible method name */ Width(): number; } /** * NewString returns a new Style - matches Go String function */ export declare function NewString(...s: string[]): Style; //# sourceMappingURL=style.d.ts.map