refactor(breadcrumb): replace scrollBreadcrumbsStore singleton with lazy accessor

Convert the eager scrollBreadcrumbsStore singleton to getScrollBreadcrumbsStore()
(+ __resetScrollBreadcrumbsStore for tests) and add a public destroy() that
disconnects the IntersectionObserver and scroll listener. Update the feature
barrel and consumers (BreadcrumbHeader, BreadcrumbHeaderSeeded, NavigationWrapper).
This commit is contained in:
Ilia Mashkov
2026-06-01 18:46:10 +03:00
parent 6877807aaf
commit 839460726e
5 changed files with 28 additions and 6 deletions
@@ -6,9 +6,11 @@
import { type Snippet } from 'svelte';
import {
type NavigationAction,
scrollBreadcrumbsStore,
getScrollBreadcrumbsStore,
} from '../../model';
const scrollBreadcrumbsStore = getScrollBreadcrumbsStore();
interface Props {
/**
* Navigation index