itube-specs 0.0.851 → 0.0.853

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.
@@ -37,9 +37,9 @@
37
37
  :top-chips="topChips"
38
38
  :playlist-id="playlistId"
39
39
  :playlist="playlist"
40
+ :hydrate-on-visible="HYDRATE_MARGIN"
40
41
  class="grid-videos__card"
41
42
  loading="lazy"
42
- hydrate-on-visible
43
43
  />
44
44
  <slot name="grid-end"/>
45
45
  </div>
@@ -49,6 +49,8 @@
49
49
  import type { IVideoCard } from '../../types';
50
50
 
51
51
  const IDLE_COUNT = 4;
52
+ /** Запас гидрации до появления карточки на экране: без него обработчики превью не успевают появиться к тапу. */
53
+ const HYDRATE_MARGIN = { rootMargin: '300px' };
52
54
 
53
55
  const props = defineProps<{
54
56
  items: Array<IVideoCard>
@@ -176,7 +176,7 @@ function linkTo(value: string | number) {
176
176
  }
177
177
 
178
178
  watch(() => route.query['page'], () => {
179
- document.documentElement.querySelector('#anchor')?.scrollIntoView({ behavior: 'smooth' });
179
+ document.documentElement.querySelector('#anchor')?.scrollIntoView({ behavior: 'instant' });
180
180
  });
181
181
 
182
182
  // canonical/hreflang выпускает app.vue — отсюда уходит только факт, который знает лишь пагинация
@@ -76,8 +76,8 @@
76
76
  <LazyGridVideos
77
77
  :items="otherItems"
78
78
  :class="{'_loading': statusOther === 'pending'}"
79
+ :hydrate-on-visible="HYDRATE_MARGIN"
79
80
  class="view-model-videos__grid"
80
- hydrate-on-visible
81
81
  />
82
82
  <UiLink
83
83
  v-if="dataOther && dataOther?.total > 12"
@@ -120,6 +120,9 @@ import { computed } from 'vue';
120
120
 
121
121
  const featureFlags = useRuntimeConfig().public.featureFlags;
122
122
 
123
+ /** Запас гидрации грида: без него тап по карточке у нижнего края экрана уходит по негидрированной разметке. */
124
+ const HYDRATE_MARGIN = { rootMargin: '300px' };
125
+
123
126
  const props = defineProps<{
124
127
  title: string
125
128
  data: PaginatedResponse<IVideoCard> | null
@@ -61,7 +61,7 @@
61
61
  :hide-first-row="page !== 'playlist'"
62
62
  :items="related"
63
63
  :top-chips="topChipsStrings"
64
- hydrate-on-visible
64
+ :hydrate-on-visible="HYDRATE_MARGIN"
65
65
  >
66
66
  <template #grid-start>
67
67
  <LazyAdvNativePlayer
@@ -120,6 +120,9 @@ import type { AsyncDataRequestStatus } from '#app';
120
120
 
121
121
  const featureFlags = useRuntimeConfig().public.featureFlags;
122
122
 
123
+ /** Запас гидрации релейтед-грида: без него тап по карточке у нижнего края экрана уходит по негидрированной разметке. */
124
+ const HYDRATE_MARGIN = { rootMargin: '300px' };
125
+
123
126
  const props = defineProps<{
124
127
  related?: Array<IVideoCard> | undefined,
125
128
  status: AsyncDataRequestStatus
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "itube-specs",
3
3
  "type": "module",
4
- "version": "0.0.851",
4
+ "version": "0.0.853",
5
5
  "main": "./nuxt.config.ts",
6
6
  "types": "./types/index.d.ts",
7
7
  "scripts": {