How large the controls in this part of the tree are, in the sense SwiftUI’s controlSize means: a
preference the container expresses and each control interprets, not a size any one of them is given.
Opt-in semantic-token contract the built-in component catalogue reads through, so a component can resolve a
token without knowing the concrete theme type.
Drives the active mode from the OS light/dark preference — light → light, dark → dark — updating live
as the OS scheme changes. Installs a reactive effect (kept alive internally) and designates the pair so
[is_dark] stays consistent. Re-calling replaces the effect (hot reload re-runs setup). A manual
set_mode still wins until the next OS change re-drives it.
Registers a named mode. apply installs the concrete theme when the mode is selected. Re-registering an
id replaces its closure, which is expected: hot reload re-runs the app’s setup and re-registers every mode.
Sets the ambient control size. Reactive: everything that read it re-runs, so a switch re-spaces the
controls already on screen rather than waiting for whatever rebuilds them.
Selects a mode: runs its registered apply closure (if one is registered) and publishes the id to the
reactive active-mode signal. Setting an unregistered id still updates the signal, so an app may drive the
theme from its own effect on [use_mode] instead of registering closures.
Reports the OS light/dark preference into the reactive graph. Called by the runner at window creation and
whenever the OS scheme changes; drives follow_system.