@blogmcp/sdk 0.3.2 → 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.
Files changed (59) hide show
  1. package/dist/core/client-types.d.ts +7 -1
  2. package/dist/core/client.d.ts +25 -1
  3. package/dist/core/client.js +38 -34
  4. package/dist/core/consultation-adapter.d.ts +90 -0
  5. package/dist/core/consultation-adapter.js +200 -0
  6. package/dist/core/consultations.d.ts +108 -0
  7. package/dist/core/consultations.js +95 -0
  8. package/dist/core/errors.d.ts +52 -0
  9. package/dist/core/errors.js +73 -0
  10. package/dist/core/index.d.ts +7 -1
  11. package/dist/core/index.js +80 -64
  12. package/dist/core/queries.d.ts +16 -1
  13. package/dist/core/queries.js +198 -61
  14. package/dist/core/review/format.d.ts +30 -0
  15. package/dist/core/review/format.js +78 -0
  16. package/dist/core/review/index.d.ts +6 -0
  17. package/dist/core/review/index.js +9 -0
  18. package/dist/core/review/types.d.ts +176 -0
  19. package/dist/core/review/types.js +9 -0
  20. package/dist/core/server-only.d.ts +12 -0
  21. package/dist/core/server-only.js +11 -0
  22. package/dist/core/types.d.ts +295 -0
  23. package/dist/packages/mdx-schema/dist/metadata/index.js +3 -3
  24. package/dist/packages/mdx-schema/dist/styles/index.js +7 -1
  25. package/dist/packages/mdx-schema/dist/tripmap.js +64 -51
  26. package/dist/packages/tripmap-core/dist/attribution.js +121 -6
  27. package/dist/packages/tripmap-core/dist/css.js +68 -16
  28. package/dist/packages/tripmap-core/dist/detail.js +10 -9
  29. package/dist/packages/tripmap-core/dist/engine.js +285 -247
  30. package/dist/packages/tripmap-core/dist/export.js +48 -46
  31. package/dist/packages/tripmap-core/dist/filmstrip.js +30 -17
  32. package/dist/packages/tripmap-core/dist/framing.js +30 -30
  33. package/dist/packages/tripmap-core/dist/generated/maplibre-worker.bundle.js +1 -1
  34. package/dist/packages/tripmap-core/dist/heading.js +8 -0
  35. package/dist/packages/tripmap-core/dist/href.js +18 -0
  36. package/dist/packages/tripmap-core/dist/index.js +32 -24
  37. package/dist/packages/tripmap-core/dist/lightbox.js +31 -29
  38. package/dist/packages/tripmap-core/dist/line.js +6 -6
  39. package/dist/packages/tripmap-core/dist/markers.js +47 -43
  40. package/dist/packages/tripmap-core/dist/nodes.js +56 -43
  41. package/dist/packages/tripmap-core/dist/playback.js +17 -17
  42. package/dist/packages/tripmap-core/dist/preload.js +14 -14
  43. package/dist/packages/tripmap-core/dist/theme.js +21 -21
  44. package/dist/{node_modules → packages/tripmap-core/node_modules}/maplibre-gl/dist/maplibre-gl.js +1890 -1720
  45. package/dist/{node_modules → packages/tripmap-core/node_modules}/pmtiles/dist/esm/index.js +1 -1
  46. package/package.json +8 -3
  47. package/src/core/client-types.ts +13 -2
  48. package/src/core/client.ts +40 -5
  49. package/src/core/consultation-adapter.ts +408 -0
  50. package/src/core/consultations.ts +224 -0
  51. package/src/core/errors.ts +145 -0
  52. package/src/core/index.ts +68 -0
  53. package/src/core/queries.ts +167 -3
  54. package/src/core/review/format.ts +138 -0
  55. package/src/core/review/index.ts +22 -0
  56. package/src/core/review/types.ts +168 -0
  57. package/src/core/server-only.ts +20 -0
  58. package/src/core/types.ts +337 -0
  59. /package/dist/{node_modules → packages/tripmap-core/node_modules}/maplibre-gl/dist/maplibre-gl-shared.js +0 -0
