@blogmcp/sdk 0.3.0 → 0.3.2

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 (37) hide show
  1. package/LICENSE +21 -0
  2. package/dist/core/queries.d.ts +2 -2
  3. package/dist/core/queries.js +10 -4
  4. package/dist/core/types.d.ts +9 -0
  5. package/dist/node_modules/fflate/esm/browser.js +284 -0
  6. package/dist/node_modules/maplibre-gl/dist/maplibre-gl-shared.js +11606 -0
  7. package/dist/node_modules/maplibre-gl/dist/maplibre-gl.js +12334 -0
  8. package/dist/node_modules/pmtiles/dist/esm/index.js +441 -0
  9. package/dist/packages/mdx-render-vue/dist/composables/useTripMap.js +27 -0
  10. package/dist/packages/mdx-render-vue/dist/edit/TripMapEdit.vue.js +44 -0
  11. package/dist/packages/mdx-render-vue/dist/edit/TripMapEdit.vue2.js +4 -0
  12. package/dist/packages/mdx-render-vue/dist/registry.js +29 -22
  13. package/dist/packages/mdx-render-vue/dist/render/tripmap/TripMapDefault.vue.js +180 -0
  14. package/dist/packages/mdx-render-vue/dist/render/tripmap/TripMapDefault.vue2.js +4 -0
  15. package/dist/packages/mdx-schema/dist/metadata/index.js +117 -6
  16. package/dist/packages/mdx-schema/dist/styles/index.js +31 -9
  17. package/dist/packages/mdx-schema/dist/tripmap.js +88 -0
  18. package/dist/packages/tripmap-core/dist/attribution.js +9 -0
  19. package/dist/packages/tripmap-core/dist/css.js +151 -0
  20. package/dist/packages/tripmap-core/dist/detail.js +50 -0
  21. package/dist/packages/tripmap-core/dist/engine.js +410 -0
  22. package/dist/packages/tripmap-core/dist/export.js +70 -0
  23. package/dist/packages/tripmap-core/dist/filmstrip.js +46 -0
  24. package/dist/packages/tripmap-core/dist/framing.js +44 -0
  25. package/dist/packages/tripmap-core/dist/generated/maplibre-worker.bundle.js +4 -0
  26. package/dist/packages/tripmap-core/dist/index.js +106 -0
  27. package/dist/packages/tripmap-core/dist/lightbox.js +94 -0
  28. package/dist/packages/tripmap-core/dist/line.js +34 -0
  29. package/dist/packages/tripmap-core/dist/markers.js +95 -0
  30. package/dist/packages/tripmap-core/dist/node_modules/maplibre-gl/dist/maplibre-gl.css.js +4 -0
  31. package/dist/packages/tripmap-core/dist/nodes.js +55 -0
  32. package/dist/packages/tripmap-core/dist/playback.js +29 -0
  33. package/dist/packages/tripmap-core/dist/preload.js +44 -0
  34. package/dist/packages/tripmap-core/dist/theme.js +42 -0
  35. package/package.json +2 -2
  36. package/src/core/queries.ts +6 -0
  37. package/src/core/types.ts +9 -0
