vue-stream-markdown 0.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (206) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +96 -0
  3. package/dist/angular-Chs-UKBr.js +29 -0
  4. package/dist/angular-component-Cc_FANXU.js +29 -0
  5. package/dist/apache-COYnc6xR.js +35 -0
  6. package/dist/asciidoc-BabXBDAL.js +24 -0
  7. package/dist/assembly-CDqKhexW.js +35 -0
  8. package/dist/astro-C9kftzFG.js +28 -0
  9. package/dist/bash-Ce4pNIkV.js +27 -0
  10. package/dist/batch-CHQBRjFL.js +23 -0
  11. package/dist/bicep-8jxWtuBF.js +46 -0
  12. package/dist/blockquote-DFANmQEB.css +13 -0
  13. package/dist/blockquote-DdEg2gww.js +83 -0
  14. package/dist/button-BClRCjnc.js +5 -0
  15. package/dist/button-C12sn_G5.css +24 -0
  16. package/dist/button-D8xx1WIP.js +202 -0
  17. package/dist/c-FBUef746.js +25 -0
  18. package/dist/check-C4xOk8um.js +25 -0
  19. package/dist/chevron-down-cnOJ4h1g.js +25 -0
  20. package/dist/circle-alert-CLX-h5rZ.js +28 -0
  21. package/dist/clojure-BulUroSy.js +18 -0
  22. package/dist/cmake-CW3vz1Mo.js +35 -0
  23. package/dist/cobol-CIn3oFju.js +24 -0
  24. package/dist/code-CP6mPwkq.js +106 -0
  25. package/dist/code-D8LSp8rK.js +25 -0
  26. package/dist/code-NAXHb0o2.css +4 -0
  27. package/dist/code-block-C4D_QNTq.js +408 -0
  28. package/dist/code-block-D2zjJAww.css +57 -0
  29. package/dist/code-block-Dzw63Lki.js +9 -0
  30. package/dist/codeowners-CJggXF_b.js +27 -0
  31. package/dist/coffeescript-CBrVvzGY.js +23 -0
  32. package/dist/composables-qhB1h_ed.js +1567 -0
  33. package/dist/copy-Cabve0xf.js +31 -0
  34. package/dist/cpp-BTKeuyd-.js +31 -0
  35. package/dist/crystal-DyIYvZbm.js +24 -0
  36. package/dist/csharp-NqZ1vyF9.js +22 -0
  37. package/dist/css-BpR5Lajb.js +26 -0
  38. package/dist/csv-eCMFnKKK.js +24 -0
  39. package/dist/cue-TY97dGOQ.js +32 -0
  40. package/dist/d-NftUsdTd.js +24 -0
  41. package/dist/dart-DJpwZZbk.js +23 -0
  42. package/dist/database-aZwE71Px.js +24 -0
  43. package/dist/delete-BdWzKJCy.js +83 -0
  44. package/dist/delete-Ci7IJDoT.css +4 -0
  45. package/dist/diff-CYRzypaU.js +35 -0
  46. package/dist/docker-CxHBuukH.js +24 -0
  47. package/dist/download-Bnn7rtYw.js +24 -0
  48. package/dist/dropdown-Ca_PKF_d.js +5 -0
  49. package/dist/elixir-BKSxVc1h.js +24 -0
  50. package/dist/elm-DScuAf3X.js +24 -0
  51. package/dist/emphasis-BseYvUae.css +4 -0
  52. package/dist/emphasis-CTuGt1Ok.js +83 -0
  53. package/dist/en-US-Bfc50l3I.js +27 -0
  54. package/dist/env-CDAKsodl.js +24 -0
  55. package/dist/erlang-D2M1ZL3m.js +23 -0
  56. package/dist/error-component-BIPPxd-M.css +21 -0
  57. package/dist/error-component-CLEJmPmM.js +4 -0
  58. package/dist/error-component-CzarUjhh.js +61 -0
  59. package/dist/eye-CdeX8PhP.js +28 -0
  60. package/dist/fortran-CORyQ0wt.js +24 -0
  61. package/dist/fsharp-BJz_Jgpl.js +24 -0
  62. package/dist/git-DgrlTr1E.js +28 -0
  63. package/dist/gleam-t_xad9Kw.js +29 -0
  64. package/dist/go-Cvlh1xtL.js +24 -0
  65. package/dist/graphql-ApIm0mDD.js +24 -0
  66. package/dist/groovy-CaLnK8PV.js +23 -0
  67. package/dist/haml-MwijEO_6.js +35 -0
  68. package/dist/handlebars-CKdUPI9h.js +24 -0
  69. package/dist/haskell-NPOXEnck.js +24 -0
  70. package/dist/haxe-DyKBMsDE.js +23 -0
  71. package/dist/heading-2vpQQtTH.js +88 -0
  72. package/dist/heading-KxpVX3-u.css +30 -0
  73. package/dist/html-C5_wsY4-.css +5 -0
  74. package/dist/html-CMgES1dE.js +28 -0
  75. package/dist/html-DL0PcUXX.js +102 -0
  76. package/dist/http-B9FFNmUr.js +23 -0
  77. package/dist/image-B77jbMUB.css +46 -0
  78. package/dist/image-CMZAakWu.js +39 -0
  79. package/dist/image-heJSlrNv.js +215 -0
  80. package/dist/index.css +43 -0
  81. package/dist/index.d.ts +762 -0
  82. package/dist/index.js +18674 -0
  83. package/dist/inline-code-CBoqhfz7.js +81 -0
  84. package/dist/inline-code-Eo65bj3F.css +12 -0
  85. package/dist/inline-math-B4XO1wMP.js +110 -0
  86. package/dist/inline-math-DgBjIrPT.css +7 -0
  87. package/dist/java-iU-L9wJz.js +35 -0
  88. package/dist/javascript-DtnWdTFC.js +23 -0
  89. package/dist/jinja-CoWszo_D.js +24 -0
  90. package/dist/json-C80qKCnh.js +24 -0
  91. package/dist/julia-DG2BCBLx.js +35 -0
  92. package/dist/kdl-7twRfIlJ.js +40 -0
  93. package/dist/kotlin-BjrOgP7R.js +18 -0
  94. package/dist/latex-DIQfUvG8.js +24 -0
  95. package/dist/less-BJ1yEAWt.js +24 -0
  96. package/dist/link-BA_j8di3.css +12 -0
  97. package/dist/link-DOtoFtxu.js +107 -0
  98. package/dist/link-DeV4CQOB.js +24 -0
  99. package/dist/liquid-BqKFZ1wQ.js +24 -0
  100. package/dist/lisp-oekhB2ti.js +23 -0
  101. package/dist/list-BCiFKGaz.js +88 -0
  102. package/dist/list-CcVBNIly.css +11 -0
  103. package/dist/list-item-Y6Cphjrp.css +15 -0
  104. package/dist/list-item-p-OLUR_9.js +95 -0
  105. package/dist/log-D1XEqR9q.js +23 -0
  106. package/dist/lua-C5Q97-1D.js +28 -0
  107. package/dist/luau-BT8KwqZ2.js +28 -0
  108. package/dist/makefile-B4a0ciG4.js +28 -0
  109. package/dist/markdown-DvNyKsiJ.js +24 -0
  110. package/dist/marko-BzsIf6bg.js +18 -0
  111. package/dist/math-Byka28HI.js +110 -0
  112. package/dist/math-Cq89zpB6.css +11 -0
  113. package/dist/matlab-cMBkmDhQ.js +28 -0
  114. package/dist/maximize-4PIqBONS.js +25 -0
  115. package/dist/mermaid-8JIH2gkQ.js +24 -0
  116. package/dist/mermaid-C9ZUejzK.css +8 -0
  117. package/dist/mermaid-X0AFRzfF.js +203 -0
  118. package/dist/minimize-BJ8htyDF.js +25 -0
  119. package/dist/modal-CWdgVkH_.css +48 -0
  120. package/dist/modal-CuQR21UD.js +71 -0
  121. package/dist/modal-DcpxxDDX.js +3 -0
  122. package/dist/nextflow-DNmqU1xg.js +24 -0
  123. package/dist/nginx-DDfYF_rj.js +23 -0
  124. package/dist/nim-D9xEmy4k.js +24 -0
  125. package/dist/nix-BV1Deshw.js +18 -0
  126. package/dist/node-list-C9O-A1aZ.css +11 -0
  127. package/dist/node-list-CGr_EVtn.js +199 -0
  128. package/dist/node-list-lgY1wbfQ.js +3 -0
  129. package/dist/ocaml-BkFn4LL3.js +27 -0
  130. package/dist/paragraph-DYjqr_Sa.js +83 -0
  131. package/dist/paragraph-wRNmMYAI.css +6 -0
  132. package/dist/perl-BytUHDE7.js +24 -0
  133. package/dist/php-BImJJtNM.js +24 -0
  134. package/dist/postcss-CrZ9_0sT.js +18 -0
  135. package/dist/powershell-DYSGu7TM.js +23 -0
  136. package/dist/previewers-Drlf7IQF.js +10 -0
  137. package/dist/prisma-BhRvcOFY.js +24 -0
  138. package/dist/prolog-DuaCKek_.js +24 -0
  139. package/dist/properties-BbIJwuP-.js +24 -0
  140. package/dist/proto-CE0aVW11.js +18 -0
  141. package/dist/pug-B1-IC-Tc.js +24 -0
  142. package/dist/puppet-8nYquiMG.js +24 -0
  143. package/dist/python-DhRyfBrD.js +35 -0
  144. package/dist/r-Cjje17IA.js +28 -0
  145. package/dist/racket-Dx0gMnpg.js +28 -0
  146. package/dist/razor-DPht_bdD.js +24 -0
  147. package/dist/renderer-CZ41eK_V.js +43 -0
  148. package/dist/ruby-B8RxtCzI.js +24 -0
  149. package/dist/rust-Cjtli6yf.js +23 -0
  150. package/dist/sass-Dv3DMzjs.js +24 -0
  151. package/dist/scala-B7bZGKXq.js +24 -0
  152. package/dist/scheme-B2PsEdVN.js +24 -0
  153. package/dist/segmented-BEtO1eyl.js +69 -0
  154. package/dist/segmented-CWoQcX-H.js +6 -0
  155. package/dist/segmented-DLmggl-e.css +8 -0
  156. package/dist/shader-BZzu3zGr.js +24 -0
  157. package/dist/shiki-CMgjqKKu.css +20 -0
  158. package/dist/shiki-vToM7Pz1.js +114 -0
  159. package/dist/solidity-CLieFYpL.js +24 -0
  160. package/dist/spin-B2FU3Sx6.css +19 -0
  161. package/dist/spin-Bz4zGBEo.js +3 -0
  162. package/dist/spin-Ds5W7qC_.js +23 -0
  163. package/dist/stata-C0yUiO47.js +33 -0
  164. package/dist/strong-CvOjLZiq.js +83 -0
  165. package/dist/strong-DpeQmP2J.css +4 -0
  166. package/dist/svelte-rtF4yNGL.js +23 -0
  167. package/dist/swift-CzvYoIM0.js +24 -0
  168. package/dist/table-4ec9FVB_.js +59 -0
  169. package/dist/table-BWn_kG8W.css +19 -0
  170. package/dist/table-CJzlDdmv.css +34 -0
  171. package/dist/table-CZLbUHiJ.js +3 -0
  172. package/dist/table-DjkiVd9L.js +188 -0
  173. package/dist/terraform-CD_BZGb-.js +24 -0
  174. package/dist/text-D098eCyi.css +5 -0
  175. package/dist/text-D1-vbZ7l.js +23 -0
  176. package/dist/text-DuONUqRA.js +81 -0
  177. package/dist/thematic-break-C5zxgoE9.css +6 -0
  178. package/dist/thematic-break-CcNPEI9Y.js +81 -0
  179. package/dist/theme.css +67 -0
  180. package/dist/toml-C6jUF0Xd.js +24 -0
  181. package/dist/tooltip-Ac_2x9ps.js +4 -0
  182. package/dist/tooltip-DAngu9Wp.css +5 -0
  183. package/dist/tooltip-RiXixMIt.js +71 -0
  184. package/dist/twig-C4dfP84J.js +30 -0
  185. package/dist/typescript-Bk-pp-cK.js +23 -0
  186. package/dist/typst-DPCpaVSH.js +24 -0
  187. package/dist/v-nRGMJ2Ki.js +23 -0
  188. package/dist/vala-B78bKcY0.js +24 -0
  189. package/dist/vanilla-BZ8bn5Yz.css +4 -0
  190. package/dist/vanilla-CA9QO96X.js +3 -0
  191. package/dist/vanilla-DkX6g0dm.js +87 -0
  192. package/dist/verilog-CRpkl76S.js +23 -0
  193. package/dist/vim-DpKnut7b.js +24 -0
  194. package/dist/vue-D5eadhjo.js +23 -0
  195. package/dist/xml-Dvx5F-hl.js +24 -0
  196. package/dist/yaml-DJHrmzSe.js +94 -0
  197. package/dist/yaml-McBkYbxI.css +5 -0
  198. package/dist/yaml-n1S8nAOh.js +24 -0
  199. package/dist/zh-CN-CL1XGe0H.js +27 -0
  200. package/dist/zig-R-iFzxfW.js +24 -0
  201. package/dist/zoom-container-BDEP09K9.js +6 -0
  202. package/dist/zoom-container-BENM7TpV.css +28 -0
  203. package/dist/zoom-container-BfUO3Ocp.js +113 -0
  204. package/dist/zoomIn-CEukuh3x.js +28 -0
  205. package/dist/zoomOut-qlzQyQli.js +28 -0
  206. package/package.json +115 -0
