/** * @tsports/termenv - Go-compatible API * * This file provides the Go-compatible API with PascalCase naming conventions. * Maintains 100% API compatibility with the original termenv Go package. * * @packageDocumentation * @version 1.0.0 * @author TSports Team * @since 1.0.0 * * @example * ```typescript * import { String, ColorProfile, RGBColor } from '@tsports/termenv/go-style'; * * // Use Go-style PascalCase naming exactly as in Go * const profile = ColorProfile(); * const styled = String('Hello World') * .Foreground(RGBColor('#FF0000')) * .Bold(); * console.log(styled.String()); * ``` * * @remarks * This module provides a Go-compatible interface for developers familiar with the original * termenv package. All function names, parameter names, and behavior match * the Go implementation exactly. */ export type { Color as ColorInterface, Environ, File, Output, OutputOption } from './types.js'; export { InvalidColorError, Profile, StatusReportError, TermEnvError, } from './types.js'; export declare const TrueColor: 0; export declare const ANSI256: 1; export declare const ANSI: 2; export declare const Ascii: 3; export { defaultOutputInstance, newOutput, OutputImpl, setDefaultOutput, withColorCache, withEnvironment, withProfile, withTTY, withUnsafe, } from './output.js'; export { ProfileUtils } from './profile.js'; export { Style } from './style.js'; export { ANSI256Color as ANSI256ColorClass, ANSIBlack, ANSIBlue, ANSIBrightBlack, ANSIBrightBlue, ANSIBrightCyan, ANSIBrightGreen, ANSIBrightMagenta, ANSIBrightRed, ANSIBrightWhite, ANSIBrightYellow, ANSIColor as ANSIColorClass, ANSICyan, ANSIGreen, ANSIMagenta, ANSIRed, ANSIWhite, ANSIYellow, convertToRGB, NoColor as NoColorClass, RGBColor as RGBColorClass, } from './types.js'; import type { OutputImpl } from './output.js'; import type { Color as ColorInterface, OutputOption, Profile } from './types.js'; /** * String returns a new styled string for the default output - matches Go String function * Note: Using non-standard name to avoid shadowing global String */ export declare function String(...strings: string[]): import('./style.js').Style; /** * ColorProfile returns the supported color profile for the default output - matches Go ColorProfile function */ export declare function ColorProfile(): Profile; /** * EnvColorProfile returns the color profile based on environment variables - matches Go EnvColorProfile function */ export declare function EnvColorProfile(): Profile; /** * EnvNoColor returns true if the environment variables explicitly disable color output - matches Go EnvNoColor function */ export declare function EnvNoColor(): boolean; /** * HasDarkBackground returns true if the terminal has a dark background - matches Go HasDarkBackground function */ export declare function HasDarkBackground(): boolean; /** * ForegroundColor returns the terminal's default foreground color - matches Go ForegroundColor function */ export declare function ForegroundColor(): ColorInterface; /** * BackgroundColor returns the terminal's default background color - matches Go BackgroundColor function */ export declare function BackgroundColor(): ColorInterface; /** * NoColor creates a NoColor instance - matches Go NoColor function */ export declare function NoColor(): import('./types.js').NoColor; /** * ANSIColor creates an ANSI color (0-15) - matches Go ANSIColor function */ export declare function ANSIColor(value: number): import('./types.js').ANSIColor; /** * ANSI256Color creates an ANSI256 color (0-255) - matches Go ANSI256Color function */ export declare function ANSI256Color(value: number): import('./types.js').ANSI256Color; /** * RGBColor creates an RGB color from hex string - matches Go RGBColor function */ export declare function RGBColor(hex: string): import('./types.js').RGBColor; /** * Color creates a color from string - matches Go Color function */ export declare function Color(s: string): ColorInterface | null; /** * ProfileName returns the name of the profile as a string - matches Go ProfileName function */ export declare function ProfileName(profile: Profile): string; /** * NewOutput creates a new Output instance - matches Go NewOutput function */ export declare function NewOutput(writer?: NodeJS.WriteStream | NodeJS.WritableStream, ...opts: OutputOption[]): OutputImpl; /** * WithProfile sets the color profile for an Output - matches Go WithProfile function */ export declare function WithProfile(profile: Profile): OutputOption; /** * WithColorCache enables/disables color caching for an Output - matches Go WithColorCache function */ export declare function WithColorCache(enabled: boolean): OutputOption; /** * WithEnvironment sets the environment for an Output - matches Go WithEnvironment function */ export declare function WithEnvironment(environ: import('./types.js').Environ): OutputOption; /** * WithTTY forces TTY assumption for an Output - matches Go WithTTY function */ export declare function WithTTY(assumeTTY: boolean): OutputOption; /** * WithUnsafe enables unsafe mode for an Output - matches Go WithUnsafe function */ export declare function WithUnsafe(): OutputOption; /** * Convert transforms a given Color to a Color supported within the Profile - matches Go Convert function */ export declare function Convert(profile: Profile, color: ColorInterface): ColorInterface; /** * MoveCursor moves the cursor to the given position - matches Go MoveCursor function */ export declare function MoveCursor(row: number, column: number): void; /** * CursorUp moves the cursor up n lines - matches Go CursorUp function */ export declare function CursorUp(n?: number): void; /** * CursorDown moves the cursor down n lines - matches Go CursorDown function */ export declare function CursorDown(n?: number): void; /** * ClearScreen clears the entire screen - matches Go ClearScreen function */ export declare function ClearScreen(): void; /** * ClearLine clears the current line - matches Go ClearLine function */ export declare function ClearLine(): void; /** * HideCursor hides the cursor - matches Go HideCursor function */ export declare function HideCursor(): void; /** * ShowCursor shows the cursor - matches Go ShowCursor function */ export declare function ShowCursor(): void; /** * AltScreen switches to alternate screen - matches Go AltScreen function */ export declare function AltScreen(): void; /** * ExitAltScreen exits alternate screen - matches Go ExitAltScreen function */ export declare function ExitAltScreen(): void; /** * SetWindowTitle sets the terminal window title - matches Go SetWindowTitle function */ export declare function SetWindowTitle(title: string): void; /** * EnableMouse enables mouse support - matches Go EnableMouse function */ export declare function EnableMouse(): void; /** * DisableMouse disables mouse support - matches Go DisableMouse function */ export declare function DisableMouse(): void; /** * Hyperlink creates a clickable hyperlink - matches Go Hyperlink function */ export declare function Hyperlink(link: string, name: string): string; /** * Notify sends a terminal notification - matches Go Notify function */ export declare function Notify(title: string, body: string): void; /** * CreateNotify creates a notification string - convenience function */ export declare function CreateNotify(title: string, body: string): string; //# sourceMappingURL=go-style.d.ts.map