feat: add PasswordAuth blueprint illustration

The primary-auth feature RememberMe composes onto. Transcribed from the
ontology password-auth README + .als: the full AuthState lifecycle
(Idle / Submitting / Authenticated / Refreshing / LockedOut / Error), its
8 functions, and a sign-in specimen shown across those states. Adds the
auth transition kinds and wraps the state-machine legend to a second row
so this richer machine's kinds fit without clipping.
This commit is contained in:
Julien Calixte
2026-07-02 23:36:08 +02:00
parent 5dff87a90d
commit 4d2db834ac
5 changed files with 837 additions and 2 deletions

View File

@@ -8,10 +8,12 @@ import { list } from "./listBlueprint"
import { grid } from "./gridBlueprint"
import { calendar } from "./calendarBlueprint"
import { rememberMe } from "./rememberMeBlueprint"
import { passwordAuth } from "./passwordAuthBlueprint"
import ListSpecimen from "@/specimens/ListSpecimen.vue"
import GridSpecimen from "@/specimens/GridSpecimen.vue"
import CalendarSpecimen from "@/specimens/CalendarSpecimen.vue"
import RememberMeSpecimen from "@/specimens/RememberMeSpecimen.vue"
import PasswordAuthSpecimen from "@/specimens/PasswordAuthSpecimen.vue"
export interface RegistryEntry {
blueprint: Blueprint
@@ -22,6 +24,7 @@ export const REGISTRY: Record<string, RegistryEntry> = {
list: { blueprint: list, specimen: ListSpecimen },
grid: { blueprint: grid, specimen: GridSpecimen },
calendar: { blueprint: calendar, specimen: CalendarSpecimen },
"password-auth": { blueprint: passwordAuth, specimen: PasswordAuthSpecimen },
"remember-me": { blueprint: rememberMe, specimen: RememberMeSpecimen },
}
@@ -30,3 +33,15 @@ export const BLUEPRINTS: Blueprint[] = Object.values(REGISTRY).map((e) => e.blue
export function entryFor(slug: string): RegistryEntry | undefined {
return REGISTRY[slug]
}
// Resolve a blueprint's display name (as used in `extendsName` / `related`) to its
// slug, so cross-references between blueprints render as live links. Returns
// undefined when the referenced blueprint is not illustrated yet — the reference
// then renders as plain text.
const slugByName: Record<string, string> = Object.fromEntries(
Object.entries(REGISTRY).map(([slug, e]) => [e.blueprint.name, slug]),
)
export function slugForName(name: string | undefined): string | undefined {
return name ? slugByName[name] : undefined
}