@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,42 @@
1
+ function c(t) {
2
+ if (t === "light" || t === "dark") return t;
3
+ if (typeof window < "u" && typeof window.matchMedia == "function")
4
+ try {
5
+ return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
6
+ } catch {
7
+ return "light";
8
+ }
9
+ return "light";
10
+ }
11
+ function o(t) {
12
+ if (typeof window > "u" || typeof window.matchMedia != "function") return () => {
13
+ };
14
+ let e;
15
+ try {
16
+ e = window.matchMedia("(prefers-color-scheme: dark)");
17
+ } catch {
18
+ return () => {
19
+ };
20
+ }
21
+ const r = (a) => t(a.matches ? "dark" : "light");
22
+ return e.addEventListener("change", r), () => e.removeEventListener("change", r);
23
+ }
24
+ const s = "tripmap-";
25
+ function h(t, e) {
26
+ if (!t) return e;
27
+ const r = {};
28
+ for (const [n, i] of Object.entries(t.sources ?? {}))
29
+ n.startsWith(s) && (r[n] = i);
30
+ const a = (t.layers ?? []).filter((n) => n.id.startsWith(s));
31
+ return {
32
+ ...e,
33
+ sources: { ...e.sources ?? {}, ...r },
34
+ layers: [...e.layers ?? [], ...a]
35
+ };
36
+ }
37
+ export {
38
+ s as TRIPMAP_LAYER_PREFIX,
39
+ h as carryTripMapLayers,
40
+ c as resolveTheme,
41
+ o as watchSystemTheme
42
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blogmcp/sdk",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "Headless SDK for Knowledge Base blog — core client, Vue composables, Nuxt adapter",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -61,7 +61,7 @@
61
61
  }
62
62
  },
63
63
  "dependencies": {
64
- "@blogmcp/mdx-schema": "^0.3.0",
64
+ "@blogmcp/mdx-schema": "^0.5.0",
65
65
  "@blogmcp/sanitize": "^0.3.0",
66
66
  "marked": "^15.0.7"
67
67
  },
@@ -54,10 +54,16 @@ const ARTICLE_WITH_TRANSLATION_FIELDS = `
54
54
  }
55
55
  contentImagesGeo {
56
56
  url
57
+ slug
57
58
  latitude
58
59
  longitude
59
60
  altitude
60
61
  placeName
62
+ capturedAt
63
+ thumbnailUrl
64
+ altText
65
+ width
66
+ height
61
67
  }
62
68
  accessRights
63
69
  `
package/src/core/types.ts CHANGED
@@ -16,6 +16,15 @@ export interface MediaGeo {
16
16
  export interface ContentImageGeo extends MediaGeo {
17
17
  /** Public URL/path of the image (the SDK absolutizes it for JSON-LD). */
18
18
  url: string
19
+ /** Media slug — the stable identity (TripMap node id). */
20
+ slug?: string
21
+ /** EXIF capture time (ISO; timezone-ambiguous — trip-local ordering only). */
22
+ capturedAt?: string | null
23
+ /** Small thumbnail path for map markers / filmstrips. */
24
+ thumbnailUrl?: string
25
+ altText?: string | null
26
+ width?: number | null
27
+ height?: number | null
19
28
  }
20
29
 
21
30
  export interface Article {