{"name":"context-cards","title":"Context Cards","description":"","kind":"block","category":"agent","status":"stable","props":{"title":{"type":"string","default":"All chunks"},"count":{"type":"string","description":"Shown as given (tabular numbers)."},"chunks":{"type":"array","items":{"title":"string","chars":"string","body":"string","source":"string","href":"string?","badge":"string","tone":"neutral|red|green|orange|accent"},"description":"Cards present at the first render rise staggered with appear; later ones enter without delay."},"tone":{"type":"enum","values":["neutral","red","green","orange","accent"],"default":"neutral","part":"badge","description":"Per-chunk badge tint."},"appear":{"type":"boolean","default":false,"description":"Whether the header and the cards present at mount enter (the header fades in, the cards rise staggered). Off by default: set it on the set your code adds live, never on one rendered from history or with the page (a mount is not an arrival). Cards added after mount enter either way."}},"playground":{"name":"Playground","props":{"title":"Sources","count":"2","chunks":[{"title":"Refund window","chars":"412 characters","body":"Annual plans: full refund within 30 days of renewal.","source":"Billing Policy 2026.pdf","badge":"PDF","tone":"red"},{"title":"Who approves refunds","chars":"236 characters","body":"Refunds over $500 need sign-off from Finance.","source":"Support Playbook.docx","badge":"DOC","tone":"accent"}]}},"exampleFiles":[{"file":"default","title":"Sources behind a refund answer"},{"file":"streaming","title":"Sources arriving during an incident question"},{"file":"search-results","title":"Every chunk found before a renewal call"}],"worstCase":[{"name":"Long names","props":{"title":"All chunks retrieved for the quarterly supplier compliance review","count":"12,480","chunks":[{"title":"Vendor onboarding rule for SOC 2 attestation of regional payment processors","chars":"1,048,576 characters","body":"SOC 2 attestation must be verified before a new vendor can be added: https://compliance.example.com/vendors/onboarding/soc-2/attestation-requirements-2025.pdf","source":"Vendor Onboarding Standard Operating Procedure — Revision 14 (final, signed).pdf","badge":"DOCX","tone":"accent"}]}},{"name":"Zero chunks","props":{"title":"All chunks","count":"0","chunks":[]}},{"name":"Fourteen chunks","props":{"title":"All chunks","count":"14","chunks":[{"title":"Chunk 1: database latency log","chars":"137 characters","body":"Replica 3 held p95 under 18 ms overnight.","source":"Latency Log 1.csv","badge":"CSV","tone":"green"},{"title":"Chunk 2: database latency log","chars":"274 characters","body":"Replica 3 held p95 under 18 ms overnight.","source":"Latency Log 2.csv","badge":"CSV","tone":"green"},{"title":"Chunk 3: database latency log","chars":"411 characters","body":"Replica 3 held p95 under 18 ms overnight.","source":"Latency Log 3.csv","badge":"CSV","tone":"green"},{"title":"Chunk 4: database latency log","chars":"548 characters","body":"Replica 3 held p95 under 18 ms overnight.","source":"Latency Log 4.csv","badge":"CSV","tone":"green"},{"title":"Chunk 5: database latency log","chars":"685 characters","body":"Replica 3 held p95 under 18 ms overnight.","source":"Latency Log 5.csv","badge":"CSV","tone":"green"},{"title":"Chunk 6: database latency log","chars":"822 characters","body":"Replica 3 held p95 under 18 ms overnight.","source":"Latency Log 6.csv","badge":"CSV","tone":"green"},{"title":"Chunk 7: database latency log","chars":"959 characters","body":"Replica 3 held p95 under 18 ms overnight.","source":"Latency Log 7.csv","badge":"CSV","tone":"green"},{"title":"Chunk 8: database latency log","chars":"1,096 characters","body":"Replica 3 held p95 under 18 ms overnight.","source":"Latency Log 8.csv","badge":"CSV","tone":"green"},{"title":"Chunk 9: database latency log","chars":"1,233 characters","body":"Replica 3 held p95 under 18 ms overnight.","source":"Latency Log 9.csv","badge":"CSV","tone":"green"},{"title":"Chunk 10: database latency log","chars":"1,370 characters","body":"Replica 3 held p95 under 18 ms overnight.","source":"Latency Log 10.csv","badge":"CSV","tone":"green"},{"title":"Chunk 11: database latency log","chars":"1,507 characters","body":"Replica 3 held p95 under 18 ms overnight.","source":"Latency Log 11.csv","badge":"CSV","tone":"green"},{"title":"Chunk 12: database latency log","chars":"1,644 characters","body":"Replica 3 held p95 under 18 ms overnight.","source":"Latency Log 12.csv","badge":"CSV","tone":"green"},{"title":"Chunk 13: database latency log","chars":"1,781 characters","body":"Replica 3 held p95 under 18 ms overnight.","source":"Latency Log 13.csv","badge":"CSV","tone":"green"},{"title":"Chunk 14: database latency log","chars":"1,918 characters","body":"Replica 3 held p95 under 18 ms overnight.","source":"Latency Log 14.csv","badge":"CSV","tone":"green"}]}},{"name":"Right-to-left","props":{"title":"כל המקטעים","count":"2","chunks":[{"title":"כלל קליטת ספקים","chars":"290 תווים","body":"יש לאמת אישור SOC 2 לפני הוספת ספק חדש.","source":"נוהל קליטה.pdf","badge":"PDF","tone":"red"},{"title":"صف الطلب على الخطط","chars":"1,250 حرفًا","body":"جدول السرعة للربع الرابع: الخطة السنوية +18٪.","source":"تصدير المبيعات.csv","badge":"CSV","tone":"green"}]}}],"anatomy":[{"part":"root","element":"div"},{"part":"header","element":"div","description":"The title, then the chunk count as our Count (boxed, tabular)"},{"part":"title","element":"span"},{"part":"card","element":"div","repeat":true,"description":"--fndn-row-index (set only on cards present at mount) staggers the entrance"},{"part":"bar","element":"div"},{"part":"card-title","element":"span","description":"lines icon + title; the title truncates at the end and carries it as title"},{"part":"chars","element":"span"},{"part":"body","element":"p"},{"part":"footer","element":"div"},{"part":"source","element":"a","description":"source chip: badge + name + arrow; pops in after its card; presses"},{"part":"badge","element":"span","description":"14px file-type square, tinted by data-tone; aria-hidden (the file name says it). Local: a three-letter type does not fit our avatar (two letters)"},{"part":"source-name","element":"span","description":"file name; truncates at the end and carries it as title"}],"states":["source-hover","source-press","focus-visible"],"tokens":["color.accent","color.green","color.hover","color.ink","color.ink-2","color.ink-3","color.inset","color.line","color.on-accent","color.orange","color.red","color.surface","duration.base","duration.enter","duration.fast","duration.press","duration.stagger","easing.out-strong","motion.press-scale","motion.stagger-max","radius.card","radius.pill","shadow.btn","shadow.card","text.sm","text.xs","color.hover-2"],"a11y":{"notes":["Source chips are links (Tab, Enter); with no href they point at '#'.","Truncated titles and file names carry the full text as title.","The badge is aria-hidden: the file name already says the type."]},"motion":["header: fndn-fade-in over duration.enter, together with the first card; only with appear (a plain mount shows everything at once)","cards: with appear, fndn-fade-up over duration.enter, staggered by duration.stagger, capped at motion.stagger-max; only cards present at mount get --fndn-row-index; a card added after mount always enters, with no delay","source chip: no entrance of its own; it arrives with its card","source chip: hover background over duration.fast (gated); press darkens to color.hover-2 and scales to motion.press-scale"]}