@blogmcp/sdk 0.3.2 → 0.6.1
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/core/client-types.d.ts +7 -1
- package/dist/core/client.d.ts +25 -1
- package/dist/core/client.js +38 -34
- package/dist/core/consultation-adapter.d.ts +90 -0
- package/dist/core/consultation-adapter.js +200 -0
- package/dist/core/consultations.d.ts +108 -0
- package/dist/core/consultations.js +95 -0
- package/dist/core/errors.d.ts +52 -0
- package/dist/core/errors.js +73 -0
- package/dist/core/index.d.ts +7 -1
- package/dist/core/index.js +80 -64
- package/dist/core/queries.d.ts +16 -1
- package/dist/core/queries.js +198 -61
- package/dist/core/review/format.d.ts +30 -0
- package/dist/core/review/format.js +78 -0
- package/dist/core/review/index.d.ts +6 -0
- package/dist/core/review/index.js +9 -0
- package/dist/core/review/types.d.ts +176 -0
- package/dist/core/review/types.js +9 -0
- package/dist/core/server-only.d.ts +12 -0
- package/dist/core/server-only.js +11 -0
- package/dist/core/types.d.ts +295 -0
- package/dist/packages/mdx-render-vue/dist/composables/useGallery.js +12 -11
- package/dist/packages/mdx-render-vue/dist/composables/useTripMap.js +16 -16
- package/dist/packages/mdx-render-vue/dist/edit/TripMapEdit.vue.js +1 -1
- package/dist/packages/mdx-render-vue/dist/registry.js +21 -22
- package/dist/packages/mdx-render-vue/dist/render/alert/Alert.vue2.js +1 -1
- package/dist/packages/mdx-render-vue/dist/render/badge/Badge.vue2.js +1 -1
- package/dist/packages/mdx-render-vue/dist/render/button/Button.vue2.js +1 -1
- package/dist/packages/mdx-render-vue/dist/render/callout/CalloutDefault.vue.js +1 -1
- package/dist/packages/mdx-render-vue/dist/render/callout/CalloutMinimal.vue.js +1 -1
- package/dist/packages/mdx-render-vue/dist/render/tripmap/TripMapDefault.vue.js +2 -2
- package/dist/packages/tripmap-core/dist/attribution.js +121 -6
- package/dist/packages/tripmap-core/dist/css.js +68 -16
- package/dist/packages/tripmap-core/dist/detail.js +10 -9
- package/dist/packages/tripmap-core/dist/engine.js +285 -247
- package/dist/packages/tripmap-core/dist/export.js +48 -46
- package/dist/packages/tripmap-core/dist/filmstrip.js +30 -17
- package/dist/packages/tripmap-core/dist/framing.js +30 -30
- package/dist/packages/tripmap-core/dist/generated/maplibre-worker.bundle.js +1 -1
- package/dist/packages/tripmap-core/dist/heading.js +8 -0
- package/dist/packages/tripmap-core/dist/href.js +18 -0
- package/dist/packages/tripmap-core/dist/index.js +32 -24
- package/dist/packages/tripmap-core/dist/lightbox.js +31 -29
- package/dist/packages/tripmap-core/dist/line.js +6 -6
- package/dist/packages/tripmap-core/dist/markers.js +47 -43
- package/dist/packages/tripmap-core/dist/nodes.js +56 -43
- package/dist/packages/tripmap-core/dist/playback.js +17 -17
- package/dist/packages/tripmap-core/dist/preload.js +14 -14
- package/dist/packages/tripmap-core/dist/theme.js +21 -21
- package/dist/{node_modules → packages/tripmap-core/node_modules}/maplibre-gl/dist/maplibre-gl.js +1890 -1720
- package/dist/{node_modules → packages/tripmap-core/node_modules}/pmtiles/dist/esm/index.js +1 -1
- package/dist/react/KbMdxContent.js +7 -8
- package/dist/vue/components/KbMdxContent.vue2.js +6 -7
- package/package.json +8 -3
- package/src/core/client-types.ts +13 -2
- package/src/core/client.ts +40 -5
- package/src/core/consultation-adapter.ts +408 -0
- package/src/core/consultations.ts +224 -0
- package/src/core/errors.ts +145 -0
- package/src/core/index.ts +68 -0
- package/src/core/queries.ts +167 -3
- package/src/core/review/format.ts +138 -0
- package/src/core/review/index.ts +22 -0
- package/src/core/review/types.ts +168 -0
- package/src/core/server-only.ts +20 -0
- package/src/core/types.ts +337 -0
- package/dist/_virtual/constants.js +0 -4
- package/dist/_virtual/index.js +0 -2
- package/dist/_virtual/index2.js +0 -4
- package/dist/_virtual/index3.js +0 -2
- package/dist/_virtual/re.js +0 -4
- package/dist/node_modules/@braintree/sanitize-url/dist/constants.js +0 -8
- package/dist/node_modules/@braintree/sanitize-url/dist/index.js +0 -60
- package/dist/node_modules/dompurify/dist/purify.es.js +0 -662
- package/dist/node_modules/semver/classes/comparator.js +0 -56
- package/dist/node_modules/semver/classes/range.js +0 -148
- package/dist/node_modules/semver/classes/semver.js +0 -169
- package/dist/node_modules/semver/functions/clean.js +0 -14
- package/dist/node_modules/semver/functions/cmp.js +0 -39
- package/dist/node_modules/semver/functions/coerce.js +0 -33
- package/dist/node_modules/semver/functions/compare-build.js +0 -14
- package/dist/node_modules/semver/functions/compare-loose.js +0 -11
- package/dist/node_modules/semver/functions/compare.js +0 -11
- package/dist/node_modules/semver/functions/diff.js +0 -24
- package/dist/node_modules/semver/functions/eq.js +0 -11
- package/dist/node_modules/semver/functions/gt.js +0 -11
- package/dist/node_modules/semver/functions/gte.js +0 -11
- package/dist/node_modules/semver/functions/inc.js +0 -21
- package/dist/node_modules/semver/functions/lt.js +0 -11
- package/dist/node_modules/semver/functions/lte.js +0 -11
- package/dist/node_modules/semver/functions/major.js +0 -11
- package/dist/node_modules/semver/functions/minor.js +0 -11
- package/dist/node_modules/semver/functions/neq.js +0 -11
- package/dist/node_modules/semver/functions/parse.js +0 -21
- package/dist/node_modules/semver/functions/patch.js +0 -11
- package/dist/node_modules/semver/functions/prerelease.js +0 -14
- package/dist/node_modules/semver/functions/rcompare.js +0 -11
- package/dist/node_modules/semver/functions/rsort.js +0 -11
- package/dist/node_modules/semver/functions/satisfies.js +0 -18
- package/dist/node_modules/semver/functions/sort.js +0 -11
- package/dist/node_modules/semver/functions/valid.js +0 -14
- package/dist/node_modules/semver/index.js +0 -97
- package/dist/node_modules/semver/internal/constants.js +0 -28
- package/dist/node_modules/semver/internal/debug.js +0 -8
- package/dist/node_modules/semver/internal/identifiers.js +0 -18
- package/dist/node_modules/semver/internal/lrucache.js +0 -32
- package/dist/node_modules/semver/internal/parse-options.js +0 -10
- package/dist/node_modules/semver/internal/re.js +0 -32
- package/dist/node_modules/semver/ranges/gtr.js +0 -11
- package/dist/node_modules/semver/ranges/intersects.js +0 -11
- package/dist/node_modules/semver/ranges/ltr.js +0 -11
- package/dist/node_modules/semver/ranges/max-satisfying.js +0 -22
- package/dist/node_modules/semver/ranges/min-satisfying.js +0 -22
- package/dist/node_modules/semver/ranges/min-version.js +0 -42
- package/dist/node_modules/semver/ranges/outside.js +0 -44
- package/dist/node_modules/semver/ranges/simplify.js +0 -24
- package/dist/node_modules/semver/ranges/subset.js +0 -94
- package/dist/node_modules/semver/ranges/to-comparators.js +0 -11
- package/dist/node_modules/semver/ranges/valid.js +0 -17
- package/dist/packages/mdx-schema/dist/composables/useMdxParsing.js +0 -389
- package/dist/packages/mdx-schema/dist/metadata/index.js +0 -526
- package/dist/packages/mdx-schema/dist/prepareProps.js +0 -46
- package/dist/packages/mdx-schema/dist/styles/index.js +0 -141
- package/dist/packages/mdx-schema/dist/tripmap.js +0 -88
- package/dist/packages/mdx-schema/dist/types/index.js +0 -26
- package/dist/packages/sanitize/dist/html.js +0 -89
- /package/dist/{node_modules → packages/tripmap-core/node_modules}/maplibre-gl/dist/maplibre-gl-shared.js +0 -0
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { defineAsyncComponent as m, defineComponent as u, h as b } from "vue";
|
|
2
|
-
import { componentMetadata as f } from "
|
|
3
|
-
import { getComponentMetadata as N, getComponentNames as W } from "
|
|
4
|
-
import { prepareProps as g } from "
|
|
5
|
-
import "../../../_virtual/index3.js";
|
|
2
|
+
import { componentMetadata as f } from "@blogmcp/mdx-schema/metadata";
|
|
3
|
+
import { componentMetadata as T, getComponentMetadata as N, getComponentNames as W } from "@blogmcp/mdx-schema/metadata";
|
|
4
|
+
import { prepareProps as g } from "@blogmcp/mdx-schema";
|
|
6
5
|
const s = "__mdxPreparePropsAppliedFor", C = {
|
|
7
6
|
Callout: {
|
|
8
7
|
editor: { icon: "info", color: "#569cd6", borderColor: "#569cd6", bgColor: "rgba(86, 156, 214, 0.08)" },
|
|
@@ -100,11 +99,11 @@ const s = "__mdxPreparePropsAppliedFor", C = {
|
|
|
100
99
|
return [o.name, { metadata: o, ...r }];
|
|
101
100
|
})
|
|
102
101
|
);
|
|
103
|
-
function
|
|
102
|
+
function E(o) {
|
|
104
103
|
const r = d[o];
|
|
105
104
|
return r ? Object.keys(r.render) : [];
|
|
106
105
|
}
|
|
107
|
-
async function
|
|
106
|
+
async function M(o, r = "default") {
|
|
108
107
|
const e = d[o];
|
|
109
108
|
if (!e) return;
|
|
110
109
|
const t = e.render[r] || e.render.default;
|
|
@@ -124,38 +123,38 @@ function y(o, r, e = "default") {
|
|
|
124
123
|
});
|
|
125
124
|
return t[s] = r.name, t;
|
|
126
125
|
}
|
|
127
|
-
const
|
|
128
|
-
function
|
|
129
|
-
const e = `${o}:${r}`, t =
|
|
126
|
+
const a = /* @__PURE__ */ new Map();
|
|
127
|
+
function P(o, r = "default") {
|
|
128
|
+
const e = `${o}:${r}`, t = a.get(e);
|
|
130
129
|
if (t) return t;
|
|
131
130
|
const n = d[o];
|
|
132
131
|
if (!n) return;
|
|
133
132
|
const i = n.render[r] || n.render.default;
|
|
134
133
|
if (!i) return;
|
|
135
|
-
const c = m(() => i().then((l) => l.default)),
|
|
136
|
-
return
|
|
134
|
+
const c = m(() => i().then((l) => l.default)), p = y(c, n.metadata, r);
|
|
135
|
+
return a.set(e, p), p;
|
|
137
136
|
}
|
|
138
|
-
function
|
|
139
|
-
|
|
137
|
+
function R() {
|
|
138
|
+
a.clear();
|
|
140
139
|
}
|
|
141
|
-
async function
|
|
140
|
+
async function _(o) {
|
|
142
141
|
const r = d[o];
|
|
143
142
|
return r ? (await r.edit()).default : void 0;
|
|
144
143
|
}
|
|
145
|
-
function
|
|
144
|
+
function x(o) {
|
|
146
145
|
return d[o]?.editor;
|
|
147
146
|
}
|
|
148
147
|
export {
|
|
149
148
|
s as MDX_PREPARED_SENTINEL,
|
|
150
|
-
|
|
151
|
-
|
|
149
|
+
R as _resetWrappedRenderCacheForTests,
|
|
150
|
+
T as componentMetadata,
|
|
152
151
|
d as componentRegistry,
|
|
153
152
|
N as getComponentMetadata,
|
|
154
153
|
W as getComponentNames,
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
154
|
+
E as getComponentVariants,
|
|
155
|
+
_ as getEditComponentAsync,
|
|
156
|
+
x as getEditorConfig,
|
|
157
|
+
M as getRenderComponentAsync,
|
|
158
|
+
P as getWrappedRenderComponent,
|
|
160
159
|
y as wrapVueComponentForMdx
|
|
161
160
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as m, computed as d, createElementBlock as o, openBlock as s, normalizeClass as l, unref as n, createVNode as f, createElementVNode as r, createCommentVNode as u, toDisplayString as p, renderSlot as v } from "vue";
|
|
2
2
|
import { Icon as h } from "../../node_modules/@iconify/vue/dist/iconify.js";
|
|
3
|
-
import { alertStyles as i } from "
|
|
3
|
+
import { alertStyles as i } from "@blogmcp/mdx-schema/styles";
|
|
4
4
|
const _ = { class: "min-w-0 flex-1" }, y = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "mb-0.5 font-semibold"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as n, computed as l, createElementBlock as r, openBlock as s, normalizeClass as c, toDisplayString as m } from "vue";
|
|
2
|
-
import { badgeStyles as o } from "
|
|
2
|
+
import { badgeStyles as o } from "@blogmcp/mdx-schema/styles";
|
|
3
3
|
const f = /* @__PURE__ */ n({
|
|
4
4
|
__name: "Badge",
|
|
5
5
|
props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as m, computed as s, createElementBlock as l, openBlock as r, normalizeClass as i, toDisplayString as c } from "vue";
|
|
2
|
-
import { buttonStyles as e } from "
|
|
2
|
+
import { buttonStyles as e } from "@blogmcp/mdx-schema/styles";
|
|
3
3
|
import "../../packages/sanitize/dist/html.js";
|
|
4
4
|
import { d as u } from "../../_virtual/index.js";
|
|
5
5
|
const d = ["href"], z = /* @__PURE__ */ m({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as c, computed as a, createElementBlock as n, openBlock as r, normalizeClass as s, unref as p, createElementVNode as l, createCommentVNode as m, renderSlot as k } from "vue";
|
|
2
|
-
import { calloutStyles as i } from "
|
|
2
|
+
import { calloutStyles as i } from "@blogmcp/mdx-schema/styles";
|
|
3
3
|
const f = { class: "flex items-start gap-3" }, h = { class: "flex-shrink-0 mt-0.5" }, C = { class: "flex-1 text-sm leading-relaxed" }, g = /* @__PURE__ */ c({
|
|
4
4
|
__name: "CalloutDefault",
|
|
5
5
|
props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as r, computed as t, createElementBlock as c, openBlock as m, normalizeClass as i, unref as p, createElementVNode as d, renderSlot as u } from "vue";
|
|
2
|
-
import { calloutStyles as o } from "
|
|
2
|
+
import { calloutStyles as o } from "@blogmcp/mdx-schema/styles";
|
|
3
3
|
const f = { class: "text-sm leading-relaxed" }, y = /* @__PURE__ */ r({
|
|
4
4
|
__name: "CalloutMinimal",
|
|
5
5
|
props: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
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 "
|
|
2
|
+
import { tripMapStyles as r } from "@blogmcp/mdx-schema/styles";
|
|
3
3
|
import { useTripMap as D } from "../../composables/useTripMap.js";
|
|
4
|
-
import { tripMapFormatTime as G } from "
|
|
4
|
+
import { tripMapFormatTime as G } from "@blogmcp/mdx-schema/tripmap";
|
|
5
5
|
const W = ["aria-label"], $ = ["src", "alt"], R = /* @__PURE__ */ H({
|
|
6
6
|
__name: "TripMapDefault",
|
|
7
7
|
props: {
|
|
@@ -1,9 +1,124 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
|
|
8
|
-
|
|
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
|
|
2
|
-
const
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
142
|
-
if (t.getElementById(
|
|
143
|
-
const
|
|
144
|
-
|
|
145
|
-
${
|
|
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
|
-
|
|
149
|
-
|
|
150
|
-
|
|
200
|
+
a as TRIPMAP_COMPONENT_CSS,
|
|
201
|
+
i as TRIPMAP_STYLE_ID,
|
|
202
|
+
p as injectTripMapCss
|
|
151
203
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
class
|
|
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
|
|
21
|
-
|
|
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
|
-
|
|
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 =
|
|
33
|
+
t.className = "tripmap-detail__time", t.textContent = o, i.appendChild(t);
|
|
33
34
|
}
|
|
34
|
-
const
|
|
35
|
-
if (
|
|
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 =
|
|
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
|
-
|
|
50
|
+
c as DetailPanel
|
|
50
51
|
};
|