@paris-ias/list 1.1.8 → 1.1.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/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@paris-ias/list",
3
3
  "configKey": "list",
4
- "version": "1.1.8",
4
+ "version": "1.1.9",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "0.8.4",
7
7
  "unbuild": "2.0.0"
@@ -18,19 +18,23 @@
18
18
  :aspect-ratio="ratio"
19
19
  :class="{ 'img-animation': animate }"
20
20
  :lazy-src="
21
- img(computedSrc, {
22
- width,
23
- quality: 70,
24
- })
21
+ isLocalAsset
22
+ ? computedSrc
23
+ : img(computedSrc, {
24
+ width,
25
+ quality: 70,
26
+ })
25
27
  "
26
28
  :src="
27
- img(computedSrc, {
28
- width,
29
- quality: 70,
30
- })
29
+ isLocalAsset
30
+ ? computedSrc
31
+ : img(computedSrc, {
32
+ width,
33
+ quality: 70,
34
+ })
31
35
  "
32
- :srcset="_srcset.srcset"
33
- :sizes="_srcset.sizes"
36
+ :srcset="isLocalAsset ? undefined : _srcset.srcset"
37
+ :sizes="isLocalAsset ? undefined : _srcset.sizes"
34
38
  :title="caption"
35
39
  v-bind="$attrs"
36
40
  >
@@ -49,6 +53,12 @@ const computedSrc = computed(() => {
49
53
  if (!props.src) return null
50
54
  return typeof props.src === "string" ? props.src : props.src?.url || null
51
55
  })
56
+
57
+ // Root-relative paths (e.g. /default.png) are static public assets shipped
58
+ // with the site. The static deploy (nuxt generate → S3) has no live IPX server
59
+ // and only pre-generates /_ipx/ variants for images crawled during prerender,
60
+ // which the conditional fallback isn't — so route those raw and skip IPX.
61
+ const isLocalAsset = computed(() => computedSrc.value?.startsWith("/") ?? false)
52
62
  const props = defineProps({
53
63
  src: {
54
64
  type: [Object, String],
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "license": "AGPL-3.0-only",
3
3
  "main": "./dist/module.mjs",
4
- "version": "1.1.8",
4
+ "version": "1.1.9",
5
5
  "name": "@paris-ias/list",
6
6
  "repository": {
7
7
  "url": "git+https://github.com/IEA-Paris/list.git",