@@ -0,0 +1,203 @@
1
+ import { R as useControls, i as useMermaid, o as throttle } from "./composables-qhB1h_ed.js";
2
+ import "./tooltip-RiXixMIt.js";
3
+ import "./button-D8xx1WIP.js";
4
+ import { t as error_component_default } from "./error-component-CzarUjhh.js";
5
+ import { t as spin_default } from "./spin-Ds5W7qC_.js";
6
+ import { t as zoom_container_default } from "./zoom-container-BfUO3Ocp.js";
7
+ import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeProps, normalizeStyle, openBlock, ref, resolveDynamicComponent, toRefs, watch, withCtx } from "vue";
8
+ import { useResizeObserver } from "@vueuse/core";
9
+
10
+ //#region src/components/previewers/mermaid.vue?vue&type=script&setup=true&lang.ts
11
+ const _hoisted_1 = ["innerHTML"];
12
+ var mermaid_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
13
+ __name: "mermaid",
14
+ props: {
15
+ node: {
16
+ type: Object,
17
+ required: true
18
+ },
19
+ markdownParser: {
20
+ type: Object,
21
+ required: true
22
+ },
23
+ nodeRenderers: {
24
+ type: Object,
25
+ required: true
26
+ },
27
+ mediumZoom: {
28
+ type: Object,
29
+ required: true
30
+ },
31
+ indexKey: {
32
+ type: [Number, String],
33
+ required: true
34
+ },
35
+ getContainer: {
36
+ type: Function,
37
+ required: true
38
+ },
39
+ controls: {
40
+ type: [Boolean, Object],
41
+ required: false
42
+ },
43
+ previewers: {
44
+ type: [Boolean, Object],
45
+ required: false
46
+ },
47
+ shikiOptions: {
48
+ type: Object,
49
+ required: false
50
+ },
51
+ mermaidOptions: {
52
+ type: Object,
53
+ required: false
54
+ },
55
+ katexOptions: {
56
+ type: Object,
57
+ required: false
58
+ },
59
+ hardenOptions: {
60
+ type: Object,
61
+ required: false
62
+ },
63
+ codeOptions: {
64
+ type: Object,
65
+ required: false
66
+ },
67
+ imageOptions: {
68
+ type: Object,
69
+ required: false
70
+ },
71
+ isDark: {
72
+ type: Boolean,
73
+ required: false
74
+ },
75
+ throttle: {
76
+ type: Number,
77
+ required: false,
78
+ default: 300
79
+ },
80
+ minHeight: {
81
+ type: Number,
82
+ required: false,
83
+ default: 60
84
+ },
85
+ containerHeight: {
86
+ type: [String, Number],
87
+ required: false
88
+ }
89
+ },
90
+ setup(__props) {
91
+ const props = __props;
92
+ const { controls, mermaidOptions, isDark } = toRefs(props);
93
+ const { isControlEnabled } = useControls({ controls });
94
+ const showControl = computed(() => isControlEnabled("mermaid.position"));
95
+ const renderFlag = ref(false);
96
+ const svg = ref();
97
+ const containerRef = ref();
98
+ const code = computed(() => props.node.value.trim());
99
+ const nodeLoading = computed(() => !!props.node.loading);
100
+ const loading = computed(() => nodeLoading.value || !renderFlag.value);
101
+ const Error = computed(() => {
102
+ var _mermaidOptions$value;
103
+ return ((_mermaidOptions$value = mermaidOptions.value) === null || _mermaidOptions$value === void 0 ? void 0 : _mermaidOptions$value.errorComponent) ?? error_component_default;
104
+ });
105
+ const containerHeight = ref(0);
106
+ const height = computed(() => {
107
+ if (typeof props.containerHeight === "string") return props.containerHeight;
108
+ if (typeof props.containerHeight === "number") return props.containerHeight;
109
+ return containerHeight.value ? `${containerHeight.value}px` : "auto";
110
+ });
111
+ const { renderMermaid } = useMermaid({
112
+ mermaidOptions,
113
+ isDark
114
+ });
115
+ function updateHeight() {
116
+ if (props.containerHeight) return;
117
+ if (!containerRef.value) return;
118
+ const svgElement = containerRef.value.querySelector("[data-stream-markdown=\"mermaid\"] svg");
119
+ if (!svgElement) return;
120
+ let w = 0;
121
+ let h$1 = 0;
122
+ const viewBox = svgElement.getAttribute("viewBox");
123
+ const width = svgElement.getAttribute("width");
124
+ const height$1 = svgElement.getAttribute("height");
125
+ if (viewBox) {
126
+ const parts = viewBox.split(" ");
127
+ if (parts.length === 4) {
128
+ w = Number.parseFloat(parts[2]);
129
+ h$1 = Number.parseFloat(parts[3]);
130
+ }
131
+ }
132
+ if (!w || !h$1) {
133
+ if (width && height$1) {
134
+ w = Number.parseFloat(width);
135
+ h$1 = Number.parseFloat(height$1);
136
+ }
137
+ }
138
+ if (Number.isNaN(w) || Number.isNaN(h$1) || w <= 0 || h$1 <= 0) {
139
+ const bbox = svgElement.getBBox();
140
+ if (bbox && bbox.width > 0 && bbox.height > 0) {
141
+ w = bbox.width;
142
+ h$1 = bbox.height;
143
+ }
144
+ }
145
+ if (w > 0 && h$1 > 0) {
146
+ const aspectRatio = h$1 / w;
147
+ const { width: width$1 } = containerRef.value.getBoundingClientRect();
148
+ const data = width$1 * aspectRatio;
149
+ if (data > h$1) containerHeight.value = h$1;
150
+ else containerHeight.value = data;
151
+ }
152
+ }
153
+ watch(() => [
154
+ code.value,
155
+ mermaidOptions.value,
156
+ isDark.value,
157
+ nodeLoading.value
158
+ ], throttle(props.throttle, async () => {
159
+ const data = await renderMermaid(code.value);
160
+ if (data) {
161
+ svg.value = data;
162
+ updateHeight();
163
+ }
164
+ renderFlag.value = true;
165
+ }), { immediate: true });
166
+ watch(loading, (curr, prev) => {
167
+ if (!curr && prev) renderFlag.value = false;
168
+ }, { immediate: true });
169
+ if (!props.containerHeight) useResizeObserver(containerRef, () => {
170
+ updateHeight();
171
+ });
172
+ return (_ctx, _cache) => {
173
+ return openBlock(), createElementBlock("div", {
174
+ ref_key: "containerRef",
175
+ ref: containerRef,
176
+ "data-stream-markdown": "mermaid-previewer",
177
+ style: normalizeStyle({
178
+ minHeight: `${__props.minHeight}px`,
179
+ height: height.value
180
+ })
181
+ }, [!svg.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [loading.value ? (openBlock(), createBlock(spin_default, {
182
+ key: 0,
183
+ size: "large"
184
+ })) : (openBlock(), createBlock(resolveDynamicComponent(Error.value), mergeProps({
185
+ key: 1,
186
+ variant: "mermaid"
187
+ }, props), null, 16))], 64)) : createCommentVNode("v-if", true), createVNode(zoom_container_default, { "show-control": showControl.value }, {
188
+ default: withCtx(() => [createElementVNode("div", {
189
+ "data-stream-markdown": "mermaid",
190
+ innerHTML: svg.value
191
+ }, null, 8, _hoisted_1)]),
192
+ _: 1
193
+ }, 8, ["show-control"])], 4);
194
+ };
195
+ }
196
+ });
197
+
198
+ //#endregion
199
+ //#region src/components/previewers/mermaid.vue
200
+ var mermaid_default = mermaid_vue_vue_type_script_setup_true_lang_default;
201
+
202
+ //#endregion
203
+ export { mermaid_default as default };
@@ -0,0 +1,25 @@
1
+ import { createElementBlock, createElementVNode, markRaw, openBlock } from "vue";
2
+
3
+ //#region ~icons/lucide/minimize
4
+ const _hoisted_1 = {
5
+ viewBox: "0 0 24 24",
6
+ width: "1.2em",
7
+ height: "1.2em"
8
+ };
9
+ function render(_ctx, _cache) {
10
+ return openBlock(), createElementBlock("svg", _hoisted_1, [..._cache[0] || (_cache[0] = [createElementVNode("path", {
11
+ fill: "none",
12
+ stroke: "currentColor",
13
+ "stroke-linecap": "round",
14
+ "stroke-linejoin": "round",
15
+ "stroke-width": "2",
16
+ d: "M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3M3 16h3a2 2 0 0 1 2 2v3m8 0v-3a2 2 0 0 1 2-2h3"
17
+ }, null, -1)])]);
18
+ }
19
+ var minimize_default = markRaw({
20
+ name: "lucide-minimize",
21
+ render
22
+ });
23
+
24
+ //#endregion
25
+ export { minimize_default as default };
@@ -0,0 +1,48 @@
1
+ .stream-markdown [data-stream-markdown="modal"] {
2
+ background-color: var(--background);
3
+ flex-direction: column;
4
+ display: flex;
5
+ position: fixed;
6
+ inset: 0;
7
+ }
8
+ .stream-markdown [data-stream-markdown="modal-header"] {
9
+ background-color: color-mix(in oklab, var(--muted) 80%, transparent);
10
+ color: var(--muted-foreground);
11
+ border-bottom: 1px solid var(--border);
12
+ flex-shrink: 0;
13
+ justify-content: space-between;
14
+ align-items: center;
15
+ padding-block: .5rem;
16
+ padding-inline: 1rem;
17
+ display: flex;
18
+ position: relative;
19
+ }
20
+ .stream-markdown [data-stream-markdown="modal-actions"] {
21
+ align-items: center;
22
+ gap: .5rem;
23
+ display: flex;
24
+ }
25
+ .stream-markdown [data-stream-markdown="modal-body"] {
26
+ flex: 1;
27
+ overflow: auto;
28
+ }
29
+ .stream-markdown .modal-enter-from, .stream-markdown .modal-leave-to {
30
+ opacity: 0;
31
+ }
32
+ .stream-markdown .modal-enter-active, .stream-markdown .modal-leave-active {
33
+ transition: opacity var(--default-transition-duration) ease;
34
+ }
35
+ .stream-markdown [data-stream-markdown="modal-header"] > :first-child {
36
+ flex: 1;
37
+ }
38
+ .stream-markdown [data-stream-markdown="modal-header"] > :last-child {
39
+ flex: 1;
40
+ justify-content: flex-end;
41
+ display: flex;
42
+ }
43
+ .stream-markdown [data-stream-markdown="modal-header"] > :nth-child(2) {
44
+ position: absolute;
45
+ left: 50%;
46
+ transform: translateX(-50%);
47
+ }
48
+
@@ -0,0 +1,71 @@
1
+ import { Teleport, Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeModels, normalizeStyle, openBlock, renderSlot, toDisplayString, unref, useModel, useSlots, withCtx } from "vue";
2
+
3
+ //#region src/components/modal.vue?vue&type=script&setup=true&lang.ts
4
+ const _hoisted_1 = {
5
+ key: 0,
6
+ "data-stream-markdown": "modal-header"
7
+ };
8
+ const _hoisted_2 = { "data-stream-markdown": "modal-actions" };
9
+ const _hoisted_3 = { "data-stream-markdown": "modal-body" };
10
+ var modal_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
11
+ __name: "modal",
12
+ props: /* @__PURE__ */ mergeModels({
13
+ title: {
14
+ type: String,
15
+ required: false
16
+ },
17
+ closable: {
18
+ type: Boolean,
19
+ required: false
20
+ },
21
+ zIndex: {
22
+ type: Number,
23
+ required: false,
24
+ default: 1e3
25
+ },
26
+ getContainer: {
27
+ type: Function,
28
+ required: false
29
+ }
30
+ }, {
31
+ "open": {
32
+ type: Boolean,
33
+ required: false,
34
+ default: false
35
+ },
36
+ "openModifiers": {}
37
+ }),
38
+ emits: ["update:open"],
39
+ setup(__props) {
40
+ const props = __props;
41
+ const slots = useSlots();
42
+ const open = useModel(__props, "open");
43
+ const container = props.getContainer ? props.getContainer() || "body" : "body";
44
+ const modalStyle = computed(() => ({ zIndex: props.zIndex }));
45
+ const showHeader = computed(() => !!props.title || props.closable || !!slots.title || !!slots.extra);
46
+ return (_ctx, _cache) => {
47
+ return openBlock(), createBlock(Teleport, { to: unref(container) }, [createVNode(Transition, {
48
+ name: "modal",
49
+ appear: ""
50
+ }, {
51
+ default: withCtx(() => [open.value ? (openBlock(), createElementBlock("div", {
52
+ key: 0,
53
+ "data-stream-markdown": "modal",
54
+ style: normalizeStyle(modalStyle.value)
55
+ }, [showHeader.value ? (openBlock(), createElementBlock("header", _hoisted_1, [
56
+ renderSlot(_ctx.$slots, "title", {}, () => [createTextVNode(toDisplayString(__props.title), 1)]),
57
+ renderSlot(_ctx.$slots, "header-center", {}, () => [_cache[0] || (_cache[0] = createElementVNode("div", null, null, -1))]),
58
+ createElementVNode("div", _hoisted_2, [renderSlot(_ctx.$slots, "actions")])
59
+ ])) : createCommentVNode("v-if", true), createElementVNode("main", _hoisted_3, [renderSlot(_ctx.$slots, "default")])], 4)) : createCommentVNode("v-if", true)]),
60
+ _: 3
61
+ })], 8, ["to"]);
62
+ };
63
+ }
64
+ });
65
+
66
+ //#endregion
67
+ //#region src/components/modal.vue
68
+ var modal_default = modal_vue_vue_type_script_setup_true_lang_default;
69
+
70
+ //#endregion
71
+ export { modal_default as t };
@@ -0,0 +1,3 @@
1
+ import { t as modal_default } from "./modal-CuQR21UD.js";
2
+
3
+ export { modal_default as default };
@@ -0,0 +1,24 @@
1
+ import { createElementBlock, createElementVNode, markRaw, openBlock } from "vue";
2
+
3
+ //#region ~icons/catppuccin/nextflow
4
+ const _hoisted_1 = {
5
+ viewBox: "0 0 16 16",
6
+ width: "1.2em",
7
+ height: "1.2em"
8
+ };
9
+ function render(_ctx, _cache) {
10
+ return openBlock(), createElementBlock("svg", _hoisted_1, [..._cache[0] || (_cache[0] = [createElementVNode("path", {
11
+ fill: "none",
12
+ stroke: "#a6da95",
13
+ "stroke-linecap": "round",
14
+ "stroke-linejoin": "round",
15
+ d: "M14.5 2.36c-2.4.52-4.2 1.62-6.46 3.79C4.7 2.23 1.89 2 1.5 2v2.47c.16.02 2.2.33 4.82 3.48a14.5 14.5 0 0 1-4.82 3.02v2.58a16.4 16.4 0 0 0 6.33-3.62A11.38 11.38 0 0 0 14.5 14v-2.55a9.04 9.04 0 0 1-4.93-3.32c1.81-2.02 3.2-2.93 4.93-3.34z"
16
+ }, null, -1)])]);
17
+ }
18
+ var nextflow_default = markRaw({
19
+ name: "catppuccin-nextflow",
20
+ render
21
+ });
22
+
23
+ //#endregion
24
+ export { nextflow_default as default };
@@ -0,0 +1,23 @@
1
+ import { createElementBlock, createElementVNode, markRaw, openBlock } from "vue";
2
+
3
+ //#region ~icons/catppuccin/nginx
4
+ const _hoisted_1 = {
5
+ viewBox: "0 0 16 16",
6
+ width: "1.2em",
7
+ height: "1.2em"
8
+ };
9
+ function render(_ctx, _cache) {
10
+ return openBlock(), createElementBlock("svg", _hoisted_1, [..._cache[0] || (_cache[0] = [createElementVNode("g", {
11
+ fill: "none",
12
+ stroke: "#a6da95",
13
+ "stroke-linecap": "round",
14
+ "stroke-linejoin": "round"
15
+ }, [createElementVNode("path", { d: "M5.5 10.5v-5l5 5v-5" }), createElementVNode("path", { d: "M1.5 11.5v-7L8 .5l6.5 4v7l-6.5 4z" })], -1)])]);
16
+ }
17
+ var nginx_default = markRaw({
18
+ name: "catppuccin-nginx",
19
+ render
20
+ });
21
+
22
+ //#endregion
23
+ export { nginx_default as default };
@@ -0,0 +1,24 @@
1
+ import { createElementBlock, createElementVNode, markRaw, openBlock } from "vue";
2
+
3
+ //#region ~icons/catppuccin/nim
4
+ const _hoisted_1 = {
5
+ viewBox: "0 0 16 16",
6
+ width: "1.2em",
7
+ height: "1.2em"
8
+ };
9
+ function render(_ctx, _cache) {
10
+ return openBlock(), createElementBlock("svg", _hoisted_1, [..._cache[0] || (_cache[0] = [createElementVNode("path", {
11
+ fill: "none",
12
+ stroke: "#eed49f",
13
+ "stroke-linecap": "round",
14
+ "stroke-linejoin": "round",
15
+ d: "M1 7L.5 4.5l1.01.67c.28-.27.47-.48 1.18-.85l.56-1.82L4.5 3.84c.77-.18 1.53-.36 2.4-.33L8 1.5l1.1 2.01c.87-.03 1.63.15 2.4.33l1.25-1.34l.56 1.82c.7.37.9.58 1.18.85l1.01-.67L15 7m-1.5 1C13 6.5 11 5.5 8 5.5S3 6.5 2.5 8m11.5.75L13.5 8l-1 1.5l-1.5.5l-3-1.5L5 10l-1.5-.5l-1-1.5l-.5.75L1 7l1.25 3.75C3 12.75 6 13.5 8 13.5s5-.75 5.75-2.75L15 7z"
16
+ }, null, -1)])]);
17
+ }
18
+ var nim_default = markRaw({
19
+ name: "catppuccin-nim",
20
+ render
21
+ });
22
+
23
+ //#endregion
24
+ export { nim_default as default };
@@ -0,0 +1,18 @@
1
+ import { createElementBlock, createElementVNode, createStaticVNode, markRaw, openBlock } from "vue";
2
+
3
+ //#region ~icons/catppuccin/nix
4
+ const _hoisted_1 = {
5
+ viewBox: "0 0 16 16",
6
+ width: "1.2em",
7
+ height: "1.2em"
8
+ };
9
+ function render(_ctx, _cache) {
10
+ return openBlock(), createElementBlock("svg", _hoisted_1, [..._cache[0] || (_cache[0] = [createStaticVNode("<g fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path stroke=\"#7dc4e4\" d=\"M.5 7.5H4m1.39-2L2.05 11\"></path><path stroke=\"#8aadf4\" d=\"M4 1.5L5.5 4m3.5.5H2.55\"></path><path stroke=\"#7dc4e4\" d=\"m12 1.5l-1.5 3m1.01 2.6L8.5 1.5\"></path><path stroke=\"#8aadf4\" d=\"M15.5 8.52L12 8.5m-1.38 2L14 5\"></path><path stroke=\"#7dc4e4\" d=\"m12.5 14.5l-2.5-3m-2.97.02l6.48-.02\"></path><path stroke=\"#8aadf4\" d=\"m4 14.5l1.5-3M4.53 9l2.97 5.5\"></path></g>", 1)])]);
11
+ }
12
+ var nix_default = markRaw({
13
+ name: "catppuccin-nix",
14
+ render
15
+ });
16
+
17
+ //#endregion
18
+ export { nix_default as default };
@@ -0,0 +1,11 @@
1
+ .stream-markdown .typewriter-enter-from {
2
+ opacity: 0;
3
+ }
4
+ .stream-markdown .typewriter-enter-active {
5
+ transition: opacity var(--typewriter-transition-duration) ease-out;
6
+ will-change: opacity;
7
+ }
8
+ .stream-markdown .typewriter-enter-to {
9
+ opacity: 1;
10
+ }
11
+
@@ -0,0 +1,199 @@
1
+ import { Fragment, Transition, computed, createBlock, createCommentVNode, createElementBlock, defineComponent, mergeProps, openBlock, renderList, resolveDynamicComponent, withCtx } from "vue";
2
+
3
+ //#region src/components/markdown.vue?vue&type=script&setup=true&lang.ts
4
+ const _hoisted_1 = ["innerHTML"];
5
+ var markdown_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
6
+ __name: "markdown",
7
+ props: {
8
+ markdownParser: {
9
+ type: Object,
10
+ required: true
11
+ },
12
+ nodeRenderers: {
13
+ type: Object,
14
+ required: true
15
+ },
16
+ node: {
17
+ type: Object,
18
+ required: true
19
+ },
20
+ mediumZoom: {
21
+ type: Object,
22
+ required: true
23
+ },
24
+ indexKey: {
25
+ type: [Number, String],
26
+ required: true
27
+ },
28
+ getContainer: {
29
+ type: Function,
30
+ required: true
31
+ },
32
+ controls: {
33
+ type: [Boolean, Object],
34
+ required: false
35
+ },
36
+ previewers: {
37
+ type: [Boolean, Object],
38
+ required: false
39
+ },
40
+ shikiOptions: {
41
+ type: Object,
42
+ required: false
43
+ },
44
+ mermaidOptions: {
45
+ type: Object,
46
+ required: false
47
+ },
48
+ katexOptions: {
49
+ type: Object,
50
+ required: false
51
+ },
52
+ hardenOptions: {
53
+ type: Object,
54
+ required: false
55
+ },
56
+ codeOptions: {
57
+ type: Object,
58
+ required: false
59
+ },
60
+ imageOptions: {
61
+ type: Object,
62
+ required: false
63
+ },
64
+ isDark: {
65
+ type: Boolean,
66
+ required: false
67
+ }
68
+ },
69
+ setup(__props) {
70
+ const props = __props;
71
+ const html = computed(() => {
72
+ const content = props.markdownParser.astToMarkdown(props.node);
73
+ return props.markdownParser.markdownToHtml(content);
74
+ });
75
+ return (_ctx, _cache) => {
76
+ return openBlock(), createElementBlock("span", { innerHTML: html.value }, null, 8, _hoisted_1);
77
+ };
78
+ }
79
+ });
80
+
81
+ //#endregion
82
+ //#region src/components/markdown.vue
83
+ var markdown_default = markdown_vue_vue_type_script_setup_true_lang_default;
84
+
85
+ //#endregion
86
+ //#region src/components/node-list.vue?vue&type=script&setup=true&lang.ts
87
+ var node_list_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
88
+ inheritAttrs: false,
89
+ __name: "node-list",
90
+ props: {
91
+ nodes: {
92
+ type: Array,
93
+ required: false,
94
+ default: () => []
95
+ },
96
+ indexKey: {
97
+ type: [Number, String],
98
+ required: false
99
+ },
100
+ markdownParser: {
101
+ type: Object,
102
+ required: true
103
+ },
104
+ nodeRenderers: {
105
+ type: Object,
106
+ required: true
107
+ },
108
+ mediumZoom: {
109
+ type: Object,
110
+ required: true
111
+ },
112
+ getContainer: {
113
+ type: Function,
114
+ required: true
115
+ },
116
+ controls: {
117
+ type: [Boolean, Object],
118
+ required: false
119
+ },
120
+ previewers: {
121
+ type: [Boolean, Object],
122
+ required: false
123
+ },
124
+ shikiOptions: {
125
+ type: Object,
126
+ required: false
127
+ },
128
+ mermaidOptions: {
129
+ type: Object,
130
+ required: false
131
+ },
132
+ katexOptions: {
133
+ type: Object,
134
+ required: false
135
+ },
136
+ hardenOptions: {
137
+ type: Object,
138
+ required: false
139
+ },
140
+ codeOptions: {
141
+ type: Object,
142
+ required: false
143
+ },
144
+ imageOptions: {
145
+ type: Object,
146
+ required: false
147
+ },
148
+ isDark: {
149
+ type: Boolean,
150
+ required: false
151
+ }
152
+ },
153
+ setup(__props) {
154
+ const props = __props;
155
+ const nodes = computed(() => {
156
+ var _props$nodes;
157
+ return (_props$nodes = props.nodes) === null || _props$nodes === void 0 ? void 0 : _props$nodes.map((node, index) => ({
158
+ node,
159
+ index
160
+ }));
161
+ });
162
+ const excludeTransition = ["code"];
163
+ function getNodeComponent(node) {
164
+ return props.nodeRenderers[node.type] || markdown_default;
165
+ }
166
+ function getNodeBindings(node) {
167
+ return {
168
+ ...props,
169
+ node,
170
+ nodes: void 0
171
+ };
172
+ }
173
+ function getNodeIndexKey(index) {
174
+ return `${props.indexKey || "stream-markdown"}-${index}`;
175
+ }
176
+ return (_ctx, _cache) => {
177
+ return openBlock(true), createElementBlock(Fragment, null, renderList(nodes.value, (item) => {
178
+ return openBlock(), createElementBlock(Fragment, { key: item.index }, [!excludeTransition.includes(item.node.type) ? (openBlock(), createBlock(Transition, {
179
+ key: 0,
180
+ name: "typewriter",
181
+ appear: ""
182
+ }, {
183
+ default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(getNodeComponent(item.node)), mergeProps({ ref_for: true }, getNodeBindings(item.node), { "index-key": getNodeIndexKey(item.index) }), null, 16, ["index-key"]))]),
184
+ _: 2
185
+ }, 1024)) : (openBlock(), createBlock(resolveDynamicComponent(getNodeComponent(item.node)), mergeProps({
186
+ key: 1,
187
+ ref_for: true
188
+ }, getNodeBindings(item.node), { "index-key": getNodeIndexKey(item.index) }), null, 16, ["index-key"]))], 64);
189
+ }), 128);
190
+ };
191
+ }
192
+ });
193
+
194
+ //#endregion
195
+ //#region src/components/node-list.vue
196
+ var node_list_default = node_list_vue_vue_type_script_setup_true_lang_default;
197
+
198
+ //#endregion
199
+ export { node_list_default as t };
@@ -0,0 +1,3 @@
1
+ import { t as node_list_default } from "./node-list-CGr_EVtn.js";
2
+
3
+ export { node_list_default as default };
@@ -0,0 +1,27 @@
1
+ import { createElementBlock, createElementVNode, markRaw, openBlock } from "vue";
2
+
3
+ //#region ~icons/catppuccin/ocaml
4
+ const _hoisted_1 = {
5
+ viewBox: "0 0 16 16",
6
+ width: "1.2em",
7
+ height: "1.2em"
8
+ };
9
+ function render(_ctx, _cache) {
10
+ return openBlock(), createElementBlock("svg", _hoisted_1, [..._cache[0] || (_cache[0] = [createElementVNode("g", {
11
+ fill: "none",
12
+ stroke: "#f5a97f",
13
+ "stroke-linecap": "round",
14
+ "stroke-linejoin": "round"
15
+ }, [
16
+ createElementVNode("path", { d: "M1.5 8V3c0-.83.67-1.5 1.5-1.5h10c.83 0 1.5.67 1.5 1.5v10c0 .83-.67 1.5-1.5 1.5H9" }),
17
+ createElementVNode("path", { d: "m1.5 8l1.14-2.3q.09-.21.36-.24a.8.8 0 0 1 .44.13c.18.12.23.53.28.64c.06.1.64 1.23.85 1.23c.2 0 .71-1.47.71-1.47s.37-.49.72-.49s.55.32.67.49c.12.16.24 1.76.46 2.01s1.32.87 1.67.73c.34-.13.53-.4.63-.73c.1-.34-.14-.75 0-1a1.1 1.1 0 0 1 1.02-.55c.56.03 2.05.56 2.05 1.05q0 .75-1.5.75c-.48 1.33.28 2.22-3 2.25l1 4" }),
18
+ createElementVNode("path", { d: "m4.5 14.5l1.5-4l1 4zm-2 0l1.5-4l-1.5-.5l-1 1.54V14l1 .49Z" })
19
+ ], -1)])]);
20
+ }
21
+ var ocaml_default = markRaw({
22
+ name: "catppuccin-ocaml",
23
+ render
24
+ });
25
+
26
+ //#endregion
27
+ export { ocaml_default as default };