@blogmcp/mdx-render-vue 0.4.0 → 0.6.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.
@@ -12,7 +12,7 @@
12
12
  */
13
13
  import { type ComputedRef, type InjectionKey } from 'vue';
14
14
  import type { TripMapHandNode, TripMapProps } from '@blogmcp/mdx-schema';
15
- import { parseTripMapHandNodes, tripMapFormatTime, type TripMapGeoNode, type TripMapGeoResponse, type TripMapUiTexts } from '@blogmcp/mdx-schema/tripmap';
15
+ import { parseTripMapHandNodes, tripMapFormatTime, type TripMapFacadeMedia, type TripMapFacadeStop, type TripMapFacadeThumb, type TripMapUiLabels, type TripMapGeoNode, type TripMapGeoResponse, type TripMapUiTexts } from '@blogmcp/mdx-schema/tripmap';
16
16
  export { tripMapFormatTime };
17
17
  export { parseTripMapHandNodes as parseHandNodes };
18
18
  export type { TripMapGeoNode, TripMapGeoResponse };
@@ -26,17 +26,35 @@ export type { TripMapGeoNode, TripMapGeoResponse };
26
26
  export interface MdxArticleContext {
27
27
  filename: string;
28
28
  language?: string;
29
+ /**
30
+ * Set ONLY by a draft preview: the draft-preview token of the page (`/preview/<token>`).
31
+ * AUTO mode then asks kb-api for the article's WORKING COPY photo set; without it a draft
32
+ * maps nothing (a reader's request for a draft is a 404) and an article with unpublished
33
+ * edits maps its published photos. Never set it on a published page.
34
+ */
35
+ previewToken?: string;
36
+ /**
37
+ * The article's geotagged media (the GraphQL `contentImagesGeo` rows),
38
+ * when the host already has them. Lets the SERVER-RENDERED facade carry
39
+ * real thumbnails with alt text and named stops in AUTO mode — the part of
40
+ * a TripMap that crawlers and answer engines read. Optional: without it
41
+ * the live map still fetches everything, only the no-JS view is poorer.
42
+ */
43
+ media?: readonly TripMapFacadeMedia[] | null;
29
44
  }
30
45
  export declare const MDX_ARTICLE_CONTEXT_KEY: InjectionKey<MdxArticleContext | null>;
