@sarimarcus/content-sites-tourism 0.20.0 → 0.21.0

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/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  All packages in the platform release in lockstep; entries are per release version.
4
4
 
5
+ ## 0.21.0 (2026-10-02)
6
+
7
+ - Cards and ranked listing rows pass core's `IMAGE_LADDER` and WebP-only formats (SLA-2912).
8
+
5
9
  ## 0.20.0 (2026-10-02)
6
10
 
7
11
  - No changes; lockstep release with ui and core (SLA-2740).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sarimarcus/content-sites-tourism",
3
- "version": "0.20.0",
3
+ "version": "0.21.0",
4
4
  "description": "City-tourism vertical: city-entity components, pages templates and utilities for the tourism sites.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -36,7 +36,7 @@
36
36
  "peerDependencies": {
37
37
  "astro": "^7.0.6",
38
38
  "tailwindcss": "^4.1.18",
39
- "@sarimarcus/content-sites-core": "0.20.0",
40
- "@sarimarcus/content-sites-ui": "0.20.0"
39
+ "@sarimarcus/content-sites-core": "0.21.0",
40
+ "@sarimarcus/content-sites-ui": "0.21.0"
41
41
  }
42
42
  }
@@ -1,4 +1,5 @@
1
1
  ---
2
+ import { IMAGE_LADDER } from '@sarimarcus/content-sites-core/images';
2
3
  /**
3
4
  * BarCard — bar teaser. The category key picks the badge colour; its label, the feature labels and icons (sites store
4
5
  * different feature keys), the closing line and every other visible string come from the site adapter, which also
@@ -86,9 +87,9 @@ const categoryStyle = categoryColors[category] || { bg: 'bg-muted', text: 'text-
86
87
  <Picture
87
88
  src={image}
88
89
  alt={imageAlt}
89
- widths={[240, 320, 400, 480, 640]}
90
+ widths={IMAGE_LADDER}
90
91
  sizes="(max-width: 1023px) 100vw, 50vw"
91
- formats={['avif', 'webp']}
92
+ formats={['webp']}
92
93
  fallbackFormat="webp"
93
94
  pictureAttributes={{ class: 'block w-full h-full' }}
94
95
  class="w-full h-full object-cover transition-transform duration-500 group-hover:scale-105"
@@ -1,4 +1,5 @@
1
1
  ---
2
+ import { IMAGE_LADDER } from '@sarimarcus/content-sites-core/images';
2
3
  /**
3
4
  * DishCard — dish teaser. The category key picks the badge colour; the label, tags and every other visible string
4
5
  * come from the site adapter, which also resolves the image, href and placeholder.
@@ -68,9 +69,9 @@ const audienceLabels = tagLabels.slice(0, 3);
68
69
  <Picture
69
70
  src={image}
70
71
  alt={imageAlt}
71
- widths={[240, 320, 400, 480, 640]}
72
+ widths={IMAGE_LADDER}
72
73
  sizes="(max-width: 639px) 100vw, (max-width: 1023px) 50vw, 33vw"
73
- formats={['avif', 'webp']}
74
+ formats={['webp']}
74
75
  fallbackFormat="webp"
75
76
  pictureAttributes={{ class: 'block w-full h-full' }}
76
77
  class="w-full h-full object-cover transition-transform duration-500 group-hover:scale-105"
@@ -1,4 +1,5 @@
1
1
  ---
2
+ import { IMAGE_LADDER } from '@sarimarcus/content-sites-core/images';
2
3
  /**
3
4
  * MonumentCard — monument or museum teaser (exported under both names) for listings and related rails. The site
4
5
  * adapter resolves the image, the href, the placeholder and every visible string; the card only lays them out.
@@ -70,9 +71,9 @@ const loadingStrategy = index < eager ? "eager" : "lazy";
70
71
  <Picture
71
72
  src={image}
72
73
  alt={imageAlt}
73
- widths={[240, 320, 400, 480, 640]}
74
+ widths={IMAGE_LADDER}
74
75
  sizes="(max-width: 639px) 100vw, (max-width: 1023px) 50vw, 33vw"
75
- formats={['avif', 'webp']}
76
+ formats={['webp']}
76
77
  fallbackFormat="webp"
77
78
  pictureAttributes={{ class: 'block w-full h-full' }}
78
79
  class="w-full h-full object-cover transition-transform duration-500 group-hover:scale-105"
@@ -1,4 +1,5 @@
1
1
  ---
2
+ import { IMAGE_LADDER } from '@sarimarcus/content-sites-core/images';
2
3
  /**
3
4
  * NeighborhoodCard — rich neighbourhood card: title over the image, counts, an editorial badge and a "top attractions"
4
5
  * preview (always visible below the image on mobile, sliding up on hover from lg). The site adapter resolves the
@@ -98,9 +99,9 @@ const cardHeight = 'h-72 sm:h-80';
98
99
  <Picture
99
100
  src={image}
100
101
  alt={imageAlt}
101
- widths={[240, 320, 400, 480, 640]}
102
+ widths={IMAGE_LADDER}
102
103
  sizes="(max-width: 767px) 100vw, (max-width: 1023px) 50vw, 33vw"
103
- formats={['avif', 'webp']}
104
+ formats={['webp']}
104
105
  fallbackFormat="webp"
105
106
  pictureAttributes={{ class: 'block w-full h-full' }}
106
107
  class="w-full h-full object-cover transition-transform duration-700 group-hover:scale-110"
@@ -1,4 +1,5 @@
1
1
  ---
2
+ import { IMAGE_LADDER } from '@sarimarcus/content-sites-core/images';
2
3
  /**
3
4
  * RestaurantCard — restaurant teaser for listings, facets and related rails. The site adapter resolves the image, href,
4
5
  * placeholder, badge decisions and every visible string; the card only lays them out.
@@ -81,9 +82,9 @@ const loadingStrategy = index < eager ? "eager" : "lazy";
81
82
  <Picture
82
83
  src={image}
83
84
  alt={imageAlt}
84
- widths={[240, 320, 400, 480, 640]}
85
+ widths={IMAGE_LADDER}
85
86
  sizes="(max-width: 639px) 100vw, (max-width: 1023px) 50vw, 33vw"
86
- formats={['avif', 'webp']}
87
+ formats={['webp']}
87
88
  fallbackFormat="webp"
88
89
  pictureAttributes={{ class: 'block w-full h-full' }}
89
90
  class="w-full h-full object-cover transition-transform duration-500 group-hover:scale-105"
@@ -1,4 +1,5 @@
1
1
  ---
2
+ import { IMAGE_LADDER } from '@sarimarcus/content-sites-core/images';
2
3
  /**
3
4
  * WalkCard — walking-route teaser. Theme and difficulty keys pick the badge colours; their labels and every other
4
5
  * visible string come from the site adapter. Without an image the card shows a footsteps placeholder.
@@ -77,9 +78,9 @@ const difficultyColor = difficultyColors[difficulty] || 'bg-muted text-muted-for
77
78
  <Picture
78
79
  src={image}
79
80
  alt={imageAlt}
80
- widths={[320, 400, 480, 640]}
81
+ widths={IMAGE_LADDER}
81
82
  sizes="(max-width: 639px) 100vw, (max-width: 1023px) 50vw, 33vw"
82
- formats={['avif', 'webp']}
83
+ formats={['webp']}
83
84
  fallbackFormat="webp"
84
85
  pictureAttributes={{ class: 'block w-full h-full' }}
85
86
  class="w-full h-full object-cover transition-transform duration-500 group-hover:scale-105"
@@ -1,4 +1,5 @@
1
1
  ---
2
+ import { IMAGE_LADDER } from '@sarimarcus/content-sites-core/images';
2
3
  /**
3
4
  * RankedListingRow — one entry in a numbered editorial ranking list, e.g. a proximity page that reads top-to-bottom by
4
5
  * distance. Rendered inside the caller's `<ol>`. The whole row is one real link, so the name stays selectable text.
@@ -69,9 +70,9 @@ const paddedRank = String(rank).padStart(2, '0');
69
70
  <Picture
70
71
  src={image}
71
72
  alt={imageAlt}
72
- widths={[160, 240, 320]}
73
+ widths={IMAGE_LADDER}
73
74
  sizes="(max-width: 639px) 88px, 144px"
74
- formats={['avif', 'webp']}
75
+ formats={['webp']}
75
76
  fallbackFormat="webp"
76
77
  pictureAttributes={{ class: 'block w-full h-full' }}
77
78
  class="w-full h-full object-cover transition-transform duration-500 ease-out group-hover:scale-[1.04]"