Files
frontend-svelte/src/entities/Breadcrumb/index.ts

36 lines
789 B
TypeScript

/**
* 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 {
type NavigationAction,
scrollBreadcrumbsStore,
} from './model';
export {
BreadcrumbHeader,
NavigationWrapper,
} from './ui';