# XWUIGameCodexViewer

An encyclopedia/lore viewer with a category tab bar plus a sidebar-list-and-content-reader layout. Tabs come from the `tabs` config (defaults to `people`, `places`, `lore`, `items`) and each can show a discovery count like `lore (3/8)` when `showProgress` is on; the `entries` data object groups entries per tab key, with undiscovered ones locked and shown as `???`. Clicking a discovered sidebar entry loads its `title`/`text` into the reader and emits an `entry-selected` event; `setActiveTab()` and `selectEntry()` drive navigation.

## Basic Usage

Instantiates the codex viewer against the `#app` container with the default four tabs, populated People and Lore entries (including one locked "???" person), and the reader opened on a discovered person.

```example
file: examples/BasicUsage.ts
html: examples/BasicUsage.html
title: Basic Usage
description: An XWUIGameCodexViewer with default tabs, discovered People/Lore entries plus a locked one, opened to Elara on the People tab.
```

## Lore Library

A worldbuilding archive that swaps the default tabs for a custom `lore`/`factions` pair, both filled with rich discovered entries and opened on a lore page.

```example
file: examples/LoreLibrary.ts
html: examples/BasicUsage.html
title: Lore Library
description: A two-tab (Lore + Factions) codex of fully discovered worldbuilding entries, opened on "The First Flame".
```

## Discovery Progress

Highlights the discovery counter and locked rows: a partly-explored Places tab (1/3) shows the `(n/total)` label and two unfound `???` entries.

```example
file: examples/DiscoveryProgress.ts
html: examples/BasicUsage.html
title: Discovery Progress
description: A Places tab that is only 1/3 discovered, surfacing the progress counter and locked "???" rows.
```

```api
```
