svelte-intersection-observer 0.10.1 → 1.0.0

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.
@@ -1,84 +0,0 @@
1
- /// <reference types="svelte" />
2
- import { SvelteComponentTyped } from "svelte";
3
-
4
- export type Entry = null | IntersectionObserverEntry;
5
-
6
- export interface IntersectionObserverProps {
7
- /**
8
- * The HTML Element to observe.
9
- * @default null
10
- */
11
- element?: HTMLElement;
12
-
13
- /**
14
- * Set to `true` to unobserve the element
15
- * after it intersects the viewport.
16
- * @default false
17
- */
18
- once?: boolean;
19
-
20
- /**
21
- * `true` if the observed element
22
- * is intersecting the viewport.
23
- * @default false
24
- */
25
- intersecting?: boolean;
26
-
27
- /**
28
- * Specify the containing element.
29
- * Defaults to the browser viewport.
30
- * @default null
31
- */
32
- root?: HTMLElement;
33
-
34
- /**
35
- * Margin offset of the containing element.
36
- * @default "0px"
37
- */
38
- rootMargin?: string;
39
-
40
- /**
41
- * Percentage of element visibility to trigger an event.
42
- * Value must be a number between 0 and 1, or an array of numbers between 0 and 1.
43
- * @default 0
44
- */
45
- threshold?: number | number[];
46
-
47
- /**
48
- * Observed element metadata.
49
- * @default null
50
- */
51
- entry?: null | Entry;
52
-
53
- /**
54
- * `IntersectionObserver` instance.
55
- * @default null
56
- */
57
- observer?: null | IntersectionObserver;
58
- }
59
-
60
- export default class SvelteIntersectionObserver extends SvelteComponentTyped<
61
- IntersectionObserverProps,
62
- {
63
- /**
64
- * Dispatched when the element is first observed
65
- * and also whenever an intersection event occurs.
66
- */
67
- observe: CustomEvent<IntersectionObserverEntry>;
68
-
69
- /**
70
- * Dispatched only when the element is intersecting the viewport.
71
- * `event.detail.isIntersecting` will only be `true`
72
- */
73
- intersect: CustomEvent<
74
- IntersectionObserverEntry & { isIntersecting: true }
75
- >;
76
- },
77
- {
78
- default: {
79
- intersecting: boolean;
80
- entry: Entry;
81
- observer: IntersectionObserver;
82
- };
83
- }
84
- > {}
package/types/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export { default as default } from "./IntersectionObserver.svelte";