The styles lane (MOB_STYLES.md), minimum-viable slice: token-only style
packages. A style package ships priv/mob_style.exs declaring a theme
module; activation is config :mob, :styles, [...] plus
config :mob, :default_style, :name in mob.exs, and the runtime manifest
carries the resolved set so core can apply the default style's theme at boot.
A style may also bundle font files (assets: %{fonts: [...]}, paths
relative to the style package root) for its theme's fonts: map; the build
ships them exactly like plugin fonts (fonts!/1).
Tokens-only is the doc's smallest tier ("repalette-only styles"); the
per-component native-override tier (cascade, _style dispatch — the mob_m3
case) is NOT implemented yet.
Summary
Functions
The activated styles as {style_dir, manifest} pairs. Names that don't
resolve to a dep or whose manifest fails to load are skipped (surfaced by
validation at build).
Activated style names from mob.exs's config :mob, :styles (Application
env fallback when there is no mob.exs, mirroring
MobDev.Plugin.activated_names/1). A mob.exs that fails to evaluate
raises.
The configured :default_style name (or nil). Same sourcing as activated_names/1.
Absolute paths of the fonts the given styles (default: the activated ones)
bundle via assets: %{fonts: [...]}, resolved against each style's
package dir. Raises when a manifest is invalid or a declared font file
doesn't exist, so the build fails instead of shipping a theme whose fonts
fall back to the system face. A style activated/0 couldn't resolve or
load contributes nothing here.
Loads a style manifest from style_dir. {:ok, map}, or {:error, reason}
when the file is missing/unreadable/not a map (styles REQUIRE a manifest —
there is no tier-0 equivalent).
The runtime-manifest entries for the activated styles:
[%{name, theme}]. Raises at build when an activated style's manifest is
invalid or the configured :default_style isn't among the activated styles
— a misconfigured style must fail the BUILD, not silently render baseline.
Validates the four required fields (MOB_STYLES.md "Minimum viable
manifest"): :name atom, :mob_version requirement string,
:style_spec_version integer, :theme module atom; plus the optional
:assets, a map whose only supported key is :fonts (a list of path
strings relative to the style package root).
Functions
The activated styles as {style_dir, manifest} pairs. Names that don't
resolve to a dep or whose manifest fails to load are skipped (surfaced by
validation at build).
Activated style names from mob.exs's config :mob, :styles (Application
env fallback when there is no mob.exs, mirroring
MobDev.Plugin.activated_names/1). A mob.exs that fails to evaluate
raises.
The configured :default_style name (or nil). Same sourcing as activated_names/1.
Absolute paths of the fonts the given styles (default: the activated ones)
bundle via assets: %{fonts: [...]}, resolved against each style's
package dir. Raises when a manifest is invalid or a declared font file
doesn't exist, so the build fails instead of shipping a theme whose fonts
fall back to the system face. A style activated/0 couldn't resolve or
load contributes nothing here.
Loads a style manifest from style_dir. {:ok, map}, or {:error, reason}
when the file is missing/unreadable/not a map (styles REQUIRE a manifest —
there is no tier-0 equivalent).
The runtime-manifest entries for the activated styles:
[%{name, theme}]. Raises at build when an activated style's manifest is
invalid or the configured :default_style isn't among the activated styles
— a misconfigured style must fail the BUILD, not silently render baseline.
Validates the four required fields (MOB_STYLES.md "Minimum viable
manifest"): :name atom, :mob_version requirement string,
:style_spec_version integer, :theme module atom; plus the optional
:assets, a map whose only supported key is :fonts (a list of path
strings relative to the style package root).