@coderminer/vue-markdown 0.0.0-stage → 1.0.0
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/CHANGELOG.md +110 -0
- package/LICENSE +21 -0
- package/README.md +579 -3
- package/README.zh-CN.md +547 -0
- package/dist/chunks/MarkdownBlockquote-DVXziX2t.js +18 -0
- package/dist/chunks/MarkdownBlockquote-DVXziX2t.js.map +1 -0
- package/dist/chunks/MarkdownBreak-BwCi2Itt.js +18 -0
- package/dist/chunks/MarkdownBreak-BwCi2Itt.js.map +1 -0
- package/dist/chunks/MarkdownCode-B1k9tmW5.js +65 -0
- package/dist/chunks/MarkdownCode-B1k9tmW5.js.map +1 -0
- package/dist/chunks/MarkdownConfigProvider-5N3ylrIu.js +51 -0
- package/dist/chunks/MarkdownConfigProvider-5N3ylrIu.js.map +1 -0
- package/dist/chunks/MarkdownContent-BAK6dqo7.js +15 -0
- package/dist/chunks/MarkdownContent-BAK6dqo7.js.map +1 -0
- package/dist/chunks/MarkdownCustomTag-BBdn3-WO.js +42 -0
- package/dist/chunks/MarkdownCustomTag-BBdn3-WO.js.map +1 -0
- package/dist/chunks/MarkdownEmphasis-CppivOEu.js +18 -0
- package/dist/chunks/MarkdownEmphasis-CppivOEu.js.map +1 -0
- package/dist/chunks/MarkdownEmpty-Av5k6bqa.js +16 -0
- package/dist/chunks/MarkdownEmpty-Av5k6bqa.js.map +1 -0
- package/dist/chunks/MarkdownError-C0sPs5W0.js +19 -0
- package/dist/chunks/MarkdownError-C0sPs5W0.js.map +1 -0
- package/dist/chunks/MarkdownFootnoteReference-Dy3Khwyj.js +24 -0
- package/dist/chunks/MarkdownFootnoteReference-Dy3Khwyj.js.map +1 -0
- package/dist/chunks/MarkdownFootnotes-BRPzkbXv.js +23 -0
- package/dist/chunks/MarkdownFootnotes-BRPzkbXv.js.map +1 -0
- package/dist/chunks/MarkdownHeading-DaNcP0_6.js +31 -0
- package/dist/chunks/MarkdownHeading-DaNcP0_6.js.map +1 -0
- package/dist/chunks/MarkdownHorizontalRule-QNe_cuUI.js +18 -0
- package/dist/chunks/MarkdownHorizontalRule-QNe_cuUI.js.map +1 -0
- package/dist/chunks/MarkdownHtml-66lYkvwM.js +15 -0
- package/dist/chunks/MarkdownHtml-66lYkvwM.js.map +1 -0
- package/dist/chunks/MarkdownImage-BRy76svs.js +53 -0
- package/dist/chunks/MarkdownImage-BRy76svs.js.map +1 -0
- package/dist/chunks/MarkdownInlineCode-MXZYFwex.js +18 -0
- package/dist/chunks/MarkdownInlineCode-MXZYFwex.js.map +1 -0
- package/dist/chunks/MarkdownLink-Dbx3NwgV.js +47 -0
- package/dist/chunks/MarkdownLink-Dbx3NwgV.js.map +1 -0
- package/dist/chunks/MarkdownList-BJ-_C71k.js +22 -0
- package/dist/chunks/MarkdownList-BJ-_C71k.js.map +1 -0
- package/dist/chunks/MarkdownListItem-Z1EHIY26.js +18 -0
- package/dist/chunks/MarkdownListItem-Z1EHIY26.js.map +1 -0
- package/dist/chunks/MarkdownLoading-D-RYtXxf.js +17 -0
- package/dist/chunks/MarkdownLoading-D-RYtXxf.js.map +1 -0
- package/dist/chunks/MarkdownParagraph-BxLSmSaG.js +18 -0
- package/dist/chunks/MarkdownParagraph-BxLSmSaG.js.map +1 -0
- package/dist/chunks/MarkdownRenderer-DLRRfsdI.js +416 -0
- package/dist/chunks/MarkdownRenderer-DLRRfsdI.js.map +1 -0
- package/dist/chunks/MarkdownRoot-DEE6iVfh.js +25 -0
- package/dist/chunks/MarkdownRoot-DEE6iVfh.js.map +1 -0
- package/dist/chunks/MarkdownStrikethrough-CblvbqDk.js +18 -0
- package/dist/chunks/MarkdownStrikethrough-CblvbqDk.js.map +1 -0
- package/dist/chunks/MarkdownStrong-uU5MzAoJ.js +18 -0
- package/dist/chunks/MarkdownStrong-uU5MzAoJ.js.map +1 -0
- package/dist/chunks/MarkdownTable-DmBTg_CR.js +18 -0
- package/dist/chunks/MarkdownTable-DmBTg_CR.js.map +1 -0
- package/dist/chunks/MarkdownTableCell-eiCJe847.js +33 -0
- package/dist/chunks/MarkdownTableCell-eiCJe847.js.map +1 -0
- package/dist/chunks/MarkdownTableRow-DuJaPntg.js +18 -0
- package/dist/chunks/MarkdownTableRow-DuJaPntg.js.map +1 -0
- package/dist/chunks/MarkdownTableSection-PFHz-R33.js +26 -0
- package/dist/chunks/MarkdownTableSection-PFHz-R33.js.map +1 -0
- package/dist/chunks/MarkdownTaskItem-BcmKo1lk.js +40 -0
- package/dist/chunks/MarkdownTaskItem-BcmKo1lk.js.map +1 -0
- package/dist/chunks/MarkdownToc-BdOHF-Yo.js +51 -0
- package/dist/chunks/MarkdownToc-BdOHF-Yo.js.map +1 -0
- package/dist/chunks/MarkdownTocItem-DT9mR3vL.js +27 -0
- package/dist/chunks/MarkdownTocItem-DT9mR3vL.js.map +1 -0
- package/dist/chunks/MermaidLiveEditor-W-qf3G-5.js +416 -0
- package/dist/chunks/MermaidLiveEditor-W-qf3G-5.js.map +1 -0
- package/dist/chunks/VueSyntaxHighlighter-DyLsYMwy.js +262 -0
- package/dist/chunks/VueSyntaxHighlighter-DyLsYMwy.js.map +1 -0
- package/dist/chunks/adapters-CMwX_NEI.js +28 -0
- package/dist/chunks/adapters-CMwX_NEI.js.map +1 -0
- package/dist/chunks/asyncToGenerator-ChigusFD.js +26 -0
- package/dist/chunks/blank-line-Cb-JBP_5.js +90 -0
- package/dist/chunks/blank-line-Cb-JBP_5.js.map +1 -0
- package/dist/chunks/codemirror-DyphMAEg.js +84 -0
- package/dist/chunks/codemirror-DyphMAEg.js.map +1 -0
- package/dist/chunks/config-aRYo2R8_.js +12 -0
- package/dist/chunks/config-aRYo2R8_.js.map +1 -0
- package/dist/chunks/context-8NfW6fxI.js +32 -0
- package/dist/chunks/context-8NfW6fxI.js.map +1 -0
- package/dist/chunks/default-DWVS-I_8.js +23 -0
- package/dist/chunks/default-DWVS-I_8.js.map +1 -0
- package/dist/chunks/diagnostics-CtHoJyiX.js +25 -0
- package/dist/chunks/diagnostics-CtHoJyiX.js.map +1 -0
- package/dist/chunks/export-DZQ3cUry.js +1575 -0
- package/dist/chunks/export-DZQ3cUry.js.map +1 -0
- package/dist/chunks/hast-nodes-C0bX3M5Z.js +35 -0
- package/dist/chunks/hast-nodes-C0bX3M5Z.js.map +1 -0
- package/dist/chunks/highlightjs-BEh-YwEG.js +6041 -0
- package/dist/chunks/highlightjs-BEh-YwEG.js.map +1 -0
- package/dist/chunks/identity-jZEhX2d5.js +6244 -0
- package/dist/chunks/identity-jZEhX2d5.js.map +1 -0
- package/dist/chunks/labels-BtHiUTQI.js +49 -0
- package/dist/chunks/labels-BtHiUTQI.js.map +1 -0
- package/dist/chunks/lib-BQiWGWpu.js +5087 -0
- package/dist/chunks/lib-BQiWGWpu.js.map +1 -0
- package/dist/chunks/lib-LwqA_W3J.js +127 -0
- package/dist/chunks/lib-LwqA_W3J.js.map +1 -0
- package/dist/chunks/longest-streak-DZE_EqsU.js +10 -0
- package/dist/chunks/longest-streak-DZE_EqsU.js.map +1 -0
- package/dist/chunks/micromark-factory-space-Db040TnW.js +139 -0
- package/dist/chunks/micromark-factory-space-Db040TnW.js.map +1 -0
- package/dist/chunks/normalize-CRYv3Wqt.js +220 -0
- package/dist/chunks/normalize-CRYv3Wqt.js.map +1 -0
- package/dist/chunks/objectSpread2-CtBNx0TF.js +57 -0
- package/dist/chunks/plugin-DqkFHyny.js +28 -0
- package/dist/chunks/plugin-DqkFHyny.js.map +1 -0
- package/dist/chunks/preset-BjaOuJUL.js +46 -0
- package/dist/chunks/preset-BjaOuJUL.js.map +1 -0
- package/dist/chunks/registry-DLjr93-V.js +6144 -0
- package/dist/chunks/registry-DLjr93-V.js.map +1 -0
- package/dist/chunks/render-Cs8iKrgz.js +1724 -0
- package/dist/chunks/render-Cs8iKrgz.js.map +1 -0
- package/dist/chunks/runtime-DJMnzjah.js +546 -0
- package/dist/chunks/runtime-DJMnzjah.js.map +1 -0
- package/dist/chunks/security-y4EwUyAs.js +214 -0
- package/dist/chunks/security-y4EwUyAs.js.map +1 -0
- package/dist/chunks/shared-DNAvZ-UY.js +76 -0
- package/dist/chunks/shared-DNAvZ-UY.js.map +1 -0
- package/dist/chunks/space-separated-tokens-CmBjEPdR.js +1099 -0
- package/dist/chunks/space-separated-tokens-CmBjEPdR.js.map +1 -0
- package/dist/chunks/url-D2BoivaE.js +26 -0
- package/dist/chunks/url-D2BoivaE.js.map +1 -0
- package/dist/chunks/useActiveHeading-BaGVMJnB.js +316 -0
- package/dist/chunks/useActiveHeading-BaGVMJnB.js.map +1 -0
- package/dist/components/CodeBlock.d.ts +73 -0
- package/dist/components/CodeBlock.js +1 -0
- package/dist/components/Icon.d.ts +6 -0
- package/dist/components/MarkdownBlockquote.d.ts +18 -0
- package/dist/components/MarkdownBlockquote.js +1 -0
- package/dist/components/MarkdownBreak.d.ts +8 -0
- package/dist/components/MarkdownBreak.js +1 -0
- package/dist/components/MarkdownChildren.d.ts +17 -0
- package/dist/components/MarkdownCode.d.ts +29 -0
- package/dist/components/MarkdownCode.js +1 -0
- package/dist/components/MarkdownConfigProvider.d.ts +33 -0
- package/dist/components/MarkdownConfigProvider.js +1 -0
- package/dist/components/MarkdownContent.d.ts +16 -0
- package/dist/components/MarkdownContent.js +1 -0
- package/dist/components/MarkdownCustomTag.d.ts +20 -0
- package/dist/components/MarkdownCustomTag.js +1 -0
- package/dist/components/MarkdownEmphasis.d.ts +18 -0
- package/dist/components/MarkdownEmphasis.js +1 -0
- package/dist/components/MarkdownEmpty.d.ts +8 -0
- package/dist/components/MarkdownEmpty.js +1 -0
- package/dist/components/MarkdownError.d.ts +11 -0
- package/dist/components/MarkdownError.js +1 -0
- package/dist/components/MarkdownFootnoteReference.d.ts +19 -0
- package/dist/components/MarkdownFootnoteReference.js +1 -0
- package/dist/components/MarkdownFootnotes.d.ts +17 -0
- package/dist/components/MarkdownFootnotes.js +1 -0
- package/dist/components/MarkdownHeading.d.ts +18 -0
- package/dist/components/MarkdownHeading.js +1 -0
- package/dist/components/MarkdownHorizontalRule.d.ts +8 -0
- package/dist/components/MarkdownHorizontalRule.js +1 -0
- package/dist/components/MarkdownHtml.d.ts +8 -0
- package/dist/components/MarkdownHtml.js +1 -0
- package/dist/components/MarkdownImage.d.ts +15 -0
- package/dist/components/MarkdownImage.js +1 -0
- package/dist/components/MarkdownInlineCode.d.ts +18 -0
- package/dist/components/MarkdownInlineCode.js +1 -0
- package/dist/components/MarkdownLink.d.ts +22 -0
- package/dist/components/MarkdownLink.js +1 -0
- package/dist/components/MarkdownList.d.ts +18 -0
- package/dist/components/MarkdownList.js +1 -0
- package/dist/components/MarkdownListItem.d.ts +18 -0
- package/dist/components/MarkdownListItem.js +1 -0
- package/dist/components/MarkdownLoading.d.ts +8 -0
- package/dist/components/MarkdownLoading.js +1 -0
- package/dist/components/MarkdownMath.d.ts +12 -0
- package/dist/components/MarkdownMath.js +1 -0
- package/dist/components/MarkdownMermaid.d.ts +78 -0
- package/dist/components/MarkdownMermaid.js +1 -0
- package/dist/components/MarkdownParagraph.d.ts +18 -0
- package/dist/components/MarkdownParagraph.js +1 -0
- package/dist/components/MarkdownRenderer.d.ts +170 -0
- package/dist/components/MarkdownRenderer.js +1 -0
- package/dist/components/MarkdownRoot.d.ts +24 -0
- package/dist/components/MarkdownRoot.js +1 -0
- package/dist/components/MarkdownStrikethrough.d.ts +18 -0
- package/dist/components/MarkdownStrikethrough.js +1 -0
- package/dist/components/MarkdownStrong.d.ts +18 -0
- package/dist/components/MarkdownStrong.js +1 -0
- package/dist/components/MarkdownTable.d.ts +18 -0
- package/dist/components/MarkdownTable.js +1 -0
- package/dist/components/MarkdownTableCell.d.ts +20 -0
- package/dist/components/MarkdownTableCell.js +1 -0
- package/dist/components/MarkdownTableRow.d.ts +18 -0
- package/dist/components/MarkdownTableRow.js +1 -0
- package/dist/components/MarkdownTableSection.d.ts +18 -0
- package/dist/components/MarkdownTableSection.js +1 -0
- package/dist/components/MarkdownTaskItem.d.ts +20 -0
- package/dist/components/MarkdownTaskItem.js +1 -0
- package/dist/components/MarkdownToc.d.ts +36 -0
- package/dist/components/MarkdownToc.js +1 -0
- package/dist/components/MarkdownTocItem.d.ts +14 -0
- package/dist/components/MarkdownTocItem.js +1 -0
- package/dist/components/MermaidBlock.d.ts +50 -0
- package/dist/components/MermaidBlock.js +1 -0
- package/dist/components/MermaidLiveEditor.d.ts +44 -0
- package/dist/components/MermaidLiveEditor.js +1 -0
- package/dist/components/VueSyntaxHighlighter.d.ts +39 -0
- package/dist/components/VueSyntaxHighlighter.js +1 -0
- package/dist/components/codeRegion.d.ts +14 -0
- package/dist/components/config.d.ts +7 -0
- package/dist/components/context.d.ts +45 -0
- package/dist/components/index.d.ts +42 -0
- package/dist/components/index.js +38 -0
- package/dist/components/render.d.ts +9 -0
- package/dist/components/scroll-lock.d.ts +7 -0
- package/dist/components/types.d.ts +29 -0
- package/dist/composables/useActiveHeading.d.ts +12 -0
- package/dist/composables/useCodeHighlighter.d.ts +30 -0
- package/dist/composables/useLineWindow.d.ts +38 -0
- package/dist/composables/useMarkdownDocument.d.ts +23 -0
- package/dist/core/adapters.d.ts +7 -0
- package/dist/core/config.d.ts +5 -0
- package/dist/core/diagnostics.d.ts +9 -0
- package/dist/core/finalize.d.ts +18 -0
- package/dist/core/hast-nodes.d.ts +6 -0
- package/dist/core/highlight-lines.d.ts +8 -0
- package/dist/core/identity.d.ts +4 -0
- package/dist/core/labels.d.ts +4 -0
- package/dist/core/manifest.d.ts +38 -0
- package/dist/core/memo.d.ts +5 -0
- package/dist/core/model-hast.d.ts +8 -0
- package/dist/core/model.d.ts +10 -0
- package/dist/core/normalize.d.ts +27 -0
- package/dist/core/parts.d.ts +135 -0
- package/dist/core/preset.d.ts +10 -0
- package/dist/core/run.d.ts +16 -0
- package/dist/core/search.d.ts +5 -0
- package/dist/core/security.d.ts +21 -0
- package/dist/core/slugger.d.ts +6 -0
- package/dist/core/types.d.ts +390 -0
- package/dist/core/url.d.ts +10 -0
- package/dist/editor/codemirror.d.ts +14 -0
- package/dist/editor/index.d.ts +2 -0
- package/dist/editor/index.js +1 -0
- package/dist/export/index.d.ts +6 -0
- package/dist/headless.d.ts +21 -0
- package/dist/headless.js +12 -0
- package/dist/highlight/highlightjs.d.ts +7 -0
- package/dist/highlight/index.d.ts +3 -0
- package/dist/highlight/index.js +3 -0
- package/dist/highlight/shared.d.ts +16 -0
- package/dist/highlight/shiki.d.ts +7 -0
- package/dist/highlight/shiki.js +76 -0
- package/dist/highlight/shiki.js.map +1 -0
- package/dist/html/index.d.ts +17 -0
- package/dist/html/index.js +13 -0
- package/dist/html/index.js.map +1 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.js +55 -0
- package/dist/index.js.map +1 -0
- package/dist/math/index.d.ts +4 -0
- package/dist/math/index.js +583 -0
- package/dist/math/index.js.map +1 -0
- package/dist/math/katex.d.ts +4 -0
- package/dist/math/plugin.d.ts +20 -0
- package/dist/mermaid/index.d.ts +5 -0
- package/dist/mermaid/index.js +3 -0
- package/dist/mermaid/plugin.d.ts +14 -0
- package/dist/mermaid/runtime.d.ts +12 -0
- package/dist/mermaid/sanitize.d.ts +12 -0
- package/dist/node-components.d.ts +1 -0
- package/dist/node-components.js +39 -0
- package/dist/pipeline/custom.d.ts +8 -0
- package/dist/pipeline/identity.d.ts +12 -0
- package/dist/pipeline/index.d.ts +5 -0
- package/dist/pipeline/official.d.ts +6 -0
- package/dist/pipeline.d.ts +1 -0
- package/dist/pipeline.js +1 -0
- package/dist/plugins/builtin.d.ts +15 -0
- package/dist/plugins/define.d.ts +7 -0
- package/dist/plugins/registry.d.ts +16 -0
- package/dist/plugins/source.d.ts +7 -0
- package/dist/plugins.d.ts +3 -0
- package/dist/plugins.js +1 -0
- package/dist/presets.d.ts +3 -0
- package/dist/presets.js +1 -0
- package/dist/style.css +2 -0
- package/dist/styles/components.css +712 -0
- package/dist/styles/index.d.ts +1 -0
- package/dist/styles/math-full.css +3 -0
- package/dist/styles/math.css +18 -0
- package/dist/styles/tokens.css +96 -0
- package/package.json +211 -6
|
@@ -0,0 +1,18 @@
|
|
|
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 };
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=MarkdownStrikethrough-CblvbqDk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownStrikethrough-CblvbqDk.js","names":["_openBlock","_createElementBlock","_renderSlot","_sfc_main","_hoisted_1","MarkdownStrikethrough_default","defineComponent","openBlock","createElementBlock","renderSlot","_ctx"],"sources":["../../src/components/MarkdownStrikethrough.vue","../../src/components/MarkdownStrikethrough.vue"],"sourcesContent":["<script setup lang=\"ts\">\r\nimport type { MarkdownNode } from '../core/types'\r\n\r\ndefineProps<{ node: MarkdownNode; children?: MarkdownNode[] }>()\r\n</script>\r\n\r\n<template>\r\n <del data-vmd-part=\"strikethrough\" class=\"vmd-strikethrough\"><slot /></del>\r\n</template>\r\n","<script setup lang=\"ts\">\r\nimport type { MarkdownNode } from '../core/types'\r\n\r\ndefineProps<{ node: MarkdownNode; children?: MarkdownNode[] }>()\r\n</script>\r\n\r\n<template>\r\n <del data-vmd-part=\"strikethrough\" class=\"vmd-strikethrough\"><slot /></del>\r\n</template>\r\n"],"mappings":";;;;;;;;;;;;E,kBAOEA,EAAA,GAAAC,EAA2E,OAA3EG,GAA2E,CAAdF,EAAQQ,EAAA,QAAA,SAAA,C"}
|
|
@@ -0,0 +1,18 @@
|
|
|
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 };
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=MarkdownStrong-uU5MzAoJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownStrong-uU5MzAoJ.js","names":["_openBlock","_createElementBlock","_renderSlot","_sfc_main","_hoisted_1","MarkdownStrong_default","defineComponent","openBlock","createElementBlock","renderSlot","_ctx"],"sources":["../../src/components/MarkdownStrong.vue","../../src/components/MarkdownStrong.vue"],"sourcesContent":["<script setup lang=\"ts\">\r\nimport type { MarkdownNode } from '../core/types'\r\n\r\ndefineProps<{ node: MarkdownNode; children?: MarkdownNode[] }>()\r\n</script>\r\n\r\n<template>\r\n <strong data-vmd-part=\"strong\" class=\"vmd-strong\"><slot /></strong>\r\n</template>\r\n","<script setup lang=\"ts\">\r\nimport type { MarkdownNode } from '../core/types'\r\n\r\ndefineProps<{ node: MarkdownNode; children?: MarkdownNode[] }>()\r\n</script>\r\n\r\n<template>\r\n <strong data-vmd-part=\"strong\" class=\"vmd-strong\"><slot /></strong>\r\n</template>\r\n"],"mappings":";;;;;;;;;;;;E,kBAOEA,EAAA,GAAAC,EAAmE,UAAnEG,GAAmE,CAAjBF,EAAQQ,EAAA,QAAA,SAAA,C"}
|
|
@@ -0,0 +1,18 @@
|
|
|
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 };
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=MarkdownTable-DmBTg_CR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownTable-DmBTg_CR.js","names":["_openBlock","_createElementBlock","_renderSlot","_sfc_main","_hoisted_1","MarkdownTable_default","defineComponent","openBlock","createElementBlock","renderSlot","_ctx"],"sources":["../../src/components/MarkdownTable.vue","../../src/components/MarkdownTable.vue"],"sourcesContent":["<script setup lang=\"ts\">\r\nimport type { MarkdownNode } from '../core/types'\r\n\r\ndefineProps<{ node: MarkdownNode; children?: MarkdownNode[] }>()\r\n</script>\r\n\r\n<template>\r\n <table data-vmd-part=\"table\" class=\"vmd-table\"><slot /></table>\r\n</template>\r\n","<script setup lang=\"ts\">\r\nimport type { MarkdownNode } from '../core/types'\r\n\r\ndefineProps<{ node: MarkdownNode; children?: MarkdownNode[] }>()\r\n</script>\r\n\r\n<template>\r\n <table data-vmd-part=\"table\" class=\"vmd-table\"><slot /></table>\r\n</template>\r\n"],"mappings":";;;;;;;;;;;;E,kBAOEA,EAAA,GAAAC,EAA+D,SAA/DG,GAA+D,CAAhBF,EAAQQ,EAAA,QAAA,SAAA,C"}
|
|
@@ -0,0 +1,33 @@
|
|
|
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 };
|
|
32
|
+
|
|
33
|
+
//# sourceMappingURL=MarkdownTableCell-eiCJe847.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownTableCell-eiCJe847.js","names":["_openBlock","_createBlock","_resolveDynamicComponent","_normalizeClass","_normalizeStyle","_withCtx","_renderSlot","_sfc_main","MarkdownTableCell_default","defineComponent","props","__props","tag","computed","style","effectiveScope","_props$scope","openBlock","createBlock","resolveDynamicComponent","normalizeClass","normalizeStyle","withCtx","renderSlot","_ctx"],"sources":["../../src/components/MarkdownTableCell.vue","../../src/components/MarkdownTableCell.vue"],"sourcesContent":["<script setup lang=\"ts\">\r\nimport { computed } from 'vue'\r\nimport type { CSSProperties } from 'vue'\r\nimport type { MarkdownNode } from '../core/types'\r\n\r\nconst props = defineProps<{\r\n node: MarkdownNode\r\n children?: MarkdownNode[]\r\n align?: string\r\n scope?: string\r\n}>()\r\n\r\nconst tag = computed(() =>\r\n props.node.kind === 'element' && props.node.tag === 'th' ? 'th' : 'td',\r\n)\r\n\r\nconst style = computed<CSSProperties | undefined>(() =>\r\n props.align ? { textAlign: props.align as CSSProperties['textAlign'] } : undefined,\r\n)\r\n\r\nconst effectiveScope = computed(() =>\r\n props.scope ?? (tag.value === 'th' ? 'col' : undefined),\r\n)\r\n</script>\r\n\r\n<template>\r\n <component\r\n :is=\"tag\"\r\n data-vmd-part=\"table-cell\"\r\n :class=\"['vmd-table-cell', tag === 'th' ? 'vmd-table-header' : 'vmd-table-data']\"\r\n :style=\"style\"\r\n :scope=\"effectiveScope\"\r\n >\r\n <slot />\r\n </component>\r\n</template>\r\n","<script setup lang=\"ts\">\r\nimport { computed } from 'vue'\r\nimport type { CSSProperties } from 'vue'\r\nimport type { MarkdownNode } from '../core/types'\r\n\r\nconst props = defineProps<{\r\n node: MarkdownNode\r\n children?: MarkdownNode[]\r\n align?: string\r\n scope?: string\r\n}>()\r\n\r\nconst tag = computed(() =>\r\n props.node.kind === 'element' && props.node.tag === 'th' ? 'th' : 'td',\r\n)\r\n\r\nconst style = computed<CSSProperties | undefined>(() =>\r\n props.align ? { textAlign: props.align as CSSProperties['textAlign'] } : undefined,\r\n)\r\n\r\nconst effectiveScope = computed(() =>\r\n props.scope ?? (tag.value === 'th' ? 'col' : undefined),\r\n)\r\n</script>\r\n\r\n<template>\r\n <component\r\n :is=\"tag\"\r\n data-vmd-part=\"table-cell\"\r\n :class=\"['vmd-table-cell', tag === 'th' ? 'vmd-table-header' : 'vmd-table-data']\"\r\n :style=\"style\"\r\n :scope=\"effectiveScope\"\r\n >\r\n <slot />\r\n </component>\r\n</template>\r\n"],"mappings":";;;;;;;;;;;EAKA,IAAMU,IAAQC,GAORC,IAAMC,QACVH,EAAM,KAAK,SAAS,aAAaA,EAAM,KAAK,QAAQ,OAAO,OAAO,IACpE,GAEMI,IAAQD,QACZH,EAAM,QAAQ,EAAE,WAAWA,EAAM,MAAoC,IAAI,KAAA,CAC3E,GAEMK,IAAiBF,QACrB;;GAAM,QAAA,IAAAH,EAAA,UAAA,OAAUE,EAAI,UAAU,OAAO,QAAQ,KAAA,IAAvCI;EAAuC,CAC/C;E,kBAIEhB,EAAA,GAAAC,EAQYC,EAPLU,EAAA,KAAG,GAAA;GACR,iBAAc;GACb,OAAKT,EAAA,CAAA,kBAAqBS,EAAA,UAAG,OAAA,qBAAA,gBAAA,CAAA;GAC7B,OAAKR,EAAEU,EAAA,KAAK;GACZ,OAAOC,EAAA;;GAER,SAAAV,QAAQ,CAARC,EAAQkB,EAAA,QAAA,SAAA,C"}
|
|
@@ -0,0 +1,18 @@
|
|
|
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 };
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=MarkdownTableRow-DuJaPntg.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownTableRow-DuJaPntg.js","names":["_openBlock","_createElementBlock","_renderSlot","_sfc_main","_hoisted_1","MarkdownTableRow_default","defineComponent","openBlock","createElementBlock","renderSlot","_ctx"],"sources":["../../src/components/MarkdownTableRow.vue","../../src/components/MarkdownTableRow.vue"],"sourcesContent":["<script setup lang=\"ts\">\r\nimport type { MarkdownNode } from '../core/types'\r\n\r\ndefineProps<{ node: MarkdownNode; children?: MarkdownNode[] }>()\r\n</script>\r\n\r\n<template>\r\n <tr data-vmd-part=\"table-row\" class=\"vmd-table-row\"><slot /></tr>\r\n</template>\r\n","<script setup lang=\"ts\">\r\nimport type { MarkdownNode } from '../core/types'\r\n\r\ndefineProps<{ node: MarkdownNode; children?: MarkdownNode[] }>()\r\n</script>\r\n\r\n<template>\r\n <tr data-vmd-part=\"table-row\" class=\"vmd-table-row\"><slot /></tr>\r\n</template>\r\n"],"mappings":";;;;;;;;;;;;E,kBAOEA,EAAA,GAAAC,EAAiE,MAAjEG,GAAiE,CAAbF,EAAQQ,EAAA,QAAA,SAAA,C"}
|
|
@@ -0,0 +1,26 @@
|
|
|
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 };
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=MarkdownTableSection-PFHz-R33.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownTableSection-PFHz-R33.js","names":["_openBlock","_createBlock","_resolveDynamicComponent","_withCtx","_renderSlot","_sfc_main","MarkdownTableSection_default","defineComponent","props","__props","tag","computed","openBlock","createBlock","resolveDynamicComponent","withCtx","renderSlot","_ctx"],"sources":["../../src/components/MarkdownTableSection.vue","../../src/components/MarkdownTableSection.vue"],"sourcesContent":["<script setup lang=\"ts\">\r\nimport { computed } from 'vue'\r\nimport type { MarkdownNode } from '../core/types'\r\n\r\nconst props = defineProps<{ node: MarkdownNode; children?: MarkdownNode[] }>()\r\n\r\nconst tag = computed(() => {\r\n if (props.node.kind !== 'element') return 'tbody'\r\n return ['thead', 'tbody', 'tfoot'].includes(props.node.tag)\r\n ? props.node.tag\r\n : 'tbody'\r\n})\r\n</script>\r\n\r\n<template>\r\n <component\r\n :is=\"tag\"\r\n data-vmd-part=\"table-section\"\r\n class=\"vmd-table-section\"\r\n >\r\n <slot />\r\n </component>\r\n</template>\r\n","<script setup lang=\"ts\">\r\nimport { computed } from 'vue'\r\nimport type { MarkdownNode } from '../core/types'\r\n\r\nconst props = defineProps<{ node: MarkdownNode; children?: MarkdownNode[] }>()\r\n\r\nconst tag = computed(() => {\r\n if (props.node.kind !== 'element') return 'tbody'\r\n return ['thead', 'tbody', 'tfoot'].includes(props.node.tag)\r\n ? props.node.tag\r\n : 'tbody'\r\n})\r\n</script>\r\n\r\n<template>\r\n <component\r\n :is=\"tag\"\r\n data-vmd-part=\"table-section\"\r\n class=\"vmd-table-section\"\r\n >\r\n <slot />\r\n </component>\r\n</template>\r\n"],"mappings":";;;;;;;;;EAIA,IAAMQ,IAAQC,GAERC,IAAMC,QACNH,EAAM,KAAK,SAAS,aACjB;GAAC;GAAS;GAAS;EAAO,CAAC,CAAC,SAASA,EAAM,KAAK,GAAG,IACtDA,EAAM,KAAK,MAF2B,OAI3C;E,kBAICR,EAAA,GAAAC,EAMYC,EALLQ,EAAA,KAAG,GAAA;GACR,iBAAc;GACd,OAAM;;GAEN,SAAAP,QAAQ,CAARC,EAAQa,EAAA,QAAA,SAAA,C"}
|
|
@@ -0,0 +1,40 @@
|
|
|
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 };
|
|
39
|
+
|
|
40
|
+
//# sourceMappingURL=MarkdownTaskItem-BcmKo1lk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownTaskItem-BcmKo1lk.js","names":["_openBlock","_createElementBlock","_normalizeClass","_createElementVNode","_renderSlot","_sfc_main","useRenderContext","_hoisted_1","_hoisted_2","_hoisted_3","MarkdownTaskItem_default","defineComponent","props","__props","context","checked","ref","value","state","computed","onChange","event","openBlock","createElementBlock","normalizeClass","createElementVNode","renderSlot","_ctx"],"sources":["../../src/components/MarkdownTaskItem.vue","../../src/components/MarkdownTaskItem.vue"],"sourcesContent":["<script setup lang=\"ts\">\r\nimport { computed, ref, watch } from 'vue'\r\nimport type { MarkdownNode } from '../core/types'\r\nimport { useRenderContext } from './context'\r\n\r\nconst props = defineProps<{\r\n node: MarkdownNode\r\n children?: MarkdownNode[]\r\n checked?: boolean\r\n disabled?: boolean\r\n}>()\r\n\r\nconst context = useRenderContext()\r\nconst checked = ref(Boolean(props.checked))\r\n\r\nwatch(\r\n () => props.checked,\r\n (value) => {\r\n checked.value = Boolean(value)\r\n },\r\n)\r\n\r\nconst state = computed(() => (checked.value ? 'checked' : 'unchecked'))\r\n\r\nfunction onChange(event: Event): void {\r\n checked.value = (event.target as HTMLInputElement).checked\r\n context.onTaskChange({ checked: checked.value, node: props.node })\r\n}\r\n</script>\r\n\r\n<template>\r\n <li\r\n data-vmd-part=\"task-item\"\r\n class=\"vmd-task-item\"\r\n :data-state=\"state\"\r\n :class=\"{ 'vmd-list-item': true }\"\r\n >\r\n <input\r\n type=\"checkbox\"\r\n data-vmd-part=\"task-checkbox\"\r\n class=\"vmd-task-checkbox\"\r\n :checked=\"checked\"\r\n :disabled=\"disabled\"\r\n @change=\"onChange\"\r\n />\r\n <span class=\"vmd-task-content\"><slot /></span>\r\n </li>\r\n</template>\r\n","<script setup lang=\"ts\">\r\nimport { computed, ref, watch } from 'vue'\r\nimport type { MarkdownNode } from '../core/types'\r\nimport { useRenderContext } from './context'\r\n\r\nconst props = defineProps<{\r\n node: MarkdownNode\r\n children?: MarkdownNode[]\r\n checked?: boolean\r\n disabled?: boolean\r\n}>()\r\n\r\nconst context = useRenderContext()\r\nconst checked = ref(Boolean(props.checked))\r\n\r\nwatch(\r\n () => props.checked,\r\n (value) => {\r\n checked.value = Boolean(value)\r\n },\r\n)\r\n\r\nconst state = computed(() => (checked.value ? 'checked' : 'unchecked'))\r\n\r\nfunction onChange(event: Event): void {\r\n checked.value = (event.target as HTMLInputElement).checked\r\n context.onTaskChange({ checked: checked.value, node: props.node })\r\n}\r\n</script>\r\n\r\n<template>\r\n <li\r\n data-vmd-part=\"task-item\"\r\n class=\"vmd-task-item\"\r\n :data-state=\"state\"\r\n :class=\"{ 'vmd-list-item': true }\"\r\n >\r\n <input\r\n type=\"checkbox\"\r\n data-vmd-part=\"task-checkbox\"\r\n class=\"vmd-task-checkbox\"\r\n :checked=\"checked\"\r\n :disabled=\"disabled\"\r\n @change=\"onChange\"\r\n />\r\n <span class=\"vmd-task-content\"><slot /></span>\r\n </li>\r\n</template>\r\n"],"mappings":";;;;;;;;;;;;EAKA,IAAMY,IAAQC,GAORC,IAAUR,EAAiB,GAC3BS,IAAUC,EAAI,EAAQJ,EAAM,OAAQ;EAE1C,QACQA,EAAM,UACX,MAAU;GACT,EAAQ,QAAQ,EAAQK;EAC1B,CACF;EAEA,IAAMC,IAAQC,QAAgBJ,EAAQ,QAAQ,YAAY,WAAY;EAEtE,SAASK,EAAS,GAAoB;GAEpC,AADA,EAAQ,QAASC,EAAM,OAA4B,SACnDP,EAAQ,aAAa;IAAE,SAASC,EAAQ;IAAO,MAAMH,EAAM;GAAK,CAAC;EACnE;E,kBAIEZ,EAAA,GAAAC,EAeK,MAAA;GAdH,iBAAc;GACd,OAAKC,EAAA,CAAC,iBAEE,EAAA,iBAAA,GAAA,CAAyB,CAAA;GADhC,cAAYgB,EAAA;E,IAGbf,EAOE,SAAA;GANA,MAAK;GACL,iBAAc;GACd,OAAM;GACL,SAASY,EAAA;GACT,UAAUF,EAAA;GACF;E,iBAEXV,EAA8C,QAA9CM,GAA8C,CAAfL,EAAQuB,EAAA,QAAA,SAAA,C"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { r as e } from "./normalize-CRYv3Wqt.js";
|
|
2
|
+
import { t } from "./MarkdownTocItem-DT9mR3vL.js";
|
|
3
|
+
import { Fragment as n, computed as r, createBlock as i, createElementBlock as a, createElementVNode as o, defineComponent as s, openBlock as c, renderList as l, renderSlot as u, resolveDynamicComponent as d } from "vue";
|
|
4
|
+
// src/components/MarkdownToc.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var f = ["aria-label"], p = {
|
|
6
|
+
"data-vmd-part": "toc-nav",
|
|
7
|
+
class: "vmd-toc-nav"
|
|
8
|
+
}, m = /* @__PURE__ */ s({
|
|
9
|
+
__name: "MarkdownToc",
|
|
10
|
+
props: {
|
|
11
|
+
items: {},
|
|
12
|
+
activeId: { default: void 0 },
|
|
13
|
+
label: { default: "Table of contents" },
|
|
14
|
+
tocItem: {
|
|
15
|
+
type: [
|
|
16
|
+
String,
|
|
17
|
+
Object,
|
|
18
|
+
Function
|
|
19
|
+
],
|
|
20
|
+
default: void 0
|
|
21
|
+
},
|
|
22
|
+
tocDepth: { default: 0 }
|
|
23
|
+
},
|
|
24
|
+
emits: ["navigate"],
|
|
25
|
+
setup(s, { emit: m }) {
|
|
26
|
+
let h = s, g = r(() => e(h.items, h.tocDepth)), _ = m;
|
|
27
|
+
function v(e) {
|
|
28
|
+
_("navigate", e);
|
|
29
|
+
}
|
|
30
|
+
let y = r(() => {
|
|
31
|
+
var e;
|
|
32
|
+
return (e = h.tocItem) == null ? t : e;
|
|
33
|
+
});
|
|
34
|
+
return (e, t) => (c(), a("nav", {
|
|
35
|
+
"data-vmd-part": "toc",
|
|
36
|
+
class: "vmd-toc",
|
|
37
|
+
"aria-label": s.label
|
|
38
|
+
}, [o("ol", p, [(c(!0), a(n, null, l(g.value, (t) => u(e.$slots, "toc-item", {
|
|
39
|
+
item: t,
|
|
40
|
+
active: t.id === s.activeId,
|
|
41
|
+
navigate: v
|
|
42
|
+
}, () => [(c(), i(d(y.value), {
|
|
43
|
+
item: t,
|
|
44
|
+
active: t.id === s.activeId,
|
|
45
|
+
onNavigate: v
|
|
46
|
+
}, null, 40, ["item", "active"]))], void 0, t.id)), 128))])], 8, f));
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
export { m as t };
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=MarkdownToc-BdOHF-Yo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownToc-BdOHF-Yo.js","names":["MarkdownTocItem","_openBlock","_createElementBlock","_createElementVNode","_Fragment","_renderList","_renderSlot","_createBlock","_resolveDynamicComponent","_sfc_main","filterTocByDepth","_hoisted_1","_hoisted_2","MarkdownToc_default","defineComponent","__emit","props","__props","visibleItems","computed","emit","navigate","id","itemComponent","_props$tocItem","MarkdownTocItem_default","openBlock","createElementBlock","createElementVNode","Fragment","renderList","renderSlot","_ctx","item","createBlock","resolveDynamicComponent"],"sources":["../../src/components/MarkdownToc.vue","../../src/components/MarkdownToc.vue"],"sourcesContent":["<script setup lang=\"ts\">\r\nimport { computed } from 'vue'\r\nimport type { MarkdownComponentValue, TocItem } from '../core/types'\r\nimport { filterTocByDepth } from '../core/normalize'\r\nimport MarkdownTocItem from './MarkdownTocItem.vue'\r\n\r\nconst props = withDefaults(\r\n defineProps<{\r\n items: TocItem[]\r\n activeId?: string\r\n label?: string\r\n tocItem?: MarkdownComponentValue\r\n /** Maximum heading level to show. `0` or omitted means every level. */\r\n tocDepth?: number\r\n }>(),\r\n {\r\n activeId: undefined,\r\n label: 'Table of contents',\r\n tocItem: undefined,\r\n tocDepth: 0,\r\n },\r\n)\r\n\r\nconst visibleItems = computed(() =>\r\n filterTocByDepth(props.items, props.tocDepth),\r\n)\r\n\r\nconst emit = defineEmits<{ navigate: [id: string] }>()\r\n\r\nfunction navigate(id: string): void {\r\n emit('navigate', id)\r\n}\r\n\r\nconst itemComponent = computed(() => props.tocItem ?? MarkdownTocItem)\r\n</script>\r\n\r\n<template>\r\n <nav data-vmd-part=\"toc\" class=\"vmd-toc\" :aria-label=\"label\">\r\n <ol data-vmd-part=\"toc-nav\" class=\"vmd-toc-nav\">\r\n <template v-for=\"item in visibleItems\" :key=\"item.id\">\r\n <slot\r\n name=\"toc-item\"\r\n :item=\"item\"\r\n :active=\"item.id === activeId\"\r\n :navigate=\"navigate\"\r\n >\r\n <component\r\n :is=\"itemComponent\"\r\n :item=\"item\"\r\n :active=\"item.id === activeId\"\r\n @navigate=\"navigate\"\r\n />\r\n </slot>\r\n </template>\r\n </ol>\r\n </nav>\r\n</template>\r\n","<script setup lang=\"ts\">\r\nimport { computed } from 'vue'\r\nimport type { MarkdownComponentValue, TocItem } from '../core/types'\r\nimport { filterTocByDepth } from '../core/normalize'\r\nimport MarkdownTocItem from './MarkdownTocItem.vue'\r\n\r\nconst props = withDefaults(\r\n defineProps<{\r\n items: TocItem[]\r\n activeId?: string\r\n label?: string\r\n tocItem?: MarkdownComponentValue\r\n /** Maximum heading level to show. `0` or omitted means every level. */\r\n tocDepth?: number\r\n }>(),\r\n {\r\n activeId: undefined,\r\n label: 'Table of contents',\r\n tocItem: undefined,\r\n tocDepth: 0,\r\n },\r\n)\r\n\r\nconst visibleItems = computed(() =>\r\n filterTocByDepth(props.items, props.tocDepth),\r\n)\r\n\r\nconst emit = defineEmits<{ navigate: [id: string] }>()\r\n\r\nfunction navigate(id: string): void {\r\n emit('navigate', id)\r\n}\r\n\r\nconst itemComponent = computed(() => props.tocItem ?? MarkdownTocItem)\r\n</script>\r\n\r\n<template>\r\n <nav data-vmd-part=\"toc\" class=\"vmd-toc\" :aria-label=\"label\">\r\n <ol data-vmd-part=\"toc-nav\" class=\"vmd-toc-nav\">\r\n <template v-for=\"item in visibleItems\" :key=\"item.id\">\r\n <slot\r\n name=\"toc-item\"\r\n :item=\"item\"\r\n :active=\"item.id === activeId\"\r\n :navigate=\"navigate\"\r\n >\r\n <component\r\n :is=\"itemComponent\"\r\n :item=\"item\"\r\n :active=\"item.id === activeId\"\r\n @navigate=\"navigate\"\r\n />\r\n </slot>\r\n </template>\r\n </ol>\r\n </nav>\r\n</template>\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;EAMA,IAAMgB,IAAQC,GAiBRC,IAAeC,QACnBT,EAAiBM,EAAM,OAAOA,EAAM,QAAQ,CAC9C,GAEMI,IAAOL;EAEb,SAASM,EAAS,GAAkB;GAClC,EAAK,YAAYC,CAAE;EACrB;EAEA,IAAMC,IAAgBJ,QAAe;;GAAM,QAAA,IAAAH,EAAA,YAAA,OAAWhB,IAAXwB;EAAW,CAAe;E,kBAInEvB,EAAA,GAAAC,EAkBM,OAAA;GAlBD,iBAAc;GAAM,OAAM;GAAW,cAAYe,EAAA;E,IACpDd,EAgBK,MAhBLS,GAgBK,EAfHX,EAAA,EAAA,GAAAC,EAcWE,GAAA,MAAAC,EAdca,EAAA,QAAR,MACfZ,EAYO0B,EAAA,QAAA,YAAA;GAVE;GACN,QAAQC,EAAK,OAAOhB,EAAA;GACV;EAJb,SAYO,EANLhB,EAAA,GAAAM,EAKEC,EAJKe,EAAA,KAAa,GAAA;GACX;GACN,QAAQU,EAAK,OAAOhB,EAAA;GACpB,YAAUI;E,iCAX4B,GAAA,KAAA,GAAAY,EAAK,EAAE,C"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { computed as e, createElementBlock as t, createElementVNode as n, defineComponent as r, normalizeStyle as i, openBlock as a, toDisplayString as o, withModifiers as s } from "vue";
|
|
2
|
+
// src/components/MarkdownTocItem.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
+
var c = { class: "vmd-toc-entry" }, l = ["href", "aria-current"], u = /* @__PURE__ */ r({
|
|
4
|
+
__name: "MarkdownTocItem",
|
|
5
|
+
props: {
|
|
6
|
+
item: {},
|
|
7
|
+
active: {
|
|
8
|
+
type: Boolean,
|
|
9
|
+
default: !1
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
emits: ["navigate"],
|
|
13
|
+
setup(r) {
|
|
14
|
+
let u = r, d = e(() => ({ "--vmd-toc-depth": String(u.item.level) }));
|
|
15
|
+
return (e, u) => (a(), t("li", c, [n("a", {
|
|
16
|
+
"data-vmd-part": "toc-item",
|
|
17
|
+
class: "vmd-toc-item",
|
|
18
|
+
href: `#${r.item.id}`,
|
|
19
|
+
"aria-current": r.active ? "true" : void 0,
|
|
20
|
+
style: i(d.value),
|
|
21
|
+
onClick: u[0] || (u[0] = s((t) => e.$emit("navigate", r.item.id), ["prevent"]))
|
|
22
|
+
}, o(r.item.text), 13, l)]));
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
export { u as t };
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=MarkdownTocItem-DT9mR3vL.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownTocItem-DT9mR3vL.js","names":["$emit","_openBlock","_createElementBlock","_createElementVNode","_normalizeStyle","_withModifiers","_toDisplayString","_sfc_main","_hoisted_1","_hoisted_2","MarkdownTocItem_default","defineComponent","props","__props","style","computed","openBlock","createElementBlock","createElementVNode","normalizeStyle","_cache","withModifiers","_ctx","toDisplayString"],"sources":["../../src/components/MarkdownTocItem.vue","../../src/components/MarkdownTocItem.vue"],"sourcesContent":["<script setup lang=\"ts\">\r\nimport { computed, type CSSProperties } from 'vue'\r\nimport type { TocItem } from '../core/types'\r\n\r\nconst props = withDefaults(\r\n defineProps<{ item: TocItem; active?: boolean }>(),\r\n { active: false },\r\n)\r\n\r\ndefineEmits<{ navigate: [id: string] }>()\r\n\r\nconst style = computed(\r\n () => ({ '--vmd-toc-depth': String(props.item.level) }) as CSSProperties,\r\n)\r\n</script>\r\n\r\n<template>\r\n <li class=\"vmd-toc-entry\">\r\n <a\r\n data-vmd-part=\"toc-item\"\r\n class=\"vmd-toc-item\"\r\n :href=\"`#${item.id}`\"\r\n :aria-current=\"active ? 'true' : undefined\"\r\n :style=\"style\"\r\n @click.prevent=\"$emit('navigate', item.id)\"\r\n >{{ item.text }}</a>\r\n </li>\r\n</template>\r\n","<script setup lang=\"ts\">\r\nimport { computed, type CSSProperties } from 'vue'\r\nimport type { TocItem } from '../core/types'\r\n\r\nconst props = withDefaults(\r\n defineProps<{ item: TocItem; active?: boolean }>(),\r\n { active: false },\r\n)\r\n\r\ndefineEmits<{ navigate: [id: string] }>()\r\n\r\nconst style = computed(\r\n () => ({ '--vmd-toc-depth': String(props.item.level) }) as CSSProperties,\r\n)\r\n</script>\r\n\r\n<template>\r\n <li class=\"vmd-toc-entry\">\r\n <a\r\n data-vmd-part=\"toc-item\"\r\n class=\"vmd-toc-item\"\r\n :href=\"`#${item.id}`\"\r\n :aria-current=\"active ? 'true' : undefined\"\r\n :style=\"style\"\r\n @click.prevent=\"$emit('navigate', item.id)\"\r\n >{{ item.text }}</a>\r\n </li>\r\n</template>\r\n"],"mappings":";;;;;;;;;;;;;EAIA,IAAMY,IAAQC,GAORC,IAAQC,SACL,EAAE,mBAAmB,OAAOH,EAAM,KAAK,KAAK,EAAE,EACvD;E,kBAIEX,EAAA,GAAAC,EASK,MATLM,GASK,CARHL,EAOoB,KAAA;GANlB,iBAAc;GACd,OAAM;GACL,MAAI,IAAMU,EAAA,KAAK;GACf,gBAAcA,EAAA,SAAM,SAAY,KAAA;GAChC,OAAKT,EAAEU,EAAA,KAAK;GACZ,SAAKM,EAAA,OAAA,EAAA,KAAAf,GAAA,MAAUL,EAAAA,MAAK,YAAaa,EAAA,KAAK,EAAE,GAAA,CAAA,SAAA,CAAA;EACvC,GAAAP,EAAAO,EAAA,KAAK,IAAI,GAAA,IAAAJ,CAAA,C"}
|