@sarimarcus/content-sites-tourism 0.22.2 → 0.24.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,18 @@
2
2
 
3
3
  All packages in the platform release in lockstep; entries are per release version.
4
4
 
5
+ ## 0.24.0 (2026-10-05)
6
+
7
+ - Cards and `RankedListingRow` render their images through ui `ResponsivePicture`; output loses only the redundant `<source>` (SLA-2960).
8
+
9
+ ### Breaking
10
+
11
+ - Sites must run the `responsive-image.mjs` codemod when pinning 0.24.0; see the core CHANGELOG (SLA-2960).
12
+
13
+ ## 0.23.0 (2026-10-04)
14
+
15
+ - No changes; lockstep release with core (SLA-2958).
16
+
5
17
  ## 0.22.2 (2026-10-04)
6
18
 
7
19
  - `./schema`: `cityEventPolicy`, `organization`, `tourismCityBuilders` and `touristTripBuilder` (moved from core); the entity builders build on core `placeNode` (SLA-2918).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sarimarcus/content-sites-tourism",
3
- "version": "0.22.2",
3
+ "version": "0.24.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.22.2",
40
- "@sarimarcus/content-sites-ui": "0.22.2"
39
+ "@sarimarcus/content-sites-core": "0.24.0",
40
+ "@sarimarcus/content-sites-ui": "0.24.0"
41
41
  }
42
42
  }
@@ -1,13 +1,11 @@
1
1
  ---
2
- import { IMAGE_LADDER } from '@sarimarcus/content-sites-core/images';
3
2
  /**
4
3
  * BarCard — bar teaser. The category key picks the badge colour; its label, the feature labels and icons (sites store
5
4
  * different feature keys), the closing line and every other visible string come from the site adapter, which also
6
5
  * resolves the image, href and placeholder. The price pill renders only when the value is label-length.
7
6
  */
8
- import { Picture } from 'astro:assets';
9
7
  import type { ImageMetadata } from 'astro';
10
- import { Badge, isBadgeLength, PRICE_LABEL_MAX } from '@sarimarcus/content-sites-ui/primitives';
8
+ import { Badge, isBadgeLength, PRICE_LABEL_MAX, ResponsivePicture } from '@sarimarcus/content-sites-ui/primitives';
11
9
  import type { CardRating } from './RestaurantCard.astro';
12
10
 
