@primeui-devkit/vue-markdown 0.1.0-beta.1

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 (40) hide show
  1. package/LICENSE.md +45 -0
  2. package/README.md +22 -0
  3. package/THIRD-PARTY-NOTICES.txt +36 -0
  4. package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
  5. package/dist/index.js +82 -0
  6. package/dist/prose/ProseA.vue.js +28 -0
  7. package/dist/prose/ProseA2.vue.js +4 -0
  8. package/dist/prose/ProseBlockquote.vue.js +12 -0
  9. package/dist/prose/ProseCode.vue.js +12 -0
  10. package/dist/prose/ProseEm.vue.js +12 -0
  11. package/dist/prose/ProseH1.vue.js +26 -0
  12. package/dist/prose/ProseH12.vue.js +4 -0
  13. package/dist/prose/ProseH2.vue.js +26 -0
  14. package/dist/prose/ProseH22.vue.js +4 -0
  15. package/dist/prose/ProseH3.vue.js +26 -0
  16. package/dist/prose/ProseH32.vue.js +4 -0
  17. package/dist/prose/ProseH4.vue.js +26 -0
  18. package/dist/prose/ProseH42.vue.js +4 -0
  19. package/dist/prose/ProseH5.vue.js +26 -0
  20. package/dist/prose/ProseH52.vue.js +4 -0
  21. package/dist/prose/ProseH6.vue.js +26 -0
  22. package/dist/prose/ProseH62.vue.js +4 -0
  23. package/dist/prose/ProseHr.vue.js +10 -0
  24. package/dist/prose/ProseImg.vue.js +35 -0
  25. package/dist/prose/ProseImg2.vue.js +4 -0
  26. package/dist/prose/ProseLi.vue.js +12 -0
  27. package/dist/prose/ProseOl.vue.js +12 -0
  28. package/dist/prose/ProseP.vue.js +12 -0
  29. package/dist/prose/ProsePre.vue.js +89 -0
  30. package/dist/prose/ProsePre2.vue.js +4 -0
  31. package/dist/prose/ProseStrong.vue.js +12 -0
  32. package/dist/prose/ProseTable.vue.js +14 -0
  33. package/dist/prose/ProseTbody.vue.js +12 -0
  34. package/dist/prose/ProseTd.vue.js +12 -0
  35. package/dist/prose/ProseTh.vue.js +12 -0
  36. package/dist/prose/ProseThead.vue.js +12 -0
  37. package/dist/prose/ProseTr.vue.js +12 -0
  38. package/dist/prose/ProseUl.vue.js +12 -0
  39. package/package.json +57 -0
  40. package/types/index.d.ts +30 -0
