vue-stream-markdown 0.2.1 → 0.2.3
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 +11 -0
- package/dist/{blockquote-Bv0immvx.js → blockquote-Crr-D7fY.js} +6 -2
- package/dist/break-DoDPjOA0.js +77 -0
- package/dist/{button-CRnH8Rzt.js → button-DVWlhfQ9.js} +2 -2
- package/dist/button-Dw4uJRaD.js +6 -0
- package/dist/{code-BcAa_-2j.js → code-Bz8LM16H.js} +14 -10
- package/dist/code-block-Bitp8x1w.js +10 -0
- package/dist/{code-block-mylXl6jG.js → code-block-CmUZxKNr.js} +62 -24
- package/dist/{composables-CL-BX9Ri.js → composables-CzUVrTt_.js} +231 -206
- package/dist/{delete-drdYWAXs.js → delete-DFoiOzHW.js} +6 -2
- package/dist/dropdown-CSRjqK0u.js +6 -0
- package/dist/{emphasis-CdEFGQdu.js → emphasis-DvaBuxeK.js} +6 -2
- package/dist/{error-component-xzXxODeR.js → error-component-BTe-SuY7.js} +15 -7
- package/dist/error-component-DDnC0bqw.js +5 -0
- package/dist/{footnote-definition-BTSXdQZi.js → footnote-definition-ByWh1N3S.js} +9 -5
- package/dist/{footnote-reference-CV_67vK7.js → footnote-reference-BJ4J7BFo.js} +5 -1
- package/dist/{heading-BH7urRHb.js → heading-1fssqGGO.js} +6 -2
- package/dist/html-Be_6ezK6.js +74 -0
- package/dist/{html-D7bGx0Cz.js → html-DfTs9nEm.js} +4 -0
- package/dist/icon-DE3AzDqz.js +4 -0
- package/dist/{icon-MRs2P5TP.js → icon-DcLTFhFW.js} +1 -1
- package/dist/{image-BypX6qku.js → image-DXnmoID_.js} +4 -4
- package/dist/image-Dl-r78_E.js +9 -0
- package/dist/{image-Bo_26KHM.js → image-xPrAKT9D.js} +12 -8
- package/dist/index.css +133 -143
- package/dist/index.d.ts +194 -152
- package/dist/index.js +335 -217
- package/dist/{inline-code-BZNE1ALQ.js → inline-code-B5lfHACE.js} +4 -0
- package/dist/{inline-math-DFUJNhmp.js → inline-math-CPkpjl8t.js} +7 -3
- package/dist/{link-ClKb1qAC.js → link-BACrkxRW.js} +8 -4
- package/dist/{list-BdM_gwie.js → list-Cu8G46hK.js} +6 -2
- package/dist/{list-item-DaRd7Yu3.js → list-item-BMgDS1tS.js} +6 -2
- package/dist/{math-CLweuHzM.js → math-XsZX0VMw.js} +7 -3
- package/dist/{mermaid-CyLU2UYz.js → mermaid-CQdSlhqn.js} +37 -13
- package/dist/{modal-vHG2jmSe.js → modal-C1riNMrs.js} +8 -5
- package/dist/modal-C7O4jt5-.js +4 -0
- package/dist/{node-list-3yGs9Kcx.js → node-list-7H-lIfUX.js} +10 -2
- package/dist/node-list-DMwAmH_n.js +4 -0
- package/dist/{paragraph-LV8LrqLS.js → paragraph-Cfd37HUK.js} +6 -2
- package/dist/previewers-C7PKsIbc.js +10 -0
- package/dist/segmented-BRTZXoDN.js +7 -0
- package/dist/{segmented-ChmGPy3i.js → segmented-C9j-IIDc.js} +7 -2
- package/dist/{shiki-Dp1kiUyz.js → shiki-BoBbCakv.js} +8 -4
- package/dist/{strong-CcKSE5Jo.js → strong-BzOBAWrG.js} +6 -2
- package/dist/table-D6j6Gl87.js +3 -0
- package/dist/{table-Bk4vJ8-K.js → table-YY5M01Jm.js} +10 -6
- package/dist/{text-DP2IAZrc.js → text-DbHMEN3P.js} +4 -0
- package/dist/{thematic-break-DIO-A8eY.js → thematic-break-CdlhHAEZ.js} +4 -0
- package/dist/theme.css +2 -2
- package/dist/{tooltip-DkCGsj0S.js → tooltip-DarhJuZR.js} +3 -2
- package/dist/tooltip-vDDEbLwf.js +4 -0
- package/dist/vanilla-CzQw2_b4.js +4 -0
- package/dist/{vanilla-D2g3JpWZ.js → vanilla-Z6d1vQmX.js} +1 -1
- package/dist/{yaml-eOuEqAWX.js → yaml-DL5ozHZ_.js} +5 -1
- package/dist/{zoom-container-H5FZmzwY.js → zoom-container-DQMpHHGQ.js} +33 -9
- package/dist/zoom-container-JLbwB4gy.js +7 -0
- package/package.json +3 -2
- package/dist/button-CpZL9Dhf.js +0 -6
- package/dist/code-block-C1Hz5oQb.js +0 -10
- package/dist/dropdown-CS5Df_eY.js +0 -6
- package/dist/error-component-Csr-ujUx.js +0 -5
- package/dist/icon-DcKmEBsy.js +0 -4
- package/dist/image-BRCbBLI5.js +0 -9
- package/dist/modal-JW5JgjbN.js +0 -4
- package/dist/node-list-Cl7nXqfm.js +0 -4
- package/dist/previewers-BUz7EQbB.js +0 -10
- package/dist/segmented-STxjOAhU.js +0 -7
- package/dist/table-20vwclBI.js +0 -3
- package/dist/tooltip-BElCxO8W.js +0 -4
- package/dist/vanilla-79xxpygI.js +0 -4
- package/dist/zoom-container-C5vP44cr.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/{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/{shiki-token-renderer-l2VX-xoX.js → shiki-token-renderer-zn-KUQJD.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/{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
|
|
@@ -89,6 +96,10 @@ If you encounter any problems, please:
|
|
|
89
96
|
|
|
90
97
|
Please provide the shareable link, markdown content, and AST syntax tree when creating an issue. This will help me reproduce and diagnose the problem more effectively.
|
|
91
98
|
|
|
99
|
+
## Contributors
|
|
100
|
+
|
|
101
|
+
[](https://github.com/jinghaihan/vue-stream-markdown/graphs/contributors)
|
|
102
|
+
|
|
92
103
|
## License
|
|
93
104
|
|
|
94
105
|
[MIT](./LICENSE) License © [jinghaihan](https://github.com/jinghaihan)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./composables-
|
|
2
|
-
import { t as node_list_default } from "./node-list-
|
|
1
|
+
import "./composables-CzUVrTt_.js";
|
|
2
|
+
import { t as node_list_default } from "./node-list-7H-lIfUX.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
|
|
@@ -55,6 +55,10 @@ var blockquote_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ def
|
|
|
55
55
|
type: Object,
|
|
56
56
|
required: false
|
|
57
57
|
},
|
|
58
|
+
uiOptions: {
|
|
59
|
+
type: Object,
|
|
60
|
+
required: false
|
|
61
|
+
},
|
|
58
62
|
isDark: {
|
|
59
63
|
type: Boolean,
|
|
60
64
|
required: false
|
|
@@ -0,0 +1,77 @@
|
|
|
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
|
+
uiOptions: {
|
|
57
|
+
type: Object,
|
|
58
|
+
required: false
|
|
59
|
+
},
|
|
60
|
+
isDark: {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
required: false
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
setup(__props) {
|
|
66
|
+
return (_ctx, _cache) => {
|
|
67
|
+
return openBlock(), createElementBlock("br", _hoisted_1);
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region src/components/renderers/break.vue
|
|
74
|
+
var break_default = break_vue_vue_type_script_setup_true_lang_default;
|
|
75
|
+
|
|
76
|
+
//#endregion
|
|
77
|
+
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-DarhJuZR.js";
|
|
2
|
+
import { t as icon_default } from "./icon-DcLTFhFW.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-C7PKsIbc.js";
|
|
2
|
+
import { r as useShiki } from "./composables-CzUVrTt_.js";
|
|
3
|
+
import "./tooltip-DarhJuZR.js";
|
|
4
|
+
import "./button-DVWlhfQ9.js";
|
|
5
|
+
import "./icon-DcLTFhFW.js";
|
|
6
|
+
import "./modal-C1riNMrs.js";
|
|
7
|
+
import { t as code_block_default } from "./code-block-CmUZxKNr.js";
|
|
8
|
+
import "./segmented-C9j-IIDc.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
|
|
@@ -60,6 +60,10 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
60
60
|
type: Object,
|
|
61
61
|
required: false
|
|
62
62
|
},
|
|
63
|
+
uiOptions: {
|
|
64
|
+
type: Object,
|
|
65
|
+
required: false
|
|
66
|
+
},
|
|
63
67
|
isDark: {
|
|
64
68
|
type: Boolean,
|
|
65
69
|
required: false
|
|
@@ -75,8 +79,8 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
75
79
|
const languageClass = computed(() => `language-${props.node.lang}`);
|
|
76
80
|
const { installed: hasShiki } = useShiki();
|
|
77
81
|
const components = {
|
|
78
|
-
vanilla: defineAsyncComponent(() => import("./vanilla-
|
|
79
|
-
shiki: defineAsyncComponent(() => import("./shiki-
|
|
82
|
+
vanilla: defineAsyncComponent(() => import("./vanilla-CzQw2_b4.js")),
|
|
83
|
+
shiki: defineAsyncComponent(() => import("./shiki-BoBbCakv.js"))
|
|
80
84
|
};
|
|
81
85
|
const component = computed(() => {
|
|
82
86
|
if (hasShiki.value) return components.shiki;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import "./previewers-C7PKsIbc.js";
|
|
2
|
+
import "./composables-CzUVrTt_.js";
|
|
3
|
+
import "./tooltip-DarhJuZR.js";
|
|
4
|
+
import "./button-DVWlhfQ9.js";
|
|
5
|
+
import "./icon-DcLTFhFW.js";
|
|
6
|
+
import "./modal-C1riNMrs.js";
|
|
7
|
+
import { t as code_block_default } from "./code-block-CmUZxKNr.js";
|
|
8
|
+
import "./segmented-C9j-IIDc.js";
|
|
9
|
+
|
|
10
|
+
export { code_block_default as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as CODE_PREVIEWERS } from "./previewers-
|
|
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-
|
|
3
|
-
import { t as button_default } from "./button-
|
|
4
|
-
import { t as modal_default } from "./modal-
|
|
5
|
-
import { t as segmented_default } from "./segmented-
|
|
6
|
-
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineAsyncComponent, defineComponent,
|
|
1
|
+
import { t as CODE_PREVIEWERS } from "./previewers-C7PKsIbc.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-CzUVrTt_.js";
|
|
3
|
+
import { t as button_default } from "./button-DVWlhfQ9.js";
|
|
4
|
+
import { t as modal_default } from "./modal-C1riNMrs.js";
|
|
5
|
+
import { t as segmented_default } from "./segmented-C9j-IIDc.js";
|
|
6
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineAsyncComponent, defineComponent, mergeProps, normalizeClass, 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
|
|
|
9
9
|
//#region src/components/code-block/actions.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -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",
|
|
@@ -177,6 +179,10 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
177
179
|
type: Object,
|
|
178
180
|
required: false
|
|
179
181
|
},
|
|
182
|
+
uiOptions: {
|
|
183
|
+
type: Object,
|
|
184
|
+
required: false
|
|
185
|
+
},
|
|
180
186
|
isDark: {
|
|
181
187
|
type: Boolean,
|
|
182
188
|
required: false
|
|
@@ -184,11 +190,11 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
184
190
|
},
|
|
185
191
|
setup(__props) {
|
|
186
192
|
const props = __props;
|
|
187
|
-
const CodeNode = defineAsyncComponent(() => import("./code-
|
|
193
|
+
const CodeNode = defineAsyncComponent(() => import("./code-Bz8LM16H.js"));
|
|
188
194
|
const { controls, previewers, codeOptions } = toRefs(props);
|
|
189
195
|
const [DefineTemplate, ReuseTemplate] = createReusableTemplate();
|
|
190
196
|
const { t } = useI18n();
|
|
191
|
-
const { isControlEnabled, resolveControls } = useControls({ controls });
|
|
197
|
+
const { isControlEnabled, getControlValue, resolveControls } = useControls({ controls });
|
|
192
198
|
const { installed: hasMermaid } = useMermaid();
|
|
193
199
|
const { onCopied } = useContext();
|
|
194
200
|
const { copy, copied } = useClipboard({ legacy: true });
|
|
@@ -217,8 +223,25 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
217
223
|
if (typeof custom === "object") return custom;
|
|
218
224
|
return LANGUAGE_ICONS[language.value] || LANGUAGE_ICONS.text;
|
|
219
225
|
});
|
|
226
|
+
const progressiveRender = computed(() => {
|
|
227
|
+
var _previewers$value;
|
|
228
|
+
if (typeof previewers.value === "boolean") {
|
|
229
|
+
if (language.value === "mermaid") return true;
|
|
230
|
+
return false;
|
|
231
|
+
}
|
|
232
|
+
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];
|
|
233
|
+
if (typeof data === "boolean") return data;
|
|
234
|
+
if (language.value === "mermaid") return true;
|
|
235
|
+
return false;
|
|
236
|
+
});
|
|
237
|
+
const previewPlacement = computed(() => {
|
|
238
|
+
var _previewers$value2, _previewers$value3;
|
|
239
|
+
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";
|
|
240
|
+
return previewers.value.placement;
|
|
241
|
+
});
|
|
220
242
|
const previewable = computed(() => {
|
|
221
243
|
if (previewers.value === false) return false;
|
|
244
|
+
if (!progressiveRender.value && props.node.loading) return false;
|
|
222
245
|
const html = language.value === "html" && !props.node.loading;
|
|
223
246
|
const mermaid = language.value === "mermaid" && hasMermaid.value;
|
|
224
247
|
if (previewers.value === true) {
|
|
@@ -227,23 +250,26 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
227
250
|
return false;
|
|
228
251
|
}
|
|
229
252
|
if (typeof previewers.value === "object") {
|
|
230
|
-
|
|
253
|
+
var _previewers$value$com, _previewers$value$com2;
|
|
254
|
+
if (((_previewers$value$com = previewers.value.components) === null || _previewers$value$com === void 0 ? void 0 : _previewers$value$com[language.value]) === false) return false;
|
|
231
255
|
if (language.value === "html" && html) return true;
|
|
232
256
|
if (language.value === "mermaid" && mermaid) return true;
|
|
233
|
-
const component = previewers.value[language.value];
|
|
234
|
-
if (typeof component === "object" && !props.node.loading) return !!component;
|
|
257
|
+
const component = (_previewers$value$com2 = previewers.value.components) === null || _previewers$value$com2 === void 0 ? void 0 : _previewers$value$com2[language.value];
|
|
258
|
+
if (typeof component === "object" && (progressiveRender.value || !props.node.loading)) return !!component;
|
|
235
259
|
return false;
|
|
236
260
|
}
|
|
237
261
|
return false;
|
|
238
262
|
});
|
|
239
263
|
const PreviewComponent = computed(() => {
|
|
264
|
+
var _previewers$value$com3;
|
|
240
265
|
const previewer = CODE_PREVIEWERS[language.value];
|
|
241
266
|
if (!previewers.value || typeof previewers.value === "boolean") return previewer;
|
|
242
|
-
const data = previewers.value[language.value];
|
|
267
|
+
const data = (_previewers$value$com3 = previewers.value.components) === null || _previewers$value$com3 === void 0 ? void 0 : _previewers$value$com3[language.value];
|
|
243
268
|
if (data === false) return previewer;
|
|
244
269
|
if (data && typeof data !== "boolean") return data;
|
|
245
270
|
return previewer;
|
|
246
271
|
});
|
|
272
|
+
const inlineInteractive = computed(() => getControlValue("mermaid.inlineInteractive") ?? true);
|
|
247
273
|
function normalizeHeight(height) {
|
|
248
274
|
return typeof height === "number" ? `${height}px` : height;
|
|
249
275
|
}
|
|
@@ -326,7 +352,7 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
326
352
|
}, { immediate: true });
|
|
327
353
|
return (_ctx, _cache) => {
|
|
328
354
|
return openBlock(), createElementBlock(Fragment, null, [createVNode(unref(DefineTemplate), null, {
|
|
329
|
-
default: withCtx(() => [showLanguageTitle.value ? (openBlock(), createBlock(language_title_default, {
|
|
355
|
+
default: withCtx(({ showPreview }) => [showLanguageTitle.value ? (openBlock(), createBlock(language_title_default, {
|
|
330
356
|
key: 0,
|
|
331
357
|
icon: icon.value,
|
|
332
358
|
language: language.value,
|
|
@@ -337,7 +363,7 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
337
363
|
"language",
|
|
338
364
|
"show-icon",
|
|
339
365
|
"show-name"
|
|
340
|
-
])) : previewable.value ? (openBlock(), createBlock(preview_segmented_default, {
|
|
366
|
+
])) : previewable.value && showPreview ? (openBlock(), createBlock(preview_segmented_default, {
|
|
341
367
|
key: 1,
|
|
342
368
|
mode: mode.value,
|
|
343
369
|
"onUpdate:mode": _cache[0] || (_cache[0] = ($event) => mode.value = $event),
|
|
@@ -354,38 +380,50 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
354
380
|
})
|
|
355
381
|
}, [
|
|
356
382
|
createElementVNode("header", _hoisted_3, [
|
|
357
|
-
renderSlot(_ctx.$slots, "title", {}, () => [createVNode(unref(ReuseTemplate))]),
|
|
358
|
-
renderSlot(_ctx.$slots, "header-center", {}, () => [previewable.value &&
|
|
383
|
+
renderSlot(_ctx.$slots, "title", {}, () => [createVNode(unref(ReuseTemplate), { "show-preview": previewPlacement.value === "left" }, null, 8, ["show-preview"])]),
|
|
384
|
+
renderSlot(_ctx.$slots, "header-center", {}, () => [previewable.value && previewPlacement.value === "center" ? (openBlock(), createBlock(preview_segmented_default, {
|
|
359
385
|
key: 0,
|
|
360
386
|
mode: mode.value,
|
|
361
387
|
"onUpdate:mode": _cache[2] || (_cache[2] = ($event) => mode.value = $event),
|
|
362
388
|
collapsed: collapsed.value,
|
|
363
389
|
"onUpdate:collapsed": _cache[3] || (_cache[3] = ($event) => collapsed.value = $event)
|
|
364
390
|
}, null, 8, ["mode", "collapsed"])) : (openBlock(), createElementBlock("div", _hoisted_4))]),
|
|
365
|
-
renderSlot(_ctx.$slots, "actions", {}, () => [
|
|
391
|
+
renderSlot(_ctx.$slots, "actions", {}, () => [createElementVNode("div", _hoisted_5, [previewable.value && previewPlacement.value === "right" ? (openBlock(), createBlock(preview_segmented_default, {
|
|
392
|
+
key: 0,
|
|
393
|
+
mode: mode.value,
|
|
394
|
+
"onUpdate:mode": _cache[4] || (_cache[4] = ($event) => mode.value = $event),
|
|
395
|
+
collapsed: collapsed.value,
|
|
396
|
+
"onUpdate:collapsed": _cache[5] || (_cache[5] = ($event) => collapsed.value = $event)
|
|
397
|
+
}, null, 8, ["mode", "collapsed"])) : createCommentVNode("v-if", true), createVNode(actions_default, { actions: headerControls.value }, null, 8, ["actions"])])])
|
|
366
398
|
]),
|
|
367
399
|
withDirectives(createElementVNode("main", {
|
|
368
400
|
"data-stream-markdown": "code-block-content",
|
|
369
401
|
style: normalizeStyle({ maxHeight: maxHeight.value })
|
|
370
|
-
}, [previewable.value ? withDirectives((openBlock(), createBlock(resolveDynamicComponent(PreviewComponent.value),
|
|
402
|
+
}, [previewable.value ? withDirectives((openBlock(), createBlock(resolveDynamicComponent(PreviewComponent.value), mergeProps({ key: 0 }, props, { interactive: inlineInteractive.value }), null, 16, ["interactive"])), [[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
403
|
createVNode(modal_default, {
|
|
372
404
|
open: fullscreen.value,
|
|
373
|
-
"onUpdate:open": _cache[
|
|
405
|
+
"onUpdate:open": _cache[10] || (_cache[10] = ($event) => fullscreen.value = $event),
|
|
374
406
|
"header-style": {
|
|
375
407
|
backgroundColor: "color-mix(in oklab, var(--muted) 80%, transparent)",
|
|
376
408
|
color: "var(--muted-foreground)",
|
|
377
409
|
borderBottom: "1px solid var(--border)"
|
|
378
410
|
}
|
|
379
411
|
}, {
|
|
380
|
-
title: withCtx(() => [createVNode(unref(ReuseTemplate))]),
|
|
381
|
-
"header-center": withCtx(() => [previewable.value &&
|
|
412
|
+
title: withCtx(() => [createVNode(unref(ReuseTemplate), { "show-preview": previewPlacement.value === "left" }, null, 8, ["show-preview"])]),
|
|
413
|
+
"header-center": withCtx(() => [previewable.value && previewPlacement.value === "center" ? (openBlock(), createBlock(preview_segmented_default, {
|
|
382
414
|
key: 0,
|
|
383
415
|
mode: mode.value,
|
|
384
|
-
"onUpdate:mode": _cache[
|
|
416
|
+
"onUpdate:mode": _cache[6] || (_cache[6] = ($event) => mode.value = $event),
|
|
385
417
|
collapsed: collapsed.value,
|
|
386
|
-
"onUpdate:collapsed": _cache[
|
|
418
|
+
"onUpdate:collapsed": _cache[7] || (_cache[7] = ($event) => collapsed.value = $event)
|
|
387
419
|
}, null, 8, ["mode", "collapsed"])) : createCommentVNode("v-if", true)]),
|
|
388
|
-
actions: withCtx(() => [
|
|
420
|
+
actions: withCtx(() => [createElementVNode("div", _hoisted_6, [previewable.value && previewPlacement.value === "right" ? (openBlock(), createBlock(preview_segmented_default, {
|
|
421
|
+
key: 0,
|
|
422
|
+
mode: mode.value,
|
|
423
|
+
"onUpdate:mode": _cache[8] || (_cache[8] = ($event) => mode.value = $event),
|
|
424
|
+
collapsed: collapsed.value,
|
|
425
|
+
"onUpdate:collapsed": _cache[9] || (_cache[9] = ($event) => collapsed.value = $event)
|
|
426
|
+
}, null, 8, ["mode", "collapsed"])) : createCommentVNode("v-if", true), createVNode(actions_default, { actions: modalControls.value }, null, 8, ["actions"])])]),
|
|
389
427
|
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
428
|
_: 1
|
|
391
429
|
}, 8, ["open"])
|