/** Terminal color identifiers used by layout helper functions */ export declare enum Colors { green = "green", purple = "purple", blue = "blue", limeGreen = "limeGreen", white = "white", gray = "gray" } /** Palette of colors that are used by layout functions */ export declare const colors: { [key: string]: string; }; /** * Prints bold and green string with a trailing new line * @param text - The text to print * @param noColor - When true, skips ANSI color codes */ export declare function h1(text: string, noColor?: boolean): void; /** * Prints green string with a trailing new line * @param text - The text to print * @param noColor - When true, skips ANSI color codes */ export declare function h2(text: string, noColor?: boolean): void; /** * Prints frame that indicates end or start of the command with a trailing new line * @param noColor - When true, skips ANSI color codes */ export declare function frame(noColor?: boolean): void; /** * Prints string that can be one of the {@link Colors} default without a new line at the end * @param {string} text - The text to print * @param {Colors} color - The color to use for printing */ export declare function span(text: string, color?: Colors, noColor?: boolean): void; /** * Prints string that can be one of the {@link Colors} default without a new line at the end * @param {string} text - The text to print * @param {Colors} color - The color to use for printing */ export declare function p(text: string, color?: Colors, noColor?: boolean): void; /** Returns colored text that will be printed out by span (without a new line at the end) or p (with a trailing new line) */ export declare function coloredText(text: string, color?: Colors): string; /** * Prints blue line separator with a trailing new line * @param noColor - When true, skips ANSI color codes */ export declare function lineSeparator(noColor?: boolean): void; /** Prints new line */ export declare function newLine(): void; /** A single node in the file-tree output structure */ export interface TreeNode { name: string; items?: TreeNode[]; } /** Root container for a file-tree output structure */ export interface TreeData { items: TreeNode[]; } /** * @param node The tree data to visualize. * @param prefix Internal parameter used for recursion * @returns Prints string showing the tree structure with clickable file paths in the console * @internal prefix parameter is used internally for recursion * @example * const data = { * items: [ * { * name: 'src', * items: [ * { name: 'index.js' }, * { * name: 'utils', * items: [ * { name: span('helper.js', Colors.green) } * ] * } * ] * }, * { * name: 'package.json' * } * ] * }; * * const result = printFileTreeInConsole(data); * // Output: * // ├─ src * // │ ├─ index.js * // │ └─ utils * // │ └─ helper.js <= this will be green * // └─ package.json */ export declare function printFileTreeInConsole(node: TreeData, prefix?: string): void; /** * Prints empty new line */ export declare function emptyNewLine(): void; /** * Takes array of paths and transforms it into a TreeData structure for the tree output helper * @param paths - Array of relative file paths to include in the tree * @param localUrls - Map of file names to their colored local URL strings * @param fileUrls - Map of file names to their clickable file path strings * @param printEnvUrl - Whether to include the environment URL for widget nodes */ export declare function buildTreeFromPaths(paths: string[], localUrls: Record, fileUrls: Record, printEnvUrl?: boolean): TreeData;