refactor(Breadcrumb): simplify entity structure and add tests

This commit is contained in:
Ilia Mashkov
2026-03-02 22:18:41 +03:00
parent af4137f47f
commit 594af924c7
10 changed files with 920 additions and 103 deletions

View File

@@ -1,5 +1,35 @@
/**
* Breadcrumb entity
*
* Tracks page sections using Intersection Observer with scroll direction
* detection. Sections appear in breadcrumbs when scrolling down and exiting
* the viewport top.
*
* @example
* ```svelte
* <script lang="ts">
* import { scrollBreadcrumbsStore } from '$entities/Breadcrumb';
* import { onMount } from 'svelte';
*
* onMount(() => {
* const section = document.getElementById('section');
* if (section) {
* scrollBreadcrumbsStore.add({
* index: 0,
* title: 'Section',
* element: section
* }, 80);
* }
* });
* </script>
* ```
*/
export {
handleTitleStatusChanged,
type NavigationAction,
scrollBreadcrumbsStore,
} from './model';
export { BreadcrumbHeader } from './ui';
export {
BreadcrumbHeader,
NavigationWrapper,
} from './ui';