@substrate-system/raf-scroll 0.0.2 → 0.0.4

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.
Files changed (2) hide show
  1. package/README.md +13 -2
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -10,7 +10,17 @@
10
10
  Scroll events, debounced with `requestAnimationFrame`.
11
11
 
12
12
  <details><summary><h2>Contents</h2></summary>
13
+
13
14
  <!-- toc -->
15
+
16
+ - [Install](#install)
17
+ - [Example](#example)
18
+ - [Modules](#modules)
19
+ * [Bundler](#bundler)
20
+ * [Minified](#minified)
21
+
22
+ <!-- tocstop -->
23
+
14
24
  </details>
15
25
 
16
26
  ## Install
@@ -23,9 +33,10 @@ npm i -S @substrate-system/raf-scroll
23
33
  ```js
24
34
  import { rafScroll } from '@substrate-system/raf-scroll'
25
35
 
26
- rafScroll(ev => {
36
+ rafScroll((ev:number) => {
27
37
  // this is called at most once per animation frame
28
- console.log('scroll event', ev)
38
+ // `ev` is just the Y scroll position (window.scrollY)
39
+ console.log('scroll Y', ev)
29
40
  })
30
41
  ```
31
42
 
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "test": "test"
7
7
  },
8
8
  "type": "module",
9
- "version": "0.0.2",
9
+ "version": "0.0.4",
10
10
  "main": "dist/index.js",
11
11
  "files": [
12
12
  "./dist/*"
@@ -58,7 +58,7 @@
58
58
  "@typescript-eslint/eslint-plugin": "^8.0.0",
59
59
  "@typescript-eslint/parser": "^8.0.0",
60
60
  "auto-changelog": "^2.4.0",
61
- "esbuild": "^0.25.0",
61
+ "esbuild": "^0.27.0",
62
62
  "eslint": "^8.57.0",
63
63
  "eslint-config-standard": "^17.1.0",
64
64
  "markdown-toc": "^1.2.0",
@@ -66,7 +66,7 @@
66
66
  "tap-arc": "^1.2.2",
67
67
  "tape-run": "^11.0.0",
68
68
  "typescript": "^5.3.3",
69
- "vite": "^6.0.0"
69
+ "vite": "^7.0.2"
70
70
  },
71
71
  "author": "nichoth <nichoth@gmail.com> (https://nichoth.com)",
72
72
  "license": "SEE LICENSE IN LICENSE",