13
11
  export interface BarFeature {
@@ -84,13 +82,10 @@ const categoryStyle = categoryColors[category] || { bg: 'bg-muted', text: 'text-
84
82
  <a href={href} class="flex flex-col flex-1 focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 rounded-xl">
85
83
  <div class="relative h-56 overflow-hidden img-placeholder shrink-0">
86
84
  {image ? (
87
- <Picture
85
+ <ResponsivePicture
88
86
  src={image}
89
87
  alt={imageAlt}
90
- widths={IMAGE_LADDER}
91
88
  sizes="(max-width: 1023px) 100vw, 50vw"
92
- formats={['webp']}
93
- fallbackFormat="webp"
94
89
  pictureAttributes={{ class: 'block w-full h-full' }}
95
90
  class="w-full h-full object-cover transition-transform duration-500 group-hover:scale-105"
96
91
  loading={index < 3 ? "eager" : "lazy"}
@@ -1,12 +1,10 @@
1
1
  ---
2
- import { IMAGE_LADDER } from '@sarimarcus/content-sites-core/images';
3
2
  /**
4
3
  * DishCard — dish teaser. The category key picks the badge colour; the label, tags and every other visible string
5
4
  * come from the site adapter, which also resolves the image, href and placeholder.
6
5
  */
7
- import { Picture } from 'astro:assets';
8
6
  import type { ImageMetadata } from 'astro';
9
- import { Badge } from '@sarimarcus/content-sites-ui/primitives';
7
+ import { Badge, ResponsivePicture } from '@sarimarcus/content-sites-ui/primitives';
10
8
 
11
9
  interface Props {
12
10
  href: string;
@@ -66,13 +64,10 @@ const audienceLabels = tagLabels.slice(0, 3);
66
64
  <a href={href} class="flex flex-col h-full focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 rounded-xl">
67
65
  <div class="relative h-56 overflow-hidden img-placeholder shrink-0">
68
66
  {image ? (
69
- <Picture
67
+ <ResponsivePicture
70
68
  src={image}
71
69
  alt={imageAlt}
72
- widths={IMAGE_LADDER}
73
70
  sizes="(max-width: 639px) 100vw, (max-width: 1023px) 50vw, 33vw"
74
- formats={['webp']}
75
- fallbackFormat="webp"
76
71
  pictureAttributes={{ class: 'block w-full h-full' }}
77
72
  class="w-full h-full object-cover transition-transform duration-500 group-hover:scale-105"
78
73
  loading={loadingStrategy}
@@ -1,12 +1,10 @@
1
1
  ---
2
- import { IMAGE_LADDER } from '@sarimarcus/content-sites-core/images';
3
2
  /**
4
3
  * MonumentCard — monument or museum teaser (exported under both names) for listings and related rails. The site
5
4
  * adapter resolves the image, the href, the placeholder and every visible string; the card only lays them out.
6
5
  */
7
- import { Picture } from 'astro:assets';
8
6
  import type { ImageMetadata } from 'astro';
9
- import { ArrowLabel, Badge } from '@sarimarcus/content-sites-ui/primitives';
7
+ import { ArrowLabel, Badge, ResponsivePicture } from '@sarimarcus/content-sites-ui/primitives';
10
8
 
11
9
  interface Props {
12
10
  href: string;
@@ -68,13 +66,10 @@ const loadingStrategy = index < eager ? "eager" : "lazy";
68
66
  <a href={href} class="flex flex-col h-full focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 rounded-xl">
69
67
  <div class="relative h-56 sm:h-64 overflow-hidden img-placeholder shrink-0">
70
68
  {image ? (
71
- <Picture
69
+ <ResponsivePicture
72
70
  src={image}
73
71
  alt={imageAlt}
74
- widths={IMAGE_LADDER}
75
72
  sizes="(max-width: 639px) 100vw, (max-width: 1023px) 50vw, 33vw"
76
- formats={['webp']}
77
- fallbackFormat="webp"
78
73
  pictureAttributes={{ class: 'block w-full h-full' }}
79
74
  class="w-full h-full object-cover transition-transform duration-500 group-hover:scale-105"
80
75
  loading={loadingStrategy}
@@ -1,14 +1,12 @@
1
1
  ---
2
- import { IMAGE_LADDER } from '@sarimarcus/content-sites-core/images';
3
2
  /**
4
3
  * NeighborhoodCard — rich neighbourhood card: title over the image, counts, an editorial badge and a "top attractions"
5
4
  * preview (always visible below the image on mobile, sliding up on hover from lg). The site adapter resolves the
6
5
  * image, href, placeholder, badge (sites store different badge keys) and every visible string, counts included.
7
6
  * Layers: image 0, gradient 10, title and meta 20, badge 30, attractions 40.
8
7
  */
9
- import { Picture } from 'astro:assets';
10
8
  import type { ImageMetadata } from 'astro';
11
- import { Badge } from '@sarimarcus/content-sites-ui/primitives';
9
+ import { Badge, ResponsivePicture } from '@sarimarcus/content-sites-ui/primitives';
12
10
 
13
11
  export type NeighborhoodBadgeTone = 'primary' | 'accent' | 'secondary' | 'overlay';
14
12
 
@@ -96,13 +94,10 @@ const cardHeight = 'h-72 sm:h-80';
96
94
  <a href={href} class="block h-full">
97
95
  <div class:list={['relative overflow-hidden img-placeholder', cardHeight]}>
98
96
  {image ? (
99
- <Picture
97
+ <ResponsivePicture
100
98
  src={image}
101
99
  alt={imageAlt}
102
- widths={IMAGE_LADDER}
103
100
  sizes="(max-width: 767px) 100vw, (max-width: 1023px) 50vw, 33vw"
104
- formats={['webp']}
105
- fallbackFormat="webp"
106
101
  pictureAttributes={{ class: 'block w-full h-full' }}
107
102
  class="w-full h-full object-cover transition-transform duration-700 group-hover:scale-110"
108
103
  loading={loadingStrategy}
@@ -1,5 +1,4 @@
1
1
  ---
2
- import { IMAGE_LADDER } from '@sarimarcus/content-sites-core/images';
3
2
  /**
4
3
  * RestaurantCard — restaurant teaser for listings, facets and related rails. The site adapter resolves the image, href,
5
4
  * placeholder, badge decisions and every visible string; the card only lays them out.
@@ -7,9 +6,8 @@ import { IMAGE_LADDER } from '@sarimarcus/content-sites-core/images';
7
6
  * overflow ceiling. The price pill renders only when the value is label-length; a prose-length price stays in the
8
7
  * inline price row.
9
8
  */
10
- import { Picture } from 'astro:assets';
11
9
  import type { ImageMetadata } from 'astro';
12
- import { Badge, isBadgeLength, PRICE_LABEL_MAX } from '@sarimarcus/content-sites-ui/primitives';
10
+ import { Badge, isBadgeLength, PRICE_LABEL_MAX, ResponsivePicture } from '@sarimarcus/content-sites-ui/primitives';
13
11
 
14
12
  export interface CardRating {
15
13
  value: number;
@@ -79,13 +77,10 @@ const loadingStrategy = index < eager ? "eager" : "lazy";
79
77
  <a href={href} class="flex flex-col flex-1 focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 rounded-xl">
80
78
  <div class="relative h-44 sm:h-52 overflow-hidden img-placeholder shrink-0">
81
79
  {image ? (
82
- <Picture
80
+ <ResponsivePicture
83
81
  src={image}
84
82
  alt={imageAlt}
85
- widths={IMAGE_LADDER}
86
83
  sizes="(max-width: 639px) 100vw, (max-width: 1023px) 50vw, 33vw"
87
- formats={['webp']}
88
- fallbackFormat="webp"
89
84
  pictureAttributes={{ class: 'block w-full h-full' }}
90
85
  class="w-full h-full object-cover transition-transform duration-500 group-hover:scale-105"
91
86
  loading={loadingStrategy}
@@ -1,12 +1,10 @@
1
1
  ---
2
- import { IMAGE_LADDER } from '@sarimarcus/content-sites-core/images';
3
2
  /**
4
3
  * WalkCard — walking-route teaser. Theme and difficulty keys pick the badge colours; their labels and every other
5
4
  * visible string come from the site adapter. Without an image the card shows a footsteps placeholder.
6
5
  */
7
- import { Picture } from 'astro:assets';
8
6
  import type { ImageMetadata } from 'astro';
9
- import { ArrowLabel, Badge, Icon } from '@sarimarcus/content-sites-ui/primitives';
7
+ import { ArrowLabel, Badge, Icon, ResponsivePicture } from '@sarimarcus/content-sites-ui/primitives';
10
8
 
11
9
  export interface WalkCardStrings {
12
10
  /** Screen-reader labels before each meta value. */
@@ -75,13 +73,10 @@ const difficultyColor = difficultyColors[difficulty] || 'bg-muted text-muted-for
75
73
  <a href={href} class="flex flex-col h-full focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 rounded-xl">
76
74
  <div class="relative aspect-[3/2] overflow-hidden img-placeholder shrink-0">
77
75
  {image ? (
78
- <Picture
76
+ <ResponsivePicture
79
77
  src={image}
80
78
  alt={imageAlt}
81
- widths={IMAGE_LADDER}
82
79
  sizes="(max-width: 639px) 100vw, (max-width: 1023px) 50vw, 33vw"
83
- formats={['webp']}
84
- fallbackFormat="webp"
85
80
  pictureAttributes={{ class: 'block w-full h-full' }}
86
81
  class="w-full h-full object-cover transition-transform duration-500 group-hover:scale-105"
87
82
  loading={index < 3 ? "eager" : "lazy"}
@@ -1,13 +1,11 @@
1
1
  ---
2
- import { IMAGE_LADDER } from '@sarimarcus/content-sites-core/images';
3
2
  /**
4
3
  * RankedListingRow — one entry in a numbered editorial ranking list, e.g. a proximity page that reads top-to-bottom by
5
4
  * distance. Rendered inside the caller's `<ol>`. The whole row is one real link, so the name stays selectable text.
6
5
  * The site adapter resolves the image and supplies every visible string.
7
6
  */
8
- import { Picture } from 'astro:assets';
9
7
  import type { ImageMetadata } from 'astro';
10
- import { Icon } from '@sarimarcus/content-sites-ui/primitives';
8
+ import { Icon, ResponsivePicture } from '@sarimarcus/content-sites-ui/primitives';
11
9
 
12
10
  interface Props {
13
11
  rank: number;
@@ -67,13 +65,10 @@ const paddedRank = String(rank).padStart(2, '0');
67
65
  <div class="col-start-2 grid grid-cols-[5.5rem_1fr] sm:grid-cols-[9rem_1fr] gap-4 sm:gap-6 w-full min-w-0">
68
66
  <div class="relative aspect-square rounded-lg overflow-hidden img-placeholder border border-border shrink-0">
69
67
  {image ? (
70
- <Picture
68
+ <ResponsivePicture
71
69
  src={image}
72
70
  alt={imageAlt}
73
- widths={IMAGE_LADDER}
74
71
  sizes="(max-width: 639px) 88px, 144px"
75
- formats={['webp']}
76
- fallbackFormat="webp"
77
72
  pictureAttributes={{ class: 'block w-full h-full' }}
78
73
  class="w-full h-full object-cover transition-transform duration-500 ease-out group-hover:scale-[1.04]"
79
74
  loading={rank <= 2 ? 'eager' : 'lazy'}