@coderminer/vue-markdown 1.0.0 → 1.0.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.
Files changed (179) hide show
  1. package/CHANGELOG.md +116 -0
  2. package/README.md +7 -2
  3. package/README.zh-CN.md +6 -3
  4. package/dist/chunks/MarkdownBlockquote-DVXziX2t.js +0 -2
  5. package/dist/chunks/MarkdownBreak-BwCi2Itt.js +0 -2
  6. package/dist/chunks/MarkdownCode-B1k9tmW5.js +0 -2
  7. package/dist/chunks/MarkdownConfigProvider-5N3ylrIu.js +0 -2
  8. package/dist/chunks/MarkdownContent-BAK6dqo7.js +0 -2
  9. package/dist/chunks/MarkdownCustomTag-lZJHsD6f.js +46 -0
  10. package/dist/chunks/MarkdownEmphasis-CppivOEu.js +0 -2
  11. package/dist/chunks/MarkdownEmpty-Av5k6bqa.js +0 -2
  12. package/dist/chunks/MarkdownError-C0sPs5W0.js +0 -2
  13. package/dist/chunks/MarkdownFootnoteReference-Dy3Khwyj.js +0 -2
  14. package/dist/chunks/MarkdownFootnotes-BRPzkbXv.js +0 -2
  15. package/dist/chunks/MarkdownHeading-DaNcP0_6.js +0 -2
  16. package/dist/chunks/MarkdownHorizontalRule-QNe_cuUI.js +0 -2
  17. package/dist/chunks/MarkdownHtml-66lYkvwM.js +0 -2
  18. package/dist/chunks/MarkdownImage-BRy76svs.js +0 -2
  19. package/dist/chunks/MarkdownInlineCode-MXZYFwex.js +0 -2
  20. package/dist/chunks/MarkdownLink-Dbx3NwgV.js +0 -2
  21. package/dist/chunks/MarkdownList-BJ-_C71k.js +0 -2
  22. package/dist/chunks/MarkdownListItem-Z1EHIY26.js +0 -2
  23. package/dist/chunks/MarkdownLoading-D-RYtXxf.js +0 -2
  24. package/dist/chunks/MarkdownParagraph-BxLSmSaG.js +0 -2
  25. package/dist/chunks/MarkdownRenderer-OlkdsvI3.js +482 -0
  26. package/dist/chunks/MarkdownRoot-DEE6iVfh.js +0 -2
  27. package/dist/chunks/MarkdownStrikethrough-CblvbqDk.js +0 -2
  28. package/dist/chunks/MarkdownStrong-uU5MzAoJ.js +0 -2
  29. package/dist/chunks/MarkdownTable-DmBTg_CR.js +0 -2
  30. package/dist/chunks/MarkdownTableCell-eiCJe847.js +0 -2
  31. package/dist/chunks/MarkdownTableRow-DuJaPntg.js +0 -2
  32. package/dist/chunks/MarkdownTableSection-PFHz-R33.js +0 -2
  33. package/dist/chunks/MarkdownTaskItem-BcmKo1lk.js +0 -2
  34. package/dist/chunks/{MarkdownToc-BdOHF-Yo.js → MarkdownToc-DHWWoH6t.js} +1 -3
  35. package/dist/chunks/MarkdownTocItem-DT9mR3vL.js +0 -2
  36. package/dist/chunks/{MermaidLiveEditor-W-qf3G-5.js → MermaidLiveEditor-1TKkI5bp.js} +1 -3
  37. package/dist/chunks/{VueSyntaxHighlighter-DyLsYMwy.js → VueSyntaxHighlighter-BWpCO-cX.js} +1 -3
  38. package/dist/chunks/adapters-CMwX_NEI.js +0 -2
  39. package/dist/chunks/{blank-line-Cb-JBP_5.js → blank-line-CKKsFeKR.js} +1 -3
  40. package/dist/chunks/codemirror-DyphMAEg.js +0 -2
  41. package/dist/chunks/config-aRYo2R8_.js +0 -2
  42. package/dist/chunks/context-8NfW6fxI.js +0 -2
  43. package/dist/chunks/convert-hast-C4Rg2ZuF.js +6 -0
  44. package/dist/chunks/default-ZQ5aHh-N.js +3 -0
  45. package/dist/chunks/diagnostics-CtHoJyiX.js +0 -2
  46. package/dist/chunks/{export-DZQ3cUry.js → export-BrgMLgUp.js} +13 -14
  47. package/dist/chunks/hast-to-nodes-DuZsi4XT.js +29 -0
  48. package/dist/chunks/{lib-BQiWGWpu.js → hast-util-from-html-D3e_iQ89.js} +495 -494
  49. package/dist/chunks/highlightjs-BxJFpKS1.js +196 -0
  50. package/dist/chunks/{identity-jZEhX2d5.js → identity-Bi27FKyx.js} +7 -8
  51. package/dist/chunks/labels-BtHiUTQI.js +0 -2
  52. package/dist/chunks/lib-CCnkLL6S.js +252 -0
  53. package/dist/chunks/longest-streak-DZE_EqsU.js +0 -2
  54. package/dist/chunks/{micromark-factory-space-Db040TnW.js → micromark-factory-space-CpXAnYUY.js} +2 -4
  55. package/dist/chunks/{normalize-CRYv3Wqt.js → normalize-VKfQXZiK.js} +57 -51
  56. package/dist/chunks/{plugin-DqkFHyny.js → plugin-YWo5uqTh.js} +1 -2
  57. package/dist/chunks/preset-BjaOuJUL.js +0 -2
  58. package/dist/chunks/{registry-DLjr93-V.js → registry-B7BfEkuy.js} +1051 -1045
  59. package/dist/chunks/{render-Cs8iKrgz.js → render-DAqK0w5J.js} +524 -494
  60. package/dist/chunks/{default-DWVS-I_8.js → rolldown-runtime-QGRDbDUS.js} +1 -5
  61. package/dist/chunks/{runtime-DJMnzjah.js → runtime-D95F41zG.js} +145 -117
  62. package/dist/chunks/security-y4EwUyAs.js +0 -2
  63. package/dist/chunks/{shared-DNAvZ-UY.js → shared-NjFDPmkb.js} +18 -27
  64. package/dist/chunks/{space-separated-tokens-CmBjEPdR.js → space-separated-tokens-1ebNqf35.js} +1 -3
  65. package/dist/chunks/url-D2BoivaE.js +0 -2
  66. package/dist/chunks/{useActiveHeading-BaGVMJnB.js → useActiveHeading-CnyGTG1u.js} +165 -122
  67. package/dist/components/CodeBlock.js +1 -1
  68. package/dist/components/MarkdownCustomTag.js +1 -1
  69. package/dist/components/MarkdownMath.js +1 -1
  70. package/dist/components/MarkdownMermaid.d.ts +3 -3
  71. package/dist/components/MarkdownMermaid.js +1 -1
  72. package/dist/components/MarkdownRenderer.d.ts +16 -19
  73. package/dist/components/MarkdownRenderer.js +1 -1
  74. package/dist/components/MarkdownToc.js +1 -1
  75. package/dist/components/MermaidBlock.js +1 -1
  76. package/dist/components/MermaidLiveEditor.js +1 -1
  77. package/dist/components/VueSyntaxHighlighter.js +1 -1
  78. package/dist/components/context.d.ts +2 -2
  79. package/dist/components/index.js +6 -6
  80. package/dist/components/types.d.ts +34 -2
  81. package/dist/composables/useMarkdownDocument.d.ts +2 -0
  82. package/dist/core/hast-nodes.d.ts +0 -3
  83. package/dist/core/hast-to-nodes.d.ts +9 -0
  84. package/dist/core/normalize.d.ts +10 -0
  85. package/dist/core/parts.d.ts +1 -0
  86. package/dist/core/slugger.d.ts +7 -0
  87. package/dist/core/types.d.ts +3 -1
  88. package/dist/headless.js +8 -8
  89. package/dist/highlight/convert-hast.d.ts +8 -0
  90. package/dist/highlight/index.d.ts +2 -1
  91. package/dist/highlight/index.js +4 -3
  92. package/dist/highlight/shared.d.ts +0 -5
  93. package/dist/highlight/shiki.js +2 -3
  94. package/dist/html/index.js +0 -2
  95. package/dist/index.d.ts +1 -1
  96. package/dist/index.js +47 -49
  97. package/dist/math/index.js +18 -16
  98. package/dist/mermaid/index.d.ts +2 -1
  99. package/dist/mermaid/index.js +8 -3
  100. package/dist/mermaid/plugin.d.ts +3 -0
  101. package/dist/mermaid/runtime.d.ts +3 -1
  102. package/dist/mermaid/sanitize-svg-lazy.d.ts +10 -0
  103. package/dist/mermaid/sanitize-svg.d.ts +3 -0
  104. package/dist/mermaid/sanitize.d.ts +6 -2
  105. package/dist/node-components.js +6 -6
  106. package/dist/pipeline.js +1 -1
  107. package/dist/plugins.js +1 -1
  108. package/dist/styles/components.css +25 -0
  109. package/package.json +6 -3
  110. package/dist/chunks/MarkdownBlockquote-DVXziX2t.js.map +0 -1
  111. package/dist/chunks/MarkdownBreak-BwCi2Itt.js.map +0 -1
  112. package/dist/chunks/MarkdownCode-B1k9tmW5.js.map +0 -1
  113. package/dist/chunks/MarkdownConfigProvider-5N3ylrIu.js.map +0 -1
  114. package/dist/chunks/MarkdownContent-BAK6dqo7.js.map +0 -1
  115. package/dist/chunks/MarkdownCustomTag-BBdn3-WO.js +0 -42
  116. package/dist/chunks/MarkdownCustomTag-BBdn3-WO.js.map +0 -1
  117. package/dist/chunks/MarkdownEmphasis-CppivOEu.js.map +0 -1
  118. package/dist/chunks/MarkdownEmpty-Av5k6bqa.js.map +0 -1
  119. package/dist/chunks/MarkdownError-C0sPs5W0.js.map +0 -1
  120. package/dist/chunks/MarkdownFootnoteReference-Dy3Khwyj.js.map +0 -1
  121. package/dist/chunks/MarkdownFootnotes-BRPzkbXv.js.map +0 -1
  122. package/dist/chunks/MarkdownHeading-DaNcP0_6.js.map +0 -1
  123. package/dist/chunks/MarkdownHorizontalRule-QNe_cuUI.js.map +0 -1
  124. package/dist/chunks/MarkdownHtml-66lYkvwM.js.map +0 -1
  125. package/dist/chunks/MarkdownImage-BRy76svs.js.map +0 -1
  126. package/dist/chunks/MarkdownInlineCode-MXZYFwex.js.map +0 -1
  127. package/dist/chunks/MarkdownLink-Dbx3NwgV.js.map +0 -1
  128. package/dist/chunks/MarkdownList-BJ-_C71k.js.map +0 -1
  129. package/dist/chunks/MarkdownListItem-Z1EHIY26.js.map +0 -1
  130. package/dist/chunks/MarkdownLoading-D-RYtXxf.js.map +0 -1
  131. package/dist/chunks/MarkdownParagraph-BxLSmSaG.js.map +0 -1
  132. package/dist/chunks/MarkdownRenderer-DLRRfsdI.js +0 -416
  133. package/dist/chunks/MarkdownRenderer-DLRRfsdI.js.map +0 -1
  134. package/dist/chunks/MarkdownRoot-DEE6iVfh.js.map +0 -1
  135. package/dist/chunks/MarkdownStrikethrough-CblvbqDk.js.map +0 -1
  136. package/dist/chunks/MarkdownStrong-uU5MzAoJ.js.map +0 -1
  137. package/dist/chunks/MarkdownTable-DmBTg_CR.js.map +0 -1
  138. package/dist/chunks/MarkdownTableCell-eiCJe847.js.map +0 -1
  139. package/dist/chunks/MarkdownTableRow-DuJaPntg.js.map +0 -1
  140. package/dist/chunks/MarkdownTableSection-PFHz-R33.js.map +0 -1
  141. package/dist/chunks/MarkdownTaskItem-BcmKo1lk.js.map +0 -1
  142. package/dist/chunks/MarkdownToc-BdOHF-Yo.js.map +0 -1
  143. package/dist/chunks/MarkdownTocItem-DT9mR3vL.js.map +0 -1
  144. package/dist/chunks/MermaidLiveEditor-W-qf3G-5.js.map +0 -1
  145. package/dist/chunks/VueSyntaxHighlighter-DyLsYMwy.js.map +0 -1
  146. package/dist/chunks/adapters-CMwX_NEI.js.map +0 -1
  147. package/dist/chunks/blank-line-Cb-JBP_5.js.map +0 -1
  148. package/dist/chunks/codemirror-DyphMAEg.js.map +0 -1
  149. package/dist/chunks/config-aRYo2R8_.js.map +0 -1
  150. package/dist/chunks/context-8NfW6fxI.js.map +0 -1
  151. package/dist/chunks/default-DWVS-I_8.js.map +0 -1
  152. package/dist/chunks/diagnostics-CtHoJyiX.js.map +0 -1
  153. package/dist/chunks/export-DZQ3cUry.js.map +0 -1
  154. package/dist/chunks/hast-nodes-C0bX3M5Z.js +0 -35
  155. package/dist/chunks/hast-nodes-C0bX3M5Z.js.map +0 -1
  156. package/dist/chunks/highlightjs-BEh-YwEG.js +0 -6041
  157. package/dist/chunks/highlightjs-BEh-YwEG.js.map +0 -1
  158. package/dist/chunks/identity-jZEhX2d5.js.map +0 -1
  159. package/dist/chunks/labels-BtHiUTQI.js.map +0 -1
  160. package/dist/chunks/lib-BQiWGWpu.js.map +0 -1
  161. package/dist/chunks/lib-LwqA_W3J.js +0 -127
  162. package/dist/chunks/lib-LwqA_W3J.js.map +0 -1
  163. package/dist/chunks/longest-streak-DZE_EqsU.js.map +0 -1
  164. package/dist/chunks/micromark-factory-space-Db040TnW.js.map +0 -1
  165. package/dist/chunks/normalize-CRYv3Wqt.js.map +0 -1
  166. package/dist/chunks/plugin-DqkFHyny.js.map +0 -1
  167. package/dist/chunks/preset-BjaOuJUL.js.map +0 -1
  168. package/dist/chunks/registry-DLjr93-V.js.map +0 -1
  169. package/dist/chunks/render-Cs8iKrgz.js.map +0 -1
  170. package/dist/chunks/runtime-DJMnzjah.js.map +0 -1
  171. package/dist/chunks/security-y4EwUyAs.js.map +0 -1
  172. package/dist/chunks/shared-DNAvZ-UY.js.map +0 -1
  173. package/dist/chunks/space-separated-tokens-CmBjEPdR.js.map +0 -1
  174. package/dist/chunks/url-D2BoivaE.js.map +0 -1
  175. package/dist/chunks/useActiveHeading-BaGVMJnB.js.map +0 -1
  176. package/dist/highlight/shiki.js.map +0 -1
  177. package/dist/html/index.js.map +0 -1
  178. package/dist/index.js.map +0 -1
  179. package/dist/math/index.js.map +0 -1
