svelte-intersection-observer 0.10.0 → 0.10.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svelte-intersection-observer",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "license": "MIT",
5
5
  "description": "Detect if an element is in the viewport using the Intersection Observer API",
6
6
  "author": "Eric Liu (https://github.com/metonym)",
@@ -8,20 +8,20 @@
8
8
  "main": "./lib/index.js",
9
9
  "module": "./lib/index.mjs",
10
10
  "types": "./types/index.d.ts",
11
- "sideEffects": false,
12
11
  "scripts": {
13
12
  "dev": "rollup -cw",
14
13
  "build": "rollup -c",
15
14
  "prepack": "BUNDLE=true rollup -c",
16
- "test": "svelte-check --workspace test",
17
- "format": "prettier --write '.'"
15
+ "test:types": "svelte-check --workspace test",
16
+ "test:examples": "node test/examples",
17
+ "format": "prettier --ignore-path .gitignore --write '.'"
18
18
  },
19
19
  "devDependencies": {
20
- "prettier": "^2.5.0",
21
- "prettier-plugin-svelte": "^2.5.0",
22
- "svelte": "^3.44.2",
23
- "svelte-check": "^2.2.10",
24
- "svelte-readme": "^3.6.1"
20
+ "prettier": "^3.0.0",
21
+ "prettier-plugin-svelte": "^3.0.0",
22
+ "svelte": "^4.1.0",
23
+ "svelte-check": "^3.4.6",
24
+ "svelte-readme": "^3.6.3"
25
25
  },
26
26
  "repository": {
27
27
  "type": "git",
@@ -39,10 +39,10 @@ export interface IntersectionObserverProps {
39
39
 
40
40
  /**
41
41
  * Percentage of element visibility to trigger an event.
42
- * Value must be between 0 and 1.
42
+ * Value must be a number between 0 and 1, or an array of numbers between 0 and 1.
43
43
  * @default 0
44
44
  */
45
- threshold?: number;
45
+ threshold?: number | number[];
46
46
 
47
47
  /**
48
48
  * Observed element metadata.