@blogmcp/mdx-schema 0.3.0 → 0.5.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Lukas Zubal
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -412,6 +412,117 @@ export const componentMetadata = [
412
412
  addedIn: '0.1.0',
413
413
  deprecated: [],
414
414
  },
415
+ {
416
+ name: 'TripMap',
417
+ description: 'Interactive trip map built from photo GPS + capture time: thumbnail markers, chronological route line, synced photo filmstrip, fly-through playback. Without props it maps every geotagged media attached to or embedded in the article (auto mode); only media with exposed location (geoExposed) appear. In article previews it renders as a static photo strip + stop list — the live map loads on the published page.',
418
+ icon: '🗺',
419
+ category: 'media',
420
+ aliases: ['tripmap', 'map', 'trip', 'route', 'travelmap', 'hike'],
421
+ props: [
422
+ {
423
+ name: 'slugs',
424
+ type: 'string',
425
+ required: false,
426
+ description: 'Comma-separated media slugs to map (e.g. "img-a,img-b"). Omit for AUTO mode: all geotagged media of the article, sorted by capture time.',
427
+ },
428
+ {
429
+ name: 'exclude',
430
+ type: 'string',
431
+ required: false,
432
+ description: 'AUTO mode only: comma-separated media slugs to leave off the map.',
433
+ },
434
+ {
435
+ name: 'nodes',
436
+ type: 'array',
437
+ required: false,
438
+ description: 'Hand-made nodes merged chronologically with the photos. STRICT JSON with quoted keys: [{"lat": 49.35, "lng": 16.31, "title": "Níhov, nádraží", "capturedAt": "2025-04-20T08:52:00"}]. Entries without capturedAt render as markers but stay off the route line. Unquoted keys silently break the prop.',
439
+ },
440
+ {
441
+ name: 'height',
442
+ type: 'string',
443
+ required: false,
444
+ default: '"420px"',
445
+ description: 'CSS height of the map box.',
446
+ },
447
+ {
448
+ name: 'line',
449
+ type: 'boolean',
450
+ required: false,
451
+ default: 'true',
452
+ description: 'Draw the chronological route line between time-neighbouring nodes.',
453
+ },
454
+ {
455
+ name: 'filmstrip',
456
+ type: 'boolean',
457
+ required: false,
458
+ default: 'true',
459
+ description: 'Show the synced photo strip below the map.',
460
+ },
461
+ {
462
+ name: 'playback',
463
+ type: 'boolean',
464
+ required: false,
465
+ default: 'true',
466
+ description: 'Show the play button that flies the camera along the route.',
467
+ },
468
+ {
469
+ name: 'cluster',
470
+ type: 'boolean',
471
+ required: false,
472
+ default: 'true',
473
+ description: 'Cluster nearby markers at low zoom.',
474
+ },
475
+ {
476
+ name: 'theme',
477
+ type: 'string',
478
+ required: false,
479
+ default: '"auto"',
480
+ description: 'Map color scheme; "auto" follows the reader’s system preference.',
481
+ enum: ['light', 'dark', 'auto'],
482
+ },
483
+ {
484
+ name: 'detail',
485
+ type: 'string',
486
+ required: false,
487
+ default: '"popup"',
488
+ description: 'Where the selected photo opens: "popup" on the map, or "panel" below the filmstrip at full width (larger photos; the map keeps its height). Both open the photo full-screen on click.',
489
+ enum: ['popup', 'panel'],
490
+ addedIn: '0.4.0',
491
+ },
492
+ {
493
+ name: 'styleUrl',
494
+ type: 'string',
495
+ required: false,
496
+ description: 'MapLibre style JSON URL override for this block (wins over tenant config).',
497
+ },
498
+ {
499
+ name: 'center',
500
+ type: 'string',
501
+ required: false,
502
+ description: 'Initial center as "lat,lng" — overrides smart framing; pair with zoom.',
503
+ },
504
+ {
505
+ name: 'zoom',
506
+ type: 'number',
507
+ required: false,
508
+ description: 'Initial zoom level — overrides smart framing; pair with center.',
509
+ numericRange: [1, 19],
510
+ },
511
+ {
512
+ name: 'title',
513
+ type: 'string',
514
+ required: false,
515
+ description: 'Accessible label for the map region.',
516
+ },
517
+ ],
518
+ hasChildren: false,
519
+ selfClosing: true,
520
+ defaultProps: 'title="Trasa výletu"',
521
+ defaultChildren: '',
522
+ example: '<TripMap title="Trasa údolím Libochovky" nodes={[{"lat": 49.3641, "lng": 16.3143, "title": "Níhov, nádraží", "capturedAt": "2025-04-20T08:52:00"}]} />',
523
+ addedIn: '0.3.0',
524
+ deprecated: [],
525
+ },
415
526
  ];
416
527
  const metadataMap = new Map(componentMetadata.map(m => [m.name, m]));
417
528
  /** Get metadata for a single component by name */
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/metadata/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,qEAAqE;AACrE,qEAAqE;AACrE,iDAAiD;AACjD,OAAO,EAAE,cAAc,IAAI,eAAe,EAAE,MAAM,eAAe,CAAA;AACjE,KAAK,eAAe,CAAA;AAGpB,6EAA6E;AAC7E,MAAM,CAAC,MAAM,iBAAiB,GAAwB;IACpD;QACE,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,8BAA8B;QAC3C,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,SAAS;QACnB,OAAO,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC;QAC/D,KAAK,EAAE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
  import type { GalleryProps } from '../types/index.js';
