@wyxos/vibe 1.2.7 → 1.2.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wyxos/vibe",
3
- "version": "1.2.7",
3
+ "version": "1.2.9",
4
4
  "main": "index.js",
5
5
  "module": "index.js",
6
6
  "type": "module",
@@ -18,6 +18,7 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "lodash": "^4.17.21",
21
+ "lodash-es": "^4.17.21",
21
22
  "vue": "^3.0.0"
22
23
  },
23
24
  "peerDependencies": {
package/src/App.vue CHANGED
@@ -7,12 +7,12 @@ const items = ref([])
7
7
 
8
8
  const masonry = ref(null)
9
9
 
10
- const getPage = async (index) => {
10
+ const getPage = async (page) => {
11
11
  return new Promise((resolve) => {
12
12
  setTimeout(() => {
13
13
  let output = {
14
- items: fixture[index - 1].items,
15
- nextPage: index + 1
14
+ items: fixture[page - 1].items,
15
+ nextPage: page + 1
16
16
  };
17
17
 
18
18
  resolve(output)
package/src/Masonry.vue CHANGED
@@ -1,7 +1,7 @@
1
1
  <script setup>
2
2
  import {computed, nextTick, onMounted, onUnmounted, ref} from "vue";
3
3
  import calculateLayout from "./calculateLayout.js";
4
- import {debounce} from 'lodash'
4
+ import { debounce } from 'lodash-es'
5
5
 
6
6
  const props = defineProps({
7
7
  getNextPage: {
@@ -91,7 +91,7 @@ async function onScroll() {
91
91
  if (whitespaceVisible && !isLoading.value) {
92
92
  isLoading.value = true
93
93
 
94
- if (paginationHistory.value > 3) {
94
+ if (paginationHistory.value.length > 3) {
95
95
  // get first item
96
96
  const firstItem = masonry.value[0]
97
97