@primeui-devkit/vue-markdown 0.1.0-rc.2 → 0.1.0-rc.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 +0 -5
- package/THIRD-PARTY-NOTICES.txt +2 -2
- package/dist/index.d.ts +109 -0
- package/dist/index.js +1 -82
- package/package.json +31 -22
- package/dist/_virtual/_plugin-vue_export-helper.js +0 -9
- package/dist/prose/ProseA.vue.js +0 -28
- package/dist/prose/ProseA2.vue.js +0 -4
- package/dist/prose/ProseBlockquote.vue.js +0 -12
- package/dist/prose/ProseCode.vue.js +0 -12
- package/dist/prose/ProseEm.vue.js +0 -12
- package/dist/prose/ProseH1.vue.js +0 -26
- package/dist/prose/ProseH12.vue.js +0 -4
- package/dist/prose/ProseH2.vue.js +0 -26
- package/dist/prose/ProseH22.vue.js +0 -4
- package/dist/prose/ProseH3.vue.js +0 -26
- package/dist/prose/ProseH32.vue.js +0 -4
- package/dist/prose/ProseH4.vue.js +0 -26
- package/dist/prose/ProseH42.vue.js +0 -4
- package/dist/prose/ProseH5.vue.js +0 -26
- package/dist/prose/ProseH52.vue.js +0 -4
- package/dist/prose/ProseH6.vue.js +0 -26
- package/dist/prose/ProseH62.vue.js +0 -4
- package/dist/prose/ProseHr.vue.js +0 -10
- package/dist/prose/ProseImg.vue.js +0 -35
- package/dist/prose/ProseImg2.vue.js +0 -4
- package/dist/prose/ProseLi.vue.js +0 -12
- package/dist/prose/ProseOl.vue.js +0 -12
- package/dist/prose/ProseP.vue.js +0 -12
- package/dist/prose/ProsePre.vue.js +0 -89
- package/dist/prose/ProsePre2.vue.js +0 -4
- package/dist/prose/ProseStrong.vue.js +0 -12
- package/dist/prose/ProseTable.vue.js +0 -14
- package/dist/prose/ProseTbody.vue.js +0 -12
- package/dist/prose/ProseTd.vue.js +0 -12
- package/dist/prose/ProseTh.vue.js +0 -12
- package/dist/prose/ProseThead.vue.js +0 -12
- package/dist/prose/ProseTr.vue.js +0 -12
- package/dist/prose/ProseUl.vue.js +0 -12
- package/types/index.d.ts +0 -30
package/README.md
CHANGED
|
@@ -15,8 +15,3 @@ const components = { ...proseComponents, 'demo-viewer': DemoViewer };
|
|
|
15
15
|
<MarkdownRenderer :tree="tree" :components="components" />
|
|
16
16
|
</template>
|
|
17
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.
|
package/THIRD-PARTY-NOTICES.txt
CHANGED
|
@@ -5,11 +5,11 @@ Each is provided under its own license, reproduced below.
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## @comark/vue 0.5.1
|
|
9
9
|
|
|
10
10
|
Copyright (c) 2026 Comark team and contributors
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
https://comark.dev/rendering/vue
|
|
13
13
|
|
|
14
14
|
Licensed under the MIT License.
|
|
15
15
|
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
export { Comark as Markdown, ComarkRenderer as MarkdownRenderer, defineComarkComponent as defineMarkdownComponent, defineComarkRendererComponent as defineMarkdownRenderer } from '@comark/vue';
|
|
2
|
+
import { DefineComponent } from 'vue';
|
|
3
|
+
|
|
4
|
+
declare const ProseA: DefineComponent<{
|
|
5
|
+
href?: string;
|
|
6
|
+
target?: string;
|
|
7
|
+
}>;
|
|
8
|
+
declare const ProseBlockquote: DefineComponent<Record<string, never>>;
|
|
9
|
+
declare const ProseCode: DefineComponent<Record<string, never>>;
|
|
10
|
+
declare const ProseEm: DefineComponent<Record<string, never>>;
|
|
11
|
+
declare const ProseH1: DefineComponent<{
|
|
12
|
+
id?: string;
|
|
13
|
+
}>;
|
|
14
|
+
declare const ProseH2: DefineComponent<{
|
|
15
|
+
id?: string;
|
|
16
|
+
}>;
|
|
17
|
+
declare const ProseH3: DefineComponent<{
|
|
18
|
+
id?: string;
|
|
19
|
+
}>;
|
|
20
|
+
declare const ProseH4: DefineComponent<{
|
|
21
|
+
id?: string;
|
|
22
|
+
}>;
|
|
23
|
+
declare const ProseH5: DefineComponent<{
|
|
24
|
+
id?: string;
|
|
25
|
+
}>;
|
|
26
|
+
declare const ProseH6: DefineComponent<{
|
|
27
|
+
id?: string;
|
|
28
|
+
}>;
|
|
29
|
+
declare const ProseHr: DefineComponent<Record<string, never>>;
|
|
30
|
+
declare const ProseImg: DefineComponent<{
|
|
31
|
+
src?: string;
|
|
32
|
+
alt?: string;
|
|
33
|
+
width?: string | number;
|
|
34
|
+
height?: string | number;
|
|
35
|
+
}>;
|
|
36
|
+
declare const ProseLi: DefineComponent<Record<string, never>>;
|
|
37
|
+
declare const ProseOl: DefineComponent<Record<string, never>>;
|
|
38
|
+
declare const ProseP: DefineComponent<Record<string, never>>;
|
|
39
|
+
declare const ProsePre: DefineComponent<{
|
|
40
|
+
code?: string;
|
|
41
|
+
language?: string;
|
|
42
|
+
filename?: string;
|
|
43
|
+
highlights?: number[];
|
|
44
|
+
meta?: string;
|
|
45
|
+
class?: string;
|
|
46
|
+
}>;
|
|
47
|
+
declare const ProseStrong: DefineComponent<Record<string, never>>;
|
|
48
|
+
declare const ProseTable: DefineComponent<Record<string, never>>;
|
|
49
|
+
declare const ProseTbody: DefineComponent<Record<string, never>>;
|
|
50
|
+
declare const ProseTd: DefineComponent<Record<string, never>>;
|
|
51
|
+
declare const ProseTh: DefineComponent<Record<string, never>>;
|
|
52
|
+
declare const ProseThead: DefineComponent<Record<string, never>>;
|
|
53
|
+
declare const ProseTr: DefineComponent<Record<string, never>>;
|
|
54
|
+
declare const ProseUl: DefineComponent<Record<string, never>>;
|
|
55
|
+
declare const proseComponents: {
|
|
56
|
+
ProseA: DefineComponent<{
|
|
57
|
+
href?: string;
|
|
58
|
+
target?: string;
|
|
59
|
+
}>;
|
|
60
|
+
ProseBlockquote: DefineComponent<Record<string, never>>;
|
|
61
|
+
ProseCode: DefineComponent<Record<string, never>>;
|
|
62
|
+
ProseEm: DefineComponent<Record<string, never>>;
|
|
63
|
+
ProseH1: DefineComponent<{
|
|
64
|
+
id?: string;
|
|
65
|
+
}>;
|
|
66
|
+
ProseH2: DefineComponent<{
|
|
67
|
+
id?: string;
|
|
68
|
+
}>;
|
|
69
|
+
ProseH3: DefineComponent<{
|
|
70
|
+
id?: string;
|
|
71
|
+
}>;
|
|
72
|
+
ProseH4: DefineComponent<{
|
|
73
|
+
id?: string;
|
|
74
|
+
}>;
|
|
75
|
+
ProseH5: DefineComponent<{
|
|
76
|
+
id?: string;
|
|
77
|
+
}>;
|
|
78
|
+
ProseH6: DefineComponent<{
|
|
79
|
+
id?: string;
|
|
80
|
+
}>;
|
|
81
|
+
ProseHr: DefineComponent<Record<string, never>>;
|
|
82
|
+
ProseImg: DefineComponent<{
|
|
83
|
+
src?: string;
|
|
84
|
+
alt?: string;
|
|
85
|
+
width?: string | number;
|
|
86
|
+
height?: string | number;
|
|
87
|
+
}>;
|
|
88
|
+
ProseLi: DefineComponent<Record<string, never>>;
|
|
89
|
+
ProseOl: DefineComponent<Record<string, never>>;
|
|
90
|
+
ProseP: DefineComponent<Record<string, never>>;
|
|
91
|
+
ProsePre: DefineComponent<{
|
|
92
|
+
code?: string;
|
|
93
|
+
language?: string;
|
|
94
|
+
filename?: string;
|
|
95
|
+
highlights?: number[];
|
|
96
|
+
meta?: string;
|
|
97
|
+
class?: string;
|
|
98
|
+
}>;
|
|
99
|
+
ProseStrong: DefineComponent<Record<string, never>>;
|
|
100
|
+
ProseTable: DefineComponent<Record<string, never>>;
|
|
101
|
+
ProseTbody: DefineComponent<Record<string, never>>;
|
|
102
|
+
ProseTd: DefineComponent<Record<string, never>>;
|
|
103
|
+
ProseTh: DefineComponent<Record<string, never>>;
|
|
104
|
+
ProseThead: DefineComponent<Record<string, never>>;
|
|
105
|
+
ProseTr: DefineComponent<Record<string, never>>;
|
|
106
|
+
ProseUl: DefineComponent<Record<string, never>>;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
export { ProseA, ProseBlockquote, ProseCode, ProseEm, ProseH1, ProseH2, ProseH3, ProseH4, ProseH5, ProseH6, ProseHr, ProseImg, ProseLi, ProseOl, ProseP, ProsePre, ProseStrong, ProseTable, ProseTbody, ProseTd, ProseTh, ProseThead, ProseTr, ProseUl, proseComponents };
|
package/dist/index.js
CHANGED
|
@@ -1,82 +1 @@
|
|
|
1
|
-
import
|
|
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
|
-
};
|
|
1
|
+
import{Comark as e,ComarkRenderer as t,defineComarkComponent as n,defineComarkRendererComponent as r}from"@comark/vue";import{computed as i,createCommentVNode as ee,createElementBlock as a,createElementVNode as o,defineComponent as s,normalizeClass as te,openBlock as c,ref as ne,renderSlot as l,toDisplayString as re}from"vue";const u=[`href`,`target`],ie=/*@__PURE__*/ s({__name:`ProseA`,props:{href:{type:String,default:``},target:{type:String,default:void 0,required:!1}},setup(e){let t=e;return(e,n)=>(c(),a(`a`,{class:`prose-a`,href:t.href,target:t.target},[l(e.$slots,`default`)],8,u))}});var d=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n};const ae={},oe={class:`prose-blockquote`};function se(e,t){return c(),a(`blockquote`,oe,[l(e.$slots,`default`)])}var ce=/*#__PURE__*/ d(ae,[[`render`,se]]);const le={},ue={class:`prose-code`};function de(e,t){return c(),a(`code`,ue,[l(e.$slots,`default`)])}var fe=/*#__PURE__*/ d(le,[[`render`,de]]);const pe={},me={class:`prose-em`};function he(e,t){return c(),a(`em`,me,[l(e.$slots,`default`)])}var ge=/*#__PURE__*/ d(pe,[[`render`,he]]);const _e=[`id`],ve=[`href`],ye=/*@__PURE__*/ s({__name:`ProseH1`,props:{id:{type:String,required:!1}},setup(e){let t=e,n=i(()=>!!t.id);return(e,r)=>(c(),a(`h1`,{id:t.id,class:`prose-h1`},[t.id&&n.value?(c(),a(`a`,{key:0,href:`#${t.id}`,class:`prose-heading-link`},[r[0]||=o(`span`,{class:`prose-heading-anchor`},`#`,-1),l(e.$slots,`default`)],8,ve)):l(e.$slots,`default`,{},void 0,void 0,1)],8,_e))}}),be=[`id`],xe=[`href`],Se=/*@__PURE__*/ s({__name:`ProseH2`,props:{id:{type:String,required:!1}},setup(e){let t=e,n=i(()=>!!t.id);return(e,r)=>(c(),a(`h2`,{id:t.id,class:`prose-h2`},[t.id&&n.value?(c(),a(`a`,{key:0,href:`#${t.id}`,class:`prose-heading-link`},[r[0]||=o(`span`,{class:`prose-heading-anchor`},`#`,-1),l(e.$slots,`default`)],8,xe)):l(e.$slots,`default`,{},void 0,void 0,1)],8,be))}}),Ce=[`id`],we=[`href`],Te=/*@__PURE__*/ s({__name:`ProseH3`,props:{id:{type:String,required:!1}},setup(e){let t=e,n=i(()=>!!t.id);return(e,r)=>(c(),a(`h3`,{id:t.id,class:`prose-h3`},[t.id&&n.value?(c(),a(`a`,{key:0,href:`#${t.id}`,class:`prose-heading-link`},[r[0]||=o(`span`,{class:`prose-heading-anchor`},`#`,-1),l(e.$slots,`default`)],8,we)):l(e.$slots,`default`,{},void 0,void 0,1)],8,Ce))}}),f=[`id`],p=[`href`],m=/*@__PURE__*/ s({__name:`ProseH4`,props:{id:{type:String,required:!1}},setup(e){let t=e,n=i(()=>!!t.id);return(e,r)=>(c(),a(`h4`,{id:t.id,class:`prose-h4`},[t.id&&n.value?(c(),a(`a`,{key:0,href:`#${t.id}`,class:`prose-heading-link`},[r[0]||=o(`span`,{class:`prose-heading-anchor`},`#`,-1),l(e.$slots,`default`)],8,p)):l(e.$slots,`default`,{},void 0,void 0,1)],8,f))}}),h=[`id`],g=[`href`],_=/*@__PURE__*/ s({__name:`ProseH5`,props:{id:{type:String,required:!1}},setup(e){let t=e,n=i(()=>!!t.id);return(e,r)=>(c(),a(`h5`,{id:t.id,class:`prose-h5`},[t.id&&n.value?(c(),a(`a`,{key:0,href:`#${t.id}`,class:`prose-heading-link`},[r[0]||=o(`span`,{class:`prose-heading-anchor`},`#`,-1),l(e.$slots,`default`)],8,g)):l(e.$slots,`default`,{},void 0,void 0,1)],8,h))}}),v=[`id`],y=[`href`],b=/*@__PURE__*/ s({__name:`ProseH6`,props:{id:{type:String,required:!1}},setup(e){let t=e,n=i(()=>!!t.id);return(e,r)=>(c(),a(`h6`,{id:t.id,class:`prose-h6`},[t.id&&n.value?(c(),a(`a`,{key:0,href:`#${t.id}`,class:`prose-heading-link`},[r[0]||=o(`span`,{class:`prose-heading-anchor`},`#`,-1),l(e.$slots,`default`)],8,y)):l(e.$slots,`default`,{},void 0,void 0,1)],8,v))}}),x={},S={class:`prose-hr`};function C(e,t){return c(),a(`hr`,S)}var w=/*#__PURE__*/ d(x,[[`render`,C]]);const T=[`src`,`alt`,`width`,`height`],E=/*@__PURE__*/ s({__name:`ProseImg`,props:{src:{type:String,default:``},alt:{type:String,default:``},width:{type:[String,Number],default:void 0},height:{type:[String,Number],default:void 0}},setup(e){let t=e;return(e,n)=>(c(),a(`img`,{class:`prose-img`,src:t.src,alt:t.alt,width:t.width,height:t.height},null,8,T))}}),D={},O={class:`prose-li`};function Ee(e,t){return c(),a(`li`,O,[l(e.$slots,`default`)])}var De=/*#__PURE__*/ d(D,[[`render`,Ee]]);const Oe={},ke={class:`prose-ol`};function Ae(e,t){return c(),a(`ol`,ke,[l(e.$slots,`default`)])}var je=/*#__PURE__*/ d(Oe,[[`render`,Ae]]);const Me={},Ne={class:`prose-p`};function Pe(e,t){return c(),a(`p`,Ne,[l(e.$slots,`default`)])}var Fe=/*#__PURE__*/ d(Me,[[`render`,Pe]]);const Ie={class:`prose-pre`},Le={key:0,class:`prose-pre-filename`},Re={class:`prose-pre-actions`},ze=[`title`],Be={key:0,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`},Ve={key:1,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`},He=/*@__PURE__*/ s({__name:`ProsePre`,props:{code:{type:String,default:``},language:{type:String,default:null},filename:{type:String,default:null},highlights:{type:Array,default:()=>[]},meta:{type:String,default:null},class:{type:String,default:null}},setup(e){let t=e,n=i(()=>t.filename?.includes(`:line-numbers`)),r=i(()=>t.filename?.replace(`:line-numbers`,``)||null),s=ne(!1);async function u(){t.code&&(await navigator.clipboard.writeText(t.code),s.value=!0,setTimeout(()=>s.value=!1,2e3))}return(e,t)=>(c(),a(`div`,Ie,[r.value?(c(),a(`div`,Le,[o(`span`,null,re(r.value),1)])):ee(``,!0),o(`div`,Re,[o(`button`,{type:`button`,class:`prose-pre-copy`,title:s.value?`Copied`:`Copy Code`,onClick:u},[s.value?(c(),a(`svg`,Be,[...t[0]||=[o(`path`,{d:`M20 6 9 17l-5-5`},null,-1)]])):(c(),a(`svg`,Ve,[...t[1]||=[o(`rect`,{x:`9`,y:`9`,width:`13`,height:`13`,rx:`2`},null,-1),o(`path`,{d:`M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1`},null,-1)]]))],8,ze)]),o(`pre`,{class:te([e.$props.class,{"prose-pre-line-numbers":n.value}])},[l(e.$slots,`default`)],2)]))}}),k={},Ue={class:`prose-strong`};function We(e,t){return c(),a(`strong`,Ue,[l(e.$slots,`default`)])}var Ge=/*#__PURE__*/ d(k,[[`render`,We]]);const Ke={},qe={class:`prose-table-scroll`},Je={class:`prose-table`};function Ye(e,t){return c(),a(`div`,qe,[o(`table`,Je,[l(e.$slots,`default`)])])}var Xe=/*#__PURE__*/ d(Ke,[[`render`,Ye]]);const Ze={},Qe={class:`prose-tbody`};function $e(e,t){return c(),a(`tbody`,Qe,[l(e.$slots,`default`)])}var et=/*#__PURE__*/ d(Ze,[[`render`,$e]]);const tt={},nt={class:`prose-td`};function rt(e,t){return c(),a(`td`,nt,[l(e.$slots,`default`)])}var it=/*#__PURE__*/ d(tt,[[`render`,rt]]);const at={},ot={class:`prose-th`};function st(e,t){return c(),a(`th`,ot,[l(e.$slots,`default`)])}var ct=/*#__PURE__*/ d(at,[[`render`,st]]);const lt={},ut={class:`prose-thead`};function dt(e,t){return c(),a(`thead`,ut,[l(e.$slots,`default`)])}var ft=/*#__PURE__*/ d(lt,[[`render`,dt]]);const pt={},mt={class:`prose-tr`};function ht(e,t){return c(),a(`tr`,mt,[l(e.$slots,`default`)])}var gt=/*#__PURE__*/ d(pt,[[`render`,ht]]);const _t={},vt={class:`prose-ul`};function yt(e,t){return c(),a(`ul`,vt,[l(e.$slots,`default`)])}var bt=/*#__PURE__*/ d(_t,[[`render`,yt]]);const A=ie,j=ce,M=fe,N=ge,P=ye,F=Se,I=Te,L=m,R=_,z=b,B=w,V=E,H=De,U=je,W=Fe,G=He,K=Ge,q=Xe,J=et,Y=it,X=ct,Z=ft,Q=gt,$=bt,xt={ProseA:A,ProseBlockquote:j,ProseCode:M,ProseEm:N,ProseH1:P,ProseH2:F,ProseH3:I,ProseH4:L,ProseH5:R,ProseH6:z,ProseHr:B,ProseImg:V,ProseLi:H,ProseOl:U,ProseP:W,ProsePre:G,ProseStrong:K,ProseTable:q,ProseTbody:J,ProseTd:Y,ProseTh:X,ProseThead:Z,ProseTr:Q,ProseUl:$};export{e as Markdown,t as MarkdownRenderer,A as ProseA,j as ProseBlockquote,M as ProseCode,N as ProseEm,P as ProseH1,F as ProseH2,I as ProseH3,L as ProseH4,R as ProseH5,z as ProseH6,B as ProseHr,V as ProseImg,H as ProseLi,U as ProseOl,W as ProseP,G as ProsePre,K as ProseStrong,q as ProseTable,J as ProseTbody,Y as ProseTd,X as ProseTh,Z as ProseThead,Q as ProseTr,$ as ProseUl,n as defineMarkdownComponent,r as defineMarkdownRenderer,xt as proseComponents};
|
package/package.json
CHANGED
|
@@ -1,23 +1,39 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primeui-devkit/vue-markdown",
|
|
3
|
-
"version": "0.1.0-rc.
|
|
3
|
+
"version": "0.1.0-rc.3",
|
|
4
|
+
"author": "PrimeTek Informatics",
|
|
4
5
|
"description": "Vue renderer for the PrimeUI DevKit markdown AST, plus the Prose* component set. The rendering backend is an internal implementation detail.",
|
|
5
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/primefaces/primeui-devkit.git",
|
|
10
|
+
"directory": "packages/markdown/vue-markdown"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://support.primeui.dev"
|
|
14
|
+
},
|
|
6
15
|
"type": "module",
|
|
16
|
+
"main": "./dist/index.js",
|
|
17
|
+
"module": "./dist/index.js",
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
7
19
|
"exports": {
|
|
8
20
|
".": {
|
|
9
|
-
"types": "./
|
|
10
|
-
"import": "./dist/index.js"
|
|
11
|
-
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"import": "./dist/index.js",
|
|
23
|
+
"default": "./dist/index.js"
|
|
24
|
+
},
|
|
25
|
+
"./package.json": "./package.json"
|
|
26
|
+
},
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"access": "public"
|
|
12
29
|
},
|
|
30
|
+
"sideEffects": false,
|
|
13
31
|
"files": [
|
|
14
32
|
"dist",
|
|
15
|
-
"types",
|
|
16
33
|
"LICENSE.md",
|
|
17
34
|
"THIRD-PARTY-NOTICES.txt",
|
|
18
35
|
"README.md"
|
|
19
36
|
],
|
|
20
|
-
"sideEffects": false,
|
|
21
37
|
"dependencies": {
|
|
22
38
|
"@comark/vue": "^0.5.1"
|
|
23
39
|
},
|
|
@@ -25,30 +41,23 @@
|
|
|
25
41
|
"vue": "^3.5.0"
|
|
26
42
|
},
|
|
27
43
|
"devDependencies": {
|
|
28
|
-
"@vitejs/plugin-vue": "^6.0.0",
|
|
29
44
|
"cross-env": "^10.1.0",
|
|
30
45
|
"typescript": "~6.0.0",
|
|
31
|
-
"
|
|
32
|
-
"vitest": "4.1.10",
|
|
46
|
+
"vitest": "4.1.11",
|
|
33
47
|
"vue": "^3.5.0",
|
|
34
48
|
"vue-tsc": "^3.3.9",
|
|
35
|
-
"@primeui-devkit/
|
|
36
|
-
"@primeui-devkit/
|
|
37
|
-
"@primeui-devkit/
|
|
38
|
-
"@primeui-devkit/
|
|
49
|
+
"@primeui-devkit/test-config": "0.1.0-rc.1",
|
|
50
|
+
"@primeui-devkit/cli": "0.1.0-rc.1",
|
|
51
|
+
"@primeui-devkit/markdown-core": "0.1.0-rc.3",
|
|
52
|
+
"@primeui-devkit/ts-config": "0.1.0-rc.1",
|
|
53
|
+
"@primeui-devkit/bundle": "0.1.0-rc.1"
|
|
39
54
|
},
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
"author": "PrimeTek Informatics",
|
|
43
|
-
"bugs": {
|
|
44
|
-
"url": "https://support.primeui.dev"
|
|
45
|
-
},
|
|
46
|
-
"publishConfig": {
|
|
47
|
-
"access": "public"
|
|
55
|
+
"engines": {
|
|
56
|
+
"node": ">=22.18.0"
|
|
48
57
|
},
|
|
49
58
|
"scripts": {
|
|
50
59
|
"build": "pnpm run build:package",
|
|
51
|
-
"build:package": "pnpm run test &&
|
|
60
|
+
"build:package": "pnpm run test && devkit bundle build",
|
|
52
61
|
"type:check": "vue-tsc --noEmit",
|
|
53
62
|
"test": "cross-env NODE_ENV=test vitest run --passWithNoTests",
|
|
54
63
|
"test:watch": "vitest --watch --passWithNoTests",
|
package/dist/prose/ProseA.vue.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
-
};
|
package/dist/prose/ProseP.vue.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,89 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
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/types/index.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
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>>;
|