15
+ export declare const tripMapStyles: {
16
+ readonly container: "my-6 flex flex-col gap-3 rounded-xl border border-gray-200 bg-white p-3";
17
+ readonly head: "text-sm font-medium text-gray-700 m-0";
18
+ /**
19
+ * Sized wrapper that hosts BOTH the engine div and the facade overlay.
20
+ * The engine host must be a plain absolutely-positioned child that the
21
+ * framework never re-patches (a reactive class binding on the engine's
22
+ * own container would clobber the classes the engine adds to it).
23
+ */
24
+ readonly mapWrap: "relative w-full overflow-hidden rounded-lg";
25
+ /** detail="panel": engine-owned photo panel host below the map box (empty until a photo is picked). */
26
+ readonly detailHost: "w-full";
27
+ readonly mapOverlay: "absolute inset-0";
28
+ readonly mapBox: "flex h-full w-full items-center justify-center overflow-hidden rounded-lg bg-gray-100";
29
+ readonly mapHint: "text-sm text-gray-500";
30
+ readonly strip: "flex gap-2 overflow-x-auto pb-1 m-0 p-0 list-none";
31
+ readonly stripItem: "h-20 w-20 flex-none overflow-hidden rounded-lg bg-gray-100";
32
+ readonly stripImg: "block h-full w-full object-cover";
33
+ readonly stopList: "flex flex-col gap-0.5 text-sm text-gray-700 m-0 p-0 list-none";
34
+ readonly stopTime: "mr-2 tabular-nums text-gray-500";
35
+ readonly note: "text-xs text-gray-400 m-0";
36
+ };
15
37
  export declare const buttonStyles: {
16
38
  readonly base: "inline-flex items-center justify-center font-medium border transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2";
17
39
  readonly size: {
@@ -12,6 +12,33 @@
12
12
  * to the JIT — every class here is a literal.
13
13
  */
14
14
  // ---------------------------------------------------------------------------
15
+ // TripMap — shared facade classes. The SSR facade (thumb strip + stop list +
16
+ // map placeholder) must render byte-identical in the Vue and React renderers;
17
+ // the live map's own chrome is styled by @blogmcp/tripmap-core at runtime.
18
+ // ---------------------------------------------------------------------------
19
+ export const tripMapStyles = {
20
+ container: 'my-6 flex flex-col gap-3 rounded-xl border border-gray-200 bg-white p-3',
21
+ head: 'text-sm font-medium text-gray-700 m-0',
22
+ /**
23
+ * Sized wrapper that hosts BOTH the engine div and the facade overlay.
24
+ * The engine host must be a plain absolutely-positioned child that the
25
+ * framework never re-patches (a reactive class binding on the engine's
26
+ * own container would clobber the classes the engine adds to it).
27
+ */
28
+ mapWrap: 'relative w-full overflow-hidden rounded-lg',
29
+ /** detail="panel": engine-owned photo panel host below the map box (empty until a photo is picked). */
30
+ detailHost: 'w-full',
31
+ mapOverlay: 'absolute inset-0',
32
+ mapBox: 'flex h-full w-full items-center justify-center overflow-hidden rounded-lg bg-gray-100',
33
+ mapHint: 'text-sm text-gray-500',
34
+ strip: 'flex gap-2 overflow-x-auto pb-1 m-0 p-0 list-none',
35
+ stripItem: 'h-20 w-20 flex-none overflow-hidden rounded-lg bg-gray-100',
36
+ stripImg: 'block h-full w-full object-cover',
37
+ stopList: 'flex flex-col gap-0.5 text-sm text-gray-700 m-0 p-0 list-none',
38
+ stopTime: 'mr-2 tabular-nums text-gray-500',
39
+ note: 'text-xs text-gray-400 m-0',
40
+ };
41
+ // ---------------------------------------------------------------------------
15
42
  // Button — from mdx-render-vue/src/render/button/Button.vue
16
43
  // ---------------------------------------------------------------------------
17
44
  export const buttonStyles = {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/styles/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,8EAA8E;AAC9E,4DAA4D;AAC5D,8EAA8E;AAC9E,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,IAAI,EAAE,kJAAkJ;IACxJ,IAAI,EAAE;QACJ,EAAE,EAAE,6BAA6B;QACjC,EAAE,EAAE,8BAA8B;QAClC,EAAE,EAAE,kCAAkC;KACvC;IACD,YAAY,EAAE;QACZ,KAAK,EAAE;YACL,OAAO,EAAE,6DAA6D;YACtE,OAAO,EAAE,6DAA6D;YACtE,OAAO,EAAE,mEAAmE;YAC5E,OAAO,EAAE,+DAA+D;YACxE,KAAK,EAAE,2DAA2D;SACnE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AmB,EAAE,IAAI,EAAE,iBAAiB,EAAE;YACrF,GAAG,EAAE,EAAE,EAAE,EAAE,aAAa,EAAE,MAAM,EAAE,kBAAkB,EAAE,IAAI,EAAE,gBAAgB,EAAE;YAC9E,MAAM,EAAE,EAAE,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,gBAAgB,EAAE,IAAI,EAAE,cAAc,EAAE;SAC5E;KACF;IACD,2EAA2E;IAC3E,SAAS,EAAE;QACT,IAAI,EAAE,2DAA2D;QACjE,OAAO,EAAE,sIAAsI;QAC/I,GAAG,EAAE,kNAAkN;QACvN,MAAM,EAAE,mDAAmD;KAC5D;CACO,CAAA;AA4BV;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,iBAAiB,CAC/B,KAA6D;IAE7D,MAAM,WAAW,GAAG,KAAK,CAAC,WAAW,IAAI,GAAG,CAAA;IAC5C,IAAI,WAAW,KAAK,MAAM,EAAE,CAAC;QAC3B,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,cAAc,EAAE,eAAe,EAAE,CAAA;IAC3E,CAAC;IACD,OAAO;QACL,SAAS,EAAE,EAAE,WAAW,EAAE;QAC1B,UAAU,EAAE,EAAE,SAAS,EAAE,KAAK,CAAC,GAAG,IAAI,OAAO,EAAE,cAAc,EAAE,KAAK,CAAC,QAAQ,IAAI,QAAQ,EAAE;QAC3F,cAAc,EAAE,eAAe;KAChC,CAAA;AACH,CAAC"}
@@ -0,0 +1,130 @@
1
+ /**
2
+ * TripMap shared helpers — pure TS, zero framework deps (like
3
+ * `galleryTileLayout` in ./styles). Both renderer packages AND the
4
+ * drhoubicka storefront import these so prop parsing, the /api/media/geo
5
+ * URL contract, time formatting, and UI texts cannot drift between
6
+ * frameworks.
7
+ *
8
+ * NOTE: nothing here may import '@blogmcp/tripmap-core' — the renderers
9
+ * reach the map engine only via a dynamic import (single-file-bundle
10
+ * constraint, see the renderers' TripMap components).
11
+ */
12
+ import type { TripMapHandNode, TripMapProps } from './types/index.js';
13
+ export declare const TRIPMAP_DEFAULT_HEIGHT = "420px";
14
+ /** Comma-separated prop list → trimmed, non-empty entries. */
15
+ export declare function splitTripMapList(value: string | undefined): string[];
16
+ /**
17
+ * `nodes` should arrive as an array (strict-JSON prop). A malformed prop
18
+ * reaches the renderer as a raw string — try one lenient parse, else drop
19
+ * with a console hint so authors can find the mistake.
20
+ */
21
+ export declare function parseTripMapHandNodes(raw: TripMapProps['nodes']): TripMapHandNode[];
22
+ /**
23
+ * HH:MM as written in the ISO string — string slice, no Date math. EXIF
24
+ * capture times are timezone-ambiguous; interpreting them through the
25
+ * viewer's timezone would shift a trip's times by the viewer-vs-server
26
+ * offset. The wall clock as stored is the neutral rendering.
27
+ */
28
+ export declare function tripMapFormatTime(iso: string): string;
29
+ /**
30
+ * Build the GET /api/media/geo URL for a TripMap block. Explicit `slugs`
31
+ * win; otherwise auto mode selects by article identity; with neither the
32
+ * URL is a config-only request (the endpoint answers with the tenant basemap
33
+ * `config` and no nodes) so a hand-made-nodes map still gets its style.
34
+ */
35
+ export declare function buildTripMapGeoUrl(props: Pick<TripMapProps, 'slugs' | 'exclude'>, article?: {
36
+ filename?: string;
37
+ language?: string;
38
+ } | null): string;
39
+ /** One node of the GET /api/media/geo response. */
40
+ export interface TripMapGeoNode {
41
+ slug: string;
42
+ latitude: number;
43
+ longitude: number;
44
+ capturedAt?: string | null;
45
+ thumbnailUrl?: string | null;
46
+ url?: string | null;
47
+ /** Fullscreen-viewer variant (wider than `url`); older kb-api builds omit it. */
48
+ largeUrl?: string | null;
49
+ altText?: string | null;
50
+ placeName?: string | null;
51
+ width?: number | null;
52
+ height?: number | null;
53
+ }
54
+ export interface TripMapGeoResponse {
55
+ config?: {
56
+ styleUrl?: string;
57
+ darkStyleUrl?: string;
58
+ attribution?: string;
59
+ };
60
+ nodes: TripMapGeoNode[];
61
+ /** Count of requested media without exposed geo. */
62
+ skipped?: number;
63
+ }
64
+ export interface TripMapUiTexts {
65
+ hint: string;
66
+ empty: string;
67
+ unavailable: string;
68
+ }
69
+ export declare function tripMapUiTexts(language: string | undefined): TripMapUiTexts;
70
+ /** Localized core UI labels (playback + fullscreen); undefined keeps the core's English defaults. */
71
+ export interface TripMapUiLabels {
72
+ play: string;
73
+ stop: string;
74
+ fullscreen: string;
75
+ exitFullscreen: string;
76
+ export: string;
77
+ exportGpx: string;
78
+ exportGpxHint: string;
79
+ openInMapy: string;
80
+ openInGoogleMaps: string;
81
+ lightboxClose: string;
82
+ lightboxPrev: string;
83
+ lightboxNext: string;
84
+ zoomImage: string;
85
+ }
86
+ export declare function tripMapPlaybackLabels(language: string | undefined): TripMapUiLabels | undefined;
87
+ /** One thumbnail of the static facade (author order for `slugs`, capture order otherwise). */
88
+ export interface TripMapFacadeThumb {
89
+ slug: string;
90
+ src: string;
91
+ /** Alt text when the host handed the article's media in; empty otherwise. */
92
+ alt: string;
93
+ }
94
+ /** One named stop of the static facade (place-labelled photos + hand-made waypoints, chronological). */
95
+ export interface TripMapFacadeStop {
96
+ key: string;
97
+ title: string;
98
+ capturedAt?: string;
99
+ }
100
+ export interface TripMapFacade {
101
+ thumbs: TripMapFacadeThumb[];
102
+ stops: TripMapFacadeStop[];
103
+ }
104
+ /**
105
+ * What the facade needs from a host-provided media row — a structural subset
106
+ * that both the blog SDK's `ContentImageGeo` and `TripMapGeoNode` satisfy.
107
+ */
108
+ export interface TripMapFacadeMedia {
109
+ /** Rows without a slug (older API builds) are ignored. */
110
+ slug?: string | null;
111
+ thumbnailUrl?: string | null;
112
+ altText?: string | null;
113
+ placeName?: string | null;
114
+ capturedAt?: string | null;
115
+ }
116
+ /**
117
+ * The static facade both renderers server-render before any script runs:
118
+ * a thumbnail strip with alt text and a list of named stops. It is the part
119
+ * of a TripMap that search engines and answer engines read.
120
+ *
121
+ * - `slugs` set → those photos in author order; alt text comes from the
122
+ * article media the host provided (`context.media`), empty when unknown.
123
+ * - AUTO mode → every photo of the article the host provided, minus
124
+ * `exclude`, in capture order. Without host-provided media the facade has
125
+ * no thumbs (the live map still fetches them; only the no-JS view is poorer).
126
+ * - Stops: photos with a `placeName` plus hand-made `nodes`, chronological.
127
+ */
128
+ export declare function tripMapFacade(props: Pick<TripMapProps, 'slugs' | 'exclude' | 'nodes'>, context: {
129
+ media?: readonly TripMapFacadeMedia[] | null;
130
+ } | null | undefined): TripMapFacade;
@@ -0,0 +1,169 @@
1
+ /**
2
+ * TripMap shared helpers — pure TS, zero framework deps (like
3
+ * `galleryTileLayout` in ./styles). Both renderer packages AND the
4
+ * drhoubicka storefront import these so prop parsing, the /api/media/geo
5
+ * URL contract, time formatting, and UI texts cannot drift between
6
+ * frameworks.
7
+ *
8
+ * NOTE: nothing here may import '@blogmcp/tripmap-core' — the renderers
9
+ * reach the map engine only via a dynamic import (single-file-bundle
10
+ * constraint, see the renderers' TripMap components).
11
+ */
12
+ export const TRIPMAP_DEFAULT_HEIGHT = '420px';
13
+ /** Comma-separated prop list → trimmed, non-empty entries. */
14
+ export function splitTripMapList(value) {
15
+ return (value ?? '')
16
+ .split(',')
17
+ .map((s) => s.trim())
18
+ .filter(Boolean);
19
+ }
20
+ /**
21
+ * `nodes` should arrive as an array (strict-JSON prop). A malformed prop
22
+ * reaches the renderer as a raw string — try one lenient parse, else drop
23
+ * with a console hint so authors can find the mistake.
24
+ */
25
+ export function parseTripMapHandNodes(raw) {
26
+ let value = raw;
27
+ if (typeof value === 'string') {
28
+ try {
29
+ value = JSON.parse(value);
30
+ }
31
+ catch {
32
+ if (typeof console !== 'undefined') {
33
+ console.warn('[TripMap] `nodes` prop is not valid JSON — use quoted keys: [{"lat":49.3,"lng":16.3}]');
34
+ }
35
+ return [];
36
+ }
37
+ }
38
+ if (!Array.isArray(value))
39
+ return [];
40
+ return value.filter((n) => !!n &&
41
+ typeof n === 'object' &&
42
+ typeof n.lat === 'number' &&
43
+ typeof n.lng === 'number');
44
+ }
45
+ /**
46
+ * HH:MM as written in the ISO string — string slice, no Date math. EXIF
47
+ * capture times are timezone-ambiguous; interpreting them through the
48
+ * viewer's timezone would shift a trip's times by the viewer-vs-server
49
+ * offset. The wall clock as stored is the neutral rendering.
50
+ */
51
+ export function tripMapFormatTime(iso) {
52
+ const m = /T(\d{2}):(\d{2})/.exec(iso);
53
+ return m ? `${m[1]}:${m[2]}` : '';
54
+ }
55
+ /**
56
+ * Build the GET /api/media/geo URL for a TripMap block. Explicit `slugs`
57
+ * win; otherwise auto mode selects by article identity; with neither the
58
+ * URL is a config-only request (the endpoint answers with the tenant basemap
59
+ * `config` and no nodes) so a hand-made-nodes map still gets its style.
60
+ */
61
+ export function buildTripMapGeoUrl(props, article) {
62
+ const params = new URLSearchParams();
63
+ if (article?.language)
64
+ params.set('lang', article.language);
65
+ const slugs = splitTripMapList(props.slugs);
66
+ if (slugs.length > 0) {
67
+ params.set('slugs', slugs.join(','));
68
+ return `/api/media/geo?${params.toString()}`;
69
+ }
70
+ if (article?.filename) {
71
+ params.set('article', article.filename);
72
+ const exclude = splitTripMapList(props.exclude);
73
+ if (exclude.length > 0)
74
+ params.set('exclude', exclude.join(','));
75
+ return `/api/media/geo?${params.toString()}`;
76
+ }
77
+ // Nothing to select (hand-made nodes only, or a host that provides no
78
+ // article context): still call the endpoint — its `config` block is the
79
+ // only place the tenant basemap (style URL chain) is resolved; the node
80
+ // list comes back empty.
81
+ const qs = params.toString();
82
+ return qs ? `/api/media/geo?${qs}` : '/api/media/geo';
83
+ }
84
+ export function tripMapUiTexts(language) {
85
+ const czech = (language ?? '').toLowerCase().startsWith('cs');
86
+ return czech
87
+ ? {
88
+ hint: 'Interaktivní mapa výletu',
89
+ empty: 'Žádná z fotek nemá zveřejněnou polohu.',
90
+ unavailable: 'Mapa se zobrazí na publikovaném webu.',
91
+ }
92
+ : {
93
+ hint: 'Interactive trip map',
94
+ empty: 'No photos with public location data.',
95
+ unavailable: 'The map is shown on the published page.',
96
+ };
97
+ }
98
+ export function tripMapPlaybackLabels(language) {
99
+ return (language ?? '').toLowerCase().startsWith('cs')
100
+ ? {
101
+ play: 'Přehrát trasu',
102
+ stop: 'Zastavit',
103
+ fullscreen: 'Celá obrazovka',
104
+ exitFullscreen: 'Ukončit celou obrazovku',
105
+ export: 'Export trasy',
106
+ exportGpx: 'Stáhnout GPX',
107
+ exportGpxHint: 'hodinky, Garmin, Strava, Komoot',
108
+ openInMapy: 'Otevřít v Mapy.com',
109
+ openInGoogleMaps: 'Otevřít v Google Maps',
110
+ lightboxClose: 'Zavřít',
111
+ lightboxPrev: 'Předchozí fotka',
112
+ lightboxNext: 'Další fotka',
113
+ zoomImage: 'Zobrazit na celou obrazovku',
114
+ }
115
+ : undefined;
116
+ }
117
+ const thumbUrlFor = (slug) => `/api/media/thumb/${encodeURIComponent(slug)}?width=192`;
118
+ const byCapturedAt = (a, b) => {
119
+ if (a.capturedAt && b.capturedAt)
120
+ return a.capturedAt < b.capturedAt ? -1 : a.capturedAt > b.capturedAt ? 1 : 0;
121
+ if (a.capturedAt)
122
+ return -1;
123
+ if (b.capturedAt)
124
+ return 1;
125
+ return 0;
126
+ };
127
+ /**
128
+ * The static facade both renderers server-render before any script runs:
129
+ * a thumbnail strip with alt text and a list of named stops. It is the part
130
+ * of a TripMap that search engines and answer engines read.
131
+ *
132
+ * - `slugs` set → those photos in author order; alt text comes from the
133
+ * article media the host provided (`context.media`), empty when unknown.
134
+ * - AUTO mode → every photo of the article the host provided, minus
135
+ * `exclude`, in capture order. Without host-provided media the facade has
136
+ * no thumbs (the live map still fetches them; only the no-JS view is poorer).
137
+ * - Stops: photos with a `placeName` plus hand-made `nodes`, chronological.
138
+ */
139
+ export function tripMapFacade(props, context) {
140
+ const media = (context?.media ?? []).filter((m) => Boolean(m.slug));
141
+ const bySlug = new Map(media.map((m) => [m.slug, m]));
142
+ const slugList = splitTripMapList(props.slugs);
143
+ const exclude = new Set(splitTripMapList(props.exclude));
144
+ let photos;
145
+ let thumbs;
146
+ if (slugList.length > 0) {
147
+ thumbs = slugList.map((slug) => {
148
+ const m = bySlug.get(slug);
149
+ return { slug, src: m?.thumbnailUrl || thumbUrlFor(slug), alt: m?.altText ?? '' };
150
+ });
151
+ photos = slugList.map((slug) => bySlug.get(slug)).filter((m) => Boolean(m));
152
+ }
153
+ else {
154
+ photos = media.filter((m) => !exclude.has(m.slug)).slice().sort(byCapturedAt);
155
+ thumbs = photos.map((m) => ({ slug: m.slug, src: m.thumbnailUrl || thumbUrlFor(m.slug), alt: m.altText ?? '' }));
156
+ }
157
+ const stops = [
158
+ ...photos
159
+ .filter((m) => m.placeName)
160
+ .map((m) => ({ key: `m:${m.slug}`, title: m.placeName, capturedAt: m.capturedAt ?? undefined })),
161
+ ...parseTripMapHandNodes(props.nodes).map((n, i) => ({
162
+ key: `n:${n.id || i}`,
163
+ title: n.title || `${n.lat}, ${n.lng}`,
164
+ capturedAt: n.capturedAt,
165
+ })),
166
+ ].sort(byCapturedAt);
167
+ return { thumbs, stops };
168
+ }
169
+ //# sourceMappingURL=tripmap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tripmap.js","sourceRoot":"","sources":["../src/tripmap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,MAAM,CAAC,MAAM,sBAAsB,GAAG,OAAO,CAAA;AAE7C,8DAA8D;AAC9D,MAAM,UAAU,gBAAgB,CAAC,KAAyB;IACxD,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC;SACjB,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;SACpB,MAAM,CAAC,OAAO,CAAC,CAAA;AACpB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CAAC,GAA0B;IAC9D,IAAI,KAAK,GAAY,GAAG,CAAA;IACxB,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,IAAI,CAAC;YACH,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CA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CAAC,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,OAAO,IAAI,EAAE,EAAE,CAAC,CAAC,CAAA;IAClH,CAAC;IAED,MAAM,KAAK,GAAwB;QACjC,GAAG,MAAM;aACN,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;aAC1B,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,SAAmB,EAAE,UAAU,EAAE,CAAC,CAAC,UAAU,IAAI,SAAS,EAAE,CAAC,CAAC;QAC5G,GAAG,qBAAqB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;YACnD,GAAG,EAAE,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE;YACrB,KAAK,EAAE,CAAC,CAAC,KAAK,IAAI,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,EAAE;YACtC,UAAU,EAAE,CAAC,CAAC,UAAU;SACzB,CAAC,CAAC;KACJ,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;IAEpB,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAA;AAC1B,CAAC"}
@@ -82,6 +82,64 @@ export interface AudioPlayerProps {
82
82
  /** Show collapsible transcript */
83
83
  showTranscription?: boolean;
84
84
  }
85
+ /**
86
+ * TripMap component types
87
+ */
88
+ /**
89
+ * Hand-made map node authored in the `nodes` prop. STRICT JSON in MDX:
90
+ * `nodes={[{"lat":49.35,"lng":16.31,"title":"Níhov"}]}` — unquoted keys
91
+ * silently degrade to a raw string in the prop parser.
92
+ */
93
+ export interface TripMapHandNode {
94
+ lat: number;
95
+ lng: number;
96
+ /** Stable identity; generated (`waypoint-<n>`) when omitted */
97
+ id?: string;
98
+ /** Short label shown on the marker popup + filmstrip */
99
+ title?: string;
100
+ description?: string;
101
+ /** ISO timestamp — places the node into the chronological route line */
102
+ capturedAt?: string;
103
+ thumbnailUrl?: string;
104
+ /** Optional link target for the popup */
105
+ href?: string;
106
+ }
107
+ export interface TripMapProps {
108
+ /**
109
+ * Comma-separated media slugs to map. Omit for AUTO mode: every geotagged
110
+ * media attached to or embedded in the article, sorted by capture time.
111
+ */
112
+ slugs?: string;
113
+ /** AUTO mode only: comma-separated media slugs to leave off the map */
114
+ exclude?: string;
115
+ /** Hand-made nodes (strict JSON), merged chronologically with photo nodes */
116
+ nodes?: TripMapHandNode[];
117
+ /** CSS height of the map box (e.g. "420px") */
118
+ height?: string;
119
+ /** Chronological polyline between time-neighbouring nodes */
120
+ line?: boolean;
121
+ /** Synced photo strip below the map */
122
+ filmstrip?: boolean;
123
+ /** Play button: sequential fly-through along the route */
124
+ playback?: boolean;
125
+ /** Marker clustering */
126
+ cluster?: boolean;
127
+ /** Color scheme; "auto" follows the reader's system preference */
128
+ theme?: 'light' | 'dark' | 'auto';
129
+ /**
130
+ * Where the selected photo opens: "popup" on the map (default) or "panel"
131
+ * below the filmstrip at full width — larger photos, the map keeps its height
132
+ */
133
+ detail?: 'popup' | 'panel';
134
+ /** MapLibre style JSON URL override (wins over tenant config) */
135
+ styleUrl?: string;
136
+ /** Initial center "lat,lng" — overrides smart framing (pair with zoom) */
137
+ center?: string;
138
+ /** Initial zoom (1-19) — overrides smart framing (pair with center) */
139
+ zoom?: number;
140
+ /** Accessible label for the map region */
141
+ title?: string;
142
+ }
85
143
  /**
86
144
  * Common component variant type
87
145
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAoWH,yEAAyE;AACzE,MAAM,UAAU,iBAAiB,CAC/B,KAAuB;IAEvB,OAAO,KAAK,CAAC,IAAI,KAAK,YAAY,CAAA;AACpC,CAAC;AAED,MAAM,UAAU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GED
@@ -19,5 +19,5 @@
19
19
  *
20
20
  * npm run baseline:regen --workspace=@blogmcp/mdx-schema
21
21
  */
22
- export declare const SCHEMA_VERSION: "0.2.0";
22
+ export declare const SCHEMA_VERSION: "0.4.0";
23
23
  export type SchemaVersion = typeof SCHEMA_VERSION;
package/dist/version.js CHANGED
@@ -19,5 +19,5 @@
19
19
  *
20
20
  * npm run baseline:regen --workspace=@blogmcp/mdx-schema
21
21
  */
22
- export const SCHEMA_VERSION = '0.2.0';
22
+ export const SCHEMA_VERSION = '0.4.0';
23
23
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blogmcp/mdx-schema",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "description": "Framework-agnostic schema + metadata + parsing for MDX components. Zero framework dependencies — consumed by Vue and React renderer packages.",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -45,6 +45,10 @@
45
45
  "./checkPin": {
46
46
  "types": "./src/checkPin.ts",
47
47
  "import": "./dist/checkPin.js"
48
+ },
49
+ "./tripmap": {
50
+ "types": "./src/tripmap.ts",
51
+ "import": "./dist/tripmap.js"
48
52
  }
49
53
  },
50
54
  "files": [
@@ -419,6 +419,122 @@ export const componentMetadata: ComponentMetadata[] = [
419
419
  addedIn: '0.1.0',
420
420
  deprecated: [],
421
421
  },
422
+ {
423
+ name: 'TripMap',
424
+ description:
425
+ 'Interactive trip map built from photo GPS + capture time: thumbnail markers, chronological route line, synced photo filmstrip, fly-through playback. Without props it maps every geotagged media attached to or embedded in the article (auto mode); only media with exposed location (geoExposed) appear. In article previews it renders as a static photo strip + stop list — the live map loads on the published page.',
426
+ icon: '🗺',
427
+ category: 'media',
428
+ aliases: ['tripmap', 'map', 'trip', 'route', 'travelmap', 'hike'],
429
+ props: [
430
+ {
431
+ name: 'slugs',
432
+ type: 'string',
433
+ required: false,
434
+ description:
435
+ 'Comma-separated media slugs to map (e.g. "img-a,img-b"). Omit for AUTO mode: all geotagged media of the article, sorted by capture time.',
436
+ },
437
+ {
438
+ name: 'exclude',
439
+ type: 'string',
440
+ required: false,
441
+ description: 'AUTO mode only: comma-separated media slugs to leave off the map.',
442
+ },
443
+ {
444
+ name: 'nodes',
445
+ type: 'array',
446
+ required: false,
447
+ description:
448
+ 'Hand-made nodes merged chronologically with the photos. STRICT JSON with quoted keys: [{"lat": 49.35, "lng": 16.31, "title": "Níhov, nádraží", "capturedAt": "2025-04-20T08:52:00"}]. Entries without capturedAt render as markers but stay off the route line. Unquoted keys silently break the prop.',
449
+ },
450
+ {
451
+ name: 'height',
452
+ type: 'string',
453
+ required: false,
454
+ default: '"420px"',
455
+ description: 'CSS height of the map box.',
456
+ },
457
+ {
458
+ name: 'line',
459
+ type: 'boolean',
460
+ required: false,
461
+ default: 'true',
462
+ description: 'Draw the chronological route line between time-neighbouring nodes.',
463
+ },
464
+ {
465
+ name: 'filmstrip',
466
+ type: 'boolean',
467
+ required: false,
468
+ default: 'true',
469
+ description: 'Show the synced photo strip below the map.',
470
+ },
471
+ {
472
+ name: 'playback',
473
+ type: 'boolean',
474
+ required: false,
475
+ default: 'true',
476
+ description: 'Show the play button that flies the camera along the route.',
477
+ },
478
+ {
479
+ name: 'cluster',
480
+ type: 'boolean',
481
+ required: false,
482
+ default: 'true',
483
+ description: 'Cluster nearby markers at low zoom.',
484
+ },
485
+ {
486
+ name: 'theme',
487
+ type: 'string',
488
+ required: false,
489
+ default: '"auto"',
490
+ description: 'Map color scheme; "auto" follows the reader’s system preference.',
491
+ enum: ['light', 'dark', 'auto'],
492
+ },
493
+ {
494
+ name: 'detail',
495
+ type: 'string',
496
+ required: false,
497
+ default: '"popup"',
498
+ description:
499
+ 'Where the selected photo opens: "popup" on the map, or "panel" below the filmstrip at full width (larger photos; the map keeps its height). Both open the photo full-screen on click.',
500
+ enum: ['popup', 'panel'],
501
+ addedIn: '0.4.0',
502
+ },
503
+ {
504
+ name: 'styleUrl',
505
+ type: 'string',
506
+ required: false,
507
+ description: 'MapLibre style JSON URL override for this block (wins over tenant config).',
508
+ },
509
+ {
510
+ name: 'center',
511
+ type: 'string',
512
+ required: false,
513
+ description: 'Initial center as "lat,lng" — overrides smart framing; pair with zoom.',
514
+ },
515
+ {
516
+ name: 'zoom',
517
+ type: 'number',
518
+ required: false,
519
+ description: 'Initial zoom level — overrides smart framing; pair with center.',
520
+ numericRange: [1, 19],
521
+ },
522
+ {
523
+ name: 'title',
524
+ type: 'string',
525
+ required: false,
526
+ description: 'Accessible label for the map region.',
527
+ },
528
+ ],
529
+ hasChildren: false,
530
+ selfClosing: true,
531
+ defaultProps: 'title="Trasa výletu"',
532
+ defaultChildren: '',
533
+ example:
534
+ '<TripMap title="Trasa údolím Libochovky" nodes={[{"lat": 49.3641, "lng": 16.3143, "title": "Níhov, nádraží", "capturedAt": "2025-04-20T08:52:00"}]} />',
535
+ addedIn: '0.3.0',
536
+ deprecated: [],
537
+ },
422
538
  ]
423
539
 
424
540
  const metadataMap = new Map(componentMetadata.map(m => [m.name, m]))
@@ -14,6 +14,34 @@
14
14
 
15
15
  import type { GalleryProps } from '../types/index.js'
16
16
 
17
+ // ---------------------------------------------------------------------------
18
+ // TripMap — shared facade classes. The SSR facade (thumb strip + stop list +
19
+ // map placeholder) must render byte-identical in the Vue and React renderers;
20
+ // the live map's own chrome is styled by @blogmcp/tripmap-core at runtime.
21
+ // ---------------------------------------------------------------------------
22
+ export const tripMapStyles = {
23
+ container: 'my-6 flex flex-col gap-3 rounded-xl border border-gray-200 bg-white p-3',
24
+ head: 'text-sm font-medium text-gray-700 m-0',
25
+ /**
26
+ * Sized wrapper that hosts BOTH the engine div and the facade overlay.
27
+ * The engine host must be a plain absolutely-positioned child that the
28
+ * framework never re-patches (a reactive class binding on the engine's
29
+ * own container would clobber the classes the engine adds to it).
30
+ */
31
+ mapWrap: 'relative w-full overflow-hidden rounded-lg',
32
+ /** detail="panel": engine-owned photo panel host below the map box (empty until a photo is picked). */
33
+ detailHost: 'w-full',
34
+ mapOverlay: 'absolute inset-0',
35
+ mapBox: 'flex h-full w-full items-center justify-center overflow-hidden rounded-lg bg-gray-100',
36
+ mapHint: 'text-sm text-gray-500',
37
+ strip: 'flex gap-2 overflow-x-auto pb-1 m-0 p-0 list-none',
38
+ stripItem: 'h-20 w-20 flex-none overflow-hidden rounded-lg bg-gray-100',
39
+ stripImg: 'block h-full w-full object-cover',
40
+ stopList: 'flex flex-col gap-0.5 text-sm text-gray-700 m-0 p-0 list-none',
41
+ stopTime: 'mr-2 tabular-nums text-gray-500',
42
+ note: 'text-xs text-gray-400 m-0',
43
+ } as const
44
+
17
45
  // ---------------------------------------------------------------------------
18
46
  // Button — from mdx-render-vue/src/render/button/Button.vue
19
47
  // ---------------------------------------------------------------------------
package/src/tripmap.ts ADDED
@@ -0,0 +1,274 @@
1
+ /**
2
+ * TripMap shared helpers — pure TS, zero framework deps (like
3
+ * `galleryTileLayout` in ./styles). Both renderer packages AND the
4
+ * drhoubicka storefront import these so prop parsing, the /api/media/geo
5
+ * URL contract, time formatting, and UI texts cannot drift between
6
+ * frameworks.
7
+ *
8
+ * NOTE: nothing here may import '@blogmcp/tripmap-core' — the renderers
9
+ * reach the map engine only via a dynamic import (single-file-bundle
10
+ * constraint, see the renderers' TripMap components).
11
+ */
12
+
13
+ import type { TripMapHandNode, TripMapProps } from './types/index.js'
14
+
15
+ export const TRIPMAP_DEFAULT_HEIGHT = '420px'
16
+
17
+ /** Comma-separated prop list → trimmed, non-empty entries. */
18
+ export function splitTripMapList(value: string | undefined): string[] {
19
+ return (value ?? '')
20
+ .split(',')
21
+ .map((s) => s.trim())
22
+ .filter(Boolean)
23
+ }
24
+
25
+ /**
26
+ * `nodes` should arrive as an array (strict-JSON prop). A malformed prop
27
+ * reaches the renderer as a raw string — try one lenient parse, else drop
28
+ * with a console hint so authors can find the mistake.
29
+ */
30
+ export function parseTripMapHandNodes(raw: TripMapProps['nodes']): TripMapHandNode[] {
31
+ let value: unknown = raw
32
+ if (typeof value === 'string') {
33
+ try {
34
+ value = JSON.parse(value)
35
+ } catch {
36
+ if (typeof console !== 'undefined') {
37
+ console.warn(
38
+ '[TripMap] `nodes` prop is not valid JSON — use quoted keys: [{"lat":49.3,"lng":16.3}]',
39
+ )
40
+ }
41
+ return []
42
+ }
43
+ }
44
+ if (!Array.isArray(value)) return []
45
+ return value.filter(
46
+ (n): n is TripMapHandNode =>
47
+ !!n &&
48
+ typeof n === 'object' &&
49
+ typeof (n as TripMapHandNode).lat === 'number' &&
50
+ typeof (n as TripMapHandNode).lng === 'number',
51
+ )
52
+ }
53
+
54
+ /**
55
+ * HH:MM as written in the ISO string — string slice, no Date math. EXIF
56
+ * capture times are timezone-ambiguous; interpreting them through the
57
+ * viewer's timezone would shift a trip's times by the viewer-vs-server
58
+ * offset. The wall clock as stored is the neutral rendering.
59
+ */
60
+ export function tripMapFormatTime(iso: string): string {
61
+ const m = /T(\d{2}):(\d{2})/.exec(iso)
62
+ return m ? `${m[1]}:${m[2]}` : ''
63
+ }
64
+
65
+ /**
66
+ * Build the GET /api/media/geo URL for a TripMap block. Explicit `slugs`
67
+ * win; otherwise auto mode selects by article identity; with neither the
68
+ * URL is a config-only request (the endpoint answers with the tenant basemap
69
+ * `config` and no nodes) so a hand-made-nodes map still gets its style.
70
+ */
71
+ export function buildTripMapGeoUrl(
72
+ props: Pick<TripMapProps, 'slugs' | 'exclude'>,
73
+ article?: { filename?: string; language?: string } | null,
74
+ ): string {
75
+ const params = new URLSearchParams()
76
+ if (article?.language) params.set('lang', article.language)
77
+ const slugs = splitTripMapList(props.slugs)
78
+ if (slugs.length > 0) {
79
+ params.set('slugs', slugs.join(','))
80
+ return `/api/media/geo?${params.toString()}`
81
+ }
82
+ if (article?.filename) {
83
+ params.set('article', article.filename)
84
+ const exclude = splitTripMapList(props.exclude)
85
+ if (exclude.length > 0) params.set('exclude', exclude.join(','))
86
+ return `/api/media/geo?${params.toString()}`
87
+ }
88
+ // Nothing to select (hand-made nodes only, or a host that provides no
89
+ // article context): still call the endpoint — its `config` block is the
90
+ // only place the tenant basemap (style URL chain) is resolved; the node
91
+ // list comes back empty.
92
+ const qs = params.toString()
93
+ return qs ? `/api/media/geo?${qs}` : '/api/media/geo'
94
+ }
95
+
96
+ /** One node of the GET /api/media/geo response. */
97
+ export interface TripMapGeoNode {
98
+ slug: string
99
+ latitude: number
100
+ longitude: number
101
+ capturedAt?: string | null
102
+ thumbnailUrl?: string | null
103
+ url?: string | null
104
+ /** Fullscreen-viewer variant (wider than `url`); older kb-api builds omit it. */
105
+ largeUrl?: string | null
106
+ altText?: string | null
107
+ placeName?: string | null
108
+ width?: number | null
109
+ height?: number | null
110
+ }
111
+
112
+ export interface TripMapGeoResponse {
113
+ config?: {
114
+ styleUrl?: string
115
+ darkStyleUrl?: string
116
+ attribution?: string
117
+ }
118
+ nodes: TripMapGeoNode[]
119
+ /** Count of requested media without exposed geo. */
120
+ skipped?: number
121
+ }
122
+
123
+ export interface TripMapUiTexts {
124
+ hint: string
125
+ empty: string
126
+ unavailable: string
127
+ }
128
+
129
+ export function tripMapUiTexts(language: string | undefined): TripMapUiTexts {
130
+ const czech = (language ?? '').toLowerCase().startsWith('cs')
131
+ return czech
132
+ ? {
133
+ hint: 'Interaktivní mapa výletu',
134
+ empty: 'Žádná z fotek nemá zveřejněnou polohu.',
135
+ unavailable: 'Mapa se zobrazí na publikovaném webu.',
136
+ }
137
+ : {
138
+ hint: 'Interactive trip map',
139
+ empty: 'No photos with public location data.',
140
+ unavailable: 'The map is shown on the published page.',
141
+ }
142
+ }
143
+
144
+ /** Localized core UI labels (playback + fullscreen); undefined keeps the core's English defaults. */
145
+ export interface TripMapUiLabels {
146
+ play: string
147
+ stop: string
148
+ fullscreen: string
149
+ exitFullscreen: string
150
+ export: string
151
+ exportGpx: string
152
+ exportGpxHint: string
153
+ openInMapy: string
154
+ openInGoogleMaps: string
155
+ lightboxClose: string
156
+ lightboxPrev: string
157
+ lightboxNext: string
158
+ zoomImage: string
159
+ }
160
+
161
+ export function tripMapPlaybackLabels(language: string | undefined): TripMapUiLabels | undefined {
162
+ return (language ?? '').toLowerCase().startsWith('cs')
163
+ ? {
164
+ play: 'Přehrát trasu',
165
+ stop: 'Zastavit',
166
+ fullscreen: 'Celá obrazovka',
167
+ exitFullscreen: 'Ukončit celou obrazovku',
168
+ export: 'Export trasy',
169
+ exportGpx: 'Stáhnout GPX',
170
+ exportGpxHint: 'hodinky, Garmin, Strava, Komoot',
171
+ openInMapy: 'Otevřít v Mapy.com',
172
+ openInGoogleMaps: 'Otevřít v Google Maps',
173
+ lightboxClose: 'Zavřít',
174
+ lightboxPrev: 'Předchozí fotka',
175
+ lightboxNext: 'Další fotka',
176
+ zoomImage: 'Zobrazit na celou obrazovku',
177
+ }
178
+ : undefined
179
+ }
180
+
181
+
182
+ // ---------------------------------------------------------------------------
183
+ // Server-rendered facade — what crawlers and no-JS readers get
184
+ // ---------------------------------------------------------------------------
185
+
186
+ /** One thumbnail of the static facade (author order for `slugs`, capture order otherwise). */
187
+ export interface TripMapFacadeThumb {
188
+ slug: string
189
+ src: string
190
+ /** Alt text when the host handed the article's media in; empty otherwise. */
191
+ alt: string
192
+ }
193
+
194
+ /** One named stop of the static facade (place-labelled photos + hand-made waypoints, chronological). */
195
+ export interface TripMapFacadeStop {
196
+ key: string
197
+ title: string
198
+ capturedAt?: string
199
+ }
200
+
201
+ export interface TripMapFacade {
202
+ thumbs: TripMapFacadeThumb[]
203
+ stops: TripMapFacadeStop[]
204
+ }
205
+
206
+ /**
207
+ * What the facade needs from a host-provided media row — a structural subset
208
+ * that both the blog SDK's `ContentImageGeo` and `TripMapGeoNode` satisfy.
209
+ */
210
+ export interface TripMapFacadeMedia {
211
+ /** Rows without a slug (older API builds) are ignored. */
212
+ slug?: string | null
213
+ thumbnailUrl?: string | null
214
+ altText?: string | null
215
+ placeName?: string | null
216
+ capturedAt?: string | null
217
+ }
218
+
219
+ const thumbUrlFor = (slug: string): string => `/api/media/thumb/${encodeURIComponent(slug)}?width=192`
220
+
221
+ const byCapturedAt = <T extends { capturedAt?: string | null }>(a: T, b: T): number => {
222
+ if (a.capturedAt && b.capturedAt) return a.capturedAt < b.capturedAt ? -1 : a.capturedAt > b.capturedAt ? 1 : 0
223
+ if (a.capturedAt) return -1
224
+ if (b.capturedAt) return 1
225
+ return 0
226
+ }
227
+
228
+ /**
229
+ * The static facade both renderers server-render before any script runs:
230
+ * a thumbnail strip with alt text and a list of named stops. It is the part
231
+ * of a TripMap that search engines and answer engines read.
232
+ *
233
+ * - `slugs` set → those photos in author order; alt text comes from the
234
+ * article media the host provided (`context.media`), empty when unknown.
235
+ * - AUTO mode → every photo of the article the host provided, minus
236
+ * `exclude`, in capture order. Without host-provided media the facade has
237
+ * no thumbs (the live map still fetches them; only the no-JS view is poorer).
238
+ * - Stops: photos with a `placeName` plus hand-made `nodes`, chronological.
239
+ */
240
+ export function tripMapFacade(
241
+ props: Pick<TripMapProps, 'slugs' | 'exclude' | 'nodes'>,
242
+ context: { media?: readonly TripMapFacadeMedia[] | null } | null | undefined,
243
+ ): TripMapFacade {
244
+ const media = (context?.media ?? []).filter((m): m is TripMapFacadeMedia & { slug: string } => Boolean(m.slug))
245
+ const bySlug = new Map(media.map((m) => [m.slug, m]))
246
+ const slugList = splitTripMapList(props.slugs)
247
+ const exclude = new Set(splitTripMapList(props.exclude))
248
+
249
+ let photos: Array<TripMapFacadeMedia & { slug: string }>
250
+ let thumbs: TripMapFacadeThumb[]
251
+ if (slugList.length > 0) {
252
+ thumbs = slugList.map((slug) => {
253
+ const m = bySlug.get(slug)
254
+ return { slug, src: m?.thumbnailUrl || thumbUrlFor(slug), alt: m?.altText ?? '' }
255
+ })
256
+ photos = slugList.map((slug) => bySlug.get(slug)).filter((m): m is TripMapFacadeMedia & { slug: string } => Boolean(m))
257
+ } else {
258
+ photos = media.filter((m) => !exclude.has(m.slug)).slice().sort(byCapturedAt)
259
+ thumbs = photos.map((m) => ({ slug: m.slug, src: m.thumbnailUrl || thumbUrlFor(m.slug), alt: m.altText ?? '' }))
260
+ }
261
+
262
+ const stops: TripMapFacadeStop[] = [
263
+ ...photos
264
+ .filter((m) => m.placeName)
265
+ .map((m) => ({ key: `m:${m.slug}`, title: m.placeName as string, capturedAt: m.capturedAt ?? undefined })),
266
+ ...parseTripMapHandNodes(props.nodes).map((n, i) => ({
267
+ key: `n:${n.id || i}`,
268
+ title: n.title || `${n.lat}, ${n.lng}`,
269
+ capturedAt: n.capturedAt,
270
+ })),
271
+ ].sort(byCapturedAt)
272
+
273
+ return { thumbs, stops }
274
+ }
@@ -92,6 +92,67 @@ export interface AudioPlayerProps {
92
92
  showTranscription?: boolean
93
93
  }
94
94
 
95
+ /**
96
+ * TripMap component types
97
+ */
98
+
99
+ /**
100
+ * Hand-made map node authored in the `nodes` prop. STRICT JSON in MDX:
101
+ * `nodes={[{"lat":49.35,"lng":16.31,"title":"Níhov"}]}` — unquoted keys
102
+ * silently degrade to a raw string in the prop parser.
103
+ */
104
+ export interface TripMapHandNode {
105
+ lat: number
106
+ lng: number
107
+ /** Stable identity; generated (`waypoint-<n>`) when omitted */
108
+ id?: string
109
+ /** Short label shown on the marker popup + filmstrip */
110
+ title?: string
111
+ description?: string
112
+ /** ISO timestamp — places the node into the chronological route line */
113
+ capturedAt?: string
114
+ thumbnailUrl?: string
115
+ /** Optional link target for the popup */
116
+ href?: string
117
+ }
118
+
119
+ export interface TripMapProps {
120
+ /**
121
+ * Comma-separated media slugs to map. Omit for AUTO mode: every geotagged
122
+ * media attached to or embedded in the article, sorted by capture time.
123
+ */
124
+ slugs?: string
125
+ /** AUTO mode only: comma-separated media slugs to leave off the map */
126
+ exclude?: string
127
+ /** Hand-made nodes (strict JSON), merged chronologically with photo nodes */
128
+ nodes?: TripMapHandNode[]
129
+ /** CSS height of the map box (e.g. "420px") */
130
+ height?: string
131
+ /** Chronological polyline between time-neighbouring nodes */
132
+ line?: boolean
133
+ /** Synced photo strip below the map */
134
+ filmstrip?: boolean
135
+ /** Play button: sequential fly-through along the route */
136
+ playback?: boolean
137
+ /** Marker clustering */
138
+ cluster?: boolean
139
+ /** Color scheme; "auto" follows the reader's system preference */
140
+ theme?: 'light' | 'dark' | 'auto'
141
+ /**
142
+ * Where the selected photo opens: "popup" on the map (default) or "panel"
143
+ * below the filmstrip at full width — larger photos, the map keeps its height
144
+ */
145
+ detail?: 'popup' | 'panel'
146
+ /** MapLibre style JSON URL override (wins over tenant config) */
147
+ styleUrl?: string
148
+ /** Initial center "lat,lng" — overrides smart framing (pair with zoom) */
149
+ center?: string
150
+ /** Initial zoom (1-19) — overrides smart framing (pair with center) */
151
+ zoom?: number
152
+ /** Accessible label for the map region */
153
+ title?: string
154
+ }
155
+
95
156
  /**
96
157
  * Common component variant type
97
158
  */
package/src/version.ts CHANGED
@@ -19,6 +19,6 @@
19
19
  *
20
20
  * npm run baseline:regen --workspace=@blogmcp/mdx-schema
21
21
  */
22
- export const SCHEMA_VERSION = '0.2.0' as const
22
+ export const SCHEMA_VERSION = '0.4.0' as const
23
23
 
24
24
  export type SchemaVersion = typeof SCHEMA_VERSION