featherbit UI
    Preparing search index...

    Module theme

    Single source of truth for the dark/light theme flip: the data-theme attribute on documentElement and its theme localStorage key.

    ThemeToggle and the command palette's toggle-theme action both need to flip the theme; if each kept its own copy of "is it dark" state, one could flip the DOM/localStorage while the other's cached copy went stale (the same class of bug usePortNames guards against for port-name visibility). Centralizing the flip here, plus a change event mounted components can listen for, keeps every caller in sync without lifting the state into App.

    THEME_CHANGE_EVENT
    isDarkTheme
    toggleTheme