vue-stream-markdown 0.1.4 → 0.1.6
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/README.md +3 -1
- package/dist/arrow-left-DiHYz8df.js +25 -0
- package/dist/{blockquote-DdEg2gww.js → blockquote-CxA1dQZe.js} +4 -11
- package/dist/{button-jFTF378X.js → button-B2ebQt7R.js} +2 -3
- package/dist/button-C6zIegam.js +5 -0
- package/dist/{code-BxWvKFxG.js → code-CPG6B2Cw.js} +12 -20
- package/dist/code-block--1wFjtmu.js +9 -0
- package/dist/{code-block-uZcUI59D.js → code-block-I_Yd1Flg.js} +62 -67
- package/dist/{composables-Cx0nvyHl.js → composables-DWipZHuF.js} +1119 -840
- package/dist/corner-down-left-jxlwq3ox.js +24 -0
- package/dist/{delete-BdWzKJCy.js → delete-DQ21z5-F.js} +4 -11
- package/dist/dist-CYkm26BF.js +119 -0
- package/dist/dropdown-CtWjJiAf.js +5 -0
- package/dist/{emphasis-CTuGt1Ok.js → emphasis-BjLkIDQB.js} +4 -11
- package/dist/{en-US-Bfc50l3I.js → en-US-K7SXR3gy.js} +8 -1
- package/dist/{error-component-Bhl770lu.js → error-component-DSOVrE5J.js} +1 -1
- package/dist/error-component-DtcRn_0A.js +4 -0
- package/dist/flip-horizontal-CEf7aAdM.js +25 -0
- package/dist/footnote-definition-BmS8hchP.js +103 -0
- package/dist/footnote-reference-Z2tITeCE.js +86 -0
- package/dist/{heading-2vpQQtTH.js → heading-BwBFJB_E.js} +4 -11
- package/dist/{html-DL0PcUXX.js → html-DFU0myJP.js} +2 -10
- package/dist/image-BLlap3ce.js +242 -0
- package/dist/{image-BDtPwitR.js → image-IKvFWz2r.js} +43 -78
- package/dist/image-aT9xxnwh.js +8 -0
- package/dist/index.css +69 -64
- package/dist/index.d.ts +192 -82
- package/dist/index.js +291 -65
- package/dist/{inline-code-CBoqhfz7.js → inline-code-Bqu84Yyu.js} +2 -10
- package/dist/{inline-math-CAqboT7h.js → inline-math-C2Ryxm-K.js} +4 -12
- package/dist/{link-C8BSlPhZ.js → link-BXl7E_6o.js} +6 -14
- package/dist/{list-BCiFKGaz.js → list-DLcwTZns.js} +4 -11
- package/dist/{list-item-p-OLUR_9.js → list-item-H0eYeIdB.js} +4 -11
- package/dist/{math-CT1TB2pK.js → math-C-0d5PaJ.js} +4 -12
- package/dist/{mermaid-CYrA8rCl.js → mermaid-0x6C2MY5.js} +12 -18
- package/dist/modal-BDgfKnFl.js +4 -0
- package/dist/modal-CEqU9Ubu.js +94 -0
- package/dist/{node-list-CGr_EVtn.js → node-list--v2wbxOo.js} +19 -26
- package/dist/node-list-CHvX62Zh.js +4 -0
- package/dist/{paragraph-DYjqr_Sa.js → paragraph-DRPfp6DV.js} +4 -11
- package/dist/previewers-DsN-cTwd.js +10 -0
- package/dist/rotate-ccw-square-5sO65BY9.js +24 -0
- package/dist/segmented-DIVDGfR5.js +6 -0
- package/dist/{segmented-DBW9ignu.js → segmented-Drf8EBQD.js} +1 -1
- package/dist/{shiki-bQYWLdW3.js → shiki-CkwRD3TS.js} +6 -14
- package/dist/spin-DWkKEP0G.js +3 -0
- package/dist/{strong-CvOjLZiq.js → strong-D6V4fCRG.js} +4 -11
- package/dist/table-B2mghd3l.js +3 -0
- package/dist/{table-l_3z210v.js → table-DLUgGL5Q.js} +13 -18
- package/dist/{text-DuONUqRA.js → text-DoY1TIw3.js} +2 -10
- package/dist/{thematic-break-CcNPEI9Y.js → thematic-break-DXDZ5dcO.js} +2 -10
- package/dist/tooltip-Bdt9-aQx.js +68 -0
- package/dist/tooltip-DQ1-yPia.js +4 -0
- package/dist/{vanilla-CFWVwBvD.js → vanilla-BSgZTIo9.js} +1 -1
- package/dist/vanilla-DUbuBied.js +4 -0
- package/dist/{yaml-DJHrmzSe.js → yaml-3cd5rdJj.js} +3 -11
- package/dist/{zh-CN-CL1XGe0H.js → zh-CN-CykTNqF_.js} +9 -2
- package/dist/zoom-container-D2DxS8V5.js +6 -0
- package/dist/{zoom-container-gjQ0EMyk.js → zoom-container-f44XxzOI.js} +52 -23
- package/package.json +9 -10
- package/dist/button-D6ccVxGm.js +0 -5
- package/dist/code-block-B72JfFy-.js +0 -9
- package/dist/dropdown-oiCw8QVq.js +0 -5
- package/dist/error-component-8y13-fYG.js +0 -4
- package/dist/modal-CuQR21UD.js +0 -71
- package/dist/modal-DcpxxDDX.js +0 -3
- package/dist/node-list-lgY1wbfQ.js +0 -3
- package/dist/previewers-ByaS2Ksa.js +0 -10
- package/dist/segmented-B4IEw3wg.js +0 -6
- package/dist/spin-Bz4zGBEo.js +0 -3
- package/dist/table-CZLbUHiJ.js +0 -3
- package/dist/tooltip-3UDC9mw-.js +0 -71
- package/dist/tooltip-CAoc_U1X.js +0 -4
- package/dist/vanilla-De7W3PpS.js +0 -4
- package/dist/zoom-container-DBgGdbJS.js +0 -6
- /package/dist/{angular-Chs-UKBr.js → angular-CEQtRU3N.js} +0 -0
- /package/dist/{angular-component-Cc_FANXU.js → angular-component-QEWXDi5W.js} +0 -0
- /package/dist/{apache-COYnc6xR.js → apache-D1WYHuA2.js} +0 -0
- /package/dist/{asciidoc-BabXBDAL.js → asciidoc-BbV_Tvaj.js} +0 -0
- /package/dist/{assembly-CDqKhexW.js → assembly-DOdgqSeT.js} +0 -0
- /package/dist/{astro-C9kftzFG.js → astro-I7-Zr25r.js} +0 -0
- /package/dist/{bash-Ce4pNIkV.js → bash-BC7HOdMh.js} +0 -0
- /package/dist/{batch-CHQBRjFL.js → batch-XAv7F3kV.js} +0 -0
- /package/dist/{bicep-8jxWtuBF.js → bicep-B9IAZzHb.js} +0 -0
- /package/dist/{c-FBUef746.js → c-B3pMu4KG.js} +0 -0
- /package/dist/{check-C4xOk8um.js → check-BjAiKMbo.js} +0 -0
- /package/dist/{chevron-down-cnOJ4h1g.js → chevron-down-B4lkjpIC.js} +0 -0
- /package/dist/{circle-alert-CLX-h5rZ.js → circle-alert-DlAafH7h.js} +0 -0
- /package/dist/{clojure-BulUroSy.js → clojure-DwxK-YDX.js} +0 -0
- /package/dist/{cmake-CW3vz1Mo.js → cmake-DtnmI6Z6.js} +0 -0
- /package/dist/{cobol-CIn3oFju.js → cobol--wWeXL_f.js} +0 -0
- /package/dist/{code-D8LSp8rK.js → code-lfRPXNJI.js} +0 -0
- /package/dist/{codeowners-CJggXF_b.js → codeowners-Dtwyh-5g.js} +0 -0
- /package/dist/{coffeescript-CBrVvzGY.js → coffeescript-BlF7y2QG.js} +0 -0
- /package/dist/{copy-Cabve0xf.js → copy-BTFPPhff.js} +0 -0
- /package/dist/{cpp-BTKeuyd-.js → cpp-D_TbJeEH.js} +0 -0
- /package/dist/{crystal-DyIYvZbm.js → crystal-lJ2ZzJQu.js} +0 -0
- /package/dist/{csharp-NqZ1vyF9.js → csharp-D-5hlCJT.js} +0 -0
- /package/dist/{css-BpR5Lajb.js → css-Drykp8uH.js} +0 -0
- /package/dist/{csv-eCMFnKKK.js → csv-oLjD_o9N.js} +0 -0
- /package/dist/{cue-TY97dGOQ.js → cue-BBe_9OA4.js} +0 -0
- /package/dist/{d-NftUsdTd.js → d-CPNK2-3G.js} +0 -0
- /package/dist/{dart-DJpwZZbk.js → dart-BNaQZJdJ.js} +0 -0
- /package/dist/{database-aZwE71Px.js → database-DRAhifbf.js} +0 -0
- /package/dist/{diff-CYRzypaU.js → diff-D_vIvULL.js} +0 -0
- /package/dist/{docker-CxHBuukH.js → docker-BgJkkqCD.js} +0 -0
- /package/dist/{download-Bnn7rtYw.js → download-Bk2mYZyf.js} +0 -0
- /package/dist/{elixir-BKSxVc1h.js → elixir-CTx5aScS.js} +0 -0
- /package/dist/{elm-DScuAf3X.js → elm-nHy9iRuu.js} +0 -0
- /package/dist/{env-CDAKsodl.js → env-CrWzDcwP.js} +0 -0
- /package/dist/{erlang-D2M1ZL3m.js → erlang-CxR4-Qdt.js} +0 -0
- /package/dist/{eye-CdeX8PhP.js → eye-DpAj1af-.js} +0 -0
- /package/dist/{fortran-CORyQ0wt.js → fortran-DhUZYzo3.js} +0 -0
- /package/dist/{fsharp-BJz_Jgpl.js → fsharp-DyIvnsyH.js} +0 -0
- /package/dist/{git-DgrlTr1E.js → git-D4qjCZtd.js} +0 -0
- /package/dist/{gleam-t_xad9Kw.js → gleam-D-ovCBt_.js} +0 -0
- /package/dist/{go-Cvlh1xtL.js → go-CEH2y3pJ.js} +0 -0
- /package/dist/{graphql-ApIm0mDD.js → graphql-DbV-8_AJ.js} +0 -0
- /package/dist/{groovy-CaLnK8PV.js → groovy-B-_VVp4c.js} +0 -0
- /package/dist/{haml-MwijEO_6.js → haml-Cnm_v56B.js} +0 -0
- /package/dist/{handlebars-CKdUPI9h.js → handlebars-8EEQS0El.js} +0 -0
- /package/dist/{haskell-NPOXEnck.js → haskell-cLvKQFrd.js} +0 -0
- /package/dist/{haxe-DyKBMsDE.js → haxe-DtCGwrr1.js} +0 -0
- /package/dist/{html-CMgES1dE.js → html-C2NHp3i4.js} +0 -0
- /package/dist/{http-B9FFNmUr.js → http-DYO1Ugj7.js} +0 -0
- /package/dist/{image-CMZAakWu.js → image-DDiNDOKJ.js} +0 -0
- /package/dist/{java-iU-L9wJz.js → java-it6UCC5M.js} +0 -0
- /package/dist/{javascript-DtnWdTFC.js → javascript-DVxfoa-a.js} +0 -0
- /package/dist/{jinja-CoWszo_D.js → jinja-CUKX2CXM.js} +0 -0
- /package/dist/{json-C80qKCnh.js → json-O68iFOiu.js} +0 -0
- /package/dist/{julia-DG2BCBLx.js → julia-Dq3BwHeZ.js} +0 -0
- /package/dist/{kdl-7twRfIlJ.js → kdl-CFVZba8u.js} +0 -0
- /package/dist/{kotlin-BjrOgP7R.js → kotlin-BKhxhG0q.js} +0 -0
- /package/dist/{latex-DIQfUvG8.js → latex-B3hQqfJO.js} +0 -0
- /package/dist/{less-BJ1yEAWt.js → less-Bw2JZJkw.js} +0 -0
- /package/dist/{link-DeV4CQOB.js → link-DCaSecEI.js} +0 -0
- /package/dist/{liquid-BqKFZ1wQ.js → liquid-BsGDMxjJ.js} +0 -0
- /package/dist/{lisp-oekhB2ti.js → lisp-CnrazyOe.js} +0 -0
- /package/dist/{log-D1XEqR9q.js → log-BuRjhdbZ.js} +0 -0
- /package/dist/{lua-C5Q97-1D.js → lua-CA97s0xX.js} +0 -0
- /package/dist/{luau-BT8KwqZ2.js → luau-hq6gk9_N.js} +0 -0
- /package/dist/{makefile-B4a0ciG4.js → makefile-mNhrnPWo.js} +0 -0
- /package/dist/{markdown-DvNyKsiJ.js → markdown-El6B7b99.js} +0 -0
- /package/dist/{marko-BzsIf6bg.js → marko-8nTOMumd.js} +0 -0
- /package/dist/{matlab-cMBkmDhQ.js → matlab-DuqengFv.js} +0 -0
- /package/dist/{maximize-4PIqBONS.js → maximize-B1-N6kOL.js} +0 -0
- /package/dist/{mermaid-8JIH2gkQ.js → mermaid-Byu8TsQE.js} +0 -0
- /package/dist/{minimize-BJ8htyDF.js → minimize-CVVLdf2H.js} +0 -0
- /package/dist/{nextflow-DNmqU1xg.js → nextflow-DRCOPmGT.js} +0 -0
- /package/dist/{nginx-DDfYF_rj.js → nginx-DTgW--wm.js} +0 -0
- /package/dist/{nim-D9xEmy4k.js → nim-r-ftp-xj.js} +0 -0
- /package/dist/{nix-BV1Deshw.js → nix-BdWPBS1Z.js} +0 -0
- /package/dist/{ocaml-BkFn4LL3.js → ocaml-vXi6ujuu.js} +0 -0
- /package/dist/{perl-BytUHDE7.js → perl-C_g5vs30.js} +0 -0
- /package/dist/{php-BImJJtNM.js → php-C_b0sjdl.js} +0 -0
- /package/dist/{postcss-CrZ9_0sT.js → postcss-Bsz3PPjI.js} +0 -0
- /package/dist/{powershell-DYSGu7TM.js → powershell-D0kxdwKl.js} +0 -0
- /package/dist/{prisma-BhRvcOFY.js → prisma-BocqbK7a.js} +0 -0
- /package/dist/{prolog-DuaCKek_.js → prolog-D-zd1rzT.js} +0 -0
- /package/dist/{properties-BbIJwuP-.js → properties-Dds-063G.js} +0 -0
- /package/dist/{proto-CE0aVW11.js → proto-CzD9trm_.js} +0 -0
- /package/dist/{pug-B1-IC-Tc.js → pug-B1V2RxQS.js} +0 -0
- /package/dist/{puppet-8nYquiMG.js → puppet-BcnVd0q5.js} +0 -0
- /package/dist/{python-DhRyfBrD.js → python-BcZnB7mH.js} +0 -0
- /package/dist/{r-Cjje17IA.js → r-CxSFFuvL.js} +0 -0
- /package/dist/{racket-Dx0gMnpg.js → racket-DJ_82PRG.js} +0 -0
- /package/dist/{razor-DPht_bdD.js → razor-D7IkXHVQ.js} +0 -0
- /package/dist/{ruby-B8RxtCzI.js → ruby-Cidk52Rl.js} +0 -0
- /package/dist/{rust-Cjtli6yf.js → rust-DJvcpkbm.js} +0 -0
- /package/dist/{sass-Dv3DMzjs.js → sass-DTFDeixE.js} +0 -0
- /package/dist/{scala-B7bZGKXq.js → scala-GlHhGi5O.js} +0 -0
- /package/dist/{scheme-B2PsEdVN.js → scheme-rNcj5mL9.js} +0 -0
- /package/dist/{shader-BZzu3zGr.js → shader-Df9eByRK.js} +0 -0
- /package/dist/{shiki-token-renderer-D164wC7Y.js → shiki-token-renderer-BMveKuYt.js} +0 -0
- /package/dist/{solidity-CLieFYpL.js → solidity-CfuYjRuT.js} +0 -0
- /package/dist/{spin-Ds5W7qC_.js → spin-D4Oi_m7j.js} +0 -0
- /package/dist/{stata-C0yUiO47.js → stata-BB5c_hbh.js} +0 -0
- /package/dist/{svelte-rtF4yNGL.js → svelte-2ISqxu6B.js} +0 -0
- /package/dist/{swift-CzvYoIM0.js → swift-wpybyudn.js} +0 -0
- /package/dist/{table-4ec9FVB_.js → table-iNA4la0w.js} +0 -0
- /package/dist/{terraform-CD_BZGb-.js → terraform-CLzhaCaX.js} +0 -0
- /package/dist/{text-D1-vbZ7l.js → text-C0mKr3tC.js} +0 -0
- /package/dist/{toml-C6jUF0Xd.js → toml-DImd1uev.js} +0 -0
- /package/dist/{twig-C4dfP84J.js → twig-DEBVmtOq.js} +0 -0
- /package/dist/{typescript-Bk-pp-cK.js → typescript-Xo5tgeOd.js} +0 -0
- /package/dist/{typst-DPCpaVSH.js → typst-_Ui0vNYP.js} +0 -0
- /package/dist/{v-nRGMJ2Ki.js → v-Ch6vEAHG.js} +0 -0
- /package/dist/{vala-B78bKcY0.js → vala-Ds_Ad1cC.js} +0 -0
- /package/dist/{verilog-CRpkl76S.js → verilog-CUqRomTC.js} +0 -0
- /package/dist/{vim-DpKnut7b.js → vim-BFUPh6oM.js} +0 -0
- /package/dist/{vue-D5eadhjo.js → vue-DzgIlbJ2.js} +0 -0
- /package/dist/{xml-Dvx5F-hl.js → xml-CmbQxaqc.js} +0 -0
- /package/dist/{yaml-n1S8nAOh.js → yaml-BhwCoLnZ.js} +0 -0
- /package/dist/{zig-R-iFzxfW.js → zig-Bmrmp8vo.js} +0 -0
- /package/dist/{zoomIn-CEukuh3x.js → zoomIn-CCKcyIEv.js} +0 -0
- /package/dist/{zoomOut-qlzQyQli.js → zoomOut-BrSwLQZ_.js} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { t as CODE_PREVIEWERS } from "./previewers-
|
|
2
|
-
import { A as
|
|
3
|
-
import { t as node_list_default } from "./node-list
|
|
1
|
+
import { t as CODE_PREVIEWERS } from "./previewers-DsN-cTwd.js";
|
|
2
|
+
import { A as save, B as useFloatingElement, C as tableDataToTSV, D as hasMermaid, E as hasKatex, F as SUPPORT_LANGUAGES, H as useContext, I as currentLocale, L as loadLocaleMessages, M as svgToPngBlob, N as transformUrl, O as hasShiki, P as useI18n, R as localeMessages, S as tableDataToMarkdown, T as findNodeParent, U as useCodeOptions, V as useControls, _ as _defineProperty, a as SHADCN_SCHEMAS, b as extractTableDataFromElement, c as DEFAULT_DARK_THEME, d as LANGUAGE_EXTENSIONS, f as LANGUAGE_ICONS, h as useMathRenderer, i as useSanitizers, j as saveImage, k as flow, l as DEFAULT_LIGHT_THEME, m as useMediumZoom, n as useTailwindV3Theme, o as ICONS, p as useMermaid, r as useShiki, s as DEFAULT_HARDEN_OPTIONS, t as useZoom, u as LANGUAGE_ALIAS, v as useKatex, w as findLastLeafNode, x as tableDataToCSV, y as escapeMarkdownTableCell, z as localesGlob } from "./composables-DWipZHuF.js";
|
|
3
|
+
import { t as node_list_default } from "./node-list--v2wbxOo.js";
|
|
4
|
+
import { n as treeFlatFilter, t as treeFilter } from "./dist-CYkm26BF.js";
|
|
4
5
|
import { computed, createElementBlock, createVNode, defineAsyncComponent, defineComponent, mergeProps, normalizeClass, onBeforeUnmount, openBlock, ref, toRefs, unref, watch } from "vue";
|
|
5
|
-
import mediumZoom from "medium-zoom";
|
|
6
6
|
import { MarkdownItAsync } from "markdown-it-async";
|
|
7
7
|
import remend from "remend";
|
|
8
|
-
import "medium-zoom/dist/style.css";
|
|
9
8
|
|
|
10
9
|
//#region rolldown:runtime
|
|
11
10
|
var __create = Object.create;
|
|
@@ -50,40 +49,43 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
50
49
|
//#endregion
|
|
51
50
|
//#region src/components/renderers/index.ts
|
|
52
51
|
const NODE_RENDERERS = {
|
|
53
|
-
blockquote: defineAsyncComponent(() => import("./blockquote-
|
|
54
|
-
code: defineAsyncComponent(() => import("./code-
|
|
55
|
-
delete: defineAsyncComponent(() => import("./delete-
|
|
56
|
-
emphasis: defineAsyncComponent(() => import("./emphasis-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
52
|
+
blockquote: defineAsyncComponent(() => import("./blockquote-CxA1dQZe.js")),
|
|
53
|
+
code: defineAsyncComponent(() => import("./code-CPG6B2Cw.js")),
|
|
54
|
+
delete: defineAsyncComponent(() => import("./delete-DQ21z5-F.js")),
|
|
55
|
+
emphasis: defineAsyncComponent(() => import("./emphasis-BjLkIDQB.js")),
|
|
56
|
+
footnoteDefinition: defineAsyncComponent(() => import("./footnote-definition-BmS8hchP.js")),
|
|
57
|
+
footnoteReference: defineAsyncComponent(() => import("./footnote-reference-Z2tITeCE.js")),
|
|
58
|
+
heading: defineAsyncComponent(() => import("./heading-BwBFJB_E.js")),
|
|
59
|
+
image: defineAsyncComponent(() => import("./image-IKvFWz2r.js")),
|
|
60
|
+
inlineCode: defineAsyncComponent(() => import("./inline-code-Bqu84Yyu.js")),
|
|
61
|
+
inlineMath: defineAsyncComponent(() => import("./inline-math-C2Ryxm-K.js")),
|
|
62
|
+
link: defineAsyncComponent(() => import("./link-BXl7E_6o.js")),
|
|
63
|
+
list: defineAsyncComponent(() => import("./list-DLcwTZns.js")),
|
|
64
|
+
listItem: defineAsyncComponent(() => import("./list-item-H0eYeIdB.js")),
|
|
65
|
+
math: defineAsyncComponent(() => import("./math-C-0d5PaJ.js")),
|
|
66
|
+
paragraph: defineAsyncComponent(() => import("./paragraph-DRPfp6DV.js")),
|
|
67
|
+
strong: defineAsyncComponent(() => import("./strong-D6V4fCRG.js")),
|
|
68
|
+
table: defineAsyncComponent(() => import("./table-DLUgGL5Q.js")),
|
|
69
|
+
text: defineAsyncComponent(() => import("./text-DoY1TIw3.js")),
|
|
70
|
+
thematicBreak: defineAsyncComponent(() => import("./thematic-break-DXDZ5dcO.js")),
|
|
71
|
+
yaml: defineAsyncComponent(() => import("./yaml-3cd5rdJj.js"))
|
|
71
72
|
};
|
|
72
73
|
|
|
73
74
|
//#endregion
|
|
74
75
|
//#region src/components/index.ts
|
|
75
|
-
const
|
|
76
|
-
Button: defineAsyncComponent(() => import("./button-
|
|
77
|
-
CodeBlock: defineAsyncComponent(() => import("./code-block
|
|
78
|
-
Dropdown: defineAsyncComponent(() => import("./dropdown-
|
|
79
|
-
ErrorComponent: defineAsyncComponent(() => import("./error-component-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
76
|
+
const UI = {
|
|
77
|
+
Button: defineAsyncComponent(() => import("./button-C6zIegam.js")),
|
|
78
|
+
CodeBlock: defineAsyncComponent(() => import("./code-block--1wFjtmu.js")),
|
|
79
|
+
Dropdown: defineAsyncComponent(() => import("./dropdown-CtWjJiAf.js")),
|
|
80
|
+
ErrorComponent: defineAsyncComponent(() => import("./error-component-DtcRn_0A.js")),
|
|
81
|
+
Image: defineAsyncComponent(() => import("./image-aT9xxnwh.js")),
|
|
82
|
+
Modal: defineAsyncComponent(() => import("./modal-BDgfKnFl.js")),
|
|
83
|
+
NodeList: defineAsyncComponent(() => import("./node-list-CHvX62Zh.js")),
|
|
84
|
+
Segmented: defineAsyncComponent(() => import("./segmented-DIVDGfR5.js")),
|
|
85
|
+
Spin: defineAsyncComponent(() => import("./spin-DWkKEP0G.js")),
|
|
86
|
+
Table: defineAsyncComponent(() => import("./table-B2mghd3l.js")),
|
|
87
|
+
Tooltip: defineAsyncComponent(() => import("./tooltip-DQ1-yPia.js")),
|
|
88
|
+
ZoomContainer: defineAsyncComponent(() => import("./zoom-container-D2DxS8V5.js"))
|
|
87
89
|
};
|
|
88
90
|
|
|
89
91
|
//#endregion
|
|
@@ -17499,6 +17501,17 @@ function math(options) {
|
|
|
17499
17501
|
};
|
|
17500
17502
|
}
|
|
17501
17503
|
|
|
17504
|
+
//#endregion
|
|
17505
|
+
//#region src/postprocess/footnote.ts
|
|
17506
|
+
function postFixFootnote(data) {
|
|
17507
|
+
const footnoteDefinitions = treeFlatFilter(data.children, (node$1) => node$1.type === "footnoteDefinition");
|
|
17508
|
+
const filtered = treeFilter(data.children, (node$1) => node$1.type !== "footnoteDefinition");
|
|
17509
|
+
return {
|
|
17510
|
+
...data,
|
|
17511
|
+
children: [...filtered, ...footnoteDefinitions]
|
|
17512
|
+
};
|
|
17513
|
+
}
|
|
17514
|
+
|
|
17502
17515
|
//#endregion
|
|
17503
17516
|
//#region src/postprocess/text.ts
|
|
17504
17517
|
function postFixText(data) {
|
|
@@ -17513,6 +17526,9 @@ function postFixText(data) {
|
|
|
17513
17526
|
|
|
17514
17527
|
//#endregion
|
|
17515
17528
|
//#region src/postprocess/index.ts
|
|
17529
|
+
function postNormalize(data) {
|
|
17530
|
+
return flow([postFixFootnote])(data);
|
|
17531
|
+
}
|
|
17516
17532
|
function postprocess(data) {
|
|
17517
17533
|
return flow([postFixText])(data);
|
|
17518
17534
|
}
|
|
@@ -17532,8 +17548,15 @@ const singleUnderscorePattern = /_/g;
|
|
|
17532
17548
|
const doubleTildePattern = /~~/g;
|
|
17533
17549
|
const doubleDollarPattern = /\$\$/g;
|
|
17534
17550
|
const incompleteBracketPattern = /!?\[[^\]]*$/;
|
|
17535
|
-
const incompleteLinkTextPattern = /!?\[[^\]]
|
|
17536
|
-
const incompleteUrlPattern = /!?\[[^\]]
|
|
17551
|
+
const incompleteLinkTextPattern = /!?\[[^\]]*\]\s*$/;
|
|
17552
|
+
const incompleteUrlPattern = /!?\[[^\]]*\]\([^)]*$/;
|
|
17553
|
+
const incompleteFootnoteRefPattern = /\[\^[^\]]*$/;
|
|
17554
|
+
const trailingStandaloneBracketPattern = /(\[)\s*$/;
|
|
17555
|
+
const footnoteDefPattern = /\[\^[^\]]+\]:/g;
|
|
17556
|
+
const footnoteRefPattern = /\[\^[^\]]+\]/g;
|
|
17557
|
+
const footnoteDefLinePattern = /^\s*\[\^[^\]]+\]:/;
|
|
17558
|
+
const footnoteDefLabelPattern = /\[\^([^\]]+)\]:/;
|
|
17559
|
+
const footnoteRefLabelPattern = /\[\^([^\]]+)\]/;
|
|
17537
17560
|
const tableRowPattern = /^\|.*\|.*\|/;
|
|
17538
17561
|
const separatorPattern = /^\|[\s:]*-{3,}[\s:]*(?:\|[\s:]*-{3,}[\s:]*)+\|?$/;
|
|
17539
17562
|
const standaloneDashPattern = /^\s*-$/;
|
|
@@ -17762,6 +17785,186 @@ function fixEmphasis(content$2) {
|
|
|
17762
17785
|
return content$2;
|
|
17763
17786
|
}
|
|
17764
17787
|
|
|
17788
|
+
//#endregion
|
|
17789
|
+
//#region src/preprocess/footnote.ts
|
|
17790
|
+
/**
|
|
17791
|
+
* Remove incomplete footnote references ([^...]) in streaming markdown
|
|
17792
|
+
*
|
|
17793
|
+
* Processes the entire content to remove footnote references that don't have
|
|
17794
|
+
* corresponding definitions. This is necessary because footnote references can
|
|
17795
|
+
* appear anywhere in the document, while definitions typically appear at the end.
|
|
17796
|
+
*
|
|
17797
|
+
* A footnote reference is considered incomplete if there's no corresponding
|
|
17798
|
+
* footnote definition ([^...]:) in the entire content.
|
|
17799
|
+
*
|
|
17800
|
+
* @param content - Markdown content (potentially incomplete in stream mode)
|
|
17801
|
+
* @returns Content with incomplete footnote references removed
|
|
17802
|
+
*
|
|
17803
|
+
* @example
|
|
17804
|
+
* fixFootnote('Text [^1] and [^2]')
|
|
17805
|
+
* // Returns: 'Text [^1] and [^2]' (if [^1]: and [^2]: exist)
|
|
17806
|
+
* // Returns: 'Text and ' (if definitions don't exist)
|
|
17807
|
+
*
|
|
17808
|
+
* @example
|
|
17809
|
+
* fixFootnote('Para1 [^1]\n\nPara2 [^2]')
|
|
17810
|
+
* // Removes [^1] and [^2] if their definitions don't exist
|
|
17811
|
+
*
|
|
17812
|
+
* @example
|
|
17813
|
+
* fixFootnote('```\n[^1]\n```\n\nText [^1]')
|
|
17814
|
+
* // Code block content is ignored, only processes Text [^1]
|
|
17815
|
+
*/
|
|
17816
|
+
function fixFootnote(content$2) {
|
|
17817
|
+
const codeBlockMatches = content$2.match(tripleBacktickPattern);
|
|
17818
|
+
if ((codeBlockMatches ? codeBlockMatches.length : 0) % 2 === 1) return content$2;
|
|
17819
|
+
const defMatches = content$2.replace(codeBlockPattern, "").match(footnoteDefPattern);
|
|
17820
|
+
const definedLabels = /* @__PURE__ */ new Set();
|
|
17821
|
+
if (defMatches) for (const def of defMatches) {
|
|
17822
|
+
const labelMatch = def.match(footnoteDefLabelPattern);
|
|
17823
|
+
if (labelMatch) definedLabels.add(labelMatch[1]);
|
|
17824
|
+
}
|
|
17825
|
+
const isFootnoteDefLine = (line) => footnoteDefLinePattern.test(line);
|
|
17826
|
+
const lines = content$2.split("\n");
|
|
17827
|
+
const codeBlockRanges = [];
|
|
17828
|
+
let searchStart = 0;
|
|
17829
|
+
while (true) {
|
|
17830
|
+
const codeBlockStart = content$2.indexOf("```", searchStart);
|
|
17831
|
+
if (codeBlockStart === -1) break;
|
|
17832
|
+
const codeBlockEnd = content$2.indexOf("```", codeBlockStart + 3);
|
|
17833
|
+
if (codeBlockEnd === -1) break;
|
|
17834
|
+
codeBlockRanges.push({
|
|
17835
|
+
start: codeBlockStart,
|
|
17836
|
+
end: codeBlockEnd + 3
|
|
17837
|
+
});
|
|
17838
|
+
searchStart = codeBlockEnd + 3;
|
|
17839
|
+
}
|
|
17840
|
+
const inlineCodeRanges = [];
|
|
17841
|
+
const backtickPositions = [];
|
|
17842
|
+
for (let i = 0; i < content$2.length; i++) {
|
|
17843
|
+
if (content$2.substring(i).startsWith("```")) {
|
|
17844
|
+
const codeBlockEnd = content$2.indexOf("```", i + 3);
|
|
17845
|
+
if (codeBlockEnd !== -1) {
|
|
17846
|
+
i = codeBlockEnd + 2;
|
|
17847
|
+
continue;
|
|
17848
|
+
}
|
|
17849
|
+
}
|
|
17850
|
+
if (content$2[i] === "`") {
|
|
17851
|
+
const before = content$2[i - 1] || "";
|
|
17852
|
+
const before2 = content$2[i - 2] || "";
|
|
17853
|
+
const after = content$2[i + 1] || "";
|
|
17854
|
+
const after2 = content$2[i + 2] || "";
|
|
17855
|
+
if (!(before === "`" && before2 === "`" || before === "`" && after === "`" || after === "`" && after2 === "`")) backtickPositions.push(i);
|
|
17856
|
+
}
|
|
17857
|
+
}
|
|
17858
|
+
for (let i = 0; i < backtickPositions.length; i += 2) if (i + 1 < backtickPositions.length) {
|
|
17859
|
+
const start = backtickPositions[i];
|
|
17860
|
+
const end = backtickPositions[i + 1] + 1;
|
|
17861
|
+
inlineCodeRanges.push({
|
|
17862
|
+
start,
|
|
17863
|
+
end
|
|
17864
|
+
});
|
|
17865
|
+
}
|
|
17866
|
+
const footnoteDefRanges = [];
|
|
17867
|
+
let lineOffset = 0;
|
|
17868
|
+
for (let i = 0; i < lines.length; i++) {
|
|
17869
|
+
const line = lines[i];
|
|
17870
|
+
if (isFootnoteDefLine(line)) {
|
|
17871
|
+
const lineEnd = lineOffset + line.length;
|
|
17872
|
+
footnoteDefRanges.push({
|
|
17873
|
+
start: lineOffset,
|
|
17874
|
+
end: lineEnd
|
|
17875
|
+
});
|
|
17876
|
+
}
|
|
17877
|
+
lineOffset += line.length + 1;
|
|
17878
|
+
}
|
|
17879
|
+
let lastParagraphStartIndex = 0;
|
|
17880
|
+
for (let i = lines.length - 1; i >= 0; i--) if (lines[i].trim() === "") {
|
|
17881
|
+
lastParagraphStartIndex = i + 1;
|
|
17882
|
+
break;
|
|
17883
|
+
}
|
|
17884
|
+
const lastParagraph = lines.slice(lastParagraphStartIndex).join("\n");
|
|
17885
|
+
let result = content$2;
|
|
17886
|
+
if (incompleteFootnoteRefPattern.test(lastParagraph)) {
|
|
17887
|
+
const incompleteRefPos = lastParagraph.lastIndexOf("[^");
|
|
17888
|
+
if (incompleteRefPos !== -1) {
|
|
17889
|
+
const absolutePos = lastParagraphStartIndex > 0 ? lines.slice(0, lastParagraphStartIndex).join("\n").length + 1 + incompleteRefPos : incompleteRefPos;
|
|
17890
|
+
const isInCodeBlock = codeBlockRanges.some((range) => absolutePos >= range.start && absolutePos < range.end);
|
|
17891
|
+
const isInInlineCode = inlineCodeRanges.some((range) => absolutePos >= range.start && absolutePos < range.end);
|
|
17892
|
+
if (!isInCodeBlock && !isInInlineCode) {
|
|
17893
|
+
const lineEnd = lastParagraph.indexOf("\n", incompleteRefPos);
|
|
17894
|
+
const refEnd = lineEnd !== -1 ? lineEnd : lastParagraph.length;
|
|
17895
|
+
const beforeLastParagraph = lines.slice(0, lastParagraphStartIndex).join("\n");
|
|
17896
|
+
const paragraphOffset = beforeLastParagraph.length > 0 ? beforeLastParagraph.length + 1 : 0;
|
|
17897
|
+
const absoluteStart = paragraphOffset + incompleteRefPos;
|
|
17898
|
+
const absoluteEnd = paragraphOffset + refEnd;
|
|
17899
|
+
result = result.substring(0, absoluteStart) + result.substring(absoluteEnd);
|
|
17900
|
+
content$2 = result;
|
|
17901
|
+
codeBlockRanges.length = 0;
|
|
17902
|
+
searchStart = 0;
|
|
17903
|
+
while (true) {
|
|
17904
|
+
const codeBlockStart = content$2.indexOf("```", searchStart);
|
|
17905
|
+
if (codeBlockStart === -1) break;
|
|
17906
|
+
const codeBlockEnd = content$2.indexOf("```", codeBlockStart + 3);
|
|
17907
|
+
if (codeBlockEnd === -1) break;
|
|
17908
|
+
codeBlockRanges.push({
|
|
17909
|
+
start: codeBlockStart,
|
|
17910
|
+
end: codeBlockEnd + 3
|
|
17911
|
+
});
|
|
17912
|
+
searchStart = codeBlockEnd + 3;
|
|
17913
|
+
}
|
|
17914
|
+
inlineCodeRanges.length = 0;
|
|
17915
|
+
backtickPositions.length = 0;
|
|
17916
|
+
for (let i = 0; i < content$2.length; i++) {
|
|
17917
|
+
if (content$2.substring(i).startsWith("```")) {
|
|
17918
|
+
const codeBlockEnd = content$2.indexOf("```", i + 3);
|
|
17919
|
+
if (codeBlockEnd !== -1) {
|
|
17920
|
+
i = codeBlockEnd + 2;
|
|
17921
|
+
continue;
|
|
17922
|
+
}
|
|
17923
|
+
}
|
|
17924
|
+
if (content$2[i] === "`") {
|
|
17925
|
+
const before = content$2[i - 1] || "";
|
|
17926
|
+
const before2 = content$2[i - 2] || "";
|
|
17927
|
+
const after = content$2[i + 1] || "";
|
|
17928
|
+
const after2 = content$2[i + 2] || "";
|
|
17929
|
+
if (!(before === "`" && before2 === "`" || before === "`" && after === "`" || after === "`" && after2 === "`")) backtickPositions.push(i);
|
|
17930
|
+
}
|
|
17931
|
+
}
|
|
17932
|
+
for (let i = 0; i < backtickPositions.length; i += 2) if (i + 1 < backtickPositions.length) inlineCodeRanges.push({
|
|
17933
|
+
start: backtickPositions[i],
|
|
17934
|
+
end: backtickPositions[i + 1] + 1
|
|
17935
|
+
});
|
|
17936
|
+
}
|
|
17937
|
+
}
|
|
17938
|
+
}
|
|
17939
|
+
const refPositions = [];
|
|
17940
|
+
let refMatch = footnoteRefPattern.exec(content$2);
|
|
17941
|
+
while (refMatch !== null) {
|
|
17942
|
+
const absolutePos = refMatch.index;
|
|
17943
|
+
const refText = refMatch[0];
|
|
17944
|
+
const isInCodeBlock = codeBlockRanges.some((range) => absolutePos >= range.start && absolutePos < range.end);
|
|
17945
|
+
const isInInlineCode = inlineCodeRanges.some((range) => absolutePos >= range.start && absolutePos < range.end);
|
|
17946
|
+
const isInFootnoteDef = footnoteDefRanges.some((range) => absolutePos >= range.start && absolutePos < range.end);
|
|
17947
|
+
if (!isInCodeBlock && !isInInlineCode && !isInFootnoteDef) {
|
|
17948
|
+
const labelMatch = refText.match(footnoteRefLabelPattern);
|
|
17949
|
+
if (labelMatch) {
|
|
17950
|
+
const label = labelMatch[1];
|
|
17951
|
+
refPositions.push({
|
|
17952
|
+
start: absolutePos,
|
|
17953
|
+
end: absolutePos + refText.length,
|
|
17954
|
+
label
|
|
17955
|
+
});
|
|
17956
|
+
}
|
|
17957
|
+
}
|
|
17958
|
+
refMatch = footnoteRefPattern.exec(content$2);
|
|
17959
|
+
}
|
|
17960
|
+
if (refPositions.length === 0) return content$2;
|
|
17961
|
+
for (let i = refPositions.length - 1; i >= 0; i--) {
|
|
17962
|
+
const ref$1 = refPositions[i];
|
|
17963
|
+
if (!definedLabels.has(ref$1.label)) result = result.substring(0, ref$1.start) + result.substring(ref$1.end);
|
|
17964
|
+
}
|
|
17965
|
+
return result;
|
|
17966
|
+
}
|
|
17967
|
+
|
|
17765
17968
|
//#endregion
|
|
17766
17969
|
//#region src/preprocess/inline-math.ts
|
|
17767
17970
|
/**
|
|
@@ -17904,6 +18107,16 @@ function findLastDollarPairNotInCodeBlock(text$4) {
|
|
|
17904
18107
|
* @example
|
|
17905
18108
|
* fixLink('
|
|
17906
18109
|
* // Returns: ''
|
|
18110
|
+
*
|
|
18111
|
+
* @example
|
|
18112
|
+
* fixLink('Text [')
|
|
18113
|
+
* // Returns: 'Text '
|
|
18114
|
+
* // Removes trailing standalone [ without content
|
|
18115
|
+
*
|
|
18116
|
+
* @example
|
|
18117
|
+
* fixLink('Text [\n')
|
|
18118
|
+
* // Returns: 'Text '
|
|
18119
|
+
* // Removes trailing standalone bracket and trailing newline
|
|
17907
18120
|
*/
|
|
17908
18121
|
function fixLink(content$2) {
|
|
17909
18122
|
const lines = content$2.split("\n");
|
|
@@ -17913,6 +18126,24 @@ function fixLink(content$2) {
|
|
|
17913
18126
|
break;
|
|
17914
18127
|
}
|
|
17915
18128
|
const lastParagraph = lines.slice(paragraphStartIndex).join("\n");
|
|
18129
|
+
let lastNonEmptyLineIndex = lines.length - 1;
|
|
18130
|
+
while (lastNonEmptyLineIndex >= 0 && lines[lastNonEmptyLineIndex].trim() === "") lastNonEmptyLineIndex--;
|
|
18131
|
+
if (lastNonEmptyLineIndex >= 0) {
|
|
18132
|
+
const lastLine = lines[lastNonEmptyLineIndex];
|
|
18133
|
+
if (trailingStandaloneBracketPattern.test(lastLine)) {
|
|
18134
|
+
const bracketMatch = lastLine.match(trailingStandaloneBracketPattern);
|
|
18135
|
+
if (bracketMatch) {
|
|
18136
|
+
const bracketPos = lastLine.lastIndexOf(bracketMatch[1]);
|
|
18137
|
+
if (lastLine.substring(bracketPos + bracketMatch[1].length).trim().length === 0) {
|
|
18138
|
+
const newLine = lastLine.substring(0, bracketPos);
|
|
18139
|
+
const newLines = [...lines];
|
|
18140
|
+
newLines[lastNonEmptyLineIndex] = newLine;
|
|
18141
|
+
if (lastNonEmptyLineIndex + 1 < newLines.length && newLines[lastNonEmptyLineIndex + 1].trim() === "") newLines.splice(lastNonEmptyLineIndex + 1, 1);
|
|
18142
|
+
return newLines.join("\n");
|
|
18143
|
+
}
|
|
18144
|
+
}
|
|
18145
|
+
}
|
|
18146
|
+
}
|
|
17916
18147
|
if (incompleteBracketPattern.test(lastParagraph)) return `${content$2}]()`;
|
|
17917
18148
|
if (incompleteLinkTextPattern.test(lastParagraph)) return `${content$2}()`;
|
|
17918
18149
|
if (incompleteUrlPattern.test(lastParagraph)) return `${content$2})`;
|
|
@@ -18130,15 +18361,6 @@ function preprocessLaTeX(content$2) {
|
|
|
18130
18361
|
processedContent = processedContent.replace(/_TMP_REPLACE_DOLLAR_/g, "$");
|
|
18131
18362
|
return processedContent;
|
|
18132
18363
|
}
|
|
18133
|
-
function preprocessThinkTag(content$2) {
|
|
18134
|
-
const thinkOpenTagRegex = /(<think>\s*)+/g;
|
|
18135
|
-
const thinkCloseTagRegex = /(\s*<\/think>)+/g;
|
|
18136
|
-
return flow([
|
|
18137
|
-
(str) => str.replace(thinkOpenTagRegex, "<details data-think=true>\n"),
|
|
18138
|
-
(str) => str.replace(thinkCloseTagRegex, "\n[ENDTHINKFLAG]</details>"),
|
|
18139
|
-
(str) => str.replace(/(<\/details>)(?![^\S\r\n]*[\r\n])(?![^\S\r\n]*$)/g, "$1\n")
|
|
18140
|
-
])(content$2);
|
|
18141
|
-
}
|
|
18142
18364
|
|
|
18143
18365
|
//#endregion
|
|
18144
18366
|
//#region src/preprocess/index.ts
|
|
@@ -18146,14 +18368,11 @@ function proprocessContent(content$2) {
|
|
|
18146
18368
|
return content$2.replace(crlfPattern, "\n").trimEnd();
|
|
18147
18369
|
}
|
|
18148
18370
|
function normalize(content$2) {
|
|
18149
|
-
return flow([
|
|
18150
|
-
proprocessContent,
|
|
18151
|
-
preprocessLaTeX,
|
|
18152
|
-
preprocessThinkTag
|
|
18153
|
-
])(content$2);
|
|
18371
|
+
return flow([proprocessContent, preprocessLaTeX])(content$2);
|
|
18154
18372
|
}
|
|
18155
18373
|
function preprocess(content$2) {
|
|
18156
18374
|
return flow([
|
|
18375
|
+
fixFootnote,
|
|
18157
18376
|
fixStrong,
|
|
18158
18377
|
fixEmphasis,
|
|
18159
18378
|
fixDelete,
|
|
@@ -18217,8 +18436,9 @@ var MarkdownParser = class {
|
|
|
18217
18436
|
...((_this$options$mdastOp2 = this.options.mdastOptions) === null || _this$options$mdastOp2 === void 0 ? void 0 : _this$options$mdastOp2.from) ?? []
|
|
18218
18437
|
]
|
|
18219
18438
|
});
|
|
18439
|
+
const treeData = (this.options.postprocess ?? postNormalize)(data);
|
|
18220
18440
|
const post = this.options.postprocess ?? postprocess;
|
|
18221
|
-
const resolved = this.mode === "streaming" ? post(
|
|
18441
|
+
const resolved = this.mode === "streaming" ? post(treeData) : treeData;
|
|
18222
18442
|
if (!loading || this.mode === "static") return resolved;
|
|
18223
18443
|
const node$1 = findLastLeafNode(resolved.children);
|
|
18224
18444
|
if (node$1) node$1.loading = true;
|
|
@@ -18281,6 +18501,11 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
18281
18501
|
required: false,
|
|
18282
18502
|
default: "en-US"
|
|
18283
18503
|
},
|
|
18504
|
+
enableAnimate: {
|
|
18505
|
+
type: Boolean,
|
|
18506
|
+
required: false,
|
|
18507
|
+
default: void 0
|
|
18508
|
+
},
|
|
18284
18509
|
controls: {
|
|
18285
18510
|
type: [Boolean, Object],
|
|
18286
18511
|
required: false,
|
|
@@ -18328,6 +18553,10 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
18328
18553
|
type: Function,
|
|
18329
18554
|
required: false
|
|
18330
18555
|
},
|
|
18556
|
+
postNormalize: {
|
|
18557
|
+
type: Function,
|
|
18558
|
+
required: false
|
|
18559
|
+
},
|
|
18331
18560
|
preprocess: {
|
|
18332
18561
|
type: Function,
|
|
18333
18562
|
required: false
|
|
@@ -18345,11 +18574,9 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
18345
18574
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
18346
18575
|
const props = __props;
|
|
18347
18576
|
const emits = __emit;
|
|
18348
|
-
const { shikiOptions, mermaidOptions, isDark } = toRefs(props);
|
|
18577
|
+
const { mode, shikiOptions, mermaidOptions, isDark, enableAnimate } = toRefs(props);
|
|
18349
18578
|
const containerRef = ref();
|
|
18350
18579
|
const { provideContext } = useContext();
|
|
18351
|
-
const { initTippy } = useTippy({ isDark });
|
|
18352
|
-
const zoom = mediumZoom("[data-zoomable]", { background: "color-mix(in oklab, var(--background) 80%, transparent)" });
|
|
18353
18580
|
const markdownParser = new MarkdownParser({
|
|
18354
18581
|
mode: props.mode,
|
|
18355
18582
|
mdastOptions: props.mdastOptions,
|
|
@@ -18372,22 +18599,23 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
18372
18599
|
const { preload: preloadMermaid, dispose: disposeMermaid } = useMermaid({ mermaidOptions });
|
|
18373
18600
|
const { preload: preloadKatex, dispose: disposeKatex } = useKatex();
|
|
18374
18601
|
async function bootstrap() {
|
|
18375
|
-
|
|
18376
|
-
const tasks = [];
|
|
18377
|
-
if (props.locale !== "en-US") tasks.push(loadLocaleMessages(props.locale));
|
|
18378
|
-
await Promise.all([
|
|
18379
|
-
...tasks,
|
|
18602
|
+
const tasks = [
|
|
18380
18603
|
preloadShiki(),
|
|
18381
18604
|
preloadMermaid(),
|
|
18382
18605
|
preloadKatex()
|
|
18383
|
-
]
|
|
18606
|
+
];
|
|
18607
|
+
if (props.locale !== "en-US") tasks.push(loadLocaleMessages(props.locale));
|
|
18608
|
+
await Promise.all(tasks);
|
|
18384
18609
|
}
|
|
18385
18610
|
bootstrap();
|
|
18386
18611
|
watch(() => props.mode, () => markdownParser.updateMode(props.mode));
|
|
18387
18612
|
watch(() => props.locale, () => loadLocaleMessages(props.locale));
|
|
18388
18613
|
provideContext({
|
|
18614
|
+
mode,
|
|
18389
18615
|
icons,
|
|
18390
18616
|
isDark,
|
|
18617
|
+
enableAnimate,
|
|
18618
|
+
parsedNodes,
|
|
18391
18619
|
getContainer,
|
|
18392
18620
|
onCopied: (content$2) => {
|
|
18393
18621
|
emits("copied", content$2);
|
|
@@ -18411,13 +18639,11 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
18411
18639
|
"markdown-parser": unref(markdownParser),
|
|
18412
18640
|
"node-renderers": nodeRenderers.value,
|
|
18413
18641
|
nodes: parsedNodes.value,
|
|
18414
|
-
"medium-zoom": unref(zoom),
|
|
18415
18642
|
"get-container": getContainer
|
|
18416
18643
|
}), null, 16, [
|
|
18417
18644
|
"markdown-parser",
|
|
18418
18645
|
"node-renderers",
|
|
18419
|
-
"nodes"
|
|
18420
|
-
"medium-zoom"
|
|
18646
|
+
"nodes"
|
|
18421
18647
|
])], 2);
|
|
18422
18648
|
};
|
|
18423
18649
|
}
|
|
@@ -18428,4 +18654,4 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
18428
18654
|
var src_default = index_vue_vue_type_script_setup_true_lang_default;
|
|
18429
18655
|
|
|
18430
18656
|
//#endregion
|
|
18431
|
-
export { CODE_PREVIEWERS,
|
|
18657
|
+
export { CODE_PREVIEWERS, DEFAULT_DARK_THEME, DEFAULT_HARDEN_OPTIONS, DEFAULT_LIGHT_THEME, ICONS, LANGUAGE_ALIAS, LANGUAGE_EXTENSIONS, LANGUAGE_ICONS, src_default as Markdown, MarkdownParser, NODE_RENDERERS, SHADCN_SCHEMAS, SUPPORT_LANGUAGES, UI, codeBlockPattern, crlfPattern, currentLocale, doubleAsteriskPattern, doubleDollarPattern, doubleTildePattern, doubleUnderscorePattern, escapeMarkdownTableCell, extractTableDataFromElement, findLastLeafNode, findNodeParent, fixCode, fixDelete, fixEmphasis, fixFootnote, fixLink, fixStrong, fixTable, fixTaskList, flow, footnoteDefLabelPattern, footnoteDefLinePattern, footnoteDefPattern, footnoteRefLabelPattern, footnoteRefPattern, hasKatex, hasMermaid, hasShiki, incompleteBracketPattern, incompleteFootnoteRefPattern, incompleteLinkTextPattern, incompleteUrlPattern, loadLocaleMessages, localeMessages, localesGlob, normalize, postFixFootnote, postFixText, postNormalize, postprocess, preprocess, preprocessLaTeX, proprocessContent, quoteStandaloneDashPattern, quoteTaskListPattern, remend, save, saveImage, separatorPattern, singleAsteriskPattern, singleBacktickPattern, singleUnderscorePattern, standaloneDashPattern, svgToPngBlob, tableDataToCSV, tableDataToMarkdown, tableDataToTSV, tableRowPattern, taskListPattern, trailingBackticksPattern, trailingStandaloneBracketPattern, trailingWhitespacePattern, transformUrl, tripleBacktickPattern, useCodeOptions, useContext, useControls, useFloatingElement, useI18n, useKatex, useMathRenderer, useMediumZoom, useMermaid, useSanitizers, useShiki, useTailwindV3Theme, useZoom };
|
|
@@ -17,16 +17,8 @@ var inline_code_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ de
|
|
|
17
17
|
type: Object,
|
|
18
18
|
required: true
|
|
19
19
|
},
|
|
20
|
-
|
|
21
|
-
type:
|
|
22
|
-
required: true
|
|
23
|
-
},
|
|
24
|
-
indexKey: {
|
|
25
|
-
type: [Number, String],
|
|
26
|
-
required: true
|
|
27
|
-
},
|
|
28
|
-
getContainer: {
|
|
29
|
-
type: Function,
|
|
20
|
+
nodeKey: {
|
|
21
|
+
type: String,
|
|
30
22
|
required: true
|
|
31
23
|
},
|
|
32
24
|
controls: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as error_component_default } from "./error-component-
|
|
1
|
+
import { h as useMathRenderer } from "./composables-DWipZHuF.js";
|
|
2
|
+
import { t as error_component_default } from "./error-component-DSOVrE5J.js";
|
|
3
3
|
import { computed, createBlock, createCommentVNode, createElementBlock, defineComponent, mergeProps, openBlock, resolveDynamicComponent, toRefs, unref } from "vue";
|
|
4
4
|
|
|
5
5
|
//#region src/components/renderers/inline-math.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -19,16 +19,8 @@ var inline_math_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ de
|
|
|
19
19
|
type: Object,
|
|
20
20
|
required: true
|
|
21
21
|
},
|
|
22
|
-
|
|
23
|
-
type:
|
|
24
|
-
required: true
|
|
25
|
-
},
|
|
26
|
-
indexKey: {
|
|
27
|
-
type: [Number, String],
|
|
28
|
-
required: true
|
|
29
|
-
},
|
|
30
|
-
getContainer: {
|
|
31
|
-
type: Function,
|
|
22
|
+
nodeKey: {
|
|
23
|
+
type: String,
|
|
32
24
|
required: true
|
|
33
25
|
},
|
|
34
26
|
controls: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as node_list_default } from "./node-list
|
|
3
|
-
import { t as error_component_default } from "./error-component-
|
|
1
|
+
import { i as useSanitizers } from "./composables-DWipZHuF.js";
|
|
2
|
+
import { t as node_list_default } from "./node-list--v2wbxOo.js";
|
|
3
|
+
import { t as error_component_default } from "./error-component-DSOVrE5J.js";
|
|
4
4
|
import { computed, createBlock, createCommentVNode, createElementBlock, createVNode, defineComponent, mergeProps, openBlock, resolveDynamicComponent, toRefs, unref, withCtx } from "vue";
|
|
5
5
|
|
|
6
6
|
//#region src/components/renderers/link.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -20,16 +20,8 @@ var link_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCom
|
|
|
20
20
|
type: Object,
|
|
21
21
|
required: true
|
|
22
22
|
},
|
|
23
|
-
|
|
24
|
-
type:
|
|
25
|
-
required: true
|
|
26
|
-
},
|
|
27
|
-
indexKey: {
|
|
28
|
-
type: [Number, String],
|
|
29
|
-
required: true
|
|
30
|
-
},
|
|
31
|
-
getContainer: {
|
|
32
|
-
type: Function,
|
|
23
|
+
nodeKey: {
|
|
24
|
+
type: String,
|
|
33
25
|
required: true
|
|
34
26
|
},
|
|
35
27
|
controls: {
|
|
@@ -74,7 +66,7 @@ var link_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCom
|
|
|
74
66
|
const { hardenOptions } = toRefs(props);
|
|
75
67
|
const url = computed(() => props.node.url);
|
|
76
68
|
const loading = computed(() => props.node.loading || props.markdownParser.hasLoadingNode(props.node.children) || !url.value);
|
|
77
|
-
const { transformedUrl, isHardenUrl } =
|
|
69
|
+
const { transformedUrl, isHardenUrl } = useSanitizers({
|
|
78
70
|
url,
|
|
79
71
|
hardenOptions,
|
|
80
72
|
loading
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "./composables-DWipZHuF.js";
|
|
2
|
+
import { t as node_list_default } from "./node-list--v2wbxOo.js";
|
|
2
3
|
import { computed, createBlock, createVNode, defineComponent, mergeProps, openBlock, resolveDynamicComponent, withCtx } from "vue";
|
|
3
4
|
|
|
4
5
|
//#region src/components/renderers/list.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -17,16 +18,8 @@ var list_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCom
|
|
|
17
18
|
type: Object,
|
|
18
19
|
required: true
|
|
19
20
|
},
|
|
20
|
-
|
|
21
|
-
type:
|
|
22
|
-
required: true
|
|
23
|
-
},
|
|
24
|
-
indexKey: {
|
|
25
|
-
type: [Number, String],
|
|
26
|
-
required: true
|
|
27
|
-
},
|
|
28
|
-
getContainer: {
|
|
29
|
-
type: Function,
|
|
21
|
+
nodeKey: {
|
|
22
|
+
type: String,
|
|
30
23
|
required: true
|
|
31
24
|
},
|
|
32
25
|
controls: {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "./composables-DWipZHuF.js";
|
|
2
|
+
import { t as node_list_default } from "./node-list--v2wbxOo.js";
|
|
2
3
|
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeProps, openBlock } from "vue";
|
|
3
4
|
|
|
4
5
|
//#region src/components/renderers/list-item.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -23,16 +24,8 @@ var list_item_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defi
|
|
|
23
24
|
type: Object,
|
|
24
25
|
required: true
|
|
25
26
|
},
|
|
26
|
-
|
|
27
|
-
type:
|
|
28
|
-
required: true
|
|
29
|
-
},
|
|
30
|
-
indexKey: {
|
|
31
|
-
type: [Number, String],
|
|
32
|
-
required: true
|
|
33
|
-
},
|
|
34
|
-
getContainer: {
|
|
35
|
-
type: Function,
|
|
27
|
+
nodeKey: {
|
|
28
|
+
type: String,
|
|
36
29
|
required: true
|
|
37
30
|
},
|
|
38
31
|
controls: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as error_component_default } from "./error-component-
|
|
1
|
+
import { h as useMathRenderer } from "./composables-DWipZHuF.js";
|
|
2
|
+
import { t as error_component_default } from "./error-component-DSOVrE5J.js";
|
|
3
3
|
import { computed, createBlock, createCommentVNode, createElementBlock, defineComponent, mergeProps, openBlock, resolveDynamicComponent, toRefs, unref } from "vue";
|
|
4
4
|
|
|
5
5
|
//#region src/components/renderers/math.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -19,16 +19,8 @@ var math_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCom
|
|
|
19
19
|
type: Object,
|
|
20
20
|
required: true
|
|
21
21
|
},
|
|
22
|
-
|
|
23
|
-
type:
|
|
24
|
-
required: true
|
|
25
|
-
},
|
|
26
|
-
indexKey: {
|
|
27
|
-
type: [Number, String],
|
|
28
|
-
required: true
|
|
29
|
-
},
|
|
30
|
-
getContainer: {
|
|
31
|
-
type: Function,
|
|
22
|
+
nodeKey: {
|
|
23
|
+
type: String,
|
|
32
24
|
required: true
|
|
33
25
|
},
|
|
34
26
|
controls: {
|