Releases: metonym/svelte-intersection-observer
Releases · metonym/svelte-intersection-observer
v1.0.0
Breaking Changes
- Drop support for bundled ESM/UMD; code is only distributed as Svelte files
- Remove
IntersectionObserverProps
orEntry
TypeScript interfaces fromIntersectionObserver.svelte.d.ts
Use the Svelte ComponentProps
utility to extract component props.
import IntersectionObserver from "svelte-intersection-observer";
import type { ComponentProps } from "svelte";
type Props = ComponentProps<IntersectionObserver>;
Fixes
element
androot
prop types should benull | HTMLElement
to support TypeScript strict mode- Add
exports
field topackage.json
v0.10.2
v0.10.1
v0.10.0
v0.9.2
v0.9.1
v0.9.0
- improve TypeScript definitions for dispatched events
on:observe
:event.detail.isIntersecting
is aboolean
on:intersect
:event.detail.isIntersecting
can only betrue
<IntersectionObserver
on:observe={(e) => {
console.log(e.detail.isIntersecting); // boolean
}}
on:intersect={(e) => {
console.log(e.detail.isIntersecting); // true
}}
/>
v0.8.0
v0.7.1
This is a patch release to refresh the documentation published to NPM/Yarn.
Documentation
- add description for basic usage
- add
on:observe
example - explain difference between
on:observe
andon:intersect
- document
IntersectionObserverEntry
interface - re-order prop table so that
once
andintersecting
are more prominent