md-editor-v3 4.0.3 → 4.0.4-beta.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "md-editor-v3",
3
- "version": "4.0.3",
3
+ "version": "4.0.4-beta.0",
4
4
  "license": "MIT",
5
5
  "keywords": [
6
6
  "vue",
@@ -45,6 +45,7 @@
45
45
  "@codemirror/lang-markdown": "^6.1.1",
46
46
  "@codemirror/language-data": "^6.3.0",
47
47
  "@types/markdown-it": "^12.2.3",
48
+ "@vavt/util": "^1.0.0",
48
49
  "codemirror": "^6.0.1",
49
50
  "copy-to-clipboard": "^3.3.3",
50
51
  "lru-cache": "^8.0.4",
@@ -1 +0,0 @@
1
- "use strict";var e=Object.defineProperty;var r=(t,s,o)=>s in t?e(t,s,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[s]=o;var p=(t,s,o)=>(r(t,typeof s!="symbol"?s+"":s,o),o);class a{constructor(){p(this,"pools",{})}remove(s,o,l){const i=this.pools[s]&&this.pools[s][o];i&&(this.pools[s][o]=i.filter(h=>h!==l))}clear(s){this.pools[s]={}}on(s,o){return this.pools[s]||(this.pools[s]={}),this.pools[s][o.name]||(this.pools[s][o.name]=[]),this.pools[s][o.name].push(o.callback),this.pools[s][o.name].includes(o.callback)}emit(s,o,...l){this.pools[s]||(this.pools[s]={});const i=this.pools[s][o];i&&i.forEach(h=>{try{h(...l)}catch(n){console.error(`${o} monitor event exception!`,n)}})}}const f=new a;exports.bus=f;
@@ -1,38 +0,0 @@
1
- var e = Object.defineProperty;
2
- var a = (t, o, s) => o in t ? e(t, o, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[o] = s;
3
- var h = (t, o, s) => (a(t, typeof o != "symbol" ? o + "" : o, s), s);
4
- class r {
5
- constructor() {
6
- // 事件池
7
- h(this, "pools", {});
8
- }
9
- // 移除事件监听
10
- remove(o, s, l) {
11
- const i = this.pools[o] && this.pools[o][s];
12
- i && (this.pools[o][s] = i.filter((p) => p !== l));
13
- }
14
- // 清空全部事件,由于单一实例,多次注册会被共享内容
15
- clear(o) {
16
- this.pools[o] = {};
17
- }
18
- // 注册事件监听
19
- on(o, s) {
20
- return this.pools[o] || (this.pools[o] = {}), this.pools[o][s.name] || (this.pools[o][s.name] = []), this.pools[o][s.name].push(s.callback), this.pools[o][s.name].includes(s.callback);
21
- }
22
- // 触发事件
23
- emit(o, s, ...l) {
24
- this.pools[o] || (this.pools[o] = {});
25
- const i = this.pools[o][s];
26
- i && i.forEach((p) => {
27
- try {
28
- p(...l);
29
- } catch (n) {
30
- console.error(`${s} monitor event exception!`, n);
31
- }
32
- });
33
- }
34
- }
35
- const m = new r();
36
- export {
37
- m as b
38
- };
@@ -1,8 +0,0 @@
1
- /**
2
- * 平滑滚动
3
- *
4
- * @param ele 滚动容器
5
- * @param top 目标位置
6
- */
7
- declare const smoothScroll: (ele: HTMLElement, top: number, cb?: () => void) => void;
8
- export default smoothScroll;