lotus(#5): native transparent-background + Lotus theme hooks
CI / Build embedded bundle (push) Successful in 45s
CI / Publish to Gitea npm registry (push) Has been skipped

Adds body.lotus-transparent (lotusTransparent=1) so the host wallpaper
shows through the call natively, retiring cinny's injected
`html,body{background:none!important}` hack; and body.lotus-theme
(lotusTheme=1) as a source-level Compound-token override hook for the
Lotus/TDS palette (driven by the existing setTheme channel / URL flags).
Additive: no-op without the flags.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Lotus CI
2026-06-29 23:30:57 -04:00
co-authored by Claude Opus 4.8
parent 10e6ba46e2
commit 22be058108
2 changed files with 25 additions and 0 deletions
+6
View File
@@ -11,6 +11,7 @@ import { type IThemeChangeActionRequest } from "matrix-widget-api";
import { getUrlParams } from "./UrlParams";
import { widget } from "./widget";
import { lotusFlag } from "./lotus/lotusWidget";
export const useTheme = (): void => {
const [requestedTheme, setRequestedTheme] = useState(
@@ -57,5 +58,10 @@ export const useTheme = (): void => {
previousTheme.current = themeString;
}
document.body.classList.remove("no-theme");
// [lotus #5] Native theming hooks, opted in by the host via URL flags, so
// it no longer has to inject CSS into the iframe after load.
if (lotusFlag("lotusTransparent"))
document.body.classList.add("lotus-transparent");
if (lotusFlag("lotusTheme")) document.body.classList.add("lotus-theme");
}, [previousTheme, requestedTheme]);
};