@coderminer/vue-markdown 0.0.0-stage → 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 (232) hide show
  1. package/CHANGELOG.md +226 -0
  2. package/LICENSE +21 -0
  3. package/README.md +584 -3
  4. package/README.zh-CN.md +550 -0
  5. package/dist/chunks/MarkdownBlockquote-DVXziX2t.js +16 -0
  6. package/dist/chunks/MarkdownBreak-BwCi2Itt.js +16 -0
  7. package/dist/chunks/MarkdownCode-B1k9tmW5.js +63 -0
  8. package/dist/chunks/MarkdownConfigProvider-5N3ylrIu.js +49 -0
  9. package/dist/chunks/MarkdownContent-BAK6dqo7.js +13 -0
  10. package/dist/chunks/MarkdownCustomTag-lZJHsD6f.js +46 -0
  11. package/dist/chunks/MarkdownEmphasis-CppivOEu.js +16 -0
  12. package/dist/chunks/MarkdownEmpty-Av5k6bqa.js +14 -0
  13. package/dist/chunks/MarkdownError-C0sPs5W0.js +17 -0
  14. package/dist/chunks/MarkdownFootnoteReference-Dy3Khwyj.js +22 -0
  15. package/dist/chunks/MarkdownFootnotes-BRPzkbXv.js +21 -0
  16. package/dist/chunks/MarkdownHeading-DaNcP0_6.js +29 -0
  17. package/dist/chunks/MarkdownHorizontalRule-QNe_cuUI.js +16 -0
  18. package/dist/chunks/MarkdownHtml-66lYkvwM.js +13 -0
  19. package/dist/chunks/MarkdownImage-BRy76svs.js +51 -0
  20. package/dist/chunks/MarkdownInlineCode-MXZYFwex.js +16 -0
  21. package/dist/chunks/MarkdownLink-Dbx3NwgV.js +45 -0
  22. package/dist/chunks/MarkdownList-BJ-_C71k.js +20 -0
  23. package/dist/chunks/MarkdownListItem-Z1EHIY26.js +16 -0
  24. package/dist/chunks/MarkdownLoading-D-RYtXxf.js +15 -0
  25. package/dist/chunks/MarkdownParagraph-BxLSmSaG.js +16 -0
  26. package/dist/chunks/MarkdownRenderer-OlkdsvI3.js +482 -0
  27. package/dist/chunks/MarkdownRoot-DEE6iVfh.js +23 -0
  28. package/dist/chunks/MarkdownStrikethrough-CblvbqDk.js +16 -0
  29. package/dist/chunks/MarkdownStrong-uU5MzAoJ.js +16 -0
  30. package/dist/chunks/MarkdownTable-DmBTg_CR.js +16 -0
  31. package/dist/chunks/MarkdownTableCell-eiCJe847.js +31 -0
  32. package/dist/chunks/MarkdownTableRow-DuJaPntg.js +16 -0
  33. package/dist/chunks/MarkdownTableSection-PFHz-R33.js +24 -0
  34. package/dist/chunks/MarkdownTaskItem-BcmKo1lk.js +38 -0
  35. package/dist/chunks/MarkdownToc-DHWWoH6t.js +49 -0
  36. package/dist/chunks/MarkdownTocItem-DT9mR3vL.js +25 -0
  37. package/dist/chunks/MermaidLiveEditor-1TKkI5bp.js +414 -0
  38. package/dist/chunks/VueSyntaxHighlighter-BWpCO-cX.js +260 -0
  39. package/dist/chunks/adapters-CMwX_NEI.js +26 -0
  40. package/dist/chunks/asyncToGenerator-ChigusFD.js +26 -0
  41. package/dist/chunks/blank-line-CKKsFeKR.js +88 -0
  42. package/dist/chunks/codemirror-DyphMAEg.js +82 -0
  43. package/dist/chunks/config-aRYo2R8_.js +10 -0
  44. package/dist/chunks/context-8NfW6fxI.js +30 -0
  45. package/dist/chunks/convert-hast-C4Rg2ZuF.js +6 -0
  46. package/dist/chunks/default-ZQ5aHh-N.js +3 -0
  47. package/dist/chunks/diagnostics-CtHoJyiX.js +23 -0
  48. package/dist/chunks/export-BrgMLgUp.js +1574 -0
  49. package/dist/chunks/hast-to-nodes-DuZsi4XT.js +29 -0
  50. package/dist/chunks/hast-util-from-html-D3e_iQ89.js +5088 -0
  51. package/dist/chunks/highlightjs-BxJFpKS1.js +196 -0
  52. package/dist/chunks/identity-Bi27FKyx.js +6243 -0
  53. package/dist/chunks/labels-BtHiUTQI.js +47 -0
  54. package/dist/chunks/lib-CCnkLL6S.js +252 -0
  55. package/dist/chunks/longest-streak-DZE_EqsU.js +8 -0
  56. package/dist/chunks/micromark-factory-space-CpXAnYUY.js +137 -0
  57. package/dist/chunks/normalize-VKfQXZiK.js +226 -0
  58. package/dist/chunks/objectSpread2-CtBNx0TF.js +57 -0
  59. package/dist/chunks/plugin-YWo5uqTh.js +27 -0
  60. package/dist/chunks/preset-BjaOuJUL.js +44 -0
  61. package/dist/chunks/registry-B7BfEkuy.js +6150 -0
  62. package/dist/chunks/render-DAqK0w5J.js +1754 -0
  63. package/dist/chunks/rolldown-runtime-QGRDbDUS.js +19 -0
  64. package/dist/chunks/runtime-D95F41zG.js +574 -0
  65. package/dist/chunks/security-y4EwUyAs.js +212 -0
  66. package/dist/chunks/shared-NjFDPmkb.js +67 -0
  67. package/dist/chunks/space-separated-tokens-1ebNqf35.js +1097 -0
  68. package/dist/chunks/url-D2BoivaE.js +24 -0
  69. package/dist/chunks/useActiveHeading-CnyGTG1u.js +359 -0
  70. package/dist/components/CodeBlock.d.ts +73 -0
  71. package/dist/components/CodeBlock.js +1 -0
  72. package/dist/components/Icon.d.ts +6 -0
  73. package/dist/components/MarkdownBlockquote.d.ts +18 -0
  74. package/dist/components/MarkdownBlockquote.js +1 -0
  75. package/dist/components/MarkdownBreak.d.ts +8 -0
  76. package/dist/components/MarkdownBreak.js +1 -0
  77. package/dist/components/MarkdownChildren.d.ts +17 -0
  78. package/dist/components/MarkdownCode.d.ts +29 -0
  79. package/dist/components/MarkdownCode.js +1 -0
  80. package/dist/components/MarkdownConfigProvider.d.ts +33 -0
  81. package/dist/components/MarkdownConfigProvider.js +1 -0
  82. package/dist/components/MarkdownContent.d.ts +16 -0
  83. package/dist/components/MarkdownContent.js +1 -0
  84. package/dist/components/MarkdownCustomTag.d.ts +20 -0
  85. package/dist/components/MarkdownCustomTag.js +1 -0
  86. package/dist/components/MarkdownEmphasis.d.ts +18 -0
  87. package/dist/components/MarkdownEmphasis.js +1 -0
  88. package/dist/components/MarkdownEmpty.d.ts +8 -0
  89. package/dist/components/MarkdownEmpty.js +1 -0
  90. package/dist/components/MarkdownError.d.ts +11 -0
  91. package/dist/components/MarkdownError.js +1 -0
  92. package/dist/components/MarkdownFootnoteReference.d.ts +19 -0
  93. package/dist/components/MarkdownFootnoteReference.js +1 -0
  94. package/dist/components/MarkdownFootnotes.d.ts +17 -0
  95. package/dist/components/MarkdownFootnotes.js +1 -0
  96. package/dist/components/MarkdownHeading.d.ts +18 -0
  97. package/dist/components/MarkdownHeading.js +1 -0
  98. package/dist/components/MarkdownHorizontalRule.d.ts +8 -0
  99. package/dist/components/MarkdownHorizontalRule.js +1 -0
  100. package/dist/components/MarkdownHtml.d.ts +8 -0
  101. package/dist/components/MarkdownHtml.js +1 -0
  102. package/dist/components/MarkdownImage.d.ts +15 -0
  103. package/dist/components/MarkdownImage.js +1 -0
  104. package/dist/components/MarkdownInlineCode.d.ts +18 -0
  105. package/dist/components/MarkdownInlineCode.js +1 -0
  106. package/dist/components/MarkdownLink.d.ts +22 -0
  107. package/dist/components/MarkdownLink.js +1 -0
  108. package/dist/components/MarkdownList.d.ts +18 -0
  109. package/dist/components/MarkdownList.js +1 -0
  110. package/dist/components/MarkdownListItem.d.ts +18 -0
  111. package/dist/components/MarkdownListItem.js +1 -0
  112. package/dist/components/MarkdownLoading.d.ts +8 -0
  113. package/dist/components/MarkdownLoading.js +1 -0
  114. package/dist/components/MarkdownMath.d.ts +12 -0
  115. package/dist/components/MarkdownMath.js +1 -0
  116. package/dist/components/MarkdownMermaid.d.ts +78 -0
  117. package/dist/components/MarkdownMermaid.js +1 -0
  118. package/dist/components/MarkdownParagraph.d.ts +18 -0
  119. package/dist/components/MarkdownParagraph.js +1 -0
  120. package/dist/components/MarkdownRenderer.d.ts +167 -0
  121. package/dist/components/MarkdownRenderer.js +1 -0
  122. package/dist/components/MarkdownRoot.d.ts +24 -0
  123. package/dist/components/MarkdownRoot.js +1 -0
  124. package/dist/components/MarkdownStrikethrough.d.ts +18 -0
  125. package/dist/components/MarkdownStrikethrough.js +1 -0
  126. package/dist/components/MarkdownStrong.d.ts +18 -0
  127. package/dist/components/MarkdownStrong.js +1 -0
  128. package/dist/components/MarkdownTable.d.ts +18 -0
  129. package/dist/components/MarkdownTable.js +1 -0
  130. package/dist/components/MarkdownTableCell.d.ts +20 -0
  131. package/dist/components/MarkdownTableCell.js +1 -0
  132. package/dist/components/MarkdownTableRow.d.ts +18 -0
  133. package/dist/components/MarkdownTableRow.js +1 -0
  134. package/dist/components/MarkdownTableSection.d.ts +18 -0
  135. package/dist/components/MarkdownTableSection.js +1 -0
  136. package/dist/components/MarkdownTaskItem.d.ts +20 -0
  137. package/dist/components/MarkdownTaskItem.js +1 -0
  138. package/dist/components/MarkdownToc.d.ts +36 -0
  139. package/dist/components/MarkdownToc.js +1 -0
  140. package/dist/components/MarkdownTocItem.d.ts +14 -0
  141. package/dist/components/MarkdownTocItem.js +1 -0
  142. package/dist/components/MermaidBlock.d.ts +50 -0
  143. package/dist/components/MermaidBlock.js +1 -0
  144. package/dist/components/MermaidLiveEditor.d.ts +44 -0
  145. package/dist/components/MermaidLiveEditor.js +1 -0
  146. package/dist/components/VueSyntaxHighlighter.d.ts +39 -0
  147. package/dist/components/VueSyntaxHighlighter.js +1 -0
  148. package/dist/components/codeRegion.d.ts +14 -0
  149. package/dist/components/config.d.ts +7 -0
  150. package/dist/components/context.d.ts +45 -0
  151. package/dist/components/index.d.ts +42 -0
  152. package/dist/components/index.js +38 -0
  153. package/dist/components/render.d.ts +9 -0
  154. package/dist/components/scroll-lock.d.ts +7 -0
  155. package/dist/components/types.d.ts +61 -0
  156. package/dist/composables/useActiveHeading.d.ts +12 -0
  157. package/dist/composables/useCodeHighlighter.d.ts +30 -0
  158. package/dist/composables/useLineWindow.d.ts +38 -0
  159. package/dist/composables/useMarkdownDocument.d.ts +25 -0
  160. package/dist/core/adapters.d.ts +7 -0
  161. package/dist/core/config.d.ts +5 -0
  162. package/dist/core/diagnostics.d.ts +9 -0
  163. package/dist/core/finalize.d.ts +18 -0
  164. package/dist/core/hast-nodes.d.ts +3 -0
  165. package/dist/core/hast-to-nodes.d.ts +9 -0
  166. package/dist/core/highlight-lines.d.ts +8 -0
  167. package/dist/core/identity.d.ts +4 -0
  168. package/dist/core/labels.d.ts +4 -0
  169. package/dist/core/manifest.d.ts +38 -0
  170. package/dist/core/memo.d.ts +5 -0
  171. package/dist/core/model-hast.d.ts +8 -0
  172. package/dist/core/model.d.ts +10 -0
  173. package/dist/core/normalize.d.ts +37 -0
  174. package/dist/core/parts.d.ts +136 -0
  175. package/dist/core/preset.d.ts +10 -0
  176. package/dist/core/run.d.ts +16 -0
  177. package/dist/core/search.d.ts +5 -0
  178. package/dist/core/security.d.ts +21 -0
  179. package/dist/core/slugger.d.ts +13 -0
  180. package/dist/core/types.d.ts +392 -0
  181. package/dist/core/url.d.ts +10 -0
  182. package/dist/editor/codemirror.d.ts +14 -0
  183. package/dist/editor/index.d.ts +2 -0
  184. package/dist/editor/index.js +1 -0
  185. package/dist/export/index.d.ts +6 -0
  186. package/dist/headless.d.ts +21 -0
  187. package/dist/headless.js +12 -0
  188. package/dist/highlight/convert-hast.d.ts +8 -0
  189. package/dist/highlight/highlightjs.d.ts +7 -0
  190. package/dist/highlight/index.d.ts +4 -0
  191. package/dist/highlight/index.js +4 -0
  192. package/dist/highlight/shared.d.ts +11 -0
  193. package/dist/highlight/shiki.d.ts +7 -0
  194. package/dist/highlight/shiki.js +75 -0
  195. package/dist/html/index.d.ts +17 -0
  196. package/dist/html/index.js +11 -0
  197. package/dist/index.d.ts +24 -0
  198. package/dist/index.js +53 -0
  199. package/dist/math/index.d.ts +4 -0
  200. package/dist/math/index.js +585 -0
  201. package/dist/math/katex.d.ts +4 -0
  202. package/dist/math/plugin.d.ts +20 -0
  203. package/dist/mermaid/index.d.ts +6 -0
  204. package/dist/mermaid/index.js +8 -0
  205. package/dist/mermaid/plugin.d.ts +17 -0
  206. package/dist/mermaid/runtime.d.ts +14 -0
  207. package/dist/mermaid/sanitize-svg-lazy.d.ts +10 -0
  208. package/dist/mermaid/sanitize-svg.d.ts +3 -0
  209. package/dist/mermaid/sanitize.d.ts +16 -0
  210. package/dist/node-components.d.ts +1 -0
  211. package/dist/node-components.js +39 -0
  212. package/dist/pipeline/custom.d.ts +8 -0
  213. package/dist/pipeline/identity.d.ts +12 -0
  214. package/dist/pipeline/index.d.ts +5 -0
  215. package/dist/pipeline/official.d.ts +6 -0
  216. package/dist/pipeline.d.ts +1 -0
  217. package/dist/pipeline.js +1 -0
  218. package/dist/plugins/builtin.d.ts +15 -0
  219. package/dist/plugins/define.d.ts +7 -0
  220. package/dist/plugins/registry.d.ts +16 -0
  221. package/dist/plugins/source.d.ts +7 -0
  222. package/dist/plugins.d.ts +3 -0
  223. package/dist/plugins.js +1 -0
  224. package/dist/presets.d.ts +3 -0
  225. package/dist/presets.js +1 -0
  226. package/dist/style.css +2 -0
  227. package/dist/styles/components.css +737 -0
  228. package/dist/styles/index.d.ts +1 -0
  229. package/dist/styles/math-full.css +3 -0
  230. package/dist/styles/math.css +18 -0
  231. package/dist/styles/tokens.css +96 -0
  232. package/package.json +214 -6
