vue-stream-markdown 0.1.3 → 0.1.5
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-C5s0Sn8o.js +25 -0
- package/dist/{blockquote-DdEg2gww.js → blockquote-bkADuiGm.js} +1 -9
- package/dist/{button-CJyeXWq2.js → button-BQhuT7wh.js} +2 -3
- package/dist/button-JYC8d-B-.js +5 -0
- package/dist/{code-CJ4tMt6L.js → code-DF8PTNol.js} +10 -18
- package/dist/code-block-BhMDz2ZL.js +9 -0
- package/dist/{code-block-CQ4lgva1.js → code-block-Dm2wl0cb.js} +87 -77
- package/dist/{composables-Cj6_jbwr.js → composables-yny5gJo3.js} +570 -234
- package/dist/{delete-BdWzKJCy.js → delete-D17YBeI-.js} +1 -9
- package/dist/dropdown-Y5_Z4a_u.js +5 -0
- package/dist/{emphasis-CTuGt1Ok.js → emphasis-B-2R_0Q5.js} +1 -9
- package/dist/{en-US-Bfc50l3I.js → en-US-Kw2LYAMk.js} +7 -1
- package/dist/{error-component-ClGLfmwy.js → error-component-Bb0gIZsx.js} +4 -3
- package/dist/error-component-DEIWb6kB.js +4 -0
- package/dist/flip-horizontal-BFWjqDbQ.js +25 -0
- package/dist/{heading-2vpQQtTH.js → heading-DyJIwNrN.js} +1 -9
- package/dist/{html-DL0PcUXX.js → html-DXNqMvt_.js} +0 -8
- package/dist/{image-xeiC5YFM.js → image-BPhFn1xp.js} +40 -76
- package/dist/image-DXBD47sF.js +8 -0
- package/dist/image-DvOGBhi-.js +327 -0
- package/dist/index.css +44 -64
- package/dist/index.d.ts +155 -81
- package/dist/index.js +55 -63
- package/dist/{inline-code-CBoqhfz7.js → inline-code-C44UJ2TH.js} +0 -8
- package/dist/{inline-math-C2NUSasr.js → inline-math-wO1rMt9T.js} +2 -10
- package/dist/{link-BceXudNH.js → link-sGo7CEll.js} +3 -11
- package/dist/{list-BCiFKGaz.js → list-C0I1ysSI.js} +1 -9
- package/dist/{list-item-p-OLUR_9.js → list-item-BoC2wKBL.js} +1 -9
- package/dist/{math-DXOLG3Xg.js → math-BlqtUf2r.js} +2 -10
- package/dist/{mermaid-CU4hpB6S.js → mermaid-Ka1jnXrR.js} +6 -14
- package/dist/modal-Duhc-vVa.js +4 -0
- package/dist/modal-Rc_RoeYA.js +94 -0
- package/dist/node-list-C1je2nLd.js +3 -0
- package/dist/{node-list-CGr_EVtn.js → node-list-YhpHXdM_.js} +0 -16
- package/dist/{paragraph-DYjqr_Sa.js → paragraph-BN-4-Dn7.js} +1 -9
- package/dist/previewers-D0VVcdjL.js +10 -0
- package/dist/rotate-ccw-square-C2KVFUF3.js +24 -0
- package/dist/{segmented-CF6exjdD.js → segmented-CaC54iz_.js} +1 -1
- package/dist/segmented-XdoLnuuq.js +6 -0
- package/dist/{shiki-BlfngIRi.js → shiki-sJNZTn1K.js} +4 -12
- package/dist/spin-wM2KE8mO.js +3 -0
- package/dist/{strong-CvOjLZiq.js → strong-NdAS3VjP.js} +1 -9
- package/dist/{table-C5VHgkTQ.js → table-CWX5B2i1.js} +14 -18
- package/dist/table-R9gmCXm_.js +3 -0
- package/dist/{text-DuONUqRA.js → text-DpleLvNh.js} +0 -8
- package/dist/{thematic-break-CcNPEI9Y.js → thematic-break-D5GvzU5S.js} +0 -8
- package/dist/tooltip-BJDs-A8d.js +4 -0
- package/dist/tooltip-Bgbzbk4Q.js +68 -0
- package/dist/{vanilla-D5DzB31q.js → vanilla-BTOVqKl7.js} +1 -1
- package/dist/vanilla-DA5bwIkr.js +4 -0
- package/dist/{yaml-DJHrmzSe.js → yaml-y0snrPRx.js} +1 -9
- package/dist/{zh-CN-CL1XGe0H.js → zh-CN-Dfow4Yn2.js} +7 -1
- package/dist/zoom-container-B1qbA-7z.js +153 -0
- package/dist/zoom-container-KztuE4ri.js +6 -0
- package/package.json +9 -10
- package/dist/button-2wMU7qkH.js +0 -5
- package/dist/code-block-BucFZooo.js +0 -9
- package/dist/dropdown-dsCfq0Hl.js +0 -5
- package/dist/error-component-B0mmLhh6.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-qHMi6xZ3.js +0 -10
- package/dist/segmented-BeHqXuFx.js +0 -6
- package/dist/spin-Bz4zGBEo.js +0 -3
- package/dist/table-CZLbUHiJ.js +0 -3
- package/dist/tooltip-BzVZqo7w.js +0 -4
- package/dist/tooltip-gxsqaBNg.js +0 -71
- package/dist/vanilla-CKj7EQLx.js +0 -4
- package/dist/zoom-container-CwEDlKRx.js +0 -6
- package/dist/zoom-container-D_fBClW2.js +0 -111
- /package/dist/{angular-Chs-UKBr.js → angular-Mip1mspI.js} +0 -0
- /package/dist/{angular-component-Cc_FANXU.js → angular-component-Cq5UbX7R.js} +0 -0
- /package/dist/{apache-COYnc6xR.js → apache-BSq7fX32.js} +0 -0
- /package/dist/{asciidoc-BabXBDAL.js → asciidoc-DS-PMOLv.js} +0 -0
- /package/dist/{assembly-CDqKhexW.js → assembly-BPatlOM7.js} +0 -0
- /package/dist/{astro-C9kftzFG.js → astro-CSD_ZjXp.js} +0 -0
- /package/dist/{bash-Ce4pNIkV.js → bash-RITislE1.js} +0 -0
- /package/dist/{batch-CHQBRjFL.js → batch-DWPShYhN.js} +0 -0
- /package/dist/{bicep-8jxWtuBF.js → bicep-C6BEHfP6.js} +0 -0
- /package/dist/{c-FBUef746.js → c-DNo3tsNy.js} +0 -0
- /package/dist/{check-C4xOk8um.js → check-BfpxIITS.js} +0 -0
- /package/dist/{chevron-down-cnOJ4h1g.js → chevron-down-LeNeemjn.js} +0 -0
- /package/dist/{circle-alert-CLX-h5rZ.js → circle-alert-BjDuIzgc.js} +0 -0
- /package/dist/{clojure-BulUroSy.js → clojure-C1DEYHW0.js} +0 -0
- /package/dist/{cmake-CW3vz1Mo.js → cmake-B69mdXcH.js} +0 -0
- /package/dist/{cobol-CIn3oFju.js → cobol-qmL-zIWi.js} +0 -0
- /package/dist/{code-D8LSp8rK.js → code-D9CiymEK.js} +0 -0
- /package/dist/{codeowners-CJggXF_b.js → codeowners-Crklt5nF.js} +0 -0
- /package/dist/{coffeescript-CBrVvzGY.js → coffeescript-k3huSp23.js} +0 -0
- /package/dist/{copy-Cabve0xf.js → copy-C4580J93.js} +0 -0
- /package/dist/{cpp-BTKeuyd-.js → cpp-Cn3MB35e.js} +0 -0
- /package/dist/{crystal-DyIYvZbm.js → crystal-D5aGETSx.js} +0 -0
- /package/dist/{csharp-NqZ1vyF9.js → csharp-CgkTkbPx.js} +0 -0
- /package/dist/{css-BpR5Lajb.js → css-DRH4n_IV.js} +0 -0
- /package/dist/{csv-eCMFnKKK.js → csv-D5nNTIzO.js} +0 -0
- /package/dist/{cue-TY97dGOQ.js → cue-B5mC88-N.js} +0 -0
- /package/dist/{d-NftUsdTd.js → d-BdQRMgma.js} +0 -0
- /package/dist/{dart-DJpwZZbk.js → dart-BGnfn0NN.js} +0 -0
- /package/dist/{database-aZwE71Px.js → database-Ca1VGX7u.js} +0 -0
- /package/dist/{diff-CYRzypaU.js → diff-DVaTsnqu.js} +0 -0
- /package/dist/{docker-CxHBuukH.js → docker-E47qYlmL.js} +0 -0
- /package/dist/{download-Bnn7rtYw.js → download-DytrK56a.js} +0 -0
- /package/dist/{elixir-BKSxVc1h.js → elixir-C-jqqu6q.js} +0 -0
- /package/dist/{elm-DScuAf3X.js → elm-CmeHvaWl.js} +0 -0
- /package/dist/{env-CDAKsodl.js → env-Ck1BHoxR.js} +0 -0
- /package/dist/{erlang-D2M1ZL3m.js → erlang-CIP8kpGJ.js} +0 -0
- /package/dist/{eye-CdeX8PhP.js → eye-TaEwQS2Z.js} +0 -0
- /package/dist/{fortran-CORyQ0wt.js → fortran-DJVP2s7V.js} +0 -0
- /package/dist/{fsharp-BJz_Jgpl.js → fsharp-Bp6mUcG0.js} +0 -0
- /package/dist/{git-DgrlTr1E.js → git-BDcqJ1Gp.js} +0 -0
- /package/dist/{gleam-t_xad9Kw.js → gleam-JLiZVlev.js} +0 -0
- /package/dist/{go-Cvlh1xtL.js → go-ClcCiS7e.js} +0 -0
- /package/dist/{graphql-ApIm0mDD.js → graphql-D2RDo-DF.js} +0 -0
- /package/dist/{groovy-CaLnK8PV.js → groovy-DLZBw8xE.js} +0 -0
- /package/dist/{haml-MwijEO_6.js → haml-Da74jRwZ.js} +0 -0
- /package/dist/{handlebars-CKdUPI9h.js → handlebars-CNgS57Sz.js} +0 -0
- /package/dist/{haskell-NPOXEnck.js → haskell-DCvfD6VB.js} +0 -0
- /package/dist/{haxe-DyKBMsDE.js → haxe-CHVK1TId.js} +0 -0
- /package/dist/{html-CMgES1dE.js → html-Du4235Z-.js} +0 -0
- /package/dist/{http-B9FFNmUr.js → http-B8VAFeQ5.js} +0 -0
- /package/dist/{image-CMZAakWu.js → image-D8MZj4W5.js} +0 -0
- /package/dist/{java-iU-L9wJz.js → java-CoSdnK1N.js} +0 -0
- /package/dist/{javascript-DtnWdTFC.js → javascript-BCDeVll0.js} +0 -0
- /package/dist/{jinja-CoWszo_D.js → jinja-DYbiqZy0.js} +0 -0
- /package/dist/{json-C80qKCnh.js → json-CdzCyWJA.js} +0 -0
- /package/dist/{julia-DG2BCBLx.js → julia-pswJGtpP.js} +0 -0
- /package/dist/{kdl-7twRfIlJ.js → kdl-M8rfQ85l.js} +0 -0
- /package/dist/{kotlin-BjrOgP7R.js → kotlin-CfCV33oB.js} +0 -0
- /package/dist/{latex-DIQfUvG8.js → latex-DK8DFhTm.js} +0 -0
- /package/dist/{less-BJ1yEAWt.js → less-BFnNZiIs.js} +0 -0
- /package/dist/{link-DeV4CQOB.js → link-C7eU_yi-.js} +0 -0
- /package/dist/{liquid-BqKFZ1wQ.js → liquid-C8h46DoX.js} +0 -0
- /package/dist/{lisp-oekhB2ti.js → lisp-C3FbGuD1.js} +0 -0
- /package/dist/{log-D1XEqR9q.js → log-D-O3FXf2.js} +0 -0
- /package/dist/{lua-C5Q97-1D.js → lua-BC_aR1_i.js} +0 -0
- /package/dist/{luau-BT8KwqZ2.js → luau-DFUOrNN7.js} +0 -0
- /package/dist/{makefile-B4a0ciG4.js → makefile-Ck67veVV.js} +0 -0
- /package/dist/{markdown-DvNyKsiJ.js → markdown-BX13X3kd.js} +0 -0
- /package/dist/{marko-BzsIf6bg.js → marko-CQE8YTCc.js} +0 -0
- /package/dist/{matlab-cMBkmDhQ.js → matlab-Bd9O2Ml3.js} +0 -0
- /package/dist/{maximize-4PIqBONS.js → maximize-CDZ9rnYF.js} +0 -0
- /package/dist/{mermaid-8JIH2gkQ.js → mermaid-Dv-Pr0W-.js} +0 -0
- /package/dist/{minimize-BJ8htyDF.js → minimize-B9ER7p2X.js} +0 -0
- /package/dist/{nextflow-DNmqU1xg.js → nextflow-D3lDq1Yi.js} +0 -0
- /package/dist/{nginx-DDfYF_rj.js → nginx-CgsqCL4l.js} +0 -0
- /package/dist/{nim-D9xEmy4k.js → nim-BJdSu3c6.js} +0 -0
- /package/dist/{nix-BV1Deshw.js → nix-B7K_D6CN.js} +0 -0
- /package/dist/{ocaml-BkFn4LL3.js → ocaml-gYS1Y45s.js} +0 -0
- /package/dist/{perl-BytUHDE7.js → perl-DXFhFWhI.js} +0 -0
- /package/dist/{php-BImJJtNM.js → php-We35bF4E.js} +0 -0
- /package/dist/{postcss-CrZ9_0sT.js → postcss-BWovY_YV.js} +0 -0
- /package/dist/{powershell-DYSGu7TM.js → powershell-C6teiBsq.js} +0 -0
- /package/dist/{prisma-BhRvcOFY.js → prisma-UyJEg0_X.js} +0 -0
- /package/dist/{prolog-DuaCKek_.js → prolog-YZsPgdnw.js} +0 -0
- /package/dist/{properties-BbIJwuP-.js → properties-DaPbL0e2.js} +0 -0
- /package/dist/{proto-CE0aVW11.js → proto-1LIwu2O1.js} +0 -0
- /package/dist/{pug-B1-IC-Tc.js → pug-CzkUK-Ec.js} +0 -0
- /package/dist/{puppet-8nYquiMG.js → puppet-CNhB1MHb.js} +0 -0
- /package/dist/{python-DhRyfBrD.js → python-B_hgEobv.js} +0 -0
- /package/dist/{r-Cjje17IA.js → r-CVeKYmPK.js} +0 -0
- /package/dist/{racket-Dx0gMnpg.js → racket-D5UfvXuw.js} +0 -0
- /package/dist/{razor-DPht_bdD.js → razor-RIKaANTN.js} +0 -0
- /package/dist/{ruby-B8RxtCzI.js → ruby-C8wV0pMO.js} +0 -0
- /package/dist/{rust-Cjtli6yf.js → rust-75Gei1mP.js} +0 -0
- /package/dist/{sass-Dv3DMzjs.js → sass-Cq68xmQ4.js} +0 -0
- /package/dist/{scala-B7bZGKXq.js → scala-C_E5rjSc.js} +0 -0
- /package/dist/{scheme-B2PsEdVN.js → scheme-Bm-q-nLL.js} +0 -0
- /package/dist/{shader-BZzu3zGr.js → shader-DPaRkMCs.js} +0 -0
- /package/dist/{shiki-token-renderer-D164wC7Y.js → shiki-token-renderer-CLmUjKa3.js} +0 -0
- /package/dist/{solidity-CLieFYpL.js → solidity-DvHG_0CD.js} +0 -0
- /package/dist/{spin-Ds5W7qC_.js → spin--f5jNjBn.js} +0 -0
- /package/dist/{stata-C0yUiO47.js → stata-DoVloJLm.js} +0 -0
- /package/dist/{svelte-rtF4yNGL.js → svelte-tlbA11de.js} +0 -0
- /package/dist/{swift-CzvYoIM0.js → swift-BZn5eRnK.js} +0 -0
- /package/dist/{table-4ec9FVB_.js → table-CaUMjs4M.js} +0 -0
- /package/dist/{terraform-CD_BZGb-.js → terraform-c5-k7yB1.js} +0 -0
- /package/dist/{text-D1-vbZ7l.js → text-DPCGWvDK.js} +0 -0
- /package/dist/{toml-C6jUF0Xd.js → toml-DdLGBe1A.js} +0 -0
- /package/dist/{twig-C4dfP84J.js → twig-D_jzZxh6.js} +0 -0
- /package/dist/{typescript-Bk-pp-cK.js → typescript-B95hq2ns.js} +0 -0
- /package/dist/{typst-DPCpaVSH.js → typst-CSAEQ4yK.js} +0 -0
- /package/dist/{v-nRGMJ2Ki.js → v-BAhebuOB.js} +0 -0
- /package/dist/{vala-B78bKcY0.js → vala-RAu83-lp.js} +0 -0
- /package/dist/{verilog-CRpkl76S.js → verilog-BgmTn52U.js} +0 -0
- /package/dist/{vim-DpKnut7b.js → vim-c8oTCLkH.js} +0 -0
- /package/dist/{vue-D5eadhjo.js → vue-TGT6HTBA.js} +0 -0
- /package/dist/{xml-Dvx5F-hl.js → xml-C1HDr874.js} +0 -0
- /package/dist/{yaml-n1S8nAOh.js → yaml-BO7FjFQZ.js} +0 -0
- /package/dist/{zig-R-iFzxfW.js → zig-qANBp1SU.js} +0 -0
- /package/dist/{zoomIn-CEukuh3x.js → zoomIn-iVMAUxIz.js} +0 -0
- /package/dist/{zoomOut-qlzQyQli.js → zoomOut-Cxq1_dIQ.js} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as vue39 from "vue";
|
|
2
2
|
import { Component, MaybeRef, MaybeRefOrGetter } from "vue";
|
|
3
|
-
import "
|
|
4
|
-
import "
|
|
5
|
-
import "tippy.js/dist/border.css";
|
|
6
|
-
import "tippy.js/dist/svg-arrow.css";
|
|
7
|
-
import { Zoom } from "medium-zoom";
|
|
3
|
+
import * as _floating_ui_vue0 from "@floating-ui/vue";
|
|
4
|
+
import { Placement } from "@floating-ui/vue";
|
|
8
5
|
import { MarkdownItAsync } from "markdown-it-async";
|
|
9
6
|
import { KatexOptions as KatexOptions$1 } from "katex";
|
|
10
7
|
import remend from "remend";
|
|
@@ -13,7 +10,6 @@ import { Mermaid, MermaidConfig } from "mermaid";
|
|
|
13
10
|
import { Extension, fromMarkdown } from "mdast-util-from-markdown";
|
|
14
11
|
import { Options as Options$1 } from "mdast-util-to-markdown";
|
|
15
12
|
import { Extension as Extension$1 } from "micromark-util-types";
|
|
16
|
-
import { DefaultProps } from "tippy.js";
|
|
17
13
|
|
|
18
14
|
//#region src/components/previewers/index.d.ts
|
|
19
15
|
declare const CODE_PREVIEWERS: Record<string, Component>;
|
|
@@ -120,6 +116,12 @@ interface LocaleConfig {
|
|
|
120
116
|
download: string;
|
|
121
117
|
minimize: string;
|
|
122
118
|
maximize: string;
|
|
119
|
+
flipY: string;
|
|
120
|
+
flipX: string;
|
|
121
|
+
rotateLeft: string;
|
|
122
|
+
rotateRight: string;
|
|
123
|
+
previous: string;
|
|
124
|
+
next: string;
|
|
123
125
|
};
|
|
124
126
|
error: {
|
|
125
127
|
vanilla: string;
|
|
@@ -130,11 +132,54 @@ interface LocaleConfig {
|
|
|
130
132
|
};
|
|
131
133
|
}
|
|
132
134
|
//#endregion
|
|
135
|
+
//#region src/constants/code.d.ts
|
|
136
|
+
declare const DEFAULT_LIGHT_THEME = "github-light";
|
|
137
|
+
declare const DEFAULT_DARK_THEME = "github-dark";
|
|
138
|
+
declare const LANGUAGE_ALIAS: Record<string, BuiltinLanguage>;
|
|
139
|
+
declare const LANGUAGE_EXTENSIONS: Partial<Record<BuiltinLanguage, string>>;
|
|
140
|
+
declare const LANGUAGE_ICONS: Partial<Record<BuiltinLanguage | SpecialLanguage, Component>>;
|
|
141
|
+
//#endregion
|
|
142
|
+
//#region src/constants/harden.d.ts
|
|
143
|
+
declare const DEFAULT_HARDEN_OPTIONS: HardenOptions;
|
|
144
|
+
//#endregion
|
|
145
|
+
//#region src/constants/icons.d.ts
|
|
146
|
+
declare const ICONS: {
|
|
147
|
+
readonly arrowLeft: vue39.FunctionalComponent<vue39.SVGAttributes, {}, any, {}>;
|
|
148
|
+
readonly check: vue39.FunctionalComponent<vue39.SVGAttributes, {}, any, {}>;
|
|
149
|
+
readonly code: vue39.FunctionalComponent<vue39.SVGAttributes, {}, any, {}>;
|
|
150
|
+
readonly collapse: vue39.FunctionalComponent<vue39.SVGAttributes, {}, any, {}>;
|
|
151
|
+
readonly copy: vue39.FunctionalComponent<vue39.SVGAttributes, {}, any, {}>;
|
|
152
|
+
readonly download: vue39.FunctionalComponent<vue39.SVGAttributes, {}, any, {}>;
|
|
153
|
+
readonly error: vue39.FunctionalComponent<vue39.SVGAttributes, {}, any, {}>;
|
|
154
|
+
readonly flipHorizontal: vue39.FunctionalComponent<vue39.SVGAttributes, {}, any, {}>;
|
|
155
|
+
readonly image: vue39.FunctionalComponent<vue39.SVGAttributes, {}, any, {}>;
|
|
156
|
+
readonly link: vue39.FunctionalComponent<vue39.SVGAttributes, {}, any, {}>;
|
|
157
|
+
readonly maximize: vue39.FunctionalComponent<vue39.SVGAttributes, {}, any, {}>;
|
|
158
|
+
readonly mermaid: vue39.FunctionalComponent<vue39.SVGAttributes, {}, any, {}>;
|
|
159
|
+
readonly minimize: vue39.FunctionalComponent<vue39.SVGAttributes, {}, any, {}>;
|
|
160
|
+
readonly preview: vue39.FunctionalComponent<vue39.SVGAttributes, {}, any, {}>;
|
|
161
|
+
readonly rotateLeft: vue39.FunctionalComponent<vue39.SVGAttributes, {}, any, {}>;
|
|
162
|
+
readonly zoomIn: vue39.FunctionalComponent<vue39.SVGAttributes, {}, any, {}>;
|
|
163
|
+
readonly zoomOut: vue39.FunctionalComponent<vue39.SVGAttributes, {}, any, {}>;
|
|
164
|
+
};
|
|
165
|
+
//#endregion
|
|
166
|
+
//#region src/constants/theme.d.ts
|
|
167
|
+
declare const SHADCN_SCHEMAS: readonly ["background", "foreground", "card", "card-foreground", "popover", "popover-foreground", "primary", "primary-foreground", "secondary", "secondary-foreground", "muted", "muted-foreground", "accent", "accent-foreground", "destructive", "border", "input", "ring", "chart-1", "chart-2", "chart-3", "chart-4", "chart-5", "sidebar", "sidebar-foreground", "sidebar-primary", "sidebar-primary-foreground", "sidebar-accent", "sidebar-accent-foreground", "sidebar-border", "sidebar-ring"];
|
|
168
|
+
//#endregion
|
|
169
|
+
//#region src/types/shared.d.ts
|
|
170
|
+
type IconName = keyof typeof ICONS | 'flipVertical' | 'rotateRight' | 'arrowRight';
|
|
171
|
+
interface SelectItem {
|
|
172
|
+
label: string;
|
|
173
|
+
value: string;
|
|
174
|
+
icon?: Component;
|
|
175
|
+
}
|
|
176
|
+
//#endregion
|
|
133
177
|
//#region src/types/context.d.ts
|
|
134
178
|
interface StreamMarkdownProps extends StreamMarkdownContext, MarkdownParserOptions {
|
|
135
179
|
mode?: 'static' | 'streaming';
|
|
136
180
|
content?: string;
|
|
137
181
|
nodeRenderers?: NodeRenderers;
|
|
182
|
+
icons?: Partial<Record<IconName, Component>>;
|
|
138
183
|
locale?: string | LocaleConfig;
|
|
139
184
|
}
|
|
140
185
|
interface MarkdownParserOptions {
|
|
@@ -171,9 +216,14 @@ type CodeControlsConfig = boolean | {
|
|
|
171
216
|
fullscreen?: boolean;
|
|
172
217
|
};
|
|
173
218
|
type ImageControlsConfig = boolean | {
|
|
219
|
+
preview?: boolean;
|
|
174
220
|
download?: boolean;
|
|
221
|
+
carousel?: boolean;
|
|
222
|
+
flip?: boolean;
|
|
223
|
+
rotate?: boolean;
|
|
224
|
+
controlPosition?: ZoomControlPosition;
|
|
175
225
|
};
|
|
176
|
-
type ZoomControlPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
226
|
+
type ZoomControlPosition = 'top-left' | 'top-right' | 'top-center' | 'bottom-left' | 'bottom-right' | 'bottom-center';
|
|
177
227
|
type ZoomControlsConfig = boolean | {
|
|
178
228
|
position?: ZoomControlPosition;
|
|
179
229
|
};
|
|
@@ -183,12 +233,15 @@ type ControlsConfig = boolean | {
|
|
|
183
233
|
image?: boolean | ImageControlsConfig;
|
|
184
234
|
mermaid?: boolean | ZoomControlsConfig;
|
|
185
235
|
};
|
|
186
|
-
type PreviewerConfig = boolean | {
|
|
187
|
-
html?: boolean | Component;
|
|
236
|
+
type PreviewerConfig = boolean | ({
|
|
188
237
|
mermaid?: boolean | Component;
|
|
189
|
-
|
|
238
|
+
html?: boolean | Component;
|
|
239
|
+
} & {
|
|
240
|
+
[key: string]: Component;
|
|
241
|
+
});
|
|
190
242
|
interface ShikiOptions {
|
|
191
243
|
theme?: [BuiltinTheme, BuiltinTheme];
|
|
244
|
+
langs?: BundledLanguage[];
|
|
192
245
|
langAlias?: Record<string, string>;
|
|
193
246
|
codeToTokenOptions?: CodeToTokensOptions<BundledLanguage, BundledTheme>;
|
|
194
247
|
}
|
|
@@ -210,6 +263,7 @@ interface CodeOptions {
|
|
|
210
263
|
languageIcon?: boolean;
|
|
211
264
|
languageName?: boolean;
|
|
212
265
|
lineNumbers?: boolean;
|
|
266
|
+
maxHeight?: number | string;
|
|
213
267
|
/**
|
|
214
268
|
* Language specific code options
|
|
215
269
|
* @example
|
|
@@ -221,7 +275,10 @@ interface CodeOptions {
|
|
|
221
275
|
* },
|
|
222
276
|
* }
|
|
223
277
|
*/
|
|
224
|
-
language?: Record<string,
|
|
278
|
+
language?: Record<string, CodeOptionsLanguage>;
|
|
279
|
+
}
|
|
280
|
+
interface CodeOptionsLanguage extends Omit<CodeOptions, 'languageIcon'> {
|
|
281
|
+
languageIcon?: boolean | Component;
|
|
225
282
|
}
|
|
226
283
|
interface HardenOptions {
|
|
227
284
|
defaultOrigin?: string;
|
|
@@ -261,9 +318,7 @@ interface NodeRendererProps extends StreamMarkdownContext {
|
|
|
261
318
|
markdownParser: MarkdownParser;
|
|
262
319
|
nodeRenderers: NodeRenderers;
|
|
263
320
|
node: ParsedNode;
|
|
264
|
-
mediumZoom: Zoom;
|
|
265
321
|
indexKey: number | string;
|
|
266
|
-
getContainer: () => HTMLElement | undefined;
|
|
267
322
|
}
|
|
268
323
|
interface BlockquoteNodeRendererProps extends NodeRendererProps {
|
|
269
324
|
node: BlockquoteNode;
|
|
@@ -347,18 +402,11 @@ interface InlineMathNodeRendererProps extends NodeRendererProps {
|
|
|
347
402
|
node: InlineMathNode;
|
|
348
403
|
}
|
|
349
404
|
//#endregion
|
|
350
|
-
//#region src/types/shared.d.ts
|
|
351
|
-
interface SelectItem {
|
|
352
|
-
label: string;
|
|
353
|
-
value: string;
|
|
354
|
-
icon?: Component;
|
|
355
|
-
}
|
|
356
|
-
//#endregion
|
|
357
405
|
//#region src/components/renderers/index.d.ts
|
|
358
406
|
declare const NODE_RENDERERS: NodeRenderers;
|
|
359
407
|
//#endregion
|
|
360
408
|
//#region src/components/index.d.ts
|
|
361
|
-
declare const
|
|
409
|
+
declare const UI: Record<string, Component>;
|
|
362
410
|
//#endregion
|
|
363
411
|
//#region src/composables/use-code-options.d.ts
|
|
364
412
|
interface UseCodeOptionsOptions {
|
|
@@ -366,15 +414,17 @@ interface UseCodeOptionsOptions {
|
|
|
366
414
|
language?: MaybeRef<string>;
|
|
367
415
|
}
|
|
368
416
|
declare function useCodeOptions(options: UseCodeOptionsOptions): {
|
|
369
|
-
languageCodeOptions:
|
|
370
|
-
showLanguageIcon:
|
|
371
|
-
showLanguageName:
|
|
372
|
-
showLineNumbers:
|
|
417
|
+
languageCodeOptions: vue39.ComputedRef<CodeOptionsLanguage | undefined>;
|
|
418
|
+
showLanguageIcon: vue39.ComputedRef<boolean>;
|
|
419
|
+
showLanguageName: vue39.ComputedRef<boolean>;
|
|
420
|
+
showLineNumbers: vue39.ComputedRef<boolean>;
|
|
373
421
|
};
|
|
374
422
|
//#endregion
|
|
375
423
|
//#region src/composables/use-context.d.ts
|
|
376
424
|
interface Context {
|
|
377
425
|
isDark?: MaybeRef<boolean>;
|
|
426
|
+
icons?: MaybeRef<Record<IconName, Component>>;
|
|
427
|
+
parsedNodes?: MaybeRef<ParsedNode[]>;
|
|
378
428
|
getContainer?: () => HTMLElement | undefined;
|
|
379
429
|
onCopied?: (content: string) => void;
|
|
380
430
|
}
|
|
@@ -382,7 +432,9 @@ declare function useContext(): {
|
|
|
382
432
|
context: Context;
|
|
383
433
|
provideContext: (ctx: Partial<Context>) => void;
|
|
384
434
|
injectContext: () => Context;
|
|
385
|
-
|
|
435
|
+
icons: vue39.ComputedRef<Record<string, Component>>;
|
|
436
|
+
isDark: vue39.ComputedRef<boolean>;
|
|
437
|
+
parsedNodes: vue39.ComputedRef<ParsedNode[]>;
|
|
386
438
|
readonly getContainer: () => HTMLElement | undefined;
|
|
387
439
|
readonly onCopied: (content: string) => void;
|
|
388
440
|
};
|
|
@@ -396,6 +448,32 @@ declare function useControls(options: UseControlsOptions): {
|
|
|
396
448
|
getControlValue: <T = any>(key: string) => T | undefined;
|
|
397
449
|
};
|
|
398
450
|
//#endregion
|
|
451
|
+
//#region src/composables/use-floating-element.d.ts
|
|
452
|
+
interface UseFloatingElementOptions {
|
|
453
|
+
trigger?: MaybeRef<'hover' | 'click'>;
|
|
454
|
+
placement?: MaybeRef<Placement>;
|
|
455
|
+
delay?: MaybeRef<number | [number, number]>;
|
|
456
|
+
getContainer?: () => HTMLElement | undefined;
|
|
457
|
+
}
|
|
458
|
+
declare function useFloatingElement(options: UseFloatingElementOptions): {
|
|
459
|
+
referenceEl: vue39.Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
|
460
|
+
floatingEl: vue39.Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
|
461
|
+
open: vue39.Ref<boolean, boolean>;
|
|
462
|
+
appendTo: vue39.ComputedRef<HTMLElement | "body">;
|
|
463
|
+
floatingStyle: vue39.ComputedRef<{
|
|
464
|
+
position: _floating_ui_vue0.Strategy;
|
|
465
|
+
top: string;
|
|
466
|
+
left: string;
|
|
467
|
+
}>;
|
|
468
|
+
show: () => void;
|
|
469
|
+
hide: () => void;
|
|
470
|
+
onMouseEnter: () => void;
|
|
471
|
+
onMouseLeave: () => void;
|
|
472
|
+
onClick: () => void;
|
|
473
|
+
onFloatingEnter: () => void;
|
|
474
|
+
onFloatingLeave: () => void;
|
|
475
|
+
};
|
|
476
|
+
//#endregion
|
|
399
477
|
//#region src/composables/use-harden-sanitizers.d.ts
|
|
400
478
|
interface UseHardenSanitizersOptions {
|
|
401
479
|
url?: MaybeRef<string | undefined>;
|
|
@@ -404,10 +482,10 @@ interface UseHardenSanitizersOptions {
|
|
|
404
482
|
isImage?: MaybeRef<boolean | undefined>;
|
|
405
483
|
}
|
|
406
484
|
declare function useHardenSanitizers(options: UseHardenSanitizersOptions): {
|
|
407
|
-
hardenOptions:
|
|
485
|
+
hardenOptions: vue39.ComputedRef<HardenOptions>;
|
|
408
486
|
transformHardenUrl: (url: string) => string | null;
|
|
409
|
-
transformedUrl:
|
|
410
|
-
isHardenUrl:
|
|
487
|
+
transformedUrl: vue39.ComputedRef<string | null>;
|
|
488
|
+
isHardenUrl: vue39.ComputedRef<boolean>;
|
|
411
489
|
};
|
|
412
490
|
//#endregion
|
|
413
491
|
//#region src/composables/use-i18n.d.ts
|
|
@@ -417,7 +495,7 @@ declare function useI18n(): {
|
|
|
417
495
|
//#endregion
|
|
418
496
|
//#region src/composables/use-katex.d.ts
|
|
419
497
|
declare function useKatex(): {
|
|
420
|
-
installed:
|
|
498
|
+
installed: vue39.Ref<boolean, boolean>;
|
|
421
499
|
render: (code: string, options?: KatexOptions$1) => Promise<{
|
|
422
500
|
html?: string;
|
|
423
501
|
error?: string;
|
|
@@ -433,9 +511,26 @@ interface UseMathRendererOptions {
|
|
|
433
511
|
throttle?: MaybeRef<number>;
|
|
434
512
|
}
|
|
435
513
|
declare function useMathRenderer(options: UseMathRendererOptions): {
|
|
436
|
-
html:
|
|
437
|
-
error:
|
|
438
|
-
errorMessage:
|
|
514
|
+
html: vue39.Ref<string, string>;
|
|
515
|
+
error: vue39.ComputedRef<boolean>;
|
|
516
|
+
errorMessage: vue39.Ref<string, string>;
|
|
517
|
+
};
|
|
518
|
+
//#endregion
|
|
519
|
+
//#region src/composables/use-medium-zoom.d.ts
|
|
520
|
+
interface UseMediumZoomOptions {
|
|
521
|
+
margin?: MaybeRef<number>;
|
|
522
|
+
open?: () => void;
|
|
523
|
+
close?: () => void;
|
|
524
|
+
}
|
|
525
|
+
declare function useMediumZoom(options: UseMediumZoomOptions): {
|
|
526
|
+
isAnimating: vue39.Ref<boolean, boolean>;
|
|
527
|
+
elementStyle: vue39.ComputedRef<{
|
|
528
|
+
opacity: number;
|
|
529
|
+
}>;
|
|
530
|
+
elementRef: vue39.Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
|
531
|
+
zoomElementRef: vue39.Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
|
532
|
+
zoomIn: () => Promise<void>;
|
|
533
|
+
zoomOut: () => Promise<void>;
|
|
439
534
|
};
|
|
440
535
|
//#endregion
|
|
441
536
|
//#region src/composables/use-mermaid.d.ts
|
|
@@ -444,7 +539,7 @@ interface UseMermaidOptions {
|
|
|
444
539
|
isDark?: MaybeRef<boolean>;
|
|
445
540
|
}
|
|
446
541
|
declare function useMermaid(options?: UseMermaidOptions): {
|
|
447
|
-
installed:
|
|
542
|
+
installed: vue39.Ref<boolean, boolean>;
|
|
448
543
|
getMermaid: () => Promise<Mermaid>;
|
|
449
544
|
parseMermaid: (code: string) => Promise<boolean>;
|
|
450
545
|
renderMermaid: (code: string) => Promise<string | null>;
|
|
@@ -460,7 +555,7 @@ interface UseShikiOptions {
|
|
|
460
555
|
isDark?: MaybeRef<boolean>;
|
|
461
556
|
}
|
|
462
557
|
declare function useShiki(options?: UseShikiOptions): {
|
|
463
|
-
installed:
|
|
558
|
+
installed: vue39.Ref<boolean, boolean>;
|
|
464
559
|
getHighlighter: () => Promise<Highlighter>;
|
|
465
560
|
codeToTokens: (code: string) => Promise<TokensResult>;
|
|
466
561
|
preload: () => Promise<void>;
|
|
@@ -473,24 +568,15 @@ interface UseTailwindV3ThemeOptions {
|
|
|
473
568
|
styleScope?: MaybeRef<string>;
|
|
474
569
|
}
|
|
475
570
|
declare function useTailwindV3Theme(options: UseTailwindV3ThemeOptions): {
|
|
476
|
-
element:
|
|
571
|
+
element: vue39.ComputedRef<Element | undefined>;
|
|
477
572
|
id: string;
|
|
478
|
-
css:
|
|
573
|
+
css: vue39.ShallowRef<string>;
|
|
479
574
|
load: () => void;
|
|
480
575
|
unload: () => void;
|
|
481
|
-
isLoaded: Readonly<
|
|
576
|
+
isLoaded: Readonly<vue39.ShallowRef<boolean>>;
|
|
482
577
|
generateCSS: () => void;
|
|
483
578
|
};
|
|
484
579
|
//#endregion
|
|
485
|
-
//#region src/composables/use-tippy.d.ts
|
|
486
|
-
interface UseTippyOptions {
|
|
487
|
-
isDark?: MaybeRef<boolean>;
|
|
488
|
-
options?: MaybeRef<DefaultProps>;
|
|
489
|
-
}
|
|
490
|
-
declare function useTippy(options?: UseTippyOptions): {
|
|
491
|
-
initTippy: () => void;
|
|
492
|
-
};
|
|
493
|
-
//#endregion
|
|
494
580
|
//#region src/composables/use-zoom.d.ts
|
|
495
581
|
interface UseZoomOptions {
|
|
496
582
|
minZoom?: number;
|
|
@@ -501,17 +587,17 @@ interface UseZoomOptions {
|
|
|
501
587
|
initialTranslateX?: number;
|
|
502
588
|
initialTranslateY?: number;
|
|
503
589
|
}
|
|
504
|
-
interface
|
|
590
|
+
interface ZoomState {
|
|
505
591
|
zoom: number;
|
|
506
592
|
translateX: number;
|
|
507
593
|
translateY: number;
|
|
508
594
|
}
|
|
509
595
|
declare function useZoom(options?: UseZoomOptions): {
|
|
510
|
-
zoom:
|
|
511
|
-
translateX:
|
|
512
|
-
translateY:
|
|
513
|
-
isDragging:
|
|
514
|
-
transformStyle:
|
|
596
|
+
zoom: vue39.Ref<number, number>;
|
|
597
|
+
translateX: vue39.Ref<number, number>;
|
|
598
|
+
translateY: vue39.Ref<number, number>;
|
|
599
|
+
isDragging: vue39.Ref<boolean, boolean>;
|
|
600
|
+
transformStyle: vue39.ComputedRef<{
|
|
515
601
|
transform: string;
|
|
516
602
|
}>;
|
|
517
603
|
zoomIn: () => void;
|
|
@@ -522,50 +608,38 @@ declare function useZoom(options?: UseZoomOptions): {
|
|
|
522
608
|
onDrag: (e: PointerEvent) => void;
|
|
523
609
|
stopDrag: () => void;
|
|
524
610
|
handleWheel: (event: WheelEvent, containerElement: HTMLElement) => void;
|
|
525
|
-
getState: () =>
|
|
526
|
-
setState: (state: Partial<
|
|
611
|
+
getState: () => ZoomState;
|
|
612
|
+
setState: (state: Partial<ZoomState>) => void;
|
|
613
|
+
handleTouchStart: (event: TouchEvent, containerElement: HTMLElement) => void;
|
|
614
|
+
handleTouchMove: (event: TouchEvent, containerElement: HTMLElement) => void;
|
|
615
|
+
handleTouchEnd: (event: TouchEvent) => void;
|
|
527
616
|
};
|
|
528
617
|
//#endregion
|
|
529
|
-
//#region src/constants/code.d.ts
|
|
530
|
-
declare const DEFAULT_LIGHT_THEME = "github-light";
|
|
531
|
-
declare const DEFAULT_DARK_THEME = "github-dark";
|
|
532
|
-
declare const LANGUAGE_ALIAS: Record<string, BuiltinLanguage>;
|
|
533
|
-
declare const LANGUAGE_EXTENSIONS: Partial<Record<BuiltinLanguage, string>>;
|
|
534
|
-
declare const LANGUAGE_ICONS: Partial<Record<BuiltinLanguage | SpecialLanguage, Component>>;
|
|
535
|
-
//#endregion
|
|
536
|
-
//#region src/constants/harden.d.ts
|
|
537
|
-
declare const DEFAULT_HARDEN_OPTIONS: HardenOptions;
|
|
538
|
-
//#endregion
|
|
539
|
-
//#region src/constants/icons.d.ts
|
|
540
|
-
declare const ICONS: Record<string, Component>;
|
|
541
|
-
//#endregion
|
|
542
|
-
//#region src/constants/theme.d.ts
|
|
543
|
-
declare const SHADCN_SCHEMAS: readonly ["background", "foreground", "card", "card-foreground", "popover", "popover-foreground", "primary", "primary-foreground", "secondary", "secondary-foreground", "muted", "muted-foreground", "accent", "accent-foreground", "destructive", "border", "input", "ring", "chart-1", "chart-2", "chart-3", "chart-4", "chart-5", "sidebar", "sidebar-foreground", "sidebar-primary", "sidebar-primary-foreground", "sidebar-accent", "sidebar-accent-foreground", "sidebar-border", "sidebar-ring"];
|
|
544
|
-
//#endregion
|
|
545
618
|
//#region src/index.vue.d.ts
|
|
546
|
-
declare const __VLS_export:
|
|
619
|
+
declare const __VLS_export: vue39.DefineComponent<StreamMarkdownProps, {
|
|
547
620
|
getMarkdownParser: () => MarkdownParser;
|
|
548
621
|
getParsedNodes: () => ParsedNode[];
|
|
549
|
-
}, {}, {}, {},
|
|
622
|
+
}, {}, {}, {}, vue39.ComponentOptionsMixin, vue39.ComponentOptionsMixin, {} & {
|
|
550
623
|
copied: (content: string) => any;
|
|
551
|
-
}, string,
|
|
624
|
+
}, string, vue39.PublicProps, Readonly<StreamMarkdownProps> & Readonly<{
|
|
552
625
|
onCopied?: ((content: string) => any) | undefined;
|
|
553
626
|
}>, {
|
|
554
627
|
mode: "static" | "streaming";
|
|
555
628
|
content: string;
|
|
556
|
-
nodeRenderers: Partial<Record<"blockquote" | "break" | "code" | "definition" | "delete" | "emphasis" | "footnoteDefinition" | "footnoteReference" | "heading" | "html" | "image" | "imageReference" | "inlineCode" | "link" | "linkReference" | "list" | "listItem" | "paragraph" | "strong" | "table" | "tableCell" | "tableRow" | "text" | "thematicBreak" | "yaml" | "inlineMath" | "math",
|
|
629
|
+
nodeRenderers: Partial<Record<"blockquote" | "break" | "code" | "definition" | "delete" | "emphasis" | "footnoteDefinition" | "footnoteReference" | "heading" | "html" | "image" | "imageReference" | "inlineCode" | "link" | "linkReference" | "list" | "listItem" | "paragraph" | "strong" | "table" | "tableCell" | "tableRow" | "text" | "thematicBreak" | "yaml" | "inlineMath" | "math", Component>>;
|
|
630
|
+
icons: Partial<Record<IconName, Component>>;
|
|
557
631
|
locale: string | LocaleConfig;
|
|
558
632
|
controls: ControlsConfig;
|
|
559
633
|
previewers: PreviewerConfig;
|
|
560
634
|
isDark: boolean;
|
|
561
|
-
}, {}, {}, {}, string,
|
|
635
|
+
}, {}, {}, {}, string, vue39.ComponentProvideOptions, false, {}, any>;
|
|
562
636
|
declare const _default: typeof __VLS_export;
|
|
563
637
|
//#endregion
|
|
564
638
|
//#region src/locales/index.d.ts
|
|
565
639
|
declare const SUPPORT_LANGUAGES: string[];
|
|
566
640
|
declare const localesGlob: Record<string, () => Promise<unknown>>;
|
|
567
|
-
declare const localeMessages:
|
|
568
|
-
declare const currentLocale:
|
|
641
|
+
declare const localeMessages: vue39.Ref<LocaleConfig | undefined, LocaleConfig | undefined>;
|
|
642
|
+
declare const currentLocale: vue39.Ref<string, string>;
|
|
569
643
|
declare function loadLocaleMessages(language: string | LocaleConfig): Promise<void>;
|
|
570
644
|
//#endregion
|
|
571
645
|
//#region src/postprocess/text.d.ts
|
|
@@ -736,7 +810,6 @@ declare function fixTaskList(content: string): string;
|
|
|
736
810
|
//#endregion
|
|
737
811
|
//#region src/preprocess/vendored/markdown-utils.d.ts
|
|
738
812
|
declare function preprocessLaTeX(content: string): string;
|
|
739
|
-
declare function preprocessThinkTag(content: string): string;
|
|
740
813
|
//#endregion
|
|
741
814
|
//#region src/preprocess/pattern.d.ts
|
|
742
815
|
declare const crlfPattern: RegExp;
|
|
@@ -772,6 +845,7 @@ declare function transformUrl(url: unknown, allowedPrefixes: string[], defaultOr
|
|
|
772
845
|
//#region src/utils/helper.d.ts
|
|
773
846
|
declare function flow<T>(fns: Array<(arg: T) => T>): (arg: T) => T;
|
|
774
847
|
declare function save(filename: string, content: string | Blob, mimeType: string): void;
|
|
848
|
+
declare function saveImage(url: string, alt?: string): Promise<void>;
|
|
775
849
|
declare function svgToPngBlob(svgString: string, options?: {
|
|
776
850
|
scale?: number;
|
|
777
851
|
}): Promise<Blob>;
|
|
@@ -803,4 +877,4 @@ declare function tableDataToTSV(data: TableData): string;
|
|
|
803
877
|
declare function escapeMarkdownTableCell(cell: string): string;
|
|
804
878
|
declare function tableDataToMarkdown(data: TableData): string;
|
|
805
879
|
//#endregion
|
|
806
|
-
export { BlockquoteNode, BlockquoteNodeRendererProps, BreakNode, BreakNodeRendererProps, CODE_PREVIEWERS,
|
|
880
|
+
export { BlockquoteNode, BlockquoteNodeRendererProps, BreakNode, BreakNodeRendererProps, CODE_PREVIEWERS, CodeControlsConfig, CodeNode, CodeNodeRendererProps, CodeOptions, CodeOptionsLanguage, ControlsConfig, DEFAULT_DARK_THEME, DEFAULT_HARDEN_OPTIONS, DEFAULT_LIGHT_THEME, DefinitionNode, DefinitionNodeRendererProps, DeleteNode, DeleteNodeRendererProps, EmphasisNode, EmphasisNodeRendererProps, FootnoteDefinitionNode, FootnoteDefinitionNodeRendererProps, FootnoteReferenceNode, FootnoteReferenceNodeRendererProps, HardenOptions, HeadingNode, HeadingNodeRendererProps, HtmlNode, HtmlNodeRendererProps, ICONS, IconName, ImageControlsConfig, ImageNode, ImageNodeRendererProps, ImageOptions, ImageReferenceNode, ImageReferenceNodeRendererProps, InlineCodeNode, InlineCodeNodeRendererProps, InlineMathNode, InlineMathNodeRendererProps, KatexOptions, LANGUAGE_ALIAS, LANGUAGE_EXTENSIONS, LANGUAGE_ICONS, LinkNode, LinkNodeRendererProps, LinkReferenceNode, LinkReferenceNodeRendererProps, ListItemNode, ListItemNodeRendererProps, ListNode, ListNodeRendererProps, LocaleConfig, _default as Markdown, MarkdownParser, MarkdownParserOptions, MathNode, MathNodeRendererProps, MdastOptions, MermaidOptions, NODE_RENDERERS, NodeRendererListProps, NodeRendererProps, NodeRenderers, NodeType, Options, ParagraphNode, ParagraphNodeRendererProps, ParsedNode, PreviewerConfig, SHADCN_SCHEMAS, SUPPORT_LANGUAGES, SelectItem, ShikiOptions, StreamMarkdownContext, StreamMarkdownProps, StrongNode, StrongNodeRendererProps, SyntaxTree, TableCellNode, TableCellNodeRendererProps, TableControlsConfig, TableData, TableNode, TableNodeRendererProps, TableRowNode, TableRowNodeRendererProps, TextNode, TextNodeRendererProps, ThematicBreakNode, ThematicBreakNodeRendererProps, UI, YamlNode, YamlNodeRendererProps, ZoomControlPosition, ZoomControlsConfig, codeBlockPattern, crlfPattern, currentLocale, doubleAsteriskPattern, doubleDollarPattern, doubleTildePattern, doubleUnderscorePattern, escapeMarkdownTableCell, extractTableDataFromElement, findLastLeafNode, findNodeParent, fixCode, fixDelete, fixEmphasis, fixLink, fixStrong, fixTable, fixTaskList, flow, hasKatex, hasMermaid, hasShiki, incompleteBracketPattern, incompleteLinkTextPattern, incompleteUrlPattern, loadLocaleMessages, localeMessages, localesGlob, normalize, postFixText, postprocess, preprocess, preprocessLaTeX, proprocessContent, quoteStandaloneDashPattern, quoteTaskListPattern, remend, save, saveImage, separatorPattern, singleAsteriskPattern, singleBacktickPattern, singleUnderscorePattern, standaloneDashPattern, svgToPngBlob, tableDataToCSV, tableDataToMarkdown, tableDataToTSV, tableRowPattern, taskListPattern, trailingBackticksPattern, trailingWhitespacePattern, transformUrl, tripleBacktickPattern, useCodeOptions, useContext, useControls, useFloatingElement, useHardenSanitizers, useI18n, useKatex, useMathRenderer, useMediumZoom, useMermaid, useShiki, useTailwindV3Theme, useZoom };
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
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-D0VVcdjL.js";
|
|
2
|
+
import { A as svgToPngBlob, B as useFloatingElement, C as findNodeParent, D as flow, E as hasShiki, F as DEFAULT_DARK_THEME, H as useContext, I as DEFAULT_LIGHT_THEME, L as LANGUAGE_ALIAS, M as SHADCN_SCHEMAS, N as ICONS, O as save, P as DEFAULT_HARDEN_OPTIONS, R as LANGUAGE_EXTENSIONS, S as findLastLeafNode, T as hasMermaid, U as useCodeOptions, V as useControls, _ as escapeMarkdownTableCell, a as useMediumZoom, b as tableDataToMarkdown, c as _defineProperty, d as SUPPORT_LANGUAGES, f as currentLocale, g as useHardenSanitizers, h as localesGlob, i as useMermaid, j as transformUrl, k as saveImage, l as useKatex, m as localeMessages, n as useTailwindV3Theme, o as useMathRenderer, p as loadLocaleMessages, r as useShiki, t as useZoom, u as useI18n, v as extractTableDataFromElement, w as hasKatex, x as tableDataToTSV, y as tableDataToCSV, z as LANGUAGE_ICONS } from "./composables-yny5gJo3.js";
|
|
3
|
+
import { t as node_list_default } from "./node-list-YhpHXdM_.js";
|
|
4
4
|
import { computed, createElementBlock, createVNode, defineAsyncComponent, defineComponent, mergeProps, normalizeClass, onBeforeUnmount, openBlock, ref, toRefs, unref, watch } from "vue";
|
|
5
|
-
import mediumZoom from "medium-zoom";
|
|
6
5
|
import { MarkdownItAsync } from "markdown-it-async";
|
|
7
6
|
import remend from "remend";
|
|
8
7
|
|
|
@@ -49,40 +48,41 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
49
48
|
//#endregion
|
|
50
49
|
//#region src/components/renderers/index.ts
|
|
51
50
|
const NODE_RENDERERS = {
|
|
52
|
-
blockquote: defineAsyncComponent(() => import("./blockquote-
|
|
53
|
-
code: defineAsyncComponent(() => import("./code-
|
|
54
|
-
delete: defineAsyncComponent(() => import("./delete-
|
|
55
|
-
emphasis: defineAsyncComponent(() => import("./emphasis-
|
|
56
|
-
heading: defineAsyncComponent(() => import("./heading-
|
|
57
|
-
image: defineAsyncComponent(() => import("./image-
|
|
58
|
-
inlineCode: defineAsyncComponent(() => import("./inline-code-
|
|
59
|
-
inlineMath: defineAsyncComponent(() => import("./inline-math-
|
|
60
|
-
link: defineAsyncComponent(() => import("./link-
|
|
61
|
-
list: defineAsyncComponent(() => import("./list-
|
|
62
|
-
listItem: defineAsyncComponent(() => import("./list-item-
|
|
63
|
-
math: defineAsyncComponent(() => import("./math-
|
|
64
|
-
paragraph: defineAsyncComponent(() => import("./paragraph-
|
|
65
|
-
strong: defineAsyncComponent(() => import("./strong-
|
|
66
|
-
table: defineAsyncComponent(() => import("./table-
|
|
67
|
-
text: defineAsyncComponent(() => import("./text-
|
|
68
|
-
thematicBreak: defineAsyncComponent(() => import("./thematic-break-
|
|
69
|
-
yaml: defineAsyncComponent(() => import("./yaml-
|
|
51
|
+
blockquote: defineAsyncComponent(() => import("./blockquote-bkADuiGm.js")),
|
|
52
|
+
code: defineAsyncComponent(() => import("./code-DF8PTNol.js")),
|
|
53
|
+
delete: defineAsyncComponent(() => import("./delete-D17YBeI-.js")),
|
|
54
|
+
emphasis: defineAsyncComponent(() => import("./emphasis-B-2R_0Q5.js")),
|
|
55
|
+
heading: defineAsyncComponent(() => import("./heading-DyJIwNrN.js")),
|
|
56
|
+
image: defineAsyncComponent(() => import("./image-BPhFn1xp.js")),
|
|
57
|
+
inlineCode: defineAsyncComponent(() => import("./inline-code-C44UJ2TH.js")),
|
|
58
|
+
inlineMath: defineAsyncComponent(() => import("./inline-math-wO1rMt9T.js")),
|
|
59
|
+
link: defineAsyncComponent(() => import("./link-sGo7CEll.js")),
|
|
60
|
+
list: defineAsyncComponent(() => import("./list-C0I1ysSI.js")),
|
|
61
|
+
listItem: defineAsyncComponent(() => import("./list-item-BoC2wKBL.js")),
|
|
62
|
+
math: defineAsyncComponent(() => import("./math-BlqtUf2r.js")),
|
|
63
|
+
paragraph: defineAsyncComponent(() => import("./paragraph-BN-4-Dn7.js")),
|
|
64
|
+
strong: defineAsyncComponent(() => import("./strong-NdAS3VjP.js")),
|
|
65
|
+
table: defineAsyncComponent(() => import("./table-CWX5B2i1.js")),
|
|
66
|
+
text: defineAsyncComponent(() => import("./text-DpleLvNh.js")),
|
|
67
|
+
thematicBreak: defineAsyncComponent(() => import("./thematic-break-D5GvzU5S.js")),
|
|
68
|
+
yaml: defineAsyncComponent(() => import("./yaml-y0snrPRx.js"))
|
|
70
69
|
};
|
|
71
70
|
|
|
72
71
|
//#endregion
|
|
73
72
|
//#region src/components/index.ts
|
|
74
|
-
const
|
|
75
|
-
Button: defineAsyncComponent(() => import("./button-
|
|
76
|
-
CodeBlock: defineAsyncComponent(() => import("./code-block-
|
|
77
|
-
Dropdown: defineAsyncComponent(() => import("./dropdown-
|
|
78
|
-
ErrorComponent: defineAsyncComponent(() => import("./error-component-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
73
|
+
const UI = {
|
|
74
|
+
Button: defineAsyncComponent(() => import("./button-JYC8d-B-.js")),
|
|
75
|
+
CodeBlock: defineAsyncComponent(() => import("./code-block-BhMDz2ZL.js")),
|
|
76
|
+
Dropdown: defineAsyncComponent(() => import("./dropdown-Y5_Z4a_u.js")),
|
|
77
|
+
ErrorComponent: defineAsyncComponent(() => import("./error-component-DEIWb6kB.js")),
|
|
78
|
+
Image: defineAsyncComponent(() => import("./image-DXBD47sF.js")),
|
|
79
|
+
Modal: defineAsyncComponent(() => import("./modal-Duhc-vVa.js")),
|
|
80
|
+
NodeList: defineAsyncComponent(() => import("./node-list-C1je2nLd.js")),
|
|
81
|
+
Segmented: defineAsyncComponent(() => import("./segmented-XdoLnuuq.js")),
|
|
82
|
+
Spin: defineAsyncComponent(() => import("./spin-wM2KE8mO.js")),
|
|
83
|
+
Table: defineAsyncComponent(() => import("./table-R9gmCXm_.js")),
|
|
84
|
+
Tooltip: defineAsyncComponent(() => import("./tooltip-BJDs-A8d.js")),
|
|
85
|
+
ZoomContainer: defineAsyncComponent(() => import("./zoom-container-KztuE4ri.js"))
|
|
86
86
|
};
|
|
87
87
|
|
|
88
88
|
//#endregion
|
|
@@ -18129,15 +18129,6 @@ function preprocessLaTeX(content$2) {
|
|
|
18129
18129
|
processedContent = processedContent.replace(/_TMP_REPLACE_DOLLAR_/g, "$");
|
|
18130
18130
|
return processedContent;
|
|
18131
18131
|
}
|
|
18132
|
-
function preprocessThinkTag(content$2) {
|
|
18133
|
-
const thinkOpenTagRegex = /(<think>\s*)+/g;
|
|
18134
|
-
const thinkCloseTagRegex = /(\s*<\/think>)+/g;
|
|
18135
|
-
return flow([
|
|
18136
|
-
(str) => str.replace(thinkOpenTagRegex, "<details data-think=true>\n"),
|
|
18137
|
-
(str) => str.replace(thinkCloseTagRegex, "\n[ENDTHINKFLAG]</details>"),
|
|
18138
|
-
(str) => str.replace(/(<\/details>)(?![^\S\r\n]*[\r\n])(?![^\S\r\n]*$)/g, "$1\n")
|
|
18139
|
-
])(content$2);
|
|
18140
|
-
}
|
|
18141
18132
|
|
|
18142
18133
|
//#endregion
|
|
18143
18134
|
//#region src/preprocess/index.ts
|
|
@@ -18145,11 +18136,7 @@ function proprocessContent(content$2) {
|
|
|
18145
18136
|
return content$2.replace(crlfPattern, "\n").trimEnd();
|
|
18146
18137
|
}
|
|
18147
18138
|
function normalize(content$2) {
|
|
18148
|
-
return flow([
|
|
18149
|
-
proprocessContent,
|
|
18150
|
-
preprocessLaTeX,
|
|
18151
|
-
preprocessThinkTag
|
|
18152
|
-
])(content$2);
|
|
18139
|
+
return flow([proprocessContent, preprocessLaTeX])(content$2);
|
|
18153
18140
|
}
|
|
18154
18141
|
function preprocess(content$2) {
|
|
18155
18142
|
return flow([
|
|
@@ -18270,6 +18257,11 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
18270
18257
|
required: false,
|
|
18271
18258
|
default: () => ({})
|
|
18272
18259
|
},
|
|
18260
|
+
icons: {
|
|
18261
|
+
type: Object,
|
|
18262
|
+
required: false,
|
|
18263
|
+
default: () => ({})
|
|
18264
|
+
},
|
|
18273
18265
|
locale: {
|
|
18274
18266
|
type: [String, Object],
|
|
18275
18267
|
required: false,
|
|
@@ -18339,11 +18331,9 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
18339
18331
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
18340
18332
|
const props = __props;
|
|
18341
18333
|
const emits = __emit;
|
|
18342
|
-
const { isDark } = toRefs(props);
|
|
18334
|
+
const { shikiOptions, mermaidOptions, isDark } = toRefs(props);
|
|
18343
18335
|
const containerRef = ref();
|
|
18344
18336
|
const { provideContext } = useContext();
|
|
18345
|
-
const { initTippy } = useTippy({ isDark });
|
|
18346
|
-
const zoom = mediumZoom("[data-zoomable]", { background: "color-mix(in oklab, var(--background) 80%, transparent)" });
|
|
18347
18337
|
const markdownParser = new MarkdownParser({
|
|
18348
18338
|
mode: props.mode,
|
|
18349
18339
|
mdastOptions: props.mdastOptions,
|
|
@@ -18355,28 +18345,32 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
18355
18345
|
...NODE_RENDERERS,
|
|
18356
18346
|
...props.nodeRenderers
|
|
18357
18347
|
}));
|
|
18348
|
+
const icons = computed(() => ({
|
|
18349
|
+
...ICONS,
|
|
18350
|
+
...props.icons
|
|
18351
|
+
}));
|
|
18358
18352
|
function getContainer() {
|
|
18359
18353
|
return containerRef.value;
|
|
18360
18354
|
}
|
|
18361
|
-
const { preload: preloadShiki, dispose: disposeShiki } = useShiki();
|
|
18362
|
-
const { preload: preloadMermaid, dispose: disposeMermaid } = useMermaid();
|
|
18355
|
+
const { preload: preloadShiki, dispose: disposeShiki } = useShiki({ shikiOptions });
|
|
18356
|
+
const { preload: preloadMermaid, dispose: disposeMermaid } = useMermaid({ mermaidOptions });
|
|
18363
18357
|
const { preload: preloadKatex, dispose: disposeKatex } = useKatex();
|
|
18364
18358
|
async function bootstrap() {
|
|
18365
|
-
|
|
18366
|
-
const tasks = [];
|
|
18367
|
-
if (props.locale !== "en-US") tasks.push(loadLocaleMessages(props.locale));
|
|
18368
|
-
await Promise.all([
|
|
18369
|
-
...tasks,
|
|
18359
|
+
const tasks = [
|
|
18370
18360
|
preloadShiki(),
|
|
18371
18361
|
preloadMermaid(),
|
|
18372
18362
|
preloadKatex()
|
|
18373
|
-
]
|
|
18363
|
+
];
|
|
18364
|
+
if (props.locale !== "en-US") tasks.push(loadLocaleMessages(props.locale));
|
|
18365
|
+
await Promise.all(tasks);
|
|
18374
18366
|
}
|
|
18375
18367
|
bootstrap();
|
|
18376
18368
|
watch(() => props.mode, () => markdownParser.updateMode(props.mode));
|
|
18377
18369
|
watch(() => props.locale, () => loadLocaleMessages(props.locale));
|
|
18378
18370
|
provideContext({
|
|
18371
|
+
icons,
|
|
18379
18372
|
isDark,
|
|
18373
|
+
parsedNodes,
|
|
18380
18374
|
getContainer,
|
|
18381
18375
|
onCopied: (content$2) => {
|
|
18382
18376
|
emits("copied", content$2);
|
|
@@ -18400,13 +18394,11 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
18400
18394
|
"markdown-parser": unref(markdownParser),
|
|
18401
18395
|
"node-renderers": nodeRenderers.value,
|
|
18402
18396
|
nodes: parsedNodes.value,
|
|
18403
|
-
"medium-zoom": unref(zoom),
|
|
18404
18397
|
"get-container": getContainer
|
|
18405
18398
|
}), null, 16, [
|
|
18406
18399
|
"markdown-parser",
|
|
18407
18400
|
"node-renderers",
|
|
18408
|
-
"nodes"
|
|
18409
|
-
"medium-zoom"
|
|
18401
|
+
"nodes"
|
|
18410
18402
|
])], 2);
|
|
18411
18403
|
};
|
|
18412
18404
|
}
|
|
@@ -18417,4 +18409,4 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
18417
18409
|
var src_default = index_vue_vue_type_script_setup_true_lang_default;
|
|
18418
18410
|
|
|
18419
18411
|
//#endregion
|
|
18420
|
-
export { CODE_PREVIEWERS,
|
|
18412
|
+
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, fixLink, fixStrong, fixTable, fixTaskList, flow, hasKatex, hasMermaid, hasShiki, incompleteBracketPattern, incompleteLinkTextPattern, incompleteUrlPattern, loadLocaleMessages, localeMessages, localesGlob, normalize, postFixText, postprocess, preprocess, preprocessLaTeX, proprocessContent, quoteStandaloneDashPattern, quoteTaskListPattern, remend, save, saveImage, separatorPattern, singleAsteriskPattern, singleBacktickPattern, singleUnderscorePattern, standaloneDashPattern, svgToPngBlob, tableDataToCSV, tableDataToMarkdown, tableDataToTSV, tableRowPattern, taskListPattern, trailingBackticksPattern, trailingWhitespacePattern, transformUrl, tripleBacktickPattern, useCodeOptions, useContext, useControls, useFloatingElement, useHardenSanitizers, useI18n, useKatex, useMathRenderer, useMediumZoom, useMermaid, useShiki, useTailwindV3Theme, useZoom };
|