vue-stream-markdown 0.2.0 → 0.2.2
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 +7 -0
- package/dist/{blockquote-C68fU4lp.js → blockquote-CVFraiyL.js} +2 -2
- package/dist/break-CzrM3nW0.js +73 -0
- package/dist/button-BFS-gHGF.js +6 -0
- package/dist/{button-BDO3n0n_.js → button-CWSGNZmd.js} +2 -2
- package/dist/{code-2Dd0EGfm.js → code-DwwmPoup.js} +10 -10
- package/dist/code-block-CTM9VEwA.js +10 -0
- package/dist/{code-block-hQLDeAmP.js → code-block-XfHjZodV.js} +54 -21
- package/dist/{composables-DuQ72m6O.js → composables-BMXMKLLj.js} +293 -219
- package/dist/{delete-CB-OS2WZ.js → delete-BRwEUU72.js} +2 -2
- package/dist/dropdown-BQ3uynLf.js +6 -0
- package/dist/{emphasis-BmUoyBRK.js → emphasis-DblyP-Vp.js} +2 -2
- package/dist/error-component-B_Vacrqa.js +5 -0
- package/dist/{error-component-CtZr0_st.js → error-component-CckClFee.js} +15 -7
- package/dist/{footnote-definition-55TjXXwa.js → footnote-definition-BvZNKSLa.js} +5 -5
- package/dist/{footnote-reference-lk2rvC4Q.js → footnote-reference-DvAxMjRZ.js} +1 -1
- package/dist/{heading-BlOK3uk2.js → heading-g87txbB0.js} +2 -2
- package/dist/html-BG83dEZJ.js +70 -0
- package/dist/icon-BX3KKloR.js +4 -0
- package/dist/{icon-PEivHbuv.js → icon-CpKYt1dR.js} +1 -1
- package/dist/image-BtkXhzG1.js +9 -0
- package/dist/{image-Bqn98dDB.js → image-CR28eDok.js} +8 -8
- package/dist/{image-VMGQj_VU.js → image-Dwe5A7RP.js} +4 -4
- package/dist/{index.css/index.css → index.css} +17 -0
- package/dist/index.d.ts +521 -82
- package/dist/index.js +51 -38
- package/dist/{inline-math--lfq9WCW.js → inline-math-BHDNxQ5R.js} +3 -3
- package/dist/{link-DAOjAX6n.js → link-BiA46FMM.js} +4 -4
- package/dist/{list-EOEqkWEi.js → list-D7QyoGUy.js} +2 -2
- package/dist/{list-item-ZG4eadLp.js → list-item-Cv8l3Ufd.js} +2 -2
- package/dist/{math-3zyrsc0O.js → math-BzuYH4PG.js} +3 -3
- package/dist/{mermaid-VkvXdOuQ.js → mermaid-BoiSJ4fF.js} +21 -11
- package/dist/modal-CFOdkYNj.js +4 -0
- package/dist/{modal-DrPdD2g1.js → modal-DHGxvCt5.js} +1 -1
- package/dist/node-list-BYDvt6bq.js +4 -0
- package/dist/{node-list-D7eKaZGS.js → node-list-D6zJX92N.js} +1 -1
- package/dist/{paragraph-DEyWEFYY.js → paragraph-YTqe84Bm.js} +2 -2
- package/dist/{previewers-DYnyVv4Y.js → previewers-Cpx1Wqu8.js} +1 -1
- package/dist/segmented-CaVb5_Rp.js +7 -0
- package/dist/{segmented-CeLXMLZa.js → segmented-DDQZGL7l.js} +7 -2
- package/dist/{shiki-Dgoch7Q6.js → shiki-DDfRFzy0.js} +35 -10
- package/dist/{shiki-token-renderer-BjxmGfXH.js → shiki-token-renderer-zn-KUQJD.js} +4 -2
- package/dist/{strong-CFjQLk1h.js → strong-nPwCJEKq.js} +2 -2
- package/dist/table-D6j6Gl87.js +3 -0
- package/dist/{table-DI25RphX.js → table-Dtpd-MnT.js} +6 -6
- package/dist/tooltip-BIvCaFUj.js +4 -0
- package/dist/{tooltip-CnO7OPL1.js → tooltip-C4RiUZwy.js} +2 -2
- package/dist/vanilla-DfHiHWnr.js +4 -0
- package/dist/{vanilla-YFxsSfhA.js → vanilla-NR7MOE5P.js} +1 -1
- package/dist/{yaml-eOuEqAWX.js → yaml-DP0yfJyS.js} +1 -1
- package/dist/{zoom-container-CrKx_BbS.js → zoom-container-CqZQ4X6w.js} +2 -2
- package/dist/zoom-container-DtkZ07v1.js +7 -0
- package/package.json +3 -3
- package/dist/button-CdUyT8T_.js +0 -6
- package/dist/code-block-Co2UoPPS.js +0 -10
- package/dist/dropdown-BB3nyts8.js +0 -6
- package/dist/error-component-biOT0E-h.js +0 -5
- package/dist/icon-mUoYnA6R.js +0 -4
- package/dist/image-B6Pw2YBI.js +0 -9
- package/dist/modal-BKzT1TQI.js +0 -4
- package/dist/node-list-DtNGUnnI.js +0 -4
- package/dist/segmented-6Ch-Ees3.js +0 -7
- package/dist/table-20vwclBI.js +0 -3
- package/dist/tooltip-CAyfm3_l.js +0 -4
- package/dist/vanilla-BZ1fQWZQ.js +0 -4
- package/dist/zoom-container-j4kY9qX_.js +0 -7
- /package/dist/{angular-CJL7ngrz.js → angular-BhTq4eiQ.js} +0 -0
- /package/dist/{angular-component-COlDvuNE.js → angular-component-Ba6hb3Ou.js} +0 -0
- /package/dist/{apache-CVvmKdUn.js → apache-D-wFNTKM.js} +0 -0
- /package/dist/{arrow-left-Dqeb1_Um.js → arrow-left-Fc4I-KPU.js} +0 -0
- /package/dist/{asciidoc-DOmevTVz.js → asciidoc-BhsFgAwp.js} +0 -0
- /package/dist/{assembly-Bj0yQVcL.js → assembly-DujbfxwO.js} +0 -0
- /package/dist/{astro-DUti0QFn.js → astro-By5aMeAI.js} +0 -0
- /package/dist/{bash-BfyNXzLO.js → bash-CxLhFc8T.js} +0 -0
- /package/dist/{batch-Dp6N3cFQ.js → batch-D2KCChyX.js} +0 -0
- /package/dist/{bicep-CEkCHedl.js → bicep-BpMR7zbS.js} +0 -0
- /package/dist/{c-CTmG9vr2.js → c-BL0h9qSZ.js} +0 -0
- /package/dist/{check-C6XCJVPi.js → check-DUf_EYGI.js} +0 -0
- /package/dist/{chevron-down-aK8OlmM2.js → chevron-down-Bd8OWcQz.js} +0 -0
- /package/dist/{circle-alert-C5r2kfnc.js → circle-alert-C3xlkKpn.js} +0 -0
- /package/dist/{clojure-CHjliXb8.js → clojure-CIlREuXX.js} +0 -0
- /package/dist/{cmake-BsKz8Gt4.js → cmake-C1NQwzHz.js} +0 -0
- /package/dist/{cobol-BvWYwPFU.js → cobol-BSROkBc2.js} +0 -0
- /package/dist/{code-Bwlpb4mV.js → code-jkFGYUqR.js} +0 -0
- /package/dist/{codeowners-CfTM6yvs.js → codeowners-ByOcyZxj.js} +0 -0
- /package/dist/{coffeescript-BDiFe_B2.js → coffeescript-LQTFO7bN.js} +0 -0
- /package/dist/{copy-VpvA-5VS.js → copy-CLBkFmXf.js} +0 -0
- /package/dist/{corner-down-left-B77X84F8.js → corner-down-left-CMgnqWC_.js} +0 -0
- /package/dist/{cpp-BfV_KWzp.js → cpp-BFHQMV1Y.js} +0 -0
- /package/dist/{crystal-BXT0x2i3.js → crystal-DCVN-7Od.js} +0 -0
- /package/dist/{csharp-C6rkxA6x.js → csharp-B0k7ij_8.js} +0 -0
- /package/dist/{css-Drxb2cuf.js → css-CC5BGj0-.js} +0 -0
- /package/dist/{csv-CHKRaQ9l.js → csv-B5a7HayX.js} +0 -0
- /package/dist/{cue-DksiF2mE.js → cue-CGNrDM1A.js} +0 -0
- /package/dist/{d-C8JgmiVc.js → d-CMJdAMFb.js} +0 -0
- /package/dist/{dart-BX3GppmW.js → dart-BBqW-Fvj.js} +0 -0
- /package/dist/{database-Lmva5T5u.js → database-LuWYzgPI.js} +0 -0
- /package/dist/{diff-C61xHcnV.js → diff-UhwhR0nf.js} +0 -0
- /package/dist/{docker-Dws0Euuu.js → docker-CaBsFwYx.js} +0 -0
- /package/dist/{download-BB76SD0m.js → download-DtpBCWCq.js} +0 -0
- /package/dist/{elixir-CtaCeLkf.js → elixir-NvxbJYKg.js} +0 -0
- /package/dist/{elm-CFvSvo-7.js → elm-BNn2zGko.js} +0 -0
- /package/dist/{en-US-Cw-sFSiZ.js → en-US-BE5eeEXk.js} +0 -0
- /package/dist/{env-BwMmmmE5.js → env-CKkm6DtJ.js} +0 -0
- /package/dist/{erlang-DJRbvPSq.js → erlang-DnQ1MXEC.js} +0 -0
- /package/dist/{eye-VjweBQoW.js → eye-g-R6YkP9.js} +0 -0
- /package/dist/{flip-horizontal-D4IxaKDu.js → flip-horizontal-14eeKks-.js} +0 -0
- /package/dist/{fortran-D3Vf5GTV.js → fortran-D7C8ntBV.js} +0 -0
- /package/dist/{fsharp-C2iQH5b1.js → fsharp-B2meisDr.js} +0 -0
- /package/dist/{git-DN4z97-P.js → git-Dibise41.js} +0 -0
- /package/dist/{gleam-PhX3VC_5.js → gleam-DghqX0MW.js} +0 -0
- /package/dist/{go-xPznl0oK.js → go-hIgDRVGB.js} +0 -0
- /package/dist/{graphql-sVzb1_rA.js → graphql-Cwvddao6.js} +0 -0
- /package/dist/{groovy-Bvkrc3eE.js → groovy-Z_peiWRr.js} +0 -0
- /package/dist/{haml-Y_qa35Lk.js → haml-CK7X58Ac.js} +0 -0
- /package/dist/{handlebars-Bo6cxn4k.js → handlebars-CzXueKIL.js} +0 -0
- /package/dist/{haskell-D8t1pxAr.js → haskell-F8Hxt60K.js} +0 -0
- /package/dist/{haxe-C-sdXVB9.js → haxe-rnsd_VXm.js} +0 -0
- /package/dist/{html-I3JKB_2G.js → html-B-vufMHC.js} +0 -0
- /package/dist/{http-Dj2NVTPO.js → http-D-fTarEG.js} +0 -0
- /package/dist/{image-DzKVFSaY.js → image-BnP_94aa.js} +0 -0
- /package/dist/{inline-code-BZNE1ALQ.js → inline-code-E5uGvmnx.js} +0 -0
- /package/dist/{java-BulcCUaV.js → java-BhCbKSsp.js} +0 -0
- /package/dist/{javascript-DQlby440.js → javascript-CgYlNrc3.js} +0 -0
- /package/dist/{jinja-HRQZM5oZ.js → jinja-BwhD62Ck.js} +0 -0
- /package/dist/{json-wUPUX2x-.js → json-BITBW2a3.js} +0 -0
- /package/dist/{julia-DjHYSWzj.js → julia-K2FP98rH.js} +0 -0
- /package/dist/{kdl-CGLuct22.js → kdl-wzDw_Xgt.js} +0 -0
- /package/dist/{kotlin-CnR9eg7m.js → kotlin-UdhiRb2s.js} +0 -0
- /package/dist/{latex-CesDKd8G.js → latex-Cg4biTsQ.js} +0 -0
- /package/dist/{less-215r2nUv.js → less-CvaKAB1v.js} +0 -0
- /package/dist/{link-4JB1WqYS.js → link-C8MvJEtb.js} +0 -0
- /package/dist/{liquid-FFTnvZwx.js → liquid-DnaYJvE6.js} +0 -0
- /package/dist/{lisp-BNWIo3S3.js → lisp-Dxh5WGkj.js} +0 -0
- /package/dist/{log-C3BhnPjM.js → log-CptO9Lr8.js} +0 -0
- /package/dist/{lua-jBHQD7Fh.js → lua-BYE-WkAz.js} +0 -0
- /package/dist/{luau-CJKAqC3L.js → luau-9_yNlfJT.js} +0 -0
- /package/dist/{makefile-DZmoFYpF.js → makefile-B7idP48b.js} +0 -0
- /package/dist/{markdown-BEABBw2C.js → markdown-CF1aOY6A.js} +0 -0
- /package/dist/{marko-DE7d51Q2.js → marko-B96CKJZY.js} +0 -0
- /package/dist/{matlab-n99nEoGl.js → matlab-LSvZWs6_.js} +0 -0
- /package/dist/{maximize-VRncBaHe.js → maximize-BYf7n_fw.js} +0 -0
- /package/dist/{mermaid-Dv9_1JlU.js → mermaid-CjPc_PTq.js} +0 -0
- /package/dist/{minimize-k8aU78V4.js → minimize-DUcEsZ0x.js} +0 -0
- /package/dist/{nextflow-DjdDVx1j.js → nextflow-Di2JOuIQ.js} +0 -0
- /package/dist/{nginx-DH4jOOdC.js → nginx-DwP-rcfw.js} +0 -0
- /package/dist/{nim-Cb0hPGv5.js → nim-B8CTKDeR.js} +0 -0
- /package/dist/{nix-Bf4Vwv5v.js → nix-DzZgDL2a.js} +0 -0
- /package/dist/{ocaml-BwJ1z9S7.js → ocaml-Bs_vWDxp.js} +0 -0
- /package/dist/{perl-P6bAYvN9.js → perl-BvEAb2FB.js} +0 -0
- /package/dist/{php-BGTGPBW1.js → php-DJ6oc5J7.js} +0 -0
- /package/dist/{postcss-D8a2Jx1D.js → postcss-Buy79gTC.js} +0 -0
- /package/dist/{powershell-DNOnus4K.js → powershell-xWtLU9gf.js} +0 -0
- /package/dist/{prisma-DquVk_GR.js → prisma-_Jw8lmC9.js} +0 -0
- /package/dist/{prolog-BxJJGnOg.js → prolog-CXJiBRKn.js} +0 -0
- /package/dist/{properties-DjauSeDE.js → properties-bV3eZsxi.js} +0 -0
- /package/dist/{proto-3aU1SxxY.js → proto-CdPPb7qQ.js} +0 -0
- /package/dist/{pug-OiYFRnMd.js → pug-DuDhqAK0.js} +0 -0
- /package/dist/{puppet-8Sq4QIbE.js → puppet-BznIc6wm.js} +0 -0
- /package/dist/{python-CBYVyhMm.js → python-1saA982A.js} +0 -0
- /package/dist/{r-DfzMNaiK.js → r-C94u3fL1.js} +0 -0
- /package/dist/{racket-EkEmTJtD.js → racket-CJXkPHdl.js} +0 -0
- /package/dist/{razor-BSd-q379.js → razor-NEi8COml.js} +0 -0
- /package/dist/{rotate-ccw-square-Dy0doneR.js → rotate-ccw-square-BJ_A0rAa.js} +0 -0
- /package/dist/{ruby-CNn-W_DF.js → ruby-CgygvN8C.js} +0 -0
- /package/dist/{rust-BW9y4Ksf.js → rust-DQacYSAC.js} +0 -0
- /package/dist/{sass-Cyleqehh.js → sass-HD_VNbVH.js} +0 -0
- /package/dist/{scala-2YqaI_aG.js → scala-DFCCsRj5.js} +0 -0
- /package/dist/{scheme-CWx6sQlk.js → scheme-CMuWDKun.js} +0 -0
- /package/dist/{shader-CLzSKNOz.js → shader-CJxZVwVX.js} +0 -0
- /package/dist/{solidity-CgjJUETv.js → solidity-CZfwNrv_.js} +0 -0
- /package/dist/{stata-CI3W9UFN.js → stata-DLyUE6pK.js} +0 -0
- /package/dist/{svelte-D-OV6frL.js → svelte-D3v3JUId.js} +0 -0
- /package/dist/{swift-CcBwS4X5.js → swift-BuLBBeAo.js} +0 -0
- /package/dist/{table-BMlD4JhL.js → table-tZ8TA3cu.js} +0 -0
- /package/dist/{terraform-BwM_GPTy.js → terraform-BpdftQxe.js} +0 -0
- /package/dist/{text-hIzRUiKs.js → text-CVjFFVPk.js} +0 -0
- /package/dist/{text-DP2IAZrc.js → text-CfRWiRE0.js} +0 -0
- /package/dist/{thematic-break-DIO-A8eY.js → thematic-break-DgOD2KmY.js} +0 -0
- /package/dist/{theme.css/theme.css → theme.css} +0 -0
- /package/dist/{toml-CXJ7B-C1.js → toml-DwuHYrJF.js} +0 -0
- /package/dist/{twig-CXQNsdEx.js → twig-C3W2hNMC.js} +0 -0
- /package/dist/{typescript-0uiFYOof.js → typescript-oV84jXPW.js} +0 -0
- /package/dist/{typst-gIi5b52E.js → typst-iMKBhjQc.js} +0 -0
- /package/dist/{v-Ct-HfSu0.js → v-D8a-2CMq.js} +0 -0
- /package/dist/{vala-BZbAZj2w.js → vala-Dnxzb4xr.js} +0 -0
- /package/dist/{verilog-NzFyyNP_.js → verilog-CABQqn01.js} +0 -0
- /package/dist/{vim-CN-tRagW.js → vim-BGlWyvYm.js} +0 -0
- /package/dist/{vue-BmLzKAao.js → vue-D6HdD2dj.js} +0 -0
- /package/dist/{xml-CBzkooc-.js → xml-B9NfR4AN.js} +0 -0
- /package/dist/{yaml-CT7I_lPM.js → yaml-CrFdGZgo.js} +0 -0
- /package/dist/{zh-CN-B9lWRP8O.js → zh-CN-BLQuwJEP.js} +0 -0
- /package/dist/{zig-B7F-QzJD.js → zig-BYI6J86j.js} +0 -0
- /package/dist/{zoomIn-DlPeXZbT.js → zoomIn-B7_XWmXc.js} +0 -0
- /package/dist/{zoomOut-Lvyw8SOW.js → zoomOut-CMmvbGLb.js} +0 -0
package/README.md
CHANGED
|
@@ -37,6 +37,13 @@ pnpm add vue-stream-markdown
|
|
|
37
37
|
|
|
38
38
|
## Usage
|
|
39
39
|
|
|
40
|
+
> [!IMPORTANT]
|
|
41
|
+
> 🚧 **vue-stream-markdown** is currently in active feature development.
|
|
42
|
+
>
|
|
43
|
+
> Breaking changes are avoided as much as possible, but the project maintains a relatively high release frequency.
|
|
44
|
+
>
|
|
45
|
+
> If a version meets your needs, you don't need to always follow the latest version.
|
|
46
|
+
|
|
40
47
|
For detailed usage and API documentation, please refer to the [Documentation](https://docs-vue-stream-markdown.netlify.app/).
|
|
41
48
|
|
|
42
49
|
```vue
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./composables-
|
|
2
|
-
import { t as node_list_default } from "./node-list-
|
|
1
|
+
import "./composables-BMXMKLLj.js";
|
|
2
|
+
import { t as node_list_default } from "./node-list-D6zJX92N.js";
|
|
3
3
|
import { createElementBlock, createVNode, defineComponent, mergeProps, openBlock } from "vue";
|
|
4
4
|
|
|
5
5
|
//#region src/components/renderers/blockquote.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { createElementBlock, defineComponent, openBlock } from "vue";
|
|
2
|
+
|
|
3
|
+
//#region src/components/renderers/break.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
const _hoisted_1 = { "data-stream-markdown": "break" };
|
|
5
|
+
var break_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
6
|
+
__name: "break",
|
|
7
|
+
props: {
|
|
8
|
+
node: {
|
|
9
|
+
type: Object,
|
|
10
|
+
required: true
|
|
11
|
+
},
|
|
12
|
+
markdownParser: {
|
|
13
|
+
type: Object,
|
|
14
|
+
required: true
|
|
15
|
+
},
|
|
16
|
+
nodeRenderers: {
|
|
17
|
+
type: Object,
|
|
18
|
+
required: true
|
|
19
|
+
},
|
|
20
|
+
nodeKey: {
|
|
21
|
+
type: String,
|
|
22
|
+
required: true
|
|
23
|
+
},
|
|
24
|
+
controls: {
|
|
25
|
+
type: [Boolean, Object],
|
|
26
|
+
required: false
|
|
27
|
+
},
|
|
28
|
+
previewers: {
|
|
29
|
+
type: [Boolean, Object],
|
|
30
|
+
required: false
|
|
31
|
+
},
|
|
32
|
+
shikiOptions: {
|
|
33
|
+
type: Object,
|
|
34
|
+
required: false
|
|
35
|
+
},
|
|
36
|
+
mermaidOptions: {
|
|
37
|
+
type: Object,
|
|
38
|
+
required: false
|
|
39
|
+
},
|
|
40
|
+
katexOptions: {
|
|
41
|
+
type: Object,
|
|
42
|
+
required: false
|
|
43
|
+
},
|
|
44
|
+
hardenOptions: {
|
|
45
|
+
type: Object,
|
|
46
|
+
required: false
|
|
47
|
+
},
|
|
48
|
+
codeOptions: {
|
|
49
|
+
type: Object,
|
|
50
|
+
required: false
|
|
51
|
+
},
|
|
52
|
+
imageOptions: {
|
|
53
|
+
type: Object,
|
|
54
|
+
required: false
|
|
55
|
+
},
|
|
56
|
+
isDark: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
required: false
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
setup(__props) {
|
|
62
|
+
return (_ctx, _cache) => {
|
|
63
|
+
return openBlock(), createElementBlock("br", _hoisted_1);
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
//#endregion
|
|
69
|
+
//#region src/components/renderers/break.vue
|
|
70
|
+
var break_default = break_vue_vue_type_script_setup_true_lang_default;
|
|
71
|
+
|
|
72
|
+
//#endregion
|
|
73
|
+
export { break_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as tooltip_default } from "./tooltip-
|
|
2
|
-
import { t as icon_default } from "./icon-
|
|
1
|
+
import { t as tooltip_default } from "./tooltip-C4RiUZwy.js";
|
|
2
|
+
import { t as icon_default } from "./icon-CpKYt1dR.js";
|
|
3
3
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, normalizeClass, normalizeStyle, openBlock, ref, renderList, renderSlot, resolveDynamicComponent, toDisplayString, unref, withCtx } from "vue";
|
|
4
4
|
import { createReusableTemplate } from "@vueuse/core";
|
|
5
5
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "./previewers-
|
|
2
|
-
import { r as useShiki } from "./composables-
|
|
3
|
-
import "./tooltip-
|
|
4
|
-
import "./button-
|
|
5
|
-
import "./icon-
|
|
6
|
-
import "./modal-
|
|
7
|
-
import { t as code_block_default } from "./code-block-
|
|
8
|
-
import "./segmented-
|
|
1
|
+
import "./previewers-Cpx1Wqu8.js";
|
|
2
|
+
import { r as useShiki } from "./composables-BMXMKLLj.js";
|
|
3
|
+
import "./tooltip-C4RiUZwy.js";
|
|
4
|
+
import "./button-CWSGNZmd.js";
|
|
5
|
+
import "./icon-CpKYt1dR.js";
|
|
6
|
+
import "./modal-DHGxvCt5.js";
|
|
7
|
+
import { t as code_block_default } from "./code-block-XfHjZodV.js";
|
|
8
|
+
import "./segmented-DDQZGL7l.js";
|
|
9
9
|
import { computed, createBlock, createCommentVNode, defineAsyncComponent, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, resolveDynamicComponent, withCtx } from "vue";
|
|
10
10
|
|
|
11
11
|
//#region src/components/renderers/code/index.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -75,8 +75,8 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
75
75
|
const languageClass = computed(() => `language-${props.node.lang}`);
|
|
76
76
|
const { installed: hasShiki } = useShiki();
|
|
77
77
|
const components = {
|
|
78
|
-
vanilla: defineAsyncComponent(() => import("./vanilla-
|
|
79
|
-
shiki: defineAsyncComponent(() => import("./shiki-
|
|
78
|
+
vanilla: defineAsyncComponent(() => import("./vanilla-DfHiHWnr.js")),
|
|
79
|
+
shiki: defineAsyncComponent(() => import("./shiki-DDfRFzy0.js"))
|
|
80
80
|
};
|
|
81
81
|
const component = computed(() => {
|
|
82
82
|
if (hasShiki.value) return components.shiki;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import "./previewers-Cpx1Wqu8.js";
|
|
2
|
+
import "./composables-BMXMKLLj.js";
|
|
3
|
+
import "./tooltip-C4RiUZwy.js";
|
|
4
|
+
import "./button-CWSGNZmd.js";
|
|
5
|
+
import "./icon-CpKYt1dR.js";
|
|
6
|
+
import "./modal-DHGxvCt5.js";
|
|
7
|
+
import { t as code_block_default } from "./code-block-XfHjZodV.js";
|
|
8
|
+
import "./segmented-DDQZGL7l.js";
|
|
9
|
+
|
|
10
|
+
export { code_block_default as default };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as CODE_PREVIEWERS } from "./previewers-
|
|
2
|
-
import { G as
|
|
3
|
-
import { t as button_default } from "./button-
|
|
4
|
-
import { t as modal_default } from "./modal-
|
|
5
|
-
import { t as segmented_default } from "./segmented-
|
|
1
|
+
import { t as CODE_PREVIEWERS } from "./previewers-Cpx1Wqu8.js";
|
|
2
|
+
import { G as useControls, K as useContext, V as save, b as useI18n, d as LANGUAGE_ALIAS, f as LANGUAGE_EXTENSIONS, m as useMermaid, p as LANGUAGE_ICONS, q as useCodeOptions } from "./composables-BMXMKLLj.js";
|
|
3
|
+
import { t as button_default } from "./button-CWSGNZmd.js";
|
|
4
|
+
import { t as modal_default } from "./modal-DHGxvCt5.js";
|
|
5
|
+
import { t as segmented_default } from "./segmented-DDQZGL7l.js";
|
|
6
6
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineAsyncComponent, defineComponent, guardReactiveProps, mergeProps, normalizeClass, normalizeProps, normalizeStyle, openBlock, ref, renderList, renderSlot, resolveDynamicComponent, toDisplayString, toRefs, unref, useModel, vShow, watch, withCtx, withDirectives } from "vue";
|
|
7
7
|
import { createReusableTemplate, useClipboard } from "@vueuse/core";
|
|
8
8
|
|
|
@@ -125,6 +125,8 @@ const _hoisted_1 = { key: 2 };
|
|
|
125
125
|
const _hoisted_2 = ["data-collapsed"];
|
|
126
126
|
const _hoisted_3 = { "data-stream-markdown": "code-block-header" };
|
|
127
127
|
const _hoisted_4 = { key: 1 };
|
|
128
|
+
const _hoisted_5 = { "data-stream-markdown": "actions" };
|
|
129
|
+
const _hoisted_6 = { "data-stream-markdown": "actions" };
|
|
128
130
|
var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
129
131
|
inheritAttrs: false,
|
|
130
132
|
__name: "index",
|
|
@@ -184,7 +186,7 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
184
186
|
},
|
|
185
187
|
setup(__props) {
|
|
186
188
|
const props = __props;
|
|
187
|
-
const CodeNode = defineAsyncComponent(() => import("./code-
|
|
189
|
+
const CodeNode = defineAsyncComponent(() => import("./code-DwwmPoup.js"));
|
|
188
190
|
const { controls, previewers, codeOptions } = toRefs(props);
|
|
189
191
|
const [DefineTemplate, ReuseTemplate] = createReusableTemplate();
|
|
190
192
|
const { t } = useI18n();
|
|
@@ -217,8 +219,25 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
217
219
|
if (typeof custom === "object") return custom;
|
|
218
220
|
return LANGUAGE_ICONS[language.value] || LANGUAGE_ICONS.text;
|
|
219
221
|
});
|
|
222
|
+
const progressiveRender = computed(() => {
|
|
223
|
+
var _previewers$value;
|
|
224
|
+
if (typeof previewers.value === "boolean") {
|
|
225
|
+
if (language.value === "mermaid") return true;
|
|
226
|
+
return false;
|
|
227
|
+
}
|
|
228
|
+
const data = (_previewers$value = previewers.value) === null || _previewers$value === void 0 || (_previewers$value = _previewers$value.progressive) === null || _previewers$value === void 0 ? void 0 : _previewers$value[language.value];
|
|
229
|
+
if (typeof data === "boolean") return data;
|
|
230
|
+
if (language.value === "mermaid") return true;
|
|
231
|
+
return false;
|
|
232
|
+
});
|
|
233
|
+
const previewPlacement = computed(() => {
|
|
234
|
+
var _previewers$value2, _previewers$value3;
|
|
235
|
+
if (typeof previewers.value === "boolean" || !((_previewers$value2 = previewers.value) === null || _previewers$value2 === void 0 ? void 0 : _previewers$value2.placement) || ((_previewers$value3 = previewers.value) === null || _previewers$value3 === void 0 ? void 0 : _previewers$value3.placement) === "auto") return showLanguageTitle.value ? "center" : "left";
|
|
236
|
+
return previewers.value.placement;
|
|
237
|
+
});
|
|
220
238
|
const previewable = computed(() => {
|
|
221
239
|
if (previewers.value === false) return false;
|
|
240
|
+
if (!progressiveRender.value && props.node.loading) return false;
|
|
222
241
|
const html = language.value === "html" && !props.node.loading;
|
|
223
242
|
const mermaid = language.value === "mermaid" && hasMermaid.value;
|
|
224
243
|
if (previewers.value === true) {
|
|
@@ -227,19 +246,21 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
227
246
|
return false;
|
|
228
247
|
}
|
|
229
248
|
if (typeof previewers.value === "object") {
|
|
230
|
-
|
|
249
|
+
var _previewers$value$com, _previewers$value$com2;
|
|
250
|
+
if (((_previewers$value$com = previewers.value.components) === null || _previewers$value$com === void 0 ? void 0 : _previewers$value$com[language.value]) === false) return false;
|
|
231
251
|
if (language.value === "html" && html) return true;
|
|
232
252
|
if (language.value === "mermaid" && mermaid) return true;
|
|
233
|
-
const component = previewers.value[language.value];
|
|
234
|
-
if (typeof component === "object" && !props.node.loading) return !!component;
|
|
253
|
+
const component = (_previewers$value$com2 = previewers.value.components) === null || _previewers$value$com2 === void 0 ? void 0 : _previewers$value$com2[language.value];
|
|
254
|
+
if (typeof component === "object" && (progressiveRender.value || !props.node.loading)) return !!component;
|
|
235
255
|
return false;
|
|
236
256
|
}
|
|
237
257
|
return false;
|
|
238
258
|
});
|
|
239
259
|
const PreviewComponent = computed(() => {
|
|
260
|
+
var _previewers$value$com3;
|
|
240
261
|
const previewer = CODE_PREVIEWERS[language.value];
|
|
241
262
|
if (!previewers.value || typeof previewers.value === "boolean") return previewer;
|
|
242
|
-
const data = previewers.value[language.value];
|
|
263
|
+
const data = (_previewers$value$com3 = previewers.value.components) === null || _previewers$value$com3 === void 0 ? void 0 : _previewers$value$com3[language.value];
|
|
243
264
|
if (data === false) return previewer;
|
|
244
265
|
if (data && typeof data !== "boolean") return data;
|
|
245
266
|
return previewer;
|
|
@@ -326,7 +347,7 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
326
347
|
}, { immediate: true });
|
|
327
348
|
return (_ctx, _cache) => {
|
|
328
349
|
return openBlock(), createElementBlock(Fragment, null, [createVNode(unref(DefineTemplate), null, {
|
|
329
|
-
default: withCtx(() => [showLanguageTitle.value ? (openBlock(), createBlock(language_title_default, {
|
|
350
|
+
default: withCtx(({ showPreview }) => [showLanguageTitle.value ? (openBlock(), createBlock(language_title_default, {
|
|
330
351
|
key: 0,
|
|
331
352
|
icon: icon.value,
|
|
332
353
|
language: language.value,
|
|
@@ -337,7 +358,7 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
337
358
|
"language",
|
|
338
359
|
"show-icon",
|
|
339
360
|
"show-name"
|
|
340
|
-
])) : previewable.value ? (openBlock(), createBlock(preview_segmented_default, {
|
|
361
|
+
])) : previewable.value && showPreview ? (openBlock(), createBlock(preview_segmented_default, {
|
|
341
362
|
key: 1,
|
|
342
363
|
mode: mode.value,
|
|
343
364
|
"onUpdate:mode": _cache[0] || (_cache[0] = ($event) => mode.value = $event),
|
|
@@ -354,15 +375,21 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
354
375
|
})
|
|
355
376
|
}, [
|
|
356
377
|
createElementVNode("header", _hoisted_3, [
|
|
357
|
-
renderSlot(_ctx.$slots, "title", {}, () => [createVNode(unref(ReuseTemplate))]),
|
|
358
|
-
renderSlot(_ctx.$slots, "header-center", {}, () => [previewable.value &&
|
|
378
|
+
renderSlot(_ctx.$slots, "title", {}, () => [createVNode(unref(ReuseTemplate), { "show-preview": previewPlacement.value === "left" }, null, 8, ["show-preview"])]),
|
|
379
|
+
renderSlot(_ctx.$slots, "header-center", {}, () => [previewable.value && previewPlacement.value === "center" ? (openBlock(), createBlock(preview_segmented_default, {
|
|
359
380
|
key: 0,
|
|
360
381
|
mode: mode.value,
|
|
361
382
|
"onUpdate:mode": _cache[2] || (_cache[2] = ($event) => mode.value = $event),
|
|
362
383
|
collapsed: collapsed.value,
|
|
363
384
|
"onUpdate:collapsed": _cache[3] || (_cache[3] = ($event) => collapsed.value = $event)
|
|
364
385
|
}, null, 8, ["mode", "collapsed"])) : (openBlock(), createElementBlock("div", _hoisted_4))]),
|
|
365
|
-
renderSlot(_ctx.$slots, "actions", {}, () => [
|
|
386
|
+
renderSlot(_ctx.$slots, "actions", {}, () => [createElementVNode("div", _hoisted_5, [previewable.value && previewPlacement.value === "right" ? (openBlock(), createBlock(preview_segmented_default, {
|
|
387
|
+
key: 0,
|
|
388
|
+
mode: mode.value,
|
|
389
|
+
"onUpdate:mode": _cache[4] || (_cache[4] = ($event) => mode.value = $event),
|
|
390
|
+
collapsed: collapsed.value,
|
|
391
|
+
"onUpdate:collapsed": _cache[5] || (_cache[5] = ($event) => collapsed.value = $event)
|
|
392
|
+
}, null, 8, ["mode", "collapsed"])) : createCommentVNode("v-if", true), createVNode(actions_default, { actions: headerControls.value }, null, 8, ["actions"])])])
|
|
366
393
|
]),
|
|
367
394
|
withDirectives(createElementVNode("main", {
|
|
368
395
|
"data-stream-markdown": "code-block-content",
|
|
@@ -370,22 +397,28 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
370
397
|
}, [previewable.value ? withDirectives((openBlock(), createBlock(resolveDynamicComponent(PreviewComponent.value), normalizeProps(mergeProps({ key: 0 }, props)), null, 16)), [[vShow, mode.value === "preview"]]) : createCommentVNode("v-if", true), withDirectives(createElementVNode("main", null, [renderSlot(_ctx.$slots, "default")], 512), [[vShow, mode.value === "source"]])], 4), [[vShow, !collapsed.value]]),
|
|
371
398
|
createVNode(modal_default, {
|
|
372
399
|
open: fullscreen.value,
|
|
373
|
-
"onUpdate:open": _cache[
|
|
400
|
+
"onUpdate:open": _cache[10] || (_cache[10] = ($event) => fullscreen.value = $event),
|
|
374
401
|
"header-style": {
|
|
375
402
|
backgroundColor: "color-mix(in oklab, var(--muted) 80%, transparent)",
|
|
376
403
|
color: "var(--muted-foreground)",
|
|
377
404
|
borderBottom: "1px solid var(--border)"
|
|
378
405
|
}
|
|
379
406
|
}, {
|
|
380
|
-
title: withCtx(() => [createVNode(unref(ReuseTemplate))]),
|
|
381
|
-
"header-center": withCtx(() => [previewable.value &&
|
|
407
|
+
title: withCtx(() => [createVNode(unref(ReuseTemplate), { "show-preview": previewPlacement.value === "left" }, null, 8, ["show-preview"])]),
|
|
408
|
+
"header-center": withCtx(() => [previewable.value && previewPlacement.value === "center" ? (openBlock(), createBlock(preview_segmented_default, {
|
|
382
409
|
key: 0,
|
|
383
410
|
mode: mode.value,
|
|
384
|
-
"onUpdate:mode": _cache[
|
|
411
|
+
"onUpdate:mode": _cache[6] || (_cache[6] = ($event) => mode.value = $event),
|
|
385
412
|
collapsed: collapsed.value,
|
|
386
|
-
"onUpdate:collapsed": _cache[
|
|
413
|
+
"onUpdate:collapsed": _cache[7] || (_cache[7] = ($event) => collapsed.value = $event)
|
|
387
414
|
}, null, 8, ["mode", "collapsed"])) : createCommentVNode("v-if", true)]),
|
|
388
|
-
actions: withCtx(() => [
|
|
415
|
+
actions: withCtx(() => [createElementVNode("div", _hoisted_6, [previewable.value && previewPlacement.value === "right" ? (openBlock(), createBlock(preview_segmented_default, {
|
|
416
|
+
key: 0,
|
|
417
|
+
mode: mode.value,
|
|
418
|
+
"onUpdate:mode": _cache[8] || (_cache[8] = ($event) => mode.value = $event),
|
|
419
|
+
collapsed: collapsed.value,
|
|
420
|
+
"onUpdate:collapsed": _cache[9] || (_cache[9] = ($event) => collapsed.value = $event)
|
|
421
|
+
}, null, 8, ["mode", "collapsed"])) : createCommentVNode("v-if", true), createVNode(actions_default, { actions: modalControls.value }, null, 8, ["actions"])])]),
|
|
389
422
|
default: withCtx(() => [previewable.value ? withDirectives((openBlock(), createBlock(resolveDynamicComponent(PreviewComponent.value), mergeProps({ key: 0 }, props, { "container-height": "100%" }), null, 16)), [[vShow, mode.value === "preview"]]) : createCommentVNode("v-if", true), withDirectives(createVNode(unref(CodeNode), mergeProps(props, { "show-header": false }), null, 16), [[vShow, mode.value === "source"]])]),
|
|
390
423
|
_: 1
|
|
391
424
|
}, 8, ["open"])
|