<!-- GENERATED by scripts/build-llms.mjs from llms/retrieval.md — do not edit this file. -->

# `lr-entity-dossier`

- **Import** `import '@aceshooting/lyra-ui/components/lr-entity-dossier.js';` (stable tag alias; registers the tag)
- **Class** `LyraEntityDossier`, also available unregistered from `@aceshooting/lyra-ui/components/retrieval/entity-dossier/entity-dossier.class.js`
- **Family** `components/retrieval/` — see `llms/index.md` for its siblings
- **Status** `stable` since `4.1.0` — see the maturity and deprecation policy in `llms/shared.md`
- **Release history** [CHANGELOG.md](../../CHANGELOG.md); family-wide breaking-change summaries: [llms-full.txt](../../llms-full.txt)
- **Deprecations** none
- **Optional peers** none
- **Themeable via** 9 parts, 0 custom properties — see this component's own `@csspart`/`@cssprop` list below
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`

---

## `lr-entity-dossier`

Entity detail surface: a persistent header (`lr-entity-card` + an optional confidence `lr-stat`)
above an `lr-tab-group` strip for Relationships (`lr-neighbor-list`), Supporting chunks
(`lr-chunk-inspector`), and Provenance (`lr-provenance-panel`). Pure layout — never fetches, ranks,
or mutates graph/document state.

**Properties:**

- `entity: LyraEntity | null = null` (attribute: false) — `lr-entity-card`'s own `LyraEntity`;
  `null` renders the shared `lr-empty` `noData` state in place of the whole dossier
- `confidence: LyraEntityDossierConfidence | null = null` (attribute: false) —
  readonly `LyraEntityDossierConfidence { label: string; value: string; unit?: string; variant?:
LyraVariant; exactValue?: string; caption?: string; rows?: readonly StatRow[] }` (exported by this
  module; `LyraVariant`
  is the shared semantic variant vocabulary and `StatRow` is `lr-stat`'s row type). All
  caller-supplied domain data, never routed through
  `localize()`. `null` omits the stat entirely — no placeholder
- `neighbors: LyraNeighborRow[] = []` (attribute: false) — forwarded verbatim to
  `lr-neighbor-list.rows` (`{ relation: string; direction: 'in' | 'out' | 'both'; node: LyraEntity }`)
- `chunks: LyraChunk[] = []` (attribute: false) — forwarded to `lr-chunk-inspector.chunks`; the
  evidence for _this entity's own_ summary/properties
- `provenance: LyraProvenance | null = null` (attribute: false) — forwarded to
  `lr-provenance-panel.provenance`; deliberately a separate input from `chunks` (the broader
  grounding chain, which may span other entities/relationships/communities). Pass the same array to
  both when the two genuinely coincide
- `types: LyraNodeTypeStyle[] = []` (attribute: false) — readonly `{ id: string; label: string; color?: string;
shape?: 'circle' | 'square' | 'diamond' }`, the `lr-graph.nodeTypes` entry shape; forwarded to both
  `lr-entity-card` and `lr-provenance-panel`
- `thresholds: { high: number; medium: number } = { high: 0.75, medium: 0.5 }` (attribute: false) —
  forwarded to both `lr-chunk-inspector` and `lr-provenance-panel`
- `groupByRelation: boolean = false` (attribute `group-by-relation`) — forwarded to `lr-neighbor-list`
- `expandable: boolean = false` — forwarded to `lr-neighbor-list`
- `showFocusButton: boolean = true` (attribute `show-focus-button`) — forwarded to `lr-entity-card`
- `communityLabel: string = ''` (attribute `community-label`) — forwarded to `lr-entity-card`
- `accessibleLabel: string | null = null` (attribute `aria-label`) — as a JS-only property while
  the host attribute is absent, names the internal `lr-tab-group` strip. Authored host
  `aria-label` names the dossier as a whole and is not cloned onto the strip

**Events:** declares none of its own. Every composed child's event bubbles through unmodified
(`composed: true`): `lr-entity-select` (`detail: { entityId }`, surfaced from the embedded entity
card or neighbor list), `lr-entity-activate` (`detail: { entityId, occurrenceIndex? }` — surfaced
from the embedded provenance panel's own community card or relationship path strip, the only
source carrying `occurrenceIndex`), `lr-node-expand` (`detail: { nodeId }`),
`lr-chunk-open` (`detail: { chunkId, sourceId, anchor? }`), `lr-expand` (`detail: { chunkId, expanded }`),
`lr-toggle` (`detail: { section, expanded }`), and `lr-tab-show`
(`detail: { tabId: LyraEntityDossierTab }`, where `LyraEntityDossierTab = 'relationships' | 'chunks'
| 'provenance'` — also the `lr-tab-group` slot/tab ids). The Provenance tab's own controls reach the
host the same way and are typed here too: `lr-entity-open` (`detail: { entityId }`, an entity chip
double-click or Space), `lr-drill` (`detail: { communityId }`, a community card's title, drill button, or
overflow chip), and `lr-relation-activate` (`detail: { relation, sourceNodeId?, targetNodeId?, occurrenceIndex }`, a
relationship path-strip edge).

**Slots:** none.

**CSS parts:** `base` (root, or the empty state's wrapper), `empty` (shown when `entity` is `null`),
`header`, `entity-card`, `confidence` (only when `confidence` is set), `tabs`, `neighbor-list`,
`chunk-inspector`, `provenance-panel`.

**Themeable custom properties:** shared tokens only.

**Optional peer deps:** none.

**Known gotchas:**

- The active tab is internal `@state`, not a controlled property — `lr-tab-group` already owns it, and a
  stale public property re-bound on an unrelated re-render would fight the user's own click.
- Tab labels reuse each composed child's own `localize()` key (`neighborListLabel`,
  `chunkInspectorLabel`, `provenancePanelLabel`), so a locale only translates each string once.

---
