PluginProbe
WindPress – Tailwind CSS integration for WordPress / 3.0.14
WindPress – Tailwind CSS integration for WordPress v3.0.14
3.2.90 3.2.89 3.2.88 3.2.87 3.2.86 3.2.85 3.2.84 3.2.83 3.2.82 3.2.81 trunk 3.0.0 3.0.1 3.0.10 3.0.11 3.0.12 3.0.13 3.0.14 3.0.15 3.0.16 3.0.17 3.0.2 3.0.3 3.0.4 3.0.5 All 144 releases
windpress / build / main-B4eF9Z2z.js

main-B4eF9Z2z.js in WindPress – Tailwind CSS integration for WordPress 3.0.14, at build/main-B4eF9Z2z.js

16 lines 7.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import{_ as w,__tla as z}from"./monaco-editor-CCkURBm_.min.js";import{l as V}from"./logger-BTW-zIW3.js";import{l as j,c as B,n as y,T as X,t as Y,f as U,H as G}from"./highlight-in-textarea-CJg1v5bF.js";import{i as a,o as p,a as F}from"./constant-YYj745Bx.js";import{d as J}from"./debounce-_YMsNRd1.min.js";import{r as b,w as P,n as h}from"./runtime-core.esm-bundler-CJ-U7ikm.min.js";import"./isObject-B5R9K1Pz.min.js";import"./isSymbol-fWRF9ksj.min.js";Promise.all([(()=>{try{return z}catch{}})()]).then(async()=>{let x=null;(async()=>(await j(w(()=>import("./wasm-CG6Dc4jp.min.js"),[],import.meta.url)),x=await B({themes:[w(()=>import("./dark-plus-KEYLhlmT.min.js"),[],import.meta.url),w(()=>import("./light-plus-BsvsQ1iS.min.js"),[],import.meta.url)],langs:[w(()=>import("./css-5bRVBCrv.min.js"),[],import.meta.url)]})))();const i=document.createRange().createContextualFragment(`
2 <textarea id="windpressoxygen-plc-input" class="windpressoxygen-plc-input" rows="2" spellcheck="false"></textarea>
3 `).querySelector("#windpressoxygen-plc-input"),_=document.createRange().createContextualFragment(`
4 <div class="windpressoxygen-plc-action-container">
5 <div class="actions">
6 </div>
7 </div>
8 `).querySelector(".windpressoxygen-plc-action-container"),N=_.querySelector(".actions"),C=document.createRange().createContextualFragment(`
9 <span id="windpressoxygen-plc-class-sort" class="oxygen-svg-wrapper windpressoxygen-plc-class-sort">
10 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="oxygen-svg icon icon-tabler icons-tabler-outline icon-tabler-reorder"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 15m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z" /><path d="M10 15m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z" /><path d="M17 15m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z" /><path d="M5 11v-3a3 3 0 0 1 3 -3h8a3 3 0 0 1 3 3v3" /><path d="M16.5 8.5l2.5 2.5l2.5 -2.5" /></svg>
11 </span>
12 `).querySelector("#windpressoxygen-plc-class-sort");N.appendChild(C);const L=b(!1),f=b(null);let E=null;y(i);let S=[];wp.hooks.addAction("windpressoxygen-autocomplete-items-refresh","windpressoxygen",()=>{S=wp.hooks.applyFilters("windpressoxygen-autocomplete-items",[],i.value)}),wp.hooks.doAction("windpressoxygen-autocomplete-items-refresh");const c=new X({containerClass:"windpressoxygen-tribute-container",autocompleteMode:!0,menuItemLimit:40,noMatchTemplate:"",values:async function(e,n){const t=await wp.hooks.applyFilters("windpressoxygen-autocomplete-items-query",S,e);n(t)},lookup:"value",itemClass:"class-item",menuItemTemplate:function(e){let n="";return e.original.color!==void 0&&(n+=`background-color: ${e.original.color};`),e.original.fontWeight!==void 0&&(n+=`font-weight: ${e.original.fontWeight};`),`
13 <span class="class-name" data-tribute-class-name="${e.original.value}">${e.string}</span>
14 <span class="class-hint" style="${n}"></span>
15 `}});c.setMenuContainer=function(e){this.menuContainer=e};const O=c.events.callbacks;c.events.callbacks=function(){return{...O.call(this),up:(e,n)=>{if(this.tribute.isActive&&this.tribute.current.filteredItems){e.preventDefault(),e.stopPropagation();let t=this.tribute.current.filteredItems.length,s=this.tribute.menuSelected;t>s&&s>0?(this.tribute.menuSelected--,this.setActiveLi()):s===0&&(this.tribute.menuSelected=t-1,this.setActiveLi(),this.tribute.menu.scrollTop=this.tribute.menu.scrollHeight),I()}},down:(e,n)=>{if(this.tribute.isActive&&this.tribute.current.filteredItems){e.preventDefault(),e.stopPropagation();let t=this.tribute.current.filteredItems.length-1,s=this.tribute.menuSelected;t>s?(this.tribute.menuSelected++,this.setActiveLi()):t===s&&(this.tribute.menuSelected=0,this.setActiveLi(),this.tribute.menu.scrollTop=0),I()}}}},c.attach(i),new MutationObserver(function(e){L.value=!e[0].target.classList.contains("ng-hide")}).observe(document.querySelector(".oxygen-sidebar-currently-editing"),{attributes:!0,attributeFilter:["class"]});const R=a.activateComponent;a.activateComponent=function(e,n,t){R(e,n,t),f.value=a.component.active.id};function k(e){const n=a.component.active.id,t=a.component.active.name;if(n===0)return;const s=a.component.options[n];if(s.model===void 0)return;s.model["custom-attributes"]===void 0&&F.addCustomAttribute("plainclass",e);const o=s.model["custom-attributes"],l=o.find(u=>u.name==="plainclass");l?l.value=e:o.push({name:"plainclass",value:e}),a.component.options[n].model["custom-attributes"]=o,a.setOption(n,t,"custom-attributes"),a.applyCustomAttributes(n)}P([f,L],(e,n)=>{e[0]!==n[0]&&h(()=>{var l;const t=a.component.active.id;if(t===0)return;const s=a.component.options[t];if(s.model===void 0)return;s.model["custom-attributes"]===void 0&&F.addCustomAttribute("plainclass","");const o=s.model["custom-attributes"];i.value=((l=o==null?void 0:o.find(u=>u.name==="plainclass"))==null?void 0:l.value)||"",A()}),e[0]&&e[1]&&h(()=>{const t=document.querySelector(".oxygen-sidebar-currently-editing");t.querySelector(".windpressoxygen-plc-input")===null&&(t.appendChild(_),window.tippy(".windpressoxygen-plc-class-sort",{content:"Automatic Class Sorting",animation:"shift-toward",placement:"right"}),t.appendChild(i),E=new G(i,{highlight:[{highlight:new RegExp("(?<=\\s|^)(?:(?!\\s).)+(?=\\s|$)","g"),className:"word"},{highlight:new RegExp("(?<=\\s)\\s","g"),className:"multispace",blank:!0}]}),y.update(i))})}),i.addEventListener("input",function(e){k(e.target.value)});function A(){h(()=>{try{E.handleInput()}catch{}y.update(i),c.hideMenu()})}i.addEventListener("highlights-updated",function(e){W()});let g=Y(document.createElement("div"),{plugins:[U],allowHTML:!0,arrow:!1,duration:[500,null],followCursor:!0,trigger:"manual"});function W(){var o,l,u;if(((u=(l=(o=p.contentWindow.windpress)==null?void 0:o.loaded)==null?void 0:l.module)==null?void 0:u.classnameToCss)!==!0)return;const e=document.querySelector(".hit-container");if(e===null)return;g.reference=e;async function n(r){const d=r.textContent,m=await p.contentWindow.windpress.module.classnameToCss.generate(d);if(m===null||m.trim()==="")return null;g.setContent(x.codeToHtml(m,{lang:"css",theme:"dark-plus"})),g.show()}const t=b(null),s=J(function(r){const d=r.clientX,m=r.clientY,$=document.elementsFromPoint(d,m).find(H=>H.matches('mark[class="word"]'));t.value=$||null},10);e.addEventListener("mousemove",s),e.addEventListener("mouseleave",function(r){t.value=null}),P(t,(r,d)=>{r&&r!==d?n(r):g.hide()})}const D=new MutationObserver(function(e){e.forEach(function(n){n.type==="childList"&&n.addedNodes.length>0&&n.addedNodes.forEach(t=>{t.addEventListener("mouseenter",s=>{const o=t.querySelector(".class-name").dataset.tributeClassName;M(o)}),t.addEventListener("mouseleave",s=>{T()}),t.addEventListener("click",s=>{T()})})})});let v=null;i.addEventListener("tribute-active-true",function(e){v===null&&(v=document.querySelector(".windpressoxygen-tribute-container>ul")),h(()=>{v&&D.observe(v,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]})})}),C.addEventListener("click",async function(e){var n,t,s;((s=(t=(n=p.contentWindow.windpress)==null?void 0:n.loaded)==null?void 0:t.module)==null?void 0:s.classSorter)===!0&&(i.value=await p.contentWindow.windpress.module.classSorter.sort(i.value),k(i.value),A())});function M(e){q({action:"windpressoxygen-preview-class",do:"add",elementId:f.value,className:e})}function T(){q({action:"windpressoxygen-preview-class",do:"remove"})}function I(){h(()=>{let e=c.menu.querySelector("li.highlight>span.class-name");M(e.dataset.tributeClassName)})}function q(e){p.contentWindow.postMessage(e,"*")}V("Module loaded!",{module:"plain-classes"})});
16