31
46
  export interface UseTripMapResult {
32
47
  slugList: ComputedRef<string[]>;
33
48
  excludeList: ComputedRef<string[]>;
34
49
  handNodes: ComputedRef<TripMapHandNode[]>;
35
- /** Deterministic SSR thumbs for explicit-slugs mode (author order). */
36
- facadeThumbs: ComputedRef<{
37
- slug: string;
38
- src: string;
39
- }[]>;
50
+ /**
51
+ * Deterministic SSR thumbs: author order for explicit `slugs`, capture
52
+ * order for AUTO mode when the host provided `context.media`. Alt text
53
+ * comes from that media (empty when unknown).
54
+ */
55
+ facadeThumbs: ComputedRef<TripMapFacadeThumb[]>;
56
+ /** Named stops for the SSR facade: place-labelled photos + hand-made nodes, chronological. */
57
+ facadeStops: ComputedRef<TripMapFacadeStop[]>;
40
58
  heightStyle: ComputedRef<{
41
59
  height: string;
42
60
  }>;
@@ -50,10 +68,7 @@ export interface UseTripMapResult {
50
68
  isConfigOnly: ComputedRef<boolean>;
51
69
  /** Always set: slugs / article selection, or the config-only URL. */
52
70
  geoUrl: ComputedRef<string>;
53
- labels: ComputedRef<{
54
- play: string;
55
- stop: string;
56
- } | undefined>;
71
+ labels: ComputedRef<TripMapUiLabels | undefined>;
57
72
  texts: ComputedRef<TripMapUiTexts>;
58
73
  }
59
74
  export declare function useTripMap(props: TripMapProps): UseTripMapResult;
@@ -1,5 +1,5 @@
1
1
  import { inject, computed } from "vue";
2
- import { splitTripMapList, parseTripMapHandNodes, TRIPMAP_DEFAULT_HEIGHT, buildTripMapGeoUrl, tripMapPlaybackLabels, tripMapUiTexts } from "@blogmcp/mdx-schema/tripmap";
2
+ import { splitTripMapList, parseTripMapHandNodes, tripMapFacade, TRIPMAP_DEFAULT_HEIGHT, buildTripMapGeoUrl, tripMapPlaybackLabels, tripMapUiTexts } from "@blogmcp/mdx-schema/tripmap";
3
3
  import { parseTripMapHandNodes as parseTripMapHandNodes2, tripMapFormatTime } from "@blogmcp/mdx-schema/tripmap";
4
4
  const MDX_ARTICLE_CONTEXT_KEY = /* @__PURE__ */ Symbol.for("blogmcp:mdx-article-context");
5
5
  function useTripMap(props) {
@@ -9,12 +9,9 @@ function useTripMap(props) {
9
9
  const handNodes = computed(() => parseTripMapHandNodes(props.nodes));
10
10
  const isAutoMode = computed(() => slugList.value.length === 0);
11
11
  const isConfigOnly = computed(() => slugList.value.length === 0 && !articleContext?.filename);
12
- const facadeThumbs = computed(
13
- () => slugList.value.map((slug) => ({
14
- slug,
15
- src: `/api/media/thumb/${encodeURIComponent(slug)}?width=192`
16
- }))
17
- );
12
+ const facade = computed(() => tripMapFacade(props, articleContext));
13
+ const facadeThumbs = computed(() => facade.value.thumbs);
14
+ const facadeStops = computed(() => facade.value.stops);
18
15
  const heightStyle = computed(() => ({ height: props.height || TRIPMAP_DEFAULT_HEIGHT }));
19
16
  const geoUrl = computed(() => buildTripMapGeoUrl(props, articleContext));
20
17
  const labels = computed(() => tripMapPlaybackLabels(articleContext?.language));
@@ -24,6 +21,7 @@ function useTripMap(props) {
24
21
  excludeList,
25
22
  handNodes,
26
23
  facadeThumbs,
24
+ facadeStops,
27
25
  heightStyle,
28
26
  articleContext,
29
27
  isAutoMode,
@@ -18,6 +18,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
18
18
  playback: { type: Boolean },
19
19
  cluster: { type: Boolean },
20
20
  theme: {},
21
+ detail: {},
21
22
  styleUrl: {},
22
23
  center: {},
23
24
  zoom: {},
@@ -5,5 +5,6 @@ declare const _default: import("vue").DefineComponent<TripMapProps, {}, {}, {},
5
5
  playback: boolean;
6
6
  cluster: boolean;
7
7
  theme: "light" | "dark" | "auto";
8
+ detail: "popup" | "panel";
8
9
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
10
  export default _default;
@@ -3,7 +3,7 @@ import { tripMapStyles } from "@blogmcp/mdx-schema/styles";
3
3
  import { useTripMap } from "../../composables/useTripMap.js";
4
4
  import { tripMapFormatTime } from "@blogmcp/mdx-schema/tripmap";
5
5
  const _hoisted_1 = ["aria-label"];
6
- const _hoisted_2 = ["src"];
6
+ const _hoisted_2 = ["src", "alt"];
7
7
  const _sfc_main = /* @__PURE__ */ defineComponent({
8
8
  __name: "TripMapDefault",
9
9
  props: {
@@ -16,6 +16,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
16
16
  playback: { type: Boolean, default: true },
17
17
  cluster: { type: Boolean, default: true },
18
18
  theme: { default: "auto" },
19
+ detail: { default: "popup" },
19
20
  styleUrl: {},
20
21
  center: {},
21
22
  zoom: {},
@@ -23,9 +24,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
23
24
  },
24
25
  setup(__props) {
25
26
  const props = __props;
26
- const { slugList, handNodes, facadeThumbs, heightStyle, geoUrl, isConfigOnly, labels, texts } = useTripMap(props);
27
+ const { slugList, handNodes, facadeThumbs, facadeStops, heightStyle, geoUrl, isConfigOnly, labels, texts } = useTripMap(props);
27
28
  const rootEl = ref(null);
28
29
  const mapEl = ref(null);
30
+ const detailEl = ref(null);
29
31
  const status = ref("facade");
30
32
  const skippedCount = ref(0);
31
33
  let destroyMap = null;
@@ -54,6 +56,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
54
56
  capturedAt: n.capturedAt ?? void 0,
55
57
  thumbnailUrl: n.thumbnailUrl ?? void 0,
56
58
  imageUrl: n.url ?? void 0,
59
+ largeImageUrl: n.largeUrl ?? void 0,
57
60
  altText: n.altText ?? void 0,
58
61
  title: n.placeName ?? void 0
59
62
  }));
@@ -71,6 +74,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
71
74
  showLine: props.line,
72
75
  showFilmstrip: props.filmstrip,
73
76
  showPlayback: props.playback,
77
+ title: props.title,
78
+ detail: props.detail,
79
+ detailHost: props.detail === "panel" ? detailEl.value ?? void 0 : void 0,
74
80
  extraAttribution: geo.config?.attribution,
75
81
  labels: labels.value,
76
82
  initialView: initialViewFromProps(),
@@ -136,7 +142,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
136
142
  }, [
137
143
  createElementVNode("img", {
138
144
  src: thumb.src,
139
- alt: "",
145
+ alt: thumb.alt,
140
146
  width: "80",
141
147
  height: "80",
142
148
  loading: "lazy",
@@ -168,24 +174,30 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
168
174
  ], 2)
169
175
  ], 2)) : createCommentVNode("", true)
170
176
  ], 6),
