/** * TITLES EARNED IN PLAY (AREA_PROPOSALS.md 2026-10-14, B2; T91): cosmetic words shown after a name ("Wren / Delver") in chat * and on the nameplate. A title is EARNED, never given: each is a pure condition on the Explorer's Ledger book (lines, pages, * counts), the character's levels and the Field Guide's paid bands, so it needs no extra save and it cannot be lost to a * rename, a move or a restart. A character WEARS at most one (`titleSelected`, saved); the server checks the choice against * what is earned every time it is shown, so nobody can wear an unearned title. The list is fixed: no free text. * * Thresholds are PLACEHOLDERS (balance is done last, with James). */ import { type LedgerLevelSkill, type LedgerLevels, type LedgerSection } from './explorerLedger.js'; export type TitleCondition = { kind: 'count'; section: LedgerSection; min: number; } | { kind: 'page'; section: LedgerSection; } | { kind: 'line'; id: string; } | { kind: 'level'; skill: LedgerLevelSkill; min: number; } /** A paid id in the Ledger's paid set (a Field Guide band bonus). */ | { kind: 'paid'; id: string; }; export type TitleDef = { /** Stable; saved as `titleSelected`. Never renamed. */ id: string; /** What is shown after the name. */ label: string; /** Plain words for the picker: how it is earned. */ how: string; when: TitleCondition; }; export declare const TITLES: readonly TitleDef[]; export declare function titleDef(id: unknown): TitleDef | null; /** What a title is judged against. */ export type TitleContext = { /** Every Ledger line id the character has earned. */ earned: ReadonlySet; levels: LedgerLevels; /** The Ledger's paid set (Field Guide band bonuses live in it). */ paid: ReadonlySet; }; export declare function titleEarned(def: TitleDef, ctx: TitleContext): boolean; /** The ids of every title a character has earned, in list order. Pure. */ export declare function titlesEarned(ctx: TitleContext): string[]; /** The label to show for a chosen title, or null when it is unknown or not earned (the only way a title reaches a nameplate). */ export declare function titleToShow(selected: unknown, earned: readonly string[]): string | null; /** Whatever the database held, made safe: a known title id or ''. */ export declare function normalizeTitleSelected(raw: unknown): string; /** The wire snapshot: what the picker draws (the definitions are in this file). */ export type TitlesSnapshot = { earned: string[]; selected: string; }; //# sourceMappingURL=titles.d.ts.map