md-editor-v3 4.8.3 → 4.9.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.
- package/LICENSE +1 -1
- package/README.md +12 -11
- package/lib/cjs/MdCatalog.cjs +1 -1
- package/lib/es/MdCatalog.mjs +94 -88
- package/lib/types/MdCatalog/MdCatalog.d.ts +9 -2
- package/lib/types/MdCatalog/index.d.ts +17 -3
- package/lib/umd/index.js +26 -26
- package/package.json +2 -2
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2021 imzbf
|
|
3
|
+
Copyright (c) 2021 imzbf
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
6
|
|
package/README.md
CHANGED
|
@@ -115,7 +115,7 @@ Inputing prompt and mark, emoji extensions
|
|
|
115
115
|
| noKatex | `boolean` | false | Use katex or not |
|
|
116
116
|
| codeTheme | `'atom' \| 'a11y' \| 'github' \| 'gradient' \| 'kimbie' \| 'paraiso' \| 'qtcreator' \| 'stackoverflow'` | 'atom' | Highlight code style, can be customized also |
|
|
117
117
|
| mdHeadingId | `(text: string, level: number, index: number) => string` | (text) => text | H1-H6 `ID` generator |
|
|
118
|
-
| sanitize | `(html: string) => string` | (html) => html | Sanitize the html, prevent XSS |
|
|
118
|
+
| sanitize | `(html: string) => string` | (html) => html | Sanitize the html, prevent XSS. After 3.x, dangerous code has been processed by default. Please do not use this attribute unless there are special requirements |
|
|
119
119
|
| noIconfont | `boolean` | false | Not append iconfont script, download different versions [SVG](https://at.alicdn.com/t/c/font_2605852_prouiefeic.js)或[Font Class](https://at.alicdn.com/t/c/font_2605852_prouiefeic.css) and import it by yourself |
|
|
120
120
|
| formatCopiedText | `(text: string) => string` | (text: string) => text | Format copied code |
|
|
121
121
|
| codeStyleReverse | `boolean` | true | Code style will be reversed to dark while code block of the theme has a dark background |
|
|
@@ -310,15 +310,15 @@ Except for the same as `MdPreview`:
|
|
|
310
310
|
|
|
311
311
|
| name | type | description |
|
|
312
312
|
| --- | --- | --- |
|
|
313
|
-
| onChange | `value: string` | Content changed
|
|
314
|
-
| onSave | `value: string, html: Promise<string>` | Saving content
|
|
315
|
-
| onUploadImg | `files: Array<File>, callback: (urls: Array<string>) => void` | Uploading picture
|
|
313
|
+
| onChange | `value: string` | Content changed(bind to `oninput` of `textarea`) |
|
|
314
|
+
| onSave | `value: string, html: Promise<string>` | Saving content, `ctrl+s` and clicking button will trigger it |
|
|
315
|
+
| onUploadImg | `files: Array<File>, callback: (urls: Array<string>) => void` | Uploading picture, when picture is uploading the modal will not close, please provide right urls to the callback function |
|
|
316
316
|
| onError | `err: { name: 'Cropper' \| 'fullscreen' \| 'prettier' \| 'overlength'; message: string }` | Catch run-time error, `Cropper`, `fullscreen` and `prettier` are used when they are not loaded. And content exceeds the length limit error |
|
|
317
317
|
| onBlur | `event: FocusEvent` | Textarea has lost focus |
|
|
318
318
|
| onFocus | `event: FocusEvent` | Textarea has received focus |
|
|
319
319
|
| onInput | `event: Event` | Element gets input |
|
|
320
|
-
| onDrop | `event: DragEvent` |
|
|
321
|
-
| onInputBoxWitdhChange | `(width: string) => void` |
|
|
320
|
+
| onDrop | `event: DragEvent` | Selection is being dragged |
|
|
321
|
+
| onInputBoxWitdhChange | `(width: string) => void` | Width of input box has been changed |
|
|
322
322
|
|
|
323
323
|
### 🎍 Slots
|
|
324
324
|
|
|
@@ -742,8 +742,8 @@ On-demand import. For more examples, refer to [document](https://imzbf.github.io
|
|
|
742
742
|
- **events**
|
|
743
743
|
|
|
744
744
|
- `onClick`: `() => void`, necessary.
|
|
745
|
-
- `onClose`: `() => void`, necessary,
|
|
746
|
-
- `onAdjust`: `(val: boolean) => void`, fullscreen button
|
|
745
|
+
- `onClose`: `() => void`, necessary, closed event.
|
|
746
|
+
- `onAdjust`: `(val: boolean) => void`, fullscreen button was clicked.
|
|
747
747
|
|
|
748
748
|
- **slots**
|
|
749
749
|
|
|
@@ -766,7 +766,8 @@ On-demand import. For more examples, refer to [document](https://imzbf.github.io
|
|
|
766
766
|
|
|
767
767
|
- **events**
|
|
768
768
|
|
|
769
|
-
- `onClick`: `(e: MouseEvent, t: TocItem) => void`, not necessary.
|
|
769
|
+
- `onClick`: `(e: MouseEvent, t: TocItem) => void`, not necessary, heading was clicked.
|
|
770
|
+
- `onActive`: `(heading: HeadList | undefined) => void`, not necessary, heading was highlighted.
|
|
770
771
|
|
|
771
772
|
### 🛸 MdModal
|
|
772
773
|
|
|
@@ -785,8 +786,8 @@ On-demand import. For more examples, refer to [document](https://imzbf.github.io
|
|
|
785
786
|
|
|
786
787
|
- **events**
|
|
787
788
|
|
|
788
|
-
- `onClose`: `() => void`, necessary,
|
|
789
|
-
- `onAdjust`: `(val: boolean) => void`, fullscreen button
|
|
789
|
+
- `onClose`: `() => void`, necessary, closed event.
|
|
790
|
+
- `onAdjust`: `(val: boolean) => void`, fullscreen button was clicked.
|
|
790
791
|
|
|
791
792
|
- **slots**
|
|
792
793
|
|
package/lib/cjs/MdCatalog.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const n=require("vue"),h=require("./chunks/config.cjs"),g=require("./chunks/index4.cjs"),C={tocItem:{type:Object,default:()=>({})},mdHeadingId:{type:Function,default:()=>{}},scrollElement:{type:[String,Object],default:""},onClick:{type:Function,default:()=>{}},scrollElementOffsetTop:{type:Number,default:0}},I=n.defineComponent({props:C,setup(l){return()=>{const{tocItem:o,mdHeadingId:m,scrollElement:c,onClick:f,scrollElementOffsetTop:E}=l;return n.createVNode("div",{class:[`${h.prefix}-catalog-link`,o.active&&`${h.prefix}-catalog-active`],onClick:i=>{f(i,o),i.stopPropagation();const p=m(o.text,o.level,o.index),a=document.getElementById(p),t=c instanceof Element?c:document.querySelector(c);if(a&&t){let e=a.offsetParent,s=a.offsetTop;if(t.contains(e))for(;e&&t!=e;)s+=e==null?void 0:e.offsetTop,e=e==null?void 0:e.offsetParent;t==null||t.scrollTo({top:s-E,behavior:"smooth"})}}},[n.createVNode("span",{title:o.text},[o.text]),n.createVNode("div",{class:`${h.prefix}-catalog-wrapper`},[o.children&&o.children.map(i=>n.createVNode(I,{mdHeadingId:m,key:`${o.text}-link-${i.level}-${i.text}`,tocItem:i,scrollElement:c,onClick:f,scrollElementOffsetTop:E},null))])])}}}),H=I,x={editorId:{type:String},class:{type:String,default:""},mdHeadingId:{type:Function,default:l=>l},scrollElement:{type:[String,Object]},theme:{type:String,default:"light"},offsetTop:{type:Number,default:20},scrollElementOffsetTop:{type:Number,default:0},onClick:{type:Function},onActive:{type:Function}},$=n.defineComponent({name:"MdCatalog",props:x,emits:["onClick","onActive"],setup(l,o){const m=l.editorId,c=n.reactive({list:[],show:!1,scrollElement:l.scrollElement||`#${m}-preview-wrapper`}),f=n.shallowRef(),E=n.computed(()=>{const t=[];return c.list.forEach((e,s)=>{const{text:v,level:y}=e,r={level:y,text:v,index:s+1,active:f.value===e};if(t.length===0)t.push(r);else{let d=t[t.length-1];if(r.level>d.level)for(let u=d.level+1;u<=6;u++){const{children:T}=d;if(!T){d.children=[r];break}if(d=T[T.length-1],r.level<=d.level){T.push(r);break}}else t.push(r)}}),t}),i=()=>c.scrollElement instanceof HTMLElement?c.scrollElement:document.querySelector(c.scrollElement),p=t=>{if(t.length===0)return c.list=[],!1;const{activeHead:e}=t.reduce((s,v,y)=>{const r=document.getElementById(l.mdHeadingId(v.text,v.level,y+1));if(r instanceof HTMLElement){const d=i(),u=g.getRelativeTop(r,d);if(u<l.offsetTop&&u>s.minTop)return{activeHead:v,minTop:u}}return s},{activeHead:t[0],minTop:Number.MIN_SAFE_INTEGER});f.value=e,c.list=t},a=()=>{p(c.list)};return n.watch(()=>f.value,t=>{const e=t?{...t}:void 0;l.onActive?l.onActive(e):o.emit("onActive",e)}),n.onMounted(()=>{const t=i(),e=t===document.documentElement?window:t;e==null||e.addEventListener("scroll",a),g.bus.on(m,{name:g.CATALOG_CHANGED,callback:s=>{e==null||e.removeEventListener("scroll",a),p(s),e==null||e.addEventListener("scroll",a)}}),g.bus.emit(m,g.PUSH_CATALOG)}),n.onBeforeUnmount(()=>{var e;const t=i();(e=t===document.documentElement?window:t)==null||e.removeEventListener("scroll",a)}),()=>n.createVNode("div",{class:`${h.prefix}-catalog${l.theme==="dark"?"-dark":""} ${l.class}`},[E.value.map(t=>n.createVNode(H,{mdHeadingId:l.mdHeadingId,tocItem:t,key:`link-${t.level}-${t.text}`,scrollElement:c.scrollElement,onClick:(e,s)=>{l.onClick?l.onClick(e,s):o.emit("onClick",e,s)},scrollElementOffsetTop:l.scrollElementOffsetTop},null))])}}),k=$;k.install=l=>(l.component(k.name,k),l);module.exports=k;
|
package/lib/es/MdCatalog.mjs
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { throttle as w } from "@vavt/util";
|
|
1
|
+
import { defineComponent as I, createVNode as u, reactive as H, shallowRef as $, computed as b, watch as A, onMounted as w, onBeforeUnmount as x } from "vue";
|
|
3
2
|
import { p as T } from "./chunks/config.mjs";
|
|
4
|
-
import {
|
|
5
|
-
const
|
|
3
|
+
import { b as y, C as O, P as L, g as S } from "./chunks/index4.mjs";
|
|
4
|
+
const N = {
|
|
6
5
|
tocItem: {
|
|
7
6
|
type: Object,
|
|
8
7
|
default: () => ({})
|
|
@@ -25,44 +24,44 @@ const A = {
|
|
|
25
24
|
type: Number,
|
|
26
25
|
default: 0
|
|
27
26
|
}
|
|
28
|
-
}, C = /* @__PURE__ */
|
|
29
|
-
props:
|
|
27
|
+
}, C = /* @__PURE__ */ I({
|
|
28
|
+
props: N,
|
|
30
29
|
setup(l) {
|
|
31
30
|
return () => {
|
|
32
31
|
const {
|
|
33
|
-
tocItem:
|
|
34
|
-
mdHeadingId:
|
|
35
|
-
scrollElement:
|
|
36
|
-
onClick:
|
|
37
|
-
scrollElementOffsetTop:
|
|
32
|
+
tocItem: n,
|
|
33
|
+
mdHeadingId: d,
|
|
34
|
+
scrollElement: o,
|
|
35
|
+
onClick: m,
|
|
36
|
+
scrollElementOffsetTop: v
|
|
38
37
|
} = l;
|
|
39
|
-
return
|
|
40
|
-
class: [`${T}-catalog-link`,
|
|
38
|
+
return u("div", {
|
|
39
|
+
class: [`${T}-catalog-link`, n.active && `${T}-catalog-active`],
|
|
41
40
|
onClick: (s) => {
|
|
42
|
-
|
|
43
|
-
const
|
|
44
|
-
if (
|
|
45
|
-
let
|
|
46
|
-
if (
|
|
47
|
-
for (;
|
|
48
|
-
c +=
|
|
49
|
-
|
|
50
|
-
top: c -
|
|
41
|
+
m(s, n), s.stopPropagation();
|
|
42
|
+
const E = d(n.text, n.level, n.index), a = document.getElementById(E), t = o instanceof Element ? o : document.querySelector(o);
|
|
43
|
+
if (a && t) {
|
|
44
|
+
let e = a.offsetParent, c = a.offsetTop;
|
|
45
|
+
if (t.contains(e))
|
|
46
|
+
for (; e && t != e; )
|
|
47
|
+
c += e == null ? void 0 : e.offsetTop, e = e == null ? void 0 : e.offsetParent;
|
|
48
|
+
t == null || t.scrollTo({
|
|
49
|
+
top: c - v,
|
|
51
50
|
behavior: "smooth"
|
|
52
51
|
});
|
|
53
52
|
}
|
|
54
53
|
}
|
|
55
|
-
}, [
|
|
56
|
-
title:
|
|
57
|
-
}, [
|
|
54
|
+
}, [u("span", {
|
|
55
|
+
title: n.text
|
|
56
|
+
}, [n.text]), u("div", {
|
|
58
57
|
class: `${T}-catalog-wrapper`
|
|
59
|
-
}, [
|
|
60
|
-
mdHeadingId:
|
|
61
|
-
key: `${
|
|
58
|
+
}, [n.children && n.children.map((s) => u(C, {
|
|
59
|
+
mdHeadingId: d,
|
|
60
|
+
key: `${n.text}-link-${s.level}-${s.text}`,
|
|
62
61
|
tocItem: s,
|
|
63
|
-
scrollElement:
|
|
64
|
-
onClick:
|
|
65
|
-
scrollElementOffsetTop:
|
|
62
|
+
scrollElement: o,
|
|
63
|
+
onClick: m,
|
|
64
|
+
scrollElementOffsetTop: v
|
|
66
65
|
}, null))])]);
|
|
67
66
|
};
|
|
68
67
|
}
|
|
@@ -114,96 +113,103 @@ const A = {
|
|
|
114
113
|
},
|
|
115
114
|
onClick: {
|
|
116
115
|
type: Function
|
|
116
|
+
},
|
|
117
|
+
onActive: {
|
|
118
|
+
type: Function
|
|
117
119
|
}
|
|
118
|
-
}, P = /* @__PURE__ */
|
|
120
|
+
}, P = /* @__PURE__ */ I({
|
|
119
121
|
name: "MdCatalog",
|
|
120
122
|
props: F,
|
|
121
|
-
emits: ["onClick"],
|
|
122
|
-
setup(l,
|
|
123
|
-
const
|
|
123
|
+
emits: ["onClick", "onActive"],
|
|
124
|
+
setup(l, n) {
|
|
125
|
+
const d = l.editorId, o = H({
|
|
124
126
|
list: [],
|
|
125
127
|
show: !1,
|
|
126
|
-
scrollElement: l.scrollElement || `#${
|
|
127
|
-
}),
|
|
128
|
-
const
|
|
129
|
-
return
|
|
128
|
+
scrollElement: l.scrollElement || `#${d}-preview-wrapper`
|
|
129
|
+
}), m = $(), v = b(() => {
|
|
130
|
+
const t = [];
|
|
131
|
+
return o.list.forEach((e, c) => {
|
|
130
132
|
const {
|
|
131
|
-
text:
|
|
133
|
+
text: g,
|
|
132
134
|
level: h
|
|
133
|
-
} =
|
|
135
|
+
} = e, i = {
|
|
134
136
|
level: h,
|
|
135
|
-
text:
|
|
137
|
+
text: g,
|
|
136
138
|
index: c + 1,
|
|
137
|
-
active:
|
|
139
|
+
active: m.value === e
|
|
138
140
|
};
|
|
139
|
-
if (
|
|
140
|
-
|
|
141
|
+
if (t.length === 0)
|
|
142
|
+
t.push(i);
|
|
141
143
|
else {
|
|
142
|
-
let r =
|
|
143
|
-
if (
|
|
144
|
-
for (let
|
|
144
|
+
let r = t[t.length - 1];
|
|
145
|
+
if (i.level > r.level)
|
|
146
|
+
for (let f = r.level + 1; f <= 6; f++) {
|
|
145
147
|
const {
|
|
146
|
-
children:
|
|
148
|
+
children: p
|
|
147
149
|
} = r;
|
|
148
|
-
if (!
|
|
149
|
-
r.children = [
|
|
150
|
+
if (!p) {
|
|
151
|
+
r.children = [i];
|
|
150
152
|
break;
|
|
151
153
|
}
|
|
152
|
-
if (r =
|
|
153
|
-
|
|
154
|
+
if (r = p[p.length - 1], i.level <= r.level) {
|
|
155
|
+
p.push(i);
|
|
154
156
|
break;
|
|
155
157
|
}
|
|
156
158
|
}
|
|
157
159
|
else
|
|
158
|
-
|
|
160
|
+
t.push(i);
|
|
159
161
|
}
|
|
160
|
-
}),
|
|
161
|
-
}), s = () =>
|
|
162
|
-
if (
|
|
163
|
-
return
|
|
162
|
+
}), t;
|
|
163
|
+
}), s = () => o.scrollElement instanceof HTMLElement ? o.scrollElement : document.querySelector(o.scrollElement), E = (t) => {
|
|
164
|
+
if (t.length === 0)
|
|
165
|
+
return o.list = [], !1;
|
|
164
166
|
const {
|
|
165
|
-
activeHead:
|
|
166
|
-
} =
|
|
167
|
-
const
|
|
168
|
-
if (
|
|
169
|
-
const r = s(),
|
|
170
|
-
if (
|
|
167
|
+
activeHead: e
|
|
168
|
+
} = t.reduce((c, g, h) => {
|
|
169
|
+
const i = document.getElementById(l.mdHeadingId(g.text, g.level, h + 1));
|
|
170
|
+
if (i instanceof HTMLElement) {
|
|
171
|
+
const r = s(), f = S(i, r);
|
|
172
|
+
if (f < l.offsetTop && f > c.minTop)
|
|
171
173
|
return {
|
|
172
|
-
activeHead:
|
|
173
|
-
minTop:
|
|
174
|
+
activeHead: g,
|
|
175
|
+
minTop: f
|
|
174
176
|
};
|
|
175
177
|
}
|
|
176
178
|
return c;
|
|
177
179
|
}, {
|
|
178
|
-
activeHead:
|
|
180
|
+
activeHead: t[0],
|
|
179
181
|
minTop: Number.MIN_SAFE_INTEGER
|
|
180
182
|
});
|
|
181
|
-
|
|
182
|
-
}
|
|
183
|
-
|
|
183
|
+
m.value = e, o.list = t;
|
|
184
|
+
}, a = () => {
|
|
185
|
+
E(o.list);
|
|
184
186
|
};
|
|
185
|
-
return
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
187
|
+
return A(() => m.value, (t) => {
|
|
188
|
+
const e = t ? {
|
|
189
|
+
...t
|
|
190
|
+
} : void 0;
|
|
191
|
+
l.onActive ? l.onActive(e) : n.emit("onActive", e);
|
|
192
|
+
}), w(() => {
|
|
193
|
+
const t = s(), e = t === document.documentElement ? window : t;
|
|
194
|
+
e == null || e.addEventListener("scroll", a), y.on(d, {
|
|
195
|
+
name: O,
|
|
190
196
|
callback: (c) => {
|
|
191
|
-
|
|
197
|
+
e == null || e.removeEventListener("scroll", a), E(c), e == null || e.addEventListener("scroll", a);
|
|
192
198
|
}
|
|
193
|
-
}),
|
|
194
|
-
}),
|
|
195
|
-
var
|
|
196
|
-
const
|
|
197
|
-
(
|
|
198
|
-
}), () =>
|
|
199
|
+
}), y.emit(d, L);
|
|
200
|
+
}), x(() => {
|
|
201
|
+
var e;
|
|
202
|
+
const t = s();
|
|
203
|
+
(e = t === document.documentElement ? window : t) == null || e.removeEventListener("scroll", a);
|
|
204
|
+
}), () => u("div", {
|
|
199
205
|
class: `${T}-catalog${l.theme === "dark" ? "-dark" : ""} ${l.class}`
|
|
200
|
-
}, [
|
|
206
|
+
}, [v.value.map((t) => u(M, {
|
|
201
207
|
mdHeadingId: l.mdHeadingId,
|
|
202
|
-
tocItem:
|
|
203
|
-
key: `link-${
|
|
204
|
-
scrollElement:
|
|
205
|
-
onClick: (
|
|
206
|
-
l.onClick ? l.onClick(
|
|
208
|
+
tocItem: t,
|
|
209
|
+
key: `link-${t.level}-${t.text}`,
|
|
210
|
+
scrollElement: o.scrollElement,
|
|
211
|
+
onClick: (e, c) => {
|
|
212
|
+
l.onClick ? l.onClick(e, c) : n.emit("onClick", e, c);
|
|
207
213
|
},
|
|
208
214
|
scrollElementOffsetTop: l.scrollElementOffsetTop
|
|
209
215
|
}, null))]);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropType, ExtractPropTypes } from 'vue';
|
|
2
|
-
import { MdHeadingId, Themes } from '../MdEditor/type';
|
|
2
|
+
import { HeadList, MdHeadingId, Themes } from '../MdEditor/type';
|
|
3
3
|
export interface TocItem {
|
|
4
4
|
text: string;
|
|
5
5
|
level: number;
|
|
@@ -56,7 +56,10 @@ declare const MdCatalog: import("vue").DefineComponent<{
|
|
|
56
56
|
onClick: {
|
|
57
57
|
type: PropType<(e: MouseEvent, t: TocItem) => void>;
|
|
58
58
|
};
|
|
59
|
-
|
|
59
|
+
onActive: {
|
|
60
|
+
type: PropType<(heading: HeadList | undefined) => void>;
|
|
61
|
+
};
|
|
62
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onClick" | "onActive")[], "onClick" | "onActive", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
60
63
|
/**
|
|
61
64
|
* 编辑器的Id,务必与需要绑定的编辑器Id相同
|
|
62
65
|
*/
|
|
@@ -105,8 +108,12 @@ declare const MdCatalog: import("vue").DefineComponent<{
|
|
|
105
108
|
onClick: {
|
|
106
109
|
type: PropType<(e: MouseEvent, t: TocItem) => void>;
|
|
107
110
|
};
|
|
111
|
+
onActive: {
|
|
112
|
+
type: PropType<(heading: HeadList | undefined) => void>;
|
|
113
|
+
};
|
|
108
114
|
}>> & {
|
|
109
115
|
onOnClick?: ((...args: any[]) => any) | undefined;
|
|
116
|
+
onOnActive?: ((...args: any[]) => any) | undefined;
|
|
110
117
|
}, {
|
|
111
118
|
theme: Themes;
|
|
112
119
|
class: string;
|
|
@@ -55,7 +55,9 @@ declare const _default: {
|
|
|
55
55
|
style?: unknown;
|
|
56
56
|
readonly onClick?: ((e: MouseEvent, t: import("./MdCatalog").TocItem) => void) | undefined;
|
|
57
57
|
readonly scrollElement?: string | HTMLElement | undefined;
|
|
58
|
+
readonly onActive?: ((heading: import("..").HeadList | undefined) => void) | undefined;
|
|
58
59
|
onOnClick?: ((...args: any[]) => any) | undefined;
|
|
60
|
+
onOnActive?: ((...args: any[]) => any) | undefined;
|
|
59
61
|
};
|
|
60
62
|
$attrs: {
|
|
61
63
|
[x: string]: unknown;
|
|
@@ -68,7 +70,7 @@ declare const _default: {
|
|
|
68
70
|
}>;
|
|
69
71
|
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | null;
|
|
70
72
|
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | null;
|
|
71
|
-
$emit: (event: "onClick", ...args: any[]) => void;
|
|
73
|
+
$emit: (event: "onClick" | "onActive", ...args: any[]) => void;
|
|
72
74
|
$el: any;
|
|
73
75
|
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
74
76
|
editorId: {
|
|
@@ -100,9 +102,13 @@ declare const _default: {
|
|
|
100
102
|
onClick: {
|
|
101
103
|
type: import("vue").PropType<(e: MouseEvent, t: import("./MdCatalog").TocItem) => void>;
|
|
102
104
|
};
|
|
105
|
+
onActive: {
|
|
106
|
+
type: import("vue").PropType<(heading: import("..").HeadList | undefined) => void>;
|
|
107
|
+
};
|
|
103
108
|
}>> & {
|
|
104
109
|
onOnClick?: ((...args: any[]) => any) | undefined;
|
|
105
|
-
|
|
110
|
+
onOnActive?: ((...args: any[]) => any) | undefined;
|
|
111
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onClick" | "onActive")[], string, {
|
|
106
112
|
theme: import("..").Themes;
|
|
107
113
|
class: string;
|
|
108
114
|
mdHeadingId: import("..").MdHeadingId;
|
|
@@ -158,8 +164,12 @@ declare const _default: {
|
|
|
158
164
|
onClick: {
|
|
159
165
|
type: import("vue").PropType<(e: MouseEvent, t: import("./MdCatalog").TocItem) => void>;
|
|
160
166
|
};
|
|
167
|
+
onActive: {
|
|
168
|
+
type: import("vue").PropType<(heading: import("..").HeadList | undefined) => void>;
|
|
169
|
+
};
|
|
161
170
|
}>> & {
|
|
162
171
|
onOnClick?: ((...args: any[]) => any) | undefined;
|
|
172
|
+
onOnActive?: ((...args: any[]) => any) | undefined;
|
|
163
173
|
} & import("vue").ShallowUnwrapRef<() => JSX.Element> & {} & import("vue").ComponentCustomProperties & {};
|
|
164
174
|
__isFragment?: undefined;
|
|
165
175
|
__isTeleport?: undefined;
|
|
@@ -194,9 +204,13 @@ declare const _default: {
|
|
|
194
204
|
onClick: {
|
|
195
205
|
type: import("vue").PropType<(e: MouseEvent, t: import("./MdCatalog").TocItem) => void>;
|
|
196
206
|
};
|
|
207
|
+
onActive: {
|
|
208
|
+
type: import("vue").PropType<(heading: import("..").HeadList | undefined) => void>;
|
|
209
|
+
};
|
|
197
210
|
}>> & {
|
|
198
211
|
onOnClick?: ((...args: any[]) => any) | undefined;
|
|
199
|
-
|
|
212
|
+
onOnActive?: ((...args: any[]) => any) | undefined;
|
|
213
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onClick" | "onActive")[], "onClick" | "onActive", {
|
|
200
214
|
theme: import("..").Themes;
|
|
201
215
|
class: string;
|
|
202
216
|
mdHeadingId: import("..").MdHeadingId;
|