171
- unref(handNodes).length && status.value !== "live" ? (openBlock(), createElementBlock("ol", {
177
+ props.detail === "panel" ? (openBlock(), createElementBlock("div", {
172
178
  key: 2,
179
+ ref_key: "detailEl",
180
+ ref: detailEl,
181
+ class: normalizeClass(unref(tripMapStyles).detailHost)
182
+ }, null, 2)) : createCommentVNode("", true),
183
+ unref(facadeStops).length && status.value !== "live" ? (openBlock(), createElementBlock("ol", {
184
+ key: 3,
173
185
  class: normalizeClass(unref(tripMapStyles).stopList)
174
186
  }, [
175
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(handNodes), (node, i) => {
187
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(facadeStops), (stop) => {
176
188
  return openBlock(), createElementBlock("li", {
177
- key: node.id || i
189
+ key: stop.key
178
190
  }, [
179
- node.capturedAt ? (openBlock(), createElementBlock("span", {
191
+ stop.capturedAt ? (openBlock(), createElementBlock("span", {
180
192
  key: 0,
181
193
  class: normalizeClass(unref(tripMapStyles).stopTime)
182
- }, toDisplayString(unref(tripMapFormatTime)(node.capturedAt)), 3)) : createCommentVNode("", true),
183
- createElementVNode("span", null, toDisplayString(node.title || `${node.lat}, ${node.lng}`), 1)
194
+ }, toDisplayString(unref(tripMapFormatTime)(stop.capturedAt)), 3)) : createCommentVNode("", true),
195
+ createElementVNode("span", null, toDisplayString(stop.title), 1)
184
196
  ]);
185
197
  }), 128))
186
198
  ], 2)) : createCommentVNode("", true),
187
199
  status.value !== "live" ? (openBlock(), createElementBlock("p", {
188
- key: 3,
200
+ key: 4,
189
201
  class: normalizeClass(unref(tripMapStyles).note)
190
202
  }, toDisplayString(unref(texts).unavailable), 3)) : createCommentVNode("", true)
191
203
  ], 10, _hoisted_1);
@@ -1,11 +1,15 @@
1
1
  import { ComputedRef } from 'vue';
2
2
  import { InjectionKey } from 'vue';
3
3
  import { parseTripMapHandNodes as parseHandNodes } from '@blogmcp/mdx-schema/tripmap';
4
+ import { TripMapFacadeMedia } from '@blogmcp/mdx-schema/tripmap';
5
+ import { TripMapFacadeStop } from '@blogmcp/mdx-schema/tripmap';
6
+ import { TripMapFacadeThumb } from '@blogmcp/mdx-schema/tripmap';
4
7
  import { tripMapFormatTime } from '@blogmcp/mdx-schema/tripmap';
5
8
  import { TripMapGeoNode } from '@blogmcp/mdx-schema/tripmap';
6
9
  import { TripMapGeoResponse } from '@blogmcp/mdx-schema/tripmap';
7
10
  import { TripMapHandNode } from '@blogmcp/mdx-schema';
8
11
  import { TripMapProps } from '@blogmcp/mdx-schema';
12
+ import { TripMapUiLabels } from '@blogmcp/mdx-schema/tripmap';
9
13
  import { TripMapUiTexts } from '@blogmcp/mdx-schema/tripmap';
10
14
 