package/LICENSE.md ADDED
@@ -0,0 +1,45 @@
1
+ # PrimeUI License
2
+
3
+ This package is part of **PrimeUI**, a family of commercial UI libraries by PrimeTek Informatics.
4
+
5
+ ## How PrimeUI May Be Used
6
+
7
+ PrimeUI may be used under one of two licenses. You choose the one that applies to you based on eligibility.
8
+
9
+ ### Community License (Free)
10
+
11
+ Free for organizations that meet all of the following criteria:
12
+
13
+ - Less than $1,000,000 USD in annual gross revenue
14
+ - Fewer than 5 developers
15
+ - Fewer than 10 employees
16
+ - Less than $3,000,000 USD in venture capital or outside funding
17
+
18
+ Individuals, students, non-profits, and non-commercial open source projects also qualify.
19
+
20
+ The Community License provides full access to the core libraries and supports up to 4 developers. It requires annual renewal by confirming continued eligibility.
21
+
22
+ ### Commercial License (Paid)
23
+
24
+ For organizations that do not qualify for the Community License.
25
+
26
+ Licensed per developer, perpetual, with one year of updates included. Renewal is optional and extends access to new versions. The Commercial Suite also includes PrimeBlocks, Theme Designer, all PrimeUI Pro components, and Premium Support.
27
+
28
+ ## License Key
29
+
30
+ A valid license key is required to use this software. License verification is performed offline, with no telemetry and no remote connection. A missing, invalid, or expired key may cause the software to display a license notice.
31
+
32
+ ## Full Terms
33
+
34
+ The complete license terms, eligibility details, and renewal information are available at:
35
+
36
+ - Community License: <https://primeui.dev/licenses/community>
37
+ - Commercial License: <https://primeui.dev/licenses/commercial>
38
+
39
+ ## Restrictions
40
+
41
+ This software is distributed as a compiled package. You may not reverse-engineer, decompile, or extract its source code, redistribute it as a component library or development tool, or remove its license mechanisms. Redistributing the software so that third parties can develop with it requires a separate OEM License. See the full terms for details.
42
+
43
+ ---
44
+
45
+ © 2026 PrimeTek Informatics. All rights reserved.
package/README.md ADDED
@@ -0,0 +1,22 @@
1
+ # @primeui-devkit/vue-markdown
2
+
3
+ Vue renderer for the markdown AST, plus the `Prose*` component set.
4
+
5
+ ```vue
6
+ <script setup>
7
+ import { MarkdownRenderer, proseComponents } from '@primeui-devkit/vue-markdown';
8
+ import DemoViewer from './DemoViewer.vue';
9
+
10
+ defineProps({ tree: Object });
11
+ const components = { ...proseComponents, 'demo-viewer': DemoViewer };
12
+ </script>
13
+
14
+ <template>
15
+ <MarkdownRenderer :tree="tree" :components="components" />
16
+ </template>
17
+ ```
18
+
19
+ `Markdown` (parses a markdown string at runtime) and
20
+ `defineMarkdownComponent` / `defineMarkdownRenderer` (pre-configured factories)
21
+ are also exported. For Nuxt projects, `@primeui-devkit/nuxt-markdown` is the
22
+ recommended integration.
@@ -0,0 +1,36 @@
1
+ # Third-Party Notices
2
+
3
+ This package uses the following third-party open source software.
4
+ Each is provided under its own license, reproduced below.
5
+
6
+ ---
7
+
8
+ ## comark / @comark/vue
9
+
10
+ Copyright (c) 2026 Comark team and contributors
11
+
12
+ The markdown engine and its Vue renderer used by this package (https://github.com/comarkdown/comark).
13
+
14
+ Licensed under the MIT License.
15
+
16
+ MIT License
17
+
18
+ Copyright (c) 2026 Comark team and contributors
19
+
20
+ Permission is hereby granted, free of charge, to any person obtaining a copy
21
+ of this software and associated documentation files (the "Software"), to deal
22
+ in the Software without restriction, including without limitation the rights
23
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
24
+ copies of the Software, and to permit persons to whom the Software is
25
+ furnished to do so, subject to the following conditions:
26
+
27
+ The above copyright notice and this permission notice shall be included in all
28
+ copies or substantial portions of the Software.
29
+
30
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
31
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
32
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
33
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
34
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
35
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
36
+ SOFTWARE.
@@ -0,0 +1,9 @@
1
+ const s = (t, e) => {
2
+ const o = t.__vccOpts || t;
3
+ for (const [r, c] of e)
4
+ o[r] = c;
5
+ return o;
6
+ };
7
+ export {
8
+ s as default
9
+ };
package/dist/index.js ADDED
@@ -0,0 +1,82 @@
1
+ import { Comark as X, ComarkRenderer as Y, defineComarkComponent as Z, defineComarkRendererComponent as oo } from "@comark/vue";
2
+ import o from "./prose/ProseA.vue.js";
3
+ import r from "./prose/ProseBlockquote.vue.js";
4
+ import m from "./prose/ProseCode.vue.js";
5
+ import e from "./prose/ProseEm.vue.js";
6
+ import s from "./prose/ProseH1.vue.js";
7
+ import f from "./prose/ProseH2.vue.js";
8
+ import i from "./prose/ProseH3.vue.js";
9
+ import P from "./prose/ProseH4.vue.js";
10
+ import t from "./prose/ProseH5.vue.js";
11
+ import a from "./prose/ProseH6.vue.js";
12
+ import n from "./prose/ProseHr.vue.js";
13
+ import p from "./prose/ProseImg.vue.js";
14
+ import _ from "./prose/ProseLi.vue.js";
15
+ import d from "./prose/ProseOl.vue.js";
16
+ import H from "./prose/ProseP.vue.js";
17
+ import c from "./prose/ProsePre.vue.js";
18
+ import k from "./prose/ProseStrong.vue.js";
19
+ import C from "./prose/ProseTable.vue.js";
20
+ import $ from "./prose/ProseTbody.vue.js";
21
+ import T from "./prose/ProseTd.vue.js";
22
+ import l from "./prose/ProseTh.vue.js";
23
+ import w from "./prose/ProseThead.vue.js";
24
+ import M from "./prose/ProseTr.vue.js";
25
+ import R from "./prose/ProseUl.vue.js";
26
+ const Q = {
27
+ ProseA: o,
28
+ ProseBlockquote: r,
29
+ ProseCode: m,
30
+ ProseEm: e,
31
+ ProseH1: s,
32
+ ProseH2: f,
33
+ ProseH3: i,
34
+ ProseH4: P,
35
+ ProseH5: t,
36
+ ProseH6: a,
37
+ ProseHr: n,
38
+ ProseImg: p,
39
+ ProseLi: _,
40
+ ProseOl: d,
41
+ ProseP: H,
42
+ ProsePre: c,
43
+ ProseStrong: k,
44
+ ProseTable: C,
45
+ ProseTbody: $,
46
+ ProseTd: T,
47
+ ProseTh: l,
48
+ ProseThead: w,
49
+ ProseTr: M,
50
+ ProseUl: R
51
+ };
52
+ export {
53
+ X as Markdown,
54
+ Y as MarkdownRenderer,
55
+ o as ProseA,
56
+ r as ProseBlockquote,
57
+ m as ProseCode,
58
+ e as ProseEm,
59
+ s as ProseH1,
60
+ f as ProseH2,
61
+ i as ProseH3,
62
+ P as ProseH4,
63
+ t as ProseH5,
64
+ a as ProseH6,
65
+ n as ProseHr,
66
+ p as ProseImg,
67
+ _ as ProseLi,
68
+ d as ProseOl,
69
+ H as ProseP,
70
+ c as ProsePre,
71
+ k as ProseStrong,
72
+ C as ProseTable,
73
+ $ as ProseTbody,
74
+ T as ProseTd,
75
+ l as ProseTh,
76
+ w as ProseThead,
77
+ M as ProseTr,
78
+ R as ProseUl,
79
+ Z as defineMarkdownComponent,
80
+ oo as defineMarkdownRenderer,
81
+ Q as proseComponents
82
+ };
@@ -0,0 +1,28 @@
1
+ import { defineComponent as o, openBlock as a, createElementBlock as s, renderSlot as n } from "vue";
2
+ const f = ["href", "target"], c = /* @__PURE__ */ o({
3
+ __name: "ProseA",
4
+ props: {
5
+ href: {
6
+ type: String,
7
+ default: ""
8
+ },
9
+ target: {
10
+ type: String,
11
+ default: void 0,
12
+ required: !1
13
+ }
14
+ },
15
+ setup(t) {
16
+ const e = t;
17
+ return (r, p) => (a(), s("a", {
18
+ class: "prose-a",
19
+ href: e.href,
20
+ target: e.target
21
+ }, [
22
+ n(r.$slots, "default")
23
+ ], 8, f));
24
+ }
25
+ });
26
+ export {
27
+ c as default
28
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./ProseA.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,12 @@
1
+ import { openBlock as e, createElementBlock as t, renderSlot as r } from "vue";
2
+ import c from "../_virtual/_plugin-vue_export-helper.js";
3
+ const s = {}, n = { class: "prose-blockquote" };
4
+ function l(o, _) {
5
+ return e(), t("blockquote", n, [
6
+ r(o.$slots, "default")
7
+ ]);
8
+ }
9
+ const u = /* @__PURE__ */ c(s, [["render", l]]);
10
+ export {
11
+ u as default
12
+ };
@@ -0,0 +1,12 @@
1
+ import { openBlock as o, createElementBlock as r, renderSlot as t } from "vue";
2
+ import c from "../_virtual/_plugin-vue_export-helper.js";
3
+ const s = {}, n = { class: "prose-code" };
4
+ function d(e, _) {
5
+ return o(), r("code", n, [
6
+ t(e.$slots, "default")
7
+ ]);
8
+ }
9
+ const a = /* @__PURE__ */ c(s, [["render", d]]);
10
+ export {
11
+ a as default
12
+ };
@@ -0,0 +1,12 @@
1
+ import { openBlock as o, createElementBlock as r, renderSlot as t } from "vue";
2
+ import s from "../_virtual/_plugin-vue_export-helper.js";
3
+ const c = {}, n = { class: "prose-em" };
4
+ function m(e, _) {
5
+ return o(), r("em", n, [
6
+ t(e.$slots, "default")
7
+ ]);
8
+ }
9
+ const a = /* @__PURE__ */ s(c, [["render", m]]);
10
+ export {
11
+ a as default
12
+ };
@@ -0,0 +1,26 @@
1
+ import { defineComponent as i, computed as l, openBlock as t, createElementBlock as n, createElementVNode as p, renderSlot as r } from "vue";
2
+ const c = ["id"], f = ["href"], h = /* @__PURE__ */ i({
3
+ __name: "ProseH1",
4
+ props: {
5
+ id: { type: String, required: !1 }
6
+ },
7
+ setup(d) {
8
+ const e = d, a = l(() => !!e.id);
9
+ return (o, s) => (t(), n("h1", {
10
+ id: e.id,
11
+ class: "prose-h1"
12
+ }, [
13
+ e.id && a.value ? (t(), n("a", {
14
+ key: 0,
15
+ href: `#${e.id}`,
16
+ class: "prose-heading-link"
17
+ }, [
18
+ s[0] || (s[0] = p("span", { class: "prose-heading-anchor" }, "#", -1)),
19
+ r(o.$slots, "default")
20
+ ], 8, f)) : r(o.$slots, "default", {}, void 0, void 0, 1)
21
+ ], 8, c));
22
+ }
23
+ });
24
+ export {
25
+ h as default
26
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./ProseH1.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,26 @@
1
+ import { defineComponent as i, computed as l, openBlock as t, createElementBlock as n, createElementVNode as p, renderSlot as r } from "vue";
2
+ const c = ["id"], f = ["href"], h = /* @__PURE__ */ i({
3
+ __name: "ProseH2",
4
+ props: {
5
+ id: { type: String, required: !1 }
6
+ },
7
+ setup(d) {
8
+ const e = d, a = l(() => !!e.id);
9
+ return (o, s) => (t(), n("h2", {
10
+ id: e.id,
11
+ class: "prose-h2"
12
+ }, [
13
+ e.id && a.value ? (t(), n("a", {
14
+ key: 0,
15
+ href: `#${e.id}`,
16
+ class: "prose-heading-link"
17
+ }, [
18
+ s[0] || (s[0] = p("span", { class: "prose-heading-anchor" }, "#", -1)),
19
+ r(o.$slots, "default")
20
+ ], 8, f)) : r(o.$slots, "default", {}, void 0, void 0, 1)
21
+ ], 8, c));
22
+ }
23
+ });
24
+ export {
25
+ h as default
26
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./ProseH2.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,26 @@
1
+ import { defineComponent as i, computed as l, openBlock as t, createElementBlock as n, createElementVNode as p, renderSlot as r } from "vue";
2
+ const c = ["id"], f = ["href"], h = /* @__PURE__ */ i({
3
+ __name: "ProseH3",
4
+ props: {
5
+ id: { type: String, required: !1 }
6
+ },
7
+ setup(d) {
8
+ const e = d, a = l(() => !!e.id);
9
+ return (o, s) => (t(), n("h3", {
10
+ id: e.id,
11
+ class: "prose-h3"
12
+ }, [
13
+ e.id && a.value ? (t(), n("a", {
14
+ key: 0,
15
+ href: `#${e.id}`,
16
+ class: "prose-heading-link"
17
+ }, [
18
+ s[0] || (s[0] = p("span", { class: "prose-heading-anchor" }, "#", -1)),
19
+ r(o.$slots, "default")
20
+ ], 8, f)) : r(o.$slots, "default", {}, void 0, void 0, 1)
21
+ ], 8, c));
22
+ }
23
+ });
24
+ export {
25
+ h as default
26
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./ProseH3.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,26 @@
1
+ import { defineComponent as i, computed as l, openBlock as t, createElementBlock as n, createElementVNode as p, renderSlot as r } from "vue";
2
+ const c = ["id"], f = ["href"], h = /* @__PURE__ */ i({
3
+ __name: "ProseH4",
4
+ props: {
5
+ id: { type: String, required: !1 }
6
+ },
7
+ setup(d) {
8
+ const e = d, a = l(() => !!e.id);
9
+ return (o, s) => (t(), n("h4", {
10
+ id: e.id,
11
+ class: "prose-h4"
12
+ }, [
13
+ e.id && a.value ? (t(), n("a", {
14
+ key: 0,
15
+ href: `#${e.id}`,
16
+ class: "prose-heading-link"
17
+ }, [
18
+ s[0] || (s[0] = p("span", { class: "prose-heading-anchor" }, "#", -1)),
19
+ r(o.$slots, "default")
20
+ ], 8, f)) : r(o.$slots, "default", {}, void 0, void 0, 1)
21
+ ], 8, c));
22
+ }
23
+ });
24
+ export {
25
+ h as default
26
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./ProseH4.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,26 @@
1
+ import { defineComponent as i, computed as l, openBlock as t, createElementBlock as n, createElementVNode as p, renderSlot as r } from "vue";
2
+ const c = ["id"], f = ["href"], h = /* @__PURE__ */ i({
3
+ __name: "ProseH5",
4
+ props: {
5
+ id: { type: String, required: !1 }
6
+ },
7
+ setup(d) {
8
+ const e = d, a = l(() => !!e.id);
9
+ return (o, s) => (t(), n("h5", {
10
+ id: e.id,
11
+ class: "prose-h5"
12
+ }, [
13
+ e.id && a.value ? (t(), n("a", {
14
+ key: 0,
15
+ href: `#${e.id}`,
16
+ class: "prose-heading-link"
17
+ }, [
18
+ s[0] || (s[0] = p("span", { class: "prose-heading-anchor" }, "#", -1)),
19
+ r(o.$slots, "default")
20
+ ], 8, f)) : r(o.$slots, "default", {}, void 0, void 0, 1)
21
+ ], 8, c));
22
+ }
23
+ });
24
+ export {
25
+ h as default
26
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./ProseH5.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,26 @@
1
+ import { defineComponent as i, computed as l, openBlock as t, createElementBlock as n, createElementVNode as p, renderSlot as r } from "vue";
2
+ const c = ["id"], f = ["href"], h = /* @__PURE__ */ i({
3
+ __name: "ProseH6",
4
+ props: {
5
+ id: { type: String, required: !1 }
6
+ },
7
+ setup(d) {
8
+ const e = d, a = l(() => !!e.id);
9
+ return (o, s) => (t(), n("h6", {
10
+ id: e.id,
11
+ class: "prose-h6"
12
+ }, [
13
+ e.id && a.value ? (t(), n("a", {
14
+ key: 0,
15
+ href: `#${e.id}`,
16
+ class: "prose-heading-link"
17
+ }, [
18
+ s[0] || (s[0] = p("span", { class: "prose-heading-anchor" }, "#", -1)),
19
+ r(o.$slots, "default")
20
+ ], 8, f)) : r(o.$slots, "default", {}, void 0, void 0, 1)
21
+ ], 8, c));
22
+ }
23
+ });
24
+ export {
25
+ h as default
26
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./ProseH6.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,10 @@
1
+ import { openBlock as r, createElementBlock as e } from "vue";
2
+ import o from "../_virtual/_plugin-vue_export-helper.js";
3
+ const c = {}, t = { class: "prose-hr" };
4
+ function s(n, _) {
5
+ return r(), e("hr", t);
6
+ }
7
+ const m = /* @__PURE__ */ o(c, [["render", s]]);
8
+ export {
9
+ m as default
10
+ };
@@ -0,0 +1,35 @@
1
+ import { defineComponent as r, openBlock as i, createElementBlock as o } from "vue";
2
+ const n = ["src", "alt", "width", "height"], l = /* @__PURE__ */ r({
3
+ __name: "ProseImg",
4
+ props: {
5
+ src: {
6
+ type: String,
7
+ default: ""
8
+ },
9
+ alt: {
10
+ type: String,
11
+ default: ""
12
+ },
13
+ width: {
14
+ type: [String, Number],
15
+ default: void 0
16
+ },
17
+ height: {
18
+ type: [String, Number],
19
+ default: void 0
20
+ }
21
+ },
22
+ setup(e) {
23
+ const t = e;
24
+ return (s, a) => (i(), o("img", {
25
+ class: "prose-img",
26
+ src: t.src,
27
+ alt: t.alt,
28
+ width: t.width,
29
+ height: t.height
30
+ }, null, 8, n));
31
+ }
32
+ });
33
+ export {
34
+ l as default
35
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./ProseImg.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,12 @@
1
+ import { openBlock as o, createElementBlock as r, renderSlot as t } from "vue";
2
+ import s from "../_virtual/_plugin-vue_export-helper.js";
3
+ const c = {}, n = { class: "prose-li" };
4
+ function l(e, _) {
5
+ return o(), r("li", n, [
6
+ t(e.$slots, "default")
7
+ ]);
8
+ }
9
+ const a = /* @__PURE__ */ s(c, [["render", l]]);
10
+ export {
11
+ a as default
12
+ };
@@ -0,0 +1,12 @@
1
+ import { openBlock as o, createElementBlock as r, renderSlot as t } from "vue";
2
+ import s from "../_virtual/_plugin-vue_export-helper.js";
3
+ const c = {}, n = { class: "prose-ol" };
4
+ function l(e, _) {
5
+ return o(), r("ol", n, [
6
+ t(e.$slots, "default")
7
+ ]);
8
+ }
9
+ const d = /* @__PURE__ */ s(c, [["render", l]]);
10
+ export {
11
+ d as default
12
+ };
@@ -0,0 +1,12 @@
1
+ import { openBlock as o, createElementBlock as r, renderSlot as t } from "vue";
2
+ import s from "../_virtual/_plugin-vue_export-helper.js";
3
+ const c = {}, n = { class: "prose-p" };
4
+ function _(e, f) {
5
+ return o(), r("p", n, [
6
+ t(e.$slots, "default")
7
+ ]);
8
+ }
9
+ const a = /* @__PURE__ */ s(c, [["render", _]]);
10
+ export {
11
+ a as default
12
+ };
@@ -0,0 +1,89 @@
1
+ import { defineComponent as c, computed as a, ref as f, openBlock as n, createElementBlock as s, createElementVNode as e, toDisplayString as m, createCommentVNode as h, normalizeClass as y, renderSlot as g } from "vue";
2
+ const v = { class: "prose-pre" }, _ = {
3
+ key: 0,
4
+ class: "prose-pre-filename"
5
+ }, k = { class: "prose-pre-actions" }, C = ["title"], w = {
6
+ key: 0,
7
+ width: "14",
8
+ height: "14",
9
+ viewBox: "0 0 24 24",
10
+ fill: "none",
11
+ stroke: "currentColor",
12
+ "stroke-width": "2"
13
+ }, b = {
14
+ key: 1,
15
+ width: "14",
16
+ height: "14",
17
+ viewBox: "0 0 24 24",
18
+ fill: "none",
19
+ stroke: "currentColor",
20
+ "stroke-width": "2"
21
+ }, x = /* @__PURE__ */ c({
22
+ __name: "ProsePre",
23
+ props: {
24
+ code: {
25
+ type: String,
26
+ default: ""
27
+ },
28
+ language: {
29
+ type: String,
30
+ default: null
31
+ },
32
+ filename: {
33
+ type: String,
34
+ default: null
35
+ },
36
+ highlights: {
37
+ type: Array,
38
+ default: () => []
39
+ },
40
+ meta: {
41
+ type: String,
42
+ default: null
43
+ },
44
+ class: {
45
+ type: String,
46
+ default: null
47
+ }
48
+ },
49
+ setup(p) {
50
+ const t = p, u = a(() => t.filename?.includes(":line-numbers")), r = a(() => t.filename?.replace(":line-numbers", "") || null), l = f(!1);
51
+ async function d() {
52
+ t.code && (await navigator.clipboard.writeText(t.code), l.value = !0, setTimeout(() => l.value = !1, 2e3));
53
+ }
54
+ return (i, o) => (n(), s("div", v, [
55
+ r.value ? (n(), s("div", _, [
56
+ e("span", null, m(r.value), 1)
57
+ ])) : h("", !0),
58
+ e("div", k, [
59
+ e("button", {
60
+ type: "button",
61
+ class: "prose-pre-copy",
62
+ title: l.value ? "Copied" : "Copy Code",
63
+ onClick: d
64
+ }, [
65
+ l.value ? (n(), s("svg", w, [...o[0] || (o[0] = [
66
+ e("path", { d: "M20 6 9 17l-5-5" }, null, -1)
67
+ ])])) : (n(), s("svg", b, [...o[1] || (o[1] = [
68
+ e("rect", {
69
+ x: "9",
70
+ y: "9",
71
+ width: "13",
72
+ height: "13",
73
+ rx: "2"
74
+ }, null, -1),
75
+ e("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }, null, -1)
76
+ ])]))
77
+ ], 8, C)
78
+ ]),
79
+ e("pre", {
80
+ class: y([i.$props.class, { "prose-pre-line-numbers": u.value }])
81
+ }, [
82
+ g(i.$slots, "default")
83
+ ], 2)
84
+ ]));
85
+ }
86
+ });
87
+ export {
88
+ x as default
89
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./ProsePre.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,12 @@
1
+ import { openBlock as e, createElementBlock as r, renderSlot as t } from "vue";
2
+ import s from "../_virtual/_plugin-vue_export-helper.js";
3
+ const n = {}, c = { class: "prose-strong" };
4
+ function _(o, f) {
5
+ return e(), r("strong", c, [
6
+ t(o.$slots, "default")
7
+ ]);
8
+ }
9
+ const d = /* @__PURE__ */ s(n, [["render", _]]);
10
+ export {
11
+ d as default
12
+ };
@@ -0,0 +1,14 @@
1
+ import { openBlock as o, createElementBlock as t, createElementVNode as r, renderSlot as s } from "vue";
2
+ import c from "../_virtual/_plugin-vue_export-helper.js";
3
+ const l = {}, n = { class: "prose-table-scroll" }, a = { class: "prose-table" };
4
+ function _(e, d) {
5
+ return o(), t("div", n, [
6
+ r("table", a, [
7
+ s(e.$slots, "default")
8
+ ])
9
+ ]);
10
+ }
11
+ const m = /* @__PURE__ */ c(l, [["render", _]]);
12
+ export {
13
+ m as default
14
+ };
@@ -0,0 +1,12 @@
1
+ import { openBlock as e, createElementBlock as t, renderSlot as r } from "vue";
2
+ import s from "../_virtual/_plugin-vue_export-helper.js";
3
+ const c = {}, n = { class: "prose-tbody" };
4
+ function d(o, _) {
5
+ return e(), t("tbody", n, [
6
+ r(o.$slots, "default")
7
+ ]);
8
+ }
9
+ const a = /* @__PURE__ */ s(c, [["render", d]]);
10
+ export {
11
+ a as default
12
+ };
@@ -0,0 +1,12 @@
1
+ import { openBlock as o, createElementBlock as t, renderSlot as r } from "vue";
2
+ import s from "../_virtual/_plugin-vue_export-helper.js";
3
+ const c = {}, n = { class: "prose-td" };
4
+ function d(e, _) {
5
+ return o(), t("td", n, [
6
+ r(e.$slots, "default")
7
+ ]);
8
+ }
9
+ const a = /* @__PURE__ */ s(c, [["render", d]]);
10
+ export {
11
+ a as default
12
+ };
@@ -0,0 +1,12 @@
1
+ import { openBlock as o, createElementBlock as t, renderSlot as r } from "vue";
2
+ import s from "../_virtual/_plugin-vue_export-helper.js";
3
+ const c = {}, n = { class: "prose-th" };
4
+ function _(e, f) {
5
+ return o(), t("th", n, [
6
+ r(e.$slots, "default")
7
+ ]);
8
+ }
9
+ const d = /* @__PURE__ */ s(c, [["render", _]]);
10
+ export {
11
+ d as default
12
+ };
@@ -0,0 +1,12 @@
1
+ import { openBlock as o, createElementBlock as t, renderSlot as r } from "vue";
2
+ import s from "../_virtual/_plugin-vue_export-helper.js";
3
+ const c = {}, n = { class: "prose-thead" };
4
+ function a(e, d) {
5
+ return o(), t("thead", n, [
6
+ r(e.$slots, "default")
7
+ ]);
8
+ }
9
+ const l = /* @__PURE__ */ s(c, [["render", a]]);
10
+ export {
11
+ l as default
12
+ };
@@ -0,0 +1,12 @@
1
+ import { openBlock as r, createElementBlock as o, renderSlot as t } from "vue";
2
+ import s from "../_virtual/_plugin-vue_export-helper.js";
3
+ const c = {}, n = { class: "prose-tr" };
4
+ function _(e, f) {
5
+ return r(), o("tr", n, [
6
+ t(e.$slots, "default")
7
+ ]);
8
+ }
9
+ const d = /* @__PURE__ */ s(c, [["render", _]]);
10
+ export {
11
+ d as default
12
+ };
@@ -0,0 +1,12 @@
1
+ import { openBlock as o, createElementBlock as r, renderSlot as t } from "vue";
2
+ import s from "../_virtual/_plugin-vue_export-helper.js";
3
+ const c = {}, n = { class: "prose-ul" };
4
+ function l(e, _) {
5
+ return o(), r("ul", n, [
6
+ t(e.$slots, "default")
7
+ ]);
8
+ }
9
+ const d = /* @__PURE__ */ s(c, [["render", l]]);
10
+ export {
11
+ d as default
12
+ };
package/package.json ADDED
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "@primeui-devkit/vue-markdown",
3
+ "version": "0.1.0-beta.1",
4
+ "description": "Vue renderer for the PrimeUI DevKit markdown AST, plus the Prose* component set. The rendering backend is an internal implementation detail.",
5
+ "license": "SEE LICENSE IN LICENSE.md",
6
+ "type": "module",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./types/index.d.ts",
10
+ "import": "./dist/index.js"
11
+ }
12
+ },
13
+ "files": [
14
+ "dist",
15
+ "types",
16
+ "LICENSE.md",
17
+ "THIRD-PARTY-NOTICES.txt",
18
+ "README.md"
19
+ ],
20
+ "sideEffects": false,
21
+ "dependencies": {
22
+ "@comark/vue": "^0.5.1"
23
+ },
24
+ "peerDependencies": {
25
+ "vue": "^3.5.0"
26
+ },
27
+ "devDependencies": {
28
+ "@vitejs/plugin-vue": "^6.0.0",
29
+ "cross-env": "^10.1.0",
30
+ "typescript": "~6.0.0",
31
+ "vite": "^7.0.0",
32
+ "vitest": "4.1.10",
33
+ "vue": "^3.5.0",
34
+ "vue-tsc": "^3.3.9",
35
+ "@primeui-devkit/ts-config": "0.0.0",
36
+ "@primeui-devkit/markdown-core": "0.1.0-beta.1",
37
+ "@primeui-devkit/bundler": "0.0.0",
38
+ "@primeui-devkit/test-config": "0.0.0"
39
+ },
40
+ "types": "./types/index.d.ts",
41
+ "module": "./dist/index.js",
42
+ "author": "PrimeTek Informatics",
43
+ "bugs": {
44
+ "url": "https://support.primeui.dev"
45
+ },
46
+ "publishConfig": {
47
+ "access": "public"
48
+ },
49
+ "scripts": {
50
+ "build": "pnpm run build:package",
51
+ "build:package": "pnpm run test && vite build",
52
+ "type:check": "vue-tsc --noEmit",
53
+ "test": "cross-env NODE_ENV=test vitest run --passWithNoTests",
54
+ "test:watch": "vitest --watch --passWithNoTests",
55
+ "test:coverage": "vitest run --coverage --passWithNoTests"
56
+ }
57
+ }
@@ -0,0 +1,30 @@
1
+ import type { DefineComponent } from 'vue';
2
+
3
+ export { Comark as Markdown, ComarkRenderer as MarkdownRenderer, defineComarkComponent as defineMarkdownComponent, defineComarkRendererComponent as defineMarkdownRenderer } from '@comark/vue';
4
+
5
+ export declare const ProseA: DefineComponent<{ href?: string; target?: string }>;
6
+ export declare const ProseBlockquote: DefineComponent<Record<string, never>>;
7
+ export declare const ProseCode: DefineComponent<Record<string, never>>;
8
+ export declare const ProseEm: DefineComponent<Record<string, never>>;
9
+ export declare const ProseH1: DefineComponent<{ id?: string }>;
10
+ export declare const ProseH2: DefineComponent<{ id?: string }>;
11
+ export declare const ProseH3: DefineComponent<{ id?: string }>;
12
+ export declare const ProseH4: DefineComponent<{ id?: string }>;
13
+ export declare const ProseH5: DefineComponent<{ id?: string }>;
14
+ export declare const ProseH6: DefineComponent<{ id?: string }>;
15
+ export declare const ProseHr: DefineComponent<Record<string, never>>;
16
+ export declare const ProseImg: DefineComponent<{ src?: string; alt?: string; width?: string | number; height?: string | number }>;
17
+ export declare const ProseLi: DefineComponent<Record<string, never>>;
18
+ export declare const ProseOl: DefineComponent<Record<string, never>>;
19
+ export declare const ProseP: DefineComponent<Record<string, never>>;
20
+ export declare const ProsePre: DefineComponent<{ code?: string; language?: string; filename?: string; highlights?: number[]; meta?: string; class?: string }>;
21
+ export declare const ProseStrong: DefineComponent<Record<string, never>>;
22
+ export declare const ProseTable: DefineComponent<Record<string, never>>;
23
+ export declare const ProseTbody: DefineComponent<Record<string, never>>;
24
+ export declare const ProseTd: DefineComponent<Record<string, never>>;
25
+ export declare const ProseTh: DefineComponent<Record<string, never>>;
26
+ export declare const ProseThead: DefineComponent<Record<string, never>>;
27
+ export declare const ProseTr: DefineComponent<Record<string, never>>;
28
+ export declare const ProseUl: DefineComponent<Record<string, never>>;
29
+
30
+ export declare const proseComponents: Record<string, DefineComponent<any>>;