@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,482 @@
1
+ import { n as e, t } from "./labels-BtHiUTQI.js";
2
+ import { t as n } from "./diagnostics-CtHoJyiX.js";
3
+ import { r } from "./normalize-VKfQXZiK.js";
4
+ import { t as i } from "./objectSpread2-CtBNx0TF.js";
5
+ import { n as a, r as ee, t as o } from "./useActiveHeading-CnyGTG1u.js";
6
+ import { h as s } from "./registry-B7BfEkuy.js";
7
+ import { i as c, r as l } from "./preset-BjaOuJUL.js";
8
+ import { a as u, i as d, n as te, o as ne, r as re, t as ie } from "./adapters-CMwX_NEI.js";
9
+ import { r as ae } from "./config-aRYo2R8_.js";
10
+ import { n as oe, r as f, t as se } from "./context-8NfW6fxI.js";
11
+ import { t as ce } from "./render-DAqK0w5J.js";
12
+ import { t as le } from "./MarkdownContent-BAK6dqo7.js";
13
+ import { t as ue } from "./MarkdownEmpty-Av5k6bqa.js";
14
+ import { t as de } from "./MarkdownError-C0sPs5W0.js";
15
+ import { t as fe } from "./MarkdownLoading-D-RYtXxf.js";
16
+ import { t as pe } from "./MarkdownRoot-DEE6iVfh.js";
17
+ import { t as me } from "./MarkdownToc-DHWWoH6t.js";
18
+ import { computed as p, createBlock as m, createCommentVNode as h, createElementBlock as he, createElementVNode as ge, createSlots as _e, createVNode as ve, defineComponent as g, getCurrentInstance as ye, guardReactiveProps as _, normalizeProps as v, onUnmounted as be, onUpdated as xe, openBlock as y, provide as Se, ref as b, renderSlot as x, resolveDynamicComponent as S, shallowReactive as Ce, toRaw as C, unref as w, useSlots as we, watch as T, withCtx as E } from "vue";
19
+ // src/components/MarkdownChildren.ts
20
+ var Te = g({
21
+ name: "MarkdownChildren",
22
+ props: { nodes: {
23
+ type: Array,
24
+ default: () => []
25
+ } },
26
+ setup(e) {
27
+ let t = f();
28
+ return () => ce(e.nodes, t);
29
+ }
30
+ }), Ee = {
31
+ key: 0,
32
+ "data-vmd-part": "toc-column",
33
+ class: "vmd-toc-column"
34
+ }, De = {
35
+ "data-vmd-part": "body",
36
+ class: "vmd-body"
37
+ }, D = /* @__PURE__ */ g(i(i({}, { name: "MarkdownRenderer" }), {}, {
38
+ __name: "MarkdownRenderer",
39
+ props: {
40
+ source: { default: "" },
41
+ components: { default: void 0 },
42
+ regions: { default: void 0 },
43
+ nodeComponents: { default: void 0 },
44
+ labels: { default: void 0 },
45
+ preset: { default: void 0 },
46
+ plugins: { default: void 0 },
47
+ disablePlugins: { default: () => [] },
48
+ remarkPlugins: { default: () => [] },
49
+ rehypePlugins: { default: () => [] },
50
+ remarkRehypeOptions: { default: void 0 },
51
+ pipeline: { default: void 0 },
52
+ slugger: { default: void 0 },
53
+ highlighter: { default: void 0 },
54
+ mathEngine: { default: void 0 },
55
+ mermaidRenderer: { default: void 0 },
56
+ diagnosticsFormatter: { default: void 0 },
57
+ allowedElements: { default: void 0 },
58
+ disallowedElements: { default: void 0 },
59
+ unwrapDisallowed: {
60
+ type: Boolean,
61
+ default: !1
62
+ },
63
+ allowElement: {
64
+ type: Function,
65
+ default: void 0
66
+ },
67
+ urlTransform: {
68
+ type: Function,
69
+ default: void 0
70
+ },
71
+ linkTarget: { default: "_self" },
72
+ externalLinkTarget: { default: "_self" },
73
+ baseUrl: { default: void 0 },
74
+ idPrefix: { default: "" },
75
+ syncHash: {
76
+ type: Boolean,
77
+ default: !1
78
+ },
79
+ toc: {
80
+ type: Boolean,
81
+ default: !1
82
+ },
83
+ tocDepth: { default: 0 },
84
+ tocPlacement: { default: "top" },
85
+ search: { default: "" },
86
+ searchCaseSensitive: {
87
+ type: Boolean,
88
+ default: !1
89
+ },
90
+ searchDebounce: { default: 0 },
91
+ showError: {
92
+ type: Boolean,
93
+ default: !0
94
+ },
95
+ tokens: { default: void 0 },
96
+ theme: { default: void 0 },
97
+ as: { default: "div" }
98
+ },
99
+ emits: [
100
+ "update:source",
101
+ "toc-change",
102
+ "link-click",
103
+ "custom-tag-click",
104
+ "task-change",
105
+ "search-change",
106
+ "math-error",
107
+ "render-error",
108
+ "ready"
109
+ ],
110
+ setup(f, { expose: ce, emit: g }) {
111
+ function D(e) {
112
+ return e === "_self" || e === "_blank";
113
+ }
114
+ function Oe(e) {
115
+ return e === "light" || e === "dark" || e === "auto" || e === "custom";
116
+ }
117
+ function ke(e) {
118
+ return e === "top" || e === "left" || e === "right" || e === "hidden";
119
+ }
120
+ function O(e, t) {
121
+ return typeof e == "boolean" ? e : t;
122
+ }
123
+ function Ae(e, t = "") {
124
+ return typeof e == "string" ? e : t;
125
+ }
126
+ function je(e) {
127
+ return typeof e == "number" && Number.isFinite(e) && e >= 0 ? e : 0;
128
+ }
129
+ function Me(e) {
130
+ return typeof e == "number" && Number.isFinite(e) && e >= 0 ? e : 0;
131
+ }
132
+ let k = f, A = g, Ne = p(() => D(k.externalLinkTarget) ? k.externalLinkTarget : "_self"), Pe = p(() => Oe(k.theme) ? k.theme : void 0), Fe = p(() => Ae(k.linkTarget, "_self") || "_self"), Ie = p(() => Ae(k.baseUrl)), Le = p(() => Ae(k.idPrefix)), Re = p(() => O(k.syncHash, !1)), ze = p(() => O(k.toc, !1)), j = p(() => je(k.tocDepth)), M = p(() => ke(k.tocPlacement) ? k.tocPlacement : "top"), N = p(() => O(k.searchCaseSensitive, !1)), Be = p(() => Me(k.searchDebounce)), Ve = p(() => O(k.showError, !0)), P = we(), F = ye(), He = b();
133
+ function Ue() {
134
+ var e;
135
+ let t = He.value;
136
+ if (t && t.nodeType === 1) return t;
137
+ let n = F == null || (e = F.proxy) == null ? void 0 : e.$el;
138
+ return n && n.nodeType === 1 ? n : void 0;
139
+ }
140
+ function We(e) {
141
+ if (typeof e == "string" || typeof e == "number") return String(e);
142
+ if (!e || typeof e != "object") return "";
143
+ let t = e.children;
144
+ return typeof t == "string" ? t : Array.isArray(t) ? t.map(We).join("") : "";
145
+ }
146
+ function Ge() {
147
+ let e = F == null ? void 0 : F.vnode.children, t = e && typeof e == "object" && !Array.isArray(e) ? e.default : void 0, n = typeof t == "function" ? t : P.default, r = n == null ? void 0 : n();
148
+ return (Array.isArray(r) ? r : [r]).map(We).join("");
149
+ }
150
+ let I = b(Ge());
151
+ xe(() => {
152
+ let e = Ge();
153
+ e !== I.value && (I.value = e);
154
+ });
155
+ let Ke = p(() => k.source !== void 0 && k.source !== null && typeof k.source != "string"), qe = p(() => Ke.value ? "" : k.source || I.value), Je = p(() => typeof k.search == "string" ? k.search.trim() : ""), L = b(Je.value), R;
156
+ T([Je, Be], ([e, t]) => {
157
+ R !== void 0 && (clearTimeout(R), R = void 0), e !== L.value && (t <= 0 || typeof window > "u" ? L.value = e : R = setTimeout(() => {
158
+ R = void 0, L.value = e;
159
+ }, t));
160
+ }), be(() => {
161
+ R !== void 0 && clearTimeout(R), R = void 0;
162
+ });
163
+ let Ye = ae(), Xe = p(() => l(k.preset)), Ze = p(() => ({
164
+ theme: Pe.value,
165
+ tokens: k.tokens ? C(k.tokens) : void 0,
166
+ labels: k.labels ? C(k.labels) : void 0,
167
+ components: k.components ? C(k.components) : void 0,
168
+ regions: k.regions ? C(k.regions) : void 0,
169
+ nodeComponents: k.nodeComponents ? C(k.nodeComponents) : void 0,
170
+ plugins: k.plugins ? C(k.plugins) : void 0,
171
+ pipeline: k.pipeline,
172
+ highlighter: k.highlighter,
173
+ mathEngine: k.mathEngine,
174
+ mermaidRenderer: k.mermaidRenderer,
175
+ diagnosticsFormatter: k.diagnosticsFormatter,
176
+ slugger: k.slugger,
177
+ urlTransform: k.urlTransform
178
+ })), z = p(() => c(c(Xe.value, Ye.value), Ze.value)), Qe = p(() => te(z.value.highlighter) ? z.value.highlighter : void 0), $e = p(() => re(z.value.mathEngine) ? z.value.mathEngine : void 0), et = p(() => d(z.value.mermaidRenderer) ? z.value.mermaidRenderer : void 0), tt = p(() => ie(z.value.diagnosticsFormatter) ? z.value.diagnosticsFormatter : void 0), nt = p(() => u(z.value.slugger) ? z.value.slugger : void 0), rt = p(() => ne(z.value.urlTransform) ? z.value.urlTransform : void 0), it = p(() => ({
179
+ components: z.value.components ? C(z.value.components) : void 0,
180
+ plugins: z.value.plugins ? C(z.value.plugins) : void 0,
181
+ disablePlugins: k.disablePlugins,
182
+ remarkPlugins: k.remarkPlugins,
183
+ rehypePlugins: k.rehypePlugins,
184
+ remarkRehypeOptions: k.remarkRehypeOptions,
185
+ pipeline: z.value.pipeline,
186
+ slugger: nt.value,
187
+ allowedElements: k.allowedElements,
188
+ disallowedElements: k.disallowedElements,
189
+ unwrapDisallowed: k.unwrapDisallowed,
190
+ allowElement: k.allowElement,
191
+ urlTransform: rt.value,
192
+ baseUrl: Ie.value,
193
+ idPrefix: Le.value,
194
+ search: L.value ? {
195
+ query: L.value,
196
+ caseSensitive: N.value
197
+ } : void 0
198
+ })), { document: B, toc: at, status: V, diagnostics: H, refresh: U, resolvedComponents: ot, resolvedNodeComponents: st, resolvedRegions: ct, resolvedLabels: lt, resolvedTokens: ut } = ee(qe, it), W = p(() => r(at.value, j.value)), G = b(null);
199
+ T(B, (e) => {
200
+ G.value = e ? {
201
+ query: L.value,
202
+ caseSensitive: N.value
203
+ } : null;
204
+ }, { immediate: !0 });
205
+ let dt = p(() => G.value !== null && G.value.query === L.value && (!L.value || G.value.caseSensitive === N.value)), ft = p(() => {
206
+ var e, t;
207
+ return {
208
+ query: L.value,
209
+ caseSensitive: N.value,
210
+ matches: dt.value && L.value ? s((e = (t = B.value) == null ? void 0 : t.nodes) == null ? [] : e) : 0
211
+ };
212
+ }), K = p(() => {
213
+ var e;
214
+ return i(i(i({}, t), lt.value), (e = z.value.labels) == null ? {} : e);
215
+ }), pt = p(() => {
216
+ var e;
217
+ return (e = z.value.components) == null ? {} : e;
218
+ }), mt = p(() => {
219
+ var e;
220
+ return (e = z.value.nodeComponents) == null ? {} : e;
221
+ }), ht = p(() => {
222
+ var e;
223
+ return (e = z.value.tokens) == null ? {} : e;
224
+ }), gt = p(() => {
225
+ var e;
226
+ return (e = z.value.regions) == null ? {} : e;
227
+ }), _t = p(() => i(i({}, ot.value), pt.value)), vt = p(() => {
228
+ let e = pt.value, t = i({}, st.value);
229
+ for (let n of Object.keys(e)) e[n] !== void 0 && delete t[n];
230
+ return i(i({}, t), mt.value);
231
+ }), yt = p(() => i(i({}, ut.value), ht.value)), q = p(() => i(i({}, ct.value), gt.value)), bt = p(() => !!(P.toc || q.value.toc)), J = p(() => ze.value && W.value.length > 0 && (M.value !== "hidden" || bt.value)), xt = p(() => J.value && (M.value === "left" || M.value === "right")), Y = p(() => Oe(z.value.theme) ? z.value.theme : "light"), St = p(() => {
232
+ var e;
233
+ return (e = q.value.root) == null ? pe : e;
234
+ }), Ct = p(() => {
235
+ var e;
236
+ return (e = q.value.content) == null ? le : e;
237
+ }), wt = p(() => {
238
+ var e;
239
+ return (e = q.value.toc) == null ? me : e;
240
+ }), Tt = p(() => {
241
+ var e;
242
+ return (e = q.value.error) == null ? de : e;
243
+ }), Et = p(() => {
244
+ var e;
245
+ return (e = q.value.empty) == null ? ue : e;
246
+ }), Dt = p(() => {
247
+ var e;
248
+ return (e = q.value.loading) == null ? fe : e;
249
+ }), Ot = p(() => e(K.value.toc)), kt = p(() => e(K.value.loading)), At = p(() => e(K.value.empty)), jt = p(() => e(K.value.error, { count: H.value.length })), X = Ce({
250
+ components: _t.value,
251
+ nodeComponents: vt.value,
252
+ regions: q.value,
253
+ document: B.value,
254
+ theme: Y.value,
255
+ labels: K.value,
256
+ linkTarget: Fe.value,
257
+ externalLinkTarget: Ne.value,
258
+ highlighter: Qe.value,
259
+ mathEngine: $e.value,
260
+ mermaidRenderer: et.value,
261
+ diagnosticsFormatter: tt.value,
262
+ slots: P,
263
+ renderHostSlot(e, t, n) {
264
+ let r = P[e];
265
+ if (!r) return n();
266
+ let i = r(t);
267
+ return oe(i) ? n() : i;
268
+ },
269
+ onLinkClick(e) {
270
+ A("link-click", e);
271
+ },
272
+ onCustomTagClick(e) {
273
+ A("custom-tag-click", e);
274
+ },
275
+ onTaskChange(e) {
276
+ A("task-change", e);
277
+ },
278
+ onMathError(e) {
279
+ A("math-error", e);
280
+ },
281
+ onRenderError(e) {
282
+ A("render-error", e);
283
+ }
284
+ });
285
+ T(_t, (e) => {
286
+ X.components = e;
287
+ }), T(vt, (e) => {
288
+ X.nodeComponents = e;
289
+ }), T(q, (e) => {
290
+ X.regions = e;
291
+ }), T(B, (e) => {
292
+ X.document = e;
293
+ }), T(Y, (e) => {
294
+ X.theme = e;
295
+ }), T(K, (e) => {
296
+ X.labels = e;
297
+ }), T([
298
+ Qe,
299
+ $e,
300
+ et,
301
+ tt
302
+ ], ([e, t, n, r]) => {
303
+ X.highlighter = e, X.mathEngine = t, X.mermaidRenderer = n, X.diagnosticsFormatter = r;
304
+ }), T([Fe, Ne], ([e, t]) => {
305
+ X.linkTarget = e, X.externalLinkTarget = t;
306
+ }), Se(se, X);
307
+ let Mt = a(p(() => W.value.map((e) => e.id)), p(() => J.value), { root: Ue }), Nt = p(() => {
308
+ var e, t;
309
+ return {
310
+ nodes: (e = (t = B.value) == null ? void 0 : t.nodes) == null ? [] : e,
311
+ document: B.value
312
+ };
313
+ }), Pt = p(() => ({
314
+ items: W.value,
315
+ activeId: Mt.value,
316
+ label: Ot.value,
317
+ tocDepth: j.value,
318
+ navigate: Z
319
+ })), Ft = p(() => ({
320
+ diagnostics: H.value,
321
+ label: jt.value,
322
+ retry: U
323
+ })), It = p(() => ({ label: At.value })), Lt = p(() => ({ label: kt.value })), Rt = p(() => ({
324
+ document: B.value,
325
+ toc: W.value,
326
+ status: V.value,
327
+ diagnostics: H.value,
328
+ tokens: yt.value,
329
+ theme: Y.value,
330
+ actions: {
331
+ scrollToHeading: Z,
332
+ getDocument: () => B.value,
333
+ getToc: () => W.value,
334
+ refresh: U
335
+ }
336
+ }));
337
+ function Z(e, t) {
338
+ if (typeof document > "u") return;
339
+ let n = Ue(), r = o(n == null ? document : n, e);
340
+ r && (r.scrollIntoView(t == null ? {
341
+ behavior: "smooth",
342
+ block: "start"
343
+ } : t), Re.value && typeof history < "u" && history.replaceState(null, "", `#${e}`));
344
+ }
345
+ let zt = !1;
346
+ T(B, (e) => {
347
+ e && !zt && (zt = !0, A("ready", e));
348
+ }, { immediate: !0 });
349
+ function Bt(e, t) {
350
+ if (e.length !== t.length) return !1;
351
+ for (let n = 0; n < e.length; n += 1) {
352
+ let r = e[n], i = t[n];
353
+ if (!r || !i || r.id !== i.id || r.text !== i.text || r.level !== i.level) return !1;
354
+ }
355
+ return !0;
356
+ }
357
+ let Q;
358
+ T(W, (e) => {
359
+ Q === void 0 && !B.value && e.length === 0 || Q && Bt(Q, e) || (Q = e.map((e) => ({
360
+ id: e.id,
361
+ text: e.text,
362
+ level: e.level
363
+ })), A("toc-change", e));
364
+ }, { immediate: !0 });
365
+ let Vt;
366
+ T(ft, (e) => {
367
+ if (!dt.value) return;
368
+ let t = `${e.query}\u001f${e.caseSensitive ? "1" : "0"}\u001f${e.matches}`, n = Vt;
369
+ Vt = t, n !== t && (n !== void 0 || e.query) && A("search-change", e);
370
+ }, { immediate: !0 });
371
+ let Ht = /* @__PURE__ */ new Set();
372
+ T(H, (e) => {
373
+ let t = /* @__PURE__ */ new Set();
374
+ for (let i of e) {
375
+ var n, r;
376
+ let e = [
377
+ i.code,
378
+ i.message,
379
+ (n = i.plugin) == null ? "" : n,
380
+ (r = i.phase) == null ? "" : r
381
+ ].join("");
382
+ t.add(e), !Ht.has(e) && A("render-error", i);
383
+ }
384
+ Ht.clear();
385
+ for (let e of t) Ht.add(e);
386
+ }, { immediate: !0 }), T(Ke, (e) => {
387
+ e && A("render-error", n("source-type", "The `source` prop must be a string; rendering an empty document.", { phase: "render" }));
388
+ }, { immediate: !0 });
389
+ let Ut = /* @__PURE__ */ new Set();
390
+ function $(e, t) {
391
+ Ut.has(e) || (Ut.add(e), A("render-error", n(e, t, {
392
+ severity: "warning",
393
+ phase: "render"
394
+ })));
395
+ }
396
+ T(() => [
397
+ k.externalLinkTarget,
398
+ k.tocPlacement,
399
+ k.theme,
400
+ k.toc,
401
+ k.tocDepth,
402
+ k.search,
403
+ k.searchCaseSensitive,
404
+ k.searchDebounce,
405
+ k.linkTarget,
406
+ k.baseUrl,
407
+ k.idPrefix,
408
+ k.syncHash,
409
+ k.showError
410
+ ], ([e, t, n, r, i, a, ee, o, s, c, l, u, d]) => {
411
+ D(e) || $("prop-external-link-target", `The \`externalLinkTarget\` prop must be \`_self\` or \`_blank\`; received ${JSON.stringify(e)}. Using \`_self\`.`), ke(t) || $("prop-toc-placement", `The \`tocPlacement\` prop must be \`top\`, \`left\`, \`right\`, or \`hidden\`; received ${JSON.stringify(t)}. Using \`top\`.`), n !== void 0 && !Oe(n) && $("prop-theme", `The \`theme\` prop must be \`light\`, \`dark\`, \`auto\`, or \`custom\`; received ${JSON.stringify(n)}. The prop is ignored.`), typeof r != "boolean" && $("prop-toc", `The \`toc\` prop must be a boolean; received ${JSON.stringify(r)}. Using \`false\`.`), (typeof i != "number" || !Number.isFinite(i) || i < 0) && $("prop-toc-depth", `The \`tocDepth\` prop must be a non-negative finite number; received ${JSON.stringify(i)}. Using \`0\`.`), typeof a != "string" && $("prop-search", `The \`search\` prop must be a string; received ${JSON.stringify(a)}. Ignoring the query.`), typeof ee != "boolean" && $("prop-search-case-sensitive", `The \`searchCaseSensitive\` prop must be a boolean; received ${JSON.stringify(ee)}. Using \`false\`.`), (typeof o != "number" || !Number.isFinite(o) || o < 0) && $("prop-search-debounce", `The \`searchDebounce\` prop must be a non-negative finite number; received ${JSON.stringify(o)}. Using \`0\`.`), typeof s == "string" && s || $("prop-link-target", `The \`linkTarget\` prop must be a non-empty string; received ${JSON.stringify(s)}. Using \`_self\`.`), c != null && typeof c != "string" && $("prop-base-url", `The \`baseUrl\` prop must be a string; received ${JSON.stringify(c)}. Ignoring it.`), typeof l != "string" && $("prop-id-prefix", `The \`idPrefix\` prop must be a string; received ${JSON.stringify(l)}. Using an empty prefix.`), typeof u != "boolean" && $("prop-sync-hash", `The \`syncHash\` prop must be a boolean; received ${JSON.stringify(u)}. Using \`false\`.`), typeof d != "boolean" && $("prop-show-error", `The \`showError\` prop must be a boolean; received ${JSON.stringify(d)}. Using \`true\`.`);
412
+ }, { immediate: !0 });
413
+ let Wt = /* @__PURE__ */ new Set();
414
+ return T(z, (e) => {
415
+ let t = [];
416
+ e.highlighter && !te(e.highlighter) && t.push(n("highlighter-invalid", "The `highlighter` adapter must expose an `id` and a `highlight` function; using plain text.", { phase: "render" })), e.mathEngine && !re(e.mathEngine) && t.push(n("math-engine-invalid", "The `mathEngine` adapter must expose an `id` and a `render` function; using readable TeX.", { phase: "render" })), e.mermaidRenderer && !d(e.mermaidRenderer) && t.push(n("mermaid-renderer-invalid", "The `mermaidRenderer` adapter must expose an `id` and a `render` function; using the default Mermaid runtime.", { phase: "render" })), e.diagnosticsFormatter && !ie(e.diagnosticsFormatter) && t.push(n("diagnostic-formatter-invalid", "The `diagnosticsFormatter` must expose a `format` function; using the default formatter.", { phase: "render" })), e.slugger && !u(e.slugger) && t.push(n("slugger-invalid", "The `slugger` must expose a `slug` function; using the default slugger.", { phase: "render" })), e.urlTransform && !ne(e.urlTransform) && t.push(n("url-transform-invalid", "The `urlTransform` must be a function; using the default URL policy.", { phase: "render" }));
417
+ for (let e of t) {
418
+ let t = `${e.code}\u001f${e.message}`;
419
+ Wt.has(t) || (Wt.add(t), A("render-error", e));
420
+ }
421
+ }, { immediate: !0 }), ce({
422
+ scrollToHeading: Z,
423
+ getDocument: () => B.value,
424
+ getToc: () => W.value,
425
+ refresh: U,
426
+ updateSource: (e) => A("update:source", e)
427
+ }), (e, t) => e.$slots.root ? x(e.$slots, "root", v(_(Rt.value)), void 0, void 0, 0) : (y(), m(S(St.value), {
428
+ key: 1,
429
+ ref_key: "rootRef",
430
+ ref: He,
431
+ as: f.as,
432
+ tokens: yt.value,
433
+ theme: Y.value,
434
+ "data-vmd-toc-placement": M.value,
435
+ "data-vmd-toc-layout": xt.value ? "side" : "stacked"
436
+ }, {
437
+ default: E(() => [J.value ? (y(), he("div", Ee, [e.$slots.toc ? x(e.$slots, "toc", v(_(Pt.value)), void 0, void 0, 0) : (y(), m(S(wt.value), {
438
+ key: 1,
439
+ items: W.value,
440
+ "active-id": w(Mt),
441
+ label: Ot.value,
442
+ "toc-item": q.value.tocItem,
443
+ "toc-depth": j.value,
444
+ onNavigate: Z
445
+ }, _e({ _: 2 }, [e.$slots["toc-item"] ? {
446
+ name: "toc-item",
447
+ fn: E((t) => [x(e.$slots, "toc-item", v(_(t)))]),
448
+ key: "0"
449
+ } : void 0]), 1064, [
450
+ "items",
451
+ "active-id",
452
+ "label",
453
+ "toc-item",
454
+ "toc-depth"
455
+ ]))])) : h("", !0), ge("div", De, [e.$slots.content && w(B) && w(B).nodes.length > 0 ? x(e.$slots, "content", v(_(Nt.value)), void 0, void 0, 0) : w(B) && w(B).nodes.length > 0 ? (y(), m(S(Ct.value), {
456
+ key: 1,
457
+ nodes: w(B).nodes
458
+ }, {
459
+ default: E(() => [ve(w(Te), { nodes: w(B).nodes }, null, 8, ["nodes"])]),
460
+ _: 1
461
+ }, 8, ["nodes"])) : e.$slots.loading && w(V) === "pending" ? x(e.$slots, "loading", v(_(Lt.value)), void 0, void 0, 2) : w(V) === "pending" ? (y(), m(S(Dt.value), {
462
+ key: 3,
463
+ label: kt.value
464
+ }, null, 8, ["label"])) : e.$slots.empty && w(V) === "ready" ? x(e.$slots, "empty", v(_(It.value)), void 0, void 0, 4) : w(V) === "ready" ? (y(), m(S(Et.value), {
465
+ key: 5,
466
+ label: At.value
467
+ }, null, 8, ["label"])) : h("", !0), Ve.value && w(V) === "error" && e.$slots.error ? x(e.$slots, "error", v(_(Ft.value)), void 0, void 0, 6) : Ve.value && w(V) === "error" ? (y(), m(S(Tt.value), {
468
+ key: 7,
469
+ diagnostics: w(H),
470
+ label: jt.value
471
+ }, null, 8, ["diagnostics", "label"])) : h("", !0)])]),
472
+ _: 3
473
+ }, 8, [
474
+ "as",
475
+ "tokens",
476
+ "theme",
477
+ "data-vmd-toc-placement",
478
+ "data-vmd-toc-layout"
479
+ ]));
480
+ }
481
+ }));
482
+ export { Te as n, D as t };
@@ -0,0 +1,23 @@
1
+ import { computed as e, createBlock as t, defineComponent as n, normalizeStyle as r, openBlock as i, renderSlot as a, resolveDynamicComponent as o, withCtx as s } from "vue";
2
+ // src/components/MarkdownRoot.vue
3
+ var c = /* @__PURE__ */ n({
4
+ __name: "MarkdownRoot",
5
+ props: {
6
+ as: { default: "div" },
7
+ tokens: { default: () => ({}) },
8
+ theme: { default: "light" }
9
+ },
10
+ setup(n) {
11
+ let c = n, l = e(() => c.tokens);
12
+ return (e, c) => (i(), t(o(n.as), {
13
+ "data-vmd-part": "root",
14
+ class: "vmd-root",
15
+ "data-vmd-theme": n.theme,
16
+ style: r(l.value)
17
+ }, {
18
+ default: s(() => [a(e.$slots, "default")]),
19
+ _: 3
20
+ }, 8, ["data-vmd-theme", "style"]));
21
+ }
22
+ });
23
+ export { c 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/MarkdownStrikethrough.vue?vue&type=script&setup=true&lang.ts
3
+ var i = {
4
+ "data-vmd-part": "strikethrough",
5
+ class: "vmd-strikethrough"
6
+ }, a = /* @__PURE__ */ t({
7
+ __name: "MarkdownStrikethrough",
8
+ props: {
9
+ node: {},
10
+ children: {}
11
+ },
12
+ setup(t) {
13
+ return (t, a) => (n(), e("del", i, [r(t.$slots, "default")]));
14
+ }
15
+ });
16
+ 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/MarkdownStrong.vue?vue&type=script&setup=true&lang.ts
3
+ var i = {
4
+ "data-vmd-part": "strong",
5
+ class: "vmd-strong"
6
+ }, a = /* @__PURE__ */ t({
7
+ __name: "MarkdownStrong",
8
+ props: {
9
+ node: {},
10
+ children: {}
11
+ },
12
+ setup(t) {
13
+ return (t, a) => (n(), e("strong", i, [r(t.$slots, "default")]));
14
+ }
15
+ });
16
+ 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/MarkdownTable.vue?vue&type=script&setup=true&lang.ts
3
+ var i = {
4
+ "data-vmd-part": "table",
5
+ class: "vmd-table"
6
+ }, a = /* @__PURE__ */ t({
7
+ __name: "MarkdownTable",
8
+ props: {
9
+ node: {},
10
+ children: {}
11
+ },
12
+ setup(t) {
13
+ return (t, a) => (n(), e("table", i, [r(t.$slots, "default")]));
14
+ }
15
+ });
16
+ export { a as t };
@@ -0,0 +1,31 @@
1
+ import { computed as e, createBlock as t, defineComponent as n, normalizeClass as r, normalizeStyle as i, openBlock as a, renderSlot as o, resolveDynamicComponent as s, withCtx as c } from "vue";
2
+ // src/components/MarkdownTableCell.vue
3
+ var l = /* @__PURE__ */ n({
4
+ __name: "MarkdownTableCell",
5
+ props: {
6
+ node: {},
7
+ children: {},
8
+ align: {},
9
+ scope: {}
10
+ },
11
+ setup(n) {
12
+ let l = n, u = e(() => l.node.kind === "element" && l.node.tag === "th" ? "th" : "td"), d = e(() => l.align ? { textAlign: l.align } : void 0), f = e(() => {
13
+ var e;
14
+ return (e = l.scope) == null ? u.value === "th" ? "col" : void 0 : e;
15
+ });
16
+ return (e, n) => (a(), t(s(u.value), {
17
+ "data-vmd-part": "table-cell",
18
+ class: r(["vmd-table-cell", u.value === "th" ? "vmd-table-header" : "vmd-table-data"]),
19
+ style: i(d.value),
20
+ scope: f.value
21
+ }, {
22
+ default: c(() => [o(e.$slots, "default")]),
23
+ _: 3
24
+ }, 8, [
25
+ "class",
26
+ "style",
27
+ "scope"
28
+ ]));
29
+ }
30
+ });
31
+ export { l 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/MarkdownTableRow.vue?vue&type=script&setup=true&lang.ts
3
+ var i = {
4
+ "data-vmd-part": "table-row",
5
+ class: "vmd-table-row"
6
+ }, a = /* @__PURE__ */ t({
7
+ __name: "MarkdownTableRow",
8
+ props: {
9
+ node: {},
10
+ children: {}
11
+ },
12
+ setup(t) {
13
+ return (t, a) => (n(), e("tr", i, [r(t.$slots, "default")]));
14
+ }
15
+ });
16
+ export { a as t };
@@ -0,0 +1,24 @@
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/MarkdownTableSection.vue
3
+ var s = /* @__PURE__ */ n({
4
+ __name: "MarkdownTableSection",
5
+ props: {
6
+ node: {},
7
+ children: {}
8
+ },
9
+ setup(n) {
10
+ let s = n, c = e(() => s.node.kind === "element" && [
11
+ "thead",
12
+ "tbody",
13
+ "tfoot"
14
+ ].includes(s.node.tag) ? s.node.tag : "tbody");
15
+ return (e, n) => (r(), t(a(c.value), {
16
+ "data-vmd-part": "table-section",
17
+ class: "vmd-table-section"
18
+ }, {
19
+ default: o(() => [i(e.$slots, "default")]),
20
+ _: 3
21
+ }));
22
+ }
23
+ });
24
+ export { s as t };
@@ -0,0 +1,38 @@
1
+ import { r as e } from "./context-8NfW6fxI.js";
2
+ import { computed as t, createElementBlock as n, createElementVNode as r, defineComponent as i, normalizeClass as a, openBlock as o, ref as s, renderSlot as c, watch as l } from "vue";
3
+ // src/components/MarkdownTaskItem.vue?vue&type=script&setup=true&lang.ts
4
+ var u = ["data-state"], d = ["checked", "disabled"], f = { class: "vmd-task-content" }, p = /* @__PURE__ */ i({
5
+ __name: "MarkdownTaskItem",
6
+ props: {
7
+ node: {},
8
+ children: {},
9
+ checked: { type: Boolean },
10
+ disabled: { type: Boolean }
11
+ },
12
+ setup(i) {
13
+ let p = i, m = e(), h = s(!!p.checked);
14
+ l(() => p.checked, (e) => {
15
+ h.value = !!e;
16
+ });
17
+ let g = t(() => h.value ? "checked" : "unchecked");
18
+ function _(e) {
19
+ h.value = e.target.checked, m.onTaskChange({
20
+ checked: h.value,
21
+ node: p.node
22
+ });
23
+ }
24
+ return (e, t) => (o(), n("li", {
25
+ "data-vmd-part": "task-item",
26
+ class: a(["vmd-task-item", { "vmd-list-item": !0 }]),
27
+ "data-state": g.value
28
+ }, [r("input", {
29
+ type: "checkbox",
30
+ "data-vmd-part": "task-checkbox",
31
+ class: "vmd-task-checkbox",
32
+ checked: h.value,
33
+ disabled: i.disabled,
34
+ onChange: _
35
+ }, null, 40, d), r("span", f, [c(e.$slots, "default")])], 8, u));
36
+ }
37
+ });
38
+ export { p as t };