11
15
  export declare const MDX_ARTICLE_CONTEXT_KEY: InjectionKey<MdxArticleContext | null>;
@@ -20,6 +24,21 @@ export declare const MDX_ARTICLE_CONTEXT_KEY: InjectionKey<MdxArticleContext | n
20
24
  export declare interface MdxArticleContext {
21
25
  filename: string;
22
26
  language?: string;
27
+ /**
28
+ * Set ONLY by a draft preview: the draft-preview token of the page (`/preview/<token>`).
29
+ * AUTO mode then asks kb-api for the article's WORKING COPY photo set; without it a draft
30
+ * maps nothing (a reader's request for a draft is a 404) and an article with unpublished
31
+ * edits maps its published photos. Never set it on a published page.
32
+ */
33
+ previewToken?: string;
34
+ /**
35
+ * The article's geotagged media (the GraphQL `contentImagesGeo` rows),
36
+ * when the host already has them. Lets the SERVER-RENDERED facade carry
37
+ * real thumbnails with alt text and named stops in AUTO mode — the part of
38
+ * a TripMap that crawlers and answer engines read. Optional: without it
39
+ * the live map still fetches everything, only the no-JS view is poorer.
40
+ */
41
+ media?: readonly TripMapFacadeMedia[] | null;
23
42
  }
24
43
 
25
44
  export { parseHandNodes }
@@ -36,11 +55,14 @@ export declare interface UseTripMapResult {
36
55
  slugList: ComputedRef<string[]>;
37
56
  excludeList: ComputedRef<string[]>;
38
57
  handNodes: ComputedRef<TripMapHandNode[]>;
39
- /** Deterministic SSR thumbs for explicit-slugs mode (author order). */
40
- facadeThumbs: ComputedRef<{
41
- slug: string;
42
- src: string;
43
- }[]>;
58
+ /**
59
+ * Deterministic SSR thumbs: author order for explicit `slugs`, capture
60
+ * order for AUTO mode when the host provided `context.media`. Alt text
61
+ * comes from that media (empty when unknown).
62
+ */
63
+ facadeThumbs: ComputedRef<TripMapFacadeThumb[]>;
64
+ /** Named stops for the SSR facade: place-labelled photos + hand-made nodes, chronological. */
65
+ facadeStops: ComputedRef<TripMapFacadeStop[]>;
44
66
  heightStyle: ComputedRef<{
45
67
  height: string;
46
68
  }>;
@@ -54,10 +76,7 @@ export declare interface UseTripMapResult {
54
76
  isConfigOnly: ComputedRef<boolean>;
55
77
  /** Always set: slugs / article selection, or the config-only URL. */
56
78
  geoUrl: ComputedRef<string>;
57
- labels: ComputedRef<{
58
- play: string;
59
- stop: string;
60
- } | undefined>;
79
+ labels: ComputedRef<TripMapUiLabels | undefined>;
61
80
  texts: ComputedRef<TripMapUiTexts>;
62
81
  }
63
82
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blogmcp/mdx-render-vue",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
4
4
  "description": "Vue renderer for MDX components — edit + render SFCs wired to @blogmcp/mdx-schema",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -98,9 +98,9 @@
98
98
  "typecheck": "vue-tsc --noEmit"
99
99
  },
100
100
  "dependencies": {
101
- "@blogmcp/mdx-schema": "^0.4.0",
102
- "@blogmcp/sanitize": "^0.3.0",
103
- "@blogmcp/tripmap-core": "^0.1.0",
101
+ "@blogmcp/mdx-schema": "^0.6.0",
102
+ "@blogmcp/sanitize": "^0.6.0",
103
+ "@blogmcp/tripmap-core": "^0.1.2",
104
104
  "@ark-ui/vue": "^5.0.0",
105
105
  "@iconify/vue": "^5.0.0"
106
106
  },
