This component provides automatic scroll-spy tracking for long documents.
Import the layout package and call TableOfContents with optional items.
Pass TOCItem slices or leave empty for auto-detection from headings.
Sticky mode keeps the TOC visible while scrolling the content.
ContentSelector targets a CSS selector for the heading observation root.
Pass no items to auto-populate from h2/h3/h4 elements in the target container.