svelte-toc

Sticky responsive table of contents component

MIT License

Downloads
990
Stars
112
Committers
5
svelte-toc - v0.5.8 Latest Release

Published by janosh 7 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/janosh/svelte-toc/compare/v0.5.7...v0.5.8

svelte-toc - v0.5.7

Published by janosh 9 months ago

What's Changed

Full Changelog: https://github.com/janosh/svelte-toc/compare/v0.5.6...v0.5.7

svelte-toc - v0.5.6

Published by janosh about 1 year ago

svelte-toc - v0.5.5

Published by janosh over 1 year ago

What's Changed

  • DRY GitHub Actions #40
  • fix svelte a11y warning about <li> tabindex and role aa1cd50

Full Changelog: https://github.com/janosh/svelte-toc/compare/v0.5.4...v0.5.5

svelte-toc - v0.5.4

Published by janosh over 1 year ago

What's Changed

Full Changelog: https://github.com/janosh/svelte-toc/compare/v0.5.3...v0.5.4

svelte-toc - v0.5.3

Published by janosh over 1 year ago

What's Changed

  • Fix ToC scroll abort #37
  • Add var(--toc-overflow, auto scroll) #34
  • add src/routes/(demos)/left-border-active-li/+page.md powered by mdsvexamples 6be66f0
  • tweak readme prop docs 84c1854
  • document new CSS variables in readme 5df7767
  • add test 'subheadings are indented' 06da853
  • add var(--toc-ol-list-style, none) and var(--toc-ol-padding, 0) ade5425

New Contributors

Full Changelog: https://github.com/janosh/svelte-toc/compare/v0.5.2...v0.5.3

svelte-toc - v0.5.2

Published by janosh almost 2 years ago

  • add many new CSS variables in Toc.svelte badbe2f
  • add vite alias $root to clean up package.json, readme|contributing|changelog.md imports 76427ee
  • add coverage badges to readme 8a24e2b
  • add contributing.md a313e7b
  • add auto changelog d7eaeea

Full Changelog: https://github.com/janosh/svelte-toc/compare/v0.5.1...v0.5.2

svelte-toc - v0.5.1

Published by janosh almost 2 years ago

  • use margin instead transform: translateX for indented ToC items 49d43d7
  • pnpm add -D @vitest/coverage-c8 bab57dc

Full Changelog: https://github.com/janosh/svelte-toc/compare/v0.5.0...v0.5.1

svelte-toc - v0.5.0

Published by janosh almost 2 years ago

What's Changed

Full Changelog: https://github.com/janosh/svelte-toc/compare/v0.4.1...v0.5.0

svelte-toc - v0.4.1

Published by janosh almost 2 years ago

What's Changed

Full Changelog: https://github.com/janosh/svelte-toc/compare/v0.4.0...v0.4.1

svelte-toc - v0.4.0

Published by janosh about 2 years ago

What's Changed

  • Fix ToC preventing page scrolling beyond active heading when zoomed into page by @janosh in https://github.com/janosh/svelte-toc/pull/23 (fixes #22)
  • Better readme test by @janosh in https://github.com/janosh/svelte-toc/pull/24
    • Toc.svelte remove unused windowHeight

    • breaking: rename slot tocItem to toc-item

    • add slot open-toc-icon

    • document new/renamed slots in readme

    • extend readme test to also check for correct type and default value of primitive-type props

    • fix lines in readme offending new test

    • simplify readme prop doc str format

Full Changelog: https://github.com/janosh/svelte-toc/compare/v0.3.2...v0.4.0

svelte-toc - v0.3.2

Published by janosh about 2 years ago

What's Changed

  • Add prop titleTag allowing to change HTML tag used for ToC title by @oskar-gmerek in https://github.com/janosh/svelte-toc/pull/21
    • yarn add -D jsdom vitest and update existing deps
    • vite.config.ts set jsdom as test env
    • rename props page_body and title_tag to pageBody and titleTag
    • add missing doc string for pageBody to readme
    • add vitest unit tests for readme + src/lib/{index.ts,Svelte.toc}
    • remove CI matrix strategy, i.e. don't run tests on windows due to path issues

Full Changelog: https://github.com/janosh/svelte-toc/compare/v0.3.1...v0.3.2

svelte-toc - v0.3.1

Published by janosh about 2 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/janosh/svelte-toc/compare/v0.3.0...v0.3.1

svelte-toc - v0.3.0

Published by janosh about 2 years ago

What's Changed

Full Changelog: https://github.com/janosh/svelte-toc/compare/v0.2.12...v0.3.0

svelte-toc - v0.2.10

Published by janosh over 2 years ago

What's Changed

3466e0f replace scrollIntoViewIfNeeded() with scrollIntoView({ block: `nearest` })
dd64696 update deps

Full Changelog: https://github.com/janosh/svelte-toc/compare/v0.2.9...v0.2.10

svelte-toc - v0.2.9

Published by janosh over 2 years ago

f8ad29f fix page.subscribe(requery_headings) causing error 'Function called outside component initialization'

Full Changelog: https://github.com/janosh/svelte-toc/compare/v0.2.8...v0.2.9

svelte-toc - v0.2.8

Published by janosh over 2 years ago

What's Changed

Full Changelog: https://github.com/janosh/svelte-toc/compare/v0.2.7...v0.2.8

svelte-toc - v0.2.7

Published by janosh over 2 years ago

What's Changed

  • Exclude headings with class .toc-exclude in https://github.com/janosh/svelte-toc/pull/9
    • tsconfig bump module + target to esnext
    • readme add live demo link
    • trigger publish CI on GH release
    • move ToC from left to right side on landing and long page
    • extract CSS vars from __layout to global.css
    • change default headingSelector to main :where(h1, h2, h3, h4):not(.toc-exclude)
    • add CSS var --toc-active-padding
    • add CSS var --toc-active-margin and use transform translateX instead of left margin to indent lower-level ToC items
  • replace onClickOutside action with svelte:window click listener da0cd75

Full Changelog: https://github.com/janosh/svelte-toc/compare/v0.2.6...v0.2.7