import{type TemplateResult}from'lit';import{LyraElement}from'../../../internal/lyra-element.js';import type{LyraFrame}from'../../../internal/variants.js';import{type GitStatus}from'../../data/file-tree/file-tree.class.js';import{type LyraClipboardWriteFailure,type LyraClipboardWriteSuccess}from'../../../internal/clipboard.js'; /** Visual chrome for ``'s root — the library's shared container-frame vocabulary. */ export type CommitCardAppearance=LyraFrame;export interface CommitFileChange{path:string; /** Normalized to a finite non-negative integer before display and aggregate arithmetic. */ additions:number; /** Normalized to a finite non-negative integer before display and aggregate arithmetic. */ deletions:number; /** An out-of-union value degrades the row to status-less (no glyph/badge) rather than * throwing -- see the shared `GIT_STATUSES` guard in ``. */ status?:GitStatus;}export interface LyraCommitCardEventMap{'lr-file-select':CustomEvent<{filePath:string;}>;'lr-toggle':CustomEvent<{collapsed:boolean;}>;'lr-copy':CustomEvent;'lr-error':CustomEvent;'lr-copy-error':CustomEvent;} /** * `` — compact commit summary (subject, author/time, diffstat, per-file changes) * that links file rows out to a diff view. Set `compact` (tighter padding) and/or * `frame="plain"` (no border/padding at all) when embedding one as a row in a commit list or * PR timeline, so the built-in card chrome doesn't double up against the list's own — same * convention as ``'s own `compact`/`frame`. * Duplicate file paths normalize before totals, counts, rendering, and selection events; the * first occurrence wins. File addition/deletion counts are normalized to finite non-negative integers before totals, * localized display, and accessible summaries are derived. * * 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-commit-card * @event lr-file-select - `detail: { filePath }` — a file row was activated. * @event lr-toggle - `detail: { collapsed }` — the file-list fold changed. * @event lr-copy - `detail: { ok: true, text }` — the full-hash clipboard write completed. * @event lr-error - The clipboard write failed; generic no-detail notification. * @event lr-copy-error - `detail: { ok: false, text, reason, error }` — typed clipboard failure. * @slot actions - Trailing header controls (e.g. an "open PR" button). * @csspart base - The root wrapper. * @csspart subject - The commit message's first line. * @csspart body - The commit message's remaining lines. * @csspart hash - The abbreviated hash text. * @csspart meta - The author/time/diffstat row. * @csspart author - The author text. * @csspart time - The `