@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
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const version = "1.0.0";
|
|
2
|
+
export * from './core/types';
|
|
3
|
+
export * from './core/parts';
|
|
4
|
+
export * from './core/labels';
|
|
5
|
+
export * from './core/diagnostics';
|
|
6
|
+
export * from './core/url';
|
|
7
|
+
export * from './core/model';
|
|
8
|
+
export * from './core/normalize';
|
|
9
|
+
export * from './core/search';
|
|
10
|
+
export * from './core/slugger';
|
|
11
|
+
export * from './core/manifest';
|
|
12
|
+
export * from './core/config';
|
|
13
|
+
export * from './core/preset';
|
|
14
|
+
export * from './core/adapters';
|
|
15
|
+
export * from './export';
|
|
16
|
+
export * from './core/memo';
|
|
17
|
+
export * from './pipeline';
|
|
18
|
+
export * from './plugins/define';
|
|
19
|
+
export * from './plugins/builtin';
|
|
20
|
+
export * from './plugins/registry';
|
|
21
|
+
export * from './mermaid/plugin';
|
|
22
|
+
export * from './composables/useMarkdownDocument';
|
|
23
|
+
export * from './composables/useActiveHeading';
|
|
24
|
+
export * from './components';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { a as e, c as t, d as n, f as r, i, l as a, n as o, o as s, p as c, r as l, s as u, t as d, u as f } from "./chunks/export-DZQ3cUry.js";
|
|
2
|
+
import { n as p, t as m } from "./chunks/labels-BtHiUTQI.js";
|
|
3
|
+
import { n as h, t as g } from "./chunks/diagnostics-CtHoJyiX.js";
|
|
4
|
+
import { n as _, r as v, t as y } from "./chunks/url-D2BoivaE.js";
|
|
5
|
+
import { a as b, i as x, n as S, r as C, t as w } from "./chunks/normalize-CRYv3Wqt.js";
|
|
6
|
+
import { a as T, d as E, f as D, i as O, n as k, o as A, p as j, r as M, s as N, t as P } from "./chunks/useActiveHeading-BaGVMJnB.js";
|
|
7
|
+
import { _ as F, a as I, c as L, d as R, f as z, g as B, h as V, i as H, l as U, n as W, o as G, p as K, r as q, s as J, t as Y, u as X } from "./chunks/registry-DLjr93-V.js";
|
|
8
|
+
import { a as Z, i as Q, n as $, r as ee, t as te } from "./chunks/preset-BjaOuJUL.js";
|
|
9
|
+
import { a as ne, i as re, n as ie, o as ae, r as oe, t as se } from "./chunks/adapters-CMwX_NEI.js";
|
|
10
|
+
import { a as ce, i as le, n as ue, o as de, r as fe, s as pe, t as me } from "./chunks/identity-jZEhX2d5.js";
|
|
11
|
+
import "./pipeline.js";
|
|
12
|
+
import { t as he } from "./chunks/plugin-DqkFHyny.js";
|
|
13
|
+
import { n as ge, r as _e, t as ve } from "./chunks/config-aRYo2R8_.js";
|
|
14
|
+
import { n as ye, r as be, t as xe } from "./chunks/context-8NfW6fxI.js";
|
|
15
|
+
import { a as Se, i as Ce, n as we, r as Te } from "./chunks/render-Cs8iKrgz.js";
|
|
16
|
+
import { t as Ee } from "./chunks/MarkdownCode-B1k9tmW5.js";
|
|
17
|
+
import { t as De } from "./chunks/MarkdownBlockquote-DVXziX2t.js";
|
|
18
|
+
import { t as Oe } from "./chunks/MarkdownBreak-BwCi2Itt.js";
|
|
19
|
+
import { t as ke } from "./chunks/MarkdownCustomTag-BBdn3-WO.js";
|
|
20
|
+
import { t as Ae } from "./chunks/MarkdownEmphasis-CppivOEu.js";
|
|
21
|
+
import { t as je } from "./chunks/MarkdownHeading-DaNcP0_6.js";
|
|
22
|
+
import { t as Me } from "./chunks/MarkdownHorizontalRule-QNe_cuUI.js";
|
|
23
|
+
import { t as Ne } from "./chunks/MarkdownImage-BRy76svs.js";
|
|
24
|
+
import { t as Pe } from "./chunks/MarkdownInlineCode-MXZYFwex.js";
|
|
25
|
+
import { t as Fe } from "./chunks/MarkdownLink-Dbx3NwgV.js";
|
|
26
|
+
import { t as Ie } from "./chunks/MarkdownList-BJ-_C71k.js";
|
|
27
|
+
import { t as Le } from "./chunks/MarkdownListItem-Z1EHIY26.js";
|
|
28
|
+
import { t as Re } from "./chunks/MarkdownFootnoteReference-Dy3Khwyj.js";
|
|
29
|
+
import { t as ze } from "./chunks/MarkdownFootnotes-BRPzkbXv.js";
|
|
30
|
+
import { t as Be } from "./chunks/MarkdownParagraph-BxLSmSaG.js";
|
|
31
|
+
import { t as Ve } from "./chunks/MarkdownStrikethrough-CblvbqDk.js";
|
|
32
|
+
import { t as He } from "./chunks/MarkdownTaskItem-BcmKo1lk.js";
|
|
33
|
+
import { t as Ue } from "./chunks/MarkdownStrong-uU5MzAoJ.js";
|
|
34
|
+
import { t as We } from "./chunks/MarkdownTable-DmBTg_CR.js";
|
|
35
|
+
import { t as Ge } from "./chunks/MarkdownTableCell-eiCJe847.js";
|
|
36
|
+
import { t as Ke } from "./chunks/MarkdownTableRow-DuJaPntg.js";
|
|
37
|
+
import { t as qe } from "./chunks/MarkdownTableSection-PFHz-R33.js";
|
|
38
|
+
import { n as Je, t as Ye } from "./chunks/MarkdownRenderer-DLRRfsdI.js";
|
|
39
|
+
import { t as Xe } from "./chunks/MarkdownContent-BAK6dqo7.js";
|
|
40
|
+
import { t as Ze } from "./chunks/MarkdownEmpty-Av5k6bqa.js";
|
|
41
|
+
import { t as Qe } from "./chunks/MarkdownError-C0sPs5W0.js";
|
|
42
|
+
import { t as $e } from "./chunks/MarkdownLoading-D-RYtXxf.js";
|
|
43
|
+
import { t as et } from "./chunks/MarkdownRoot-DEE6iVfh.js";
|
|
44
|
+
import { t as tt } from "./chunks/MarkdownTocItem-DT9mR3vL.js";
|
|
45
|
+
import { t as nt } from "./chunks/MarkdownToc-BdOHF-Yo.js";
|
|
46
|
+
import { t as rt } from "./chunks/MarkdownConfigProvider-5N3ylrIu.js";
|
|
47
|
+
import { t as it } from "./chunks/VueSyntaxHighlighter-DyLsYMwy.js";
|
|
48
|
+
import { t as at } from "./chunks/MermaidLiveEditor-W-qf3G-5.js";
|
|
49
|
+
import { t as ot } from "./chunks/MarkdownHtml-66lYkvwM.js";
|
|
50
|
+
import "./components/index.js";
|
|
51
|
+
// src/index.ts
|
|
52
|
+
var st = "1.0.0";
|
|
53
|
+
export { l as COMPONENT_MANIFESTS, Se as CodeBlock, m as DEFAULT_LABELS, ve as MARKDOWN_CONFIG, De as MarkdownBlockquote, Oe as MarkdownBreak, Je as MarkdownChildren, Ee as MarkdownCode, rt as MarkdownConfigProvider, Xe as MarkdownContent, ke as MarkdownCustomTag, Ae as MarkdownEmphasis, Ze as MarkdownEmpty, Qe as MarkdownError, Re as MarkdownFootnoteReference, ze as MarkdownFootnotes, je as MarkdownHeading, Me as MarkdownHorizontalRule, ot as MarkdownHtml, Ne as MarkdownImage, Pe as MarkdownInlineCode, Fe as MarkdownLink, Ie as MarkdownList, Le as MarkdownListItem, $e as MarkdownLoading, Ce as MarkdownMath, we as MarkdownMermaid, Be as MarkdownParagraph, Ye as MarkdownRenderer, et as MarkdownRoot, Ve as MarkdownStrikethrough, Ue as MarkdownStrong, We as MarkdownTable, Ge as MarkdownTableCell, Ke as MarkdownTableRow, qe as MarkdownTableSection, He as MarkdownTaskItem, nt as MarkdownToc, tt as MarkdownTocItem, Te as MermaidBlock, at as MermaidLiveEditor, u as PARTS, t as PART_NAMES, xe as RENDER_CONTEXT, a as TOKENS, f as TOKEN_NAMES, n as VMD_CLASS_PREFIX, it as VueSyntaxHighlighter, fe as assertPipelineResult, D as buildDocument, W as codePlugin, w as collectCustomTags, te as composePresets, V as countSearchMatches, g as createDiagnostic, me as createMemoKey, pe as createOfficialPipeline, ue as createPipelineIdentity, R as createPluginContext, q as customTagsPlugin, H as defaultPlugins, y as defaultUrlTransform, le as defineMarkdownPipeline, z as defineMarkdownPlugin, $ as defineMarkdownPreset, h as errorMessage, d as exportMarkdownHtml, o as exportMarkdownHtmlSync, S as extractToc, C as filterTocByDepth, P as findElementById, I as frontmatterPlugin, G as fullPlugins, i as getComponentManifest, J as gfmPlugin, ye as isEmptySlotContent, _ as isExternalUrl, se as isValidDiagnosticFormatter, ie as isValidHighlighter, oe as isValidMathEngine, re as isValidMermaidRenderer, ne as isValidSlugger, ae as isValidUrlTransform, L as linkPlugin, O as memoClear, T as memoGet, A as memoSet, N as memoSize, Q as mergeMarkdownConfig, Z as mergeMarkdownPreset, he as mermaidPlugin, x as normalizeHast, r as partAttrs, c as partClass, ge as provideMarkdownConfig, p as resolveLabel, ce as resolvePipeline, Y as resolvePlugins, ee as resolvePreset, v as resolveUrl, B as searchDocument, U as searchPlugin, F as segmentSearch, X as tocPlugin, k as useActiveHeading, _e as useMarkdownConfig, M as useMarkdownDocument, be as useRenderContext, e as validateManifest, s as validateManifestRegistry, de as validatePipeline, K as validatePlugin, st as version, b as walkNodes, j as withDerivedDocument, E as withUniqueSlugs };
|
|
54
|
+
|
|
55
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["validateManifest","PART_NAMES","VMD_CLASS_PREFIX","partAttrs","TOKENS","exportMarkdownHtmlSync","validateManifestRegistry","partClass","COMPONENT_MANIFESTS","PARTS","exportMarkdownHtml","TOKEN_NAMES","resolveLabel","DEFAULT_LABELS","errorMessage","createDiagnostic","isExternalUrl","resolveUrl","defaultUrlTransform","walkNodes","normalizeHast","extractToc","filterTocByDepth","collectCustomTags","memoGet","withUniqueSlugs","buildDocument","memoClear","useActiveHeading","memoSet","withDerivedDocument","useMarkdownDocument","memoSize","findElementById","segmentSearch","frontmatterPlugin","linkPlugin","createPluginContext","defineMarkdownPlugin","searchDocument","countSearchMatches","defaultPlugins","searchPlugin","codePlugin","fullPlugins","validatePlugin","customTagsPlugin","gfmPlugin","resolvePlugins","tocPlugin","mergeMarkdownPreset","mergeMarkdownConfig","defineMarkdownPreset","resolvePreset","composePresets","isValidSlugger","isValidMermaidRenderer","isValidHighlighter","isValidUrlTransform","isValidMathEngine","isValidDiagnosticFormatter","resolvePipeline","defineMarkdownPipeline","createPipelineIdentity","validatePipeline","assertPipelineResult","createOfficialPipeline","createMemoKey","mermaidPlugin","provideMarkdownConfig","useMarkdownConfig","MARKDOWN_CONFIG","isEmptySlotContent","useRenderContext","RENDER_CONTEXT","CodeBlock_default","MarkdownMath_default","MarkdownMermaid_default","MermaidBlock_default","MarkdownCode_default","MarkdownBlockquote_default","MarkdownBreak_default","MarkdownCustomTag_default","MarkdownEmphasis_default","MarkdownHeading_default","MarkdownHorizontalRule_default","MarkdownImage_default","MarkdownInlineCode_default","MarkdownLink_default","MarkdownList_default","MarkdownListItem_default","MarkdownFootnoteReference_default","MarkdownFootnotes_default","MarkdownParagraph_default","MarkdownStrikethrough_default","MarkdownTaskItem_default","MarkdownStrong_default","MarkdownTable_default","MarkdownTableCell_default","MarkdownTableRow_default","MarkdownTableSection_default","MarkdownChildren_default","MarkdownRenderer_default","MarkdownContent_default","MarkdownEmpty_default","MarkdownError_default","MarkdownLoading_default","MarkdownRoot_default","MarkdownTocItem_default","MarkdownToc_default","MarkdownConfigProvider_default","VueSyntaxHighlighter_default","MermaidLiveEditor_default","MarkdownHtml_default","version","getComponentManifest"],"sources":["../src/index.ts"],"sourcesContent":["export const version = '1.0.0'\r\n\r\nexport * from './core/types'\r\nexport * from './core/parts'\r\nexport * from './core/labels'\r\nexport * from './core/diagnostics'\r\nexport * from './core/url'\r\nexport * from './core/model'\r\nexport * from './core/normalize'\r\nexport * from './core/search'\r\nexport * from './core/slugger'\r\nexport * from './core/manifest'\r\nexport * from './core/config'\r\nexport * from './core/preset'\r\nexport * from './core/adapters'\r\nexport * from './export'\r\nexport * from './core/memo'\r\nexport * from './pipeline'\r\nexport * from './plugins/define'\r\nexport * from './plugins/builtin'\r\nexport * from './plugins/registry'\r\nexport * from './mermaid/plugin'\r\nexport * from './composables/useMarkdownDocument'\r\nexport * from './composables/useActiveHeading'\r\nexport * from './components'\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAakH,KAAU"}
|
|
@@ -0,0 +1,583 @@
|
|
|
1
|
+
import "../chunks/default-DWVS-I_8.js";
|
|
2
|
+
import { t as e } from "../chunks/objectSpread2-CtBNx0TF.js";
|
|
3
|
+
import { a as t, i as n, m as r, o as i, r as a, t as o } from "../chunks/micromark-factory-space-Db040TnW.js";
|
|
4
|
+
import { t as s } from "../chunks/longest-streak-DZE_EqsU.js";
|
|
5
|
+
import { t as c } from "../chunks/lib-BQiWGWpu.js";
|
|
6
|
+
import { n as l } from "../chunks/hast-nodes-C0bX3M5Z.js";
|
|
7
|
+
import u from "katex";
|
|
8
|
+
// node_modules/mdast-util-math/lib/index.js
|
|
9
|
+
function d() {
|
|
10
|
+
return {
|
|
11
|
+
enter: {
|
|
12
|
+
mathFlow: e,
|
|
13
|
+
mathFlowFenceMeta: t,
|
|
14
|
+
mathText: a
|
|
15
|
+
},
|
|
16
|
+
exit: {
|
|
17
|
+
mathFlow: i,
|
|
18
|
+
mathFlowFence: r,
|
|
19
|
+
mathFlowFenceMeta: n,
|
|
20
|
+
mathFlowValue: s,
|
|
21
|
+
mathText: o,
|
|
22
|
+
mathTextData: s
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
function e(e) {
|
|
26
|
+
this.enter({
|
|
27
|
+
type: "math",
|
|
28
|
+
meta: null,
|
|
29
|
+
value: "",
|
|
30
|
+
data: {
|
|
31
|
+
hName: "pre",
|
|
32
|
+
hChildren: [{
|
|
33
|
+
type: "element",
|
|
34
|
+
tagName: "code",
|
|
35
|
+
properties: { className: ["language-math", "math-display"] },
|
|
36
|
+
children: []
|
|
37
|
+
}]
|
|
38
|
+
}
|
|
39
|
+
}, e);
|
|
40
|
+
}
|
|
41
|
+
function t() {
|
|
42
|
+
this.buffer();
|
|
43
|
+
}
|
|
44
|
+
function n() {
|
|
45
|
+
let e = this.resume(), t = this.stack[this.stack.length - 1];
|
|
46
|
+
t.type, t.meta = e;
|
|
47
|
+
}
|
|
48
|
+
function r() {
|
|
49
|
+
this.data.mathFlowInside || (this.buffer(), this.data.mathFlowInside = !0);
|
|
50
|
+
}
|
|
51
|
+
function i(e) {
|
|
52
|
+
let t = this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, ""), n = this.stack[this.stack.length - 1];
|
|
53
|
+
n.type, this.exit(e), n.value = t;
|
|
54
|
+
let r = n.data.hChildren[0];
|
|
55
|
+
r.type, r.tagName, r.children.push({
|
|
56
|
+
type: "text",
|
|
57
|
+
value: t
|
|
58
|
+
}), this.data.mathFlowInside = void 0;
|
|
59
|
+
}
|
|
60
|
+
function a(e) {
|
|
61
|
+
this.enter({
|
|
62
|
+
type: "inlineMath",
|
|
63
|
+
value: "",
|
|
64
|
+
data: {
|
|
65
|
+
hName: "code",
|
|
66
|
+
hProperties: { className: ["language-math", "math-inline"] },
|
|
67
|
+
hChildren: []
|
|
68
|
+
}
|
|
69
|
+
}, e), this.buffer();
|
|
70
|
+
}
|
|
71
|
+
function o(e) {
|
|
72
|
+
let t = this.resume(), n = this.stack[this.stack.length - 1];
|
|
73
|
+
n.type, this.exit(e), n.value = t, n.data.hChildren.push({
|
|
74
|
+
type: "text",
|
|
75
|
+
value: t
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
function s(e) {
|
|
79
|
+
this.config.enter.data.call(this, e), this.config.exit.data.call(this, e);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
function f(t) {
|
|
83
|
+
let n = (t || {}).singleDollarTextMath;
|
|
84
|
+
return n == null && (n = !0), i.peek = a, {
|
|
85
|
+
unsafe: [
|
|
86
|
+
{
|
|
87
|
+
character: "\r",
|
|
88
|
+
inConstruct: "mathFlowMeta"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
character: "\n",
|
|
92
|
+
inConstruct: "mathFlowMeta"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
character: "$",
|
|
96
|
+
after: n ? void 0 : "\\$",
|
|
97
|
+
inConstruct: "phrasing"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
character: "$",
|
|
101
|
+
inConstruct: "mathFlowMeta"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
atBreak: !0,
|
|
105
|
+
character: "$",
|
|
106
|
+
after: "\\$"
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
handlers: {
|
|
110
|
+
math: r,
|
|
111
|
+
inlineMath: i
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
function r(t, n, r, i) {
|
|
115
|
+
let a = t.value || "", o = r.createTracker(i), c = "$".repeat(Math.max(s(a, "$") + 1, 2)), l = r.enter("mathFlow"), u = o.move(c);
|
|
116
|
+
if (t.meta) {
|
|
117
|
+
let n = r.enter("mathFlowMeta");
|
|
118
|
+
u += o.move(r.safe(t.meta, e({
|
|
119
|
+
after: "\n",
|
|
120
|
+
before: u,
|
|
121
|
+
encode: ["$"]
|
|
122
|
+
}, o.current()))), n();
|
|
123
|
+
}
|
|
124
|
+
return u += o.move("\n"), a && (u += o.move(a + "\n")), u += o.move(c), l(), u;
|
|
125
|
+
}
|
|
126
|
+
function i(e, t, r) {
|
|
127
|
+
let i = e.value || "", a = 1;
|
|
128
|
+
for (n || a++; RegExp("(^|[^$])" + "\\$".repeat(a) + "([^$]|$)").test(i);) a++;
|
|
129
|
+
let o = "$".repeat(a);
|
|
130
|
+
/[^ \r\n]/.test(i) && (/^[ \r\n]/.test(i) && /[ \r\n]$/.test(i) || /^\$|\$$/.test(i)) && (i = " " + i + " ");
|
|
131
|
+
let s = -1;
|
|
132
|
+
for (; ++s < r.unsafe.length;) {
|
|
133
|
+
let e = r.unsafe[s];
|
|
134
|
+
if (!e.atBreak) continue;
|
|
135
|
+
let t = r.compilePattern(e), n;
|
|
136
|
+
for (; n = t.exec(i);) {
|
|
137
|
+
let e = n.index;
|
|
138
|
+
i.codePointAt(e) === 10 && i.codePointAt(e - 1) === 13 && e--, i = i.slice(0, e) + " " + i.slice(n.index + 1);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return o + i + o;
|
|
142
|
+
}
|
|
143
|
+
function a() {
|
|
144
|
+
return "$";
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
// node_modules/micromark-extension-math/lib/math-flow.js
|
|
148
|
+
var p = {
|
|
149
|
+
tokenize: h,
|
|
150
|
+
concrete: !0,
|
|
151
|
+
name: "mathFlow"
|
|
152
|
+
}, m = {
|
|
153
|
+
tokenize: g,
|
|
154
|
+
partial: !0
|
|
155
|
+
};
|
|
156
|
+
function h(e, t, n) {
|
|
157
|
+
let i = this, a = i.events[i.events.length - 1], s = a && a[1].type === "linePrefix" ? a[2].sliceSerialize(a[1], !0).length : 0, c = 0;
|
|
158
|
+
return l;
|
|
159
|
+
function l(t) {
|
|
160
|
+
return e.enter("mathFlow"), e.enter("mathFlowFence"), e.enter("mathFlowFenceSequence"), u(t);
|
|
161
|
+
}
|
|
162
|
+
function u(t) {
|
|
163
|
+
return t === 36 ? (e.consume(t), c++, u) : c < 2 ? n(t) : (e.exit("mathFlowFenceSequence"), o(e, d, "whitespace")(t));
|
|
164
|
+
}
|
|
165
|
+
function d(t) {
|
|
166
|
+
return t === null || r(t) ? p(t) : (e.enter("mathFlowFenceMeta"), e.enter("chunkString", { contentType: "string" }), f(t));
|
|
167
|
+
}
|
|
168
|
+
function f(t) {
|
|
169
|
+
return t === null || r(t) ? (e.exit("chunkString"), e.exit("mathFlowFenceMeta"), p(t)) : t === 36 ? n(t) : (e.consume(t), f);
|
|
170
|
+
}
|
|
171
|
+
function p(n) {
|
|
172
|
+
return e.exit("mathFlowFence"), i.interrupt ? t(n) : e.attempt(m, h, y)(n);
|
|
173
|
+
}
|
|
174
|
+
function h(t) {
|
|
175
|
+
return e.attempt({
|
|
176
|
+
tokenize: b,
|
|
177
|
+
partial: !0
|
|
178
|
+
}, y, g)(t);
|
|
179
|
+
}
|
|
180
|
+
function g(t) {
|
|
181
|
+
return (s ? o(e, _, "linePrefix", s + 1) : _)(t);
|
|
182
|
+
}
|
|
183
|
+
function _(t) {
|
|
184
|
+
return t === null ? y(t) : r(t) ? e.attempt(m, h, y)(t) : (e.enter("mathFlowValue"), v(t));
|
|
185
|
+
}
|
|
186
|
+
function v(t) {
|
|
187
|
+
return t === null || r(t) ? (e.exit("mathFlowValue"), _(t)) : (e.consume(t), v);
|
|
188
|
+
}
|
|
189
|
+
function y(n) {
|
|
190
|
+
return e.exit("mathFlow"), t(n);
|
|
191
|
+
}
|
|
192
|
+
function b(e, t, n) {
|
|
193
|
+
let a = 0;
|
|
194
|
+
return o(e, s, "linePrefix", i.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4);
|
|
195
|
+
function s(t) {
|
|
196
|
+
return e.enter("mathFlowFence"), e.enter("mathFlowFenceSequence"), l(t);
|
|
197
|
+
}
|
|
198
|
+
function l(t) {
|
|
199
|
+
return t === 36 ? (a++, e.consume(t), l) : a < c ? n(t) : (e.exit("mathFlowFenceSequence"), o(e, u, "whitespace")(t));
|
|
200
|
+
}
|
|
201
|
+
function u(i) {
|
|
202
|
+
return i === null || r(i) ? (e.exit("mathFlowFence"), t(i)) : n(i);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
function g(e, t, n) {
|
|
207
|
+
let r = this;
|
|
208
|
+
return i;
|
|
209
|
+
function i(n) {
|
|
210
|
+
return n === null ? t(n) : (e.enter("lineEnding"), e.consume(n), e.exit("lineEnding"), a);
|
|
211
|
+
}
|
|
212
|
+
function a(e) {
|
|
213
|
+
return r.parser.lazy[r.now().line] ? n(e) : t(e);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
// node_modules/micromark-extension-math/lib/math-text.js
|
|
217
|
+
function _(e) {
|
|
218
|
+
let t = (e || {}).singleDollarTextMath;
|
|
219
|
+
return t == null && (t = !0), {
|
|
220
|
+
tokenize: n,
|
|
221
|
+
resolve: v,
|
|
222
|
+
previous: y,
|
|
223
|
+
name: "mathText"
|
|
224
|
+
};
|
|
225
|
+
function n(e, n, i) {
|
|
226
|
+
let a = 0, o, s;
|
|
227
|
+
return c;
|
|
228
|
+
function c(t) {
|
|
229
|
+
return e.enter("mathText"), e.enter("mathTextSequence"), l(t);
|
|
230
|
+
}
|
|
231
|
+
function l(n) {
|
|
232
|
+
return n === 36 ? (e.consume(n), a++, l) : a < 2 && !t ? i(n) : (e.exit("mathTextSequence"), u(n));
|
|
233
|
+
}
|
|
234
|
+
function u(t) {
|
|
235
|
+
return t === null ? i(t) : t === 36 ? (s = e.enter("mathTextSequence"), o = 0, f(t)) : t === 32 ? (e.enter("space"), e.consume(t), e.exit("space"), u) : r(t) ? (e.enter("lineEnding"), e.consume(t), e.exit("lineEnding"), u) : (e.enter("mathTextData"), d(t));
|
|
236
|
+
}
|
|
237
|
+
function d(t) {
|
|
238
|
+
return t === null || t === 32 || t === 36 || r(t) ? (e.exit("mathTextData"), u(t)) : (e.consume(t), d);
|
|
239
|
+
}
|
|
240
|
+
function f(t) {
|
|
241
|
+
return t === 36 ? (e.consume(t), o++, f) : o === a ? (e.exit("mathTextSequence"), e.exit("mathText"), n(t)) : (s.type = "mathTextData", d(t));
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
function v(e) {
|
|
246
|
+
let t = e.length - 4, n = 3, r, i;
|
|
247
|
+
if ((e[n][1].type === "lineEnding" || e[n][1].type === "space") && (e[t][1].type === "lineEnding" || e[t][1].type === "space")) {
|
|
248
|
+
for (r = n; ++r < t;) if (e[r][1].type === "mathTextData") {
|
|
249
|
+
e[t][1].type = "mathTextPadding", e[n][1].type = "mathTextPadding", n += 2, t -= 2;
|
|
250
|
+
break;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
for (r = n - 1, t++; ++r <= t;) i === void 0 ? r !== t && e[r][1].type !== "lineEnding" && (i = r) : (r === t || e[r][1].type === "lineEnding") && (e[i][1].type = "mathTextData", r !== i + 2 && (e[i][1].end = e[r - 1][1].end, e.splice(i + 2, r - i - 2), t -= r - i - 2, r = i + 2), i = void 0);
|
|
254
|
+
return e;
|
|
255
|
+
}
|
|
256
|
+
function y(e) {
|
|
257
|
+
return e !== 36 || this.events[this.events.length - 1][1].type === "characterEscape";
|
|
258
|
+
}
|
|
259
|
+
// node_modules/micromark-extension-math/lib/syntax.js
|
|
260
|
+
function b(e) {
|
|
261
|
+
return {
|
|
262
|
+
flow: { 36: p },
|
|
263
|
+
text: { 36: _(e) }
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
// node_modules/remark-math/lib/index.js
|
|
267
|
+
var x = {};
|
|
268
|
+
function ee(e) {
|
|
269
|
+
let t = this, n = e || x, r = t.data(), i = r.micromarkExtensions || (r.micromarkExtensions = []), a = r.fromMarkdownExtensions || (r.fromMarkdownExtensions = []), o = r.toMarkdownExtensions || (r.toMarkdownExtensions = []);
|
|
270
|
+
i.push(b(n)), a.push(d()), o.push(f(n));
|
|
271
|
+
}
|
|
272
|
+
// node_modules/unist-util-remove-position/lib/index.js
|
|
273
|
+
function te(e, t) {
|
|
274
|
+
let n = (t || {}).force || !1;
|
|
275
|
+
a(e, r);
|
|
276
|
+
function r(e) {
|
|
277
|
+
n ? delete e.position : e.position = void 0;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
// node_modules/hast-util-from-html-isomorphic/lib/index.js
|
|
281
|
+
function S(e, t) {
|
|
282
|
+
let n = c(e, t);
|
|
283
|
+
return te(n, { force: !0 }), delete n.data, n;
|
|
284
|
+
}
|
|
285
|
+
// node_modules/unist-util-find-after/lib/index.js
|
|
286
|
+
var C = (function(e, t, n) {
|
|
287
|
+
let r = i(n);
|
|
288
|
+
if (!e || !e.type || !e.children) throw Error("Expected parent node");
|
|
289
|
+
if (typeof t == "number") {
|
|
290
|
+
if (t < 0 || t === Infinity) throw Error("Expected positive finite number as index");
|
|
291
|
+
} else if (t = e.children.indexOf(t), t < 0) throw Error("Expected child node or index");
|
|
292
|
+
for (; ++t < e.children.length;) if (r(e.children[t], t, e)) return e.children[t];
|
|
293
|
+
}), w = (function(e) {
|
|
294
|
+
if (e == null) return re;
|
|
295
|
+
if (typeof e == "string") return T(e);
|
|
296
|
+
if (typeof e == "object") return ne(e);
|
|
297
|
+
if (typeof e == "function") return E(e);
|
|
298
|
+
throw Error("Expected function, string, or array as `test`");
|
|
299
|
+
});
|
|
300
|
+
function ne(e) {
|
|
301
|
+
let t = [], n = -1;
|
|
302
|
+
for (; ++n < e.length;) t[n] = w(e[n]);
|
|
303
|
+
return E(r);
|
|
304
|
+
function r(...e) {
|
|
305
|
+
let n = -1;
|
|
306
|
+
for (; ++n < t.length;) if (t[n].apply(this, e)) return !0;
|
|
307
|
+
return !1;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
function T(e) {
|
|
311
|
+
return E(t);
|
|
312
|
+
function t(t) {
|
|
313
|
+
return t.tagName === e;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
function E(e) {
|
|
317
|
+
return t;
|
|
318
|
+
function t(t, n, r) {
|
|
319
|
+
return !!(D(t) && e.call(this, t, typeof n == "number" ? n : void 0, r || void 0));
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
function re(e) {
|
|
323
|
+
return !!(e && typeof e == "object" && "type" in e && e.type === "element" && "tagName" in e && typeof e.tagName == "string");
|
|
324
|
+
}
|
|
325
|
+
function D(e) {
|
|
326
|
+
return typeof e == "object" && !!e && "type" in e && "tagName" in e;
|
|
327
|
+
}
|
|
328
|
+
// node_modules/hast-util-to-text/lib/index.js
|
|
329
|
+
var O = /\n/g, k = /[\t ]+/g, A = w("br"), j = w(V), M = w("p"), N = w("tr"), ie = w([
|
|
330
|
+
"datalist",
|
|
331
|
+
"head",
|
|
332
|
+
"noembed",
|
|
333
|
+
"noframes",
|
|
334
|
+
"noscript",
|
|
335
|
+
"rp",
|
|
336
|
+
"script",
|
|
337
|
+
"style",
|
|
338
|
+
"template",
|
|
339
|
+
"title",
|
|
340
|
+
B,
|
|
341
|
+
H
|
|
342
|
+
]), P = w(/* @__PURE__ */ "address.article.aside.blockquote.body.caption.center.dd.dialog.dir.dl.dt.div.figure.figcaption.footer.form,.h1.h2.h3.h4.h5.h6.header.hgroup.hr.html.legend.li.listing.main.menu.nav.ol.p.plaintext.pre.section.ul.xmp".split("."));
|
|
343
|
+
function ae(e, t) {
|
|
344
|
+
let n = t || {}, r = "children" in e ? e.children : [], i = P(e), a = z(e, {
|
|
345
|
+
whitespace: n.whitespace || "normal",
|
|
346
|
+
breakBefore: !1,
|
|
347
|
+
breakAfter: !1
|
|
348
|
+
}), o = [];
|
|
349
|
+
(e.type === "text" || e.type === "comment") && o.push(...I(e, {
|
|
350
|
+
whitespace: a,
|
|
351
|
+
breakBefore: !0,
|
|
352
|
+
breakAfter: !0
|
|
353
|
+
}));
|
|
354
|
+
let s = -1;
|
|
355
|
+
for (; ++s < r.length;) o.push(...F(r[s], e, {
|
|
356
|
+
whitespace: a,
|
|
357
|
+
breakBefore: s ? void 0 : i,
|
|
358
|
+
breakAfter: s < r.length - 1 ? A(r[s + 1]) : i
|
|
359
|
+
}));
|
|
360
|
+
let c = [], l;
|
|
361
|
+
for (s = -1; ++s < o.length;) {
|
|
362
|
+
let e = o[s];
|
|
363
|
+
typeof e == "number" ? l !== void 0 && e > l && (l = e) : e && (l !== void 0 && l > -1 && c.push("\n".repeat(l) || " "), l = -1, c.push(e));
|
|
364
|
+
}
|
|
365
|
+
return c.join("");
|
|
366
|
+
}
|
|
367
|
+
function F(e, t, n) {
|
|
368
|
+
return e.type === "element" ? oe(e, t, n) : e.type === "text" ? n.whitespace === "normal" ? I(e, n) : L(e) : [];
|
|
369
|
+
}
|
|
370
|
+
function oe(e, t, n) {
|
|
371
|
+
let r = z(e, n), i = e.children || [], a = -1, o = [];
|
|
372
|
+
if (ie(e)) return o;
|
|
373
|
+
let s, c;
|
|
374
|
+
for (A(e) || N(e) && C(t, e, N) ? c = "\n" : M(e) ? (s = 2, c = 2) : P(e) && (s = 1, c = 1); ++a < i.length;) o = o.concat(F(i[a], e, {
|
|
375
|
+
whitespace: r,
|
|
376
|
+
breakBefore: a ? void 0 : s,
|
|
377
|
+
breakAfter: a < i.length - 1 ? A(i[a + 1]) : c
|
|
378
|
+
}));
|
|
379
|
+
return j(e) && C(t, e, j) && o.push(" "), s && o.unshift(s), c && o.push(c), o;
|
|
380
|
+
}
|
|
381
|
+
function I(e, t) {
|
|
382
|
+
let n = String(e.value), r = [], i = [], a = 0;
|
|
383
|
+
for (; a <= n.length;) {
|
|
384
|
+
O.lastIndex = a;
|
|
385
|
+
let e = O.exec(n), i = e && "index" in e ? e.index : n.length;
|
|
386
|
+
r.push(R(n.slice(a, i).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g, ""), a !== 0 || t.breakBefore, i !== n.length || t.breakAfter)), a = i + 1;
|
|
387
|
+
}
|
|
388
|
+
let o = -1, s;
|
|
389
|
+
for (; ++o < r.length;) r[o].charCodeAt(r[o].length - 1) === 8203 || o < r.length - 1 && r[o + 1].charCodeAt(0) === 8203 ? (i.push(r[o]), s = void 0) : r[o] ? (typeof s == "number" && i.push(s), i.push(r[o]), s = 0) : (o === 0 || o === r.length - 1) && i.push(0);
|
|
390
|
+
return i;
|
|
391
|
+
}
|
|
392
|
+
function L(e) {
|
|
393
|
+
return [String(e.value)];
|
|
394
|
+
}
|
|
395
|
+
function R(e, t, n) {
|
|
396
|
+
let r = [], i = 0, a;
|
|
397
|
+
for (; i < e.length;) {
|
|
398
|
+
k.lastIndex = i;
|
|
399
|
+
let n = k.exec(e);
|
|
400
|
+
a = n ? n.index : e.length, !i && !a && n && !t && r.push(""), i !== a && r.push(e.slice(i, a)), i = n ? a + n[0].length : a;
|
|
401
|
+
}
|
|
402
|
+
return i !== a && !n && r.push(""), r.join(" ");
|
|
403
|
+
}
|
|
404
|
+
function z(e, t) {
|
|
405
|
+
if (e.type === "element") {
|
|
406
|
+
let n = e.properties || {};
|
|
407
|
+
switch (e.tagName) {
|
|
408
|
+
case "listing":
|
|
409
|
+
case "plaintext":
|
|
410
|
+
case "xmp": return "pre";
|
|
411
|
+
case "nobr": return "nowrap";
|
|
412
|
+
case "pre": return n.wrap ? "pre-wrap" : "pre";
|
|
413
|
+
case "td":
|
|
414
|
+
case "th": return n.noWrap ? "nowrap" : t.whitespace;
|
|
415
|
+
case "textarea": return "pre-wrap";
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
return t.whitespace;
|
|
419
|
+
}
|
|
420
|
+
function B(e) {
|
|
421
|
+
return !!(e.properties || {}).hidden;
|
|
422
|
+
}
|
|
423
|
+
function V(e) {
|
|
424
|
+
return e.tagName === "td" || e.tagName === "th";
|
|
425
|
+
}
|
|
426
|
+
function H(e) {
|
|
427
|
+
return e.tagName === "dialog" && !(e.properties || {}).open;
|
|
428
|
+
}
|
|
429
|
+
// node_modules/rehype-katex/lib/index.js
|
|
430
|
+
var U = {}, W = [];
|
|
431
|
+
function G(r) {
|
|
432
|
+
let i = r || U;
|
|
433
|
+
return function(r, a) {
|
|
434
|
+
t(r, "element", function(t, r) {
|
|
435
|
+
let o = Array.isArray(t.properties.className) ? t.properties.className : W, s = o.includes("language-math"), c = o.includes("math-display"), l = o.includes("math-inline"), d = c;
|
|
436
|
+
if (!s && !c && !l) return;
|
|
437
|
+
let f = r[r.length - 1], p = t;
|
|
438
|
+
/* c8 ignore next -- verbose to test. */
|
|
439
|
+
if (t.tagName === "code" && s && f && f.type === "element" && f.tagName === "pre" && (p = f, f = r[r.length - 2], d = !0), !f) return;
|
|
440
|
+
let m = ae(p, { whitespace: "pre" }), h;
|
|
441
|
+
try {
|
|
442
|
+
h = u.renderToString(m, e(e({}, i), {}, {
|
|
443
|
+
displayMode: d,
|
|
444
|
+
throwOnError: !0
|
|
445
|
+
}));
|
|
446
|
+
} catch (n) {
|
|
447
|
+
let o = n, s = o.name.toLowerCase();
|
|
448
|
+
a.message("Could not render math with KaTeX", {
|
|
449
|
+
ancestors: [...r, t],
|
|
450
|
+
cause: o,
|
|
451
|
+
place: t.position,
|
|
452
|
+
ruleId: s,
|
|
453
|
+
source: "rehype-katex"
|
|
454
|
+
});
|
|
455
|
+
try {
|
|
456
|
+
h = u.renderToString(m, e(e({}, i), {}, {
|
|
457
|
+
displayMode: d,
|
|
458
|
+
strict: "ignore",
|
|
459
|
+
throwOnError: !1
|
|
460
|
+
}));
|
|
461
|
+
} catch (e) {
|
|
462
|
+
h = [{
|
|
463
|
+
type: "element",
|
|
464
|
+
tagName: "span",
|
|
465
|
+
properties: {
|
|
466
|
+
className: ["katex-error"],
|
|
467
|
+
style: "color:" + (i.errorColor || "#cc0000"),
|
|
468
|
+
title: String(n)
|
|
469
|
+
},
|
|
470
|
+
children: [{
|
|
471
|
+
type: "text",
|
|
472
|
+
value: m
|
|
473
|
+
}]
|
|
474
|
+
}];
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
typeof h == "string" && (h = S(h, { fragment: !0 }).children);
|
|
478
|
+
let g = f.children.indexOf(p);
|
|
479
|
+
return f.children.splice(g, 1, ...h), n;
|
|
480
|
+
});
|
|
481
|
+
};
|
|
482
|
+
}
|
|
483
|
+
// src/math/plugin.ts
|
|
484
|
+
function K(e) {
|
|
485
|
+
var t;
|
|
486
|
+
let n = (t = e.properties) == null ? void 0 : t.className;
|
|
487
|
+
return Array.isArray(n) ? n.map(String) : typeof n == "string" ? n.split(/\s+/) : [];
|
|
488
|
+
}
|
|
489
|
+
function q(e) {
|
|
490
|
+
return e.type === "text" ? e.value : e.type === "element" ? e.children.map(q).join("") : "";
|
|
491
|
+
}
|
|
492
|
+
function J(e) {
|
|
493
|
+
let t = K(e);
|
|
494
|
+
return t.includes("language-math") && t.some((e) => e.startsWith("math-"));
|
|
495
|
+
}
|
|
496
|
+
function Y(e, t, n) {
|
|
497
|
+
return {
|
|
498
|
+
type: "element",
|
|
499
|
+
tagName: "vmd-math",
|
|
500
|
+
properties: {
|
|
501
|
+
"data-vmd-math": "",
|
|
502
|
+
"data-tex": t,
|
|
503
|
+
"data-display": e ? "true" : "false"
|
|
504
|
+
},
|
|
505
|
+
children: n
|
|
506
|
+
};
|
|
507
|
+
}
|
|
508
|
+
function X(t) {
|
|
509
|
+
return t.map((t) => {
|
|
510
|
+
if (t.type !== "element") return t;
|
|
511
|
+
if (t.tagName === "code" && J(t)) return Y(K(t).includes("math-display"), q(t), [t]);
|
|
512
|
+
if (t.tagName === "pre") {
|
|
513
|
+
let e = t.children.find((e) => e.type === "element" && e.tagName === "code" && J(e));
|
|
514
|
+
if (e) return Y(K(e).includes("math-display"), q(e), [t]);
|
|
515
|
+
}
|
|
516
|
+
return t.children.length > 0 ? e(e({}, t), {}, { children: X(t.children) }) : t;
|
|
517
|
+
});
|
|
518
|
+
}
|
|
519
|
+
function se() {
|
|
520
|
+
return (e) => {
|
|
521
|
+
e.children = X(e.children);
|
|
522
|
+
};
|
|
523
|
+
}
|
|
524
|
+
function Z(e) {
|
|
525
|
+
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
526
|
+
}
|
|
527
|
+
function ce(e, t) {
|
|
528
|
+
let n = t.inlineDelimiters, r = t.displayDelimiters;
|
|
529
|
+
return !n && !r ? e : e.split(/(```[\s\S]*?```|`[^`]*`)/g).map((e, t) => {
|
|
530
|
+
if (t % 2 == 1) return e;
|
|
531
|
+
let i = e;
|
|
532
|
+
return r && (i = i.replace(RegExp(`${Z(r[0])}([\\s\\S]*?)${Z(r[1])}`, "g"), (e, t) => `\n$$\n${t}\n$$\n`)), n && (i = i.replace(RegExp(`${Z(n[0])}([\\s\\S]*?)${Z(n[1])}`, "g"), (e, t) => `$${t}$`)), i;
|
|
533
|
+
}).join("");
|
|
534
|
+
}
|
|
535
|
+
function le(e = {}) {
|
|
536
|
+
var t, n;
|
|
537
|
+
return {
|
|
538
|
+
name: "math",
|
|
539
|
+
remarkPlugins: [[ee, { singleDollarTextMath: (t = e.singleDollarTextMath) == null || t }]],
|
|
540
|
+
rehypePlugins: [se, [G, (n = e.katex) == null ? {} : n]],
|
|
541
|
+
transformSource: (t) => ce(t, e)
|
|
542
|
+
};
|
|
543
|
+
}
|
|
544
|
+
// src/math/katex.ts
|
|
545
|
+
var Q = /* @__PURE__ */ new Map(), ue = 256;
|
|
546
|
+
function de(t) {
|
|
547
|
+
return e({
|
|
548
|
+
displayMode: !!t.displayMode,
|
|
549
|
+
throwOnError: !1,
|
|
550
|
+
trust: !1,
|
|
551
|
+
strict: "warn",
|
|
552
|
+
output: "htmlAndMathml"
|
|
553
|
+
}, t);
|
|
554
|
+
}
|
|
555
|
+
var $ = {
|
|
556
|
+
id: "katex",
|
|
557
|
+
render(e, t) {
|
|
558
|
+
let n = `${e}\u001e${JSON.stringify(t)}`, r = Q.get(n);
|
|
559
|
+
if (r) return r;
|
|
560
|
+
let i = de(t);
|
|
561
|
+
try {
|
|
562
|
+
let t = u.renderToString(e, i), r = { nodes: l(t) };
|
|
563
|
+
if (t.includes("katex-error") && (r.error = "Invalid TeX expression."), Q.set(n, r), Q.size > ue) {
|
|
564
|
+
let e = Q.keys().next().value;
|
|
565
|
+
e !== void 0 && Q.delete(e);
|
|
566
|
+
}
|
|
567
|
+
return r;
|
|
568
|
+
} catch (t) {
|
|
569
|
+
let r = {
|
|
570
|
+
nodes: [{
|
|
571
|
+
kind: "text",
|
|
572
|
+
key: "math-error",
|
|
573
|
+
value: e
|
|
574
|
+
}],
|
|
575
|
+
error: t instanceof Error ? t.message : String(t)
|
|
576
|
+
};
|
|
577
|
+
return Q.set(n, r), r;
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
};
|
|
581
|
+
export { $ as default, $ as katexEngine, le as mathPlugin };
|
|
582
|
+
|
|
583
|
+
//# sourceMappingURL=index.js.map
|