import type{LyraEventDetailSnapshot}from'../../../internal/lyra-element.js';import{type TemplateResult,type PropertyValues}from'lit';import{LyraElement}from'../../../internal/lyra-element.js';export type TestStatus='passed'|'failed'|'skipped'|'running';export type TestRunState='idle'|'running'|'complete';export interface TestCaseResult{id:string;name:string; /** Foreign runtime values normalize once to the localized neutral `skipped` fallback. */ status:TestStatus;durationMs?:number;message?:string;}export interface TestSuiteResult{id:string;name:string;tests:readonly TestCaseResult[];} /** Returns the canonical collision-free rich-detail slot name for one suite/test pair. * * Well-formed ids use the same segment encoding as `encodeURIComponent`. Isolated UTF-16 * surrogates, which `encodeURIComponent` rejects, are encoded as uppercase `%uXXXX` code units so * every string accepted by the component still has a deterministic, distinct slot name. */ export declare function testResultDetailSlotName(suiteId:string,testId:string):string;export interface LyraTestResultsEventMap{'lr-test-select':CustomEvent<{suiteId:string;testId:string;}>;'lr-filter-change':CustomEvent>;'lr-toggle':CustomEvent<{suiteId:string;testId:string;expanded:boolean;}>;} /** * `` — a pass/fail suite summary with per-status counts, status filter * toggles, and per-test rows whose failures auto-expand by default and can host rich slotted * detail (e.g. a diff or code block) alongside the plain failure message. * Empty/blank suite and test ids are omitted and duplicates use first-wins identity. At most 1,000 * uniquely identified suite/test rows are mounted. Manually expanded identities and * failures reserve positions before ordinary input-order rows, while the four summary counts cover * the complete normalized input. Foreign runtime statuses normalize once to the localized neutral * `skipped` fallback. Completion announcements require an explicit same-`runId` * `runState="running"` -> `"complete"` transition; clearing data alone is not treated as a * completed run. * * Public collection properties take bounded, clone-owned readonly snapshots. Create a new * collection and reassign it after changes; mutating the assigned array does not update the view. * * @customElement lr-test-results * @event lr-test-select - `detail: { suiteId, testId }` — a test row's name was activated. * @event lr-filter-change - `detail: { statuses }` — the status-set filter changed. * @event lr-toggle - `detail: { suiteId, testId, expanded }` — a row's failure detail was * expanded/collapsed. The identity shape is invariant even when `testId` is globally unique. * @slot detail-{encodedSuiteId}:{encodedTestId} - Collision-free suite-scoped rich detail for a * test, and the only detail slot this component reads. Derive it with * `testResultDetailSlotName(suiteId, testId)` rather than assembling it by hand. The legacy * `detail-{suiteId}-{testId}` and `detail-{testId}` spellings were removed in 9.0.0; content * assigned to either is simply never slotted. * @csspart base - The root wrapper; carries the localized "Test results" `role="group"` semantics * unless a non-empty host `aria-label` already makes the host the overall semantic owner. * Explicit `aria-label=""` remains empty instead of restoring the fallback. * @csspart summary - The status-count strip. * @csspart count - One status count; carries `data-status`. * @csspart filter - The filter-toggle row. * @csspart filter-toggle - One status filter toggle; carries `data-status` and `aria-pressed`. * @csspart suite - One suite section. * @csspart suite-header - The suite's name row. * @csspart test - One test row; carries `data-status`. * @csspart test-status - A language-neutral decorative status glyph and its localized visible * status-word text; carries `data-status`. * @csspart test-name - The activatable test-name button. * @csspart test-duration - The duration text. * @csspart test-expand-toggle - The expand/collapse button for a row's failure detail. Its * accessible name joins the suite and test name with the localized * `accessibleLabelSeparator`. Rendered for any failed test, or any test with canonical * suite-scoped detail content. * @csspart failure - The failure-detail wrapper; hidden while collapsed. * @csspart failure-message - The failure's plain message text. * @csspart limit - Localized resource-ceiling notice. * @csspart empty - Empty/no-match state, including a populated run hidden entirely by filters. * @cssprop [--lr-test-results-filter-active-bg=var(--lr-color-brand-quiet)] - Background of a pressed * (active) status filter toggle. * @cssprop [--lr-test-results-filter-active-border=var(--lr-color-brand)] - Border color of a pressed * (active) status filter toggle. * @cssprop [--lr-test-results-filter-active-color=var(--lr-color-brand)] - Text color of a pressed * (active) status filter toggle. Restyling the pressed state otherwise requires overriding the * library-wide brand tokens, since `::part(filter-toggle)[aria-pressed]` is invalid CSS. * @cssprop [--lr-test-results-passed-color=var(--lr-color-success)] - Passed-state foreground. * @cssprop [--lr-test-results-failed-color=var(--lr-color-danger)] - Failed-state foreground. * @cssprop [--lr-test-results-skipped-color=var(--lr-color-text-quiet)] - Skipped-state foreground. * @cssprop [--lr-test-results-running-color=var(--lr-color-brand)] - Running-state foreground. * @cssprop [--lr-test-results-spinner-size=var(--lr-size-1em)] - Diameter of the composed spinner * in a running test row. * @status stable * @since 4.0.0 */ export declare class LyraTestResults extends LyraElement{protected static readonly ownedCollectionProperties:readonly string[]; /** Each suite (and its nested tests) is caller-owned data -- only the outer sequence is * bounded/detached/frozen. A generic structural clone would silently drop an accessor-defined * `status` (no data descriptor to copy) before `rebuildNormalizedSuites()` ever saw it, so a * foreign provider's status would default to `skipped` without the single normalizing read the * class contract promises. Preserving item identity keeps the real property live for that one * read. */ protected static readonly identityCollectionProperties:readonly string[];static styles:import("lit").CSSResultGroup[];protected static readonly immutableEventDetails:readonly string[]; /** The suites to render, grouped in order. Controlled and never mutated by this component -- * pass a new array (e.g. as a run streams in) to update it. Duplicate suite ids and per-suite * test ids use deterministic first-wins identity. */ suites:readonly TestSuiteResult[]; /** When non-empty, only tests whose status is in this set are shown. Empty means "show all". */ statusFilter:readonly TestStatus[]; /** Stable source-run identity used to correlate lifecycle announcements. */ runId:string|null; /** Explicit source-run lifecycle; only a same-id running -> complete transition announces. */ runState:TestRunState; /** Whether a failed test's detail auto-expands. A row the user has manually toggled always * keeps its own explicit state regardless of this flag. */ autoExpandFailures:boolean; /** Explicit per-row expand/collapse overrides, keyed by suite+test identity. Absence defers to * `autoExpandFailures`. */ private manualExpanded;private liveRegion?;private normalizedSuitesCache;private projectedSuitesCache;private completeStatusCounts;private normalizedTestKeys;private detailSlotNames;private projectionTruncated;private limitAnnouncementSink?;private limitAnnouncementInitialized;private previouslyTruncated;private readonly idPrefix; /** Text queued by `willUpdate` for the completion announcement, flushed once the live region * has rendered (it may not exist yet on the very first update). */ private pendingCompletionAnnouncement;connectedCallback():void;disconnectedCallback():void;adoptedCallback():void;private syncLimitAnnouncementSink;protected willUpdate(changed:PropertyValues):void;private rebuildNormalizedSuites;private rebuildProjection;protected updated(changed:PropertyValues):void;private countOf; /** All four status counts in one pass over every suite/test, for callers (namely * `renderSummary()`) that need every status's count together rather than one at a time via * repeated `countOf()` calls. */ private computeStatusCounts;private testKey;private scopedDetailSlot;private rebuildDetailSlotNames;private hasDetail;private isExpanded;private toggleFilter;private toggleExpanded;private onDetailSlotChange;private renderSummary;private renderTest;private renderSuite;render():TemplateResult;}declare global{interface HTMLElementTagNameMap{'lr-test-results':LyraTestResults;}}