Skip to content

Commit 426a006

Browse files
committed
0.9.0 release, add eslintignore
1 parent ac6da93 commit 426a006

File tree

6 files changed

+23
-6
lines changed

6 files changed

+23
-6
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
demo
2+
tests

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,6 @@ node_modules
1212
dist
1313

1414
content-app
15-
demo/dist
15+
demo/dist
16+
*.tgz
17+
.eslintcache

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Vue Use Active Scroll
22

3-
**Examples:** Vite: [Demo App]() — Nuxt Content: [TOC]() - [Nested TOC]()
3+
**Examples:** Vite: [Demo App]() — Nuxt Content: [TOC](https://stackblitz.com/edit/github-tlaeiq?file=pages%2F[...slug].vue) - [Nested TOC](https://stackblitz.com/edit/github-oh85gq?file=pages%2F[...slug].vue)
44

55
:bulb: Requires Vue 3 or above.
66

@@ -11,7 +11,7 @@
1111
The [Intersection Observer](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API) is a great API.
1212
But it may not be the one-size-fits-all solution to highlight menu/sidebar links.
1313

14-
In some cases, you may noticed that last targets may never intersect and that by clicking on the correspondent links highlights the wrong ones (or does nothing). Same may happen with the URL hash, which in some cases may not reflect the actual active target.
14+
In some cases, you may noticed that last targets never intersect and that by clicking on the correspondent links highlights the wrong ones (or does nothing). Same may happen with the URL hash, which in some cases may not reflect the actual active target.
1515

1616
But most important, you noticed that's tricky to customize behavior according to different scroll interactions.
1717

@@ -203,7 +203,7 @@ html {
203203
</style>
204204
```
205205

206-
Feel free to create your own click handler and to choose the scrolling strategy: CSS (smooth or auto), [scrollIntoView](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView) or even a library like [animated-scroll-to](https://github.com/Stanko/animated-scroll-to) with custom easings will work. Just remember to include `setActive` in your handler.
206+
Feel free to create your own click handler and to choose the scrolling strategy: CSS (smooth or auto), [scrollIntoView](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView) or even a library like [animated-scroll-to](https://github.com/Stanko/animated-scroll-to) with custom easings will work. Just remember to call `setActive` in your handler.
207207

208208
<details><summary><strong>Custom Scroll Callback</strong></summary>
209209

demo/App.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ provide('DemoRadios', {
5050
}
5151
5252
@media (max-width: 610px) {
53-
--SidebarWidth: 180px;
53+
:root {
54+
--SidebarWidth: 180px;
55+
}
5456
}
5557
5658
* {

package.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-use-active-scroll",
3-
"version": "0.8.8",
3+
"version": "0.9.0",
44
"private": false,
55
"description": "Reactive and accurate TOC/sidebar links without compromises for Vue 3.",
66
"keywords": [
@@ -17,6 +17,14 @@
1717
"vue-toc",
1818
"vue toc"
1919
],
20+
"homepage": "https://vue-use-active-scroll.netlify.app/",
21+
"bugs": {
22+
"url": "https://github.com/smastrom/vue-use-active-scroll/issues"
23+
},
24+
"repository": {
25+
"type": "git",
26+
"url": "https://github.com/smastrom/vue-use-active-scroll.git"
27+
},
2028
"license": "MIT",
2129
"author": {
2230
"name": "Simone Mastromattei",
@@ -41,6 +49,7 @@
4149
"*.{ts,vue}": "eslint --cache --fix",
4250
"*.{ts,vue,md}": "prettier --write"
4351
},
52+
"dependencies": {},
4453
"devDependencies": {
4554
"@rollup/plugin-terser": "^0.3.0",
4655
"@types/node": "^18.11.18",

tests/App.cy.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,5 @@ it('Should update targets on cancel while scrolling from click', () => {
9292
cy.wait(1000);
9393
}
9494
});
95+
96+
// More tests to be done

0 commit comments

Comments
 (0)