/** * Display mapping shared by the two panels: the scoped class name builder, the * label each node kind gets, and the friendly name shown for a known snapshot * contribution. An unknown name keeps its own spelling, because section names * are extensible and a plugin this one has never seen still has to be readable. * * @module dsh-context-snapshot-bar/client/display */ import type { ContextSnapshotBarKey } from './locales.ts'; /** * The scope root the stylesheet's every rule hangs off. The generated sheet * carries the prototype's own class names verbatim, so the components emit * those names and this class goes on the one wrapper that provides the * palette. */ export declare const SCOPE = "dsh-context-snapshot-bar"; /** * Join the prototype's class names for one element. * @param names - class names; falsy entries are dropped so a state class can be conditional. * @returns the class attribute value. */ export declare function cls(...names: readonly (string | false | undefined)[]): string; /** Copy key naming each node kind in a row and in the inspector. */ export declare const KIND_KEYS: { readonly system: "trajectory.kind.system"; readonly user: "trajectory.kind.user"; readonly injected: "trajectory.kind.injected"; readonly assistant: "trajectory.kind.assistant"; readonly 'tool-result': "trajectory.kind.tool-result"; readonly summary: "trajectory.kind.summary"; }; /** * Name one snapshot contribution for display. * @param name - the name the producer declared. * @param t - the namespace translator. * @returns the friendly name when one is known, otherwise the declared name. */ export declare function sectionLabel(name: string, t: (key: ContextSnapshotBarKey) => string): string; /** * Whether a snapshot contribution has a friendly name. * @param name - the name the producer declared. * @returns true when a friendly name exists. */ export declare function hasSectionLabel(name: string): boolean; /** * Split a digest into the lines it is meant to be read as. * * The Host asks for one line per snapshot entry and nothing else, but a model * can still wrap a line, prefix a marker, or leave a blank one, so the card * normalizes instead of trusting the shape: blank lines are dropped and a * leading list marker is removed, because the card supplies its own list. * * @param text - the digest as the Host answered it. * @returns the non-empty lines, in order. */ export declare function digestLines(text: string): readonly string[]; //# sourceMappingURL=display.d.ts.map