From 5058c7237500deec93b88728fb7ec027e7a4ecf5 Mon Sep 17 00:00:00 2001 From: daniel-c-harvey Date: Sat, 20 Jun 2026 12:31:13 -0400 Subject: [PATCH] fix(rcl): commit theme.js so RCL interop JS ships via MapStaticAssets theme/ was missing from the per-module .gitignore allowlist (only parallax/ and knob/ were re-included), so theme.js never got committed, was absent from publish output, and 404'd at runtime. Broaden the allowlist to the whole DeepDrftShared.Client/wwwroot/js/ tree so every compiled RCL interop module ships automatically. --- .gitignore | 6 ++++-- DeepDrftShared.Client/wwwroot/js/theme/theme.js | 15 +++++++++++++++ .../wwwroot/js/theme/theme.js.map | 1 + 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 DeepDrftShared.Client/wwwroot/js/theme/theme.js create mode 100644 DeepDrftShared.Client/wwwroot/js/theme/theme.js.map diff --git a/.gitignore b/.gitignore index a22172f..1e8eef0 100644 --- a/.gitignore +++ b/.gitignore @@ -317,5 +317,7 @@ Database/Vaults/* !DeepDrftPublic.Client/wwwroot/js/*.js # RCL compiled JS must be committed — MapStaticAssets serves from build-time manifest; # gitignored TS output is absent when manifest is generated, so absent from publish output. -!DeepDrftShared.Client/wwwroot/js/parallax/ -!DeepDrftShared.Client/wwwroot/js/knob/ \ No newline at end of file +# Re-include the whole RCL js/ tree so every compiled module (parallax, knob, theme, and +# any added later) ships, rather than maintaining a per-module allowlist. +!DeepDrftShared.Client/wwwroot/js/ +!DeepDrftShared.Client/wwwroot/js/** \ No newline at end of file diff --git a/DeepDrftShared.Client/wwwroot/js/theme/theme.js b/DeepDrftShared.Client/wwwroot/js/theme/theme.js new file mode 100644 index 0000000..805e554 --- /dev/null +++ b/DeepDrftShared.Client/wwwroot/js/theme/theme.js @@ -0,0 +1,15 @@ +/** + * theme - body-class helpers for dark-mode theme toggling. + * + * Single Responsibility: apply or remove the deepdrft-theme-dark class on + * document.body so that portaled MudBlazor elements (popovers, menus, selects) + * inherit --deepdrft-popover-surface from body.deepdrft-theme-dark rather than + * from :root only. Popovers portal outside the ThemeWrapperClass div, so only + * a body-level class can reach them. + */ +/** Toggle the deepdrft-theme-dark class on document.body. + * @param isDark true to add the class, false to remove it. */ +export function setBodyThemeClass(isDark) { + document.body.classList.toggle('deepdrft-theme-dark', isDark); +} +//# sourceMappingURL=/js/theme/theme.js.map \ No newline at end of file diff --git a/DeepDrftShared.Client/wwwroot/js/theme/theme.js.map b/DeepDrftShared.Client/wwwroot/js/theme/theme.js.map new file mode 100644 index 0000000..0f49f6b --- /dev/null +++ b/DeepDrftShared.Client/wwwroot/js/theme/theme.js.map @@ -0,0 +1 @@ +{"version":3,"file":"theme.js","sourceRoot":"/Interop/","sources":["theme/theme.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;gEACgE;AAChE,MAAM,UAAU,iBAAiB,CAAC,MAAe;IAC7C,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;AAClE,CAAC"} \ No newline at end of file