refactor(Breadcrumb): simplify entity structure and add tests
This commit is contained in:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user