itube-specs 0.0.621 → 0.0.623

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.
@@ -7,7 +7,7 @@
7
7
  >
8
8
  <slot name="grid-start" />
9
9
  <FVideoCard
10
- v-for="(item, index) in items"
10
+ v-for="(item, index) in eagerItems"
11
11
  :key="`video-${item.guid}`"
12
12
  class="s-grid-videos__card"
13
13
  :card="item"
@@ -17,14 +17,31 @@
17
17
  :playlist-id="playlistId"
18
18
  :playlist="playlist"
19
19
  />
20
- <slot name="grid-end" />
21
20
  <slot/>
21
+ <NuxtLazyHydrate when-visible v-if="lazyItems.length > 0">
22
+ <div class="s-grid-videos__lazy">
23
+ <FVideoCard
24
+ v-for="item in lazyItems"
25
+ :key="`video-lazy-${item.guid}`"
26
+ class="s-grid-videos__card"
27
+ :card="item"
28
+ loading="lazy"
29
+ :top-chips="topChips"
30
+ :playlist-id="playlistId"
31
+ :playlist="playlist"
32
+ />
33
+ </div>
34
+ </NuxtLazyHydrate>
35
+ <slot name="grid-end" />
22
36
  </div>
23
37
  </template>
24
38
 
25
39
  <script setup lang="ts">
26
40
  import type { IVideoCard } from '../../types';
27
- defineProps<{
41
+
42
+ const EAGER_COUNT = 12;
43
+
44
+ const props = defineProps<{
28
45
  items: Array<IVideoCard>
29
46
  hideFirstRow?: boolean
30
47
  priority?: boolean
@@ -33,4 +50,7 @@ defineProps<{
33
50
  playlistId?: string
34
51
  topChips?: string[]
35
52
  }>()
53
+
54
+ const eagerItems = computed(() => props.items.slice(0, EAGER_COUNT));
55
+ const lazyItems = computed(() => props.items.slice(EAGER_COUNT));
36
56
  </script>
@@ -1,9 +1,8 @@
1
1
  import { FeatureFlags } from '~/config/featureFlags.config';
2
2
 
3
3
  export function useNavigationItems() {
4
- const { favoritesLink } = useFavorites();
5
4
  const navigationItems = computed(() => {
6
- const favLink = favoritesLink.value ?? '';
5
+ const favLink = '/favorites';
7
6
 
8
7
  return [
9
8
  {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "itube-specs",
3
3
  "type": "module",
4
- "version": "0.0.621",
4
+ "version": "0.0.623",
5
5
  "main": "./nuxt.config.ts",
6
6
  "types": "./types/index.d.ts",
7
7
  "scripts": {