tasmota-esp-web-tools
Version:
Web tools for ESP devices
40 lines (39 loc) • 2.89 kB
TypeScript
interface ConsoleState {
bold: boolean;
italic: boolean;
underline: boolean;
strikethrough: boolean;
foregroundColor: string | null;
backgroundColor: string | null;
fgRgb: string | null;
bgRgb: string | null;
dim: boolean;
reverse: boolean;
carriageReturn: boolean;
lines: string[];
secret: boolean;
blink: boolean;
rapidBlink: boolean;
}
export declare class ColoredConsole {
targetElement: HTMLElement;
state: ConsoleState;
private _destroyed;
private _rafId;
private _timeoutId;
private _atBottom;
private _intersectionObserver?;
private _sentinel;
private _exportLines;
private _redactedLines;
private _visibilityHandler;
constructor(targetElement: HTMLElement);
logs(): string;
private _redactLine;
destroy(): void;
processLine(line: string): Element;
processLines(): void;
addLine(line: string): void;
}
export declare const coloredConsoleStyles = "\n .log {\n flex: 1;\n background-color: #1c1c1c;\n font-family: \"SFMono-Regular\", Consolas, \"Liberation Mono\", Menlo, Courier,\n monospace;\n font-size: 12px;\n padding: 16px;\n overflow: auto;\n line-height: 1.45;\n border-radius: 3px;\n white-space: pre-wrap;\n overflow-wrap: break-word;\n color: #ddd;\n }\n\n .log-bold { font-weight: bold; }\n .log-dim { opacity: 0.5; }\n .log-italic { font-style: italic; }\n .log-underline { text-decoration: underline; }\n .log-strikethrough { text-decoration: line-through; }\n .log-underline.log-strikethrough { text-decoration: underline line-through; }\n .log-blink { animation: blink 1s step-end infinite; }\n .log-rapid-blink { animation: blink 0.4s step-end infinite; }\n @keyframes blink { 50% { opacity: 0; } }\n .log-secret {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }\n .log-secret-redacted { opacity: 0; width: 1px; font-size: 1px; }\n .log-reverse { background: #ddd; color: #1c1c1c; }\n .log-fg-black { color: rgb(128, 128, 128); }\n .log-fg-red { color: rgb(255, 0, 0); }\n .log-fg-green { color: rgb(0, 255, 0); }\n .log-fg-yellow { color: rgb(255, 255, 0); }\n .log-fg-blue { color: rgb(0, 0, 255); }\n .log-fg-magenta { color: rgb(255, 0, 255); }\n .log-fg-cyan { color: rgb(0, 255, 255); }\n .log-fg-white { color: rgb(187, 187, 187); }\n .log-bg-black { background-color: rgb(0, 0, 0); }\n .log-bg-red { background-color: rgb(255, 0, 0); }\n .log-bg-green { background-color: rgb(0, 255, 0); }\n .log-bg-yellow { background-color: rgb(255, 255, 0); }\n .log-bg-blue { background-color: rgb(0, 0, 255); }\n .log-bg-magenta { background-color: rgb(255, 0, 255); }\n .log-bg-cyan { background-color: rgb(0, 255, 255); }\n .log-bg-white { background-color: rgb(255, 255, 255); }\n";
export {};