/** * Standalone hover content builder functions. * * Extracted from DomainLangHoverProvider to reduce class complexity * and enable independent testing of hover content generation. * * Each builder takes typed AST nodes (not generic AstNode) and the helper * functions needed for formatting, keeping them pure and testable. * * @module lsp/hover/hover-builders */ import type { BoundedContext, Domain, Relationship, Type } from '../../generated/ast.js'; /** * Wraps text in a domain-lang fenced code block. */ export declare function codeBlock(text: string): string; /** * Formats hover output with a consistent header/body structure. * * @param commentBlock - Documentation comment prefix (or empty) * @param emoji - Emoji icon for the type * @param typeName - Lowercase type name * @param name - Element name (optional) * @param fields - Body content fields */ export declare function formatHoverContent(commentBlock: string, emoji: string, typeName: string, name: string | undefined, fields: string[]): string; /** * Callback for creating reference links. * Provided by the hover provider which has access to the qualified name provider. */ export type RefLinkFn = (ref: Type | undefined, label?: string) => string; /** * Builds a signature string for a domain (e.g., "Domain Sales in Commerce"). */ export declare function buildDomainSignature(domain: Domain): string; /** * Builds hover fields for a Domain node. * * @param domain - The domain AST node * @param refLink - Function to create reference links * @returns Array of formatted field strings */ export declare function buildDomainFields(domain: Domain, refLink: RefLinkFn): string[]; /** * Builds a signature string for a bounded context * (e.g., "boundedcontext OrderManagement for Sales as Core by SalesTeam"). */ export declare function buildBcSignature(bc: BoundedContext): string; /** * Builds hover fields for a BoundedContext node. * * @param bc - The bounded context AST node * @param refLink - Function to create reference links * @param formatRelationshipLine - Function to format a relationship line * @returns Array of formatted field strings */ export declare function buildBcFields(bc: BoundedContext, refLink: RefLinkFn, formatRelationshipLine: (rel: Relationship) => string): string[];