@@ -0,0 +1,49 @@
1
+ import { t as e } from "./objectSpread2-CtBNx0TF.js";
2
+ import { i as t, r as n } from "./preset-BjaOuJUL.js";
3
+ import { n as r, r as i } from "./config-aRYo2R8_.js";
4
+ import { computed as a, defineComponent as o, renderSlot as s } from "vue";
5
+ // src/components/MarkdownConfigProvider.vue
6
+ var c = /* @__PURE__ */ o(e(e({}, { name: "MarkdownConfigProvider" }), {}, {
7
+ __name: "MarkdownConfigProvider",
8
+ props: {
9
+ theme: {},
10
+ tokens: {},
11
+ labels: {},
12
+ components: {},
13
+ regions: {},
14
+ nodeComponents: {},
15
+ plugins: {},
16
+ pipeline: {},
17
+ highlighter: {},
18
+ mathEngine: {},
19
+ mermaidRenderer: {},
20
+ diagnosticsFormatter: {},
21
+ slugger: {},
22
+ urlTransform: { type: Function },
23
+ config: {},
24
+ preset: {}
25
+ },
26
+ setup(e) {
27
+ let o = e, c = i(), l = a(() => {
28
+ let e = n(o.preset), r = {
29
+ theme: o.theme,
30
+ tokens: o.tokens,
31
+ labels: o.labels,
32
+ components: o.components,
33
+ regions: o.regions,
34
+ nodeComponents: o.nodeComponents,
35
+ plugins: o.plugins,
36
+ pipeline: o.pipeline,
37
+ highlighter: o.highlighter,
38
+ mathEngine: o.mathEngine,
39
+ mermaidRenderer: o.mermaidRenderer,
40
+ diagnosticsFormatter: o.diagnosticsFormatter,
41
+ slugger: o.slugger,
42
+ urlTransform: o.urlTransform
43
+ };
44
+ return t(t(e, o.config), r);
45
+ }), u = a(() => t(c.value, l.value));
46
+ return r(u), (e, t) => s(e.$slots, "default");
47
+ }
48
+ }));
49
+ export { c as t };
@@ -0,0 +1,13 @@
1
+ import { createElementBlock as e, defineComponent as t, openBlock as n, renderSlot as r } from "vue";
2
+ // src/components/MarkdownContent.vue?vue&type=script&setup=true&lang.ts
3
+ var i = {
4
+ "data-vmd-part": "content",
5
+ class: "vmd-content"
6
+ }, a = /* @__PURE__ */ t({
7
+ __name: "MarkdownContent",
8
+ props: { nodes: {} },
9
+ setup(t) {
10
+ return (t, a) => (n(), e("div", i, [r(t.$slots, "default")]));
11
+ }
12
+ });
13
+ export { a as t };
@@ -0,0 +1,46 @@
1
+ import { i as e } from "./normalize-VKfQXZiK.js";
2
+ import { t } from "./objectSpread2-CtBNx0TF.js";
3
+ import { r as n } from "./context-8NfW6fxI.js";
4
+ import { computed as r, createBlock as i, defineComponent as a, mergeProps as o, openBlock as s, renderSlot as c, resolveDynamicComponent as l, withCtx as u } from "vue";
5
+ // src/components/MarkdownCustomTag.vue
6
+ var d = /* @__PURE__ */ a(t(t({}, {
7
+ name: "MarkdownCustomTag",
8
+ inheritAttrs: !1
9
+ }), {}, {
10
+ __name: "MarkdownCustomTag",
11
+ props: {
12
+ node: {},
13
+ children: {},
14
+ tag: {},
15
+ customProps: {}
16
+ },
17
+ setup(a) {
18
+ let d = a, f = n(), p = r(() => {
19
+ var e;
20
+ return (e = d.tag) == null ? d.node.tag : e;
21
+ }), m = r(() => f.components[p.value]), h = r(() => {
22
+ let e = m.value;
23
+ return typeof e == "string" || typeof e == "object" || typeof e == "function" ? e : "span";
24
+ }), g = r(() => {
25
+ var n;
26
+ return t(t(t({}, e(d.node.attrs)), d.node.props), (n = d.customProps) == null ? {} : n);
27
+ });
28
+ function _(e) {
29
+ f.onCustomTagClick({
30
+ tag: p.value,
31
+ props: g.value,
32
+ node: d.node,
33
+ event: e
34
+ });
35
+ }
36
+ return (e, t) => (s(), i(l(h.value), o(g.value, {
37
+ "data-vmd-part": "custom-tag",
38
+ class: "vmd-custom-tag",
39
+ onClick: _
40
+ }), {
41
+ default: u(() => [c(e.$slots, "default")]),
42
+ _: 3
43
+ }, 16));
44
+ }
45
+ }));
46
+ export { d as t };
@@ -0,0 +1,16 @@
1
+ import { createElementBlock as e, defineComponent as t, openBlock as n, renderSlot as r } from "vue";
2
+ // src/components/MarkdownEmphasis.vue?vue&type=script&setup=true&lang.ts
3
+ var i = {
4
+ "data-vmd-part": "emphasis",
5
+ class: "vmd-emphasis"
6
+ }, a = /* @__PURE__ */ t({
7
+ __name: "MarkdownEmphasis",
8
+ props: {
9
+ node: {},
10
+ children: {}
11
+ },
12
+ setup(t) {
13
+ return (t, a) => (n(), e("em", i, [r(t.$slots, "default")]));
14
+ }
15
+ });
16
+ export { a as t };
@@ -0,0 +1,14 @@
1
+ import { createElementBlock as e, defineComponent as t, openBlock as n, toDisplayString as r } from "vue";
2
+ // src/components/MarkdownEmpty.vue?vue&type=script&setup=true&lang.ts
3
+ var i = {
4
+ "data-vmd-part": "empty",
5
+ class: "vmd-empty",
6
+ role: "status"
7
+ }, a = /* @__PURE__ */ t({
8
+ __name: "MarkdownEmpty",
9
+ props: { label: { default: "No content" } },
10
+ setup(t) {
11
+ return (a, o) => (n(), e("div", i, r(t.label), 1));
12
+ }
13
+ });
14
+ export { a as t };
@@ -0,0 +1,17 @@
1
+ import { Fragment as e, createCommentVNode as t, createElementBlock as n, createElementVNode as r, defineComponent as i, openBlock as a, renderList as o, toDisplayString as s } from "vue";
2
+ // src/components/MarkdownError.vue?vue&type=script&setup=true&lang.ts
3
+ var c = {
4
+ "data-vmd-part": "error",
5
+ class: "vmd-error",
6
+ role: "alert"
7
+ }, l = { key: 0 }, u = /* @__PURE__ */ i({
8
+ __name: "MarkdownError",
9
+ props: {
10
+ diagnostics: { default: () => [] },
11
+ label: { default: "The Markdown document could not be rendered." }
12
+ },
13
+ setup(i) {
14
+ return (u, d) => (a(), n("div", c, [r("p", null, s(i.label), 1), i.diagnostics.length > 0 ? (a(), n("ul", l, [(a(!0), n(e, null, o(i.diagnostics, (e, t) => (a(), n("li", { key: `${e.code}-${t}` }, s(e.message), 1))), 128))])) : t("", !0)]));
15
+ }
16
+ });
17
+ export { u as t };
@@ -0,0 +1,22 @@
1
+ import { n as e } from "./labels-BtHiUTQI.js";
2
+ import { r as t } from "./context-8NfW6fxI.js";
3
+ import { computed as n, createElementBlock as r, defineComponent as i, openBlock as a, renderSlot as o } from "vue";
4
+ // src/components/MarkdownFootnoteReference.vue?vue&type=script&setup=true&lang.ts
5
+ var s = ["data-state", "aria-label"], c = /* @__PURE__ */ i({
6
+ __name: "MarkdownFootnoteReference",
7
+ props: {
8
+ node: {},
9
+ children: {},
10
+ missing: { type: Boolean }
11
+ },
12
+ setup(i) {
13
+ let c = i, l = t(), u = n(() => e(l.labels.footnoteReference, { node: c.node })), d = n(() => c.missing ? "missing" : "ready");
14
+ return (e, t) => (a(), r("sup", {
15
+ "data-vmd-part": "footnote-reference",
16
+ class: "vmd-footnote-reference",
17
+ "data-state": d.value,
18
+ "aria-label": u.value
19
+ }, [o(e.$slots, "default")], 8, s));
20
+ }
21
+ });
22
+ export { c as t };
@@ -0,0 +1,21 @@
1
+ import { n as e } from "./labels-BtHiUTQI.js";
2
+ import { r as t } from "./context-8NfW6fxI.js";
3
+ import { computed as n, createElementBlock as r, defineComponent as i, openBlock as a, renderSlot as o } from "vue";
4
+ // src/components/MarkdownFootnotes.vue?vue&type=script&setup=true&lang.ts
5
+ var s = ["aria-label"], c = /* @__PURE__ */ i({
6
+ __name: "MarkdownFootnotes",
7
+ props: {
8
+ node: {},
9
+ children: {}
10
+ },
11
+ setup(i) {
12
+ let c = i, l = t(), u = n(() => e(l.labels.footnotes, { node: c.node }));
13
+ return (e, t) => (a(), r("section", {
14
+ "data-vmd-part": "footnotes",
15
+ class: "vmd-footnotes",
16
+ role: "doc-endnotes",
17
+ "aria-label": u.value
18
+ }, [o(e.$slots, "default")], 8, s));
19
+ }
20
+ });
21
+ export { c as t };
@@ -0,0 +1,29 @@
1
+ import { n as e } from "./labels-BtHiUTQI.js";
2
+ import { r as t } from "./context-8NfW6fxI.js";
3
+ import { computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, defineComponent as s, normalizeClass as c, openBlock as l, renderSlot as u, resolveDynamicComponent as d, withCtx as f } from "vue";
4
+ // src/components/MarkdownHeading.vue?vue&type=script&setup=true&lang.ts
5
+ var p = ["href", "aria-label"], m = /* @__PURE__ */ s({
6
+ __name: "MarkdownHeading",
7
+ props: {
8
+ node: {},
9
+ children: {}
10
+ },
11
+ setup(s) {
12
+ let m = s, h = t(), g = n(() => m.node.kind === "element" && /^h[1-6]$/.test(m.node.tag) ? m.node.tag : "h1"), _ = n(() => Number(g.value.slice(1))), v = n(() => m.node.kind === "element" ? m.node.attrs.id : void 0), y = n(() => e(h.labels.headingAnchor, { id: v.value }));
13
+ return (e, t) => (l(), r(d(g.value), {
14
+ id: v.value,
15
+ "data-vmd-part": "heading",
16
+ class: c(["vmd-heading", `vmd-heading-${_.value}`])
17
+ }, {
18
+ default: f(() => [u(e.$slots, "default"), v.value ? (l(), a("a", {
19
+ key: 0,
20
+ "data-vmd-part": "heading-anchor",
21
+ class: "vmd-heading-anchor",
22
+ href: `#${v.value}`,
23
+ "aria-label": y.value
24
+ }, [...t[0] || (t[0] = [o("span", { "aria-hidden": "true" }, "#", -1)])], 8, p)) : i("", !0)]),
25
+ _: 3
26
+ }, 8, ["id", "class"]));
27
+ }
28
+ });
29
+ export { m as t };
@@ -0,0 +1,16 @@
1
+ import { createElementBlock as e, defineComponent as t, openBlock as n } from "vue";
2
+ // src/components/MarkdownHorizontalRule.vue?vue&type=script&setup=true&lang.ts
3
+ var r = {
4
+ "data-vmd-part": "hr",
5
+ class: "vmd-hr"
6
+ }, i = /* @__PURE__ */ t({
7
+ __name: "MarkdownHorizontalRule",
8
+ props: {
9
+ node: {},
10
+ children: {}
11
+ },
12
+ setup(t) {
13
+ return (t, i) => (n(), e("hr", r));
14
+ }
15
+ });
16
+ export { i as t };
@@ -0,0 +1,13 @@
1
+ import { createElementBlock as e, defineComponent as t, openBlock as n, toDisplayString as r } from "vue";
2
+ // src/components/MarkdownHtml.vue?vue&type=script&setup=true&lang.ts
3
+ var i = {
4
+ "data-vmd-part": "html",
5
+ class: "vmd-html"
6
+ }, a = /* @__PURE__ */ t({
7
+ __name: "MarkdownHtml",
8
+ props: { value: { default: "" } },
9
+ setup(t) {
10
+ return (a, o) => (n(), e("span", i, r(t.value), 1));
11
+ }
12
+ });
13
+ export { a as t };
@@ -0,0 +1,51 @@
1
+ import { createElementBlock as e, defineComponent as t, openBlock as n, ref as r, toDisplayString as i } from "vue";
2
+ // src/components/MarkdownImage.vue?vue&type=script&setup=true&lang.ts
3
+ var a = [
4
+ "src",
5
+ "alt",
6
+ "title",
7
+ "width",
8
+ "height",
9
+ "loading",
10
+ "decoding"
11
+ ], o = {
12
+ key: 1,
13
+ "data-vmd-part": "image",
14
+ class: "vmd-image vmd-image-fallback"
15
+ }, s = /* @__PURE__ */ t({
16
+ __name: "MarkdownImage",
17
+ props: {
18
+ node: {},
19
+ children: {},
20
+ src: {},
21
+ alt: {},
22
+ title: {},
23
+ width: {},
24
+ height: {},
25
+ loading: {},
26
+ decoding: {}
27
+ },
28
+ setup(t) {
29
+ let s = t, c = r(!1);
30
+ function l() {
31
+ c.value = !0;
32
+ }
33
+ return (r, u) => {
34
+ var d, f, p;
35
+ return c.value ? (n(), e("span", o, i(t.alt || s.src), 1)) : (n(), e("img", {
36
+ key: 0,
37
+ "data-vmd-part": "image",
38
+ class: "vmd-image",
39
+ src: t.src,
40
+ alt: (d = t.alt) == null ? "" : d,
41
+ title: t.title,
42
+ width: t.width,
43
+ height: t.height,
44
+ loading: (f = t.loading) == null ? "lazy" : f,
45
+ decoding: (p = t.decoding) == null ? "async" : p,
46
+ onError: l
47
+ }, null, 40, a));
48
+ };
49
+ }
50
+ });
51
+ export { s as t };
@@ -0,0 +1,16 @@
1
+ import { createElementBlock as e, defineComponent as t, openBlock as n, renderSlot as r } from "vue";
2
+ // src/components/MarkdownInlineCode.vue?vue&type=script&setup=true&lang.ts
3
+ var i = {
4
+ "data-vmd-part": "inline-code",
5
+ class: "vmd-inline-code"
6
+ }, a = /* @__PURE__ */ t({
7
+ __name: "MarkdownInlineCode",
8
+ props: {
9
+ node: {},
10
+ children: {}
11
+ },
12
+ setup(t) {
13
+ return (t, a) => (n(), e("code", i, [r(t.$slots, "default")]));
14
+ }
15
+ });
16
+ export { a as t };
@@ -0,0 +1,45 @@
1
+ import { n as e } from "./url-D2BoivaE.js";
2
+ import { r as t } from "./context-8NfW6fxI.js";
3
+ import { computed as n, createElementBlock as r, defineComponent as i, openBlock as a, renderSlot as o } from "vue";
4
+ // src/components/MarkdownLink.vue?vue&type=script&setup=true&lang.ts
5
+ var s = [
6
+ "href",
7
+ "target",
8
+ "rel",
9
+ "title"
10
+ ], c = /* @__PURE__ */ i({
11
+ __name: "MarkdownLink",
12
+ props: {
13
+ node: {},
14
+ children: {},
15
+ href: {},
16
+ target: {},
17
+ rel: {},
18
+ title: {}
19
+ },
20
+ setup(i) {
21
+ let c = i, l = t(), u = n(() => {
22
+ var t;
23
+ return c.href && l.externalLinkTarget === "_blank" && e(c.href) ? "_blank" : (t = c.target) == null ? l.linkTarget : t;
24
+ }), d = n(() => c.rel ? c.rel : u.value === "_blank" ? "noopener noreferrer" : void 0);
25
+ function f(e) {
26
+ var t;
27
+ l.onLinkClick({
28
+ url: (t = c.href) == null ? "" : t,
29
+ target: u.value,
30
+ node: c.node,
31
+ event: e
32
+ });
33
+ }
34
+ return (e, t) => (a(), r("a", {
35
+ "data-vmd-part": "link",
36
+ class: "vmd-link",
37
+ href: i.href,
38
+ target: u.value,
39
+ rel: d.value,
40
+ title: i.title,
41
+ onClick: f
42
+ }, [o(e.$slots, "default")], 8, s));
43
+ }
44
+ });
45
+ export { c as t };
@@ -0,0 +1,20 @@
1
+ import { computed as e, createBlock as t, defineComponent as n, openBlock as r, renderSlot as i, resolveDynamicComponent as a, withCtx as o } from "vue";
2
+ // src/components/MarkdownList.vue
3
+ var s = /* @__PURE__ */ n({
4
+ __name: "MarkdownList",
5
+ props: {
6
+ node: {},
7
+ children: {}
8
+ },
9
+ setup(n) {
10
+ let s = n, c = e(() => s.node.kind === "element" && (s.node.tag === "ol" || s.node.tag === "ul") ? s.node.tag : "ul");
11
+ return (e, n) => (r(), t(a(c.value), {
12
+ "data-vmd-part": "list",
13
+ class: "vmd-list"
14
+ }, {
15
+ default: o(() => [i(e.$slots, "default")]),
16
+ _: 3
17
+ }));
18
+ }
19
+ });
20
+ export { s as t };
@@ -0,0 +1,16 @@
1
+ import { createElementBlock as e, defineComponent as t, openBlock as n, renderSlot as r } from "vue";
2
+ // src/components/MarkdownListItem.vue?vue&type=script&setup=true&lang.ts
3
+ var i = {
4
+ "data-vmd-part": "list-item",
5
+ class: "vmd-list-item"
6
+ }, a = /* @__PURE__ */ t({
7
+ __name: "MarkdownListItem",
8
+ props: {
9
+ node: {},
10
+ children: {}
11
+ },
12
+ setup(t) {
13
+ return (t, a) => (n(), e("li", i, [r(t.$slots, "default")]));
14
+ }
15
+ });
16
+ export { a as t };
@@ -0,0 +1,15 @@
1
+ import { createElementBlock as e, defineComponent as t, openBlock as n, toDisplayString as r } from "vue";
2
+ // src/components/MarkdownLoading.vue?vue&type=script&setup=true&lang.ts
3
+ var i = {
4
+ "data-vmd-part": "loading",
5
+ class: "vmd-loading",
6
+ role: "status",
7
+ "aria-live": "polite"
8
+ }, a = /* @__PURE__ */ t({
9
+ __name: "MarkdownLoading",
10
+ props: { label: { default: "Loading…" } },
11
+ setup(t) {
12
+ return (a, o) => (n(), e("div", i, r(t.label), 1));
13
+ }
14
+ });
15
+ export { a as t };
@@ -0,0 +1,16 @@
1
+ import { createElementBlock as e, defineComponent as t, openBlock as n, renderSlot as r } from "vue";
2
+ // src/components/MarkdownParagraph.vue?vue&type=script&setup=true&lang.ts
3
+ var i = {
4
+ "data-vmd-part": "paragraph",
5
+ class: "vmd-paragraph"
6
+ }, a = /* @__PURE__ */ t({
7
+ __name: "MarkdownParagraph",
8
+ props: {
9
+ node: {},
10
+ children: {}
11
+ },
12
+ setup(t) {
13
+ return (t, a) => (n(), e("p", i, [r(t.$slots, "default")]));
14
+ }
15
+ });
16
+ export { a as t };