@@ -0,0 +1,180 @@
1
+ import { defineComponent as H, ref as f, onMounted as L, onBeforeUnmount as P, createElementBlock as n, openBlock as s, normalizeClass as i, unref as e, createCommentVNode as d, createElementVNode as p, toDisplayString as v, Fragment as B, renderList as F, normalizeStyle as j } from "vue";
2
+ import { tripMapStyles as r } from "../../../../mdx-schema/dist/styles/index.js";
3
+ import { useTripMap as D } from "../../composables/useTripMap.js";
4
+ import { tripMapFormatTime as G } from "../../../../mdx-schema/dist/tripmap.js";
5
+ const W = ["aria-label"], $ = ["src", "alt"], R = /* @__PURE__ */ H({
6
+ __name: "TripMapDefault",
7
+ props: {
8
+ slugs: {},
9
+ exclude: {},
10
+ nodes: {},
11
+ height: {},
12
+ line: { type: Boolean, default: !0 },
13
+ filmstrip: { type: Boolean, default: !0 },
14
+ playback: { type: Boolean, default: !0 },
15
+ cluster: { type: Boolean, default: !0 },
16
+ theme: { default: "auto" },
17
+ detail: { default: "popup" },
18
+ styleUrl: {},
19
+ center: {},
20
+ zoom: {},
21
+ title: {}
22
+ },
23
+ setup(y) {
24
+ const l = y, { handNodes: S, facadeThumbs: w, facadeStops: U, heightStyle: _, geoUrl: z, isConfigOnly: I, labels: A, texts: g } = D(l), N = f(null), h = f(null), x = f(null), u = f("facade"), C = f(0);
25
+ let T = null, m = null, k = !1;
26
+ async function O() {
27
+ try {
28
+ const t = await fetch(z.value, { headers: { accept: "application/json" } });
29
+ if (!t.ok) throw new Error(`media/geo ${t.status}`);
30
+ return await t.json();
31
+ } catch (t) {
32
+ if (I.value) return { nodes: [] };
33
+ throw t;
34
+ }
35
+ }
36
+ async function E() {
37
+ if (!k) {
38
+ k = !0, u.value = "loading";
39
+ try {
40
+ const [t, c] = await Promise.all([import("../../../../tripmap-core/dist/index.js"), O()]), a = (c.nodes ?? []).filter((o) => typeof o.latitude == "number" && typeof o.longitude == "number").map((o) => ({
41
+ id: o.slug,
42
+ lat: o.latitude,
43
+ lng: o.longitude,
44
+ capturedAt: o.capturedAt ?? void 0,
45
+ thumbnailUrl: o.thumbnailUrl ?? void 0,
46
+ imageUrl: o.url ?? void 0,
47
+ largeImageUrl: o.largeUrl ?? void 0,
48
+ altText: o.altText ?? void 0,
49
+ title: o.placeName ?? void 0
50
+ })), M = t.buildTripNodes(a, S.value);
51
+ if (C.value = c.skipped ?? 0, M.length === 0 || !h.value) {
52
+ u.value = "empty";
53
+ return;
54
+ }
55
+ const b = new t.TripMap(h.value, {
56
+ styleUrl: l.styleUrl || c.config?.styleUrl || "",
57
+ darkStyleUrl: c.config?.darkStyleUrl,
58
+ theme: l.theme,
59
+ cluster: l.cluster,
60
+ showLine: l.line,
61
+ showFilmstrip: l.filmstrip,
62
+ showPlayback: l.playback,
63
+ title: l.title,
64
+ detail: l.detail,
65
+ detailHost: l.detail === "panel" ? x.value ?? void 0 : void 0,
66
+ extraAttribution: c.config?.attribution,
67
+ labels: A.value,
68
+ initialView: V(),
69
+ events: {}
70
+ });
71
+ b.setNodes(M), await b.init(), T = () => b.destroy(), u.value = "live";
72
+ } catch {
73
+ u.value = k && u.value === "loading" ? "facade" : u.value;
74
+ }
75
+ }
76
+ }
77
+ function V() {
78
+ if (!l.center) return;
79
+ const [t, c] = l.center.split(",").map((a) => Number.parseFloat(a.trim()));
80
+ if (!(!Number.isFinite(t) || !Number.isFinite(c)))
81
+ return { center: [c, t], zoom: l.zoom };
82
+ }
83
+ return L(() => {
84
+ const t = N.value;
85
+ if (t) {
86
+ if (typeof IntersectionObserver > "u") {
87
+ E();
88
+ return;
89
+ }
90
+ m = new IntersectionObserver(
91
+ (c) => {
92
+ c.some((a) => a.isIntersecting) && (m?.disconnect(), m = null, E());
93
+ },
94
+ { rootMargin: "300px" }
95
+ ), m.observe(t);
96
+ }
97
+ }), P(() => {
98
+ m?.disconnect(), T?.();
99
+ }), (t, c) => (s(), n("div", {
100
+ ref_key: "rootEl",
101
+ ref: N,
102
+ class: i(e(r).container),
103
+ "data-mdx-component": "TripMap",
104
+ "aria-label": y.title
105
+ }, [
106
+ y.title ? (s(), n("p", {
107
+ key: 0,
108
+ class: i(e(r).head)
109
+ }, v(y.title), 3)) : d("", !0),
110
+ e(w).length && u.value !== "live" ? (s(), n("ol", {
111
+ key: 1,
112
+ class: i(e(r).strip)
113
+ }, [
114
+ (s(!0), n(B, null, F(e(w), (a) => (s(), n("li", {
115
+ key: a.slug,
116
+ class: i(e(r).stripItem)
117
+ }, [
118
+ p("img", {
119
+ src: a.src,
120
+ alt: a.alt,
121
+ width: "80",
122
+ height: "80",
123
+ loading: "lazy",
124
+ decoding: "async",
125
+ class: i(e(r).stripImg)
126
+ }, null, 10, $)
127
+ ], 2))), 128))
128
+ ], 2)) : d("", !0),
129
+ p("div", {
130
+ class: i(e(r).mapWrap),
131
+ style: j(e(_))
132
+ }, [
133
+ p("div", {
134
+ ref_key: "mapEl",
135
+ ref: h,
136
+ class: "absolute inset-0"
137
+ }, null, 512),
138
+ u.value !== "live" ? (s(), n("div", {
139
+ key: 0,
140
+ class: i([e(r).mapOverlay])
141
+ }, [
142
+ p("div", {
143
+ class: i(e(r).mapBox)
144
+ }, [
145
+ p("span", {
146
+ class: i(e(r).mapHint)
147
+ }, v(u.value === "empty" ? e(g).empty : e(g).hint), 3)
148
+ ], 2)
149
+ ], 2)) : d("", !0)
150
+ ], 6),
151
+ l.detail === "panel" ? (s(), n("div", {
152
+ key: 2,
153
+ ref_key: "detailEl",
154
+ ref: x,
155
+ class: i(e(r).detailHost)
156
+ }, null, 2)) : d("", !0),
157
+ e(U).length && u.value !== "live" ? (s(), n("ol", {
158
+ key: 3,
159
+ class: i(e(r).stopList)
160
+ }, [
161
+ (s(!0), n(B, null, F(e(U), (a) => (s(), n("li", {
162
+ key: a.key
163
+ }, [
164
+ a.capturedAt ? (s(), n("span", {
165
+ key: 0,
166
+ class: i(e(r).stopTime)
167
+ }, v(e(G)(a.capturedAt)), 3)) : d("", !0),
168
+ p("span", null, v(a.title), 1)
169
+ ]))), 128))
170
+ ], 2)) : d("", !0),
171
+ u.value !== "live" ? (s(), n("p", {
172
+ key: 4,
173
+ class: i(e(r).note)
174
+ }, v(e(g).unavailable), 3)) : d("", !0)
175
+ ], 10, W));
176
+ }
177
+ });
178
+ export {
179
+ R as default
180
+ };
@@ -0,0 +1,4 @@
1
+ import { default as o } from "./TripMapDefault.vue.js";
2
+ export {
3
+ o as default
4
+ };
@@ -400,16 +400,127 @@ Read this carefully.
400
400
  </Tooltip>`,
401
401
  addedIn: "0.1.0",
402
402
  deprecated: []
403
+ },
404
+ {
405
+ name: "TripMap",
406
+ 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.",
407
+ icon: "🗺",
408
+ category: "media",
409
+ aliases: ["tripmap", "map", "trip", "route", "travelmap", "hike"],
410
+ props: [
411
+ {
412
+ name: "slugs",
413
+ type: "string",
414
+ required: !1,
415
+ 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.'
416
+ },
417
+ {
418
+ name: "exclude",
419
+ type: "string",
420
+ required: !1,
421
+ description: "AUTO mode only: comma-separated media slugs to leave off the map."
422
+ },
423
+ {
424
+ name: "nodes",
425
+ type: "array",
426
+ required: !1,
427
+ 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.'
428
+ },
429
+ {
430
+ name: "height",
431
+ type: "string",
432
+ required: !1,
433
+ default: '"420px"',
434
+ description: "CSS height of the map box."
435
+ },
436
+ {
437
+ name: "line",
438
+ type: "boolean",
439
+ required: !1,
440
+ default: "true",
441
+ description: "Draw the chronological route line between time-neighbouring nodes."
442
+ },
443
+ {
444
+ name: "filmstrip",
445
+ type: "boolean",
446
+ required: !1,
447
+ default: "true",
448
+ description: "Show the synced photo strip below the map."
449
+ },
450
+ {
451
+ name: "playback",
452
+ type: "boolean",
453
+ required: !1,
454
+ default: "true",
455
+ description: "Show the play button that flies the camera along the route."
456
+ },
457
+ {
458
+ name: "cluster",
459
+ type: "boolean",
460
+ required: !1,
461
+ default: "true",
462
+ description: "Cluster nearby markers at low zoom."
463
+ },
464
+ {
465
+ name: "theme",
466
+ type: "string",
467
+ required: !1,
468
+ default: '"auto"',
469
+ description: 'Map color scheme; "auto" follows the reader’s system preference.',
470
+ enum: ["light", "dark", "auto"]
471
+ },
472
+ {
473
+ name: "detail",
474
+ type: "string",
475
+ required: !1,
476
+ default: '"popup"',
477
+ 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.',
478
+ enum: ["popup", "panel"],
479
+ addedIn: "0.4.0"
480
+ },
481
+ {
482
+ name: "styleUrl",
483
+ type: "string",
484
+ required: !1,
485
+ description: "MapLibre style JSON URL override for this block (wins over tenant config)."
486
+ },
487
+ {
488
+ name: "center",
489
+ type: "string",
490
+ required: !1,
491
+ description: 'Initial center as "lat,lng" — overrides smart framing; pair with zoom.'
492
+ },
493
+ {
494
+ name: "zoom",
495
+ type: "number",
496
+ required: !1,
497
+ description: "Initial zoom level — overrides smart framing; pair with center.",
498
+ numericRange: [1, 19]
499
+ },
500
+ {
501
+ name: "title",
502
+ type: "string",
503
+ required: !1,
504
+ description: "Accessible label for the map region."
505
+ }
506
+ ],
507
+ hasChildren: !1,
508
+ selfClosing: !0,
509
+ defaultProps: 'title="Trasa výletu"',
510
+ defaultChildren: "",
511
+ 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"}]} />',
512
+ addedIn: "0.3.0",
513
+ deprecated: []
403
514
  }
404
- ], i = new Map(t.map((e) => [e.name, e]));
405
- function a(e) {
406
- return i.get(e);
515
+ ], a = new Map(t.map((e) => [e.name, e]));
516
+ function i(e) {
517
+ return a.get(e);
407
518
  }
408
- function n() {
519
+ function r() {
409
520
  return t.map((e) => e.name);
410
521
  }
411
522
  export {
412
523
  t as componentMetadata,
413
- a as getComponentMetadata,
414
- n as getComponentNames
524
+ i as getComponentMetadata,
525
+ r as getComponentNames
415
526
  };
@@ -1,4 +1,25 @@
1
1
  const t = {
2
+ container: "my-6 flex flex-col gap-3 rounded-xl border border-gray-200 bg-white p-3",
3
+ head: "text-sm font-medium text-gray-700 m-0",
4
+ /**
5
+ * Sized wrapper that hosts BOTH the engine div and the facade overlay.
6
+ * The engine host must be a plain absolutely-positioned child that the
7
+ * framework never re-patches (a reactive class binding on the engine's
8
+ * own container would clobber the classes the engine adds to it).
9
+ */
10
+ mapWrap: "relative w-full overflow-hidden rounded-lg",
11
+ /** detail="panel": engine-owned photo panel host below the map box (empty until a photo is picked). */
12
+ detailHost: "w-full",
13
+ mapOverlay: "absolute inset-0",
14
+ mapBox: "flex h-full w-full items-center justify-center overflow-hidden rounded-lg bg-gray-100",
15
+ mapHint: "text-sm text-gray-500",
16
+ strip: "flex gap-2 overflow-x-auto pb-1 m-0 p-0 list-none",
17
+ stripItem: "h-20 w-20 flex-none overflow-hidden rounded-lg bg-gray-100",
18
+ stripImg: "block h-full w-full object-cover",
19
+ stopList: "flex flex-col gap-0.5 text-sm text-gray-700 m-0 p-0 list-none",
20
+ stopTime: "mr-2 tabular-nums text-gray-500",
21
+ note: "text-xs text-gray-400 m-0"
22
+ }, a = {
2
23
  base: "inline-flex items-center justify-center font-medium border transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
3
24
  size: {
4
25
  sm: "px-2.5 py-1 text-sm rounded",
@@ -42,7 +63,7 @@ const t = {
42
63
  error: "text-red-700 hover:underline border-transparent bg-transparent"
43
64
  }
44
65
  }
45
- }, a = {
66
+ }, o = {
46
67
  base: "inline-flex items-center px-2 py-0.5 text-xs font-medium border rounded-full",
47
68
  variantColor: {
48
69
  solid: {
@@ -67,7 +88,7 @@ const t = {
67
88
  error: "border-red-500 text-red-700"
68
89
  }
69
90
  }
70
- }, b = {
91
+ }, n = {
71
92
  base: "mdx-alert flex gap-3 rounded-md border px-4 py-3 text-sm",
72
93
  severity: {
73
94
  info: { wrap: "bg-blue-50 border-blue-200 text-blue-900", icon: "lucide:info", iconClass: "text-blue-600" },
@@ -75,7 +96,7 @@ const t = {
75
96
  warning: { wrap: "bg-amber-50 border-amber-200 text-amber-900", icon: "lucide:alert-triangle", iconClass: "text-amber-600" },
76
97
  error: { wrap: "bg-red-50 border-red-200 text-red-900", icon: "lucide:alert-octagon", iconClass: "text-red-600" }
77
98
  }
78
- }, n = {
99
+ }, b = {
79
100
  default: {
80
101
  base: "callout my-6 p-4 rounded-lg border-l-4",
81
102
  type: {
@@ -102,7 +123,7 @@ const t = {
102
123
  danger: "M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
103
124
  }
104
125
  };
105
- function o(e) {
126
+ function l(e) {
106
127
  const r = e.aspectRatio || "1";
107
128
  return r === "auto" ? { tileStyle: {}, mediaStyle: {}, mediaSizeClass: "w-full h-auto" } : {
108
129
  tileStyle: { aspectRatio: r },
@@ -111,9 +132,10 @@ function o(e) {
111
132
  };
112
133
  }
113
134
  export {
114
- b as alertStyles,
115
- a as badgeStyles,
116
- t as buttonStyles,
117
- n as calloutStyles,
118
- o as galleryTileLayout
135
+ n as alertStyles,
136
+ o as badgeStyles,
137
+ a as buttonStyles,
138
+ b as calloutStyles,
139
+ l as galleryTileLayout,
140
+ t as tripMapStyles
119
141
  };
@@ -0,0 +1,88 @@
1
+ const f = "420px";
2
+ function s(a) {
3
+ return (a ?? "").split(",").map((e) => e.trim()).filter(Boolean);
4
+ }
5
+ function g(a) {
6
+ let e = a;
7
+ if (typeof e == "string")
8
+ try {
9
+ e = JSON.parse(e);
10
+ } catch {
11
+ return typeof console < "u" && console.warn('[TripMap] `nodes` prop is not valid JSON — use quoted keys: [{"lat":49.3,"lng":16.3}]'), [];
12
+ }
13
+ return Array.isArray(e) ? e.filter((o) => !!o && typeof o == "object" && typeof o.lat == "number" && typeof o.lng == "number") : [];
14
+ }
15
+ function h(a) {
16
+ const e = /T(\d{2}):(\d{2})/.exec(a);
17
+ return e ? `${e[1]}:${e[2]}` : "";
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()}`;
29
+ }
30
+ const n = o.toString();
31
+ return n ? `/api/media/geo?${n}` : "/api/media/geo";
32
+ }
33
+ function x(a) {
34
+ return (a ?? "").toLowerCase().startsWith("cs") ? {
35
+ hint: "Interaktivní mapa výletu",
36
+ empty: "Žádná z fotek nemá zveřejněnou polohu.",
37
+ unavailable: "Mapa se zobrazí na publikovaném webu."
38
+ } : {
39
+ hint: "Interactive trip map",
40
+ empty: "No photos with public location data.",
41
+ unavailable: "The map is shown on the published page."
42
+ };
43
+ }
44
+ function y(a) {
45
+ return (a ?? "").toLowerCase().startsWith("cs") ? {
46
+ play: "Přehrát trasu",
47
+ stop: "Zastavit",
48
+ fullscreen: "Celá obrazovka",
49
+ exitFullscreen: "Ukončit celou obrazovku",
50
+ export: "Export trasy",
51
+ exportGpx: "Stáhnout GPX",
52
+ exportGpxHint: "hodinky, Garmin, Strava, Komoot",
53
+ openInMapy: "Otevřít v Mapy.com",
54
+ openInGoogleMaps: "Otevřít v Google Maps",
55
+ lightboxClose: "Zavřít",
56
+ lightboxPrev: "Předchozí fotka",
57
+ lightboxNext: "Další fotka",
58
+ zoomImage: "Zobrazit na celou obrazovku"
59
+ } : void 0;
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
75
+ }))
76
+ ].sort(d);
77
+ return { thumbs: p, stops: m };
78
+ }
79
+ 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
88
+ };
@@ -0,0 +1,9 @@
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;
5
+ }
6
+ export {
7
+ n as OSM_ATTRIBUTION,
8
+ o as buildAttributions
9
+ };
@@ -0,0 +1,151 @@
1
+ import p from "./node_modules/maplibre-gl/dist/maplibre-gl.css.js";
2
+ const e = "tripmap-core-css", r = `
3
+ .tripmap { position: relative; display: flex; flex-direction: column; gap: 8px; height: 100%; }
4
+ .tripmap__map { position: relative; flex: 1 1 auto; width: 100%; min-height: 180px; border-radius: 12px; overflow: hidden; }
5
+ .tripmap__map .maplibregl-canvas { outline: none; }
6
+
7
+ /*
8
+ * Marker roots are maplibre Marker elements: maplibre owns their 'position'
9
+ * (absolute, from its own stylesheet above) and their inline 'transform'
10
+ * (the translate that places them). Never declare 'position', 'transform'
11
+ * or a 'transform' transition on '.tripmap-marker*' root selectors — the
12
+ * 2026-09-06 regression was a 'position: relative' on the cluster variant,
13
+ * which put every cluster marker at its static flow slot + translate, i.e.
14
+ * each one 44px lower than the previous (the "band south of the route").
15
+ * A class-level 'transform' would be dead anyway (inline wins) and a
16
+ * transition on it makes markers trail the basemap while panning. Hover /
17
+ * active feedback therefore uses box-shadow + border-color only.
18
+ * Guarded by test/css.spec.ts and the Vue e2e cluster-alignment spec.
19
+ */
20
+ .tripmap-marker {
21
+ display: block; padding: 0; border: 2px solid #ffffff; border-radius: 9999px;
22
+ background: #e5e7eb; cursor: pointer; width: 44px; height: 44px; overflow: hidden;
23
+ box-shadow: 0 1px 4px rgba(0,0,0,0.35);
24
+ transition: box-shadow 120ms ease, border-color 120ms ease;
25
+ }
26
+ .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
+ .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; }
29
+ .tripmap-marker--dot { width: 18px; height: 18px; background: #2563eb; border-width: 3px; }
30
+ .tripmap-marker__dot { display: block; width: 100%; height: 100%; }
31
+ .tripmap-marker--cluster { overflow: visible; }
32
+ .tripmap-marker--cluster .tripmap-marker__img { border-radius: 9999px; }
33
+ .tripmap-marker__count {
34
+ position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px;
35
+ padding: 0 5px; border-radius: 9999px; background: #1d4ed8; color: #fff;
36
+ font: 600 11px/20px system-ui, sans-serif; text-align: center; pointer-events: none;
37
+ }
38
+
39
+ .tripmap-popup .maplibregl-popup-content, .tripmap-popup { font: 13px/1.4 system-ui, sans-serif; }
40
+ /* Never taller than the map it opens in: the description scrolls instead
41
+ (56px = popup tip/offset + the fit-in-view margins). */
42
+ .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; }
44
+ .tripmap-popup__zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
45
+
46
+ /* Detail panel (detail: 'panel') — the photo under the filmstrip at component width. */
47
+ .tripmap--panel { height: auto; }
48
+ .tripmap-detail { display: flex; flex-direction: column; gap: 8px; padding: 4px 2px 0; }
49
+ .tripmap-detail[hidden] { display: none !important; }
50
+ .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; }
52
+ .tripmap-detail__meta { display: flex; flex-direction: column; gap: 2px; font: 14px/1.45 system-ui, sans-serif; color: #111827; }
53
+ .tripmap-detail__title { font-weight: 600; }
54
+ .tripmap-detail__time { color: #6b7280; font-size: 12px; }
55
+ .tripmap-detail__desc { margin: 0; }
56
+
57
+ /* Fullscreen viewer. Mounted on <body>, or inside the fullscreen element. */
58
+ .tripmap-lightbox {
59
+ position: fixed; inset: 0; z-index: 2147483000; display: flex; align-items: center; justify-content: center;
60
+ background: rgba(0,0,0,0.92);
61
+ }
62
+ .tripmap-lightbox__figure {
63
+ margin: 0; max-width: 100vw; max-height: 100vh; display: flex; flex-direction: column; align-items: center;
64
+ gap: 8px; padding: 0 56px; box-sizing: border-box;
65
+ }
66
+ .tripmap-lightbox__img { max-width: 100%; max-height: calc(100vh - 96px); object-fit: contain; }
67
+ .tripmap-lightbox__caption {
68
+ color: #e5e7eb; font: 14px/1.4 system-ui, sans-serif; text-align: center; max-width: 720px;
69
+ display: flex; flex-direction: column; gap: 2px; padding-bottom: 8px;
70
+ }
71
+ .tripmap-lightbox__caption-head { font-weight: 600; color: #fff; }
72
+ .tripmap-lightbox__close, .tripmap-lightbox__nav {
73
+ position: absolute; border: 0; background: rgba(255,255,255,0.12); color: #fff;
74
+ font: 28px/1 system-ui, sans-serif; width: 44px; height: 44px; border-radius: 9999px; cursor: pointer;
75
+ }
76
+ .tripmap-lightbox__close { top: 12px; right: 12px; }
77
+ .tripmap-lightbox__nav { top: 50%; transform: translateY(-50%); }
78
+ .tripmap-lightbox__nav--prev { left: 8px; }
79
+ .tripmap-lightbox__nav--next { right: 8px; }
80
+ .tripmap-lightbox__close:hover, .tripmap-lightbox__nav:hover { background: rgba(255,255,255,0.25); }
81
+ .tripmap-lightbox [hidden] { display: none !important; }
82
+ @media (max-width: 640px) {
83
+ .tripmap-lightbox__figure { padding: 0 8px; }
84
+ .tripmap-lightbox__nav { top: auto; bottom: 12px; transform: none; }
85
+ }
86
+ .tripmap-popup__meta { display: flex; flex-direction: column; gap: 2px; padding-top: 6px; }
87
+ .tripmap-popup__title { font-weight: 600; }
88
+ .tripmap-popup__time { color: #6b7280; font-size: 12px; }
89
+ .tripmap-popup__desc { margin: 0; }
90
+
91
+ .tripmap-filmstrip {
92
+ display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px;
93
+ scrollbar-width: thin; -webkit-overflow-scrolling: touch;
94
+ }
95
+ .tripmap-filmstrip__item {
96
+ position: relative; flex: 0 0 auto; width: 64px; height: 64px; padding: 0;
97
+ border: 2px solid transparent; border-radius: 10px; overflow: hidden;
98
+ background: #f3f4f6; cursor: pointer;
99
+ }
100
+ .tripmap-filmstrip__item--active { border-color: #2563eb; }
101
+ .tripmap-filmstrip__img { width: 100%; height: 100%; object-fit: cover; display: block; }
102
+ .tripmap-filmstrip__item--waypoint { display: flex; align-items: center; justify-content: center; }
103
+ .tripmap-filmstrip__label {
104
+ font: 600 10px/1.2 system-ui, sans-serif; color: #374151; padding: 2px 3px 14px; text-align: center;
105
+ max-width: 100%; overflow-wrap: anywhere; hyphens: auto;
106
+ display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
107
+ }
108
+ .tripmap-filmstrip__time {
109
+ position: absolute; left: 0; right: 0; bottom: 0; padding: 1px 0;
110
+ background: rgba(17,24,39,0.55); color: #fff; font: 10px/1.3 system-ui, sans-serif;
111
+ text-align: center; pointer-events: none;
112
+ }
113
+
114
+ .tripmap:fullscreen { background: #fff; padding: 10px; box-sizing: border-box; gap: 10px; }
115
+ .tripmap:fullscreen .tripmap__map { border-radius: 0; }
116
+
117
+ .tripmap__controls { position: absolute; top: 10px; left: 10px; z-index: 5; display: flex; gap: 6px; }
118
+ .tripmap__ctrl {
119
+ border: 0; border-radius: 8px; padding: 6px 10px; background: rgba(255,255,255,0.95);
120
+ color: #1f2937; font: 600 12px/1 system-ui, sans-serif; cursor: pointer;
121
+ box-shadow: 0 1px 3px rgba(0,0,0,0.3);
122
+ }
123
+ .tripmap__ctrl:hover { background: #fff; }
124
+ .tripmap__export { position: relative; }
125
+ .tripmap__export-btn[aria-expanded="true"] { background: #fff; }
126
+ .tripmap__menu {
127
+ position: absolute; top: calc(100% + 6px); left: 0; z-index: 6; min-width: 230px;
128
+ display: flex; flex-direction: column; gap: 2px; padding: 6px; border-radius: 10px;
129
+ background: #fff; box-shadow: 0 4px 16px rgba(0,0,0,0.25);
130
+ }
131
+ .tripmap__menu-item {
132
+ display: block; width: 100%; box-sizing: border-box; text-align: left; border: 0; background: none;
133
+ padding: 8px 10px; border-radius: 6px; font: 13px/1.3 system-ui, sans-serif; color: #1f2937;
134
+ cursor: pointer; text-decoration: none;
135
+ }
136
+ .tripmap__menu-item:hover, .tripmap__menu-item:focus-visible { background: #f3f4f6; }
137
+ /* An author display rule beats the UA [hidden] rule — restate it, or el.hidden = true is a no-op. */
138
+ .tripmap__controls [hidden] { display: none !important; }
139
+ .tripmap__menu-item small { display: block; color: #6b7280; font-size: 11px; }
140
+ `;
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);
146
+ }
147
+ export {
148
+ r as TRIPMAP_COMPONENT_CSS,
149
+ e as TRIPMAP_STYLE_ID,
150
+ a as injectTripMapCss
151
+ };