srcdev-nuxt-components 9.1.24 → 9.1.26

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.
@@ -11,7 +11,7 @@
11
11
 
12
12
  @media (prefers-reduced-motion: no-preference) {
13
13
  .entry-slide-in {
14
- animation: entrySlideInAnimation both;
14
+ animation: entrySlideInAnimation forwards;
15
15
  animation-timeline: view(70% 5%);
16
16
  }
17
17
  }
@@ -2,7 +2,7 @@
2
2
  <component :is="tag" class="services-section" :class="[elementClasses]" :aria-labelledby="ariaLabelledby">
3
3
  <div class="services-section__grid" :class="{ 'services-section__grid--reverse': reverse }">
4
4
  <div class="image-wrapper">
5
- <NuxtImg :src="serviceData.image" :alt="serviceData.title" :loading="imageLoading" class="image" />
5
+ <NuxtImg :src="serviceData.image" :alt="serviceData.title" :loading="imageLoading" :fetchpriority="imageFetchPriority" class="image" />
6
6
  </div>
7
7
  <div class="info-wrapper" :class="infoWrapperClasses">
8
8
  <EyebrowText font-size="large" :text-content="serviceData.subtitle" />
@@ -179,6 +179,9 @@ const infoWrapperClasses = computed(() => {
179
179
  // Computed to return loading="lazy" if index is greater than 1, so that the first two sections prioritise image loading, but if there are more than 2 sections, the rest will lazy load their images to improve performance.
180
180
  const imageLoading = computed(() => (props.index !== undefined && props.index > 1 ? "lazy" : "eager"));
181
181
 
182
+ // Only the first image (LCP candidate) gets fetchpriority="high" to reduce resource load delay.
183
+ const imageFetchPriority = computed(() => (props.index === 0 ? "high" : "auto"));
184
+
182
185
  const { elementClasses, resetElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough);
183
186
 
184
187
  watch(
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "srcdev-nuxt-components",
3
3
  "type": "module",
4
- "version": "9.1.24",
4
+ "version": "9.1.26",
5
5
  "main": "nuxt.config.ts",
6
6
  "types": "types.d.ts",
7
7
  "license": "MIT",