@bygghammar/cms-platform 0.69.0 → 0.69.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bygghammar/cms-platform",
3
- "version": "0.69.0",
3
+ "version": "0.69.1",
4
4
  "description": "Shared CMS platform: blocks, block types, i18n core, UI primitives and design-token contract used by every Bygghammar/Voyara site.",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -212,8 +212,15 @@ export function SiteHeader({
212
212
  useEffect(() => {
213
213
  const detect = () => setDarkHero(Boolean(document.querySelector('[data-site-hero="dark"]')));
214
214
  detect();
215
- const timer = setTimeout(detect, 150);
216
- return () => clearTimeout(timer);
215
+ // Blocks stream in after the route commits, so keep watching the document
216
+ // until the hero (or its absence) is settled.
217
+ const observer = new MutationObserver(detect);
218
+ observer.observe(document.body, { childList: true, subtree: true });
219
+ const stop = setTimeout(() => observer.disconnect(), 3000);
220
+ return () => {
221
+ observer.disconnect();
222
+ clearTimeout(stop);
223
+ };
217
224
  }, [pathname]);
218
225
 
219
226
  const lightText = (lightTextPaths.includes(pathname) || darkHero) && !scrolled;