@@ -23,37 +23,45 @@ function l(e) {
23
23
  return t;
24
24
  }
25
25
  function u(e) {
26
+ return e.replace(/-+([a-z0-9])/g, (e, t) => t.toUpperCase());
27
+ }
28
+ function d(e) {
29
+ let t = {};
30
+ for (let n of Object.keys(e)) n.startsWith("data-") || n.startsWith("aria-") ? t[n] = e[n] : t[u(n)] = e[n];
31
+ return t;
32
+ }
33
+ function f(e) {
26
34
  var t;
27
35
  let n = (t = e.properties) == null ? void 0 : t.className;
28
36
  return Array.isArray(n) ? n.map(String) : typeof n == "string" ? n.split(/\s+/) : [];
29
37
  }
30
- function d(e) {
38
+ function p(e) {
31
39
  var t, n;
32
- let r = u(e);
40
+ let r = f(e);
33
41
  if (!(e.tagName === "vmd-math" || r.includes("language-math") && r.some((e) => e.startsWith("math-")))) return;
34
- let i = ((t = e.properties) == null ? void 0 : t["data-display"]) === "true" || r.includes("math-display"), a = (n = e.properties) == null ? void 0 : n["data-tex"], o = f(e), s = typeof a == "string" ? a : o ? o.children.map((e) => e.type === "text" ? e.value : "").join("") : "", c = (o == null ? e : o).children, l = c.find((e) => e.type === "element");
42
+ let i = ((t = e.properties) == null ? void 0 : t["data-display"]) === "true" || r.includes("math-display"), a = (n = e.properties) == null ? void 0 : n["data-tex"], o = m(e), s = typeof a == "string" ? a : o ? o.children.map((e) => e.type === "text" ? e.value : "").join("") : "", c = (o == null ? e : o).children, l = c.find((e) => e.type === "element");
35
43
  return ((l == null ? void 0 : l.tagName) === "pre" || (l == null ? void 0 : l.tagName) === "code") && (c = l.children), {
36
44
  tex: s,
37
45
  displayMode: i,
38
46
  rendered: c
39
47
  };
40
48
  }
41
- function f(e) {
49
+ function m(e) {
42
50
  for (let t of e.children) if (t.type === "element") {
43
- if (t.tagName === "code" && u(t).includes("language-math")) return t;
51
+ if (t.tagName === "code" && f(t).includes("language-math")) return t;
44
52
  if (t.tagName === "pre") {
45
- let e = f(t);
53
+ let e = m(t);
46
54
  if (e) return e;
47
55
  }
48
56
  }
49
57
  }
50
- function p(e) {
58
+ function h(e) {
51
59
  var t;
52
60
  if (e.tagName !== "pre") return !1;
53
61
  let n = e.children.filter((e) => e.type !== "text" || e.value.trim() !== "");
54
62
  return n.length === 1 && ((t = n[0]) == null ? void 0 : t.type) === "element" && n[0].tagName === "code";
55
63
  }
56
- function m(e) {
64
+ function g(e) {
57
65
  let t = e.children.find((e) => e.type === "element" && e.tagName === "code"), n = [...Array.isArray(e.properties.className) ? e.properties.className.map(String) : [], ...Array.isArray(t == null ? void 0 : t.properties.className) ? t.properties.className.map(String) : []];
58
66
  for (let e of n) {
59
67
  let t = /^(?:language|lang)-(.+)$/u.exec(e);
@@ -61,17 +69,17 @@ function m(e) {
61
69
  }
62
70
  return "";
63
71
  }
64
- function h(e, t, n) {
72
+ function _(e, t, n) {
65
73
  let r = e.children.find((e) => e.type === "element" && e.tagName === "code");
66
74
  return {
67
75
  kind: "code",
68
76
  key: t,
69
77
  code: r ? r.children.map((e) => e.type === "text" ? e.value : "").join("") : e.children.map((e) => e.type === "text" ? e.value : "").join(""),
70
- language: m(e),
78
+ language: g(e),
71
79
  source: n
72
80
  };
73
81
  }
74
- function g(n, r, i, a) {
82
+ function v(n, r, i, a) {
75
83
  let { allowedElements: o, disallowedElements: s, unwrapDisallowed: c, allowElement: l, diagnostics: u } = a.options, d = !1;
76
84
  if (o && o.length > 0 ? (s && s.length > 0 && !a.conflictReported && (a.conflictReported = !0, u == null || u.push(t("filter-conflict", "`allowedElements` and `disallowedElements` were both provided; `allowedElements` wins.", {
77
85
  severity: "warning",
@@ -83,7 +91,7 @@ function g(n, r, i, a) {
83
91
  }
84
92
  return d ? c ? "unwrap" : "drop" : "keep";
85
93
  }
86
- function _(a, o, s, c, l) {
94
+ function y(a, o, s, c, l) {
87
95
  let u = n(a, l.options.baseUrl), d = l.options.urlTransform, f = (e) => {
88
96
  if (o === "srcset") return i(e, "srcset");
89
97
  let t = r(e, o);
@@ -104,55 +112,55 @@ function _(a, o, s, c, l) {
104
112
  return f(u);
105
113
  }
106
114
  }
107
- function v(e, t, n, r, i, u = !1) {
115
+ function b(e, t, n, r, i, u = !1) {
108
116
  if (o.has(e.tagName) && !(u && e.tagName === "math")) return null;
109
- let f = c(e), m = a(e.tagName, e.properties), v = d(e);
110
- if (v) {
117
+ let d = c(e), f = a(e.tagName, e.properties), m = p(e);
118
+ if (m) {
111
119
  let a = {
112
120
  kind: "element",
113
121
  key: t,
114
122
  tag: e.tagName,
115
- attrs: m,
123
+ attrs: f,
116
124
  children: [],
117
- source: f
125
+ source: d
118
126
  };
119
- return g(a, n, r, i) === "keep" ? {
127
+ return v(a, n, r, i) === "keep" ? {
120
128
  kind: "math",
121
129
  key: t,
122
- tex: v.tex,
123
- displayMode: v.displayMode,
124
- rendered: y(v.rendered, t, a, i, !0),
125
- source: f
130
+ tex: m.tex,
131
+ displayMode: m.displayMode,
132
+ rendered: x(m.rendered, t, a, i, !0),
133
+ source: d
126
134
  } : null;
127
135
  }
128
- let b = {
136
+ let g = {
129
137
  kind: "element",
130
138
  key: t,
131
139
  tag: e.tagName,
132
- attrs: m,
140
+ attrs: f,
133
141
  children: [],
134
- source: f
135
- }, x = y(e.children, t, b, i, u);
136
- b.children = x;
137
- let S = g(b, n, r, i);
142
+ source: d
143
+ }, b = x(e.children, t, g, i, u);
144
+ g.children = b;
145
+ let S = v(g, n, r, i);
138
146
  if (S === "drop") return null;
139
- if (S === "unwrap") return x;
140
- if (p(e)) return h(e, t, f);
141
- for (let t of Object.keys(m)) {
147
+ if (S === "unwrap") return b;
148
+ if (h(e)) return _(e, t, d);
149
+ for (let t of Object.keys(f)) {
142
150
  if (!s.has(t)) continue;
143
- let n = _(m[t], t, e.tagName, m, i);
144
- n === void 0 ? delete m[t] : m[t] = n;
151
+ let n = y(f[t], t, e.tagName, f, i);
152
+ n === void 0 ? delete f[t] : f[t] = n;
145
153
  }
146
- if (e.tagName === "a" && m.target === "_blank" && !m.rel && (m.rel = "noopener noreferrer"), /^h[1-6]$/.test(e.tagName) && !m.id) {
147
- let e = l(x);
154
+ if (e.tagName === "a" && f.target === "_blank" && !f.rel && (f.rel = "noopener noreferrer"), /^h[1-6]$/.test(e.tagName) && !f.id) {
155
+ let e = l(b);
148
156
  if (e.trim()) {
149
157
  var C;
150
- m.id = `${(C = i.options.idPrefix) == null ? "" : C}${i.options.slugger.slug(e)}`;
158
+ f.id = `${(C = i.options.idPrefix) == null ? "" : C}${i.options.slugger.slug(e)}`;
151
159
  }
152
160
  }
153
- return b;
161
+ return g;
154
162
  }
155
- function y(e, t, n, r, i = !1) {
163
+ function x(e, t, n, r, i = !1) {
156
164
  let a = [];
157
165
  return e.forEach((e, o) => {
158
166
  let s = t ? `${t}.${o}` : String(o);
@@ -167,28 +175,28 @@ function y(e, t, n, r, i = !1) {
167
175
  return;
168
176
  }
169
177
  if (e.type === "raw" || e.type !== "element") return;
170
- let l = v(e, s, o, n, r, i);
178
+ let l = b(e, s, o, n, r, i);
171
179
  l !== null && (Array.isArray(l) ? a.push(...l) : a.push(l));
172
180
  }), a;
173
181
  }
174
- function b(e, t) {
182
+ function S(e, t) {
175
183
  let n = {
176
184
  options: t,
177
185
  conflictReported: !1,
178
186
  urlErrorReported: !1
179
- }, r = y(e.children, "", void 0, n);
187
+ }, r = x(e.children, "", void 0, n);
180
188
  return {
181
189
  nodes: r,
182
- toc: S(r),
183
- customTags: C(r)
190
+ toc: w(r),
191
+ customTags: T(r)
184
192
  };
185
193
  }
186
- function x(e, t) {
194
+ function C(e, t) {
187
195
  if (t === void 0 || !Number.isFinite(t) || t <= 0 || t >= 6) return [...e];
188
196
  let n = Math.min(6, Math.max(1, Math.floor(t)));
189
197
  return e.filter((e) => e.level <= n);
190
198
  }
191
- function S(e) {
199
+ function w(e) {
192
200
  let t = [], n = (e) => {
193
201
  for (let r of e) if (r.kind === "element") {
194
202
  let e = /^h([1-6])$/.exec(r.tag);
@@ -201,7 +209,7 @@ function S(e) {
201
209
  };
202
210
  return n(e), t;
203
211
  }
204
- function C(e) {
212
+ function T(e) {
205
213
  let t = [], n = (e) => {
206
214
  for (let r of e) r.kind === "custom" ? (t.push({
207
215
  key: r.key,
@@ -212,9 +220,7 @@ function C(e) {
212
220
  };
213
221
  return n(e), t;
214
222
  }
215
- function w(e, t, n) {
216
- for (let r of e) t(r, n), "children" in r && Array.isArray(r.children) && w(r.children, t, r);
223
+ function E(e, t, n) {
224
+ for (let r of e) t(r, n), "children" in r && Array.isArray(r.children) && E(r.children, t, r);
217
225
  }
218
- export { w as a, b as i, S as n, x as r, C as t };
219
-
220
- //# sourceMappingURL=normalize-CRYv3Wqt.js.map
226
+ export { S as a, d as i, w as n, E as o, C as r, T as t };
@@ -15,6 +15,7 @@ function r(t, n, i) {
15
15
  } : "children" in t && Array.isArray(t.children) ? e(e({}, t), {}, { children: r(t.children, n, i) }) : t);
16
16
  }
17
17
  function i(t = {}) {
18
+ if (!t || typeof t != "object" || Array.isArray(t)) throw TypeError("`mermaidPlugin` expects an options object such as `{ languages: [\"mermaid\"] }`. It does not accept renderer or theme arguments; configure those on `MarkdownRenderer`.");
18
19
  let i = n(t.languages);
19
20
  return {
20
21
  name: "mermaid",
@@ -24,5 +25,3 @@ function i(t = {}) {
24
25
  };
25
26
  }
26
27
  export { i as t };
27
-
28
- //# sourceMappingURL=plugin-DqkFHyny.js.map
@@ -42,5 +42,3 @@ function o(e) {
42
42
  if (e) return Array.isArray(e) ? a(...e) : e;
43
43
  }
44
44
  export { r as a, n as i, i as n, o as r, a as t };
45
-
46
- //# sourceMappingURL=preset-BjaOuJUL.js.map