@@ -1,37 +1,37 @@
1
- const f = "420px";
2
- function s(a) {
3
- return (a ?? "").split(",").map((e) => e.trim()).filter(Boolean);
1
+ const b = "420px";
2
+ function u(o) {
3
+ return (o ?? "").split(",").map((t) => t.trim()).filter(Boolean);
4
4
  }
5
- function g(a) {
6
- let e = a;
7
- if (typeof e == "string")
5
+ function f(o) {
6
+ let t = o;
7
+ if (typeof t == "string")
8
8
  try {
9
- e = JSON.parse(e);
9
+ t = JSON.parse(t);
10
10
  } catch {
11
11
  return typeof console < "u" && console.warn('[TripMap] `nodes` prop is not valid JSON — use quoted keys: [{"lat":49.3,"lng":16.3}]'), [];
12
12
  }
13
- return Array.isArray(e) ? e.filter((o) => !!o && typeof o == "object" && typeof o.lat == "number" && typeof o.lng == "number") : [];
13
+ return Array.isArray(t) ? t.filter((n) => !!n && typeof n == "object" && typeof n.lat == "number" && typeof n.lng == "number") : [];
14
14
  }
15
- function h(a) {
16
- const e = /T(\d{2}):(\d{2})/.exec(a);
17
- return e ? `${e[1]}:${e[2]}` : "";
15
+ function v(o) {
16
+ const t = /T(\d{2}):(\d{2})/.exec(o);
17
+ return t ? `${t[1]}:${t[2]}` : "";
18
18
  }
19
- function b(a, e) {
20
- const o = new URLSearchParams();
21
- e?.language && o.set("lang", e.language);
22
- const r = s(a.slugs);
23
- if (r.length > 0)
24
- return o.set("slugs", r.join(",")), `/api/media/geo?${o.toString()}`;
25
- if (e?.filename) {
26
- o.set("article", e.filename);
27
- const i = s(a.exclude);
28
- return i.length > 0 && o.set("exclude", i.join(",")), `/api/media/geo?${o.toString()}`;
19
+ function x(o, t) {
20
+ const n = new URLSearchParams();
21
+ t?.language && n.set("lang", t.language);
22
+ const a = u(o.slugs);
23
+ if (a.length > 0)
24
+ return n.set("slugs", a.join(",")), `/api/media/geo?${n.toString()}`;
25
+ if (t?.filename) {
26
+ n.set("article", t.filename);
27
+ const r = u(o.exclude);
28
+ return r.length > 0 && n.set("exclude", r.join(",")), t.previewToken && n.set("preview", t.previewToken), `/api/media/geo?${n.toString()}`;
29
29
  }
30
- const n = o.toString();
31
- return n ? `/api/media/geo?${n}` : "/api/media/geo";
30
+ const i = n.toString();
31
+ return i ? `/api/media/geo?${i}` : "/api/media/geo";
32
32
  }
33
- function x(a) {
34
- return (a ?? "").toLowerCase().startsWith("cs") ? {
33
+ function y(o) {
34
+ return (o ?? "").toLowerCase().startsWith("cs") ? {
35
35
  hint: "Interaktivní mapa výletu",
36
36
  empty: "Žádná z fotek nemá zveřejněnou polohu.",
37
37
  unavailable: "Mapa se zobrazí na publikovaném webu."
@@ -41,8 +41,8 @@ function x(a) {
41
41
  unavailable: "The map is shown on the published page."
42
42
  };
43
43
  }
44
- function y(a) {
45
- return (a ?? "").toLowerCase().startsWith("cs") ? {
44
+ function T(o) {
45
+ return (o ?? "").toLowerCase().startsWith("cs") ? {
46
46
  play: "Přehrát trasu",
47
47
  stop: "Zastavit",
48
48
  fullscreen: "Celá obrazovka",
@@ -58,31 +58,44 @@ function y(a) {
58
58
  zoomImage: "Zobrazit na celou obrazovku"
59
59
  } : void 0;
60
60
  }
61
- const c = (a) => `/api/media/thumb/${encodeURIComponent(a)}?width=192`, d = (a, e) => a.capturedAt && e.capturedAt ? a.capturedAt < e.capturedAt ? -1 : a.capturedAt > e.capturedAt ? 1 : 0 : a.capturedAt ? -1 : e.capturedAt ? 1 : 0;
62
- function v(a, e) {
63
- const o = (e?.media ?? []).filter((t) => !!t.slug), r = new Map(o.map((t) => [t.slug, t])), n = s(a.slugs), i = new Set(s(a.exclude));
64
- let l, p;
65
- n.length > 0 ? (p = n.map((t) => {
66
- const u = r.get(t);
67
- return { slug: t, src: u?.thumbnailUrl || c(t), alt: u?.altText ?? "" };
68
- }), l = n.map((t) => r.get(t)).filter((t) => !!t)) : (l = o.filter((t) => !i.has(t.slug)).slice().sort(d), p = l.map((t) => ({ slug: t.slug, src: t.thumbnailUrl || c(t.slug), alt: t.altText ?? "" })));
69
- const m = [
70
- ...l.filter((t) => t.placeName).map((t) => ({ key: `m:${t.slug}`, title: t.placeName, capturedAt: t.capturedAt ?? void 0 })),
71
- ...g(a.nodes).map((t, u) => ({
72
- key: `n:${t.id || u}`,
73
- title: t.title || `${t.lat}, ${t.lng}`,
74
- capturedAt: t.capturedAt
61
+ const c = (o) => `/api/media/thumb/${encodeURIComponent(o)}?width=192`, g = /^(\d{4}-\d{2}-\d{2})[Tt ](\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?)$/, h = (o) => {
62
+ if (typeof o != "string" || !o)
63
+ return null;
64
+ const t = g.exec(o.trim()), n = Date.parse(t ? `${t[1]}T${t[2]}Z` : o);
65
+ return Number.isNaN(n) ? null : n;
66
+ };
67
+ function m(o) {
68
+ const t = [], n = [];
69
+ for (const a of o) {
70
+ const i = h(a.capturedAt);
71
+ i === null ? n.push(a) : t.push({ item: a, t: i });
72
+ }
73
+ return t.sort((a, i) => a.t - i.t), [...t.map((a) => a.item), ...n];
74
+ }
75
+ function M(o, t) {
76
+ const n = (t?.media ?? []).filter((e) => !!e.slug), a = new Map(n.map((e) => [e.slug, e])), i = u(o.slugs), r = new Set(u(o.exclude));
77
+ let s, p;
78
+ i.length > 0 ? (p = i.map((e) => {
79
+ const l = a.get(e);
80
+ return { slug: e, src: l?.thumbnailUrl || c(e), alt: l?.altText ?? "" };
81
+ }), s = i.map((e) => a.get(e)).filter((e) => !!e)) : (s = m(n.filter((e) => !r.has(e.slug))), p = s.map((e) => ({ slug: e.slug, src: e.thumbnailUrl || c(e.slug), alt: e.altText ?? "" })));
82
+ const d = m([
83
+ ...s.filter((e) => e.placeName).map((e) => ({ key: `m:${e.slug}`, title: e.placeName, capturedAt: e.capturedAt ?? void 0 })),
84
+ ...f(o.nodes).map((e, l) => ({
85
+ key: `n:${e.id || l}`,
86
+ title: e.title || `${e.lat}, ${e.lng}`,
87
+ capturedAt: e.capturedAt
75
88
  }))
76
- ].sort(d);
77
- return { thumbs: p, stops: m };
89
+ ]);
90
+ return { thumbs: p, stops: d };
78
91
  }
79
92
  export {
80
- f as TRIPMAP_DEFAULT_HEIGHT,
81
- b as buildTripMapGeoUrl,
82
- g as parseTripMapHandNodes,
83
- s as splitTripMapList,
84
- v as tripMapFacade,
85
- h as tripMapFormatTime,
86
- y as tripMapPlaybackLabels,
87
- x as tripMapUiTexts
93
+ b as TRIPMAP_DEFAULT_HEIGHT,
94
+ x as buildTripMapGeoUrl,
95
+ f as parseTripMapHandNodes,
96
+ u as splitTripMapList,
97
+ M as tripMapFacade,
98
+ v as tripMapFormatTime,
99
+ T as tripMapPlaybackLabels,
100
+ y as tripMapUiTexts
88
101
  };
@@ -1,9 +1,124 @@
1
- const n = '© <a href="https://www.openstreetmap.org/copyright" target="_blank" rel="noopener">OpenStreetMap</a> contributors';
2
- function o(e) {
3
- const t = [n], r = e?.trim();
4
- return r && t.push(r), t;
1
+ import { safeNodeHref as u } from "./href.js";
2
+ const d = '© <a href="https://www.openstreetmap.org/copyright" target="_blank" rel="noopener">OpenStreetMap</a> contributors';
3
+ function N(r) {
4
+ const t = [d], e = r?.trim();
5
+ return e && t.push(e), t;
6
+ }
7
+ const f = /* @__PURE__ */ new Set([
8
+ "script",
9
+ "style",
10
+ "template",
11
+ "iframe",
12
+ "frame",
13
+ "frameset",
14
+ "object",
15
+ "embed",
16
+ "noscript",
17
+ "noembed",
18
+ "noframes",
19
+ "svg",
20
+ "math",
21
+ "textarea",
22
+ "select",
23
+ "button",
24
+ "title",
25
+ "xmp"
26
+ ]), p = 1, m = 3, h = /^https?:/i;
27
+ function b(r) {
28
+ const t = u(r);
29
+ return t !== null && h.test(t) ? t : null;
30
+ }
31
+ function a(r, t, e) {
32
+ for (const n of Array.from(r.childNodes)) {
33
+ if (n.nodeType === m) {
34
+ t.appendChild(e.createTextNode(n.nodeValue ?? ""));
35
+ continue;
36
+ }
37
+ if (n.nodeType !== p) continue;
38
+ const o = n, i = o.localName.toLowerCase();
39
+ if (f.has(i)) continue;
40
+ const s = i === "a" ? b(o.getAttribute("href")) : null;
41
+ if (s === null) {
42
+ a(o, t, e);
43
+ continue;
44
+ }
45
+ const c = e.createElement("a");
46
+ c.setAttribute("href", s), c.setAttribute("target", "_blank"), c.setAttribute("rel", "noopener"), a(o, c, e), t.appendChild(c);
47
+ }
48
+ }
49
+ function T(r, t) {
50
+ const e = r.ownerDocument, n = e.implementation.createHTMLDocument("").createElement("template");
51
+ n.innerHTML = t, a(n.content, r, e);
52
+ }
53
+ function g(r, t) {
54
+ const e = r.ownerDocument;
55
+ r.textContent = "", t.forEach((n, o) => {
56
+ o > 0 && r.appendChild(e.createTextNode(" | ")), T(r, n);
57
+ });
58
+ }
59
+ function y(r, t) {
60
+ const e = [];
61
+ for (const n of [...r, ...t])
62
+ typeof n == "string" && n.trim() && !e.includes(n) && e.push(n);
63
+ return e.sort((n, o) => n.length - o.length), e.filter((n, o) => !e.slice(o + 1).some((i) => i.includes(n)));
64
+ }
65
+ function E(r) {
66
+ const t = r.getZoom(), e = /* @__PURE__ */ new Set();
67
+ for (const i of r.getLayersOrder()) {
68
+ const s = r.getLayer(i);
69
+ s?.source && !s.isHidden?.(t) && e.add(s.source);
70
+ }
71
+ const n = r.getTerrain?.()?.source;
72
+ n && e.add(n);
73
+ const o = [];
74
+ for (const i of e) {
75
+ const s = r.getSource(i)?.attribution;
76
+ typeof s == "string" && o.push(s);
77
+ }
78
+ return o;
79
+ }
80
+ const l = ["styledata", "sourcedata", "terrain"];
81
+ class A {
82
+ custom;
83
+ map = null;
84
+ container = null;
85
+ inner = null;
86
+ rendered = null;
87
+ constructor(t) {
88
+ this.custom = t;
89
+ }
90
+ getDefaultPosition() {
91
+ return "bottom-right";
92
+ }
93
+ onAdd(t) {
94
+ const e = t.getContainer().ownerDocument, n = e.createElement("div");
95
+ n.className = "maplibregl-ctrl maplibregl-ctrl-attrib";
96
+ const o = e.createElement("div");
97
+ o.className = "maplibregl-ctrl-attrib-inner", n.appendChild(o), this.map = t, this.container = n, this.inner = o, this.rendered = null, this.refresh();
98
+ for (const i of l) t.on(i, this.onMapData);
99
+ return n;
100
+ }
101
+ onRemove() {
102
+ const t = this.map;
103
+ if (t) for (const e of l) t.off(e, this.onMapData);
104
+ this.container?.remove(), this.map = null, this.container = null, this.inner = null, this.rendered = null;
105
+ }
106
+ onMapData = (t) => {
107
+ t && (t.type === "terrain" || t.dataType === "style" || t.dataType === "source" && (t.sourceDataType === "metadata" || t.sourceDataType === "visibility")) && this.refresh();
108
+ };
109
+ refresh() {
110
+ const { map: t, container: e, inner: n } = this;
111
+ if (!t || !e || !n) return;
112
+ const o = y(this.custom, E(t)), i = o.join(" | ");
113
+ i !== this.rendered && (this.rendered = i, g(n, o), e.classList.toggle("maplibregl-attrib-empty", o.length === 0));
114
+ }
5
115
  }
6
116
  export {
7
- n as OSM_ATTRIBUTION,
8
- o as buildAttributions
117
+ d as OSM_ATTRIBUTION,
118
+ A as TripMapAttributionControl,
119
+ T as appendCredit,
120
+ N as buildAttributions,
121
+ y as mergeAttributions,
122
+ g as renderAttributions,
123
+ E as usedSourceAttributions
9
124
  };
@@ -1,9 +1,58 @@
1
- import p from "./node_modules/maplibre-gl/dist/maplibre-gl.css.js";
2
- const e = "tripmap-core-css", r = `
1
+ import r from "./node_modules/maplibre-gl/dist/maplibre-gl.css.js";
2
+ const i = "tripmap-core-css", a = `
3
3
  .tripmap { position: relative; display: flex; flex-direction: column; gap: 8px; height: 100%; }
4
+ /* Host stylesheets must never reach the engine's DOM (seen in the claude.ai
5
+ review app, 2026-09-07): Tailwind Typography's '.prose :where(img)' (margin
6
+ 2em 0) pushed photos out of their circles, and a renderer's
7
+ ':where(.render-embed) img { height: auto }' — which the app SCOPES under an
8
+ extra class, lifting it to (0,1,1) — turned marker photos back into their
9
+ intrinsic aspect. The structural sizing of engine-owned images is therefore
10
+ '!important' on purpose: nothing legitimate restyles these elements, and a
11
+ scoping host can add specificity we cannot out-rank any other way. */
12
+ .tripmap-lightbox figure, .tripmap-lightbox figcaption, .tripmap p, .tripmap-detail p { margin: 0; }
4
13
  .tripmap__map { position: relative; flex: 1 1 auto; width: 100%; min-height: 180px; border-radius: 12px; overflow: hidden; }
5
14
  .tripmap__map .maplibregl-canvas { outline: none; }
6
15
 
16
+ /*
17
+ * Brand mark, fullscreen only (engine toggles [hidden]).
18
+ *
19
+ * Bottom-LEFT because maplibre puts attribution bottom-right and our
20
+ * navigation/fullscreen/geolocate stack top-right; this is the one free corner.
21
+ * 'pointer-events: none' is load-bearing: the mark sits over a surface the
22
+ * reader drags, and a logo that swallows a pan is worse than no logo. The
23
+ * drop-shadow is what keeps a single-colour mark legible over both a snowy
24
+ * field and a dark forest without shipping two assets.
25
+ */
26
+ .tripmap__watermark {
27
+ position: absolute; left: 10px; bottom: 10px; z-index: 2;
28
+ height: 28px; width: auto; pointer-events: none; user-select: none;
29
+ opacity: 0.85; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
30
+ }
31
+ .tripmap__watermark[hidden] { display: none; }
32
+
33
+ /*
34
+ * Heading arrow on the user-location dot (engine sets --tripmap-heading and the
35
+ * modifier class). Drawn as a CHILD of maplibre's dot marker — never on the dot
36
+ * itself, whose transform maplibre owns and rewrites each frame.
37
+ *
38
+ * Hidden unless there IS a heading: coords.heading is null on a stationary or
39
+ * wifi fix, and an arrow frozen at its last value while you stand still points
40
+ * confidently in the wrong direction.
41
+ */
42
+ .tripmap .tripmap-heading { display: none; }
43
+ .tripmap .tripmap-user--heading .tripmap-heading {
44
+ display: block; position: absolute; left: 50%; top: 50%;
45
+ width: 0; height: 0; pointer-events: none;
46
+ /* Rotation happens on THIS element, around the dot's centre. */
47
+ transform: rotate(var(--tripmap-heading, 0deg));
48
+ }
49
+ .tripmap .tripmap-user--heading .tripmap-heading::before {
50
+ content: ''; position: absolute; left: -5px; top: -19px;
51
+ border-left: 5px solid transparent; border-right: 5px solid transparent;
52
+ border-bottom: 9px solid #1da1f2;
53
+ filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.9));
54
+ }
55
+
7
56
  /*
8
57
  * Marker roots are maplibre Marker elements: maplibre owns their 'position'
9
58
  * (absolute, from its own stylesheet above) and their inline 'transform'
@@ -25,11 +74,11 @@ const e = "tripmap-core-css", r = `
25
74
  }
26
75
  .tripmap-marker:hover { box-shadow: 0 0 0 3px rgba(37,99,235,0.35), 0 1px 4px rgba(0,0,0,0.35); z-index: 3; }
27
76
  .tripmap-marker--active { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.5), 0 1px 4px rgba(0,0,0,0.35); z-index: 4; }
28
- .tripmap-marker__img { width: 100%; height: 100%; object-fit: cover; display: block; }
77
+ .tripmap-marker__img { width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important; margin: 0 !important; display: block !important; object-fit: cover !important; }
29
78
  .tripmap-marker--dot { width: 18px; height: 18px; background: #2563eb; border-width: 3px; }
30
79
  .tripmap-marker__dot { display: block; width: 100%; height: 100%; }
31
80
  .tripmap-marker--cluster { overflow: visible; }
32
- .tripmap-marker--cluster .tripmap-marker__img { border-radius: 9999px; }
81
+ .tripmap-marker--cluster .tripmap-marker__img { border-radius: 9999px !important; }
33
82
  .tripmap-marker__count {
34
83
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px;
35
84
  padding: 0 5px; border-radius: 9999px; background: #1d4ed8; color: #fff;
@@ -40,7 +89,7 @@ const e = "tripmap-core-css", r = `
40
89
  /* Never taller than the map it opens in: the description scrolls instead
41
90
  (56px = popup tip/offset + the fit-in-view margins). */
42
91
  .tripmap-popup { max-width: 260px; max-height: calc(var(--tripmap-map-h, 400px) - 56px); overflow-y: auto; overscroll-behavior: contain; }
43
- .tripmap-popup__img { display: block; width: 100%; max-height: var(--tripmap-popup-img-max, 180px); object-fit: cover; border-radius: 8px; }
92
+ .tripmap-popup__img { display: block !important; width: 100% !important; height: auto !important; max-width: none !important; max-height: var(--tripmap-popup-img-max, 180px) !important; margin: 0 !important; object-fit: cover !important; border-radius: 8px !important; }
44
93
  .tripmap-popup__zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
45
94
 
46
95
  /* Detail panel (detail: 'panel') — the photo under the filmstrip at component width. */
@@ -48,7 +97,7 @@ const e = "tripmap-core-css", r = `
48
97
  .tripmap-detail { display: flex; flex-direction: column; gap: 8px; padding: 4px 2px 0; }
49
98
  .tripmap-detail[hidden] { display: none !important; }
50
99
  .tripmap-detail__zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 12px; overflow: hidden; }
51
- .tripmap-detail__img { display: block; width: 100%; max-height: min(70vh, 640px); object-fit: contain; background: #111827; border-radius: 12px; }
100
+ .tripmap-detail__img { display: block !important; width: 100% !important; height: auto !important; max-width: none !important; max-height: min(70vh, 640px) !important; margin: 0 !important; object-fit: contain !important; background: #111827; border-radius: 12px !important; }
52
101
  .tripmap-detail__meta { display: flex; flex-direction: column; gap: 2px; font: 14px/1.45 system-ui, sans-serif; color: #111827; }
53
102
  .tripmap-detail__title { font-weight: 600; }
54
103
  .tripmap-detail__time { color: #6b7280; font-size: 12px; }
@@ -63,7 +112,7 @@ const e = "tripmap-core-css", r = `
63
112
  margin: 0; max-width: 100vw; max-height: 100vh; display: flex; flex-direction: column; align-items: center;
64
113
  gap: 8px; padding: 0 56px; box-sizing: border-box;
65
114
  }
66
- .tripmap-lightbox__img { max-width: 100%; max-height: calc(100vh - 96px); object-fit: contain; }
115
+ .tripmap-lightbox__img { width: auto !important; height: auto !important; max-width: 100% !important; max-height: calc(100vh - 96px) !important; margin: 0 !important; object-fit: contain !important; }
67
116
  .tripmap-lightbox__caption {
68
117
  color: #e5e7eb; font: 14px/1.4 system-ui, sans-serif; text-align: center; max-width: 720px;
69
118
  display: flex; flex-direction: column; gap: 2px; padding-bottom: 8px;
@@ -98,13 +147,16 @@ const e = "tripmap-core-css", r = `
98
147
  background: #f3f4f6; cursor: pointer;
99
148
  }
100
149
  .tripmap-filmstrip__item--active { border-color: #2563eb; }
101
- .tripmap-filmstrip__img { width: 100%; height: 100%; object-fit: cover; display: block; }
150
+ .tripmap-filmstrip__img { width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important; margin: 0 !important; display: block !important; object-fit: cover !important; }
102
151
  .tripmap-filmstrip__item--waypoint { display: flex; align-items: center; justify-content: center; }
103
152
  .tripmap-filmstrip__label {
104
153
  font: 600 10px/1.2 system-ui, sans-serif; color: #374151; padding: 2px 3px 14px; text-align: center;
105
154
  max-width: 100%; overflow-wrap: anywhere; hyphens: auto;
106
155
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
107
156
  }
157
+ /* The bottom padding clears the time bar. A waypoint tile without one (times
158
+ hidden, or none readable) centres its label instead of keeping the gap. */
159
+ .tripmap-filmstrip__label:last-child { padding-bottom: 2px; }
108
160
  .tripmap-filmstrip__time {
109
161
  position: absolute; left: 0; right: 0; bottom: 0; padding: 1px 0;
110
162
  background: rgba(17,24,39,0.55); color: #fff; font: 10px/1.3 system-ui, sans-serif;
@@ -138,14 +190,14 @@ const e = "tripmap-core-css", r = `
138
190
  .tripmap__controls [hidden] { display: none !important; }
139
191
  .tripmap__menu-item small { display: block; color: #6b7280; font-size: 11px; }
140
192
  `;
141
- function a(t = document) {
142
- if (t.getElementById(e)) return;
143
- const i = t.createElement("style");
144
- i.id = e, i.textContent = `${p}
145
- ${r}`, t.head.appendChild(i);
193
+ function p(t = document) {
194
+ if (t.getElementById(i)) return;
195
+ const e = t.createElement("style");
196
+ e.id = i, e.textContent = `${r}
197
+ ${a}`, t.head.appendChild(e);
146
198
  }
147
199
  export {
148
- r as TRIPMAP_COMPONENT_CSS,
149
- e as TRIPMAP_STYLE_ID,
150
- a as injectTripMapCss
200
+ a as TRIPMAP_COMPONENT_CSS,
201
+ i as TRIPMAP_STYLE_ID,
202
+ p as injectTripMapCss
151
203
  };
@@ -1,4 +1,4 @@
1
- class r {
1
+ class c {
2
2
  constructor(e, a, s) {
3
3
  this.callbacks = a, this.labels = s, this.root = e.ownerDocument.createElement("div"), this.root.className = "tripmap-detail", this.root.hidden = !0, e.appendChild(this.root);
4
4
  }
@@ -17,8 +17,8 @@ class r {
17
17
  if (s) {
18
18
  const t = this.callbacks.takePreloaded?.(s) ?? a.createElement("img");
19
19
  if (t.getAttribute("src") || (t.src = s, t.loading = "eager", t.decoding = "async"), t.alt = e.altText || e.title || "", t.className = "tripmap-detail__img", t.draggable = !1, this.callbacks.onImageClick) {
20
- const o = a.createElement("button");
21
- o.type = "button", o.className = "tripmap-detail__zoom", o.setAttribute("aria-label", this.labels.zoomImage), o.appendChild(t), o.addEventListener("click", () => this.callbacks.onImageClick?.(e)), this.root.appendChild(o);
20
+ const l = a.createElement("button");
21
+ l.type = "button", l.className = "tripmap-detail__zoom", l.setAttribute("aria-label", this.labels.zoomImage), l.appendChild(t), l.addEventListener("click", () => this.callbacks.onImageClick?.(e)), this.root.appendChild(l);
22
22
  } else
23
23
  this.root.appendChild(t);
24
24
  }
@@ -27,14 +27,15 @@ class r {
27
27
  const t = a.createElement("strong");
28
28
  t.className = "tripmap-detail__title", t.textContent = e.title, i.appendChild(t);
29
29
  }
30
- if (e.capturedAt) {
30
+ const o = e.capturedAt ? this.callbacks.formatTime(e.capturedAt) : "";
31
+ if (o) {
31
32
  const t = a.createElement("span");
32
- t.className = "tripmap-detail__time", t.textContent = this.callbacks.formatTime(e.capturedAt), i.appendChild(t);
33
+ t.className = "tripmap-detail__time", t.textContent = o, i.appendChild(t);
33
34
  }
34
- const l = e.description || e.altText;
35
- if (l) {
35
+ const r = e.description || e.altText;
36
+ if (r) {
36
37
  const t = a.createElement("p");
37
- t.className = "tripmap-detail__desc", t.textContent = l, i.appendChild(t);
38
+ t.className = "tripmap-detail__desc", t.textContent = r, i.appendChild(t);
38
39
  }
39
40
  i.childNodes.length > 0 && this.root.appendChild(i), this.root.hidden = !1;
40
41
  }
@@ -46,5 +47,5 @@ class r {
46
47
  }
47
48
  }
48
49
  export {
49
- r as DetailPanel
50
+ c as DetailPanel
50
51
  };