SchemeEvents
SchemeEvents
Theme coordination events.
Published by <esp-root> after initial mount and subscribed to by every
EspalierElementBase descendant so that scheme, seed, and full-theme changes
propagate to scoped-token-aware descendants. All roots share one global bus, so
consumers should use EspalierRoot.subscribeScoped() instead of subscribing
to these events directly. Read initial values from the root; these events are
change-only and are not replayed for late subscribers.
Properties
SchemeEvents has the following properties:
"seed-color-changed"
"seed-color-changed" has a type of { seedColor: string; correlationId: string; }.
Fired when the effective seed color changes.
"scheme-changed"
"scheme-changed" has a type of { scheme: "light" | "dark"; correlationId: string; }.
Fired when the active scheme flips between light and dark.
"theme-changed"
"theme-changed" has a type of { correlationId: string; }.
Fired when either resolved theme object changes (e.g. a new
light-theme or dark-theme attribute is set). Variant-aware
children re-apply their tokens in response.
"icon-sprite-url-changed"
"icon-sprite-url-changed" has a type of { iconSpriteUrl: string; correlationId: string; }.
Fired when the configured component icon sprite URL changes.
Consumers that need the initial value should read it from the
nearest <esp-root>; this event is change-only and is not replayed
for late subscribers.