page-transition 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -10,7 +10,7 @@ A page transition library for the Next.js App Router.
10
10
  - Scroll restoration
11
11
 
12
12
  ## Install
13
- ![Version](https://img.shields.io/badge/v0.2.2-000000) ![86.3 KB](https://img.shields.io/badge/86.3_KB-1677FF)
13
+ ![Version](https://img.shields.io/badge/v0.2.2-000000) ![86.4 KB](https://img.shields.io/badge/86.4_KB-1677FF)
14
14
 
15
15
  `npm install page-transition`
16
16
 
@@ -414,7 +414,7 @@ const { resolveFn, state } = useTransitionContext()
414
414
 
415
415
  ```
416
416
 
417
- ## Helpers
417
+ ## Hooks
418
418
 
419
419
  **useActiveLink**
420
420
  Automatically adds the active class to the element when its href matches.
@@ -21,9 +21,7 @@ export function ActiveLinkProvider({ children }) {
21
21
  if (ref) {
22
22
  element = ref;
23
23
  map.current.set(ref, href);
24
- for (const [el, href] of map.current) {
25
- el.classList.toggle('active', href === pathname);
26
- }
24
+ ref.classList.toggle('active', href === pathname);
27
25
  }
28
26
  if (!ref)
29
27
  map.current.delete(element);
package/package.json CHANGED
@@ -1,7 +1,15 @@
1
1
  {
2
2
  "name": "page-transition",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "A page transition library for the Next.js App Router.",
5
+ "keywords": [
6
+ "next.js",
7
+ "nextjs",
8
+ "app router",
9
+ "app-router",
10
+ "page-transition",
11
+ "page-transitions"
12
+ ],
5
13
  "license": "MIT",
6
14
  "files": [
7
15
  "dist"