@docfuse/markdown 0.1.0 → 0.1.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.
- package/dist/{Markdown-D33gcJbF.js → Markdown-iU2W4KgV.js} +1 -1
- package/dist/client/chunks/{client-DIoaSmq2.js → client-BkvCIcoZ.js} +3 -3
- package/dist/client/chunks/{gallery-BPqV7HsS.js → gallery-q0WKbDeW.js} +2 -2
- package/dist/client/chunks/{image-BGExZy1g.js → image-_I24969q.js} +3 -3
- package/dist/client/chunks/{provider-DL6V8F7z.js → provider-SSQfNDJA.js} +24 -24
- package/dist/client/chunks/{react-runtime-ByABE9MG.js → react-runtime-Dzgdzn6D.js} +7 -7
- package/dist/client/chunks/{serialized-BvfsNeRQ.js → serialized-DajnRKXi.js} +9 -9
- package/dist/client/chunks/{table-DBiKAEbC.js → table-PQvrpt1p.js} +3 -3
- package/dist/client/index.js +1 -1
- package/dist/{directiveValidation-BdIao7Yn.js → directiveValidation-KWUIIjKw.js} +9 -9
- package/dist/index.js +1 -1
- package/dist/{prepareMarkdown-CHqN2JF5.js → prepareMarkdown-8N-OdLDS.js} +102 -102
- package/dist/server/analyze.js +2 -2
- package/dist/server.js +3 -3
- package/package.json +12 -12
|
@@ -2062,7 +2062,7 @@ function Pa(e, t) {
|
|
|
2062
2062
|
return t === void 0 ? void 0 : `${t.length}:${t}\0${e}`;
|
|
2063
2063
|
}
|
|
2064
2064
|
async function Oa(e, t, a) {
|
|
2065
|
-
const o = () => import("./prepareMarkdown-
|
|
2065
|
+
const o = () => import("./prepareMarkdown-8N-OdLDS.js").then((l) => l.b).then(({ prepareMarkdown: l }) => l(e, t)), n = Pa(e, a);
|
|
2066
2066
|
if (n === void 0) return o();
|
|
2067
2067
|
const i = H.get(n);
|
|
2068
2068
|
if (i)
|
|
@@ -260,9 +260,9 @@ const R = {
|
|
|
260
260
|
image: '[data-df-island="image"]',
|
|
261
261
|
table: '[data-df-island="table"]'
|
|
262
262
|
}, v = {
|
|
263
|
-
gallery: () => import("./gallery-
|
|
264
|
-
image: () => import("./image-
|
|
265
|
-
table: () => import("./table-
|
|
263
|
+
gallery: () => import("./gallery-q0WKbDeW.js"),
|
|
264
|
+
image: () => import("./image-_I24969q.js"),
|
|
265
|
+
table: () => import("./table-PQvrpt1p.js")
|
|
266
266
|
}, w = /* @__PURE__ */ new WeakMap(), m = /* @__PURE__ */ new WeakSet(), g = /* @__PURE__ */ new WeakSet();
|
|
267
267
|
function q(e) {
|
|
268
268
|
return [...new Set(e)].filter((t) => Object.hasOwn(v, t));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as s, j as r } from "./react-runtime-
|
|
2
|
-
import { w as l, I as n } from "./provider-
|
|
1
|
+
import { c as s, j as r } from "./react-runtime-Dzgdzn6D.js";
|
|
2
|
+
import { w as l, I as n } from "./provider-SSQfNDJA.js";
|
|
3
3
|
function i(e) {
|
|
4
4
|
try {
|
|
5
5
|
const a = JSON.parse(e.dataset.dfGalleryItems ?? "[]");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as d, j as r } from "./react-runtime-
|
|
2
|
-
import { r as s, M as o } from "./serialized-
|
|
3
|
-
import { w as l } from "./provider-
|
|
1
|
+
import { c as d, j as r } from "./react-runtime-Dzgdzn6D.js";
|
|
2
|
+
import { r as s, M as o } from "./serialized-DajnRKXi.js";
|
|
3
|
+
import { w as l } from "./provider-SSQfNDJA.js";
|
|
4
4
|
function u(i, a) {
|
|
5
5
|
const t = i.querySelector("img");
|
|
6
6
|
if (!t) return;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as l, j as i, a as K } from "./react-runtime-
|
|
1
|
+
import { r as l, j as i, a as K } from "./react-runtime-Dzgdzn6D.js";
|
|
2
2
|
const w = {
|
|
3
3
|
copyCode: "Copy code",
|
|
4
4
|
copyFailed: "Copy failed",
|
|
@@ -22,21 +22,21 @@ const w = {
|
|
|
22
22
|
galleryImage: "image"
|
|
23
23
|
};
|
|
24
24
|
/**
|
|
25
|
-
* @license lucide-react v1.
|
|
25
|
+
* @license lucide-react v1.34.0 - ISC
|
|
26
26
|
*
|
|
27
27
|
* This source code is licensed under the ISC license.
|
|
28
28
|
* See the LICENSE file in the root directory of this source tree.
|
|
29
29
|
*/
|
|
30
30
|
const P = (...e) => e.filter((o, t, r) => !!o && o.trim() !== "" && r.indexOf(o) === t).join(" ").trim();
|
|
31
31
|
/**
|
|
32
|
-
* @license lucide-react v1.
|
|
32
|
+
* @license lucide-react v1.34.0 - ISC
|
|
33
33
|
*
|
|
34
34
|
* This source code is licensed under the ISC license.
|
|
35
35
|
* See the LICENSE file in the root directory of this source tree.
|
|
36
36
|
*/
|
|
37
37
|
const q = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
38
38
|
/**
|
|
39
|
-
* @license lucide-react v1.
|
|
39
|
+
* @license lucide-react v1.34.0 - ISC
|
|
40
40
|
*
|
|
41
41
|
* This source code is licensed under the ISC license.
|
|
42
42
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -46,7 +46,7 @@ const B = (e) => e.replace(
|
|
|
46
46
|
(o, t, r) => r ? r.toUpperCase() : t.toLowerCase()
|
|
47
47
|
);
|
|
48
48
|
/**
|
|
49
|
-
* @license lucide-react v1.
|
|
49
|
+
* @license lucide-react v1.34.0 - ISC
|
|
50
50
|
*
|
|
51
51
|
* This source code is licensed under the ISC license.
|
|
52
52
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -56,7 +56,7 @@ const T = (e) => {
|
|
|
56
56
|
return o.charAt(0).toUpperCase() + o.slice(1);
|
|
57
57
|
};
|
|
58
58
|
/**
|
|
59
|
-
* @license lucide-react v1.
|
|
59
|
+
* @license lucide-react v1.34.0 - ISC
|
|
60
60
|
*
|
|
61
61
|
* This source code is licensed under the ISC license.
|
|
62
62
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -73,7 +73,7 @@ var N = {
|
|
|
73
73
|
strokeLinejoin: "round"
|
|
74
74
|
};
|
|
75
75
|
/**
|
|
76
|
-
* @license lucide-react v1.
|
|
76
|
+
* @license lucide-react v1.34.0 - ISC
|
|
77
77
|
*
|
|
78
78
|
* This source code is licensed under the ISC license.
|
|
79
79
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -113,7 +113,7 @@ const Z = (e) => {
|
|
|
113
113
|
}
|
|
114
114
|
);
|
|
115
115
|
/**
|
|
116
|
-
* @license lucide-react v1.
|
|
116
|
+
* @license lucide-react v1.34.0 - ISC
|
|
117
117
|
*
|
|
118
118
|
* This source code is licensed under the ISC license.
|
|
119
119
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -134,21 +134,21 @@ const p = (e, o) => {
|
|
|
134
134
|
return t.displayName = T(e), t;
|
|
135
135
|
};
|
|
136
136
|
/**
|
|
137
|
-
* @license lucide-react v1.
|
|
137
|
+
* @license lucide-react v1.34.0 - ISC
|
|
138
138
|
*
|
|
139
139
|
* This source code is licensed under the ISC license.
|
|
140
140
|
* See the LICENSE file in the root directory of this source tree.
|
|
141
141
|
*/
|
|
142
142
|
const Q = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], ee = p("chevron-left", Q);
|
|
143
143
|
/**
|
|
144
|
-
* @license lucide-react v1.
|
|
144
|
+
* @license lucide-react v1.34.0 - ISC
|
|
145
145
|
*
|
|
146
146
|
* This source code is licensed under the ISC license.
|
|
147
147
|
* See the LICENSE file in the root directory of this source tree.
|
|
148
148
|
*/
|
|
149
149
|
const te = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], oe = p("chevron-right", te);
|
|
150
150
|
/**
|
|
151
|
-
* @license lucide-react v1.
|
|
151
|
+
* @license lucide-react v1.34.0 - ISC
|
|
152
152
|
*
|
|
153
153
|
* This source code is licensed under the ISC license.
|
|
154
154
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -158,7 +158,7 @@ const re = [
|
|
|
158
158
|
["path", { d: "m7 9 5-5 5 5", key: "sgt6xg" }]
|
|
159
159
|
], ne = p("chevrons-up-down", re);
|
|
160
160
|
/**
|
|
161
|
-
* @license lucide-react v1.
|
|
161
|
+
* @license lucide-react v1.34.0 - ISC
|
|
162
162
|
*
|
|
163
163
|
* This source code is licensed under the ISC license.
|
|
164
164
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -169,7 +169,7 @@ const ae = [
|
|
|
169
169
|
["path", { d: "m14.5 4-5 16", key: "e7oirm" }]
|
|
170
170
|
], se = p("code-xml", ae);
|
|
171
171
|
/**
|
|
172
|
-
* @license lucide-react v1.
|
|
172
|
+
* @license lucide-react v1.34.0 - ISC
|
|
173
173
|
*
|
|
174
174
|
* This source code is licensed under the ISC license.
|
|
175
175
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -179,7 +179,7 @@ const ie = [
|
|
|
179
179
|
["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
|
|
180
180
|
], le = p("copy", ie);
|
|
181
181
|
/**
|
|
182
|
-
* @license lucide-react v1.
|
|
182
|
+
* @license lucide-react v1.34.0 - ISC
|
|
183
183
|
*
|
|
184
184
|
* This source code is licensed under the ISC license.
|
|
185
185
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -190,7 +190,7 @@ const ce = [
|
|
|
190
190
|
["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
|
|
191
191
|
], de = p("download", ce);
|
|
192
192
|
/**
|
|
193
|
-
* @license lucide-react v1.
|
|
193
|
+
* @license lucide-react v1.34.0 - ISC
|
|
194
194
|
*
|
|
195
195
|
* This source code is licensed under the ISC license.
|
|
196
196
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -209,7 +209,7 @@ const pe = [
|
|
|
209
209
|
["path", { d: "M16 17H8", key: "z1uh3a" }]
|
|
210
210
|
], fe = p("file-text", pe);
|
|
211
211
|
/**
|
|
212
|
-
* @license lucide-react v1.
|
|
212
|
+
* @license lucide-react v1.34.0 - ISC
|
|
213
213
|
*
|
|
214
214
|
* This source code is licensed under the ISC license.
|
|
215
215
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -224,7 +224,7 @@ const ue = [
|
|
|
224
224
|
]
|
|
225
225
|
], he = p("folder", ue);
|
|
226
226
|
/**
|
|
227
|
-
* @license lucide-react v1.
|
|
227
|
+
* @license lucide-react v1.34.0 - ISC
|
|
228
228
|
*
|
|
229
229
|
* This source code is licensed under the ISC license.
|
|
230
230
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -235,7 +235,7 @@ const ge = [
|
|
|
235
235
|
["line", { x1: "8", x2: "16", y1: "12", y2: "12", key: "1jonct" }]
|
|
236
236
|
], ye = p("link-2", ge);
|
|
237
237
|
/**
|
|
238
|
-
* @license lucide-react v1.
|
|
238
|
+
* @license lucide-react v1.34.0 - ISC
|
|
239
239
|
*
|
|
240
240
|
* This source code is licensed under the ISC license.
|
|
241
241
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -247,14 +247,14 @@ const me = [
|
|
|
247
247
|
["path", { d: "M9 21H3v-6", key: "wtvkvv" }]
|
|
248
248
|
], be = p("maximize-2", me);
|
|
249
249
|
/**
|
|
250
|
-
* @license lucide-react v1.
|
|
250
|
+
* @license lucide-react v1.34.0 - ISC
|
|
251
251
|
*
|
|
252
252
|
* This source code is licensed under the ISC license.
|
|
253
253
|
* See the LICENSE file in the root directory of this source tree.
|
|
254
254
|
*/
|
|
255
255
|
const xe = [["path", { d: "M5 12h14", key: "1ays0h" }]], we = p("minus", xe);
|
|
256
256
|
/**
|
|
257
|
-
* @license lucide-react v1.
|
|
257
|
+
* @license lucide-react v1.34.0 - ISC
|
|
258
258
|
*
|
|
259
259
|
* This source code is licensed under the ISC license.
|
|
260
260
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -264,7 +264,7 @@ const ke = [
|
|
|
264
264
|
["path", { d: "M12 5v14", key: "s699le" }]
|
|
265
265
|
], Ce = p("plus", ke);
|
|
266
266
|
/**
|
|
267
|
-
* @license lucide-react v1.
|
|
267
|
+
* @license lucide-react v1.34.0 - ISC
|
|
268
268
|
*
|
|
269
269
|
* This source code is licensed under the ISC license.
|
|
270
270
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -274,7 +274,7 @@ const ve = [
|
|
|
274
274
|
["path", { d: "M3 3v5h5", key: "1xhq8a" }]
|
|
275
275
|
], Se = p("rotate-ccw", ve);
|
|
276
276
|
/**
|
|
277
|
-
* @license lucide-react v1.
|
|
277
|
+
* @license lucide-react v1.34.0 - ISC
|
|
278
278
|
*
|
|
279
279
|
* This source code is licensed under the ISC license.
|
|
280
280
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -289,7 +289,7 @@ const Me = [
|
|
|
289
289
|
]
|
|
290
290
|
], je = p("table-2", Me);
|
|
291
291
|
/**
|
|
292
|
-
* @license lucide-react v1.
|
|
292
|
+
* @license lucide-react v1.34.0 - ISC
|
|
293
293
|
*
|
|
294
294
|
* This source code is licensed under the ISC license.
|
|
295
295
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -300,7 +300,7 @@ const Ie = [
|
|
|
300
300
|
["rect", { width: "8", height: "8", x: "13", y: "13", rx: "2", key: "1cgmvn" }]
|
|
301
301
|
], Ne = p("workflow", Ie);
|
|
302
302
|
/**
|
|
303
|
-
* @license lucide-react v1.
|
|
303
|
+
* @license lucide-react v1.34.0 - ISC
|
|
304
304
|
*
|
|
305
305
|
* This source code is licensed under the ISC license.
|
|
306
306
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -638,7 +638,7 @@ function $d() {
|
|
|
638
638
|
);
|
|
639
639
|
}, C.useTransition = function() {
|
|
640
640
|
return x.H.useTransition();
|
|
641
|
-
}, C.version = "19.2.
|
|
641
|
+
}, C.version = "19.2.8", C;
|
|
642
642
|
}
|
|
643
643
|
var o1;
|
|
644
644
|
function vi() {
|
|
@@ -785,7 +785,7 @@ function Fd() {
|
|
|
785
785
|
return Ol.H.useFormState(N, A, W);
|
|
786
786
|
}, pl.useFormStatus = function() {
|
|
787
787
|
return Ol.H.useHostTransitionStatus();
|
|
788
|
-
}, pl.version = "19.2.
|
|
788
|
+
}, pl.version = "19.2.8", pl;
|
|
789
789
|
}
|
|
790
790
|
var b1;
|
|
791
791
|
function E1() {
|
|
@@ -10480,12 +10480,12 @@ Error generating stack: ` + a.message + `
|
|
|
10480
10480
|
}
|
|
10481
10481
|
};
|
|
10482
10482
|
var y1 = _l.version;
|
|
10483
|
-
if (y1 !== "19.2.
|
|
10483
|
+
if (y1 !== "19.2.8")
|
|
10484
10484
|
throw Error(
|
|
10485
10485
|
S(
|
|
10486
10486
|
527,
|
|
10487
10487
|
y1,
|
|
10488
|
-
"19.2.
|
|
10488
|
+
"19.2.8"
|
|
10489
10489
|
)
|
|
10490
10490
|
);
|
|
10491
10491
|
_.findDOMNode = function(l) {
|
|
@@ -10496,10 +10496,10 @@ Error generating stack: ` + a.message + `
|
|
|
10496
10496
|
};
|
|
10497
10497
|
var xd = {
|
|
10498
10498
|
bundleType: 0,
|
|
10499
|
-
version: "19.2.
|
|
10499
|
+
version: "19.2.8",
|
|
10500
10500
|
rendererPackageName: "react-dom",
|
|
10501
10501
|
currentDispatcherRef: b,
|
|
10502
|
-
reconcilerVersion: "19.2.
|
|
10502
|
+
reconcilerVersion: "19.2.8"
|
|
10503
10503
|
};
|
|
10504
10504
|
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u") {
|
|
10505
10505
|
var Gn = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
|
@@ -10545,7 +10545,7 @@ Error generating stack: ` + a.message + `
|
|
|
10545
10545
|
c,
|
|
10546
10546
|
v1
|
|
10547
10547
|
), t.context = Py(null), u = t.current, a = et(), a = Kn(a), e = uu(a), e.callback = null, au(u, e, a), u = a, t.current.lanes = u, Ua(t, u), Dt(t), l[ju] = t.current, Gc(l), new Bn(t);
|
|
10548
|
-
}, be.version = "19.2.
|
|
10548
|
+
}, be.version = "19.2.8", be;
|
|
10549
10549
|
}
|
|
10550
10550
|
var T1;
|
|
10551
10551
|
function Id() {
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { r as c, j as s, g as qn } from "./react-runtime-
|
|
2
|
-
import { c as re, u as Xn, t as Gn, g as Cn, a as Jn, e as V, s as h, D as T, b as wn, m as G, d as Q, M as En, f as W, r as X, h as ne, i as we, j as Yn, I as Le, k as Zn, l as De } from "./provider-
|
|
3
|
-
import { c as jn } from "./client-
|
|
1
|
+
import { r as c, j as s, g as qn } from "./react-runtime-Dzgdzn6D.js";
|
|
2
|
+
import { c as re, u as Xn, t as Gn, g as Cn, a as Jn, e as V, s as h, D as T, b as wn, m as G, d as Q, M as En, f as W, r as X, h as ne, i as we, j as Yn, I as Le, k as Zn, l as De } from "./provider-SSQfNDJA.js";
|
|
3
|
+
import { c as jn } from "./client-BkvCIcoZ.js";
|
|
4
4
|
/**
|
|
5
|
-
* @license lucide-react v1.
|
|
5
|
+
* @license lucide-react v1.34.0 - ISC
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the ISC license.
|
|
8
8
|
* See the LICENSE file in the root directory of this source tree.
|
|
9
9
|
*/
|
|
10
10
|
const Qn = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], et = re("check", Qn);
|
|
11
11
|
/**
|
|
12
|
-
* @license lucide-react v1.
|
|
12
|
+
* @license lucide-react v1.34.0 - ISC
|
|
13
13
|
*
|
|
14
14
|
* This source code is licensed under the ISC license.
|
|
15
15
|
* See the LICENSE file in the root directory of this source tree.
|
|
16
16
|
*/
|
|
17
17
|
const nt = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], tt = re("chevron-down", nt);
|
|
18
18
|
/**
|
|
19
|
-
* @license lucide-react v1.
|
|
19
|
+
* @license lucide-react v1.34.0 - ISC
|
|
20
20
|
*
|
|
21
21
|
* This source code is licensed under the ISC license.
|
|
22
22
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -27,7 +27,7 @@ const at = [
|
|
|
27
27
|
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
28
28
|
], lt = re("circle-alert", at);
|
|
29
29
|
/**
|
|
30
|
-
* @license lucide-react v1.
|
|
30
|
+
* @license lucide-react v1.34.0 - ISC
|
|
31
31
|
*
|
|
32
32
|
* This source code is licensed under the ISC license.
|
|
33
33
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -37,7 +37,7 @@ const ot = [
|
|
|
37
37
|
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
38
38
|
], rt = re("circle-check", ot);
|
|
39
39
|
/**
|
|
40
|
-
* @license lucide-react v1.
|
|
40
|
+
* @license lucide-react v1.34.0 - ISC
|
|
41
41
|
*
|
|
42
42
|
* This source code is licensed under the ISC license.
|
|
43
43
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -48,7 +48,7 @@ const it = [
|
|
|
48
48
|
["path", { d: "M12 8h.01", key: "e9boi3" }]
|
|
49
49
|
], st = re("info", it);
|
|
50
50
|
/**
|
|
51
|
-
* @license lucide-react v1.
|
|
51
|
+
* @license lucide-react v1.34.0 - ISC
|
|
52
52
|
*
|
|
53
53
|
* This source code is licensed under the ISC license.
|
|
54
54
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as l, j as d } from "./react-runtime-
|
|
2
|
-
import { a as t, b as s } from "./serialized-
|
|
3
|
-
import { w as b } from "./provider-
|
|
1
|
+
import { c as l, j as d } from "./react-runtime-Dzgdzn6D.js";
|
|
2
|
+
import { a as t, b as s } from "./serialized-DajnRKXi.js";
|
|
3
|
+
import { w as b } from "./provider-SSQfNDJA.js";
|
|
4
4
|
function n(a, e) {
|
|
5
5
|
return l.hydrateRoot(
|
|
6
6
|
a,
|
package/dist/client/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as z, s as P, e as _, f as j } from "./plugins-DQ-VUuCT.js";
|
|
2
2
|
import { visit as S } from "unist-util-visit";
|
|
3
3
|
function C(t, a, e) {
|
|
4
4
|
const i = t.find((s) => s.id === a.id);
|
|
@@ -45,7 +45,7 @@ function de() {
|
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
47
|
function fe(t, a = [], e = "markdown") {
|
|
48
|
-
const i =
|
|
48
|
+
const i = z(a, { source: t, mode: e }), s = /<(?:Markdown)?Gallery\b/i.test(t), n = /:::\s*(?:tabs|code-group)\b|<(?:Markdown)?(?:Tabs|CodeGroup)\b/i.test(t), r = /<(?:Markdown)?FileTree\b/i.test(t), p = /<(?:Markdown)?Details\b/i.test(t), o = /^ {0,3}(?:\|[^\r\n]*\||[^\r\n|]+\|[^\r\n]*)\r?\n {0,3}\|? *:?-+:? *(?:\| *:?-+:? *)+\|? *$/m, c = [];
|
|
49
49
|
return s && c.push("gallery"), n && c.push("tabs"), p && c.push("details"), r && c.push("file-tree"), /<(?:Markdown)?(?:Terminal)\b|(?:`{3,}|~{3,})\s*terminal\b/i.test(t) && c.push("terminal-toolbar"), /<(?:Markdown)?Image\b|!\[[^\]]*\]\([^)]*\)/i.test(t) && c.push("image"), /(?:^|\n)\s*#{2,6}\s+\S/.test(t) && c.push("heading"), /<(?:Markdown)?CodeBlock\b|(?:^|\n)\s*(?:`{3,}|~{3,})(?!\s*terminal\b)/i.test(t) && c.push("code-toolbar"), /<(?:Markdown)?CopySnippet\b|data-df-component=["']copy-snippet["']/i.test(t) && c.push("copy-snippet"), (/<(?:Markdown)?Table\b/i.test(t) || o.test(t)) && c.push("table"), {
|
|
50
50
|
behaviors: [...new Set(c)],
|
|
51
51
|
math: i.some((d) => d.assets?.math),
|
|
@@ -171,7 +171,7 @@ const me = () => (t) => {
|
|
|
171
171
|
src: f(e, "src"),
|
|
172
172
|
title: n,
|
|
173
173
|
loading: f(e, "loading") || "lazy",
|
|
174
|
-
sandbox: f(e, "sandbox"),
|
|
174
|
+
sandbox: f(e, "sandbox").split(/\s+/).filter(Boolean),
|
|
175
175
|
referrerPolicy: f(e, "referrerpolicy") || "no-referrer",
|
|
176
176
|
dataDfElement: "embed",
|
|
177
177
|
...f(e, "allow") ? { allow: f(e, "allow") } : {},
|
|
@@ -254,7 +254,7 @@ function Y(t, a) {
|
|
|
254
254
|
className: [.../* @__PURE__ */ new Set([...Q(t), a])]
|
|
255
255
|
};
|
|
256
256
|
}
|
|
257
|
-
function
|
|
257
|
+
function B(t) {
|
|
258
258
|
if (t.tagName === "ul")
|
|
259
259
|
for (const a of t.children) {
|
|
260
260
|
if (a.type !== "element" || a.tagName !== "li") continue;
|
|
@@ -264,7 +264,7 @@ function V(t) {
|
|
|
264
264
|
type: "root",
|
|
265
265
|
children: a.children.filter((s) => s !== e)
|
|
266
266
|
}).trim();
|
|
267
|
-
e ? (
|
|
267
|
+
e ? (B(e), a.properties = { ...a.properties, dataDfFileTreeBranch: "" }, a.children = [
|
|
268
268
|
g("button", { type: "button", ariaExpanded: "true" }, [
|
|
269
269
|
{ type: "text", value: i.replace(/\/$/, "") }
|
|
270
270
|
]),
|
|
@@ -276,7 +276,7 @@ function ee(t) {
|
|
|
276
276
|
const a = t.children.find(
|
|
277
277
|
(e) => e.type === "element" && e.tagName === "ul"
|
|
278
278
|
);
|
|
279
|
-
a &&
|
|
279
|
+
a && B(a);
|
|
280
280
|
}
|
|
281
281
|
function te(t) {
|
|
282
282
|
t.children = t.children.flatMap((a) => {
|
|
@@ -574,11 +574,11 @@ const Te = () => (t) => {
|
|
|
574
574
|
function oe(t) {
|
|
575
575
|
return "children" in t && Array.isArray(t.children);
|
|
576
576
|
}
|
|
577
|
-
function
|
|
578
|
-
return "value" in t && typeof t.value == "string" ? t.value : oe(t) ? t.children.map(
|
|
577
|
+
function V(t) {
|
|
578
|
+
return "value" in t && typeof t.value == "string" ? t.value : oe(t) ? t.children.map(V).join("") : "";
|
|
579
579
|
}
|
|
580
580
|
function w(t) {
|
|
581
|
-
return t.children.map((a) =>
|
|
581
|
+
return t.children.map((a) => V(a)).join("").trim();
|
|
582
582
|
}
|
|
583
583
|
function b(t, a) {
|
|
584
584
|
const e = t.attributes?.[a];
|
package/dist/index.js
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { unified as
|
|
4
|
-
import
|
|
5
|
-
import { remarkDefinitionList as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
1
|
+
import I from "remark-parse";
|
|
2
|
+
import M from "remark-rehype";
|
|
3
|
+
import { unified as j } from "unified";
|
|
4
|
+
import z from "rehype-slug";
|
|
5
|
+
import { remarkDefinitionList as G, defListHastHandlers as H } from "remark-definition-list";
|
|
6
|
+
import _ from "remark-directive";
|
|
7
|
+
import O from "remark-gfm";
|
|
8
8
|
import { visit as h, SKIP as v } from "unist-util-visit";
|
|
9
|
-
import { r as
|
|
10
|
-
import { D as
|
|
11
|
-
import { n as
|
|
12
|
-
import
|
|
13
|
-
import { transformerMetaHighlight as
|
|
14
|
-
import { createHighlighterCore as
|
|
15
|
-
import { createJavaScriptRegexEngine as
|
|
16
|
-
import { bundledThemes as
|
|
17
|
-
const
|
|
18
|
-
$schema:
|
|
19
|
-
name:
|
|
20
|
-
displayName:
|
|
21
|
-
type:
|
|
22
|
-
semanticHighlighting:
|
|
23
|
-
colors:
|
|
24
|
-
tokenColors:
|
|
25
|
-
},
|
|
26
|
-
$schema:
|
|
27
|
-
name:
|
|
28
|
-
displayName:
|
|
29
|
-
type:
|
|
30
|
-
semanticHighlighting:
|
|
31
|
-
colors:
|
|
32
|
-
tokenColors:
|
|
9
|
+
import { r as R, b as q, e as U, f as W, g as J, h as K, i as X, j as Z, k as V, l as Y, n as Q, a as ee } from "./directiveValidation-KWUIIjKw.js";
|
|
10
|
+
import { D as te, s as re } from "./Markdown-iU2W4KgV.js";
|
|
11
|
+
import { n as ae, m as ne, s as N, a as oe, b as ie } from "./plugins-DQ-VUuCT.js";
|
|
12
|
+
import se from "@shikijs/rehype/core";
|
|
13
|
+
import { transformerMetaHighlight as le, transformerNotationHighlight as ce, transformerNotationDiff as pe, transformerNotationFocus as me, transformerNotationWordHighlight as ue, transformerNotationErrorLevel as fe } from "@shikijs/transformers";
|
|
14
|
+
import { createHighlighterCore as de } from "shiki/core";
|
|
15
|
+
import { createJavaScriptRegexEngine as ge } from "shiki/engine/javascript";
|
|
16
|
+
import { bundledThemes as he } from "shiki/themes";
|
|
17
|
+
const ye = "vscode://schemas/color-theme", ke = "docfuse-dark", be = "Docfuse Dark", ve = "dark", we = !0, De = { "editor.background": "#020610", "editor.foreground": "#E6EBF2" }, Le = [{ scope: ["comment", "punctuation.definition.comment", "string.comment"], settings: { foreground: "#91A0B2", fontStyle: "italic" } }, { scope: ["keyword", "storage", "storage.type", "storage.modifier", "keyword.control", "keyword.other"], settings: { foreground: "#C6B5FF" } }, { scope: ["string", "string.quoted", "punctuation.definition.string"], settings: { foreground: "#9FD3A7" } }, { scope: ["constant.numeric", "constant.language.boolean", "constant.language.null", "constant.language.undefined"], settings: { foreground: "#F3D18A" } }, { scope: ["entity.name.function", "support.function", "variable.function", "meta.function-call"], settings: { foreground: "#9EC7F3" } }, { scope: ["entity.name.type", "entity.name.class", "support.type", "support.class", "entity.other.inherited-class"], settings: { foreground: "#8ED1CC" } }, { scope: ["variable", "variable.other", "variable.parameter", "meta.definition.variable.name"], settings: { foreground: "#E6EBF2" } }, { scope: ["variable.other.property", "support.variable.property", "meta.property-name", "meta.object-literal.key"], settings: { foreground: "#E3AFD2" } }, { scope: ["entity.name.tag", "meta.tag.sgml", "punctuation.definition.tag"], settings: { foreground: "#F0A89E" } }, { scope: ["entity.other.attribute-name"], settings: { foreground: "#F3D18A" } }, { scope: ["string.regexp", "source.regexp", "constant.other.character-class.regexp"], settings: { foreground: "#F0A89E" } }, { scope: ["keyword.operator", "punctuation", "meta.brace", "meta.delimiter"], settings: { foreground: "#AAB5C3" } }, { scope: ["markup.inserted", "punctuation.definition.inserted"], settings: { foreground: "#9FD3A7" } }, { scope: ["markup.deleted", "punctuation.definition.deleted", "invalid", "message.error"], settings: { foreground: "#F0A89E" } }, { scope: ["markup.heading", "markup.heading entity.name"], settings: { foreground: "#9EC7F3", fontStyle: "bold" } }, { scope: ["markup.bold"], settings: { foreground: "#E6EBF2", fontStyle: "bold" } }, { scope: ["markup.italic"], settings: { foreground: "#E6EBF2", fontStyle: "italic" } }], Ce = {
|
|
18
|
+
$schema: ye,
|
|
19
|
+
name: ke,
|
|
20
|
+
displayName: be,
|
|
21
|
+
type: ve,
|
|
22
|
+
semanticHighlighting: we,
|
|
23
|
+
colors: De,
|
|
24
|
+
tokenColors: Le
|
|
25
|
+
}, Ne = "vscode://schemas/color-theme", Se = "docfuse-light", xe = "Docfuse Light", Fe = "light", Be = !0, Ae = { "editor.background": "#F0F2F5", "editor.foreground": "#344054" }, Te = [{ scope: ["comment", "punctuation.definition.comment", "string.comment"], settings: { foreground: "#98A2B3", fontStyle: "italic" } }, { scope: ["keyword", "storage", "storage.type", "storage.modifier", "keyword.control", "keyword.other"], settings: { foreground: "#7C6BC4" } }, { scope: ["string", "string.quoted", "punctuation.definition.string"], settings: { foreground: "#3D9A48" } }, { scope: ["constant.numeric", "constant.language.boolean", "constant.language.null", "constant.language.undefined"], settings: { foreground: "#C47A2A" } }, { scope: ["entity.name.function", "support.function", "variable.function", "meta.function-call"], settings: { foreground: "#4B8DF5" } }, { scope: ["entity.name.type", "entity.name.class", "support.type", "support.class", "entity.other.inherited-class"], settings: { foreground: "#2E8B8B" } }, { scope: ["variable", "variable.other", "variable.parameter", "meta.definition.variable.name"], settings: { foreground: "#344054" } }, { scope: ["variable.other.property", "support.variable.property", "meta.property-name", "meta.object-literal.key"], settings: { foreground: "#B05A9A" } }, { scope: ["entity.name.tag", "meta.tag.sgml", "punctuation.definition.tag"], settings: { foreground: "#DC5647" } }, { scope: ["entity.other.attribute-name"], settings: { foreground: "#C47A2A" } }, { scope: ["string.regexp", "source.regexp", "constant.other.character-class.regexp"], settings: { foreground: "#DC5647" } }, { scope: ["keyword.operator", "punctuation", "meta.brace", "meta.delimiter"], settings: { foreground: "#667085" } }, { scope: ["markup.inserted", "punctuation.definition.inserted"], settings: { foreground: "#3D9A48" } }, { scope: ["markup.deleted", "punctuation.definition.deleted", "invalid", "message.error"], settings: { foreground: "#DC5647" } }, { scope: ["markup.heading", "markup.heading entity.name"], settings: { foreground: "#4B8DF5", fontStyle: "bold" } }, { scope: ["markup.bold"], settings: { foreground: "#344054", fontStyle: "bold" } }, { scope: ["markup.italic"], settings: { foreground: "#344054", fontStyle: "italic" } }], Pe = {
|
|
26
|
+
$schema: Ne,
|
|
27
|
+
name: Se,
|
|
28
|
+
displayName: xe,
|
|
29
|
+
type: Fe,
|
|
30
|
+
semanticHighlighting: Be,
|
|
31
|
+
colors: Ae,
|
|
32
|
+
tokenColors: Te
|
|
33
33
|
}, S = {
|
|
34
|
-
light:
|
|
35
|
-
dark:
|
|
34
|
+
light: Pe,
|
|
35
|
+
dark: Ce
|
|
36
36
|
};
|
|
37
|
-
function
|
|
37
|
+
function Ee(t) {
|
|
38
38
|
if (!t) return {};
|
|
39
39
|
const e = Object.entries(t);
|
|
40
40
|
return e.every(
|
|
@@ -43,7 +43,7 @@ function Pe(t) {
|
|
|
43
43
|
e.map(([a, n]) => [a.trim().toLowerCase(), n]).filter(([a]) => a.length > 0)
|
|
44
44
|
);
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function $e(t = {}) {
|
|
47
47
|
return {
|
|
48
48
|
htmlPolicy: t.html ?? "strip",
|
|
49
49
|
codeThemes: {
|
|
@@ -51,7 +51,7 @@ function Ee(t = {}) {
|
|
|
51
51
|
dark: t.code?.themes?.dark ?? S.dark
|
|
52
52
|
},
|
|
53
53
|
fallbackLanguage: t.code?.fallbackLanguage?.trim().toLowerCase() || "text",
|
|
54
|
-
codeLanguages:
|
|
54
|
+
codeLanguages: Ee(t.code?.languages),
|
|
55
55
|
unknownLanguage: t.code?.unknownLanguage ?? "warn",
|
|
56
56
|
features: {
|
|
57
57
|
callouts: t.features?.callouts !== !1,
|
|
@@ -64,23 +64,23 @@ function Ee(t = {}) {
|
|
|
64
64
|
codeBlocks: t.features?.codeBlocks !== !1
|
|
65
65
|
},
|
|
66
66
|
labels: {
|
|
67
|
-
...
|
|
67
|
+
...te,
|
|
68
68
|
...t.labels
|
|
69
69
|
},
|
|
70
|
-
plugins:
|
|
70
|
+
plugins: ae(t.plugins)
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function Ie(t) {
|
|
74
74
|
return String(t ?? "").replace(/^Markdown/, "").toLowerCase();
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function A(t, e) {
|
|
77
77
|
if (!t || typeof t != "object" || !("properties" in t)) return !1;
|
|
78
78
|
const r = t.properties;
|
|
79
79
|
return r?.dataDfComponent === e || r?.["data-df-component"] === e;
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function Me(t, e) {
|
|
82
82
|
if (t.type !== "mdxJsxFlowElement" && t.type !== "mdxJsxTextElement") return !1;
|
|
83
|
-
const r =
|
|
83
|
+
const r = Ie(t.name);
|
|
84
84
|
if (r === "terminal")
|
|
85
85
|
return e.markBehavior("terminal-toolbar"), !0;
|
|
86
86
|
if (r === "gallery") e.markBehavior("gallery");
|
|
@@ -92,11 +92,11 @@ function Ie(t, e) {
|
|
|
92
92
|
else return !1;
|
|
93
93
|
return !0;
|
|
94
94
|
}
|
|
95
|
-
const
|
|
95
|
+
const je = (t) => (e) => {
|
|
96
96
|
h(e, (r) => {
|
|
97
|
-
|
|
97
|
+
Me(r, t);
|
|
98
98
|
});
|
|
99
|
-
},
|
|
99
|
+
}, ze = (t) => (e) => {
|
|
100
100
|
h(e, "code", (r) => {
|
|
101
101
|
const a = String(r.lang ?? "").toLowerCase(), n = String(r.meta ?? ""), o = n.match(/(?:title|filename|label)\s*=\s*["']([^"']+)["']|\[([^\]]+)\]/i), l = o?.[1]?.trim() || o?.[2]?.trim(), i = t.features.terminals && a === "terminal";
|
|
102
102
|
!n && !l && !i || (r.data = {
|
|
@@ -109,7 +109,7 @@ const Me = (t) => (e) => {
|
|
|
109
109
|
}
|
|
110
110
|
});
|
|
111
111
|
});
|
|
112
|
-
},
|
|
112
|
+
}, Ge = () => (t) => {
|
|
113
113
|
h(t, "element", (e) => {
|
|
114
114
|
if (e.tagName !== "pre") return;
|
|
115
115
|
const r = e.children.find(
|
|
@@ -120,45 +120,45 @@ const Me = (t) => (e) => {
|
|
|
120
120
|
a && (e.properties = { ...e.properties, dataDfFilename: a });
|
|
121
121
|
});
|
|
122
122
|
};
|
|
123
|
-
function
|
|
123
|
+
function T(t, e = {}, r = []) {
|
|
124
124
|
return { type: "element", tagName: t, properties: e, children: r };
|
|
125
125
|
}
|
|
126
126
|
function L(t) {
|
|
127
127
|
return t ? t.type === "text" ? t.value : "children" in t ? t.children.map((e) => L(e)).join("") : "" : "";
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function He(t) {
|
|
130
130
|
const e = t?.properties?.className ?? t?.properties?.class;
|
|
131
131
|
return Array.isArray(e) ? e.map(String) : typeof e == "string" ? e.split(/\s+/) : [];
|
|
132
132
|
}
|
|
133
|
-
function
|
|
133
|
+
function P(t) {
|
|
134
134
|
return t ? t.children.filter(
|
|
135
|
-
(e) => e.type === "element" && e.tagName === "span" &&
|
|
135
|
+
(e) => e.type === "element" && e.tagName === "span" && He(e).includes("line")
|
|
136
136
|
) : [];
|
|
137
137
|
}
|
|
138
|
-
function
|
|
139
|
-
const r =
|
|
138
|
+
function _e(t, e) {
|
|
139
|
+
const r = P(t);
|
|
140
140
|
return r.length > 0 ? r.map((a) => L(a)).join(`
|
|
141
141
|
`) : L(t ?? e).replace(/\n$/, "");
|
|
142
142
|
}
|
|
143
|
-
function
|
|
144
|
-
!t ||
|
|
145
|
-
`).map((r) =>
|
|
143
|
+
function Oe(t, e) {
|
|
144
|
+
!t || P(t).length > 0 || (t.children = e.split(`
|
|
145
|
+
`).map((r) => T("span", { className: ["line"] }, r ? [{ type: "text", value: r }] : [])));
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function E(t) {
|
|
148
148
|
const e = t?.properties.className ?? t?.properties.class, a = (Array.isArray(e) ? e : typeof e == "string" ? e.split(/\s+/) : []).find(
|
|
149
149
|
(n) => typeof n == "string" && n.startsWith("language-")
|
|
150
150
|
);
|
|
151
151
|
return typeof a == "string" ? a.slice(9).toLowerCase() : "";
|
|
152
152
|
}
|
|
153
|
-
const
|
|
153
|
+
const Re = (t, e) => (r) => {
|
|
154
154
|
h(r, "element", (a, n, o) => {
|
|
155
|
-
if (a.tagName !== "pre" || !o || n === void 0 ||
|
|
155
|
+
if (a.tagName !== "pre" || !o || n === void 0 || A(o, "code-block"))
|
|
156
156
|
return;
|
|
157
157
|
const l = a.children.find(
|
|
158
158
|
(s) => s.type === "element" && s.tagName === "code"
|
|
159
|
-
), i =
|
|
159
|
+
), i = E(l), c = L(l).replace(/\n$/, "");
|
|
160
160
|
if (e.features.terminals && i === "terminal")
|
|
161
|
-
return t.markBehavior("terminal-toolbar"), o.children[n] =
|
|
161
|
+
return t.markBehavior("terminal-toolbar"), o.children[n] = T("div", {
|
|
162
162
|
className: ["df-terminal"],
|
|
163
163
|
dataDfComponent: "terminal",
|
|
164
164
|
dataDfBehavior: "terminal-toolbar",
|
|
@@ -173,7 +173,7 @@ const Oe = (t, e) => (r) => {
|
|
|
173
173
|
function D(t, e) {
|
|
174
174
|
return { type: "mdxJsxAttribute", name: t, value: e };
|
|
175
175
|
}
|
|
176
|
-
const
|
|
176
|
+
const qe = (t, e) => (r) => {
|
|
177
177
|
h(r, "code", (a, n, o) => {
|
|
178
178
|
if (!o || n === void 0) return;
|
|
179
179
|
const l = String(a.lang ?? "").toLowerCase(), i = String(a.value ?? ""), s = String(a.meta ?? "").match(/(?:title|label)\s*=\s*["']([^"']+)["']/i);
|
|
@@ -190,19 +190,19 @@ const Re = (t, e) => (r) => {
|
|
|
190
190
|
children: []
|
|
191
191
|
}, [v, n]) : void 0;
|
|
192
192
|
});
|
|
193
|
-
},
|
|
193
|
+
}, Ue = (t, e, r = /* @__PURE__ */ new Set()) => (a) => {
|
|
194
194
|
h(a, "element", (n, o, l) => {
|
|
195
|
-
if (n.tagName !== "pre" || !l || o === void 0 ||
|
|
195
|
+
if (n.tagName !== "pre" || !l || o === void 0 || A(l, "code-block"))
|
|
196
196
|
return;
|
|
197
197
|
t.markBehavior("code-toolbar"), n.properties = { ...n.properties, dataDfSlot: "content" };
|
|
198
198
|
const i = n.children.find(
|
|
199
199
|
(b) => b.type === "element" && b.tagName === "code"
|
|
200
|
-
), c =
|
|
200
|
+
), c = E(i);
|
|
201
201
|
if (c && r.has(c)) return;
|
|
202
202
|
const s = i?.properties?.className ?? i?.properties?.class, u = (Array.isArray(s) ? s : typeof s == "string" ? s.split(/\s+/) : []).find((b) => typeof b == "string" && b.startsWith("language-")), m = u ? u.slice(9) : "text", d = l.type === "element" ? l.properties : void 0, g = String(
|
|
203
203
|
n.properties?.dataDfFilename ?? n.properties?.["data-df-filename"] ?? d?.dataDfFilename ?? d?.["data-df-filename"] ?? i?.properties?.dataDfFilename ?? i?.properties?.["data-df-filename"] ?? i?.properties?.title ?? i?.properties?.["data-title"] ?? ""
|
|
204
|
-
).trim(), k =
|
|
205
|
-
|
|
204
|
+
).trim(), k = _e(i, n);
|
|
205
|
+
Oe(i, k);
|
|
206
206
|
const f = {
|
|
207
207
|
type: "element",
|
|
208
208
|
tagName: "figure",
|
|
@@ -227,7 +227,7 @@ function C(t) {
|
|
|
227
227
|
const e = t.properties;
|
|
228
228
|
return String(e.dataDfComponent ?? e["data-df-component"] ?? "");
|
|
229
229
|
}
|
|
230
|
-
const
|
|
230
|
+
const We = /* @__PURE__ */ new Map([
|
|
231
231
|
["pdf", { kind: "pdf", badge: "PDF", label: "PDF document" }],
|
|
232
232
|
["doc", { kind: "word", badge: "DOC", label: "Microsoft Word" }],
|
|
233
233
|
["docx", { kind: "word", badge: "DOCX", label: "Microsoft Word" }],
|
|
@@ -236,7 +236,7 @@ const Ue = /* @__PURE__ */ new Map([
|
|
|
236
236
|
["xls", { kind: "excel", badge: "XLS", label: "Microsoft Excel" }],
|
|
237
237
|
["xlsx", { kind: "excel", badge: "XLSX", label: "Microsoft Excel" }]
|
|
238
238
|
]);
|
|
239
|
-
function
|
|
239
|
+
function Je(t) {
|
|
240
240
|
if (typeof t != "string" || !t.trim()) return;
|
|
241
241
|
const e = t.trim(), r = e.match(/^([a-z][a-z\d+.-]*):/i)?.[1]?.toLowerCase();
|
|
242
242
|
if (r && r !== "http" && r !== "https") return;
|
|
@@ -253,12 +253,12 @@ function We(t) {
|
|
|
253
253
|
o = decodeURIComponent(n);
|
|
254
254
|
} catch {
|
|
255
255
|
}
|
|
256
|
-
const l = o.toLowerCase().match(/\.([a-z\d]+)$/)?.[1], i = l ?
|
|
256
|
+
const l = o.toLowerCase().match(/\.([a-z\d]+)$/)?.[1], i = l ? We.get(l) : void 0;
|
|
257
257
|
return i ? { ...i, filename: o } : void 0;
|
|
258
258
|
}
|
|
259
|
-
function
|
|
259
|
+
function x(t) {
|
|
260
260
|
const e = t.properties?.className;
|
|
261
|
-
return Array.isArray(e) ? e : typeof e == "string" ? e.split(/\s+/) : [];
|
|
261
|
+
return Array.isArray(e) ? e.map(String) : typeof e == "string" ? e.split(/\s+/) : [];
|
|
262
262
|
}
|
|
263
263
|
function Ke(t, e, r) {
|
|
264
264
|
const a = t.properties ?? {}, n = C(t);
|
|
@@ -302,7 +302,7 @@ const Xe = (t, e) => (r) => {
|
|
|
302
302
|
if (d && m.every(
|
|
303
303
|
(f) => f.type === "element" && (f.tagName === "img" || f.tagName === "figcaption")
|
|
304
304
|
)) {
|
|
305
|
-
const f =
|
|
305
|
+
const f = x(a);
|
|
306
306
|
t.markBehavior("image"), a.properties = {
|
|
307
307
|
...a.properties,
|
|
308
308
|
className: [.../* @__PURE__ */ new Set([...f, "df-media-frame"])],
|
|
@@ -341,12 +341,12 @@ const Xe = (t, e) => (r) => {
|
|
|
341
341
|
const i = a.children.filter((m) => m.type !== "text" || m.value.trim() !== ""), c = i[0];
|
|
342
342
|
if (i.length !== 1 || c?.type !== "element") return;
|
|
343
343
|
if (c.tagName === "a") {
|
|
344
|
-
const m =
|
|
344
|
+
const m = Je(c.properties?.href);
|
|
345
345
|
return m ? (o.children[n] = {
|
|
346
346
|
...c,
|
|
347
347
|
properties: {
|
|
348
348
|
...c.properties,
|
|
349
|
-
className: [.../* @__PURE__ */ new Set([...
|
|
349
|
+
className: [.../* @__PURE__ */ new Set([...x(c), "df-file-link"])],
|
|
350
350
|
dataDfFileKind: m.kind,
|
|
351
351
|
dataDfElement: "file-link"
|
|
352
352
|
},
|
|
@@ -439,7 +439,7 @@ const Ve = (t, e) => (r) => {
|
|
|
439
439
|
dataDfSortLabel: e.sortTableColumn,
|
|
440
440
|
// The raw HAST subtree lets the static React island hydrate the
|
|
441
441
|
// same table without reparsing Markdown or reading rendered HTML.
|
|
442
|
-
dataDfTable:
|
|
442
|
+
dataDfTable: re(l)
|
|
443
443
|
},
|
|
444
444
|
children: [l]
|
|
445
445
|
};
|
|
@@ -449,21 +449,21 @@ const Ve = (t, e) => (r) => {
|
|
|
449
449
|
function Ye(t, e, r, a, n) {
|
|
450
450
|
const { features: o } = r, l = new Set(
|
|
451
451
|
r.plugins.flatMap((p) => p.fenceLanguages ?? []).map((p) => p.toLowerCase())
|
|
452
|
-
), i = [
|
|
453
|
-
i.push(
|
|
452
|
+
), i = [G, O];
|
|
453
|
+
i.push(_), i.push([R, ne(r.plugins)]), (o.tabs || o.codeGroups) && i.push([q, r]), o.steps && i.push([U, r]), o.callouts && i.push(W), o.documentBlocks && i.push(J);
|
|
454
454
|
for (const p of r.plugins)
|
|
455
455
|
p.remarkPlugins && i.push(...p.remarkPlugins);
|
|
456
|
-
t === "mdx" ? (i.push([
|
|
456
|
+
t === "mdx" ? (i.push([je, e]), o.terminals && i.push([qe, e, r])) : (o.terminals || a.highlightedCode) && i.push([ze, r]);
|
|
457
457
|
const c = [];
|
|
458
|
-
t === "markdown" && o.terminals && c.push([
|
|
458
|
+
t === "markdown" && o.terminals && c.push([Re, e, r]), o.documentBlocks && c.push(K), c.push(z), a.highlightedCode && c.push(Ge), a.highlightedCode && n && c.push(n), o.documentBlocks && c.push([Xe, e, r.labels]), o.tables && c.push([Ve, e, r.labels]), o.codeBlocks && c.push([Ue, e, r.labels, l]);
|
|
459
459
|
for (const p of r.plugins)
|
|
460
460
|
p.rehypePlugins && c.push(...p.rehypePlugins);
|
|
461
461
|
const s = {
|
|
462
|
-
...
|
|
463
|
-
tabGroup:
|
|
464
|
-
tabItem:
|
|
465
|
-
stepGroup:
|
|
466
|
-
stepItem:
|
|
462
|
+
...H,
|
|
463
|
+
tabGroup: Y,
|
|
464
|
+
tabItem: V,
|
|
465
|
+
stepGroup: Z,
|
|
466
|
+
stepItem: X
|
|
467
467
|
};
|
|
468
468
|
return { remarkPlugins: i, rehypePlugins: c, handlers: s };
|
|
469
469
|
}
|
|
@@ -561,11 +561,11 @@ const tt = {
|
|
|
561
561
|
yml: "yaml",
|
|
562
562
|
yaml: "yaml",
|
|
563
563
|
zsh: "bash"
|
|
564
|
-
}, at = /* @__PURE__ */ new Set(["ansi", "text", "plaintext", "txt", "plain"]), y = /* @__PURE__ */ new Map(), nt = 8,
|
|
564
|
+
}, at = /* @__PURE__ */ new Set(["ansi", "text", "plaintext", "txt", "plain"]), y = /* @__PURE__ */ new Map(), nt = 8, F = /* @__PURE__ */ new WeakMap();
|
|
565
565
|
let ot = 1;
|
|
566
|
-
function
|
|
566
|
+
function B(t) {
|
|
567
567
|
if (typeof t != "string") return t;
|
|
568
|
-
const e =
|
|
568
|
+
const e = he[t];
|
|
569
569
|
if (!e) throw new Error(`Unknown Shiki theme: ${t}`);
|
|
570
570
|
return e;
|
|
571
571
|
}
|
|
@@ -575,8 +575,8 @@ function it(t) {
|
|
|
575
575
|
const r = N(t.codeLanguages);
|
|
576
576
|
if (r !== void 0) return `${e}\0${r}`;
|
|
577
577
|
const a = t.codeLanguages;
|
|
578
|
-
let n =
|
|
579
|
-
return n === void 0 && (n = ot++,
|
|
578
|
+
let n = F.get(a);
|
|
579
|
+
return n === void 0 && (n = ot++, F.set(a, n)), `${e}\0custom:${n}`;
|
|
580
580
|
}
|
|
581
581
|
function st(t, e) {
|
|
582
582
|
for (y.delete(t), y.set(t, e); y.size > nt; ) {
|
|
@@ -590,10 +590,10 @@ function lt(t) {
|
|
|
590
590
|
const e = it(t), r = y.get(e);
|
|
591
591
|
if (r)
|
|
592
592
|
return y.delete(e), y.set(e, r), r;
|
|
593
|
-
const a =
|
|
594
|
-
themes: [
|
|
593
|
+
const a = de({
|
|
594
|
+
themes: [B(t.codeThemes.light), B(t.codeThemes.dark)],
|
|
595
595
|
langs: [],
|
|
596
|
-
engine:
|
|
596
|
+
engine: ge()
|
|
597
597
|
}).then((n) => ({ highlighter: n, loadedInputs: /* @__PURE__ */ new Set(), loadChain: Promise.resolve() })).catch((n) => {
|
|
598
598
|
throw y.get(e) === a && y.delete(e), n;
|
|
599
599
|
});
|
|
@@ -608,7 +608,7 @@ async function ct(t, e) {
|
|
|
608
608
|
) ?? o.at(-1);
|
|
609
609
|
return l && l.name !== e && !l.aliases?.includes(e) && (l.aliases = [...l.aliases ?? [], e]), o;
|
|
610
610
|
}
|
|
611
|
-
function
|
|
611
|
+
function $(t, e) {
|
|
612
612
|
const r = e.codeLanguages[t];
|
|
613
613
|
if (r)
|
|
614
614
|
return {
|
|
@@ -632,7 +632,7 @@ function pt(t, e, r) {
|
|
|
632
632
|
}
|
|
633
633
|
}
|
|
634
634
|
async function mt(t, e, r, a) {
|
|
635
|
-
const o = [.../* @__PURE__ */ new Set([...e, r.fallbackLanguage])].map((s) => s.trim().toLowerCase()).filter((s) => s && !at.has(s)).map((s) => ({ language: s, resolved:
|
|
635
|
+
const o = [.../* @__PURE__ */ new Set([...e, r.fallbackLanguage])].map((s) => s.trim().toLowerCase()).filter((s) => s && !at.has(s)).map((s) => ({ language: s, resolved: $(s, r) })), l = o.filter((s) => !s.resolved).map((s) => s.language);
|
|
636
636
|
pt(l, r, a);
|
|
637
637
|
const i = o.flatMap((s) => !s.resolved || t.loadedInputs.has(s.resolved.key) ? [] : [s.resolved]);
|
|
638
638
|
if (i.length === 0) return;
|
|
@@ -646,21 +646,21 @@ async function mt(t, e, r, a) {
|
|
|
646
646
|
async function ut(t, e, r = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set()) {
|
|
647
647
|
const n = await lt(e);
|
|
648
648
|
await mt(n, t, e, r);
|
|
649
|
-
const o =
|
|
649
|
+
const o = $(e.fallbackLanguage, e) ? e.fallbackLanguage : "text";
|
|
650
650
|
return () => {
|
|
651
|
-
const l =
|
|
651
|
+
const l = se(n.highlighter, {
|
|
652
652
|
themes: e.codeThemes,
|
|
653
653
|
addLanguageClass: !0,
|
|
654
654
|
fallbackLanguage: o,
|
|
655
655
|
transformers: [
|
|
656
656
|
Qe(),
|
|
657
657
|
et(),
|
|
658
|
-
se(),
|
|
659
658
|
le(),
|
|
660
659
|
ce(),
|
|
661
660
|
pe(),
|
|
662
661
|
me(),
|
|
663
|
-
ue()
|
|
662
|
+
ue(),
|
|
663
|
+
fe()
|
|
664
664
|
]
|
|
665
665
|
});
|
|
666
666
|
return async (c, s) => {
|
|
@@ -800,7 +800,7 @@ function Lt({
|
|
|
800
800
|
syntax: o,
|
|
801
801
|
syntaxHighlighter: l
|
|
802
802
|
}) {
|
|
803
|
-
const i = e.htmlPolicy !== "strip", c = Ye("markdown", t, e, o, l), s =
|
|
803
|
+
const i = e.htmlPolicy !== "strip", c = Ye("markdown", t, e, o, l), s = j().use(I).use(c.remarkPlugins).use(M, {
|
|
804
804
|
allowDangerousHtml: i,
|
|
805
805
|
handlers: c.handlers
|
|
806
806
|
});
|
|
@@ -811,7 +811,7 @@ function Lt({
|
|
|
811
811
|
return s.use(c.rehypePlugins);
|
|
812
812
|
}
|
|
813
813
|
async function Ct(t, e, r = { warnedLanguages: /* @__PURE__ */ new Set() }) {
|
|
814
|
-
const a =
|
|
814
|
+
const a = ee(), n = $e(e), o = oe(n.plugins, { source: t, mode: "markdown" }), l = ie(o), i = { ...n, plugins: o }, c = bt(t, l);
|
|
815
815
|
o.forEach((b) => a.markPluginAssets(b));
|
|
816
816
|
const [s, p, u] = await Promise.all([
|
|
817
817
|
i.htmlPolicy !== "strip" ? import("rehype-raw") : void 0,
|
|
@@ -830,7 +830,7 @@ async function Ct(t, e, r = { warnedLanguages: /* @__PURE__ */ new Set() }) {
|
|
|
830
830
|
sanitizeSchema: p?.defaultSchema,
|
|
831
831
|
syntax: c,
|
|
832
832
|
syntaxHighlighter: u
|
|
833
|
-
}), k = g.parse(
|
|
833
|
+
}), k = g.parse(Q(t));
|
|
834
834
|
return {
|
|
835
835
|
document: await g.run(k, {
|
|
836
836
|
data: { docfuseLocale: e?.locale?.trim() || void 0 }
|
|
@@ -847,6 +847,6 @@ export {
|
|
|
847
847
|
_t as b,
|
|
848
848
|
ut as c,
|
|
849
849
|
bt as d,
|
|
850
|
-
|
|
850
|
+
$e as n,
|
|
851
851
|
Ct as p
|
|
852
852
|
};
|
package/dist/server/analyze.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as k, c as w } from "../directiveValidation-
|
|
2
|
-
import { d as K } from "../directiveValidation-
|
|
1
|
+
import { n as k, c as w } from "../directiveValidation-KWUIIjKw.js";
|
|
2
|
+
import { d as K } from "../directiveValidation-KWUIIjKw.js";
|
|
3
3
|
import x from "github-slugger";
|
|
4
4
|
import { remarkDefinitionList as b } from "remark-definition-list";
|
|
5
5
|
import D from "remark-directive";
|
package/dist/server.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as p from "react/jsx-runtime";
|
|
2
2
|
import { jsx as c } from "react/jsx-runtime";
|
|
3
3
|
import { evaluate as w } from "@mdx-js/mdx";
|
|
4
|
-
import { c as f, a as h, b as k } from "./Markdown-
|
|
5
|
-
import { a as M, n as P } from "./directiveValidation-
|
|
6
|
-
import { n as x, d as v, c as y, a as N, p as L } from "./prepareMarkdown-
|
|
4
|
+
import { c as f, a as h, b as k } from "./Markdown-iU2W4KgV.js";
|
|
5
|
+
import { a as M, n as P } from "./directiveValidation-KWUIIjKw.js";
|
|
6
|
+
import { n as x, d as v, c as y, a as N, p as L } from "./prepareMarkdown-8N-OdLDS.js";
|
|
7
7
|
import { a as b, b as S, s as C, c as T } from "./plugins-DQ-VUuCT.js";
|
|
8
8
|
import { d as G } from "./plugins-DQ-VUuCT.js";
|
|
9
9
|
import { createHash as z } from "node:crypto";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docfuse/markdown",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "An interactive, themeable Markdown renderer for technical documentation.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Docfuse Contributors",
|
|
@@ -64,13 +64,13 @@
|
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
66
|
"@mdx-js/mdx": "^3.1.0",
|
|
67
|
-
"@shikijs/langs": "^4.
|
|
68
|
-
"@shikijs/rehype": "^4.
|
|
69
|
-
"@shikijs/transformers": "^4.3
|
|
70
|
-
"@shikijs/types": "^4.
|
|
67
|
+
"@shikijs/langs": "^4.4.3",
|
|
68
|
+
"@shikijs/rehype": "^4.4.3",
|
|
69
|
+
"@shikijs/transformers": "^4.4.3",
|
|
70
|
+
"@shikijs/types": "^4.4.3",
|
|
71
71
|
"github-slugger": "^2.0.0",
|
|
72
72
|
"hast-util-to-jsx-runtime": "^2.3.6",
|
|
73
|
-
"lucide-react": "^1.
|
|
73
|
+
"lucide-react": "^1.34.0",
|
|
74
74
|
"rehype-raw": "^7.0.0",
|
|
75
75
|
"rehype-sanitize": "^6.0.0",
|
|
76
76
|
"rehype-slug": "^6.0.0",
|
|
@@ -79,23 +79,23 @@
|
|
|
79
79
|
"remark-gfm": "^4.0.1",
|
|
80
80
|
"remark-parse": "^11.0.0",
|
|
81
81
|
"remark-rehype": "^11.1.2",
|
|
82
|
-
"shiki": "^4.
|
|
82
|
+
"shiki": "^4.4.3",
|
|
83
83
|
"unified": "^11.0.5",
|
|
84
84
|
"unist-util-visit": "^5.1.0"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
87
|
"@tailwindcss/cli": "^4.1.11",
|
|
88
88
|
"@types/estree": "^1.0.9",
|
|
89
|
-
"@types/hast": "^3.0.
|
|
89
|
+
"@types/hast": "^3.0.5",
|
|
90
90
|
"@types/mdast": "^4.0.4",
|
|
91
91
|
"@types/node": "^22.10.0",
|
|
92
|
-
"@types/react": "^19.
|
|
93
|
-
"@types/react-dom": "^19.
|
|
92
|
+
"@types/react": "^19.2.18",
|
|
93
|
+
"@types/react-dom": "^19.2.5",
|
|
94
94
|
"@types/unist": "^3.0.3",
|
|
95
95
|
"mdast-util-directive": "^3.1.0",
|
|
96
96
|
"mdast-util-to-hast": "^13.2.1",
|
|
97
|
-
"react": "^19.
|
|
98
|
-
"react-dom": "^19.
|
|
97
|
+
"react": "^19.2.8",
|
|
98
|
+
"react-dom": "^19.2.8",
|
|
99
99
|
"tailwindcss": "^4.1.11",
|
|
100
100
|
"typescript": "^6.0.3",
|
|
101
101
|
"vite": "^6.4.3",
|