installedThemesFromList

Theme
stable

Derives the TInstalledThemes summary from the raw IOrigamTheme[] array passed to createOrigam(). Groups themes by name, collects available modes (light/dark), and extracts UI metadata (label, description, swatch). Pure — safe to call server-side.

API

Signature

Signature TypeScript complète, extraite du fichier util.

typescript

API

Paramètres

Paramètres d'entrée acceptés par cet util.

themes
requis
IOrigamTheme[]
The full list of theme objects registered with createOrigam(). Each entry is a semantic variant of a named brand. Entries without a name (root-scoped themes) are ignored.

API

Valeur de retour

La valeur retournée par cet util.

An ordered array of IInstalledTheme objects — one per unique brand name — each carrying the available modes and aggregated UI metadata.

Usage

Exemples

Extraits de code prêts à coller.

Collect installed brand themes

typescript