---import Icon from'./Icon.astro';
import ReportMark from'./ReportMark.astro';
importtype { SheetFacets } from'../lib/sheets';
interface Props {
href:string;
/** Zero-padded index, supplied by the list so a row never has to know * where it sits. */ n:string;
title:string;
reportGuide?:boolean;
/** The kind mark — the domain tag for a sheet, the topic for a payload. */ kind:string;
kindIcon?:string;
accent?:string;
/** Trailing slot: date / page count. Dropped below md. */ meta?:string;
/** Disclosure detail, revealed on hover/focus. */ excerpt?:string;
tagline?:string;
/** Client-side filter bucket (index page). */ bucket?:string;
/** Facets for the sheet filter panel. A row without them is not filterable * and the panel ignores it. */ facets?:SheetFacets;
}
const { href, n, title, kind, kindIcon ='doc', accent ='foam', meta, excerpt, tagline, bucket, reportGuide, facets } = Astro.props;
// `|` cannot occur in a tag or a tool name, so it is a safe separator where// a space or a comma is not (`John the Ripper`, `responder, ntlmrelayx`).const filterAttrs = facets
? {
'data-sf-row':'',
'data-text': facets.text,
'data-tags': facets.tags.join('|'),
'data-tools': facets.tools.join('|'),
'data-diff': facets.diff,
'data-sec': facets.sec,
}
: {};
/** * One record in an index — the site's core object, ported from the main * site's RecordRow. One line, not a card: the title is NOT a display heading, * so a list of fifty stays scannable. * * Rule #6 of the redesign handoff: the hover is a PAPER wash (`--overlay`), * not the solid ink wipe — the title must stay ≥4.5:1 on hover — so nothing * here re-colours the text on hover. See `.rec` in daemon.css. */---<aclass="rec"href={href} style={`--acc: var(--${accent});`} data-bucket={bucket} {...filterAttrs}>
<spanclass="rec__grid">
<spanclass="rec__n">{n}</span>
<spanclass="rec__kind"><Iconname={kindIcon} /> {kind}</span>
<spanclass="rec__title">{title} <ReportMarkmarked={reportGuide} /></span>
<spanclass="rec__date">{meta}</span>
<spanclass="rec__arrow"><Iconname="chevron" /></span>
{(excerpt || tagline) && (
<spanclass="rec__reveal"><span>
{excerpt && <spanclass="rec__excerpt">{excerpt}</span>}
{tagline && <spanclass="rec__tagline">{tagline}</span>}
</span></span>
)}
</span>
</a>