PluginProbe
FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses / 2.10.01
FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses v2.10.01
2.11.0 2.10.0 2.10.01 2.9.1 2.9.0 2.8.1 2.8.0 2.7.7 2.7.5 2.7.0 2.6.01 2.6.0 2.5.0 2.4.01 trunk 1.0.90 1.0.91 1.0.92 1.0.93 1.0.94 1.0.95 1.0.96 1.0.97 1.0.98 1.0.99 All 78 releases
← All changes | assets/index4.js +14 -14 2.4.01 → 2.10.01 View file →
@@ -1,33 +1,33 @@
1 -var E=(e,s,n)=>{if(!s.has(e))throw TypeError("Cannot "+n)};var l=(e,s,n)=>(E(e,s,"read from private field"),n?n.call(e):s.get(e)),I=(e,s,n)=>{if(s.has(e))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(e):s.set(e,n)},T=(e,s,n,t)=>(E(e,s,"write to private field"),t?t.call(e,n):s.set(e,n),n);import{d as H}from"./index6.js?ver=2.4.01";import{aZ as N,bO as P,b1 as S,a_ as z,b2 as p,at as B}from"./vendor.js?ver=2.4.01";import{g as D,j as G,s as M,d as _,l as K}from"./todoList.js?ver=2.4.01";import{y as U,R as V,z as Z,A as q,B as A,L as C,C as v,D as J,E as Q,F as W,G as X,I as F,K as Y,M as x}from"./milkdown.js?ver=2.4.01";import"./vue.js?ver=2.4.01";import"./dayjs.js?ver=2.4.01";import"./lodash.js?ver=2.4.01";const R=({ctx:e,hide:s,show:n,config:t})=>{var h,b,y,k,w;const c=P();S(()=>{c()},[n]);const o=a=>m=>{m.preventDefault(),e&&a(e),c()},i=a=>{if(!e)return!1;const m=e.get(C),{state:{doc:u,selection:$}}=m;return u.rangeHasMark($.from,$.to,a)};return z`<host>
1 +var E=(e,s,a)=>{if(!s.has(e))throw TypeError("Cannot "+a)};var l=(e,s,a)=>(E(e,s,"read from private field"),a?a.call(e):s.get(e)),I=(e,s,a)=>{if(s.has(e))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(e):s.set(e,a)},T=(e,s,a,t)=>(E(e,s,"write to private field"),t?t.call(e,a):s.set(e,a),a);import{d as O}from"./index6.js?ver=2.10.01";import{b3 as z,bV as H,b7 as P,b4 as S,b8 as b,az as B}from"./vendor.js?ver=2.10.01";import{j as D,k as G,s as M,d as V,l as K}from"./todoList.js?ver=2.10.01";import{y as U,R as _,z as q,A as J,B as A,L as C,C as v,D as Q,E as W,G as X,I as Y,K as R,M as Z,N as x}from"./milkdown.js?ver=2.10.01";import"./vue.js?ver=2.10.01";import"./dayjs.js?ver=2.10.01";import"./fcom-utils.js?ver=2.10.01";const F=({ctx:e,hide:s,show:a,config:t})=>{var h,p,y,k,w;const c=H();P(()=>{c()},[a]);const n=o=>m=>{m.preventDefault(),e&&o(e),c()},i=o=>{if(!e)return!1;const m=e.get(C),{state:{doc:u,selection:$}}=m;return u.rangeHasMark($.from,$.to,o)};return S`<host>
2 2 <button
3 - class=${p("toolbar-item",e&&i(U.type(e))&&"active")}
4 - onmousedown=${o(a=>{a.get(v).call(J.key)})}
3 + class=${b("toolbar-item",e&&i(U.type(e))&&"active")}
4 + onmousedown=${n(o=>{o.get(v).call(Q.key)})}
5 5 >
6 6 ${((h=t==null?void 0:t.boldIcon)==null?void 0:h.call(t))??D}
7 7 </button>
8 8 <button
9 - class=${p("toolbar-item",e&&i(V.type(e))&&"active")}
10 - onmousedown=${o(a=>{a.get(v).call(Q.key)})}
9 + class=${b("toolbar-item",e&&i(_.type(e))&&"active")}
10 + onmousedown=${n(o=>{o.get(v).call(W.key)})}
11 11 >
12 - ${((b=t==null?void 0:t.italicIcon)==null?void 0:b.call(t))??G}
12 + ${((p=t==null?void 0:t.italicIcon)==null?void 0:p.call(t))??G}
13 13 </button>
14 14 <button
15 - class=${p("toolbar-item",e&&i(Z.type(e))&&"active")}
16 - onmousedown=${o(a=>{a.get(v).call(W.key)})}
15 + class=${b("toolbar-item",e&&i(q.type(e))&&"active")}
16 + onmousedown=${n(o=>{o.get(v).call(X.key)})}
17 17 >
18 18 ${((y=t==null?void 0:t.strikethroughIcon)==null?void 0:y.call(t))??M}
19 19 </button>
20 20 <div class="divider"></div>
21 21 <button
22 - class=${p("toolbar-item",e&&i(q.type(e))&&"active")}
23 - onmousedown=${o(a=>{a.get(v).call(X.key)})}
22 + class=${b("toolbar-item",e&&i(J.type(e))&&"active")}
23 + onmousedown=${n(o=>{o.get(v).call(Y.key)})}
24 24 >
25 - ${((k=t==null?void 0:t.codeIcon)==null?void 0:k.call(t))??_}
25 + ${((k=t==null?void 0:t.codeIcon)==null?void 0:k.call(t))??V}
26 26 </button>
27 27 <button
28 - class=${p("toolbar-item",e&&i(A.type(e))&&"active")}
29 - onmousedown=${o(a=>{const m=a.get(C),{selection:u}=m.state;if(i(A.type(a))){a.get(F.key).removeLink(u.from,u.to);return}a.get(F.key).addLink(u.from,u.to),s==null||s()})}
28 + class=${b("toolbar-item",e&&i(A.type(e))&&"active")}
29 + onmousedown=${n(o=>{const m=o.get(C),{selection:u}=m.state;if(i(A.type(o))){o.get(R.key).removeLink(u.from,u.to);return}o.get(R.key).addLink(u.from,u.to),s==null||s()})}
30 30 >
31 31 ${((w=t==null?void 0:t.linkIcon)==null?void 0:w.call(t))??K}
32 32 </button>
33 - </host>`};R.props={ctx:Object,hide:Function,show:Boolean,config:Object};const j=N(R),O=Y("CREPE_TOOLBAR");var d,r;class f{constructor(s,n,t){I(this,d,void 0);I(this,r,void 0);this.update=(o,i)=>{l(this,d).update(o,i)},this.destroy=()=>{l(this,d).destroy(),l(this,r).remove()},this.hide=()=>{l(this,d).hide()};const c=new j;T(this,r,c),l(this,r).ctx=s,l(this,r).hide=this.hide,l(this,r).config=t,T(this,d,new x({content:l(this,r),debounce:20,offset:10,shouldShow(o){const{doc:i,selection:h}=o.state,{empty:b,from:y,to:k}=h,w=!i.textBetween(y,k).length&&h instanceof B,a=!(h instanceof B),m=o.dom.getRootNode().activeElement,u=c.contains(m),$=!o.hasFocus()&&!u,L=!o.editable;return!($||a||b||w||L)}})),l(this,d).onShow=()=>{l(this,r).show=!0,setTimeout(()=>{let o=l(this,r).style.left;o=parseInt(o),console.log(o),o<0?(l(this,r).style.left=0,console.log(l(this,r))):o>350&&(l(this,r).style.left="350px")},0)},l(this,d).onHide=()=>{l(this,r).show=!1},this.update(n)}}d=new WeakMap,r=new WeakMap;H("milkdown-toolbar",j);const rt=(e,s)=>{e.config(n=>{n.set(O.key,{view:t=>new f(n,t,s)})}).use(O)};export{rt as defineFeature};
33 + </host>`};F.props={ctx:Object,hide:Function,show:Boolean,config:Object};const L=z(F),j=Z("CREPE_TOOLBAR");var d,r;class f{constructor(s,a,t){I(this,d,void 0);I(this,r,void 0);this.update=(n,i)=>{l(this,d).update(n,i)},this.destroy=()=>{l(this,d).destroy(),l(this,r).remove()},this.hide=()=>{l(this,d).hide()};const c=new L;T(this,r,c),l(this,r).ctx=s,l(this,r).hide=this.hide,l(this,r).config=t,T(this,d,new x({content:l(this,r),debounce:20,offset:10,shouldShow(n){const{doc:i,selection:h}=n.state,{empty:p,from:y,to:k}=h,w=!i.textBetween(y,k).length&&h instanceof B,o=!(h instanceof B),m=n.dom.getRootNode().activeElement,u=c.contains(m),$=!n.hasFocus()&&!u,N=!n.editable;return!($||o||p||w||N)}})),l(this,d).onShow=()=>{l(this,r).show=!0,setTimeout(()=>{let n=l(this,r).style.left;n=parseInt(n),n<0?l(this,r).style.left=0:n>350&&(l(this,r).style.left="350px")},0)},l(this,d).onHide=()=>{l(this,r).show=!1},this.update(a)}}d=new WeakMap,r=new WeakMap;O("milkdown-toolbar",L);const rt=(e,s)=>{e.config(a=>{a.set(j.key,{view:t=>new f(a,t,s)})}).use(j)};export{rt as defineFeature};