@@ -19,7 +19,12 @@ import {
19
19
  splitTripMapList,
20
20
  TRIPMAP_DEFAULT_HEIGHT,
21
21
  tripMapFormatTime,
22
+ tripMapFacade,
22
23
  tripMapPlaybackLabels,
24
+ type TripMapFacadeMedia,
25
+ type TripMapFacadeStop,
26
+ type TripMapFacadeThumb,
27
+ type TripMapUiLabels,
23
28
  tripMapUiTexts,
24
29
  type TripMapGeoNode,
25
30
  type TripMapGeoResponse,
@@ -42,6 +47,21 @@ export type { TripMapGeoNode, TripMapGeoResponse }
42
47
  export interface MdxArticleContext {
43
48
  filename: string
44
49
  language?: string
50
+ /**
51
+ * Set ONLY by a draft preview: the draft-preview token of the page (`/preview/<token>`).
52
+ * AUTO mode then asks kb-api for the article's WORKING COPY photo set; without it a draft
53
+ * maps nothing (a reader's request for a draft is a 404) and an article with unpublished
54
+ * edits maps its published photos. Never set it on a published page.
55
+ */
56
+ previewToken?: string
57
+ /**
58
+ * The article's geotagged media (the GraphQL `contentImagesGeo` rows),
59
+ * when the host already has them. Lets the SERVER-RENDERED facade carry
60
+ * real thumbnails with alt text and named stops in AUTO mode — the part of
61
+ * a TripMap that crawlers and answer engines read. Optional: without it
62
+ * the live map still fetches everything, only the no-JS view is poorer.
63
+ */
64
+ media?: readonly TripMapFacadeMedia[] | null
45
65
  }
46
66
 
47
67
  export const MDX_ARTICLE_CONTEXT_KEY: InjectionKey<MdxArticleContext | null> =
@@ -51,8 +71,14 @@ export interface UseTripMapResult {
51
71
  slugList: ComputedRef<string[]>
52
72
  excludeList: ComputedRef<string[]>
53
73
  handNodes: ComputedRef<TripMapHandNode[]>
54
- /** Deterministic SSR thumbs for explicit-slugs mode (author order). */
55
- facadeThumbs: ComputedRef<{ slug: string; src: string }[]>
74
+ /**
75
+ * Deterministic SSR thumbs: author order for explicit `slugs`, capture
76
+ * order for AUTO mode when the host provided `context.media`. Alt text
77
+ * comes from that media (empty when unknown).
78
+ */
79
+ facadeThumbs: ComputedRef<TripMapFacadeThumb[]>
80
+ /** Named stops for the SSR facade: place-labelled photos + hand-made nodes, chronological. */
81
+ facadeStops: ComputedRef<TripMapFacadeStop[]>
56
82
  heightStyle: ComputedRef<{ height: string }>
57
83
  articleContext: MdxArticleContext | null
58
84
  isAutoMode: ComputedRef<boolean>
@@ -64,7 +90,7 @@ export interface UseTripMapResult {
64
90
  isConfigOnly: ComputedRef<boolean>
65
91
  /** Always set: slugs / article selection, or the config-only URL. */
66
92
  geoUrl: ComputedRef<string>
67
- labels: ComputedRef<{ play: string; stop: string } | undefined>
93
+ labels: ComputedRef<TripMapUiLabels | undefined>
68
94
  texts: ComputedRef<TripMapUiTexts>
69
95
  }
70
96
 
@@ -77,12 +103,9 @@ export function useTripMap(props: TripMapProps): UseTripMapResult {
77
103
  const isAutoMode = computed(() => slugList.value.length === 0)
78
104
  const isConfigOnly = computed(() => slugList.value.length === 0 && !articleContext?.filename)
79
105
 
80
- const facadeThumbs = computed(() =>
81
- slugList.value.map((slug) => ({
82
- slug,
83
- src: `/api/media/thumb/${encodeURIComponent(slug)}?width=192`,
84
- })),
85
- )
106
+ const facade = computed(() => tripMapFacade(props, articleContext))
107
+ const facadeThumbs = computed(() => facade.value.thumbs)
108
+ const facadeStops = computed(() => facade.value.stops)
86
109
 
87
110
  const heightStyle = computed(() => ({ height: props.height || TRIPMAP_DEFAULT_HEIGHT }))
88
111
 
@@ -96,6 +119,7 @@ export function useTripMap(props: TripMapProps): UseTripMapResult {
96
119
  excludeList,
97
120
  handNodes,
98
121
  facadeThumbs,
122
+ facadeStops,
99
123
  heightStyle,
100
124
  articleContext,
101
125
  isAutoMode,
@@ -25,13 +25,16 @@ const props = withDefaults(defineProps<TripMapProps>(), {
25
25
  playback: true,
26
26
  cluster: true,
27
27
  theme: 'auto',
28
+ detail: 'popup',
28
29
  })
29
30
 
30
- const { slugList, handNodes, facadeThumbs, heightStyle, geoUrl, isConfigOnly, labels, texts } =
31
+ const { slugList, handNodes, facadeThumbs, facadeStops, heightStyle, geoUrl, isConfigOnly, labels, texts } =
31
32
  useTripMap(props)
32
33
 
33
34
  const rootEl = ref<HTMLElement | null>(null)
34
35
  const mapEl = ref<HTMLElement | null>(null)
36
+ // detail="panel": the engine mounts the photo panel here, below the sized map box.
37
+ const detailEl = ref<HTMLElement | null>(null)
35
38
  const status = ref<'facade' | 'loading' | 'live' | 'empty'>('facade')
36
39
  const skippedCount = ref(0)
37
40
 
@@ -69,6 +72,7 @@ async function start(): Promise<void> {
69
72
  capturedAt: n.capturedAt ?? undefined,
70
73
  thumbnailUrl: n.thumbnailUrl ?? undefined,
71
74
  imageUrl: n.url ?? undefined,
75
+ largeImageUrl: n.largeUrl ?? undefined,
72
76
  altText: n.altText ?? undefined,
73
77
  title: n.placeName ?? undefined,
74
78
  }))
@@ -86,6 +90,9 @@ async function start(): Promise<void> {
86
90
  showLine: props.line,
87
91
  showFilmstrip: props.filmstrip,
88
92
  showPlayback: props.playback,
93
+ title: props.title,
94
+ detail: props.detail,
95
+ detailHost: props.detail === 'panel' ? (detailEl.value ?? undefined) : undefined,
89
96
  extraAttribution: geo.config?.attribution,
90
97
  labels: labels.value,
91
98
  initialView: initialViewFromProps(),
@@ -139,10 +146,14 @@ onBeforeUnmount(() => {
139
146
  <div ref="rootEl" :class="tripMapStyles.container" data-mdx-component="TripMap" :aria-label="title">
140
147
  <p v-if="title" :class="tripMapStyles.head">{{ title }}</p>
141
148
 
142
- <!-- Facade thumb strip (explicit-slugs mode); replaced by the live filmstrip. -->
149
+ <!--
150
+ Facade thumb strip — server-rendered, with alt text when the host
151
+ provided the article media (crawlers read THIS, never the canvas);
152
+ replaced by the live filmstrip once the engine mounts.
153
+ -->
143
154
  <ol v-if="facadeThumbs.length && status !== 'live'" :class="tripMapStyles.strip">
144
155
  <li v-for="thumb in facadeThumbs" :key="thumb.slug" :class="tripMapStyles.stripItem">
145
- <img :src="thumb.src" alt="" width="80" height="80" loading="lazy" decoding="async" :class="tripMapStyles.stripImg" />
156
+ <img :src="thumb.src" :alt="thumb.alt" width="80" height="80" loading="lazy" decoding="async" :class="tripMapStyles.stripImg" />
146
157
  </li>
147
158
  </ol>
148
159
 
@@ -162,12 +173,14 @@ onBeforeUnmount(() => {
162
173
  </div>
163
174
  </div>
164
175
  </div>
176
+ <!-- detail="panel": engine-owned photo panel host (static, never re-patched). -->
177
+ <div v-if="props.detail === 'panel'" ref="detailEl" :class="tripMapStyles.detailHost"></div>
165
178
 
166
- <!-- Waypoint stop list (hand-made nodes) for the static facade. -->
167
- <ol v-if="handNodes.length && status !== 'live'" :class="tripMapStyles.stopList">
168
- <li v-for="(node, i) in handNodes" :key="node.id || i">
169
- <span v-if="node.capturedAt" :class="tripMapStyles.stopTime">{{ tripMapFormatTime(node.capturedAt) }}</span>
170
- <span>{{ node.title || `${node.lat}, ${node.lng}` }}</span>
179
+ <!-- Named stops (place-labelled photos + hand-made nodes) for the static facade. -->
180
+ <ol v-if="facadeStops.length && status !== 'live'" :class="tripMapStyles.stopList">
181
+ <li v-for="stop in facadeStops" :key="stop.key">
182
+ <span v-if="stop.capturedAt" :class="tripMapStyles.stopTime">{{ tripMapFormatTime(stop.capturedAt) }}</span>
183
+ <span>{{ stop.title }}</span>
171
184
  </li>
172
185
  </ol>
173
186