@blogmcp/sdk 0.6.0 → 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/index.js +2 -2
- 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/react/KbMdxContent.js +7 -8
- package/dist/vue/components/KbMdxContent.vue2.js +6 -7
- package/package.json +3 -3
- 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 -147
- package/dist/packages/mdx-schema/dist/tripmap.js +0 -101
- package/dist/packages/mdx-schema/dist/types/index.js +0 -26
- package/dist/packages/sanitize/dist/html.js +0 -89
package/dist/core/index.js
CHANGED
|
@@ -14,8 +14,8 @@ import { buildArticleSeo as $, buildHomeSeo as ee, buildListPageSeo as re, local
|
|
|
14
14
|
import { buildArticleListItem as ie, formatArticleDate as se, resolveArticleAccessLevel as le, toIsoDate as pe } from "./view-model.js";
|
|
15
15
|
import { createKbI18n as fe, mergeTranslations as de } from "./i18n.js";
|
|
16
16
|
import * as e from "./queries.js";
|
|
17
|
-
import { prepareProps as xe } from "
|
|
18
|
-
import { componentMetadata as Ee, getComponentMetadata as Te, getComponentNames as ue } from "
|
|
17
|
+
import { prepareProps as xe } from "@blogmcp/mdx-schema/prepareProps";
|
|
18
|
+
import { componentMetadata as Ee, getComponentMetadata as Te, getComponentNames as ue } from "@blogmcp/mdx-schema/metadata";
|
|
19
19
|
import { REVIEW_PAGE_PATH as Ae, REVIEW_ROUTE_PATTERN as Ce, isReviewTokenFormat as ve } from "./review/types.js";
|
|
20
20
|
import { formatReviewForAgent as Se, formatReviewRound as Le } from "./review/format.js";
|
|
21
21
|
import { default as ke } from "./translations/cs.json.js";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { computed as n } from "vue";
|
|
2
|
-
import { galleryTileLayout as E } from "
|
|
2
|
+
import { galleryTileLayout as E } from "@blogmcp/mdx-schema/styles";
|
|
3
|
+
import { galleryTileLayout as O } from "@blogmcp/mdx-schema/styles";
|
|
3
4
|
const h = /\.(mp4|webm|mov|avi|mkv|m4v)(\?.*)?$/i, $ = /\/api\/media\/file\/([^/?#]+)/;
|
|
4
5
|
function o(e) {
|
|
5
6
|
return typeof e == "object" && e !== null && "src" in e && typeof e.src == "string";
|
|
@@ -7,22 +8,22 @@ function o(e) {
|
|
|
7
8
|
function a(e) {
|
|
8
9
|
return h.test(e);
|
|
9
10
|
}
|
|
10
|
-
const
|
|
11
|
+
const L = {
|
|
11
12
|
1: "grid-cols-1",
|
|
12
13
|
2: "grid-cols-2",
|
|
13
14
|
3: "grid-cols-3",
|
|
14
15
|
4: "grid-cols-4"
|
|
15
16
|
};
|
|
16
|
-
function
|
|
17
|
+
function b(e) {
|
|
17
18
|
const r = n(() => e.columns || 2), g = n(() => {
|
|
18
19
|
const i = r.value;
|
|
19
|
-
return
|
|
20
|
-
}), m = n(() => `gap-${e.gap || 4}`),
|
|
20
|
+
return L[i] || "grid-cols-2";
|
|
21
|
+
}), m = n(() => `gap-${e.gap || 4}`), l = n(() => E(e));
|
|
21
22
|
function s(i) {
|
|
22
23
|
const t = e.images[i];
|
|
23
24
|
return o(t) ? t.src : t;
|
|
24
25
|
}
|
|
25
|
-
function
|
|
26
|
+
function u(i) {
|
|
26
27
|
const t = e.images[i];
|
|
27
28
|
return o(t) ? t.alt || `Gallery image ${i + 1}` : `Gallery image ${i + 1}`;
|
|
28
29
|
}
|
|
@@ -48,9 +49,9 @@ function D(e) {
|
|
|
48
49
|
effectiveColumns: r,
|
|
49
50
|
gridColsClass: g,
|
|
50
51
|
gapClass: m,
|
|
51
|
-
tileLayout:
|
|
52
|
+
tileLayout: l,
|
|
52
53
|
getImageSrc: s,
|
|
53
|
-
getImageAlt:
|
|
54
|
+
getImageAlt: u,
|
|
54
55
|
getImageDescription: f,
|
|
55
56
|
getImageCaption: d,
|
|
56
57
|
isVideo: y,
|
|
@@ -60,9 +61,9 @@ function D(e) {
|
|
|
60
61
|
};
|
|
61
62
|
}
|
|
62
63
|
export {
|
|
63
|
-
|
|
64
|
-
|
|
64
|
+
O as galleryTileLayout,
|
|
65
|
+
L as gridColsClasses,
|
|
65
66
|
o as isMediaObject,
|
|
66
67
|
a as isVideoUrl,
|
|
67
|
-
|
|
68
|
+
b as useGallery
|
|
68
69
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { inject as
|
|
2
|
-
import { splitTripMapList as n, parseTripMapHandNodes as
|
|
3
|
-
import { tripMapFormatTime as
|
|
4
|
-
const
|
|
5
|
-
function
|
|
6
|
-
const a =
|
|
1
|
+
import { inject as M, computed as t } from "vue";
|
|
2
|
+
import { splitTripMapList as n, parseTripMapHandNodes as h, tripMapFacade as f, TRIPMAP_DEFAULT_HEIGHT as x, buildTripMapGeoUrl as b, tripMapPlaybackLabels as L, tripMapUiTexts as E } from "@blogmcp/mdx-schema/tripmap";
|
|
3
|
+
import { parseTripMapHandNodes as C, tripMapFormatTime as U } from "@blogmcp/mdx-schema/tripmap";
|
|
4
|
+
const H = /* @__PURE__ */ Symbol.for("blogmcp:mdx-article-context");
|
|
5
|
+
function v(e) {
|
|
6
|
+
const a = M(H, null), s = t(() => n(e.slugs)), i = t(() => n(e.exclude)), l = t(() => h(e.nodes)), c = t(() => s.value.length === 0), r = t(() => s.value.length === 0 && !a?.filename), o = t(() => f(e, a)), p = t(() => o.value.thumbs), d = t(() => o.value.stops), u = t(() => ({ height: e.height || x })), g = t(() => b(e, a)), m = t(() => L(a?.language)), T = t(() => E(a?.language));
|
|
7
7
|
return {
|
|
8
|
-
slugList:
|
|
9
|
-
excludeList:
|
|
10
|
-
handNodes:
|
|
11
|
-
facadeThumbs:
|
|
8
|
+
slugList: s,
|
|
9
|
+
excludeList: i,
|
|
10
|
+
handNodes: l,
|
|
11
|
+
facadeThumbs: p,
|
|
12
12
|
facadeStops: d,
|
|
13
|
-
heightStyle:
|
|
13
|
+
heightStyle: u,
|
|
14
14
|
articleContext: a,
|
|
15
|
-
isAutoMode:
|
|
15
|
+
isAutoMode: c,
|
|
16
16
|
isConfigOnly: r,
|
|
17
17
|
geoUrl: g,
|
|
18
18
|
labels: m,
|
|
@@ -20,8 +20,8 @@ function A(e) {
|
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
export {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
H as MDX_ARTICLE_CONTEXT_KEY,
|
|
24
|
+
C as parseHandNodes,
|
|
25
|
+
U as tripMapFormatTime,
|
|
26
|
+
v as useTripMap
|
|
27
27
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as u, computed as m, createElementBlock as e, openBlock as t, createElementVNode as o, toDisplayString as n, createCommentVNode as y, Fragment as a, createTextVNode as s } from "vue";
|
|
2
|
-
import { parseTripMapHandNodes as g } from "
|
|
2
|
+
import { parseTripMapHandNodes as g } from "@blogmcp/mdx-schema/tripmap";
|
|
3
3
|
const f = {
|
|
4
4
|
class: "flex items-center gap-3 rounded-lg border border-blue-500/40 bg-blue-500/5 px-3 py-2",
|
|
5
5
|
"data-mdx-component": "TripMap"
|
|
@@ -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,11 +1,10 @@
|
|
|
1
1
|
import { createElement as s, Fragment as f } from "react";
|
|
2
2
|
import { Marked as h } from "marked";
|
|
3
|
-
import { stripFrontmatter as y, HAS_MDX_RE as g, extractMdxComponents as b } from "
|
|
4
|
-
import { sanitizeHtml as d } from "
|
|
5
|
-
import "../_virtual/index.js";
|
|
3
|
+
import { stripFrontmatter as y, HAS_MDX_RE as g, extractMdxComponents as b } from "@blogmcp/mdx-schema/composables/parsing";
|
|
4
|
+
import { sanitizeHtml as d } from "@blogmcp/sanitize";
|
|
6
5
|
import { defaultImageHtml as k } from "../core/markdown.js";
|
|
7
|
-
import { prepareProps as v } from "
|
|
8
|
-
import { getComponentMetadata as M } from "
|
|
6
|
+
import { prepareProps as v } from "@blogmcp/mdx-schema/prepareProps";
|
|
7
|
+
import { getComponentMetadata as M } from "@blogmcp/mdx-schema/metadata";
|
|
9
8
|
function c(m) {
|
|
10
9
|
return new h({
|
|
11
10
|
renderer: {
|
|
@@ -70,7 +69,7 @@ function u(m, t, r) {
|
|
|
70
69
|
return s(l, { key: o, ...e.props }, a);
|
|
71
70
|
});
|
|
72
71
|
}
|
|
73
|
-
function
|
|
72
|
+
function N({
|
|
74
73
|
content: m,
|
|
75
74
|
components: t = {},
|
|
76
75
|
imageRenderer: r
|
|
@@ -89,6 +88,6 @@ function S({
|
|
|
89
88
|
);
|
|
90
89
|
}
|
|
91
90
|
export {
|
|
92
|
-
|
|
93
|
-
|
|
91
|
+
N as KbMdxContent,
|
|
92
|
+
N as default
|
|
94
93
|
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { defineComponent as R, withAsyncContext as k, inject as E, computed as C, createElementBlock as y, openBlock as s, Fragment as A, renderList as L, createBlock as b, resolveDynamicComponent as B, h as c } from "vue";
|
|
2
2
|
import { KB_IMAGE_RENDERER_KEY as D } from "../plugin.js";
|
|
3
3
|
import { defaultImageHtml as S, createMarkedInstance as T, parseMarkdownSafe as F } from "../../core/markdown.js";
|
|
4
|
-
import { prepareProps as I } from "
|
|
5
|
-
import { getComponentMetadata as K } from "
|
|
6
|
-
import { sanitizeHtml as P } from "
|
|
7
|
-
|
|
8
|
-
const W = { class: "mdx-content" }, X = ["innerHTML"], $ = /* @__PURE__ */ R({
|
|
4
|
+
import { prepareProps as I } from "@blogmcp/mdx-schema/prepareProps";
|
|
5
|
+
import { getComponentMetadata as K } from "@blogmcp/mdx-schema/metadata";
|
|
6
|
+
import { sanitizeHtml as P } from "@blogmcp/sanitize";
|
|
7
|
+
const W = { class: "mdx-content" }, X = ["innerHTML"], Z = /* @__PURE__ */ R({
|
|
9
8
|
__name: "KbMdxContent",
|
|
10
9
|
props: {
|
|
11
10
|
content: {}
|
|
@@ -13,7 +12,7 @@ const W = { class: "mdx-content" }, X = ["innerHTML"], $ = /* @__PURE__ */ R({
|
|
|
13
12
|
async setup(g) {
|
|
14
13
|
let r, m, a, l, i, p, d;
|
|
15
14
|
try {
|
|
16
|
-
const e = ([r, m] = k(() => import("
|
|
15
|
+
const e = ([r, m] = k(() => import("@blogmcp/mdx-schema/composables/parsing")), r = await r, m(), r);
|
|
17
16
|
a = e.stripFrontmatter, l = e.HAS_MDX_RE, i = e.extractMdxComponents;
|
|
18
17
|
const n = ([r, m] = k(() => import("../../packages/mdx-render-vue/dist/registry.js")), r = await r, m(), r);
|
|
19
18
|
p = n.getWrappedRenderComponent, d = (t) => t in n.componentRegistry;
|
|
@@ -75,5 +74,5 @@ const W = { class: "mdx-content" }, X = ["innerHTML"], $ = /* @__PURE__ */ R({
|
|
|
75
74
|
}
|
|
76
75
|
});
|
|
77
76
|
export {
|
|
78
|
-
|
|
77
|
+
Z as default
|
|
79
78
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blogmcp/sdk",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "Headless SDK for Knowledge Base blog — core client, Vue composables, Nuxt adapter",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@blogmcp/mdx-schema": "^0.6.
|
|
69
|
-
"@blogmcp/sanitize": "^0.6.
|
|
68
|
+
"@blogmcp/mdx-schema": "^0.6.1",
|
|
69
|
+
"@blogmcp/sanitize": "^0.6.1",
|
|
70
70
|
"marked": "^15.0.7"
|
|
71
71
|
},
|
|
72
72
|
"optionalDependencies": {
|
package/dist/_virtual/index.js
DELETED
package/dist/_virtual/index2.js
DELETED
package/dist/_virtual/index3.js
DELETED
package/dist/_virtual/re.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { __exports as e } from "../../../../_virtual/constants.js";
|
|
2
|
-
var t;
|
|
3
|
-
function a() {
|
|
4
|
-
return t ? e : (t = 1, Object.defineProperty(e, "__esModule", { value: !0 }), e.BLANK_URL = e.relativeFirstCharacters = e.whitespaceEscapeCharsRegex = e.urlSchemeRegex = e.ctrlCharactersRegex = e.htmlCtrlEntityRegex = e.htmlEntitiesRegex = e.invalidProtocolRegex = void 0, e.invalidProtocolRegex = /^([^\w]*)(javascript|data|vbscript)/im, e.htmlEntitiesRegex = /&#(\w+)(^\w|;)?/g, e.htmlCtrlEntityRegex = /&(newline|tab);/gi, e.ctrlCharactersRegex = /[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim, e.urlSchemeRegex = /^.+(:|:)/gim, e.whitespaceEscapeCharsRegex = /(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g, e.relativeFirstCharacters = [".", "/"], e.BLANK_URL = "about:blank", e);
|
|
5
|
-
}
|
|
6
|
-
export {
|
|
7
|
-
a as __require
|
|
8
|
-
};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { __exports as s } from "../../../../_virtual/index2.js";
|
|
2
|
-
import { __require as v } from "./constants.js";
|
|
3
|
-
var m;
|
|
4
|
-
function U() {
|
|
5
|
-
if (m) return s;
|
|
6
|
-
m = 1, Object.defineProperty(s, "__esModule", { value: !0 }), s.sanitizeUrl = p;
|
|
7
|
-
var e = v();
|
|
8
|
-
function d(r) {
|
|
9
|
-
return e.relativeFirstCharacters.indexOf(r[0]) > -1;
|
|
10
|
-
}
|
|
11
|
-
function R(r) {
|
|
12
|
-
var i = r.replace(e.ctrlCharactersRegex, "");
|
|
13
|
-
return i.replace(e.htmlEntitiesRegex, function(t, a) {
|
|
14
|
-
return String.fromCharCode(a);
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
function f(r) {
|
|
18
|
-
return URL.canParse(r);
|
|
19
|
-
}
|
|
20
|
-
function l(r) {
|
|
21
|
-
try {
|
|
22
|
-
return decodeURIComponent(r);
|
|
23
|
-
} catch {
|
|
24
|
-
return r;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
function p(r) {
|
|
28
|
-
if (!r)
|
|
29
|
-
return e.BLANK_URL;
|
|
30
|
-
var i, t = l(r.trim());
|
|
31
|
-
do
|
|
32
|
-
t = R(t).replace(e.htmlCtrlEntityRegex, "").replace(e.ctrlCharactersRegex, "").replace(e.whitespaceEscapeCharsRegex, "").trim(), t = l(t), i = t.match(e.ctrlCharactersRegex) || t.match(e.htmlEntitiesRegex) || t.match(e.htmlCtrlEntityRegex) || t.match(e.whitespaceEscapeCharsRegex);
|
|
33
|
-
while (i && i.length > 0);
|
|
34
|
-
var a = t;
|
|
35
|
-
if (!a)
|
|
36
|
-
return e.BLANK_URL;
|
|
37
|
-
if (d(a))
|
|
38
|
-
return a;
|
|
39
|
-
var h = a.trimStart(), u = h.match(e.urlSchemeRegex);
|
|
40
|
-
if (!u)
|
|
41
|
-
return a;
|
|
42
|
-
var n = u[0].toLowerCase().trim();
|
|
43
|
-
if (e.invalidProtocolRegex.test(n))
|
|
44
|
-
return e.BLANK_URL;
|
|
45
|
-
var c = h.replace(/\\/g, "/");
|
|
46
|
-
if (n === "mailto:" || n.includes("://"))
|
|
47
|
-
return c;
|
|
48
|
-
if (n === "http:" || n === "https:") {
|
|
49
|
-
if (!f(c))
|
|
50
|
-
return e.BLANK_URL;
|
|
51
|
-
var o = new URL(c);
|
|
52
|
-
return o.protocol = o.protocol.toLowerCase(), o.hostname = o.hostname.toLowerCase(), o.toString();
|
|
53
|
-
}
|
|
54
|
-
return c;
|
|
55
|
-
}
|
|
56
|
-
return s;
|
|
57
|
-
}
|
|
58
|
-
export {
|
|
59
|
-
U as __require
|
|
60
|
-
};
|