diff --git a/.obsidian/community-plugins.json b/.obsidian/community-plugins.json index 0837055..656dfaa 100644 --- a/.obsidian/community-plugins.json +++ b/.obsidian/community-plugins.json @@ -31,7 +31,6 @@ "workspaces-plus", "Enhanced-editing", "obsidian42-brat", - "obsidian-editing-toolbar", "remotely-save", "table-editor-obsidian", "dataview", diff --git a/.obsidian/plugins/obsidian-bartender/data.json b/.obsidian/plugins/obsidian-bartender/data.json deleted file mode 100644 index a7a431d..0000000 --- a/.obsidian/plugins/obsidian-bartender/data.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "statusBarOrder": [ - "44751841237401602368623156", - "12843970849669122596921091", - "86515888475340801543377291", - "21212843474944064247010", - "59523608157880323101081134", - "4185832177008644156991330", - "35658965975040004261697505", - "86589804862504962434026302", - "6265085974544384162810726" - ], - "ribbonBarOrder": [ - "79372327069941761204210982", - "798508723260620822378052", - "10343183191900161451753391", - "88573907954565123003701357", - "62657388095733763115464037", - "60992143375728644142598242", - "70995981201571844078151274", - "76874417040261121352673776", - "20512377258639363877619960", - "6844575847022592185085343", - "4384744997388288661022522", - "4370133518647296621305815" - ], - "fileExplorerOrder": {}, - "actionBarOrder": { - "markdown-table-editor-view": [ - "3424304410656768167261794", - "19187852294225921578290960", - "30107033550192642960974060", - "73781782889103362323969276" - ], - "markdown": [ - "6146527697305603961893867", - "3424304410656768167261794", - "19187852294225921578290960", - "30107033550192642960974060", - "73781782889103362323969276" - ] - }, - "autoHide": false, - "autoHideDelay": 500, - "dragDelay": 200 -} \ No newline at end of file diff --git a/.obsidian/plugins/obsidian-bartender/main.js b/.obsidian/plugins/obsidian-bartender/main.js deleted file mode 100644 index 52d9003..0000000 --- a/.obsidian/plugins/obsidian-bartender/main.js +++ /dev/null @@ -1,13 +0,0 @@ -/* -THIS IS A GENERATED/BUNDLED FILE BY ESBUILD -if you want to view the source, please visit the github repository of this plugin -*/ - -var ln=Object.create;var Le=Object.defineProperty;var cn=Object.getOwnPropertyDescriptor;var un=Object.getOwnPropertyNames,rr=Object.getOwnPropertySymbols,hn=Object.getPrototypeOf,nr=Object.prototype.hasOwnProperty,dn=Object.prototype.propertyIsEnumerable;var ir=(n,e,t)=>e in n?Le(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,he=(n,e)=>{for(var t in e||(e={}))nr.call(e,t)&&ir(n,t,e[t]);if(rr)for(var t of rr(e))dn.call(e,t)&&ir(n,t,e[t]);return n};var or=n=>Le(n,"__esModule",{value:!0});var fn=(n,e)=>{or(n);for(var t in e)Le(n,t,{get:e[t],enumerable:!0})},pn=(n,e,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of un(e))!nr.call(n,r)&&r!=="default"&&Le(n,r,{get:()=>e[r],enumerable:!(t=cn(e,r))||t.enumerable});return n},Tt=n=>pn(or(Le(n!=null?ln(hn(n)):{},"default",n&&n.__esModule&&"default"in n?{get:()=>n.default,enumerable:!0}:{value:n,enumerable:!0})),n);var ye=(n,e,t)=>new Promise((r,i)=>{var o=l=>{try{a(t.next(l))}catch(c){i(c)}},s=l=>{try{a(t.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((t=t.apply(n,e)).next())});fn(exports,{default:()=>er});function de(n){return Array.isArray?Array.isArray(n):lr(n)==="[object Array]"}var gn=1/0;function mn(n){if(typeof n=="string")return n;let e=n+"";return e=="0"&&1/n==-gn?"-0":e}function bn(n){return n==null?"":mn(n)}function fe(n){return typeof n=="string"}function sr(n){return typeof n=="number"}function vn(n){return n===!0||n===!1||yn(n)&&lr(n)=="[object Boolean]"}function ar(n){return typeof n=="object"}function yn(n){return ar(n)&&n!==null}function U(n){return n!=null}function Dt(n){return!n.trim().length}function lr(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}var En="Incorrect 'index' type",Sn=n=>`Invalid value for key ${n}`,wn=n=>`Pattern length exceeds max of ${n}.`,Tn=n=>`Missing ${n} property in key`,Dn=n=>`Property 'weight' in key '${n}' must be a positive integer`,cr=Object.prototype.hasOwnProperty,ur=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(r=>{let i=hr(r);t+=i.weight,this._keys.push(i),this._keyMap[i.id]=i,t+=i.weight}),this._keys.forEach(r=>{r.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function hr(n){let e=null,t=null,r=null,i=1;if(fe(n)||de(n))r=n,e=dr(n),t=Ct(n);else{if(!cr.call(n,"name"))throw new Error(Tn("name"));let o=n.name;if(r=o,cr.call(n,"weight")&&(i=n.weight,i<=0))throw new Error(Dn(o));e=dr(o),t=Ct(o)}return{path:e,id:t,weight:i,src:r}}function dr(n){return de(n)?n:n.split(".")}function Ct(n){return de(n)?n.join("."):n}function Cn(n,e){let t=[],r=!1,i=(o,s,a)=>{if(!!U(o))if(!s[a])t.push(o);else{let l=s[a],c=o[l];if(!U(c))return;if(a===s.length-1&&(fe(c)||sr(c)||vn(c)))t.push(bn(c));else if(de(c)){r=!0;for(let u=0,h=c.length;un.score===e.score?n.idx{this._keysMap[t.id]=r})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,fe(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){let t=this.size();fe(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,r=this.size();t{let s=this.getFn(e,i.path);if(!!U(s)){if(de(s)){let a=[],l=[{nestedArrIndex:-1,value:s}];for(;l.length;){let{nestedArrIndex:c,value:u}=l.pop();if(!!U(u))if(fe(u)&&!Dt(u)){let h={v:u,i:c,n:this.norm.get(u)};a.push(h)}else de(u)&&u.forEach((h,d)=>{l.push({nestedArrIndex:d,value:h})})}r.$[o]=a}else if(!Dt(s)){let a={v:s,n:this.norm.get(s)};r.$[o]=a}}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}};function fr(n,e,{getFn:t=y.getFn,fieldNormWeight:r=y.fieldNormWeight}={}){let i=new tt({getFn:t,fieldNormWeight:r});return i.setKeys(n.map(hr)),i.setSources(e),i.create(),i}function Fn(n,{getFn:e=y.getFn,fieldNormWeight:t=y.fieldNormWeight}={}){let{keys:r,records:i}=n,o=new tt({getFn:e,fieldNormWeight:t});return o.setKeys(r),o.setIndexRecords(i),o}function rt(n,{errors:e=0,currentLocation:t=0,expectedLocation:r=0,distance:i=y.distance,ignoreLocation:o=y.ignoreLocation}={}){let s=e/n.length;if(o)return s;let a=Math.abs(r-t);return i?s+a/i:a?1:s}function Nn(n=[],e=y.minMatchCharLength){let t=[],r=-1,i=-1,o=0;for(let s=n.length;o=e&&t.push([r,i]),r=-1)}return n[o-1]&&o-r>=e&&t.push([r,o-1]),t}var Te=32;function kn(n,e,t,{location:r=y.location,distance:i=y.distance,threshold:o=y.threshold,findAllMatches:s=y.findAllMatches,minMatchCharLength:a=y.minMatchCharLength,includeMatches:l=y.includeMatches,ignoreLocation:c=y.ignoreLocation}={}){if(e.length>Te)throw new Error(wn(Te));let u=e.length,h=n.length,d=Math.max(0,Math.min(r,h)),p=o,g=d,b=a>1||l,C=b?Array(h):[],O;for(;(O=n.indexOf(e,g))>-1;){let R=rt(e,{currentLocation:O,expectedLocation:d,distance:i,ignoreLocation:c});if(p=Math.min(R,p),g=O+u,b){let V=0;for(;V=ve;W-=1){let ae=W-1,te=t[n.charAt(ae)];if(b&&(C[ae]=+!!te),ee[W]=(ee[W+1]<<1|1)&te,R&&(ee[W]|=(_[W+1]|_[W])<<1|1|_[W+1]),ee[W]&J&&(F=rt(e,{errors:R,currentLocation:ae,expectedLocation:d,distance:i,ignoreLocation:c}),F<=p)){if(p=F,g=ae,g<=d)break;ve=Math.max(1,2*d-g)}}if(rt(e,{errors:R+1,currentLocation:d,expectedLocation:d,distance:i,ignoreLocation:c})>p)break;_=ee}let X={isMatch:g>=0,score:Math.max(.001,F)};if(b){let R=Nn(C,a);R.length?l&&(X.indices=R):X.isMatch=!1}return X}function Pn(n){let e={};for(let t=0,r=n.length;t{this.chunks.push({pattern:d,alphabet:Pn(d),startIndex:p})},h=this.pattern.length;if(h>Te){let d=0,p=h%Te,g=h-p;for(;d{let{isMatch:O,score:_,indices:F}=kn(e,g,b,{location:i+C,distance:o,threshold:s,findAllMatches:a,minMatchCharLength:l,includeMatches:r,ignoreLocation:c});O&&(d=!0),h+=_,O&&F&&(u=[...u,...F])});let p={isMatch:d,score:d?h/this.chunks.length:1};return d&&r&&(p.indices=u),p}},pe=class{constructor(e){this.pattern=e}static isMultiMatch(e){return pr(e,this.multiRegex)}static isSingleMatch(e){return pr(e,this.singleRegex)}search(){}};function pr(n,e){let t=n.match(e);return t?t[1]:null}var gr=class extends pe{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){let t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},mr=class extends pe{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){let r=e.indexOf(this.pattern)===-1;return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}},br=class extends pe{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){let t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},vr=class extends pe{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){let t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},yr=class extends pe{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){let t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}},Er=class extends pe{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){let t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},_t=class extends pe{constructor(e,{location:t=y.location,threshold:r=y.threshold,distance:i=y.distance,includeMatches:o=y.includeMatches,findAllMatches:s=y.findAllMatches,minMatchCharLength:a=y.minMatchCharLength,isCaseSensitive:l=y.isCaseSensitive,ignoreLocation:c=y.ignoreLocation}={}){super(e);this._bitapSearch=new xt(e,{location:t,threshold:r,distance:i,includeMatches:o,findAllMatches:s,minMatchCharLength:a,isCaseSensitive:l,ignoreLocation:c})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}},It=class extends pe{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t=0,r,i=[],o=this.pattern.length;for(;(r=e.indexOf(this.pattern,t))>-1;)t=r+o,i.push([r,t-1]);let s=!!i.length;return{isMatch:s,score:s?0:1,indices:i}}},Mt=[gr,It,br,vr,Er,yr,mr,_t],Sr=Mt.length,Rn=/ +(?=([^\"]*\"[^\"]*\")*[^\"]*$)/,Ln="|";function Bn(n,e={}){return n.split(Ln).map(t=>{let r=t.trim().split(Rn).filter(o=>o&&!!o.trim()),i=[];for(let o=0,s=r.length;o!!(n[nt.AND]||n[nt.OR]),jn=n=>!!n[Ft.PATH],$n=n=>!de(n)&&ar(n)&&!Nt(n),Tr=n=>({[nt.AND]:Object.keys(n).map(e=>({[e]:n[e]}))});function Dr(n,e,{auto:t=!0}={}){let r=i=>{let o=Object.keys(i),s=jn(i);if(!s&&o.length>1&&!Nt(i))return r(Tr(i));if($n(i)){let l=s?i[Ft.PATH]:o[0],c=s?i[Ft.PATTERN]:i[l];if(!fe(c))throw new Error(Sn(l));let u={keyId:Ct(l),pattern:c};return t&&(u.searcher=Ot(c,e)),u}let a={children:[],operator:o[0]};return o.forEach(l=>{let c=i[l];de(c)&&c.forEach(u=>{a.children.push(r(u))})}),a};return Nt(n)||(n=Tr(n)),r(n)}function Gn(n,{ignoreFieldNorm:e=y.ignoreFieldNorm}){n.forEach(t=>{let r=1;t.matches.forEach(({key:i,norm:o,score:s})=>{let a=i?i.weight:null;r*=Math.pow(s===0&&a?Number.EPSILON:s,(a||1)*(e?1:o))}),t.score=r})}function Yn(n,e){let t=n.matches;e.matches=[],!!U(t)&&t.forEach(r=>{if(!U(r.indices)||!r.indices.length)return;let{indices:i,value:o}=r,s={indices:i,value:o};r.key&&(s.key=r.key.src),r.idx>-1&&(s.refIndex=r.idx),e.matches.push(s)})}function Xn(n,e){e.score=n.score}function Vn(n,e,{includeMatches:t=y.includeMatches,includeScore:r=y.includeScore}={}){let i=[];return t&&i.push(Yn),r&&i.push(Xn),n.map(o=>{let{idx:s}=o,a={item:e[s],refIndex:s};return i.length&&i.forEach(l=>{l(o,a)}),a})}var le=class{constructor(e,t={},r){this.options=he(he({},y),t),this.options.useExtendedSearch,this._keyStore=new ur(this.options.keys),this.setCollection(e,r)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof tt))throw new Error(En);this._myIndex=t||fr(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){!U(e)||(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){let t=[];for(let r=0,i=this._docs.length;r-1&&(l=l.slice(0,t)),Vn(l,this._docs,{includeMatches:r,includeScore:i})}_searchStringList(e){let t=Ot(e,this.options),{records:r}=this._myIndex,i=[];return r.forEach(({v:o,i:s,n:a})=>{if(!U(o))return;let{isMatch:l,score:c,indices:u}=t.searchIn(o);l&&i.push({item:o,idx:s,matches:[{score:c,value:o,norm:a,indices:u}]})}),i}_searchLogical(e){let t=Dr(e,this.options),r=(a,l,c)=>{if(!a.children){let{keyId:h,searcher:d}=a,p=this._findMatches({key:this._keyStore.get(h),value:this._myIndex.getValueForItemAtKeyId(l,h),searcher:d});return p&&p.length?[{idx:c,item:l,matches:p}]:[]}let u=[];for(let h=0,d=a.children.length;h{if(U(a)){let c=r(t,a,l);c.length&&(o[l]||(o[l]={idx:l,item:a,matches:[]},s.push(o[l])),c.forEach(({matches:u})=>{o[l].matches.push(...u)}))}}),s}_searchObjectList(e){let t=Ot(e,this.options),{keys:r,records:i}=this._myIndex,o=[];return i.forEach(({$:s,i:a})=>{if(!U(s))return;let l=[];r.forEach((c,u)=>{l.push(...this._findMatches({key:c,value:s[u],searcher:t}))}),l.length&&o.push({idx:a,item:s,matches:l})}),o}_findMatches({key:e,value:t,searcher:r}){if(!U(t))return[];let i=[];if(de(t))t.forEach(({v:o,i:s,n:a})=>{if(!U(o))return;let{isMatch:l,score:c,indices:u}=r.searchIn(o);l&&i.push({score:c,key:e,value:o,idx:s,norm:a,indices:u})});else{let{v:o,n:s}=t,{isMatch:a,score:l,indices:c}=r.searchIn(o);a&&i.push({score:l,key:e,value:o,norm:s,indices:c})}return i}};le.version="6.5.3";le.createIndex=fr;le.parseIndex=Fn;le.config=y;le.parseQuery=Dr;Wn(wr);function ge(n,e){let t=Object.keys(e).map(r=>Kn(n,r,e[r]));return t.length===1?t[0]:function(){t.forEach(r=>r())}}function Kn(n,e,t){let r=n[e],i=n.hasOwnProperty(e),o=t(r);return r&&Object.setPrototypeOf(o,r),Object.setPrototypeOf(s,o),n[e]=s,a;function s(...l){return o===r&&n[e]===s&&a(),o.apply(this,l)}function a(){n[e]===s&&(i?n[e]=r:delete n[e]),o!==r&&(o=r,Object.setPrototypeOf(s,r||Function))}}var x=Tt(require("obsidian"));function Cr(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function ce(n){for(var e=1;e=0)&&(t[i]=n[i]);return t}function qn(n,e){if(n==null)return{};var t=Un(n,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);for(i=0;i=0)&&(!Object.prototype.propertyIsEnumerable.call(n,r)||(t[r]=n[r]))}return t}function Qn(n){return Jn(n)||Zn(n)||ei(n)||ti()}function Jn(n){if(Array.isArray(n))return kt(n)}function Zn(n){if(typeof Symbol!="undefined"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}function ei(n,e){if(!!n){if(typeof n=="string")return kt(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);if(t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set")return Array.from(n);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return kt(n,e)}}function kt(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t"&&(e=e.substring(1)),n)try{if(n.matches)return n.matches(e);if(n.msMatchesSelector)return n.msMatchesSelector(e);if(n.webkitMatchesSelector)return n.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function ii(n){return n.host&&n!==document&&n.host.nodeType?n.host:n.parentNode}function ne(n,e,t,r){if(n){t=t||document;do{if(e!=null&&(e[0]===">"?n.parentNode===t&&ot(n,e):ot(n,e))||r&&n===t)return n;if(n===t)break}while(n=ii(n))}return null}var Mr=/\s+/g;function L(n,e,t){if(n&&e)if(n.classList)n.classList[t?"add":"remove"](e);else{var r=(" "+n.className+" ").replace(Mr," ").replace(" "+e+" "," ");n.className=(r+(t?" "+e:"")).replace(Mr," ")}}function m(n,e,t){var r=n&&n.style;if(r){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(n,""):n.currentStyle&&(t=n.currentStyle),e===void 0?t:t[e];!(e in r)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),r[e]=t+(typeof t=="string"?"":"px")}}function De(n,e){var t="";if(typeof n=="string")t=n;else do{var r=m(n,"transform");r&&r!=="none"&&(t=r+" "+t)}while(!e&&(n=n.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(t)}function Ar(n,e,t){if(n){var r=n.getElementsByTagName(e),i=0,o=r.length;if(t)for(;i=o:s=i<=o,!s)return r;if(r===ue())break;r=Ee(r,!1)}return!1}function Me(n,e,t,r){for(var i=0,o=0,s=n.children;o2&&arguments[2]!==void 0?arguments[2]:{},i=r.evt,o=qn(r,hi);je.pluginEvent.bind(v)(e,t,ce({dragEl:f,parentEl:k,ghostEl:S,rootEl:A,nextEl:Ce,lastDownEl:st,cloneEl:P,cloneHidden:Se,dragStarted:Ye,putSortable:j,activeSortable:v.active,originalEvent:i,oldIndex:Oe,oldDraggableIndex:Ge,newIndex:q,newDraggableIndex:we,hideGhostForTarget:$r,unhideGhostForTarget:Gr,cloneNowHidden:function(){Se=!0},cloneNowShown:function(){Se=!1},dispatchSortableEvent:function(a){Y({sortable:t,name:a,originalEvent:i})}},o))};function Y(n){$e(ce({putSortable:j,cloneEl:P,targetEl:f,rootEl:A,oldIndex:Oe,oldDraggableIndex:Ge,newIndex:q,newDraggableIndex:we},n))}var f,k,S,A,Ce,st,P,Se,Oe,q,Ge,we,at,j,Fe=!1,lt=!1,ct=[],xe,ie,Wt,jt,Rr,Lr,Ye,Ne,Xe,Ve=!1,ut=!1,ht,G,$t=[],Gt=!1,dt=[],ft=typeof document!="undefined",pt=_r,Br=Be||be?"cssFloat":"float",di=ft&&!ni&&!_r&&"draggable"in document.createElement("div"),Hr=function(){if(!!ft){if(be)return!1;var n=document.createElement("x");return n.style.cssText="pointer-events:auto",n.style.pointerEvents==="auto"}}(),Wr=function(e,t){var r=m(e),i=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth),o=Me(e,0,t),s=Me(e,1,t),a=o&&m(o),l=s&&m(s),c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+M(o).width,u=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+M(s).width;if(r.display==="flex")return r.flexDirection==="column"||r.flexDirection==="column-reverse"?"vertical":"horizontal";if(r.display==="grid")return r.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&a.float&&a.float!=="none"){var h=a.float==="left"?"left":"right";return s&&(l.clear==="both"||l.clear===h)?"vertical":"horizontal"}return o&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||c>=i&&r[Br]==="none"||s&&r[Br]==="none"&&c+u>i)?"vertical":"horizontal"},fi=function(e,t,r){var i=r?e.left:e.top,o=r?e.right:e.bottom,s=r?e.width:e.height,a=r?t.left:t.top,l=r?t.right:t.bottom,c=r?t.width:t.height;return i===a||o===l||i+s/2===a+c/2},pi=function(e,t){var r;return ct.some(function(i){var o=i[$].options.emptyInsertThreshold;if(!(!o||Pt(i))){var s=M(i),a=e>=s.left-o&&e<=s.right+o,l=t>=s.top-o&&t<=s.bottom+o;if(a&&l)return r=i}}),r},jr=function(e){function t(o,s){return function(a,l,c,u){var h=a.options.group.name&&l.options.group.name&&a.options.group.name===l.options.group.name;if(o==null&&(s||h))return!0;if(o==null||o===!1)return!1;if(s&&o==="clone")return o;if(typeof o=="function")return t(o(a,l,c,u),s)(a,l,c,u);var d=(s?a:l).options.group.name;return o===!0||typeof o=="string"&&o===d||o.join&&o.indexOf(d)>-1}}var r={},i=e.group;(!i||it(i)!="object")&&(i={name:i}),r.name=i.name,r.checkPull=t(i.pull,!0),r.checkPut=t(i.put),r.revertClone=i.revertClone,e.group=r},$r=function(){!Hr&&S&&m(S,"display","none")},Gr=function(){!Hr&&S&&m(S,"display","")};ft&&document.addEventListener("click",function(n){if(lt)return n.preventDefault(),n.stopPropagation&&n.stopPropagation(),n.stopImmediatePropagation&&n.stopImmediatePropagation(),lt=!1,!1},!0);var _e=function(e){if(f){e=e.touches?e.touches[0]:e;var t=pi(e.clientX,e.clientY);if(t){var r={};for(var i in e)e.hasOwnProperty(i)&&(r[i]=e[i]);r.target=r.rootEl=t,r.preventDefault=void 0,r.stopPropagation=void 0,t[$]._onDragOver(r)}}},gi=function(e){f&&f.parentNode[$]._isOutsideThisEl(e.target)};function v(n,e){if(!(n&&n.nodeType&&n.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(n));this.el=n,this.options=e=re({},e),n[$]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(n.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Wr(n,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(s,a){s.setData("Text",a.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:v.supportPointer!==!1&&"PointerEvent"in window&&!He,emptyInsertThreshold:5};je.initializePlugins(this,n,t);for(var r in t)!(r in e)&&(e[r]=t[r]);jr(e);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=e.forceFallback?!1:di,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?T(n,"pointerdown",this._onTapStart):(T(n,"mousedown",this._onTapStart),T(n,"touchstart",this._onTapStart)),this.nativeDraggable&&(T(n,"dragover",this),T(n,"dragenter",this)),ct.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),re(this,li())}v.prototype={constructor:v,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Ne=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,f):this.options.direction},_onTapStart:function(e){if(!!e.cancelable){var t=this,r=this.el,i=this.options,o=i.preventOnFilter,s=e.type,a=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,l=(a||e).target,c=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,u=i.filter;if(Ti(r),!f&&!(/mousedown|pointerdown/.test(s)&&e.button!==0||i.disabled)&&!c.isContentEditable&&!(!this.nativeDraggable&&He&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=ne(l,i.draggable,r,!1),!(l&&l.animated)&&st!==l)){if(Oe=B(l),Ge=B(l,i.draggable),typeof u=="function"){if(u.call(this,e,l,this)){Y({sortable:t,rootEl:c,name:"filter",targetEl:l,toEl:r,fromEl:r}),K("filter",t,{evt:e}),o&&e.cancelable&&e.preventDefault();return}}else if(u&&(u=u.split(",").some(function(h){if(h=ne(c,h.trim(),r,!1),h)return Y({sortable:t,rootEl:h,name:"filter",targetEl:l,fromEl:r,toEl:r}),K("filter",t,{evt:e}),!0}),u)){o&&e.cancelable&&e.preventDefault();return}i.handle&&!ne(c,i.handle,r,!1)||this._prepareDragStart(e,a,l)}}},_prepareDragStart:function(e,t,r){var i=this,o=i.el,s=i.options,a=o.ownerDocument,l;if(r&&!f&&r.parentNode===o){var c=M(r);if(A=o,f=r,k=f.parentNode,Ce=f.nextSibling,st=r,at=s.group,v.dragged=f,xe={target:f,clientX:(t||e).clientX,clientY:(t||e).clientY},Rr=xe.clientX-c.left,Lr=xe.clientY-c.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,f.style["will-change"]="all",l=function(){if(K("delayEnded",i,{evt:e}),v.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!xr&&i.nativeDraggable&&(f.draggable=!0),i._triggerDragStart(e,t),Y({sortable:i,name:"choose",originalEvent:e}),L(f,s.chosenClass,!0)},s.ignore.split(",").forEach(function(u){Ar(f,u.trim(),Yt)}),T(a,"dragover",_e),T(a,"mousemove",_e),T(a,"touchmove",_e),T(a,"mouseup",i._onDrop),T(a,"touchend",i._onDrop),T(a,"touchcancel",i._onDrop),xr&&this.nativeDraggable&&(this.options.touchStartThreshold=4,f.draggable=!0),K("delayStart",this,{evt:e}),s.delay&&(!s.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(Be||be))){if(v.eventCanceled){this._onDrop();return}T(a,"mouseup",i._disableDelayedDrag),T(a,"touchend",i._disableDelayedDrag),T(a,"touchcancel",i._disableDelayedDrag),T(a,"mousemove",i._delayedDragTouchMoveHandler),T(a,"touchmove",i._delayedDragTouchMoveHandler),s.supportPointer&&T(a,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(l,s.delay)}else l()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){f&&Yt(f),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;w(e,"mouseup",this._disableDelayedDrag),w(e,"touchend",this._disableDelayedDrag),w(e,"touchcancel",this._disableDelayedDrag),w(e,"mousemove",this._delayedDragTouchMoveHandler),w(e,"touchmove",this._delayedDragTouchMoveHandler),w(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?T(document,"pointermove",this._onTouchMove):t?T(document,"touchmove",this._onTouchMove):T(document,"mousemove",this._onTouchMove):(T(f,"dragend",this),T(A,"dragstart",this._onDragStart));try{document.selection?mt(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(r){}},_dragStarted:function(e,t){if(Fe=!1,A&&f){K("dragStarted",this,{evt:t}),this.nativeDraggable&&T(document,"dragover",gi);var r=this.options;!e&&L(f,r.dragClass,!1),L(f,r.ghostClass,!0),v.active=this,e&&this._appendGhost(),Y({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(ie){this._lastX=ie.clientX,this._lastY=ie.clientY,$r();for(var e=document.elementFromPoint(ie.clientX,ie.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(ie.clientX,ie.clientY),e!==t);)t=e;if(f.parentNode[$]._isOutsideThisEl(e),t)do{if(t[$]){var r=void 0;if(r=t[$]._onDragOver({clientX:ie.clientX,clientY:ie.clientY,target:e,rootEl:t}),r&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);Gr()}},_onTouchMove:function(e){if(xe){var t=this.options,r=t.fallbackTolerance,i=t.fallbackOffset,o=e.touches?e.touches[0]:e,s=S&&De(S,!0),a=S&&s&&s.a,l=S&&s&&s.d,c=pt&&G&&Fr(G),u=(o.clientX-xe.clientX+i.x)/(a||1)+(c?c[0]-$t[0]:0)/(a||1),h=(o.clientY-xe.clientY+i.y)/(l||1)+(c?c[1]-$t[1]:0)/(l||1);if(!v.active&&!Fe){if(r&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))=0&&(Y({rootEl:k,name:"add",toEl:k,fromEl:A,originalEvent:e}),Y({sortable:this,name:"remove",toEl:k,originalEvent:e}),Y({rootEl:k,name:"sort",toEl:k,fromEl:A,originalEvent:e}),Y({sortable:this,name:"sort",toEl:k,originalEvent:e})),j&&j.save()):q!==Oe&&q>=0&&(Y({sortable:this,name:"update",toEl:k,originalEvent:e}),Y({sortable:this,name:"sort",toEl:k,originalEvent:e})),v.active&&((q==null||q===-1)&&(q=Oe,we=Ge),Y({sortable:this,name:"end",toEl:k,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){K("nulling",this),A=f=k=S=Ce=P=st=Se=xe=ie=Ye=q=we=Oe=Ge=Ne=Xe=j=at=v.dragged=v.ghost=v.clone=v.active=null,dt.forEach(function(e){e.checked=!0}),dt.length=Wt=jt=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":f&&(this._onDragOver(e),mi(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,r=this.el.children,i=0,o=r.length,s=this.options;ir.right+i||n.clientX<=r.right&&n.clientY>r.bottom&&n.clientX>=r.left:n.clientX>r.right&&n.clientY>r.top||n.clientX<=r.right&&n.clientY>r.bottom+i}function Ei(n,e,t,r,i,o,s,a){var l=r?n.clientY:n.clientX,c=r?t.height:t.width,u=r?t.top:t.left,h=r?t.bottom:t.right,d=!1;if(!s){if(a&&htu+c*o/2:lh-ht)return-Xe}else if(l>u+c*(1-i)/2&&lh-c*o/2)?l>u+c/2?1:-1:0}function Si(n){return B(f)1&&(E.forEach(function(a){o.addAnimationState({target:a,rect:z?M(a):s}),Bt(a),a.fromRect=s,r.removeAnimationState(a)}),z=!1,Ci(!this.options.removeCloneOnHide,i))},dragOverCompleted:function(t){var r=t.sortable,i=t.isOwner,o=t.insertion,s=t.activeSortable,a=t.parentEl,l=t.putSortable,c=this.options;if(o){if(i&&s._hideClone(),qe=!1,c.animation&&E.length>1&&(z||!i&&!s.options.sort&&!l)){var u=M(I,!1,!0,!0);E.forEach(function(d){d!==I&&(Pr(d,u),a.appendChild(d))}),z=!0}if(!i)if(z||Et(),E.length>1){var h=yt;s._showClone(r),s.options.animation&&!yt&&h&&Q.forEach(function(d){s.addAnimationState({target:d,rect:Qe}),d.fromRect=Qe,d.thisAnimationDuration=null})}else s._showClone(r)}},dragOverAnimationCapture:function(t){var r=t.dragRect,i=t.isOwner,o=t.activeSortable;if(E.forEach(function(a){a.thisAnimationDuration=null}),o.options.animation&&!i&&o.multiDrag.isMultiDrag){Qe=re({},r);var s=De(I,!0);Qe.top-=s.f,Qe.left-=s.e}},dragOverAnimationComplete:function(){z&&(z=!1,Et())},drop:function(t){var r=t.originalEvent,i=t.rootEl,o=t.parentEl,s=t.sortable,a=t.dispatchSortableEvent,l=t.oldIndex,c=t.putSortable,u=c||this.sortable;if(!!r){var h=this.options,d=o.children;if(!ke)if(h.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),L(I,h.selectedClass,!~E.indexOf(I)),~E.indexOf(I))E.splice(E.indexOf(I),1),Ue=null,$e({sortable:s,rootEl:i,name:"deselect",targetEl:I,originalEvt:r});else{if(E.push(I),$e({sortable:s,rootEl:i,name:"select",targetEl:I,originalEvt:r}),r.shiftKey&&Ue&&s.el.contains(Ue)){var p=B(Ue),g=B(I);if(~p&&~g&&p!==g){var b,C;for(g>p?(C=p,b=g):(C=g,b=p+1);C1){var O=M(I),_=B(I,":not(."+this.options.selectedClass+")");if(!qe&&h.animation&&(I.thisAnimationDuration=null),u.captureAnimationState(),!qe&&(h.animation&&(I.fromRect=O,E.forEach(function(D){if(D.thisAnimationDuration=null,D!==I){var J=z?M(D):O;D.fromRect=J,u.addAnimationState({target:D,rect:J})}})),Et(),E.forEach(function(D){d[_]?o.insertBefore(D,d[_]):o.appendChild(D),_++}),l===B(I))){var F=!1;E.forEach(function(D){if(D.sortableIndex!==B(D)){F=!0;return}}),F&&a("update")}E.forEach(function(D){Bt(D)}),u.animateAll()}oe=u}(i===o||c&&c.lastPutMode!=="clone")&&Q.forEach(function(D){D.parentNode&&D.parentNode.removeChild(D)})}},nullingGlobal:function(){this.isMultiDrag=ke=!1,Q.length=0},destroyGlobal:function(){this._deselectMultiDrag(),w(document,"pointerup",this._deselectMultiDrag),w(document,"mouseup",this._deselectMultiDrag),w(document,"touchend",this._deselectMultiDrag),w(document,"keydown",this._checkKeyDown),w(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(!(typeof ke!="undefined"&&ke)&&oe===this.sortable&&!(t&&ne(t.target,this.options.draggable,this.sortable.el,!1))&&!(t&&t.button!==0))for(;E.length;){var r=E[0];L(r,this.options.selectedClass,!1),E.shift(),$e({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:r,originalEvt:t})}},_checkKeyDown:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},re(n,{pluginName:"multiDrag",utils:{select:function(t){var r=t.parentNode[$];!r||!r.options.multiDrag||~E.indexOf(t)||(oe&&oe!==r&&(oe.multiDrag._deselectMultiDrag(),oe=r),L(t,r.options.selectedClass,!0),E.push(t))},deselect:function(t){var r=t.parentNode[$],i=E.indexOf(t);!r||!r.options.multiDrag||!~i||(L(t,r.options.selectedClass,!1),E.splice(i,1))}},eventProperties:function(){var t=this,r=[],i=[];return E.forEach(function(o){r.push({multiDragElement:o,index:o.sortableIndex});var s;z&&o!==I?s=-1:z?s=B(o,":not(."+t.options.selectedClass+")"):s=B(o),i.push({multiDragElement:o,index:s})}),{items:Qn(E),clones:[].concat(Q),oldIndicies:r,newIndicies:i}},optionListeners:{multiDragKey:function(t){return t=t.toLowerCase(),t==="ctrl"?t="Control":t.length>1&&(t=t.charAt(0).toUpperCase()+t.substr(1)),t}}})}function Ci(n,e){E.forEach(function(t,r){var i=e.children[t.sortableIndex+(n?Number(r):0)];i?e.insertBefore(t,i):e.appendChild(t)})}function Kr(n,e){Q.forEach(function(t,r){var i=e.children[t.sortableIndex+(n?Number(r):0)];i?e.insertBefore(t,i):e.appendChild(t)})}function Et(){E.forEach(function(n){n!==I&&n.parentNode&&n.parentNode.removeChild(n)})}v.mount(new Di);v.mount(Jt,Qt);var Ie=v;var Je=Tt(require("obsidian")),zr=new Intl.Collator(void 0,{usage:"sort",sensitivity:"base",numeric:!0}).compare;var Ur=i18next.t.bind(i18next),xi="up-and-down-arrows",_i={alphabetical:"plugins.file-explorer.label-sort-a-to-z",alphabeticalReverse:"plugins.file-explorer.label-sort-z-to-a",byModifiedTime:"plugins.file-explorer.label-sort-new-to-old",byModifiedTimeReverse:"plugins.file-explorer.label-sort-old-to-new",byCreatedTime:"plugins.file-explorer.label-sort-created-new-to-old",byCreatedTimeReverse:"plugins.file-explorer.label-sort-created-old-to-new",custom:"Custom"},Ii=[["alphabetical","alphabeticalReverse"],["byModifiedTime","byModifiedTimeReverse"],["byCreatedTime","byCreatedTimeReverse"],["custom"]],qr=function(n,e){let t=this.fileExplorer,r=this.file.children.slice();r.sort(function(i,o){let s,a;if(e&&((s=i instanceof Je.TFolder)||(a=o instanceof Je.TFolder)))return s&&!a?1:a&&!s?-1:zr(i.name,o.name);{if(!n)return zr(i.name,o.name);let l=n.indexOf(i.path),c=n.indexOf(o.path);return(l>-1?l:1/0)-(c>-1?c:1/0)}}),this.children=r.map(i=>t.fileItems[i.path]).filter(i=>i)},Qr=function(n,e){let t=this,r=this.addNavButton(xi,Ur("plugins.file-explorer.action-change-sort"),function(i){i.preventDefault();let o=new Je.Menu(t.app);for(let s=e(),a=0,l=Ii;a{r.setAttribute("data-sort-method",e())},100),this.addNavButton("three-horizontal-bars","Drag to rearrange",function(i){i.preventDefault();let o=!this.hasClass("is-active");this.toggleClass("is-active",o),t.app.workspace.trigger("file-explorer-draggable-change",o)}).addClass("drag-to-rearrange"),this.addNavButton("search","Filter items",function(i){var a,l;i.preventDefault();let o=!this.hasClass("is-active");this.toggleClass("is-active",o);let s=document.body.querySelector('.workspace-leaf-content[data-type="file-explorer"] .search-input-container > input');s&&!o?((a=s.parentElement)==null||a.hide(),s.value="",s.dispatchEvent(new Event("input"))):((l=s==null?void 0:s.parentElement)==null||l.show(),s==null||s.focus()),t.app.workspace.trigger("file-explorer-draggable-change",o)}),r};var Pe=Tt(require("obsidian")),Jr={statusBarOrder:[],ribbonBarOrder:[],fileExplorerOrder:{},actionBarOrder:{},autoHide:!1,autoHideDelay:2e3,dragDelay:200},Zt=class extends Pe.PluginSettingTab{constructor(e,t){super(e,t);this.plugin=t}hide(){}display(){let{containerEl:e}=this;e.empty(),new Pe.Setting(e).setName("Auto Collapse").setDesc("Automatically hide ribbon and status bar items once your mouse leaves the icon container").addToggle(t=>t.setValue(this.plugin.settings.autoHide).onChange(r=>{this.plugin.settings.autoHide=r,this.plugin.saveSettings()})),new Pe.Setting(e).setName("Auto Collapse Delay").setDesc("How long to wait before auto collapsing hidden icons on the ribbon and status bar").addText(t=>{t.setPlaceholder(String(2e3)),t.inputEl.type="number",t.setValue(String(this.plugin.settings.autoHideDelay)),t.onChange(r=>ye(this,null,function*(){this.plugin.settings.autoHideDelay=Number(r),this.plugin.saveSettings()}))}),new Pe.Setting(e).setName("Drag Start Delay (ms)").setDesc("How long to wait before triggering the drag behavior after clicking. \u26A0\uFE0F Requires an app restart.").addText(t=>{t.setPlaceholder(String(200)),t.inputEl.type="number",t.setValue(String(this.plugin.settings.dragDelay)),t.onChange(r=>ye(this,null,function*(){this.plugin.settings.dragDelay=Number(r),this.plugin.saveSettings()}))})}};function Zr(n,e){for(var t=[];n=n.previousSibling;)n.nodeType!==3&&(!e||e(n))&&t.push(n);return t}function en(n,e){for(var t=[];n=n.nextSibling;)n.nodeType!==3&&(!e||e(n))&&t.push(n);return t}function tn(n,e){var i,o;let t=(e==null?void 0:e.useClass)?Array.from(n.classList).filter(s=>!s.startsWith("is-")).sort().join(" "):"",r=((e==null?void 0:e.useTag)?n.tagName:"")+((e==null?void 0:e.useClass)?t:"")+((e==null?void 0:e.useText)?n.textContent:"")+((e==null?void 0:e.useAria)?n.getAttr("aria-label"):"")+((e==null?void 0:e.useIcon)?(o=(i=n.querySelector("svg"))==null?void 0:i.className)==null?void 0:o.baseVal:"");return Mi(r)}var Mi=function(n,e=0){let t=3735928559^e,r=1103547991^e;for(let i=0,o;i>>16,2246822507)^Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507)^Math.imul(t^t>>>13,3266489909),4294967296*(2097151&r)+(t>>>0).toString()};function St(n,e,t,r=1){return n.splice(t,0,...n.splice(e,r)),n}var wt=n=>{let e=[];return n.reduce((t,r)=>(r.children?r.children.length&&(e=[...e,...r.children]):t.push(r),t),[]).concat(e.length?wt(e):e)},rn=(n,e="suggestion-highlight")=>{let t=(i,o,s)=>{let a=o.split("."),l;for(l=0;lo.reduce((a,[l,c])=>(a[l]=`${a[l]}`,a[c]=`${a[c]}`,a),i.split("")).join("");return n.filter(({matches:i})=>i&&i.length).map(({item:i,matches:o})=>{let s=he({},i);return o.forEach(a=>{var l;s.titleInnerEl.origContent||(s.titleInnerEl.origContent=s.titleInnerEl.textContent),t(s,"titleInnerEl.innerHTML",r(a.value,a.indices)),(l=s.titleInnerEl)==null||l.addClass("has-matches")}),s})};function nn(n){return typeof n=="string"||n instanceof String?n.replace(/.md$/,""):n}function on(n,e){var t=le.config.getFn(n,e);return Array.isArray(t)?t.map(r=>nn(r)):nn(t)}Ie.mount(new Vr);var Ai="body > div.app-container div.status-bar",Oi="body > div.app-container div.side-dock-actions",so=(x.Platform.isMobile,200),Ze=500,er=class extends x.Plugin{constructor(){super(...arguments);this.fileExplorerFilter=function(){var t,r,i;if(!!((t=this==null?void 0:this.rootEl)==null?void 0:t.fileExplorer))if(((r=this.filter)==null?void 0:r.length)>=1){this.filtered||(this.rootEl._children=this.rootEl.children,this.filtered=!0);let o={includeScore:!0,includeMatches:!0,useExtendedSearch:!0,getFn:on,threshold:.1,ignoreLocation:!0,keys:["file.path"]},s=wt(this.rootEl._children),a=new le(s,o),l=200,c=a.search(this.filter).slice(0,l);this.rootEl.children=rn(c)}else((i=this.filter)==null?void 0:i.length)<1&&this.filtered&&(this.rootEl._children&&(this.rootEl.children=this.rootEl._children),wt(this.rootEl._children).map(s=>{s.titleInnerEl.origContent&&(s.titleInnerEl.setText(s.titleInnerEl.origContent),delete s.titleInnerEl.origContent,s.titleInnerEl.removeClass("has-matches"))}),this.filtered=!1)}}onload(){return ye(this,null,function*(){yield this.loadSettings(),this.registerMonkeyPatches(),this.registerEventHandlers(),this.registerSettingsTab(),this.initialize()})}loadSettings(){return ye(this,null,function*(){this.settings=Object.assign({},Jr,yield this.loadData())})}saveSettings(){return ye(this,null,function*(){yield this.saveData(this.settings)})}patchFileExplorerFolder(){let e=this,t=this.app.workspace.getLeaf(),r=this.app.viewRegistry.viewByType["file-explorer"](t),i=new x.TFolder(x.Vault,""),o=r.createFolderDom(i).constructor;this.register(ge(o.prototype,{sort(s){return function(...a){let l=e.settings.fileExplorerOrder[this.file.path];return this.fileExplorer.sortOrder==="custom"?qr.call(this,l,...a):s.call(this,...a)}}}))}initialize(){this.app.workspace.onLayoutReady(()=>{this.patchFileExplorerFolder(),setTimeout(()=>{if(x.Platform.isDesktop){this.insertSeparator(Ai,"status-bar-item",!0,16),this.setStatusBarSorter();let e=this.app.workspace.leftSplit.children,t=this.app.workspace.rightSplit.children;e.concat(t).forEach(r=>{r.hasOwnProperty("tabsInnerEl")&&!r.iconSorter&&(r.iconSorter=this.setTabBarSorter(r.tabsInnerEl,r))})}this.setFileExplorerSorter(),this.insertSeparator(Oi,"side-dock-ribbon-action",!1,18),this.setRibbonBarSorter(),this.app.workspace.iterateRootLeaves(e=>{var t,r;((t=e==null?void 0:e.view)==null?void 0:t.hasOwnProperty("actionsEl"))&&!((r=e==null?void 0:e.view)==null?void 0:r.hasOwnProperty("iconSorter"))&&(e.view.iconSorter=this.setViewActionSorter(e.view.actionsEl,e.view))})},x.Platform.isMobile?3e3:400)})}registerSettingsTab(){this.settingsTab=new Zt(this.app,this),this.addSettingTab(this.settingsTab)}clearFileExplorerFilter(){let e=this.getFileExplorer(),t=document.body.querySelector('.workspace-leaf-content[data-type="file-explorer"] .search-input-container > input');t&&(t.value=""),e.dom.infinityScroll.filter="",e.dom.infinityScroll.compute()}registerEventHandlers(){this.registerEvent(this.app.workspace.on("file-explorer-draggable-change",e=>{this.toggleFileExplorerSorters(e)})),this.registerEvent(this.app.workspace.on("file-explorer-sort-change",e=>{e==="custom"?setTimeout(()=>{this.setFileExplorerSorter()},10):this.cleanupFileExplorerSorters()})),this.registerEvent(this.app.workspace.on("file-explorer-load",e=>{setTimeout(()=>{this.setFileExplorerSorter(e)},1e3)})),this.registerEvent(this.app.workspace.on("bartender-leaf-split",(e,t)=>{let r=t.tabsInnerEl;t.type==="tabs"&&t instanceof x.WorkspaceTabs&&this.setTabBarSorter(r,t)})),this.registerEvent(this.app.workspace.on("ribbon-bar-updated",()=>{setTimeout(()=>{this.settings.ribbonBarOrder&&this.ribbonBarSorter&&(this.setElementIDs(this.ribbonBarSorter.el,{useClass:!0,useAria:!0,useIcon:!0}),this.ribbonBarSorter.sort(this.settings.ribbonBarOrder))},0)})),this.registerEvent(this.app.workspace.on("status-bar-updated",()=>{setTimeout(()=>{this.settings.statusBarOrder&&this.statusBarSorter&&(this.setElementIDs(this.statusBarSorter.el,{useClass:!0,useIcon:!0}),this.statusBarSorter.sort(this.settings.statusBarOrder))},0)}))}registerMonkeyPatches(){let e=this;if(this.register(ge(this.app.viewRegistry.constructor.prototype,{registerView(t){return function(r,i,...o){return e.app.workspace.trigger("view-registered",r,i),t.call(this,r,i,...o)}}})),this.app.workspace.layoutReady){let t=this.getFileExplorer();this.patchFileExplorer(t)}else{let t=this.app.workspace.on("view-registered",(r,i)=>{if(r!=="file-explorer")return;this.app.workspace.offref(t);let o=new x.WorkspaceLeaf(e.app),s=i(o);this.patchFileExplorer(s)})}this.register(ge(x.View.prototype,{onunload(t){return function(...r){try{this.iconSorter&&(this.iconSorter.destroy(),this.iconSorter=null)}catch(i){}return t.call(this,...r)}},onload(t){return function(...r){return setTimeout(()=>{if(this.app.workspace.layoutReady)try{this.leaf.parentSplit instanceof x.WorkspaceTabs||this.hasOwnProperty("actionsEl")&&!this.iconSorter&&(this.iconSorter=e.setViewActionSorter(this.actionsEl,this))}catch(i){}},200),t.call(this,...r)}}})),x.Platform.isDesktop&&this.register(ge(HTMLDivElement.prototype,{addEventListener(t){return function(r,i,o){if(r==="mousedown"&&i instanceof Function&&this.hasClass("workspace-tab-header")){let a=i;i=l=>{l instanceof MouseEvent&&((l==null?void 0:l.altKey)||(l==null?void 0:l.metaKey))||a(l)}}return t.call(this,r,i,o)}}})),this.register(ge(x.Workspace.prototype,{splitLeaf(t){return function(r,i,o,s,...a){let l=t.call(this,r,i,o,s,...a);return this.trigger("bartender-leaf-split",r,i),l}},changeLayout(t){return function(r,...i){return ye(this,null,function*(){let o=yield t.call(this,r,...i);return this.trigger("bartender-workspace-change"),o})}}})),this.register(ge(x.Plugin.prototype,{addStatusBarItem(t){return function(...r){let i=t.call(this,...r);return this.app.workspace.trigger("status-bar-updated"),i}},addRibbonIcon(t){return function(...r){let i=t.call(this,...r);return this.app.workspace.trigger("ribbon-bar-updated"),i}}}))}patchFileExplorer(e){let t=this;if(e){let r=e.dom.infinityScroll.constructor;this.register(()=>this.clearFileExplorerFilter()),this.register(ge(r.prototype,{compute(i){return function(...o){try{this.scrollEl.hasClass("nav-files-container")&&t.fileExplorerFilter.call(this)}catch(a){}return i.call(this,...o)}}})),this.register(ge(e.headerDom.constructor.prototype,{addSortButton(i){return function(...o){var s,a,l;return((l=(a=(s=this.navHeaderEl)==null?void 0:s.parentElement)==null?void 0:a.dataset)==null?void 0:l.type)==="file-explorer"?(t.setFileExplorerFilter(this),Qr.call(this,...o)):i.call(this,...o)}}}))}}insertSeparator(e,t,r,i=16){document.body.querySelectorAll(e).forEach(s=>{let a=r?Zr:en;if(s){let l=s.createDiv(`${t} separator`);r&&s.prepend(l);let c=l.createDiv("glyph");(0,x.setIcon)(c,"plus-with-circle",i),l.addClass("is-collapsed"),this.register(()=>l.detach());let h;l.onClickEvent(d=>{l.hasClass("is-collapsed")?(Array.from(s.children).forEach(p=>p.removeClass("is-hidden")),l.removeClass("is-collapsed")):(a(l).forEach(p=>p.addClass("is-hidden")),l.addClass("is-collapsed"))}),s.onmouseenter=d=>{h&&clearTimeout(h)},s.onmouseleave=d=>{this.settings.autoHide&&(h=setTimeout(()=>{a(l).forEach(p=>p.addClass("is-hidden")),l.addClass("is-collapsed")},this.settings.autoHideDelay))},setTimeout(()=>{a(l).forEach(d=>d.addClass("is-hidden")),l.addClass("is-collapsed")},0)}})}setElementIDs(e,t){Array.from(e.children).forEach(r=>{r instanceof HTMLElement&&(r.getAttribute("data-id")||r.setAttribute("data-id",tn(r,t)))})}setTabBarSorter(e,t){return this.setElementIDs(e,{useClass:!0,useIcon:!0}),Ie.create(e,{group:"leftTabBar",dataIdAttr:"data-id",delay:x.Platform.isMobile?200:this.settings.dragDelay,dropBubble:!1,dragoverBubble:!1,animation:Ze,onChoose:()=>{var i;return(i=e.parentElement)==null?void 0:i.addClass("is-dragging")},onUnchoose:()=>{var i;return(i=e.parentElement)==null?void 0:i.removeClass("is-dragging")},onStart:()=>{var i;document.body.addClass("is-dragging"),(i=e.querySelector(".separator"))==null||i.removeClass("is-collapsed"),Array.from(e.children).forEach(o=>o.removeClass("is-hidden"))},onEnd:i=>{document.body.removeClass("is-dragging"),i.oldIndex!==void 0&&i.newIndex!==void 0&&(St(t.children,i.oldIndex,i.newIndex),t.currentTab=i.newIndex,t.recomputeChildrenDimensions()),this.app.workspace.requestSaveLayout()}})}setStatusBarSorter(){let e=document.body.querySelector("body > div.app-container > div.status-bar");e&&(this.setElementIDs(e,{useClass:!0,useAria:!0,useIcon:!0}),this.statusBarSorter=Ie.create(e,{group:"statusBar",dataIdAttr:"data-id",delay:x.Platform.isMobile?200:this.settings.dragDelay,animation:Ze,onChoose:()=>{Array.from(e.children).forEach(t=>t.removeClass("is-hidden"))},onStart:()=>{var t;(t=e.querySelector(".separator"))==null||t.removeClass("is-collapsed"),Array.from(e.children).forEach(r=>r.removeClass("is-hidden"))},store:{get:t=>this.settings.statusBarOrder,set:t=>{this.settings.statusBarOrder=t.toArray(),this.saveSettings()}}}))}setViewActionSorter(e,t){if(this.setElementIDs(e,{useClass:!0,useIcon:!0}),Object.values(e).find(s=>s==null?void 0:s.hasOwnProperty("nativeDraggable")))return;let i=(t==null?void 0:t.getViewType())||"unknown";return new Ie(e,{group:"actionBar",dataIdAttr:"data-id",delay:x.Platform.isMobile?200:this.settings.dragDelay,sort:!0,animation:Ze,onStart:()=>{var s;(s=e.querySelector(".separator"))==null||s.removeClass("is-collapsed"),Array.from(e.children).forEach(a=>a.removeClass("is-hidden"))},store:{get:()=>this.settings.actionBarOrder[i],set:s=>{this.settings.actionBarOrder[i]=s.toArray(),this.saveSettings()}}})}setRibbonBarSorter(){let e=document.body.querySelector("body > div.app-container div.side-dock-actions");e&&(this.setElementIDs(e,{useClass:!0,useAria:!0,useIcon:!0}),this.ribbonBarSorter=Ie.create(e,{group:"ribbonBar",dataIdAttr:"data-id",delay:x.Platform.isMobile?200:this.settings.dragDelay,animation:Ze,onChoose:()=>{Array.from(e.children).forEach(t=>t.removeClass("is-hidden"))},onStart:()=>{var t;(t=e.querySelector(".separator"))==null||t.removeClass("is-collapsed"),Array.from(e.children).forEach(r=>r.removeClass("is-hidden"))},store:{get:t=>this.settings.ribbonBarOrder,set:t=>{this.settings.ribbonBarOrder=t.toArray(),this.saveSettings()}}}))}setFileExplorerFilter(e){let t=e.navHeaderEl;if(t){let r=t.createDiv("search-input-container");t.insertAdjacentElement("afterend",r);let i=r.createEl("input");i.placeholder="Type to filter...",i.type="text",r.hide(),i.oninput=s=>{let a=this.getFileExplorer();s.target instanceof HTMLInputElement&&(s.target.value.length?o.show():o.hide(),a.dom.infinityScroll.filter=s.target.value),a.dom.infinityScroll.compute()};let o=r.createDiv("search-input-clear-button",function(s){s.addEventListener("click",function(){i.value="",o.hide(),i.focus(),i.dispatchEvent(new Event("input"))}),s.hide()})}}setFileExplorerSorter(e){var r;if(e||(e=this.getFileExplorer()),!e||e.sortOrder!=="custom"||e.hasCustomSorter)return;let t=this.getRootFolders(e);if(!(!t||!t.length))for(let i of t){let o=i==null?void 0:i.childrenEl;if(!o)continue;let s;e.hasCustomSorter=!0;let a=!!((r=document.body.querySelector("div.nav-action-button.drag-to-rearrange"))==null?void 0:r.hasClass("is-active"));i.sorter=Ie.create(o,{group:"fileExplorer"+i.file.path,multiDrag:!0,multiDragKey:"alt",delay:x.Platform.isMobile?200:this.settings.dragDelay,sort:a,animation:Ze,onStart:l=>{l.items.length?s=l.items:s=[l.item]},onMove:l=>{if(!i.children||!(s==null?void 0:s.length))return;let c=i.children.map(b=>b.el),u=l.related,h=c.indexOf(u),d=s.first(),p=c.indexOf(d),g=s.slice();p>h&&g.reverse();for(let b of g){let C=c.indexOf(b);i.children=St(i.children,C,h),c=St(c,C,h)}this.settings.fileExplorerOrder[i.file.path]=i.children.map(b=>b.file.path),this.saveSettings()},onEnd:l=>{var c;s=[],(c=document.querySelector("body>div.drag-ghost"))==null||c.detach()}})}}getFileExplorer(){var t,r;return(r=(t=this.app.workspace.getLeavesOfType("file-explorer"))==null?void 0:t.first())==null?void 0:r.view}getRootFolders(e){var i,o;if(e||(e=this.getFileExplorer()),!e)return;let t=(o=(i=e.dom)==null?void 0:i.infinityScroll)==null?void 0:o.rootEl;return t&&this.traverseRoots(t)}traverseRoots(e,t){t||(t=[e]);for(let r of e.children||[])r.children&&t.push(r),this.traverseRoots(r,t);return t}toggleFileExplorerSorters(e){let t=this.getFileExplorer(),r=this.getRootFolders(t);if(r==null?void 0:r.length)for(let i of r)i.sorter&&i.sorter.option("sort",e)}cleanupFileExplorerSorters(){let e=this.getFileExplorer(),t=this.getRootFolders(e);if(t==null?void 0:t.length)for(let r of t)r.sorter&&(r.sorter.destroy(),delete r.sorter,Object.keys(r.childrenEl).forEach(i=>i.startsWith("Sortable")&&delete r.childrenEl[i]),r.childrenEl.querySelectorAll("div.nav-file-title").forEach(i=>i.draggable=!0),r.childrenEl.querySelectorAll("div.nav-folder-title").forEach(i=>i.draggable=!0));delete e.hasCustomSorter}onunload(){var e,t;(e=this.statusBarSorter)==null||e.destroy(),(t=this.ribbonBarSorter)==null||t.destroy(),this.app.workspace.iterateAllLeaves(r=>{var o,s,a;let i;if((i=(r==null?void 0:r.iconSorter)?r:!1)||(i=((o=r==null?void 0:r.view)==null?void 0:o.iconSorter)?r.view:!1)||(i=(r==null?void 0:r.parentSplit)instanceof x.WorkspaceTabs&&((s=r==null?void 0:r.parentSplit)==null?void 0:s.iconSorter)?r==null?void 0:r.parentSplit:!1))try{(a=i.iconSorter)==null||a.destroy()}catch(l){}finally{delete i.iconSorter}}),this.cleanupFileExplorerSorters()}}; -/**! - * Sortable 1.14.0 - * @author RubaXa - * @author owenm - * @license MIT - */ diff --git a/.obsidian/plugins/obsidian-bartender/manifest.json b/.obsidian/plugins/obsidian-bartender/manifest.json deleted file mode 100644 index d559f3f..0000000 --- a/.obsidian/plugins/obsidian-bartender/manifest.json +++ /dev/null @@ -1 +0,0 @@ -{"id":"obsidian-bartender","name":"Bartender","version":"0.5.2","minAppVersion":"0.12.5","description":"Allows for rearranging the elements in the status bar and sidebar ribbon","author":"NothingIsLost","authorUrl":"https://github.com/nothingislost","isDesktopOnly":false} \ No newline at end of file diff --git a/.obsidian/plugins/obsidian-bartender/styles.css b/.obsidian/plugins/obsidian-bartender/styles.css deleted file mode 100644 index 82e04bd..0000000 --- a/.obsidian/plugins/obsidian-bartender/styles.css +++ /dev/null @@ -1,140 +0,0 @@ -:root { - --left-indicator: url('data:image/svg+xml;utf8,'); - --right-indicator: url('data:image/svg+xml;utf8,'); - --up-indicator: url('data:image/svg+xml;utf8,'); - --down-indicator: url('data:image/svg+xml;utf8,'); -} - -.side-dock-actions .sortable-ghost, -.status-bar .sortable-ghost, -.view-actions .sortable-ghost, -.workspace-tab-header-container .sortable-ghost { - visibility: hidden; -} - -.side-dock-ribbon div.separator { - cursor: grab; - padding: 0px 4px; - display: flex; - place-items: center; - justify-content: center; - height: 1em; -} - -div.separator svg { - background-color: currentColor; -} - -.side-dock-ribbon div.separator .glyph { - /* margin-top: -4px; */ - display: flex; - align-self: flex-end; -} - -.side-dock-ribbon div.separator:hover { - /* some themes highlight the hovered icon and it looks bad on the separator */ - background: none; -} - -.side-dock-ribbon div.separator svg { - -webkit-mask-image: var(--up-indicator); -} -.side-dock-ribbon div.separator.is-collapsed.sortable-chosen svg { - /* so that the icon updates to show the expand icon on drag start */ - -webkit-mask-image: var(--up-indicator); -} -.side-dock-ribbon div.separator.is-collapsed svg { - -webkit-mask-image: var(--down-indicator); -} - -/* for minimal floating ribbon support */ - -.hider-ribbon .side-dock-ribbon div.separator { - height: 26px; -} - -.hider-ribbon .side-dock-ribbon div.separator .glyph { - display: flex; - align-self: flex-end; -} -.hider-ribbon .side-dock-ribbon div.separator svg { - -webkit-mask-image: var(--left-indicator); -} -.hider-ribbon .side-dock-ribbon div.separator.is-collapsed.sortable-chosen svg { - /* so that the icon updates to show the expand icon on drag start */ - -webkit-mask-image: var(--left-indicator); -} -.hider-ribbon .side-dock-ribbon div.separator.is-collapsed svg { - -webkit-mask-image: var(--right-indicator); -} - -.view-actions div.separator.is-collapsed { - transform: rotateY(180deg); -} - -.status-bar .is-hidden, -.side-dock-ribbon .is-hidden, -.view-actions .is-hidden { - /* if you're mad about this !important - set the --is-hidden-display variable to override it */ - --is-hidden-display: none; - display: var(--is-hidden-display) !important; -} - -.status-bar div.separator { - --cursor: grab; /* to deal with minimal theme */ - cursor: grab; - padding: 0px 4px; - display: flex; - align-items: center; - /* line-height: 1; */ -} - -.status-bar div.separator .glyph { - display: flex; -} - -.status-bar div.separator svg, -.status-bar div.separator.is-collapsed.sortable-chosen svg { - -webkit-mask-image: var(--right-indicator); -} - -.status-bar div.separator.is-collapsed svg { - -webkit-mask-image: var(--left-indicator); -} - -.side-dock-ribbon div.side-dock-ribbon-action.sortable-chosen, -.side-dock-ribbon div.separator.sortable-chosen, -.status-bar div.separator.sortable-chosen { - --cursor: grabbing; - cursor: grabbing; -} - -body.is-dragging .tooltip { - display: none; -} - -.workspace-tab-header-container.is-dragging .workspace-tab-header, -.workspace-tab-header-container.is-dragging .workspace-tab-container-before, -.workspace-tab-header-container.is-dragging .workspace-tab-container-after { - background: none; -} -.workspace-tab-header-container.is-dragging .workspace-tab-header-inner-icon:hover { - background: none; -} - -.workspace-leaf-content[data-type="file-explorer"] .nav-header .search-input-container { - display: none; -} - -.workspace-leaf-content[data-type="file-explorer"] .nav-header .search-input-container.is-active { - display: block; -} - -div.nav-action-button[data-sort-method] + div.nav-action-button.drag-to-rearrange { - display: none; -} - -div.nav-action-button[data-sort-method="custom"] + div.nav-action-button.drag-to-rearrange { - display: block; -} diff --git a/.obsidian/plugins/obsidian-editing-toolbar/.github/FUNDING.yml b/.obsidian/plugins/obsidian-editing-toolbar/.github/FUNDING.yml deleted file mode 100644 index 8ca9748..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/.github/FUNDING.yml +++ /dev/null @@ -1,6 +0,0 @@ -github: cumany -custom: - [ - "https://www.buymeacoffee.com/cuman", - "https://user-images.githubusercontent.com/42957010/172568261-8a732d3d-303a-4367-993e-23c3efbf62a8.png", - ] diff --git a/.obsidian/plugins/obsidian-editing-toolbar/.github/ISSUE_TEMPLATE/bug_report.md b/.obsidian/plugins/obsidian-editing-toolbar/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index dd84ea7..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: '' -assignees: '' - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Desktop (please complete the following information):** - - OS: [e.g. iOS] - - Browser [e.g. chrome, safari] - - Version [e.g. 22] - -**Smartphone (please complete the following information):** - - Device: [e.g. iPhone6] - - OS: [e.g. iOS8.1] - - Browser [e.g. stock browser, safari] - - Version [e.g. 22] - -**Additional context** -Add any other context about the problem here. diff --git a/.obsidian/plugins/obsidian-editing-toolbar/.github/ISSUE_TEMPLATE/feature_request.md b/.obsidian/plugins/obsidian-editing-toolbar/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index bbcbbe7..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: '' -labels: '' -assignees: '' - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/.obsidian/plugins/obsidian-editing-toolbar/.gitignore b/.obsidian/plugins/obsidian-editing-toolbar/.gitignore deleted file mode 100644 index 0bbf403..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Intellij -*.iml -.idea - -# npm -node_modules -package-lock.json - -# build -main.js -.DS_Store -*.js.map -.env - -# obsidian -data.json - -#history -.history - -#DS Store -.DS_Store diff --git a/.obsidian/plugins/obsidian-editing-toolbar/LICENSE b/.obsidian/plugins/obsidian-editing-toolbar/LICENSE deleted file mode 100644 index a612ad9..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/LICENSE +++ /dev/null @@ -1,373 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. diff --git a/.obsidian/plugins/obsidian-editing-toolbar/README-zh_cn.md b/.obsidian/plugins/obsidian-editing-toolbar/README-zh_cn.md deleted file mode 100644 index 73dcb75..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/README-zh_cn.md +++ /dev/null @@ -1,105 +0,0 @@ -# obsidian-editing-toolbar 插件 - -感谢 [cmenu](https://github.com/chetachiezikeuzor/cMenu-Plugin)插件的开发,给我了很多灵感,但这个插件已经一年多没有维护了,于是我重新魔改了它,并增加了很多有趣的功能,包括置顶工具栏,光标跟随等,于是 Cmenu toolbar 就诞生了。 -**Obsidian Editing Toolbar**是一个提供类似于 MS-Word 的工具栏的插件,并增加了一个最小的和用户友好的文本编辑器模式,以获得更顺畅的写作/编辑体验。不需要记住复杂的 markdown 命令,类似于富文本编辑器的所见即所得。 -这个插件是专门为那些希望有一个简单的文本编辑器来帮助标记他们的笔记设计的。它解决了必须记住许多热键或命令来实现所需要的功能的问题。一个简单的工具条可以改善你在 Obsidian 中的写作体验。 - -> 建议配合[增强编辑插件](https://github.com/obsidian-canzi/Enhanced-editing),可以添加更多的实用的编辑指令。 - -![](cmenu-demo.gif) - -## 目录导航 - - - [如何安装](#如何安装) - - [视频介绍](#视频介绍) - - [功能特性](#功能特性) - - [跟其他插件协作](#跟其他插件协作) - - [完整示例库分享](#完整示例库分享) - -## 如何安装 - -1. brat 安装。插件目前还没有上架官方商店可以通过  [BRAT Plugin](https://obsidian.md/plugins?id=obsidian42-brat)去安装。 - `cumany/obsidian-editing-toolbar` -2. 手动安装 参考教程 - [Plugins mini FAQ ](https://forum.obsidian.md/t/plugins-mini-faq/7737) - [如何安装 obsdiain 插件](https://publish.obsidian.md/chinesehelp/01+2021%E6%96%B0%E6%95%99%E7%A8%8B/%E5%A6%82%E4%BD%95%E5%AE%89%E8%A3%85obsdiain%E6%8F%92%E4%BB%B6) - -## 视频介绍 - -[谁说 Obsidian 不如语雀,这个插件让你使用 ob 不用再记那么多指令了,ob 工具栏你值得拥有](https://www.bilibili.com/video/BV1mY4y1T7g2/) - -## 功能特性 - -功能在延续之前 cmenu 功能的基础上增加了下面额外的功能。 - -1. 增加新的工具栏样式 tiny - - ![|400](https://ghproxy.com/https://raw.githubusercontent.com/cumany/cumany/main//pic/202209071131715.png) -2. 增加工具栏位置选项,top,following - - ![|400](https://ghproxy.com/https://raw.githubusercontent.com/cumany/cumany/main//pic/202209071133753.png) - ![](https://ghproxy.com/https://raw.githubusercontent.com/cumany/cumany/main//pic/202209071751006.gif) - -3. 增加一些内置命令 - 1. change-font-color - 字体颜色调色板和格式刷 - 2. change-background-color - 背景颜色调色板和格式刷 - 3. indent-list - 列表缩进 - 4. undent-list - 列表反缩进 - 5. editor-undo - 6. editor-redo - 7. hrline - 会插入一个`---`分割线 - 8. justify 两端对齐 - 插入一个 html 代码,让文字两端对齐`

.....

` - 9. left - 插入一个 html 代码,让文字左对齐`

.....

` - 10. right - 插入一个 html 代码,让文字右对齐`

.....

` - 11. center 居中对齐 - 插入一个 html 代码,让文字居中`
.....
` - 12. fullscreen-focus - 默认绑定快捷键`Ctrl+shift+F11`。 - 将使笔记页面全屏显示,让你更专注于写作本身。要退出全屏,请按 ESC 或再次执行全屏命令。 - 13. workplace-fullscreen-focus - 默认绑定快捷键`Ctrl+F11`。 - 与全屏聚焦模式不同,这个模式只是隐藏了左右侧边栏的面板,它只是工作区全屏。 - 14. head 1-6 级标题设置 - 默认绑定快捷键`Ctrl+1,ctrl+2,...Ctrl+6`。 - - ![](https://ghproxy.com/https://raw.githubusercontent.com/cumany/cumany/main//pic/202209071707695.png) - 15. 支持自定义命令图标 - - ![](https://ghproxy.com/https://raw.githubusercontent.com/cumany/cumany/main//pic/202209071717111.gif) - 16. 支持修改命令名称 - - ![](https://ghproxy.com/https://raw.githubusercontent.com/cumany/cumany/main//pic/202209071720159.gif) - 17. 支持添加子菜单 - - ![](https://ghproxy.com/https://raw.githubusercontent.com/cumany/cumany/main//pic/202209071722207.gif) - 18. 支持菜单拖动排序 - 19. 增加格式刷功能 内置字体颜色和背景颜色两种格式刷(鼠标中键或者右键可取消格式刷状态) - - ![](https://ghproxy.com/https://raw.githubusercontent.com/cumany/cumany/main//pic/202209071731151.gif) - 20. 工具栏图标宽度自适应收缩 - - ![](https://ghproxy.com/https://raw.githubusercontent.com/cumany/cumany/main/pic/202209072157728.gif) - -### 跟其他插件协作 - -1. [emjoi toolbar ](obsidian://show-plugin?id=obsidian-emoji-toolbar)快捷插入表情 - ![](https://ghproxy.com/https://raw.githubusercontent.com/cumany/cumany/main/pic/202209092001600.gif) - - -2. [Obsidian-Table-Generator](https://github.com/Quorafind/Obsidian-Table-Generator/) & [ob-table-enhance](https://github.com/Stardusten/ob-table-enhancer) 快捷插入表格并编辑 - ![](https://ghproxy.com/https://raw.githubusercontent.com/cumany/cumany/main/pic/202209092008571.gif) - -> 上面插件均可从示例库获取,示例库的插件一般都经过了优化并修复了一些错误 -☟☟☟ -### 完整示例库分享 - -这是可以让你大开眼界的 Obsidian 示例库,里面有很多眼花缭乱的功能和示例,相信你看过一定会惊叹,这是 Obsidian 吗? -[Blue-topaz-examples](https://github.com/cumany/Blue-topaz-examples) diff --git a/.obsidian/plugins/obsidian-editing-toolbar/README.md b/.obsidian/plugins/obsidian-editing-toolbar/README.md deleted file mode 100644 index a08c474..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/README.md +++ /dev/null @@ -1,99 +0,0 @@ -# obsidian-editing-toolbar Plugin - -![](cmenu-demo.gif) - -Thanks to the [cmenu](https://github.com/chetachiezikeuzor/cMenu-Plugin) plugin, which gave me a lot of inspiration, but this plugin has not been maintained for more than a year, so I re-modified it and added a lot of interesting features, including the top toolbar, cursor following, etc., so editing toolbar was created. - -**Obsidian Editing Toolbar** is a plugin that provides a toolbar similar to MS-Word,and adds a minimal and user friendly text editor modal for a smoother writing/editing experience . This plugin makes text editing and firing commands easier for those that don't wish to configure a multitude of hotkeys.No need to remember complex markdown commands, similar to a rich text editor as WYSIWYG. -This plugin was specifically designed for note-takers that want to have a simple text editor to aid in marking up their notes. It solves the issue of having to memorize numerous hotkeys and/or use multiple key presses to get the desired markup. A simple toolbar to improve your writing experience in Obsidian! - -> It is recommended to work with [Enhanced Editing Plugin](https://github.com/obsidian-canzi/Enhanced-editing), which can add more useful editing commands. - -_[点击这里](./README-zh_cn.md)查看中文文档。_ - -## TOC - -- [obsidian-editing-toolbar Plugin](#obsidian-editing-toolbar-plugin) - - [TOC](#toc) - - [how-to-install](#how-to-install) - - [Video Introduction](#video-introduction) - - [Key Features](#key-features) - - [Work with other plugins](#work-with-other-plugins) - - [Full Vault showcase](#full-vault-showcase) - -## how-to-install - -Please Refer: [How to install Obsidian Plugins](https://forum.obsidian.md/t/plugins-mini-faq/7737) - -## Video Introduction - -[About Cmenu toolbar](https://www.bilibili.com/video/BV1mY4y1T7g2/) - -## Key Features - -1. add a new toolbar style tiny - - ![](https://ghproxy.com/https://raw.githubusercontent.com/cumany/cumany/main//pic/202209071131715.png) - -2. add toolbar position options, top, following - - ![](https://ghproxy.com/https://raw.githubusercontent.com/cumany/cumany/main//pic/202209071133753.png) - ![](https://ghproxy.com/https://raw.githubusercontent.com/cumany/cumany/main//pic/202209071751006.gif) - -3. add some built-in commands - 1. change-font-color - 2. change-background-color - 3. indent-list - 4. undent-list - 5. editor-undo - 6. editor-redo - 7. hrline - will insert a `---` split line - 8. justify Both ends aligned - Inserts an html code to align the text at both ends `

.....

` - 9. left - Insert an html code to align the text left `

.....

` - 10. right - Insert an html code to align the text right `

.....

` - 11. center - Insert an html code to center the text `
.....
` - 12. fullscreen-focus - Default binding shortcut key `Ctrl+shift+F11` - Will make the notes page display full screen, let you focus more on the writing itself. To exit full screen press ESC or execute the full screen command again - 13. workplace-fullscreen-focus - Default binding shortcut key `Ctrl+F11` - Unlike fullscreen-focus mode, this one just hides the left and right sidebar panels, it's only workspace full screen - 14. head 1-6 level heading settings - Default binding shortcut key `Ctrl+1,ctrl+2,...Ctrl+6` - ![](https://ghproxy.com/https://raw.githubusercontent.com/cumany/cumany/main//pic/202209071707695.png) - 15. support custom command icons - ![](https://ghproxy.com/https://raw.githubusercontent.com/cumany/cumany/main//pic/202209071717111.gif) - 16. Support modify command name - ![](https://ghproxy.com/https://raw.githubusercontent.com/cumany/cumany/main//pic/202209071720159.gif) - 17. Support for adding submenus - ![](https://ghproxy.com/https://raw.githubusercontent.com/cumany/cumany/main//pic/202209071722207.gif) - 18. Support menu dragging and sorting - 19. Add formatting brush function Built-in two kinds of formatting brush for font color and background color (middle mouse button or right click can cancel the formatting brush status) - ![](https://ghproxy.com/https://raw.githubusercontent.com/cumany/cumany/main//pic/202209071731151.gif) - 20. Adaptive shrinkage of toolbar icon width - ![](https://ghproxy.com/https://raw.githubusercontent.com/cumany/cumany/main/pic/202209072157728.gif) - - - -### Work with other plugins - -1. [emjoi toolbar ](obsidian://show-plugin?id=obsidian-emoji-toolbar) Quickly Insert a emoji - ![](https://ghproxy.com/https://raw.githubusercontent.com/cumany/cumany/main/pic/202209092001600.gif) - - -2. [Obsidian-Table-Generator](https://github.com/Quorafind/Obsidian-Table-Generator/) & [ob-table-enhance](https://github.com/Stardusten/ob-table-enhancer) Quickly Insert a table and edit - ![](https://ghproxy.com/https://raw.githubusercontent.com/cumany/cumany/main/pic/202209092008571.gif) - -> The above plugins are available from the example vault , all of which have been optimized and have some bugs fixed -☟☟☟ - - -### Full Vault showcase - -This is the Obsidian example vault is amazing, there are a lot of dazzling features and showcase, I believe you will wonder a bit, is this Obsidian? -[Blue-topaz-examples](https://github.com/cumany/Blue-topaz-examples) diff --git a/.obsidian/plugins/obsidian-editing-toolbar/build/manifest.json b/.obsidian/plugins/obsidian-editing-toolbar/build/manifest.json deleted file mode 100644 index 8ca2847..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/build/manifest.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "id": "obsidian-editing-toolbar", - "name": "Obsidian Editing Toolbar", - "version": "2.1.0", - "minAppVersion": "0.9.12", - "description": "The Obsidian Editing Toolbar is modified from cmenu, which provides more powerful customization settings and has many built-in editing commands to be a MS Word-like toolbar editing experience.", - "author": "Cuman", - "authorUrl": "https://github.com/cumany/obsidian-editing-toolbar", - "isDesktopOnly": true -} \ No newline at end of file diff --git a/.obsidian/plugins/obsidian-editing-toolbar/build/styles.css b/.obsidian/plugins/obsidian-editing-toolbar/build/styles.css deleted file mode 100644 index c55f004..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/build/styles.css +++ /dev/null @@ -1,846 +0,0 @@ - - -#cMenuToolbarModalBar { - width: auto; - height: auto; - padding: 3px; - display: grid; - user-select: none; - border-radius: 6px; - position: absolute; - transition: 200ms ease; - -webkit-transition: 200ms ease; - min-width: fit-content; - justify-content: space-around; - z-index: var(--layer-status-bar); - box-shadow: 0px 3px 32px rgb(31 38 135 / 15%); - border: 1px solid var(--background-modifier-border); -} -#cMenuToolbarModalBar.cMenuToolbarFlex { - display: flex; -} -#cMenuToolbarModalBar.cMenuToolbarFlex :is(.cMenuToolbarCommandItem,button[class^=cMenuToolbarCommandsubItem]) { - min-width: 20px; -} -#cMenuToolbarModalBar .cMenuToolbarCommandItem { - margin: 2px; - border: none; - display: flex; - cursor: pointer; - padding: 5px 6px; - box-shadow: none; - margin-left: 3px; - margin-right: 3px; - position: relative; - border-radius: 3px; - font-size: initial !important; - background-color: var(--background-primary-alt); -} - -#cMenuToolbarModalBar button.cMenuToolbarCommandItem:hover { - background-color: var(--background-secondary); -} - -/* #cMenuToolbarModalBar button.cMenuToolbarCommandItem svg { - width: 1.3em; - height: 1.3em; -} */ - -/*---------------------------------------------------------------- -cMenuToolbar SETTINGS BUTTONS -----------------------------------------------------------------*/ - -.modal.mod-settings - button:not(.mod-cta):not(.mod-warning).cMenuToolbarSettingsButton.cMenuToolbarSettingsButtonAdd, -button:not(.mod-cta):not(.mod-warning).cMenuToolbarSettingsButton.cMenuToolbarSettingsButtonAdd { - background-color: var(--interactive-accent); -} - -.modal.mod-settings - button:not(.mod-cta):not(.mod-warning).cMenuToolbarSettingsButton.cMenuToolbarSettingsButtonDelete, -button:not(.mod-cta):not(.mod-warning).cMenuToolbarSettingsButton.cMenuToolbarSettingsButtonDelete { - background-color: #989cab; -} - -.modal.mod-settings - button:not(.mod-cta):not(.mod-warning).cMenuToolbarSettingsButton.cMenuToolbarSettingsButtonRefresh, -button:not(.mod-cta):not(.mod-warning).cMenuToolbarSettingsButton.cMenuToolbarSettingsButtonRefresh { - background-color: var(--text-accent); -} - -button.cMenuToolbarSettingsButton { - padding: 4px 14px; - border-radius: 6px; -} - - - -/*---------------------------------------------------------------- -cMenuToolbar SETTING ITEMS -----------------------------------------------------------------*/ -.setting-item.cMenuToolbarCommandItem:first-child { - padding-top: 18px; -} - -.cMenuToolbarCommandItem { - cursor: grab; - padding: 18px 0 18px 0; -} - -.sortable-fallback { - cursor: grabbing; - box-shadow: 0px 3px 32px rgb(31 38 135 / 15%); -} - -.sortable-grab { - cursor: grabbing !important; -} - -.sortable-ghost { - opacity: 0.4; - cursor: grabbing; -} - -.sortable-chosen { - cursor: grabbing; - padding: 18px 0 18px 18px; - background-color: var(--background-primary); -} - -.sortable-drag { - cursor: grabbing; - box-shadow: 0px 3px 32px rgb(31 38 135 / 15%); -} - -.cMenuToolbarSettingsTabsContainer { - border-top: 1px solid var(--background-modifier-border); - border-bottom: 1px solid var(--background-modifier-border); -} - -/*---------------------------------------------------------------- -cMenuToolbar CLASS CHANGES -----------------------------------------------------------------*/ - -#cMenuToolbarModalBar.cMenuToolbarDefaultAesthetic -{ -border: 1px solid var(--background-modifier-border); -} -#cMenuToolbarModalBar.cMenuToolbarDefaultAesthetic:not(.top) :is(.cMenuToolbarCommandItem,button[class^=cMenuToolbarCommandsubItem]) -{ -min-height:28px ; -} -#cMenuToolbarModalBar.cMenuToolbarDefaultAesthetic:not(.top) button[class^=cMenuToolbarCommandsubItem] { - margin: auto; - padding: 6px; - - border: none; - background-color: transparent; - - place-items: center; - -} -.cMenuToolbarDefaultAesthetic { -background-color: var(--background-primary); -} - - -#cMenuToolbarModalBar.cMenuToolbarGlassAesthetic ,#cMenuToolbarModalBar.cMenuToolbarGlassAesthetic ~#cMenuToolbarPopoverBar { - backdrop-filter: blur(6px); - -webkit-backdrop-filter: blur(6px); - box-shadow:none; - background-color: transparent; -} - - #cMenuToolbarModalBar.cMenuToolbarGlassAesthetic:not(.top) button[class^=cMenuToolbarCommandsubItem] { - margin: auto; - padding: 0px; - box-shadow: none; - border: none; - display: flex; - border-radius: 3px; - font-size: 10px; - margin-right: 0px; - position: relative; - background-color: transparent; - place-items: center; - clear: both; - max-width: 28px; - max-height: 23px; - } - -/*---------------------------------------------------------------- -cMenuToolbar ICONS -----------------------------------------------------------------*/ - -.cMenuToolbarIconPick { - line-height: normal; - vertical-align: middle; - margin-right: 8px; -} - -.cMenuToolbarIconPick svg { - width: 17px; - height: 17px; -} - -/*---------------------------------------------------------------- -cMenuToolbar STATUS BAR MENU -----------------------------------------------------------------*/ - -.cMenuToolbar-statusbar-menu { - text-align: center; - width: 200px; -} - - -.cMenuToolbar-statusbar-menu .menu-item { - display: flex; - align-items: center; - flex-direction: row; -} - -.cMenuToolbar-statusbar-menu .menu-item.settings-item { - font-size: 12px; - text-align: center; - line-height: 1; - border-radius: 5px; - height: auto; - padding: 8px 5px 0px 5px; - margin: 0 auto; - width: fit-content; - color: var(--text-faint); -} - -.cMenuToolbar-statusbar-menu .menu-item.settings-item .menu-item-title { - text-align: center; -} - -.cMenuToolbar-statusbar-menu .menu-item:hover, -.cMenuToolbar-statusbar-menu .menu-item .selected:hover, -.cMenuToolbar-statusbar-menu .menu-item.selected:not(.is-disabled):not(.is-label) { - background-color: transparent; -} - -.cMenuToolbar-statusbar-menu .menu-item-title { - margin-right: 10px; -} - -.cMenuToolbar-statusbar-menu .slider { - width: 100%; -} - -.cMenuToolbar-statusbar-menu .menu-item.buttonitem { - padding-top: 10px; - padding-bottom: 4px; - height: fit-content; -} - -.cMenuToolbar-statusbar-menu .menu-item.buttonitem button.cMenuToolbarSettingsButton { - margin: 0; -} - -.cMenuToolbar-statusbar-menu .menu-item-icon svg path { - fill: var(--text-muted); -} -.cMenuToolbar-statusbar-menu .menu-item-icon svg { - stroke: var(--text-muted); -} -.cMenuToolbar-statusbar-menu > .menu-item:is([data-section="ButtonAdd"]) { - display: inline-flex; - padding: 0px 0px 5px 5px; - align-items: center; -} - -.cMenuToolbar-statusbar-menu > .menu-item { - display: inline-flex; - padding: 0px 0px 5px 5px; - align-items: center; -} -.cMenuToolbar-statusbar-menu > .menu-item:is([data-section="ButtonAdd"]) .menu-item-icon{ - text-align: center; -} - - -/*---------------------------------------------------------------- -cMenuToolbar STATUS BAR BUTTONS -----------------------------------------------------------------*/ - -.cMenuToolbar-statusbar-button { - cursor: pointer; - display: flex; - align-items: center; - line-height: 1; -} - -.cMenuToolbar-statusbar-button svg { - display: flex; - width: 1.3em; - height: 1.3em; -} - -/*---------------------------------------------------------------- -cMenuToolbar SUPPORT ----------------------------------------------`-------------------*/ - -.cDonationSection { - width: 60%; - height: 50vh; - margin: 0 auto; - text-align: center; - color: var(--text-normal); -} - - -#cMenuToolbarModalBar{ - align-items: center; - justify-items: center; - border: none; - backdrop-filter: none; -} - -#cMenuToolbarModalBar.cMenuToolbarGlassAesthetic .cMenuToolbarCommandItem{ - -background-color:#ffffff00; -} - -#cMenuToolbarModalBar.cMenuToolbarGlassAesthetic [class^=cMenuToolbarCommandsubItem]{ - - background-color:#ffffff00; - } -#cMenuToolbarModalBar .cMenuToolbarCommandItem{ - justify-content: center; - align-content: center; - place-items: center; - - } - - -/* #cMenuToolbarModalBar.cMenuToolbarTinyAesthetic .cMenuToolbarCommandItem svg{ - width: 1em; - height: 1em; - } */ - - - -div.modal-container.cMenuToolbar-Modal:not(.changename) .modal-bg -{ - background-color:transparent!important; - backdrop-filter: none!important; -position: relative; -} -.modal-container.cMenuToolbar-Modal:not(.changename) .modal { - padding: 10px 30px; - min-width: 130px; - position: absolute; - bottom: 2em; - right: 0.5em; - background-color: rgb(var(--background-primary-rgb),0.5); - backdrop-filter: blur(4px); -} -.modal-container.cMenuToolbar-Modal .modal-title -{ - display: none; -} - -.modal-container.cMenuToolbar-Modal .modal input[type='range'] { - width: 90%; - -} -body.theme-dark .modal-container.cMenuToolbar-Modal .modal input[type='range'] { - background-color: var(--background-secondary); -} -/*tiny 样式*/ -#cMenuToolbarModalBar.cMenuToolbarTinyAesthetic { - align-items: center; - justify-items: center; - border: none; - backdrop-filter: none; - background-color: var(--background-secondary); - box-shadow: 0 3px 6px -4px rgb(0 0 0 / 12%), 0 6px 16px 0 rgb(0 0 0 / 8%), 0 9px 28px 8px rgb(0 0 0 / 5%); - } - - - #cMenuToolbarModalBar.cMenuToolbarTinyAesthetic .cMenuToolbarCommandItem { - margin: auto; - padding: 0px; - box-shadow: none; - margin-left: 0px; - margin-right: 0px; - position: relative; - background-color:transparent; - backdrop-filter: blur(8px); - -webkit-backdrop-filter: blur(8px); - -} - #cMenuToolbarModalBar .cMenuToolbarCommandItem { - margin: auto; - - padding: 0px; - box-shadow: none; - - margin-left: 4px; - margin-right: 0px; - position: relative; - background-color:transparent; - backdrop-filter: blur(8px); - -webkit-backdrop-filter: blur(8px); - - } - - -:is(#cMenuToolbarModalBar).cMenuToolbarTinyAesthetic:not(.top) button[class^=cMenuToolbarCommandsubItem] { - margin: auto; - padding: 0px; - box-shadow: none; - border: none; - display: flex; - border-radius: 3px; -font-size: 10px; - margin-right: 0px; - position: relative; - background-color: transparent; - - place-items: center; - clear: both; - max-width: 28px; - max-height: 23px; - -} - button[class^=cMenuToolbarCommandsubItem]::after { - - content: url("data:image/svg+xml,%3Csvg width='4' height='4' version='1.1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1024 1024' enable-background='new 0 0 1024 1024' xml:space='preserve'%3E%3Cpath fill='%23666' d='M13.24 80.11 l461.75 560.8 q14.56 16.02 36.41 16.02 q21.85 0 36.42 -16.02 l463.2 -560.8 q10.2 -10.19 12.38 -24.75 q2.18 -14.57 -3.64 -27.68 q-5.82 -13.11 -18.21 -20.39 q-12.39 -7.29 -26.95 -7.29 l-924.95 0 q-20.4 0 -34.23 13.11 q-13.84 13.11 -15.29 32.77 q-1.46 19.66 13.11 34.23 Z'/%3E%3C/svg%3E"); - - margin-left: 1px; - margin-top:6px; - -} - - -:is(#cMenuToolbarModalBar,#cMenuToolbarPopoverBar) button[class^=cMenuToolbarCommandsubItem] >.subitem -{ - background-color: var(--background-primary); - border-radius: 4px; - border: 1px solid var(--background-modifier-border); - box-shadow: 0 2px 8px var(--background-modifier-box-shadow); - position: absolute; - z-index: var(--layer-menu); - user-select: none; - transform: translateY(90%) translateX(-40%); - -webkit-transform: translateY(90%) translateX(-40%); - display: flex; - -} -:is(#cMenuToolbarModalBar,#cMenuToolbarPopoverBar) button[class^=cMenuToolbarCommandsubItem] >.subitem svg -{ - max-width: 1.3em; - max-height: 1.3em; -} - -:is(#cMenuToolbarModalBar,#cMenuToolbarPopoverBar) button[class^=cMenuToolbarCommandsubItem] >.subitem button.menu-item -{ - background-color: var(--background-primary); - line-height:2em; - display: inline; -} - -:is(#cMenuToolbarModalBar,#cMenuToolbarPopoverBar) button[class^=cMenuToolbarCommandsubItem] >.subitem button:hover -{ - background-color: var(--interactive-hover); -} - - -:is(#cMenuToolbarModalBar,#cMenuToolbarPopoverBar) button[class^=cMenuToolbarCommandsubItem] >.subitem .menu-item { - - margin-right: 4px; - padding: 0px 4px 0px 4px; -} -:is(#cMenuToolbarModalBar,#cMenuToolbarPopoverBar) button[class^=cMenuToolbarCommandsubItem] >.subitem { - - visibility:hidden; - transition: all 0.3s linear; - -webkit-transition: all 0.3s linear; -} - - - - - -:is(#cMenuToolbarModalBar,#cMenuToolbarPopoverBar) button.cMenuToolbarCommandsubItem-font-color .triangle-icon -{ - position: absolute; - margin-left: 18px; - bottom: 8%; -background-size: 4px 4px; -background-image: url("data:image/svg+xml,%3Csvg width='4' height='4' version='1.1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1024 1024' enable-background='new 0 0 1024 1024' xml:space='preserve'%3E%3Cpath fill='%23666' d='M13.24 80.11 l461.75 560.8 q14.56 16.02 36.41 16.02 q21.85 0 36.42 -16.02 l463.2 -560.8 q10.2 -10.19 12.38 -24.75 q2.18 -14.57 -3.64 -27.68 q-5.82 -13.11 -18.21 -20.39 q-12.39 -7.29 -26.95 -7.29 l-924.95 0 q-20.4 0 -34.23 13.11 q-13.84 13.11 -15.29 32.77 q-1.46 19.66 13.11 34.23 Z'/%3E%3C/svg%3E"); - - width: 16px; - height: 20px; - background-position: center; - - background-repeat: no-repeat; - min-width: unset; - border-left: 2px solid transparent; - } - - :is(#cMenuToolbarModalBar,#cMenuToolbarPopoverBar):not(.top) button.cMenuToolbarCommandsubItem-font-color .triangle-icon - { - margin-left: 16px; - - } - - :is(#cMenuToolbarModalBar,#cMenuToolbarPopoverBar):not(.top) button.cMenuToolbarCommandsubItem-font-color .x-color-picker-wrapper -{ - top:auto; -bottom:calc(100% + 1em); -} - - -:is(#cMenuToolbarModalBar,#cMenuToolbarPopoverBar) button.cMenuToolbarCommandsubItem-font-color .subitem -{ - visibility:hidden; - transition: all 0.3s linear; - -webkit-transition: all 0.3s linear; - } - -:is(#cMenuToolbarModalBar,#cMenuToolbarPopoverBar) button.cMenuToolbarCommandsubItem-font-color .subitem:hover { - visibility:visible; - transition: all 0.3s linear; - -webkit-transition: all 0.3s linear; - } - - -:is(#cMenuToolbarModalBar,#cMenuToolbarPopoverBar) button[class^=cMenuToolbarCommandsubItem]:hover >.subitem { - - visibility:visible; - transition: all 0.3s linear; - -webkit-transition: all 0.3s linear; -} -:is(#cMenuToolbarModalBar,#cMenuToolbarPopoverBar) button[class^=cMenuToolbarCommandsubItem] >.subitem:hover { - visibility:visible; - transition: all 0.3s linear; - -webkit-transition: all 0.3s linear; - } - - .cMenuToolbarCommandsubItem-font-color button -{ - background-color: transparent; -} -.cMenuToolbarCommandsubItem-font-color button:hover -{ - background-color: var(--interactive-normal); -} - - .cMenuToolbarSettingsTabsContainer .cMenuToolbarCommandItem .setting-item-info { - - flex:30%; -margin: 0; -} - .cMenuToolbarSettingsTabsContainer .cMenuToolbarSettingsTabsContainer_sub - { - border-left: 1px solid var(--background-modifier-border); - flex-flow: column; - min-height: 45px; - display: flex; - padding: 0; - margin-left: 10px; - flex: 70%; - } - .cMenuToolbarSettingsTabsContainer .cMenuToolbarSettingsTabsContainer_sub:empty - { - border: 2px dashed rgba(var(--interactive-accent-rgb),0.5); - } - .cMenuToolbarSettingsTabsContainer .cMenuToolbarSettingsTabsContainer_sub:empty::before { - content: "✖️Drag it here"; - margin: auto; - font-size: 12px; -} - .cMenuToolbarSettingsTabsContainer .cMenuToolbarSettingsTabsContainer_sub .cMenuToolbarCommandItem - { - flex: auto; - margin-left: 2em;; - } - .cMenuToolbarSettingsTabsContainer .cMenuToolbarSettingsTabsContainer_sub .setting-item-control - { -flex: 0; - } - - .cMenuToolbarSettingsTabsContainer .cMenuToolbarCommandSubItem>.setting-item-info - { - flex: 70px; - } - .cMenuToolbarCommandSubItem>.setting-item-control -{ - - justify-content: flex-start; -} - .modal.mod-settings button:not(.mod-cta):not(.mod-warning).cMenuToolbarSettingsButton.cMenuToolbarSettingsButtonaddsub { - background-color: var(--background-secondary-alt); -} - - -.setting-item button.cMenuToolbarSettingsIcon{ - display: block; - transform: translateX(-30%); - -webkit-transform: translateX(-30%); -} -.setting-item button.cMenuToolbarSettingsIcon:empty::before{ - content: "❗"; -} -.setting-item button.cMenuToolbarSettingsIcon svg{ - max-width: 1.5em; - max-height: 1.5em; -} -.modal.mod-settings button:not(.mod-cta):not(.mod-warning).cMenuToolbarSettingsIcon:hover{ - background-color: var(--interactive-accent-hover); -} -.modal.mod-settings button:not(.mod-cta):not(.mod-warning).cMenuToolbarSettingsIcon -{ - background-color: transparent; - box-shadow: 0 1px 1px 0px var(--background-modifier-border); -} -@media screen and (min-width: 781px){ - .cMenuToolbar-Modal .wideInputPromptInputEl { - width: 40rem; - max-width: 100%; - height: 20rem; - background-color: rgb(var(--background-primary-rgb),0.8); -} -} - -.cMenuToolbarcustomIcon svg { - max-width: 1.3em; - max-height: 1.3em; - display: flex; -} - - -.cMenuToolbarSettingsButton svg { - max-width: 1.3em; - max-height: 1.3em; - display: flex; -} - -.cmdr-page-header -{ - min-width: 1em;; -} - - -.x-color-picker-wrapper { - right: 0px; - top:1.8em; - min-width: 1px; - padding: 10px; - box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14); - position: absolute; - width: fit-content; - font-weight: 400; - font-family: Source Sans Pro,sans-serif; - border-radius: 4px; - background-color: var(--background-primary); -} -.markdown-source-view.mod-cm6 .x-color-picker-wrapper table.x-color-picker-table#x-color-picker-table { - width: unset; - border-collapse: separate; - border-spacing: 6px; - margin: auto !important; -} -.x-color-picker-wrapper table.x-color-picker-table#x-backgroundcolor-picker-table { - width: unset; - border-collapse: separate; - border-spacing: 6px; - margin: auto !important; -} -.x-color-picker-wrapper .x-color-picker-table th { - border: 0; - text-align: left; - font-weight: normal; - background: transparent !important; - color: #718096; -} -.x-color-picker-wrapper #x-color-picker-table td { - font-size: 1px; - padding: 9px; - cursor: pointer; - border: solid 1px var(--background-modifier-border); -} -.x-color-picker-wrapper #x-backgroundcolor-picker-table td { - font-size: 1px; - border-radius: 50%; - padding: 9px; - cursor: pointer; - border: solid 1px var(--background-modifier-border); -} -.x-color-picker-wrapper .x-color-picker-table tr td:hover { - box-shadow: 0 3px 6px -4px rgba(0,0,0,.12),0 6px 16px 0 rgba(0,0,0,.08),0 9px 28px 8px rgba(0,0,0,.05); -} -.x-color-picker-wrapper tbody>tr:hover -{ -background-color:transparent !important; -} -/**top**/ -#cMenuToolbarModalBar.top { - display: flex; - flex-wrap: nowrap; - position: relative; - height: 38px; - align-items: center; - transition: all 0.2s linear; - -webkit-transition: all 0.2s linear; - -} - -#cMenuToolbarModalBar.top :is(.cMenuToolbarCommandItem,button[class^=cMenuToolbarCommandsubItem]):not(.cMenuToolbar-Divider-Line) -{ -font-size: 10px; - margin-right: 0px; - clear: both; - opacity: 1; - flex-shrink:0; - height: 26px; - padding: 0; - border: none; - background: transparent; - cursor: pointer; - outline: none; - box-shadow: none; - border-radius: 2px; - display: inline-flex; - justify-content: center; - align-items: center; - transition: all 0.2s linear; - -webkit-transition: all 0.2s linear; - - - - -} -#cMenuToolbarModalBar.top button.cMenuToolbarCommandItem:hover { - background-color: var(--interactive-hover); -} - - - -#cMenuToolbarPopoverBar{ - - padding: 0 10px; - display: inline-flex; - align-items: center; - width: fit-content; - z-index: var(--layer-status-bar); - background-color: var(--background-secondary); - background-clip: padding-box; - border-radius: 6px; - box-shadow: 0 3px 6px -4px rgba(0,0,0,.12),0 6px 16px 0 rgba(0,0,0,.08),0 9px 28px 8px rgba(0,0,0,.05); - box-shadow: 0 0 8px rgba(0,0,0,.15)\9; - margin-left: auto; - margin-right: 25px; - transition: all 0.1s linear; - -webkit-transition: all 0.1s linear; - margin-top: 32px; - position: absolute; - right: 0; -} - -#cMenuToolbarPopoverBar :is(.cMenuToolbarCommandItem,button[class^=cMenuToolbarCommandsubItem]){ - - height: 26px; -margin-left: 4px; - font-size: 10px; - margin-right: 4px; - clear: both; - opacity: 1; - flex-shrink:0; - height: 26px; - padding: 0; - border: none; - background: transparent; - cursor: pointer; - outline: none; - box-shadow: none; - border-radius: 2px; - display: inline-flex; - justify-content: center; - align-items: center; - transition: all 0.2s linear; - -webkit-transition: all 0.2s linear; - -} -#cMenuToolbarPopoverBar :is(.cMenuToolbarCommandItem,button[class^=cMenuToolbarCommandsubItem]):hover{ - background-color: var(--interactive-hover); -} - -#cMenuToolbarModalBar .more-menu { - display: flex; - align-items: center; - box-shadow:none; - margin-left: 4px; - border-left: 1px inset var( --background-modifier-form-field); - height: 24px; - opacity: 0.8; -} - /*Divider-Line**/ - - .cMenuToolbarSettingsTabsContainer .cMenuToolbar-Divider-Line - { - padding: 0; - - line-height: 0px; - border-left: 200px solid rgba(var(--interactive-accent-rgb),0.05); - border-right: 200px solid rgba(var(--interactive-accent-rgb),0.05); - text-align: center; - background: rgba(var(--interactive-accent-rgb),0.2); - } - .cMenuToolbarSettingsTabsContainer .cMenuToolbar-Divider-Line .setting-item-control button:not(:last-child) - { - display: none; - } - - .cMenuToolbarSettingsTabsContainer .cMenuToolbar-Divider-Line .setting-item-info - { - flex: 1 1 auto; - } - .cMenuToolbarSettingsTabsContainer .cMenuToolbar-Divider-Line .setting-item-control - { - justify-content: flex-start; - } - .cMenuToolbarSettingsTabsContainer .cMenuToolbar-Divider-Line .setting-item-info .setting-item-name - { - font-size: 12px; - text-align: right; - - } - .cMenuToolbarSettingsTabsContainer .cMenuToolbar-Divider-Line .setting-item-control button:last-child - { - padding: 0; - background-color: transparent!important; - } - .cMenuToolbarSettingsTabsContainer .cMenuToolbar-Divider-Line .setting-item-control button:last-child svg - { - display: none; - } - .cMenuToolbarSettingsTabsContainer .cMenuToolbar-Divider-Line .setting-item-control button:last-child::before - { - content: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M511.674077 66.707284c-246.52265 0-446.347744 199.835328-446.347744 446.347744s199.825095 446.356954 446.347744 446.356954c246.50423 0 446.348768-199.844537 446.348768-446.356954S758.177284 66.707284 511.674077 66.707284zM744.967424 667.159826c21.8701 21.8701 21.8701 57.310264 0 79.199807-21.8701 21.851681-57.30924 21.851681-79.198783-0.019443L511.674077 592.264045 357.56007 746.359632c-21.8701 21.8701-57.30924 21.851681-79.17934-0.019443s-21.8701-57.290821 0-79.160921L432.493713 513.065262 278.379707 358.950232c-21.8701-21.86089-21.8701-57.328683 0-79.18855 21.8701-21.87931 57.30924-21.87931 79.17934 0l154.114007 154.104797 154.095587-154.104797c21.889543-21.87931 57.32766-21.87931 79.198783-0.010233 21.8701 21.8701 21.8701 57.348126 0 79.207993L590.89128 513.065262 744.967424 667.159826z' fill='%23666666'/%3E%3C/svg%3E"); - } -:is(#cMenuToolbarModalBar,#cMenuToolbarPopoverBar) button.cMenuToolbarCommandItem.cMenuToolbar-Divider-Line -{ - min-width:unset; - flex-shrink: 0; - display: inline-flex; - width: 0.6px; - background-color: var(--background-modifier-border); - height: 22px; - opacity: 0.8; - margin: 0; -} -.theme-dark :is(#cMenuToolbarModalBar,#cMenuToolbarPopoverBar) button.cMenuToolbarCommandItem.cMenuToolbar-Divider-Line -{ - - background-color: #4f4f5188; - -} -:is(#cMenuToolbarModalBar,#cMenuToolbarPopoverBar) button.cMenuToolbarCommandItem.cMenuToolbar-Divider-Line svg -{ - display: none; -} diff --git a/.obsidian/plugins/obsidian-editing-toolbar/cmenu-demo.gif b/.obsidian/plugins/obsidian-editing-toolbar/cmenu-demo.gif deleted file mode 100644 index 6944b56..0000000 Binary files a/.obsidian/plugins/obsidian-editing-toolbar/cmenu-demo.gif and /dev/null differ diff --git a/.obsidian/plugins/obsidian-editing-toolbar/manifest.json b/.obsidian/plugins/obsidian-editing-toolbar/manifest.json deleted file mode 100644 index 37df06c..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/manifest.json +++ /dev/null @@ -1 +0,0 @@ -{"id":"obsidian-editing-toolbar","name":"Obsidian Editing Toolbar","version":"2.1.1","minAppVersion":"0.9.12","description":"The Obsidian Editing Toolbar is modified from cmenu, which provides more powerful customization settings and has many built-in editing commands to be a MS Word-like toolbar editing experience.","author":"Cuman","authorUrl":"https://github.com/cumany/obsidian-editing-toolbar","isDesktopOnly":true} \ No newline at end of file diff --git a/.obsidian/plugins/obsidian-editing-toolbar/package.json b/.obsidian/plugins/obsidian-editing-toolbar/package.json deleted file mode 100644 index 587edac..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "Editing Toolbar", - "version": "2.0.4", - "description": "The Editing Toolbar is modified from cmenu, which provides more powerful customization settings and has many built-in editing commands to be a MS Word-like toolbar editing experience.", - "main": "main.js", - "repository": "https://github.com/cumany/obsidian-editing-toolbar", - "scripts": { - "dev": "rollup --config rollup.config.js -w", - "build": "rollup --config rollup.config.js --environment BUILD:production" - }, - "keywords": [], - "author": "Cuman", - "license": "MIT", - "devDependencies": { - "@rollup/plugin-commonjs": "^18.0.0", - "@rollup/plugin-node-resolve": "^11.2.1", - "@rollup/plugin-typescript": "^8.2.1", - "@types/feather-icons": "^4.7.0", - "@types/node": "^14.17.6", - "@types/react-dom": "^17.0.9", - "@types/sortablejs": "^1.10.7", - "obsidian": "^0.15.0", - "rollup": "^2.56.3", - "rollup-plugin-terser": "^7.0.2", - "rollup-watch": "^4.3.1", - "tslib": "^2.2.0", - "typescript": "^4.4.2", - "typings": "^2.1.1" - }, - "moduleFileExtensions": [ - "js", - "ts" - ], - "dependencies": { - "feather-icons": "^4.28.0", - "react": "^17.0.2", - "react-dom": "^17.0.2", - "react-dom-server": "0.0.5", - "react-icons": "^4.2.0", - "remixicon": "^2.5.0", - "sortablejs": "^1.14.0", - "terser": "^5.15.0" - } -} diff --git a/.obsidian/plugins/obsidian-editing-toolbar/rollup.config.js b/.obsidian/plugins/obsidian-editing-toolbar/rollup.config.js deleted file mode 100644 index 56b9942..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/rollup.config.js +++ /dev/null @@ -1,33 +0,0 @@ -import typescript from "@rollup/plugin-typescript"; -import resolve from "@rollup/plugin-node-resolve"; -import commonjs from "@rollup/plugin-commonjs"; -import { terser } from 'rollup-plugin-terser'; - -const isProd = process.env.BUILD === "production"; - -const banner = `/* -THIS IS A GENERATED/BUNDLED FILE BY ROLLUP -if you want to view the source visit the plugins github repository -*/ -`; - -export default { - input: "src/plugin/main.ts", - output: { - dir: "./build", - sourcemap: "inline", - sourcemapExcludeSources: isProd, - format: "cjs", - exports: "default", - banner, - }, - external: ["obsidian"], - plugins: [ - typescript(), - resolve({ - browser: true, - }), - commonjs({ include: "node_modules/**" }), - terser() - ], -}; diff --git a/.obsidian/plugins/obsidian-editing-toolbar/src/icons/appIcons.ts b/.obsidian/plugins/obsidian-editing-toolbar/src/icons/appIcons.ts deleted file mode 100644 index 3d7f331..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/src/icons/appIcons.ts +++ /dev/null @@ -1,166 +0,0 @@ -export const appIcons: string[] = [ - // from obsidian app.js file - "Custom", - "add-note-glyph", - "any-key", - "audio-file", - "blocks", - "bold-glyph", - "bot-glyph", - "box-glyph", - "bracket-glyph", - "broken-link", - "bullet-list-glyph", - "bullet-list", - "calendar-glyph", - "calendar-with-checkmark", - "check-in-circle", - "check-small", - "checkbox-glyph", - "checkmark", - "clock-glyph", - "clock", - "cloud", - "codeblock-glyph", - "code-glyph", - "command-glyph", - "compress-glyph", - "create-new", - "cross-in-box", - "cross", - "crossed-star", - "csv", - "deleteColumn", - "deleteRow", - "dice-glyph", - "dice", - "document", - "documents", - "dot-network", - "double-down-arrow-glyph", - "double-up-arrow-glyph", - "down-arrow-with-tail", - "down-chevron-glyph", - "down-curly-arrow-glyph", - "duplicate-glyph", - "enlarge-glyph", - "enter", - "exit-fullscreen", - "expand-vertically", - "file-explorer-glyph", - "filled-pin", - "formula", - "folder", - "forward-arrow", - "fullscreen", - "gear", - "go-to-file", - "graph-glyph", - "hashtag", - "heading-glyph", - "help", - "highlight-glyph", - "horizontal-split", - "image-file", - "image-glyph", - "import-glyph", - "indent-glyph", - "info", - "insertColumn", - "insertRow", - "install", - "italic-glyph", - "keyboard-glyph", - "languages", - "left-arrow-with-tail", - "left-arrow", - "left-chevron-glyph", - "lines-of-text", - "link-glyph", - "link", - "links-coming-in", - "links-going-out", - "logo-crystal", - "magnifying-glass", - "merge-files-glyph", - "merge-files", - "microphone-filled", - "microphone", - "minus-with-circle", - "moveColumnLeft", - "moveColumnRight", - "moveRowDown", - "moveRowUp", - "navigate-glyph", - "note-glyph", - "number-list-glyph", - "open-elsewhere-glyph", - "open-vault", - "pane-layout", - "paper-plane-glyph", - "paper-plane", - "paste-text", - "paste", - "paused", - "pdf-file", - "pencil", - "percent-sign-glyph", - "pin", - "play-audio-glyph", - "plus-minus-glyph", - "plus-with-circle", - "popup-open", - "presentation-glyph", - "presentation", - "price-tag-glyph", - "question-mark-glyph", - "quote-glyph", - "redo-glyph", - "reset", - "restore-file-glyph", - "right-arrow-with-tail", - "right-arrow", - "right-chevron-glyph", - "right-triangle", - "run-command", - "scissors-glyph", - "scissors", - "search-glyph", - "search", - "select-all-text", - "sheets-in-box", - "sortAsc", - "sortDesc", - "spreadsheet", - "split", - "stacked-levels", - "star-glyph", - "star-list", - "star", - "stop-audio-glyph", - "strikethrough-glyph", - "subscript-glyph", - "superscript-glyph", - "switch", - "sync-small", - "sync", - "tag-glyph", - "three-horizontal-bars", - "tomorrow-glyph", - "trash", - "two-blank-pages", - "underline-glyph", - "undo-glyph", - "unindent-glyph", - "up-and-down-arrows", - "up-arrow-with-tail", - "up-chevron-glyph", - "up-curly-arrow-glyph", - "uppercase-lowercase-a", - "vault", - "vertical-split", - "vertical-three-dots", - "workspace-glyph", - "wrench-screwdriver-glyph", - "yesterday-glyph", -]; diff --git a/.obsidian/plugins/obsidian-editing-toolbar/src/icons/customIcons.ts b/.obsidian/plugins/obsidian-editing-toolbar/src/icons/customIcons.ts deleted file mode 100644 index e8d2a55..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/src/icons/customIcons.ts +++ /dev/null @@ -1,87 +0,0 @@ -import * as featherIcons from "feather-icons"; -import * as remixicons from "react-icons/ri/"; -//import * as boxicons from "react-icons/bi/"; -import { renderToString } from "react-dom/server"; -import { addIcon } from "obsidian"; - -export interface Icon { - id: string; - name: string; -} - -const icons: Record = { - cMenuToolbar: ``, - cMenuToolbarSub:``, - cMenuToolbarAdd: ``, - cMenuToolbarDelete: ``, - cMenuToolbarReload: ``, - "codeblock-glyph": ``, - "underline-glyph": ``, - "superscript-glyph": ``, - "subscript-glyph": ``, - "bot-glyph": ``, - "header-1":``, - "header-2":``, - "header-3":``, - "header-4":``, - "header-5":` - `, - "header-6":``, - "header-n":``, -}; - -export default function addIcons() { - Object.keys(icons).forEach((key) => { - addIcon(key, icons[key]); - }); -} - -export function addFeatherIcons(appIcons: string[]) { - Object.values(featherIcons.icons).forEach((icon) => { - const svg = icon.toSvg({ - viewBox: "0 0 24 24", - width: "100", - height: "100", - "stroke-width": "2", - }); - addIcon("feather-" + icon.name, svg); - appIcons.push("feather-" + icon.name); - }); -} - -export function addRemixIcons(appIcons: string[]) { - const iconKeys: Icon[] = []; - for (const icon in remixicons) { - iconKeys.push({ - id: icon, - name: icon.substring(2), - }); - const svg = renderToString( - // @ts-ignore - remixicons[icon]({ - size: "100", - }) - ); - addIcon("remix-" + icon.substring(2), svg); - appIcons.push("remix-" + icon.substring(2)); - } -} - -/* export function addBoxIcons(appIcons: string[]) { - const iconKeys: Icon[] = []; - for (const icon in boxicons) { - iconKeys.push({ - id: icon, - name: icon.substring(2), - }); - const svg = renderToString( - // @ts-ignore - boxicons[icon]({ - size: "100", - }) - ); - addIcon("bx-" + icon.substring(2), svg); - appIcons.push("bx-" + icon.substring(2)); - } -} - */ diff --git a/.obsidian/plugins/obsidian-editing-toolbar/src/modals/cMenuToolbarModal.ts b/.obsidian/plugins/obsidian-editing-toolbar/src/modals/cMenuToolbarModal.ts deleted file mode 100644 index 99fa857..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/src/modals/cMenuToolbarModal.ts +++ /dev/null @@ -1,755 +0,0 @@ - -import type cMenuToolbarPlugin from "src/plugin/main"; -import { App, Notice, Command, requireApiVersion, MarkdownView, ButtonComponent, WorkspaceParent, WorkspaceWindow } from "obsidian"; -import { WorkspaceExt, WorkspaceItemExt, WorkspaceParentExt } from 'src/util/obsidian-ext'; -import { setBottomValue } from "src/util/statusBarConstants"; -import { backcolorpicker, colorpicker } from "src/util/util"; -import { t } from "src/translations/helper"; -import { cMenuToolbarSettings } from "src/settings/settingsData"; - -window.ISMORE = false; -window.isBgC = false; -window.isCTxt = false; -window.isText = false; -let activeDocument: Document; - -export function getRootSplits(): WorkspaceParentExt[] { - const rootSplits: WorkspaceParentExt[] = []; - - // push the main window's root split to the list - rootSplits.push(app.workspace.rootSplit as WorkspaceParent as WorkspaceParentExt) - - // @ts-ignore floatingSplit is undocumented - const floatingSplit = app.workspace.floatingSplit as WorkspaceParentExt; - floatingSplit?.children.forEach((child: WorkspaceParentExt) => { - // if this is a window, push it to the list - if (child instanceof WorkspaceWindow) { - rootSplits.push(child); - } - }); - - return rootSplits; -} -export function selfDestruct() { - const rootSplits = getRootSplits(); - const clearToolbar = (leaf: HTMLElement) => { - - let cMenuToolbarModalBar = leaf.querySelector( - "#cMenuToolbarModalBar" - ); - let cMenuToolbarPopoverBar = leaf.querySelector( - "#cMenuToolbarPopoverBar" - ); - - if (cMenuToolbarModalBar) { - if (cMenuToolbarModalBar.firstChild) { - cMenuToolbarModalBar.removeChild(cMenuToolbarModalBar.firstChild); - } - cMenuToolbarModalBar.remove(); - } - if (cMenuToolbarPopoverBar) { - if (cMenuToolbarPopoverBar.firstChild) { - cMenuToolbarPopoverBar.removeChild(cMenuToolbarPopoverBar.firstChild); - } - cMenuToolbarPopoverBar.remove(); - } - } - if (rootSplits) - rootSplits.forEach((rootSplit: WorkspaceParentExt) => { - if (rootSplit?.containerEl) - clearToolbar(rootSplit?.containerEl) - }); - -} -export const getcoords = (editor: any) => { - const cursorFrom = editor.getCursor("head"); - - let coords; - if (editor.cursorCoords) coords = editor.cursorCoords(true, "window"); - else if (editor.coordsAtPos) { - const offset = editor.posToOffset(cursorFrom); - coords = editor.cm.coordsAtPos?.(offset) ?? editor.coordsAtPos(offset); - } else return; - - return coords; -}; - -export function getModestate(app: { - workspace: { getActiveViewOfType: (arg0: typeof MarkdownView) => any }; -}) { - const activePane = app.workspace.getActiveViewOfType(MarkdownView); - if (activePane) { - let currentmode = activePane?.getMode(); - - if (currentmode === "empty") { - return false; - } - if (currentmode == "preview") { - return false; - } - if (currentmode == "source") { - return true; - } - } -} - -export function checksvg(htmlStr: string) { - let reg = /<[^>]+>/g; - return reg.test(htmlStr); -} - -export function CreateDiv(selector: string) { - let div = createEl("div"); - div.addClass(selector); - return div; -} - -export function tabCell(app: App, plugin: cMenuToolbarPlugin, el: string) { - requireApiVersion("0.15.0") ? activeDocument = activeWindow.document : activeDocument = window.document; - let tab = activeDocument.getElementById(el); - // @ts-ignore - let rows = tab.rows; - let rlen = rows.length; - for (let i = 1; i < rlen; i++) { - //遍历所有行 - let cells = rows[i].cells; //得到这一行的所有单元格 - for (let j = 0; j < cells.length; j++) { - //给每一个单元格添加click事件 - cells[j].onclick = function () { - let backcolor = this.style.backgroundColor; - if (backcolor != "") { - backcolor = colorHex(backcolor); - if (el == "x-color-picker-table") { - plugin.settings.cMenuFontColor = backcolor; - Setfontcolor(app, backcolor); - activeDocument.getElementById("change-font-color-icon").style.fill = - plugin.settings.cMenuFontColor; - } else if (el == "x-backgroundcolor-picker-table") { - plugin.settings.cMenuBackgroundColor = backcolor; - Setbackgroundcolor(app, backcolor); - activeDocument.getElementById( - "change-background-color-icon" - ).style.fill = plugin.settings.cMenuBackgroundColor; - } - - plugin.saveSettings(); - } - }; - } - } -} - -export function Setfontcolor(app: App, color: string) { - //from https://github.com/obsidian-canzi/Enhanced-editing - const activeLeaf = app.workspace.getActiveViewOfType(MarkdownView); - if (activeLeaf) { - const view = activeLeaf; - const editor = view.editor; - let selectText = editor.getSelection(); - if (selectText == null || "") { - return; - } - - let _html0 = /\]*\>[^\<\>]+\<\/font\>/g; - let _html1 = /^\]*\>([^\<\>]+)\<\/font\>$/; - let _html2 = '$1'; - let _html3 = /\]*font\>/g; //是否只包含一侧的<> - - if (_html3.test(selectText)) { - return; - } else if (_html0.test(selectText)) { - if (_html1.test(selectText)) { - - selectText = selectText.replace(_html1, _html2); - } else { - selectText = selectText.replace( - /\]*?\>|\<\/font\>/g, - "" - ); - } - } else { - selectText = selectText.replace(/^(.+)$/gm, _html2); - } - editor.replaceSelection(selectText); - editor.exec("goRight"); - // @ts-ignore - app.commands.executeCommandById("editor:focus"); - } -} - -export function Setbackgroundcolor(app: App, color: string) { - //from https://github.com/obsidian-canzi/Enhanced-editing - const activeLeaf = app.workspace.getActiveViewOfType(MarkdownView); - if (activeLeaf) { - const view = activeLeaf; - const editor = view.editor; - let selectText = editor.getSelection(); - if (selectText == null || selectText == "") { - return; - } - let _html0 = - /\]+:[0-9a-zA-Z#]+[\"'][^\<\>]*\>[^\<\>]+\<\/span\>/g; - let _html1 = - /^\]+:[0-9a-zA-Z#]+[\"'][^\<\>]*\>([^\<\>]+)\<\/span\>$/; - let _html2 = '$1'; - let _html3 = /\]*span\>/g; //是否只包含一侧的<> - if (_html3.test(selectText)) { - return; - } else if (_html0.test(selectText)) { - if (_html1.test(selectText)) { - selectText = selectText.replace(_html1, _html2); - } else { - selectText = selectText.replace( - /\]+:[0-9a-zA-Z#]+[\"'][^\<\>]*\>|\<\/span\>/g, - "" - ); - - } - } else { - selectText = selectText.replace(/^(.+)$/gm, _html2); - } - editor.replaceSelection(selectText); - editor.exec("goRight"); - //@ts-ignore - app.commands.executeCommandById("editor:focus"); - } -} - -export const colorHex = function (color: string) { - let that = color; - let reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/; - if (/^(rgb|RGB)/.test(that)) { - let aColor = that.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(","); - let strHex = "#"; - for (let i = 0; i < aColor.length; i++) { - let hex = Number(aColor[i]).toString(16); - if (hex === "0") { - hex += hex; - } - strHex += hex; - } - if (strHex.length !== 7) { - strHex = that; - } - return strHex; - } else if (reg.test(that)) { - let aNum = that.replace(/#/, "").split(""); - if (aNum.length === 6) { - return that; - } else if (aNum.length === 3) { - let numHex = "#"; - for (let i = 0; i < aNum.length; i += 1) { - numHex += aNum[i] + aNum[i]; - } - console.log(numHex); - return numHex; - } - } else { - return that; - } -}; - -export function CreateMoreMenu(selector: HTMLDivElement) { - // let issubmenu= activeDocument.getElementById("cMenuToolbarModalBar").querySelector('.'+selector); - // let barHeight = activeDocument.getElementById("cMenuToolbarModalBar").offsetHeight; - requireApiVersion("0.15.0") ? activeDocument = activeWindow.document : activeDocument = window.document; - if (!window.ISMORE) return; - let cMoreMenu = selector.createEl("span"); - cMoreMenu.addClass("more-menu"); - let morebutton = new ButtonComponent(cMoreMenu); - morebutton - .setClass("cMenuToolbarCommandItem") - .setTooltip(t("More")) - .onClick(() => { - if ( - activeDocument.getElementById("cMenuToolbarPopoverBar").style.visibility == - "hidden" - ) { - activeDocument.getElementById("cMenuToolbarPopoverBar").style.visibility = - "visible"; - activeDocument.getElementById("cMenuToolbarPopoverBar").style.height = "32px"; - } else { - activeDocument.getElementById("cMenuToolbarPopoverBar").style.visibility = - "hidden"; - activeDocument.getElementById("cMenuToolbarPopoverBar").style.height = "0"; - } - }); - morebutton.buttonEl.innerHTML = ``; - window.ISMORE = false; - return cMoreMenu; -} - -export function QuiteFormatBrushes() { - //from https://github.com/obsidian-canzi/Enhanced-editing - //关闭所有格式刷变量 - if (window.newNotice) window.newNotice.hide(); - window.isBgC = false; //多彩背景刷 - window.isCTxt = false; //多彩文字刷 - window.isText = false; -} - -export function SetHeader(_str: string) { - //from https://github.com/obsidian-canzi/Enhanced-editing - - const activeLeaf = app.workspace.getActiveViewOfType(MarkdownView); - if (activeLeaf) { - const view = activeLeaf; - const editor = view.editor; - let linetext = editor.getLine(editor.getCursor().line); - let newstr, linend = ""; - if (_str == "") { //若为标题,转为普通文本 - newstr = linetext.replace(/^(\>*(\[[!\w]+\])?\s*)#+\s/, "$1"); - } else { //列表、引用,先转为普通文本,再转为标题 - newstr = linetext.replace(/^\s*(#*|\>|\-|\d+\.)\s*/m, ""); - newstr = _str + " " + newstr; - } - if (newstr != "") { - linend = editor.getRange(editor.getCursor(), { line: editor.getCursor().line, ch: linetext.length }); - } else { - linend = editor.getRange(editor.getCursor(), { line: editor.getCursor().line, ch: 0 }); - }; - editor.setLine(editor.getCursor().line, newstr); - editor.setCursor({ line: editor.getCursor().line, ch: Number(newstr.length - linend.length) }); - }; -} -export function FormatEraser() { - const activeLeaf = app.workspace.getActiveViewOfType(MarkdownView); - if (activeLeaf) { - const view = activeLeaf; - const editor = view.editor - let linend; - let selstart = editor.getRange({ line: editor.getCursor().line, ch: 0 }, editor.getCursor()); - let linetext = editor.getLine(editor.getCursor().line); - - if (linetext != "") { - linend = editor.getRange(editor.getCursor(), { line: editor.getCursor().line, ch: linetext.length }); - } else { - linend = editor.getRange(editor.getCursor(), { line: editor.getCursor().line, ch: 0 }); - }; - let selectText = editor.getSelection(); - if (selectText == null || selectText == "") { - QuiteFormatBrushes(); - window.isText = true; - if (window.newNotice) { - if (window.newNotice.noticeEl.innerText != t("Clear formatting brush ON!\nClick the mouse middle or right key to close the formatting-brush")) - window.newNotice = new Notice(t("Clear formatting brush ON!\nClick the mouse middle or right key to close the formatting-brush"), 0); - } - else window.newNotice = new Notice(t("Clear formatting brush ON!\nClick the mouse middle or right key to close the formatting-brush"), 0); - - //new obsidian.Notice("请先划选部分文本,再执行命令!"); - let reg1 = /(~~|%%|\*==|==|\*\*?|\<[^\<\>]*?\>|!?\[\[*|`|_|!?\[)([^!#=\[\]\<\>\`_\*~\(\)]*)$/; - let reg2 = /^([^!=\[\]\<\>\`_\*~\(\)]*)(~~|%%|==\*|==|\*\*?|\<[^\<\>]*\>|\]\]|`|_|\]\([^\(\)\[\]]*\))/; - if (selstart.match(reg1) != null && linend.match(reg2) != null) { - selstart = selstart.replace(reg1, "$2"); - linend = linend.replace(reg2, "$1"); - //笔记全文.replaceRange(selstart+linend, {line:当前行号,ch:0},{line:当前行号,ch:当前行文本.length}); - editor.setLine(editor.getCursor().line, selstart + linend); - editor.setCursor({ line: editor.getCursor().line, ch: Number(selstart.length) }); - } - - } else { - let mdText = /(^#+\s|(?<=^|\s*)#|^\>|^\- \[( |x)\]|^\+ |\<[^\<\>]+?\>|^1\. |^\s*\- |^\-+$|^\*+$|==\*|\*==|==\*\*|\*\*==|==\*\*\*|\*\*\*==)/mg; - selectText = selectText.replace(mdText, ""); - selectText = selectText.replace(/^[ ]+|[ ]+$/mg, ""); - selectText = selectText.replace(/\!?\[\[([^\[\]\|]*\|)*([^\(\)\[\]]+)\]\]/g, "$2"); - selectText = selectText.replace(/\!?\[+([^\[\]\(\)]+)\]+\(([^\(\)]+)\)/g, "$1"); - selectText = selectText.replace(/`([^`]+)`/g, "$1"); - selectText = selectText.replace(/_([^_]+)_/g, "$1"); - selectText = selectText.replace(/==([^=]+)==/g, "$1"); - selectText = selectText.replace(/\*\*?([^\*]+)\*\*?/g, "$1"); - selectText = selectText.replace(/~~([^~]+)~~/g, "$1"); - selectText = selectText.replace(/(\r*\n)+/mg, "\r\n"); - editor.replaceSelection(selectText); - //@ts-ignore - app.commands.executeCommandById("editor:focus"); - - } - }; -} -export const followingbar = (settings: cMenuToolbarSettings) => { - - let isource = getModestate(app); - let cMenuToolbarModalBar = activeDocument.getElementById( - "cMenuToolbarModalBar" - ); - //console.log(activeLeaf.getViewState().state.mode) - if (isource) { - const activeLeaf = app.workspace.getActiveViewOfType(MarkdownView); - const view = activeLeaf; - const editor = view.editor; - - - if (cMenuToolbarModalBar) { - - let selection = editor.somethingSelected(); - let cMenuToolbarRows = settings.cMenuNumRows; - selection - ? (cMenuToolbarModalBar.style.visibility = "visible") - : (cMenuToolbarModalBar.style.visibility = "hidden"); - - let ElementCount = cMenuToolbarModalBar.childElementCount; - if (ElementCount) { - ElementCount == cMenuToolbarRows - ? (cMenuToolbarModalBar.addClass("cMenuToolbarGrid"), cMenuToolbarModalBar.removeClass("cMenuToolbarFlex")) - : (cMenuToolbarModalBar.addClass("cMenuToolbarFlex"), cMenuToolbarModalBar.removeClass("cMenuToolbarGrid")) - } else { - ElementCount = 0; - } - - let cmheight = Math.ceil(ElementCount / cMenuToolbarRows); - - cMenuToolbarModalBar.style.height = 40 * cmheight + "px"; - if (settings.aestheticStyle == "tiny") { - cMenuToolbarModalBar.style.height = 25 * cmheight + "px"; - } - let rleftwidth = - activeDocument.getElementsByClassName("side-dock-ribbon mod-left")[0] - ?.clientWidth ?? 0; - - let leftwidth = - activeDocument.getElementsByClassName("mod-left-split")[0] - ?.clientWidth ?? 0; - - let barwidth = activeDocument.getElementById( - "cMenuToolbarModalBar" - ).offsetWidth; - let barHeight = activeDocument.getElementById( - "cMenuToolbarModalBar" - ).offsetHeight; - - let bodywidth = activeDocument.body.offsetWidth; - let coords = getcoords(editor); - let cursor_head = editor.getCursor("head").ch - let cursor_from = editor.getCursor("from").ch - - let toppx = 0; - /*添加判断边界 */ - let leftpx = coords.left - leftwidth - rleftwidth + 20; - if (coords.left + barwidth + 15 > bodywidth) - leftpx = coords.left - leftwidth - rleftwidth - barwidth / 1.3 - 60; - cursor_head == cursor_from ? - toppx = coords.top - barHeight - 30 : (toppx = coords.top, leftpx = leftpx - 40); - if (leftpx < 0) leftpx = 0; - cMenuToolbarModalBar.style.visibility == "visible" ? - (cMenuToolbarModalBar.style.left = leftpx + "px", cMenuToolbarModalBar.style.top = toppx + "px") : true; - - } - - - } else - cMenuToolbarModalBar.style.visibility = "hidden" -} -export function cMenuToolbarPopover( - app: App, - plugin: cMenuToolbarPlugin -): void { - let settings = plugin.settings; - requireApiVersion("0.15.0") ? activeDocument = activeWindow.document : activeDocument = window.document; - function createMenu() { - const generateMenu = () => { - let btnwidth = 0; - let cMenuToolbar = createEl("div"); - if (cMenuToolbar) { - if (settings.positionStyle == "top") { - cMenuToolbar.setAttribute( - "style", - `position: relative; grid-template-columns: repeat(auto-fit, minmax(28px, 1fr));` - ); - } else { - cMenuToolbar.setAttribute( - "style", - `left: calc(50% - calc(${cMenuToolbar.offsetWidth - }px / 2)); bottom: ${settings.cMenuBottomValue - }em; grid-template-columns: ${"1fr ".repeat(settings.cMenuNumRows)}` - ); - } - } - cMenuToolbar.setAttribute("id", "cMenuToolbarModalBar"); - //二级弹出菜单 - - let PopoverMenu = createEl("div"); - PopoverMenu.addClass("cMenuToolbarpopover"); - PopoverMenu.addClass("cMenuToolbarTinyAesthetic"); - PopoverMenu.setAttribute("id", "cMenuToolbarPopoverBar"); - PopoverMenu.style.visibility = "hidden"; - PopoverMenu.style.height = "0"; - if (settings.aestheticStyle == "default") { - cMenuToolbar.addClass("cMenuToolbarDefaultAesthetic"); - cMenuToolbar.removeClass("cMenuToolbarTinyAesthetic"); - cMenuToolbar.removeClass("cMenuToolbarGlassAesthetic"); - } else if (settings.aestheticStyle == "tiny") { - cMenuToolbar.addClass("cMenuToolbarTinyAesthetic"); - cMenuToolbar.removeClass("cMenuToolbarDefaultAesthetic"); - cMenuToolbar.removeClass("cMenuToolbarGlassAesthetic"); - } else { - cMenuToolbar.addClass("cMenuToolbarGlassAesthetic"); - cMenuToolbar.removeClass("cMenuToolbarTinyAesthetic"); - cMenuToolbar.removeClass("cMenuToolbarDefaultAesthetic"); - } - - if (settings.positionStyle == "following") { - cMenuToolbar.style.visibility = "hidden"; - } - - let leafwidth = 99999; - if (settings.positionStyle == "top") { - let currentleaf = activeDocument.body?.querySelector( - ".workspace-leaf.mod-active" - ); - if (!activeDocument.getElementById("cMenuToolbarPopoverBar")) - currentleaf - ?.querySelector(".markdown-source-view") - .insertAdjacentElement("afterbegin", PopoverMenu); - currentleaf - ?.querySelector(".markdown-source-view") - .insertAdjacentElement("afterbegin", cMenuToolbar); - leafwidth = currentleaf.querySelector( - ".markdown-source-view" - ).offsetWidth; - } else if (settings.appendMethod == "body") { - activeDocument.body.appendChild(cMenuToolbar); - } else if (settings.appendMethod == "workspace") { - activeDocument.body - ?.querySelector(".mod-vertical.mod-root") - .insertAdjacentElement("afterbegin", cMenuToolbar); - } - - - - - let cMenuToolbarPopoverBar = activeDocument.getElementById( - "cMenuToolbarPopoverBar" - ); - settings.menuCommands.forEach((item, index) => { - if ("SubmenuCommands" in item) { - let _btn: any; - if (btnwidth >= leafwidth - 26 * 4 && leafwidth > 100) { - //说明已经溢出 - window.ISMORE = true; //需要添加更多按钮 - _btn = new ButtonComponent(cMenuToolbarPopoverBar); - } else _btn = new ButtonComponent(cMenuToolbar); - - _btn.setClass("cMenuToolbarCommandsubItem" + index); - - checksvg(item.icon) - ? (_btn.buttonEl.innerHTML = item.icon) - : _btn.setIcon(item.icon); - - let __btnwidth; - if (_btn.buttonEl.offsetWidth > 100) __btnwidth = 26; - else { - if (_btn.buttonEl.offsetWidth < 26) __btnwidth = 26; - else __btnwidth = _btn.buttonEl.offsetWidth; - } - btnwidth += __btnwidth + 2; - let submenu = CreateDiv("subitem"); - if (submenu) { - item.SubmenuCommands.forEach( - (subitem: { name: string; id: any; icon: string }) => { - let sub_btn = new ButtonComponent(submenu) - .setTooltip(subitem.name) - .setClass("menu-item") - .onClick(() => { - //@ts-ignore - app.commands.executeCommandById(subitem.id); - - if (settings.cMenuVisibility == false) - cMenuToolbar.style.visibility = "hidden"; - else { - if (settings.positionStyle == "following") { - cMenuToolbar.style.visibility = "hidden"; - } else cMenuToolbar.style.visibility = "visible"; - } - }); - checksvg(subitem.icon) - ? (sub_btn.buttonEl.innerHTML = subitem.icon) - : sub_btn.setIcon(subitem.icon); - - _btn.buttonEl.insertAdjacentElement("afterbegin", submenu); - } - ); - } - } else { - if (item.id == "obsidian-editing-toolbar:change-font-color") { - let button2 = new ButtonComponent(cMenuToolbar); - button2 - .setClass("cMenuToolbarCommandsubItem-font-color") - .setTooltip(t("Font Colors")) - .onClick(() => { - //@ts-ignore - app.commands.executeCommandById(item.id); - if (settings.cMenuVisibility == false) - cMenuToolbar.style.visibility = "hidden"; - else { - if (settings.positionStyle == "following") { - cMenuToolbar.style.visibility = "hidden"; - } else cMenuToolbar.style.visibility = "visible"; - } - }); - checksvg(item.icon) - ? (button2.buttonEl.innerHTML = item.icon) - : button2.setIcon(item.icon); - - btnwidth += 26; - // let Selection = createDiv("triangle-icon"); - let submenu2 = createEl("div"); - submenu2.addClass("subitem"); - - if (submenu2) { - submenu2.innerHTML = colorpicker; - - button2.buttonEl.insertAdjacentElement("afterbegin", submenu2); - if (settings.cMenuFontColor) - activeDocument.getElementById( - "change-font-color-icon" - ).style.fill = settings.cMenuFontColor; - tabCell(app, plugin, "x-color-picker-table"); - let el = submenu2.querySelector( - ".x-color-picker-wrapper" - ) as HTMLElement; - - let button3 = new ButtonComponent(el); - button3 - .setIcon("remix-Brush2Line") - .setTooltip(t("Format Brush")) - .onClick(() => { - QuiteFormatBrushes(); - window.isCTxt = true; - window.newNotice = new Notice( - t("Font-Color formatting brush ON!"), - 0 - ); - }); - } - } else if (item.id == "obsidian-editing-toolbar:change-background-color") { - let button2 = new ButtonComponent(cMenuToolbar); - button2 - .setClass("cMenuToolbarCommandsubItem-font-color") - .setTooltip(t("Background color")) - .onClick(() => { - //@ts-ignore - app.commands.executeCommandById(item.id); - if (settings.cMenuVisibility == false) - cMenuToolbar.style.visibility = "hidden"; - else { - if (settings.positionStyle == "following") { - cMenuToolbar.style.visibility = "hidden"; - } else cMenuToolbar.style.visibility = "visible"; - } - }); - checksvg(item.icon) - ? (button2.buttonEl.innerHTML = item.icon) - : button2.setIcon(item.icon); - - btnwidth += 26; - // let Selection = CreateDiv("triangle-icon"); - let submenu2 = createEl("div"); - submenu2.addClass("subitem"); - // console.log(btnwidth,item.name) - if (submenu2) { - submenu2.innerHTML = backcolorpicker; - - button2.buttonEl.insertAdjacentElement("afterbegin", submenu2); - if (plugin.settings.cMenuBackgroundColor) - activeDocument.getElementById( - "change-background-color-icon" - ).style.fill = plugin.settings.cMenuBackgroundColor; - tabCell(app, plugin, "x-backgroundcolor-picker-table"); - let el = submenu2.querySelector( - ".x-color-picker-wrapper" - ) as HTMLElement; - - let button3 = new ButtonComponent(el); - button3 - .setIcon("remix-Brush2Line") - .setTooltip(t("Format Brush")) - .onClick(() => { - QuiteFormatBrushes(); - window.isBgC = true; - window.newNotice = new Notice( - t("Background-color formatting brush ON!"), - 0 - ); - }); - } - } else { - let button; - if (btnwidth >= leafwidth - 26 * 4 && leafwidth > 100) { - //说明已经溢出 - window.ISMORE = true; //需要添加更多按钮 - button = new ButtonComponent(cMenuToolbarPopoverBar); - } else button = new ButtonComponent(cMenuToolbar); - button.setTooltip(item.name).onClick(() => { - //@ts-ignore - app.commands.executeCommandById(item.id); - if (settings.cMenuVisibility == false) - cMenuToolbar.style.visibility = "hidden"; - else { - if (settings.positionStyle == "following") { - cMenuToolbar.style.visibility = "hidden"; - } else cMenuToolbar.style.visibility = "visible"; - } - }); - - button.setClass("cMenuToolbarCommandItem"); - if (item.id == "cMenuToolbar-Divider-Line") - button.setClass("cMenuToolbar-Divider-Line"); - checksvg(item.icon) - ? (button.buttonEl.innerHTML = item.icon) - : button.setIcon(item.icon); - let __btnwidth2; - if (button.buttonEl.offsetWidth > 100) __btnwidth2 = 26; - else { - if (button.buttonEl.offsetWidth < 26) __btnwidth2 = 26; - else __btnwidth2 = button.buttonEl.offsetWidth; - } - - btnwidth += __btnwidth2; - } - } - }); - - CreateMoreMenu(cMenuToolbar); - if (Math.abs(plugin.settings.cMenuWidth - Number(btnwidth)) > 30) { - plugin.settings.cMenuWidth = Number(btnwidth); - setTimeout(() => { - plugin.saveSettings(); - }, 100); - } - }; - let Markdown = app.workspace.getActiveViewOfType(MarkdownView); - if (Markdown) { - let currentnode = activeDocument.getElementById("cMenuToolbarModalBar"); - if (settings.positionStyle == "top") { - if (!getModestate(app)) return; - let activeleaf = activeDocument.body.querySelector( - ".workspace-leaf.mod-active" - ); - if (activeleaf) - if (currentnode) { - if (!activeleaf.querySelector("#cMenuToolbarModalBar")) { - selfDestruct(); - } else { - return; - } - } - } else { - if (currentnode) return; - } - generateMenu(); - let cMenuToolbarModalBar = activeDocument.getElementById( - "cMenuToolbarModalBar" - ); - setBottomValue(settings); - - settings.cMenuVisibility == false - ? (cMenuToolbarModalBar.style.visibility = "hidden") - : settings.positionStyle == "following" ? - (cMenuToolbarModalBar?.style.visibility = "hidden") : (cMenuToolbarModalBar?.style.visibility = "visible"); - } else { - selfDestruct(); - } - - } - createMenu(); -} diff --git a/.obsidian/plugins/obsidian-editing-toolbar/src/modals/suggesterModals.ts b/.obsidian/plugins/obsidian-editing-toolbar/src/modals/suggesterModals.ts deleted file mode 100644 index 1493244..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/src/modals/suggesterModals.ts +++ /dev/null @@ -1,256 +0,0 @@ -import type cMenuToolbarPlugin from "src/plugin/main"; -import { appIcons } from "src/icons/appIcons"; -import { Notice, Command, setIcon, FuzzyMatch, FuzzySuggestModal, Modal, SliderComponent, TextAreaComponent, TextComponent, debounce, App } from "obsidian"; -import { findmenuID } from "src/util/util"; -import { setBottomValue } from "src/util/statusBarConstants"; -import { t } from "src/translations/helper"; - -export class ChooseFromIconList extends FuzzySuggestModal { - plugin: cMenuToolbarPlugin; - command: Command; - issub: boolean; - - constructor(plugin: cMenuToolbarPlugin, command: Command, issub: boolean = false) { - super(plugin.app); - this.plugin = plugin; - this.command = command; - this.issub = issub; - this.setPlaceholder("Choose an icon"); - } - - private capitalJoin(string: string): string { - const icon = string.split(" "); - - return icon - .map((icon) => { - return icon[0].toUpperCase() + icon.substring(1); - }) - .join(" "); - } - - getItems(): string[] { - return appIcons; - } - - getItemText(item: string): string { - return this.capitalJoin( - item - .replace("feather-", "") - .replace("remix-", "") - .replace("bx-", "") - .replace(/([A-Z])/g, " $1") - .trim() - .replace(/-/gi, " ") - ); - } - - renderSuggestion(icon: FuzzyMatch, iconItem: HTMLElement): void { - const span = createSpan({ cls: "cMenuToolbarIconPick" }); - iconItem.appendChild(span); - setIcon(span, icon.item); - super.renderSuggestion(icon, iconItem); - } - - async onChooseItem(item: string): Promise { - if (item === "Custom") { - new CustomIcon(this.app, this.plugin, this.command, this.issub).open(); - } else { - if (this.command.icon) //存在就修改不存在新增 - { - let menuID = findmenuID(this.plugin, this.command, this.issub) - // console.log(menuID); - this.issub ? this.plugin.settings.menuCommands[menuID['index']].SubmenuCommands[menuID['subindex']].icon = item : this.plugin.settings.menuCommands[menuID['index']].icon = item; - } else { - this.command.icon = item; - this.plugin.settings.menuCommands.push(this.command); - } - - await this.plugin.saveSettings(); - setTimeout(() => { - dispatchEvent(new Event("cMenuToolbar-NewCommand")); - }, 100); - console.log( - `%cCommand '${this.command.name}' was added to cMenuToolbar`, - "color: Violet" - ); - } - } -} - -export class CommandPicker extends FuzzySuggestModal { - command: Command; - - constructor(private plugin: cMenuToolbarPlugin) { - super(plugin.app); - this.app; - this.setPlaceholder("Choose a command"); - } - - getItems(): Command[] { - //@ts-ignore - return app.commands.listCommands(); - } - - getItemText(item: Command): string { - return item.name; - } - - async onChooseItem(item: Command): Promise { - let index = this.plugin.settings.menuCommands.findIndex((v) => v.id == item.id); - // console.log(index) - - if (index > -1) //存在 - { - new Notice("The command" + item.name + "already exists", 3000); - // console.log(`%cCommand '${item.name}' already exists `, "color: Violet"); - return; - } else { - if (item.icon) { - this.plugin.settings.menuCommands.push(item); - await this.plugin.saveSettings(); - setTimeout(() => { - dispatchEvent(new Event("cMenuToolbar-NewCommand")); - }, 100); - console.log( - `%cCommand '${item.name}' was added to cMenuToolbar`, - "color: Violet" - ); - } else { - new ChooseFromIconList(this.plugin, item, false).open(); - } - } - } -} - -export class CustomIcon extends Modal { - plugin: cMenuToolbarPlugin; - item: Command; - issub: boolean; - submitEnterCallback: (this: HTMLTextAreaElement, ev: KeyboardEvent) => any; - - constructor(app: App, plugin: cMenuToolbarPlugin, item: Command, issub: boolean) { - super(plugin.app); - this.plugin = plugin; - this.item = item; - this.issub = issub; - this.containerEl.addClass("cMenuToolbar-Modal"); - this.containerEl.addClass("customicon"); - } - onOpen() { - - const { contentEl } = this; - contentEl.createEl("b", { text: t("Enter the icon code, it looks like .... format") }); - const textComponent = new TextAreaComponent(contentEl); - textComponent.inputEl.classList.add('wideInputPromptInputEl'); - textComponent.setPlaceholder("") - .setValue(this.item.icon ?? '') - .onChange(debounce(async (value: string) => { - - this.item.icon = value; - let menuID = findmenuID(this.plugin, this.item, this.issub) - if (!this.issub) //不是子项 - { - let index = menuID['index'] - index === -1 ? this.plugin.settings.menuCommands.push(this.item) : - (this.plugin.settings.menuCommands[index].icon = this.item.icon); - - } else { - let subindex = menuID['subindex'] - subindex === -1 ? this.plugin.settings.menuCommands[menuID["index"]].SubmenuCommands.push(this.item) : this.plugin.settings.menuCommands[menuID['index']].SubmenuCommands[subindex].icon = value - - } - await this.plugin.saveSettings(); - }, 100, true) - ) - .inputEl.addEventListener('keydown', this.submitEnterCallback); - } - onClose() { - const { contentEl } = this; - contentEl.empty(); - setTimeout(() => { - dispatchEvent(new Event("cMenuToolbar-NewCommand")); - }, 100); - } -}; - - -export class ChangeCmdname extends Modal { - plugin: cMenuToolbarPlugin; - item: Command; - issub: boolean; - submitEnterCallback: (this: HTMLInputElement, ev: KeyboardEvent) => any; - constructor(app: App, plugin: cMenuToolbarPlugin, item: Command, issub: boolean) { - super(plugin.app); - this.plugin = plugin; - this.item = item; - this.issub = issub; - this.containerEl.addClass("cMenuToolbar-Modal"); - this.containerEl.addClass("changename"); - } - onOpen() { - - const { contentEl } = this; - contentEl.createEl("b", { text: t("Please enter a new name:") }); - - const textComponent = new TextComponent(contentEl); - textComponent.inputEl.classList.add('InputPromptInputEl'); - textComponent.setPlaceholder("") - .setValue(this.item.name ?? '') - .onChange(debounce(async (value) => { - - let menuID = findmenuID(this.plugin, this.item, this.issub) - this.item.name = value; - if (!this.issub) //不是子项 - { - let index = menuID['index'] - // console.log(index,"index") - index === -1 ? this.plugin.settings.menuCommands.push(this.item) : - (this.plugin.settings.menuCommands[index].name = this.item.name); - - } else { - let subindex = menuID['subindex'] - subindex === -1 ? this.plugin.settings.menuCommands[menuID["index"]].SubmenuCommands.push(this.item) : this.plugin.settings.menuCommands[menuID['index']].SubmenuCommands[subindex].name = value - - } - await this.plugin.saveSettings(); - }, 100, true)) - .inputEl.addEventListener('keydown', this.submitEnterCallback); - } - onClose() { - const { contentEl } = this; - contentEl.empty(); - setTimeout(() => { - dispatchEvent(new Event("cMenuToolbar-NewCommand")); - }, 100); - } -}; - -export class openSlider extends Modal { - plugin: cMenuToolbarPlugin; - constructor(app: App, plugin: cMenuToolbarPlugin) { - super(plugin.app); - this.plugin = plugin; - this.containerEl.addClass("cMenuToolbar-Modal"); - } - onOpen() { - - const { contentEl } = this; - contentEl.createEl("p", { text:t("Drag the slider to move the position") }); - - new SliderComponent(contentEl) - .setLimits(2, 18, 0.25) - .setValue(this.plugin.settings.cMenuBottomValue) - .onChange(debounce(async (value) => { - console.log(`%c${value}em`, "color: Violet"); - this.plugin.settings.cMenuBottomValue = value; - setBottomValue(this.plugin.settings); - await this.plugin.saveSettings(); - }, 100, true)) - .setDynamicTooltip(); - - } - onClose() { - const { contentEl } = this; - contentEl.empty(); - } -}; diff --git a/.obsidian/plugins/obsidian-editing-toolbar/src/plugin/main.ts b/.obsidian/plugins/obsidian-editing-toolbar/src/plugin/main.ts deleted file mode 100644 index 296b841..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/src/plugin/main.ts +++ /dev/null @@ -1,741 +0,0 @@ -import { - Menu, - Plugin, - Notice, - Command, - setIcon, - debounce, - Editor, - MarkdownView, - SliderComponent, - ToggleComponent, - ButtonComponent, - requireApiVersion, - App, -} from "obsidian"; -import { wait } from "src/util/util"; -import { appIcons } from "src/icons/appIcons"; -import { CommandPicker, openSlider } from "src/modals/suggesterModals"; -import { cMenuToolbarSettingTab } from "src/settings/settingsTab"; -import { selfDestruct, cMenuToolbarPopover, getModestate, QuiteFormatBrushes, Setfontcolor, Setbackgroundcolor, SetHeader, followingbar, FormatEraser } from "src/modals/cMenuToolbarModal"; -import { cMenuToolbarSettings, DEFAULT_SETTINGS } from "src/settings/settingsData"; -import addIcons, { - addFeatherIcons, - addRemixIcons - // addBoxIcons -} from "src/icons/customIcons"; - -import { setMenuVisibility, setBottomValue } from "src/util/statusBarConstants"; -import { fullscreenMode, workplacefullscreenMode } from "src/util/fullscreen"; -import { t } from "src/translations/helper"; - -let activeDocument: Document; - -export default class cMenuToolbarPlugin extends Plugin { - app: App; - settings: cMenuToolbarSettings; - statusBarIcon: HTMLElement; - cMenuToolbar: HTMLElement; - modCommands: Command[] = [ - { - id: "editor:insert-embed", - name: "Add embed", - icon: "note-glyph", - }, - { - id: "editor:insert-link", - name: "Insert markdown link", - icon: "link-glyph", - }, - { - id: "editor:insert-tag", - name: "Add tag", - icon: "price-tag-glyph", - }, - { - id: "editor:insert-wikilink", - name: "Add internal link", - icon: "bracket-glyph", - }, - { - id: "editor:toggle-bold", - name: "Toggle bold", - icon: "bold-glyph", - }, - { - id: "editor:toggle-italics", - name: "Toggle italics", - icon: "italic-glyph", - }, - { - id: "editor:toggle-strikethrough", - name: "Toggle strikethrough", - icon: "strikethrough-glyph", - }, - { - id: "editor:toggle-code", - name: "Toggle code", - icon: "code-glyph", - }, - { - id: "editor:toggle-blockquote", - name: "Toggle blockquote", - icon: "quote-glyph", - }, - { - id: "editor:toggle-bullet-list", - name: "Toggle bullet", - icon: "bullet-list-glyph", - }, - { - id: "editor:toggle-checklist-status", - name: "Toggle checklist status", - icon: "checkbox-glyph", - }, - { - id: "editor:toggle-comments", - name: "Toggle comment", - icon: "percent-sign-glyph", - }, - { - id: "editor:toggle-highlight", - name: "Toggle highlight", - icon: "highlight-glyph", - }, - { - id: "editor:toggle-numbered-list", - name: "Toggle numbered list", - icon: "number-list-glyph", - }, - ]; - - - async onload(): Promise { - console.log("cMenuToolbar v" + this.manifest.version + " loaded"); - requireApiVersion("0.15.0") ? activeDocument = activeWindow.document : activeDocument = window.document; - await this.loadSettings(); - addIcons(); - addFeatherIcons(appIcons); - addRemixIcons(appIcons); - //addBoxIcons(appIcons); - this.generateCommands(); - this.app.workspace.onLayoutReady(() => { - setTimeout(() => { - this.setupStatusBar(); - }); - }); - this.registerDomEvent(activeDocument, "mouseup", async (e) => { - if (e.button) { - if (window.isCTxt || window.isBgC || window.isText) { - QuiteFormatBrushes(); - window.newNotice = new Notice(t("Format Brush Off!")); - } - } - let view = this.app.workspace.getActiveViewOfType(MarkdownView); - if (!view) { return; }; - - //let cmEditor = view.sourceMode.cmEditor; - let cmEditor = view.editor; - if (cmEditor.hasFocus()) { - let cMenuToolbarModalBar = activeDocument.getElementById( - "cMenuToolbarModalBar" - ); - if (cmEditor.getSelection() == null || cmEditor.getSelection() == "") { - this.settings.positionStyle == "following"?cMenuToolbarModalBar.style.visibility = "hidden":true; - return - } else { - if (window.isCTxt) { - Setfontcolor(app, this.settings.cMenuFontColor); - } else if (window.isBgC) { - Setbackgroundcolor(app, this.settings.cMenuBackgroundColor); - } else if (window.isText) { - FormatEraser(); - } else if (this.settings.positionStyle == "following") { - this.registerDomEvent(activeDocument, "keydown", async (e) => { - if (cMenuToolbarModalBar) - cMenuToolbarModalBar.style.visibility = "hidden" - }) - - followingbar(this.settings) - } - } - } else if (window.isCTxt || window.isBgC || window.isText) { - QuiteFormatBrushes(); - window.newNotice = new Notice(t("Format Brush Off!")); - - } - }); - if (requireApiVersion("0.15.0")) { - this.app.workspace.on('window-open', (leaf) => { - this.registerDomEvent(leaf.doc, 'mouseup', (e) => { - if (e.button) { - if (window.isCTxt || window.isBgC || window.isText) { - QuiteFormatBrushes(); - window.newNotice = new Notice(t("Format Brush Off!")); - } - } - - let view = this.app.workspace.getActiveViewOfType(MarkdownView); - if (!view) { return; }; - //let cmEditor = view.sourceMode.cmEditor; - let cmEditor = view.editor; - if (cmEditor.hasFocus()) { - if (this.settings.positionStyle == "following") - followingbar(this.settings) - else - if (cmEditor.getSelection() == null || cmEditor.getSelection() == "") { - return - } else { - if (window.isCTxt) { - Setfontcolor(app, this.settings.cMenuFontColor); - } else if (window.isBgC) { - Setbackgroundcolor(app, this.settings.cMenuBackgroundColor); - } else if (window.isText) { - FormatEraser(); - } - - } - - } else if (window.isCTxt || window.isBgC || window.isText) { - QuiteFormatBrushes(); - window.newNotice = new Notice(t("Format Brush Off!")); - - } - - }); - }); - } - this.addSettingTab(new cMenuToolbarSettingTab(this.app, this)); - this.registerEvent(this.app.workspace.on("active-leaf-change", this.handlecMenuToolbar)); - this.registerEvent(this.app.workspace.on("window-open", this.handlecMenuToolbar_pop)); - this.registerEvent(this.app.workspace.on("layout-change", this.handlecMenuToolbar_layout)); - this.registerEvent(this.app.workspace.on("resize", this.handlecMenuToolbar_resize)); - setTimeout(() => { - dispatchEvent(new Event("cMenuToolbar-NewCommand")); - }, 100) - - - } - - generateCommands() { - //Hide-show menu - this.addCommand({ - id: "hide-show-menu", - name: "Hide/show ", - icon: "cMenuToolbar", - callback: async () => { - this.settings.cMenuVisibility = !this.settings.cMenuVisibility; - this.settings.cMenuVisibility == true - ? setTimeout(() => { - dispatchEvent(new Event("cMenuToolbar-NewCommand")); - }, 100) - : setMenuVisibility(this.settings.cMenuVisibility); - selfDestruct(); - await this.saveSettings(); - }, - }); - this.addCommand({ - id: 'format-eraser', - name: 'Format Eraser', - callback: () => FormatEraser(), - icon: `` - - }); - this.addCommand({ - id: 'change-font-color', - name: 'Change font color[html]', - callback: () => Setfontcolor(app, this.settings.cMenuFontColor ?? "#2DC26B"), - icon: `` - - }); - this.addCommand({ - id: 'change-background-color', - name: 'Change Backgroundcolor[html]', - callback: () => Setbackgroundcolor(app, this.settings.cMenuBackgroundColor ?? "#FA541C"), - icon: `` - - }); - this.addCommand({ - id: 'indent-list', - name: 'indent list', - callback: () => { - const activeLeaf = this.app.workspace.getActiveViewOfType(MarkdownView); - const view = activeLeaf; - const editor = view.editor; - //@ts-ignore - return editor.indentList(); - }, - icon: "indent-glyph" - - }); - this.addCommand({ - id: 'undent-list', - name: 'unindent-list', - callback: () => { - const activeLeaf = this.app.workspace.getActiveViewOfType(MarkdownView); - const view = activeLeaf; - const editor = view.editor; - //@ts-ignore - return editor.unindentList(); - }, - icon: "unindent-glyph" - - }); - this.addCommand({ - id: 'editor-undo', - name: 'undo editor', - callback: () => { - const activeLeaf = this.app.workspace.getActiveViewOfType(MarkdownView); - const view = activeLeaf; - const editor = view.editor; - return editor.undo(); - }, - icon: "undo-glyph" - - }); - this.addCommand({ - id: 'editor-redo', - name: 'redo editor', - callback: () => { - const activeLeaf = this.app.workspace.getActiveViewOfType(MarkdownView); - const view = activeLeaf; - const editor = view.editor; - return editor.redo(); - }, - icon: "redo-glyph" - - }); - this.addCommand({ - id: "fullscreen-focus", - name: "Fullscreen focus mode", - hotkeys: [{ modifiers: ["Mod", "Shift"], key: "F11" }], - callback: () => { - return fullscreenMode(app) - }, - icon: "fullscreen" - }); - this.addCommand({ - id: "workplace-fullscreen-focus", - name: "workplace-Fullscreen ", - callback: () => { - return workplacefullscreenMode(app) - }, - hotkeys: [{ modifiers: ['Mod'], key: "F11" }], - icon: "remix-SplitCellsHorizontal" - }); - - this.addCommand({ - id: 'header0-text', - name: 'Remove header level', - callback: () => SetHeader(""), - hotkeys: [{ modifiers: ["Mod"], key: "`" }], - icon: "feather-file-text" - }); - this.addCommand({ - id: 'header1-text', - name: 'Header 1', - callback: () => SetHeader("#"), - hotkeys: [{ modifiers: ["Mod"], key: "1" }], - icon: "header-1" - }); - this.addCommand({ - id: 'header2-text', - name: 'Header 2', - callback: () => SetHeader("##"), - hotkeys: [{ modifiers: ["Mod"], key: "2" }], - icon: "header-2" - }); - this.addCommand({ - id: 'header3-text', - name: 'Header 3', - callback: () => SetHeader("###"), - hotkeys: [{ modifiers: ["Mod"], key: "3" }], - icon: "header-3" - }); - this.addCommand({ - id: 'header4-text', - name: 'Header 4', - callback: () => SetHeader("####"), - hotkeys: [{ modifiers: ["Mod"], key: "4" }], - icon: "header-4" - }); - this.addCommand({ - id: 'header5-text', - name: 'Header 5', - callback: () => SetHeader("#####"), - hotkeys: [{ modifiers: ["Mod"], key: "5" }], - icon: "header-5" - }); - this.addCommand({ - id: 'header6-text', - name: 'Header 6', - callback: () => SetHeader("######"), - hotkeys: [{ modifiers: ["Mod"], key: "6" }], - icon: "header-6" - }); - - - const applyCommand = (command: commandPlot, editor: Editor) => { - const selectedText = editor.getSelection(); - const curserStart = editor.getCursor("from"); - const curserEnd = editor.getCursor("to"); - let prefix = command.prefix; - if (command.islinehead && curserStart.ch > 0) // cursor position is not line head - prefix = '\n' + prefix - const suffix = command.suffix || prefix; - const setCursor = (mode: number) => { - editor.setCursor( - curserStart.line + command.line * mode, - curserEnd.ch + command.char * mode - ); - }; - const preStart = { - line: curserStart.line - command.line, - ch: curserStart.ch - prefix.length, - }; - const pre = editor.getRange(preStart, curserStart); - - if (pre == prefix.trimStart()) { - const sufEnd = { - line: curserStart.line + command.line, - ch: curserEnd.ch + suffix.length, - }; - const suf = editor.getRange(curserEnd, sufEnd); - if (suf == suffix.trimEnd()) { - editor.replaceRange(selectedText, preStart, sufEnd); // codeblock leave blank lines - return setCursor(-1); - } - } - editor.replaceSelection(`${prefix}${selectedText}${suffix}`); - return setCursor(1); - }; - - type commandPlot = { - char: number; - line: number; - prefix: string; - suffix: string; - islinehead: boolean; - }; - - type commandsPlot = { - [key: string]: commandPlot; - }; - - const commandsMap: commandsPlot = { - hrline: { - char: 5, - line: 1, - prefix: "\n---", - suffix: "\n", - islinehead: true - }, - justify: { - char: 17, - line: 0, - prefix: "

", - suffix: "

", - islinehead: false, - }, - left: { - char: 17, - line: 0, - prefix: "

", - suffix: "

", - islinehead: false, - }, - right: { - char: 17, - line: 0, - prefix: "

", - suffix: "

", - islinehead: false, - }, - center: { - char: 8, - line: 0, - prefix: "
", - suffix: "
", - islinehead: false, - }, - underline: { - char: 3, - line: 0, - prefix: "", - suffix: "", - islinehead: false, - }, - superscript: { - char: 5, - line: 0, - prefix: "", - suffix: "", - islinehead: false, - }, - subscript: { - char: 5, - line: 0, - prefix: "", - suffix: "", - islinehead: false, - }, - codeblock: { - char: 5, - line: 1, - prefix: "\n```\n", - suffix: "\n```\n", - islinehead: false, - }, - }; - // Add new commands - Object.keys(commandsMap).forEach((type) => { - this.addCommand({ - id: `${type}`, - name: `Toggle ${type}`, - icon: `${type}-glyph`, - callback: async () => { - const activeLeaf = - this.app.workspace.getActiveViewOfType(MarkdownView); - if (activeLeaf) { - const view = activeLeaf; - const editor = view.editor; - applyCommand(commandsMap[type], editor); - await wait(10); - //@ts-ignore - app.commands.executeCommandById("editor:focus"); - } - }, - }); - }); - // Enhance editor commands - this.modCommands.forEach((type) => { - this.addCommand({ - id: `${type["id"]}`, - name: `${type["name"]}`, - icon: `${type["icon"]}`, - callback: async () => { - const activeLeaf = - this.app.workspace.getActiveViewOfType(MarkdownView); - const view = activeLeaf; - const editor = view.editor; - editor.getCursor("from"); - const curserEnd = editor.getCursor("to"); - let char; - `${type["id"]}` == "editor:insert-embed" - ? (char = 3) - : `${type["id"]}` == "editor:insert-link" - ? (char = 1) - : `${type["id"]}` == "editor:insert-tag" - ? (char = 1) - : `${type["id"]}` == "editor:insert-wikilink" - ? (char = 2) - : `${type["id"]}` == "editor:toggle-bold" - ? (char = 2) - : `${type["id"]}` == "editor:toggle-italics" - ? (char = 1) - : `${type["id"]}` == "editor:toggle-strikethrough" - ? (char = 2) - : `${type["id"]}` == "editor:toggle-code" - ? (char = 1) - : `${type["id"]}` == "editor:toggle-blockquote" - ? (char = 2) - : `${type["id"]}` == "editor:toggle-bullet-list" - ? (char = 2) - : `${type["id"]}` == "editor:toggle-checklist-status" - ? (char = 4) - : `${type["id"]}` == "editor:toggle-comments" - ? (char = 2) - : `${type["id"]}` == "editor:toggle-highlight" - ? (char = 2) - : `${type["id"]}` == "editor:toggle-numbered-list" - ? (char = 3) - : (char = 2); - //@ts-ignore - app.commands.executeCommandById(`${type["id"]}`); - editor.setCursor(curserEnd.line, curserEnd.ch + char); - await wait(10); - //@ts-ignore - app.commands.executeCommandById("editor:focus"); - }, - }); - }); - } - - setupStatusBar() { - addIcons(); - this.statusBarIcon = this.addStatusBarItem(); - this.statusBarIcon.addClass("cMenuToolbar-statusbar-button"); - setIcon(this.statusBarIcon, "cMenuToolbar"); - - this.registerDomEvent(this.statusBarIcon, "click", () => { - const statusBarRect = - this.statusBarIcon.parentElement.getBoundingClientRect(); - const statusBarIconRect = this.statusBarIcon.getBoundingClientRect(); - - const menu = new Menu().addItem((item) => { - item.setTitle(t("Hide & Show")); - requireApiVersion("0.15.0")?item.setSection("settings"):true; - const itemDom = (item as any).dom as HTMLElement; - const toggleComponent = new ToggleComponent(itemDom) - .setValue(this.settings.cMenuVisibility) - .setDisabled(true); - - const toggle = async () => { - this.settings.cMenuVisibility = !this.settings.cMenuVisibility; - toggleComponent.setValue(this.settings.cMenuVisibility); - this.settings.cMenuVisibility == true - ? setTimeout(() => { - dispatchEvent(new Event("cMenuToolbar-NewCommand")); - }, 100) - : setMenuVisibility(this.settings.cMenuVisibility); - selfDestruct(); - await this.saveSettings(); - }; - - item.onClick((e) => { - e.preventDefault(); - e.stopImmediatePropagation(); - toggle(); - }); - }); - - const menuDom = (menu as any).dom as HTMLElement; - menuDom.addClass("cMenuToolbar-statusbar-menu"); - - - menu.addItem((item) => { - - item.setIcon("cMenuToolbarAdd"); - requireApiVersion("0.15.0")?item.setSection("ButtonAdd"):true; - item.onClick(() => { - new CommandPicker(this).open(); - }); - }); - - - menu.addItem((item) => { - - item.setIcon("cMenuToolbarReload"); - requireApiVersion("0.15.0")?item.setSection("ButtonAdd"):true; - - item.onClick(() => { - setTimeout(() => { - dispatchEvent(new Event("cMenuToolbar-NewCommand")); - }, 100); - console.log(`%ccMenuToolbar refreshed`, "color: Violet"); - }); - }); - - - menu.addItem((item) => { - - item.setIcon("sliders") - requireApiVersion("0.15.0")?item.setSection("ButtonAdd"):true; - item.onClick(() => { - - new openSlider(this.app, this).open(); - }); - }); - - - - menu.showAtPosition({ - x: statusBarIconRect.right + 5, - y: statusBarRect.top - 5, - }); - }); - } - - onunload(): void { - selfDestruct(); - console.log("cMenuToolbar unloaded"); - this.app.workspace.off("active-leaf-change", this.handlecMenuToolbar); - this.app.workspace.off("window-open", this.handlecMenuToolbar_pop); - this.app.workspace.off("layout-change", this.handlecMenuToolbar_layout); - this.app.workspace.off("resize", this.handlecMenuToolbar_resize); - } - - - handlecMenuToolbar = () => { - - if (this.settings.cMenuVisibility == true) { - - cMenuToolbarPopover(this.app, this) - } else { - return false; - } - }; - handlecMenuToolbar_pop = () => { - - - if (this.settings.cMenuVisibility == true) { - setTimeout(() => { - selfDestruct(); - cMenuToolbarPopover(this.app, this) - }, 400); - - } else { - return false; - } - }; - handlecMenuToolbar_layout = () => { - let isource = getModestate(app); - requireApiVersion("0.15.0") ? activeDocument = activeWindow.document : activeDocument = window.document; - if (this.settings.cMenuVisibility == true) { - let cMenuToolbarModalBar = activeDocument.getElementById( - "cMenuToolbarModalBar" - ); - if (!getModestate(app)) //no source mode - { - if (cMenuToolbarModalBar) { - cMenuToolbarModalBar.style.visibility = "hidden" - } - } - else { - if (cMenuToolbarModalBar) { - cMenuToolbarModalBar.style.visibility = "visibility" - } else { - setTimeout(() => { - dispatchEvent(new Event("cMenuToolbar-NewCommand")); - }, 100) - } - } - - } else { - return false; - } - - - }; - handlecMenuToolbar_resize = () => { - requireApiVersion("0.15.0") ? activeDocument = activeWindow.document : activeDocument = window.document; - if (this.settings.cMenuVisibility == true) { - if (getModestate(app)) { - let currentleaf = activeDocument.body - ?.querySelector(".workspace-leaf.mod-active"); - - let leafwidth = currentleaf?.querySelector(".markdown-source-view").offsetWidth ?? 0 - - if (this.settings.cMenuWidth && leafwidth) { - if ((leafwidth - this.settings.cMenuWidth) < 78 && (leafwidth > this.settings.cMenuWidth)) - return; - else { - setTimeout(() => { - dispatchEvent(new Event("cMenuToolbar-NewCommand")); - }, 100) - } - } - } - - } else { - return false; - } - } - async loadSettings() { - this.settings = Object.assign({}, DEFAULT_SETTINGS, await this.loadData()); - } - - async saveSettings() { - await this.saveData(this.settings); - } -} diff --git a/.obsidian/plugins/obsidian-editing-toolbar/src/settings/settingsData.ts b/.obsidian/plugins/obsidian-editing-toolbar/src/settings/settingsData.ts deleted file mode 100644 index b1d309b..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/src/settings/settingsData.ts +++ /dev/null @@ -1,219 +0,0 @@ -import type { Command } from "obsidian"; -export const APPEND_METHODS = ["body", "workspace"]; -export const AESTHETIC_STYLES = ["glass", "default", "tiny"]; -export const POSITION_STYLES = ["fixed", "following", "top"]; - - - -declare module 'obsidian' { - export interface Command { - SubmenuCommands?: Command[]; - } -} -export interface cMenuToolbarSettings { - cMenuWidth: number; - cMenuFontColor: string; - cMenuBackgroundColor: string; - aestheticStyle: string; - positionStyle: string; - menuCommands: Command[]; - appendMethod: string; - shouldShowMenuOnSelect: boolean; - cMenuVisibility: boolean; - cMenuBottomValue: number; - cMenuNumRows: number; -} - -export const DEFAULT_SETTINGS: cMenuToolbarSettings = { - aestheticStyle: "default", - positionStyle: "top", - menuCommands: [ - { - id: 'obsidian-editing-toolbar:editor-undo', - name: 'undo editor', - icon: "undo-glyph" - - }, - { - id: 'obsidian-editing-toolbar:editor-redo', - name: 'redo editor', - icon: "redo-glyph" - }, - { - "id": "obsidian-editing-toolbar:format-eraser", - "name": "Clear text formatting", - "icon": "" - }, - { - id: "obsidian-editing-toolbar:header2-text", - name: "Header 2", - hotkeys: [ - { - "modifiers": [ - "Mod" - ], - "key": "2" - } - ], - icon: "header-2" - }, - { - id: "obsidian-editing-toolbar:header3-text", - name: "Header 3", - hotkeys: [ - { - "modifiers": [ - "Mod" - ], - "key": "3" - } - ], - icon: "header-3" - }, - { - id: "SubmenuCommands-header", - name: "submenu", - icon: "header-n", - SubmenuCommands: [ - { - id: "obsidian-editing-toolbar:header1-text", - name: "Header 1", - hotkeys: [ - { - "modifiers": [ - "Mod" - ], - "key": "1" - } - ], - icon: "header-1" - }, - { - id: "obsidian-editing-toolbar:header4-text", - name: "Header 4", - hotkeys: [ - { - "modifiers": [ - "Mod" - ], - "key": "4" - } - ], - icon: "header-4" - }, - { - id: "obsidian-editing-toolbar:header5-text", - name: "Header 5", - hotkeys: [ - { - "modifiers": [ - "Mod" - ], - "key": "5" - } - ], - icon: "header-5" - }, - { - id: "obsidian-editing-toolbar:header6-text", - name: "Header 6", - hotkeys: [ - { - "modifiers": [ - "Mod" - ], - "key": "6" - } - ], - icon: "header-6" - } - ] - }, - { - id: "obsidian-editing-toolbar:editor:toggle-bold", - name: "Toggle bold", - icon: "bold-glyph", - }, - { - id: "obsidian-editing-toolbar:editor:toggle-italics", - name: "Toggle italics", - icon: "italic-glyph", - }, - { - id: "obsidian-editing-toolbar:editor:toggle-strikethrough", - name: "Toggle strikethrough", - icon: "strikethrough-glyph", - }, - { - id: "obsidian-editing-toolbar:underline", - name: "Toggle underline", - icon: "underline-glyph", - }, - { - id: "obsidian-editing-toolbar:superscript", - name: "Toggle superscript", - icon: "superscript-glyph", - }, - { - id: "obsidian-editing-toolbar:subscript", - name: "Toggle subscript", - icon: "subscript-glyph", - }, - { - id: "obsidian-editing-toolbar:editor:toggle-code", - name: "Toggle code", - icon: "code-glyph", - }, - { - id: "obsidian-editing-toolbar:codeblock", - name: "Toggle codeblock", - icon: "codeblock-glyph", - }, - { - id: "obsidian-editing-toolbar:editor:toggle-blockquote", - name: "Toggle blockquote", - icon: "quote-glyph", - }, - { - id: 'obsidian-editing-toolbar:indent-list', - name: 'indent list', - icon: "indent-glyph" - }, - { - id: 'obsidian-editing-toolbar:undent-list', - name: 'unindent-list', - icon: "unindent-glyph" - - }, - { - id: 'obsidian-editing-toolbar:change-font-color', - name: 'Change font color[html]', - icon: `` - - }, - { - id: 'obsidian-editing-toolbar:change-background-color', - name: 'Change Backgroundcolor[html]', - icon: `` - - }, - { - id: "obsidian-editing-toolbar:fullscreen-focus", - name: "Fullscreen focus mode", - icon: "fullscreen" - }, - { - id: "obsidian-editing-toolbar:workplace-fullscreen-focus", - name: "workplace-Fullscreen ", - icon: "remix-SplitCellsHorizontal" - }, - ], - appendMethod: "workspace", - shouldShowMenuOnSelect: false, - cMenuVisibility: true, - cMenuBottomValue: 4.25, - cMenuNumRows: 12, - cMenuWidth: 300, - cMenuFontColor: "#2DC26B", - cMenuBackgroundColor: "#d3f8b6" -}; diff --git a/.obsidian/plugins/obsidian-editing-toolbar/src/settings/settingsTab.ts b/.obsidian/plugins/obsidian-editing-toolbar/src/settings/settingsTab.ts deleted file mode 100644 index 018abdf..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/src/settings/settingsTab.ts +++ /dev/null @@ -1,466 +0,0 @@ -import type cMenuToolbarPlugin from "src/plugin/main"; -import { CommandPicker,ChooseFromIconList, ChangeCmdname } from "src/modals/suggesterModals"; -import { App, Setting, PluginSettingTab, Command } from "obsidian"; -import { APPEND_METHODS, AESTHETIC_STYLES, POSITION_STYLES } from "src/settings/settingsData"; -import { selfDestruct, cMenuToolbarPopover, checksvg } from "src/modals/cMenuToolbarModal"; -import Sortable from "sortablejs"; -import { debounce } from "obsidian"; -import { GenNonDuplicateID } from "src/util/util"; -import { t } from 'src/translations/helper'; - -export function getComandindex(item: any,arr: any[]):number -{ - let idx; - arr.forEach((el,index) => { - if (el.id === item) { - idx =index; - } - }); - return idx; -} - -export class cMenuToolbarSettingTab extends PluginSettingTab { - plugin: cMenuToolbarPlugin; - appendMethod: string; - - constructor(app: App, plugin: cMenuToolbarPlugin) { - super(app, plugin); - this.plugin = plugin; - addEventListener("cMenuToolbar-NewCommand", () => { - selfDestruct(); - cMenuToolbarPopover(app, this.plugin); - this.display(); - }); - } - - display(): void { - const { containerEl } = this; - containerEl.empty(); - containerEl.createEl("h1", { text: "Obsidian Editing Toolbar" }); - containerEl.createEl("span", { text: " 原创: " }).createEl("a", { - text: "Chetachi 👩🏽‍💻", - href: "https://github.com/chetachiezikeuzor", - }); - containerEl.createEl("span", { text: " 修改者: " }).createEl("a", { - text: "Cuman ✨", - href: "https://github.com/cumany", - }); - containerEl.createEl("h2", { text: t("Plugin Settings") }); - new Setting(containerEl) - .setName(t('Editing Toolbar append method')) - .setDesc( - t('Choose where Editing Toolbar will append upon regeneration. To see the change, hit the refresh button below, or in the status bar menu.') - ) - .addDropdown((dropdown) => { - let methods: Record = {}; - APPEND_METHODS.map((method) => (methods[method] = method)); - dropdown.addOptions(methods); - dropdown - .setValue(this.plugin.settings.appendMethod) - .onChange((appendMethod) => { - this.plugin.settings.appendMethod = appendMethod; - this.plugin.saveSettings(); - }); - }); - new Setting(containerEl) - .setName(t('Editing Toolbar aesthetic') - ) - .setDesc( - t('Choose between a glass morphism ,tiny and default style for Editing Toolbar. To see the change, hit the refresh button below, or in the status bar menu.') - ) - .addDropdown((dropdown) => { - let aesthetics: Record = {}; - AESTHETIC_STYLES.map( - (aesthetic) => (aesthetics[aesthetic] = aesthetic) - ); - dropdown.addOptions(aesthetics); - dropdown - .setValue(this.plugin.settings.aestheticStyle) - .onChange((aestheticStyle: string) => { - this.plugin.settings.aestheticStyle = aestheticStyle; - this.plugin.saveSettings(); - }); - }); - new Setting(containerEl) - .setName(t('Editing Toolbar position') - ) - .setDesc(t('Choose between fixed position or cursor following mode.') - ) - .addDropdown((dropdown) => { - let posotions: Record = {}; - POSITION_STYLES.map((posotion: string) => (posotions[posotion] = posotion)); - dropdown.addOptions(posotions); - dropdown - .setValue(this.plugin.settings.positionStyle) - .onChange((positionStyle: string) => { - this.plugin.settings.positionStyle = positionStyle; - this.plugin.saveSettings(); - dispatchEvent(new Event("cMenuToolbar-NewCommand")); - }); - }); - new Setting(containerEl) - .setName(t('Editing Toolbar columns') - ) - .setDesc( - t('Choose the number of columns per row to display on Editing Toolbar. To see the change, hit the refresh button below, or in the status bar menu.') - ) - .addSlider((slider) => { - slider - .setLimits(1, 32, 1) - .setValue(this.plugin.settings.cMenuNumRows) - .onChange( - debounce( - async (value: number) => { - this.plugin.settings.cMenuNumRows = value; - await this.plugin.saveSettings(); - }, - 100, - true - ) - ) - .setDynamicTooltip(); - }); - new Setting(containerEl) - .setName(t('Editing Toolbar refresh') - ) - .setDesc( - t("Editing Toolbar will only refresh automatically after you have either added or deleted a command from it. To see UI changes to cMenuToolbar (above settings changes) use the refresh button. If you forget to refresh in settings, no worries. There is also a refresh button in the cMenuToolbar status bar menu.") - ) - .addButton((reloadButton) => { - reloadButton - .setIcon("cMenuToolbarReload") - .setClass("cMenuToolbarSettingsButton") - .setClass("cMenuToolbarSettingsButtonRefresh") - .setTooltip(t("Refresh")) - .onClick(() => { - setTimeout(() => { - dispatchEvent(new Event("cMenuToolbar-NewCommand")); - }, 100); - console.log(`%ccMenuToolbar refreshed`, "color: Violet"); - }); - }); - new Setting(containerEl) - .setName(t('Editing Toolbar commands') - ) - .setDesc( - t("Add a command onto Editing Toolbar from Obsidian's commands library. To reorder the commands, drag and drop the command items. To delete them, use the delete buttom to the right of the command item. Editing Toolbar will not automaticaly refresh after reordering commands. Use the refresh button above.") - ) - .addButton((addButton) => { - addButton - .setIcon("cMenuToolbarAdd") - .setTooltip(t("Add")) - .setClass("cMenuToolbarSettingsButton") - .setClass("cMenuToolbarSettingsButtonAdd") - .onClick(() => { - new CommandPicker(this.plugin).open(); - setTimeout(() => { - dispatchEvent(new Event("cMenuToolbar-NewCommand")); - }, 100); - }); - }); - const cMenuToolbarCommandsContainer = containerEl.createEl("div", { - cls: "cMenuToolbarSettingsTabsContainer", - }); - let dragele = ""; - Sortable.create(cMenuToolbarCommandsContainer, { - group: "item", - animation: 500, - draggable: ".setting-item", - ghostClass: "sortable-ghost", - chosenClass: "sortable-chosen", - dragClass: "sortable-drag", - dragoverBubble: false, - forceFallback: true, - fallbackOnBody: true, - swapThreshold: 0.7, - fallbackClass: "sortable-fallback", - easing: "cubic-bezier(1, 0, 0, 1)", - onSort: (command) => { - if (command.from.className === command.to.className) { - const arrayResult = this.plugin.settings.menuCommands; - const [removed] = arrayResult.splice(command.oldIndex, 1) - arrayResult.splice(command.newIndex, 0, removed); - this.plugin.saveSettings(); - } - setTimeout(() => { - dispatchEvent(new Event("cMenuToolbar-NewCommand")); - }, 300); - }, - onStart: function (evt) { - dragele = evt.item.className; - }, - - }); - - - this.plugin.settings.menuCommands.forEach((newCommand, index) => { - const setting = new Setting(cMenuToolbarCommandsContainer) - - if ("SubmenuCommands" in newCommand) { - - setting.settingEl.setAttribute("data-id", newCommand.id) - setting - .setClass("cMenuToolbarCommandItem") - .setClass("cMenuToolbarCommandsubItem") - .setName(newCommand.name) - .addButton((addicon) => { - addicon - .setClass("cMenuToolbarSettingsIcon") - .onClick(async() => { - new ChooseFromIconList(this.plugin, newCommand, false).open(); - }); - checksvg(newCommand.icon) ? addicon.buttonEl.innerHTML = newCommand.icon : addicon.setIcon(newCommand.icon) - }) - .addButton((deleteButton) => { - deleteButton - .setIcon("cMenuToolbarDelete") - .setTooltip(t("Delete")) - .setClass("cMenuToolbarSettingsButton") - .setClass("cMenuToolbarSettingsButtonDelete") - .onClick(async() => { - this.plugin.settings.menuCommands.remove(newCommand); - await this.plugin.saveSettings(); - this.display(); - setTimeout(() => { - dispatchEvent(new Event("cMenuToolbar-NewCommand")); - }, 100); - console.log(`%cCommand '${newCommand.name}' was removed from cMenuToolbar`, "color: #989cab"); - }); - }); - - - if (newCommand.id == "cMenuToolbar-plugin:change-font-color") return; //修改字体颜色指令单独处理 - if (newCommand.id == "cMenuToolbar-plugin:change-background-color") return; //修改字体颜色指令单独处理 - - const cMenuToolbarCommandsContainer_sub = setting.settingEl.createEl("div", { - cls: "cMenuToolbarSettingsTabsContainer_sub", - }); - Sortable.create(cMenuToolbarCommandsContainer_sub, { - group: { - name: "item", - pull: true, - put: function () { - if (dragele.includes("cMenuToolbarCommandsubItem")) - return false; - else return true; - } - - }, - draggable: ".setting-item", - animation: 150, - ghostClass: "sortable-ghost", - chosenClass: "sortable-chosen", - dragClass: "sortable-drag", - dragoverBubble: false, - fallbackOnBody: true, - swapThreshold: 0.7, - forceFallback: true, - fallbackClass: "sortable-fallback", - easing: "cubic-bezier(1, 0, 0, 1)", - onStart: function (evt) { - // console.log(evt); - }, - onSort: (command) => { - - - if (command.from.className === command.to.className) { - - const arrayResult = this.plugin.settings.menuCommands; - const subresult = arrayResult[index]?.SubmenuCommands; - - - if (subresult) { - - const [removed] = subresult.splice(command.oldIndex, 1); - subresult.splice(command.newIndex, 0, removed); - this.plugin.saveSettings(); - } - } else - if (command.to.className === "cMenuToolbarSettingsTabsContainer") { - - const arrayResult = this.plugin.settings.menuCommands; - let cmdindex = getComandindex(command.path[1].dataset["id"], arrayResult); - - const subresult = arrayResult[cmdindex]?.SubmenuCommands; - - - const [removed] = subresult.splice(command.oldIndex, 1); - arrayResult.splice(command.newIndex, 0, removed); - this.plugin.saveSettings(); - } else - if (command.from.className === "cMenuToolbarSettingsTabsContainer") { - - - const arrayResult = this.plugin.settings.menuCommands; - - let cmdindex = getComandindex(command.path[1].dataset["id"], arrayResult); - - const subresult = arrayResult[cmdindex]?.SubmenuCommands; - const [removed] = arrayResult.splice(command.oldIndex, 1); - subresult.splice(command.newIndex, 0, removed); - this.plugin.saveSettings(); - } - setTimeout(() => { - dispatchEvent(new Event("cMenuToolbar-NewCommand")); - }, 300); - - }, - - }); - - - - newCommand.SubmenuCommands.forEach((subCommand: Command) => { - const subsetting = new Setting(cMenuToolbarCommandsContainer_sub) - - subsetting - .setClass("cMenuToolbarCommandItem") - .addButton((addicon) => { - addicon - .setClass("cMenuToolbarSettingsIcon") - .onClick(async()=> { - new ChooseFromIconList(this.plugin, subCommand, true).open(); - }); - - checksvg(subCommand?.icon) ? addicon.buttonEl.innerHTML = subCommand.icon : addicon.setIcon(subCommand.icon) - }) - .setName(subCommand.name) - .addButton((changename) => { - changename - .setIcon("pencil") - .setTooltip(t("Change Command name")) - .setClass("cMenuToolbarSettingsButton") - .onClick(async()=> { - new ChangeCmdname(this.app, this.plugin, subCommand, true).open(); - }); - }) - .addButton((deleteButton) => { - deleteButton - .setIcon("cMenuToolbarDelete") - .setTooltip(t("Delete")) - .setClass("cMenuToolbarSettingsButton") - .setClass("cMenuToolbarSettingsButtonDelete") - .onClick(async()=> { - newCommand.SubmenuCommands.remove(subCommand); - await this.plugin.saveSettings(); - this.display(); - setTimeout(() => { - dispatchEvent(new Event("cMenuToolbar-NewCommand")); - }, 100); - console.log(`%cCommand '${newCommand.name}' was removed from cMenuToolbar`, "color: #989cab"); - }); - }); - subsetting.nameEl; - }); - } else { - setting - .addButton((addicon) => { - addicon - // .setIcon(newCommand.icon) - .setClass("cMenuToolbarSettingsIcon") - .onClick(async()=> { - new ChooseFromIconList(this.plugin, newCommand, false).open(); - }); - checksvg(newCommand.icon) ? addicon.buttonEl.innerHTML = newCommand.icon : addicon.setIcon(newCommand.icon) - }) - - if (newCommand.id == "cMenuToolbar-Divider-Line") setting.setClass("cMenuToolbar-Divider-Line") - setting - .setClass("cMenuToolbarCommandItem") - .setName(newCommand.name) - .addButton((changename) => { - changename - .setIcon("pencil") - .setTooltip(t("Change Command name")) - .setClass("cMenuToolbarSettingsButton") - .onClick(async()=> { - new ChangeCmdname(this.app, this.plugin, newCommand, false).open(); - }); - }) - .addButton((addsubButton) => { - addsubButton - .setIcon("cMenuToolbarSub") - .setTooltip(t("Add submenu")) - .setClass("cMenuToolbarSettingsButton") - .setClass("cMenuToolbarSettingsButtonaddsub") - .onClick(async()=> { - const submenu = - { id: "SubmenuCommands-" + GenNonDuplicateID(1), name: "submenu", icon: "remix-Filter3Line", SubmenuCommands: [] }; - this.plugin.settings.menuCommands.splice(index + 1, 0, submenu); - await this.plugin.saveSettings(); - this.display(); - setTimeout(() => { - dispatchEvent(new Event("cMenuToolbar-NewCommand")); - }, 100); - console.log(`%cCommand '${submenu.id}' add `, "color: #989cab"); - }); - }) - .addButton((addsubButton) => { - addsubButton - .setIcon("vertical-split") - .setTooltip(t("add hr")) - .setClass("cMenuToolbarSettingsButton") - .setClass("cMenuToolbarSettingsButtonaddsub") - .onClick(async()=> { - const dividermenu = - { id: "cMenuToolbar-Divider-Line", name: "HR", icon: "vertical-split" }; - this.plugin.settings.menuCommands.splice(index + 1, 0, dividermenu); - await this.plugin.saveSettings(); - this.display(); - setTimeout(() => { - dispatchEvent(new Event("cMenuToolbar-NewCommand")); - }, 100); - - }); - }) - .addButton((deleteButton) => { - deleteButton - .setIcon("cMenuToolbarDelete") - .setTooltip(t("Delete")) - .setClass("cMenuToolbarSettingsButton") - .setClass("cMenuToolbarSettingsButtonDelete") - .onClick(async()=> { - this.plugin.settings.menuCommands.remove(newCommand); - await this.plugin.saveSettings(); - this.display(); - setTimeout(() => { - dispatchEvent(new Event("cMenuToolbar-NewCommand")); - }, 100); - console.log(`%cCommand '${newCommand.name}' was removed from cMenuToolbar`, "color: #989cab"); - }); - }); - - - } - // setting.nameEl; - }); - - const cDonationDiv = containerEl.createEl("div", { - cls: "cDonationSection", - }); - - const credit = createEl("p"); - const donateText = createEl("p"); - donateText.appendText( - "If you like this Plugin and are considering donating to support continued development, use the button below!" - ); - credit.setAttribute("style", "color: var(--text-muted)"); - cDonationDiv.appendChild(donateText); - cDonationDiv.appendChild(credit); - - cDonationDiv.appendChild( - createDonateButton("https://www.buymeacoffee.com/cuman") - ); - } -} - -const createDonateButton = (link: string): HTMLElement => { - const a = createEl("a"); - a.setAttribute("href", link); - a.addClass("buymeacoffee-img"); - a.innerHTML = ``; - return a; -}; - - - diff --git a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/helper.ts b/.obsidian/plugins/obsidian-editing-toolbar/src/translations/helper.ts deleted file mode 100644 index 805f071..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/helper.ts +++ /dev/null @@ -1,59 +0,0 @@ -// Code from https://github.com/valentine195/obsidian-admonition/blob/master/src/lang/helpers.ts - -import { moment } from 'obsidian'; - -import ar from './locale/ar'; -import cz from './locale/cz'; -import da from './locale/da'; -import de from './locale/de'; -import en from './locale/en'; -import enGB from './locale/en-gb'; -import es from './locale/es'; -import fr from './locale/fr'; -import hi from './locale/hi'; -import id from './locale/id'; -import it from './locale/it'; -import ja from './locale/ja'; -import ko from './locale/ko'; -import nl from './locale/nl'; -import no from './locale/no'; -import pl from './locale/pl'; -import pt from './locale/pt'; -import ptBR from './locale/pt-br'; -import ro from './locale/ro'; -import ru from './locale/ru'; -import tr from './locale/tr'; -import zhCN from './locale/zh-cn'; -import zhTW from './locale/zh-tw'; - -const localeMap: { [k: string]: Partial } = { - ar, - cs: cz, - da, - de, - en, - 'en-gb': enGB, - es, - fr, - hi, - id, - it, - ja, - ko, - nl, - nn: no, - pl, - pt, - 'pt-br': ptBR, - ro, - ru, - tr, - 'zh-cn': zhCN, - 'zh-tw': zhTW, -}; - -const locale = localeMap[moment.locale()]; - -export function t(str: keyof typeof en): string { - return (locale && locale[str]) || en[str]; -} diff --git a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/ar.ts b/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/ar.ts deleted file mode 100644 index fdcaab2..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/ar.ts +++ /dev/null @@ -1,3 +0,0 @@ -// العربية - -export default {}; diff --git a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/cz.ts b/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/cz.ts deleted file mode 100644 index 6ab53ab..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/cz.ts +++ /dev/null @@ -1,3 +0,0 @@ -// čeština - -export default {}; diff --git a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/da.ts b/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/da.ts deleted file mode 100644 index 68f85af..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/da.ts +++ /dev/null @@ -1,3 +0,0 @@ -// Dansk - -export default {}; diff --git a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/de.ts b/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/de.ts deleted file mode 100644 index 9318633..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/de.ts +++ /dev/null @@ -1,3 +0,0 @@ -// Deutsch - -export default {}; diff --git a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/en-gb.ts b/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/en-gb.ts deleted file mode 100644 index 3678622..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/en-gb.ts +++ /dev/null @@ -1,3 +0,0 @@ -// British English - -export default {}; diff --git a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/en.ts b/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/en.ts deleted file mode 100644 index 6cd8b5d..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/en.ts +++ /dev/null @@ -1,35 +0,0 @@ -export default { -'Editing Toolbar append method':'Editing Toolbar append method', -'Choose where Editing Toolbar will append upon regeneration. To see the change, hit the refresh button below, or in the status bar menu.':'Choose where Editing Toolbar will append upon regeneration. To see the change, hit the refresh button below, or in the status bar menu.', -'Editing Toolbar aesthetic':'Editing Toolbar aesthetic', -'Choose between a glass morphism ,tiny and default style for Editing Toolbar. To see the change, hit the refresh button below, or in the status bar menu.':'Choose between a glass morphism ,tiny and default style for Editing Toolbar. To see the change, hit the refresh button below, or in the status bar menu.', -'Editing Toolbar position':'Editing Toolbar position', -'Choose between fixed position or cursor following mode.':'Choose between fixed position or cursor following mode.', -'Editing Toolbar columns':'Editing Toolbar columns', -'Choose the number of columns per row to display on Editing Toolbar. To see the change, hit the refresh button below, or in the status bar menu.':'Choose the number of columns per row to display on Editing Toolbar. To see the change, hit the refresh button below, or in the status bar menu.', -'Editing Toolbar refresh':'Editing Toolbar refresh', -'Editing Toolbar commands':'Editing Toolbar commands', -"Add a command onto Editing Toolbar from Obsidian's commands library. To reorder the commands, drag and drop the command items. To delete them, use the delete buttom to the right of the command item. Editing Toolbar will not automaticaly refresh after reordering commands. Use the refresh button above.":"Add a command onto Editing Toolbar from Obsidian's commands library. To reorder the commands, drag and drop the command items. To delete them, use the delete buttom to the right of the command item. Editing Toolbar will not automaticaly refresh after reordering commands. Use the refresh button above.", -'Format Brush Off!':'Format Brush Off!', -'Hide & Show':'Hide & Show', -'Editing Toolbar will only refresh automatically after you have either added or deleted a command from it. To see UI changes to cMenuToolbar (above settings changes) use the refresh button. If you forget to refresh in settings, no worries. There is also a refresh button in the cMenuToolbar status bar menu.':'Editing Toolbar will only refresh automatically after you have either added or deleted a command from it. To see UI changes to cMenuToolbar (above settings changes) use the refresh button. If you forget to refresh in settings, no worries. There is also a refresh button in the cMenuToolbar status bar menu.', -'Font-Color formatting brush ON!':'Font-Color formatting brush ON!', -'More':'More', -'Font Colors':'Font Colors', -'Format Brush':'Format Brush', -'Background color':'Background color', -'Refresh':'Refresh', -'Add':'Add', -'Delete':'Delete', -'Change Command name':'Change Command name', -'Add submenu':'Add submenu', -'add hr':'add hr', -'Enter the icon code, it looks like .... format':'Enter the icon code, it looks like .... format', -'Please enter a new name:':'Please enter a new name:', -'Drag the slider to move the position':'Drag the slider to move the position', -'Plugin Settings':'Plugin Settings', -'Background-color formatting brush ON!':'Background-color formatting brush ON!', -'Clear formatting brush ON!':'Clear formatting brush ON!', -'Clear formatting brush ON!\nClick the mouse middle or right key to close the formatting-brush':'Clear formatting brush ON!\nClick the mouse middle or right key to close the formatting-brush', - -}; diff --git a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/es.ts b/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/es.ts deleted file mode 100644 index cc4ce68..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/es.ts +++ /dev/null @@ -1,3 +0,0 @@ -// Español - -export default {}; diff --git a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/fr.ts b/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/fr.ts deleted file mode 100644 index ff8b4c5..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/fr.ts +++ /dev/null @@ -1 +0,0 @@ -export default {}; diff --git a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/hi.ts b/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/hi.ts deleted file mode 100644 index ed2bf66..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/hi.ts +++ /dev/null @@ -1,3 +0,0 @@ -// हिन्दी - -export default {}; diff --git a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/id.ts b/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/id.ts deleted file mode 100644 index b431a6f..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/id.ts +++ /dev/null @@ -1,3 +0,0 @@ -// Bahasa Indonesia - -export default {}; diff --git a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/it.ts b/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/it.ts deleted file mode 100644 index fb9329e..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/it.ts +++ /dev/null @@ -1,3 +0,0 @@ -// Italiano - -export default {}; diff --git a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/ja.ts b/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/ja.ts deleted file mode 100644 index 2a2e485..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/ja.ts +++ /dev/null @@ -1,3 +0,0 @@ -// 日本語 - -export default {}; diff --git a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/ko.ts b/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/ko.ts deleted file mode 100644 index 74bfc3a..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/ko.ts +++ /dev/null @@ -1,3 +0,0 @@ -// 한국어 - -export default {}; diff --git a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/nl.ts b/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/nl.ts deleted file mode 100644 index f6acbd3..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/nl.ts +++ /dev/null @@ -1,3 +0,0 @@ -// Nederlands - -export default {}; diff --git a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/no.ts b/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/no.ts deleted file mode 100644 index 0739bc4..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/no.ts +++ /dev/null @@ -1,3 +0,0 @@ -// Norsk - -export default {}; diff --git a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/pl.ts b/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/pl.ts deleted file mode 100644 index caed52b..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/pl.ts +++ /dev/null @@ -1,3 +0,0 @@ -// język polski - -export default {}; diff --git a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/pt-br.ts b/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/pt-br.ts deleted file mode 100644 index ff8b4c5..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/pt-br.ts +++ /dev/null @@ -1 +0,0 @@ -export default {}; diff --git a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/pt.ts b/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/pt.ts deleted file mode 100644 index ff8b4c5..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/pt.ts +++ /dev/null @@ -1 +0,0 @@ -export default {}; diff --git a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/ro.ts b/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/ro.ts deleted file mode 100644 index 4ea9cae..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/ro.ts +++ /dev/null @@ -1,3 +0,0 @@ -// Română - -export default {}; diff --git a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/ru.ts b/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/ru.ts deleted file mode 100644 index 7b0f002..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/ru.ts +++ /dev/null @@ -1,3 +0,0 @@ -// русский - -export default {}; diff --git a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/tr.ts b/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/tr.ts deleted file mode 100644 index d1db79b..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/tr.ts +++ /dev/null @@ -1,3 +0,0 @@ -// Türkçe - -export default {}; diff --git a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/zh-cn.ts b/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/zh-cn.ts deleted file mode 100644 index 570839c..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/zh-cn.ts +++ /dev/null @@ -1,36 +0,0 @@ -export default { - // setting.ts - 'Editing Toolbar append method': '工具栏的附加方法。', - 'Choose where Editing Toolbar will append upon regeneration. To see the change, hit the refresh button below, or in the status bar menu.': '工具栏在Obsidian中的追加的位置,只对固定和跟随模式有效。如果你遇到工具栏显示问题,可以选择body试试。请点击下面或者状态栏菜单中的刷新按钮生效。', - 'Editing Toolbar aesthetic': '工具栏样式', - 'Choose between a glass morphism ,tiny and default style for Editing Toolbar. To see the change, hit the refresh button below, or in the status bar menu.': '样式有毛玻璃,简约和默认风格选择。请点击下面或者状态栏菜单中的刷新按钮生效。', - 'Editing Toolbar position': '工具栏位置', - 'Choose between fixed position or cursor following mode.': '在固定位置,光标跟随模式或者置顶模式之间进行选择。', - 'Editing Toolbar columns': '工具栏栏目数', - 'Choose the number of columns per row to display on Editing Toolbar. To see the change, hit the refresh button below, or in the status bar menu.': '选择在Editing Toolbar上显示的每行的列数。', - 'Editing Toolbar refresh': '刷新工具栏', - 'Editing Toolbar commands': '在工具栏中添加命令', - "Add a command onto Editing Toolbar from Obsidian's commands library. To reorder the commands, drag and drop the command items. To delete them, use the delete buttom to the right of the command item. Editing Toolbar will not automaticaly refresh after reordering commands. Use the refresh button above.": '从Obsidian的命令库中添加一个命令到工具栏。要重新排列命令,可以拖放命令项。要删除它们,请使用命令项右边的删除按钮。图标选择Custom可以自定义图标', - 'Format Brush Off!': '关闭格式刷!', - 'Hide & Show': '隐藏 & 显示', - 'Editing Toolbar will only refresh automatically after you have either added or deleted a command from it. To see UI changes to cMenuToolbar (above settings changes) use the refresh button. If you forget to refresh in settings, no worries. There is also a refresh button in the cMenuToolbar status bar menu.': '对外观的更改生效需要使用刷新按钮。如果你忘记在设置中刷新,在状态栏菜单中也有一个刷新按钮。', - 'Font-Color formatting brush ON!': '字体颜色格式刷开启!', - 'More': '更多', - 'Font Colors': '字体颜色', - 'Format Brush': '格式刷', - 'Background color': '背景颜色', - 'Refresh': '刷新', - 'Add': '添加', - 'Delete': '删除', - 'Change Command name': '更改命令名称', - 'Add submenu': '添加子菜单', - 'add hr': '添加分割线', - 'Enter the icon code, it looks like .... format': '输入图标代码,类似.... 格式', - 'Please enter a new name:': '请输入新名称:', - 'Drag the slider to move the position': '拖动滑块来移动位置', - 'Plugin Settings': '插件设置', - 'Background-color formatting brush ON!':'开启背景色格式刷', - 'Clear formatting brush ON!':'清除格式刷已开启', - 'Clear formatting brush ON!\nClick the mouse middle or right key to close the formatting-brush':'清除格式刷已开启\n点击鼠标中键或者右键关闭格式刷', - -}; diff --git a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/zh-tw.ts b/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/zh-tw.ts deleted file mode 100644 index 0b7c4b6..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/src/translations/locale/zh-tw.ts +++ /dev/null @@ -1,3 +0,0 @@ -// 繁體中文 - -export default {}; diff --git a/.obsidian/plugins/obsidian-editing-toolbar/src/util/cmenuGlobal.d.ts b/.obsidian/plugins/obsidian-editing-toolbar/src/util/cmenuGlobal.d.ts deleted file mode 100644 index 04b5b27..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/src/util/cmenuGlobal.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -export { } - -declare global { - interface Window { - ISMORE: boolean ; - isBgC: boolean ; - isCTxt: boolean ; - isText: boolean ; - newNotice: any; -} -} - - diff --git a/.obsidian/plugins/obsidian-editing-toolbar/src/util/fullscreen.ts b/.obsidian/plugins/obsidian-editing-toolbar/src/util/fullscreen.ts deleted file mode 100644 index f0e5452..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/src/util/fullscreen.ts +++ /dev/null @@ -1,131 +0,0 @@ -import { App,MarkdownView,requireApiVersion } from "obsidian"; -let activeDocument: Document; -export function workplacefullscreenMode(app: App) -{ - requireApiVersion("0.15.0")?activeDocument=activeWindow.document:activeDocument=window.document; - let rightleaf= activeDocument.body?.querySelector(" .mod-right-split.is-collapsed"); - let leftleaf= activeDocument.body?.querySelector(" .mod-left-split.is-collapsed"); - if(rightleaf&&!leftleaf) //@ts-ignore - app.commands.executeCommandById("app:toggle-left-sidebar"); - if(!rightleaf&&leftleaf) //@ts-ignore - app.commands.executeCommandById("app:toggle-right-sidebar"); - if(!rightleaf&&!leftleaf||rightleaf&&leftleaf) { - - //@ts-ignore - app.commands.executeCommandById("app:toggle-left-sidebar"); - //@ts-ignore - app.commands.executeCommandById("app:toggle-right-sidebar")} - - -} - - -//full screen mode -export function fullscreenMode(app: App) { - const leaf = app.workspace.getActiveViewOfType(MarkdownView) - if (!leaf) - return; - let el = leaf.containerEl ; - let fullscreenMutationObserver: MutationObserver; - fullscreenMutationObserver = new MutationObserver(function (mutationRecords) { - mutationRecords.forEach(function (mutationRecord) { - mutationRecord.addedNodes.forEach(function (node) { - if(isFull(el)){ - try{ - document.body.removeChild(node); - el.appendChild(node); - }catch (error) - { - console.log(error.message) - } - - }else - { - return; - } - }); - }); - - }); - el.addEventListener("fullscreenchange", function (event: any) { - if (!isFull(el)) { - fullscreenMutationObserver.disconnect(); - } - }); - if(isFull(el)) - { - fullscreenMutationObserver.disconnect(); - - exitFull() - - }else - { - - beFull(el) - fullscreenMutationObserver.observe(document.body, { childList: true }); - - } -} - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.toggleFull = exports.isFull = exports.exitFull = exports.beFull = void 0; -let DOC_EL = document.documentElement; -let headEl = DOC_EL.querySelector('head'); -let styleEl = document.createElement('style'); -let TYPE_REQUEST_FULL_SCREEN = 'requestFullscreen'; -let TYPE_EXIT_FULL_SCREEN = 'exitFullscreen'; -let TYPE_FULL_SCREEN_ELEMENT = 'fullscreenElement'; -let TYPE_ON_FULL_SCREEN_CHANGE = 'onfullscreenchange'; -if ("webkitRequestFullScreen" in DOC_EL) { - TYPE_REQUEST_FULL_SCREEN = 'webkitRequestFullScreen'; - TYPE_EXIT_FULL_SCREEN = 'webkitExitFullscreen'; - TYPE_FULL_SCREEN_ELEMENT = 'webkitFullscreenElement'; - TYPE_ON_FULL_SCREEN_CHANGE = 'onwebkitfullscreenchange'; -} -else if ("msRequestFullscreen" in DOC_EL) { - TYPE_REQUEST_FULL_SCREEN = 'msRequestFullscreen'; - TYPE_EXIT_FULL_SCREEN = 'msExitFullscreen'; - TYPE_FULL_SCREEN_ELEMENT = 'msFullscreenElement'; - TYPE_ON_FULL_SCREEN_CHANGE = 'MSFullscreenChange'; -} -else if ("mozRequestFullScreen" in DOC_EL) { - TYPE_REQUEST_FULL_SCREEN = 'mozRequestFullScreen'; - TYPE_EXIT_FULL_SCREEN = 'mozCancelFullScreen'; - TYPE_FULL_SCREEN_ELEMENT = 'mozFullScreenElement'; - TYPE_ON_FULL_SCREEN_CHANGE = 'onmozfullscreenchange'; -} -else if (!("requestFullscreen" in DOC_EL)) { - throw "\u5F53\u524D\u6D4F\u89C8\u5668\u4E0D\u652F\u6301Fullscreen API !"; -} -function getCurrentElement(el: HTMLElement) { - return el instanceof HTMLElement ? el : DOC_EL; -} -function beFull(el: HTMLElement) { - - return getCurrentElement(el)[TYPE_REQUEST_FULL_SCREEN](); -} -exports.beFull = beFull; -function exitFull() { - if (DOC_EL.contains(styleEl)) { - headEl === null || headEl === void 0 ? void 0 : headEl.removeChild(styleEl); - } - return document[TYPE_EXIT_FULL_SCREEN](); -} -exports.exitFull = exitFull; -function isFull(el: any) { - return getCurrentElement(el) === document[TYPE_FULL_SCREEN_ELEMENT]; -} -exports.isFull = isFull; -function toggleFull(el: any) { - if (isFull(el)) { - exitFull(); - return false; - } - else { - beFull(el); - return true; - } -} -exports.toggleFull = toggleFull; - - diff --git a/.obsidian/plugins/obsidian-editing-toolbar/src/util/obsidian-ext.ts b/.obsidian/plugins/obsidian-editing-toolbar/src/util/obsidian-ext.ts deleted file mode 100644 index 4681efc..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/src/util/obsidian-ext.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Workspace, WorkspaceContainer, WorkspaceItem, WorkspaceParent, WorkspaceWindow } from 'obsidian'; - -export interface WorkspaceItemExt extends WorkspaceItem { - // the parent of the item - parentSplit: WorkspaceParentExt; - - // the container element - containerEl: HTMLElement; - - // the width of the item in pixels - width:number; -} - -// interface for extending WorkspaceParent with undocumented properties -export interface WorkspaceParentExt extends WorkspaceParent, WorkspaceItemExt, WorkspaceContainer { - // the child items of the split - children: WorkspaceItemExt[]; - - // function for child resizing - onChildResizeStart: (leaf: WorkspaceItemExt, event: MouseEvent) => void; - // ...and backup thereof - oldChildResizeStart: (leaf: WorkspaceItemExt, event: MouseEvent) => void; - - // split direction - direction: 'horizontal' | 'vertical'; -} - -export class WorkspaceExt extends Workspace { - floatingSplit: WorkspaceParentExt; -} \ No newline at end of file diff --git a/.obsidian/plugins/obsidian-editing-toolbar/src/util/statusBarConstants.ts b/.obsidian/plugins/obsidian-editing-toolbar/src/util/statusBarConstants.ts deleted file mode 100644 index cc78ecf..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/src/util/statusBarConstants.ts +++ /dev/null @@ -1,32 +0,0 @@ -import {requireApiVersion} from "obsidian" -let activeDocument: Document; -export const setMenuVisibility = (cMenuVisibility: boolean) => { - requireApiVersion("0.15.0")?activeDocument=activeWindow.document:activeDocument=window.document; - let cMenuToolbarModalBar = activeDocument.getElementById("cMenuToolbarModalBar"); - if (cMenuToolbarModalBar) { - cMenuVisibility == false - ? (cMenuToolbarModalBar.style.visibility = "hidden") - : (cMenuToolbarModalBar.style.visibility = "visible"); - } -}; - -export const setBottomValue = ( - settings: any -) => { - requireApiVersion("0.15.0")?activeDocument=activeWindow.document:activeDocument=window.document; - let cMenuToolbarModalBar = activeDocument.getElementById("cMenuToolbarModalBar"); - if (cMenuToolbarModalBar) { - - if(settings.positionStyle == "top") - { - - cMenuToolbarModalBar.setAttribute("style", `position: relative; grid-template-columns: repeat(auto-fit, minmax(28px, 1fr));`); - cMenuToolbarModalBar.className +=" top"; - }else - { - cMenuToolbarModalBar.setAttribute("style", `left: calc(50% - calc(${cMenuToolbarModalBar.offsetWidth}px / 2)); bottom: ${settings.cMenuBottomValue}em; grid-template-columns: ${"1fr ".repeat(settings.cMenuNumRows)}`); - } -} - -}; - diff --git a/.obsidian/plugins/obsidian-editing-toolbar/src/util/util.ts b/.obsidian/plugins/obsidian-editing-toolbar/src/util/util.ts deleted file mode 100644 index d78ad5f..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/src/util/util.ts +++ /dev/null @@ -1,188 +0,0 @@ - - - -export async function wait(delay: number) { - return new Promise((resolve) => setTimeout(resolve, delay)); -} -// GenNonDuplicateID(3) 将生成类似 ix49wl2978w 的ID -export function GenNonDuplicateID(randomLength: number){ - let idStr = Date.now().toString(36) - idStr += Math.random().toString(36).substr(3,randomLength) - return idStr -} -export function findmenuID(plugin: { settings: { menuCommands: any; }; },command: { id: any; },issub: any){ - let index; - let res={"index":-1,"subindex":-1}; - let menucmd=plugin.settings.menuCommands - if(issub) - { - menucmd.forEach((item: { SubmenuCommands: any[]; },idx: any) => { - if("SubmenuCommands" in item ) - { - index= item.SubmenuCommands.findIndex((v) => v.id== command.id); - if(index>=0) - { - res= {"index":idx,"subindex":index}; - return res; - } - } - }); - } - else - { - index= menucmd.findIndex((v: { id: any; }) => v.id== command.id); - res= {"index":index,"subindex":-1}; - } - return res; -} - - -export const colorpicker=`
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Theme Colors
Standard Colors
-
-
`; - - -export const backcolorpicker=`
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Translucent Colors
Highlighter Colors
-
-
`; diff --git a/.obsidian/plugins/obsidian-editing-toolbar/styles.css b/.obsidian/plugins/obsidian-editing-toolbar/styles.css deleted file mode 100644 index c55f004..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/styles.css +++ /dev/null @@ -1,846 +0,0 @@ - - -#cMenuToolbarModalBar { - width: auto; - height: auto; - padding: 3px; - display: grid; - user-select: none; - border-radius: 6px; - position: absolute; - transition: 200ms ease; - -webkit-transition: 200ms ease; - min-width: fit-content; - justify-content: space-around; - z-index: var(--layer-status-bar); - box-shadow: 0px 3px 32px rgb(31 38 135 / 15%); - border: 1px solid var(--background-modifier-border); -} -#cMenuToolbarModalBar.cMenuToolbarFlex { - display: flex; -} -#cMenuToolbarModalBar.cMenuToolbarFlex :is(.cMenuToolbarCommandItem,button[class^=cMenuToolbarCommandsubItem]) { - min-width: 20px; -} -#cMenuToolbarModalBar .cMenuToolbarCommandItem { - margin: 2px; - border: none; - display: flex; - cursor: pointer; - padding: 5px 6px; - box-shadow: none; - margin-left: 3px; - margin-right: 3px; - position: relative; - border-radius: 3px; - font-size: initial !important; - background-color: var(--background-primary-alt); -} - -#cMenuToolbarModalBar button.cMenuToolbarCommandItem:hover { - background-color: var(--background-secondary); -} - -/* #cMenuToolbarModalBar button.cMenuToolbarCommandItem svg { - width: 1.3em; - height: 1.3em; -} */ - -/*---------------------------------------------------------------- -cMenuToolbar SETTINGS BUTTONS -----------------------------------------------------------------*/ - -.modal.mod-settings - button:not(.mod-cta):not(.mod-warning).cMenuToolbarSettingsButton.cMenuToolbarSettingsButtonAdd, -button:not(.mod-cta):not(.mod-warning).cMenuToolbarSettingsButton.cMenuToolbarSettingsButtonAdd { - background-color: var(--interactive-accent); -} - -.modal.mod-settings - button:not(.mod-cta):not(.mod-warning).cMenuToolbarSettingsButton.cMenuToolbarSettingsButtonDelete, -button:not(.mod-cta):not(.mod-warning).cMenuToolbarSettingsButton.cMenuToolbarSettingsButtonDelete { - background-color: #989cab; -} - -.modal.mod-settings - button:not(.mod-cta):not(.mod-warning).cMenuToolbarSettingsButton.cMenuToolbarSettingsButtonRefresh, -button:not(.mod-cta):not(.mod-warning).cMenuToolbarSettingsButton.cMenuToolbarSettingsButtonRefresh { - background-color: var(--text-accent); -} - -button.cMenuToolbarSettingsButton { - padding: 4px 14px; - border-radius: 6px; -} - - - -/*---------------------------------------------------------------- -cMenuToolbar SETTING ITEMS -----------------------------------------------------------------*/ -.setting-item.cMenuToolbarCommandItem:first-child { - padding-top: 18px; -} - -.cMenuToolbarCommandItem { - cursor: grab; - padding: 18px 0 18px 0; -} - -.sortable-fallback { - cursor: grabbing; - box-shadow: 0px 3px 32px rgb(31 38 135 / 15%); -} - -.sortable-grab { - cursor: grabbing !important; -} - -.sortable-ghost { - opacity: 0.4; - cursor: grabbing; -} - -.sortable-chosen { - cursor: grabbing; - padding: 18px 0 18px 18px; - background-color: var(--background-primary); -} - -.sortable-drag { - cursor: grabbing; - box-shadow: 0px 3px 32px rgb(31 38 135 / 15%); -} - -.cMenuToolbarSettingsTabsContainer { - border-top: 1px solid var(--background-modifier-border); - border-bottom: 1px solid var(--background-modifier-border); -} - -/*---------------------------------------------------------------- -cMenuToolbar CLASS CHANGES -----------------------------------------------------------------*/ - -#cMenuToolbarModalBar.cMenuToolbarDefaultAesthetic -{ -border: 1px solid var(--background-modifier-border); -} -#cMenuToolbarModalBar.cMenuToolbarDefaultAesthetic:not(.top) :is(.cMenuToolbarCommandItem,button[class^=cMenuToolbarCommandsubItem]) -{ -min-height:28px ; -} -#cMenuToolbarModalBar.cMenuToolbarDefaultAesthetic:not(.top) button[class^=cMenuToolbarCommandsubItem] { - margin: auto; - padding: 6px; - - border: none; - background-color: transparent; - - place-items: center; - -} -.cMenuToolbarDefaultAesthetic { -background-color: var(--background-primary); -} - - -#cMenuToolbarModalBar.cMenuToolbarGlassAesthetic ,#cMenuToolbarModalBar.cMenuToolbarGlassAesthetic ~#cMenuToolbarPopoverBar { - backdrop-filter: blur(6px); - -webkit-backdrop-filter: blur(6px); - box-shadow:none; - background-color: transparent; -} - - #cMenuToolbarModalBar.cMenuToolbarGlassAesthetic:not(.top) button[class^=cMenuToolbarCommandsubItem] { - margin: auto; - padding: 0px; - box-shadow: none; - border: none; - display: flex; - border-radius: 3px; - font-size: 10px; - margin-right: 0px; - position: relative; - background-color: transparent; - place-items: center; - clear: both; - max-width: 28px; - max-height: 23px; - } - -/*---------------------------------------------------------------- -cMenuToolbar ICONS -----------------------------------------------------------------*/ - -.cMenuToolbarIconPick { - line-height: normal; - vertical-align: middle; - margin-right: 8px; -} - -.cMenuToolbarIconPick svg { - width: 17px; - height: 17px; -} - -/*---------------------------------------------------------------- -cMenuToolbar STATUS BAR MENU -----------------------------------------------------------------*/ - -.cMenuToolbar-statusbar-menu { - text-align: center; - width: 200px; -} - - -.cMenuToolbar-statusbar-menu .menu-item { - display: flex; - align-items: center; - flex-direction: row; -} - -.cMenuToolbar-statusbar-menu .menu-item.settings-item { - font-size: 12px; - text-align: center; - line-height: 1; - border-radius: 5px; - height: auto; - padding: 8px 5px 0px 5px; - margin: 0 auto; - width: fit-content; - color: var(--text-faint); -} - -.cMenuToolbar-statusbar-menu .menu-item.settings-item .menu-item-title { - text-align: center; -} - -.cMenuToolbar-statusbar-menu .menu-item:hover, -.cMenuToolbar-statusbar-menu .menu-item .selected:hover, -.cMenuToolbar-statusbar-menu .menu-item.selected:not(.is-disabled):not(.is-label) { - background-color: transparent; -} - -.cMenuToolbar-statusbar-menu .menu-item-title { - margin-right: 10px; -} - -.cMenuToolbar-statusbar-menu .slider { - width: 100%; -} - -.cMenuToolbar-statusbar-menu .menu-item.buttonitem { - padding-top: 10px; - padding-bottom: 4px; - height: fit-content; -} - -.cMenuToolbar-statusbar-menu .menu-item.buttonitem button.cMenuToolbarSettingsButton { - margin: 0; -} - -.cMenuToolbar-statusbar-menu .menu-item-icon svg path { - fill: var(--text-muted); -} -.cMenuToolbar-statusbar-menu .menu-item-icon svg { - stroke: var(--text-muted); -} -.cMenuToolbar-statusbar-menu > .menu-item:is([data-section="ButtonAdd"]) { - display: inline-flex; - padding: 0px 0px 5px 5px; - align-items: center; -} - -.cMenuToolbar-statusbar-menu > .menu-item { - display: inline-flex; - padding: 0px 0px 5px 5px; - align-items: center; -} -.cMenuToolbar-statusbar-menu > .menu-item:is([data-section="ButtonAdd"]) .menu-item-icon{ - text-align: center; -} - - -/*---------------------------------------------------------------- -cMenuToolbar STATUS BAR BUTTONS -----------------------------------------------------------------*/ - -.cMenuToolbar-statusbar-button { - cursor: pointer; - display: flex; - align-items: center; - line-height: 1; -} - -.cMenuToolbar-statusbar-button svg { - display: flex; - width: 1.3em; - height: 1.3em; -} - -/*---------------------------------------------------------------- -cMenuToolbar SUPPORT ----------------------------------------------`-------------------*/ - -.cDonationSection { - width: 60%; - height: 50vh; - margin: 0 auto; - text-align: center; - color: var(--text-normal); -} - - -#cMenuToolbarModalBar{ - align-items: center; - justify-items: center; - border: none; - backdrop-filter: none; -} - -#cMenuToolbarModalBar.cMenuToolbarGlassAesthetic .cMenuToolbarCommandItem{ - -background-color:#ffffff00; -} - -#cMenuToolbarModalBar.cMenuToolbarGlassAesthetic [class^=cMenuToolbarCommandsubItem]{ - - background-color:#ffffff00; - } -#cMenuToolbarModalBar .cMenuToolbarCommandItem{ - justify-content: center; - align-content: center; - place-items: center; - - } - - -/* #cMenuToolbarModalBar.cMenuToolbarTinyAesthetic .cMenuToolbarCommandItem svg{ - width: 1em; - height: 1em; - } */ - - - -div.modal-container.cMenuToolbar-Modal:not(.changename) .modal-bg -{ - background-color:transparent!important; - backdrop-filter: none!important; -position: relative; -} -.modal-container.cMenuToolbar-Modal:not(.changename) .modal { - padding: 10px 30px; - min-width: 130px; - position: absolute; - bottom: 2em; - right: 0.5em; - background-color: rgb(var(--background-primary-rgb),0.5); - backdrop-filter: blur(4px); -} -.modal-container.cMenuToolbar-Modal .modal-title -{ - display: none; -} - -.modal-container.cMenuToolbar-Modal .modal input[type='range'] { - width: 90%; - -} -body.theme-dark .modal-container.cMenuToolbar-Modal .modal input[type='range'] { - background-color: var(--background-secondary); -} -/*tiny 样式*/ -#cMenuToolbarModalBar.cMenuToolbarTinyAesthetic { - align-items: center; - justify-items: center; - border: none; - backdrop-filter: none; - background-color: var(--background-secondary); - box-shadow: 0 3px 6px -4px rgb(0 0 0 / 12%), 0 6px 16px 0 rgb(0 0 0 / 8%), 0 9px 28px 8px rgb(0 0 0 / 5%); - } - - - #cMenuToolbarModalBar.cMenuToolbarTinyAesthetic .cMenuToolbarCommandItem { - margin: auto; - padding: 0px; - box-shadow: none; - margin-left: 0px; - margin-right: 0px; - position: relative; - background-color:transparent; - backdrop-filter: blur(8px); - -webkit-backdrop-filter: blur(8px); - -} - #cMenuToolbarModalBar .cMenuToolbarCommandItem { - margin: auto; - - padding: 0px; - box-shadow: none; - - margin-left: 4px; - margin-right: 0px; - position: relative; - background-color:transparent; - backdrop-filter: blur(8px); - -webkit-backdrop-filter: blur(8px); - - } - - -:is(#cMenuToolbarModalBar).cMenuToolbarTinyAesthetic:not(.top) button[class^=cMenuToolbarCommandsubItem] { - margin: auto; - padding: 0px; - box-shadow: none; - border: none; - display: flex; - border-radius: 3px; -font-size: 10px; - margin-right: 0px; - position: relative; - background-color: transparent; - - place-items: center; - clear: both; - max-width: 28px; - max-height: 23px; - -} - button[class^=cMenuToolbarCommandsubItem]::after { - - content: url("data:image/svg+xml,%3Csvg width='4' height='4' version='1.1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1024 1024' enable-background='new 0 0 1024 1024' xml:space='preserve'%3E%3Cpath fill='%23666' d='M13.24 80.11 l461.75 560.8 q14.56 16.02 36.41 16.02 q21.85 0 36.42 -16.02 l463.2 -560.8 q10.2 -10.19 12.38 -24.75 q2.18 -14.57 -3.64 -27.68 q-5.82 -13.11 -18.21 -20.39 q-12.39 -7.29 -26.95 -7.29 l-924.95 0 q-20.4 0 -34.23 13.11 q-13.84 13.11 -15.29 32.77 q-1.46 19.66 13.11 34.23 Z'/%3E%3C/svg%3E"); - - margin-left: 1px; - margin-top:6px; - -} - - -:is(#cMenuToolbarModalBar,#cMenuToolbarPopoverBar) button[class^=cMenuToolbarCommandsubItem] >.subitem -{ - background-color: var(--background-primary); - border-radius: 4px; - border: 1px solid var(--background-modifier-border); - box-shadow: 0 2px 8px var(--background-modifier-box-shadow); - position: absolute; - z-index: var(--layer-menu); - user-select: none; - transform: translateY(90%) translateX(-40%); - -webkit-transform: translateY(90%) translateX(-40%); - display: flex; - -} -:is(#cMenuToolbarModalBar,#cMenuToolbarPopoverBar) button[class^=cMenuToolbarCommandsubItem] >.subitem svg -{ - max-width: 1.3em; - max-height: 1.3em; -} - -:is(#cMenuToolbarModalBar,#cMenuToolbarPopoverBar) button[class^=cMenuToolbarCommandsubItem] >.subitem button.menu-item -{ - background-color: var(--background-primary); - line-height:2em; - display: inline; -} - -:is(#cMenuToolbarModalBar,#cMenuToolbarPopoverBar) button[class^=cMenuToolbarCommandsubItem] >.subitem button:hover -{ - background-color: var(--interactive-hover); -} - - -:is(#cMenuToolbarModalBar,#cMenuToolbarPopoverBar) button[class^=cMenuToolbarCommandsubItem] >.subitem .menu-item { - - margin-right: 4px; - padding: 0px 4px 0px 4px; -} -:is(#cMenuToolbarModalBar,#cMenuToolbarPopoverBar) button[class^=cMenuToolbarCommandsubItem] >.subitem { - - visibility:hidden; - transition: all 0.3s linear; - -webkit-transition: all 0.3s linear; -} - - - - - -:is(#cMenuToolbarModalBar,#cMenuToolbarPopoverBar) button.cMenuToolbarCommandsubItem-font-color .triangle-icon -{ - position: absolute; - margin-left: 18px; - bottom: 8%; -background-size: 4px 4px; -background-image: url("data:image/svg+xml,%3Csvg width='4' height='4' version='1.1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1024 1024' enable-background='new 0 0 1024 1024' xml:space='preserve'%3E%3Cpath fill='%23666' d='M13.24 80.11 l461.75 560.8 q14.56 16.02 36.41 16.02 q21.85 0 36.42 -16.02 l463.2 -560.8 q10.2 -10.19 12.38 -24.75 q2.18 -14.57 -3.64 -27.68 q-5.82 -13.11 -18.21 -20.39 q-12.39 -7.29 -26.95 -7.29 l-924.95 0 q-20.4 0 -34.23 13.11 q-13.84 13.11 -15.29 32.77 q-1.46 19.66 13.11 34.23 Z'/%3E%3C/svg%3E"); - - width: 16px; - height: 20px; - background-position: center; - - background-repeat: no-repeat; - min-width: unset; - border-left: 2px solid transparent; - } - - :is(#cMenuToolbarModalBar,#cMenuToolbarPopoverBar):not(.top) button.cMenuToolbarCommandsubItem-font-color .triangle-icon - { - margin-left: 16px; - - } - - :is(#cMenuToolbarModalBar,#cMenuToolbarPopoverBar):not(.top) button.cMenuToolbarCommandsubItem-font-color .x-color-picker-wrapper -{ - top:auto; -bottom:calc(100% + 1em); -} - - -:is(#cMenuToolbarModalBar,#cMenuToolbarPopoverBar) button.cMenuToolbarCommandsubItem-font-color .subitem -{ - visibility:hidden; - transition: all 0.3s linear; - -webkit-transition: all 0.3s linear; - } - -:is(#cMenuToolbarModalBar,#cMenuToolbarPopoverBar) button.cMenuToolbarCommandsubItem-font-color .subitem:hover { - visibility:visible; - transition: all 0.3s linear; - -webkit-transition: all 0.3s linear; - } - - -:is(#cMenuToolbarModalBar,#cMenuToolbarPopoverBar) button[class^=cMenuToolbarCommandsubItem]:hover >.subitem { - - visibility:visible; - transition: all 0.3s linear; - -webkit-transition: all 0.3s linear; -} -:is(#cMenuToolbarModalBar,#cMenuToolbarPopoverBar) button[class^=cMenuToolbarCommandsubItem] >.subitem:hover { - visibility:visible; - transition: all 0.3s linear; - -webkit-transition: all 0.3s linear; - } - - .cMenuToolbarCommandsubItem-font-color button -{ - background-color: transparent; -} -.cMenuToolbarCommandsubItem-font-color button:hover -{ - background-color: var(--interactive-normal); -} - - .cMenuToolbarSettingsTabsContainer .cMenuToolbarCommandItem .setting-item-info { - - flex:30%; -margin: 0; -} - .cMenuToolbarSettingsTabsContainer .cMenuToolbarSettingsTabsContainer_sub - { - border-left: 1px solid var(--background-modifier-border); - flex-flow: column; - min-height: 45px; - display: flex; - padding: 0; - margin-left: 10px; - flex: 70%; - } - .cMenuToolbarSettingsTabsContainer .cMenuToolbarSettingsTabsContainer_sub:empty - { - border: 2px dashed rgba(var(--interactive-accent-rgb),0.5); - } - .cMenuToolbarSettingsTabsContainer .cMenuToolbarSettingsTabsContainer_sub:empty::before { - content: "✖️Drag it here"; - margin: auto; - font-size: 12px; -} - .cMenuToolbarSettingsTabsContainer .cMenuToolbarSettingsTabsContainer_sub .cMenuToolbarCommandItem - { - flex: auto; - margin-left: 2em;; - } - .cMenuToolbarSettingsTabsContainer .cMenuToolbarSettingsTabsContainer_sub .setting-item-control - { -flex: 0; - } - - .cMenuToolbarSettingsTabsContainer .cMenuToolbarCommandSubItem>.setting-item-info - { - flex: 70px; - } - .cMenuToolbarCommandSubItem>.setting-item-control -{ - - justify-content: flex-start; -} - .modal.mod-settings button:not(.mod-cta):not(.mod-warning).cMenuToolbarSettingsButton.cMenuToolbarSettingsButtonaddsub { - background-color: var(--background-secondary-alt); -} - - -.setting-item button.cMenuToolbarSettingsIcon{ - display: block; - transform: translateX(-30%); - -webkit-transform: translateX(-30%); -} -.setting-item button.cMenuToolbarSettingsIcon:empty::before{ - content: "❗"; -} -.setting-item button.cMenuToolbarSettingsIcon svg{ - max-width: 1.5em; - max-height: 1.5em; -} -.modal.mod-settings button:not(.mod-cta):not(.mod-warning).cMenuToolbarSettingsIcon:hover{ - background-color: var(--interactive-accent-hover); -} -.modal.mod-settings button:not(.mod-cta):not(.mod-warning).cMenuToolbarSettingsIcon -{ - background-color: transparent; - box-shadow: 0 1px 1px 0px var(--background-modifier-border); -} -@media screen and (min-width: 781px){ - .cMenuToolbar-Modal .wideInputPromptInputEl { - width: 40rem; - max-width: 100%; - height: 20rem; - background-color: rgb(var(--background-primary-rgb),0.8); -} -} - -.cMenuToolbarcustomIcon svg { - max-width: 1.3em; - max-height: 1.3em; - display: flex; -} - - -.cMenuToolbarSettingsButton svg { - max-width: 1.3em; - max-height: 1.3em; - display: flex; -} - -.cmdr-page-header -{ - min-width: 1em;; -} - - -.x-color-picker-wrapper { - right: 0px; - top:1.8em; - min-width: 1px; - padding: 10px; - box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14); - position: absolute; - width: fit-content; - font-weight: 400; - font-family: Source Sans Pro,sans-serif; - border-radius: 4px; - background-color: var(--background-primary); -} -.markdown-source-view.mod-cm6 .x-color-picker-wrapper table.x-color-picker-table#x-color-picker-table { - width: unset; - border-collapse: separate; - border-spacing: 6px; - margin: auto !important; -} -.x-color-picker-wrapper table.x-color-picker-table#x-backgroundcolor-picker-table { - width: unset; - border-collapse: separate; - border-spacing: 6px; - margin: auto !important; -} -.x-color-picker-wrapper .x-color-picker-table th { - border: 0; - text-align: left; - font-weight: normal; - background: transparent !important; - color: #718096; -} -.x-color-picker-wrapper #x-color-picker-table td { - font-size: 1px; - padding: 9px; - cursor: pointer; - border: solid 1px var(--background-modifier-border); -} -.x-color-picker-wrapper #x-backgroundcolor-picker-table td { - font-size: 1px; - border-radius: 50%; - padding: 9px; - cursor: pointer; - border: solid 1px var(--background-modifier-border); -} -.x-color-picker-wrapper .x-color-picker-table tr td:hover { - box-shadow: 0 3px 6px -4px rgba(0,0,0,.12),0 6px 16px 0 rgba(0,0,0,.08),0 9px 28px 8px rgba(0,0,0,.05); -} -.x-color-picker-wrapper tbody>tr:hover -{ -background-color:transparent !important; -} -/**top**/ -#cMenuToolbarModalBar.top { - display: flex; - flex-wrap: nowrap; - position: relative; - height: 38px; - align-items: center; - transition: all 0.2s linear; - -webkit-transition: all 0.2s linear; - -} - -#cMenuToolbarModalBar.top :is(.cMenuToolbarCommandItem,button[class^=cMenuToolbarCommandsubItem]):not(.cMenuToolbar-Divider-Line) -{ -font-size: 10px; - margin-right: 0px; - clear: both; - opacity: 1; - flex-shrink:0; - height: 26px; - padding: 0; - border: none; - background: transparent; - cursor: pointer; - outline: none; - box-shadow: none; - border-radius: 2px; - display: inline-flex; - justify-content: center; - align-items: center; - transition: all 0.2s linear; - -webkit-transition: all 0.2s linear; - - - - -} -#cMenuToolbarModalBar.top button.cMenuToolbarCommandItem:hover { - background-color: var(--interactive-hover); -} - - - -#cMenuToolbarPopoverBar{ - - padding: 0 10px; - display: inline-flex; - align-items: center; - width: fit-content; - z-index: var(--layer-status-bar); - background-color: var(--background-secondary); - background-clip: padding-box; - border-radius: 6px; - box-shadow: 0 3px 6px -4px rgba(0,0,0,.12),0 6px 16px 0 rgba(0,0,0,.08),0 9px 28px 8px rgba(0,0,0,.05); - box-shadow: 0 0 8px rgba(0,0,0,.15)\9; - margin-left: auto; - margin-right: 25px; - transition: all 0.1s linear; - -webkit-transition: all 0.1s linear; - margin-top: 32px; - position: absolute; - right: 0; -} - -#cMenuToolbarPopoverBar :is(.cMenuToolbarCommandItem,button[class^=cMenuToolbarCommandsubItem]){ - - height: 26px; -margin-left: 4px; - font-size: 10px; - margin-right: 4px; - clear: both; - opacity: 1; - flex-shrink:0; - height: 26px; - padding: 0; - border: none; - background: transparent; - cursor: pointer; - outline: none; - box-shadow: none; - border-radius: 2px; - display: inline-flex; - justify-content: center; - align-items: center; - transition: all 0.2s linear; - -webkit-transition: all 0.2s linear; - -} -#cMenuToolbarPopoverBar :is(.cMenuToolbarCommandItem,button[class^=cMenuToolbarCommandsubItem]):hover{ - background-color: var(--interactive-hover); -} - -#cMenuToolbarModalBar .more-menu { - display: flex; - align-items: center; - box-shadow:none; - margin-left: 4px; - border-left: 1px inset var( --background-modifier-form-field); - height: 24px; - opacity: 0.8; -} - /*Divider-Line**/ - - .cMenuToolbarSettingsTabsContainer .cMenuToolbar-Divider-Line - { - padding: 0; - - line-height: 0px; - border-left: 200px solid rgba(var(--interactive-accent-rgb),0.05); - border-right: 200px solid rgba(var(--interactive-accent-rgb),0.05); - text-align: center; - background: rgba(var(--interactive-accent-rgb),0.2); - } - .cMenuToolbarSettingsTabsContainer .cMenuToolbar-Divider-Line .setting-item-control button:not(:last-child) - { - display: none; - } - - .cMenuToolbarSettingsTabsContainer .cMenuToolbar-Divider-Line .setting-item-info - { - flex: 1 1 auto; - } - .cMenuToolbarSettingsTabsContainer .cMenuToolbar-Divider-Line .setting-item-control - { - justify-content: flex-start; - } - .cMenuToolbarSettingsTabsContainer .cMenuToolbar-Divider-Line .setting-item-info .setting-item-name - { - font-size: 12px; - text-align: right; - - } - .cMenuToolbarSettingsTabsContainer .cMenuToolbar-Divider-Line .setting-item-control button:last-child - { - padding: 0; - background-color: transparent!important; - } - .cMenuToolbarSettingsTabsContainer .cMenuToolbar-Divider-Line .setting-item-control button:last-child svg - { - display: none; - } - .cMenuToolbarSettingsTabsContainer .cMenuToolbar-Divider-Line .setting-item-control button:last-child::before - { - content: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M511.674077 66.707284c-246.52265 0-446.347744 199.835328-446.347744 446.347744s199.825095 446.356954 446.347744 446.356954c246.50423 0 446.348768-199.844537 446.348768-446.356954S758.177284 66.707284 511.674077 66.707284zM744.967424 667.159826c21.8701 21.8701 21.8701 57.310264 0 79.199807-21.8701 21.851681-57.30924 21.851681-79.198783-0.019443L511.674077 592.264045 357.56007 746.359632c-21.8701 21.8701-57.30924 21.851681-79.17934-0.019443s-21.8701-57.290821 0-79.160921L432.493713 513.065262 278.379707 358.950232c-21.8701-21.86089-21.8701-57.328683 0-79.18855 21.8701-21.87931 57.30924-21.87931 79.17934 0l154.114007 154.104797 154.095587-154.104797c21.889543-21.87931 57.32766-21.87931 79.198783-0.010233 21.8701 21.8701 21.8701 57.348126 0 79.207993L590.89128 513.065262 744.967424 667.159826z' fill='%23666666'/%3E%3C/svg%3E"); - } -:is(#cMenuToolbarModalBar,#cMenuToolbarPopoverBar) button.cMenuToolbarCommandItem.cMenuToolbar-Divider-Line -{ - min-width:unset; - flex-shrink: 0; - display: inline-flex; - width: 0.6px; - background-color: var(--background-modifier-border); - height: 22px; - opacity: 0.8; - margin: 0; -} -.theme-dark :is(#cMenuToolbarModalBar,#cMenuToolbarPopoverBar) button.cMenuToolbarCommandItem.cMenuToolbar-Divider-Line -{ - - background-color: #4f4f5188; - -} -:is(#cMenuToolbarModalBar,#cMenuToolbarPopoverBar) button.cMenuToolbarCommandItem.cMenuToolbar-Divider-Line svg -{ - display: none; -} diff --git a/.obsidian/plugins/obsidian-editing-toolbar/tsconfig.json b/.obsidian/plugins/obsidian-editing-toolbar/tsconfig.json deleted file mode 100644 index 7d1f295..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/tsconfig.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "compilerOptions": { - "baseUrl": ".", - "paths": { - "src": ["src/*"] - }, - "module": "ESNext", - "target": "es6", - "jsx": "react", - "allowJs": true, - "noImplicitAny": true, - "moduleResolution": "node", - "importHelpers": true, - "inlineSourceMap": true, - "inlineSources": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "types": ["node"], - "lib": ["dom", "es5", "scripthost", "es2015"] - }, - "include": ["**/*.ts", "main.js/*"], - "exclude": ["node_modules/*"] -} diff --git a/.obsidian/plugins/obsidian-editing-toolbar/versions.json b/.obsidian/plugins/obsidian-editing-toolbar/versions.json deleted file mode 100644 index 1d39b85..0000000 --- a/.obsidian/plugins/obsidian-editing-toolbar/versions.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "1.1.2": "0.9.12" -}