@blogmcp/mdx-schema 0.3.0 → 0.4.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/dist/metadata/index.js +102 -0
- package/dist/metadata/index.js.map +1 -1
- package/dist/styles/index.d.ts +20 -0
- package/dist/styles/index.js +25 -0
- package/dist/styles/index.js.map +1 -1
- package/dist/tripmap.d.ts +71 -0
- package/dist/tripmap.js +103 -0
- package/dist/tripmap.js.map +1 -0
- package/dist/types/index.d.ts +53 -0
- package/dist/types/index.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +5 -1
- package/src/metadata/index.ts +106 -0
- package/src/styles/index.ts +26 -0
- package/src/tripmap.ts +148 -0
- package/src/types/index.ts +56 -0
- package/src/version.ts +1 -1
package/dist/metadata/index.js
CHANGED
|
@@ -412,6 +412,108 @@ 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: 'styleUrl',
|
|
485
|
+
type: 'string',
|
|
486
|
+
required: false,
|
|
487
|
+
description: 'MapLibre style JSON URL override for this block (wins over tenant config).',
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
name: 'center',
|
|
491
|
+
type: 'string',
|
|
492
|
+
required: false,
|
|
493
|
+
description: 'Initial center as "lat,lng" — overrides smart framing; pair with zoom.',
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
name: 'zoom',
|
|
497
|
+
type: 'number',
|
|
498
|
+
required: false,
|
|
499
|
+
description: 'Initial zoom level — overrides smart framing; pair with center.',
|
|
500
|
+
numericRange: [1, 19],
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
name: 'title',
|
|
504
|
+
type: 'string',
|
|
505
|
+
required: false,
|
|
506
|
+
description: 'Accessible label for the map region.',
|
|
507
|
+
},
|
|
508
|
+
],
|
|
509
|
+
hasChildren: false,
|
|
510
|
+
selfClosing: true,
|
|
511
|
+
defaultProps: 'title="Trasa výletu"',
|
|
512
|
+
defaultChildren: '',
|
|
513
|
+
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"}]} />',
|
|
514
|
+
addedIn: '0.3.0',
|
|
515
|
+
deprecated: [],
|
|
516
|
+
},
|
|
415
517
|
];
|
|
416
518
|
const metadataMap = new Map(componentMetadata.map(m => [m.name, m]));
|
|
417
519
|
/** 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,6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A"}
|
package/dist/styles/index.d.ts
CHANGED
|
@@ -12,6 +12,26 @@
|
|
|
12
12
|
* to the JIT — every class here is a literal.
|
|
13
13
|
*/
|
|
14
14
|
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
|
+
readonly mapOverlay: "absolute inset-0";
|
|
26
|
+
readonly mapBox: "flex h-full w-full items-center justify-center overflow-hidden rounded-lg bg-gray-100";
|
|
27
|
+
readonly mapHint: "text-sm text-gray-500";
|
|
28
|
+
readonly strip: "flex gap-2 overflow-x-auto pb-1 m-0 p-0 list-none";
|
|
29
|
+
readonly stripItem: "h-20 w-20 flex-none overflow-hidden rounded-lg bg-gray-100";
|
|
30
|
+
readonly stripImg: "block h-full w-full object-cover";
|
|
31
|
+
readonly stopList: "flex flex-col gap-0.5 text-sm text-gray-700 m-0 p-0 list-none";
|
|
32
|
+
readonly stopTime: "mr-2 tabular-nums text-gray-500";
|
|
33
|
+
readonly note: "text-xs text-gray-400 m-0";
|
|
34
|
+
};
|
|
15
35
|
export declare const buttonStyles: {
|
|
16
36
|
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
37
|
readonly size: {
|
package/dist/styles/index.js
CHANGED
|
@@ -12,6 +12,31 @@
|
|
|
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
|
+
mapOverlay: 'absolute inset-0',
|
|
30
|
+
mapBox: 'flex h-full w-full items-center justify-center overflow-hidden rounded-lg bg-gray-100',
|
|
31
|
+
mapHint: 'text-sm text-gray-500',
|
|
32
|
+
strip: 'flex gap-2 overflow-x-auto pb-1 m-0 p-0 list-none',
|
|
33
|
+
stripItem: 'h-20 w-20 flex-none overflow-hidden rounded-lg bg-gray-100',
|
|
34
|
+
stripImg: 'block h-full w-full object-cover',
|
|
35
|
+
stopList: 'flex flex-col gap-0.5 text-sm text-gray-700 m-0 p-0 list-none',
|
|
36
|
+
stopTime: 'mr-2 tabular-nums text-gray-500',
|
|
37
|
+
note: 'text-xs text-gray-400 m-0',
|
|
38
|
+
};
|
|
39
|
+
// ---------------------------------------------------------------------------
|
|
15
40
|
// Button — from mdx-render-vue/src/render/button/Button.vue
|
|
16
41
|
// ---------------------------------------------------------------------------
|
|
17
42
|
export const buttonStyles = {
|
package/dist/styles/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/styles/index.ts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AQ,IAAI,QAAQ,EAAE;QAC3F,cAAc,EAAE,eAAe;KAChC,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
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
|
+
altText?: string | null;
|
|
48
|
+
placeName?: string | null;
|
|
49
|
+
width?: number | null;
|
|
50
|
+
height?: number | null;
|
|
51
|
+
}
|
|
52
|
+
export interface TripMapGeoResponse {
|
|
53
|
+
config?: {
|
|
54
|
+
styleUrl?: string;
|
|
55
|
+
darkStyleUrl?: string;
|
|
56
|
+
attribution?: string;
|
|
57
|
+
};
|
|
58
|
+
nodes: TripMapGeoNode[];
|
|
59
|
+
/** Count of requested media without exposed geo. */
|
|
60
|
+
skipped?: number;
|
|
61
|
+
}
|
|
62
|
+
export interface TripMapUiTexts {
|
|
63
|
+
hint: string;
|
|
64
|
+
empty: string;
|
|
65
|
+
unavailable: string;
|
|
66
|
+
}
|
|
67
|
+
export declare function tripMapUiTexts(language: string | undefined): TripMapUiTexts;
|
|
68
|
+
export declare function tripMapPlaybackLabels(language: string | undefined): {
|
|
69
|
+
play: string;
|
|
70
|
+
stop: string;
|
|
71
|
+
} | undefined;
|
package/dist/tripmap.js
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
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
|
+
? { play: 'Přehrát trasu', stop: 'Zastavit' }
|
|
101
|
+
: undefined;
|
|
102
|
+
}
|
|
103
|
+
//# 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,CAAA;QAC3B,CAAC;QAAC,MAAM,CAAC;YACP,IAAI,OAAO,OAAO,KAAK,WAAW,EAAE,CAAC;gBACnC,OAAO,CAAC,IAAI,CACV,uFAAuF,CACxF,CAAA;YACH,CAAC;YACD,OAAO,EAAE,CAAA;QACX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
|
|
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
|
+
/** MapLibre style JSON URL override (wins over tenant config) */
|
|
130
|
+
styleUrl?: string;
|
|
131
|
+
/** Initial center "lat,lng" — overrides smart framing (pair with zoom) */
|
|
132
|
+
center?: string;
|
|
133
|
+
/** Initial zoom (1-19) — overrides smart framing (pair with center) */
|
|
134
|
+
zoom?: number;
|
|
135
|
+
/** Accessible label for the map region */
|
|
136
|
+
title?: string;
|
|
137
|
+
}
|
|
85
138
|
/**
|
|
86
139
|
* Common component variant type
|
|
87
140
|
*/
|
package/dist/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA4ZH,yEAAyE;AACzE,MAAM,UAAU,iBAAiB,CAC/B,KAAuB;IAEvB,OAAO,KAAK,CAAC,IAAI,KAAK,YAAY,CAAA;AACpC,CAAC;AAED,MAAM,UAAU,sBAAsB,CACpC,KAAuB;IAEvB,OAAO,KAAK,CAAC,IAAI,KAAK,iBAAiB,CAAA;AACzC,CAAC;AAED,MAAM,UAAU,kBAAkB,CAChC,KAAuB;IAEvB,OAAO,KAAK,CAAC,IAAI,KAAK,aAAa,CAAA;AACrC,CAAC;AAED,MAAM,UAAU,yBAAyB,CACvC,KAAuB;IAEvB,OAAO,KAAK,CAAC,IAAI,KAAK,oBAAoB,CAAA;AAC5C,CAAC;AAED,MAAM,UAAU,4BAA4B,CAC1C,KAAuB;IAEvB,OAAO,KAAK,CAAC,IAAI,KAAK,uBAAuB,CAAA;AAC/C,CAAC;AAED,MAAM,UAAU,+BAA+B,CAC7C,KAAuB;IAEvB,OAAO,KAAK,CAAC,IAAI,KAAK,0BAA0B,CAAA;AAClD,CAAC"}
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blogmcp/mdx-schema",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.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": [
|
package/src/metadata/index.ts
CHANGED
|
@@ -419,6 +419,112 @@ 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: 'styleUrl',
|
|
495
|
+
type: 'string',
|
|
496
|
+
required: false,
|
|
497
|
+
description: 'MapLibre style JSON URL override for this block (wins over tenant config).',
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
name: 'center',
|
|
501
|
+
type: 'string',
|
|
502
|
+
required: false,
|
|
503
|
+
description: 'Initial center as "lat,lng" — overrides smart framing; pair with zoom.',
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
name: 'zoom',
|
|
507
|
+
type: 'number',
|
|
508
|
+
required: false,
|
|
509
|
+
description: 'Initial zoom level — overrides smart framing; pair with center.',
|
|
510
|
+
numericRange: [1, 19],
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
name: 'title',
|
|
514
|
+
type: 'string',
|
|
515
|
+
required: false,
|
|
516
|
+
description: 'Accessible label for the map region.',
|
|
517
|
+
},
|
|
518
|
+
],
|
|
519
|
+
hasChildren: false,
|
|
520
|
+
selfClosing: true,
|
|
521
|
+
defaultProps: 'title="Trasa výletu"',
|
|
522
|
+
defaultChildren: '',
|
|
523
|
+
example:
|
|
524
|
+
'<TripMap title="Trasa údolím Libochovky" nodes={[{"lat": 49.3641, "lng": 16.3143, "title": "Níhov, nádraží", "capturedAt": "2025-04-20T08:52:00"}]} />',
|
|
525
|
+
addedIn: '0.3.0',
|
|
526
|
+
deprecated: [],
|
|
527
|
+
},
|
|
422
528
|
]
|
|
423
529
|
|
|
424
530
|
const metadataMap = new Map(componentMetadata.map(m => [m.name, m]))
|
package/src/styles/index.ts
CHANGED
|
@@ -14,6 +14,32 @@
|
|
|
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
|
+
mapOverlay: 'absolute inset-0',
|
|
33
|
+
mapBox: 'flex h-full w-full items-center justify-center overflow-hidden rounded-lg bg-gray-100',
|
|
34
|
+
mapHint: 'text-sm text-gray-500',
|
|
35
|
+
strip: 'flex gap-2 overflow-x-auto pb-1 m-0 p-0 list-none',
|
|
36
|
+
stripItem: 'h-20 w-20 flex-none overflow-hidden rounded-lg bg-gray-100',
|
|
37
|
+
stripImg: 'block h-full w-full object-cover',
|
|
38
|
+
stopList: 'flex flex-col gap-0.5 text-sm text-gray-700 m-0 p-0 list-none',
|
|
39
|
+
stopTime: 'mr-2 tabular-nums text-gray-500',
|
|
40
|
+
note: 'text-xs text-gray-400 m-0',
|
|
41
|
+
} as const
|
|
42
|
+
|
|
17
43
|
// ---------------------------------------------------------------------------
|
|
18
44
|
// Button — from mdx-render-vue/src/render/button/Button.vue
|
|
19
45
|
// ---------------------------------------------------------------------------
|
package/src/tripmap.ts
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
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
|
+
altText?: string | null
|
|
105
|
+
placeName?: string | null
|
|
106
|
+
width?: number | null
|
|
107
|
+
height?: number | null
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export interface TripMapGeoResponse {
|
|
111
|
+
config?: {
|
|
112
|
+
styleUrl?: string
|
|
113
|
+
darkStyleUrl?: string
|
|
114
|
+
attribution?: string
|
|
115
|
+
}
|
|
116
|
+
nodes: TripMapGeoNode[]
|
|
117
|
+
/** Count of requested media without exposed geo. */
|
|
118
|
+
skipped?: number
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export interface TripMapUiTexts {
|
|
122
|
+
hint: string
|
|
123
|
+
empty: string
|
|
124
|
+
unavailable: string
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export function tripMapUiTexts(language: string | undefined): TripMapUiTexts {
|
|
128
|
+
const czech = (language ?? '').toLowerCase().startsWith('cs')
|
|
129
|
+
return czech
|
|
130
|
+
? {
|
|
131
|
+
hint: 'Interaktivní mapa výletu',
|
|
132
|
+
empty: 'Žádná z fotek nemá zveřejněnou polohu.',
|
|
133
|
+
unavailable: 'Mapa se zobrazí na publikovaném webu.',
|
|
134
|
+
}
|
|
135
|
+
: {
|
|
136
|
+
hint: 'Interactive trip map',
|
|
137
|
+
empty: 'No photos with public location data.',
|
|
138
|
+
unavailable: 'The map is shown on the published page.',
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export function tripMapPlaybackLabels(
|
|
143
|
+
language: string | undefined,
|
|
144
|
+
): { play: string; stop: string } | undefined {
|
|
145
|
+
return (language ?? '').toLowerCase().startsWith('cs')
|
|
146
|
+
? { play: 'Přehrát trasu', stop: 'Zastavit' }
|
|
147
|
+
: undefined
|
|
148
|
+
}
|
package/src/types/index.ts
CHANGED
|
@@ -92,6 +92,62 @@ 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
|
+
/** MapLibre style JSON URL override (wins over tenant config) */
|
|
142
|
+
styleUrl?: string
|
|
143
|
+
/** Initial center "lat,lng" — overrides smart framing (pair with zoom) */
|
|
144
|
+
center?: string
|
|
145
|
+
/** Initial zoom (1-19) — overrides smart framing (pair with center) */
|
|
146
|
+
zoom?: number
|
|
147
|
+
/** Accessible label for the map region */
|
|
148
|
+
title?: string
|
|
149
|
+
}
|
|
150
|
+
|
|
95
151
|
/**
|
|
96
152
|
* Common component variant type
|
|
97
153
|
*/
|