jules 73fd8ccf52 RecordGroupSection: sentence-case group header
Drops the tracking-wide uppercase micro-label treatment for a 13px
sentence-case header — softer fit for consumer surfaces.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 22:46:07 +10:00

@crema/records-ui

Personal-records primitives for the personal cloud's Records surface (arcadia-personal-cloud docs/RECORDS.md): kind-typed record cards, group sections with privacy framing, field tables and spec-driven field inputs, tier badges, the record→Markdown renderer, and a TD3 passport MRZ parser.

This lib ships shapes and pure logic, not data fetching. The app owns the API client, the passkey doc-vault crypto, and flow orchestration; this lib renders records and parses/renders their field structures.

Public API

import {
  RecordCard, RecordGroupSection, TierBadge, RecordKindIcon,
  FieldTable, FieldInputs, KeyValueEditor, RecordsEmpty,
  renderRecordMd, parseMrzTd3,
  type RecordKindInfo, type FieldSpec, type RecordTier,
} from "@crema/records-ui"

// Group section with the locked-group privacy framing
<RecordGroupSection label="Identity" locked>
  <RecordCard record={summary} icon="passport" onClick={open} />
</RecordGroupSection>

// Read view of fields (registry order, blanks skipped)
<FieldTable fields={kind.fields} data={record.data} />

// Spec-driven add/edit inputs; KeyValueEditor for free-form `other`
<FieldInputs fields={kind.fields} values={draft} onChange={set} />

// The Markdown the assistant consumes (mirror of the server renderer)
const md = renderRecordMd("Passport", "My passport", kind.fields, data)

// Fully-local passport MRZ parse (two 44-char lines, check digits verified)
const mrz = parseMrzTd3(pastedText)

Field specs come from the backend registry (GET /me/records/kinds) — this lib defines the types and rendering, never the vocabulary.

Token-themed throughout (bg-card, text-muted-foreground, --primary); no hex values. lucide-react is the only dependency (a Crema shared dep — consumers alias it to their installed copy).

Description
Crema personal-records UI primitives
Readme 52 KiB
Languages
TypeScript 100%