@sarimarcus/content-sites-tourism 0.31.3 → 0.31.4
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,15 @@
|
|
|
2
2
|
|
|
3
3
|
All packages in the platform release in lockstep; entries are per release version.
|
|
4
4
|
|
|
5
|
+
## 0.31.4 (2026-10-08)
|
|
6
|
+
|
|
7
|
+
- `./templates` and `./sections`: `CategoryFacetTone` is `BrandTone | 'secondary-overlay'`, the facet nav `accent` and `SituationalScenario.tone` are ui `BrandTone`; `./cards` `NeighborhoodBadgeTone` is `BrandTone | 'overlay'`. Type-only (SLA-3020).
|
|
8
|
+
|
|
9
|
+
### Deprecated
|
|
10
|
+
|
|
11
|
+
- `./schema` `monumentBuilder`, `museumBuilder`, `restaurantBuilder`, `barBuilder`, `dishBuilder`, `neighborhoodBuilder`, `GUIDE_ITEM_TYPES` and `MonumentOptions`, `RestaurantOptions`, `BarOptions`, `DishOptions`: no site imports them; `tourismCityBuilders(city)` builds every one. Removed in the next minor (SLA-3020).
|
|
12
|
+
- `./schema` builder options no caller sets: `MonumentOptions.touristType`, `RestaurantOptions.menuSectionName`, `BarOptions.menuSectionName` and `tapasCuisine`, `DishOptions.articleSection` and `inLanguage`, and `guideItemListBuilder`'s `itemTypes`. They still apply when passed, so JSON-LD is unchanged. Removed in the next minor. `touristTripBuilder` and `TouristTripOptions` stay: they replace core's deprecated pair (SLA-3020).
|
|
13
|
+
|
|
5
14
|
## 0.31.3 (2026-10-08)
|
|
6
15
|
|
|
7
16
|
- `./cards`: `EventCard` renders on ui `EntityCard` (poster variant, `h-48 sm:h-56` media) with a ui `ArrowLabel` "Discover" CTA in place of the `Icon` arrow-right (svg gains `shrink-0`); props are unchanged. Intended output changes: the image gains the reduced-motion zoom cancel (`motion-reduce:group-hover:scale-100`), non-priority images no longer emit `fetchpriority="auto"`, and whitespace around the frame changes. Pages: `events` and `index` on both tourism sites and Granada's `neighborhood/` pages that rail EventCards (SLA-3019).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sarimarcus/content-sites-tourism",
|
|
3
|
-
"version": "0.31.
|
|
3
|
+
"version": "0.31.4",
|
|
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.31.
|
|
40
|
-
"@sarimarcus/content-sites-ui": "0.31.
|
|
39
|
+
"@sarimarcus/content-sites-core": "0.31.4",
|
|
40
|
+
"@sarimarcus/content-sites-ui": "0.31.4"
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -7,8 +7,9 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import type { ImageMetadata } from 'astro';
|
|
9
9
|
import { Badge, Icon, ResponsivePicture } from '@sarimarcus/content-sites-ui/primitives';
|
|
10
|
+
import type { BrandTone } from '@sarimarcus/content-sites-ui/types';
|
|
10
11
|
|
|
11
|
-
export type NeighborhoodBadgeTone =
|
|
12
|
+
export type NeighborhoodBadgeTone = BrandTone | 'overlay';
|
|
12
13
|
|
|
13
14
|
export interface NeighborhoodBadge {
|
|
14
15
|
label: string;
|
package/src/schema/builders.ts
CHANGED
|
@@ -5,12 +5,17 @@ import {
|
|
|
5
5
|
import type { JsonLdNode, SchemaBuilder, SchemaBuilders } from '@sarimarcus/content-sites-core/schema';
|
|
6
6
|
import { cityAddressPolicy, type TourismCity } from './city.ts';
|
|
7
7
|
|
|
8
|
+
/** @deprecated Only `tourismCityBuilders` builds it; Removed in the next minor (SLA-3020). */
|
|
8
9
|
export interface MonumentOptions {
|
|
9
10
|
city: TourismCity;
|
|
11
|
+
/** @deprecated No caller sets it; the node keeps `touristType: 'Cultural'`. Removed in the next minor (SLA-3020). */
|
|
10
12
|
touristType?: string;
|
|
11
13
|
}
|
|
12
14
|
|
|
13
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* TouristAttraction at route `monument`; hours from the free-text `hours` line.
|
|
17
|
+
* @deprecated No site imports it; use `tourismCityBuilders(city)`. Removed in the next minor (SLA-3020).
|
|
18
|
+
*/
|
|
14
19
|
export function monumentBuilder(options: MonumentOptions): SchemaBuilder {
|
|
15
20
|
const address = cityAddressPolicy(options.city);
|
|
16
21
|
const touristType = options.touristType ?? 'Cultural';
|
|
@@ -23,7 +28,10 @@ export function monumentBuilder(options: MonumentOptions): SchemaBuilder {
|
|
|
23
28
|
});
|
|
24
29
|
}
|
|
25
30
|
|
|
26
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* Museum at route `museum`; hours from the free-text `hours` line.
|
|
33
|
+
* @deprecated No site imports it; use `tourismCityBuilders(city)`. Removed in the next minor (SLA-3020).
|
|
34
|
+
*/
|
|
27
35
|
export function museumBuilder(options: { city: TourismCity }): SchemaBuilder {
|
|
28
36
|
const address = cityAddressPolicy(options.city);
|
|
29
37
|
return (data, ctx) => placeNode(ctx, data, 'Museum', 'museum', {
|
|
@@ -44,12 +52,17 @@ const menu = (sectionName: string, items: string[] | undefined): JsonLdNode | un
|
|
|
44
52
|
},
|
|
45
53
|
} : undefined);
|
|
46
54
|
|
|
55
|
+
/** @deprecated Only `tourismCityBuilders` builds it; Removed in the next minor (SLA-3020). */
|
|
47
56
|
export interface RestaurantOptions {
|
|
48
57
|
city: TourismCity;
|
|
58
|
+
/** @deprecated No caller sets it; the menu section stays 'Specialties'. Removed in the next minor (SLA-3020). */
|
|
49
59
|
menuSectionName?: string;
|
|
50
60
|
}
|
|
51
61
|
|
|
52
|
-
/**
|
|
62
|
+
/**
|
|
63
|
+
* Restaurant at route `restaurant`; `specialties` become its menu.
|
|
64
|
+
* @deprecated No site imports it; use `tourismCityBuilders(city)`. Removed in the next minor (SLA-3020).
|
|
65
|
+
*/
|
|
53
66
|
export function restaurantBuilder(options: RestaurantOptions): SchemaBuilder {
|
|
54
67
|
const address = cityAddressPolicy(options.city);
|
|
55
68
|
const sectionName = options.menuSectionName ?? 'Specialties';
|
|
@@ -66,14 +79,22 @@ export function restaurantBuilder(options: RestaurantOptions): SchemaBuilder {
|
|
|
66
79
|
});
|
|
67
80
|
}
|
|
68
81
|
|
|
82
|
+
/** @deprecated Only `tourismCityBuilders` builds it; Removed in the next minor (SLA-3020). */
|
|
69
83
|
export interface BarOptions {
|
|
70
84
|
city: TourismCity;
|
|
85
|
+
/** @deprecated No caller sets it; the menu section stays 'Signature Drinks'. Removed in the next minor (SLA-3020). */
|
|
71
86
|
menuSectionName?: string;
|
|
72
|
-
/**
|
|
87
|
+
/**
|
|
88
|
+
* `servesCuisine` for a bar whose `category` is `tapas`.
|
|
89
|
+
* @deprecated No caller sets it; it stays 'Tapas'. Removed in the next minor (SLA-3020).
|
|
90
|
+
*/
|
|
73
91
|
tapasCuisine?: string;
|
|
74
92
|
}
|
|
75
93
|
|
|
76
|
-
/**
|
|
94
|
+
/**
|
|
95
|
+
* BarOrPub at route `bar`; `specialties` become its drinks menu.
|
|
96
|
+
* @deprecated No site imports it; use `tourismCityBuilders(city)`. Removed in the next minor (SLA-3020).
|
|
97
|
+
*/
|
|
77
98
|
export function barBuilder(options: BarOptions): SchemaBuilder {
|
|
78
99
|
const address = cityAddressPolicy(options.city);
|
|
79
100
|
const sectionName = options.menuSectionName ?? 'Signature Drinks';
|
|
@@ -91,12 +112,18 @@ export function barBuilder(options: BarOptions): SchemaBuilder {
|
|
|
91
112
|
});
|
|
92
113
|
}
|
|
93
114
|
|
|
115
|
+
/** @deprecated Only `tourismCityBuilders` builds it; Removed in the next minor (SLA-3020). */
|
|
94
116
|
export interface DishOptions {
|
|
117
|
+
/** @deprecated No caller sets it; it stays 'Gastronomy'. Removed in the next minor (SLA-3020). */
|
|
95
118
|
articleSection?: string;
|
|
119
|
+
/** @deprecated No caller sets it; it stays 'en'. Removed in the next minor (SLA-3020). */
|
|
96
120
|
inLanguage?: string;
|
|
97
121
|
}
|
|
98
122
|
|
|
99
|
-
/**
|
|
123
|
+
/**
|
|
124
|
+
* A dish page as an Article at route `dish`, dated by `dateModified` (now when absent).
|
|
125
|
+
* @deprecated No site imports it; use `tourismCityBuilders(city)`. Removed in the next minor (SLA-3020).
|
|
126
|
+
*/
|
|
100
127
|
export function dishBuilder(options: DishOptions = {}): SchemaBuilder {
|
|
101
128
|
const { articleSection = 'Gastronomy', inLanguage = 'en' } = options;
|
|
102
129
|
return (data, ctx) => {
|
|
@@ -120,7 +147,10 @@ export function dishBuilder(options: DishOptions = {}): SchemaBuilder {
|
|
|
120
147
|
};
|
|
121
148
|
}
|
|
122
149
|
|
|
123
|
-
/**
|
|
150
|
+
/**
|
|
151
|
+
* Place at route `neighborhood`, inside the city; pinned to the city when it has no coordinates.
|
|
152
|
+
* @deprecated No site imports it; use `tourismCityBuilders(city)`. Removed in the next minor (SLA-3020).
|
|
153
|
+
*/
|
|
124
154
|
export function neighborhoodBuilder(options: { city: TourismCity }): SchemaBuilder {
|
|
125
155
|
const { city } = options;
|
|
126
156
|
const address = cityAddressPolicy(city);
|
|
@@ -179,7 +209,10 @@ export function tourismCityBuilders(city: TourismCity): SchemaBuilders {
|
|
|
179
209
|
};
|
|
180
210
|
}
|
|
181
211
|
|
|
182
|
-
/**
|
|
212
|
+
/**
|
|
213
|
+
* Guide item `type` (a plural collection name) → schema type (SLA-2468).
|
|
214
|
+
* @deprecated No site imports it; `guideItemListBuilder` applies it by default. Removed in the next minor (SLA-3020).
|
|
215
|
+
*/
|
|
183
216
|
export const GUIDE_ITEM_TYPES: Record<string, string> = {
|
|
184
217
|
restaurants: 'Restaurant',
|
|
185
218
|
hotels: 'LodgingBusiness',
|
|
@@ -197,7 +230,11 @@ export const GUIDE_ITEM_TYPES: Record<string, string> = {
|
|
|
197
230
|
* A ranked guide as an ItemList of mixed-type nested entities. Event nests address and geo under `location`;
|
|
198
231
|
* TouristTrip carries no `geo`; hotels carry a price range and no hours.
|
|
199
232
|
*/
|
|
200
|
-
export function guideItemListBuilder(options: {
|
|
233
|
+
export function guideItemListBuilder(options: {
|
|
234
|
+
city: TourismCity;
|
|
235
|
+
/** @deprecated No caller sets it; the map stays `GUIDE_ITEM_TYPES`. Removed in the next minor (SLA-3020). */
|
|
236
|
+
itemTypes?: Record<string, string>;
|
|
237
|
+
}): SchemaBuilder {
|
|
201
238
|
const policy = cityAddressPolicy(options.city);
|
|
202
239
|
const itemTypes = options.itemTypes ?? GUIDE_ITEM_TYPES;
|
|
203
240
|
return (data, ctx) => {
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* in-page anchor gets a down chevron, any other href a right arrow.
|
|
6
6
|
*/
|
|
7
7
|
import { Icon } from '@sarimarcus/content-sites-ui/primitives';
|
|
8
|
+
import type { BrandTone } from '@sarimarcus/content-sites-ui/types';
|
|
8
9
|
|
|
9
10
|
export interface SituationalScenario {
|
|
10
11
|
title: string;
|
|
@@ -15,7 +16,7 @@ export interface SituationalScenario {
|
|
|
15
16
|
secondaryLink?: { label: string; href: string };
|
|
16
17
|
/** SVG path data for the 24×24 icon. */
|
|
17
18
|
icon: string;
|
|
18
|
-
tone:
|
|
19
|
+
tone: BrandTone;
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
interface Props {
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { Icon } from '@sarimarcus/content-sites-ui/primitives';
|
|
11
11
|
import { Container } from '@sarimarcus/content-sites-ui/layout';
|
|
12
|
-
import type { TrustedHtml } from '@sarimarcus/content-sites-ui/types';
|
|
12
|
+
import type { BrandTone, TrustedHtml } from '@sarimarcus/content-sites-ui/types';
|
|
13
13
|
import FacetHero from './FacetHero.astro';
|
|
14
14
|
import FacetChipNav from './FacetChipNav.astro';
|
|
15
15
|
import type { FacetLink, FacetNav } from './facet';
|
|
16
16
|
|
|
17
|
-
export type CategoryFacetTone =
|
|
17
|
+
export type CategoryFacetTone = BrandTone | 'secondary-overlay';
|
|
18
18
|
|
|
19
19
|
interface Props {
|
|
20
20
|
tone: CategoryFacetTone;
|
package/src/templates/facet.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// Types shared by the facet page templates.
|
|
2
|
+
import type { BrandTone } from '@sarimarcus/content-sites-ui/types';
|
|
2
3
|
|
|
3
4
|
export interface FacetLink {
|
|
4
5
|
href: string;
|
|
@@ -30,7 +31,7 @@ export interface FacetNav {
|
|
|
30
31
|
/** aria-label of the chip nav. */
|
|
31
32
|
label: string;
|
|
32
33
|
/** Chip colour; default primary. */
|
|
33
|
-
accent?:
|
|
34
|
+
accent?: BrandTone;
|
|
34
35
|
/** The unfiltered listing, first in the row. */
|
|
35
36
|
all?: { href: string; label: string; count: number };
|
|
36
37
|
items: FacetNavItem[];
|