import { TServiceParams } from "@digital-alchemy/core"; import { InspectOptions } from "util"; import { EditableSearchBoxOptions, MainMenuEntry, MenuHelpText, MenuSearchOptions } from "../helpers"; export declare const INTERNAL_ENTRY: unique symbol; export declare function TextRendering({ terminal, config, internal, lifecycle }: TServiceParams): { /** * # Helper method for component rendering * * ## Render * * ~ 2 vertical lists horizontally next to each other * ~ Place a dim blue line between them * ~ Prepend a search box (if appropriate) */ assemble([leftEntries, rightEntries]: [string[], string[]], { left, right, search }?: { left?: string; right?: string; search?: string; }): string[]; debug(data: object, options?: InspectOptions): string; /** * Fuzzy sorting for menu entries. * More greedy than the basic `fuzzySort` * * Takes into account helpText and category in addition to label */ fuzzyMenuSort(searchText: string, data: MainMenuEntry[], options?: MenuSearchOptions): MainMenuEntry[]; /** * Take a listing of menu entries, and use fuzzy sort to filter & order results */ fuzzySort(searchText: string, data: MainMenuEntry[]): MainMenuEntry[]; helpFormat(helpText: MenuHelpText): string; mergeHelp(message: string, { helpText }?: { helpText?: MenuHelpText; }): string; /** * Take a multiline string, and add an appropriate number of spaces to the beginning of each line */ pad(message: string, amount?: number): string; /** * Component rendering */ searchBox(searchText: string, size?: number): string[]; searchBoxEditable({ value, width, bgColor, padding, cursor: index, placeholder, }: EditableSearchBoxOptions): string[]; /** * Take return a an array slice based on the position of a given value, and PAGE_SIZE. */ selectRange(entries: MainMenuEntry[], value: unknown, extras?: boolean): MainMenuEntry[]; /** * Take in a variable of unknown type, return formatted pretty text to print to console * * Recursively handles objects and arrays. */ type(item: unknown, nested?: number, maxLength?: number): string; };