svelte-intersection-observer 0.9.2 → 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/CHANGELOG.md CHANGED
@@ -5,6 +5,26 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.10.1](https://github.com/metonym/svelte-intersection-observer/releases/tag/v0.10.1) - 2023-07-20
9
+
10
+ **Fixes**
11
+
12
+ - fix `threshold` prop type to be `number | number[]`
13
+
14
+ ## [0.10.0](https://github.com/metonym/svelte-intersection-observer/releases/tag/v0.10.0) - 2021-12-29
15
+
16
+ **Features**
17
+
18
+ - mark `observer` for garbage collection after disconnecting
19
+
20
+ **Documentation**
21
+
22
+ - make prop descriptions consistent with docs
23
+
24
+ **Refactoring**
25
+
26
+ - omit redundant `null` from `element` and `root` types as `HTMLElement` is already nullable
27
+
8
28
  ## [0.9.2](https://github.com/metonym/svelte-intersection-observer/releases/tag/v0.9.2) - 2021-11-26
9
29
 
10
30
  **Documentation**
package/README.md CHANGED
@@ -150,7 +150,7 @@ As an alternative to binding the `intersecting` prop, you can listen to the `int
150
150
  | intersecting | `true` if the observed element is intersecting the viewport | `boolean` | `false` |
151
151
  | root | Containing element | `null` or `HTMLElement` | `null` |
152
152
  | rootMargin | Margin offset of the containing element | `string` | `"0px"` |
153
- | threshold | Percentage of element visibile to trigger an event | `number` between 0 and 1 | `0` |
153
+ | threshold | Percentage of element visibile to trigger an event | `number` between 0 and 1, or an array of `number`s between 0 and 1 | `0` |
154
154
  | entry | Observed element metadata | [`IntersectionObserverEntry`](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry) | `null` |
155
155
  | observer | `IntersectionObserver` instance | [`IntersectionObserver`](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver) | `null` |
156
156
 
@@ -161,7 +161,7 @@ As an alternative to binding the `intersecting` prop, you can listen to the `int
161
161
 
162
162
  The `e.detail` dispatched by the `observe` and `intersect` events is an [`IntersectionObserverEntry`](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry) interface.
163
163
 
164
- Note that all properties in `IntersectionObserverEntry` are read only.
164
+ Note that all properties in `IntersectionObserverEntry` are read-only.
165
165
 
166
166
  <details>
167
167
  <summary><code>IntersectionObserverEntry</code></summary>
@@ -214,8 +214,6 @@ The [examples folder](examples/) contains sample set-ups.
214
214
 
215
215
  - [examples/sveltekit](examples/sveltekit)
216
216
  - [examples/vite](examples/vite)
217
- - [examples/sapper](examples/sapper)
218
- - [examples/snowpack](examples/snowpack)
219
217
  - [examples/rollup](examples/rollup)
220
218
  - [examples/webpack](examples/webpack)
221
219