vue-use-intersection-observer 1.0.7 → 1.0.9

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 +15 -16
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -6,11 +6,11 @@
6
6
 
7
7
  <div align="center">
8
8
 
9
- ![npm](https://img.shields.io/npm/v/vue-use-intersection-observer)
10
- ![npm downloads](https://img.shields.io/npm/dw/vue-use-intersection-observer)
9
+ [![npm](https://img.shields.io/npm/v/vue-use-intersection-observer.svg)](https://www.npmjs.com/package/vue-use-intersection-observer)
10
+ [![npm](https://img.shields.io/npm/dt/vue-use-intersection-observer.svg)](https://www.npmjs.com/package/vue-use-intersection-observer)
11
+ [![License](https://img.shields.io/crates/l/rnr.svg)](https://github.com/Mathiew82/vue-use-intersection-observer/blob/master/LICENSE)
11
12
  ![GitHub stars](https://img.shields.io/github/stars/Mathiew82/vue-use-intersection-observer)
12
13
  ![GitHub forks](https://img.shields.io/github/forks/Mathiew82/vue-use-intersection-observer)
13
- [![License](https://img.shields.io/crates/l/rnr.svg)](https://github.com/Mathiew82/vue-use-intersection-observer/blob/master/LICENSE)
14
14
 
15
15
  </div>
16
16
 
@@ -41,7 +41,6 @@ main.ts
41
41
 
42
42
  ```typescript
43
43
  import { createApp } from 'vue';
44
- import './style.css';
45
44
  import App from './App.vue';
46
45
  import { VisibilityPlugin } from 'vue-use-intersection-observer';
47
46
 
@@ -123,19 +122,19 @@ Start observing an element.
123
122
 
124
123
  **Parameters:**
125
124
 
126
- | Name | Type | Description |
127
- | ------- | ------- | ---------------------- |
128
- | target | ref | Element ref to observe |
129
- | options | Options | Observer configuration |
125
+ | Name | Type | Description | Required | Default |
126
+ | ------- | ------- | ---------------------- | -------- | ------- |
127
+ | target | ref | Element ref to observe | true | — |
128
+ | options | Options | Observer configuration | true | — |
130
129
 
131
130
  **Options:**
132
131
 
133
- | Option | Type | Description | Optional | Default |
132
+ | Name | Type | Description | Required | Default |
134
133
  | --------- | --------------- | -------------------------------- | -------- | ------- |
135
- | callback | function | Called when visibility changes | false | — |
136
- | offset | number | Trigger before entering viewport | true | `0` |
137
- | threshold | number or array | Intersection threshold | true | `0` |
138
- | once | boolean | Trigger only the first time | true | `true` |
134
+ | callback | function | Called when visibility changes | true | — |
135
+ | offset | number | Trigger before entering viewport | false | 0 |
136
+ | threshold | number or array | Intersection threshold | false | 0 |
137
+ | once | boolean | Trigger only the first time | false | true |
139
138
 
140
139
  ---
141
140
 
@@ -143,6 +142,6 @@ Start observing an element.
143
142
 
144
143
  Stop observing a previously registered element.
145
144
 
146
- | Name | Type | Description |
147
- | ------ | ---- | ----------------------------- |
148
- | target | ref | Element ref to stop observing |
145
+ | Name | Type | Description | Required | Default |
146
+ | ------ | ---- | ----------------------------- | -------- | ------- |
147
+ | target | ref | Element ref to stop observing | true | — |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-use-intersection-observer",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "Simple visibility observer plugin for Vue 3 using IntersectionObserver.",
5
5
  "keywords": [
6
6
  "vue",